:root {
  --night: #16222c; --ink: #2b2118; --ink-soft: #5d4e3d;
  --parch: #f3e9d2; --parch-2: #e9dcbd; --parch-edge: #c8a96a; --gold: #d8a93b; --gold-2: #f0c95a;
  --red: #c0392b; --red-2: #9e2a1f; --pine: #2f5d3a; --wood: #5b3a22; --wood-2: #7a5230;
  --good: #3f8a46; --bad: #c0392b;
  --display: "Fredoka", "Alegreya Sans", system-ui, sans-serif; --brand: "Cinzel", Georgia, serif;
  --body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--night); font-family: var(--body); color: var(--ink); font-size: 17px; font-variant-numeric: lining-nums;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
#map { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
button { font: inherit; cursor: pointer; color: inherit; }
button:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; }
img { display: block; }
h2, h3, h4 { font-family: var(--display); font-weight: 600; margin: 0; letter-spacing: 0; }
.good { color: var(--good); } .bad { color: var(--bad); } .dim { color: var(--ink-soft); font-size: 15px; }

/* key caps: the same everywhere */
.kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 5px; font: 800 14px/1 var(--body);
  background: linear-gradient(#fffaf0, #e8dcc0); color: #3a2a18; border: 1px solid #8a6a3a; box-shadow: 0 2px 0 #8a6a3a; vertical-align: middle; white-space: nowrap; }

/* surfaces and buttons */
.parch { background: radial-gradient(ellipse at 30% 20%, #faf3e2 0%, var(--parch) 55%, var(--parch-2) 100%); border: 2px solid var(--parch-edge);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), inset 0 0 24px rgba(160, 120, 60, 0.18), var(--shadow); border-radius: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 2px solid #7a2a1e; background: linear-gradient(#d04a3a, var(--red) 55%, var(--red-2)); color: #fff7e6;
  font-weight: 800; padding: 10px 18px; border-radius: 10px; min-height: 48px; font-size: 17px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 3px 0 #5a1a12, 0 6px 14px rgba(0, 0, 0, 0.3);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); transition: transform 0.08s, filter 0.15s; }
.btn:hover:not([disabled]) { filter: brightness(1.1); transform: translateY(-1px); }
.btn:active:not([disabled]) { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 1px 0 #5a1a12; }
.btn[disabled] { filter: grayscale(0.7) brightness(0.85); cursor: default; opacity: 0.55; }
.btn.gold { border-color: #8a6414; background: linear-gradient(#f5d36a, var(--gold) 60%, #b8862a); color: #3a2408; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 3px 0 #6a4a10, 0 6px 14px rgba(0, 0, 0, 0.3); }
.btn.wood { border-color: #3a2412; background: linear-gradient(#8a6038, var(--wood-2) 55%, var(--wood)); color: #fbeedb; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 3px 0 #2a1a0c, 0 6px 14px rgba(0, 0, 0, 0.3); }
.btn.ghost { background: rgba(255, 248, 230, 0.1); border-color: rgba(255, 240, 210, 0.6); color: #fff4dc; box-shadow: none; }
.btn.small { padding: 6px 12px; min-height: 40px; font-size: 15px; }
.btn.big { padding: 12px 26px; font-size: 20px; font-family: var(--display); min-height: 56px; }
.btn .kbd { margin-left: 2px; }
.icon-btn { width: 46px; height: 46px; border-radius: 10px; border: 1px solid rgba(240, 210, 150, 0.45); background: rgba(255, 240, 210, 0.08); color: #f6e7c8; font-size: 22px; display: grid; place-items: center; }
.icon-btn:hover { background: rgba(255, 240, 210, 0.18); }
.icon-btn img { width: 28px; height: 28px; }
.icon-btn.off { opacity: 0.45; }
.cost { display: inline-flex; gap: 10px; flex-wrap: wrap; font-weight: 800; font-size: 19px; font-variant-numeric: lining-nums tabular-nums; align-items: center; }
.cost span { display: inline-flex; align-items: center; gap: 3px; }
.cost img { width: 26px; height: 26px; }
.cost .short { color: var(--bad); }
.cost.lock { color: var(--ink-soft); font-size: 14px; font-weight: 700; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: 5px; background: rgba(90, 60, 30, 0.12); color: var(--ink-soft); }

/* ---------- top bar ---------- */
#top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: calc(6px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 6px max(12px, env(safe-area-inset-left, 0px));
  background: linear-gradient(#3b2716, #2a1b0f); border-bottom: 3px solid var(--gold); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45); color: #f6e7c8; }
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand img { width: 38px; height: 44px; }
.brand b { font-family: var(--brand); font-size: 19px; letter-spacing: 0.12em; display: block; line-height: 1; color: #ffe9b0; }
.brand small { font-size: 14px; color: #d8c49a; }
.resbar { display: flex; gap: 6px; flex: 1; justify-content: safe center; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.chip { display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: 24px; background: rgba(255, 240, 210, 0.08); border: 1px solid rgba(240, 210, 150, 0.22); cursor: default; white-space: nowrap; transition: transform 0.15s; }
.chip:hover { background: rgba(255, 240, 210, 0.16); }
.chip img { width: 30px; height: 30px; }
.chip b { font-size: 20px; font-variant-numeric: lining-nums tabular-nums; color: #fff4dc; }
.chip b i { font-style: normal; font-size: 15px; color: #d8c49a; }
.chip small { font-size: 14px; font-weight: 800; font-variant-numeric: lining-nums tabular-nums; }
.chip small.up { color: #a8f08a; } .chip small.down { color: #ffb0a0; }
.chip.warn { border-color: #ff8a6a; background: rgba(192, 57, 43, 0.3); animation: pulse 1.2s infinite; }
.chip.bump { animation: bump 0.35s; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(255, 120, 90, 0.25); } }
@keyframes bump { 40% { transform: scale(1.18); background: rgba(255, 230, 140, 0.35); } }
.calendar { display: flex; align-items: center; gap: 10px; }
.calendar .yr { font-size: 14px; color: #d8c49a; font-weight: 700; }
.season-badge { font-family: var(--display); font-weight: 700; font-size: 17px; padding: 5px 14px; border-radius: 8px; color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4); }
.season-badge.spring { background: linear-gradient(#7cc062, #4f9a3e); } .season-badge.summer { background: linear-gradient(#e0b03a, #b8862a); }
.season-badge.raid { background: linear-gradient(#e06a4a, #a8321e); color: #fff; animation: pulse 1.2s infinite; }
.season-badge.autumn { background: linear-gradient(#d8702a, #a84a1e); } .season-badge.winter { background: linear-gradient(#6aa0c8, #3a6a94); }
.pips { display: flex; gap: 4px; margin-top: 3px; }
.pips i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(255, 240, 210, 0.5); }
.pips i.done { background: var(--gold); border-color: var(--gold-2); } .pips i.now { background: #fff4dc; box-shadow: 0 0 8px #fff4dc; } .pips i.boss { border-color: #ff8a7a; border-width: 2px; }
.gauges { display: flex; align-items: center; gap: 8px; }
/* village life and morale: chips like the resources, the number over a slim bar; morale adds its yield badge (details in its card) */
button.chip { font: inherit; color: inherit; cursor: pointer; }
.gv { display: grid; gap: 3px; min-width: 34px; }
.gv b { line-height: 1; }
.gmeter { display: block; height: 5px; border-radius: 3px; background: rgba(0, 0, 0, 0.5); overflow: hidden; }
.gmeter i { display: block; height: 100%; background: linear-gradient(90deg, #c0392b, #ff704a); transition: width 0.4s; }
.gmeter.morale i { background: linear-gradient(90deg, #d8a93b, #ffe080); }
#mo-fx { font: 800 13px/1 var(--body); padding: 3px 6px; border-radius: 8px; background: rgba(255, 240, 210, 0.12); color: #e8dcc0; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
#mo-fx.up { background: rgba(120, 200, 90, 0.2); color: #a8f08a; } #mo-fx.down { background: rgba(220, 90, 70, 0.25); color: #ffb0a0; }
.mo-chip > .kbd { opacity: 0.8; }
.brand, .calendar, .gauges, .sys { flex: none; }
/* fit levels, set by main.js fitTop (cumulative), so the bar never cuts text */
#top.f-brand .brand div { display: none; }
#top.f-tight { gap: 10px; }
#top.f-tight .resbar { gap: 4px; }
#top.f-tight .chip { padding: 3px 8px 3px 4px; gap: 4px; } #top.f-tight .chip img { width: 24px; height: 24px; } #top.f-tight .chip b { font-size: 17px; }
#top.f-tight .hero-chip { gap: 6px; padding-right: 8px; } #top.f-tight .hero-chip > .kbd, #top.f-tight .hcp-nm, #top.f-tight .mo-chip > .kbd { display: none; } #top.f-tight .hcp-r { min-width: 44px; }
#top.f-tight .gauges { gap: 6px; } #top.f-tight .sys { gap: 4px; } #top.f-tight .calendar { gap: 6px; } #top.f-tight .season-badge { padding: 5px 10px; }
#top.f-ring .hcp-r { display: none; } #top.f-ring .hero-chip { padding: 3px; } #top.f-ring .hcp-port::before { display: block; } #top.f-ring .hcp-port { box-shadow: none; }
#top.f-nogrow .chip .stack .grow { display: none; }
#top.f-wrap { flex-wrap: wrap; justify-content: space-between; row-gap: 5px; }
#top.f-wrap .resbar { order: 4; flex: 1 1 100%; justify-content: center; }
#top.f-wrap2 .resbar { flex-wrap: wrap; overflow: visible; row-gap: 4px; }
.sys { display: flex; gap: 6px; }

/* ---------- dock (right) ---------- */
.dock { position: fixed; right: max(10px, env(safe-area-inset-right, 0px)); top: calc(var(--top-h, 66px) + 14px); z-index: 16; display: grid; gap: 8px; }
.dock-btn { position: relative; width: 58px; height: 58px; border-radius: 14px; border: 2px solid var(--gold); background: linear-gradient(#3b2716, #2a1b0f); display: grid; place-items: center; box-shadow: var(--shadow); transition: transform 0.1s; }
.dock-btn:hover { transform: translateX(-3px); }
.dock-btn.on { background: var(--parch); }
.dock-btn img { width: 34px; height: 34px; }
.dock-btn .badge { position: absolute; left: -10px; bottom: -6px; min-width: 24px; padding: 2px 6px; border-radius: 10px; background: var(--red); color: #fff; font-weight: 800; font-size: 14px; border: 2px solid #fff4dc; }
.dock-panel { position: fixed; right: calc(80px + env(safe-area-inset-right, 0px)); top: calc(var(--top-h, 66px) + 14px); z-index: 17; width: 360px; max-height: calc(100vh - var(--top-h, 66px) - var(--hud-bottom, 200px) - 28px); overflow-y: auto; padding: 14px 16px; font-size: 17px; animation: slidein 0.18s; }
@keyframes slidein { from { transform: translateX(12px); opacity: 0; } }
.dock-panel h4 { display: flex; align-items: center; gap: 8px; font-size: 17px; color: var(--wood); margin: 4px 0 8px; }
.wave { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px dashed rgba(120, 90, 50, 0.3); }
.wave.gone { opacity: 0.45; }
.wave .num { font-family: var(--display); font-weight: 700; font-size: 18px; width: 20px; color: var(--red); }
.wave .gate { font-weight: 800; width: 104px; font-size: 15px; color: var(--ink-soft); }
.foes { display: flex; flex-wrap: wrap; gap: 2px 8px; }
.foe { display: inline-flex; align-items: center; font-weight: 800; font-size: 15px; }
.foe img { width: 34px; height: 34px; margin-right: -2px; }
.foe.boss { color: var(--red); }
.wline { display: flex; gap: 10px; align-items: center; margin: 8px 0; }
.wline img { width: 40px; height: 40px; flex: none; }
.wline div { flex: 1; }
.wline b { display: block; font-size: 17px; }
.wline small { color: var(--ink-soft); font-size: 15px; }
.progress { height: 12px; border-radius: 6px; background: rgba(90, 60, 30, 0.15); overflow: hidden; margin: 10px 0 6px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.row.sp { justify-content: space-between; font-weight: 700; font-size: 15px; }
.mini-icons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.mini-icons span { display: inline-flex; align-items: center; gap: 5px; font-size: 15px; font-weight: 700; padding: 3px 10px 3px 4px; border-radius: 14px; background: rgba(90, 60, 30, 0.1); }
.mini-icons img { width: 22px; height: 22px; }
.close-x { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--ink-soft); padding: 4px 8px; }

/* ---------- minimap ---------- */
.minimap { position: fixed; left: max(10px, env(safe-area-inset-left, 0px)); bottom: calc(var(--bar-h, 214px) + 8px); transition: bottom 0.25s; z-index: 15; padding: 6px; border-radius: 12px; background: linear-gradient(#3b2716, #2a1b0f); border: 2px solid var(--gold); box-shadow: var(--shadow); }
.minimap canvas { display: block; width: 240px; height: auto; border-radius: 5px; cursor: pointer; }
.minimap.closed canvas { display: none; }
.mini-tools { display: flex; gap: 4px; margin-top: 5px; }
.mini-btn { flex: 1; font-size: 14px; font-weight: 800; padding: 4px 4px; border-radius: 6px; border: 1px solid rgba(240, 210, 150, 0.35); background: rgba(255, 240, 210, 0.06); color: #e8d8b8; display: inline-flex; gap: 4px; align-items: center; justify-content: center; }
.mini-btn.on { background: rgba(240, 201, 90, 0.25); color: #fff4dc; }
#btn-mini { flex: 0 0 34px; }

/* ---------- info panel (left) ---------- */
.info { position: fixed; left: max(10px, env(safe-area-inset-left, 0px)); top: calc(var(--top-h, 66px) + 12px); width: 350px; z-index: 16; padding: 16px; max-height: calc(100vh - 460px); min-height: 120px; overflow-y: auto; font-size: 17px; animation: slidein 0.15s; }
.info .head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; padding-right: 20px; }
.info .head img { width: 72px; height: 72px; background: rgba(90, 60, 30, 0.08); border-radius: 10px; border: 1px solid rgba(120, 90, 50, 0.25); object-fit: contain; }
.info h3 { font-size: 22px; line-height: 1.1; color: var(--wood); }
.stars { color: var(--gold); letter-spacing: 2px; font-size: 17px; }
.stars .off { color: rgba(120, 90, 50, 0.3); }
.info .desc { margin: 6px 0; line-height: 1.35; }
.info .rows { display: grid; gap: 4px; margin: 8px 0; }
.info .rows div { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-bottom: 1px dotted rgba(120, 90, 50, 0.3); padding-bottom: 3px; }
.info .rows b { font-variant-numeric: lining-nums tabular-nums; display: inline-flex; align-items: center; gap: 4px; text-align: right; }
.yl { display: inline-flex; align-items: center; gap: 2px; }
.info .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.mk-gi { display: inline-flex; gap: 1px; vertical-align: middle; }
.mk-gi img { width: 18px; height: 18px; }
.mk-tt { display: grid; grid-template-columns: auto repeat(5, minmax(30px, auto)); gap: 3px 8px; align-items: center; justify-items: center; }
.mk-tt b { justify-self: start; font-weight: 600; opacity: 0.8; white-space: nowrap; }
.mk-tt span { font-variant-numeric: tabular-nums; }
.mk-tt i { opacity: 0.5; font-style: normal; padding: 0 1px; }
.mk-tt .now { color: #9be37d; opacity: 1; font-weight: 700; }
.refund { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.refund > span { display: inline-flex; align-items: center; gap: 1px; }
.refund img { width: 20px; height: 20px; }
.refund.none { font-weight: 600; font-size: 13px; opacity: 0.8; }
.info .why { color: var(--bad); font-weight: 700; margin-top: 6px; }
.info .ok { color: var(--good); font-weight: 800; margin-top: 6px; display: flex; gap: 6px; align-items: center; }
.info .note { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.info .region { margin: 10px 0 4px; }
.info .region b { font-size: 18px; display: block; margin-bottom: 4px; }
.upgrade-box { margin-top: 10px; padding: 10px; border-radius: 10px; background: rgba(216, 169, 59, 0.14); border: 1px solid rgba(216, 169, 59, 0.5); }
.cost-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.spec { text-align: left; border-radius: 10px; padding: 10px 12px; border: 2px solid var(--parch-edge); background: linear-gradient(#fffaf0, #f3e6c8); box-shadow: 0 2px 0 #a8884a; }
.spec:hover:not([disabled]) { border-color: var(--red); }
.spec b { display: block; font-size: 16px; color: var(--wood); }
.spec small { font-size: 14px; line-height: 1.25; display: block; }
.spec[disabled] { opacity: 0.5; }

/* ---------- build bar ---------- */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 18; display: flex; align-items: flex-end; gap: 12px;
  padding: 8px max(12px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  background: linear-gradient(rgba(42, 27, 15, 0), rgba(42, 27, 15, 0.94) 26%, #2a1b0f); pointer-events: none; }
.bar > * { pointer-events: auto; }
.bar-main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 6px; border-radius: 10px; border: 1px solid rgba(240, 210, 150, 0.35); background: rgba(255, 240, 210, 0.08); color: #f3e9d2; font-weight: 800; font-size: 15px; }
.tab img { width: 26px; height: 26px; }
.tab:hover { background: rgba(255, 240, 210, 0.16); }
.tab.on { background: var(--parch); color: var(--wood); border-color: var(--gold); box-shadow: 0 0 0 2px rgba(240, 201, 90, 0.4); }
.cards { display: flex; gap: 8px; overflow-x: auto; padding: 8px 2px 4px; }
.bcard { flex: none; width: 132px; border-radius: 12px; padding: 6px 6px 8px; text-align: center; position: relative; background: linear-gradient(#fbf4e3, var(--parch)); border: 2px solid var(--parch-edge);
  box-shadow: 0 3px 0 #8a6a3a, 0 6px 12px rgba(0, 0, 0, 0.3); transition: transform 0.1s; }
.bcard:hover { transform: translateY(-4px); }
.bcard.sel { border-color: var(--red); box-shadow: 0 0 0 3px rgba(240, 201, 90, 0.8), 0 3px 0 #8a6a3a; transform: translateY(-6px); }
.bcard img.pic { width: 84px; height: 72px; margin: 0 auto; object-fit: contain; }
.bcard .nm { font-weight: 800; font-size: 15px; line-height: 1.1; min-height: 34px; display: flex; align-items: center; justify-content: center; color: var(--wood); }
.bcard .cost { justify-content: center; gap: 6px; font-size: 18px; }
.bcard .cost img { width: 24px; height: 24px; }
.bcard > .kbd { position: absolute; left: 5px; top: 5px; }
.bcard .wk { position: absolute; right: 6px; top: 5px; display: flex; align-items: center; gap: 1px; font-size: 14px; font-weight: 800; color: var(--ink-soft); }
.bcard .wk img { width: 16px; height: 16px; }
.bcard.poor { filter: saturate(0.5); opacity: 0.8; }
/* start of a run: the Woodcutter comes first (it is free), everything else waits */
.bcard.must { border-color: #e0a92e; box-shadow: 0 0 0 3px #f0c95a, 0 0 22px rgba(255, 196, 70, 0.75); animation: mustPulse 1.3s ease-in-out infinite; }
.bcard.wait { filter: saturate(0.35); opacity: 0.55; }
.bcard .must-tag { position: absolute; left: 50%; top: -12px; transform: translateX(-50%); white-space: nowrap; padding: 2px 10px; border-radius: 999px; background: linear-gradient(#ffe9a0, #e8b840); color: #4a2e08; font: 700 13px var(--display); box-shadow: 0 2px 0 #a87a20; z-index: 2; }
.bcard .cost.free { display: inline-block; padding: 1px 10px; border-radius: 999px; background: #dff2d6; color: #2f6b3d; font: 700 15px var(--display); }
@keyframes mustPulse { 50% { box-shadow: 0 0 0 3px #f0c95a, 0 0 32px rgba(255, 196, 70, 0.95); transform: translateY(-3px); } }
.bcard.locked { filter: grayscale(1); opacity: 0.5; }
.endbox { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 190px; }
.endbox .hint { color: #e8d8b8; font-size: 14px; text-align: center; }

/* ---------- winter bar ---------- */
.winterbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 18; display: flex; align-items: center; gap: 16px;
  padding: 10px 16px; border-radius: 16px; background: linear-gradient(#24384a, #182633); border: 2px solid #8fc3e0; box-shadow: var(--shadow); color: #eaf6ff; max-width: calc(100vw - 20px); }
.wb-waves { min-width: 230px; }
.wb-waves .lbl { font-size: 15px; color: #cfe6f2; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.wb-waves .lbl span { display: inline-flex; gap: 4px; align-items: center; }
.wb-track { position: relative; height: 12px; border-radius: 6px; background: rgba(255, 255, 255, 0.14); margin-top: 6px; }
.wb-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: linear-gradient(90deg, #8fc3e0, #e8f6ff); }
.wb-track .mark { position: absolute; top: -4px; width: 4px; height: 20px; background: #ff8a7a; border-radius: 2px; }
.wb-track .mark.av { background: #ffffff; }
.powers { display: flex; gap: 8px; }
.power { position: relative; width: 66px; height: 66px; border-radius: 12px; border: 2px solid #8fc3e0; background: linear-gradient(#35506a, #22384c); display: grid; place-items: center; transition: transform 0.1s; }
.power:hover { transform: translateY(-3px); }
.power img { width: 40px; height: 40px; }
.power > .kbd { position: absolute; left: -6px; top: -8px; }
.power .c { position: absolute; right: 3px; bottom: 2px; display: flex; align-items: center; font-size: 14px; font-weight: 800; }
.power .c img { width: 16px; height: 16px; }
.power .cd { position: absolute; inset: 0; border-radius: 10px; background: rgba(10, 20, 30, 0.68); display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.power .cd.lock { font-size: 16px; color: #ffb0a0; background: rgba(10, 20, 30, 0.55); }
.power.ready { box-shadow: 0 0 0 3px rgba(143, 195, 224, 0.4), 0 0 18px rgba(143, 195, 224, 0.35); }
.power.arm { border-color: var(--gold-2); box-shadow: 0 0 0 4px rgba(240, 201, 90, 0.6); animation: pulse 0.8s infinite; }
.speed { display: flex; gap: 6px; }
.speed button { min-width: 54px; height: 46px; border-radius: 10px; border: 1px solid rgba(143, 195, 224, 0.5); background: rgba(255, 255, 255, 0.08); color: #eaf6ff; font-weight: 800; font-size: 16px; display: inline-flex; gap: 4px; align-items: center; justify-content: center; padding: 0 6px; }
.speed button.on { background: #eaf6ff; color: #182633; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, rgba(10, 14, 20, 0.45), rgba(10, 14, 20, 0.8));
  padding: max(14px, env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) max(14px, env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px)); animation: fade 0.2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: min(960px, 100%); max-height: 100%; overflow-y: auto; padding: 24px 28px; position: relative; animation: rise 0.28s cubic-bezier(.2, .9, .3, 1.2); }
.sheet.narrow { width: min(680px, 100%); }
/* the main buttons of a dialog stay in view while the content scrolls (setup, hero, end screens, and every other sheet that ends in an action row) */
.sheet { --sp-x: 28px; --sp-y: 24px; }
.sheet > .row.end:last-child { position: sticky; bottom: calc(-1 * var(--sp-y)); z-index: 5; margin: 0 calc(-1 * var(--sp-x)) calc(-1 * var(--sp-y)); padding: 22px var(--sp-x) var(--sp-y);
  background: linear-gradient(to bottom, rgba(243, 233, 210, 0), #f3e9d2 18px); border-radius: 0 0 10px 10px; }
.sheet.keep { animation: none; }
/* Keep the input lock visible even when the cards have their own entrance animation. */
.sheet.choice-locked button:not(:disabled), .title-screen.choice-locked .choice-action, #i-claim.choice-locked { opacity: 0.6 !important; }
@keyframes rise { from { transform: translateY(20px) scale(0.98); opacity: 0; } }
.sheet .eyebrow { font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 800; color: var(--ink-soft); }
.sheet h2 { font-size: 34px; color: var(--wood); line-height: 1.05; margin: 4px 0 12px; display: flex; align-items: center; gap: 10px; }
.sheet h4 { font-size: 19px; color: var(--red); margin: 14px 0 8px; }
.sheet p.lead { font-size: 19px; line-height: 1.4; margin: 0 0 12px; }
.scene { width: 100%; height: auto; border-radius: 10px; border: 2px solid var(--parch-edge); display: block; margin-bottom: 14px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); }
.choices { display: grid; gap: 10px; margin-top: 12px; }
.choice { text-align: left; border-radius: 12px; padding: 12px 16px; border: 2px solid var(--parch-edge); background: linear-gradient(#fffaf0, #f6ecd6); box-shadow: 0 3px 0 #a8884a; display: flex; align-items: center; gap: 12px; min-height: 60px; }
.choice:hover:not([disabled]) { border-color: var(--red); transform: translateX(3px); }
.choice b { font-size: 20px; flex: 1; font-family: var(--display); font-weight: 600; }
.choice small { color: var(--ink); font-size: 18px; font-weight: 700; line-height: 1.3; text-align: right; max-width: 60%; }
.choice[disabled] { opacity: 0.5; cursor: default; }
.draft { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 14px 0; }
.dcard { text-align: left; border-radius: 14px; padding: 14px 16px 16px; border: 2px solid var(--parch-edge); background: linear-gradient(#fffaf0, #f3e6c8); box-shadow: 0 4px 0 #a8884a, 0 8px 18px rgba(0, 0, 0, 0.18);
  display: grid; gap: 6px; align-content: start; transition: transform 0.12s, border-color 0.12s; position: relative; }
.dcard:hover { transform: translateY(-5px); border-color: var(--red); }
.dcard > .kbd { position: absolute; left: 10px; top: 10px; z-index: 1; }
.dcard .pic { width: 100%; height: 130px; object-fit: contain; background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.85), rgba(220, 200, 160, 0.25)); border-radius: 10px; }
.dcard .kind { font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 800; }
.dcard .kind.blueprint { color: #1f4f8a; } .dcard .kind.relic { color: #8a6414; } .dcard .kind.boon { color: var(--pine); }
.dcard .t { font-family: var(--display); font-size: 22px; font-weight: 600; color: var(--wood); line-height: 1.1; }
.dcard .d { font-size: 17px; line-height: 1.35; }
.dcard .pro { color: var(--good); font-weight: 800; } .dcard .con { color: var(--bad); font-weight: 800; }
.dcard .pro::before { content: "+ "; } .dcard .con::before { content: "− "; }
.law-seal { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; }
.spring-info { display: flex; flex-wrap: wrap; gap: 8px 14px; font-weight: 700; }
.spring-info span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 16px; background: rgba(90, 60, 30, 0.1); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.row.end { justify-content: flex-end; }
.goals { display: grid; gap: 10px; margin: 6px 0 4px; }
.goals div { display: flex; gap: 12px; align-items: center; font-size: 17px; line-height: 1.35; }
.goals img { flex: none; }
.hint-line { color: var(--ink-soft); font-size: 15px; }
.upkeep { display: grid; gap: 8px; margin: 10px 0; }
.upkeep div { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.5); border: 1px solid rgba(120, 90, 50, 0.2); font-size: 17px; }
.upkeep div.warn { background: rgba(192, 57, 43, 0.1); border-color: rgba(192, 57, 43, 0.5); }
.upkeep div > span:last-child { font-weight: 800; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 12px 0; }
.stat { background: rgba(255, 255, 255, 0.55); border: 1px solid rgba(120, 90, 50, 0.25); border-radius: 10px; padding: 10px 12px; display: grid; justify-items: start; gap: 2px; }
.stat b { font-family: var(--display); font-weight: 700; font-size: 28px; color: var(--wood); font-variant-numeric: lining-nums tabular-nums; }
.stat span { font-size: 14px; color: var(--ink-soft); font-weight: 800; }
.chron { max-height: 200px; overflow-y: auto; border-left: 3px solid var(--parch-edge); padding-left: 12px; margin: 10px 0; font-size: 15px; line-height: 1.4; }
.chron p { margin: 3px 0; }
.chron .y { font-family: var(--display); font-weight: 700; color: var(--red); margin-right: 8px; }
/* ---------- clans: setup picker (like the hero picker: crests in a row, the perks of the chosen clan below as lines with numbers) ---------- */
.clan-pick { margin: 10px 0 14px; }
.clan-row { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 10px; }
.clan-c { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 3px; padding: 10px 6px; border-radius: 16px; border: 2px solid var(--parch-edge); background: linear-gradient(#fffaf0, #f3e6c8);
  box-shadow: 0 4px 0 #a8884a; transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; animation: yrIn 0.4s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: calc(var(--i) * 50ms); min-width: 0; }
.clan-c > .kbd { position: absolute; left: 8px; top: 8px; z-index: 2; }
.clan-c:hover { transform: translateY(-4px); }
.cc-crest { position: relative; display: grid; place-items: center; width: 76px; height: 84px; }
.cc-crest > img { width: 72px; height: 84px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(60, 30, 10, 0.3)); }
.cc-crest .hc-lock { background: none; }
.clan-c b { font: 600 17px/1.1 var(--display); color: var(--wood); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cc-mini { display: flex; justify-content: center; gap: 2px; min-height: 26px; }
.cc-mini img { width: 26px; height: 26px; object-fit: contain; }
.clan-c.sel { border-color: var(--red); box-shadow: 0 4px 0 #a8884a, 0 0 0 4px rgba(240, 201, 90, 0.75); }
.clan-c.picked .cc-crest { animation: heroPick 0.24s ease-out; }
.clan-c.locked .cc-crest > img, .clan-c.locked .cc-mini { filter: grayscale(1); opacity: 0.55; }
.clan-c.locked b { opacity: 0.6; }
.clan-c.nope { animation: heroNope 0.26s ease-out; } .clan-c.nope .hc-lock svg { animation: heroLockNudge 0.26s ease-out; }
.clan-info { display: grid; grid-template-columns: 60px minmax(0, 1fr); grid-template-areas: "crest head" "lines lines"; align-items: center; gap: 14px; margin-top: 12px; padding: 12px 14px 14px; border-radius: 16px; background: rgba(255, 250, 235, 0.75); border: 2px solid rgba(160, 120, 60, 0.3); }
.clan-pick.preview .clan-info { border-style: dashed; border-color: var(--gold); }
.clan-info.pop { animation: heroInfoIn 0.18s ease-out; }
.ci-crest { grid-area: crest; align-self: center; } .ci-crest img { display: block; width: 100%; height: auto; aspect-ratio: 160 / 184; filter: drop-shadow(0 4px 6px rgba(60, 30, 10, 0.3)); }
/* a small crest beside the name, the perk cards in one row across the full width: same height for every clan, no empty bottom */
.ci-main { display: contents; }
.clan-info .hi-head { grid-area: head; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; }
.clan-info .hi-head > b { grid-column: 1; grid-row: 1; } .clan-info .hi-head > small { grid-column: 1; grid-row: 2; }
.clan-info .hi-head .alt-cmp { grid-column: 2; grid-row: 1; margin-left: 0; justify-self: end; }
.clan-info .hi-head .hi-lock { grid-column: 2; grid-row: 2; justify-self: end; }
.cp-lines { grid-area: lines; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
.cp-line { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 10px; padding: 13px 10px 8px 8px; border-radius: 12px; border: 1px solid; }
.cp-line.bonus { background: linear-gradient(#fffaf0, #fbedc8); border-color: rgba(216, 169, 59, 0.6); }
.cp-line.start { background: linear-gradient(#f6fbf2, #e2f0d8); border-color: rgba(63, 138, 70, 0.45); }
.cp-line.plan { background: linear-gradient(#f3f8fd, #dde9f6); border-color: rgba(31, 79, 138, 0.35); }
.cp-pic { width: 48px; height: 48px; object-fit: contain; }
.cp-txt { display: grid; gap: 1px; min-width: 0; padding-right: 4px; }
.cp-vals { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; }
.cp-n { display: inline-flex; align-items: center; gap: 3px; }
.cp-n b { font: 700 24px/1.1 var(--display); color: #245a2a; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.cp-n.word b { font-size: 19px; color: var(--wood); }
.cp-line.plan .cp-n b { color: #1f4f8a; }
.cp-txt small { font-size: 15px; font-weight: 700; color: var(--ink-soft); line-height: 1.2; }
.cp-kind { position: absolute; right: 8px; top: -9px; display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px 1px 4px; border-radius: 7px; font: 800 12px var(--body); letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; }
.cp-line.bonus .cp-kind { background: #f4dca0; color: #7a5410; } .cp-line.start .cp-kind { background: #cfe8bf; color: #2f6b3d; } .cp-line.plan .cp-kind { background: #d0e1f5; color: #1f4f8a; }
@media (max-width: 820px) {
  .clan-row { gap: 5px; }
  .clan-c { padding: 6px 2px; border-radius: 12px; }
  .clan-c > .kbd { left: 3px; top: 3px; }
  .cc-crest { width: 46px; height: 52px; } .cc-crest > img { width: 44px; height: 52px; }
  .clan-c b { font-size: 11px; white-space: normal; text-align: center; line-height: 1.05; min-height: 2.1em; }
  .cc-mini { display: none; }
  .clan-c .hc-cost { font-size: 12px; padding: 0 4px 0 2px; } .clan-c .hc-cost img { width: 14px; height: 14px; }
  .clan-info { grid-template-columns: 46px minmax(0, 1fr); padding: 10px 10px 12px; gap: 12px 10px; }
  .clan-info .hi-head { grid-template-columns: minmax(0, 1fr); } .clan-info .hi-head .hi-lock { grid-column: 1; grid-row: 3; justify-self: start; }
  .cp-lines { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cp-line { grid-template-columns: 40px minmax(0, 1fr); } .cp-pic { width: 40px; height: 40px; }
  .cp-n b { font-size: 21px; } .cp-txt small { font-size: 14px; }
}
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 8px; }
.mitem { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.5); border: 1px solid rgba(120, 90, 50, 0.25); }
.mitem.owned { background: rgba(63, 138, 70, 0.12); border-color: rgba(63, 138, 70, 0.4); }
.mitem b { color: var(--wood); font-size: 17px; }
.mitem small { display: block; color: var(--ink-soft); font-size: 15px; }
.mitem .lv { font-size: 14px; font-weight: 800; color: var(--good); }
.ew { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; }
.mini-icons.big span { font-size: 16px; }
.keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px 22px; margin-bottom: 10px; }
.krow { display: flex; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px dotted rgba(120, 90, 50, 0.25); font-size: 16px; }
.krow span:last-child { margin-left: auto; text-align: right; color: var(--ink); }

/* ---------- toasts, tooltip, fly icons ---------- */
.toasts { position: fixed; top: calc(var(--top-h, 66px) + 14px); left: 50%; transform: translateX(-50%); z-index: 30; display: grid; gap: 6px; justify-items: center; pointer-events: none; }
.toast { padding: 10px 18px; border-radius: 12px; background: rgba(30, 22, 14, 0.94); color: #fff4dc; border: 1px solid var(--gold); font-weight: 800; font-size: 17px; box-shadow: var(--shadow); animation: toast 3.6s forwards; display: flex; gap: 10px; align-items: center; }
.toast.bad { border-color: #ff8a7a; }
@keyframes toast { 0% { opacity: 0; transform: translateY(-8px); } 8% { opacity: 1; transform: none; } 85% { opacity: 1; } 100% { opacity: 0; } }
.tooltip { position: fixed; z-index: 50; max-width: 340px; padding: 12px 14px; border-radius: 12px; background: rgba(28, 20, 12, 0.96); color: #fbeedb; border: 2px solid var(--gold); font-size: 17px; line-height: 1.4; pointer-events: none; box-shadow: var(--shadow); }
.trait-row { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: start; gap: 6px; }
.trait-effect { display: block; }
.trait-guide { margin: 12px 0; }
.trait-guide h4, .trait-guide p { margin: 4px 0; }
.trait-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 6px 12px; }
.trait-list .trait-row { padding: 6px 8px; border-radius: 8px; background: rgba(91, 58, 34, 0.08); }
.wave:has(> .wave-traits) { flex-wrap: wrap; }
.wave-traits { flex: 0 0 100%; grid-column: 1 / -1; min-width: 0; display: grid; gap: 4px; font-size: 15px; line-height: 1.17; }
.tt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.tt-head b { font-size: 18px; color: #ffe9b0; font-family: var(--display); }
.tt-head img { width: 34px; height: 34px; object-fit: contain; }
.tt-lines div { margin: 2px 0; }
.tt-lines b { color: #ffe9b0; }
.tt-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding-top: 6px; border-top: 1px solid rgba(240, 210, 150, 0.25); font-weight: 800; }
.tt-stats span { display: inline-flex; gap: 4px; align-items: center; }
.tooltip .good { color: #a8f08a; } .tooltip .bad { color: #ffb0a0; } .tooltip .dim { color: #c8b898; font-size: 14px; }
.fly { position: fixed; z-index: 45; width: 28px; height: 28px; pointer-events: none; transition: transform 0.6s cubic-bezier(.4, 0, .6, 1), opacity 0.6s; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); }

/* ---------- title ---------- */
.title-screen { position: fixed; inset: 0; z-index: 35; display: grid; place-items: center; }
#title-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.title-inner { position: relative; text-align: center; display: grid; gap: 24px; justify-items: center; padding: 20px; }
.logo .pre { display: block; font-size: 14px; letter-spacing: 0.3em; text-transform: uppercase; color: #fff4dc; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6); }
.logo h1 { font-family: var(--brand); font-size: clamp(40px, 11vw, 124px); margin: 4px 0; letter-spacing: 0.14em; white-space: nowrap; color: #fff7e2; text-shadow: 0 3px 0 #8a5a2a, 0 6px 0 #5a3a1a, 0 12px 30px rgba(0, 0, 0, 0.55); }
.logo .sub2 { display: flex; align-items: center; justify-content: center; gap: 0.6em; margin: -2px 0 8px; font-family: var(--brand); font-size: clamp(20px, 4.2vw, 46px); letter-spacing: 0.3em; text-indent: 0.3em; color: #ffd98a; text-shadow: 0 2px 0 #6a4418, 0 4px 12px rgba(0, 0, 0, 0.6); white-space: nowrap; }
.logo .sub2::before, .logo .sub2::after { content: ""; width: clamp(24px, 6vw, 70px); height: 2px; background: linear-gradient(90deg, rgba(255, 217, 138, 0), #ffd98a); box-shadow: 0 1px 0 #6a4418; }
.logo .sub2::after { background: linear-gradient(90deg, #ffd98a, rgba(255, 217, 138, 0)); }
.logo .emblem { display: block; width: clamp(60px, 8vw, 96px); height: auto; margin: 0 auto 4px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45)); animation: emblemIn 0.7s cubic-bezier(.2, .9, .3, 1.3) both; }
@keyframes emblemIn { from { opacity: 0; transform: translateY(-10px) scale(0.85); } }
@media (max-height: 640px) { .logo .emblem { width: 48px; } }
.logo .sub { font-family: var(--display); font-weight: 600; font-size: clamp(17px, 2.6vw, 26px); color: #ffe9b0; letter-spacing: 0.08em; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7); }
.title-menu { display: grid; gap: 12px; min-width: 280px; }
.title-meta { color: #fff4dc; font-size: 16px; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7); display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: center; }

@media (max-width: 1600px) {
  .tab span:not(.kbd) { display: none; }
}
@media (max-width: 820px) {
  html, body { font-size: 15px; }
  #top, #top.f-tight { flex-wrap: wrap; gap: 4px 8px; padding-bottom: 4px; }
  .brand { order: 0; } .calendar { order: 1; flex: 1; min-width: 0; gap: 6px; } .sys { order: 2; gap: 4px; }
  .pips i { width: 9px; height: 9px; } .season-badge { font-size: 14px; padding: 4px 8px; }
  .gauges { order: 3; width: 100%; justify-content: center; }
  .resbar, #top.f-wrap .resbar { order: 4; width: 100%; justify-content: center; overflow-x: auto; flex: none; scrollbar-width: none; }
  .icon-btn { width: 34px; height: 34px; font-size: 17px; } .icon-btn img { width: 22px; height: 22px; }
  .dock { top: calc(var(--top-h, 124px) + 8px); right: 6px; gap: 6px; } .dock-btn { width: 46px; height: 46px; border-radius: 12px; } .dock-btn img { width: 28px; height: 28px; }
  .dock-panel { left: 8px; right: 62px; width: auto; top: calc(var(--top-h, 124px) + 8px); max-height: min(45vh, calc(100vh - var(--top-h, 124px) - var(--hud-bottom, 200px) - 24px)); }
  .minimap { display: none; }
  .info, .info.hero-panel { top: auto; bottom: calc(var(--hud-bottom, 206px) + 8px); left: 8px; right: 8px; width: auto; }
  .bar { flex-wrap: wrap; gap: 6px; align-items: center; }
  .bar-main { order: 2; flex: 1 1 100%; }
  .endbox { order: 1; margin-left: auto; min-width: 0; flex-direction: row; align-items: center; } .endbox .hint { display: none; }
  .bcard { width: 100px; } .bcard img.pic { width: 64px; height: 54px; } .bcard .nm { font-size: 14px; min-height: 28px; }
  .btn.big { font-size: 16px; padding: 8px 14px; min-height: 46px; }
  .winterbar { left: 6px; right: 6px; transform: none; flex-wrap: wrap; gap: 8px; justify-content: center; }
  .wb-waves { min-width: 0; flex: 1 1 100%; }
  .power { width: 54px; height: 54px; } .power img { width: 32px; height: 32px; }
  .sheet { padding: 16px; --sp-x: 16px; --sp-y: 16px; } .sheet h2 { font-size: 28px; }
  .kbd { display: none; }
}
/* phones held sideways (about 375 px tall): keep the map visible, shrink the top bar and the build cards */
@media (max-height: 460px) and (orientation: landscape) {
  #top, #top.f-tight { gap: 2px 8px; padding-top: 2px; padding-bottom: 2px; }
  .bcard { width: 78px; padding: 3px 3px 4px; } .bcard img.pic { width: 44px; height: 36px; } .bcard .nm { font-size: 12px; min-height: 22px; }
  .bcard .cost { font-size: 14px; gap: 3px; } .bcard .cost img { width: 18px; height: 18px; } .bcard .cost.free { font-size: 12px; padding: 0 6px; }
  .bcard .wk { font-size: 11px; } .bcard .wk img { width: 12px; height: 12px; }
  .btn.big { min-height: 38px; padding: 5px 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- v4: modes, challenges ---------- */
.title-menu .btn.mode { display: flex; align-items: center; gap: 12px; text-align: left; padding: 8px 16px; min-height: 58px; }
.title-menu .btn.mode .mt { display: grid; }
.title-menu .btn.mode b { font-family: var(--display); font-size: 18px; }
.title-menu .btn.mode small { font-size: 14px; opacity: 0.85; font-weight: 600; }
.title-menu .btn.mode.locked { filter: grayscale(0.85) brightness(0.85); }
.title-menu .btn.mode.cont b { font-size: 22px; }
.title-menu .btn.mode.cont[hidden] { display: none; }
.replace-note { color: #8a3a20; }
.title-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.title-menu .kbd { margin-right: 4px; }
/* every challenge card the same size: icon and name on top, the text across the card below, cut after three lines (full text on hover) */
.mut-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); grid-auto-rows: 1fr; gap: 16px 10px; padding-top: 4px; }
.mut-pick button { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: 34px auto; grid-template-areas: "ic nm" "ds ds"; align-content: start; align-items: center; gap: 6px 8px; text-align: left; padding: 10px 12px 10px 10px; border-radius: 10px; border: 2px solid rgba(90, 60, 30, 0.35); background: rgba(255, 250, 235, 0.7); cursor: pointer; font: inherit; color: inherit; }
.mut-pick button img { grid-area: ic; width: 34px; height: 34px; }
.mut-pick button b { grid-area: nm; line-height: 1; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.mut-pick button small { grid-area: ds; align-self: start; font-size: 14px; line-height: 1.25; opacity: 0.8; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.mut-pick .mul { position: absolute; right: 8px; top: -10px; padding: 1px 7px; border-radius: 7px; font: 700 14px/1.3 var(--display); font-style: normal; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; background: #f4dca0; color: #7a5410; box-shadow: 0 1px 0 rgba(90, 60, 30, 0.3); }
.mut-pick button.sel .mul { background: #b8382a; color: #fff; }
@media (max-width: 560px) {   /* one column: icon beside name and text, each card as tall as its text */
  h4:has(+ .mut-pick) small { display: block; margin-top: 2px; }   /* the score line on its own line: choosing a challenge never moves the cards */
  .mut-pick { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .mut-pick button { grid-template-rows: auto auto; grid-template-areas: "ic nm" "ic ds"; gap: 3px 10px; align-items: start; }
  .mut-pick button img { align-self: center; }
}
.mut-pick button.sel { border-color: #b8382a; background: rgba(255, 225, 200, 0.95); box-shadow: 0 0 0 2px rgba(184, 56, 42, 0.25); }
.mut-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.mut { display: inline-flex; align-items: center; gap: 6px; }
.mut.big { display: grid; grid-template-columns: 38px 1fr; column-gap: 8px; padding: 6px 10px; border-radius: 10px; background: rgba(255, 245, 225, 0.8); border: 1px solid rgba(90, 60, 30, 0.25); flex: 1 1 220px; }
.mut.big img { grid-row: span 2; }
.mut.big small { font-size: 14px; opacity: 0.8; }
.cal-mut { display: flex; gap: 2px; margin-left: 6px; }
.daily-row { display: flex; gap: 14px; align-items: center; margin: 8px 0; }
.daily-row div { display: grid; } .daily-row b { font-size: 20px; font-family: var(--display); } .daily-row small { opacity: 0.8; }
.endless-offer { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; margin: 12px 0; padding: 10px 14px; border-radius: 12px; background: linear-gradient(90deg, rgba(40, 70, 120, 0.12), rgba(255, 245, 220, 0.4)); border: 2px solid rgba(40, 70, 120, 0.35); }
.endless-offer div { display: grid; } .endless-offer small { opacity: 0.85; }
.dcard .law-seal { width: 72px; height: 72px; }
@media (max-width: 720px) { .title-menu .btn.mode { min-height: 50px; } .title-menu .btn.mode b { font-size: 16px; } .endless-offer { grid-template-columns: 40px 1fr; } .endless-offer .btn { grid-column: span 2; } }

.title-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.title-inner::before { content: ''; position: absolute; inset: -40px -140px; z-index: -1; background: radial-gradient(ellipse at 50% 45%, rgba(12, 22, 34, 0.5), rgba(12, 22, 34, 0.25) 45%, rgba(12, 22, 34, 0) 72%); pointer-events: none; }

.wk-change { display: grid; grid-template-columns: 26px 1fr; column-gap: 8px; align-items: center; margin-top: 8px; padding: 6px 10px; border-radius: 8px; background: rgba(60, 110, 60, 0.12); border: 1px solid rgba(60, 110, 60, 0.35); font-size: 16px; }
.wk-change img { grid-row: span 2; }
.wk-change i { font-style: normal; font-weight: 800; color: #2f6b3d; }
.wk-change small { font-size: 14px; opacity: 0.85; }
.wk-change.short { background: rgba(192, 57, 43, 0.12); border-color: rgba(192, 57, 43, 0.5); }
.wk-change.short i, .wk-change.short small { color: #a8321f; opacity: 1; font-weight: 700; }

.chip .stack { display: grid; line-height: 1.1; }
.chip .stack small { font-size: 14px; }
.endbox .hint.grow { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 15px; }
.endbox .hint.grow.up { color: #a8f08a; } .endbox .hint.grow.down { color: #ffb0a0; }

/* scrollbars: wooden thumb in a parchment groove, the same on every panel */
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: rgba(120, 88, 48, 0.12); border-radius: 10px; box-shadow: inset 0 1px 3px rgba(90, 60, 30, 0.25); margin: 6px; }
::-webkit-scrollbar-thumb { background: linear-gradient(90deg, #b8874a, #8a5e32 55%, #6e4826); border: 3px solid transparent; background-clip: padding-box; border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 230, 180, 0.45); min-height: 40px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(90deg, #f0c95a, #d8a93b 55%, #b07f22); background-clip: padding-box; border: 3px solid transparent; }
::-webkit-scrollbar-thumb:active { background: linear-gradient(90deg, #d8a93b, #a87a1e); background-clip: padding-box; border: 3px solid transparent; }
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; }
@supports not selector(::-webkit-scrollbar) { * { scrollbar-color: #8a5e32 rgba(120, 88, 48, 0.12); } }
.cards::-webkit-scrollbar { height: 10px; }

.upgrade-box .cost { font-size: 21px; } .upgrade-box .cost img { width: 30px; height: 30px; }

.gains { margin-top: 8px; padding: 8px 10px; border-radius: 9px; background: rgba(255, 250, 235, 0.7); border: 1px solid rgba(160, 120, 60, 0.3); }
.gains .g-head { font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--ink-soft); margin-bottom: 4px; }
.g-row { display: grid; grid-template-columns: 26px 1fr auto auto auto; align-items: center; column-gap: 6px; font-size: 17px; padding: 2px 0; }
.g-row b { font-family: var(--display); font-weight: 600; font-variant-numeric: lining-nums tabular-nums; color: var(--ink-soft); }
.g-row b.up { color: var(--good); font-size: 19px; } .g-row b.down { color: var(--bad); font-size: 19px; }
.g-row i { font-style: normal; color: var(--gold); font-weight: 800; }
.range-delta { display: block; font-size: 0.72em; text-align: right; }
@media (any-pointer: coarse) {
  .info button { min-width: 44px; min-height: 44px; }
  .info .actions { margin-top: 12px; gap: 12px; }
  .info [data-up], .info #i-del { min-height: 48px; }
}
.spec { position: relative; } .spec > .kbd { position: absolute; right: 6px; top: 6px; }

/* the info panel may use the full height; the minimap steps aside while it is open */
.info, .info.hero-panel { max-height: calc(100vh - var(--top-h, 66px) - var(--left-bottom, 230px) - 20px); }
@media (max-width: 820px) {
  /* Bottom-aligned panels use the full bottom HUD, not just the build tabs. */
  .info { max-height: min(42vh, calc(100vh - var(--top-h, 124px) - var(--hud-bottom, 206px) - 24px)); }
  .info.range-info { max-height: min(28dvh, calc(100dvh - var(--top-h, 124px) - var(--hud-bottom, 206px) - 100px)); }
}
body.info-open .minimap { display: none; }

/* law cards: a big seal on top, then the gain and the cost in their own coloured boxes */
.lawcard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 14px; border-radius: 16px; border: 2px solid var(--parch-edge);
  background: radial-gradient(ellipse at 50% 0%, #fffdf6, #f3e6c8 70%); box-shadow: 0 4px 0 #a8884a, 0 10px 20px rgba(0, 0, 0, 0.25); text-align: center; transition: transform 0.12s, border-color 0.12s; }
.lawcard:hover { transform: translateY(-6px); border-color: var(--red); }
.lawcard > .kbd { position: absolute; left: 12px; top: 12px; }
.lawcard .seal { width: 128px; height: 128px; filter: drop-shadow(0 6px 8px rgba(60, 30, 10, 0.3)); transition: transform 0.2s; }
.lawcard:hover .seal { transform: scale(1.06) rotate(-3deg); }
.lawcard .t { font-family: var(--display); font-weight: 600; font-size: 24px; color: var(--wood); line-height: 1.1; min-height: 2.2em; display: flex; align-items: center; justify-content: center; }
.lawcard .fx { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; font-size: 17px; font-weight: 700; line-height: 1.3; }
.lawcard .fx .ico { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.7); }
.lawcard .fx .ico::after { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: #fff; font-weight: 800; }
.lawcard .fx.up { background: rgba(63, 138, 70, 0.14); border: 1px solid rgba(63, 138, 70, 0.45); color: #245a2a; }
.lawcard .fx.up .ico::after { content: '▲'; background: var(--good); }
.lawcard .fx.down { background: rgba(192, 57, 43, 0.1); border: 1px solid rgba(192, 57, 43, 0.4); color: #8a2418; }
.lawcard .fx.down .ico::after { content: '▼'; background: var(--bad); }

/* relic reveal reel */
.reel { position: relative; overflow: hidden; height: 150px; margin: 14px 0; border-radius: 14px; background: radial-gradient(ellipse at center, #fffaf0, #e9d8b0); border: 2px solid var(--parch-edge); box-shadow: inset 0 0 30px rgba(120, 80, 30, 0.35); }
.reel-strip { display: flex; height: 100%; align-items: center; transition: transform 3s cubic-bezier(0.12, 0.72, 0.18, 1); will-change: transform; }
.reel-cell { flex: none; width: 128px; height: 128px; display: grid; place-items: center; }
.reel-cell img { width: 112px; height: 112px; filter: saturate(0.85); transition: transform 0.35s cubic-bezier(0.2, 1.6, 0.4, 1), filter 0.3s; }
.reel-cell.win.pop img { transform: scale(1.25); filter: saturate(1.15) drop-shadow(0 0 14px rgba(255, 210, 90, 0.95)); }
.reel-mark { position: absolute; left: 50%; top: 6px; bottom: 6px; width: 132px; transform: translateX(-50%); border: 3px solid var(--gold); border-radius: 14px; box-shadow: 0 0 0 9999px rgba(40, 24, 8, 0.18), 0 0 18px rgba(255, 210, 90, 0.7); pointer-events: none; }
.reel-result { display: grid; gap: 4px; justify-items: center; text-align: center; animation: rise 0.35s cubic-bezier(.2, .9, .3, 1.2); }
.reel-result b { font-family: var(--display); font-weight: 600; font-size: 26px; color: var(--wood); }
.reel-result span { font-size: 18px; font-weight: 700; color: var(--good); }
.reel-result small { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 700; color: #1f4f8a; }
.rel-pool { display: inline-flex; gap: 2px; vertical-align: middle; margin-left: 4px; } .rel-pool img { width: 24px; height: 24px; }

.modal-actions { display: flex; justify-content: center; gap: 12px; margin-top: 14px; }

.multi-hint { font-size: 15px; color: var(--ink-soft); margin: 6px 0 2px; }
.info .ihead { display: flex; align-items: center; gap: 10px; } .info .ihead img { width: 56px; height: 56px; object-fit: contain; } .info .ihead small { font-size: 15px; color: var(--ink-soft); font-weight: 700; }

#mo-fx { font-size: 13px; font-weight: 800; color: #e8dcc0; white-space: nowrap; } #mo-fx.up { color: #a8f08a; } #mo-fx.down { color: #ffb0a0; }

/* altitude picker: a mountain with one stop per altitude, a flag on the pick, effects as tiles, terrain as a bar */
.alt-h { display: flex; align-items: center; gap: 10px; }
.alt-keys { margin-left: auto; display: inline-flex; gap: 4px; }
.alt-pick { --rh: 116px; --top: 28px; --dot: 24px; --dot-sel: 34px; }
.alt-track { position: relative; overflow: hidden; border-radius: 14px; border: 2px solid var(--parch-edge);
  background: linear-gradient(#bcd9e8, #e4eef0 calc(var(--top) + var(--rh) - 10px), #fffaf0 calc(var(--top) + var(--rh)), #f3e6c8); box-shadow: 0 3px 0 #a8884a, inset 0 0 16px rgba(120, 90, 50, 0.12); }
.alt-mtn, .alt-trail { position: absolute; left: 0; top: var(--top); width: 100%; height: var(--rh); pointer-events: none; overflow: visible; }
.alt-mtn .ridge { fill: none; stroke: rgba(58, 36, 18, 0.5); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.alt-mtn .trail { fill: none; stroke: rgba(255, 255, 255, 0.85); stroke-width: 2.5; stroke-dasharray: 2 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.alt-trail polyline { fill: none; stroke: var(--red); stroke-width: 3.5; stroke-dasharray: 8 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.alt-trail { clip-path: inset(-10px calc(100% - (var(--sel) + 0.5) / var(--n) * 100%) -10px 0); transition: clip-path 0.5s cubic-bezier(.3, 1.1, .5, 1); }
.alt-fog { position: absolute; top: 0; height: calc(var(--top) + var(--rh)); right: 0; left: calc((var(--open) + 1) / var(--n) * 100%); pointer-events: none; border-left: 2px dashed rgba(90, 60, 30, 0.35);
  background: repeating-linear-gradient(-45deg, rgba(243, 233, 210, 0.6) 0 7px, rgba(243, 233, 210, 0.3) 7px 14px); -webkit-backdrop-filter: grayscale(1); backdrop-filter: grayscale(1); }
.alt-stops { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); touch-action: pan-y; }
.alt-stop { position: relative; display: grid; grid-template-rows: calc(var(--top) + var(--rh)) auto; padding: 0 3px 8px; border: 0; background: none; text-align: center; min-width: 0; }
.alt-stop .peak { position: relative; }
.alt-stop .dot { position: absolute; left: 50%; bottom: calc(var(--rh) * var(--b) / 100); width: var(--dot); height: var(--dot); transform: translate(-50%, 50%); border-radius: 50%; background: var(--c); border: 3px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35); display: grid; place-items: center; color: #fff; transition: transform 0.2s cubic-bezier(.3, 1.6, .5, 1), width 0.2s, height 0.2s; }
.alt-stop:hover:not(.locked) .dot { transform: translate(-50%, 50%) scale(1.25); }
.alt-stop.sel .dot { width: var(--dot-sel); height: var(--dot-sel); animation: altGlow 1.8s ease-in-out infinite; }
.alt-stop.locked { cursor: not-allowed; }
.alt-stop.locked .dot { width: calc(var(--dot) + 4px); height: calc(var(--dot) + 4px); background: #8f897d; border-color: #e4ddcd; }
.alt-stop.nope .dot { animation: altNope 0.4s; }
.alt-stop .lbl { display: grid; padding: 5px 2px 4px; margin-top: 4px; border-radius: 10px; border: 2px solid transparent; line-height: 1.15; transition: background 0.2s, border-color 0.2s; }
.alt-stop .lbl b { font: 600 17px var(--display); color: var(--wood); white-space: nowrap; }
.alt-stop .lbl small { font-size: 14px; color: var(--ink-soft); }
.alt-stop:hover:not(.locked) .lbl { background: rgba(255, 255, 255, 0.6); }
.alt-stop.sel .lbl { background: #fff0e0; border-color: var(--red); }
.alt-stop.sel .lbl b { color: var(--red); } .alt-stop.sel .lbl small { color: var(--ink); font-weight: 800; }
.alt-stop.locked .lbl { opacity: 0.5; }
.alt-flags { position: absolute; left: 0; right: 0; top: 0; height: calc(var(--top) + var(--rh)); pointer-events: none; }
.alt-flag { position: absolute; left: calc((var(--sel) + 0.5) / var(--n) * 100%); bottom: calc(var(--rh) * var(--fb) / 100); width: 0; height: 0;
  transition: left 0.5s cubic-bezier(.3, 1.3, .5, 1), bottom 0.5s cubic-bezier(.3, 1.3, .5, 1); }
.alt-flag.plant { animation: altPlant 0.45s cubic-bezier(.3, 1.6, .5, 1); }
.alt-flag .pole { position: absolute; left: -1.5px; bottom: 6px; width: 3px; height: 36px; border-radius: 2px; background: linear-gradient(90deg, #9a6a3a, #4a2e18); }
.alt-flag .pole::before { content: ''; position: absolute; left: -1.5px; top: -4px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 0 1px #8a6414; }
.alt-flag .cloth { position: absolute; left: 1.5px; bottom: 22px; width: 19px; height: 18px; border-radius: 1px 3px 3px 1px; transform-origin: left center; animation: altWave 1.4s ease-in-out infinite alternate;
  background: linear-gradient(#fff, #fff) center / 11px 3.6px no-repeat, linear-gradient(#fff, #fff) center / 3.6px 11px no-repeat, linear-gradient(135deg, #e8402f, #b3241a); box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.3); }
.alt-info { margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 250, 235, 0.75); border: 2px solid rgba(160, 120, 60, 0.3); transition: border-color 0.2s; }
.alt-pick.preview .alt-info { border-style: dashed; border-color: var(--gold); }
.alt-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.alt-m { font: 700 20px/1 var(--display); color: #fff; background: var(--c); padding: 5px 12px; border-radius: 999px; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2); font-variant-numeric: lining-nums tabular-nums; }
.alt-head b { font: 600 24px/1.1 var(--display); color: var(--wood); }
.alt-lock { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 6px; background: #8f897d; color: #fff; font-size: 14px; font-weight: 800; }
.alt-cmp { margin-left: auto; font: 600 15px var(--display); color: var(--ink-soft); }
.alt-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 10px 0 12px; }
@media (max-width: 740px) { .alt-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.alt-t { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.6); border: 1px solid rgba(120, 90, 50, 0.25); }
.alt-t img { grid-row: span 2; }
.alt-t .v { display: grid; justify-items: start; font-family: var(--display); line-height: 1.1; }
.alt-t .v b { font-size: 24px; font-weight: 700; color: var(--ink-soft); font-variant-numeric: lining-nums tabular-nums; }
.alt-t .v b.n { font-size: 19px; font-weight: 600; }
.alt-t .v s { font-size: 15px; font-weight: 600; color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.alt-t .v i { font-style: normal; font-weight: 800; }
.alt-t small { font-size: 14px; font-weight: 700; color: var(--ink-soft); line-height: 1.2; }
.alt-t.con { background: rgba(192, 57, 43, 0.1); border-color: rgba(192, 57, 43, 0.4); } .alt-t.con .v b { color: #8a2418; }
.alt-t.pro { background: rgba(63, 138, 70, 0.14); border-color: rgba(63, 138, 70, 0.45); } .alt-t.pro .v b { color: #245a2a; }
.alt-t.chg { animation: altPop 0.4s cubic-bezier(.3, 1.6, .5, 1); }
.alt-land { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.ter-row { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 8px; align-items: center; }
.ter-row small { font: 600 14px/1 var(--display); color: var(--ink-soft); text-align: right; white-space: nowrap; }
.ter-row.was { margin-bottom: 4px; } .ter-row.was small { font-size: 12px; opacity: 0.8; } .ter-row.was .ter-bar { height: 10px; opacity: 0.55; border-radius: 5px; }
.ter-row.off { visibility: hidden; }
.ter-bar { display: flex; height: 26px; overflow: hidden; border-radius: 8px; border: 1px solid rgba(60, 40, 20, 0.35); background: #e8dcc0; }
.ter-bar i { display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; font-style: normal; transition: width 0.5s cubic-bezier(.3, 1.1, .5, 1); }
.ter-bar i + i { box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.55); }
.ter-bar span { font: 700 14px var(--display); color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5); white-space: nowrap; }
.ter-bar .t-i span { color: #2a4a5a; text-shadow: none; }
.t-m { background: #86b955; } .t-f { background: #4e7a3e; } .t-r { background: #9a958c; } .t-i { background: #d6ecf4; }
.ter-leg { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0 66px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.ter-leg span { display: inline-flex; align-items: center; gap: 5px; }
.ter-leg i { width: 13px; height: 13px; border-radius: 4px; border: 1px solid rgba(60, 40, 20, 0.35); }
@keyframes altGlow { 0%, 100% { box-shadow: 0 0 0 3px rgba(240, 201, 90, 0.9), 0 3px 6px rgba(0, 0, 0, 0.4); } 50% { box-shadow: 0 0 0 7px rgba(240, 201, 90, 0.4), 0 3px 6px rgba(0, 0, 0, 0.4); } }
@keyframes altNope { 20% { transform: translate(-70%, 50%); } 45% { transform: translate(-30%, 50%); } 70% { transform: translate(-62%, 50%); } }
@keyframes altPlant { 0% { transform: translateY(-18px) scale(0.6); opacity: 0.4; } 100% { transform: none; opacity: 1; } }
@keyframes altWave { from { transform: skewY(-4deg) scaleX(0.92); } to { transform: skewY(5deg) scaleX(1.03); } }
@keyframes altPop { 0% { transform: scale(0.92); } 60% { transform: scale(1.05); } 100% { transform: none; } }
@media (max-width: 600px) {
  .alt-pick { --rh: 80px; --top: 26px; --dot: 20px; --dot-sel: 28px; }
  .alt-flag { scale: 0.8; }
  .alt-stop { padding: 0 1px 6px; }
  .alt-stop .lbl small, .alt-stop .lbl .u { display: none; }
  .alt-stop .lbl b { font-size: 16px; }
  .alt-head b { font-size: 21px; } .alt-m { font-size: 17px; padding: 4px 10px; }
  .ter-leg { gap: 4px 10px; font-size: 13px; }
  .alt-tiles { grid-template-columns: 1fr 1fr; } .alt-t:last-child { grid-column: span 2; }
  .alt-t { padding: 6px 8px; } .alt-t .v b { font-size: 21px; }
  .ter-row { grid-template-columns: 48px minmax(0, 1fr); } .ter-leg { margin-left: 0; }
}

.title-corner { position: absolute; top: 16px; right: 16px; z-index: 2; display: flex; align-items: center; gap: 8px; }
.title-sound { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 10px; border-radius: 999px; border: 1px solid rgba(255, 244, 220, 0.5); background: rgba(30, 24, 18, 0.55); color: #fff4dc; font: 600 16px var(--display); cursor: pointer; backdrop-filter: blur(4px); }
.title-sound img { width: 24px; height: 24px; }
.title-sound .kbd { margin-left: 2px; }
.title-sound:hover { background: rgba(30, 24, 18, 0.75); }
.title-sound.off { opacity: 0.75; }
/* language switch: EN and DE side by side, the active one lit; never translated (data-noi18n) */
.title-lang { display: inline-flex; align-items: center; gap: 2px; padding: 5px 8px 5px 6px; border-radius: 999px; border: 1px solid rgba(255, 244, 220, 0.5); background: rgba(30, 24, 18, 0.55); color: #fff4dc; font: 600 15px var(--display); cursor: pointer; backdrop-filter: blur(4px); }
.title-lang:hover { background: rgba(30, 24, 18, 0.75); }
.title-lang [data-l] { padding: 3px 8px; border-radius: 999px; opacity: 0.6; }
.title-lang [data-l].on { background: rgba(255, 244, 220, 0.92); color: #2a1a10; opacity: 1; }
.title-lang .kbd { margin-left: 4px; }
.lang-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 8px 12px 8px 16px; border-radius: 12px; background: rgba(91, 58, 34, 0.08); font: 600 17px var(--display); color: #5b3a22; }
.vol-box { margin-top: 8px; padding: 4px 16px; border-radius: 12px; background: rgba(91, 58, 34, 0.08); }
.vol-row { display: flex; align-items: center; gap: 12px; min-height: 48px; font: 600 17px var(--display); color: #5b3a22; }
.vol-row > span { flex: 0 0 8.5em; }
.vol-row output { flex: 0 0 2.4em; text-align: right; font-variant-numeric: tabular-nums; }
input.vol { flex: 1 1 auto; min-width: 0; height: 44px; margin: 0; background: transparent; accent-color: #5b3a22; cursor: pointer; touch-action: pan-y; }
input.vol::-webkit-slider-runnable-track { height: 10px; border-radius: 999px; background: rgba(91, 58, 34, 0.3); }
input.vol::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -10px; border-radius: 50%; background: #5b3a22; border: 3px solid #f3e9d2; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); }
input.vol::-moz-range-track { height: 10px; border-radius: 999px; background: rgba(91, 58, 34, 0.3); }
input.vol::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #5b3a22; border: 3px solid #f3e9d2; }
.lang-pick { display: inline-flex; align-items: center; gap: 6px; }
.lang-pick button { font: 600 16px var(--display); padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(91, 58, 34, 0.35); background: transparent; color: #5b3a22; cursor: pointer; }
.lang-pick button.on { background: #5b3a22; color: #f3e9d2; border-color: #5b3a22; }
.lang-pick button:not(.on):hover { background: rgba(91, 58, 34, 0.12); }
.title-sound.off img { filter: grayscale(1); }
.title-sound.wait { animation: tsPulse 1.6s ease-in-out infinite; }
@keyframes tsPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 220, 140, 0.0); } 50% { box-shadow: 0 0 0 6px rgba(255, 220, 140, 0.35); } }

#r-retire.armed { background: linear-gradient(#c0392b, #8e2a20); color: #fff; animation: retirePulse 0.9s ease-in-out infinite; }
@keyframes retirePulse { 50% { transform: scale(1.04); } }

/* rare relics: legendary glows gold, mythic shimmers violet and ice blue */
.dcard.rare-legendary { border-color: #e0a92e; background: linear-gradient(#fff8df, #f7e1a0); box-shadow: 0 4px 0 #b8862a, 0 0 0 2px #f0c95a, 0 0 24px rgba(255, 196, 70, 0.65); }
.dcard.rare-mythic { border-color: #9a6ae8; background: linear-gradient(#f7f1ff, #e3d5fb); box-shadow: 0 4px 0 #6f4fb0, 0 0 0 2px #b48cff, 0 0 28px rgba(150, 110, 255, 0.7); animation: mythGlow 2.6s ease-in-out infinite; }
.dcard.rare-legendary .kind { color: #8a5a10; font-weight: 700; }
.dcard.rare-mythic .kind { color: #5a2fb0; font-weight: 700; }
@keyframes mythGlow { 50% { box-shadow: 0 4px 0 #6f4fb0, 0 0 0 2px #7fe3f5, 0 0 34px rgba(127, 227, 245, 0.75); } }
.reel-result .rar { display: block; font: 700 15px var(--display); letter-spacing: 0.08em; text-transform: uppercase; font-style: normal; }
.reel-result.rare-legendary .rar { color: #b8862a; }
.reel-result.rare-mythic .rar { color: #7a4fd0; }
.reel-result.rare-legendary b { color: #8a5a10; }
.reel-result.rare-mythic b { color: #5a2fb0; }

/* choice rows: up to 4 cards side by side; 5 and 6 as two centred rows of 3 */
.draft { display: flex; flex-wrap: wrap; justify-content: center; --cols: 3; }
.draft > * { flex: 0 0 calc((100% - (var(--cols) - 1) * 14px) / var(--cols)); min-width: 0; }
.draft[data-n="1"] { --cols: 1; } .draft[data-n="2"] { --cols: 2; } .draft[data-n="4"] { --cols: 4; }
.sheet.wide { width: min(1200px, 100%); }
.draft[data-n="5"] .dcard .pic, .draft[data-n="6"] .dcard .pic { height: 104px; }
.draft[data-n="5"] .lawcard .seal, .draft[data-n="6"] .lawcard .seal { width: 100px; height: 100px; }
@media (max-width: 900px) { .draft[data-n="4"] { --cols: 2; } }
@media (max-width: 640px) { .draft { --cols: 1 !important; } }

/* run intro: four painted seasons with the harvest between them, then the climb through seven winters */
.intro-head { display: flex; align-items: center; gap: 12px; }
.intro-head h2 { margin-bottom: 0; }
.intro-head .eyebrow img { display: inline-block; vertical-align: -5px; margin-right: 2px; }
.intro-crest { flex: none; width: 46px; height: 53px; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.3)); animation: yrIn 0.45s cubic-bezier(.2, .9, .3, 1.3) both; }
.yr-cycle { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; margin: 10px 0 8px; }
.yr-col { position: relative; display: flex; flex-direction: column; border-radius: 14px; padding: 6px 6px 10px; color: #2a1c10; box-shadow: 0 3px 0 rgba(90, 60, 30, 0.35), 0 6px 14px rgba(0, 0, 0, 0.15);
  animation: yrIn 0.45s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: calc(var(--i) * 0.1s); }
.yr-col.spring { background: linear-gradient(#eef8e2, #bfe0a0); border: 2px solid #7fb060; }
.yr-col.summer { background: linear-gradient(#fff8d8, #f2d878); border: 2px solid #d0a838; }
.yr-col.autumn { background: linear-gradient(#ffecd6, #f0b07a); border: 2px solid #c87a3a; }
.yr-col.winter { background: linear-gradient(#eef6fc, #a9cbe6); border: 2px solid #5a8ab8; }
.yr-pic { position: relative; overflow: hidden; border-radius: 10px; aspect-ratio: 240 / 100; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.yr-pic img { display: block; width: 100%; height: 100%; }
.yr-pic b { position: absolute; left: 8px; bottom: 5px; font: 700 23px/1 var(--display); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35), 0 0 10px rgba(0, 0, 0, 0.5); }
.yr-col ul { list-style: none; margin: 7px 4px 0; padding: 0; display: grid; gap: 4px; align-content: start; flex: 1; }
.yr-col li { display: flex; gap: 8px; align-items: center; font-size: 16px; font-weight: 700; line-height: 1.15; }
.yr-col li img { flex: none; }
/* the harvest coin (between the seasons and in the legend): a raised, glossy gold coin, no outline: lit dome, darker lower rim, gloss on top, soft drop shadow */
.yr-hv { position: relative; display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #fff7d2 0%, #ffdc6e 30%, #eab53a 62%, #c48a1e 88%, #a8730f 100%);
  box-shadow: inset 0 -3px 4px rgba(122, 72, 4, 0.4), inset 0 2px 2px rgba(255, 255, 255, 0.8), 0 3px 3px rgba(70, 40, 6, 0.32), 0 7px 12px rgba(40, 24, 4, 0.22); }
.yr-hv img { position: relative; width: 20px; height: 20px; filter: drop-shadow(0 1px 1px rgba(110, 62, 0, 0.5)); }
.yr-hv::after { content: ''; position: absolute; left: 14%; top: 7%; width: 54%; height: 36%; border-radius: 50%; background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0)); pointer-events: none; }
/* each season card sits above the one to its right, so the harvest marker of a card is never covered by the next card */
.yr-col { z-index: calc(4 - var(--i, 0)); }
/* the harvest between two seasons: a small coin marker centred in the gap, its caption centred under it */
.yr-hvm { position: absolute; z-index: 2; top: 5px; left: calc(100% + 15px); width: max-content; translate: -50% 0; display: grid; justify-items: center; pointer-events: none;
  animation: yrHv 0.5s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(0.55s + var(--i) * 0.18s); }
.yr-hvm .yr-hv { z-index: 1; }   /* the coin sits on its caption like a medal on a ribbon */
.yr-hvm small { margin-top: -5px; padding: 5px 7px 1px; border-radius: 999px; background: linear-gradient(#fffdf5, #f4e4bd); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 2px 3px rgba(70, 40, 6, 0.28), 0 4px 8px rgba(40, 24, 4, 0.14); font: 700 12px/1.2 var(--display); color: #7a5410; white-space: nowrap; }
.yr-attack { align-self: center; display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 12px; border-radius: 999px; font: 700 15px var(--display); white-space: nowrap;
  background: linear-gradient(#ff8a7a, #c0392b); color: #fff; box-shadow: 0 2px 0 #7a1a10; animation: yrPulse 1.4s ease-in-out infinite; }
/* the legend: the coin flush with the cards' left edge, centred on the first line; wrapped lines continue under the text, not under the coin */
.yr-legend { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-top: 16px; padding-left: 42px; min-height: 32px; font-size: 16px; line-height: 1.25; }
.yr-legend > b { min-height: 32px; display: inline-flex; align-items: center; }
.yr-legend > .yr-hv { position: absolute; left: 0; top: 0; display: inline-grid; place-items: center; }
.yr-legend > span:not(.yr-hv):not(.yr-goods) { display: block; }
.yr-legend > span:not(.yr-hv):not(.yr-goods) img { display: inline-block; vertical-align: middle; margin: -4px 2px -2px; }
.yr-legend > b { font: 700 18px var(--display); color: #7a5410; }
.yr-legend span { display: inline-flex; align-items: center; gap: 4px; }
.yr-goods { gap: 2px !important; }
.yr-goal { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 10px 0 6px; }
.yr-goal > span:not(.alt-keys) { flex: 1 1 220px; }
.yr-goal small { display: inline-flex; align-items: center; gap: 4px; font: 600 15px var(--display); color: #2a3a5a; }
.yr-climb { --rh: 90px; --top: 80px; }
.yr-track { position: relative; overflow: hidden; height: calc(var(--top) + var(--rh)); border-radius: 14px; border: 2px solid var(--parch-edge);
  background: linear-gradient(#bcd9e8, #e4eef0 calc(var(--top) + var(--rh) - 10px)); box-shadow: 0 3px 0 #a8884a, inset 0 0 16px rgba(120, 90, 50, 0.12); }
.yr-mtn, .yr-trail { position: absolute; left: 0; bottom: 0; width: 100%; height: var(--rh); pointer-events: none; overflow: visible; }
.yr-mtn .ridge { fill: none; stroke: rgba(58, 36, 18, 0.5); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.yr-mtn .trail { fill: none; stroke: rgba(255, 255, 255, 0.85); stroke-width: 2.5; stroke-dasharray: 2 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.yr-trail polyline { fill: none; stroke: var(--red); stroke-width: 3.5; stroke-dasharray: 8 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.yr-trail { clip-path: inset(-10px 100% -10px 0); animation: yrTrail 1.6s 0.5s cubic-bezier(.4, 0, .3, 1) forwards; }
.yr-stops { position: absolute; inset: 0; }
.yr-stop { position: absolute; left: calc(var(--x) * 1%); bottom: calc(var(--rh) * var(--b) / 100 - 16px); translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 0; border: 0; background: none; cursor: pointer; animation: yrStop 0.45s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(0.6s + var(--i) * 0.16s); }
.yr-n { position: relative; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #fffaf0; border: 3px solid #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
  font: 700 16px var(--display); color: var(--wood); transition: transform 0.2s cubic-bezier(.3, 1.6, .5, 1); }
.yr-stop.boss .yr-n { background: #2a3a5a; color: #fff; }
.yr-stop.now .yr-n { background: var(--red); color: #fff; }
.yr-stop > * { pointer-events: none; }
.yr-stop:hover .yr-n, .yr-stop.sel .yr-n { transform: scale(1.2); }
.yr-stop.sel .yr-n { animation: altGlow 1.8s ease-in-out infinite; }
.yr-foes { display: flex; align-items: flex-end; justify-content: center; transition: transform 0.2s cubic-bezier(.3, 1.6, .5, 1); }
.yr-stop:hover .yr-foes, .yr-stop.sel .yr-foes { transform: translateY(-3px) scale(1.08); }
.yr-foes img { width: 34px; height: 34px; margin: 0 -5px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3)); }
.yr-foes img.yr-boss { width: 68px; height: 68px; margin: 0 0 -8px; }
.yr-stop small { position: absolute; left: 50%; top: 100%; translate: -50% 1px; white-space: nowrap; font: 700 13px var(--display); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); }
.yr-flag { position: absolute; left: 22px; bottom: 6px; width: 0; height: 0; }
.yr-flag .pole { position: absolute; left: -1.5px; bottom: 0; width: 3px; height: 34px; border-radius: 2px; background: linear-gradient(90deg, #9a6a3a, #4a2e18); }
.yr-flag .pole::before { content: ''; position: absolute; left: -1.5px; top: -4px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 0 1px #8a6414; }
.yr-flag .cloth { position: absolute; left: 1.5px; bottom: 16px; width: 19px; height: 18px; border-radius: 1px 3px 3px 1px; transform-origin: left center; animation: altWave 1.4s ease-in-out infinite alternate;
  background: linear-gradient(#fff, #fff) center / 11px 3.6px no-repeat, linear-gradient(#fff, #fff) center / 3.6px 11px no-repeat, linear-gradient(135deg, #e8402f, #b3241a); box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.3); }
.yr-info { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; min-height: 44px; margin-top: 8px; padding: 4px 14px; border-radius: 12px; background: rgba(255, 250, 235, 0.75); border: 2px solid rgba(160, 120, 60, 0.3); font-size: 16px; }
.yr-info.pop { animation: yrFade 0.2s ease-out; }
@keyframes yrFade { from { opacity: 0.55; } }
.yr-iy { font: 700 20px var(--display); color: var(--wood); }
.yr-iv { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.yr-iv > b { font: 700 22px var(--display); color: var(--red); font-variant-numeric: lining-nums tabular-nums; }
.yr-iv.boss > img { width: 42px; height: 42px; margin: -10px 0; }
.yr-iv.boss > b { font-size: 18px; color: #2a3a5a; }
.yr-iv.new small { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
.yr-foe { display: inline-flex; align-items: center; gap: 2px; margin-right: 6px; }
.yr-foe img { width: 32px; height: 32px; margin: -6px 0; }
.intro-foot { margin-top: 10px; }
.intro-foot .hint-line { margin: 0 auto 0 0; }
@keyframes yrIn { from { opacity: 0; transform: translateY(12px) scale(0.96); } }
@keyframes yrPulse { 50% { transform: scale(1.06); } }
@keyframes yrHv { 0% { opacity: 0; transform: scale(0) rotate(-60deg); } 100% { opacity: 1; transform: none; } }
@keyframes yrStop { 0% { opacity: 0; transform: translateY(14px) scale(0.5); } 100% { opacity: 1; transform: none; } }
@keyframes yrTrail { to { clip-path: inset(-10px 0 -10px 0); } }
@media (max-width: 820px) { .intro-foot .hint-line, .yr-goal .alt-keys { display: none; } }
@media (max-width: 760px) {
  .yr-cycle { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .yr-hvm { left: auto; right: 6px; top: 6px; width: auto; translate: none; } .yr-hvm .yr-hv { width: 26px; height: 26px; } .yr-hvm .yr-hv img { width: 17px; height: 17px; } .yr-hvm small { font-size: 10px; padding: 1px 6px; }
  .yr-goal { font-size: 17px; } .yr-goal > img { width: 22px; height: 22px; }
  .yr-attack { gap: 4px; padding: 3px 9px; font-size: 13px; max-width: calc(100% - 10px); } html:lang(de) .yr-attack { padding: 3px 8px; font-size: 13px; } html:lang(de) .yr-attack img { display: none; } .yr-attack img { width: 18px; height: 18px; }
  .yr-pic b { font-size: 19px; }
  .yr-col li { font-size: 14px; gap: 6px; } .yr-col li img { width: 24px; height: 24px; }
  .yr-legend { font-size: 14px; padding-left: 40px; } .yr-legend img { width: 22px; height: 22px; } .yr-legend .yr-hv img { width: 20px; height: 20px; }
  .yr-climb { --rh: 72px; --top: 46px; }
  .yr-foes img:not(.yr-boss) { display: none; } .yr-foes img.yr-boss { width: 46px; height: 46px; }
  .yr-stop { bottom: calc(var(--rh) * var(--b) / 100 - 13px); } .yr-stop small { display: none; }
  .yr-n { width: 26px; height: 26px; font-size: 14px; border-width: 2px; }
  .yr-flag { left: 16px; } .yr-flag .pole { height: 26px; } .yr-flag .cloth { bottom: 10px; scale: 0.8; }
  .yr-info { gap: 2px 10px; font-size: 14px; padding: 6px 10px; } .yr-iy { font-size: 17px; } .yr-iv > b { font-size: 19px; }
}

/* the guide: a short picture story in three pages, with numbered pins in the picture and the same numbers on the steps */
.guide .eyebrow { margin-bottom: 6px; }
.guide-nav { display: flex; align-items: center; margin: 0 0 8px; }
.gnav { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border-radius: 999px; border: 2px solid rgba(120, 90, 50, 0.3); background: rgba(255, 255, 255, 0.5);
  font: 600 17px var(--display); color: var(--ink-soft); cursor: pointer; transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.25s cubic-bezier(.3, 1.6, .5, 1); }
.gnav .gn-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(90, 60, 30, 0.12); transition: background 0.25s, box-shadow 0.25s; }
.gnav:hover { border-color: var(--red); }
.gnav.on { background: #fff0e0; border-color: var(--red); color: var(--red); transform: scale(1.06); }
.gnav.on .gn-ic { background: #fff; box-shadow: 0 0 0 3px var(--red); }
.gnav.done { color: #2f6b3d; border-color: rgba(63, 138, 70, 0.55); }
.gnav.done .gn-ic { background: rgba(63, 138, 70, 0.2); }
.gnav-bar { flex: 1; height: 6px; margin: 0 10px; border-radius: 3px; background: rgba(90, 60, 30, 0.15); overflow: hidden; }
.gnav-bar i { display: block; width: 0; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #3f8a46, #7fb060); transition: width 0.45s cubic-bezier(.4, 0, .3, 1); }
.gnav-bar.done i { width: 100%; }
.guide-page { touch-action: pan-y; }
.guide-page.from-right { animation: gIn 0.38s cubic-bezier(.2, .9, .3, 1) both; }
.guide-page.from-left { animation: gInL 0.38s cubic-bezier(.2, .9, .3, 1) both; }
.guide-page h2 { margin: 0 0 8px; }
.gsub { display: flex; align-items: center; gap: 8px; margin: -2px 0 10px; font-size: 16px; font-weight: 700; color: var(--ink-soft); }
.gpic { position: relative; overflow: hidden; border-radius: 14px; border: 2px solid var(--parch-edge); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22); animation: yrIn 0.45s cubic-bezier(.2, .9, .3, 1.2) both; }
.gpic-bg { display: block; width: 100%; height: auto; }
.gpic.winter { aspect-ratio: 880 / 210; } .gpic-in { position: absolute; left: 0; right: 0; bottom: 0; aspect-ratio: 880 / 240; }   /* the top of the night sky is cut off */
.gw-walk { position: absolute; width: 8.5%; translate: -50% -86%; scale: -1 1; pointer-events: none; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.35)); animation: gwalk 9s linear infinite, gFade 9s linear infinite; }
.gpin { position: absolute; z-index: 2; width: 30px; height: 30px; translate: -50% -50%; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font: 700 17px var(--display);
  border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45); transition: scale 0.2s cubic-bezier(.3, 1.6, .5, 1), background 0.2s; animation: gPin 0.4s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(0.35s + var(--i) * 0.18s); }
.gpin.hot { scale: 1.4; background: var(--gold-2); color: #3a2408; }
.gfloat { position: absolute; translate: -50% 0; display: inline-flex; align-items: center; gap: 2px; padding: 2px 7px 2px 8px; border-radius: 999px; background: rgba(255, 250, 235, 0.94); color: #7a5410;
  font: 700 14px var(--display); white-space: nowrap; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); animation: gFloat 3s ease-in-out infinite both; }
.gfloat img { width: 18px; height: 18px; }
.gfloat.d2 { animation-delay: 1s; } .gfloat.d3 { animation-delay: 2s; }
.gfloat.bad { background: #c0392b; color: #fff; }
.gbeats { display: grid; gap: 10px; margin-top: 10px; }
.gbeats.five { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.3fr) minmax(0, 1fr); }
.gbeats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gbeat { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px 10px 10px 12px; border-radius: 12px; background: rgba(255, 252, 240, 0.85); border: 2px solid rgba(160, 120, 60, 0.3);
  box-shadow: 0 3px 0 rgba(168, 136, 74, 0.55); font-size: 15px; line-height: 1.3; transition: border-color 0.2s, transform 0.2s;
  animation: yrIn 0.4s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: calc(0.3s + var(--i) * 0.18s); }
.gbeat:hover { border-color: var(--red); transform: translateY(-2px); }
.gb-n { position: absolute; left: -8px; top: -8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font: 700 14px var(--display); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.gb-ic { display: flex; gap: 2px; }
.gbeat > b { font: 700 18px/1.1 var(--display); color: var(--wood); }
.gb-t .red { color: var(--bad); } .gb-t .gold { color: #a87a1e; }
.grules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.grule { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: rgba(192, 57, 43, 0.07); border: 1px dashed rgba(192, 57, 43, 0.45); font-size: 14px; line-height: 1.25;
  animation: yrIn 0.4s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: 1.3s; }
.grule b { color: var(--wood); }
.grule > img { flex: none; width: 40px; height: 40px; object-fit: contain; }
.gr-line { flex: none; width: 40px; height: 0; border-top: 4px dashed #e0483a; }
.gr-faces { flex: none; display: flex; } .gr-faces img { width: 34px; height: 34px; margin-right: -8px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3)); }
.gr-faces img:last-child { margin-right: 0; }
.gkeys { display: flex; flex-wrap: wrap; gap: 5px 3px; margin-top: 4px; }
.gk { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.gk i, .gk-c { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; font: 800 13px/1 var(--body); font-style: normal;
  background: linear-gradient(#fffaf0, #e8dcc0); color: #3a2a18; border: 1px solid #8a6a3a; box-shadow: 0 2px 0 #8a6a3a; }
.gk.sp b { display: grid; place-items: center; width: 34px; height: 28px; border-radius: 8px; background: #2a3a4a; color: #eaf6ff; font: 700 14px var(--display); }
.rs-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rs-grid.later { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; }
.rs-card { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; border-radius: 14px; background: linear-gradient(#fffaf0, #f3e6c8); border: 2px solid var(--parch-edge); box-shadow: 0 3px 0 #a8884a;
  animation: yrIn 0.4s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: calc(var(--i) * 0.08s); }
.rs-card.wood { background: linear-gradient(#fffaf0, #ecd6b8); } .rs-card.stone { background: linear-gradient(#fbfaf6, #dedad2); } .rs-card.food { background: linear-gradient(#fffbea, #f4e2a6); }
.rs-card.gold { background: linear-gradient(#fffaf0, #f3dc96); } .rs-card.iron { background: linear-gradient(#f8fafc, #d8dee6); } .rs-card.crystal { background: linear-gradient(#f6fcff, #cfeaf4); } .rs-card.folk { background: linear-gradient(#fffaf4, #f3dccc); }
.rs-top { display: flex; align-items: center; gap: 8px; } .rs-top b { font: 700 24px var(--display); color: var(--wood); }
.rs-make { display: flex; justify-content: center; gap: 14px; padding: 6px 4px 0; border-radius: 10px; background: radial-gradient(ellipse at 50% 60%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 70%); }
.rs-b { position: relative; display: flex; flex-direction: column; align-items: center; }
.rs-b > img { width: 72px; height: 72px; object-fit: contain; }
.rs-b em { position: absolute; top: -4px; right: -14px; display: inline-flex; align-items: center; gap: 1px; padding: 1px 6px 1px 8px; border-radius: 999px; font: 700 19px var(--display); font-style: normal;
  color: #245a2a; background: #eaf7dc; border: 2px solid #7fb060; box-shadow: 0 2px 0 rgba(47, 107, 61, 0.4); animation: rsPop 3s ease-in-out infinite; animation-delay: calc(0.6s + var(--i) * 0.4s); }
.rs-b em img { width: 20px; height: 20px; }
.rs-b small { font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.rs-first { margin-top: 3px; white-space: nowrap; padding: 1px 9px; border-radius: 999px; font: 700 13px var(--display); color: #5a3a08; background: linear-gradient(#ffe9a0, #e8b840); box-shadow: 0 2px 0 #a87a20, 0 0 12px rgba(255, 196, 70, 0.7); animation: mustPulse 1.3s ease-in-out infinite; }
.rs-card p { margin: 0; font-size: 15px; line-height: 1.3; }
.rs-card.mini { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 4px 12px; padding: 8px 12px; }
.rs-card.mini .rs-top { flex-direction: column; gap: 0; } .rs-card.mini .rs-top b { font-size: 18px; }
.rs-card.mini .rs-make { padding: 6px 14px 0 4px; background: none; }
.rs-card.mini .rs-b > img { width: 56px; height: 56px; }
.rs-card.mini p { font-size: 14px; }
.gland { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.gl-hi { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; animation: glHi 1.6s ease-in-out infinite; }
.gl-feat { position: absolute; width: 9.5%; translate: -50% -62%; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3)); animation: gPin 0.4s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(0.5s + var(--i) * 0.15s); }
.gl-tag { position: absolute; translate: -50% -50%; padding: 3px 12px; border-radius: 999px; font: 700 16px var(--display); white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.gl-tag.own { background: rgba(42, 28, 16, 0.88); color: #ffe9b0; border: 2px solid #e8b840; }
.gl-tag.fog { background: rgba(90, 110, 125, 0.85); color: #fff; }
.gl-claim { position: absolute; translate: -50% -50%; }
.gl-claim .btn { pointer-events: none; min-height: 38px; padding: 5px 12px; animation: glBtn 1.6s ease-in-out infinite; }
.gl-tap { position: absolute; left: 72%; top: 68%; width: 26px; height: 26px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25); animation: glTap 1.6s ease-out infinite; pointer-events: none; }
.gl-ladder { display: flex; flex-direction: column; height: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 14px; background: rgba(255, 250, 235, 0.75); border: 2px solid rgba(160, 120, 60, 0.3); }
.gl-h { font: 700 18px var(--display); color: var(--wood); }
.gl-steps { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; align-items: end; min-height: 136px; margin: 6px 0; }
.gl-step { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.gl-cost { display: flex; flex-direction: column; align-items: center; }
.gl-cost span { display: inline-flex; align-items: center; gap: 2px; font: 700 20px var(--display); color: #7a5410; font-variant-numeric: lining-nums tabular-nums; }
.gl-cost span.g { color: #a87a1e; }
.gl-bar { display: block; width: 100%; height: calc(var(--h) * 64px + 8px); margin-top: 4px; border-radius: 8px 8px 3px 3px; background: linear-gradient(#f0c95a, #c8902a); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 2px 0 #8a6414;
  transform-origin: bottom; animation: glBar 0.5s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(0.4s + var(--i) * 0.15s); }
.gl-step small { margin-top: 4px; font: 700 14px var(--display); color: var(--ink-soft); }
.gl-note { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.gl-se, .gl-gets { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; }
.gl-se i { padding: 2px 8px; border-radius: 999px; font: 700 13px var(--display); font-style: normal; color: #2a1c10; }
.gl-se .spring { background: #cfe8b4; } .gl-se .summer { background: #f6e08e; } .gl-se .autumn { background: #f4c08e; }
.gl-se .winter { background: #d6e4ef; color: #6a7a88; text-decoration: line-through; }
.guide-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.guide-count { font: 700 16px var(--display); color: var(--ink-soft); }
@keyframes gIn { from { opacity: 0; transform: translateX(40px); } }
@keyframes gInL { from { opacity: 0; transform: translateX(-40px); } }
@keyframes gFade { 0% { opacity: 0; } 5% { opacity: 1; } 92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes gPin { from { opacity: 0; transform: scale(0); } }
@keyframes gFloat { 0% { opacity: 0; transform: translateY(8px); } 20%, 70% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-14px); } }
@keyframes rsPop { 0%, 60%, 100% { transform: none; } 70% { transform: translateY(-6px) scale(1.15); } 80% { transform: scale(0.96); } }
@keyframes glHi { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@keyframes glTap { 0% { transform: scale(0.4); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes glBtn { 50% { transform: scale(1.06); } }
@keyframes glBar { from { transform: scaleY(0); } }
@media (max-width: 760px) {
  .gnav { padding: 3px; } .gnav b { display: none; }
  .gbeats.five, .gbeats.three, .grules { grid-template-columns: 1fr; gap: 8px; }
  .gbeat { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; padding: 8px 10px 8px 14px; } .gb-ic { grid-row: span 2; }
  .rs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .rs-grid.later { grid-template-columns: minmax(0, 1fr); }
  .rs-card { padding: 8px 10px 10px; } .rs-top b { font-size: 20px; } .rs-top img { width: 36px; height: 36px; }
  .rs-make { gap: 10px; } .rs-b > img { width: 50px; height: 50px; } .rs-b em { font-size: 15px; right: -10px; padding: 0 5px 0 6px; } .rs-b em img { width: 16px; height: 16px; }
  .rs-card p { font-size: 14px; }
  .gpin { width: 18px; height: 18px; font-size: 11px; }
  .gland { grid-template-columns: 1fr; }
  .gpin { border-width: 2px; }
  .gfloat { padding: 1px 5px; font-size: 11px; } .gfloat img { width: 13px; height: 13px; }
  .gl-tag { padding: 2px 8px; font-size: 13px; } .gl-claim .btn { min-height: 30px; padding: 3px 8px; font-size: 14px; }
}

/* one building format everywhere (build bar tooltip, info panel, plan cards): role, number tiles, one sentence, where, cost */
.b-role { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; font-size: 14px; font-weight: 800; color: var(--ink-soft); line-height: 1.2; }
.b-role .stars { font-size: 14px; letter-spacing: 1px; }
.btiles { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 6px; }
.bt { display: grid; grid-template-columns: 24px auto; grid-template-rows: auto auto; column-gap: 6px; align-items: center; padding: 4px 10px 4px 6px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.6); border: 1px solid rgba(120, 90, 50, 0.25); line-height: 1.05; }
.bt img { grid-row: span 2; }
.bt b { font: 700 19px var(--display); color: var(--ink); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.bt small { font-size: 12px; font-weight: 800; color: var(--ink-soft); white-space: nowrap; }
.bt.up { background: rgba(63, 138, 70, 0.13); border-color: rgba(63, 138, 70, 0.45); } .bt.up b { color: #245a2a; }
.bt.dn { background: rgba(192, 57, 43, 0.1); border-color: rgba(192, 57, 43, 0.4); } .bt.dn b { color: #8a2418; }
.b-where { display: flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.b-where img { flex: none; }
.cost.free { display: inline-block; padding: 1px 10px; border-radius: 999px; background: #dff2d6; color: #2f6b3d; font: 700 15px var(--display); }
/* the dark tooltip */
.tooltip .tt-head > div { display: grid; gap: 2px; }
.tooltip .b-role { color: #d8c8a8; font-size: 13px; }
.tooltip .b-role .stars .off { color: rgba(255, 240, 210, 0.25); }
.tooltip .btiles { margin: 8px 0 4px; }
.tooltip .bt { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 240, 210, 0.2); }
.tooltip .bt b { color: #fff4dc; } .tooltip .bt small { color: #d8c8a8; }
.tooltip .bt.up { background: rgba(110, 190, 100, 0.16); border-color: rgba(140, 210, 120, 0.45); } .tooltip .bt.up b { color: #b8f0a0; }
.tooltip .bt.dn { background: rgba(240, 110, 90, 0.16); border-color: rgba(255, 140, 120, 0.45); } .tooltip .bt.dn b { color: #ffb8a8; }
.tooltip .b-where { color: #d8c8a8; margin-top: 4px; }
.tooltip .b-cost { margin-top: 8px; padding-top: 6px; border-top: 1px solid rgba(240, 210, 150, 0.25); }
.tooltip .cost .short { color: #ff9a88; }
/* the info panel */
.info .head .b-role { margin-top: 2px; }
.info .btiles { margin: 4px 0 2px; }

/* plan cards: a coloured band says what you get (new building, permanent bonus, supplies), then the exact numbers */
.dcard.pc { display: flex; flex-direction: column; gap: 5px; overflow: hidden; }
.pband { display: flex; align-items: center; gap: 8px; margin: -14px -16px 2px; padding: 6px 12px 6px 10px; min-height: 36px; white-space: nowrap; border-bottom: 1px solid rgba(0, 0, 0, 0.1); font-family: var(--display); }
.pband b { font-size: 16px; font-weight: 700; }
.pband small { margin-left: auto; font: 800 13px var(--body); opacity: 0.8; white-space: nowrap; }
.pband.blueprint { background: linear-gradient(#e8f1fb, #d0e1f5); color: #1f4f8a; }
.pband.relic { background: linear-gradient(#fdf3d8, #f4dca0); color: #7a5410; }
.pband.boon { background: linear-gradient(#eaf6e2, #cfe8bf); color: #2f6b3d; }
.dcard.pc .pic { height: 112px; }
.dcard.pc .t { margin-top: 2px; }
.dcard.pc .b-role { margin-top: -3px; }
.dcard.pc .b-role.rar { color: #8a6414; }
.dcard.rare-mythic .b-role.rar { color: #5a2fb0; }
.dcard.pc .btiles { margin: 2px 0; }
.dcard.pc .d { font-size: 15px; line-height: 1.3; }
.dcard.pc .b-where { font-size: 13px; }
.pcost { margin-top: auto; padding-top: 7px; border-top: 1px dashed rgba(120, 90, 50, 0.35); }
.pcost .cost { font-size: 21px; } .pcost .cost img { width: 28px; height: 28px; }
.pfx { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(63, 138, 70, 0.14); border: 1px solid rgba(63, 138, 70, 0.45); color: #245a2a; font-size: 16px; font-weight: 700; line-height: 1.3; }
.pfx img { flex: none; }
.pbp { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; color: #1f4f8a; }
.pgot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 2px 0; }
.pgot > span { display: grid; grid-template-columns: 40px auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 6px 14px 6px 8px; border-radius: 12px; background: rgba(63, 138, 70, 0.14); border: 1px solid rgba(63, 138, 70, 0.45); }
.pgot img { grid-row: span 2; }
.pgot b { font: 700 30px/1 var(--display); color: #245a2a; font-variant-numeric: lining-nums tabular-nums; }
.pgot small { font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.dcard.pc .btiles { gap: 4px; }
.dcard.pc .bt { grid-template-columns: 22px auto; column-gap: 4px; padding: 3px 8px 3px 4px; }
.dcard.pc .bt img { width: 22px; height: 22px; } .dcard.pc .bt b { font-size: 17px; } .dcard.pc .bt small { font-size: 11px; }
/* four to six cards, and on phones: the picture moves next to the name to keep the cards short */
.draft.compact .dcard.pc { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 10px; row-gap: 4px; align-content: start; }
.draft.compact .dcard.pc > * { grid-column: 1 / -1; }
.draft.compact .dcard.pc > .pic { grid-column: 1; grid-row: 2 / span 2; width: 64px; height: 64px; align-self: center; }
.draft.compact .dcard.pc > .t, .draft.compact .dcard.pc > .b-role { grid-column: 2; }
.draft.compact .dcard.pc > .t { align-self: end; margin: 0; font-size: 20px; }
.draft.compact .dcard.pc > .b-role { align-self: start; margin: 0; }
.draft.compact .pcost { margin-top: 2px; }
.draft.compact .pband { padding-left: 10px; } .draft.compact .pband img { display: none; } .draft.compact .pband b { font-size: 15px; } .draft.compact .pband small { font-size: 12px; }
@media (max-width: 820px) { .pband, .draft.compact .pband { padding-left: 12px; } .draft.compact .pband img { display: inline; } }
.law-hint { display: flex; align-items: center; gap: 8px; font-size: 17px; margin: 0 0 6px; } .law-hint img { flex: none; } .law-hint .good { color: var(--good); }
/* ---------- market: tiles on top, one row per good, every button says what you give → what you get ---------- */
.mk-hd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 10px; }
.sheet .mk-hd h2 { margin-bottom: 0; }
.mk-top { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; flex: 1; }
.mk-t { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; padding: 6px 14px 6px 8px; border-radius: 12px; background: rgba(255, 255, 255, 0.6); border: 1px solid rgba(120, 90, 50, 0.25); line-height: 1.15; }
.mk-t > img { grid-row: 1 / span 3; }
.mk-t b { font: 700 28px/1.05 var(--display); color: var(--wood); font-variant-numeric: lining-nums tabular-nums; }
.mk-t small { font-size: 14px; font-weight: 800; color: var(--ink-soft); }
.mk-t small em { font-style: normal; color: #245a2a; }
.mk-t small.nx { font-weight: 700; }
.mk-t.gold { min-width: 140px; }
.mk-t.tier { min-width: 0; }
.mk-t.tier b { font-size: 21px; display: flex; align-items: center; flex-wrap: wrap; gap: 0 8px; }
.mk-t.tier .stars { font-size: 15px; color: #b8862a; letter-spacing: 1px; } .mk-t.tier .stars .off { color: rgba(120, 90, 50, 0.3); }
.mk-t.pro { background: rgba(63, 138, 70, 0.12); border-color: rgba(63, 138, 70, 0.4); }
.mk-t.off > img { filter: grayscale(1); opacity: 0.55; }
.mk-t small.bad { color: var(--bad); }
.mk-grid { display: grid; gap: 6px; }
.mk-head, .mk-row, .mk-merc { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.mk-head { padding: 0 6px; }
.mk-head { align-items: end; margin-top: 4px; }
.mk-h { display: grid; justify-items: center; gap: 1px; }
.mk-h b { font: 600 21px/1.1 var(--display); color: var(--wood); }
.mk-h small { font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.mk-h.have { justify-items: start; padding-left: 4px; }
.mk-h.buy b { color: #245a2a; } .mk-h.sell b { color: #8a5a10; }
.mk-row, .mk-merc { padding: 4px 6px; border-radius: 12px; background: rgba(255, 255, 255, 0.45); border: 1px solid rgba(120, 90, 50, 0.2); }
.mk-good { display: grid; grid-template-columns: 40px auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 0 4px; cursor: default; }
.mk-good > img { grid-row: span 2; }
.mk-good b { font: 700 28px/1 var(--display); color: var(--wood); font-variant-numeric: lining-nums tabular-nums; }
.mk-good small { grid-column: 2; font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.mk-need { grid-column: 3; grid-row: 1 / span 2; justify-self: end; display: inline-flex; align-items: center; gap: 2px; padding: 2px 7px 2px 3px; border-radius: 999px; font: 700 15px var(--display); font-variant-numeric: lining-nums tabular-nums; }
.mk-need i { font-style: normal; margin-left: 2px; }
.mk-need.ok { background: rgba(63, 138, 70, 0.13); color: #245a2a; } .mk-need.bad { background: rgba(192, 57, 43, 0.12); color: #8a2418; }
.mk-btn { position: relative; display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 56px; padding: 4px 6px; border-radius: 12px; border: 2px solid var(--parch-edge);
  background: linear-gradient(#fffaf0, #f3e6c8); box-shadow: 0 3px 0 #a8884a; transition: transform 0.08s, border-color 0.12s, background 0.12s; }
.mk-btn.sell { background: linear-gradient(#fffbea, #f6e3b0); }
.mk-btn:hover:not(.no) { border-color: var(--red); transform: translateY(-2px); }
.mk-btn:active:not(.no) { transform: translateY(2px); box-shadow: 0 1px 0 #a8884a; }
.mk-f { display: inline-flex; align-items: center; gap: 6px; }
.mk-f .kbd { min-width: 20px; height: 20px; padding: 0 5px; font-size: 13px; }
.mk-x { display: inline-flex; align-items: center; gap: 6px; font: 700 21px/1 var(--display); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.mk-x > span { display: inline-flex; align-items: center; gap: 2px; }
.mk-x .give { color: #8a2418; } .mk-x .get { color: #245a2a; }
.mk-x > i { font-style: normal; font-size: 17px; color: var(--ink-soft); }
.mk-x s { font-size: 15px; font-weight: 600; color: var(--ink-soft); margin-right: 4px; text-decoration-thickness: 2px; }
.mk-btn small { font-size: 13px; font-weight: 800; color: var(--ink-soft); line-height: 1.1; }
.mk-btn small.why { color: var(--bad); }
.mk-btn.no { cursor: default; background: rgba(255, 255, 255, 0.3); border-style: dashed; border-color: rgba(120, 90, 50, 0.35); box-shadow: none; }
.mk-btn.no .mk-x { opacity: 0.4; filter: grayscale(0.85); }
.mk-btn.no .kbd { opacity: 0.5; }
.mk-btn.nope { animation: mkNope 0.34s; } .mk-btn.nope small.why { animation: mkWhy 0.6s; }
.mk-btn.hit { animation: mkHit 0.32s cubic-bezier(.3, 1.6, .5, 1); }
.mk-row.hit .mk-good > img, .mk-merc.hit .mk-fig { animation: mkHop 0.45s cubic-bezier(.3, 1.6, .5, 1); }
.mk-good b.up, .mk-t b.up, .mk-tot b.up { animation: mkUp 0.6s; } .mk-good b.dn, .mk-t b.dn { animation: mkDn 0.6s; }
.mk-merc { margin-top: 8px; }
.mk-mw { grid-column: 1 / 3; display: flex; align-items: center; gap: 10px; min-width: 0; }
.mk-fig { width: 60px; height: 60px; flex: none; }
.mk-mi { display: grid; justify-items: start; min-width: 0; }
.mk-mi > b { font: 600 21px/1.1 var(--display); color: var(--wood); }
.mk-mi > small { font-size: 14px; font-weight: 800; color: var(--ink-soft); }
.mk-mi .btiles { margin: 4px 0 3px; gap: 4px; flex-wrap: nowrap; }
.mk-mi .bt { grid-template-columns: 20px auto; column-gap: 4px; padding: 2px 8px 2px 4px; } .mk-mi .bt img { width: 20px; height: 20px; } .mk-mi .bt b { font-size: 17px; } .mk-mi .bt small { font-size: 11px; }
.mk-co { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 5px; }
.mk-co > i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #b8862a; background: rgba(255, 255, 255, 0.6); }
.mk-co > i.on { background: radial-gradient(circle at 35% 30%, #fff2b8, var(--gold) 55%, #b8862a); }
.mk-co > i.new { animation: mkHop 0.45s cubic-bezier(.3, 1.6, .5, 1); }
.mk-co small { font-size: 13px; font-weight: 800; color: var(--ink-soft); margin-left: 2px; }
.mk-co .mk-tot { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; color: var(--ink); }
.mk-co .mk-tot b { font: 700 16px var(--display); }
.mk-merc .mk-btn { align-self: stretch; }
.row.mk-foot { margin-top: 10px; }
.mk-foot .hint-line { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; }
.mk-float { position: fixed; z-index: 60; pointer-events: none; display: inline-flex; align-items: center; gap: 2px; font: 700 24px/1 var(--display); white-space: nowrap;
  transform: translate(-50%, -60%); text-shadow: 0 1px 0 #fffaf0, 0 0 10px rgba(255, 250, 235, 0.95); animation: mkFloat 1s ease-out forwards; }
.mk-float.up { color: #23702c; } .mk-float.dn { color: #a42a1c; }
@keyframes mkFloat { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.6); } 15% { opacity: 1; transform: translate(-50%, -80%) scale(1.15); } 30% { transform: translate(-50%, -95%) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -200%); } }
@keyframes mkHit { 0% { transform: scale(0.94); } 60% { transform: scale(1.04); } 100% { transform: none; } }
@keyframes mkHop { 0% { transform: none; } 40% { transform: translateY(-6px) scale(1.15); } 100% { transform: none; } }
@keyframes mkUp { 0% { transform: scale(1.3); color: #2f8a3a; } 70% { color: #2f8a3a; } }
@keyframes mkDn { 0% { transform: scale(0.85); color: #b8301f; } 70% { color: #b8301f; } }
@keyframes mkNope { 20% { transform: translateX(-5px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } }
@keyframes mkWhy { 30% { transform: scale(1.12); } }
@media (max-width: 560px) {
  .mk-hd { margin-bottom: 8px; gap: 6px 12px; } .mk-top { display: contents; }
  .mk-t { padding: 5px 10px 5px 6px; column-gap: 8px; } .mk-t > img { width: 34px; height: 34px; }
  .mk-t b { font-size: 24px; } .mk-t.tier b { font-size: 18px; } .mk-t small { font-size: 13px; }
  .mk-t.gold { min-width: 0; margin-left: auto; } .mk-t.tier { flex: 1 1 100%; }
  .mk-head, .mk-row, .mk-merc { grid-template-columns: 46px minmax(0, 1fr) minmax(0, 1fr); gap: 4px; }
  .mk-head { padding: 0 3px; } .mk-h b { font-size: 16px; white-space: nowrap; } .mk-h small { display: none; } .mk-h.have { padding-left: 0; justify-items: center; }
  .mk-row, .mk-merc { padding: 3px; }
  .mk-good { grid-template-columns: 1fr; grid-template-rows: none; justify-items: center; row-gap: 2px; padding: 0; }
  .mk-good > img { grid-row: auto; width: 28px; height: 28px; }
  .mk-good b { font-size: 21px; } .mk-good small { display: none; }
  .mk-need { grid-column: auto; grid-row: auto; justify-self: center; font-size: 13px; padding: 1px 5px 1px 2px; } .mk-need img { width: 14px; height: 14px; }
  .mk-btn { min-height: 54px; padding: 4px 2px; gap: 3px; }
  .mk-x { font-size: 16px; gap: 2px; } .mk-x > span { gap: 1px; } .mk-x img { width: 19px; height: 19px; } .mk-x > i { font-size: 12px; } .mk-x s { display: none; }
  .mk-btn small { font-size: 12px; }
  .mk-mw { grid-column: 1 / -1; align-items: flex-start; gap: 8px; } .mk-fig { width: 46px; height: 46px; }
  .mk-merc .mk-btn { grid-column: 1 / -1; min-height: 50px; }
  .mk-mi .btiles { flex-wrap: wrap; }
  .mk-foot .hint-line { font-size: 13px; }
}

/* ---------- heroes: setup picker (like the altitude picker: a row to choose, details below) ---------- */
.hero-lead { display: flex; align-items: center; gap: 8px; margin: -4px 0 10px; font-size: 16px; }
.hero-row { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 10px; }
.hero-c { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 2px; padding: 10px 6px 10px; border-radius: 16px; border: 2px solid var(--parch-edge); background: linear-gradient(#fffaf0, #f3e6c8);
  box-shadow: 0 4px 0 #a8884a; transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; animation: yrIn 0.4s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: calc(var(--i) * 50ms); min-width: 0; }
.hero-c > .kbd { position: absolute; left: 8px; top: 8px; z-index: 2; }
.hero-c:hover { transform: translateY(-4px); }
.hc-port { position: relative; width: 100%; max-width: 132px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 38%, #fff8e6, color-mix(in srgb, var(--hc) 45%, #e9dcbd) 70%, color-mix(in srgb, var(--hc) 70%, #3a2a18));
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.7), 0 3px 8px rgba(60, 30, 10, 0.3); transition: transform 0.2s; }
.hc-port img { width: 100%; height: 100%; object-fit: cover; }
.hero-c b { font: 600 18px/1.1 var(--display); color: var(--wood); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hc-role { font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: var(--rc); padding: 2px 8px; border-radius: 6px; }
.hero-c.sel { border-color: var(--red); box-shadow: 0 4px 0 #a8884a, 0 0 0 4px rgba(240, 201, 90, 0.75); }
.hero-c.sel .hc-port { animation: heroGlow 2.4s ease-in-out infinite; }
.hero-c.picked .hc-port { animation: heroPick 0.24s ease-out, heroGlow 2.4s ease-in-out 0.24s infinite; }
.hero-c.locked .hc-port img { filter: grayscale(1) brightness(0.85); opacity: 0.7; }
.hero-c.locked b, .hero-c.locked .hc-role { opacity: 0.6; }
.hc-lock { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(40, 30, 20, 0.25); }
.hc-lock svg { width: 30px; height: 30px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
.hc-cost { display: inline-flex; align-items: center; gap: 3px; font: 700 15px var(--display); color: #6a4a10; background: #fff6d6; border: 1px solid #e0c070; border-radius: 8px; padding: 1px 8px 1px 4px; }
.hero-c.nope { animation: heroNope 0.26s ease-out; } .hero-c.nope .hc-lock svg { animation: heroLockNudge 0.26s ease-out; }
@keyframes heroGlow { 0%, 100% { box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.7), 0 0 0 3px rgba(240, 201, 90, 0.9); } 50% { box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.7), 0 0 0 6px rgba(240, 201, 90, 0.4); } }
/* calm on purpose (player feedback): a small lift when chosen, a short nudge when locked, a soft fade for the details */
@keyframes heroPick { 0% { transform: scale(0.97); } 55% { transform: scale(1.03); } 100% { transform: none; } }
@keyframes heroNope { 30% { transform: translateX(-3px); } 65% { transform: translateX(2px); } }
@keyframes heroLockNudge { 40% { transform: rotate(-8deg); } }
@keyframes heroInfoIn { from { opacity: 0.55; transform: translateY(3px); } }
.hero-info { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; margin-top: 12px; padding: 14px; border-radius: 16px; background: rgba(255, 250, 235, 0.75); border: 2px solid rgba(160, 120, 60, 0.3); }
.hero-pick.preview .hero-info { border-style: dashed; border-color: var(--gold); }
.hero-info.pop { animation: heroInfoIn 0.18s ease-out; }
.hi-port { align-self: start; border-radius: 16px; overflow: hidden; aspect-ratio: 1; background: radial-gradient(circle at 50% 35%, #fffaf0, color-mix(in srgb, var(--hc) 40%, #e9dcbd) 75%); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6), 0 4px 10px rgba(60, 30, 10, 0.25); }
.hi-port img { width: 100%; height: 100%; object-fit: cover; }
.hi-head { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.hi-head > b { font: 600 26px/1.05 var(--display); color: var(--wood); }
.hi-head > small { font-size: 16px; font-weight: 700; color: var(--ink-soft); }
.hi-role { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: var(--rc); padding: 3px 9px; border-radius: 6px; vertical-align: 2px; }
.hi-first { font-size: 14px; font-weight: 800; color: #245a2a; background: rgba(63, 138, 70, 0.16); border: 1px solid rgba(63, 138, 70, 0.45); padding: 2px 9px; border-radius: 8px; }
.hi-lock { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 8px; background: #8f897d; color: #fff; font-size: 14px; font-weight: 800; }
.hi-lock b { font: 700 17px var(--display); }
.hi-pass { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 12px; background: rgba(216, 169, 59, 0.14); border: 1px solid rgba(216, 169, 59, 0.5); margin: 6px 0 8px; }
.hi-pass b { display: block; font: 600 17px var(--display); color: #6a4a10; }
.hi-pass span { font-size: 16px; line-height: 1.3; }
.hi-abil, .hp-abil { display: grid; gap: 6px; }
.ha { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px 10px 6px 6px; border-radius: 12px; background: rgba(255, 255, 255, 0.6); border: 1px solid rgba(120, 90, 50, 0.22); }
.ha-ic { position: relative; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(#35506a, #22384c); box-shadow: inset 0 0 0 2px rgba(143, 195, 224, 0.55); }
.ha-ic .kbd { position: absolute; left: -5px; top: -6px; min-width: 20px; height: 20px; font-size: 12px; }
.ha b { font: 600 17px var(--display); color: var(--wood); margin-right: 6px; }
.ha small { font-size: 13px; font-weight: 800; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ha > div > span { display: block; font-size: 15px; line-height: 1.3; }
.ha-c { display: inline-flex; align-items: center; gap: 2px; color: #2f6f9a; }
.ha.lock { opacity: 0.6; } .ha.lock .ha-ic { filter: grayscale(0.8); }
.daily-hero { border-radius: 50%; background: radial-gradient(circle, #fffaf0, #e9dcbd); margin-left: auto; }
.intro-hero { flex: none; width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fffaf0, color-mix(in srgb, var(--hc) 45%, #e9dcbd)); box-shadow: 0 0 0 2px #fff, 0 3px 6px rgba(0, 0, 0, 0.3); margin-left: -18px; animation: yrIn 0.45s cubic-bezier(.2, .9, .3, 1.3) 0.1s both; }
.gk.port img { width: 38px; height: 38px; border-radius: 50%; background: #fffaf0; box-shadow: 0 0 0 2px #fff; }
.yr-lead { position: absolute; right: -12px; top: -12px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #2a1b0f; box-shadow: 0 0 0 2px var(--gold-2); }
.yr-iv.lead > img { width: 36px; height: 36px; margin: -8px 0; }
.yr-iv.lead > b { font-size: 18px; color: #8a6414; }
.yr-iv.lead small { font-size: 13px; color: var(--ink-soft); }
.pips i.lead { border-color: var(--gold-2); border-width: 2px; }

/* ---------- level-up: perk choice ---------- */
.lvl-head { display: flex; align-items: center; gap: 16px; }
.lvl-head > div { flex: 1; min-width: 0; }
.lvl-head h2 { margin-bottom: 6px; }
.lvl-port { position: relative; flex: none; width: 104px; height: 104px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fffaf0, color-mix(in srgb, var(--hc) 45%, #e9dcbd)); box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--gold-2), 0 0 30px rgba(255, 214, 110, 0.8); }
.lvl-port img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.lvl-port::before { content: ''; position: absolute; left: 50%; bottom: 30%; width: 70%; height: 220%; translate: -50% 0; border-radius: 50%; background: linear-gradient(to top, rgba(255, 230, 140, 0.85), rgba(255, 240, 190, 0)); filter: blur(6px); opacity: 0; pointer-events: none; z-index: -1; }
.lvl-port.rise::before { animation: lvlPillar 1.2s ease-out; }
.lvl-port.rise { animation: heroPick 0.6s cubic-bezier(.3, 1.6, .5, 1) 0.15s both; }
@keyframes lvlPillar { 0% { opacity: 0; height: 40%; } 30% { opacity: 1; } 100% { opacity: 0; height: 260%; } }
.lvl-n { position: absolute; right: -6px; bottom: -4px; min-width: 38px; height: 38px; padding: 0 6px; border-radius: 19px; display: grid; place-items: center; font: 700 22px var(--display); color: #3a2408; background: linear-gradient(#f5d36a, var(--gold) 60%, #b8862a); border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35); }
.xpbar { position: relative; height: 18px; border-radius: 9px; background: rgba(90, 60, 30, 0.16); overflow: hidden; border: 1px solid rgba(120, 90, 50, 0.3); }
.xpbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 9px; background: linear-gradient(90deg, #d8a93b, #ffe080); box-shadow: 0 0 10px rgba(255, 220, 120, 0.7); transition: width 0.5s; }
.xpbar span { position: relative; display: block; text-align: center; font: 700 13px/18px var(--display); color: #3a2408; }
.lvl-perks { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.lvl-perks span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, 0.6); border: 1px solid rgba(120, 90, 50, 0.25); }
.lvl-new { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; padding: 8px 12px; border-radius: 12px; background: rgba(47, 111, 154, 0.12); border: 1px solid rgba(47, 111, 154, 0.4); font-size: 17px; font-weight: 700; color: #1f4f70; }
.draft.perks .dcard { animation: yrIn 0.25s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: calc(var(--i) * 60ms); }
.pband.ability { background: linear-gradient(#e6f2fb, #c9e1f2); color: #1f4f70; }
.pband.stat { background: linear-gradient(#fbe9e4, #f2cdc4); color: #8a2418; }
.pband.valley { background: linear-gradient(#eaf6e2, #cfe8bf); color: #2f6b3d; }
.pk-pic { position: relative; display: block; }
.pk-pic .pic { width: 100%; }
.pk-slot { position: absolute; right: 10px; bottom: 8px; font: 700 18px/1 var(--display); font-style: normal; color: #eaf6ff; background: linear-gradient(#35506a, #22384c); border: 2px solid #8fc3e0; border-radius: 8px; padding: 4px 8px; }
.draft.compact .dcard.pc > .pk-pic { grid-column: 1; grid-row: 2 / span 2; width: 64px; align-self: center; }
.draft.compact .pk-pic .pic { width: 64px; height: 64px; }
.draft.compact .pk-slot { right: -4px; bottom: -4px; font-size: 13px; padding: 2px 5px; }
.dcard.perk .b-role { font-size: 14px; font-weight: 800; color: var(--ink-soft); display: flex; align-items: center; gap: 4px; }

/* ---------- legend leaders, elites ---------- */
.lead-card { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; margin: 10px 0; border-radius: 14px;
  background: linear-gradient(110deg, rgba(90, 20, 40, 0.92), rgba(40, 16, 30, 0.92)); border: 2px solid var(--gold-2); color: #fbeedb; box-shadow: 0 4px 12px rgba(40, 10, 20, 0.35); }
.lc-port { position: relative; width: 78px; height: 78px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, rgba(255, 220, 160, 0.35), rgba(0, 0, 0, 0.3)); box-shadow: inset 0 0 0 2px rgba(240, 201, 90, 0.7); }
.lc-port > img:first-child { width: 100%; height: 100%; object-fit: contain; }
.lc-crown { position: absolute; left: 50%; top: -12px; translate: -50% 0; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); }
.lead-card small { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-2); }
.lead-card b { display: block; font: 600 22px/1.1 var(--display); color: #fff4dc; }
.lc-mech { display: block; font-size: 16px; line-height: 1.3; color: #ffd6c8; margin: 2px 0 4px; }
.lc-loot { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; }
.lc-loot span { display: inline-flex; align-items: center; gap: 2px; }
.lc-loot em { font-style: normal; font-size: 13px; color: #d8c8a8; }
.lead-card.compact { grid-template-columns: 52px minmax(0, 1fr); gap: 8px; padding: 6px 10px; margin: 6px 0 2px; flex-basis: 100%; }
.lead-card.compact .lc-port { width: 52px; height: 52px; } .lead-card.compact .lc-crown { width: 20px; height: 20px; top: -9px; }
.lead-card.compact b { font-size: 17px; } .lead-card.compact .lc-mech { font-size: 14px; } .lead-card.compact small { font-size: 11px; }
.wave.has-lead { flex-wrap: wrap; }
.foe { position: relative; }
.foe.elite img { filter: drop-shadow(0 0 3px rgba(255, 120, 90, 0.9)); }
.foe-el { position: absolute; left: 20px; top: -4px; width: 18px; height: 18px; border-radius: 50%; background: #2a1b0f; display: grid; place-items: center; box-shadow: 0 0 0 1px #ff8a7a; }
.foe-el img { width: 14px !important; height: 14px !important; margin: 0 !important; filter: none !important; }
.upkeep .elite-row { grid-template-columns: 34px 1fr; }
.elite-row small { grid-column: 2; font-size: 14px; color: var(--ink-soft); font-weight: 700; margin-top: -6px; }
.upkeep .hero-row-intro { grid-template-columns: 34px 1fr auto; }
.hero-row-intro img { border-radius: 50%; background: #fffaf0; box-shadow: 0 0 0 2px #fff; }
/* the wind-up of a legend leader: a short banner under the top bar */
.callout { position: fixed; left: 50%; top: calc(var(--top-h, 66px) + 20px); z-index: 26; display: flex; align-items: center; gap: 10px; padding: 8px 18px 12px 8px; border-radius: 40px; overflow: hidden;
  background: linear-gradient(110deg, rgba(110, 20, 50, 0.95), rgba(50, 14, 40, 0.95)); border: 2px solid #ff8a9a; color: #fff4dc; box-shadow: 0 0 0 4px rgba(200, 40, 80, 0.25), var(--shadow);
  transform: translate(-50%, -20px) scale(0.9); opacity: 0; transition: transform 0.25s cubic-bezier(.3, 1.6, .5, 1), opacity 0.2s; pointer-events: none; }
.callout.show { transform: translate(-50%, 0) scale(1); opacity: 1; }
.callout img { width: 46px; height: 46px; border-radius: 50%; background: rgba(0, 0, 0, 0.3); box-shadow: inset 0 0 0 2px rgba(255, 138, 154, 0.7); }
.callout b { display: block; font: 600 18px/1.1 var(--display); color: #ffe9b0; }
.callout span { font-size: 16px; font-weight: 800; }
.callout i { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: linear-gradient(90deg, #ff8a9a, #ffe0a0); transform-origin: left; animation: calloutRun linear forwards; }
@keyframes calloutRun { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ---------- winter report ---------- */
.rep-hero { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.55); border: 1px solid rgba(120, 90, 50, 0.25); margin: 6px 0 4px; }
.rep-hero > img { width: 72px; height: 72px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fffaf0, color-mix(in srgb, var(--hc) 45%, #e9dcbd)); box-shadow: 0 0 0 2px #fff; }
.rep-hero b { font: 600 19px var(--display); color: var(--wood); display: block; margin-bottom: 4px; }
.rep-hero em { font-style: normal; }
.rep-line { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-weight: 800; font-size: 15px; }
.rep-line > span { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- claim raids ---------- */
.raid-risk { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 8px; align-items: center; padding: 8px 10px; margin: 8px 0 4px; border-radius: 12px; border: 2px solid; }
.raid-risk > img { grid-row: span 4; align-self: start; }
.raid-risk > small.rr-parts { font-size: 13px; color: var(--ink-soft); } .raid-risk .rr-parts b { color: var(--ink); }
.raid-risk > b { font: 700 19px var(--display); }
.raid-risk > small { font-size: 14px; font-weight: 700; color: var(--ink); }
.raid-risk .foes { margin-top: 2px; } .raid-risk .foe img { width: 28px; height: 28px; }
.raid-risk.none { background: rgba(63, 138, 70, 0.12); border-color: rgba(63, 138, 70, 0.45); color: #245a2a; }
.raid-risk.low { background: rgba(63, 138, 70, 0.12); border-color: rgba(63, 138, 70, 0.5); } .raid-risk.low > b { color: #245a2a; }
.raid-risk.mid { background: rgba(216, 169, 59, 0.16); border-color: rgba(200, 150, 40, 0.7); } .raid-risk.mid > b { color: #8a5a10; }
.raid-risk.high { background: rgba(192, 57, 43, 0.12); border-color: rgba(192, 57, 43, 0.6); animation: riskPulse 1.6s ease-in-out infinite; } .raid-risk.high > b { color: #8a2418; }
@keyframes riskPulse { 50% { box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.18); } }
.btn.armed { animation: retirePulse 0.9s ease-in-out infinite; }
.toast.big { font-size: 20px; padding: 14px 22px; border-width: 2px; animation-duration: 5.1s; font-family: var(--display); font-weight: 600; }
.toast.big:not(.bad) { border-color: var(--gold-2); box-shadow: 0 0 0 4px rgba(240, 201, 90, 0.25), var(--shadow); }

/* ---------- hero chip in the top bar ---------- */
.hero-chip { display: flex; align-items: center; gap: 8px; padding: 3px 10px 3px 3px; border-radius: 30px; background: rgba(255, 240, 210, 0.1); border: 1px solid rgba(240, 210, 150, 0.35); color: #fff4dc; transition: background 0.15s, transform 0.15s; }
.hero-chip:hover, .hero-chip.on { background: rgba(255, 240, 210, 0.22); }
.hcp-port { position: relative; width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fffaf0, color-mix(in srgb, var(--hc) 50%, #e9dcbd)); box-shadow: 0 0 0 2px var(--hc); flex: none; }
.hcp-port img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.hcp-lv { position: absolute; right: -5px; bottom: -4px; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; font: 700 13px var(--display); color: #3a2408; background: linear-gradient(#f5d36a, var(--gold)); border: 1px solid #fff; }
.hcp-r { display: grid; gap: 3px; min-width: 64px; }
.hcp-nm { font-size: 13px; font-weight: 800; color: #e8d8b8; white-space: nowrap; }
.hcp-xp, .hcp-hp { display: block; height: 6px; border-radius: 3px; background: rgba(0, 0, 0, 0.45); overflow: hidden; }
.hcp-xp i, .hcp-hp i { display: block; height: 100%; transition: width 0.4s; }
.hcp-xp i { background: linear-gradient(90deg, #d8a93b, #ffe080); }
.hcp-hp i { background: linear-gradient(90deg, #3f8a46, #8fe06a); }
.hero-chip > .kbd { opacity: 0.8; }
.hero-chip.offer { animation: chipOffer 1.2s ease-in-out infinite; } .hero-chip.offer .hcp-nm { color: #ffe080; }
.hero-chip.ko .hcp-port > img { filter: grayscale(1) brightness(0.8); } .hero-chip.ko .hcp-nm { color: #ffb0a0; }
.hero-chip.bump { animation: bump 0.5s; }
.hcp-port::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: conic-gradient(#ffe080 calc(var(--xp, 0) * 360deg), rgba(0, 0, 0, 0.45) 0); z-index: -1; display: none; }

@keyframes chipOffer { 50% { box-shadow: 0 0 0 3px rgba(255, 224, 128, 0.6), 0 0 18px rgba(255, 214, 110, 0.6); } }

/* ---------- winter bar: hero with Q W E ---------- */
.wb-aim { position: absolute; left: 50%; bottom: calc(100% + 10px); translate: -50% 0; display: flex; align-items: center; gap: 8px; white-space: nowrap; padding: 6px 14px 6px 8px; border-radius: 20px;
  background: rgba(30, 22, 14, 0.94); border: 2px solid var(--gold-2); color: #fff4dc; font-weight: 800; font-size: 16px; box-shadow: var(--shadow); animation: aimIn 0.2s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; }
@keyframes aimIn { from { opacity: 0; transform: translateY(6px) scale(0.95); } }
.wb-t { display: inline-flex; align-items: center; gap: 5px; }
.wb-waves.raid .wb-t > b:first-of-type { font: 600 20px var(--display); color: #ffb09a; }
.winterbar.raid { border-color: #ff8a6a; background: linear-gradient(#4a2a24, #2a1a16); box-shadow: 0 0 0 3px rgba(255, 120, 90, 0.25), var(--shadow); }
.winterbar.raid .wb-track i { background: linear-gradient(90deg, #ff8a6a, #ffe0a0); }
.wb-floor { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 13px; font-weight: 700; color: #f0c8b8; }
.wb-track .mark.lead { width: 4px; background: var(--gold-2); }
.wb-track .mark.lead img { position: absolute; left: 50%; top: -20px; translate: -50% 0; width: 18px; height: 18px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)); }
.wb-hero { display: flex; align-items: center; gap: 10px; }
.wb-port { position: relative; width: 66px; height: 66px; padding: 0; border-radius: 50%; border: 3px solid var(--hc); background: radial-gradient(circle at 50% 35%, #fffaf0, color-mix(in srgb, var(--hc) 45%, #b8c8d4)); box-shadow: 0 0 12px color-mix(in srgb, var(--hc) 60%, transparent); transition: transform 0.12s; }
.wb-port:hover { transform: scale(1.06); }
.wb-port > img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.wb-lv { position: absolute; left: -6px; top: -6px; min-width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; font: 700 14px var(--display); color: #3a2408; background: linear-gradient(#f5d36a, var(--gold)); border: 1px solid #fff; }
.wb-hp { position: absolute; left: 4px; right: 4px; bottom: -9px; height: 8px; border-radius: 4px; background: rgba(0, 0, 0, 0.6); overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.4); }
.wb-hp i { display: block; height: 100%; background: linear-gradient(90deg, #3f8a46, #8fe06a); transition: width 0.25s; }
.wb-ko { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; align-content: center; background: rgba(20, 24, 32, 0.6); }
.wb-ko b { font: 700 18px/1 var(--display); color: #fff; text-shadow: 0 1px 2px #000; }
.wb-hero.ko .wb-port > img { filter: grayscale(1); }
.wb-hero.asleep .wb-port { animation: pulse 1s infinite; }
.wb-hero.guard .wb-port { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.5), 0 0 16px var(--hc); }
.abils { display: flex; gap: 8px; }
.abil { position: relative; width: 66px; height: 66px; border-radius: 14px; border: 2px solid #8fc3e0; background: linear-gradient(#35506a, #22384c); display: grid; place-items: center; transition: transform 0.1s, box-shadow 0.2s; --cd: 0; }
.abil:hover { transform: translateY(-3px); }
.abil > img { width: 40px; height: 40px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.4)); }
.abil > .kbd { position: absolute; left: -6px; top: -8px; z-index: 2; }
.abil .ab-cd { position: absolute; inset: 0; border-radius: 12px; background: conic-gradient(rgba(8, 16, 26, 0.74) calc(var(--cd) * 360deg), transparent 0); pointer-events: none; }
.abil .ab-n { position: absolute; inset: 0; display: grid; place-items: center; font: 700 22px var(--display); color: #fff; text-shadow: 0 1px 3px #000; pointer-events: none; }
.abil .c { position: absolute; right: 2px; bottom: 1px; display: flex; align-items: center; font-size: 14px; font-weight: 800; z-index: 1; text-shadow: 0 1px 2px #000; }
.abil .c img { width: 16px; height: 16px; }
.abil.ready { box-shadow: 0 0 0 3px rgba(143, 195, 224, 0.45), 0 0 18px rgba(143, 195, 224, 0.4); }
.abil.poor .c { color: #ffb0a0; } .abil.poor > img { opacity: 0.55; }
.abil.off > img { opacity: 0.5; }
.abil.lock { filter: grayscale(0.9); opacity: 0.6; }
.ab-lock { position: absolute; inset: 0; border-radius: 12px; display: grid; place-items: center; align-content: center; gap: 0; background: rgba(10, 20, 30, 0.55); color: #fff; }
.ab-lock small { font-size: 12px; font-weight: 800; }
.abil.aim { border-color: var(--gold-2); box-shadow: 0 0 0 4px rgba(240, 201, 90, 0.6), 0 0 20px rgba(240, 201, 90, 0.5); animation: pulse 0.8s infinite; }
.abil.pop { animation: abilReady 0.5s cubic-bezier(.3, 1.6, .5, 1); }
.abil.cast { animation: abilCast 0.45s ease-out; }
.abil.nope { animation: abilNope 0.35s; }
@keyframes abilNope { 20% { transform: translateX(-6px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } }
@keyframes abilReady { 0% { transform: scale(0.85); } 50% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(143, 195, 224, 0.6), 0 0 28px rgba(200, 240, 255, 0.9); } 100% { transform: none; } }
@keyframes abilCast { 0% { transform: scale(1.18); filter: brightness(2); } 100% { transform: none; filter: none; } }
.abil.move { width: 58px; border-color: color-mix(in srgb, var(--hc) 70%, #8fc3e0); }
.abil.move > img { width: 30px; height: 30px; margin-top: -10px; }
.abil.move small { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-size: 12px; font-weight: 800; color: #cfe6f2; }
.wb-port.aim, .abil.move.aim { border-color: var(--gold-2); box-shadow: 0 0 0 4px rgba(240, 201, 90, 0.6); }

/* ---------- hero panel (info panel) ---------- */
.info.hero-panel { width: 370px; }
.hp-port { position: relative; flex: none; width: 76px; height: 76px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fffaf0, color-mix(in srgb, var(--hc) 45%, #e9dcbd)); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--hc); }
.info .hp-port img { width: 100%; height: 100%; border-radius: 50%; border: 0; background: none; object-fit: cover; }
.hp-lv { position: absolute; right: -6px; bottom: -4px; min-width: 28px; height: 28px; border-radius: 14px; display: grid; place-items: center; font: 700 17px var(--display); color: #3a2408; background: linear-gradient(#f5d36a, var(--gold)); border: 2px solid #fff; }
.hp-status { display: flex; align-items: center; gap: 8px; margin: 6px 0; padding: 6px 10px; border-radius: 10px; background: rgba(192, 57, 43, 0.1); border: 1px solid rgba(192, 57, 43, 0.4); font-weight: 700; }
.hero-panel .xpbar { margin: 4px 0 2px; }
.hero-panel .ha { grid-template-columns: 46px minmax(0, 1fr); }
.hero-panel .ha-ic { width: 46px; height: 46px; } .hero-panel .ha-ic img { width: 34px; height: 34px; }
.hero-panel .ha > div > span { font-size: 14px; }
.hp-h { display: flex; align-items: center; gap: 6px; font-size: 17px; color: var(--wood); margin: 10px 0 6px; }
.hp-perks { display: flex; flex-wrap: wrap; gap: 6px; }
.perk-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 4px; border-radius: 14px; font-size: 14px; font-weight: 800; border: 1px solid; }
.perk-chip.ability { background: rgba(47, 111, 154, 0.12); border-color: rgba(47, 111, 154, 0.4); color: #1f4f70; }
.perk-chip.stat { background: rgba(192, 57, 43, 0.1); border-color: rgba(192, 57, 43, 0.35); color: #8a2418; }
.perk-chip.valley { background: rgba(63, 138, 70, 0.12); border-color: rgba(63, 138, 70, 0.4); color: #245a2a; }
.hp-post-line { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; font-size: 16px; }
.hero-panel .actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mitem.hero { justify-content: flex-start; } .mitem.hero > div { flex: 1; }
.m-port { flex: none; border-radius: 50%; background: radial-gradient(circle, #fffaf0, #e9dcbd); box-shadow: 0 0 0 2px #fff; }
.mitem.hero:not(.owned) .m-port { filter: grayscale(0.6); }
.stat.hero > img { border-radius: 50%; background: #fffaf0; }

@media (max-width: 820px) {
  .hero-row { gap: 6px; }
  .hero-c { padding: 6px 2px 6px; border-radius: 12px; }
  .hero-c b { font-size: 12px; margin-top: 2px; }
  .hc-role { display: none; }
  .hero-c > .kbd { left: 3px; top: 3px; }
  .hc-cost { font-size: 12px; padding: 0 4px 0 2px; } .hc-cost img { width: 14px; height: 14px; }
  .hc-lock svg { width: 20px; height: 20px; }
  .hero-info { grid-template-columns: 1fr; gap: 8px; padding: 10px; }
  .hi-port { display: none; }
  .hi-head > b { font-size: 21px; } .hi-head .alt-cmp { display: none; }
  .hi-tiles { gap: 4px; } .hi-tiles .bt { grid-template-columns: 20px auto; padding: 2px 6px 2px 3px; } .hi-tiles .bt img { width: 20px; height: 20px; } .hi-tiles .bt b { font-size: 16px; } .hi-tiles .bt small { font-size: 10px; }
  .ha { grid-template-columns: 44px minmax(0, 1fr); } .ha-ic { width: 44px; height: 44px; } .ha-ic img { width: 32px; height: 32px; }
  .ha > div > span { font-size: 14px; }
  .lvl-port { width: 72px; height: 72px; } .lvl-n { min-width: 30px; height: 30px; font-size: 17px; }
  .lvl-head { gap: 12px; }
  .lead-card { grid-template-columns: 56px minmax(0, 1fr); } .lc-port { width: 56px; height: 56px; } .lead-card b { font-size: 18px; } .lc-mech { font-size: 14px; }
  .callout { top: calc(var(--top-h, 124px) + 8px); max-width: calc(100vw - 20px); padding-right: 12px; } .callout img { width: 36px; height: 36px; } .callout span { font-size: 14px; }
  .hero-chip { padding: 2px 6px 2px 2px; gap: 5px; } .hcp-port { width: 32px; height: 32px; } .hcp-r { min-width: 46px; } .hcp-nm { font-size: 11px; }
  .wb-hero { gap: 6px; } .wb-port { width: 54px; height: 54px; }
  .abils { gap: 6px; } .abil { width: 54px; height: 54px; } .abil > img { width: 32px; height: 32px; } .abil.move { width: 48px; } .abil.move > img { width: 24px; height: 24px; }
  .abil .ab-n { font-size: 18px; }
  .wb-aim { font-size: 14px; white-space: normal; width: max-content; max-width: calc(100vw - 30px); }
  .info.hero-panel { width: auto; right: 62px; max-height: min(46vh, calc(100vh - var(--top-h, 124px) - var(--hud-bottom, 206px) - 24px)); }
  .winterbar .speed button { min-width: 44px; }
  .intro-hero { width: 44px; height: 44px; }
  .daily-hero { margin-left: 0; }
}

/* ---------- morale: now (tiles), the scale, what makes it, next (labelled) ---------- */

.tooltip:has(.mo-card) { max-width: 380px; }
.mo-card { display: grid; gap: 8px; margin-top: 6px; }
.mo-sec { display: grid; gap: 4px; }
.mo-tag { justify-self: start; font: 700 12px/1 var(--body); letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: rgba(216, 169, 59, 0.25); color: #ffe9b0; }
.mo-tag.next { background: rgba(127, 180, 230, 0.22); color: #cfe6ff; border: 1px dashed rgba(170, 210, 250, 0.6); }
.mo-card .btiles { margin: 0; }
.mo-rows { display: grid; gap: 2px; }
.mo-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 15px; line-height: 1.25; }
.mo-row > b { font: 700 17px var(--display); text-align: right; min-width: 34px; }
.mo-row.base { opacity: 0.75; }
.mo-row.sum { grid-template-columns: minmax(0, 1fr) auto; border-top: 1px solid rgba(240, 210, 150, 0.3); padding-top: 3px; margin-top: 2px; font-weight: 800; }
.mo-row.sum > b { color: #ffe9b0; }
.mo-row.none { grid-template-columns: 1fr; opacity: 0.7; font-style: italic; }
.mo-sec.next .mo-row { grid-template-columns: 22px minmax(0, 1fr) auto auto; }
.mo-row em { font-style: normal; font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: #cfe6ff; margin-right: 2px; }
.mo-to { font-weight: 800; white-space: nowrap; font-size: 14px; }
.mo-items { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 13px; opacity: 0.85; }
.mo-items > span { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.mo-hint { display: flex; align-items: center; gap: 6px; font-size: 13px; opacity: 0.8; }
.mo-scale { position: relative; padding-top: 18px; }
.mo-segs { display: flex; height: 22px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(240, 210, 150, 0.35); }
.mo-segs > span { flex: var(--w) 0 0; display: grid; place-items: center; font: 700 12px var(--display); color: rgba(255, 244, 220, 0.6); background: rgba(255, 255, 255, 0.06); border-right: 1px solid rgba(0, 0, 0, 0.25); }
.mo-segs > span.up { background: rgba(110, 190, 100, 0.18); } .mo-segs > span.dn { background: rgba(240, 110, 90, 0.18); }
.mo-segs > span.on { color: #fff; background: rgba(240, 201, 90, 0.5); box-shadow: inset 0 0 0 2px #f0c95a; }
.mo-segs > span.on.up { background: rgba(110, 190, 100, 0.6); } .mo-segs > span.on.dn { background: rgba(220, 90, 70, 0.6); }
.mo-mk { position: absolute; top: 0; bottom: 0; left: calc(var(--x) * 1%); width: 3px; margin-left: -1.5px; background: #fff4dc; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4); }
.mo-mk b { position: absolute; top: -1px; left: 50%; transform: translateX(-50%); font: 700 13px/16px var(--display); color: #2b2118; background: #fff4dc; padding: 0 5px; border-radius: 6px; }
.mo-mk.ghost { background: none; border-left: 2px dashed #cfe6ff; box-shadow: none; width: 0; }
.mo-mk.ghost b { background: #cfe6ff; top: auto; bottom: -18px; }
.mo-mk.ghost b::before { content: 'next '; font-size: 10px; text-transform: uppercase; }

.mo-scale:has(.ghost) { padding-bottom: 18px; }
/* the morale sheet (parchment) */
.mo-h2 { display: flex; align-items: center; gap: 10px; }
.sheet .mo-card { font-size: 16px; }
.sheet .mo-tag { background: rgba(216, 169, 59, 0.22); color: #6a4a10; }
.sheet .mo-tag.next { background: rgba(60, 120, 180, 0.12); color: #1f4f7a; border-color: rgba(60, 120, 180, 0.5); }
.sheet .mo-row { font-size: 17px; } .sheet .mo-row > b { font-size: 19px; }
.sheet .mo-row.sum { border-top-color: rgba(120, 90, 50, 0.3); } .sheet .mo-row.sum > b { color: var(--wood); }
.sheet .mo-row em { color: #1f4f7a; }
.sheet .mo-segs { border-color: rgba(120, 90, 50, 0.35); }
.sheet .mo-segs > span { color: rgba(60, 40, 20, 0.55); background: rgba(90, 60, 30, 0.06); border-right-color: rgba(120, 90, 50, 0.2); }
.sheet .mo-segs > span.up { background: rgba(63, 138, 70, 0.12); } .sheet .mo-segs > span.dn { background: rgba(192, 57, 43, 0.1); }
.sheet .mo-segs > span.on { color: #2b2118; background: rgba(240, 201, 90, 0.6); } .sheet .mo-segs > span.on.up { background: rgba(110, 190, 100, 0.55); } .sheet .mo-segs > span.on.dn { background: rgba(220, 110, 90, 0.5); }
.sheet .mo-mk { background: var(--wood); } .sheet .mo-mk b { background: var(--wood); color: #fff4dc; }
.sheet .mo-mk.ghost { background: none; border-left-color: #3a78b0; } .sheet .mo-mk.ghost b { background: #3a78b0; color: #fff; }
/* the building info line under the tiles, and the spring summary chip */
.mo-line { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; margin: 2px 0 6px; padding: 6px 10px; border-radius: 10px; text-align: left;
  background: rgba(216, 169, 59, 0.12); border: 1px solid rgba(216, 169, 59, 0.45); font-size: 15px; }
.mo-line:hover { background: rgba(216, 169, 59, 0.22); }
.mo-line small { display: block; font-size: 13px; color: var(--ink-soft); font-weight: 700; }
.mo-line b { font-family: var(--display); }
.spring-info .mo-bit.up { background: rgba(63, 138, 70, 0.14); } .spring-info .mo-bit.dn { background: rgba(192, 57, 43, 0.1); }
.spring-info .mo-bit small { font-weight: 700; color: var(--ink-soft); }
.upkeep .mo-warn small { display: block; font-size: 13px; color: var(--ink-soft); }

/* the knocked-out hero: out until spring (grey portrait, the St. Bernard's barrel, abilities greyed with the reason in the tooltip) */
.hcp-ko { position: absolute; right: -6px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #3a2a20; box-shadow: 0 0 0 2px #ffb0a0; }
.hcp-ko img { width: 18px; height: 18px; }
.wb-ko b { font-size: 13px; letter-spacing: 0.02em; }
.wb-hero.ko .abil { filter: grayscale(0.85); opacity: 0.6; }
.hp-status small { display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); }

/* claiming land: one friendly coach mark under the top bar until the first claim; a prominent claim box */
.coach { position: fixed; left: 50%; bottom: calc(var(--hud-bottom, 200px) + 14px); transform: translateX(-50%); z-index: 24; display: flex; align-items: center; gap: 12px; padding: 10px 44px 10px 12px;
  max-width: min(640px, calc(100vw - 24px)); border-radius: 16px; border-color: var(--gold); font-size: 16px; line-height: 1.3; }
.coach.in { animation: coachIn 0.3s ease-out; }
.coach > img { flex: none; }
.coach b { font-family: var(--display); font-size: 18px; color: var(--wood); margin-right: 4px; }
.coach small { display: block; font-size: 14px; color: var(--ink-soft); font-weight: 700; }
.coach .btn { flex: none; white-space: nowrap; }
.coach .close-x { top: 50%; transform: translateY(-50%); }
@keyframes coachIn { from { opacity: 0; transform: translate(-50%, 10px); } }
.claim-box .claim-h { display: flex; align-items: center; gap: 8px; font: 600 19px var(--display); color: var(--wood); }
.claim-box .claim-sub { display: block; font-size: 14px; font-weight: 700; color: var(--ink-soft); margin: 0 0 4px 34px; }
.claim-box.can { background: rgba(240, 201, 90, 0.22); border: 2px solid var(--gold); box-shadow: 0 0 0 3px rgba(240, 201, 90, 0.25); }
.claim-box .cost-line .btn.big { min-height: 50px; padding: 8px 22px; }
@media (max-width: 820px) {
  .coach { padding: 8px 38px 8px 8px; gap: 8px; font-size: 14px; flex-wrap: wrap; justify-content: center; }
  body.info-open .coach { display: none; }
  .coach > img { width: 30px; height: 30px; } .coach > span { flex: 1 1 200px; } .coach b { font-size: 16px; } .coach small { font-size: 12px; }
}

/* save transfer: export (file or code) and import (file or pasted code) of the saved run */
.xf-lead { display: flex; align-items: center; gap: 8px; margin: 0; }
.title-sub #t-xfer { grid-column: 1 / -1; min-height: 44px; font-size: 16px; }
.xf-sec { margin: 12px 0; padding: 12px 14px; border-radius: 14px; background: rgba(255, 250, 235, 0.7); border: 2px solid rgba(160, 120, 60, 0.3); display: grid; gap: 10px; }
.xf-sec h4 { display: flex; align-items: center; gap: 8px; font-size: 20px; color: var(--wood); }
.xf-run { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: #fffaf0; border: 1px solid rgba(120, 90, 50, 0.25); }
.xf-run > div { display: grid; gap: 2px; min-width: 0; }
.xf-run > div > b { font: 600 19px var(--display); color: var(--wood); }
.xf-crest { width: 44px; height: 44px; flex: none; }
.xf-hero { width: 46px; height: 46px; flex: none; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fffaf0, color-mix(in srgb, var(--hc) 45%, #e9dcbd)); box-shadow: 0 0 0 2px var(--hc); }
.xf-facts { display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 15px; font-weight: 700; color: var(--ink-soft); }
.xf-facts > span { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 8px; background: rgba(90, 60, 30, 0.08); }
.xf-facts b { font-family: var(--display); color: var(--ink); }
.xf-tag { position: absolute; top: -9px; left: 10px; font: 800 11px/1 var(--body); letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--wood); color: #fff4dc; }
.xf-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.xf-pick button { position: relative; display: grid; gap: 2px; justify-items: start; text-align: left; padding: 10px 12px 10px 40px; border-radius: 12px; border: 2px solid var(--parch-edge); background: linear-gradient(#fffaf0, #f3e6c8); box-shadow: 0 3px 0 #a8884a; min-height: 52px; }
.xf-pick button > .kbd { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); }
.xf-pick button b { font: 600 17px var(--display); color: var(--wood); }
.xf-pick button small { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.xf-pick button.sel { border-color: var(--red); box-shadow: 0 3px 0 #a8884a, 0 0 0 3px rgba(240, 201, 90, 0.7); }
.xf-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.xf-size { font-weight: 800; color: var(--ink-soft); }
.xf-code { width: 100%; min-height: 70px; resize: vertical; padding: 8px 10px; border-radius: 10px; border: 2px solid rgba(160, 120, 60, 0.45); background: #fffdf6; font: 13px/1.3 ui-monospace, Consolas, monospace; color: var(--ink); -webkit-user-select: text; user-select: text; }
.xf-code:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(240, 201, 90, 0.35); }
.xf-status:empty { display: none; }
.xf-err { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: rgba(192, 57, 43, 0.1); border: 1px solid rgba(192, 57, 43, 0.5); font-weight: 700; color: #8a2418; }
.xf-ok { display: grid; gap: 12px; padding-top: 6px; }
.xf-replace { display: flex; align-items: center; gap: 6px; font-weight: 800; color: #8a2418; margin-bottom: -4px; }
.xf-chron { display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.xf-chron input { width: 22px; height: 22px; accent-color: var(--red); }
.xf-chron span { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .xf-pick { grid-template-columns: 1fr; }
  .xf-run { padding: 8px; gap: 8px; } .xf-crest { width: 34px; height: 34px; } .xf-hero { width: 36px; height: 36px; }
  .xf-facts { font-size: 13px; }
  .xf-pick button { padding-left: 12px; }
}

/* ability numbers: small tiles (live values with level and perks), aiming out of range, the move order */
.ab-tiles { gap: 4px; margin: 6px 0 0; }
.ab-tiles .bt { grid-template-columns: 22px auto; column-gap: 5px; padding: 2px 8px 2px 4px; }
.ab-tiles .bt img { width: 22px; height: 22px; }
.ab-tiles .bt b { font-size: 16px; } .ab-tiles .bt small { font-size: 11px; }
.tooltip .ab-tiles { margin: 8px 0 2px; max-width: 360px; }
.dcard.pc .gains { margin: 6px 0 0; width: 100%; text-align: left; }
.wb-aim.out { background: rgba(120, 30, 24, 0.92); border-color: #ff8a70; color: #ffe0d8; }
.hero-chip.moving .hcp-nm { color: #a8f08a; }
.hero-chip.moving .hcp-port { box-shadow: 0 0 0 2px #a8f08a, 0 0 10px rgba(168, 240, 138, 0.6); }
.wb-hero.moving .abil.move { box-shadow: 0 0 0 3px #a8f08a, 0 0 14px rgba(168, 240, 138, 0.6); }
.wb-hero.moving .abil.move small::after { content: '…'; }
@media (max-width: 820px) { .ab-tiles .bt b { font-size: 14px; } .ab-tiles .bt small { font-size: 10px; } }

/* spring plans: two marked choices (blueprint slot, then relic or supplies); a made choice folds into one line */
.draft-steps { font: 700 15px var(--body); color: var(--ink-soft); margin-left: 8px; vertical-align: middle; }
.draft-sec { margin: 12px 0; padding: 10px 12px 4px; border-radius: 14px; border: 2px solid rgba(160, 120, 60, 0.3); background: rgba(255, 250, 235, 0.55); }
.draft-sec.blueprint { border-color: rgba(47, 111, 154, 0.45); background: rgba(90, 150, 200, 0.08); }
.draft-sec h4 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 21px; color: var(--wood); }
.draft-sec h4 small { font: 700 15px var(--body); color: var(--ink-soft); }
.draft-sec h4 .btn { margin-left: auto; }
.draft-sec .draft { margin: 10px 0; }
.draft-done { display: flex; align-items: center; gap: 10px; margin: 10px 0; padding: 6px 12px; border-radius: 12px; background: rgba(63, 138, 70, 0.12); border: 1px solid rgba(63, 138, 70, 0.45); }
.draft-done > img:nth-child(2) { width: 40px; height: 40px; object-fit: contain; }
.draft-done small { display: block; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #245a2a; }
.draft-done b { font: 600 18px var(--display); color: var(--wood); }
.mp-pips { display: inline-flex; gap: 3px; vertical-align: middle; margin: 0 4px; }
.mp-pips i { width: 10px; height: 10px; border-radius: 50%; background: rgba(120, 90, 50, 0.25); box-shadow: inset 0 0 0 1px rgba(120, 90, 50, 0.4); }
.mp-pips i.on { background: radial-gradient(circle at 35% 35%, #fff0b0, #d8a93b 60%, #9a6a14); box-shadow: none; }
.dcard.pc.master .gains { margin-top: 4px; }
.ab-unit { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; line-height: 1.3; }
.ab-unit img { flex: none; }
.ab-unit.tt { margin-top: 8px; color: #fbeedb; }
.draft-sec .draft.compact .pband { padding-left: 10px; }
.pband.master { background: linear-gradient(#fdf0cc, #f0d48a); color: #6a4a10; }
@media (max-width: 820px) { .draft-sec .draft.compact .pband { padding-left: 12px; } }
@media (max-width: 640px) {   /* phones: shorter cards, the section header already says what they are */
  .draft-sec { padding: 8px 8px 2px; } .draft-sec h4 { font-size: 18px; }
  .draft-sec.blueprint .pband, .draft-sec .dcard.pc .d, .draft-sec .dcard.pc .b-where { display: none; }
  .draft-sec .draft { gap: 8px; }
}

/* demolish: the confirm step shows the refund in the button for a moment */
#i-del.armed { background: linear-gradient(#c0392b, #8e2a20); color: #fff; border-color: #6a1a12; }
#i-del.armed .refund.none { opacity: 1; }
/* group panel: what a specialty key does in a mixed selection */
.multi-note { display: flex; align-items: center; gap: 6px; margin: 4px 0; font-size: 15px; font-weight: 700; color: var(--ink-soft); }
.multi-part { display: block; margin: 2px 0 4px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.multi-part .cost { display: inline-flex; }

/* finds: a short reveal in the middle of the screen (main.js showFind); clicks pass through to the map */
.find { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; pointer-events: none; padding: 16px; }
.find[hidden] { display: none; }
.fd-rays { position: absolute; left: 50%; top: 50%; width: min(640px, 150vw); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 170, 0.75) 0%, rgba(255, 220, 120, 0.3) 28%, transparent 62%),
    repeating-conic-gradient(from 0deg, rgba(255, 226, 140, 0.32) 0deg 9deg, transparent 9deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 30%, transparent 68%); mask: radial-gradient(circle, #000 30%, transparent 68%); animation: fdSpin 9s linear infinite; }
.fd-rays.legendary { background: radial-gradient(circle, rgba(255, 220, 110, 0.85) 0%, rgba(255, 200, 80, 0.35) 30%, transparent 62%), repeating-conic-gradient(rgba(255, 210, 90, 0.45) 0deg 8deg, transparent 8deg 20deg); }
.fd-rays.mythic { background: radial-gradient(circle, rgba(200, 180, 255, 0.85) 0%, rgba(140, 210, 255, 0.35) 30%, transparent 62%), repeating-conic-gradient(rgba(180, 150, 255, 0.45) 0deg 8deg, rgba(140, 220, 255, 0.3) 8deg 14deg, transparent 14deg 22deg); }
.fd-card { position: relative; display: grid; justify-items: center; gap: 6px; min-width: 260px; max-width: min(420px, calc(100vw - 32px)); padding: 16px 22px 18px; border-radius: 18px; text-align: center;
  box-shadow: 0 0 0 4px rgba(240, 201, 90, 0.45), 0 16px 40px rgba(0, 0, 0, 0.45); }
.fd-eye { display: inline-flex; align-items: center; gap: 6px; font: 800 13px/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: #8a6414; }
.fd-big { display: grid; justify-items: center; gap: 2px; }
.fd-big img { width: 128px; height: 128px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(90, 60, 20, 0.35)); animation: fdPop 0.55s cubic-bezier(.3, 1.6, .5, 1) both 0.05s; }
.fd-big small { font: 800 13px var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: #1f4f8a; }
.fd-big.relic small { color: #8a6414; }
.fd-nums { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; }
.fd-n { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; align-items: center; column-gap: 6px; animation: fdPop 0.5s cubic-bezier(.3, 1.6, .5, 1) both 0.12s; }
.fd-n > img { grid-row: span 2; width: 46px; height: 46px; filter: drop-shadow(0 3px 4px rgba(90, 60, 20, 0.3)); }
.fd-n b { font: 700 34px/1 var(--display); color: #245a2a; font-variant-numeric: lining-nums tabular-nums; min-width: 2ch; text-align: left; }
.fd-n small { font-size: 13px; font-weight: 800; color: var(--ink-soft); text-align: left; }
.fd-t { font: 600 26px/1.1 var(--display); color: var(--wood); }
.fd-d { font-size: 16px; line-height: 1.3; color: var(--ink); }
.find.in .fd-card { animation: fdIn 0.32s cubic-bezier(.3, 1.4, .5, 1) both; }
.find.in .fd-rays { animation: fdRays 0.5s ease-out both, fdSpin 9s linear infinite; }
.find.out .fd-card, .find.out .fd-rays { animation: fdOut 0.2s ease-in forwards; }
@keyframes fdIn { from { opacity: 0; transform: translateY(14px) scale(0.85); } }
@keyframes fdOut { to { opacity: 0; transform: translateY(-10px) scale(0.96); } }
@keyframes fdPop { from { opacity: 0; transform: scale(0.4); } }
@keyframes fdRays { from { opacity: 0; transform: translate(-50%, -50%) scale(0.4); } }
@keyframes fdSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@media (max-width: 640px) {
  .fd-card { min-width: 0; width: 100%; padding: 12px 14px 14px; } .fd-big img { width: 96px; height: 96px; }
  .fd-n > img { width: 36px; height: 36px; } .fd-n b { font-size: 28px; } .fd-t { font-size: 22px; } .fd-d { font-size: 15px; }
}
/* spring redraw: one button per row (R plans, B blueprints); the price pops when it rises */
.rr-p { display: inline-flex; align-items: center; gap: 2px; font-family: var(--display); font-variant-numeric: lining-nums tabular-nums; }
.rr-p.bump { animation: rrUp 0.7s cubic-bezier(.3, 1.6, .5, 1); }
.btn.nope { animation: mkNope 0.34s; }
@keyframes rrUp { 0% { transform: scale(1.5); color: #ffe080; } 60% { color: #ffe080; } }
/* phones: the top bar wraps its chips (never cut); everything a little smaller so it stays at about 150 px */
@media (max-width: 820px) {
  .brand img { width: 30px; height: 34px; }
  #top.f-wrap .chip { padding: 2px 7px 2px 3px; gap: 3px; } #top.f-wrap .chip img { width: 20px; height: 20px; } #top.f-wrap .chip b { font-size: 15px; }
  #top.f-wrap .chip small, #top.f-wrap .chip .stack small, #top.f-wrap .chip b i { font-size: 12px; }
  #top.f-wrap .gv { min-width: 28px; gap: 2px; } #top.f-wrap #mo-fx { font-size: 12px; padding: 2px 5px; }
  #top.f-wrap .resbar { gap: 4px; } #top.f-wrap .gauges { gap: 6px; }
  #top.f-wrap .hcp-port { width: 30px; height: 30px; }
}
/* desktop: with the info or hero panel open, the teaching hint moves to the right of it instead of covering it */
@media (min-width: 821px) { body.info-open .coach { left: 392px; transform: none; max-width: calc(100vw - 480px); } body.info-open .coach.in { animation-name: fade; } }

/* ---------- Chronicle and Sagenbuch: one sheet, two tabs (C, B) ---------- */
.sheet.chron-sheet { padding-top: 16px; }
.ch-tabs { display: flex; gap: 8px; margin: 0 0 14px; border-bottom: 3px solid var(--parch-edge); }
.ch-tab { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px 8px 10px; margin-bottom: -3px; border: 2px solid transparent; border-bottom: 0; border-radius: 14px 14px 0 0;
  background: rgba(90, 60, 30, 0.08); color: var(--ink-soft); transition: background 0.15s, color 0.15s; }
.ch-tab b { font: 600 20px var(--display); }
.ch-tab:hover { background: rgba(90, 60, 30, 0.14); color: var(--wood); }
.ch-tab.on { background: linear-gradient(#fffaf0, var(--parch)); color: var(--wood); border-color: var(--parch-edge); box-shadow: 0 -3px 0 var(--gold) inset; }
.ch-tab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--parch); }
.bk-new { font: 800 12px/1 var(--body); font-style: normal; padding: 3px 7px; border-radius: 8px; background: var(--gold); color: #3a2408; }
.ch-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 18px; align-items: center; padding: 14px 16px; border-radius: 18px;
  background: radial-gradient(ellipse at 15% 20%, #fffaf0, rgba(255, 246, 220, 0.6) 60%), linear-gradient(#f6ebd0, #ead9b0); border: 2px solid var(--parch-edge); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5), 0 3px 0 #a8884a; }
.ch-ew { display: flex; align-items: center; gap: 12px; padding: 6px 18px 6px 8px; border-radius: 999px; background: linear-gradient(#ffffff, #f4ecda); box-shadow: inset 0 0 0 2px rgba(216, 169, 59, 0.55), 0 3px 8px rgba(90, 60, 20, 0.18); }
.ch-ew-ic img { filter: drop-shadow(0 4px 6px rgba(90, 60, 20, 0.35)); }
.ch-ew b { display: block; font: 700 44px/1 var(--display); color: var(--wood); font-variant-numeric: lining-nums tabular-nums; }
.ch-ew b.spent { animation: chSpent 0.5s ease-out; }
.ch-ew small { font-size: 14px; font-weight: 800; color: var(--ink-soft); }
.ch-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.ch-st { display: grid; grid-template-columns: 26px auto; grid-template-rows: auto auto; column-gap: 7px; align-items: center; padding: 5px 12px 5px 7px; border-radius: 12px; background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(120, 90, 50, 0.2); }
.ch-st img { grid-row: span 2; }
.ch-st b { font: 700 19px/1.1 var(--display); color: var(--ink); white-space: nowrap; }
.ch-st small { font-size: 12px; font-weight: 800; color: var(--ink-soft); white-space: nowrap; }
.ch-bar { grid-column: 1 / -1; display: block; height: 10px; border-radius: 6px; background: rgba(90, 60, 30, 0.15); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15); }
.ch-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #d8a93b, #ffe080); }
.ch-note, .ch-how { display: flex; align-items: center; gap: 8px; margin: 10px 2px 0; font-size: 15px; font-weight: 700; color: var(--ink-soft); }
.ch-note { color: #245a2a; }
.ch-sec { margin-top: 16px; }
.ch-sec h4 { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 8px; color: var(--wood); }
.ch-sec h4 b { font: 600 21px var(--display); }
.ch-sec h4 small { font: 700 14px var(--body); color: var(--ink-soft); }
.ch-cnt { margin-left: auto; font: 700 15px var(--display); padding: 2px 10px; border-radius: 999px; background: rgba(90, 60, 30, 0.1); color: var(--wood); }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.ch-item, .ch-ms { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 12px 8px 8px; border-radius: 14px;
  background: linear-gradient(#fffdf6, #f8efd9); border: 2px solid rgba(160, 120, 60, 0.28); box-shadow: 0 2px 0 rgba(120, 90, 50, 0.18); }
.ch-item.can { border-color: var(--gold); box-shadow: 0 2px 0 rgba(120, 90, 50, 0.18), 0 0 0 3px rgba(240, 201, 90, 0.3); }
.ch-item.owned { background: linear-gradient(#f4fbee, #e3f1d6); border-color: rgba(63, 138, 70, 0.45); }
.ch-item.got { animation: chGot 0.45s cubic-bezier(.3, 1.5, .5, 1); }
.ch-item.nope { animation: heroNope 0.26s ease-out; }
.ch-pic { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 14px; background: radial-gradient(circle at 40% 30%, #ffffff, #efe2c2 75%); box-shadow: inset 0 0 0 1px rgba(160, 120, 60, 0.25); overflow: hidden; }
.ch-pic img { max-width: 100%; max-height: 100%; }
.ch-pic.port { border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fffaf0, color-mix(in srgb, var(--hc) 45%, #e9dcbd)); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--hc); }
.ch-pic.port img { width: 100%; height: 100%; object-fit: cover; }
.ch-pic.crest { background: none; box-shadow: none; } .ch-pic.crest img { width: 46px; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.25)); }
.ch-pic.bld img { width: 54px; }
.ch-item.owned .ch-pic:not(.port) { box-shadow: inset 0 0 0 1px rgba(63, 138, 70, 0.4); }
.ch-txt { min-width: 0; display: grid; gap: 1px; }
.ch-txt > b { display: flex; align-items: center; gap: 8px; font: 600 18px/1.15 var(--display); color: var(--wood); }
.ch-txt > small { font-size: 15px; font-weight: 600; line-height: 1.25; color: var(--ink-soft); }
.ch-pips { display: inline-flex; gap: 3px; } .ch-pips i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #b8862a; background: rgba(255, 255, 255, 0.7); }
.ch-pips i.on { background: radial-gradient(circle at 35% 30%, #fff2b8, var(--gold) 55%, #b8862a); }
.ch-act { display: grid; justify-items: end; gap: 2px; }
.ch-act .btn { min-width: 74px; font-family: var(--display); font-size: 18px; }
.btn.ch-poor { border-color: rgba(120, 90, 50, 0.35); background: linear-gradient(#f6eedc, #e6d8b8); color: var(--ink-soft); box-shadow: 0 2px 0 rgba(120, 90, 50, 0.3); text-shadow: none; cursor: default; }
.btn.ch-poor img { filter: grayscale(0.6); opacity: 0.7; }
.ch-need { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.ch-own { display: inline-flex; align-items: center; gap: 4px; font: 700 15px var(--display); color: var(--good); }
.ch-medal { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fbfaf6, #d8d0c0 70%, #a89c88); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6), 0 2px 4px rgba(0, 0, 0, 0.2); }
.ch-medal img { opacity: 0.45; filter: grayscale(1); }
.ch-ms.done .ch-medal { background: radial-gradient(circle at 35% 30%, #fff6cc, var(--gold) 60%, #a8761c); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55), 0 0 0 3px rgba(240, 201, 90, 0.35), 0 2px 5px rgba(90, 60, 20, 0.35); }
.ch-ms.done .ch-medal img { opacity: 1; filter: none; }
.ch-ms.done { background: linear-gradient(#fffaea, #f6e7c0); border-color: rgba(216, 169, 59, 0.6); }
.ch-grid.ms .ch-ms { grid-template-columns: 48px minmax(0, 1fr) auto; }
.ch-rew { display: inline-flex; align-items: center; gap: 3px; font: 700 17px var(--display); color: #6a4a10; padding: 3px 9px 3px 10px; border-radius: 999px; background: #fff6d6; border: 1px solid #e0c070; white-space: nowrap; }
.ch-ms.done .ch-rew { color: var(--good); background: rgba(63, 138, 70, 0.12); border-color: rgba(63, 138, 70, 0.4); }
.ch-prog { display: block; height: 6px; margin-top: 4px; border-radius: 3px; background: rgba(90, 60, 30, 0.15); overflow: hidden; } .ch-prog i { display: block; height: 100%; background: linear-gradient(90deg, #d8a93b, #ffe080); }
.ch-txt > small.ch-pv { font-size: 12px; font-weight: 800; }
.ch-foot { margin-top: 16px; }
.link-btn { margin-right: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px; border: 0; background: none; font-size: 14px; font-weight: 700; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--wood); }
.link-btn .kbd { min-width: 18px; height: 18px; font-size: 12px; text-decoration: none; }
@keyframes chGot { 0% { transform: scale(0.97); } 50% { transform: scale(1.02); box-shadow: 0 0 0 6px rgba(240, 201, 90, 0.45); } 100% { transform: none; } }
@keyframes chSpent { 0% { color: #a42a1c; transform: scale(0.94); } 100% { transform: none; } }

/* Sagenbuch: chapters on top, entries left, the chosen (or pointed at) entry right; like the hero and altitude pickers */
.bk-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bk-top h2 { margin-bottom: 6px; }
.bk-all { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 6px; min-width: 190px; margin-bottom: 8px; }
.bk-all b { font: 700 24px var(--display); color: var(--wood); } .bk-all small { font-size: 14px; font-weight: 800; color: var(--ink-soft); }
.bk-all .ch-bar { margin-top: 4px; height: 8px; }
.bk-chs { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 6px; margin-bottom: 10px; }
.bk-ch > .kbd { min-width: 18px; height: 18px; padding: 0 4px; font-size: 12px; } .bk-ch > img { width: 22px; height: 22px; }
.bk-chs .bk-ch b { font-size: 15px; }
.bk-ch { position: relative; display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 5px; padding: 7px 8px 11px; border-radius: 12px; text-align: left; overflow: hidden;
  border: 2px solid var(--parch-edge); background: linear-gradient(#fffaf0, #f3e6c8); box-shadow: 0 3px 0 #a8884a; transition: border-color 0.12s; }
.bk-ch:hover { border-color: var(--gold); }
.bk-ch > span:not(.kbd):not(.bk-chbar) { display: grid; min-width: 0; }
.bk-ch b { font: 600 16px/1.1 var(--display); color: var(--wood); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-ch small { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.bk-ch.on { border-color: var(--red); box-shadow: 0 3px 0 #a8884a, 0 0 0 3px rgba(240, 201, 90, 0.75); }
.bk-chbar { position: absolute; left: 8px; right: 8px; bottom: 4px; height: 4px; border-radius: 2px; background: rgba(90, 60, 30, 0.14); overflow: hidden; }
.bk-chbar i { display: block; height: 100%; background: linear-gradient(90deg, #d8a93b, #ffe080); }
.bk-dot { position: absolute; right: 6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 0 2px #fff, 0 0 6px rgba(240, 201, 90, 0.9); }
.bk-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 14px; height: clamp(300px, calc(100vh - 380px), 640px); }
.bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 8px; align-content: start; overflow-y: auto; padding: 6px 6px 8px 2px; scrollbar-width: thin; }
.bk-grid[data-ch="events"] { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.bk-e { position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; padding: 6px 4px 8px; border-radius: 12px; border: 2px solid rgba(160, 120, 60, 0.3);
  background: linear-gradient(#fffdf6, #f5ead2); box-shadow: 0 2px 0 rgba(120, 90, 50, 0.25); transition: border-color 0.12s, box-shadow 0.12s; min-width: 0; }
.bk-e:hover { border-color: var(--gold); }
.bk-e.sel { border-color: var(--red); box-shadow: 0 2px 0 rgba(120, 90, 50, 0.25), 0 0 0 3px rgba(240, 201, 90, 0.75); }
.bk-ep { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 12px; background: radial-gradient(circle at 50% 40%, #ffffff, rgba(230, 214, 178, 0.6) 72%); }
.bk-ep img { max-width: 100%; max-height: 100%; filter: drop-shadow(0 3px 3px rgba(60, 40, 20, 0.25)); }
.bk-ep.port { border-radius: 50%; overflow: hidden; } .bk-ep.port img { width: 100%; height: 100%; object-fit: cover; filter: none; }
.bk-e.scene .bk-ep { width: 100%; height: auto; aspect-ratio: 200 / 110; border-radius: 8px; overflow: hidden; } .bk-e.scene .bk-ep img { width: 100%; height: 100%; object-fit: cover; filter: none; }
.bk-e > b { font: 600 13px/1.15 var(--display); color: var(--wood); text-align: center; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 2.3em; }
.bk-e.locked { background: linear-gradient(#efe6d2, #e3d5b6); }
.bk-e.locked .bk-ep img { filter: brightness(0) opacity(0.32); }
.bk-e.locked > b { color: rgba(90, 70, 40, 0.55); letter-spacing: 0.1em; }
.bk-e.nope { animation: heroNope 0.26s ease-out; }
.bk-badge { position: absolute; right: -4px; top: -6px; font: 800 11px/1 var(--body); font-style: normal; padding: 3px 6px; border-radius: 7px; background: linear-gradient(#ffe68a, var(--gold)); color: #3a2408; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.bk-detail { overflow-y: auto; padding: 14px; border-radius: 16px; background: rgba(255, 250, 235, 0.8); border: 2px solid rgba(160, 120, 60, 0.3); scrollbar-width: thin; }
.bk-body.preview .bk-detail { border-style: dashed; border-color: var(--gold); }
.bk-detail.pop { animation: heroInfoIn 0.18s ease-out; }
.bk-pic { position: relative; width: 150px; height: 150px; margin: 0 auto 8px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, #ffffff 0%, rgba(255, 244, 210, 0.9) 45%, rgba(240, 220, 170, 0) 70%); }
.bk-pic img { max-width: 140px; max-height: 140px; filter: drop-shadow(0 6px 8px rgba(60, 40, 20, 0.3)); }
.bk-pic.boss img, .bk-pic.lead img { max-width: 150px; max-height: 150px; }
.bk-pic.bld img { max-width: 150px; }
.bk-pic.port { overflow: hidden; background: radial-gradient(circle at 50% 35%, #fffaf0, color-mix(in srgb, var(--hc) 45%, #e9dcbd)); box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--hc), 0 6px 14px rgba(60, 30, 10, 0.25); width: 130px; height: 130px; margin-top: 6px; }
.bk-pic.port img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; filter: none; }
.bk-pic.wide { width: 100%; height: auto; aspect-ratio: 560 / 200; border-radius: 12px; overflow: hidden; background: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.bk-pic.wide img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; filter: none; }
.bk-pic.rare-legendary { background: radial-gradient(circle, rgba(255, 236, 160, 0.95) 0%, rgba(255, 210, 90, 0.4) 45%, transparent 70%), repeating-conic-gradient(rgba(255, 210, 90, 0.35) 0deg 8deg, transparent 8deg 22deg); }
.bk-pic.rare-mythic { background: radial-gradient(circle, rgba(225, 210, 255, 0.95) 0%, rgba(150, 210, 255, 0.4) 45%, transparent 70%), repeating-conic-gradient(rgba(180, 150, 255, 0.35) 0deg 8deg, rgba(140, 220, 255, 0.25) 8deg 14deg, transparent 14deg 22deg); }
.bk-pic.sil img { filter: brightness(0) opacity(0.3); }
.bk-q { position: absolute; inset: 0; display: grid; place-items: center; font: 700 64px var(--display); color: rgba(255, 250, 235, 0.95); text-shadow: 0 3px 8px rgba(0, 0, 0, 0.35); }
.bk-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 6px; }
.bk-head > b { font: 600 26px/1.1 var(--display); color: var(--wood); }
.bk-head > small { font-size: 15px; font-weight: 800; color: var(--ink-soft); }
.bk-tags { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; }
.bk-tag { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; background: rgba(90, 60, 30, 0.12); color: var(--ink-soft); }
.bk-tag.boss { background: #2a3a5a; color: #fff; } .bk-tag.lead { background: linear-gradient(#a8781e, #7a5410); color: #fff; }
.bk-tag.rar-legendary { background: linear-gradient(#f5d36a, #c8961e); color: #3a2408; } .bk-tag.rar-mythic { background: linear-gradient(#b8a0f0, #6a8ad8); color: #fff; }
.bk-tag.perk-ability { background: #c9e1f2; color: #1f4f70; } .bk-tag.perk-stat { background: #f2cdc4; color: #8a2418; } .bk-tag.perk-valley { background: #cfe8bf; color: #2f6b3d; }
.bk-does, .bk-where { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: start; margin: 8px 0; font-size: 16px; font-weight: 600; line-height: 1.3; }
.bk-where { padding: 8px 10px; border-radius: 12px; background: rgba(90, 60, 30, 0.07); font-size: 15px; color: var(--ink-soft); }
.bk-does.bk-terrain { display: block; }
.bk-note { margin: 4px 0; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.bk-h5 { display: flex; align-items: center; gap: 6px; margin: 12px 0 6px; font: 600 16px var(--display); color: var(--red); }
.bk-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.bk-chip { padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(160, 120, 60, 0.4); background: #fffaf0; font: 600 14px var(--display); color: var(--wood); }
button.bk-chip:hover { border-color: var(--gold); }
.bk-chip.off { color: rgba(90, 70, 40, 0.5); background: rgba(90, 60, 30, 0.07); }
.bk-tiers { display: grid; gap: 6px; margin-top: 8px; }
.bk-tier { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: start; padding: 6px 8px; border-radius: 12px; background: rgba(255, 255, 255, 0.6); border: 1px solid rgba(120, 90, 50, 0.18); }
.bk-tier > img { width: 56px; height: 56px; object-fit: contain; }
.bk-tier b { font: 600 16px var(--display); color: var(--wood); }
.bk-tier .btiles { margin: 4px 0; gap: 4px; }
.bk-tier .bt { grid-template-columns: 20px auto; column-gap: 4px; padding: 2px 8px 2px 4px; } .bk-tier .bt img { width: 20px; height: 20px; } .bk-tier .bt b { font-size: 16px; } .bk-tier .bt small { font-size: 11px; }
.bk-cost { display: block; }
.bk-specs { display: grid; gap: 6px; } .bk-specs > div { display: grid; padding: 6px 10px; border-radius: 10px; background: rgba(216, 169, 59, 0.14); border: 1px solid rgba(216, 169, 59, 0.45); }
.bk-specs b { font: 600 16px var(--display); color: var(--wood); } .bk-specs span { font-size: 15px; font-weight: 600; }
.bk-fx { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: center; margin: 6px 0; padding: 8px 12px; border-radius: 12px; font-size: 16px; font-weight: 700; line-height: 1.3; }
.bk-fx.up { background: rgba(63, 138, 70, 0.14); border: 1px solid rgba(63, 138, 70, 0.45); color: #245a2a; }
.bk-fx.down { background: rgba(192, 57, 43, 0.1); border: 1px solid rgba(192, 57, 43, 0.4); color: #8a2418; }
.bk-opts { display: grid; gap: 5px; margin: 8px 0; }
.bk-opts > div { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 8px; padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.6); border: 1px solid rgba(120, 90, 50, 0.18); }
.bk-opts b { font: 600 16px var(--display); color: var(--wood); } .bk-opts small { grid-column: 2; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.bk-n { grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--wood); color: #fff; font: 700 13px var(--display); }
.bk-detail .hi-abil { display: grid; gap: 6px; }
.bk-keys { margin: 8px 0 0; font-size: 14px; }
.tt-go { display: flex; align-items: center; gap: 6px; margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(240, 210, 150, 0.25); font-size: 13px; font-weight: 800; color: #ffe080; }
@media (max-width: 760px) {
  .ch-tabs { gap: 4px; } .ch-tab { flex: 1 1 0; min-width: 0; justify-content: center; gap: 5px; padding: 6px; } .ch-tab b { font-size: 17px; } .ch-tab img { width: 24px; height: 24px; } .bk-new { font-size: 10px; padding: 2px 5px; }
  .ch-head { grid-template-columns: 1fr; padding: 10px; } .ch-ew { justify-self: start; } .ch-ew b { font-size: 36px; } .ch-ew-ic img { width: 48px; height: 48px; }
  .ch-st { padding: 4px 9px 4px 5px; } .ch-st b { font-size: 16px; }
  .ch-grid { grid-template-columns: 1fr; }
  .ch-item, .ch-ms, .ch-grid.ms .ch-ms { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 8px; } .ch-pic { width: 48px; height: 48px; } .ch-txt > b { font-size: 16px; } .ch-txt > small { font-size: 14px; }
  .ch-sec h4 small { display: none; }
  .bk-chs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .bk-ch { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 5px 3px 9px; gap: 2px; } .bk-ch img { width: 24px; height: 24px; } .bk-chs .bk-ch b { font-size: 12px; max-width: 100%; } .bk-ch small { font-size: 11px; }
  .bk-ch > span:not(.kbd):not(.bk-chbar) { justify-items: center; }
  .bk-body { grid-template-columns: 1fr; height: auto; }
  .bk-grid { max-height: 34vh; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
  .bk-grid[data-ch="events"] { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .bk-ep { width: 50px; height: 50px; } .bk-e > b { font-size: 12px; }
  .bk-detail { overflow: visible; padding: 10px; }
  .bk-pic { width: 120px; height: 120px; } .bk-pic img { max-width: 112px; max-height: 112px; }
  .bk-head > b { font-size: 22px; }
  .bk-keys { display: none; }
}

/* ---------- new enemy routes of the year (a gate opens): violet-red NEW tags on the threat board, the spring summary, the year overview and the map ---------- */
.new-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; font: 800 11px/1.35 var(--body); font-style: normal; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: linear-gradient(#d0305e, #8e1844); box-shadow: 0 0 0 1px rgba(255, 220, 230, 0.6); vertical-align: 1px; white-space: nowrap; animation: newTagPulse 1.6s ease-in-out infinite; }
@keyframes newTagPulse { 50% { box-shadow: 0 0 0 1px rgba(255, 220, 230, 0.6), 0 0 8px 2px rgba(220, 50, 100, 0.55); } }
.new-route { display: flex; align-items: center; gap: 8px; margin: 2px 0 6px; padding: 6px 10px; border-radius: 10px; background: rgba(200, 40, 90, 0.1); border: 1px solid rgba(180, 30, 80, 0.45); font-size: 15px; }
.new-route b { color: #8e1844; }
.new-route .new-tag { margin-left: auto; }
.wave.newr { background: linear-gradient(90deg, rgba(200, 40, 90, 0.13), rgba(200, 40, 90, 0)); border-radius: 8px; }
.wave.newr .gate { color: #8e1844; }
.wave .gate .new-tag { margin: 2px 0 0; display: table; }
.spring-info .nr-bit, .nr-bit { background: rgba(200, 40, 90, 0.12); color: #7a1238; font-weight: 800; }
.yr-iv.nr > b { color: #8e1844; }
.yr-nr { position: absolute; left: -12px; top: -12px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #8e1844; box-shadow: 0 0 0 2px #ffd0dc; }
.yr-nr img { width: 16px; height: 16px; }
/* the threat button in the dock: wave count, a boss or leader medallion (no glyphs), NEW when a gate opens */
.dock-face { position: absolute; left: -12px; top: -10px; width: 30px; height: 30px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff4dc, 0 2px 4px rgba(0, 0, 0, 0.5); }
.dock-face.boss { background: radial-gradient(circle at 40% 35%, #7a1a22, #2a060a); box-shadow: 0 0 0 2px #f0c95a, 0 2px 4px rgba(0, 0, 0, 0.5); }
.dock-face.lead { background: radial-gradient(circle at 40% 35%, #5a4a2a, #2a1b0f); box-shadow: 0 0 0 2px #f0c95a, 0 2px 4px rgba(0, 0, 0, 0.5); }
.dock-btn .dock-face img { width: 34px; height: 34px; margin-top: 4px; }
.dock-new { position: absolute; right: -6px; top: -9px; padding: 1px 5px; border-radius: 6px; font: 800 11px/1.3 var(--body); letter-spacing: 0.05em; text-transform: uppercase; color: #fff; background: linear-gradient(#d0305e, #8e1844); border: 1px solid #ffd0dc; animation: newTagPulse 1.6s ease-in-out infinite; }
@media (max-width: 820px) { .dock-face { width: 24px; height: 24px; left: -9px; top: -8px; } .dock-btn .dock-face img { width: 28px; height: 28px; } .dock-new { font-size: 10px; right: -4px; top: -8px; } }

/* ---------- raid preview: enemies as big faces with their count (region panel and its tooltip) ---------- */
.rfoes { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rfoe { display: grid; grid-template-columns: 46px auto; grid-template-rows: auto auto; column-gap: 6px; align-items: center; padding: 3px 10px 3px 3px; border-radius: 30px 12px 12px 30px; background: rgba(60, 20, 40, 0.08); border: 1px solid rgba(140, 40, 80, 0.3); }
.rfoe img { grid-row: span 2; width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #fff6ea, #e6d2c2 70%, #c9a9a0); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7), 0 1px 3px rgba(60, 20, 20, 0.35); }
.rfoe b { font: 700 24px/1 var(--display); color: #7a1238; font-variant-numeric: lining-nums tabular-nums; }
.rfoe b::before { content: '×'; font-size: 17px; margin-right: 1px; opacity: 0.8; }
.rfoe small { font-size: 12px; font-weight: 800; color: var(--ink-soft); white-space: nowrap; line-height: 1.1; }
.rfoe.boss img { background: radial-gradient(circle at 45% 35%, #7a1a22, #2a060a); box-shadow: 0 0 0 2px #f0c95a; }
.tooltip .rfoes.tt { margin: 2px 0; }
.tooltip .rfoe { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 200, 220, 0.3); }
.tooltip .rfoe img { width: 40px; height: 40px; }
.tooltip .rfoe { grid-template-columns: 40px auto; }
.tooltip .rfoe b { color: #ffc0d0; font-size: 22px; } .tooltip .rfoe small { color: #d8c8a8; }
.wk-change.multi > span { font-size: 17px; } .wk-change.multi > span i { font: 700 20px var(--display); } .wk-change.multi > span b { font: 700 20px var(--display); color: var(--ink); }
.wk-change.multi.short > span b { color: #a8321f; }

/* ---------- event cards: both outcomes of a risk, an owned relic's replacement, blessings ---------- */
.fx-risk { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 6px; vertical-align: middle; }
.fx-ok, .fx-fail { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 8px; white-space: normal; }
.fx-ok { background: rgba(63, 138, 70, 0.14); border: 1px solid rgba(63, 138, 70, 0.45); color: #245a2a; }
.fx-fail { background: rgba(192, 57, 43, 0.1); border: 1px solid rgba(192, 57, 43, 0.4); color: #8a2418; }
.fx-ok b, .fx-fail b { font-family: var(--display); }
.fx-swap { color: #6a4a10; } .fx-lvl { font-style: normal; font-weight: 800; color: #8a6414; }
.choices.bless .choice { border-color: var(--gold); background: linear-gradient(#fffbea, #f8ecc4); }
.ch-space { flex: none; }
.pfx.cost { background: rgba(192, 57, 43, 0.1); border-color: rgba(192, 57, 43, 0.4); color: #8a2418; }
.dcard.pc .pfx + .pfx { margin-top: 4px; }

/* ---------- Endless epochs: the card when one begins, the calendar chip, the report line, the Sagenbuch ---------- */
.ep-card { display: grid; justify-items: center; text-align: center; gap: 4px; }
.ep-pic { width: 128px; height: 128px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #fffaf0, #e4ecf2 60%, #9fb8cc); box-shadow: 0 0 0 4px #fff, 0 0 0 7px rgba(110, 170, 210, 0.6), 0 8px 18px rgba(30, 50, 70, 0.3); animation: epIn 0.5s cubic-bezier(.2, .9, .3, 1.3) both; }
.ep-pic img { width: 96px; height: 96px; }
@keyframes epIn { from { transform: scale(0.85); opacity: 0; } }
.ep-rule { font-size: 18px; max-width: 520px; margin: 2px auto 6px; }
.ep-sides { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 6px 0; }
.ep-s { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 5px; border-radius: 10px; font-weight: 700; font-size: 15px; border: 1px solid; }
.ep-s.up { background: rgba(63, 138, 70, 0.14); border-color: rgba(63, 138, 70, 0.45); color: #245a2a; }
.ep-s.dn { background: rgba(192, 57, 43, 0.1); border-color: rgba(192, 57, 43, 0.4); color: #8a2418; }
.ep-h { margin: 8px 0 2px; display: flex; align-items: center; gap: 6px; }
.ep-foes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 4px 0; }
.ep-foe { display: grid; justify-items: center; gap: 2px; width: 92px; padding: 6px 4px; border-radius: 12px; background: rgba(60, 20, 40, 0.07); border: 1px solid rgba(140, 40, 80, 0.25); }
.ep-foe img { width: 52px; height: 52px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #fff6ea, #d8c4b4); }
.ep-foe.boss { background: rgba(120, 20, 40, 0.1); } .ep-foe.boss img { width: 32px; height: 32px; background: none; margin: 10px 0; }
.ep-foe small { font-size: 12px; font-weight: 800; color: var(--ink-soft); line-height: 1.15; text-align: center; }
.ep-next { justify-content: center; }
.bk-main .ep-sides, .bk-main .ep-foes { justify-content: flex-start; }
.tooltip .ep-sides { justify-content: flex-start; margin: 6px 0 2px; } .tooltip .ep-s.up { background: rgba(110, 190, 100, 0.16); color: #b8f0a0; } .tooltip .ep-s.dn { background: rgba(240, 110, 90, 0.16); color: #ffb8a8; }
.cal-epoch { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #e8f2fa, #8fb0c8); box-shadow: 0 0 0 2px #cfe4f4; cursor: help; flex: none; }
.cal-epoch b { position: absolute; right: -6px; bottom: -4px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; font: 700 11px/16px var(--display); text-align: center; color: #fff; background: #3a6a94; }
.cal-epoch.boss { box-shadow: 0 0 0 2px #f0c95a; } .cal-epoch.boss b { background: #8e1844; }
.rep-epoch { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: center; margin: 8px 0; padding: 8px 12px; border-radius: 12px; background: rgba(110, 170, 210, 0.14); border: 1px solid rgba(70, 120, 160, 0.4); }
.rep-epoch b { font-family: var(--display); font-size: 17px; } .rep-epoch small { display: block; font-size: 15px; font-weight: 700; color: var(--ink-soft); }
.rep-epoch.boss { background: rgba(140, 30, 60, 0.1); border-color: rgba(140, 30, 60, 0.4); }

/* ---------- Storm Night: setup (seed row, rules), round card, build clock, score, end ---------- */
.title-menu .btn.mode[hidden] { display: none; }
.title-menu .btn.mode.storm { background: linear-gradient(#5c7ca8, #34507a); border-color: #9fc0e8; color: #fff; }
.st-seeds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 10px 0 6px; }
.st-seed { position: relative; display: grid; justify-items: center; gap: 2px; padding: 12px 8px 10px; border-radius: 16px; border: 2px solid var(--parch-edge); background: linear-gradient(#fffaf0, #f3e6c8); box-shadow: 0 4px 0 #a8884a; transition: transform 0.15s, border-color 0.15s; }
.st-seed > .kbd { position: absolute; left: 8px; top: 8px; }
.st-seed:hover { transform: translateY(-3px); }
.st-seed.sel { border-color: var(--red); box-shadow: 0 4px 0 #a8884a, 0 0 0 4px rgba(240, 201, 90, 0.75); }
.st-seed b { font: 600 19px var(--display); color: var(--wood); }
.st-seed small { font-size: 14px; font-weight: 700; color: var(--ink-soft); text-align: center; }
.st-best { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 14px; font-weight: 700; color: #6a4a10; }
.st-best b { font: 700 17px var(--display); } .st-best i { font-style: normal; color: var(--ink-soft); font-weight: 600; }
.st-rules { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.st-t .v b { font-size: 21px; color: var(--ink); display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.st-no { margin: 2px 0 8px; }
.st-score { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 12px; border-radius: 12px; background: rgba(216, 169, 59, 0.14); border: 1px solid rgba(216, 169, 59, 0.5); font-size: 15px; font-weight: 700; }
.st-score > b { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); color: #6a4a10; }
.st-score span b { font-family: var(--display); color: #245a2a; }
.st-round { display: grid; gap: 6px; }
.st-round h4 { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; }
.st-pips { display: flex; gap: 6px; }
.st-pips i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 14px var(--display); font-style: normal; background: #e6dcc6; color: var(--ink-soft); border: 2px solid #fff; }
.st-pips i.done { background: #6a9a5a; color: #fff; } .st-pips i.now { background: #34507a; color: #fff; transform: scale(1.15); box-shadow: 0 0 0 3px rgba(159, 192, 232, 0.8); }
.st-pips i.boss { border-color: #c0392b; }
.st-grant { display: flex; flex-wrap: wrap; gap: 6px; }
.season-badge.build { background: linear-gradient(#5c7ca8, #34507a); }
.st-clock { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; cursor: help;
  background: conic-gradient(#f0c95a calc(var(--p, 1) * 360deg), rgba(255, 255, 255, 0.15) 0); }
.st-clock::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #2a1b0f; }
.st-clock b { position: relative; font: 700 18px var(--display); color: #fff4dc; font-variant-numeric: tabular-nums; }
.st-clock.low { background: conic-gradient(#ff6a50 calc(var(--p, 1) * 360deg), rgba(255, 255, 255, 0.15) 0); }
.st-clock.low b { color: #ffb8a8; }
.st-clock.held { opacity: 0.6; }
.st-clock.tick { animation: stTick 0.3s ease-out; }
@keyframes stTick { 40% { transform: scale(1.15); } }
.st-pts { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 6px; border-radius: 10px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(240, 201, 90, 0.4); cursor: help; }
.st-pts b { font: 700 18px var(--display); color: #f0c95a; font-variant-numeric: tabular-nums; }
.btn.big.storm { background: linear-gradient(#5c7ca8, #34507a); }
.st-final { display: grid; justify-items: center; margin: 6px 0; }
.st-final small { font-size: 14px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.st-final b { font: 700 54px/1 var(--display); color: var(--wood); font-variant-numeric: tabular-nums; }
.st-final em { font-style: normal; font-weight: 800; color: #fff; background: linear-gradient(#e0b03a, #b8862a); padding: 2px 12px; border-radius: 10px; animation: newTagPulse 1.6s ease-in-out infinite; }
.st-final span { font-weight: 700; color: var(--ink-soft); }
.st-parts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.st-parts span { display: grid; justify-items: center; padding: 6px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.55); border: 1px solid rgba(120, 90, 50, 0.25); }
.st-parts small { font-size: 12px; font-weight: 800; color: var(--ink-soft); } .st-parts b { font: 700 20px var(--display); color: #245a2a; }
@media (max-width: 820px) {
  .st-seeds { gap: 6px; } .st-seed { padding: 10px 4px 8px; } .st-seed b { font-size: 16px; } .st-seed small { font-size: 12px; } .st-seed > .kbd { left: 4px; top: 4px; }
  .st-rules { grid-template-columns: 1fr 1fr; }
  .st-clock { width: 36px; height: 36px; } .st-clock b { font-size: 15px; } .st-pts b { font-size: 15px; }
  .cal-epoch { width: 30px; height: 30px; } .cal-epoch img { width: 22px; height: 22px; }
  .st-final b { font-size: 42px; }
}
.hint-line.st-no { display: flex; align-items: center; gap: 8px; }
.st-round .hint-line, .ep-next { display: flex; align-items: center; gap: 8px; }
.st-pts-m { display: none; } .st-pts-m b { color: #f0c95a; font-family: var(--display); }
@media (max-width: 560px) { .st-pts { display: none; } .st-pts-m { display: inline; } }
.st-rules .alt-t:last-child { grid-column: auto; }
.st-me { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 0; font-weight: 700; color: var(--ink-soft); } .st-me span { display: inline-flex; align-items: center; gap: 5px; } .st-me b { font-family: var(--display); color: var(--wood); }

/* ---------- Summit Crosses: setup picker (like the altitude picker), calendar chip, end screen ---------- */
.sx-h { display: flex; align-items: center; gap: 8px; } .sx-h svg { color: #8e1844; } .sx-h .alt-keys { margin-left: auto; }
.sx-pick { margin: 6px 0 12px; }
.sx-row { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; padding: 8px 6px 6px; border-radius: 14px; background: linear-gradient(#dfe8ef, #f4f6f8); border: 2px solid rgba(160, 120, 60, 0.3); }
.sx-stop { position: relative; display: grid; justify-items: center; gap: 1px; padding: 4px 0 3px; border-radius: 10px; border: 2px solid transparent; background: none; transition: transform 0.15s; min-width: 0; }
.sx-stop:hover { transform: translateY(-2px); }
.sx-cross { position: relative; width: 30px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: #8e9aa6; font: 700 18px var(--display); }
.sx-cross svg { width: 22px; height: 28px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3)); }
.sx-stop.in .sx-cross { color: #b8862a; } .sx-stop.won .sx-cross { color: #3f8a46; } .sx-stop.in.won .sx-cross { color: #b8862a; }
.sx-stop.sel { border-color: var(--red); background: rgba(255, 255, 255, 0.85); box-shadow: 0 0 0 3px rgba(240, 201, 90, 0.7); }
.sx-stop.sel .sx-cross { color: #c0392b; }
.sx-stop b { font: 700 15px var(--display); color: var(--wood); } .sx-stop small { font-size: 11px; font-weight: 800; color: var(--ink-soft); }
.sx-stop.locked { opacity: 0.55; } .sx-stop.locked .sx-cross svg:first-child { opacity: 0.35; }
.sx-lock { position: absolute; inset: 0; display: grid; place-items: center; color: #5a5048; } .sx-lock svg { width: 14px; height: 14px; }
.sx-stop.nope { animation: heroNope 0.26s ease-out; }
.sx-info { margin-top: 8px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 250, 235, 0.75); border: 2px solid rgba(160, 120, 60, 0.3); min-height: 74px; }
.sx-pick.preview .sx-info { border-style: dashed; border-color: var(--gold); }
.sx-info.pop { animation: heroInfoIn 0.18s ease-out; }
.sx-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.sx-head > b { font: 600 20px var(--display); color: var(--wood); }
.sx-n { display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px 2px 4px; border-radius: 8px; color: #fff; background: linear-gradient(#a8253e, #6e1428); font: 700 17px var(--display); } .sx-n svg { width: 14px; height: 18px; }
.sx-mul { font: 700 15px var(--display); color: #6a4a10; background: #fff6d6; border: 1px solid #e0c070; border-radius: 8px; padding: 1px 8px; }
.sx-best { display: inline-flex; align-items: center; gap: 3px; font-size: 14px; font-weight: 800; color: #245a2a; }
.sx-none { margin: 6px 0 0; font-size: 15px; color: var(--ink-soft); }
.sx-rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; margin-top: 8px; }
.sx-rule { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; align-items: center; padding: 6px 10px 6px 6px; border-radius: 10px; background: rgba(255, 255, 255, 0.6); border: 1px solid rgba(120, 90, 50, 0.2); }
.sx-rule b { display: block; font: 600 15px var(--display); color: var(--wood); } .sx-rule small { font-size: 13px; font-weight: 700; color: var(--ink-soft); line-height: 1.25; }
.sx-rule.new { background: rgba(200, 40, 90, 0.08); border-color: rgba(180, 30, 80, 0.4); } .sx-rule.new .new-tag { position: absolute; right: 6px; top: -8px; margin: 0; }
.cal-sx { position: relative; display: grid; place-items: center; width: 32px; height: 36px; border-radius: 8px; color: #fff; background: linear-gradient(#a8253e, #6e1428); box-shadow: 0 0 0 2px #ffd0dc; cursor: help; flex: none; }
.cal-sx svg { width: 16px; height: 20px; } .cal-sx b { position: absolute; right: -6px; bottom: -5px; min-width: 16px; height: 16px; border-radius: 8px; font: 700 11px/16px var(--display); text-align: center; background: #2a1b0f; color: #ffd0dc; }
.sx-end { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; }
.sx-end > b { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); color: #8e1844; } .sx-end > b svg { width: 14px; height: 18px; }
.sx-end span { display: flex; gap: 4px; } .sx-end i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(140, 30, 60, 0.1); }
.sx-opened { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; align-items: center; margin: 10px 0; padding: 12px 14px; border-radius: 14px; background: linear-gradient(#fff6e0, #f6e2b0); border: 2px solid var(--gold); animation: sxOpen 0.6s cubic-bezier(.2, .9, .3, 1.3) 0.4s both; }
.sx-opened > div b { display: block; font: 700 20px var(--display); color: #6a4a10; } .sx-opened small { font-size: 15px; font-weight: 700; color: var(--ink-soft); }
.sx-big { position: relative; width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: radial-gradient(circle at 50% 40%, #d8405e, #6e1428); box-shadow: 0 0 0 4px #fff, 0 0 18px 6px rgba(240, 201, 90, 0.7); animation: sxGlow 2s ease-in-out 1s infinite; }
.sx-big svg { width: 32px; height: 40px; } .sx-big b { position: absolute; right: -4px; bottom: -2px; min-width: 26px; height: 26px; border-radius: 13px; background: var(--gold); color: #3a2a10; font: 700 16px/26px var(--display); text-align: center; }
@keyframes sxOpen { from { transform: scale(0.8); opacity: 0; } }
@keyframes sxGlow { 50% { box-shadow: 0 0 0 4px #fff, 0 0 28px 10px rgba(240, 201, 90, 0.9); } }

/* ---------- Avalanche Horde and Double Strike: year overview, threat board, warning banner ---------- */
.yr-horde { position: absolute; left: -12px; bottom: -12px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #2a3a5a; box-shadow: 0 0 0 2px #ffd0dc; }
.yr-horde img { width: 16px; height: 16px; }
.yr-dbl { position: absolute; right: -14px; bottom: -10px; padding: 0 4px; border-radius: 6px; font: 700 11px/16px var(--display); font-style: normal; color: #fff; background: #8e1844; box-shadow: 0 0 0 2px #fff; }
.yr-iv.dbl > b { color: #8e1844; } .yr-iv.horde > b { color: #2a3a5a; font-size: 18px; }
.yr-hf { display: inline-flex; gap: 2px; } .yr-hf img { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #fff6ea, #d8c4b4); }
.yr-hordeline { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-top: 8px; padding: 8px 12px; border-radius: 12px; background: linear-gradient(90deg, rgba(42, 58, 90, 0.14), rgba(140, 30, 60, 0.1)); border: 1px solid rgba(42, 58, 90, 0.35); }
.yr-hordeline b { font: 600 17px var(--display); color: #2a3a5a; display: block; } .yr-hordeline small { font-size: 14px; font-weight: 700; color: var(--ink-soft); }
@media (max-width: 640px) { .yr-hordeline { grid-template-columns: 34px minmax(0, 1fr); } .yr-hordeline .yr-hf { grid-column: 2; } }
.wave-grp { margin: 4px 0; padding: 4px 6px 2px; border-radius: 10px; border: 1px solid rgba(140, 30, 60, 0.3); background: rgba(140, 30, 60, 0.05); }
.wave-grp.horde { border-color: rgba(42, 58, 90, 0.5); background: linear-gradient(90deg, rgba(42, 58, 90, 0.12), rgba(140, 30, 60, 0.08)); }
.wg-h { display: flex; align-items: center; gap: 6px; font-size: 14px; } .wg-h b { font-family: var(--display); color: #8e1844; } .wave-grp.horde .wg-h b { color: #2a3a5a; } .wg-h small { color: var(--ink-soft); font-weight: 700; }
.wg-2 { padding: 0 5px; border-radius: 6px; background: #8e1844; color: #fff !important; font-size: 12px; }
.wg-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 8px; }
.wg-row .wave { border-top: none; flex-wrap: wrap; } .wg-row .wave .gate { width: auto; }
.horde-banner { position: fixed; left: 50%; top: calc(var(--top-h, 66px) + 12px); z-index: 30; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: min(620px, calc(100vw - 24px)); padding: 12px 18px 16px 12px; border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, #2a3a5a, #5a1430); border: 2px solid #ffb0c4; box-shadow: 0 10px 30px rgba(20, 0, 10, 0.55), 0 0 0 4px rgba(255, 80, 130, 0.25); transform: translate(-50%, -20px); opacity: 0; transition: transform 0.3s, opacity 0.3s; pointer-events: none; overflow: hidden; }
.horde-banner.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; animation: hbPulse 1.2s ease-in-out infinite; }
@keyframes hbPulse { 50% { box-shadow: 0 10px 30px rgba(20, 0, 10, 0.55), 0 0 0 8px rgba(255, 80, 130, 0.35); } }
.hb-ic { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #e8f2fa, #6a8aa8); }
.hb-main small { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #ffb0c4; }
.hb-main > b { display: block; font: 700 26px/1.05 var(--display); letter-spacing: 0.02em; }
.hb-sub { display: block; font-size: 15px; font-weight: 700; color: #e8d8e0; }
.hb-gates { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.hb-gate { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 4px; border-radius: 8px; font-size: 13px; font-weight: 800; color: #fff; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 176, 196, 0.6); }
.hb-gate:hover { background: rgba(255, 255, 255, 0.25); }
.hb-t { display: grid; justify-items: center; } .hb-t b { font: 700 40px/1 var(--display); font-variant-numeric: tabular-nums; } .hb-t small { font-size: 13px; font-weight: 800; color: #ffb0c4; }
.hb-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255, 255, 255, 0.15); } .hb-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff5080, #ffd0dc); transition: width 0.1s linear; }
.horde-banner.now { background: linear-gradient(135deg, #5a1430, #8e1844); }
@media (max-width: 640px) { .horde-banner { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 8px; padding: 10px 12px 14px 8px; } .hb-ic { width: 44px; height: 44px; } .hb-ic img { width: 36px; height: 36px; } .hb-main > b { font-size: 20px; } .hb-t b { font-size: 30px; } }

/* ---------- Wild Raids: the raid preview shows only a range ---------- */
.rfoe.vague img { width: 46px; height: 46px; padding: 8px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #e8dcdc, #a88a90); filter: grayscale(0.4); }
.rfoe.vague b::before { content: ''; }

/* ---------- Storm Night: workers without a housing cap ---------- */
.chip.folk.st .stack small { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.8; }
.chip.folk.st > small { margin-left: 4px; font-size: 12px; font-weight: 800; }
.wg-row { grid-template-columns: 1fr 1fr; }
.wg-row .wave { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; gap: 0 6px; padding: 4px 0; }
.wg-row .wave .foes { grid-column: 1 / -1; flex-wrap: wrap; }
.wg-row .wave .gate { font-size: 14px; }
.wg-row .wave + .wave { border-left: 1px dashed rgba(140, 30, 60, 0.3); padding-left: 6px; }
.wg-row .wave:nth-child(odd) { border-left: none; padding-left: 0; }
.wg-row .wave .lead-card, .wg-row .wave > :last-child:not(.foes):not(.gate):not(.num) { grid-column: 1 / -1; }
body:has(.horde-banner.show) .toasts { top: calc(var(--top-h, 66px) + var(--hb-h, 120px) + 24px); }   /* toasts wait below the horde warning */
.sx-tl { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: start; }
@media (max-width: 640px) { .sx-row { gap: 1px; padding: 6px 2px 4px; } .sx-stop small { display: none; } .sx-stop b { font-size: 12px; } .sx-cross { width: 24px; height: 28px; } .sx-cross svg { width: 17px; height: 22px; } .sx-rules { grid-template-columns: 1fr; } .sx-h .alt-keys { display: none; } }

/* ---------- German (html lang="de", js/i18n.js): about 30 % longer texts ----------
   Long compound words break with a hyphen instead of running out of their box. English is not touched. */
html:lang(de) body { hyphens: auto; -webkit-hyphens: auto; }
html:lang(de) .bk-ch b { white-space: normal; line-height: 1.05; font-size: 14px; }
@media (min-width: 641px) { html:lang(de) .bk-chs { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }   /* room for "Heraus-forderungen" */
html:lang(de) .clan-c b { white-space: normal; text-overflow: clip; line-height: 1.05; text-align: center; }   /* "Haus des Steinbocks" on two lines */
html:lang(de) .ab-tiles .bt { padding: 2px 6px 2px 3px; column-gap: 4px; } html:lang(de) .ab-tiles .bt small { font-size: 10.5px; }   /* "Abklingzeit" keeps six tiles in one row */
html:lang(de) .mo-mk.ghost b::before { content: 'danach '; }   /* the word comes from CSS, so it is translated here */

/* touch devices: no keycaps, no key hints (js: body.touch) */
body.touch .kbd, body.touch .gk i, body.touch .gk-c, body.touch .alt-keys { display: none; }
.krow .gest { font-weight: 800; color: var(--wood); }
/* "Ready for winter?": soft defence hint, amber, never blocks */
.upkeep div.soft { grid-template-columns: 34px 1fr auto; background: rgba(216, 169, 59, 0.16); border-color: rgba(216, 169, 59, 0.6); }
.upkeep div.soft small { display: block; font-size: 14px; color: var(--ink-soft); font-weight: 500; }
.upkeep .amber { color: #8a5d00; }
/* phones held sideways: ask to turn the phone (the map would be a thin strip); "Play anyway" dismisses */
.rotate { display: none; }
@media (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
  body:not(.rotate-off) .rotate { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; text-align: center;
    background: radial-gradient(ellipse at center, #243646, #0f1822); color: #f3e9d2; }
  .rotate .rot-ic { font-size: 44px; line-height: 1; animation: rotHint 2.4s ease-in-out infinite; }
  .rotate b { font: 700 24px var(--display); } .rotate span { font-size: 17px; max-width: 28em; }
  .rotate button { margin-top: 6px; background: none; border: 0; color: #f0c95a; text-decoration: underline; font: 700 16px var(--body); padding: 10px 14px; min-height: 44px; }
}
@keyframes rotHint { 0%, 30% { transform: rotate(-90deg); } 60%, 100% { transform: rotate(0); } }
@media (max-width: 560px) {   /* phones: label and value on one line, the slider full width below (a big touch target) */
  .vol-row { flex-wrap: wrap; row-gap: 0; padding-top: 6px; }
  .vol-row > span { flex: 1 1 auto; }
  .vol-row output { order: 2; }
  input.vol { order: 3; flex: 0 0 100%; height: 40px; }
}

/* ======================================================================================================================
   ART PASS E1 (vertical slice): poster style for the map HUD, the title and the volume sliders.
   An override layer on purpose: the older rules above stay for the screens that are not converted yet (modals, chronicle: E4/E5).
   Rules (docs/art/SLICE-1-NOTES.md): palette from js/style.js; UI outline 1 px night blue 70 %; hard offset shadow 0/3 px without blur;
   radius 6 (buttons, chips) and 8 (panels, cards); Archivo for UI and numbers; gold only for the active state.
   ====================================================================================================================== */
:root {
  --ui: "Archivo", "Segoe UI", system-ui, sans-serif;
  --paper: #f6f0e0; --ink-ui: #16222c; --uiline: rgba(22, 34, 44, 0.7); --hard: 0 3px 0 rgba(22, 34, 44, 0.4);
  --grass-ui: #4a7a42; --sky-ui: #2e6f9e; --warn: #a8284f;
}
/* buttons: flat alpine red, outline, hard shadow (HUD, bar and title only: modals keep the old look until E4) */
#game .btn, .title-screen .btn { font-family: var(--ui); font-weight: 700; letter-spacing: 0.01em; border: 1px solid var(--ink-ui); border-radius: 6px; background: var(--red); color: var(--paper);
  text-shadow: none; box-shadow: 0 3px 0 rgba(22, 34, 44, 0.55); }
#game .btn:hover:not([disabled]), .title-screen .btn:hover:not([disabled]) { filter: brightness(1.08); transform: translateY(-1px); }
#game .btn:active:not([disabled]), .title-screen .btn:active:not([disabled]) { transform: translateY(2px); box-shadow: 0 1px 0 rgba(22, 34, 44, 0.55); }
#game .btn.gold, .title-screen .btn.gold { background: var(--gold); color: var(--ink-ui); border-color: var(--ink-ui); box-shadow: 0 3px 0 rgba(22, 34, 44, 0.55); }
#game .btn.wood, .title-screen .btn.wood { background: var(--wood); color: var(--paper); }
#game .btn.ghost, .title-screen .btn.ghost { background: rgba(246, 240, 224, 0.1); color: var(--paper); border: 1px solid rgba(246, 240, 224, 0.7); box-shadow: none; }
#game .btn.big, .title-screen .btn.big { font-family: var(--ui); font-weight: 800; letter-spacing: 0.02em; }
#game .kbd, .title-screen .kbd { border-radius: 4px; font-family: var(--ui); font-weight: 700; background: var(--paper); color: var(--ink-ui); border: 1px solid var(--uiline); box-shadow: 0 2px 0 var(--uiline); }

/* top bar */
#top { font-family: var(--ui); font-stretch: 86%; background: var(--ink-ui); border-bottom: 2px solid var(--gold); box-shadow: 0 3px 0 rgba(22, 34, 44, 0.4); }
.brand b { font-family: var(--ui); font-weight: 800; font-size: 16px; letter-spacing: 0.06em; color: var(--paper); text-transform: uppercase; }
.brand small { font-family: var(--ui); font-weight: 500; font-size: 13px; color: #8fb4cf; }
.chip { border-radius: 6px; background: rgba(246, 240, 224, 0.07); border: 1px solid rgba(246, 240, 224, 0.22); }
.chip:hover { background: rgba(246, 240, 224, 0.15); }
.chip b { font-family: var(--ui); font-weight: 700; font-size: 16px; color: var(--paper); }
.chip b i { font-size: 13px; }
#top.f-tight .chip b { font-size: 15px; }
.chip b i { font-weight: 500; color: #8fb4cf; }
.chip small { font-family: var(--ui); font-weight: 700; font-size: 12px; }
.chip small.up { color: #a9c768; } .chip small.down { color: #f08a78; }
.chip.warn { border-color: #f08a78; background: rgba(143, 42, 32, 0.45); }
.calendar .yr { font-family: var(--ui); font-weight: 600; color: #8fb4cf; }
.season-badge { font-family: var(--ui); font-weight: 800; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 12px; border-radius: 6px; text-shadow: none; border: 1px solid rgba(246, 240, 224, 0.45); }
.season-badge.spring { background: #4a7a42; color: var(--paper); } .season-badge.summer { background: var(--gold); color: var(--ink-ui); }
.season-badge.autumn { background: #b5651d; color: var(--paper); } .season-badge.winter { background: #2e6f9e; color: var(--paper); }
.season-badge.raid { background: var(--warn); color: var(--paper); }
.pips i { border-radius: 2px; border-color: rgba(246, 240, 224, 0.45); }
.gmeter { border-radius: 2px; background: rgba(246, 240, 224, 0.16); }
.gmeter i { background: var(--red); } .gmeter.morale i { background: var(--gold); }
.icon-btn { border-radius: 6px; border: 1px solid rgba(246, 240, 224, 0.35); background: rgba(246, 240, 224, 0.07); color: var(--paper); }
.icon-btn:hover { background: rgba(246, 240, 224, 0.16); }
#mo-fx { font-family: var(--ui); border-radius: 4px; }

/* dock, minimap */
.dock-btn { border-radius: 8px; border: 1px solid rgba(246, 240, 224, 0.4); background: var(--ink-ui); box-shadow: var(--hard); }
.dock-btn.on { background: var(--paper); border: 2px solid var(--gold); }
.dock-btn .badge { font-family: var(--ui); border-radius: 6px; background: var(--red); border: 1px solid var(--paper); }
.minimap { border-radius: 8px; background: var(--ink-ui); border: 1px solid rgba(246, 240, 224, 0.4); box-shadow: var(--hard); }
.minimap canvas { border-radius: 3px; }
.mini-btn { font-family: var(--ui); font-weight: 700; border-radius: 4px; border: 1px solid rgba(246, 240, 224, 0.35); color: var(--paper); }
.mini-btn.on { background: rgba(216, 169, 59, 0.3); border-color: var(--gold); }

/* build bar */
.bar { background: linear-gradient(rgba(22, 34, 44, 0), rgba(22, 34, 44, 0.92) 26%, var(--ink-ui)); }
.tab { font-family: var(--ui); font-stretch: 90%; font-weight: 700; border-radius: 6px; border: 1px solid rgba(246, 240, 224, 0.35); background: rgba(246, 240, 224, 0.07); color: var(--paper); }
.tab.on { background: var(--paper); color: var(--ink-ui); border: 2px solid var(--gold); box-shadow: none; }
.bcard { border-radius: 8px; border: 1px solid var(--uiline); background: var(--paper); box-shadow: 0 3px 0 rgba(22, 34, 44, 0.5); }
.bcard:hover { transform: translateY(-3px); }
.bcard.sel { border-color: var(--uiline); outline: 2px solid var(--gold); box-shadow: 0 3px 0 rgba(22, 34, 44, 0.5); transform: translateY(-4px); }
.bcard .nm { font-family: var(--ui); font-stretch: 92%; font-weight: 700; color: var(--ink-ui); }
.bcard .cost, .bcard .wk { font-family: var(--ui); font-weight: 700; }
.bcard .cost.free { font-family: var(--ui); border-radius: 4px; background: #dfe9c9; color: var(--grass-ui); }
.bcard .must-tag { font-family: var(--ui); border-radius: 4px; background: var(--gold); color: var(--ink-ui); box-shadow: 0 2px 0 rgba(22, 34, 44, 0.45); }
.bcard.must { border-color: var(--uiline); outline: 2px solid var(--gold); box-shadow: 0 3px 0 rgba(22, 34, 44, 0.5); animation: none; }
.endbox .hint { font-family: var(--ui); }
.cost { font-family: var(--ui); }

/* winter bar (kept calm: same ink fill, no gradients) */
.winterbar { font-family: var(--ui); border-radius: 8px; background: var(--ink-ui); border: 1px solid rgba(143, 180, 207, 0.7); box-shadow: var(--hard); }
.power { border-radius: 8px; background: #20364a; }
.speed button { font-family: var(--ui); border-radius: 6px; }

/* title: wordmark in Archivo, flat plates, a scrim for legibility */
.title-screen::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: linear-gradient(rgba(22, 34, 44, 0.32), rgba(22, 34, 44, 0) 28%, rgba(22, 34, 44, 0) 52%, rgba(22, 34, 44, 0.5)); }
.title-inner { z-index: 1; }
.logo .pre { font-family: var(--ui); font-weight: 600; font-size: 13px; letter-spacing: 0.32em; color: var(--paper); text-shadow: 0 2px 0 rgba(22, 34, 44, 0.8); }
.logo h1 { font-family: var(--ui); font-weight: 800; font-size: clamp(44px, 10.5vw, 120px); letter-spacing: 0.04em; line-height: 0.95; text-transform: uppercase; color: var(--paper);
  text-shadow: 0 4px 0 rgba(22, 34, 44, 0.9), 0 8px 0 rgba(22, 34, 44, 0.28); }
.logo .sub2 { font-family: var(--ui); font-weight: 800; font-size: clamp(16px, 3.4vw, 38px); letter-spacing: 0.26em; text-indent: 0.26em; text-transform: uppercase; color: #e8b23a; text-shadow: 0 3px 0 rgba(22, 34, 44, 0.9); }
.logo .sub2::before, .logo .sub2::after { height: 3px; background: linear-gradient(90deg, rgba(232, 178, 58, 0), #e8b23a); box-shadow: 0 2px 0 rgba(22, 34, 44, 0.8); }
.logo .sub2::after { background: linear-gradient(90deg, #e8b23a, rgba(232, 178, 58, 0)); }
.logo .sub { font-family: "Alegreya Sans", Georgia, serif; font-style: italic; font-weight: 400; font-size: clamp(18px, 2.6vw, 26px); letter-spacing: 0.02em; color: var(--paper); text-shadow: 0 2px 0 rgba(22, 34, 44, 0.85); }
.logo .emblem { filter: drop-shadow(0 4px 0 rgba(22, 34, 44, 0.6)); }
.title-meta { font-family: var(--ui); font-weight: 600; font-size: 15px; text-shadow: 0 2px 0 rgba(22, 34, 44, 0.8); }
.title-menu .btn { min-width: 0; }
.title-lang, .title-sound { font-family: var(--ui); font-weight: 700; border-radius: 6px; }

/* volume sliders (menu): flat track, square-ish thumb in alpine red */
.vol-box { border-radius: 8px; background: rgba(22, 34, 44, 0.07); border: 1px solid rgba(22, 34, 44, 0.25); }
.vol-row { font-family: var(--ui); font-weight: 700; font-size: 16px; color: var(--ink-ui); }
input.vol { accent-color: var(--red); }
input.vol::-webkit-slider-runnable-track { height: 8px; border-radius: 2px; background: rgba(22, 34, 44, 0.3); }
input.vol::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -4px; border-radius: 6px; background: var(--red); border: 2px solid var(--ink-ui); box-shadow: 0 2px 0 rgba(22, 34, 44, 0.5); }
input.vol::-moz-range-track { height: 8px; border-radius: 2px; background: rgba(22, 34, 44, 0.3); }
input.vol::-moz-range-thumb { width: 22px; height: 22px; border-radius: 6px; background: var(--red); border: 2px solid var(--ink-ui); }
.hero-chip { border-radius: 8px; background: rgba(246, 240, 224, 0.07); border: 1px solid rgba(246, 240, 224, 0.3); font-family: var(--ui); }
.hero-chip:hover, .hero-chip.on { background: rgba(246, 240, 224, 0.16); }
.hcp-nm { font-family: var(--ui); font-weight: 700; color: var(--paper); }
.hcp-xp, .hcp-hp { border-radius: 2px; background: rgba(246, 240, 224, 0.16); }
.hcp-xp i { background: var(--gold); }
.hcp-lv { font-family: var(--ui); border-radius: 4px; }
/* title layout: the menu keeps its narrow column (Archivo is wider than the old face), everything fits 1280 x 720 */
.title-inner { gap: 14px; padding: 14px 20px; }
.logo h1 { font-size: clamp(44px, 8.6vw, 98px); }
.logo .emblem { width: clamp(52px, 6vw, 80px); }
.title-menu { gap: 8px; width: min(380px, 92vw); min-width: 0; }
.title-menu .btn.mode { min-height: 52px; padding: 6px 14px; }
.title-menu .btn.mode b { font-family: var(--ui); font-weight: 800; font-size: 17px; }
.title-menu .btn.mode.cont b { font-size: 19px; }
.title-menu .btn.mode small { font-family: var(--ui); font-weight: 500; font-size: 13px; opacity: 0.9; }
.title-menu .btn.mode.storm, .btn.big.storm { background: var(--sky-ui); color: var(--paper); border-color: var(--ink-ui); }
.title-sub { gap: 8px; }
.title-screen .btn.small, .title-sub .btn { min-height: 44px; }
@media (max-height: 760px) { .logo .pre { display: none; } }
.title-menu { grid-template-columns: minmax(0, 1fr); }
.title-menu > *, .title-sub > * { min-width: 0; }
.title-menu .btn.mode .mt { min-width: 0; }
.title-menu .btn.mode small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title-sub { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.title-sub .btn { padding: 6px 8px; font-size: 15px; white-space: normal; text-align: center; line-height: 1.15; }
.endbox .hint.grow { font-family: var(--ui); font-weight: 700; font-stretch: 90%; }
.endbox .hint.grow.up { color: #a9c768; } .endbox .hint.grow.down { color: #f08a78; }
@media (max-width: 820px) { .endbox .hint.grow { font-size: 12px; font-stretch: 75%; white-space: nowrap; margin-right: 2px; } .endbox { gap: 4px; } .bar { padding-right: 6px; } }

/* ---------- Saga Calendar (prototype: year rules) ---------- */
.cal-strip { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; margin: 6px 0 4px; padding: 6px 8px; border-radius: 12px; background: rgba(255, 250, 235, 0.75); border: 2px solid rgba(160, 120, 60, 0.3); }
.cs-h { display: flex; align-items: center; gap: 6px; flex: 1 1 100%; font: 700 17px var(--display); }
.cs-h small { font: 600 14px var(--body, inherit); color: var(--ink-soft); }
.cs-y { display: flex; align-items: center; gap: 6px; min-height: 52px; flex: 1 1 110px; max-width: 170px; padding: 4px 8px; border-radius: 10px; border: 2px solid rgba(160, 120, 60, 0.35); background: #fffaf0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cs-y i { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #2a3a5a; color: #fff; font: 700 14px var(--display); font-style: normal; }
.cs-y span { font: 700 14px/1.15 var(--display); min-width: 0; }
.cs-y.now { border-color: var(--red); } .cs-y.fin { background: #fff0e0; } .cs-y.none, .cs-y.hid { opacity: 0.7; } .cs-y.sel { box-shadow: 0 0 0 3px #f0c95a; }
.cs-y:hover { transform: translateY(-1px); }
.yr-rl { flex: 1 1 100%; align-items: flex-start; font-weight: 600; }
.yr-rl > span { display: block; line-height: 1.25; } .yr-rl i { font-style: normal; font-weight: 700; margin-left: 6px; }
.yr-q { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #8fa0b5; color: #fff; font: 700 16px var(--display); }
.cal-yr { display: inline-flex; align-items: center; gap: 6px; max-width: 190px; padding: 3px 10px 3px 6px; border-radius: 18px; background: radial-gradient(circle at 30% 30%, #fff4d6, #e8c878); box-shadow: 0 0 0 2px #f6dc9a; cursor: help; flex: none; }
.cal-yr b { font: 700 14px/1.1 var(--display); color: #4a3418; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-yr.fin { background: radial-gradient(circle at 30% 30%, #ffe3d6, #e89a78); box-shadow: 0 0 0 2px #f6b89a; }
.fog-q { font: 700 16px var(--display); color: #6a7a90; letter-spacing: 2px; }
@media (max-width: 820px) { .cal-yr { max-width: 40px; padding: 3px; justify-content: center; } .cal-yr b { display: none; } .cs-y { flex: 1 1 90px; min-height: 46px; } .cs-y span { font-size: 12px; } .cs-h small { display: none; } }

/* ---- Art pass E2-b: review points (docs/art/slice-1-review.md) ---- */
.season-badge.spring { background: #3f6b38; } .season-badge.autumn { background: #9a5516; }   /* paper text now >= 4.5:1 */
.pips i.boss { border-radius: 1px; rotate: 45deg; border-color: var(--gold); border-width: 2px; }   /* boss years 4 and 7: a diamond, not only a colour */
.pips i.now { outline: 2px solid var(--gold); outline-offset: 1px; }                                 /* the current year: outline, not only fill */
.tab { height: 44px; }
@media (max-width: 820px) {
  .pips i { width: 12px; height: 12px; } .pips { gap: 5px; }
  .chip { cursor: default; }
}
@media (max-width: 820px) and (pointer: coarse) {
  /* Reserve the space in the HUD; expanding adjacent buttons with pseudo-elements overlaps their targets. */
  #top .icon-btn { width: 44px; height: 44px; }
  .calendar > div { min-width: 0; }
  .pips { flex-wrap: wrap; gap: 3px; }
  .pips i { width: 10px; height: 10px; }
  #top .hero-chip, #mo-gauge, .title-lang, .title-sound, .lang-pick button, .vol { min-width: 44px; min-height: 44px; }
}
