:root{color-scheme:dark;--bg:#10151e;--panel:#1a202d;--line:#323947;--muted:#929ba9;--text:#e7e7e4;--gold:#d9bd7f;--blue:#92bfe9;--red:#e09795;font-family:Arial,"PingFang TC","Microsoft JhengHei",sans-serif}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 77% 0%,#34323a66,transparent 45%),var(--bg);color:var(--text);font-size:14px}button,input,select{font:inherit}button,a,label{ -webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,.dropzone:focus-visible{outline:2px solid var(--gold);outline-offset:4px}button{color:inherit}a{color:inherit;text-decoration:none}.app-header{height:88px;border-bottom:1px solid #ffffff10;display:flex;align-items:center;justify-content:space-between;padding:0 4.5vw}.brand{display:flex;gap:14px;align-items:center;font-family:Georgia,"Noto Serif TC","Songti TC",serif;font-size:20px;letter-spacing:2px}.brand b{font-weight:400;color:var(--gold)}.brand small{display:block;font:9px Arial;letter-spacing:3.5px;color:var(--muted);margin-top:8px}.seal{width:38px;height:43px;border:1px solid #b79b65;color:var(--gold);display:grid;place-items:center;font-size:24px;background:#b79b6509}.local-badge{font-size:12px;color:#a3acb6;letter-spacing:.5px}.local-badge i,.live-dot{display:inline-block;width:5px;height:5px;border-radius:50%;background:#91ab96;margin-right:7px}main{max-width:1720px;margin:auto;padding:0 4.5vw}.intro{display:flex;justify-content:space-between;align-items:center;padding:47px 0 37px}.eyebrow{color:var(--gold);font-size:11px;letter-spacing:3px;margin:0 0 16px}h1{font-family:Georgia,"Noto Serif TC","Songti TC",serif;font-size:34px;letter-spacing:2px;font-weight:500;margin:0}h1 span{color:#ceba94}.intro-copy{color:var(--muted);font-size:13px;margin:16px 0 0;line-height:1.8}.edition{font-family:serif;color:#b7ab97;font-size:15px;letter-spacing:3px;border-left:1px solid #89775855;padding:10px 0 10px 26px}.edition span{display:block;color:var(--muted);font:10px Arial;letter-spacing:2px;margin-top:10px}.workspace{display:grid;grid-template-columns:280px minmax(0,1fr);gap:24px;align-items:start}.controls{display:grid;gap:16px}.control-card{border:1px solid var(--line);background:#1a202bb3;padding:21px}.section-label{font-size:13px;letter-spacing:1px;margin-bottom:19px}.section-label>span{color:var(--gold);font:12px Georgia;margin-right:10px}.dropzone{border:1px dashed #657082;min-height:152px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;cursor:pointer;background:#11172270;transition:.15s}.dropzone:hover,.dropzone.dragging{border-color:var(--gold);background:#d9bd7f0c}.dropzone input{position:absolute;width:1px;height:1px;opacity:0}.upload-mark{font-size:29px;color:var(--gold);line-height:1}.dropzone strong{font-size:13px;font-weight:500}.dropzone>span:last-child{font-size:10px;color:var(--muted)}.subtle{font-size:11px;color:var(--muted);line-height:1.9;margin:13px 0 0}.field{display:block;color:#b6beca;font-size:11px;margin:17px 0 0}.field input{display:block;width:100%;margin-top:8px;border:1px solid #3a4250;border-radius:2px;background:#111721;color:var(--text);padding:11px 10px;font-size:12px}.field input::placeholder{color:#697586}.team-field{border-left:2px solid var(--blue);padding-left:10px}.team-field.red{border-color:var(--red)}.primary{background:var(--gold);color:#27241d;border:0;width:100%;padding:14px;font-size:13px;font-weight:600;display:flex;justify-content:space-between}.file-item{display:flex;align-items:center;gap:8px;font-size:11px;color:#bbc4ce;padding-top:13px}.file-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.icon-button{border:0;background:none;font-size:17px;color:var(--muted);padding:1px 4px}.preview-area{min-width:0}.preview-toolbar{display:flex;justify-content:space-between;padding:0 1px 15px;color:#c1c8d0;font-size:12px}.preview-toolbar>span{color:var(--muted);font-size:11px}.empty-state{min-height:615px;border:1px solid #3b414d;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;background:radial-gradient(ellipse at 25% 50%,#5689b019,transparent 45%),radial-gradient(ellipse at 90% 40%,#9b555516,transparent 50%),linear-gradient(145deg,#1c2432,#171c26);position:relative;overflow:hidden}.empty-state:before,.empty-state:after{content:'';position:absolute;width:420px;height:420px;border:1px solid #d9bd7f09;transform:rotate(45deg);pointer-events:none}.empty-state:after{width:460px;height:460px}.empty-emblem{border:1px solid #bda47577;transform:rotate(45deg);width:65px;height:65px;margin:0 0 44px;display:grid;place-items:center}.empty-emblem span{transform:rotate(-45deg);font:38px "Songti TC",serif;color:var(--gold)}.empty-state .eyebrow{font-size:10px}.empty-state h2{font-family:serif;font-size:21px;font-weight:500;letter-spacing:1px}.empty-state>p:not(.eyebrow){color:var(--muted);font-size:12px;line-height:2}.empty-rules{display:flex;gap:17px;color:#9b9c9b;font-size:10px;margin-top:43px}.empty-rules b{color:#7f725d}.report-sheet{border:1px solid #3b414d;background:#1b2230}.report-heading{padding:30px 28px 25px;background:radial-gradient(ellipse at 45% -30%,#ad8a3d25,transparent 70%);border-bottom:1px solid var(--line)}.report-heading h2{font:500 26px "Songti TC",serif;letter-spacing:2px;color:#ead5a5;margin:10px 0}.report-heading p{color:var(--muted);font-size:12px;line-height:1.8;overflow-wrap:anywhere}.report-heading small{color:var(--gold);font-size:9px;letter-spacing:3px}.match-select{width:100%;padding:12px;background:#202839;border:1px solid #485164;color:var(--text);margin-bottom:16px}.team-heading{background:linear-gradient(90deg,#42608288,transparent);padding:16px 22px;display:flex;align-items:center;gap:14px;border-left:3px solid var(--blue)}.team-block:nth-of-type(even) .team-heading{background:linear-gradient(90deg,#81474888,transparent);border-color:var(--red)}.team-heading h3{margin:0;font:20px "Songti TC",serif;overflow-wrap:anywhere}.team-heading span{color:#c4cedb;font-size:11px;white-space:nowrap}.team-heading small{margin-left:auto;font-size:10px;color:var(--muted)}.table-scroll{overflow:auto;max-height:660px;scrollbar-color:#667286 #19202b;scrollbar-width:thin}table{border-collapse:collapse;width:100%;font-size:12px;white-space:nowrap;font-variant-numeric:tabular-nums}th{background:#283448;text-align:right;font-size:11px;font-weight:400;color:#bcd0e5;position:sticky;top:0;z-index:2}th button{border:0;background:none;color:inherit;padding:14px 12px;white-space:nowrap;width:100%;text-align:inherit}td{padding:13px 12px;text-align:right;border-bottom:1px solid #ffffff04}td:first-child,th:first-child{text-align:left;position:sticky;left:0;z-index:1;background:#232d3e}th:first-child{z-index:3}tr:nth-child(even){background:#ffffff03}td:nth-child(2){color:#c4b4d6;text-align:left}tr:hover td{background:#333e50}.missing{color:#728094}.table-note{font-size:10px;color:#8996a9;padding:11px 22px;line-height:1.8;border-top:1px solid #ffffff06}.warning,.error{border:1px solid #877048;padding:12px 15px;line-height:1.7;color:#e0c897;background:#3a3021;margin-bottom:14px;font-size:12px;white-space:pre-wrap}.error{border-color:#9b6262;background:#39272b;color:#ecc1bb}.download-link{display:block;color:var(--gold);font-size:11px;margin-top:12px;overflow-wrap:anywhere;text-decoration:underline}footer{padding:35px 0;color:#6f7a8b;font-size:10px;letter-spacing:1px}footer span{float:right;letter-spacing:0}@media(min-width:1550px){.workspace{grid-template-columns:300px minmax(0,1fr)}}@media(max-width:850px){main{padding:0 20px}.app-header{padding:0 20px}.workspace{grid-template-columns:1fr}.controls{grid-template-columns:1fr 1fr}.export-card{grid-column:1/-1}.intro{padding:32px 0}.edition{display:none}h1{font-size:27px}.empty-state{min-height:450px}}@media(max-width:540px){.app-header{height:75px}.local-badge{font-size:9px;letter-spacing:0}.brand{font-size:16px;gap:9px}.brand small{font-size:8px;letter-spacing:2px}.seal{width:30px;height:36px;font-size:21px}h1{font-size:25px;line-height:1.6}h1 span{display:block}.controls{grid-template-columns:1fr}.control-card{padding:18px}.empty-state h2{font-size:17px}.empty-rules{gap:10px;font-size:9px}.team-heading{padding:14px}.team-heading h3{font-size:18px}.team-heading small{display:none}.report-heading{padding:24px 18px}footer span{float:none;display:block;margin-top:10px}}

.versus-strip{display:flex;align-items:stretch;border-bottom:1px solid var(--line);overflow:auto}.versus-team{background:linear-gradient(90deg,#52799e55,#52799e09);padding:19px 24px;flex:1;min-width:150px;display:flex;align-items:center;justify-content:space-between;gap:16px;color:var(--blue)}.versus-team.red{color:var(--red);background:linear-gradient(90deg,#95545709,#95545755)}.versus-team>span{font:20px serif;overflow-wrap:anywhere}.versus-team strong{font:26px Arial;white-space:nowrap;color:#dfe5ed}.versus-team small{font-size:10px;color:#aab4c2}.versus-divider{display:grid;place-items:center;padding:0 15px;color:var(--gold);font:18px serif;background:#212733;white-space:nowrap}@media(max-width:540px){.versus-team{padding:14px 12px;display:block;min-width:125px}.versus-team>span{font-size:17px;display:block;margin-bottom:10px}.versus-team strong{font-size:22px}.versus-team small{font-size:8px}.versus-divider{padding:0 9px;font-size:15px}}
/* Notebook navigation, version 2 */
.app-layout{display:grid;grid-template-columns:248px minmax(0,1fr);min-height:100vh}.sidebar{padding:34px 22px 25px;border-right:1px solid var(--line);background:#151c28;position:sticky;top:0;height:100vh;overflow:auto}.sidebar .brand{font-size:18px;gap:11px}.nav-caption{font-size:10px;letter-spacing:2px;color:#8e98a8;margin:24px 0 27px}.sidebar nav{display:grid;gap:6px}.nav-item{border:0;background:transparent;padding:14px;text-align:left;color:#aab4c3;font-size:13px;border-left:2px solid transparent}.nav-item>span{display:inline-block;width:27px;color:#9eabc0;font-size:18px}.nav-item:hover{background:#ffffff04}.nav-item.active{color:#e6d4ad;background:linear-gradient(90deg,#b89a5d20,transparent);border-left-color:var(--gold)}.nav-item.active>span{color:var(--gold)}.sidebar-divider{border-top:1px solid var(--line);margin:28px 0 24px}.sidebar .section-label{font-size:11px;color:#adbacb}.sidebar .dropzone{min-height:140px}.sidebar-bottom{font-size:11px;color:#a4b0c0;margin-top:35px;line-height:2}.sidebar-bottom span{font-size:10px;color:#68778b}.main-panel{padding:36px 36px 0;width:100%;max-width:1700px}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:25px;margin-bottom:28px}.page-heading h1{font-size:32px}.page-heading .eyebrow{font-size:9px;letter-spacing:3px;margin-bottom:12px}.page-heading .intro-copy{margin-top:12px}.page-actions{width:170px;flex-shrink:0;text-align:right}.page-actions .primary{justify-content:center}.page-actions>span{font-size:10px;display:block;margin-top:10px;color:#a8b6c6}.settings-panel{border:1px solid var(--line);background:#1a2130;margin-bottom:20px}.settings-panel summary{padding:17px 20px;cursor:pointer;font-size:12px;color:#d6c29d}.settings-panel summary>span{font-size:10px;color:#7d8b9f;margin-left:15px}.settings-grid{padding:0 20px 22px;display:grid;grid-template-columns:1fr 1fr;gap:20px}.settings-grid .field{margin:0}.settings-grid #team-editors{grid-column:1/-1;display:flex;gap:20px;flex-wrap:wrap}.settings-grid #team-editors .field{min-width:180px;flex:1}.view-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:20px 0 15px}.export-actions{display:flex;align-items:center;gap:14px;flex-shrink:0}.export-actions>span{font-size:10px;color:var(--muted)}.secondary{border:1px solid #6c624f;background:#b79b6512;color:#d6c49f;padding:11px 17px;font-size:12px}.filters{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.filter-select{padding:10px 12px;background:#222b3a;border:1px solid #414e62;color:#d3dbe7;font-size:12px;max-width:220px}.filter-caption{font-size:11px;color:var(--muted)}.report-sheet .report-heading{padding:24px}.table-scroll{max-height:70vh}.profession-strip{display:flex;gap:8px;overflow:auto;margin:0 0 18px;padding-bottom:8px}.profession-chip{border:1px solid #3a485c;padding:12px 17px;background:#1b2534;color:#b9c7d9;white-space:nowrap;font-size:12px}.profession-chip.selected{border-color:#bfa36a;background:#c4a66616;color:#e7d1a4}.profession-chip small{color:#8395ad;margin-left:8px}.leaders-intro{background:#222a38;border-left:2px solid var(--gold);padding:17px 20px;margin-bottom:18px;color:#b4c0d2;font-size:12px;line-height:1.9}.leaders-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.leader-card{border:1px solid #394459;background:linear-gradient(145deg,#252d3c,#1a2230);padding:20px}.leader-card h3{font:17px serif;color:#d0dced;margin:0 0 17px;line-height:1.5}.leader-value{font:25px Arial;color:var(--gold);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.leader-context{font-size:10px;color:#8798ad;margin:9px 0 18px;line-height:1.8}.winner-list{max-height:240px;overflow:auto;margin:0;padding:0;list-style:none}.winner-list li{padding:10px 0;border-top:1px solid #ffffff09;color:#dbe1e9;font-size:12px;overflow-wrap:anywhere}.winner-list small{display:block;color:#8b9bb1;font-size:10px;margin-top:5px}.history-header{display:flex;justify-content:space-between;gap:15px;align-items:center;padding:20px;background:#1e2838;border:1px solid var(--line)}.history-header h2{font:22px serif;color:#d8c69f;margin:0}.history-list{display:grid;gap:12px;margin-top:14px}.history-row{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:20px 23px;border:1px solid var(--line);background:#1b2432}.history-row h3{font-size:16px;font-weight:500;margin:0 0 9px;color:#ded6c5}.history-row p{font-size:11px;color:#8799af;margin:0;line-height:1.8;overflow-wrap:anywhere}.history-actions{display:flex;gap:9px;flex-shrink:0}.text-button{border:0;background:none;color:#a6bad1;font-size:11px;padding:10px}.danger-button{color:#d29b98}.file-item{cursor:pointer}.file-item.selected>span{color:var(--gold)}.cloud-error{color:#e4a6a2!important}.cloud-saved{color:#a7c3a8!important}#download-list:not(:empty){padding:16px;border:1px solid #6a5e44;background:#29291f;margin-bottom:20px;display:flex;gap:15px;flex-wrap:wrap}#download-list .download-link{margin:0}.warning,.error{margin-top:15px}.report-heading h2{overflow-wrap:anywhere}.sidebar .file-list{max-height:240px;overflow:auto}@media(min-width:1800px){.main-panel{padding-left:50px;padding-right:50px}}@media(max-width:1100px){.app-layout{grid-template-columns:210px minmax(0,1fr)}.sidebar{padding:30px 16px}.main-panel{padding:30px 24px 0}.leaders-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.export-actions>span{display:none}}@media(max-width:750px){.app-layout{display:block}.sidebar{position:relative;height:auto;border-right:0;border-bottom:1px solid var(--line);padding:20px}.sidebar .brand{font-size:18px}.nav-caption,.sidebar-divider,.sidebar>.section-label,.sidebar-bottom,.sidebar>.subtle{display:none}.sidebar nav{grid-template-columns:repeat(4,1fr);gap:3px;margin-top:20px}.nav-item{padding:10px 4px;text-align:center;font-size:11px}.nav-item>span{display:block;width:auto;margin-bottom:6px}.sidebar .dropzone{min-height:56px;margin-top:15px;flex-direction:row}.sidebar .dropzone .upload-mark{font-size:23px}.sidebar .file-list{max-height:100px}.main-panel{padding:25px 18px 0}.page-heading h1{font-size:27px}.page-actions{width:125px}.page-actions .primary{font-size:11px;padding:12px}.page-heading .intro-copy{font-size:11px}.settings-grid{grid-template-columns:1fr;gap:15px}.leaders-grid{grid-template-columns:1fr}.view-toolbar{gap:12px;align-items:flex-start}.filters{gap:6px}.filter-select{max-width:145px;padding:9px;font-size:11px}.secondary{padding:10px;font-size:11px}.history-row{display:block}.history-actions{margin-top:13px}.history-header{align-items:flex-start}.history-header h2{font-size:18px}.table-scroll{max-height:65vh}}
/* Date navigation and compact explanations */
.page-heading{margin-bottom:17px}.page-heading h1{font-size:28px}.page-heading .eyebrow{margin-bottom:7px}.page-heading .intro-copy{margin-top:8px}.settings-panel summary{padding:12px 18px}.field small{display:block;color:#8896a9;font-size:10px;line-height:1.6;margin-top:7px}.settings-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.compact-report-heading{padding:14px 20px!important}.report-title-line{display:flex;justify-content:space-between;gap:15px;align-items:center}.report-title-line h2{font-size:20px;margin:0;letter-spacing:1px}.report-title-line>span{color:var(--gold);font-size:11px;white-space:nowrap}.report-help{font-size:11px;color:#98a9c0;line-height:1.8}.report-help summary{cursor:pointer;padding:9px 0 0;color:#adbbce}.report-help>p{font-size:11px!important;margin:8px 0 0!important;white-space:pre-wrap;overflow-wrap:anywhere}.leaders-grid+.report-help{margin-top:10px}.report-help+.leaders-grid{margin-top:13px}.metric-badge{display:inline-block;color:#e3c279;font-size:9px;margin-left:5px;vertical-align:middle;letter-spacing:0;white-space:nowrap}.history-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:20px;margin-top:18px;align-items:start}.battle-calendar{border:1px solid #3c4657;padding:16px;background:#1c2635;position:sticky;top:20px}.calendar-navigation{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.calendar-navigation input{width:150px;background:transparent;color:#e4c991;border:0;padding:5px;font:14px Arial}.calendar-navigation .text-button{font-size:22px;padding:4px 10px}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}.calendar-weekdays{text-align:center;font-size:10px;color:#8190a7;margin-bottom:9px}.calendar-day{min-height:44px;border:1px solid transparent;background:transparent;padding:5px 0;color:#8c99ab;font-size:12px}.calendar-day small{display:block;font-size:8px;line-height:1.5;margin-top:3px;color:#6b7e95}.calendar-day:disabled{opacity:.5}.calendar-day.has-battles{border-color:#7b6a4644;background:#aa8c4910;color:#e4d0a7}.calendar-day.has-battles small{color:#bfa772}.calendar-day.selected{border-color:var(--gold);background:#b4955538}.calendar-shortcuts{display:flex;justify-content:space-between;gap:4px;border-top:1px solid #3d4655;margin-top:15px;padding-top:10px}.calendar-shortcuts .text-button{padding:7px 4px;font-size:10px}.calendar-shortcuts .selected{color:var(--gold);text-decoration:underline}.history-list{margin:0}.history-date-group{font-size:12px;font-weight:400;color:var(--gold);letter-spacing:1px;margin:9px 0 0}.history-row{padding:17px 18px}.history-row h3{font-size:14px}.history-actions{flex-wrap:wrap}.battle-calendar .subtle{font-size:10px}@media(max-width:1150px){.history-layout{grid-template-columns:245px minmax(0,1fr);gap:14px}.history-row{display:block}.history-actions{margin-top:10px}.settings-grid{grid-template-columns:1fr 1fr}}@media(max-width:850px){.history-layout{grid-template-columns:1fr}.battle-calendar{position:static;max-width:410px;width:100%}.history-row{display:flex}.calendar-day{min-height:42px}}@media(max-width:540px){.settings-grid{grid-template-columns:1fr}.report-title-line{align-items:flex-start}.report-title-line h2{font-size:18px}.report-title-line>span{font-size:10px}.history-row{display:block}.page-heading h1{font-size:25px}}
/* Compact shared status: one lightweight line, full errors always readable. */
.status-line{display:flex;align-items:baseline;flex-wrap:wrap;gap:5px 18px;padding:7px 2px;margin:4px 0 12px;min-width:0;border-bottom:1px solid #3b42503d;color:#a8b5c7;font-size:11px;line-height:1.65}.status-line>div:empty{display:none}.status-line #cloud-state{display:inline;color:#9aabbf;font-size:11px;flex-shrink:0}.status-line .cloud-error{font-weight:500}.status-warning{color:#c9b17d}.status-info{color:#91a698}.status-error{color:#edb1aa;flex-basis:100%;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8;padding:2px 0}.status-details summary{cursor:pointer;list-style:none}.status-details summary::after{content:' ▾';font-size:9px;opacity:.65}.status-details[open] summary::after{content:' ▴'}.status-details>div{white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%;padding:5px 0;color:#aebbcf}.status-details summary::-webkit-details-marker{display:none}.status-line .status-warning,.status-line .status-info{min-width:0}.view-toolbar{margin-top:11px;align-items:center}.filters{align-items:center}.filter-select{height:37px;line-height:17px;vertical-align:middle}.export-actions .secondary{height:37px;padding-top:9px;padding-bottom:9px}.back-button{border:0;padding:0;background:none;color:#a6b6ca;font-size:11px;margin:0 0 10px;cursor:pointer}.back-button:disabled{color:#637185;opacity:.6;cursor:default}.page-actions{align-self:center}.settings-panel{margin-bottom:5px}.match-banner{display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:67px;padding:13px 20px;margin:0 0 14px;border:1px solid #3e4b60;background:linear-gradient(100deg,#28425b66,#1e2635 47%,#53313966);position:relative}.match-banner[hidden]{display:none}.match-banner:before{content:'';position:absolute;top:0;left:0;width:3px;height:100%;background:#87b1d9}.match-banner:after{content:'';position:absolute;top:0;right:0;width:3px;height:100%;background:#c98080}.match-banner-teams{display:flex;align-items:center;justify-content:center;gap:25px;flex:1;min-width:0;flex-wrap:wrap}.match-banner-team{display:flex;gap:10px;align-items:center;color:#a9cdea;font:23px "Songti TC",serif;min-width:0;overflow-wrap:anywhere}.match-banner-team.red{color:#e0a3a0}.match-banner-team svg{width:23px;height:28px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.2;opacity:.75}.match-banner-vs{display:flex;align-items:center;gap:6px;color:#d5b87b;flex-shrink:0}.match-banner-vs svg{height:29px;width:29px;fill:none;stroke:currentColor;stroke-width:1.4}.match-banner-vs b{font:italic 17px Georgia;letter-spacing:1px}.match-banner-meta{font-size:10px;color:#a7aeb8;line-height:1.7;text-align:right;flex-shrink:0;max-width:210px}.match-banner-meta>span{color:#cbb98f}.match-banner-meta summary{cursor:pointer;color:#7d8da1}.match-banner-meta details>span{display:block;overflow-wrap:anywhere;white-space:normal}.page-heading{margin-bottom:14px}@media(max-width:750px){.status-line{gap:4px 12px;padding:6px 1px;font-size:10px}.status-line #cloud-state{font-size:10px}.status-error{font-size:11px}.match-banner{padding:12px;gap:12px}.match-banner-teams{gap:13px}.match-banner-team{font-size:20px;gap:6px}.match-banner-team svg{width:18px}.match-banner-meta{font-size:9px;max-width:120px}.match-banner-vs svg{width:23px;height:23px}.match-banner-vs b{font-size:14px}.view-toolbar{align-items:center}.export-actions{align-items:center}}@media(max-width:480px){.match-banner{display:block}.match-banner-teams{gap:13px}.match-banner-meta{max-width:none;text-align:center;display:flex;justify-content:center;gap:12px;margin-top:7px}.match-banner-team{font-size:18px}.match-banner-meta details>span{max-width:230px}.filter-select{height:36px}.export-actions .secondary{height:36px}}
.home-button{margin-left:15px;color:#c8b58e}.manager-toolbar{display:flex;align-items:center;justify-content:space-between;gap:15px;border-bottom:1px solid #3a4454;padding:0 0 16px;color:#92a4bb;font-size:11px}.manager-toolbar>div{display:flex;align-items:center;gap:8px}.manager-section{margin-top:25px}.manager-section h2{font:20px "Songti TC",serif;color:#d9c69f;margin:0 0 15px}.manager-section h2 small{font:10px Arial;color:#8194ac;margin-left:13px}.manager-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.match-card{border:1px solid #3e4c60;padding:20px;background:linear-gradient(125deg,#25374a55,#1c2534 70%);position:relative}.match-card.draft-card{border-color:#786641;background:linear-gradient(125deg,#72603920,#1c2534 65%)}.match-card h3{font:21px "Songti TC",serif;color:#d0ddeb;margin:17px 0 12px;line-height:1.5;overflow-wrap:anywhere}.match-card p{font-size:11px;color:#a1b0c5;line-height:1.8;margin:4px 0}.card-state{font-size:10px;color:#dbbc7d;letter-spacing:1px}.card-state.saved{color:#a2bfa8}.match-card .card-filename{color:#71849e;font-size:10px;overflow-wrap:anywhere}.card-actions{display:flex;align-items:center;gap:12px;margin-top:18px}.card-actions .primary{width:auto;padding:11px 17px;font-size:12px}.match-card .card-error{color:#e4a6a2;margin-top:12px;white-space:pre-wrap;overflow-wrap:anywhere}.manager-empty{padding:22px 0;color:#8d9eb5;font-size:13px;line-height:1.9;max-width:700px}.main-panel:has(#manager-import) .view-toolbar{margin:0;height:0}.main-panel:has(#manager-import) .status-line{margin-bottom:20px}@media(max-width:1050px){.manager-grid{grid-template-columns:1fr}}@media(max-width:750px){.sidebar nav{grid-template-columns:repeat(5,1fr)}.manager-section h2 small{display:block;margin:8px 0 0}.manager-toolbar{align-items:flex-start}.manager-toolbar>div{flex-wrap:wrap;justify-content:flex-end}.match-card{padding:17px}.match-card h3{font-size:20px}}
/* One homepage: pending imports remain above cloud date filters. */
.unified-home-section{margin-top:24px}.home-tabs{display:flex;align-items:center;gap:8px;border-bottom:1px solid #3c4759;padding-bottom:12px}.home-tab{border:1px solid #3c4b61;padding:10px 17px;color:#9eafc4;background:#1c2636;font-size:12px}.home-tab.selected{border-color:#a58b57;color:#e0c590;background:#a58b5715}.home-tabs>span{margin-left:auto;color:#8b9eb5;font-size:11px}.unified-home-section .history-layout{margin-top:16px}.unified-home-section .history-row h3{font-family:"Songti TC",serif;font-size:19px;color:#cddcec}.unified-home-section .history-list{min-width:0}.unified-home-section .history-row h3{overflow-wrap:anywhere}@media(max-width:750px){.sidebar nav{grid-template-columns:repeat(4,1fr)}.home-tabs{gap:6px}.home-tab{padding:10px 12px;font-size:11px}.home-tabs>span{font-size:10px}.unified-home-section .history-row h3{font-size:18px}}
/* Forged battle standards: compact, local vector artwork. */
.match-banner{min-height:100px;padding:16px 24px;border-color:#8b76564d;background:radial-gradient(ellipse at 12% 50%,#376a9759,transparent 47%),radial-gradient(ellipse at 88% 50%,#8e394c50,transparent 47%),linear-gradient(180deg,#27303d,#151c29);box-shadow:inset 0 1px #d3bb7b66,inset 0 -1px #0b101b,0 6px 18px #0003;flex-wrap:wrap}.match-banner-teams{gap:24px}.match-banner-team{font-size:clamp(23px,2.5vw,34px);font-weight:700;letter-spacing:2px;text-shadow:0 2px 2px #000,0 0 22px #68a4d535}.match-banner-team.red{text-shadow:0 2px 2px #000,0 0 22px #b45c6c45}.match-banner-team svg{width:43px;height:52px;opacity:1;stroke-width:1.1;filter:drop-shadow(0 3px 2px #0008)}.match-banner-team .crest-shadow{fill:#a5bcd0;stroke:#d7c38c}.match-banner-team .crest-field{fill:#244966;stroke:#6c95b4}.match-banner-team.red .crest-field{fill:#682f3d;stroke:#b7757e}.match-banner-vs{position:relative;justify-content:center;min-width:64px;height:58px}.match-banner-vs svg{position:absolute;width:65px;height:65px;opacity:.5;stroke-width:2;filter:drop-shadow(0 2px 1px #000)}.match-banner-vs b{position:relative;font:italic bold 29px Georgia;color:#f1d99a;text-shadow:0 2px 2px #000,0 0 9px #9e724d}.match-banner-title{flex-basis:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #bc9e5830;padding-bottom:8px;margin-bottom:-3px}.match-banner-title h2{font:16px 'Songti TC',serif;color:#d9c694;margin:0;letter-spacing:2px}.match-banner-title button{padding:4px 12px;font-size:12px}.match-banner-meta{max-width:100%;flex-basis:100%;display:flex;justify-content:center;gap:14px;text-align:left}.match-banner-meta details>span{max-width:900px}.edit-button{border-color:#ad915c;color:#edd6a4}.edit-dialog{width:min(560px,calc(100% - 28px));max-height:90vh;overflow:auto;color:#d4dce7;background:#1b2433;border:1px solid #9d8454;padding:25px;box-shadow:0 20px 90px #000a}.edit-dialog::backdrop{background:#060b15ba}.edit-dialog h2{margin-top:0;color:#e5cf9f;font-family:serif}.edit-dialog .field{display:flex;margin:12px 0}.edit-dialog input,.edit-dialog textarea{width:100%;background:#111b2a;color:#e4e8ef;border:1px solid #44536b;padding:9px;font:inherit}.edit-dialog .card-error{white-space:pre-wrap;overflow-wrap:anywhere}.edit-dialog .card-actions{justify-content:flex-end;margin-top:18px}@media(max-width:600px){.match-banner{padding:12px;gap:12px}.match-banner-teams{gap:12px}.match-banner-team{font-size:23px;letter-spacing:0;gap:7px}.match-banner-team svg{width:31px;height:42px}.match-banner-vs{min-width:40px;height:44px}.match-banner-vs svg{width:48px;height:48px}.match-banner-vs b{font-size:24px}.match-banner-title h2{font-size:14px}}
/* A single compact battle surface; all controls and explanations sit above it. */
.battle-surface{border:1px solid #78694f;background:#19212f;box-shadow:0 5px 20px #0002}.battle-surface .match-banner{margin:0;padding:8px 18px 10px;min-height:0;gap:7px;border:0;border-bottom:1px solid #88724c;box-shadow:inset 0 1px #d3bb7b66;background:linear-gradient(125deg,#5680a51c 0 2%,transparent 2% 98%,#b65c6429 98%),radial-gradient(ellipse at 12% 50%,#376a9759,transparent 47%),radial-gradient(ellipse at 88% 50%,#8e394c50,transparent 47%),linear-gradient(180deg,#27303d,#151c29)}.battle-surface .match-banner-title{padding:0 0 5px;margin:0;gap:10px}.match-banner-title h2{display:flex;align-items:center;gap:8px;font-weight:800;font-size:17px;letter-spacing:2px;text-shadow:1px 2px #070c14,0 0 14px #b6985144}.match-banner-title h2>svg{width:19px;height:24px;fill:#5e5031;stroke:#dcc185;stroke-width:1.4;flex-shrink:0}.match-banner-title h2>span{overflow-wrap:anywhere}.match-banner-tools{display:flex;align-items:center;gap:12px;flex-shrink:0;font-size:10px;color:#cfb982}.battle-surface .match-banner-teams{gap:20px}.battle-surface .match-banner-team{font-size:clamp(22px,2.4vw,31px);line-height:1.25}.battle-surface .match-banner-team svg{height:41px;width:34px}.battle-surface .match-banner-vs{height:42px;min-width:58px}.battle-surface .match-banner-vs svg{width:51px;height:51px}.battle-surface .match-banner-vs b{font-size:27px}.battle-surface #report{margin:0}.battle-surface .report-sheet{border:0;margin:0;box-shadow:none}.battle-surface .team-block:first-child{margin-top:0}.battle-surface .leaders-grid{margin:0;padding:0;gap:1px;background:#3f4c61}.battle-surface .leader-card{margin:0;border:0;min-width:0}.battle-help summary{cursor:pointer;list-style:none;color:#acb8c9}.battle-help summary:after{content:' ▾';font-size:9px}.battle-help[open] summary:after{content:' ▴'}.battle-help summary::-webkit-details-marker{display:none}.battle-help>div{max-width:100%;white-space:normal;overflow-wrap:anywhere;color:#aebbcf;padding:5px 0;line-height:1.7}#battle-help{min-width:0;flex:1}.status-line{padding:4px 2px;margin:0 0 6px;gap:4px 15px;border-bottom:0}.view-toolbar{margin-bottom:5px}.view-toolbar #view-filters{min-width:0;flex:1}.view-toolbar .profession-strip{margin:5px 0 0;gap:5px;flex-wrap:wrap}.view-toolbar .profession-chip{padding:5px 10px;font-size:12px}.view-toolbar .profession-chip small{margin-left:5px}@media(max-width:600px){.battle-surface .match-banner{padding:7px 10px 8px;display:flex}.match-banner-title h2{font-size:14px;letter-spacing:1px;min-width:0}.match-banner-tools{gap:6px}.match-banner-tools button{padding:4px 7px}.battle-surface .match-banner-teams{gap:10px}.battle-surface .match-banner-team{font-size:22px;max-width:100%;overflow-wrap:anywhere}.battle-surface .match-banner-team svg{height:34px;width:28px}.battle-surface .match-banner-vs{height:35px;min-width:40px}.battle-surface .match-banner-vs svg{width:43px;height:43px}.battle-surface .match-banner-vs b{font-size:23px}.battle-surface .match-banner-title{flex-wrap:wrap}.status-line{font-size:10px}.view-toolbar{align-items:flex-start}.battle-surface .leader-card{padding:15px}}
/* One local typography system across every interface and export. */
:root{--font-ui:"Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;--obsidian:#101722;--steel:#acc8df;--antique-gold:#d6ba7d;--opponent-red:#b77980}body,body *{font-family:var(--font-ui)!important}.sidebar .brand{position:relative;gap:11px;padding:11px 8px 13px 3px;background:linear-gradient(110deg,#32547748,#17202e 60%,#79424a25);box-shadow:inset 0 1px #a68a514d,inset 0 -1px #6578923d;letter-spacing:1px;font-size:18px;font-weight:800;color:#d3e1ed}.sidebar .brand:after{content:'';position:absolute;right:0;bottom:0;width:38px;height:3px;background:linear-gradient(90deg,#9e724d,#dbc48e);transform:skewX(-35deg)}.brand b{font-weight:800;color:#dec38a;text-shadow:0 2px #090e17}.brand small{font-size:8px;font-weight:600;letter-spacing:2.5px;margin-top:5px;color:#8e9fb2}.sidebar .seal{position:relative;isolation:isolate;width:45px;height:54px;flex-shrink:0;border:0;background:none;box-shadow:none}.seal svg{position:absolute;inset:0;width:100%;height:100%;filter:drop-shadow(0 3px 2px #0009)}.seal>span{position:relative;font-size:23px;font-weight:900;color:#f1deb2;text-shadow:0 2px #080c14}.emblem-metal{fill:#39495a;stroke:#c0a46e;stroke-width:1.1}.emblem-core{fill:#15283b;stroke:#748ca3;stroke-width:.9}.emblem-blades{fill:none;stroke:#ceb47c;stroke-width:1.7}.seal .emblem-blades{opacity:.35}.page-title-lockup{display:flex;align-items:center;gap:12px;position:relative;padding:4px 24px 7px 0;isolation:isolate}.page-title-lockup:before{content:'';position:absolute;inset:2px -15px 0 20px;background:linear-gradient(100deg,#34577955,#1b27372b 65%,transparent);clip-path:polygon(0 0,96% 0,100% 50%,96% 100%,0 100%);z-index:-1}.page-title-lockup:after{content:'';position:absolute;bottom:1px;left:54px;width:min(190px,70%);height:2px;background:linear-gradient(90deg,#e4c785,#566b80,transparent)}.page-title-lockup>svg{width:40px;height:48px;flex-shrink:0;filter:drop-shadow(0 3px 3px #0007)}.page-heading h1{font-size:30px;line-height:1.35;font-weight:850;letter-spacing:3px;color:#e4d2a9;text-shadow:0 2px 1px #050a12,0 0 20px #496c8938;overflow-wrap:anywhere}.page-heading .eyebrow{margin-bottom:3px;color:#9caec2;letter-spacing:3px}.page-heading .intro-copy{margin-top:7px}.page-heading{min-width:0}.page-heading>div:first-child{min-width:0}.battle-surface .report-sheet{display:flex;flex-direction:column;gap:8px;background:#101722}.battle-surface .team-block{border:1px solid #57728d;margin:0;min-width:0;background:#1b2635}.battle-surface .team-block:nth-of-type(even){border-color:#87585f}.battle-surface .team-block:first-child{border-top:1px solid #57728d}.battle-surface .match-banner-title{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,3fr) minmax(0,1fr);align-items:center;position:relative}.battle-surface .match-banner-title h2{grid-column:2;justify-content:center;text-align:center;min-width:0;margin:0;font-weight:800}.battle-surface .match-banner-title h2>span{overflow-wrap:anywhere}.battle-surface .match-banner-tools{grid-column:3;justify-self:end;justify-content:flex-end;flex-wrap:wrap;min-width:0;gap:4px 8px}.match-banner-tools>span{white-space:nowrap}.match-banner-team{font-weight:800}.match-banner-vs b{font-weight:850}@media(max-width:700px){.battle-surface .match-banner-title{grid-template-columns:minmax(0,1fr);gap:5px}.battle-surface .match-banner-title h2{grid-column:1;justify-self:center;width:100%;font-size:15px}.battle-surface .match-banner-tools{grid-column:1;justify-self:center;justify-content:center}.sidebar .brand{font-size:17px}.sidebar .seal{width:38px;height:46px}.page-title-lockup>svg{width:34px;height:41px}.page-heading h1{font-size:25px;letter-spacing:2px}.page-title-lockup{gap:9px;padding-right:10px}.page-title-lockup:after{left:43px}}
/* Team identity follows the original team index, even when a filter shows one. */
.battle-surface .team-block.team-blue{border-color:#57728d}.battle-surface .team-block.team-red{border-color:#87585f}.team-block.team-blue .team-heading{background:linear-gradient(90deg,#42608288,transparent);border-color:var(--blue)}.team-block.team-red .team-heading{background:linear-gradient(90deg,#81474888,transparent);border-color:var(--red)}
.nav-item[hidden]{display:none!important}.shared-label{font-size:11px;color:#c7b27f;overflow-wrap:anywhere}.access-panel{display:grid;gap:16px}.access-section{border:1px solid #49576d;background:#1b2534;padding:18px}.access-section h2{margin:0 0 12px;font-size:18px;color:#d9c08d}.access-section select{max-width:100%;background:#142031;color:#d9e2ee;padding:8px;border:1px solid #52617a}.access-viewers{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:7px;margin:14px 0}.access-viewer{display:flex;align-items:flex-start;gap:8px;padding:9px;background:#243044;overflow-wrap:anywhere}.access-viewer input{width:auto;margin-top:3px}.access-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:12px}.access-message{white-space:pre-wrap;overflow-wrap:anywhere;color:#cfbd99;line-height:1.7}.access-panel p{line-height:1.7}.access-panel .field{max-width:650px}.access-section .primary:disabled{opacity:.5}.shared-label+.text-button{white-space:normal}#session-state{overflow-wrap:anywhere}
.sign-in-link{display:block;text-align:center;text-decoration:none;margin:10px 0 4px;font-size:12px}.sign-in-link[hidden]{display:none}.privacy-note{font-size:11px;color:#c7b78e;line-height:1.7;margin:8px 0}.manager-toolbar label{min-width:0;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
/* Verified administrators get a quiet, collapsed tool shelf at sidebar bottom. */
.admin-tools{margin-top:auto;padding-top:14px;border-top:1px solid #50607740;font-size:11px;color:#9aa9bd}.admin-tools[hidden]{display:none!important}.admin-tools summary{cursor:pointer;padding:7px 3px;letter-spacing:1px;color:#9faabd}.admin-tools summary::marker{font-size:9px;color:#a58b58}.admin-tools nav{margin:3px 0 0;display:grid;gap:2px}.admin-tools .nav-item{font-size:11px;padding:9px 10px;letter-spacing:0;min-height:0;color:#a8b4c5}.admin-tools .nav-item span{font-size:13px}.admin-tools .nav-item.active{color:#d3bd8c;background:#b2925420}.admin-tools .nav-item[hidden]{display:none!important}.admin-tools+.sidebar-bottom{margin-top:10px}
.package-note{font-size:11px;color:#b4b9c3;line-height:1.7;margin:2px 0 8px}.file-choice{overflow-wrap:anywhere;min-width:0;text-align:left;flex:1;font-size:11px}.file-item .file-choice{padding:0}.file-item .icon-button{flex-shrink:0}#progress{padding:10px 0;display:flex;align-items:center;gap:10px;font-size:12px;flex-wrap:wrap}#progress[hidden]{display:none}#progress-bar{max-width:100%;accent-color:#c6ad72}#progress-text{overflow-wrap:anywhere}#warnings{color:#c9b17d}#help{flex:1;min-width:0}.export-actions{flex-wrap:wrap}.filters{flex-wrap:wrap}.filter-select{max-width:100%}.brand{min-width:0}.brand small{letter-spacing:1.5px}.match-banner-title{min-width:0}#download-list{overflow-wrap:anywhere}.status-line .status-info{white-space:pre-wrap}#edit-error{color:#edb1aa}

.winner-list .winner-name{display:block;font-size:21px;font-weight:800;line-height:1.45;overflow-wrap:anywhere;white-space:pre-wrap}.winner-list .winner-name.team-blue{color:#a8d2f3}.winner-list .winner-name.team-red{color:#efaaaa}

/* The upload area lives in the main canvas; existing reports remain in memory. */
.upload-panel{width:min(100%,760px);margin:clamp(28px,7vh,85px) auto 42px;text-align:center;padding:32px;border:1px solid #76664b;background:radial-gradient(ellipse at top,#31415480,transparent 75%),#19212f;box-shadow:0 12px 40px #0002}.upload-panel[hidden],.view-toolbar[hidden],.package-note[hidden],#reupload[hidden],#return-report[hidden]{display:none!important}.upload-intro h2{font-size:clamp(22px,2.5vw,31px);color:#e6d1a2;letter-spacing:2px;margin:12px 0}.upload-intro>p:last-child{color:#aab8ca;font-size:13px;line-height:1.8;margin-bottom:25px}.upload-panel .central-dropzone{min-height:240px;padding:28px;gap:16px;border-color:#9d895e;background:#11172266}.central-dropzone .upload-mark{font-size:42px;color:var(--gold)}.central-dropzone strong{font-size:18px;font-weight:700;color:#e6d1a2}.central-dropzone>span:last-child{font-size:12px;line-height:1.8}.upload-privacy{font-size:12px;color:#9faec1;line-height:1.9;margin:20px 0 4px}#reupload{align-self:center;white-space:nowrap}#return-report{font-size:13px;margin-top:12px}@media(max-width:750px){.upload-panel{margin:25px auto;padding:22px 16px}.upload-panel .central-dropzone{min-height:210px;flex-direction:column}.central-dropzone strong{font-size:16px}.upload-intro>p:last-child{font-size:12px}}

.zip-sort-label{display:flex;align-items:center;gap:8px;font-size:12px;color:#cbb88d}.zip-sort-label select{max-width:260px}.row-ordinal{color:#d6ba7d;font-variant-numeric:tabular-nums}

.maker-credit{text-align:center;color:#a9b4c4;padding:20px;font-size:12px}.download-link{overflow-wrap:anywhere;max-width:100%}

.profession-counts{border:1px solid #40516c;margin-bottom:10px;padding:12px;background:#202838}.profession-counts h3{margin:0 0 8px;font-size:16px}.profession-counts h3 small{font-size:11px;color:#a8b5c8;font-weight:400}.profession-counts table{min-width:0;width:100%}.profession-counts th,.profession-counts td{padding:7px 12px}.profession-counts .count-blue{color:#a8d2f3}.profession-counts .count-red{color:#efaaaa}.profession-counts tfoot{font-weight:700;background:#293347}

.match-summary{padding:10px 14px;border-bottom:1px solid #40516c;overflow:auto}.match-summary table{width:100%;min-width:0}.match-summary th,.match-summary td{padding:5px 12px}.match-summary small{display:block;margin-top:5px;font-size:10px;color:#9cabbf}.match-summary .count-blue{color:#a8d2f3}.match-summary .count-red{color:#efaaaa}

.edit-hint{font-size:12px;color:#d6ba7d;animation:edit-hint-pulse 3s ease-in-out infinite}@keyframes edit-hint-pulse{0%,100%{opacity:1}50%{opacity:.68}}@media(prefers-reduced-motion:reduce){.edit-hint{animation:none;opacity:1}}

.comparison-scroll{overflow-x:auto;max-width:100%}.battle-surface .report-sheet.team-panels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:start}.team-panels>.team-block{min-width:0;margin:0}.team-panels .table-scroll{width:100%;max-width:100%;overflow:auto;max-height:65vh}.team-panels .team-heading{min-width:0;flex-wrap:wrap}.team-panels .team-heading h3{overflow-wrap:anywhere}@media(max-width:750px){.battle-surface .report-sheet.team-panels{min-width:720px;grid-template-columns:repeat(2,minmax(0,1fr))}}

.download-settings-dialog{width:min(760px,95vw);max-height:90vh;overflow:auto;background:#1c2635;color:#e1e8f1;border:1px solid #9c8658;padding:20px}.download-settings-dialog::backdrop{background:#0009}.download-settings-dialog h2{margin:0 0 12px}.download-settings-dialog fieldset{border:1px solid #46536a;margin:10px 0;padding:10px}.download-settings-dialog label{display:inline-flex;align-items:center;gap:5px;margin:4px 10px 4px 0}.download-settings-dialog small{display:block;color:#aab8cd;font-size:11px}.setting-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin-top:8px}.setting-column{display:flex;align-items:center;gap:4px;border:1px solid #35445b;padding:3px}.setting-column label{flex:1;min-width:0}.setting-column button{padding:4px 8px}.setting-jobs{display:flex;flex-wrap:wrap}.download-settings-dialog select{padding:8px;background:#29364a;color:#fff;margin:5px}.settings-actions{display:flex;justify-content:flex-end;gap:10px;position:sticky;bottom:-20px;background:#1c2635;padding:12px}.settings-summary{font-size:12px;color:#d6ba7d}#settings-error{color:#ffb6b6}@media(max-width:550px){.setting-columns{grid-template-columns:1fr}}

.leader-sides{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.leader-side{min-width:0;border:1px solid #476383;padding:10px}.leader-side.team-red{border-color:#855761}.leader-side h4{font-size:14px;margin:0 0 8px;color:#a8d2f3;overflow-wrap:anywhere}.leader-side.team-red h4{color:#efaaaa}.leader-side .leader-value{font-size:21px}.leader-side .winner-name{font-size:21px}.leader-sides .winner-list{max-height:280px}.leader-sides .leader-context{margin-bottom:10px}@media(min-width:1101px){.battle-surface .leaders-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

.profession-counts>summary{cursor:pointer;color:#d6ba7d;font-size:12px}.profession-counts:not([open]){padding:8px 12px}.profession-counts[open]>small{display:block;margin:6px 0;color:#a8b5c8;font-size:11px}.profession-filter-label{font-size:12px;color:#d6ba7d;display:inline-flex;align-items:center;gap:6px}

.compact-download-filters{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.compact-download-filters>label{display:inline-flex;gap:4px;align-items:center;font-size:11px;color:#b9c7d9}.compact-download-filters select{max-width:160px;padding:7px;background:#222b3a;border:1px solid #485a73;color:#e2eaf4;font-size:12px}.column-picker{position:relative;font-size:12px}.column-picker>summary{cursor:pointer;padding:8px;border:1px solid #716447;color:#d6ba7d}.column-picker-panel{position:absolute;top:100%;left:0;z-index:40;background:#1c2635;border:1px solid #716447;padding:8px;width:300px;max-height:340px;overflow:auto;box-shadow:0 6px 20px #0009}.column-picker-panel small{font-size:10px;color:#aab8cd}.column-picker-panel .setting-column{margin:3px 0}.view-toolbar{align-items:center;gap:10px}.view-toolbar .export-actions{flex-wrap:nowrap;gap:6px}.package-note{font-size:10px;margin:4px 0 8px}.compact-download-filters button{color:#d6ba7d;background:#253248;border:1px solid #516078}@media(max-width:600px){.view-toolbar{flex-wrap:wrap}.view-toolbar .export-actions{margin-left:auto}.compact-download-filters select{max-width:135px}.column-picker-panel{position:fixed;top:25%;left:5%;width:90%;max-height:50vh}}

.compact-download-filters{align-items:flex-end}.compact-download-filters>label,.compact-download-filters>.filter-control{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px;font-size:11px;color:#b9c7d9;text-align:center}.compact-download-filters .column-picker-panel{text-align:left}.view-toolbar #view-filters{order:1;flex:1;min-width:0}.view-toolbar .export-actions{order:2;margin-left:auto;align-self:flex-end}.compact-download-filters>label select,.column-picker>summary{margin:0;min-height:34px}

.export-more{position:relative}.export-more>summary{cursor:pointer;list-style:none;padding:11px 7px;border:1px solid #a38c59;color:#d6ba7d}.export-more>div{position:absolute;right:0;top:100%;min-width:190px;background:#1c2635;border:1px solid #a38c59;padding:8px;z-index:45}.export-more button{white-space:nowrap;color:#e7d5ad;background:#29364a;border:0;padding:10px}

.brand-copy{min-width:0}.brand-copy .brand-line,.brand-copy>b{display:block;white-space:nowrap}

/* Semantic alignment remains correct when columns are reordered. */
.table-scroll th.column-name,.table-scroll td.column-name{text-align:left;color:var(--text)}
.table-scroll th.column-profession,.table-scroll td.column-profession{text-align:center;color:#c4b4d6}
.table-scroll th.column-number,.table-scroll td.column-number{text-align:right;color:var(--text)}
.table-scroll th.column-ordinal,.table-scroll td.column-ordinal{text-align:center}
.table-scroll th.column-number button{position:relative;padding:14px 42px 14px 12px;text-align:right}
.table-scroll td.column-number{position:relative;padding:13px 42px 13px 12px}
.table-scroll th.column-name button,.table-scroll th.column-profession button{position:relative;text-align:inherit}
.table-scroll .sort-arrow{position:absolute;right:10px;top:50%;transform:translateY(-50%);width:24px;text-align:center}
.table-scroll td .metric-badge{position:absolute;right:4px;top:50%;transform:translateY(-50%);margin:0;width:32px;text-align:center}
.leaders-grid{align-items:stretch}.leader-card{display:flex;flex-direction:column}.leader-card .leader-sides{flex:1;align-items:stretch;grid-auto-rows:1fr}
.leader-side{display:flex;flex-direction:column}.leader-sides .winner-list{max-height:none;overflow:visible}.tie-remainder{margin-top:auto;padding-top:8px;color:#b8c5d8;font-size:12px}

.table-scroll .cell-badges{position:absolute;right:4px;top:50%;transform:translateY(-50%);width:32px;display:flex;justify-content:center;gap:1px}.table-scroll td .cell-badges .metric-badge{position:static;transform:none;width:auto}

.leader-component-title{font-size:14px;color:#d6ba7d;margin:12px 0 6px;border-top:1px solid #ffffff14;padding-top:10px}

.match-summary table,.profession-counts table{table-layout:fixed;width:100%}
.match-summary th:not(:first-child),.match-summary td:not(:first-child),.profession-counts th:not(:first-child),.profession-counts td:not(:first-child){text-align:center;padding:10px 12px}
.match-summary th:first-child,.match-summary td:first-child,.profession-counts th:first-child,.profession-counts td:first-child{width:150px;text-align:left;padding:10px 12px}

.export-actions{align-items:stretch}.export-actions>button{min-height:38px;height:38px;box-sizing:border-box}

/* Reference layout: the compact source totals sit beside the opposing teams. */
.match-banner-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,350px);align-items:center;gap:20px}
.match-banner-body .match-banner-teams{min-width:0}
.banner-summary{min-width:0}.banner-summary .match-summary{padding:8px 0;border:0;overflow:auto}
.banner-summary .match-summary table{table-layout:fixed;width:100%;white-space:normal}
.banner-summary .match-summary th:first-child,.banner-summary .match-summary td:first-child{width:46%;text-align:left;padding:6px 10px}
.banner-summary .match-summary th:not(:first-child),.banner-summary .match-summary td:not(:first-child){text-align:center;padding:6px 8px;overflow-wrap:anywhere}
.banner-summary .match-summary small{font-size:10px;line-height:1.5}
@media(max-width:1000px){.match-banner-body{grid-template-columns:minmax(0,1fr);gap:8px}.banner-summary{width:100%;max-width:440px;justify-self:center}}

.filter-picker{position:relative}.filter-picker>summary{cursor:pointer;list-style:none;border:1px solid #46546a;background:#202b3c;padding:9px 12px;white-space:nowrap}.filter-picker .column-picker-panel{position:absolute;z-index:30;top:100%;left:0;background:#202b3c;border:1px solid #46546a;padding:10px;min-width:200px;max-height:320px;overflow:auto}.picker-option{display:flex;align-items:center;gap:8px;padding:6px;white-space:nowrap}.picker-actions{display:flex;justify-content:space-between;gap:12px;margin-bottom:5px}.picker-actions button{font-size:12px}

/* Shared report surfaces follow the notebook's compact baseline. */
.table-scroll th.column-number button{padding-right:56px}.table-scroll td.column-number{padding-right:56px}
.table-scroll th.column-profession,.table-scroll td.column-profession{text-align:left}
.table-scroll .cell-badges{width:44px}.export-actions>button{min-height:36px;height:36px}
.banner-summary .match-summary th:first-child,.banner-summary .match-summary td:first-child{width:50%;padding:5px 8px}
.banner-summary .match-summary th:not(:first-child),.banner-summary .match-summary td:not(:first-child){padding:5px 8px}
@media(min-width:801px){.match-banner-body{grid-template-columns:minmax(0,1fr) minmax(300px,350px);gap:20px}.banner-summary{max-width:350px}}
@media(max-width:900px){.comparison-scroll{overflow-x:auto}.team-panels{min-width:900px;grid-template-columns:repeat(2,minmax(0,1fr))}}
.compact-download-filters>label select,.filter-picker>summary{min-height:34px;padding:7px 9px;box-sizing:border-box;font-size:12px}

@media(max-width:900px){.battle-surface .report-sheet.team-panels{min-width:900px;grid-template-columns:repeat(2,minmax(0,1fr))}}
.battle-surface .report-sheet.team-panels.comparison-single{min-width:0;grid-template-columns:minmax(0,1fr)}

.export-actions{align-items:flex-start}.jpg-action{display:flex;flex-direction:column;align-items:center;gap:4px}.jpg-action>button{height:36px;min-height:36px;box-sizing:border-box}.jpg-action>small{font-size:10px;line-height:14px;color:#aab6c7;white-space:nowrap}.output-row-count{font-size:10px;line-height:36px;color:#8996a9;white-space:nowrap}

.export-actions{display:flex;flex-direction:column;align-items:flex-end;gap:5px}.output-hint{font-size:10px;line-height:14px;color:#aab6c7;white-space:nowrap}.output-buttons{display:flex;gap:8px;align-items:center}.output-buttons>button{height:36px;min-height:36px;box-sizing:border-box}
/* Full-width banner body prevents its totals column shrinking toward the VS. */
.battle-surface .match-banner-body{width:100%;flex:0 0 100%;min-width:0;box-sizing:border-box}
@media(min-width:801px){.battle-surface .match-banner-body{grid-template-columns:minmax(0,1fr) 350px}.battle-surface .banner-summary{width:350px;max-width:100%;justify-self:end;margin-left:auto}.battle-surface .match-banner-body .match-banner-teams{justify-content:center}}
@media(max-width:800px){.battle-surface .match-banner-body{grid-template-columns:minmax(0,1fr)}.battle-surface .banner-summary{justify-self:center;margin-left:0}}

/* Equal, non-wrapping output controls, independent of toolbar pressure. */
.view-toolbar .export-actions{flex-shrink:0;min-width:220px;margin-left:auto}
.view-toolbar .output-hint{width:100%;text-align:center}
.view-toolbar .output-buttons{display:grid;grid-template-columns:repeat(2,106px);gap:8px;justify-content:end;flex-shrink:0}
.view-toolbar .output-buttons>button{display:inline-flex;align-items:center;justify-content:center;width:106px;min-width:106px;height:36px;min-height:36px;flex-shrink:0;white-space:nowrap;word-break:normal;overflow-wrap:normal;box-sizing:border-box;padding:0 10px;line-height:1}

/* Compact metric labels share the existing forged-gold battle palette. */
.leader-card h3.metric-heading{display:flex;align-items:center;gap:9px;font-family:var(--font-ui);font-size:20px;font-weight:800;line-height:1.35;color:#dec38a;margin:0 0 14px;min-height:28px}
.metric-heading>span:last-child{min-width:0;overflow-wrap:anywhere}.metric-icon{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;flex:0 0 26px;border:1px solid #a58c5459;border-radius:3px;background:#c8a95e0d;color:#dec38a}.metric-icon svg{width:20px;height:20px;display:block}

/* Freeze identity columns, with semantic selectors independent of metric order. */
.table-scroll{isolation:isolate}.table-scroll th.column-ordinal,.table-scroll td.column-ordinal{position:sticky;left:0;width:56px;min-width:56px;max-width:56px;box-sizing:border-box;padding-left:8px;padding-right:8px;background:#232d3e;z-index:3}
.table-scroll th.column-name,.table-scroll td.column-name{position:sticky;left:56px;width:176px;min-width:176px;max-width:176px;box-sizing:border-box;background:#232d3e;z-index:3;box-shadow:1px 0 #4a5970}
.table-scroll th.column-name,.table-scroll th.column-ordinal{top:0;z-index:5;background:#283448}
.table-scroll td.column-name .cell-value{display:block;width:152px;max-width:152px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.table-scroll tr:hover td.column-name,.table-scroll tr:hover td.column-ordinal{background:#333e50}

/* Stable editing fields: labels above controls never narrow or jump while typing. */
.edit-dialog .field{display:flex;flex-direction:column;align-items:stretch;gap:6px;white-space:nowrap;margin:12px 0;min-width:0}.edit-dialog input,.edit-dialog textarea,.edit-dialog select{width:100%;min-width:0;box-sizing:border-box;font:inherit}.edit-dialog select{padding:9px;background:#111b2a;color:#e4e8ef;border:1px solid #44536b}.edit-dialog textarea{white-space:normal}
.edit-match-button{background:#7a6036!important;border-color:#c8a568!important;color:#fff0ce!important}.result-badge{display:inline-block;font-size:12px;line-height:1.3;margin-left:8px;padding:3px 6px;vertical-align:middle;border:1px solid #aa8d52;background:#4e4128;color:#eed18a}.result-loss{border-color:#7c6870;background:#3a3039;color:#c7afb8}
/* Identity pinning now follows player + profession; ordinal scrolls normally. */
.table-scroll th.column-ordinal,.table-scroll td.column-ordinal{left:auto;z-index:auto}.table-scroll td.column-ordinal{position:static}.table-scroll th.column-ordinal{position:sticky;top:0;z-index:2}
.table-scroll th.column-name,.table-scroll td.column-name{left:0;width:120px;min-width:120px;max-width:120px;padding-left:8px;padding-right:8px}
.table-scroll td.column-name .cell-value{width:104px;max-width:104px}
.table-scroll th.column-profession,.table-scroll td.column-profession{position:sticky;left:120px;width:72px;min-width:72px;max-width:72px;box-sizing:border-box;padding-left:8px;padding-right:8px;z-index:3;background:#232d3e;box-shadow:1px 0 #4a5970}
.table-scroll td.column-profession .cell-value{display:block;width:56px;max-width:56px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.table-scroll th.column-profession{top:0;z-index:5;background:#283448}.table-scroll tr:hover td.column-profession{background:#333e50}
/* Local calendar/history stays compact and never changes report layout. */
.local-storage-note{font-size:11px;line-height:1.5;color:var(--muted,#aab6c8);margin:8px 0 14px}.history-calendar{width:100%;max-width:760px;margin:0 auto 22px;text-align:left}.calendar-tools{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.calendar-tools label{display:flex;gap:8px;align-items:center}.calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;margin:10px 0}.calendar-days button{min-height:42px;border:1px solid #3c485e;background:#202a3b;color:#e6edf8;border-radius:5px}.calendar-days button:disabled{opacity:.35}.calendar-days button.selected{border-color:#d7b575;background:#55462e}.calendar-days small{display:block;font-size:10px;color:#dbc48f}.history-calendar>small{color:#aab6c8}.upload-panel:has(.manager-grid){align-items:stretch}
.calendar-days>span{text-align:center;font-size:11px;color:#aab6c8;padding:3px}

#player-profile-hint{display:block;font-size:12px;line-height:1.5;color:#b9c5d8;margin-top:3px}#player-profile-hint[hidden]{display:none}
.usage-nav{margin-top:0}.usage-help{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.usage-help article{padding:18px;border:1px solid #3a465c;border-radius:8px;background:#202a3b}.usage-help h2{font-size:17px;color:#dbc48f;margin:0 0 10px}.usage-help ul{padding-left:20px;margin:0;color:#c5cfdd;font-size:13px;line-height:1.8}.usage-help li+li{margin-top:6px}@media(max-width:800px){.usage-help{grid-template-columns:1fr}}
#reset-filters{align-self:end;height:36px;white-space:nowrap;flex-shrink:0}
.html-backup-control{width:100%;margin:8px 0}.html-backup-control>label{display:block;text-align:center;font-size:12px;color:#b9c5d8;margin-bottom:5px}.html-backup-row{display:grid;grid-template-columns:minmax(0,1fr) 88px;gap:6px;align-items:center}.html-backup-row>#backup-scope,.html-backup-row>#html-backup{box-sizing:border-box;width:100%;min-width:0;height:36px;min-height:36px;margin:0;padding:6px 8px;white-space:nowrap;font-size:12px}.html-backup-row>#html-backup{display:inline-flex;align-items:center;justify-content:center}@media(max-width:320px){.html-backup-row{grid-template-columns:1fr}.html-backup-row>#html-backup{width:100%}}
/* Compact calendar leaves room for the retained match cards. */
.history-calendar{max-width:460px;margin:0 auto 14px}.calendar-tools{gap:6px;font-size:12px}.calendar-tools label{gap:6px}.calendar-tools input{padding:4px 6px;min-height:30px}.calendar-tools button{padding:4px 6px;font-size:12px}.calendar-days{gap:3px;margin:6px 0}.calendar-days button{min-height:36px;padding:3px;font-size:12px;line-height:1.15}.calendar-days small{font-size:10px;line-height:1.15}.calendar-days>span{padding:1px;font-size:10px}.history-calendar>small{font-size:11px}
/* Home: compact calendar at left, independently scrollable retained records at right. */
#home-layout.home-grid{display:grid;grid-template-columns:320px minmax(0,1fr);gap:18px;align-items:start}#home-layout.home-grid .upload-panel{width:100%;margin:0;padding:12px;text-align:center;box-sizing:border-box}#home-layout.home-grid .upload-intro{display:none}#home-layout.home-grid .history-calendar{max-width:320px;margin:0 auto 10px}#home-layout.home-grid .calendar-tools{gap:3px}#home-layout.home-grid .calendar-tools label{width:100%;justify-content:center}#home-layout.home-grid .calendar-tools button{flex:1;padding:3px}#home-layout.home-grid .calendar-days{gap:2px;margin:5px 0}#home-layout.home-grid .calendar-days button{min-height:30px;padding:2px;font-size:11px}#home-layout.home-grid .calendar-days small{font-size:9px}#home-layout.home-grid .central-dropzone{min-height:72px;padding:10px;gap:5px}#home-layout.home-grid .upload-mark{display:none}#home-layout.home-grid .central-dropzone strong{font-size:14px}#home-layout.home-grid .central-dropzone>span:last-child{font-size:11px}#home-layout.home-grid .upload-privacy{font-size:11px;line-height:1.5;margin:8px 0 0}#home-layout.home-grid #report{max-height:max(240px,calc(100dvh - 260px));overflow:auto;overscroll-behavior:contain;padding-right:4px}#home-layout.home-grid .manager-grid{grid-template-columns:1fr;gap:8px}#home-layout.home-grid .match-card{padding:12px}#home-layout.home-grid .match-card h3{margin:0 0 6px;font-size:14px}#home-layout.home-grid .match-card p{margin:5px 0;font-size:12px}@media(max-width:950px){#home-layout.home-grid{grid-template-columns:1fr}#home-layout.home-grid .upload-panel{max-width:400px;margin:0 auto}#home-layout.home-grid #report{max-height:none;overflow:visible;padding-right:0}}
@media(min-width:1280px){.battle-surface .leaders-grid{grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}}@media(min-width:751px) and (max-width:1279px){.battle-surface .leaders-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}}@media(max-width:750px){.battle-surface .leaders-grid{grid-template-columns:minmax(0,1fr)}}
#home-layout.home-grid .polished-match{padding:14px 16px;border:1px solid #3b485d;border-radius:10px;background:linear-gradient(125deg,#263349,#192333 70%);box-shadow:0 3px 10px #0002}.match-card-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.match-card-top time{font-size:12px;letter-spacing:.5px;color:#dfc593;font-weight:700}.card-save-state{font-size:10px;color:#9eafc5;padding:2px 6px;border:1px solid #46536a;border-radius:4px}.card-save-state.pending{color:#f1c880;border-color:#97754a}.match-card-pair{display:grid;grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr);align-items:center;gap:8px}.match-card-pair+.match-card-pair{margin-top:8px}.match-card-side{min-width:0;display:flex;flex-direction:column;gap:4px;border-left:3px solid #79b7ed;padding:3px 8px}.match-card-side.red{border-color:#d98588;text-align:right;border-left:0;border-right:3px solid #d98588}.match-card-side strong{font-size:16px;line-height:1.4;color:#b4d8f6;overflow-wrap:anywhere}.match-card-side.red strong{color:#efb5b7}.card-vs{text-align:center;font-size:11px;font-weight:800;letter-spacing:1px;color:#c5af80}.card-result{font-size:10px;color:#adb9cb}.card-result.win{color:#efd49d}.match-card-meta{display:flex;gap:12px;align-items:center;color:#9daec5;font-size:11px;margin:12px 0 10px;padding-top:9px;border-top:1px solid #3a485c}.match-card-meta>span:first-child{white-space:nowrap}.match-card-meta>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.match-card-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px}.match-card-actions button{height:30px;min-height:30px;font-size:12px;padding:4px 12px}.match-card-actions .card-share{color:#d9c08d;border:1px solid #716348;border-radius:4px}.match-card-actions button:hover{filter:brightness(1.18)}
.nav-help-icon{display:inline-block;width:18px;height:18px;flex-shrink:0;vertical-align:-3px;margin-right:7px}
.share-ready-dialog{width:min(420px,calc(100vw - 32px));padding:26px 24px;border:1px solid #bd9e65;border-radius:16px;background:radial-gradient(circle at top,#3a4560,#1b2536 65%);color:#e6edf8;box-shadow:0 20px 80px #0009;text-align:center}.share-ready-dialog::backdrop{background:#080d18b8;backdrop-filter:blur(3px)}.share-ready-mark{font-size:32px;color:#e8c47e;line-height:1.2;margin-bottom:8px}.share-ready-dialog h2{font-size:21px;color:#ecd3a2;margin:0 0 12px}.share-ready-dialog p{font-size:14px;line-height:1.7;color:#c7d3e5;margin:0 0 22px}.share-ready-actions{display:flex;justify-content:center;gap:10px}.share-ready-actions a.primary,.share-ready-actions button{width:auto;min-width:112px;height:38px;display:inline-flex;align-items:center;justify-content:center;padding:7px 14px;text-decoration:none;font-size:14px}.share-ready-actions a:focus-visible{outline:2px solid #f0cf8c;outline-offset:3px}
.match-card-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.match-card-actions button{width:100%;padding:4px 5px;white-space:nowrap}.match-card-actions .card-delete{color:#dfabab;border-color:#795252}.delete-confirm-dialog{width:min(420px,calc(100vw - 32px));padding:22px;border:1px solid #8a6969;border-radius:10px;background:#202b3e;color:#e4ebf5}.delete-confirm-dialog::backdrop{background:#080d18b8}.delete-confirm-dialog h2{font-size:19px;margin:0 0 12px}.delete-confirm-dialog p{font-size:14px;line-height:1.7}.delete-confirm-dialog .card-actions{display:flex;justify-content:flex-end;gap:10px}@media(max-width:480px){.match-card-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
.maker-credit{padding:12px 0;font-size:12px;line-height:1.5;letter-spacing:0}.maker-credit p{margin:0}.maker-credit small{display:block;font-size:10px;color:#8d9aae;margin-top:3px}
.maker-credit{width:100%;padding:10px 0;font-size:11px;line-height:1.5;text-align:center}@media(min-width:600px){.maker-credit{white-space:nowrap}}
.maker-credit{box-sizing:border-box;max-width:100%;min-width:0;white-space:nowrap;overflow-x:auto;overscroll-behavior-x:contain}
/* Keep the approved footer at the viewport edge without covering content or the sidebar. */
.main-panel{padding-bottom:calc(64px + env(safe-area-inset-bottom,0px))!important}.main-panel>.maker-credit{position:fixed;left:248px;right:0;bottom:0;z-index:20;width:auto;max-width:none;box-sizing:border-box;padding:9px 12px calc(9px + env(safe-area-inset-bottom,0px));border-top:1px solid #334055;background:#151e2df2;white-space:nowrap;overflow-x:auto;overscroll-behavior-x:contain}@media(max-width:1100px){.main-panel>.maker-credit{left:210px}}@media(max-width:750px){.main-panel>.maker-credit{left:0}}
#player-profile-hint{color:#d6ba7d}

/* Open logo composition, without the surrounding rectangular plaque. */
.sidebar .brand{background:none;box-shadow:none}.sidebar .brand:after{display:none}
#home-layout.home-grid .polished-match{transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}
#home-layout.home-grid .polished-match:focus-within{border-color:#8d9cb7;box-shadow:0 6px 16px #0004}
@media(hover:hover) and (pointer:fine){#home-layout.home-grid .polished-match:hover{transform:translateY(-3px);border-color:#8d9cb7;box-shadow:0 6px 16px #0004}#home-layout.home-grid .polished-match:hover::after{content:"";position:absolute;left:0;right:0;bottom:-4px;height:4px;background:transparent}}
@media(prefers-reduced-motion:reduce){#home-layout.home-grid .polished-match{transition:border-color .18s ease,box-shadow .18s ease}#home-layout.home-grid .polished-match:hover,#home-layout.home-grid .polished-match:focus-within{transform:none}}

/* Match cards share the calendar frame; hover overflow stays inside reserved list space. */
:root{--calendar-frame:#76664b;--calendar-frame-hover:#b9a16e}
#home-layout.home-grid .upload-panel,#home-layout.home-grid .polished-match{border-color:var(--calendar-frame)}
#home-layout.home-grid .polished-match:focus-within{border-color:var(--calendar-frame-hover)}
@media(hover:hover) and (pointer:fine){#home-layout.home-grid .polished-match:hover{border-color:var(--calendar-frame-hover)}}
#home-layout.home-grid .manager-grid{padding:4px 4px 8px;box-sizing:border-box}
#home-layout.home-grid #report{overflow-x:hidden}
@media(max-width:950px){#home-layout.home-grid #report{overflow-x:clip}}

.file-item{display:flex;align-items:center;gap:4px}.file-item .file-choice{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis}.file-item .file-close{flex:0 0 26px;width:26px;height:26px;padding:0;color:#b6c0d0;font-size:18px}.file-item .file-close:hover{color:#e8cc8d}
/* Help stays inside its grid on narrow layouts; navigation icon/text share one baseline. */
.usage-help{width:100%;max-width:100%;min-width:0;box-sizing:border-box}.usage-help article{min-width:0;max-width:100%;box-sizing:border-box;padding:16px;overflow-wrap:anywhere;word-break:normal;white-space:normal}.usage-help h2{min-width:0;white-space:normal;line-height:1.5}.usage-help ul{box-sizing:border-box;min-width:0;max-width:100%;padding:0 0 0 18px;margin:0;list-style-position:outside;white-space:normal}.usage-help li{min-width:0;padding:0;white-space:normal;overflow-wrap:anywhere}
.sidebar .usage-nav{display:flex;align-items:center;gap:8px;min-width:0;box-sizing:border-box;white-space:nowrap}.sidebar .usage-nav .nav-help-icon{display:block;flex:0 0 18px;width:18px;height:18px;margin:0;vertical-align:initial}
@media(max-width:750px){.sidebar .usage-nav{justify-content:center;gap:4px}.sidebar .usage-nav .nav-help-icon{flex-basis:12px;width:12px;height:12px}.usage-help article{padding:14px}}
/* Decorative rose copper and champagne. Team and profession hues remain semantic. */
:root{--gold:#d6b3a6;--rose-copper:#b88f80;--rose-champagne:#ead0c5;--calendar-frame:#80665e;--calendar-frame-hover:#c7a294}
.primary{background:linear-gradient(115deg,#b88f80,#e4c7bb);color:#251d20}
.sidebar nav .nav-item{display:grid;grid-template-columns:20px minmax(0,1fr);align-items:center;column-gap:10px;text-align:left;color:#c9aaa0}
.sidebar nav .nav-item.active{color:#f0d7cd;background:linear-gradient(90deg,#b88f802d,#d6b3a608);border-left-color:#d6b3a6}
.sidebar nav .nav-icon,.sidebar nav .nav-help-icon{display:block;width:20px;height:20px;margin:0;text-align:center;line-height:20px;flex:none}
.sidebar nav .nav-item>span:last-child{min-width:0;white-space:nowrap}
@media(max-width:750px){.sidebar nav .nav-item{grid-template-columns:14px minmax(0,1fr);column-gap:4px;justify-content:center}.sidebar nav .nav-icon,.sidebar nav .nav-help-icon{width:14px;height:14px;line-height:14px}}
/* Full-match comparison keeps the battle context, without the compact summary table. */
#match-banner.compare-banner .banner-summary{display:none}
#match-banner.compare-banner .match-banner-body{grid-template-columns:minmax(0,1fr)}
/* Mobile spacing: halve empty vertical intervals, retaining text and control sizes. */
@media(max-width:750px){
 .sidebar{padding-top:10px;padding-bottom:10px}
 .sidebar .brand{padding-top:5px;padding-bottom:6px}
 .sidebar nav{margin-top:10px}
 .main-panel{padding-top:12px}
 .page-heading{margin-bottom:7px}
 .page-heading .intro-copy{margin-top:4px}
}
/* Mobile home uses a compact natural-flow stack; no negative offsets or hidden controls. */
@media(max-width:750px){
 .sidebar{padding-top:6px;padding-bottom:6px}
 .sidebar .brand{padding-top:0;padding-bottom:0}
 .sidebar nav{margin-top:6px}
 .sidebar .html-backup-control{margin-top:4px;margin-bottom:4px}
 .sidebar .file-list:empty{margin:0;padding:0}
 .main-panel{padding-top:6px}
 .page-heading{margin-bottom:6px}
 .page-heading .intro-copy{margin-top:3px}
 #home-layout.home-grid{gap:10px}
 #home-layout.home-grid .upload-panel{margin-top:0;padding-top:8px;background-color:#19212fd9}
 #home-layout.home-grid .history-calendar{margin-top:0;margin-bottom:6px}
}
/* Two complete footer lines on phones, one unchanged line on desktop. */
@media(max-width:750px){
 .main-panel>.maker-credit{font-size:clamp(11px,3vw,12px);line-height:1.6;white-space:normal;overflow-x:visible;text-align:center;padding:8px 10px calc(8px + env(safe-area-inset-bottom,0px))}
 .maker-credit .footer-line{display:block;white-space:nowrap}
 .main-panel{padding-bottom:calc(80px + env(safe-area-inset-bottom,0px))!important}
 main.main-panel.home-atmosphere{padding-bottom:calc(132px + env(safe-area-inset-bottom,0px))!important}
 .main-panel.home-atmosphere #background-motion{bottom:calc(88px + env(safe-area-inset-bottom,0px))}
}
/* Bright champagne decoration. Approved galaxy and all semantic palettes are unchanged. */
:root{--gold:#e6c98b;--rose-copper:#d5b879;--rose-champagne:#f5dfac;--calendar-frame:#b99b64;--calendar-frame-hover:#f5dfac;--metal-rose:linear-gradient(115deg,#d5b879,#f5dfac 48%,#e6c98b);--metal-glaze:none}
.primary{background:var(--metal-rose);color:#35291e;box-shadow:inset 0 1px #fff3d87a,0 2px 5px #080b1230}
.sidebar nav .nav-item{color:#e6c98b}.sidebar nav .nav-item.active{color:#f5dfac;background:linear-gradient(100deg,#d5b87930,#f5dfac16);border-left-color:#e6c98b;box-shadow:none}
.page-heading h1,.brand b{background:none;-webkit-text-fill-color:currentColor;color:#f5dfac;text-shadow:0 1px #080e18}
#player-profile-hint,.metric-heading,.leader-card h3.metric-heading,.leader-component-title,.usage-help h2,.match-card-top time,.card-vs,.match-banner-title h2,.match-banner-vs b{color:#f5dfac}
.metric-icon{color:#e6c98b;border-color:#b99b6466;background:linear-gradient(135deg,#f5dfac20,#e6c98b0c);box-shadow:none}
#home-layout.home-grid .polished-match{background-image:linear-gradient(125deg,#263349,#192333 70%)}
#home-layout.home-grid .upload-panel{background-image:linear-gradient(145deg,#e6c98b08,transparent)}
.calendar-days button.selected{background:linear-gradient(130deg,#d5b87930,#f5dfac1c);border-color:#e6c98b;color:#f5dfac;box-shadow:none}
.calendar-days small,.calendar-navigation input{color:#f5dfac}
.edit-match-button{background:linear-gradient(115deg,#d5b879,#f5dfac,#e6c98b)!important;color:#35291e!important;border-color:#e6c98b!important}
.share-ready-dialog,.edit-dialog{background-image:none}.share-ready-dialog h2,.edit-dialog h2,.share-ready-mark{color:#f5dfac}
/* Sidebar labels are text, not the legacy 18px icon span. Keep icon slots independent. */
.sidebar nav .nav-item{font-size:12px;line-height:20px}
.sidebar nav .nav-item>span:last-child{width:auto;font-size:12px;line-height:20px;letter-spacing:0;margin-bottom:0;color:inherit}
@media(max-width:750px){
 .sidebar nav .nav-item{font-size:11px;line-height:18px;min-height:40px}
 .sidebar nav .nav-item>span:last-child{font-size:11px;line-height:18px}
}
/* Independent metric cards: preserve responsive columns and both opponent panels. */
.battle-surface .leaders-grid{gap:14px;padding:12px;background:transparent;align-items:stretch}
.battle-surface .leaders-grid>.leader-card{position:relative;min-width:0;margin:0;padding:14px;border:1px solid #4c5669;border-radius:10px;box-shadow:0 2px 6px #0002}
/* Transform only on precise pointers; the lower hit strip prevents hover flicker. */
@media(hover:hover) and (pointer:fine){
 .battle-surface .leaders-grid>.leader-card{transition:transform 180ms ease,border-color 180ms ease,box-shadow 180ms ease}
 .battle-surface .leaders-grid>.leader-card:hover{transform:translateY(-3px);border-color:#a18a62;box-shadow:0 6px 12px #0003}
 .battle-surface .leaders-grid>.leader-card:hover::after{content:"";position:absolute;left:0;right:0;bottom:-4px;height:4px;background:transparent}
}
@media(prefers-reduced-motion:reduce){
 .battle-surface .leaders-grid>.leader-card{transition:none}
 .battle-surface .leaders-grid>.leader-card:hover{transform:none}
}
/* Mobile report controls: profession shortcuts, aligned filters, then downloads. */
@media(max-width:750px){
 .main-panel #profession-quick{width:100%;min-width:0;margin:10px 0}
 .main-panel #profession-quick .profession-quick-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
 .main-panel #profession-quick .profession-quick-grid button{min-width:0;min-height:44px;padding:8px 3px;line-height:1.3;overflow-wrap:anywhere}
 .main-panel .view-toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;width:100%;min-width:0;align-items:stretch;margin-top:12px;margin-bottom:12px;overflow:visible}
 .main-panel .view-toolbar[hidden]{display:none}
 .main-panel .view-toolbar #view-filters{width:100%;min-width:0;order:1;overflow:visible}
 .main-panel .view-toolbar #view-filters:empty{display:none}
 .main-panel .view-toolbar :is(.compact-download-filters,.compact-report-filters){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 8px;width:100%;min-width:0;align-items:end;overflow:visible}
 .main-panel .view-toolbar :is(.compact-download-filters,.compact-report-filters)>:is(label,.filter-control){display:flex;flex-direction:column;align-items:stretch;justify-content:flex-end;gap:6px;min-width:0;width:100%;margin:0;font-size:12px;line-height:1.4;text-align:center;white-space:normal}
 .main-panel .view-toolbar .filter-control>span{display:block;text-align:center}
 .main-panel .view-toolbar :is(.filter-picker,.column-picker,.column-popover){min-width:0;width:100%}
 .main-panel .view-toolbar :is(.filter-picker,.column-picker,.column-popover)>summary,
 .main-panel .view-toolbar :is(.compact-download-filters,.compact-report-filters) select{display:flex;align-items:center;justify-content:center;width:100%;min-width:0;max-width:none;height:44px;min-height:44px;box-sizing:border-box;margin:0;padding:8px 6px;font-size:12px;line-height:1.4;text-align:center;white-space:nowrap}
 .main-panel .view-toolbar :is(#clear-all-filters,#reset-filters){width:100%;min-width:0;min-height:44px;margin:0;padding:8px;font-size:12px;order:2}
 .main-panel .view-toolbar #match-select{grid-column:1/-1}
 .main-panel .view-toolbar :is(.column-picker-panel,.column-popover-panel){position:fixed;top:20%;left:12px;right:12px;bottom:auto;width:auto;min-width:0;max-width:none;max-height:60vh;max-height:60dvh;overflow:auto;overscroll-behavior:contain;z-index:120;padding:10px;text-align:left;white-space:normal}
 .main-panel .view-toolbar :is(.column-picker-panel,.column-popover-panel) label{display:flex;align-items:center;gap:8px;min-width:0;min-height:44px;overflow-wrap:anywhere;white-space:normal}
 .main-panel .view-toolbar :is(.column-picker-panel,.column-popover-panel) input[type=checkbox]{flex-shrink:0;width:18px;height:18px}
 .main-panel .view-toolbar :is(.column-picker-panel,.column-popover-panel) button{min-width:44px;min-height:44px;padding:8px}
 .main-panel .view-toolbar .export-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:8px;order:3;width:100%;min-width:0;margin:0;align-self:stretch}
 .main-panel .view-toolbar :is(.output-hint,.filtered-download-hint,.image-download-hint,#zip-scope){position:static;grid-column:1/-1;order:-1;width:100%;min-width:0;text-align:center;white-space:normal;overflow-wrap:anywhere;font-size:11px;line-height:1.5}
 .main-panel .view-toolbar .output-buttons{display:grid;grid-column:1/-1;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0;width:100%}
 .main-panel .view-toolbar .output-buttons>button,
 .main-panel .view-toolbar .export-actions :is(#export,#export-excel,#cancel-zip){display:flex;align-items:center;justify-content:center;width:100%;min-width:0;max-width:100%;height:44px;min-height:44px;margin:0;padding:8px 6px;font-size:12px;line-height:1.4;white-space:normal}
 .main-panel .view-toolbar .image-download-control{grid-column:1;order:0;min-width:0;width:100%;height:auto}
 .main-panel .view-toolbar #export-excel{grid-column:2;order:1}
 .main-panel .view-toolbar #cancel-zip{grid-column:1/-1;order:2}
 .main-panel .view-toolbar #zip-sort-label{grid-column:1/-1}
 .main-panel .view-toolbar [hidden]{display:none!important}
}
/* Credit stays centered across the viewport; its text wraps naturally on phones. */
.main-panel>.maker-credit{position:fixed;left:0;right:0;bottom:0;width:auto;max-width:none;min-width:0;margin:0;transform:none;pointer-events:none;text-align:center;white-space:normal;overflow:visible;overflow-wrap:anywhere;word-break:normal;line-height:1.6;padding:9px 16px calc(9px + env(safe-area-inset-bottom,0px))}
.main-panel>.maker-credit .footer-line{display:inline;float:none;margin:0;white-space:normal}
@media(max-width:1100px){.main-panel>.maker-credit{left:0}}
@media(max-width:750px){
 .main-panel>.maker-credit{left:0;right:0;font-size:11px;line-height:1.6;padding:8px 12px calc(8px + env(safe-area-inset-bottom,0px))}
 .main-panel{padding-bottom:calc(104px + env(safe-area-inset-bottom,0px))!important}
 main.main-panel.home-atmosphere{padding-bottom:calc(160px + env(safe-area-inset-bottom,0px))!important}
 .main-panel.home-atmosphere #background-motion{bottom:calc(108px + env(safe-area-inset-bottom,0px))}
}
/* Champagne navigation glaze fades into the sidebar at the right edge. */
.sidebar nav .nav-item{color:#e6c98b;background:linear-gradient(90deg,#d5b87912 0%,#f5dfac08 40%,transparent 100%)}
.sidebar nav .nav-item:hover{color:#f5dfac;background:linear-gradient(90deg,#e6c98b32 0%,#f5dfac16 42%,transparent 100%)}
.sidebar nav .nav-item.active,.sidebar nav .nav-item.active:hover{color:#f5dfac;background:linear-gradient(90deg,#d5b87955 0%,#f5dfac28 38%,#e6c98b0c 72%,transparent 100%);border-left-color:#e6c98b;box-shadow:none}
/* One visible hop on pointer entry, then a slow hover float on metric cards. */
@keyframes metric-card-entry-hop{0%{transform:translateY(0)}45%{transform:translateY(-10px)}75%{transform:translateY(-7px)}100%{transform:translateY(-8px)}}
@keyframes metric-card-gentle-entry{from{transform:translateY(0)}to{transform:translateY(-3px)}}
@keyframes metric-card-gentle-float{0%,100%{transform:translateY(-3px)}25%{transform:translateY(-4px)}75%{transform:translateY(-2px)}}
@keyframes metric-card-hover-float{0%,100%{transform:translateY(-8px)}25%{transform:translateY(-10px)}75%{transform:translateY(-6px)}}
.main-panel .guild-comparison-grid{padding-top:12px;padding-bottom:12px}
.main-panel .leaders-grid>.leader-card,.main-panel .leaders-grid>.leader-card:hover,.main-panel .guild-comparison-grid>.guild-comparison-card,.main-panel .guild-comparison-grid>.guild-comparison-card:hover{position:relative;transform:translateY(0);transition:transform 180ms ease,border-color 180ms ease,box-shadow 180ms ease}
 .main-panel.card-motion-enabled .leaders-grid>.leader-card.metric-pointer-hover,.main-panel.card-motion-enabled .guild-comparison-grid>.guild-comparison-card.metric-pointer-hover{animation:metric-card-entry-hop 460ms ease-out 1 both,metric-card-hover-float 1600ms ease-in-out 460ms infinite;transform:translateY(-8px);border-color:#b99b64;box-shadow:0 9px 18px #0004}
 .main-panel .leaders-grid>.leader-card.metric-pointer-hover::after,.main-panel .guild-comparison-grid>.guild-comparison-card.metric-pointer-hover::after{content:"";position:absolute;left:0;right:0;bottom:-12px;height:12px;background:transparent}
.main-panel:not(.card-motion-enabled) .leaders-grid>.leader-card,.main-panel:not(.card-motion-enabled) .guild-comparison-grid>.guild-comparison-card{animation:none;transform:none;transition:none}
@media(prefers-reduced-motion:reduce){
 .main-panel .leaders-grid>.leader-card,.main-panel .guild-comparison-grid>.guild-comparison-card{transition:none}
 .main-panel.card-motion-enabled .leaders-grid>.leader-card.metric-pointer-hover,.main-panel.card-motion-enabled .guild-comparison-grid>.guild-comparison-card.metric-pointer-hover{animation:metric-card-gentle-entry 500ms ease-out 1 both,metric-card-gentle-float 2400ms ease-in-out 500ms infinite;transform:translateY(-3px)}
}

/* Compact page-level return control; calendar selection is retained. */
.page-heading .calendar-return{display:inline-flex;align-items:center;gap:6px;margin:0 0 6px;padding:5px 8px;font-size:12px;line-height:20px;color:var(--gold)}
.page-heading .calendar-return[hidden]{display:none}

/* Small independent card animation toggle, only shown on the two metric pages. */
.page-title-lockup{flex-wrap:wrap}
.page-title-lockup .card-motion-toggle{display:inline-flex;align-items:center;justify-content:center;flex:none;min-height:32px;margin:0 0 0 8px;padding:4px 8px;font-size:11px;line-height:20px;border:1px solid #6d6047;border-radius:6px;color:#e6c98b;background:#b99b6410}
.page-title-lockup .card-motion-toggle[hidden]{display:none}
@media(max-width:750px){.page-title-lockup .card-motion-toggle{min-height:40px;margin-left:0}}
/* Interface language is independent of uploaded record data. */
.language-switcher{display:inline-flex;gap:3px;align-items:center;flex-shrink:0}.language-switcher button{min-height:30px;padding:4px 9px;font-size:12px;border:1px solid #d5b87966;background:#202b3b;color:#e6c98b}.language-switcher button.active{background:#e6c98b;color:#30251b;border-color:#f5dfac}.language-switcher button:focus-visible{outline:2px solid #f5dfac;outline-offset:2px}
