:root {
  color-scheme: light;
  --ink: #142235;
  --muted: #6d7887;
  --line: #e7e8e6;
  --paper: #f5f5f1;
  --card: #ffffff;
  --navy: #10243b;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #2f7f91;
  --danger: #c74747;
  --shadow: 0 12px 38px rgba(25, 40, 60, 0.08);
  --radius: 16px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

.hero-art { position: relative; flex: 0 0 auto; overflow: hidden; border-radius: 7px; background: #e8ece7; isolation: isolate; }
.hero-art-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: #8c9a92; font-family: STKaiti, KaiTi, serif; font-size: 26px; }
.hero-art img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.hero-art img[hidden] { display: none; }
.hero-art--detail { width: calc(100% + 26px); height: 240px; margin: -13px -13px 12px; border-radius: 11px 11px 0 0; }
.capture-hero { min-width: 0; overflow: hidden; }
.hero-art--table { width: 34px; height: 43px; }
.team-hero-cell { display: flex; align-items: center; gap: 8px; }
.team-hero-cell > span { overflow-wrap: anywhere; }
.hero-art--rank { width: 28px; height: 36px; border-radius: 4px; }
.dashboard-lineup > span.dashboard-hero { display: flex; align-items: center; gap: 5px; padding: 4px; text-align: left; }
.dashboard-hero > b { overflow: hidden; text-overflow: ellipsis; font-size: inherit; font-weight: 500; }
.hero-art--mobile { width: 36px; height: 46px; border-radius: 4px; }
.treasure-info { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); min-width: 0; }
.treasure-icon { position: relative; display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; overflow: hidden; border-radius: 8px; background: #ece4d5; color: #90733d; font-size: 14px; }
.treasure-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.treasure-icon img[hidden] { display: none; }
.treasure-copy { min-width: 0; }
.treasure-copy strong { display: block; color: var(--ink); font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.treasure-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.treasure-empty { color: var(--muted); font-size: 11px; }
.treasure-info.compact { margin-top: 4px; padding-top: 0; border: 0; gap: 5px; }
.treasure-info.compact .treasure-icon { flex-basis: 24px; width: 24px; height: 24px; border-radius: 5px; }
.treasure-info.compact .treasure-copy strong { font-size: 10px; line-height: 1.4; }
.team-hero-copy { min-width: 0; }
@media (max-width: 620px) {
  .hero-art--detail { height: 280px; }
}

.capture-panel { overflow: visible; }
.dashboard-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 16px; }
.dashboard-alliance-hint { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.dashboard-alliance-hint:empty { display: none; }
.dashboard-controls .dataset-switch { margin-bottom: 0; }
.dashboard-alliance-control { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--muted); font-size: 13px; }
.dashboard-alliance-control > span { flex: 0 0 auto; white-space: nowrap; }
.dashboard-alliance-control select { min-width: 150px; max-width: min(320px, 70vw); text-overflow: ellipsis; }
@media (max-width: 600px) {
  .dashboard-alliance-control { width: 100%; }
  .dashboard-alliance-control select { flex: 1; max-width: 100%; min-width: 0; }
  .dashboard-controls .dataset-switch { width: 100%; }
}
.alliance-select { min-width: 220px; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.alliance-select > span { flex: 0 0 auto; white-space: nowrap; }
.alliance-select .control { min-width: 160px; width: auto; flex: 1; }
.team-toolbar .search-shell { min-width: 0; }.team-player-search { flex: 0 1 230px; }.team-general-searches { display: grid; grid-template-columns: repeat(3, minmax(125px, 1fr)); gap: 8px; min-width: 390px; flex: 1 1 470px; }
.capture-toolbar { display: flex; align-items: center; gap: 12px; padding: 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.capture-toolbar .compact-switch { margin: 0 auto 0 0; }
.capture-search { min-width: min(320px, 100%); }
.sync-badge.offline .pulse { background: #94a3b8; box-shadow: none; }
.sync-badge.error .pulse { background: #ef4444; box-shadow: 0 0 0 5px rgba(239, 68, 68, .12); }
.capture-side { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.capture-hero { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.capture-hero > span { color: var(--muted); font-size: 12px; }
.capture-hero > strong { display: block; margin: 5px 0; color: var(--ink); }
.capture-skills { color: var(--muted); font-size: 12px; line-height: 1.6; white-space: pre-line; }
@media (max-width: 720px) {
  .team-toolbar .alliance-select, .team-toolbar .search-shell { width: 100%; }
  .capture-toolbar { align-items: stretch; }
  .capture-toolbar .compact-switch, .capture-search { width: 100%; }
  .capture-side { grid-template-columns: 1fr; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; background: var(--paper); color: var(--ink); }
body { min-width: 320px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.login-view { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.1fr) minmax(400px, .9fr); background: #fff; }
.login-story { position: relative; min-height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: clamp(54px, 7vw, 112px); color: white; background: radial-gradient(circle at 72% 22%, rgba(90, 166, 184, .42), transparent 28%), linear-gradient(145deg, #0d1f35 0%, #15344b 58%, #1f5967 100%); }
.login-story::before { content: ""; position: absolute; inset: 0; opacity: .13; background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom right, transparent 5%, black, transparent 88%); }
.story-orbit { position: absolute; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; }
.story-orbit-one { width: 520px; height: 520px; right: -170px; top: 4%; }
.story-orbit-two { width: 340px; height: 340px; right: -50px; top: 18%; }
.story-mark { position: absolute; top: 13%; right: 8%; writing-mode: vertical-rl; font-family: STKaiti, KaiTi, serif; font-size: clamp(68px, 7vw, 108px); line-height: 1; letter-spacing: .08em; color: rgba(255,255,255,.1); transform: rotate(-8deg); }
.story-copy { position: relative; z-index: 1; max-width: 650px; }
.story-copy h1 { margin: 15px 0 26px; font-family: STKaiti, KaiTi, serif; font-size: clamp(48px, 5vw, 78px); line-height: 1.2; font-weight: 500; letter-spacing: .035em; }
.story-copy > p:last-child { max-width: 480px; color: rgba(255,255,255,.7); font-size: 17px; line-height: 1.8; }
.story-foot { position: absolute; bottom: 38px; left: clamp(54px, 7vw, 112px); color: rgba(255,255,255,.52); font-size: 13px; letter-spacing: .12em; }
.login-panel { display: grid; place-items: center; padding: 44px; background: #fbfbfa; }
.login-card { width: min(100%, 410px); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-weight: 750; letter-spacing: .03em; }
.brand.compact { margin-bottom: 72px; }
.brand-glyph { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px 11px 11px 3px; color: #fff; background: linear-gradient(145deg, #224d66, #2f7f91); font-family: STKaiti, KaiTi, serif; font-size: 22px; box-shadow: 0 8px 18px rgba(27, 85, 104, .25); }
.eyebrow { margin: 0 0 9px; color: #397688; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.eyebrow.light { color: #7cc1ca; }
.login-heading { margin-bottom: 34px; }
.login-heading h2 { margin: 0 0 11px; font-size: 31px; letter-spacing: -.02em; }
.login-heading p:last-child, .page-heading p, .section-title p { margin: 0; color: var(--muted); line-height: 1.7; }
.field-label { display: flex; justify-content: space-between; margin: 19px 0 8px; color: #384657; font-size: 13px; font-weight: 650; }
.label-note { color: #929aa4; font-weight: 400; }
.input-shell { display: flex; align-items: center; border: 1px solid #dfe3e7; border-radius: 11px; background: #fff; transition: .2s; }
.input-shell:focus-within { border-color: #5c8ea0; box-shadow: 0 0 0 4px rgba(47, 127, 145, .09); }
.input-shell input { min-width: 0; flex: 1; padding: 13px 8px; border: 0; outline: 0; background: transparent; color: var(--ink); }
.input-icon { width: 42px; color: #81909e; text-align: center; font-size: 12px; }
.icon-button { border: 0; padding: 8px 12px; color: #5f7080; background: transparent; font-size: 12px; }
.form-error { min-height: 20px; margin: 9px 0; color: var(--danger); font-size: 13px; }
.login-note { margin: 18px 0 0; color: #9aa1a8; text-align: center; font-size: 12px; line-height: 1.6; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; border: 1px solid transparent; border-radius: 9px; padding: 0 16px; font-weight: 650; font-size: 13px; transition: transform .16s, background .16s, border-color .16s, box-shadow .16s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .5; }
.button.primary { color: #fff; background: var(--navy); box-shadow: 0 7px 15px rgba(16, 36, 59, .15); }
.button.primary:hover:not(:disabled) { background: #1b3a58; }
.button.secondary { border-color: #dce1e5; color: #344457; background: #fff; }
.button.secondary:hover { border-color: #bac5cd; }
.button.ghost { border-color: #e3e6e8; color: #536270; background: transparent; }
.button.text { color: #70808d; background: transparent; }
.button.wide { width: 100%; min-height: 47px; }
.button.small { min-height: 34px; padding: 0 12px; }

.app-view { min-height: 100vh; }
.app-header { position: sticky; z-index: 20; top: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: clamp(24px, 3vw, 48px); align-items: center; height: 70px; padding: 0 clamp(22px, 4vw, 64px); border-bottom: 1px solid #e6e7e3; background: rgba(250, 250, 247, .92); backdrop-filter: blur(15px); }
.header-identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.header-identity .brand { flex-shrink: 0; }
.server-badge { flex: 0 0 auto; max-width: 136px; overflow: hidden; text-overflow: ellipsis; padding: 7px 10px; border-radius: 8px; background: #eaf2f2; color: #285e6b; font-size: 13px; white-space: nowrap; }
.header-identity .server-select { appearance: none; -webkit-appearance: none; flex: 0 0 136px; width: 136px; min-width: 136px; height: 34px; min-height: 34px; max-height: 34px; padding: 0 30px 0 10px; border-radius: 8px; font-size: 12px; line-height: normal; background-color: #fff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23536370' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 12px 12px; }
.main-nav { align-self: stretch; display: flex; justify-content: center; min-width: 0; gap: 30px; }
.nav-item { position: relative; flex: 0 0 auto; white-space: nowrap; border: 0; padding: 2px 0 0; color: #7b858f; background: transparent; font-size: 14px; font-weight: 650; }
.nav-item::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 3px 3px 0 0; background: transparent; }
.nav-item.active { color: var(--ink); }
.nav-item.active::after { background: #2d7181; }
.user-menu { justify-self: end; display: flex; align-items: center; gap: 11px; }
.user-copy { display: grid; text-align: right; line-height: 1.25; }
.user-copy strong { font-size: 13px; }
.user-copy span { color: #89939d; font-size: 11px; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: white; background: linear-gradient(145deg, #b08c5c, #6a4b2d); font-size: 13px; font-weight: 800; }
.workspace { width: min(100% - 44px, 1540px); margin: 0 auto; padding: 48px 0 70px; }
.dashboard-timestamp { color: var(--muted); font-size: 12px; margin: 14px 0 18px; }
.dashboard-notice { border: 1px solid #e8d8b8; border-radius: 12px; padding: 14px 18px; color: #806231; background: #fffbf2; line-height: 1.7; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.dashboard-board { min-width: 0; overflow: hidden; }
.dashboard-ranking { max-height: 440px; overflow-y: auto; scrollbar-width: thin; }
.dashboard-board-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); }
.dashboard-board-footer span { min-width: 0; overflow-wrap: anywhere; color: var(--muted); font-size: 12px; }
.dashboard-board-footer .button { flex-shrink: 0; min-height: 40px; }
#dashboardStats .stat-icon.purple { color: #7962ab; background: #f1ecfa; }
.dashboard-board .section-title { padding: 22px; }
.dashboard-board .section-title h2 { font-size: 18px; }
.dashboard-board-mark { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; color: #2b67ad; background: #eaf2fb; }
.dashboard-board-mark.green { color: #33815e; background: #e9f6ef; }
.dashboard-board-mark.amber { color: #ad772b; background: #fff5df; }
.dashboard-board-mark.purple { color: #7962ab; background: #f1ecfa; }
.dashboard-rank-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; border: 0; border-bottom: 1px solid #eff0ee; padding: 16px 22px; background: #fff; text-align: left; color: var(--ink); }
.dashboard-rank-row:hover { background: #f5f9f8; }
.dashboard-rank-row:focus-visible { outline: 2px solid #397688; outline-offset: -2px; }
.dashboard-rank-row:last-child { border-bottom: 0; }
.dashboard-rank-number { display: grid; place-items: center; width: 26px; height: 28px; border-radius: 7px; color: #8a949d; background: #f4f6f5; font-weight: 800; }
.dashboard-rank-number.rank-1 { color: #996627; background: #fff0d3; }
.dashboard-rank-number.rank-2 { color: #5b778b; background: #eaf0f6; }
.dashboard-rank-number.rank-3 { color: #9c6b57; background: #f8eee6; }
.dashboard-rank-info { min-width: 0; }
.dashboard-rank-info > strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.dashboard-rank-info > small { display: block; color: var(--muted); margin: 4px 0 8px; font-size: 11px; overflow-wrap: anywhere; }
.dashboard-lineup { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.dashboard-lineup > span { padding: 6px; border-radius: 6px; background: #f1f5f4; color: #516872; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; text-align: center; }
.dashboard-rank-metric { text-align: right; font-variant-numeric: tabular-nums; }
.dashboard-rank-metric strong { display: block; color: #286b7d; font-size: 20px; }
.dashboard-rank-metric small { display: block; color: var(--muted); margin-top: 4px; font-size: 10px; }
.dashboard-empty { padding: 36px 18px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.8; }
.merit-notice { margin: 0; padding: 0 22px 16px; color: var(--muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.merit-subheading { margin: 0; padding: 16px 22px; border-top: 1px solid var(--line); font-size: 14px; }
.dashboard-merit { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 22px; }
.dashboard-merit > div { display: grid; gap: 14px; border-radius: 12px; padding: 22px; color: var(--muted); background: #f7f8f6; }
.dashboard-merit strong { color: var(--ink); font-size: 28px; }
.dashboard-rules { margin-top: 18px; padding: 18px 22px; font-size: 12px; color: var(--muted); line-height: 1.8; }
.dashboard-rules summary { cursor: pointer; color: #536877; font-weight: 700; }
.lineup-naming { display: grid; gap: 10px; padding: 16px; }
.lineup-naming label,.lineup-variant-note { color: var(--muted); font-size: 12px; }
.lineup-variant-note { padding: 0 16px; line-height: 1.8; }
.lineup-variants { padding: 0 12px 14px; }
.lineup-variant { margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.lineup-variant h4 { margin: 0 0 12px; color: #356678; font-size: 13px; }
.dashboard-mobile-tabs { display: none; }
@media (max-width: 760px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-mobile-tabs { display: flex; gap: 4px; padding: 5px; border-radius: 12px; background: #e9edeb; margin: 16px 0; overflow-x: auto; scrollbar-width: thin; }
  .dashboard-mobile-tabs button { flex: 1 0 auto; min-width: 64px; }
  .dashboard-mobile-tabs button { border: 0; border-radius: 8px; padding: 11px 2px; font-size: 12px; background: transparent; color: #66737d; white-space: nowrap; }
  .dashboard-mobile-tabs button.active { color: #173b50; background: #fff; box-shadow: 0 3px 10px #1c303f12; }
  .dashboard-board.mobile-inactive { display: none; }
  .dashboard-ranking { max-height: none; overflow: visible; }
  .dashboard-ranking.expanded { max-height: 65vh; overflow-y: auto; }
  .dashboard-board-footer { padding: 12px 10px; }
  .dashboard-board .section-title { padding: 18px 14px; }
  .dashboard-rank-row { padding: 14px 10px; gap: 7px; grid-template-columns: 24px minmax(0, 1fr) auto; }
  .dashboard-rank-metric strong { font-size: 17px; }
  .dashboard-lineup > span { padding: 5px 2px; font-size: 10px; }
  .dashboard-rules { padding: 16px 14px; }
}
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-heading h1 { margin: 0 0 6px; font-size: 30px; letter-spacing: -.025em; }
.sync-badge { display: flex; align-items: center; gap: 8px; border: 1px solid #dce5df; border-radius: 999px; padding: 8px 12px; color: #527064; background: #f8fbf9; font-size: 12px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: #45a36f; box-shadow: 0 0 0 4px rgba(69, 163, 111, .11); }
.dataset-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 660px; margin-bottom: 18px; border-radius: 16px; padding: 6px; background: #e9edeb; }
.dataset-tab { display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 11px; align-items: center; border: 1px solid transparent; border-radius: 12px; padding: 11px 15px; color: #66737d; background: transparent; text-align: left; transition: border-color .18s, background .18s, box-shadow .18s, color .18s; }
.dataset-tab > span { grid-row: 1 / 3; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: #647982; background: rgba(255,255,255,.62); font-weight: 800; }
.dataset-tab strong { color: inherit; font-size: 14px; }.dataset-tab small { margin-top: 2px; color: #8a949b; font-size: 11px; }
.dataset-tab:hover { color: #284c59; background: rgba(255,255,255,.5); }
.dataset-tab.active { border-color: #d9e2df; color: #173b50; background: #fff; box-shadow: 0 6px 18px rgba(28,48,63,.08); }
.dataset-tab.active > span { color: #fff; background: linear-gradient(145deg, #347f8c, #285f70); }
.compact-switch { max-width: 520px; margin-top: -10px; }
.team-scope-switch { max-width: 500px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { display: flex; align-items: center; gap: 15px; min-height: 104px; border: 1px solid #e5e6e2; border-radius: 14px; padding: 18px 20px; background: rgba(255,255,255,.82); box-shadow: 0 7px 24px rgba(35, 47, 61, .035); }
.stat-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px; font-weight: 750; line-height: 1; text-align: center; }
.stat-icon.blue { color: #2b67ad; background: #eaf2fb; }.stat-icon.green { color: #33815e; background: #e9f6ef; }.stat-icon.amber { color: #a86d24; background: #fff3de; }.stat-icon.violet { color: #7557a8; background: #f1ecfa; }
.stat-card > div > span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 12px; }
.stat-card strong { font-size: 25px; font-variant-numeric: tabular-nums; }
.panel { position: relative; border: 1px solid #e3e5e2; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.query-panel { z-index: 4; margin-bottom: 18px; padding: 16px; }
.query-toolbar { display: flex; gap: 9px; }
.search-shell { min-width: 260px; flex: 1; display: flex; align-items: center; border: 1px solid #dfe3e6; border-radius: 9px; background: #fafbf9; }
.search-shell span { padding-left: 14px; color: #71808d; font-size: 21px; transform: rotate(-12deg); }
.search-shell input { width: 100%; border: 0; outline: 0; padding: 10px 12px; color: var(--ink); background: transparent; }
.filter-list { display: grid; gap: 9px; margin-top: 0; }
.filter-list:not(:empty) { margin-top: 13px; padding-top: 13px; border-top: 1px solid #eef0ed; }
.filter-row { display: grid; grid-template-columns: minmax(145px, 1fr) minmax(116px, .7fr) minmax(170px, 1.4fr) auto; gap: 8px; align-items: center; }
.filter-row.between { grid-template-columns: minmax(145px, 1fr) minmax(116px, .7fr) minmax(120px, 1fr) minmax(120px, 1fr) auto; }
.control { width: 100%; height: 40px; border: 1px solid #dfe3e6; border-radius: 9px; outline: none; padding: 0 11px; color: var(--ink); background: #fff; }
select.control { appearance: none; -webkit-appearance: none; padding-right: 36px; text-overflow: ellipsis; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='m3 5 4 4 4-4' fill='none' stroke='%23536370' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px 14px; }
.control:focus { border-color: #5e91a0; box-shadow: 0 0 0 3px rgba(47,127,145,.08); }
.remove-filter { width: 38px; height: 38px; border: 0; border-radius: 8px; color: #8c969e; background: transparent; font-size: 19px; }
.remove-filter:hover { color: var(--danger); background: #fff1f0; }
.popover { position: absolute; top: 68px; right: 93px; width: min(460px, calc(100vw - 60px)); border: 1px solid #dfe3e4; border-radius: 13px; padding: 15px; background: #fff; box-shadow: 0 20px 50px rgba(22, 38, 54, .18); }
.popover-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.link-button { border: 0; padding: 5px; color: #33788b; background: transparent; font-size: 12px; }
.column-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; max-height: 330px; overflow: auto; }
.column-option { display: flex; gap: 7px; align-items: center; padding: 7px 6px; color: #42515e; font-size: 12px; }
.column-option input { accent-color: #2f7787; }
.table-panel { overflow: hidden; }
.table-meta { display: flex; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid #ebedea; color: #586777; font-size: 12px; }
.table-hint { color: #99a1a8; }
.table-scroll { position: relative; min-height: 320px; max-height: 62vh; overflow: auto; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; white-space: nowrap; }
.data-table th { position: sticky; z-index: 2; top: 0; border-bottom: 1px solid #e6e9e7; padding: 12px 14px; color: #5b6875; background: #f8f9f7; text-align: left; font-size: 11px; font-weight: 750; }
.data-table th button { border: 0; padding: 0; color: inherit; background: transparent; font: inherit; }
.data-table td { max-width: 260px; overflow: hidden; border-bottom: 1px solid #eff0ee; padding: 12px 14px; color: #344252; text-overflow: ellipsis; font-size: 12px; }
.data-table tbody tr { cursor: pointer; outline: none; }
.data-table tbody tr:hover td, .data-table tbody tr:focus td { background: #f5f9f8; }
.data-table tbody tr:focus-visible td { box-shadow: inset 0 2px #4c8794, inset 0 -2px #4c8794; }
.data-table tr:last-child td { border-bottom: 0; }
.team-mobile-list { display: none; }
.numeric { text-align: right !important; font-variant-numeric: tabular-nums; }
.cell-player { font-weight: 700; color: #183d57 !important; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 8px; font-size: 11px; }
.status-pill.active { color: #287154; background: #e9f6ef; }.status-pill.retired { color: #8a6262; background: #f6eeee; }
.status-pill.neutral { color: #4d6680; background: #eaf0f6; }
.empty-state { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; color: #8a949d; text-align: center; }
.empty-state h3 { margin: 13px 0 5px; color: #495866; }.empty-state p { margin: 0; font-size: 13px; }.empty-illustration { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; color: #5a8190; background: #edf4f4; font-size: 31px; }
.pagination { display: flex; justify-content: space-between; align-items: center; padding: 13px 17px; border-top: 1px solid #e8eae7; color: #727e89; font-size: 12px; }
.pagination select { border: 1px solid #dfe3e5; border-radius: 7px; padding: 4px 6px; background: #fff; }
.pagination > div { display: flex; align-items: center; gap: 12px; }
.page-button { width: 32px; height: 30px; border: 1px solid #dfe3e5; border-radius: 7px; color: #50616f; background: #fff; font-size: 18px; }
.page-button:disabled { opacity: .35; cursor: not-allowed; }

.accounts-panel { overflow: hidden; }
.snapshot-panel { padding-bottom: 24px; }
.snapshot-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; flex: 0 0 auto; max-width: 100%; }
.snapshot-actions .control { width: 150px; min-width: 150px; flex: 0 0 auto; }
.snapshot-actions .button { flex: 0 0 auto; min-height: 40px; white-space: nowrap; }
.snapshot-progress { display: flex; align-items: center; gap: 14px; padding: 8px 24px 20px; }
.progress-track { height: 10px; flex: 1; overflow: hidden; border-radius: 999px; background: #e8eeec; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2f7f91, #45a36f); transition: width .3s; }
.snapshot-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 0 24px; }
.snapshot-facts div { border-radius: 10px; padding: 14px; background: #f7f9f8; }
.snapshot-facts span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.snapshot-facts strong { font-size: 13px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 24px; }
.section-title h2 { margin: 0 0 4px; font-size: 17px; }.section-title p { font-size: 12px; }
.count-pill { flex-shrink: 0; white-space: nowrap; border-radius: 999px; padding: 6px 10px; color: #486f79; background: #edf4f4; font-size: 11px; }
.account-list-head, .account-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr) minmax(0, .65fr) minmax(150px, 1fr) 132px; align-items: center; gap: 15px; padding: 14px 24px; }
.account-list-head > span:last-child { text-align: right; }
.account-row > span { min-width: 0; }
.account-row > span:nth-child(4) { white-space: nowrap; }
.account-list-head { border-top: 1px solid #eaebe9; border-bottom: 1px solid #eaebe9; color: #8b949d; background: #f9faf8; font-size: 11px; }
.account-row { min-height: 69px; border-bottom: 1px solid #eeefed; font-size: 13px; }.account-row:last-child { border-bottom: 0; }
.account-name { display: flex; align-items: center; gap: 11px; overflow-wrap: anywhere; font-weight: 700; }.account-avatar { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; color: #365b66; background: #eaf2f2; }
.role-pill, .account-status { width: fit-content; max-width: 100%; overflow-wrap: anywhere; border-radius: 999px; padding: 4px 8px; font-size: 11px; }.role-pill { color: #615c89; background: #f0eef8; }.account-status.active { color: #287154; background: #e9f6ef; }.account-status.expired { color: #a65151; background: #f9eaea; }
.account-actions { display: flex; justify-content: flex-end; gap: 7px; }.action-button { flex-shrink: 0; white-space: nowrap; border: 1px solid #dfe3e5; border-radius: 8px; padding: 7px 10px; color: #526370; background: #fff; font-size: 11px; }
.import-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .55fr); gap: 18px; align-items: start; }
.import-card { padding-bottom: 23px; }.import-card > *:not(.section-title) { margin-left: 24px; margin-right: 24px; }
.import-card > .button.wide { width: calc(100% - 48px); }
.drop-zone { min-height: 220px; display: grid; place-items: center; align-content: center; gap: 8px; border: 1.5px dashed #bdcbd0; border-radius: 13px; color: #71808b; background: #f8fbfa; text-align: center; transition: .2s; }
.drop-zone:hover, .drop-zone.dragging { border-color: #4b8a97; background: #f1f8f7; }.drop-zone strong { color: #405361; }.drop-zone span:last-child { font-size: 12px; }.upload-mark { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 8px; border-radius: 50%; color: #2b7888; background: #e5f1f2; font-size: 25px; }
.selected-file { margin-top: 13px !important; border-radius: 9px; padding: 12px 14px; color: #355260; background: #eef5f5; font-size: 13px; }
.warning-box { display: flex; gap: 11px; align-items: flex-start; margin-top: 16px !important; margin-bottom: 16px !important; border: 1px solid #f0dfbd; border-radius: 10px; padding: 12px 14px; color: #85672f; background: #fffaf0; font-size: 12px; }.warning-box > span { display: grid; place-items: center; width: 20px; height: 20px; flex: none; border-radius: 50%; color: #fff; background: #c89a45; font-weight: 800; }.warning-box p { margin: 0; line-height: 1.6; }
.progress { height: 4px; overflow: hidden; border-radius: 4px; background: #e7eceb; }.progress span { display: block; width: 45%; height: 100%; border-radius: inherit; background: #3f8491; animation: progress 1.1s infinite ease-in-out; }
@keyframes progress { from { transform: translateX(-110%); } to { transform: translateX(330%); } }
.import-history { padding-bottom: 10px; }.import-fact { display: grid; gap: 5px; margin: 0 23px; padding: 16px 0; border-top: 1px solid #eceeeb; }.import-fact span { color: #8b959e; font-size: 11px; }.import-fact strong { overflow-wrap: anywhere; font-size: 13px; }

.dialog { width: min(480px, calc(100vw - 34px)); border: 0; border-radius: 17px; padding: 0; color: var(--ink); box-shadow: 0 25px 80px rgba(20, 33, 49, .25); }.dialog::backdrop { background: rgba(11, 24, 38, .48); backdrop-filter: blur(3px); }.dialog form { padding: 25px; }.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }.dialog-head h2 { margin: 0; font-size: 22px; }.dialog-close { border: 0; padding: 0; color: #74818c; background: transparent; font-size: 26px; line-height: 1; }.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; }
.drawer-backdrop { position: fixed; z-index: 70; inset: 0; display: flex; justify-content: flex-end; background: rgba(9, 22, 35, 0); backdrop-filter: blur(0); transition: background .25s ease, backdrop-filter .25s ease; }
.drawer-backdrop.open { background: rgba(9, 22, 35, .42); backdrop-filter: blur(2px); }
.detail-drawer { width: min(680px, 100vw); height: 100%; overflow: auto; color: var(--ink); background: #f7f7f4; box-shadow: -22px 0 60px rgba(9, 25, 39, .2); transform: translateX(100%); transition: transform .28s cubic-bezier(.22,.8,.28,1); }
.drawer-backdrop.open .detail-drawer { transform: translateX(0); }
.battle-detail-backdrop { z-index: 80; }
.battle-detail-note { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0 4px 16px; }
.battle-hero-hp { color: var(--muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.battle-detail-link { margin-top: 12px; width: 100%; }
#battleContent .capture-hero { min-width: 0; overflow-wrap: anywhere; }
#battleContent .detail-item strong { overflow-wrap: anywhere; }
#battleDrawer .drawer-title-line { flex-wrap: wrap; }
#battleTitle { max-width: 100%; white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
#battleStatus { flex: 0 0 auto; white-space: nowrap; }
#battleDrawer .drawer-heading > p:last-child { white-space: normal; overflow-wrap: anywhere; }
#battleContent .capture-side { padding: 12px; }
.drawer-header { position: sticky; z-index: 2; top: 0; display: flex; justify-content: space-between; gap: 20px; min-height: 128px; padding: 29px 32px 23px; border-bottom: 1px solid #dfe4e1; background: rgba(255,255,253,.94); backdrop-filter: blur(14px); }
.drawer-heading { min-width: 0; }.drawer-heading .eyebrow { margin-bottom: 7px; }.drawer-title-line { display: flex; align-items: center; gap: 11px; }.drawer-title-line h2 { overflow: hidden; margin: 0; font-size: 25px; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }.drawer-heading > p:last-child { overflow: hidden; margin: 7px 0 0; color: #75808a; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.drawer-close { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border: 1px solid #dce2df; border-radius: 10px; color: #66737e; background: #fff; font-size: 24px; line-height: 1; }.drawer-close:hover { color: var(--ink); border-color: #bdc8c5; }
.drawer-content { padding: 24px 32px 42px; }
.lineup-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 23px; }
.lineup-card { position: relative; overflow: hidden; min-height: 116px; border: 1px solid #dde5e2; border-radius: 14px; padding: 17px; background: linear-gradient(145deg, #ffffff, #eef5f3); }
.lineup-card::after { content: attr(data-mark); position: absolute; right: 8px; bottom: -17px; color: rgba(46, 112, 124, .08); font-family: STKaiti, KaiTi, serif; font-size: 72px; }
.lineup-card span { position: relative; z-index: 1; display: block; margin-bottom: 20px; color: #67808a; font-size: 11px; font-weight: 700; letter-spacing: .1em; }.lineup-card strong { position: relative; z-index: 1; display: block; overflow: hidden; font-size: 19px; text-overflow: ellipsis; white-space: nowrap; }
.detail-section { margin-top: 14px; border: 1px solid #e1e5e2; border-radius: 14px; background: #fff; box-shadow: 0 8px 26px rgba(25,40,56,.035); }
.detail-section-head { display: flex; align-items: center; gap: 9px; padding: 16px 18px 13px; border-bottom: 1px solid #edf0ed; }.detail-section-head span { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; color: #326f7c; background: #eaf3f3; font-size: 12px; }.detail-section-head h3 { margin: 0; font-size: 14px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 5px 18px 13px; column-gap: 28px; }
.detail-item { min-width: 0; padding: 12px 0; border-bottom: 1px solid #f0f1ef; }.detail-item:nth-last-child(-n + 2) { border-bottom: 0; }.detail-item label { display: block; margin-bottom: 5px; color: #8a949c; font-size: 11px; }.detail-item strong { display: block; overflow-wrap: anywhere; color: #334251; font-size: 13px; line-height: 1.55; }
.detail-grid.metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 22px; }.detail-grid.metrics .detail-item:nth-last-child(-n + 3) { border-bottom: 0; }
.team-battle-list { display: grid; gap: 12px; padding: 16px 18px 18px; }.team-battle-loading, .team-battle-total { margin: 4px 0; color: #7d8992; font-size: 12px; text-align: center; }.team-battle-card { overflow: hidden; border: 1px solid #e2e7e4; border-radius: 12px; background: #fafbf9; }.team-battle-card-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid #e8ece9; }.team-battle-card-head > strong { font-size: 13px; }.team-result { min-width: 27px; border-radius: 999px; padding: 4px 8px; color: #65727b; background: #edf0ef; font-size: 11px; text-align: center; }.team-result.win { color: #287154; background: #e5f4eb; }.team-result.loss { color: #a14b4b; background: #f8e8e8; }.team-result.draw { color: #8b6b2d; background: #f8f0dc; }.team-battle-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; padding: 13px 14px; }.team-battle-facts > div { min-width: 0; }.team-battle-facts span { display: block; margin-bottom: 3px; color: #8a949c; font-size: 10px; }.team-battle-facts strong { display: block; overflow-wrap: anywhere; color: #384957; font-size: 12px; }.team-battle-details { border-top: 1px solid #e8ece9; }.team-battle-details summary { padding: 11px 14px; color: #357684; cursor: pointer; font-size: 12px; font-weight: 700; }.team-battle-side { padding: 2px 12px 12px; }.team-battle-side h4 { margin: 8px 0; color: #63737e; font-size: 12px; }.team-battle-more { justify-self: center; }
.skill-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 15px 18px 18px; }.skill-card { min-width: 0; border-radius: 11px; padding: 13px; background: #f7f9f8; }.skill-card span { display: block; margin-bottom: 7px; color: #7f8c95; font-size: 10px; }.skill-card strong { display: block; overflow-wrap: anywhere; font-size: 12px; line-height: 1.5; }
body.drawer-open { overflow: hidden; }
.toast-region { position: fixed; z-index: 100; right: 22px; top: 20px; display: grid; gap: 10px; }.toast { min-width: 250px; max-width: 390px; border: 1px solid #dfe5e2; border-left: 4px solid #4a8c78; border-radius: 10px; padding: 13px 15px; color: #344550; background: #fff; box-shadow: 0 14px 40px rgba(22,36,51,.16); font-size: 13px; animation: toast-in .2s ease-out; }.toast.error { border-left-color: #c75151; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

@media (max-width: 1280px) {
  .app-header { grid-template-columns: auto 1fr; height: auto; min-height: 66px; padding: 12px 22px 0; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; width: 100%; height: 48px; justify-content: flex-start; }
}

@media (max-width: 900px) {
  .account-list-head { display: none; }
  .account-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px; padding: 14px 15px; }
  .account-name { grid-column: 1; grid-row: 1 / 3; }
  .account-row > span:nth-child(2), .account-row > span:nth-child(3) { grid-column: 2; justify-self: end; }
  .account-row > span:nth-child(4) { grid-column: 1 / -1; color: #7c8790; font-size: 11px; white-space: normal; }
  .account-actions { grid-column: 1 / -1; flex-wrap: wrap; }
  .account-actions .action-button { flex: 1; }
  .login-view { grid-template-columns: 1fr; }.login-story { display: none; }.login-panel { min-height: 100vh; padding: 30px; }.brand.compact { margin-bottom: 54px; }
  .app-header { grid-template-columns: auto 1fr; height: auto; min-height: 66px; padding: 12px 22px 0; }.main-nav { grid-column: 1 / -1; grid-row: 2; order: 3; width: 100%; height: 48px; justify-content: flex-start; gap: 24px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }.main-nav::-webkit-scrollbar { display: none; }.nav-item { flex: 0 0 auto; }.user-menu { justify-self: end; }.user-copy { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }.query-toolbar { flex-wrap: wrap; }.search-shell { flex-basis: 100%; }.import-layout { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  body { overflow-x: hidden; }
  .app-header { column-gap: 12px; }
  .login-panel { padding: 24px 20px; }.brand.compact { margin-bottom: 42px; }.login-heading h2 { font-size: 27px; }
  .app-header { grid-template-columns: auto 1fr; padding: 10px 10px 0; }.brand > span:last-child { display: none; }.brand-glyph { width: 34px; height: 34px; }.user-menu { gap: 7px; }.avatar { width: 32px; height: 32px; }.button.small { min-height: 32px; padding: 0 8px; }.main-nav { width: calc(100vw - 20px); height: 46px; gap: 6px; }.nav-item { min-height: 42px; border-radius: 8px; padding: 2px 11px 0; font-size: 13px; }.nav-item.active { background: #edf3f2; }.nav-item::after { right: 10px; left: 10px; }
  .workspace { width: calc(100% - 20px); padding: 24px 0 44px; }.page-heading { align-items: stretch; flex-direction: column; gap: 14px; margin-bottom: 20px; }.page-heading h1 { font-size: 26px; }.page-heading > .button { width: 100%; }.snapshot-actions { align-items: stretch; flex-direction: column; }.snapshot-actions .control, .snapshot-actions .button { width: 100%; }.sync-badge { display: none; }
  .dataset-switch { width: 100%; gap: 5px; padding: 5px; }.dataset-tab { grid-template-columns: 31px 1fr; column-gap: 8px; padding: 9px; }.dataset-tab > span { width: 31px; height: 31px; }.dataset-tab small { display: none; }.stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }.stat-card { min-width: 0; min-height: 82px; gap: 10px; padding: 12px; }.stat-icon { width: 34px; height: 34px; }.stat-card strong { overflow-wrap: anywhere; font-size: 18px; }
  .query-panel { margin-bottom: 12px; padding: 12px; }.query-toolbar { gap: 7px; }.query-toolbar .button { flex: 1 1 calc(50% - 4px); padding: 0 10px; }.query-toolbar .button.text { flex: 0 0 auto; }.search-shell, .team-toolbar .search-shell { min-width: 0; flex-basis: 100%; }.alliance-select { min-width: 0; }.team-toolbar .alliance-select { align-items: stretch; flex-direction: column; gap: 5px; }.team-toolbar .team-player-search { flex: 1 1 100%; }.team-general-searches { width: 100%; min-width: 0; flex: 1 1 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }.team-toolbar .team-general-search { width: auto; flex-basis: auto; }.team-general-search input { min-width: 0; padding: 10px 8px; font-size: 12px; }.alliance-select .control { min-width: 0; }.filter-row, .filter-row.between { grid-template-columns: minmax(0, 1fr) 38px; }.filter-row > :not(.remove-filter), .filter-row.between > :not(.remove-filter) { grid-column: 1; }.filter-row .remove-filter, .filter-row.between .remove-filter { grid-column: 2; grid-row: 1; }.column-list { grid-template-columns: repeat(2, 1fr); }.popover { top: 118px; right: 8px; width: calc(100vw - 36px); }
  .panel { border-radius: 12px; }.table-hint { display: none; }.table-meta { padding: 12px 14px; }.table-scroll { min-height: 0; max-height: none; overflow: visible; }.data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }.data-table thead { display: none; }.data-table { white-space: normal; }.data-table tbody { display: grid; gap: 10px; padding: 10px; background: #f4f6f4; }.data-table tbody tr { overflow: hidden; border: 1px solid #e1e6e3; border-radius: 11px; background: #fff; box-shadow: 0 3px 12px rgba(24,40,55,.035); }.data-table td, .data-table td.numeric { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; max-width: none; min-height: 38px; border-bottom: 1px solid #f0f2f0; padding: 10px 12px; text-align: right !important; text-overflow: clip; white-space: normal; }.data-table td::before { content: attr(data-label); flex: 0 0 82px; color: #89939b; text-align: left; font-size: 11px; font-weight: 500; }.data-table td:last-child { border-bottom: 0; }.data-table td.cell-player { background: #f8fbfa; font-size: 14px; }.data-table tbody tr:hover td, .data-table tbody tr:focus td { background: inherit; }.data-table tbody tr:hover td.cell-player, .data-table tbody tr:focus td.cell-player { background: #f8fbfa; }
  #teamsPage .table-panel { scroll-margin-top: 116px; }#teamsPage .data-table { display: none; }.team-mobile-list { display: grid; gap: 8px; padding: 8px; background: #f1f4f2; }.team-mobile-card { overflow: hidden; border: 1px solid #dce3df; border-radius: 11px; background: #fff; box-shadow: 0 3px 10px rgba(24,40,55,.035); outline: none; }.team-mobile-card:focus-visible { border-color: #4c8794; box-shadow: 0 0 0 3px rgba(47,127,145,.12); }.team-mobile-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 8px 10px; border-bottom: 1px solid #edf0ee; }.team-mobile-identity { min-width: 0; }.team-mobile-identity strong { display: block; overflow: hidden; color: #183d57; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }.team-mobile-identity span { display: block; overflow: hidden; margin-top: 2px; color: #89939b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.team-mobile-ratio { flex: 0 0 auto; border-radius: 8px; padding: 5px 9px; color: #346572; background: #eaf3f3; text-align: right; }.team-mobile-ratio span { display: block; font-size: 9px; }.team-mobile-ratio strong { display: block; margin-top: 1px; font-size: 15px; font-variant-numeric: tabular-nums; }.team-mobile-lineup { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }.team-mobile-hero { min-width: 0; min-height: 72px; padding: 8px 9px; border-right: 1px solid #edf0ee; }.team-mobile-hero:last-child { border-right: 0; }.team-mobile-position { display: block; margin-bottom: 3px; color: #8b959d; font-size: 9px; }.team-mobile-hero strong { display: -webkit-box; overflow: hidden; color: #263849; font-size: 12px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }.team-mobile-hero small { display: inline-block; margin-top: 4px; border-radius: 999px; padding: 2px 6px; color: #7b643b; background: #f8f0df; font-size: 9px; }
  .pagination { align-items: center; gap: 10px; padding: 12px; }.pagination > div { gap: 8px; }.page-button { width: 38px; height: 34px; }
  .capture-toolbar { gap: 8px; padding: 12px; }.capture-toolbar .button { width: 100%; }.compact-switch { max-width: none; }.snapshot-progress { padding: 8px 14px 18px; }.snapshot-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 14px; }.snapshot-facts div { min-width: 0; padding: 12px; }.snapshot-facts strong { overflow-wrap: anywhere; }
  .section-title { align-items: flex-start; padding: 17px 15px; }.section-title > .button { flex: none; }
  .drawer-header { min-height: 106px; padding: 20px 16px 16px; }.drawer-heading > p:last-child { overflow: visible; white-space: normal; }.drawer-title-line { align-items: flex-start; }.drawer-title-line h2 { font-size: 22px; }.drawer-close { width: 40px; height: 40px; }.drawer-content { padding: 14px 10px 30px; }.lineup-grid { grid-template-columns: 1fr; gap: 7px; }.lineup-card { min-height: 84px; padding: 13px; }.lineup-card span { margin-bottom: 10px; }.lineup-card strong { font-size: 16px; }.detail-section { margin-top: 10px; }.detail-grid, .detail-grid.metrics { grid-template-columns: 1fr; column-gap: 0; }.detail-item, .detail-grid.metrics .detail-item:nth-last-child(3) { border-bottom: 1px solid #f0f1ef; }.detail-item:last-child { border-bottom: 0; }.skill-columns { grid-template-columns: 1fr; }.team-battle-list { padding: 12px 10px; }.team-battle-facts { grid-template-columns: 1fr; }.toast-region { right: 10px; left: 10px; top: 10px; }.toast { min-width: 0; width: 100%; }.dialog form { padding: 20px; }
}

/* Name suggestions overlay the table without changing the toolbar layout. */
.team-toolbar .search-shell { position: relative; }
.name-suggestions { position: absolute; z-index: 30; top: calc(100% + 5px); left: 0; min-width: 100%; width: max-content; max-width: min(340px, calc(100vw - 44px)); max-height: 280px; overflow: auto; border: 1px solid #dfe3e6; border-radius: 10px; padding: 5px; background: #fff; box-shadow: 0 10px 28px rgba(16,36,59,.14); }
.name-suggestion { padding: 10px 12px; border-radius: 6px; color: var(--ink); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; cursor: pointer; }
.name-suggestion:hover, .name-suggestion.active { background: #edf5f5; }
.name-suggestion mark { padding: 0; color: #c74747; background: transparent; font-weight: 650; }
@media (max-width: 620px) { .team-general-search:last-child .name-suggestions { right: 0; left: auto; } }

/* Expanded ranks share a roomy modal, with compact cards and one scroll surface. */
.dashboard-more-backdrop { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(9,22,35,.48); backdrop-filter: blur(4px); }
.dashboard-more-dialog { display: flex; flex-direction: column; width: min(1800px,100%); height: min(960px,calc(100dvh - 48px)); min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 80px rgba(9,25,39,.24); }
.dashboard-more-header { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 26px; border-bottom: 1px solid var(--line); background: var(--card); }
.dashboard-more-header h2 { margin: 0; font-size: 24px; }
.dashboard-more-header .eyebrow { margin: 0 0 5px; }
.dashboard-more-header #dashboardMoreSubtitle { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.dashboard-more-body { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 22px 22px; scrollbar-gutter: stable; }
.dashboard-more-status { margin: 0 0 14px; color: var(--muted); font-size: 12px; }
.dashboard-more-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.dashboard-more-list .dashboard-rank-row { height: 100%; min-height: 110px; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.dashboard-more-list .dashboard-rank-row:hover { background: #f3f8f6; border-color: #c9dcd8; }
.dashboard-more-list .dashboard-rank-info > small { margin: 4px 0 7px; }
.dashboard-more-list .dashboard-rank-metric strong { font-size: 21px; }
.dashboard-more-footer { flex: 0 0 auto; padding: 12px 24px; border-top: 1px solid var(--line); color: var(--muted); background: var(--card); font-size: 12px; }
@media (max-width: 899px) {
  .dashboard-more-backdrop { padding: 12px; }
  .dashboard-more-dialog { height: calc(100dvh - 24px); border-radius: 16px; }
  .dashboard-more-list { grid-template-columns: minmax(0,1fr); }
  .dashboard-more-header { padding: 16px; }
  .dashboard-more-header h2 { font-size: 21px; }
  .dashboard-more-body { padding: 14px 12px; }
  .dashboard-more-list .dashboard-rank-row { padding: 12px 10px; gap: 7px; }
  .dashboard-more-footer { padding: 12px 16px; }
}
@media (max-width: 480px) {
  .dashboard-more-backdrop { padding: 0; }
  .dashboard-more-dialog { height: 100dvh; width: 100%; border: 0; border-radius: 0; }
  .dashboard-more-list .dashboard-rank-row { grid-template-columns: 24px minmax(0,1fr); }
  .dashboard-more-list .dashboard-rank-metric { grid-column: 2; display: flex; align-items: baseline; gap: 8px; text-align: left; }
  .dashboard-more-list .dashboard-rank-metric strong { font-size: 17px; }
  .dashboard-more-list .dashboard-rank-metric small { margin-top: 0; }
}

/* Alliance comparison uses complete, frozen snapshot totals. */
.compare-picker { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: end; gap: 24px; padding: 24px; margin-bottom: 18px; }
.compare-picker label { display: grid; grid-template-columns: auto 1fr; gap: 10px 8px; align-items: center; font-size: 13px; color: var(--muted); min-width: 0; }
.compare-picker select { grid-column: 1 / -1; width: 100%; min-width: 0; text-overflow: ellipsis; }
.compare-dot { width: 9px; height: 9px; border-radius: 50%; background: #2f7f91; }
.compare-dot.right { background: #ad7332; }
.compare-profiles { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; margin: 24px 0; }
.compare-profile { padding: 26px; border-top: 4px solid #2f7f91; min-width: 0; }
.compare-profile.right { border-top-color: #ad7332; }
.compare-profile h2 { margin: 7px 0 22px; overflow-wrap: anywhere; }
.compare-profile .eyebrow { margin: 0; color: var(--muted); }
.compare-profile-total { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.compare-profile-total strong { font-size: clamp(22px,3.2vw,42px); color: #2f7f91; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; min-width: 0; }
.compare-profile.right .compare-profile-total strong { color: #ad7332; }
.compare-profile-total span, .compare-profile-meta, .compare-outcome-copy { color: var(--muted); font-size: 12px; line-height: 1.8; }
.compare-outcomes { display: flex; height: 8px; overflow: hidden; border-radius: 5px; background: #edf0f1; margin-top: 20px; }
.compare-outcomes .wins { background: #2f8b71; }.compare-outcomes .draws { background: #d5ae61; }.compare-outcomes .losses { background: #b97e7b; }
.compare-outcome-copy { margin-bottom: 0; }
.compare-table-panel { padding: 12px 26px; overflow: hidden; }
.compare-table { table-layout: fixed; width: 100%; border-collapse: collapse; }
.compare-table caption { text-align: left; padding: 18px 0; font-size: 18px; font-weight: 700; }
.compare-table thead th { padding: 16px 12px; background: #f5f7f7; overflow-wrap: anywhere; }
.compare-table thead th:first-child { color: #2f7f91; }.compare-table thead th:last-child { color: #ad7332; }
.compare-table td,.compare-table th { width: 33.333%; text-align: center; white-space: normal; }
.compare-table tbody td,.compare-table .compare-metric { padding: 18px 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.compare-table .compare-group th { padding: 25px 12px 10px; text-align: left; color: var(--muted); font-size: 12px; font-weight: 500; }
.compare-metric { font-size: 14px; }.compare-metric small { display: block; margin-top: 6px; font-size: 11px; line-height: 1.6; font-weight: 400; color: var(--muted); }
.compare-table td strong { display: block; font-size: 19px; font-variant-numeric: tabular-nums; }
.compare-track { display: block; height: 4px; border-radius: 4px; overflow: hidden; background: #f0f2f2; margin-top: 10px; }
.compare-bar { display: block; height: 100%; background: #2f7f91; border-radius: inherit; }.compare-table td.right .compare-bar { background: #ad7332; }
.compare-rules { padding: 22px 26px; margin-top: 24px; font-size: 12px; line-height: 1.9; color: var(--muted); }.compare-rules strong { color: var(--ink); font-size: 14px; }.compare-rules p:last-child { margin-bottom: 0; }
@media (max-width: 600px) {
  .compare-picker { padding: 16px; gap: 12px; grid-template-columns: minmax(0,1fr) auto; }
  .compare-picker label { grid-column: 1; }.compare-picker #compareSwap { grid-column: 2; grid-row: 1 / 3; align-self: center; padding: 9px; }
  .compare-profiles { gap: 10px; }.compare-profile { padding: 14px 10px; }.compare-profile h2 { font-size: 17px; margin-bottom: 16px; }
  .compare-profile-total { gap: 5px; }.compare-profile-total strong { font-size: clamp(18px,5.4vw,30px); }
  .compare-table-panel { padding: 8px; }.compare-table caption { padding: 12px 8px; font-size: 16px; }
  .compare-table thead th { padding: 12px 5px; font-size: 12px; }
  .compare-table tbody td,.compare-table .compare-metric { padding: 16px 4px; }
  .compare-metric { font-size: 12px; }.compare-table td strong { font-size: 15px; }.compare-metric small { font-size: 10px; }
  .compare-rules { padding: 18px; }
}

@media (max-width: 620px) {
  .team-mobile-list { gap: 6px; padding: 6px; }
  .team-mobile-head { min-height: 44px; gap: 6px; padding: 6px 8px; }
  .team-mobile-ratios { display: flex; flex: 0 0 auto; gap: 5px; }
  .team-mobile-ratio { padding: 4px 6px; border-radius: 6px; }
  .team-mobile-ratio strong { font-size: 14px; }
  .team-mobile-hero { padding: 6px; }
  .team-mobile-position { margin-bottom: 4px; }
  .team-mobile-hero-summary { display: flex; align-items: center; gap: 5px; min-height: 46px; }
  .team-mobile-hero-copy { min-width: 0; }
  .team-mobile-hero .team-mobile-hero-name { display: block; font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
  .team-mobile-hero small { margin-top: 3px; padding: 1px 3px; font-size: 9px; }
  .team-mobile-skills { display: grid; gap: 3px; margin-top: 6px; }
  .team-mobile-skill { display: flex; align-items: baseline; justify-content: space-between; gap: 3px; color: var(--ink); font-size: 11px; line-height: 1.35; }
  .team-mobile-skill-name { min-width: 0; overflow-wrap: anywhere; }
  .team-mobile-skill-level { flex: 0 0 auto; color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
  .team-mobile-hero .treasure-info.compact { gap: 3px; margin-top: 5px; }
  .team-mobile-hero .treasure-info.compact .treasure-icon { flex-basis: 16px; width: 16px; height: 16px; border-radius: 3px; }
  .team-mobile-hero .treasure-info.compact .treasure-copy strong { font-size: 9px; line-height: 1.3; }
}

/* Administrator current battlefield view. Portrait URLs reuse the image cache. */
.battlefield-note {margin:0;padding:12px 20px;color:var(--text-secondary,#82919d);font-size:12px;line-height:1.7;border-bottom:1px solid #dce3df;}
.battlefield-list {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:16px;}
.battlefield-card {min-width:0;padding:14px;border:1px solid #dce3df;border-radius:14px;background:var(--card);}
.battlefield-card-head {display:flex;align-items:center;justify-content:space-between;gap:12px;}
.battlefield-card-head strong {display:block;font-size:17px;overflow-wrap:anywhere;}
.battlefield-card-head small {display:block;margin-top:3px;color:#82919d;}
.battlefield-route {display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px;margin:12px 0;font-size:13px;font-variant-numeric:tabular-nums;}
.battlefield-countdown {color:#427887;}
.battlefield-troops {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;font-size:12px;}
.battlefield-troops span {padding:6px;border-radius:6px;background:#eef3f1;overflow-wrap:anywhere;}
.battlefield-match-hint {margin:10px 0 4px;color:#82919d;font-size:12px;}
.battlefield-match {display:block;width:100%;margin-top:8px;padding:9px;border:1px solid #dce3df;border-radius:9px;text-align:left;background:transparent;color:inherit;cursor:pointer;}
.battlefield-match>small {font-size:11px;color:#82919d;}
.battlefield-match-heroes {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:8px;}
.battlefield-match-hero {display:grid;grid-template-columns:32px minmax(0,1fr);gap:5px;align-content:start;min-width:0;}
.battlefield-match-hero .hero-art {width:32px;height:40px;border-radius:5px;}
.battlefield-match-hero strong {font-size:12px;overflow-wrap:anywhere;}
.battlefield-match-hero small {display:block;color:#82919d;font-size:10px;}
.battlefield-match-hero p {grid-column:1/-1;margin:3px 0;font-size:11px;line-height:1.6;overflow-wrap:anywhere;}
@media(max-width:800px){.battlefield-list {grid-template-columns:minmax(0,1fr);padding:8px;gap:8px;}.battlefield-card {padding:10px;}.battlefield-note {padding:10px;}}


.battlefield-filters {display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;padding:14px 20px;border-bottom:1px solid #dce3df;}
.battlefield-filters label {display:grid;gap:6px;flex:1 1 200px;min-width:0;font-size:13px;color:var(--text-secondary,#82919d);}
.battlefield-filters input {width:100%;min-width:0;}
.battlefield-filter-actions {display:flex;gap:8px;}
.battlefield-empty {grid-column:1/-1;margin:0;padding:28px 12px;text-align:center;color:#82919d;}
@media(max-width:620px){.battlefield-filters {padding:10px;gap:10px;}.battlefield-filters label {flex-basis:100%;}.battlefield-filter-actions {width:100%;}.battlefield-filter-actions button {flex:1;}}

.battlefield-filters select {width:100%;min-width:0;}
.battlefield-filters label.battlefield-checkbox {display:flex;flex:0 0 auto;align-items:center;gap:7px;min-height:42px;white-space:nowrap;cursor:pointer;}
.battlefield-checkbox input {width:18px;height:18px;margin:0;accent-color:var(--accent,#427887);}
.battlefield-filter-hint {flex:0 0 100%;color:var(--muted);font-size:12px;line-height:1.5;}
@media(max-width:620px){.battlefield-filters label {flex-basis:calc(50% - 5px);}.battlefield-filters label.battlefield-checkbox {flex-basis:100%;min-height:30px;}}
