/* 아르카나 모험가 포털과 계정 관리 화면의 반응형 테마를 정의한다. */
:root {
  color-scheme: dark;
  --bg: #0b1117; --panel: #121c25; --raised: #19272e; --input: #0d171e;
  --line: #2a3943; --muted: #a1b1bd; --text: #e7eef3;
  --mint: #8de0ca; --gold: #e7c990; --button-text: #102823;
  --soft-mint: #203a34; --soft-gold: #302b20; --error: #ffaaa2; --soft-error: #3c2426;
  --header: #0b1117f5; --hero-start: #1d3036; --hero-end: #111b26; --shadow: #0003;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 110px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.6 "Segoe UI", "Malgun Gothic", sans-serif; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
button, input, select { border-radius: 4px; }
input, select { min-width: 0; }
p { overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.4; overflow-wrap: anywhere; }
code { font: .92em/1.5 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
[hidden], .view[hidden] { display: none !important; }
.skip-link { position: fixed; left: 20px; top: -100px; z-index: 50; padding: 12px 20px; background: var(--mint); color: var(--button-text); border-radius: 4px; }
.skip-link:focus { top: 10px; }
body > header { min-height: 80px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 38px; padding: 0 5vw; background: var(--header); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(12px); }
.brand { flex-shrink: 0; font-family: Georgia, serif; font-size: 27px; letter-spacing: 5px; color: var(--gold); white-space: nowrap; }
.brand i { font-style: normal; color: var(--mint); }
header nav { display: flex; gap: 25px; min-height: 80px; align-items: stretch; }
header nav button, header nav a { border: 0; background: none; color: var(--muted); position: relative; padding: 0; display: flex; align-items: center; white-space: nowrap; }
header nav button:hover, header nav a:hover { color: var(--text); }
header nav .active { color: var(--text); }
header nav .active::after { content: ""; position: absolute; bottom: 0; height: 2px; background: var(--mint); left: 0; right: 0; }
.demo, .page-status { margin-left: auto; color: var(--gold); font-size: 10px; border: 1px solid var(--line); padding: 4px 9px; letter-spacing: 1px; white-space: nowrap; }
.user, .discord-link { border: 1px solid var(--line); border-radius: 5px; color: var(--text); background: var(--panel); padding: 8px 13px; white-space: nowrap; }
.user { margin-left: auto; }
.discord-link:hover, .user:hover { border-color: var(--mint); }
main { max-width: 1340px; margin: auto; padding: 26px 40px 70px; }
.view { min-width: 0; }
.eyebrow { font-size: 10px; letter-spacing: 2.6px; color: var(--mint); font-weight: 700; }
.hero { position: relative; overflow: hidden; min-height: 310px; padding: 42px; border: 1px solid var(--line); background: linear-gradient(115deg, var(--hero-start), var(--hero-end) 60%, var(--panel)); display: flex; align-items: center; }
.hero h1 { font-size: 42px; font-weight: 500; line-height: 1.3; letter-spacing: -2px; margin: 14px 0; }
.hero p { color: var(--muted); margin: 16px 0 24px; }
.hero-copy { position: relative; z-index: 1; width: 64%; }
.hero-art { position: absolute; right: -15px; bottom: -85px; width: 49%; height: 430px; opacity: .85; pointer-events: none; }
.search { display: flex; max-width: 540px; background: var(--input); border: 1px solid #48616a; border-radius: 5px; overflow: hidden; }
.search span { padding: 12px 0 12px 16px; color: var(--mint); font-size: 20px; }
.search input { flex: 1; width: 100%; min-width: 0; border: 0; padding: 14px; background: none; color: var(--text); outline: none; }
.search:focus-within { outline: 2px solid var(--mint); outline-offset: 2px; }
.search button, .primary, .primary-button { border: 1px solid transparent; background: var(--mint); color: var(--button-text); padding: 11px 21px; font-weight: 700; }
.primary { display: inline-block; text-align: center; border-radius: 4px; }
.primary:hover:not(:disabled), .primary-button:hover:not(:disabled), .search button:hover { filter: brightness(1.08); }
.quick { display: flex; flex-wrap: wrap; gap: 7px 15px; color: var(--muted); font-size: 12px; margin-top: 13px; }
.quick button, .quick a { border: 0; background: none; padding: 0; color: var(--mint); }
.ribbon { display: flex; flex-wrap: wrap; gap: 10px 25px; align-items: center; border-bottom: 1px solid var(--line); padding: 16px 0; margin-bottom: 30px; font-size: 12px; color: var(--muted); }
.ribbon strong { color: var(--mint); }
.ribbon .right { margin-left: auto; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 26px; }
.grid > *, .two-col > *, .account-layout > * { min-width: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 16px; }
.section-head h2 { margin: 0; font-size: 19px; font-weight: 600; }
.sub, .hint { font-size: 12px; color: var(--muted); }
.link { background: none; border: 0; color: var(--mint); padding: 0; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }
.players { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.player { background: var(--panel); border: 1px solid var(--line); padding: 0; text-align: left; color: inherit; overflow: hidden; border-radius: 6px; transition: transform .2s, border-color .2s; min-width: 0; }
.player:hover { transform: translateY(-4px); border-color: var(--mint); }
.portrait { --shade: #284345; --portrait-accent: #8de0ca; height: 128px; position: relative; overflow: hidden; background: linear-gradient(135deg, var(--shade), #121922); display: grid; place-items: center; color: var(--portrait-accent); font: 52px Georgia, serif; }
.tone-0 { --shade: #31524b; --portrait-accent: #9ad9c6; }
.tone-1 { --shade: #49394c; --portrait-accent: #dbb2d2; }
.tone-2 { --shade: #34465c; --portrait-accent: #abc6ed; }
.tone-3 { --shade: #574937; --portrait-accent: #e7c990; }
.tone-4 { --shade: #3b5144; --portrait-accent: #b4d6a3; }
.tone-5 { --shade: #49405c; --portrait-accent: #c2b6ed; }
.portrait::before { content: ""; position: absolute; width: 120px; height: 120px; border: 1px solid #ffffff22; border-radius: 50%; right: 5px; top: 18px; }
.portrait::after { content: ""; position: absolute; width: 72px; height: 72px; border: 1px solid #ffffff18; transform: rotate(45deg); left: 15px; bottom: -10px; }
.portrait svg { width: 100%; height: 100%; }
.portrait-mark { position: relative; z-index: 1; display: grid; place-items: center; width: 74px; height: 74px; border: 1px solid #ffffff25; border-radius: 50%; font-size: 43px; background: #10192233; }
.tag { position: absolute; left: 13px; top: 12px; font: 10px/1.5 "Segoe UI", "Malgun Gothic", sans-serif; color: #e7c990; background: #10171bcc; padding: 2px 7px; border: 1px solid #76644766; }
.player-body { padding: 16px; }
.player-name { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.player-name small { font-weight: 400; font-size: 10px; color: var(--muted); margin-left: 5px; }
.hero-name { color: var(--muted); font-size: 12px; margin: 4px 0 15px; }
.metrics { border-top: 1px solid var(--line); padding-top: 10px; display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--muted); }
.metrics b { display: block; color: var(--text); font-size: 15px; font-weight: 500; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 22px; }
.mine { background: linear-gradient(145deg, var(--hero-start), var(--panel)); }
.mine h3 { font-size: 24px; margin: 12px 0 0; }
.mine .sub { margin-bottom: 22px; }
.mine .primary { margin-top: 18px; }
.statline { display: flex; justify-content: space-between; gap: 15px; margin: 9px 0; font-size: 12px; }
.bar { height: 5px; background: var(--line); margin: 10px 0 22px; }
.bar span { display: block; width: 68%; height: 100%; background: var(--mint); }
.full { width: 100%; border-radius: 3px; }
.outline, .secondary-button { border: 1px solid var(--line); background: none; color: var(--text); padding: 9px 15px; border-radius: 4px; }
.outline:hover:not(:disabled), .secondary-button:hover:not(:disabled) { border-color: var(--mint); background: var(--soft-mint); }
.activity { margin-top: 22px; }
.activity h3 { margin: 8px 0 20px; }
.activity p { border-bottom: 1px solid var(--line); padding-bottom: 12px; font-size: 12px; }
.activity p:last-of-type { border: 0; }
.activity time, .activity small { display: block; font-size: 11px; color: var(--muted); }
.rank-section { margin-top: 30px; }
.tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.tabs button { border: 1px solid var(--line); background: none; color: var(--muted); padding: 6px 12px; border-radius: 3px; }
.tabs button.active, .tabs button.on { background: var(--soft-mint); color: var(--mint); border-color: var(--mint); }
.tabs button:hover:not(:disabled) { color: var(--text); }
.table-wrap { overflow: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 6px; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th { color: var(--muted); font-size: 11px; font-weight: 400; padding: 12px 18px; background: var(--input); }
td { padding: 15px 18px; border-top: 1px solid var(--line); font-size: 12px; }
tr[data-record], tr[data-attack-player] { cursor: pointer; }
tbody tr:hover { background: var(--raised); }
.number { font-family: Georgia, serif; font-size: 20px; color: var(--gold); }
.badge { display: inline-block; font-size: 10px; color: var(--mint); background: var(--soft-mint); padding: 3px 6px; border-radius: 3px; }
.notice { font-size: 12px; color: var(--muted); margin-top: 9px; }
.toolbar { display: flex; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 4px; padding: 10px 14px; max-width: 100%; }
.toolbar input { flex: 1; min-width: 180px; }
.page-title { margin: 5px 0 8px; font-size: 32px; font-weight: 500; letter-spacing: -1px; }
.page-desc { color: var(--muted); margin: 0 0 28px; }
.empty { padding: 42px 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line); grid-column: 1 / -1; border-radius: 6px; }
.empty h2, .empty h3 { color: var(--text); }
.catalog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.catalog h2, .catalog h3 { color: var(--gold); font-size: 20px; }
.catalog .sigil { font-family: Georgia, serif; font-size: 44px; color: var(--mint); }
.catalog + .pending-item { margin-top: 22px; }
.record-list { display: grid; gap: 15px; }
.record-list button { text-align: left; color: inherit; }
.record-top { display: flex; justify-content: space-between; gap: 12px; }
.record-list h3 { margin: 8px 0; }
.record-list p { color: var(--muted); margin: 0; }
.build-chips { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 16px; }
.chip { font-size: 11px; padding: 5px 9px; border: 1px solid var(--line); color: var(--gold); border-radius: 3px; }
.data-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; font-size: 12px; color: var(--muted); }
.data-controls .outline { padding: 6px 11px; font-size: 11px; }
.data-notice { padding: 13px 17px; border: 1px solid var(--line); border-left: 2px solid var(--gold); background: var(--soft-gold); color: var(--muted); font-size: 12px; margin: 0 0 24px; border-radius: 4px; }
.data-notice strong { color: var(--gold); }
#recovery-reminder { display: block; padding: 12px 16px; margin: 0 0 20px; color: var(--gold); border: 1px solid var(--gold); background: var(--soft-gold); }
footer { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); padding: 20px 5vw; color: var(--muted); font-size: 11px; }
footer .brand { font-size: 15px; }
.footer-brand { color: var(--gold); font: 15px/1.6 Georgia, serif; letter-spacing: 3px; }
footer p { margin: 0; }
footer a { color: var(--mint); }
dialog { width: min(800px, 94vw); max-height: 88vh; padding: 0; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 24px 100px var(--shadow); }
dialog::backdrop { background: #02070bcb; backdrop-filter: blur(7px); }
.modal-header { display: flex; justify-content: space-between; padding: 20px 26px; border-bottom: 1px solid var(--line); align-items: center; gap: 12px; }
.modal-header button { font-size: 24px; border: 0; background: none; color: var(--muted); padding: 0 6px; }
.modal-body { padding: 26px; }
.profile-top { display: flex; gap: 22px; align-items: center; margin-bottom: 24px; }
.profile-mark { flex-shrink: 0; width: 96px; height: 100px; background: linear-gradient(150deg, var(--shade, #405d5b), #121922); display: grid; place-items: center; font: 48px Georgia, serif; color: var(--portrait-accent, #e7c990); border: 1px solid var(--line); }
.profile-top h2 { margin: 0; font-size: 27px; }
.profile-top p { margin: 5px 0; color: var(--muted); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.two-col h3 { font-size: 15px; }
.item, .component { padding: 13px; border: 1px solid var(--line); margin-bottom: 9px; border-left: 2px solid var(--gold); background: var(--input); border-radius: 3px; }
.item small, .component small { display: block; color: var(--muted); }
.pending-item { border-style: dashed; opacity: .8; }
.actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.timeline { margin: 20px 0; border-left: 1px solid var(--line); padding-left: 24px; }
.timeline p { position: relative; margin: 0; padding: 0 0 22px; }
.timeline p::before { content: ""; width: 7px; height: 7px; background: var(--mint); border-radius: 50%; position: absolute; left: -28px; top: 8px; }
.timeline small { display: block; color: var(--muted); }
#toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 36px); background: var(--mint); color: var(--button-text); padding: 12px 22px; border-radius: 5px; z-index: 20; box-shadow: 0 10px 30px var(--shadow); overflow-wrap: anywhere; }
#toast:empty { display: none; }
.compare { margin-top: 22px; }
.compare td, .compare th { padding: 10px; }
.rank-link { border: 0; background: none; color: var(--text); text-align: left; padding: 0; font-weight: 600; overflow-wrap: anywhere; }
.rank-link:hover { color: var(--mint); }
.attack-number { color: var(--mint); font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.attack-summary { background: linear-gradient(120deg, var(--soft-mint), var(--panel)); margin-bottom: 22px; }
.attack-summary h3 { margin: 10px 0; }
.attack-summary p { margin: 0; }
.attack-summary .statline { margin-top: 18px; }
.attack-summary .statline b { color: var(--mint); }
.attack-total { color: var(--mint); font-size: 42px; font-weight: 600; line-height: 1.3; margin: 8px 0; font-variant-numeric: tabular-nums; }
.attack-parts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.attack-parts .component { margin: 0; padding: 10px; font-size: 11px; }
.attack-parts > div { padding: 10px 0 0; border-top: 2px solid var(--mint); }
.attack-parts > div:nth-child(2) { border-color: var(--gold); }
.attack-parts > div:nth-child(3) { border-color: #9daee8; }
.attack-parts > div:nth-child(4) { border-color: #ce9cbd; }
.attack-parts b, .attack-parts strong { display: block; font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums; }
.component h3 { margin: 0 0 12px; }
.component .item { margin: 0; border: 0; padding: 0; }

#account-view .account-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 60px; align-items: start; }
#account-view .intro { padding: 16px 0; }
#account-view .intro h1 { margin: 12px 0; font-size: 32px; font-weight: 500; }
#account-view .intro .hero-copy { width: auto; font-size: 35px; line-height: 1.45; letter-spacing: -1.4px; color: var(--text); margin: 24px 0; }
#account-view .intro-copy { color: var(--muted); font-size: 14px; }
#account-view .journey { list-style: none; margin: 38px 0; padding: 0; }
#account-view .journey li { display: flex; gap: 16px; padding: 14px 0; }
#account-view .step-number { display: grid; place-items: center; width: 35px; height: 35px; flex-shrink: 0; color: var(--gold); border: 1px solid var(--line); font: 14px Georgia, serif; }
#account-view .journey strong { font-size: 14px; font-weight: 600; }
#account-view .journey p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
#account-view .community-note { display: flex; gap: 13px; border-top: 1px solid var(--line); padding-top: 20px; font-size: 12px; color: var(--muted); }
#account-view .community-note p { margin: 0; }
#account-view .community-note a { color: var(--mint); text-decoration: underline; text-underline-offset: 3px; }
#account-view .note-symbol { color: var(--gold); font-size: 20px; }
#account-view .account-card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 28px; box-shadow: 0 15px 50px var(--shadow); }
#account-view .card-topline { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 9px; letter-spacing: 2px; margin-bottom: 20px; }
#account-view .card-index { color: var(--gold); }
#account-view .account-tabs { display: flex; gap: 5px; flex-wrap: wrap; padding: 0 0 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
#account-view .account-tabs button { flex: 1 1 auto; padding: 8px; font-size: 12px; white-space: nowrap; }
#account-view form.tab { margin: 0; padding: 0; border: 0; background: none; }
#account-view form.tab:not(.on) { display: none; }
#account-view .form-heading { margin-bottom: 24px; }
#account-view .form-heading h2 { font-size: 23px; font-weight: 600; letter-spacing: -.5px; margin: 0 0 8px; }
#account-view .form-heading p { font-size: 12px; color: var(--muted); margin: 0; }
#account-view .field { margin-bottom: 18px; min-width: 0; }
#account-view .field label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 600; }
#account-view .field input, #account-view .field select { display: block; width: 100%; padding: 11px 12px; color: var(--text); background: var(--input); border: 1px solid var(--line); border-radius: 4px; line-height: 1.5; font-size: 16px; }
#account-view .field input::placeholder { color: var(--muted); opacity: .85; font-size: 13px; }
#account-view .field input[aria-invalid="true"] { border-color: var(--error); }
#account-view .code-input { font-family: ui-monospace, Consolas, monospace; letter-spacing: 1.5px; }
#account-view .field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
#account-view .hint { margin: 6px 0 0; font-size: 11px; line-height: 1.6; }
#account-view .field-error { color: var(--error); margin: 6px 0 0; font-size: 11px; }
#account-view .field-error:empty { display: none; }
#account-view .primary-button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 12px 16px; margin-top: 20px; border-radius: 4px; }
#account-view .danger-button { background: var(--soft-error); border-color: var(--error); color: var(--error); }
#account-view .form-footnote { color: var(--muted); text-align: center; font-size: 11px; margin: 12px 0 0; }
#account-view .notice { padding: 13px; background: var(--input); border: 1px solid var(--line); border-left: 2px solid var(--gold); margin: 18px 0; border-radius: 3px; font-size: 12px; }
#account-view .notice strong { color: var(--text); }
#account-view .message { white-space: pre-line; margin-top: 20px; padding: 13px; border-radius: 4px; font-size: 13px; }
#account-view .message:empty { display: none; }
#account-view .message.err { color: var(--error); background: var(--soft-error); border: 1px solid var(--error); }
#account-view .message.ok { color: var(--mint); background: var(--soft-mint); border: 1px solid var(--mint); }
#account-view .message.pending { color: var(--muted); background: var(--input); border: 1px solid var(--line); }
#account-view .recovery-result h2 { font-size: 23px; margin: 12px 0; }
#account-view .recovery-result > p { color: var(--muted); font-size: 13px; }
#account-view .success-mark { display: inline-grid; width: 40px; height: 40px; border-radius: 50%; background: var(--soft-mint); color: var(--mint); font-size: 24px; margin-bottom: 12px; }
#account-view .recovery-result .eyebrow { font-size: 10px; color: var(--mint); }
#account-view .recovery-result .recovery-label { margin: 24px 0 8px; color: var(--gold); font-size: 11px; }
#account-view .recovery-result .recovery-code { padding: 18px 12px; border: 1px dashed var(--mint); border-radius: 4px; background: var(--input); color: var(--text); font: 600 clamp(16px, 1.8vw, 24px)/1.5 ui-monospace, Consolas, monospace; letter-spacing: 1px; text-align: center; margin: 0 0 12px; user-select: all; overflow-wrap: anywhere; }
#account-view .game-guide { padding: 15px; border: 1px solid var(--line); margin-top: 20px; }
#account-view .game-guide h3 { font-size: 14px; margin: 0 0 9px; }
#account-view .game-guide ol { padding-left: 18px; margin: 0; color: var(--muted); font-size: 12px; }
#account-view .game-guide li + li { margin-top: 8px; }

@media (prefers-color-scheme: light) {
  :root { color-scheme: light; --bg: #f4f6f4; --panel: #fff; --raised: #e9f0ed; --input: #f7f9f7; --line: #cedbd4; --muted: #5a6d65; --text: #1c302a; --mint: #216d5b; --gold: #82612a; --button-text: #fff; --soft-mint: #e3f1ea; --soft-gold: #f5f0e3; --error: #a93131; --soft-error: #fff0ed; --header: #f4f6f4f5; --hero-start: #e0eee5; --hero-end: #edf2ef; --shadow: #243b2510; }
  .hero-art { opacity: .65; }
  .search { border-color: var(--line); }
}
@media (max-width: 1150px) {
  body > header { gap: 22px; padding: 0 26px; }
  header nav { gap: 18px; }
  .page-status, .demo { display: none; }
  #account-view .account-layout { gap: 32px; }
}
@media (max-width: 1000px) {
  .grid { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
  .activity { margin: 0; }
  .hero h1 { font-size: 34px; }
  .hero-copy { width: 70%; }
  #account-view .account-layout { grid-template-columns: minmax(0, .7fr) minmax(0, 1fr); gap: 24px; }
  #account-view .account-card { padding: 22px; }
  #account-view .field-row { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 750px) {
  body > header { min-height: auto; flex-wrap: wrap; padding: 15px 20px 0; gap: 10px 15px; }
  .brand { font-size: 23px; }
  header nav { order: 3; width: 100%; justify-content: space-between; gap: 8px; min-height: 42px; }
  header nav button, header nav a { font-size: 12px; }
  .user, .discord-link { font-size: 11px; padding: 7px 10px; }
  main { padding: 22px 22px 48px; }
  #account-view .account-layout { grid-template-columns: 1fr; gap: 24px; }
  #account-view .intro { padding: 0; }
  #account-view .intro .hero-copy { font-size: 28px; margin: 12px 0; }
  #account-view .journey { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin: 20px 0; }
  #account-view .journey li { display: block; padding: 0; }
  #account-view .step-number { margin-bottom: 8px; }
  #account-view .journey strong { font-size: 12px; }
  #account-view .journey p { font-size: 11px; }
  #account-view .field-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 650px) {
  html { scroll-padding-top: 120px; }
  main { padding: 20px 18px 40px; }
  .hero { padding: 25px; min-height: 300px; }
  .hero-copy { width: 100%; }
  .hero-art { opacity: .15; width: 100%; right: -100px; }
  .hero h1 { font-size: 31px; }
  .hero p { font-size: 12px; }
  .search input { padding: 12px 9px; font-size: 12px; }
  .search button { padding: 11px 13px; font-size: 12px; }
  .search span { padding-left: 11px; }
  .quick { gap: 5px 12px; font-size: 10px; }
  .players { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .player-body { padding: 12px; }
  .player-name { font-size: 14px; }
  .player-name small { display: block; margin: 2px 0 0; }
  .portrait { height: 108px; }
  .metrics { flex-wrap: wrap; gap: 6px 12px; font-size: 10px; }
  .metrics b { font-size: 14px; }
  .sidebar, .catalog, .two-col { grid-template-columns: 1fr; }
  .ribbon { gap: 8px 12px; margin-bottom: 24px; }
  .ribbon .right { margin: 0; }
  .section-head { gap: 10px; align-items: flex-start; }
  .section-head h2 { font-size: 17px; }
  .section-head .link { font-size: 11px; white-space: nowrap; }
  .tabs button { font-size: 11px; padding: 6px 9px; }
  .table-wrap th, .table-wrap td { padding: 11px 10px; }
  .ranking-table { table-layout: fixed; }
  .ranking-table th:first-child, .ranking-table td:first-child { width: 48px; }
  .ranking-table th:nth-child(3), .ranking-table td:nth-child(3) { width: 100px; text-align: right; }
  .ranking-table th:nth-child(n+4), .ranking-table td:nth-child(n+4) { display: none; }
  .ranking-table .sub { font-size: 10px; }
  .attack-number { font-size: 19px; }
  .page-title { font-size: 27px; }
  .page-desc { font-size: 12px; }
  .toolbar { gap: 10px; }
  .toolbar input { min-width: 160px; }
  .toolbar input, .toolbar select { padding: 10px 11px; }
  .modal-header { padding: 16px 18px; }
  .modal-body { padding: 18px; }
  .profile-top { gap: 15px; }
  .profile-top h2 { font-size: 22px; }
  .profile-mark { width: 70px; height: 78px; font-size: 36px; }
  .profile-top p { font-size: 12px; }
  .attack-total { font-size: 36px; }
  .attack-parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attack-summary { padding: 18px; }
  .actions > button { flex: 1 1 auto; font-size: 12px; }
  .compare td, .compare th { padding: 9px 6px; font-size: 10px; }
  footer { flex-wrap: wrap; gap: 12px 20px; }
  footer > span:last-child { width: 100%; }
  #account-view .field-row { grid-template-columns: 1fr; gap: 0; }
  #account-view .account-layout { gap: 18px; }
  #account-view .intro > .eyebrow { margin: 0 0 6px; }
  #account-view .intro h1 { margin: 4px 0; font-size: 27px; }
  #account-view .intro .hero-copy { margin: 8px 0; font-size: 20px; line-height: 1.4; letter-spacing: -.5px; }
  #account-view .intro .hero-copy br { display: none; }
  #account-view .intro-copy { margin: 8px 0 12px; font-size: 12px; }
  #account-view .journey { display: none; }
  #account-view .community-note { padding-top: 12px; font-size: 11px; gap: 10px; }
  #account-view .account-card { padding: 20px; }
  #account-view .account-tabs button { flex-basis: 28%; }
  #account-view .form-heading h2 { font-size: 21px; }
  #account-view .recovery-result .recovery-code { font-size: 16px; letter-spacing: .3px; padding: 17px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .player:hover { transform: none; }
}
