@import url('https://fonts.googleapis.com/css2?family=UnifrakturMaguntia&family=Barlow+Condensed:wght@500;600;700&family=Source+Sans+3:wght@400;500;600&family=EB+Garamond:wght@400;500;600&display=swap');
:root{color-scheme:dark;--bg:#22241f;--panel:#292b25;--line:#656456;--gold:#c5ad7e;--cream:#e9e3d5;--muted:#bbb8ab;--red:#a94837;--serif:'EB Garamond',Georgia,serif;--sans:'Source Sans 3',Arial,sans-serif}
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:32px}body{margin:0;background:var(--bg);color:var(--cream);font:16px/1.5 var(--sans)}button,input{font:inherit}button,a{-webkit-tap-highlight-color:transparent;touch-action:manipulation}button{cursor:pointer;color:inherit}button:disabled{cursor:default;opacity:.5}a{color:inherit;text-decoration:none}button[hidden],[hidden]{display:none!important}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid var(--gold);outline-offset:4px}button{border-radius:0}a:hover{color:var(--gold)}.muted{color:var(--muted)}
.castle-lobby{position:relative;isolation:isolate;background:#30352f;overflow:hidden}.castle-lobby:before{content:'';position:absolute;z-index:-2;inset:0;background:url('/images/castle-yard.webp') center 48%/cover no-repeat}.castle-lobby:after{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,rgba(17,21,18,.86),rgba(17,21,18,.48) 43%,rgba(17,21,18,.08) 76%),linear-gradient(0deg,rgba(15,19,17,.6),transparent 35%,rgba(15,19,17,.28))}
.site-header,main,.records-inner{width:min(1280px,calc(100% - 96px));margin-inline:auto}.site-header{display:flex;justify-content:space-between;align-items:center;min-height:100px;border-bottom:1px solid #e5dfca40;gap:24px}.brand{display:flex;align-items:center;gap:13px;font:500 30px/1 var(--serif);letter-spacing:.02em}.brand img{width:27px;height:33px;opacity:.8}.site-header nav{display:flex;align-items:center;gap:30px;font-size:15px}.outline{border:1px solid #c9c4b16b;background:#24282260;padding:10px 20px;min-height:44px}.outline:hover{border-color:var(--gold);background:#c5ad7e16}.text-button{border:0;background:none;color:var(--muted);padding:10px 0;min-height:44px}.text-button:hover{color:var(--cream)}
.lobby{min-height:720px;display:grid;grid-template-columns:minmax(0,520px) 1fr;gap:70px;align-items:center;padding:42px 0 56px}.play-panel{padding:30px 34px 26px;background:linear-gradient(125deg,#262a25f5,#252923eb);border:1px solid #a9aa8c52;box-shadow:0 16px 50px #0003,inset 0 1px #ded8c31c}.eyebrow{display:block;font-size:12px;font-weight:600;letter-spacing:.15em;color:var(--gold)}h1,h2,h3,p{margin-top:0}h1{font:400 clamp(36px,3.3vw,48px)/1.12 var(--serif);letter-spacing:-.025em;margin:12px 0 12px}.play-intro p{font-size:16px;line-height:1.6;color:var(--muted);margin-bottom:24px}.mode-group{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.mode{padding:13px 4px 12px;background:transparent;border:1px solid #77796a8c;text-align:center;min-width:0}.mode:hover{border-color:var(--gold)}.mode.selected{background:#ddd3b517;border-color:#c2b693;box-shadow:inset 0 -2px #c2b693}.mode strong{font:500 30px/1 var(--serif);font-variant-numeric:lining-nums}.mode strong span{font-size:19px;margin:0 3px;font-style:italic;color:#b5b4a6}.mode small{display:block;font-size:14px;color:var(--muted);margin-top:8px}.mode.selected strong,.mode.selected small{color:#f0e6d0}.queue-actions{margin-top:24px}.region-picker{display:flex;align-items:center;justify-content:space-between;gap:14px;font-size:15px}.region-buttons{display:flex;gap:5px}.region-buttons button{min-width:54px;min-height:40px;padding:6px 12px;border:1px solid #77796a8c;background:transparent;color:var(--muted);font-weight:600}.region-buttons button.selected{border-color:#c2b693;background:#ddd3b517;color:#f0e6d0}.region-buttons button:hover:not(:disabled){border-color:var(--gold)}.region-caption{margin:5px 0 18px;color:var(--muted);font-size:14px}.primary{width:100%;padding:13px 24px;min-height:52px;border:1px solid #d5c3a1;background:#bcaa87;color:#20231e;font:600 19px var(--serif);box-shadow:inset 0 1px #e7decb66;transition:background .18s}.primary:hover:not(:disabled){background:#d0bf9f}.queue-actions>span{display:block;text-align:center;font-size:13px;color:var(--muted);margin-top:9px}.queue-actions>#cancel-queue{width:100%}.practice-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;border-top:1px solid #98978052;padding-top:20px;margin-top:23px}.practice-actions h2{font:400 24px/1.1 var(--serif);margin:0 0 5px}.practice-actions p{font-size:14px;color:var(--muted);margin:0}.practice-buttons{display:flex;gap:8px;width:100%}.practice-buttons button{flex:1;border:1px solid #77796a8c;padding:8px;font-size:14px;min-width:0}.practice-buttons button:hover{background:#ffffff08;border-color:var(--gold)}.scene-caption{align-self:end;justify-self:end;text-align:right;padding-bottom:7px;text-shadow:0 2px 10px #000}.scene-caption span{font-size:12px;letter-spacing:.18em;color:#e0ddcc}.scene-caption p{font:italic 23px var(--serif);color:#e5e1d5;margin:7px 0 0}#notice{position:relative;margin:0 0 28px;padding:15px 20px;background:#272b24;border-left:3px solid var(--gold);color:#ece2ca;max-width:660px}
.records{--gold:#715632;--muted:#686453;--line:#a49b8380;--cream:#303228;color:var(--cream);background:linear-gradient(105deg,#d1c7af,#e2dac7 48%,#d2c9b4);border-top:5px solid #676552;box-shadow:inset 0 4px 12px #3c382717}.rankings{padding:55px 0 0}.section-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:24px}.section-heading h2,.how h2{font:400 42px/1.12 var(--serif);margin:8px 0 0;letter-spacing:-.02em}.rank-tabs{display:flex;border-bottom:1px solid var(--line);gap:2px}.rank-tabs button{border:0;border-bottom:2px solid transparent;background:transparent;padding:10px 19px;min-height:44px;color:var(--muted);font-size:16px}.rank-tabs button.selected{border-bottom-color:#6d5132;color:#3e3525}.podium{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:28px 0;border-block:1px solid var(--line);gap:0}.podium:empty{display:none}.podium-card{padding:20px 22px;position:relative;min-width:0}.podium-card+.podium-card{border-left:1px solid var(--line)}.podium-card .eyebrow{font-size:12px;letter-spacing:.1em}.podium-card h3{font:500 25px/1.2 var(--serif);margin:9px 0 5px;overflow-wrap:anywhere}.podium-card p{color:var(--muted);font-size:14px;margin:0}.podium-card p strong{color:#483a26;font-weight:600;font-size:16px}.medal{display:none}.leaderboard-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left;font-variant-numeric:tabular-nums}th{color:var(--muted);font-size:14px;font-weight:400;padding:12px 16px;border-bottom:1px solid var(--line)}td{font-size:16px;padding:16px;border-bottom:1px solid #a49b834d}td:first-child{color:var(--muted);width:10%}td:nth-child(2){width:48%;font-weight:500}th:last-child,td:last-child{text-align:right}td .rank-badge{display:none}tr.self{background:#725b2d0a}tr.self td:nth-child(2):after{content:'You';font-size:12px;color:#715632;margin-left:12px}.empty-row td{text-align:center!important;padding:35px 16px;color:var(--muted);font-weight:400}.rank-footer{display:flex;justify-content:space-between;gap:22px;padding:17px 0;font-size:13px;color:var(--muted)}.how{display:grid;grid-template-columns:1fr 1.5fr;gap:65px;border-top:1px solid var(--line);padding:43px 0 48px;margin-top:25px}.equipment-note{color:var(--muted);font-size:14px;margin-top:18px}.how ol{margin:0;padding:0;list-style:none}.how li{display:flex;gap:22px;margin-bottom:25px}.how li:last-child{margin-bottom:0}.how li>span{font:400 22px var(--serif);color:#796444;min-width:23px}.how h3{font:500 23px/1.2 var(--serif);margin:0 0 6px}.how p{font-size:16px;line-height:1.6;color:var(--muted);margin-bottom:0;max-width:560px}footer{display:flex;justify-content:space-between;align-items:center;gap:24px;border-top:1px solid var(--line);padding:25px 0 30px;font-size:13px;color:var(--muted)}.wordmark{font:500 25px var(--serif);color:#3d3d31}
dialog{background:#292d26;color:var(--cream);border:1px solid #92917a;padding:34px;width:min(440px,calc(100vw - 32px));box-shadow:0 24px 90px #0009}dialog::backdrop{background:#141912c9;backdrop-filter:blur(3px)}dialog h2,.game-menu h2{font:400 38px/1.1 var(--serif);margin:15px 0}dialog p{font-size:16px;color:var(--muted)}.close{position:absolute;right:14px;top:8px;background:none;border:0;font-size:28px;color:var(--muted);min-width:44px;min-height:44px}label{display:block;font-size:14px;color:var(--muted);margin:20px 0}input{display:block;width:100%;margin-top:8px;background:#1f241e;border:1px solid #757868;color:var(--cream);padding:12px}#auth-error{color:#f0b4a5;font-size:14px;min-height:18px}#auth-switch{width:100%;margin-top:12px}.small{font-size:12px;color:var(--muted);line-height:1.6}
#game{position:fixed;inset:0;background:#141511;z-index:20}#game-mount{position:absolute;inset:0}#game-mount canvas{width:100%;height:100%}.game-hud{position:absolute;inset:22px 24px auto;display:flex;justify-content:space-between;pointer-events:none;z-index:3;text-shadow:0 1px 4px #000}.score{display:flex;position:absolute;left:50%;transform:translateX(-50%);align-items:center;gap:26px;text-align:center;background:#171914cc;padding:13px 23px;border:1px solid #a89b6777;min-width:290px}.score>span{font-family:'Barlow Condensed',sans-serif;font-size:40px;color:var(--gold)}.score>span:last-child{color:#df9985}.score small{font-size:8px;letter-spacing:1px;display:block;color:var(--muted)}.score strong{display:block;margin-top:8px;font-weight:500;font-size:13px}#teams{font-size:10px;line-height:1.8}#ping{font-size:9px}#crosshair{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:34px;z-index:3;pointer-events:none;color:#fff;text-shadow:0 0 3px #000}#health{position:absolute;bottom:65px;left:35px;z-index:3;min-width:155px;color:var(--cream);text-shadow:0 1px 3px #000}#health>span{font-size:8px;letter-spacing:2px}#hp{font-size:36px;font-family:'Barlow Condensed',sans-serif;margin-left:15px}#health>div{height:4px;background:#17171188;margin-top:5px}#hp-bar{display:block;height:100%;width:100%;background:var(--gold);transition:width .15s}.game-help{position:absolute;bottom:18px;left:0;right:0;z-index:3;text-align:center;color:#fff9;font-size:8px;letter-spacing:1px;text-shadow:0 1px 3px #000}#game-overlay{position:absolute;inset:0;display:grid;place-items:center;background:#0d100cb0;backdrop-filter:blur(5px);z-index:5}.game-menu{width:min(410px,calc(100vw - 36px));padding:30px;text-align:center;background:#191b14f5;border:1px solid #746a46}.game-menu p{color:var(--muted);font-size:12px;line-height:1.6}.game-menu .outline{width:100%;margin-top:10px}.danger{color:#d29682}.game-menu input{accent-color:var(--gold);padding:0}.game-menu label{font-size:10px}.gold-text{color:#94b9dc}.crimson-text{color:#e6a18a}
#ranked-queue-hud{position:fixed;top:100px;left:50%;transform:translateX(-50%);z-index:8;background:#15191ee8;color:#f0ddb0;padding:8px 16px;border:1px solid #bda47566;border-radius:4px;font-size:14px;pointer-events:none;text-align:center;max-width:85vw}

#combat-timer{position:absolute;bottom:115px;left:50%;transform:translateX(-50%);padding:8px 14px;background:#151511dd;border:1px solid #c9ae7866;color:#e6c899;font-size:14px;pointer-events:none;white-space:nowrap}
/* Health feedback stays behind the HUD; the center remains fully transparent. */
.damage-vignette{position:absolute;inset:0;pointer-events:none;z-index:2;overflow:hidden}
.damage-vignette-wound,.damage-vignette-flash{position:absolute;inset:0;opacity:0;pointer-events:none}
.damage-vignette-wound{background:radial-gradient(ellipse at center,transparent 52%,rgba(110,0,0,.28) 76%,rgba(105,0,0,.92) 100%);transition:opacity .28s ease-out}
.damage-vignette-flash{background:radial-gradient(ellipse at center,transparent 55%,rgba(200,15,10,.3) 78%,rgba(200,10,5,.85) 100%)}
.damage-numbers{position:absolute;inset:0;z-index:2;pointer-events:none;overflow:hidden}
.damage-numbers span{position:absolute;transform:translate(-50%,-100%);color:#ff5757;font-size:24px;font-weight:800;font-variant-numeric:tabular-nums;text-shadow:0 2px 3px #000,0 0 5px #280000;white-space:nowrap;pointer-events:none}

.charge-ring{--charge:0deg;position:absolute;left:50%;top:50%;width:42px;height:42px;transform:translate(-50%,-50%);border-radius:50%;pointer-events:none;z-index:2;background:conic-gradient(from -90deg,#e5bd62 var(--charge),#c9ae7826 0);mask:radial-gradient(farthest-side,transparent calc(100% - 2px),#000 0)}
.charge-ring.ready{background:#f4d486}


@media(min-width:1500px){.lobby{min-height:780px;grid-template-columns:540px 1fr}.play-panel{padding:36px 40px}}@media(max-width:960px){.site-header,main,.records-inner{width:calc(100% - 48px)}.lobby{grid-template-columns:minmax(0,500px) 1fr;gap:20px;min-height:700px}.scene-caption{display:none}.castle-lobby:before{background-position:62% center}.castle-lobby:after{background:linear-gradient(90deg,#151b17b3,#151b1722)}.site-header nav{gap:20px}.how{gap:35px;grid-template-columns:1fr 1.6fr}.podium-card{padding-inline:16px}}
@media(max-width:620px){.site-header,main,.records-inner{width:calc(100% - 32px)}.site-header{min-height:82px;gap:12px}.brand{font-size:25px;gap:8px}.brand img{width:21px}.site-header nav{gap:10px}.site-header nav>a{display:none}.site-header .outline{padding:8px 13px}.site-header #logout{font-size:13px}.lobby{display:block;min-height:0;padding:28px 0 36px}.play-panel{padding:25px 20px 23px;background:#252a24e8}.castle-lobby:before{background-position:65% center}.play-intro p br{display:none}.mode-group{gap:6px}.mode strong{font-size:28px}.mode small{font-size:13px}.rankings{padding-top:34px}.section-heading{gap:14px;align-items:center}.section-heading h2,.how h2{font-size:35px}.rank-tabs button{padding:9px 12px}.section-heading .eyebrow{max-width:175px;line-height:1.6;font-size:12px}.podium{grid-template-columns:1fr}.podium-card{padding:14px 0;display:grid;grid-template-columns:100px 1fr;gap:5px 10px;align-items:center}.podium-card+.podium-card{border-left:0;border-top:1px solid var(--line)}.podium-card h3{margin:0;font-size:24px}.podium-card p{grid-column:2}.podium-card .eyebrow{grid-row:1 / 3}.rank-footer{flex-direction:column;gap:5px}th,td{padding:12px 8px;font-size:14px}td:nth-child(2){width:34%;overflow-wrap:anywhere}.how{grid-template-columns:1fr;gap:27px;padding:32px 0}.how li{gap:15px}.how .equipment-note{font-size:14px;margin-top:12px}footer{flex-wrap:wrap;gap:12px}footer>span{display:none}.score{min-width:240px;gap:16px}.game-hud{inset:12px 10px auto}#teams{margin-top:95px}.game-help{font-size:8px;padding:0 15px;line-height:1.8}.game-menu h2{font-size:32px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* Regional tournament boards follow their displayed order at every width. */
.board-region-note{font-size:15px;color:var(--muted);margin:12px 0 0}.board-explanation{font-size:15px;color:var(--muted);margin:15px 0 27px}.board-regions button{color:#595441;border-color:#9e947d}.board-regions button.selected{color:#302a1e;border-color:#796341;background:#79634117}.ranked-boards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}.ranking-board{min-width:0;border-top:2px solid #827355;padding-top:17px}.board-title{display:flex;justify-content:space-between;gap:15px;align-items:baseline;padding:0 8px 14px}.board-title h3{font:500 31px/1.15 var(--serif);margin:0}.board-title>span{font-size:13px;color:var(--muted);white-space:nowrap}.ranking-board th,.ranking-board td{padding:13px 8px;font-size:14px}.ranking-board td:nth-child(2){width:auto;overflow-wrap:anywhere}.ranking-board td:first-child{width:40px}.ranking-board tr.self td:nth-child(2):after{display:block;margin:0}.ranking-board .empty-row td{height:110px;font-size:15px;padding:24px 12px}.board-standing{font-size:13px;color:var(--muted);min-height:20px;margin:14px 8px 0}.solo-board{margin-top:38px;padding-top:23px}.solo-board .board-title{padding-bottom:18px}.solo-board .board-title p{font-size:15px;line-height:1.6;color:var(--muted);margin:9px 0 0}.solo-board td:nth-child(2){width:70%}.solo-board th,.solo-board td{font-size:16px;padding:14px 12px}.solo-board .empty-row td{height:90px}.rankings{padding-bottom:18px}
@media(max-width:1000px){.ranked-boards{grid-template-columns:1fr;gap:30px}.ranking-board td:nth-child(2){width:65%}.ranking-board th,.ranking-board td{font-size:16px}.ranking-board .empty-row td{height:85px}.ranking-board tr.self td:nth-child(2):after{display:inline;margin-left:10px}}
@media(max-width:620px){.board-title h3{font-size:28px}.board-title>span{font-size:12px}.solo-board .board-title{flex-direction:column;gap:8px}.ranking-board td:nth-child(2){width:50%}.ranking-board th,.ranking-board td{font-size:14px}.board-regions{gap:4px}.board-regions button{min-width:46px;padding:7px 10px}}

.castle-mode{grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:16px;padding:12px}.castle-mode small{margin:0;font-size:16px}#castle-rules{font-size:14px;color:var(--muted);line-height:1.6;margin:18px 0 0}.castle-hud{position:absolute;z-index:4;top:115px;left:50%;transform:translateX(-50%);width:min(400px,90vw);background:#202720e8;border:1px solid #b6a68080;padding:13px 20px;text-align:center;pointer-events:none;color:#eee8d8;text-shadow:0 1px 2px #000}.castle-front{font-size:12px;letter-spacing:.12em;color:#c0c7b7}.castle-objective{display:block;font-size:20px;margin:5px 0}.castle-capture{height:5px;background:#a09d8a33;margin:10px 0}.castle-capture i{display:block;height:100%;transition:width .1s linear}.castle-detail,.castle-respawn{font-size:14px;line-height:1.5}.castle-respawn{margin-top:8px;color:#e6cf9b}

.spectator-hud{position:absolute;bottom:100px;left:50%;transform:translateX(-50%);z-index:4;display:grid;grid-template-columns:36px minmax(180px,1fr) 36px;gap:8px;align-items:center;text-align:center;background:#171914ed;border:1px solid #a89b6777;padding:10px 14px;color:#eee6d1;font-size:13px;max-width:calc(100vw - 32px)}.spectator-hud[hidden]{display:none}.spectator-hud button{font-size:24px;color:#eee6d1;background:#ffffff0a;border:1px solid #a89b6744;cursor:pointer}.spectator-hud button:disabled{opacity:.3;cursor:default}.spectator-hud small{grid-column:1/-1;font-size:10px;color:#c6c0ae}

.castle-board{margin-bottom:22px}.castle-mode{min-height:88px}

#bandage-hud{position:absolute;bottom:100px;left:50%;transform:translateX(-50%);z-index:12;padding:8px 14px;background:#191b18cc;color:#ddd7c8;font-size:13px;pointer-events:none;white-space:nowrap}

.custom-lobbies{max-width:1080px;margin:32px auto;padding:24px;background:#252820e8;border:1px solid #756a5044;color:#ddd7c8}.custom-lobbies h2{margin:0 0 8px}.custom-create,.custom-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0}.custom-create input{flex:1;min-width:0;padding:12px;background:#171b17;color:#eee4ce;border:1px solid #756a50}.custom-row{border-top:1px solid #756a5033}.custom-row small{display:block;margin-top:6px;color:#b9b2a0}

#match-scoreboard{position:fixed;z-index:70;top:50%;left:50%;transform:translate(-50%,-50%);width:min(850px,94vw);max-height:82vh;overflow:auto;padding:24px;background:rgba(20,19,17,.96);border:1px solid #796c4c;box-shadow:0 15px 65px #0009;color:#e7dfce;pointer-events:none}
#match-scoreboard[hidden]{display:none}#match-scoreboard header{display:flex;justify-content:space-between;align-items:baseline;gap:15px;margin-bottom:18px}#match-scoreboard h2{margin:0;font-size:26px}#match-scoreboard header span{font-size:12px;color:#b8ad98}#match-scoreboard table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}#match-scoreboard th,#match-scoreboard td{padding:9px 12px;text-align:right;border-bottom:1px solid #ffffff12}#match-scoreboard th:first-child{text-align:left}#match-scoreboard thead{font-size:12px;color:#b8ad98}#match-scoreboard tbody th{font-weight:400}#match-scoreboard .scoreboard-team th{padding-top:16px;color:#cbb883;text-transform:uppercase;font-size:12px;letter-spacing:2px}#match-scoreboard .scoreboard-self{background:#bba56a18;color:#fff3ce}@media(max-width:600px){#match-scoreboard{padding:12px}#match-scoreboard th,#match-scoreboard td{padding:7px 4px;font-size:12px}}

/* Tournament homepage: scoped so the match HUD keeps its existing appearance. */
#home{--gold:#795323;--cream:#34271e;--muted:#685744;--line:#ac8e60;color:var(--cream);background:#f3e5c7}
#home .castle-lobby{background:#61757e}
#home .castle-lobby:before{filter:brightness(1.25) saturate(1.25)}
#home .castle-lobby:after{background:linear-gradient(90deg,#18374135,#17313e0a 55%,#142a3b42),linear-gradient(0deg,#12263385,transparent 65%)}
#home .site-header{min-height:96px;color:#fff1ce;border-bottom:1px solid #f4dcaa70;text-shadow:0 2px 8px #18212e}
#home .brand,#home .wordmark{font-family:'UnifrakturMaguntia',var(--serif);font-size:38px}
#home .site-header .outline{background:#8d2c28;border-color:#e5bd72;color:#fff2cf;box-shadow:0 3px 0 #54231f}
#home .lobby{grid-template-columns:minmax(0,510px) 1fr;gap:70px;padding:44px 0;min-height:730px}
#home .play-panel{position:relative;background:linear-gradient(115deg,#fff2d5,#ecd6a6);border:3px double #9d723b;box-shadow:0 15px 40px #172b354d,inset 0 0 0 7px #f8e6be;padding:32px}
#home .play-intro h1{font-size:46px;color:#852d29;line-height:1.08;margin:12px 0 18px}
#home .eyebrow{font-weight:700;letter-spacing:.13em;color:#875025}
#home .illuminated:first-letter{float:left;font-family:'UnifrakturMaguntia',var(--serif);font-size:62px;line-height:.85;color:#942e2a;padding:7px 9px 3px 0}
#home .play-intro p{font-family:var(--serif);font-size:21px;line-height:1.35;color:#55432e}
#home .mode{background:#fbebc5;border-color:#ba945b;box-shadow:0 3px 0 #cbb17d}
#home .mode.selected{background:#2b5870;border-color:#193d50;box-shadow:0 3px 0 #153344,inset 0 0 0 2px #e2bb6c}
#home .mode.selected strong,#home .mode.selected small{color:#fff1ce}
#home .mode strong span{color:inherit;opacity:.75}
#home .mode small{color:#6d5033}
#home .region-buttons button{color:#695034;border-color:#a7844f;background:#f5e3bc}
#home .region-buttons button.selected{background:#2b5870;color:#fff1ce;border-color:#193d50}
#home .primary{background:#972f2a;border:1px solid #6b201e;color:#fff1ce;font-size:24px;box-shadow:0 4px 0 #64201f,inset 0 0 0 2px #bf6b4a;transition:background .15s,transform .15s}
#home .primary:hover:not(:disabled){background:#ae3c32;transform:translateY(-1px)}
#home .text-button{color:#68462d}
#home .text-button:hover{color:#9a2e29}
#home .practice-actions{border-color:#b49966}
#home .practice-buttons button{border-color:#a5834f;background:#f9eac8}
#home .scene-caption{align-self:center;justify-self:start;text-align:left;color:#fff1d0;text-shadow:0 3px 12px #132939;max-width:560px}
#home .scene-caption span{color:#fff0cd;font-weight:700}
#home .scene-caption h2{font-family:'UnifrakturMaguntia',var(--serif);font-size:clamp(56px,6vw,88px);line-height:1.04;font-weight:400;margin:22px 0}
#home .scene-caption p{font-family:var(--serif);font-size:25px;font-style:normal;color:#fff3d4;line-height:1.4}
#home .hero-ribbon{display:inline-block;margin-top:20px;background:#8e2e29;border:1px solid #e1b975;padding:10px 18px;font-family:var(--serif);font-size:20px;box-shadow:0 4px 0 #50231e}
#home .custom-lobbies{background:#f3e3bc;color:#34271e;border:3px double #b69256;box-shadow:0 8px 25px #10253135}
#home .custom-lobbies p,#home .custom-lobbies small,#home #custom-list{color:#685744}
#home .custom-lobbies input{background:#fff5dd;color:#34271e;border-color:#b69256}
#home .custom-lobbies .outline{background:#2b5870;color:#fff1ce;border-color:#183f52}
#home .records{background:radial-gradient(ellipse at top,#fff3d5,#eddbb4);border-top:6px double #ab8248;--cream:#34271e;--muted:#685744;--gold:#8e2e29}
#home .section-heading h2,#home .how h2{font-family:'UnifrakturMaguntia',var(--serif);font-size:46px;color:#822f29}
#home .ranking-board{background:#fff5de7a;border-color:#bc9d67}
#home .how li>span{display:grid;place-items:center;align-self:start;min-width:40px;height:40px;border:1px solid #b18b4c;color:#8e2e29;background:#f9ebcb;font-family:var(--serif)}
#home .how h3{color:#2b5870}
#home .how .illuminated:first-letter{font-size:46px;padding-top:5px}
#home .wordmark{color:#822f29}
#home #notice{background:#fff0cc;color:#633128;border-color:#942e2a}
@media(max-width:1100px){#home .lobby{gap:35px}#home .scene-caption h2{font-size:60px}}
@media(max-width:960px){#home .lobby{grid-template-columns:minmax(0,510px) 1fr}#home .scene-caption{display:none}}
@media(max-width:620px){#home .site-header{min-height:82px}#home .brand{font-size:30px}#home .lobby{display:block;min-height:0;padding:24px 0 32px}#home .play-panel{padding:25px 20px}#home .play-intro h1{font-size:39px}#home .section-heading h2,#home .how h2{font-size:36px}#home .play-intro p{font-size:20px}}

/* Illustrated tournament entry, inspired by a hand-tinted history book. */
#home .castle-lobby{background:radial-gradient(ellipse at 75% 30%,#fff4d9,#ead7b1)}
#home .castle-lobby:before,#home .castle-lobby:after{display:none}
#home .site-header{color:#34271e;text-shadow:none;border-bottom:3px double #b4935d}
#home .site-header .text-button{color:#6d432f}
#home .lobby{grid-template-columns:minmax(0,460px) minmax(0,1fr);gap:44px}
#home .scene-caption{margin:0;text-align:center;text-shadow:none;max-width:100%;justify-self:stretch;color:#34271e}
#home .scene-caption>span{color:#805330;letter-spacing:.16em;display:block;margin-bottom:14px}
#home .tournament-engraving{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;mix-blend-mode:multiply}
#home .scene-caption h2{font-size:clamp(36px,3.5vw,52px);color:#842e28;margin:14px 0 8px}
#home .scene-caption p{font-size:22px;color:#665036;margin:0}
#home .hero-ribbon{text-shadow:none;color:#fff0cf;margin-top:18px;font-size:18px}
@media(max-width:960px){#home .lobby{grid-template-columns:minmax(0,510px);justify-content:center}#home .scene-caption{display:block;grid-row:1}#home .tournament-engraving{max-height:310px;object-fit:contain}#home .scene-caption>span{font-size:11px}#home .scene-caption h2{font-size:36px}#home .scene-caption .hero-ribbon{display:none}}
@media(max-width:620px){#home .lobby{display:flex;flex-direction:column;gap:24px}#home .scene-caption{order:-1}#home .tournament-engraving{max-height:240px}#home .scene-caption h2{font-size:32px}#home .scene-caption p{font-size:18px}#home .play-panel{width:100%}}

/* Keep the illustration and custom server browser beside the match picker. */
#home .lobby{align-items:start}
#home .lobby-side{display:grid;gap:24px;min-width:0;padding-top:8px}
#home .lobby-side .tournament-engraving{max-height:360px;object-fit:contain}
#home .lobby-side .custom-lobbies{width:100%;max-width:none;margin:0;padding:22px}
#home .lobby-side .custom-lobbies h2{font-family:var(--serif);font-size:28px}
#home .lobby-side .custom-lobbies .board-title{align-items:start;gap:16px}
@media(max-width:960px){#home .lobby-side{padding-top:0}#home .lobby-side .scene-caption{grid-row:auto}#home .lobby-side .tournament-engraving{max-height:310px}}
@media(max-width:620px){#home .lobby-side{width:100%}#home .lobby-side .scene-caption{order:0}#home .lobby-side .tournament-engraving{max-height:240px}#home .lobby-side .custom-lobbies{padding:18px}#home .custom-create{flex-wrap:wrap}#home .custom-create input{flex-basis:100%}}

#home .friends-panel{background:#fff0cb;border:3px double #b69256;padding:22px;box-shadow:0 8px 25px #10253120}
#home .friends-panel h2{font:400 30px var(--serif);margin:8px 0 16px;color:#842e28}
#home .friends-panel .outline{background:#2b5870;color:#fff1ce;border-color:#183f52}
#home .friends-panel label{color:#685744;margin:0}
#home .friends-panel input{color:#34271e;background:#fff6e0;border-color:#b69256}
#home .friend-row{display:flex;gap:12px;justify-content:space-between;align-items:center;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid #b692564d}
#home .friend-row>div{display:flex;gap:8px}#home #party-list{padding-top:16px}#home #friends-message{color:#842e28;margin:8px 0 0}
#ranked-ready{position:fixed;inset:0;z-index:15;background:#2a251ee0;overflow:auto;padding:40px 24px;display:grid;place-items:center}
#home .ready-card{width:min(100%,1000px);background:#f7e7c5;padding:32px;border:4px double #b69256;box-shadow:0 12px 50px #0005}
#home .ready-card h2{font:400 42px 'UnifrakturMaguntia',var(--serif);color:#842e28;margin:12px 0}
#home .ready-card .small{color:#685744}#ready-countdown{font-size:22px;font-weight:600;color:#2b5870}
#home .ready-card th,#home .ready-card td{padding:12px 8px;font-size:15px;width:auto;white-space:nowrap}#home .ready-card table{min-width:650px}
#home .ready-card #ready-cancel{display:block;margin:12px auto 0}
@media(max-width:620px){#ranked-ready{padding:16px}#home .ready-card{padding:20px}#home .friends-panel{padding:18px}}

/* Home-only fixed social sidebar; hidden home ancestor removes it during gameplay. */
#home[hidden] #social-widget{display:none!important}
#home #social-widget{position:fixed;right:24px;bottom:24px;z-index:90}
#home #friends-toggle{width:60px;height:60px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:#2b5870;color:#fff1ce;border:2px solid #b69256;box-shadow:0 6px 22px #10253155;position:relative}
#home #social-badge{position:absolute;right:-3px;top:-4px;background:#842e28;border:2px solid #fff0cb;border-radius:50%;min-width:24px;height:24px;font-size:14px;line-height:20px}
#home #friends-panel{position:absolute;right:0;bottom:76px;width:360px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 116px);overflow:auto;padding:18px;border-radius:12px}
#home .social-header{display:flex;justify-content:space-between;align-items:center;gap:12px}#home .social-header h2{font-size:26px;margin:0}#home #friends-close{background:transparent;border:0;color:#842e28;font-size:28px;padding:4px 10px}
#home .social-tabs{display:flex;gap:4px;margin:16px 0;border-bottom:1px solid #b69256}#home .social-tabs button{flex:1;padding:10px 5px;font-size:14px;color:#34271e;background:transparent;border:0;border-bottom:3px solid transparent}#home .social-tabs button[aria-selected=true]{border-bottom-color:#842e28;color:#842e28;font-weight:700}
#home #friends-panel .custom-create{display:flex;gap:6px}#home #friends-panel input{min-width:0;width:100%}#home #friends-panel p{font-size:15px;line-height:1.5}#home #friends-panel .outline{font-size:14px;padding:8px 10px}#home #party-list{padding-top:0}
@media(max-width:620px){#home #social-widget{right:16px;bottom:16px}#home #friends-panel{bottom:72px}}

#home .social-name{color:#842e28;background:transparent;border:0;text-align:left;text-decoration:underline;text-underline-offset:3px;padding:4px 0;font-size:16px;overflow-wrap:anywhere}#home .chat-header{display:flex;gap:12px;align-items:center}#home .chat-header h3{font-size:20px;overflow-wrap:anywhere}#home #chat-history{max-height:260px;min-height:120px;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:10px;padding:12px 0}#home .chat-message{max-width:90%;padding:9px 12px;background:#e3d2b1;border-radius:10px;align-self:flex-start;white-space:pre-wrap;overflow-wrap:anywhere;color:#34271e}#home .chat-message.own{align-self:flex-end;background:#2b5870;color:#fff1ce}#home .chat-message time{display:block;font-size:12px;opacity:.8;margin-top:5px}#home #chat-input{width:100%;resize:vertical;max-height:150px;background:#fff6e0;color:#34271e;border:1px solid #b69256;border-radius:6px;padding:10px;font:inherit}#home #chat-send{margin-top:8px}
