:root {
  --bg: #07080c;
  --panel: #10121a;
  --panel2: #161925;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f1ede4;
  --muted: #9a958b;
  --gold: #f5c542;
  --og: #f5a524;
  --immortal: #63d471;
  --mecha: #3ec9ff;
  --neutral: #6b6a73;
  --danger: #ff5a4f;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.small { font-size: 12px; }
button { font: inherit; color: inherit; cursor: pointer; }
.btn {
  background: linear-gradient(180deg, var(--gold), #ff9f1c);
  color: #1a1306; font-weight: 800; border: 0; border-radius: 999px; padding: 14px 28px; font-size: 17px;
  box-shadow: 0 10px 30px rgba(245, 197, 66, 0.25);
}
.btn-small { padding: 10px 16px; font-size: 14px; }

/* intro */
.intro {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; text-align: center; padding: 24px;
  background: radial-gradient(60% 50% at 50% 45%, rgba(245, 197, 66, 0.16), transparent 70%), rgba(7, 8, 12, 0.94);
  backdrop-filter: blur(6px); transition: opacity 0.6s ease, visibility 0.6s;
}
.intro.gone { opacity: 0; visibility: hidden; }
.intro-eyebrow { letter-spacing: 6px; text-transform: uppercase; font-size: 13px; font-weight: 800; color: var(--gold); }
.intro h1 { font-family: "Alfa Slab One", Georgia, serif; font-weight: 400; font-size: clamp(64px, 12vw, 150px); line-height: 0.9; margin: 14px 0 10px; text-shadow: 0 10px 60px rgba(245, 197, 66, 0.3); }
.intro h1 span { display: block; font-size: 0.32em; letter-spacing: 8px; color: var(--gold); margin-top: 10px; }
.intro-line { color: #d8d2c6; font-size: 19px; margin: 18px 0 30px; line-height: 1.5; }
.intro-note { color: var(--muted); font-size: 13px; margin-top: 18px; }

/* top bar */
.top {
  height: 64px; display: flex; align-items: center; gap: 18px; padding: 0 16px;
  border-bottom: 1px solid var(--line); background: rgba(10, 11, 16, 0.92);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: "Alfa Slab One", Georgia, serif; font-size: 18px; letter-spacing: 1px; white-space: nowrap; }
.brand img { border-radius: 50%; }
.powers { flex: 1; min-width: 120px; display: grid; gap: 5px; }
.powers .bar { display: flex; height: 9px; border-radius: 999px; overflow: hidden; background: #222; }
.powers .bar i { display: block; height: 100%; transition: width 0.8s ease; }
.powers .legend { display: flex; gap: 14px; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; }
.powers .legend b { color: var(--text); }
.powers .throne { color: var(--muted); margin-left: auto; }
.ledger { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--immortal); box-shadow: 0 0 0 0 rgba(99, 212, 113, 0.7); }
.pulse.beat { animation: beat 0.9s ease-out; }
.pulse.sim { background: var(--og); }
@keyframes beat { from { box-shadow: 0 0 0 0 rgba(99, 212, 113, 0.8); } to { box-shadow: 0 0 0 12px rgba(99, 212, 113, 0); } }

/* layout */
.stage { height: calc(100% - 64px); display: grid; grid-template-columns: 1fr 400px; }
.map-wrap { position: relative; overflow: hidden; background: #05070d; }
#map { width: 100%; height: 100%; display: block; touch-action: none; cursor: pointer; }
.map-hint { position: absolute; left: 16px; bottom: 14px; font-size: 13px; color: var(--muted); background: rgba(0,0,0,0.5); padding: 6px 12px; border-radius: 999px; pointer-events: none; transition: opacity 0.4s; }
.season-tag { position: absolute; right: 14px; top: 12px; font-size: 11px; font-weight: 800; letter-spacing: 2px; color: var(--gold); border: 1px solid rgba(245,197,66,0.4); padding: 5px 10px; border-radius: 999px; background: rgba(0,0,0,0.45); }

.side { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); background: var(--panel); }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tab { flex: 1; background: none; border: 0; padding: 14px 6px; font-weight: 700; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; }
.tab.on { color: var(--text); border-bottom-color: var(--gold); }
.panel { display: none; flex: 1; overflow-y: auto; padding: 14px; min-height: 0; }
.panel.on { display: block; }

/* feed */
.feed { list-style: none; display: grid; gap: 8px; }
.feed li { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; animation: drop 0.35s ease; }
.feed li.capture { border-color: rgba(245, 197, 66, 0.55); background: linear-gradient(90deg, rgba(245,197,66,0.12), var(--panel2)); }
.feed li .who { display: flex; }
.feed .av { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; background: #222; cursor: pointer; }
.feed .txt { font-size: 13px; line-height: 1.35; }
.feed .txt b { cursor: pointer; }
.feed .meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.feed .meta a { color: var(--muted); }
.feed.small li { grid-template-columns: 1fr; padding: 6px 10px; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.f-og { color: var(--og); } .f-immortal { color: var(--immortal); } .f-mecha { color: var(--mecha); } .f-neutral { color: var(--neutral); }

/* region */
.empty { color: var(--muted); padding: 20px 4px; line-height: 1.5; }
.region-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.region-head h2 { font-family: "Alfa Slab One", Georgia, serif; font-weight: 400; font-size: 26px; }
.badge { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: #222; white-space: nowrap; }
.badge.og { background: rgba(245,165,36,0.18); color: var(--og); }
.badge.immortal { background: rgba(99,212,113,0.18); color: var(--immortal); }
.badge.mecha { background: rgba(62,201,255,0.18); color: var(--mecha); }
.region-lore { color: var(--muted); font-size: 14px; margin: 8px 0 14px; line-height: 1.45; }
.hold { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.hold-bar { flex: 1; height: 8px; border-radius: 999px; background: #222; overflow: hidden; }
.hold-bar i { display: block; height: 100%; background: var(--gold); transition: width 0.5s; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); margin: 18px 0 10px; }
h3 span { color: var(--text); }
.garrison, .army { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.unit { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #1c1f2b; border: 2px solid transparent; padding: 0; }
.unit img { width: 100%; height: 100%; object-fit: cover; display: block; }
.unit .hp { position: absolute; left: 3px; right: 3px; bottom: 3px; height: 4px; border-radius: 3px; background: rgba(0,0,0,0.5); }
.unit .hp i { display: block; height: 100%; border-radius: 3px; background: var(--immortal); }
.unit.mine { border-color: var(--gold); }
.unit.og { box-shadow: inset 0 0 0 1px rgba(245,165,36,0.5); }
.unit.immortal { box-shadow: inset 0 0 0 1px rgba(99,212,113,0.5); }
.unit.mecha { box-shadow: inset 0 0 0 1px rgba(62,201,255,0.5); }

/* army */
.army-form label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; min-width: 0; background: #0b0c12; border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 10px 12px; font-family: "JetBrains Mono", monospace; font-size: 13px; }
.fine { color: var(--muted); font-size: 12px; margin-top: 8px; line-height: 1.4; }
.army-summary { margin: 16px 0 12px; padding: 14px; border-radius: 14px; background: var(--panel2); border: 1px solid rgba(245,197,66,0.3); font-size: 14px; line-height: 1.5; }
.army-summary b { color: var(--gold); }

/* modal */
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(0,0,0,0.7); padding: 16px; }
.modal[hidden] { display: none; }
.modal-card { position: relative; width: min(720px, 100%); max-height: 92vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 22px; }
.close { position: absolute; right: 12px; top: 8px; background: none; border: 0; font-size: 32px; color: var(--muted); }
.ape-top { display: grid; grid-template-columns: 220px 1fr; gap: 20px; }
.ape-img { aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: #1c1f2b; }
.ape-img img { width: 100%; height: 100%; object-fit: cover; }
.ape-info h2 { font-family: "Alfa Slab One", Georgia, serif; font-weight: 400; font-size: 28px; margin: 10px 0 4px; }
.ape-info .small { color: var(--muted); }
.stats { display: grid; gap: 7px; margin-top: 14px; }
.stat { display: grid; grid-template-columns: 54px 1fr 30px; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; }
.stat .bar { height: 8px; border-radius: 999px; background: #222; overflow: hidden; }
.stat .bar i { display: block; height: 100%; border-radius: 999px; }
.perk { margin-top: 12px; font-size: 13px; color: #d8d2c6; }
.record { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.record div { background: var(--panel2); border-radius: 12px; padding: 10px; text-align: center; }
.record b { display: block; font-size: 22px; }
.record span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.traits { display: flex; flex-wrap: wrap; gap: 6px; }
.traits span { font-size: 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; }
.traits em { color: var(--muted); font-style: normal; }
.more { display: inline-block; margin-top: 18px; color: var(--gold); font-weight: 700; text-decoration: none; }

/* phones */
@media (max-width: 900px) {
  body { overflow: auto; }
  .stage { display: flex; flex-direction: column; height: auto; }
  .map-wrap { height: 62vh; min-height: 360px; }
  .side { border-left: 0; border-top: 1px solid var(--line); min-height: 60vh; }
  .top { gap: 10px; padding: 0 12px; }
  .brand span { display: none; }
  .powers .throne { display: none; }
  .powers .legend { gap: 8px; font-size: 11px; }
  .ledger { font-size: 11px; }
  .map-hint { display: none; }
  .ape-top { grid-template-columns: 1fr; }
  .ape-img { max-width: 260px; }
}

/* capture banner */
.banner {
  position: absolute; left: 50%; top: 18px; transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  font-family: "Alfa Slab One", Georgia, serif; font-size: clamp(18px, 2.4vw, 30px); letter-spacing: 1px; white-space: nowrap;
  color: #fff; padding: 10px 26px; border-radius: 14px; background: rgba(6,7,11,0.85);
  border: 2px solid var(--c, var(--gold)); box-shadow: 0 0 40px var(--c, var(--gold)); transition: opacity 0.35s, transform 0.35s;
}
.banner.show { opacity: 1; transform: translate(-50%, 0); }
.how-btn { position: absolute; right: 14px; bottom: 14px; background: rgba(0,0,0,0.6); border: 1px solid var(--line); color: var(--text); font-weight: 700; font-size: 13px; padding: 8px 14px; border-radius: 999px; }
.how-card h2 { font-family: "Alfa Slab One", Georgia, serif; font-weight: 400; font-size: 28px; margin-bottom: 14px; }
.how-list { display: grid; gap: 12px; padding-left: 20px; margin-bottom: 16px; line-height: 1.5; color: #d8d2c6; }
.how-list b { color: var(--text); }
.banner { top: 58px; }                                   /* below the Daily Siege pill and the season tag */
@media (max-width: 900px) {                               /* phones: under the stacked pills, clear of the zoom buttons */
  .banner { top: 84px; left: 10px; right: 58px; transform: translateY(-14px); white-space: normal; text-align: left; font-size: 16px; line-height: 1.2; padding: 8px 12px; gap: 10px; }
  .banner.show { transform: translateY(0); }
}

/* ranks */
.tab { font-size: 13px; }
.unit .rank { position: absolute; left: 3px; top: 3px; font-size: 10px; font-weight: 900; line-height: 1; padding: 3px 4px; border-radius: 6px; background: rgba(0,0,0,0.72); color: var(--gold); letter-spacing: -1px; }
.rank { color: var(--gold); font-weight: 900; }
.rank.r4, .rank-big.r4 { color: #ffd76a; text-shadow: 0 0 10px rgba(255,200,60,0.8); }
.ape-rank { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--panel2); border: 1px solid rgba(245,197,66,0.3); font-size: 14px; }
.rank-big { font-size: 22px; color: var(--gold); min-width: 44px; text-align: center; font-weight: 900; letter-spacing: -2px; }
.ape-rank > div { flex: 1; }
.xpbar { height: 6px; border-radius: 999px; background: #222; margin: 6px 0 4px; overflow: hidden; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #ff9f1c); }
.ranks-intro { color: #d8d2c6; font-size: 14px; line-height: 1.5; }
.ranks-summary { margin-top: 12px; font-size: 13px; color: var(--muted); line-height: 1.8; }
.ranks-summary b { color: var(--text); }
.ranks { list-style: none; display: grid; gap: 6px; }
.ranks li { display: grid; grid-template-columns: 26px 40px 1fr; gap: 10px; align-items: center; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 7px 10px; cursor: pointer; font-size: 14px; }
.ranks li:nth-child(-n+3) { border-color: rgba(245,197,66,0.45); }
.ranks .pos { font-weight: 900; color: var(--muted); text-align: center; }
.ranks img { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; }
.ranks .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* $BAPES */
.burn-top { background: rgba(255,120,60,0.12); border: 1px solid rgba(255,120,60,0.45); color: #ffb27a; font-weight: 800; font-size: 13px; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.preview-note { font-size: 12px; color: #ffb27a; background: rgba(255,120,60,0.1); border: 1px dashed rgba(255,120,60,0.45); border-radius: 10px; padding: 8px 10px; margin-bottom: 12px; line-height: 1.4; }
.chest-hero { text-align: center; padding: 16px; border-radius: 16px; background: radial-gradient(80% 100% at 50% 0%, rgba(255,120,60,0.25), transparent), var(--panel2); border: 1px solid rgba(255,120,60,0.4); display: grid; gap: 4px; }
.chest-hero b { font-family: "Alfa Slab One", Georgia, serif; font-weight: 400; font-size: 42px; color: #ffb27a; }
.chest-hero span:first-child { font-size: 12px; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); }
.cf { display: grid; grid-template-columns: 100px 1fr 54px; gap: 8px; align-items: center; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.cf .bar, .bn .bar { height: 8px; border-radius: 999px; background: #222; overflow: hidden; display: block; }
.cf .bar i, .bn .bar i { display: block; height: 100%; }
.cf b { text-align: right; }
.chest-kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.chest-kinds div { background: var(--panel2); border-radius: 10px; padding: 8px 4px; text-align: center; }
.chest-kinds b { display: block; font-size: 16px; }
.chest-kinds span { font-size: 10px; color: var(--muted); }
.chest-banners { display: grid; gap: 8px; margin-top: 8px; }
.bn { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; font-size: 13px; font-weight: 700; }
.bn .bar { grid-column: 1; }
.bn .fine { grid-column: 1; margin: 0; }
.bn .chip { grid-row: 1 / span 3; grid-column: 2; }
.bn.on { border-color: rgba(245,197,66,0.6); box-shadow: 0 0 20px rgba(245,197,66,0.15); }
.bn.on b { color: var(--gold); }
.merc-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.burn-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: linear-gradient(90deg, rgba(255,120,60,0.2), rgba(255,120,60,0.06)); border: 1px solid rgba(255,120,60,0.5); color: var(--text); border-radius: 12px; padding: 10px 14px; font-weight: 800; font-size: 14px; margin-top: 12px; }
.burn-btn span { color: #ffb27a; font-size: 12px; }
.burn-btn[disabled] { opacity: 0.45; cursor: default; }
.supply { font-size: 13px; color: var(--muted); }
.supply.on { color: var(--gold); font-weight: 700; }
.burn-card { max-width: 460px; text-align: center; }
.burn-card h2 { font-family: "Alfa Slab One", Georgia, serif; font-weight: 400; font-size: 24px; }
.burn-amount { font-family: "Alfa Slab One", Georgia, serif; font-size: 34px; color: #ffb27a; margin: 10px 0; }
.burn-how { margin: 14px 0; padding: 12px; border-radius: 12px; background: var(--panel2); font-size: 13px; line-height: 1.5; text-align: left; }
.burn-btns { display: flex; gap: 10px; justify-content: center; }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line); box-shadow: none; }
@media (max-width: 900px) { .burn-top { padding: 5px 8px; font-size: 12px; } .chest-kinds { grid-template-columns: repeat(2, 1fr); } }

/* armory */
#burn, #equip { z-index: 60; }
.forge-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.forge { display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border-radius: 14px; border: 1px solid rgba(245,197,66,0.4); background: linear-gradient(180deg, rgba(245,197,66,0.14), var(--panel2)); }
.forge span { font-size: 28px; }
.forge b { font-size: 14px; }
.forge em { font-style: normal; font-size: 11px; color: var(--muted); }
.forge:hover { border-color: var(--gold); }
.odds { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 11px; font-weight: 800; margin-top: 10px; }
.armory-last:not(:empty) { margin-top: 12px; display: grid; gap: 6px; font-size: 13px; }
.armory-inv { display: grid; gap: 8px; }
.gear { display: grid; grid-template-columns: 46px 1fr; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--rc); box-shadow: inset 0 0 22px -10px var(--rc); }
.gear.r3 { box-shadow: inset 0 0 30px -8px var(--rc), 0 0 18px -6px var(--rc); }
.gear .gi { font-size: 30px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: #0b0c12; }
.gear .gt { display: grid; gap: 2px; font-size: 13px; }
.gear .gt > span { font-size: 12px; color: var(--rc); font-weight: 700; }
.gear .gt .on { color: var(--muted); font-weight: 500; }
.gear .gt .on b { color: var(--text); cursor: pointer; }
.gear .ga { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.mini { font-size: 12px; font-weight: 800; padding: 6px 10px; border-radius: 999px; background: #0b0c12; border: 1px solid var(--line); }
.mini.gold { background: var(--gold); color: #1a1306; border-color: var(--gold); }
.unit .geared { position: absolute; right: 3px; top: 3px; font-size: 11px; background: rgba(0,0,0,0.72); border-radius: 6px; padding: 1px 3px; }
.ape-gear .slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.slot { display: grid; grid-template-columns: 34px 1fr; gap: 8px; align-items: center; padding: 8px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--rc, var(--line)); font-size: 12px; }
.slot.empty { border-style: dashed; opacity: 0.7; }
.slot .gi { font-size: 22px; text-align: center; }
.slot .fine { display: block; margin: 0; }
.stat .bar { display: flex; }
.stat .gearbar { background: repeating-linear-gradient(45deg, #f5c542, #f5c542 4px, #c99a1d 4px, #c99a1d 8px) !important; border-radius: 0 999px 999px 0 !important; }
.plus { color: var(--gold); font-style: normal; font-size: 10px; margin-left: 2px; }
.stat { grid-template-columns: 54px 1fr 52px; }
.equip-card h2 { font-family: "Alfa Slab One", Georgia, serif; font-weight: 400; font-size: 22px; margin-bottom: 12px; }
.equip-list { display: grid; gap: 6px; max-height: 60vh; overflow-y: auto; }
.eq { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; text-align: left; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px; }
.eq img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.eq:hover { border-color: var(--gold); }
.chest-kinds { grid-template-columns: repeat(5, 1fr); }
.tab { font-size: 12px; padding: 12px 2px; }
@media (max-width: 900px) { .ape-gear .slots { grid-template-columns: 1fr; } .chest-kinds { grid-template-columns: repeat(3, 1fr); } }

/* collection emblems */
.emb { width: 20px; height: 20px; border-radius: 50%; vertical-align: -5px; object-fit: contain; }
.badge .emb { width: 16px; height: 16px; vertical-align: -4px; margin-right: 2px; }
.banner { display: flex; align-items: center; gap: 14px; }
.emb-banner { width: 54px; height: 54px; border-radius: 50%; object-fit: contain; box-shadow: 0 0 18px var(--c, var(--gold)); flex-shrink: 0; }
@media (max-width: 900px) { .emb-banner { width: 32px; height: 32px; } }
/* sharper pictures */
.unit img, .feed .av, .ranks img, .eq img { image-rendering: auto; }

/* tabs: icon on top, label underneath, all the same */
.tabs { display: grid; grid-template-columns: repeat(6, 1fr); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px 2px 9px; min-width: 0; }
.tab .ti { font-size: 18px; line-height: 1; height: 20px; display: block; }
.tab .tl { font-size: 12px; font-weight: 700; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (max-width: 420px) { .tab .tl { font-size: 11px; } }

.tab .soon { font-size: 8px; font-weight: 900; letter-spacing: 1px; color: #1a1306; background: #ffb27a; border-radius: 4px; padding: 1px 4px; line-height: 1.3; }
.intro-note { max-width: 560px; margin-inline: auto; line-height: 1.5; }
.intro-note b { color: var(--text); }

/* sign-in and orders */
.command { margin-bottom: 16px; padding: 14px; border-radius: 16px; background: var(--panel2); border: 1px solid rgba(245,197,66,0.35); }
.command h3 { margin-top: 0; }
.signin-btns { display: grid; gap: 8px; margin-top: 10px; }
.wbtn { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #0b0c12; border: 1px solid var(--line); font-weight: 800; font-size: 14px; text-align: left; }
.wbtn img { width: 28px; height: 28px; border-radius: 8px; }
.wbtn:hover { border-color: var(--gold); }
#signin-wait { display: grid; gap: 10px; justify-items: start; font-size: 14px; }
.qr { width: 160px; height: 160px; border-radius: 12px; background: #fff; }
.me-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.me-head b { display: block; font-size: 14px; }
.me-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0 8px; }
.me-stats div { background: #0b0c12; border-radius: 10px; padding: 8px 4px; text-align: center; }
.me-stats b { display: block; font-size: 18px; color: var(--gold); }
.me-stats span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.squads { display: grid; gap: 8px; margin-top: 10px; }
.squad { background: #0b0c12; border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: grid; gap: 6px; }
.sq-top { display: flex; align-items: center; gap: 8px; }
.sq-top .fine { margin: 0 0 0 auto; }
.sq-now { font-size: 12px; color: var(--muted); }
.sq-now.on { color: var(--gold); font-weight: 700; }
.sq-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 12px; font-weight: 700; }
.sq-row > span:first-child { min-width: 64px; color: var(--muted); }
.chip-btn { font-size: 12px; font-weight: 800; padding: 5px 9px; border-radius: 999px; background: rgba(245,197,66,0.12); border: 1px solid rgba(245,197,66,0.45); color: var(--text); }
.chip-btn:hover:not([disabled]) { background: var(--gold); color: #1a1306; }
.chip-btn[disabled] { opacity: 0.4; cursor: default; }
.command [hidden], .command[hidden] { display: none !important; }

/* world events */
.wev-bar { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(440px, calc(100% - 32px)); background: rgba(12,10,16,0.92); border: 1px solid rgba(255,90,79,0.7); box-shadow: 0 0 30px rgba(255,90,79,0.35); border-radius: 16px; padding: 12px 14px; display: grid; gap: 8px; z-index: 5; animation: wevIn .5s ease; }
.wev-bar[hidden] { display: none; }
@keyframes wevIn { from { transform: translate(-50%, 20px); opacity: 0; } }
.wev-top { display: flex; gap: 10px; align-items: center; }
.wev-top b { display: block; font-size: 15px; letter-spacing: 1px; text-transform: uppercase; color: #ff8a7a; }
.wev-top span { font-size: 13px; color: var(--muted); }
.wev-emoji { font-size: 34px; line-height: 1; }
.wev-hp { height: 8px; border-radius: 99px; background: rgba(255,255,255,0.08); overflow: hidden; }
.wev-hp i { display: block; height: 100%; background: linear-gradient(90deg, #ff5a4f, #ffb15a); transition: width .6s; }
.wev-meta { font-size: 12px; color: var(--muted); }
.wev-bar .btn { justify-self: start; }
.wev-join { margin-bottom: 14px; padding: 12px; border-radius: 12px; border: 1px solid rgba(255,90,79,0.55); background: rgba(255,90,79,0.07); display: grid; gap: 8px; }
.wev-join h3 { margin: 0; }
.wev-join .sq-row > span:nth-child(2) { min-width: 0; color: var(--text); margin-right: 4px; }
.wev-done { color: var(--gold); font-weight: 800; font-size: 12px; }
.wev-win { color: var(--gold); font-weight: 800; }
.feed li.wev-line .ev-av { width: 36px; height: 36px; display: grid; place-items: center; font-size: 24px; border-radius: 10px; background: rgba(255,90,79,0.14); }
.feed li.wev-line.big { background: rgba(255,90,79,0.08); border-left: 3px solid #ff5a4f; }
.glory { margin-bottom: 16px; }
.glory-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.glory h4 { margin: 4px 0; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.glory ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 13px; }
.glory li { display: flex; justify-content: space-between; background: #0b0c12; padding: 5px 8px; border-radius: 8px; }
.glory li b { color: var(--gold); }

/* the Daily Siege */
.siege-pill { position: absolute; left: 14px; top: 12px; z-index: 4; font-size: 12px; font-weight: 700; color: var(--text); background: rgba(0,0,0,0.55); border: 1px solid rgba(255,120,90,0.5); padding: 6px 12px; border-radius: 999px; cursor: default; }
.siege-pill[hidden] { display: none; }
.siege-pill b { color: #ff9a85; }
.siege-pill.prep, .siege-pill.live { cursor: pointer; border-color: #ff5a4f; box-shadow: 0 0 18px rgba(255,90,79,0.45); }
.siege-pill.live { background: rgba(120,10,10,0.75); animation: siegePulse 1.2s ease-in-out infinite; }
@keyframes siegePulse { 50% { box-shadow: 0 0 28px rgba(255,90,79,0.8); } }
.siege-board { position: absolute; left: 14px; top: 52px; z-index: 4; width: min(300px, calc(100% - 28px)); background: rgba(10,8,14,0.9); border: 1px solid #ff5a4f; border-radius: 14px; padding: 10px 12px; display: grid; gap: 6px; }
.siege-board[hidden] { display: none; }
.sb-head { font-weight: 900; letter-spacing: 1px; display: flex; justify-content: space-between; color: #ff8a7a; }
.sb-head span { color: var(--text); font-variant-numeric: tabular-nums; }
.sb-row { display: grid; grid-template-columns: 22px 90px 1fr 40px; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.sb-row b { text-align: right; font-variant-numeric: tabular-nums; }
.sb-bar { height: 10px; background: rgba(255,255,255,0.08); border-radius: 99px; overflow: hidden; }
.sb-bar i { display: block; height: 100%; transition: width .5s; }
.siege-duty { border-color: rgba(255,90,79,0.8); }
.siege-pts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
.siege-pts div { background: #0b0c12; border-radius: 10px; padding: 8px 4px; display: grid; justify-items: center; gap: 2px; }
.siege-pts b { font-size: 20px; color: var(--gold); }
.siege-pts span { font-size: 11px; color: var(--muted); }
.siege-badge { color: #ff9a85; font-weight: 800; }
.feed li.siege-line .ev-av { background: rgba(255,90,79,0.2); }
@media (max-width: 900px) { .siege-board { top: auto; bottom: 150px; } }

.lookup-toggle { display: block; margin: 4px 0 12px; padding: 0; background: none; border: 0; color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lookup-toggle:hover { color: var(--gold); }
.lookup-toggle[hidden] { display: none; }

/* season leaderboard */
.season-board { margin-bottom: 18px; padding: 12px; border-radius: 14px; background: linear-gradient(180deg, rgba(245,197,66,0.12), rgba(245,197,66,0.03)); border: 1px solid rgba(245,197,66,0.45); }
.season-board[hidden] { display: none; }
.season-board h3 { margin: 0 0 4px; }
.sboard { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; }
.sboard li { display: grid; grid-template-columns: 30px 1fr auto 56px; align-items: center; gap: 8px; background: #0b0c12; padding: 6px 8px; border-radius: 8px; font-size: 13px; }
.sboard li.you { outline: 1px solid var(--gold); background: rgba(245,197,66,0.12); }
.sboard li.gap { background: none; justify-content: center; display: block; text-align: center; color: var(--muted); padding: 0; }
.sboard li.fine { display: block; }
.sb-rank { text-align: center; font-weight: 800; color: var(--muted); }
.sb-who em { font-style: normal; font-size: 10px; font-weight: 800; color: #1a1306; background: var(--gold); padding: 1px 5px; border-radius: 99px; margin-left: 4px; }
.sb-parts { font-size: 11px; color: var(--muted); white-space: nowrap; }
.sboard li b { text-align: right; color: var(--gold); font-variant-numeric: tabular-nums; }
@media (max-width: 420px) { .sb-parts { display: none; } .sboard li { grid-template-columns: 30px 1fr 56px; } }

/* the Siege show */
.siege-show { position: absolute; left: 50%; top: 96px; transform: translateX(-50%); z-index: 6; text-align: center; pointer-events: none; }
.siege-show[hidden] { display: none; }
.siege-show.prep { background: rgba(10,4,6,0.78); border: 1px solid #ff5a4f; border-radius: 18px; padding: 12px 22px; box-shadow: 0 0 40px rgba(255,60,40,0.45); pointer-events: auto; }
.ss-title { font-weight: 900; letter-spacing: 2px; color: #ff8a7a; font-size: 13px; }
.ss-clock { font-family: "Rye", "Inter", serif; font-size: 52px; font-weight: 900; color: #fff; line-height: 1.05; text-shadow: 0 0 24px rgba(255,80,60,0.8); font-variant-numeric: tabular-nums; }
.ss-rally { display: flex; gap: 14px; justify-content: center; margin-top: 6px; font-size: 14px; font-weight: 800; }
.ss-rally span { display: inline-flex; align-items: center; gap: 5px; }
.ss-rally b { color: #fff; font-size: 18px; }
.ss-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }
.ss-sub a { color: var(--gold); }
.siege-cine { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; pointer-events: none; }
.siege-cine[hidden] { display: none; }
.siege-cine span { font-family: "Rye", "Inter", serif; font-size: clamp(90px, 18vw, 220px); font-weight: 900; color: #fff; text-shadow: 0 0 40px rgba(255,60,40,0.9), 0 8px 0 rgba(0,0,0,0.6); animation: cine .85s ease-out both; }
.siege-cine span.go { color: #ffd35a; font-size: clamp(70px, 13vw, 170px); }
@keyframes cine { from { transform: scale(2.4); opacity: 0; } 30% { transform: scale(1); opacity: 1; } to { transform: scale(0.9); opacity: 0.0; } }
.duel-feed { position: absolute; right: 14px; top: 250px; z-index: 5; display: grid; gap: 8px; width: min(270px, 42%); pointer-events: auto; }
.duel { background: rgba(10,8,14,0.9); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; padding: 8px; animation: duelIn .45s ease-out both; }
.duel.ko { border-color: rgba(255,90,79,0.7); }
.duel.me { border: 2px solid var(--gold); box-shadow: 0 0 18px rgba(245,197,66,0.5); }
@keyframes duelIn { from { transform: translateX(40px); opacity: 0; } }
.duel-me { font-size: 10px; font-weight: 900; color: var(--gold); letter-spacing: 1px; margin-bottom: 4px; }
.duel-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; }
.duel-ape { display: grid; justify-items: center; gap: 2px; font-size: 10px; font-weight: 800; }
.duel-ape img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; border: 2px solid currentColor; cursor: pointer; }
.duel-ape.lost img { filter: grayscale(0.85) brightness(0.6); }
.duel-ape.won img { box-shadow: 0 0 14px currentColor; }
.duel-vs { font-size: 22px; }
.duel-txt { font-size: 11px; color: var(--muted); text-align: center; margin-top: 4px; }
.mvp-reveal { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; background: rgba(0,0,0,0.55); }
.mvp-reveal[hidden] { display: none; }
.mvp-in { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 18px; }
.mvp-head { font-family: "Rye", "Inter", serif; font-size: clamp(26px, 4vw, 44px); color: #fff; text-shadow: 0 4px 0 rgba(0,0,0,0.6); animation: duelIn .6s ease-out both; }
.mvp-sub { font-weight: 900; letter-spacing: 3px; color: var(--gold); }
.mvp-cards { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.mvp { background: rgba(10,8,14,0.92); border: 2px solid currentColor; border-radius: 16px; padding: 10px; width: 170px; display: grid; justify-items: center; gap: 4px; animation: mvpIn .6s cubic-bezier(.2,1.4,.4,1) both; box-shadow: 0 0 30px currentColor; }
@keyframes mvpIn { from { transform: translateY(60px) scale(0.6); opacity: 0; } }
.mvp-place { font-size: 30px; line-height: 1; }
.mvp img { width: 140px; height: 140px; border-radius: 12px; object-fit: cover; cursor: pointer; }
.mvp b { color: var(--text); font-size: 13px; }
.mvp span { font-size: 12px; color: var(--muted); }
.mvp em { font-style: normal; font-size: 11px; font-weight: 900; color: #1a1306; background: var(--gold); padding: 2px 8px; border-radius: 99px; }
.sound-btn { position: absolute; left: 14px; bottom: 54px; z-index: 6; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,0.6); border: 1px solid rgba(255,120,90,0.6); font-size: 18px; }
.sound-btn[hidden] { display: none; }
/* during the live Siege the scoreboard moves to the top centre and grows */
.siege-board.live { left: 50%; top: 96px; transform: translateX(-50%); width: min(460px, calc(100% - 28px)); }
.siege-board.live .sb-row { grid-template-columns: 26px 110px 1fr 48px; font-size: 14px; }
.siege-board.live .sb-bar { height: 14px; }
@media (max-width: 900px) { .duel-feed { top: auto; bottom: 150px; right: 8px; width: 210px; } .duel-ape img { width: 48px; height: 48px; } .siege-show.prep .ss-clock { font-size: 38px; } }

/* world events: the show */
.ev-title { text-align: center; display: grid; gap: 2px; animation: cineEv 3.4s ease-out both; }
.ev-title small { font-weight: 900; letter-spacing: 4px; color: #ff8a7a; font-size: clamp(14px, 2vw, 20px); }
.ev-title b { font-family: "Rye", "Inter", serif; font-size: clamp(48px, 9vw, 120px); line-height: 0.95; color: #fff; text-shadow: 0 0 40px rgba(255,60,40,0.9), 0 6px 0 rgba(0,0,0,0.6); }
.ev-title b.l2 { color: #ffd35a; }
@keyframes cineEv { from { transform: scale(2.4); opacity: 0; } 12% { transform: scale(1); opacity: 1; } 85% { transform: scale(0.97); opacity: 1; } to { transform: scale(0.9); opacity: 0; } }
.siege-cine span.go.long { animation: cineGo 1.8s ease-out both; }
@keyframes cineGo { from { transform: scale(2.4); opacity: 0; } 15% { transform: scale(1); opacity: 1; } 80% { opacity: 1; } to { opacity: 0; } }
.duel.hit .hit-row { display: grid; grid-template-columns: 56px 1fr; gap: 8px; align-items: center; }
.duel.hit img { width: 56px; height: 56px; border-radius: 10px; border: 2px solid currentColor; object-fit: cover; cursor: pointer; }
.duel.hit b { display: block; font-size: 12px; }
.duel.hit span { display: block; font-size: 12px; color: var(--text); }
.duel.hit span b { display: inline; color: #ff8a7a; }
.duel.hit em { font-style: normal; font-size: 10px; color: var(--muted); }
.wev-board { display: grid; gap: 3px; }
.wev-board:empty { display: none; }
.wb-head { font-size: 10px; font-weight: 900; letter-spacing: 1.5px; color: var(--muted); }
.wb-rage { color: #ff6a3d; animation: siegePulse 1s infinite; }
.wb-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 6px; font-size: 12px; align-items: center; }
.wb-row i { font-style: normal; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.wb-row.me { background: rgba(245,197,66,0.14); border-radius: 6px; }
.duel-feed.left { right: auto; left: 14px; top: 60px; }
@media (max-width: 900px) { .duel-feed.left { top: 60px; bottom: auto; left: 8px; } }
.duel.hit.found { border: 2px solid #ffd35a; box-shadow: 0 0 22px rgba(255,211,90,0.6); }
.hunt-ico { width: 56px; height: 56px; display: grid; place-items: center; font-size: 30px; background: rgba(255,211,90,0.12); border-radius: 10px; }
.siege-cine span.go.gold { color: #ffd35a; }

/* the living map */
.region-perk { display: grid; gap: 4px; font-size: 13px; margin: 6px 0 10px; }
.region-perk:empty { display: none; }
.region-perk span { background: #0b0c12; border-radius: 8px; padding: 6px 8px; }
.land-line { font-size: 13px; background: rgba(245,197,66,0.1); border: 1px solid rgba(245,197,66,0.35); border-radius: 10px; padding: 8px 10px; margin: 8px 0; }
.land-line:empty { display: none; }
.warlords { margin-bottom: 18px; }
.warlords[hidden] { display: none; }
.wl-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.wl { background: #0b0c12; border: 2px solid currentColor; border-radius: 12px; padding: 8px; display: grid; justify-items: center; gap: 3px; text-align: center; box-shadow: 0 0 16px currentColor; }
.wl img { width: 100%; max-width: 110px; aspect-ratio: 1; border-radius: 10px; object-fit: cover; cursor: pointer; }
.wl b { font-size: 11px; color: var(--text); }
.wl span { font-size: 10px; color: var(--muted); }
.wl em { font-style: normal; font-size: 10px; font-weight: 800; color: #ff6a5a; }
.wl.down { box-shadow: none; filter: grayscale(0.8); }

/* personal Telegram alerts */
.tg-card { margin: 8px 0; display: grid; gap: 6px; }
.tg-card:empty { display: none; }
.tg-btn { width: 100%; padding: 10px 12px; border-radius: 12px; background: #229ed9; color: #fff; border: 0; font-weight: 800; font-size: 14px; cursor: pointer; }
.tg-btn:hover { filter: brightness(1.1); }
.tg-on { display: grid; gap: 4px; background: rgba(34,158,217,0.12); border: 1px solid rgba(34,158,217,0.5); border-radius: 12px; padding: 10px; font-size: 13px; }
.tg-on span { color: var(--muted); font-size: 12px; }
.tg-on code { color: var(--text); }
.tg-on .mini { justify-self: start; }

/* ---------- the tutorial video ---------- */
.tut-link { display: block; margin: 16px auto 0; background: none; border: 0; color: var(--gold); font-weight: 800; font-size: 15px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.how-btn.tut-btn { right: auto; left: auto; right: 150px; background: rgba(245,197,66,0.9); color: #1a1306; border-color: var(--gold); }
a.tut-link.dc-link { color: #8b95ff; margin-top: 10px; display: inline-block; }
.tut-nudge { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.tut-nudge .linkish { background: none; border: 0; padding: 0; color: var(--gold); font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.tut-card { width: min(1000px, 100%); padding: 0; overflow: hidden; background: #000; }
.tut-card video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
.tut-x { position: absolute; top: 8px; right: 8px; z-index: 2; width: 36px; height: 36px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.3); background: rgba(0,0,0,0.6); color: #fff; font-size: 16px; cursor: pointer; }
#tut { z-index: 70; }                 /* above the intro screen (50), so it opens from there too */

/* ---------- Discord verification card ---------- */
.dc-card { position: fixed; z-index: 45; left: 50%; top: 84px; transform: translateX(-50%); width: min(460px, calc(100% - 32px)); background: var(--panel); border: 2px solid #5865f2; border-radius: 18px; padding: 16px 44px 14px 18px; box-shadow: 0 12px 40px rgba(0,0,0,0.6); }
.dc-card.ok { border-color: #3ba55d; }
.dc-card b { font-size: 17px; } .dc-card p { margin: 6px 0 0; font-size: 14px; line-height: 1.45; }
.dc-x { position: absolute; top: 10px; right: 10px; background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; }

/* ---------- display name ---------- */
.name-card { background: #0b0c12; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin: 10px 0; }
.nm-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.nm-form { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.nm-form input { flex: 1; min-width: 120px; background: #05060a; border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 7px 10px; font-size: 14px; }
.name-card .fine { margin: 6px 0 0; }

/* ---------- the painted map: zoom buttons, phone layout ---------- */
.zoom-ctl { position: absolute; right: 14px; top: 50px; z-index: 5; display: flex; flex-direction: column; gap: 6px; }
.zoom-ctl button { width: 36px; height: 36px; border-radius: 10px; background: rgba(10,10,16,0.82); border: 1px solid rgba(255,255,255,0.16); color: #fff; font: 800 20px/1 Inter, sans-serif; display: grid; place-items: center; padding: 0; cursor: pointer; touch-action: manipulation; }
.zoom-ctl button:hover { border-color: rgba(245,197,66,0.6); }
.zoom-ctl #zoom-home { font-size: 17px; }
@media (max-width: 900px) {
  /* the Daily Siege pill and the season tag stack on the left; zoom on the right */
  .siege-pill { left: 10px; top: 10px; }
  .season-tag { left: 10px; right: auto; top: 10px; font-size: 10px; letter-spacing: 1.2px; padding: 4px 9px; }
  .siege-pill:not([hidden]) ~ .season-tag { top: 46px; }
  .zoom-ctl { right: 10px; top: 10px; }
  .zoom-ctl button { width: 38px; height: 38px; }
  .map-hint { display: block; left: 50%; bottom: 58px; transform: translateX(-50%); font-size: 12px; font-weight: 700; color: #fff; white-space: nowrap; background: rgba(10,10,16,0.82); border: 1px solid rgba(255,255,255,0.14); }
}
.map-wrap .hol-pill { top: 184px; }
@media (max-width: 900px) { .map-wrap .hol-pill { top: auto; bottom: 64px; left: 10px; right: 10px; max-width: none; border-radius: 14px; } }
