/* ---------- Expeditions ---------- */
.ex { gap: .35rem; }

/* cards */
.ex-card { position: relative; flex: none; width: 2.6rem; aspect-ratio: 5 / 7; border-radius: 8px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--cc) 100%, #fff 18%), var(--cc));
  color: var(--ci); box-shadow: 0 2px 0 #0006, inset 0 0 0 2px #ffffff40;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: .15rem 0 .2rem;
  font-family: var(--fun); font-weight: 700; transition: transform .15s, box-shadow .15s, opacity .2s; }
.ex-card .v { font-size: 1.15rem; line-height: 1; }
.ex-card .e { font-size: .8rem; line-height: 1; }
.ex-card.pop { animation: expop .45s cubic-bezier(.3, 1.7, .5, 1); }
@keyframes expop { from { transform: scale(.5) translateY(30%); opacity: 0; } }

/* mini cards stacked in lanes: only the top strip of each shows, newest fully */
.ex-card.mini { width: 100%; aspect-ratio: auto; height: 1.85rem; border-radius: 6px; flex-direction: row; justify-content: space-between;
  align-items: flex-start; padding: .12rem .3rem 0; margin-top: -1.05rem; box-shadow: 0 -1px 3px #0005, inset 0 0 0 1.5px #ffffff40; }
.ex-card.mini:first-child { margin-top: 0; }
.ex-card.mini .v { font-size: .78rem; }
.ex-card.mini .e { font-size: .55rem; margin-top: .1rem; }

/* player bars */
.ex-bar { flex: none; display: flex; align-items: center; gap: .6rem; padding: .3rem .6rem; border-radius: 14px;
  background: var(--panel); border: 2px solid var(--line); transition: border-color .25s; }
.ex-bar.turn { border-color: #f59e0b; animation: exbreathe 2s ease-in-out infinite; }
@keyframes exbreathe { 50% { box-shadow: 0 0 16px #f59e0b88; } }
.ex-bar.offline .ex-who b::after { content: " (offline)"; color: var(--muted); font-weight: 400; font-size: .8em; }
.ex-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.ex-who b { font-family: var(--fun); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-who small { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.ex-num { display: flex; flex-direction: column; align-items: center; line-height: 1; min-width: 3rem; }
.ex-num b { font-family: var(--fun); font-size: 1.2rem; }
.ex-num b.neg { color: var(--bad); }
.ex-num small { color: var(--muted); font-size: .62rem; }

/* expedition lanes */
.ex-lanes { flex: 1; min-height: 3.6rem; display: grid; grid-template-columns: repeat(5, 1fr); gap: .3rem; }
.ex-lane { min-height: 0; display: flex; flex-direction: column; border-radius: 10px; padding: .25rem .25rem .1rem;
  background: color-mix(in srgb, var(--cc) 10%, transparent); border: 1px solid color-mix(in srgb, var(--cc) 30%, transparent);
  transition: background .2s, border-color .2s, box-shadow .2s; }
.ex-stack { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.ex-empty { margin: auto; opacity: .3; font-size: 1.2rem; }
.ex-ls { flex: none; text-align: center; font-size: .72rem; font-weight: 700; color: var(--muted); font-family: var(--fun); padding-top: .1rem; }
.ex-ls.pos { color: var(--good); }
.ex-ls.neg { color: var(--bad); }
.ex-lane.target { border: 2px dashed var(--cc); background: color-mix(in srgb, var(--cc) 25%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--cc) 60%, transparent); cursor: pointer; }
.ex-lane.blocked { border: 2px dashed var(--bad); }

/* middle: discard piles + deck */
.ex-mid { flex: none; display: grid; grid-template-columns: repeat(5, 1fr) 1.15fr; gap: .3rem; align-items: center;
  padding: .3rem; border-radius: 14px; background: #0003; border: 1px solid var(--line); }
.ex-pile, .ex-deck { position: relative; display: grid; place-items: center; border-radius: 9px; transition: transform .15s, box-shadow .2s; }
.ex-pile .ex-card { width: min(100%, 2.7rem); }
.ex-slot { width: min(100%, 2.7rem); aspect-ratio: 5 / 7; border-radius: 8px; border: 2px dashed color-mix(in srgb, var(--cc) 50%, transparent);
  display: grid; place-items: center; opacity: .5; font-size: .9rem; }
.ex-cnt { position: absolute; top: -.35rem; right: -.1rem; background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  font-size: .62rem; padding: 0 .3rem; color: var(--muted); }
.ex-pile.can, .ex-deck.can { cursor: pointer; animation: exbob 1.2s ease-in-out infinite; }
.ex-pile.can .ex-card, .ex-deck.can .ex-back { box-shadow: 0 0 0 2px var(--accent), 0 0 16px #ffc14588; }
.ex-pile.target .ex-slot, .ex-pile.target .ex-card { box-shadow: 0 0 0 2px var(--text), 0 0 12px #fff6; }
.ex-pile.target { cursor: pointer; }
@keyframes exbob { 50% { transform: translateY(-3px); } }
.ex-back { width: min(100%, 3rem); aspect-ratio: 5 / 7; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, #3b2a6b 0 6px, #2a1d52 6px 12px); border: 2px solid #ffffff30; line-height: 1; }
.ex-back b { font-family: var(--fun); font-size: 1.15rem; }
.ex-back small { font-size: .6rem; color: var(--muted); }
.ex-deck.low .ex-back b { color: var(--accent-2); }

/* hand */
.ex-hand { flex: none; display: flex; justify-content: center; gap: .25rem; padding: .2rem 0 .1rem; }
.ex-hand .ex-card { width: calc((100% - 2rem) / 9); max-width: 3.4rem; cursor: pointer; }
.ex-hand .ex-card .v { font-size: clamp(1rem, 5vw, 1.4rem); }
.ex-hand.live .ex-card.ok { box-shadow: 0 2px 0 #0006, inset 0 0 0 2px #ffffff60, 0 0 10px color-mix(in srgb, var(--cc) 70%, transparent); }
.ex-hand .ex-card.dead { opacity: .55; filter: saturate(.5); }
.ex-hand .ex-card.sel { transform: translateY(-.7rem) scale(1.08); opacity: 1; filter: none;
  box-shadow: 0 0 0 3px var(--text), 0 6px 14px #000a; z-index: 1; }

.ex-summary { flex: none; display: flex; justify-content: center; gap: .8rem; font-size: .8rem; color: var(--muted); }
.ex-summary b { color: var(--text); font-family: var(--fun); }

.ex .statusbar.nudge { animation: exshake .4s; }
@keyframes exshake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.ex .dk-actions button:disabled { opacity: .4; }

@media (prefers-reduced-motion: reduce) {
  .ex-card.pop, .ex-pile.can, .ex-deck.can, .ex-bar.turn { animation: none !important; }
}
