/* Screen-specific styles. */

/* ---------- welcome ---------- */
.welcome-wrap { max-width: 520px !important; margin: 4vh auto; animation: slideUp .4s; }
.welcome-logo { text-align: center; margin-bottom: 22px; }
.welcome-logo .w-swords { font-size: 54px; display: block; animation: floaty 3.4s ease-in-out infinite; }
.welcome-logo h1 { font-size: clamp(30px, 7vw, 44px); letter-spacing: .14em; line-height: 1.05; }
.welcome-logo h1 em { color: var(--gold); font-style: normal; }
.welcome-logo p { color: var(--dim); margin-top: 6px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); margin-bottom: 6px; }
.field-row { display: flex; gap: 8px; }
.field-row > * { min-width: 0; }
.picker { display: flex; flex-wrap: wrap; gap: 7px; }
.pick {
  width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px;
  background: #131a0e; border: 2px solid var(--line); border-radius: 11px;
  transition: transform .1s;
}
.pick:hover { transform: scale(1.08); }
.pick.sel { border-color: var(--gold); background: #2a2f16; box-shadow: 0 0 12px #e6b94f44; }
.pick.color-pick { width: 34px; height: 34px; border-radius: 50%; }

/* ---------- headquarters ---------- */
.base-scene-wrap { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); margin-bottom: 14px; }
.base-scene-wrap svg { display: block; width: 100%; height: auto; }
.base-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: space-between; padding: 14px; pointer-events: none;
}
.base-overlay > * { pointer-events: auto; }
.base-title { display: flex; align-items: center; gap: 10px; }
.base-title .b-name { font-size: clamp(17px, 3vw, 23px); font-weight: 800; text-shadow: 0 2px 6px #000a; }
.base-title .tag { backdrop-filter: blur(4px); }
.base-badges { display: flex; gap: 8px; align-self: flex-start; flex-wrap: wrap; }
.hq-cols { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; }
@media (max-width: 860px) { .hq-cols { grid-template-columns: 1fr; } }

.recruit-banner {
  display: flex; align-items: center; gap: 13px;
  background: linear-gradient(90deg, #2c3a19, #202b14);
  border: 1px solid #55683c; border-radius: var(--r);
  padding: 13px 16px; margin-bottom: 14px;
}
.recruit-banner .r-ico { font-size: 30px; animation: pulse 2.2s infinite; }
.recruit-banner .r-txt { flex: 1; }
.recruit-banner .r-txt b { font-size: 17px; }
.recruit-banner .r-txt .bar { margin-top: 6px; max-width: 260px; }

.queue-line { display: flex; align-items: center; gap: 11px; padding: 10px 0; }
.queue-line .q-ico { font-size: 24px; width: 34px; text-align: center; }
.queue-line .q-body { flex: 1; }
.queue-line .q-body .bar { margin-top: 5px; }
.q-idle { color: var(--dim2); font-size: 13.5px; }

.marchers { display: inline-flex; gap: 3px; margin-left: 8px; }
.marchers i {
  width: 7px; height: 11px; border-radius: 2px 2px 1px 1px; background: #9fb96a;
  animation: marchstep 0.9s infinite;
}
.marchers i:nth-child(2) { animation-delay: .15s; }
.marchers i:nth-child(3) { animation-delay: .3s; }
@keyframes marchstep { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

.hq-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 9px; margin-bottom: 14px; }
.hq-act {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 6px; font-weight: 700; font-size: 12.5px; color: var(--dim);
}
.hq-act:hover { border-color: #667e42; color: var(--ink); }
.hq-act span { font-size: 23px; }
@media (max-width: 560px) { .hq-actions { grid-template-columns: repeat(2, 1fr); } }

.mission-hint { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px dashed #2c3820; }
.mission-hint:last-child { border-bottom: 0; }
.mission-hint .m-check { color: var(--gold); font-size: 17px; }

/* ---------- upgrades ---------- */
.bld-card { display: flex; gap: 14px; }
.bld-ico {
  width: 62px; height: 62px; flex: 0 0 auto; display: grid; place-items: center; font-size: 33px;
  background: linear-gradient(160deg, #35461f, #1c2610); border: 1px solid #55683c; border-radius: 14px;
}
.bld-body { flex: 1; min-width: 0; }
.bld-body h3 { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.bld-benefit { font-size: 13px; color: var(--dim); margin: 3px 0 8px; }
.bld-next { font-size: 13px; color: var(--green); margin-bottom: 8px; }
.cost-line { display: flex; gap: 12px; align-items: center; font-size: 13.5px; flex-wrap: wrap; }
.cost-line .no { color: var(--red); }
.lvl-dots { display: inline-flex; flex-wrap: wrap; gap: 3px; margin-left: 4px; max-width: 160px; }
.lvl-dots i { width: 6px; height: 6px; border-radius: 50%; background: #2c3820; }
.lvl-dots i.on { background: var(--gold); }

.upg-progress {
  background: linear-gradient(90deg, #33421c, #26331a);
  border: 1px solid #6d8f3f; border-radius: var(--r); padding: 12px 16px; margin-bottom: 14px;
  display: flex; align-items: center; gap: 12px;
}
.upg-progress .u-ico { font-size: 26px; animation: pulse 1.6s infinite; }
.upg-progress .bar { flex: 1; }

/* ---------- army & recruitment ---------- */
.unit-card { position: relative; overflow: hidden; }
.unit-card .u-head { display: flex; gap: 12px; align-items: center; margin-bottom: 9px; }
.unit-ico {
  width: 54px; height: 54px; flex: 0 0 auto; display: grid; place-items: center; font-size: 29px;
  background: linear-gradient(160deg, var(--panel3), #17200f); border: 1px solid var(--line); border-radius: 13px;
}
.unit-ico canvas { display: block; }
.unit-card h3 { display: flex; align-items: center; gap: 8px; }
.u-desc { font-size: 13px; color: var(--dim); margin-bottom: 8px; }
.u-bars { display: grid; grid-template-columns: auto 1fr; gap: 5px 9px; align-items: center; font-size: 11.5px; color: var(--dim); margin-bottom: 9px; }
.u-bars .bar { height: 7px; }
.u-stat-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px;
  margin: 9px 0;
}
.u-stat {
  min-width: 0; padding: 6px 7px; border: 1px solid #2c3820; border-radius: 8px;
  background: #121a0d;
}
.u-stat small {
  display: block; color: var(--dim2); font-size: 10px; font-weight: 800;
  text-transform: uppercase; white-space: nowrap;
}
.u-stat b {
  display: block; margin-top: 2px; font-size: 12px; line-height: 1.2;
  overflow-wrap: anywhere;
}
.u-stat.red b { color: var(--red); }
.u-stat.blue b { color: #8fd4e8; }
.u-stat.gold b { color: var(--gold2); }
.u-stat.green b { color: var(--green); }
.u-stat-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.u-stat-grid.compact .u-stat { padding: 5px 6px; }
.u-stat-grid.compact .u-stat b { font-size: 11.5px; }
.u-special {
  display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 9px;
}
.u-special span {
  min-width: 0; max-width: 100%; padding: 3px 7px; border: 1px solid #344324;
  border-radius: 999px; background: #18210f; color: var(--dim); font-size: 11px;
  line-height: 1.25;
}
.u-special.compact span { font-size: 10.5px; padding: 2px 6px; }
.u-owned { position: absolute; top: 12px; right: 13px; text-align: right; }
.u-owned b { font-size: 19px; display: block; }
.u-owned small { font-size: 11px; }
.qty-ctrl { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.qty-btn {
  width: 37px; height: 37px; flex: 0 0 auto; border-radius: 10px; font-size: 18px; font-weight: 800;
  background: #26331a; border: 1px solid #4a5c31;
}
.qty-btn:hover { background: #33421f; }
.qty-num { width: 64px; text-align: center; padding: 8px 4px; font-weight: 800; }
input[type=range] { accent-color: #a7d160; padding: 0; height: 26px; background: transparent; border: none; }
.u-cost { display: flex; gap: 12px; font-size: 13px; margin-bottom: 9px; min-height: 19px; flex-wrap: wrap; }
.u-cost .no { color: var(--red); }

.comp-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; border: 1px solid #2c3820; margin: 9px 0 5px; }
.comp-bar i { height: 100%; }
.comp-legend { display: flex; gap: 13px; flex-wrap: wrap; font-size: 12px; color: var(--dim); }
.comp-legend b { color: var(--ink); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
@media (max-width: 560px) {
  .u-stat-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- community ---------- */
.comm-banner {
  position: relative; border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--line); margin-bottom: 14px;
  background: linear-gradient(120deg, var(--cc, #45602a) -40%, #18210f 65%);
  padding: 20px 18px;
}
.comm-banner .c-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.comm-ico {
  width: 62px; height: 62px; display: grid; place-items: center; font-size: 33px;
  background: #00000038; border: 1px solid #ffffff2e; border-radius: 16px;
}
.comm-banner h2 { font-size: 23px; text-transform: none; letter-spacing: .02em; }
.comm-banner .c-meta { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.comm-banner p { color: #cfd8bd; font-size: 13.5px; margin-top: 10px; max-width: 640px; }

.comm-card { display: flex; gap: 13px; align-items: flex-start; }
.comm-card .comm-ico { width: 50px; height: 50px; font-size: 26px; border-radius: 13px; background: linear-gradient(160deg, var(--cc, #45602a), #18210f); }
.comm-card .cc-body { flex: 1; min-width: 0; }
.comm-card h3 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.comm-card p { font-size: 13px; color: var(--dim); margin: 4px 0 8px; }

.feed-item { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed #2c3820; font-size: 13.5px; }
.feed-item:last-child { border-bottom: 0; }
.feed-ico { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; background: #222d16; border-radius: 8px; font-size: 14px; }
.feed-item .f-time { margin-left: auto; color: var(--dim2); font-size: 11.5px; white-space: nowrap; }
.feed-item .btn { flex: 0 0 auto; }
.member-row { align-items: center; }
.member-main { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 260px; }
.member-copy { min-width: 0; flex: 1; }
.member-name-line { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.member-sub { font-size: 11.5px; color: var(--dim); }
.member-actions { margin-left: auto; display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.member-actions .f-time { margin-left: 0; }
.lb-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.lb-tags:empty { display: none; }
.lb-tags .tag { font-size: 10px; padding: 2px 5px; }
@media (max-width: 560px) {
  .member-row { align-items: flex-start; flex-wrap: wrap; }
  .member-actions { width: 100%; margin-left: 42px; justify-content: flex-start; }
}

.chat-panel { display: flex; flex-direction: column; min-height: min(620px, calc(100dvh - 190px)); }
.chat-toolbar { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.chat-list {
  display: flex; flex-direction: column; gap: 10px;
  min-height: 260px; max-height: 52vh; overflow-y: auto;
  padding: 4px 4px 10px;
}
.chat-list.compact { min-height: 0; max-height: none; overflow: visible; padding: 0; }
.chat-msg { display: flex; align-items: flex-start; gap: 9px; max-width: min(720px, 92%); }
.chat-msg.me { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg.compact { max-width: 100%; }
.chat-msg .avatar { margin-top: 2px; }
.chat-bubble {
  min-width: 0; padding: 9px 11px; border: 1px solid #2f3e23; border-radius: 12px;
  background: #151e10; box-shadow: 0 3px 10px #0003;
}
.chat-msg.me .chat-bubble { background: #26331a; border-color: #52683a; }
.chat-meta { display: flex; gap: 9px; align-items: center; justify-content: space-between; margin-bottom: 3px; }
.chat-meta b { overflow-wrap: anywhere; }
.chat-meta span { color: var(--dim2); font-size: 11px; white-space: nowrap; }
.chat-bubble p { color: var(--ink); font-size: 13.5px; overflow-wrap: anywhere; }
.chat-msg.compact .chat-bubble { padding: 7px 9px; }
.chat-msg.compact .chat-bubble p { font-size: 12.5px; }
.chat-compose {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end;
  border-top: 1px solid #2c3820; padding-top: 12px; margin-top: 8px;
}
.chat-compose textarea { resize: vertical; min-height: 48px; max-height: 120px; }
.chat-compose-actions { display: flex; flex-direction: column; gap: 7px; align-items: flex-end; }
.chat-preview .empty { padding: 8px 0; }
@media (max-width: 560px) {
  .chat-panel { min-height: calc(100dvh - 176px); }
  .chat-list { max-height: 48vh; }
  .chat-msg { max-width: 100%; }
  .chat-compose { grid-template-columns: 1fr; }
  .chat-compose-actions { flex-direction: row; justify-content: space-between; align-items: center; }
  .chat-compose-actions .btn { min-width: 104px; }
}

.alliance-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.alliance-chip, .alliance-row, .champion-strip {
  display: flex; align-items: center; gap: 10px;
  background: #17200f; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px;
}
.alliance-chip { border-color: color-mix(in srgb, var(--ac, #8fbf4d) 55%, var(--line)); }
.alliance-chip > span, .alliance-mark, .alliance-mini, .champion-strip > span {
  display: grid; place-items: center; flex: 0 0 auto;
  background: linear-gradient(160deg, var(--ac, #45602a), #18210f);
  border: 1px solid #ffffff2e; border-radius: 12px;
}
.alliance-chip > span { width: 42px; height: 42px; font-size: 24px; }
.alliance-chip small, .alliance-row small, .champion-strip small {
  display: block; color: var(--dim); font-size: 11.5px; margin-top: 2px;
}
.alliance-hero { display: flex; gap: 14px; align-items: flex-start; border-color: color-mix(in srgb, var(--ac, #8fbf4d) 55%, var(--line)); }
.alliance-mark { width: 62px; height: 62px; font-size: 34px; }
.alliance-main { flex: 1; min-width: 0; }
.objective {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 12px 0 7px; font-size: 13px;
}
.objective small { display: block; color: var(--dim); margin-top: 2px; }
.alliance-row { margin-bottom: 8px; }
.alliance-row > div { flex: 1; min-width: 0; }
.alliance-mini { width: 34px; height: 34px; font-size: 19px; }
.tournament-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(120deg, #2b351d, var(--panel) 70%);
}
.tournament-hero p { color: var(--dim); font-size: 13.5px; max-width: 620px; margin-top: 5px; }
.champion-strip > span { width: 48px; height: 48px; font-size: 26px; }
.bracket-wrap { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; }
.bracket-round { min-width: 180px; }
.bracket-round h3 { font-size: 12px; color: var(--dim); margin-bottom: 8px; }
.bracket-match {
  background: #12190e; border: 1px solid var(--line); border-radius: 10px;
  padding: 7px; margin-bottom: 8px;
}
.bracket-player {
  display: flex; align-items: center; gap: 7px;
  min-height: 30px; padding: 5px 6px; border-radius: 7px; color: var(--dim);
}
.bracket-player b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bracket-player.win { background: #26331a; color: var(--ink); }
.modal.wide { width: min(880px, calc(100vw - 28px)); }
@media (max-width: 760px) {
  .alliance-layout, .tournament-hero { grid-template-columns: 1fr; flex-direction: column; align-items: stretch; }
  .alliance-hero { flex-direction: column; }
}

.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; padding: 18px 6px 4px; }
.podium .pod { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; max-width: 130px; }
.podium .pod .avatar { position: relative; }
.podium .crown { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); font-size: 19px; animation: floaty 2.6s infinite; }
.podium .pod-name { font-size: 12.5px; font-weight: 700; text-align: center; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .pod-pts { font-size: 11px; color: var(--gold); }
.podium .pod-block { width: 100%; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, #3a4c22, #26331a); border: 1px solid #55683c; border-bottom: none; display: grid; place-items: center; font-weight: 800; color: #d6e3b8; }
.podium .p1 .pod-block { height: 58px; background: linear-gradient(180deg, #7a641f, #4c3d10); border-color: #b1913a; color: var(--gold2); }
.podium .p2 .pod-block { height: 42px; }
.podium .p3 .pod-block { height: 30px; }

table.lb { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.lb th { text-align: left; color: var(--dim2); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 7px 8px; border-bottom: 1px solid var(--line); }
table.lb td { padding: 9px 8px; border-bottom: 1px dashed #27321c; vertical-align: middle; }
table.lb tr.me td { background: #26331a66; }
table.lb tr:hover td { background: #202b1466; }
table.lb .lb-player { display: flex; gap: 9px; align-items: center; min-width: 0; }
table.lb .lb-player .nm { line-height: 1.15; min-width: 0; }
table.lb .lb-player .nm b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
table.lb .lb-player .nm small { font-size: 11px; white-space: nowrap; }
.rank-move { font-size: 11px; margin-left: 4px; }
.rank-move.up { color: var(--green); }
.rank-move.down { color: var(--red); }
.lb-wrap { overflow-x: auto; }

.season-panel .season-meta,
.season-strip {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.season-panel .season-bar { margin: 10px 0 14px; }
.season-rewards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.season-reward-card {
  display: flex; gap: 9px; align-items: center;
  background: #17200f; border: 1px solid var(--line); border-radius: 10px; padding: 9px;
  min-width: 0;
}
.season-reward-card.place-1 { border-color: #b1913a; background: #2a2312; }
.season-reward-card.place-2 { border-color: #9da9a9; }
.season-reward-card.place-3 { border-color: #9c6a38; }
.season-medal {
  width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 9px; background: #222d16; color: var(--gold2); font-weight: 900;
}
.season-reward-card b,
.season-reward-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.season-reward-card b { font-size: 13px; }
.season-reward-card small { font-size: 11px; color: var(--dim); }
.goal-row {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 0; border-top: 1px dashed #2c3820; border-bottom: 1px dashed #2c3820;
}
.goal-meta {
  display: flex; gap: 9px; flex-wrap: wrap; align-items: center;
  font-size: 11.5px; color: var(--dim);
}
.weekly-title {
  display: flex; justify-content: space-between; gap: 10px; align-items: baseline;
  margin-top: 14px; color: var(--dim);
}
.weekly-title b { color: var(--ink); }
.weekly-title span { font-size: 12px; }
.weekly-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.weekly-card {
  background: #17200f; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; min-width: 0;
}
.weekly-card.done { opacity: .72; }
.weekly-card .bar { margin: 8px 0; }
.weekly-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.weekly-head b { font-size: 13.5px; }
.hof-season { padding: 11px 0; border-bottom: 1px dashed #2c3820; }
.hof-season:last-child { border-bottom: 0; }
.hof-winners { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.hof-winner {
  display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap;
  background: #17200f; border: 1px solid var(--line); border-radius: 10px; padding: 8px;
}
.hof-winner b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hof-winner small { margin-left: auto; white-space: nowrap; }
.hof-winner em {
  flex-basis: 100%; margin-left: 36px; font-style: normal; color: var(--gold2);
  font-size: 11px; line-height: 1.25;
}
.hof-winner.place-1 { border-color: #b1913a; background: #2a2312; }
@media (max-width: 720px) {
  .weekly-grid, .hof-winners, .season-rewards { grid-template-columns: 1fr; }
  .goal-row { align-items: flex-start; flex-wrap: wrap; }
}

/* ---------- opponents ---------- */
.opp-card { display: flex; gap: 12px; align-items: flex-start; }
.opp-card .oc-body { flex: 1; min-width: 0; }
.opp-card h3 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.opp-meta { display: flex; gap: 7px; flex-wrap: wrap; margin: 6px 0 10px; }
.form-dots { display: inline-flex; gap: 3px; margin-left: 2px; }
.form-dots i { width: 16px; height: 16px; border-radius: 4px; font-size: 10px; font-weight: 800; display: grid; place-items: center; font-style: normal; }
.form-dots i.W { background: #2c4a1d; color: #b4e07c; border: 1px solid #55813a; }
.form-dots i.L { background: #4a221c; color: #f0a496; border: 1px solid #81433a; }
.strength-similar { color: var(--gold2); }
.strength-weaker, .strength-muchweaker { color: var(--green); }
.strength-stronger, .strength-muchstronger { color: var(--red); }

/* ---------- scouting ---------- */
.scout-stage {
  position: relative; height: 210px; border-radius: var(--r); overflow: hidden;
  background:
    radial-gradient(320px 150px at 72% 68%, #3d502377, transparent 70%),
    linear-gradient(180deg, #1a2410, #121a0a);
  border: 1px solid var(--line); margin-bottom: 14px;
}
.scout-base { position: absolute; right: 14%; bottom: 20%; font-size: 44px; filter: drop-shadow(0 4px 8px #000); }
.scout-unit { position: absolute; font-size: 20px; bottom: 24%; left: -30px; animation: scoutrun 2.6s forwards; }
.scout-unit.s2 { animation-delay: .3s; bottom: 33%; }
.scout-unit.s3 { animation-delay: .55s; bottom: 16%; }
@keyframes scoutrun { to { left: 62%; opacity: 0; } }
.scan-sweep {
  position: absolute; top: 0; bottom: 0; width: 90px; left: -100px;
  background: linear-gradient(90deg, transparent, #9fe07033, #d6ffa055, transparent);
  animation: sweep 1.6s ease-in-out 1.4s 2;
}
@keyframes sweep { 0% { left: -110px; } 100% { left: 105%; } }
.intel-cards .panel { animation: popIn .35s backwards; }
.intel-cards .panel:nth-child(2) { animation-delay: .15s; }
.intel-cards .panel:nth-child(3) { animation-delay: .3s; }
.intel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.intel-cell { background: #17200f; border: 1px solid var(--line); border-radius: 11px; padding: 11px; animation: popIn .3s backwards; }
.intel-cell small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim2); margin-bottom: 3px; }
.intel-cell b { font-size: 15px; }

/* ---------- attack planner ---------- */
.steps { display: flex; gap: 6px; margin-bottom: 16px; }
.step-dot { flex: 1; text-align: center; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--dim2); padding: 8px 4px; border-radius: 9px; background: #161f0e; border: 1px solid var(--line); }
.step-dot.on { color: var(--gold2); border-color: #6d5620; background: #241f0f; }
.step-dot.done { color: var(--green); }
.atk-type { cursor: pointer; border: 2px solid var(--line); }
.atk-type:hover { border-color: #667e42; }
.atk-type.sel { border-color: var(--gold); box-shadow: 0 0 16px #e6b94f33; }
.atk-type h3 { font-size: 18px; }
.atk-stats { display: flex; flex-direction: column; gap: 5px; margin-top: 9px; font-size: 13px; color: var(--dim); }
.atk-stats b { color: var(--ink); }

.plan-summary { position: sticky; bottom: 4px; z-index: 5; background: linear-gradient(180deg, #26331aee, #1b2415ee); backdrop-filter: blur(8px); border-color: #55683c; }
.plan-summary .sum-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 7px 14px; font-size: 13px; }
.plan-summary .sum-grid > div small { display: block; font-size: 10.5px; color: var(--dim2); text-transform: uppercase; letter-spacing: .06em; }
.plan-summary .sum-grid b { font-size: 15px; }
@media (max-width: 560px) {
  .plan-summary { position: static; }
}

.confirm-vs { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0 16px; }
.confirm-vs .cv-side { display: flex; flex-direction: column; align-items: center; gap: 7px; flex: 1; text-align: center; }
.confirm-vs .cv-vs { font-size: 25px; font-weight: 900; color: var(--gold); }
.confirm-vs .cv-side b { font-size: 15px; }
.confirm-vs .cv-side small { font-size: 12px; }

/* ---------- battle result screen ---------- */
.result-hero { text-align: center; padding: 26px 14px 20px; border-radius: var(--r); margin-bottom: 14px; border: 1px solid var(--line); }
.result-hero.win { background: linear-gradient(180deg, #2e3f14, #1b2610); border-color: #6d8f3f; }
.result-hero.loss { background: linear-gradient(180deg, #43201a, #241210); border-color: #8f4a3f; }
.result-hero.draw { background: linear-gradient(180deg, #3a3a22, #202013); border-color: #8f843f; }
.result-hero h1 { font-size: clamp(28px, 6vw, 40px); letter-spacing: .12em; }
.result-hero.win h1 { color: #c8e88a; text-shadow: 0 0 24px #93c35366; }
.result-hero.loss h1 { color: #f0a496; }
.result-hero.draw h1 { color: #e8dc9a; }
.result-hero .r-sub { color: var(--dim); margin-top: 4px; }
.deploy-line {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 8px;
  margin-top: 12px; font-size: 13px; color: var(--dim);
}
.deploy-line span {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 140px; padding: 7px 10px; border: 1px solid var(--line);
  border-radius: 10px; background: #151c11cc;
}
.deploy-line b { color: var(--ink); font-variant-numeric: tabular-nums; }
.reason-box { display: flex; gap: 11px; align-items: flex-start; background: #17200f; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-top: 14px; text-align: left; }
.reason-box .r-ico { font-size: 21px; }

.rival-card { border: 1px solid var(--line); background: #141b0f; border-radius: 8px; padding: 10px; }
.rival-card.active { border-color: #8f763f; background: #1d1a10; }
.rival-card.hot { border-color: #8f4a3f; background: #221310; }
.rival-score { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rival-score > div {
  min-width: 0; padding: 9px; border: 1px solid #2b351f; border-radius: 8px;
  background: #10160d; text-align: center;
}
.rival-score small { display: block; color: var(--dim2); font-size: 11px; text-transform: uppercase; }
.rival-score b { display: block; margin-top: 3px; color: var(--ink); font-size: 15px; overflow-wrap: anywhere; }
.rival-timeline { display: grid; gap: 8px; margin-top: 10px; }
.rival-event {
  display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 9px;
  padding: 9px; border: 1px solid #2b351f; border-radius: 8px; background: #10160d;
}
.rival-event .r-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dim2); }
.rival-event.win .r-dot { background: var(--green); }
.rival-event.loss .r-dot { background: var(--red); }
.rival-event.draw .r-dot { background: var(--gold2); }
.rival-event b { display: block; font-size: 13px; }
.rival-event small { display: block; color: var(--dim); font-size: 12px; margin-top: 2px; }
.rival-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin-bottom: 10px; }
.rival-mini, .rival-profile-line {
  display: flex; align-items: center; gap: 9px; min-width: 0;
  padding: 9px; border: 1px solid #2b351f; border-radius: 8px; background: #10160d;
}
.rival-mini { cursor: pointer; }
.rival-mini > div, .rival-profile-line > div { flex: 1; min-width: 0; }
.rival-mini b, .rival-profile-line b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rival-mini small, .rival-profile-line small { display: block; color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cas-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cas-table th { text-align: right; color: var(--dim2); font-size: 11px; text-transform: uppercase; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.cas-table th:first-child { text-align: left; }
.cas-table td { padding: 8px; text-align: right; border-bottom: 1px dashed #27321c; font-variant-numeric: tabular-nums; }
.cas-table td:first-child { text-align: left; }
.cas-lost { color: #f0907f; }
.cas-wounded { color: var(--gold2); }
.cas-return { color: var(--green); }

/* ---------- recovery ---------- */
.rec-batch { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px dashed #2c3820; }
.rec-batch:last-child { border-bottom: 0; }
.rec-batch .rb-body { flex: 1; }
.rec-batch .bar { margin-top: 6px; }

/* ---------- missions ---------- */
.mis-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px dashed #2c3820; }
.mis-row:last-child { border-bottom: 0; }
.mis-ico { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; font-size: 20px; background: #222d16; border-radius: 11px; }
.mis-row.done .mis-ico { background: #2c4a1d; }
.mis-body { flex: 1; min-width: 0; }
.mis-body .bar { margin-top: 6px; max-width: 260px; }
.mis-reward { font-size: 12px; color: var(--gold2); white-space: nowrap; }
.badge-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.badge-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 86px; text-align: center; background: #17200f; border: 1px solid var(--line); border-radius: 12px; padding: 12px 6px; font-size: 11px; color: var(--dim); }
.badge-cell .b-ico { font-size: 26px; }
.badge-cell.locked { opacity: .35; filter: grayscale(1); }

/* ---------- settings ---------- */
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px dashed #2c3820; }
.setting-row:last-child { border-bottom: 0; }
.setting-row .s-txt b { display: block; }
.setting-row .s-txt small { font-size: 12.5px; }
.switch { position: relative; width: 52px; height: 28px; flex: 0 0 auto; background: #131a0d; border: 1px solid var(--line); border-radius: 999px; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #6f7a60; transition: all .2s; }
.switch.on { background: #3c5420; border-color: #7a9a4c; }
.switch.on::after { left: 25px; background: #d6e3b8; }

/* ---------- daily crate ---------- */
.crate-stage { text-align: center; padding: 18px 0 8px; }
.crate { font-size: 64px; display: inline-block; animation: crateDrop .7s cubic-bezier(.2,1.4,.4,1); }
.crate.shake { animation: crateShake .5s .7s 2; }
@keyframes crateDrop { from { transform: translateY(-90px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes crateShake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-7deg); } 75% { transform: rotate(7deg); } }
.crate-rewards { display: flex; justify-content: center; gap: 16px; margin: 14px 0 6px; }
.crate-rewards > div { animation: popIn .4s backwards; background: #17200f; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; min-width: 92px; }
.crate-rewards > div:nth-child(2) { animation-delay: .18s; }
.crate-rewards > div:nth-child(3) { animation-delay: .36s; }
.crate-rewards b { display: block; font-size: 18px; }
.crate-rewards small { font-size: 11px; }

/* ---------- profile ---------- */
.profile-head { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; }
.profile-head .ph-txt h2 { text-transform: none; letter-spacing: .02em; font-size: 23px; }
.wl-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.profile-frame { display: inline-grid; place-items: center; border-radius: 20px; padding: 4px; }
.profile-frame.season {
  background: linear-gradient(135deg, #f4d47c, #637d3d 42%, #1a2312 70%);
  box-shadow: 0 0 0 1px #b1913a, 0 0 18px #e6b94f33;
}
.profile-frame.season.place-2 {
  background: linear-gradient(135deg, #d7dfd8, #637d70 44%, #1a2312 72%);
  box-shadow: 0 0 0 1px #b8c5b8, 0 0 16px #d7dfd833;
}
.profile-frame.season.place-3 {
  background: linear-gradient(135deg, #c88f4f, #705133 44%, #1a2312 72%);
  box-shadow: 0 0 0 1px #9c6a38, 0 0 16px #c88f4f33;
}
.honor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.honor-card {
  background: #17200f; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; min-width: 0;
}
.honor-card.place-1 { border-color: #b1913a; background: #2a2312; }
.honor-card.frame { border-style: dashed; }
.honor-card.banner { border-style: solid; }
.honor-card.cosmetic { border-color: #6d8f3f; }
.honor-card .honor-ico {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: #222d16; color: var(--gold2); font-weight: 900; margin-bottom: 8px;
}
.honor-card b { display: block; font-size: 13.5px; }
.honor-card small { display: block; margin-top: 4px; }

/* ---------- release notes ---------- */
.release-page { max-width: 1120px !important; }
.release-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 16px; align-items: stretch;
  margin-bottom: 14px; padding: 22px;
  background: linear-gradient(120deg, #293719, #17200f 72%);
  border: 1px solid #55683c; border-radius: var(--r);
}
.release-hero h1 {
  margin: 10px 0 8px; font-size: clamp(34px, 7vw, 56px);
  line-height: .95; letter-spacing: .04em;
}
.release-hero p { max-width: 760px; color: #d5dec4; font-size: 15.5px; }
.release-stamp {
  display: grid; place-items: center; align-content: center; gap: 6px;
  min-height: 160px; border: 1px solid #6d5620; border-radius: 12px;
  background: linear-gradient(180deg, #2a2312, #17180e);
  text-align: center;
}
.release-stamp b { color: var(--gold2); font-size: 38px; letter-spacing: .08em; }
.release-stamp small { padding: 0 12px; }
.release-summary {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.release-summary > div {
  background: #17200f; border: 1px solid var(--line); border-radius: 10px; padding: 12px;
}
.release-summary small,
.release-next span {
  display: block; color: var(--dim2); font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
}
.release-summary b { display: block; margin-top: 4px; }
.release-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px;
}
.release-card {
  background: #17200f; border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  overflow: hidden;
}
.release-card-art {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 8px; margin-bottom: 11px; border: 1px solid #354322;
  background: #10170c;
}
.release-card h3 { color: var(--gold2); margin-bottom: 6px; }
.release-card p,
.release-blog p { color: var(--dim); font-size: 14px; }
.release-blog p { margin-bottom: 12px; }
.release-blog p:last-child { margin-bottom: 0; }
.release-blog b { color: var(--ink); }
.release-next { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.release-next > div {
  background: #141b0f; border: 1px dashed #354322; border-radius: 10px; padding: 12px;
}
.release-next b { display: block; margin-top: 4px; font-size: 13.5px; }

/* ---------- skins ---------- */
.skin-summary {
  display: flex; align-items: center; gap: 13px;
  background: linear-gradient(120deg, #302714, var(--panel) 68%);
}
.skin-summary .tag { margin-left: auto; }
.skin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.skin-card {
  display: grid; grid-template-columns: 190px 1fr; gap: 14px; align-items: stretch;
  margin-bottom: 0; min-height: 190px;
}
.skin-card.equipped { border-color: #6d8f3f; box-shadow: 0 0 0 1px #6d8f3f22; }
.skin-preview {
  min-height: 160px; border-radius: 12px; border: 1px solid var(--line);
  overflow: hidden; background: #17200f; display: grid; place-items: center;
}
.skin-preview-canvas { width: 100%; height: 100%; min-height: 170px; display: block; }
.skin-default-preview {
  width: 100%; height: 100%; min-height: 170px; display: grid; place-items: center;
  background: linear-gradient(160deg, #35461f, #1c2610);
}
.skin-body { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.skin-body .panel-head { margin-bottom: 6px; }
.skin-body h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.skin-body p { color: var(--dim); font-size: 13.5px; margin-bottom: 10px; }
.skin-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.season-banner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.season-banner-card {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  background: #17200f; border: 1px solid var(--line); border-radius: 12px; padding: 10px;
}
.season-banner-card.equipped { border-color: #6d8f3f; box-shadow: 0 0 0 1px #6d8f3f22; }
.season-banner-card > div { flex: 1; min-width: 0; }
.season-banner-card b,
.season-banner-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.season-banner-card small { color: var(--dim); font-size: 12px; }
.banner-swatch {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 10px;
  background: linear-gradient(135deg, var(--banner), #1c2415);
  border: 1px solid #ffffff33; box-shadow: inset 0 0 0 1px #00000044;
}
.battle-theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 10px; }
.battle-theme-card {
  display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  background: #17200f; border: 1px solid var(--line); border-radius: 12px; padding: 10px; min-width: 0;
}
.battle-theme-card.equipped { border-color: #6d8f3f; box-shadow: 0 0 0 1px #6d8f3f22; }
.battle-theme-card.locked { opacity: .74; }
.battle-theme-card > div { min-width: 0; }
.battle-theme-card b,
.battle-theme-card small { display: block; overflow-wrap: anywhere; }
.battle-theme-card small { color: var(--dim); font-size: 12px; line-height: 1.25; margin: 2px 0 6px; }
.battle-theme-preview {
  position: relative; height: 58px; overflow: hidden; border-radius: 10px;
  border: 1px solid #ffffff2e; background: linear-gradient(180deg, var(--sky0), var(--sky1) 55%, var(--ground) 56%);
}
.battle-theme-preview i {
  position: absolute; left: -14px; right: -14px; bottom: 17px; height: 26px;
  background: var(--hill); clip-path: polygon(0 75%, 24% 25%, 48% 62%, 76% 20%, 100% 70%, 100% 100%, 0 100%);
}
.battle-theme-preview b {
  position: absolute; left: 8px; right: 8px; bottom: 8px; height: 5px;
  background: var(--track); border-radius: 999px; transform: rotate(-4deg);
}
.battle-theme-preview span {
  position: absolute; right: 14px; bottom: 13px; width: 28px; height: 24px;
  background: #6d6142; border: 1px solid #0e130a; border-radius: 3px 3px 1px 1px;
}

@media (max-width: 860px) {
  .skin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .release-hero, .release-summary { grid-template-columns: 1fr; }
  .release-stamp { min-height: 110px; }
  .skin-card { grid-template-columns: 1fr; }
  .battle-theme-card { grid-template-columns: 76px minmax(0, 1fr); }
  .battle-theme-card .btn { grid-column: 1 / -1; width: 100%; }
  .skin-summary { align-items: flex-start; }
  .skin-summary .tag { margin-left: 0; }
}
@media (max-width: 480px) {
  .modal .field-row {
    flex-direction: column;
    align-items: stretch;
  }
  .modal .field-row .btn {
    width: 100%;
  }
  .modal .picker {
    max-height: 132px;
    overflow-y: auto;
    padding-right: 2px;
  }
  .modal .confirm-vs {
    align-items: stretch;
    gap: 10px;
  }
  .modal .confirm-vs .cv-side b,
  .modal .confirm-vs .cv-side small {
    overflow-wrap: anywhere;
  }
  .rival-score {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rival-event {
    grid-template-columns: 12px minmax(0, 1fr);
  }
  .rival-event .btn {
    grid-column: 2;
    justify-self: start;
  }
}

/* ---------- welcome back modal ---------- */
.wb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 13px 0; }
.wb-grid > div { background: #17200f; border: 1px solid var(--line); border-radius: 11px; padding: 11px; }
.wb-grid b { font-size: 17px; display: block; }
.wb-grid small { font-size: 11px; }
