:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #e9eee9;
  background: #101411;
  font-synthesis: none;
  --panel: #191f1b;
  --line: #2b352e;
  --muted: #97a59c;
  --accent: #d8ed8b;
  --gold: #e7c879;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button, a, label, select { -webkit-tap-highlight-color: transparent; }
button, select, .file-button { cursor: pointer; }
button { color: inherit; border: 0; }
button:disabled { opacity: .42; cursor: not-allowed; }
button:not(:disabled), a, label { touch-action: manipulation; }
button, input, select, a { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--accent); }
input, select { border: 1px solid var(--line); background: #121814; color: #fff; border-radius: 10px; padding: 13px 15px; }
input { width: 100%; }
input::placeholder { color: #77867c; }
select { padding: 8px 30px 8px 10px; }
svg { overflow: visible; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(26px, 2.7vw, 38px); line-height: 1.45; font-weight: 700; letter-spacing: -1px; }
h2 { font-size: 19px; line-height: 1.5; }
h3 { font-size: 15px; line-height: 1.6; }
p { line-height: 1.85; }
small { font-size: 12px; }
.muted { color: var(--muted); }
.small-text { font-size: 12px; }
.accent { color: var(--accent); }
.eyebrow { display: block; color: var(--accent); font-size: 11px; letter-spacing: 2px; margin-bottom: 12px; }
.skip-link { position: fixed; top: -70px; left: 20px; background: var(--accent); color: #111; z-index: 20; padding: 10px; }
.skip-link:focus { top: 12px; }
.app-shell { display: grid; grid-template-columns: 226px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 29px 20px 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; background: #141a16; }
.brand { display: flex; gap: 11px; align-items: center; margin-bottom: 42px; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 43px; border-radius: 11px; color: #233020; background: var(--accent); font-weight: 900; font-size: 21px; transform: rotate(-6deg); }
.brand strong { display: block; letter-spacing: 2px; font-size: 17px; }
.brand div > span { display: block; color: var(--muted); font-size: 10px; margin-top: 5px; }
.sidebar-caption { font-size: 10px; color: #7e9083; letter-spacing: 2px; margin: 0 10px 14px; }
.navigation { display: grid; gap: 7px; }
.nav-button { display: flex; align-items: center; gap: 13px; border-radius: 9px; padding: 13px 14px; text-align: left; color: var(--muted); background: transparent; font-size: 13px; }
.nav-button:hover { background: #202a23; }
.nav-button[aria-current="page"] { color: var(--accent); background: #273222; }
.nav-button[aria-current="page"]::after { content: ''; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; margin-left: auto; }
.sidebar-bottom { margin-top: auto; padding-top: 35px; }
.sidebar-bottom p { font-size: 11px; color: #798b7f; margin: 18px 9px 25px; }
.small-court { width: 100px; height: 55px; border: 1px solid #415140; transform: skewY(-10deg); position: relative; margin-left: 12px; opacity: .8; }
.small-court::before, .small-court::after { content: ''; position: absolute; background: #415140; }
.small-court::before { left: 50%; top: 0; height: 100%; width: 1px; }
.small-court::after { top: 50%; left: 0; height: 1px; width: 100%; }
.small-court span { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); left: 25px; top: 7px; box-shadow: 0 0 14px #d8ed8b33; }
.storage-button { width: 100%; display: flex; gap: 10px; align-items: center; padding: 12px 9px; font-size: 12px; background: none; }
.save-dot { height: 6px; width: 6px; background: #a4c98c; border-radius: 50%; margin-left: auto; }
.save-dot.warning { background: #efbc69; }
#save-status { display: block; color: #778a7c; padding-left: 39px; font-size: 10px; }
.main-shell { min-width: 0; }
.topbar { height: 81px; padding: 0 38px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.breadcrumb, .topbar-actions { display: flex; align-items: center; gap: 17px; font-size: 12px; }
.breadcrumb > span { color: var(--muted); }
.breadcrumb > span:nth-child(2) { color: #4e5d51; }
.breadcrumb strong { font-weight: 500; }
.day-chip { color: var(--muted); font-size: 11px; }
.content { max-width: 1420px; padding: 34px 38px 20px; margin: 0 auto; outline: none; min-height: calc(100vh - 141px); }
.page-footer { max-width: 1420px; margin: auto; display: flex; justify-content: space-between; gap: 20px; padding: 20px 38px; color: #6e8174; font-size: 10px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-heading p { margin-top: 8px; font-size: 12px; color: var(--muted); }
.page-heading .eyebrow { margin-bottom: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 9px; padding: 13px 20px; font-size: 13px; font-weight: 600; min-height: 44px; white-space: nowrap; border: 1px solid transparent; transition: background .15s, transform .15s; }
.button:not(:disabled):hover { transform: translateY(-1px); }
.primary { background: var(--accent); color: #25331c; }
.primary:not(:disabled):hover { background: #e2f5a3; }
.secondary { background: #29372b; border-color: #3b4c3b; color: #d7e5d4; }
.subtle { background: #1c261e; border-color: var(--line); color: #bacaaf; }
.small { font-size: 11px; padding: 8px 13px; min-height: 36px; }
.text-button { color: var(--accent); background: none; font-size: 12px; padding: 8px 0; display: inline-flex; align-items: center; gap: 8px; }
.text-button .icon { width: 16px; height: 16px; }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 5px; padding: 5px 8px; font-size: 10px; font-weight: 600; color: var(--accent); background: #d8ed8b14; white-space: nowrap; }
.badge.blue { color: #aac8e9; background: #8abaf315; }
.badge.purple { color: #c4afe7; background: #b49ae715; }
.badge.gold { color: var(--gold); background: #e7c87914; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; min-width: 0; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.panel-title h2 { font-size: 15px; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(275px, 1fr); gap: 20px; }
.hero { min-height: 265px; padding: 30px; border: 1px solid #3d513c; border-radius: 14px; background: radial-gradient(ellipse at 80% 110%, #45533a 0, transparent 55%), linear-gradient(110deg, #253b2a, #19271e); position: relative; overflow: hidden; display: flex; align-items: center; }
.hero-copy { z-index: 1; max-width: 65%; }
.hero h2 { font-size: clamp(22px, 2.4vw, 32px); line-height: 1.5; margin: 10px 0; }
.hero p { font-size: 12px; color: #afc1ad; margin: 10px 0 22px; }
.hero-art { position: absolute; width: 260px; right: -36px; bottom: -8px; transform: rotate(-12deg); opacity: .78; }
.hero-art .table { fill: #4f7356; stroke: #d0dfb4; stroke-width: 2; }
.hero-art .lines { fill: none; stroke: #d0dfb4; stroke-width: 1.7; }
.hero-art .shadow { fill: #0b180e; opacity: .3; }
.hero-art .net { stroke: #dfdfcf; stroke-width: 4; }
.hero-art .ball { fill: #e7efad; }
.profile-header { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; }
.avatar { display: grid; place-items: center; width: 48px; height: 48px; flex-shrink: 0; border: 1px solid #637950; background: #394c30; border-radius: 13px; color: var(--accent); font-size: 23px; }
.profile-header h2 { font-size: 17px; overflow-wrap: anywhere; }
.profile-header p { font-size: 11px; color: var(--muted); margin-top: 4px; }
.profile-header .badge { margin-left: auto; }
.meter-label { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.meter-label strong { font-weight: 500; color: #dce6d9; }
.meter { width: 100%; height: 5px; background: #2a362c; border-radius: 6px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.energy-meter > span { background: #96c4a1; }
.meter-block + .meter-block { margin-top: 20px; }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 20px 0; }
.metric { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.metric-label { color: var(--muted); display: flex; align-items: center; gap: 8px; font-size: 11px; }
.metric-label .icon { width: 16px; height: 16px; }
.metric > strong { display: block; font-size: 27px; font-variant-numeric: tabular-nums; margin-top: 13px; font-weight: 600; }
.metric > small { color: #798e80; font-size: 10px; display: block; margin-top: 6px; }
.attribute-list { display: grid; gap: 18px; }
.attribute-row .meter-label { font-size: 12px; }
.attribute-row .meter { height: 4px; }
.attribute-row:nth-child(2) .meter > span { background: #e0c184; }
.attribute-row:nth-child(3) .meter > span { background: #96b7cf; }
.attribute-row:nth-child(4) .meter > span { background: #b9a5ce; }
.journal { padding: 0; margin: 0; list-style: none; }
.journal li { padding: 13px 0; border-top: 1px solid var(--line); display: flex; gap: 13px; align-items: flex-start; }
.journal li:first-child { padding-top: 0; border-top: 0; }
.journal time { color: #8a9d87; font-size: 10px; white-space: nowrap; margin-top: 4px; min-width: 43px; }
.journal p { font-size: 12px; color: #bfccbd; }
.training-grid, .event-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.training-card { position: relative; padding: 26px; }
.training-number { color: #4e664b; font-size: 12px; letter-spacing: 2px; margin-bottom: 21px; }
.training-card h2 { margin-bottom: 9px; }
.training-card p { color: var(--muted); font-size: 12px; margin-bottom: 26px; }
.training-value { position: absolute; right: 27px; top: 26px; font-size: 29px; color: var(--accent); }
.card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.card-bottom small { font-size: 11px; color: var(--muted); }
.notice { padding: 16px 20px; border: 1px solid #3c4d36; border-radius: 10px; background: #28342166; color: #bbcba5; font-size: 12px; margin-bottom: 22px; line-height: 1.9; }
.notice.inline { margin: 22px 0 0; }
.rest-panel { margin-top: 20px; display: flex; align-items: center; gap: 18px; }
.rest-panel > .icon { width: 28px; height: 28px; color: #abc8a5; }
.rest-panel p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.rest-panel .button { margin-left: auto; }
.event-card { overflow: hidden; padding: 0; }
.event-visual { padding: 20px 23px; min-height: 110px; position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 90% 130%, #4e6540, #273927 80%); }
.event-visual.blue { background: radial-gradient(ellipse at 90% 130%, #3b5974, #24323e 80%); }
.event-visual.purple { background: radial-gradient(ellipse at 90% 130%, #5d456c, #332c3b 80%); }
.event-visual.gold { background: radial-gradient(ellipse at 90% 130%, #705e2f, #383422 80%); }
.event-visual > .icon { position: absolute; width: 100px; height: 100px; right: 24px; top: 22px; opacity: .18; stroke-width: 1; transform: rotate(-13deg); }
.event-visual p { font-size: 12px; color: #cfdbcc; margin-top: 13px; }
.event-body { padding: 23px; }
.event-body h2 { margin-bottom: 5px; }
.event-body > p { font-size: 11px; color: var(--muted); }
.event-details { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 22px 0; font-size: 11px; color: #b7c6b3; }
.event-card.locked .event-visual { filter: saturate(.35); }
.ranking-summary { display: flex; gap: 30px; align-items: center; margin-bottom: 20px; }
.ranking-summary > strong { color: var(--accent); font-size: 47px; font-weight: 500; }
.ranking-summary h2 { font-size: 16px; }
.ranking-summary p { color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }
.ranking-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ranking-table th { font-size: 10px; font-weight: 500; color: #889b8c; padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.ranking-table td { padding: 14px 16px; border-bottom: 1px solid #273029; }
.ranking-table td:last-child, .ranking-table th:last-child { text-align: right; }
.ranking-table .own-row { color: var(--accent); background: #d8ed8b0c; }
.ranking-table tr:last-child td { border-bottom: 0; }
.rank-medal { color: var(--gold); }
.history-panel { margin-top: 20px; }
.history-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding: 15px 0; font-size: 12px; }
.history-row:first-of-type { border: 0; padding-top: 0; }
.history-row > div { display: flex; flex-direction: column; gap: 6px; }
.history-row small { color: var(--muted); font-size: 10px; }
.empty-state { text-align: center; padding: 44px 20px; }
.empty-state .icon { width: 38px; height: 38px; color: #91a279; margin-bottom: 13px; }
.empty-state p { font-size: 12px; color: var(--muted); margin: 10px 0 18px; }
.welcome { min-height: calc(100vh - 210px); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); align-items: center; gap: 50px; padding: 20px 0; }
.welcome h1 { font-size: clamp(34px, 4.2vw, 56px); letter-spacing: -2px; }
.welcome h1 em { color: var(--accent); font-style: normal; }
.welcome-copy > p { max-width: 420px; font-size: 13px; color: var(--muted); margin-top: 20px; }
.welcome-art { height: 240px; position: relative; max-width: 420px; }
.welcome-art .hero-art { width: 315px; right: 35px; bottom: -8px; opacity: 1; }
.welcome-steps { display: flex; flex-wrap: wrap; gap: 25px; color: #b3c2aa; font-size: 12px; }
.welcome-steps span { display: flex; align-items: center; gap: 8px; }
.welcome-steps b { display: grid; place-items: center; border: 1px solid #42503b; width: 24px; height: 24px; border-radius: 50%; font-size: 10px; color: var(--accent); }
.setup-panel { padding: 30px; box-shadow: 0 24px 70px #0002; }
.setup-panel > p { font-size: 12px; color: var(--muted); margin: 9px 0 25px; }
.career-rules { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px; margin-bottom: 22px; border: 1px solid var(--line); background: #1d281d; border-radius: 11px; }
.career-rules > span { font-size: 24px; }
.career-rules strong { font-size: 13px; }
.career-rules small { color: var(--muted); font-size: 10px; }
.field-label { display: block; font-size: 12px; color: #bdcbb7; margin-bottom: 10px; }
.setup-panel form > .button { width: 100%; margin-top: 23px; }
.setup-note { font-size: 10px; color: #81967d; text-align: center; margin-top: 16px; }
.match-grid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(245px, .8fr); gap: 18px; align-items: start; }
.match-panel { padding: 0; overflow: hidden; }
.scoreboard { padding: 20px 23px; border-bottom: 1px solid var(--line); }
.score-caption { display: flex; gap: 12px; justify-content: space-between; font-size: 10px; color: var(--muted); margin-bottom: 14px; }
.score-row { display: grid; grid-template-columns: minmax(85px, 1fr) 40px 45px 60px; align-items: center; gap: 8px; font-size: 12px; padding: 8px 0; }
.score-row.header { font-size: 9px; color: var(--muted); padding-top: 0; }
.score-row > span:not(:first-child) { text-align: center; }
.score-row > span:first-child { overflow-wrap: anywhere; display: flex; align-items: center; gap: 7px; }
.score-row.player-row { color: var(--accent); }
.score-row .point-score { font-size: 22px; color: #eef5dd; font-weight: 600; min-height: 33px; display: grid; place-items: center; background: #283526; border-radius: 6px; }
.serve-indicator { width: 5px; height: 5px; border-radius: 50%; background: #ddeda6; display: inline-block; flex-shrink: 0; }
.court-wrap { position: relative; background: #132319; aspect-ratio: 900 / 470; }
#match-court { display: block; width: 100%; height: 100%; }
.court-label { position: absolute; top: 13px; left: 18px; font-size: 9px; color: #b1c1ad; letter-spacing: 1px; pointer-events: none; }
.court-hud { position: absolute; top: 13px; right: 16px; border: 1px solid #d8ed8b22; border-radius: 7px; padding: 9px 13px; background: #101b14da; text-align: right; pointer-events: none; }
.court-hud span { font-size: 9px; color: #96aa91; display: block; }
.court-hud strong { display: block; font-size: 19px; color: var(--accent); margin-top: 4px; }
.match-comment { padding: 12px 19px; border-top: 1px solid var(--line); min-height: 44px; color: #c3d4bb; background: #1c281e; font-size: 11px; }
.playback { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 16px 18px; }
.speed-control { margin-left: auto; display: flex; gap: 7px; align-items: center; font-size: 10px; color: var(--muted); }
.speed-control select { font-size: 11px; min-height: 36px; }
.tactic-list { display: grid; gap: 9px; }
.tactic { text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #151d17; }
.tactic[aria-pressed="true"] { border-color: #839761; background: #2b3726; }
.tactic strong { font-size: 12px; display: block; color: #dbe8d2; }
.tactic small { color: #8fa084; font-size: 9px; display: block; margin-top: 6px; }
.match-side .panel { padding: 20px; }
.match-side .panel + .panel { margin-top: 17px; }
.match-side .panel-title { margin-bottom: 14px; }
.comparison-row { display: grid; grid-template-columns: 1fr 1fr 1fr; text-align: center; gap: 10px; font-size: 11px; margin-top: 14px; }
.comparison-row > span:first-child { color: var(--accent); }
.comparison-row > span:nth-child(2) { color: var(--muted); font-size: 10px; }
.result-card { padding: 23px; border-top: 1px solid #526139; background: linear-gradient(110deg, #2c3825, #202a22); }
.result-card h2 { color: var(--accent); font-size: 22px; margin-bottom: 9px; }
.result-card p { color: #b8c7a9; font-size: 12px; }
.result-rewards { display: flex; flex-wrap: wrap; gap: 9px; margin: 15px 0 20px; }
.bracket { margin-top: 20px; }
.bracket-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bracket-round h3 { color: var(--muted); font-size: 11px; margin-bottom: 12px; }
.bracket-pair { border: 1px solid var(--line); border-radius: 8px; padding: 11px; background: #131b16; font-size: 11px; margin-bottom: 10px; }
.bracket-player { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; }
.bracket-player.winner { color: var(--accent); }
.bracket-pair small { color: #7d927e; display: block; font-size: 9px; margin-top: 7px; overflow-wrap: anywhere; }
.bracket-pending { border: 1px dashed #3b483b; color: #80917e; font-size: 11px; border-radius: 8px; padding: 22px 10px; text-align: center; }
.rules-note { color: #82977f; font-size: 10px; line-height: 1.9; margin-top: 16px; }
dialog { width: min(560px, calc(100% - 30px)); max-height: calc(100dvh - 40px); overflow: auto; background: #1a241c; border: 1px solid #4d5e45; border-radius: 16px; padding: 28px; color: #e1eada; box-shadow: 0 30px 120px #0008; }
dialog::backdrop { background: #060e09bb; backdrop-filter: blur(5px); }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 20px; }
.dialog-header .eyebrow { font-size: 10px; margin-bottom: 8px; }
.icon-button { width: 30px; height: 30px; background: #303d2d; border-radius: 7px; font-size: 22px; display: inline-grid; place-items: center; }
dialog > p { font-size: 12px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 21px 0 14px; }
.file-button { position: relative; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-button:focus-within { outline: 2px solid var(--accent); outline-offset: 4px; }
.guide-copy { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 22px; }
.guide-copy h3 { margin-bottom: 12px; }
.guide-copy ol { padding-left: 20px; font-size: 12px; color: #b6c6ae; line-height: 2.2; }
.guide-copy p { font-size: 11px; color: #8c9f85; margin-top: 13px; }
.danger-zone { margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 13px; font-size: 10px; color: #9e9c85; }
.danger { background: #492e25; border-color: #684331; color: #e3b4a1; }
.toast { position: fixed; bottom: 30px; left: calc(50% + 90px); transform: translateX(-50%); max-width: min(600px, calc(100% - 40px)); width: max-content; padding: 15px 22px; font-size: 12px; line-height: 1.8; color: #e2efcb; background: #34452d; border: 1px solid #6c8653; border-radius: 10px; z-index: 30; box-shadow: 0 10px 50px #0005; }
.warning-banner { margin: 20px 38px 0; color: #e0c391; background: #473a21; border: 1px solid #796036; border-radius: 9px; padding: 12px 17px; line-height: 1.8; font-size: 12px; }
.noscript { position: fixed; inset: 20% 10%; background: #233123; padding: 40px; z-index: 40; }
@media (min-width: 1600px) { .content { padding-top: 43px; } .hero { min-height: 300px; } .hero-art { width: 320px; } }
@media (max-width: 1150px) {
  .app-shell { grid-template-columns: 195px minmax(0, 1fr); }
  .sidebar { padding-inline: 14px; }
  .content { padding: 27px 25px 18px; }
  .topbar, .page-footer { padding-inline: 25px; }
  .overview-grid { grid-template-columns: minmax(0, 1.3fr) minmax(235px, 1fr); }
  .hero { padding: 23px; }
  .hero-copy { max-width: 77%; }
  .hero-art { right: -90px; opacity: .5; }
  .mini-stats { gap: 10px; }
  .metric { padding: 16px; }
  .match-grid { grid-template-columns: minmax(0, 1fr); }
  .match-side { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
  .match-side .panel + .panel { margin-top: 0; }
  .tactic-list { grid-template-columns: 1fr 1fr; }
  .welcome { gap: 28px; }
  .setup-panel { padding: 24px; }
  .welcome-art .hero-art { right: 0; }
}
@media (max-width: 850px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: relative; height: auto; padding: 17px 22px 0; border-right: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 12px; }
  .brand { margin: 0; }
  .brand-mark { height: 35px; width: 34px; font-size: 18px; }
  .brand strong { font-size: 15px; }
  .brand div > span { font-size: 9px; }
  .sidebar-caption, .sidebar-bottom { display: none; }
  .navigation { grid-column: 1 / -1; display: flex; gap: 7px; justify-content: space-between; padding-top: 5px; }
  .nav-button { flex: 1; justify-content: center; padding: 13px 6px; border-radius: 8px 8px 0 0; font-size: 11px; gap: 8px; }
  .nav-button[aria-current="page"]::after { display: none; }
  .nav-button .icon { width: 17px; height: 17px; }
  .topbar { height: 62px; }
  .content { min-height: calc(100vh - 244px); }
  .mobile-storage { display: inline-flex !important; }
  .toast { left: 50%; }
  .welcome { min-height: 0; padding: 10px 0; }
  .welcome-art { height: 210px; }
  .welcome-art .hero-art { width: 270px; }
  .welcome-steps { gap: 13px; font-size: 10px; }
  .warning-banner { margin-inline: 25px; }
}
@media (max-width: 640px) {
  .sidebar { padding: 15px 16px 0; }
  .brand div > span { display: none; }
  .topbar { padding: 0 17px; gap: 10px; }
  .breadcrumb { gap: 8px; font-size: 10px; }
  .topbar-actions { gap: 7px; }
  .day-chip { font-size: 9px; }
  #quick-rest { padding: 7px 8px; font-size: 10px; min-height: 32px; }
  #quick-rest .icon { display: none; }
  .content { padding: 24px 17px 10px; }
  .page-heading { margin-bottom: 22px; gap: 12px; align-items: flex-start; }
  .page-heading h1 { font-size: 26px; }
  .page-heading p { font-size: 11px; }
  .page-heading > .button { padding: 8px 11px; font-size: 10px; }
  .overview-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .hero { min-height: 250px; }
  .hero h2 { font-size: 25px; }
  .hero-art { right: -25px; width: 240px; opacity: .5; }
  .hero-copy { max-width: 80%; }
  .profile-panel { padding: 22px; }
  .mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-block: 16px; }
  .metric > strong { font-size: 25px; }
  .metric-label { font-size: 10px; }
  .panel { padding: 21px; }
  .training-grid, .event-grid { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .training-card { padding: 22px; }
  .training-number { margin-bottom: 16px; }
  .training-card p { margin-bottom: 20px; }
  .training-value { font-size: 28px; }
  .rest-panel { flex-wrap: wrap; gap: 12px; }
  .rest-panel > .icon { display: none; }
  .rest-panel .button { margin-left: 0; }
  .ranking-table th, .ranking-table td { padding-inline: 9px; }
  .ranking-table td { font-size: 11px; }
  .ranking-summary { gap: 20px; }
  .event-card { padding: 0; }
  .welcome { grid-template-columns: minmax(0, 1fr); gap: 27px; }
  .welcome h1 { font-size: 37px; }
  .welcome-art { display: none; }
  .welcome-copy > p { margin-top: 12px; font-size: 12px; }
  .welcome-steps { margin-top: 24px; font-size: 11px; gap: 20px; }
  .setup-panel { padding: 24px; }
  .page-footer { padding: 23px 17px; font-size: 9px; flex-direction: column; gap: 9px; }
  .match-panel { padding: 0; }
  .scoreboard { padding: 16px; }
  .score-row { grid-template-columns: minmax(64px, 1fr) 30px 40px 48px; gap: 6px; }
  .court-hud { top: 9px; right: 10px; padding: 7px 9px; }
  .court-hud strong { font-size: 16px; }
  .court-label { font-size: 8px; left: 12px; top: 12px; }
  .playback { padding: 13px; gap: 7px; }
  .playback .button { padding: 8px 10px; font-size: 10px; min-height: 36px; }
  .speed-control { margin-left: 0; }
  .speed-control > span { display: none; }
  .match-side { grid-template-columns: 1fr; }
  .comparison-row { margin-top: 12px; }
  .bracket { padding: 16px; }
  .bracket-grid { gap: 9px; }
  .bracket-pair { padding: 7px; font-size: 9px; }
  .bracket-round h3 { font-size: 10px; }
  .bracket-player { gap: 3px; overflow-wrap: anywhere; }
  .bracket-pending { padding: 20px 4px; font-size: 9px; }
  .bracket-pair small { font-size: 8px; }
  .warning-banner { margin-inline: 17px; }
  dialog { padding: 22px; }
  .dialog-actions .button { font-size: 11px; padding-inline: 15px; }
}
@media (max-width: 380px) { .breadcrumb > span { display: none; } .brand { gap: 8px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
