:root{color-scheme:dark;--flag:#80c8ed;--ink:#f3efd8;--muted:#9cad89;--gold:#edc568;font-family:play-ui,Arial,sans-serif;background:#10231c;color:var(--ink)}
*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;min-height:100svh;display:flex;flex-direction:column;background:url('icons/home-forest.svg?v=0.8.117') center top/1200px 900px repeat-y,radial-gradient(ellipse at 35% 40%,#24452c66,transparent 65%)}button,input{font:inherit}button,a,input{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,.ranking-scroll:focus-visible,.color-wheel:focus-visible{outline:2px solid var(--gold);outline-offset:4px}
header{width:100%;max-width:1120px;margin:0 auto;padding:18px 24px 24px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px}.brand{grid-column:2;display:flex;align-items:center;gap:22px;text-decoration:none;color:var(--ink);font-weight:700;font-size:40px;letter-spacing:4px;white-space:nowrap}.brand img{width:54px;height:80px}nav{grid-column:3;justify-self:end;display:flex;gap:12px}.icon-button{width:46px;height:46px;border:1px solid #526e4266;border-radius:9px;background:#20352966;color:#e6dfbc;display:grid;place-items:center}.icon-button:hover{background:#30472c}.icon-button svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.welcome{width:100%;max-width:1120px;margin:0 auto;padding:0 24px 32px;display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,.9fr);gap:20px;align-items:start}.join-card{grid-column:1;grid-row:1;border:1px solid #76915a88;border-radius:16px;padding:16px 28px 24px;background:linear-gradient(145deg,#203b2688,#142c2188);box-shadow:inset 0 1px 0 #d8e7a40b}.card-heading{margin:-8px -16px 0;display:flex;justify-content:center}#home-hero{display:block;width:100%;max-width:520px;height:auto;aspect-ratio:336/208;image-rendering:pixelated;user-select:none}.scene-caption{text-align:center;font-size:21px;margin:0 0 22px;line-height:1.35;color:#efe7c0}#nickname{width:100%;border:1px solid #99a77c;border-radius:10px;padding:15px 19px;background:#10281c88;color:#f3efd8;font-size:21px;font-weight:700;box-shadow:inset 0 1px 5px #0002}#nickname::placeholder{color:#92a486;font-weight:400}fieldset{border:0;padding:0;margin:20px 0 24px}legend{padding:0;margin-bottom:14px;font-size:16px;color:#eee9cd}.color-picker{display:flex;align-items:center;gap:20px}.color-wheel{position:relative;flex:none;width:92px;height:92px;border-radius:50%;touch-action:none;cursor:crosshair;user-select:none;background:conic-gradient(from 90deg,#ef6060,#efef60,#60ef60,#60efef,#6060ef,#ef60ef,#ef6060);box-shadow:0 0 0 3px #14291c,0 0 0 4px #9b9767}.color-wheel:before{content:'';position:absolute;inset:13px;border-radius:50%;background:#193324;box-shadow:0 0 0 1px #ddc99655;pointer-events:none}.ring-center{position:absolute;inset:18px;display:grid;place-items:center;border-radius:50%;cursor:default}.ring-center svg{width:28px;height:35px;pointer-events:none}#color-cursor{position:absolute;width:14px;height:14px;border:2px solid #fff9df;border-radius:50%;background:var(--flag);box-shadow:0 0 0 1px #243126,0 2px 4px #0006;transform:translate(-50%,-50%);pointer-events:none}.color-presets{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;flex:1;min-width:0}.color-preset{height:58px;min-width:0;padding:5px;border:1px solid #60784d66;border-radius:9px;background:#10291d88;color:var(--preset);box-shadow:inset 0 1px 0 #daedab08}.color-preset svg{width:100%;max-width:36px;height:40px;overflow:visible}.color-preset path:first-child{fill:none;stroke:currentColor;stroke-width:2.5}.color-preset path:last-child{fill:currentColor}.color-preset:hover{background:#30432b}.color-preset[aria-pressed=true]{border-color:#f3cb61;box-shadow:0 0 0 1px #f3cb61,inset 0 0 12px #ebcc4b12}
.play-button{position:relative;width:100%;min-height:72px;padding:16px;border:1px solid #ffe49a;border-radius:12px;background:linear-gradient(110deg,#daa53f,#f1cf70 62%,#dbad4a);color:#10271b;font-size:28px;font-weight:700;display:flex;align-items:center;justify-content:center;gap:18px;box-shadow:0 4px 0 #8a692f,inset 0 1px 0 #fff4ce77;transition:filter .15s,transform .15s}.play-button svg{width:25px;height:25px;fill:currentColor}.play-button:hover{filter:brightness(1.08)}.play-button:active{transform:translateY(3px)}.join-card{display:flex;flex-direction:column}
.ranking{grid-column:2;grid-row:1;min-width:0;padding:28px 20px 22px;border:1px solid #60784d55;border-radius:15px;background:linear-gradient(130deg,#1c332480,#14271f88)}.ranking-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:32px}.ranking-title h2{font-size:29px;font-weight:400;margin:0}.ranking-title>span{color:var(--gold);font-size:11px;letter-spacing:1.5px;white-space:nowrap}.ranking-columns,.ranking-row{display:grid;grid-template-columns:46px minmax(0,1fr) 60px;align-items:center;gap:12px;padding:0 12px}.ranking-columns{font-size:12px;color:#8ca17d;margin-bottom:12px}.ranking-columns>span:last-child{text-align:right}.ranking-scroll{height:422px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#64744a66 transparent}#home-ranking{list-style:none;margin:0;padding:0}.ranking-row{min-height:64px;border-radius:10px;border-top:1px solid #a0b27808}.ranking-row:nth-child(odd){background:linear-gradient(100deg,#8ca04b16,#8ca04b06)}.ranking-row:hover{background-color:#7e9e3610}.ranking-place{font-size:24px;color:#8da177;font-variant-numeric:tabular-nums}.ranking-row:nth-child(1) .ranking-place{color:#f2cd69}.ranking-row:nth-child(2) .ranking-place{color:#d8bc72}.ranking-row:nth-child(3) .ranking-place{color:#bea97b}.ranking-player{display:flex;align-items:center;gap:12px;min-width:0;font-size:14px;overflow-wrap:anywhere}.ranking-flag{position:relative;width:24px;height:31px;flex:none;background:var(--banner);clip-path:polygon(0 0,100% 0,100% 75%,50% 100%,0 75%)}.ranking-flag:after{content:'';position:absolute;width:7px;height:7px;background:#16392d66;top:10px;left:9px;transform:rotate(45deg)}.ranking-score{text-align:right;color:#bbcca3;font-size:14px;font-variant-numeric:tabular-nums}#ranking-more{height:12px}#ranking-expand{display:none}footer{width:100%;margin:auto auto 0;padding:14px 20px 24px;display:flex;align-items:center;justify-content:center;gap:12px;color:#8a9b7c;font-size:12px}.footer-domain{font-size:16px;color:#b5bb95}
dialog{color:#384830;background:#eee7ce;border:3px solid #75835a;border-radius:14px;padding:30px;max-width:440px;width:calc(100% - 32px);max-height:85svh;overflow:auto;box-shadow:0 20px 80px #0006}dialog::backdrop{background:#081c15cc}dialog p{font-size:14px;line-height:1.65}dialog h2{font-size:30px;margin:4px 0 18px}.eyebrow{font-size:10px;letter-spacing:1.7px;color:#81815c}.close{position:absolute;right:12px;top:10px;border:0;background:transparent;color:#6b7455;font-size:25px;width:36px;height:36px}.keys{padding:12px;background:#dcdabd;border-radius:6px;line-height:2;font-size:13px}.keys span{color:#6e7657;margin-left:8px}.mobile-tip{color:#6e7657}
@media(max-width:1000px) and (min-width:681px){.welcome{padding:0 18px 28px;gap:16px;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}.join-card{padding:14px 20px 22px}.color-presets{grid-template-columns:repeat(3,1fr);gap:7px}.color-preset{height:42px}.color-preset svg{height:32px}.ranking{padding:24px 14px}.ranking-title h2{font-size:24px}.ranking-columns,.ranking-row{grid-template-columns:32px minmax(0,1fr) 48px;gap:8px;padding:0 6px}.ranking-player{gap:8px;font-size:13px}.scene-caption{font-size:18px}.brand{font-size:32px}}
@media(max-width:680px){body{background-size:900px 800px,auto}header{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;padding:20px 16px 12px}.brand{font-size:28px;letter-spacing:2px;gap:12px}.brand img{width:40px;height:60px}header nav{justify-content:center;width:100%;gap:12px}.icon-button{width:36px;height:34px}.welcome{display:flex;flex-direction:column;max-width:480px;padding:0 20px 28px;gap:32px}.join-card{order:-1;width:100%;padding:0 6px 6px;border:0;box-shadow:none;background:none}.card-heading{margin:0 -12px}.scene-caption{font-size:17px;margin:0 0 20px}#nickname{font-size:18px;padding:14px 16px}fieldset{margin:20px 0 24px}legend{font-size:14px}.color-picker{gap:18px}.color-wheel{width:88px;height:88px}.color-presets{grid-template-columns:repeat(3,1fr);gap:8px}.color-preset{height:44px}.color-preset svg{height:34px}.play-button{min-height:66px;font-size:25px}.ranking{width:100%;padding:22px 14px}.ranking-title{margin-bottom:24px}.ranking-title h2{font-size:26px}.ranking-scroll{height:auto;overflow:visible;overscroll-behavior:auto}.ranking-columns,.ranking-row{grid-template-columns:32px minmax(0,1fr) 52px;gap:8px;padding:0 6px}.ranking-row{min-height:58px}.ranking-player{gap:9px;font-size:13px}.ranking-place{font-size:22px}#ranking-expand{display:flex;width:100%;align-items:center;justify-content:center;gap:12px;min-height:46px;margin-top:16px;border:1px solid #b3a35488;border-radius:8px;background:transparent;color:var(--gold);font-size:14px}}
@media(max-width:350px){.welcome{padding-right:14px;padding-left:14px}.brand{font-size:24px}.scene-caption{font-size:15px}.ranking-title h2{font-size:23px}.color-picker{gap:14px}}
@media(prefers-reduced-motion:reduce){.play-button{transition:none}}
/* Quiet map grid behind the cached clearing, fading at its edges. */
.card-heading{position:relative;isolation:isolate}.card-heading:before{content:'';position:absolute;inset:0;z-index:0;pointer-events:none;background-image:linear-gradient(#91ad6733 1px,transparent 1px),linear-gradient(90deg,#91ad6733 1px,transparent 1px);background-size:calc(100% / 12) calc(100% / 7.43);mask-image:radial-gradient(ellipse at center,#000 45%,transparent 85%)}

#home-hero{position:relative;z-index:1}
/* Compact phone composition, matching the mobile reference. */
@media(max-width:680px){
 header{max-width:480px;flex-wrap:nowrap;justify-content:space-between;gap:10px;padding:18px 22px 14px}
 .brand{font-size:23px;letter-spacing:1.5px;gap:12px}.brand img{width:36px;height:54px}
 header nav{width:auto;gap:8px;flex:none}.icon-button{width:34px;height:34px}.icon-button svg{width:20px;height:20px}
 .welcome{padding:0 14px 22px;gap:14px}.join-card{padding:10px 13px 18px;border:1px solid #76915a70;border-radius:11px;background:linear-gradient(145deg,#203b2666,#142c2188);box-shadow:inset 0 1px 0 #d8e7a40b}
 .card-heading{margin:-4px -5px 0}.scene-caption{font-size:15px;margin:0 0 16px}
 #nickname{font-size:18px;padding:11px 14px;border-radius:8px}fieldset{margin:16px 0 19px}legend{font-size:13px;margin-bottom:12px}
 .color-picker{gap:10px;padding:0 3px}.color-wheel{width:50px;height:50px}.color-wheel:before{inset:8px}.ring-center{inset:11px}.ring-center svg{width:18px;height:25px}#color-cursor{width:11px;height:11px}
 .color-presets{grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}.color-preset{height:44px;padding:3px;border-radius:7px}.color-preset svg{height:32px}
 .play-button{min-height:56px;padding:12px;font-size:24px;border-radius:9px;gap:12px}.play-button svg{width:21px;height:21px}

 .ranking{padding:18px 13px 14px;border-radius:11px}.ranking-title{margin-bottom:18px}.ranking-title h2{font-size:23px}.ranking-title>span{font-size:9px}
 .ranking-columns{font-size:11px;margin-bottom:6px}.ranking-columns,.ranking-row{grid-template-columns:38px minmax(0,1fr) 48px;gap:8px;padding:0 5px}
 .ranking-row{min-height:40px;border-radius:7px}.ranking-player{font-size:12px;gap:10px}.ranking-place{font-size:21px}.ranking-score{font-size:12px}.ranking-flag{width:18px;height:23px}.ranking-flag:after{width:5px;height:5px;top:7px;left:7px}
 #ranking-expand{min-height:42px;margin-top:14px;font-size:13px;border-radius:7px}footer{padding-top:4px;font-size:10px}.footer-domain{font-size:13px}
}
@media(max-width:360px){header{padding:15px 18px 12px;gap:8px}.brand{font-size:20px;letter-spacing:1px;gap:8px}.brand img{width:32px;height:48px}header nav{gap:6px}.icon-button{width:30px;height:32px}.scene-caption{font-size:13px}.color-picker{gap:8px}.color-presets{gap:4px}.color-preset{padding:2px}.ranking-title h2{font-size:21px}}
/* The brand is centred over the entry card, with settings over the ranking. */
@media(min-width:681px){header{grid-template-columns:minmax(0,1.25fr) minmax(0,.9fr);gap:20px}.brand{grid-column:1;font-size:36px;letter-spacing:2px;gap:16px;justify-content:center}header nav{grid-column:2}}
@media(min-width:681px) and (max-width:1000px){header{padding-right:18px;padding-left:18px;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:16px}.brand{font-size:28px;gap:12px;letter-spacing:1px}.brand img{width:44px;height:66px}}
/* Defined olive edges and the real bold Play face, without text blur/strokes. */
.join-card,.ranking{border:1px solid #7d9562;box-shadow:inset 0 0 0 1px #a4b67c18,0 2px 0 #081b1380}
.join-card{border-color:#91a971;background:linear-gradient(145deg,#243e2bcc,#142c21cc)}
.ranking{background:linear-gradient(130deg,#1c3324bb,#14271fbb)}
.color-preset{border-color:#71865a;box-shadow:inset 0 1px 0 #c6d59c20,0 2px 0 #081b1366}
.icon-button{border-color:#71865a}.icon-button svg{stroke-width:1.9}
#nickname{border-color:#b0bc8d;box-shadow:inset 0 0 0 1px #b5c7951a,inset 0 2px 5px #07190f55}
.play-button{border:2px solid #ffe5a0;box-shadow:0 4px 0 #8a692f,inset 0 1px 0 #fff8d999,inset 0 -2px 0 #bf8e3480}
.ranking-title h2,.scene-caption,legend,.ranking-player,.ranking-score,.ranking-place,.ranking-columns,.ranking-title>span,#ranking-expand{font-weight:700}
.ranking-player{color:#f2efd9}.ranking-score{color:#d2ddbb}.ranking-columns{color:#afbe96}
#ranking-expand{border-color:#d0b365;box-shadow:inset 0 1px 0 #e9d69a1a}
@media(min-width:1001px){.ranking-player,.ranking-score{font-size:15px}.ranking-columns{font-size:13px}}
@media(max-width:680px){.ranking-player,.ranking-score{font-size:13px}.ranking-row{min-height:43px}}

@media(min-width:681px){header .brand{justify-content:flex-start;padding-left:16px}}
/* Square brand keeps the existing header height. */
header .brand img{height:auto;aspect-ratio:1;object-fit:contain}
/* A quiet parchment guide; blur exists only while the modal is open. */
#rules{width:calc(100% - 32px);max-width:500px;max-height:calc(100svh - 32px);padding:28px;border:1px solid #b2b780;border-radius:17px;background:linear-gradient(135deg,#f5efd9,#e8e2c5);color:#294534;box-shadow:0 24px 80px #020c0a80,inset 0 0 0 3px #fbf5df80;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#a6ad85 transparent}
#rules::backdrop{background:#071a12ad;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
#rules .close{top:12px;right:12px;width:34px;height:34px;border:1px solid #89977370;border-radius:8px;background:#fff9e333;color:#496348;font-size:26px;line-height:1}
#rules .close:hover{background:#d8dec1}#rules .close:focus-visible{outline-color:#536c42}
.rules-heading{display:flex;align-items:center;gap:13px;padding:8px 24px 22px 0;border-bottom:1px solid #8d9e6c55}.rules-heading img{flex:none}.rules-heading .eyebrow{margin:0 0 5px;font-size:10px;font-weight:700;letter-spacing:1.6px;color:#7d8358}
#rules h2{margin:0;font-size:28px;line-height:1.15;font-weight:700}#rules h3{margin:0 0 5px;font-size:16px;font-weight:700}
.rules-list{list-style:none;padding:0;margin:20px 0;display:grid;gap:18px}.rules-list li{display:flex;align-items:flex-start;gap:12px}.rule-number{flex:none;display:grid;place-items:center;width:29px;height:29px;border:1px solid #acb387;border-radius:8px;background:#d7ddbc66;color:#748053;font-size:12px;font-weight:700}
#rules .rules-list p{margin:0;font-size:14px;line-height:1.55;color:#4a6048}.rules-controls{padding:16px;border:1px solid #b7bf96;border-radius:11px;background:#d8dfc080}#rules .rules-controls h3{font-size:13px;margin-bottom:13px;color:#62744f}.rules-controls>div{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:10px;font-size:13px}.key-group{display:flex;align-items:center;gap:6px}.rules-controls kbd{display:inline-block;font:700 12px var(--ui);padding:5px 7px;border:1px solid #a6b18b;border-bottom-width:2px;border-radius:5px;background:#f6f0d9;color:#3e593b;white-space:nowrap}#rules .rules-controls p{border-top:1px solid #acb58e77;margin:14px 0 0;padding-top:12px;font-size:12px;line-height:1.5;color:#64744f}
@media(max-width:480px){#rules{padding:20px 16px;border-radius:13px}.rules-heading{gap:10px;padding-right:19px}.rules-heading img{width:38px;height:38px}#rules h2{font-size:23px}.rules-heading .eyebrow{font-size:9px;letter-spacing:1px}.rules-list{gap:16px}.rules-list li{gap:9px}.rule-number{width:25px;height:25px}#rules .rules-list p{font-size:13px}#rules h3{font-size:15px}.rules-controls{padding:12px}.rules-controls>div{font-size:12px;gap:8px}.rules-controls kbd{font-size:11px;padding:5px}#rules::backdrop{backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}}
/* Muted heraldic gold with a fine, crisp dark edge. */
header .brand>.brand-title{color:#e5c579;-webkit-text-stroke:.4px #69552d;paint-order:stroke fill;text-shadow:0 1px 0 #081b13}
/* A small heraldic signature, separated from the page by fine gold tooling. */
.home-footer{display:flex;flex-direction:column;gap:15px;max-width:640px;padding:8px 28px 30px;color:#8e9d80}
.footer-ornament{display:flex;align-items:center;gap:13px;width:100%;max-width:720px;color:#b39a5b}.footer-ornament>span{flex:1;height:1px;background:linear-gradient(90deg,transparent,#a58b4b88)}.footer-ornament>span:last-child{transform:scaleX(-1)}.footer-ornament svg{width:52px;height:25px;fill:none;stroke:currentColor;stroke-width:1;flex:none}
.footer-signature{display:flex;align-items:center;gap:10px;color:#d4bc7a;text-decoration:none;font-size:15px;font-weight:700;letter-spacing:3px;line-height:1.2}.footer-signature img{display:block;width:28px;height:28px;opacity:.85}.footer-signature:hover{color:#eed699}.footer-details{display:flex;align-items:center;justify-content:center;gap:13px;font-size:11px;letter-spacing:.6px;font-variant-numeric:tabular-nums}.home-footer .footer-domain{font-size:12px;color:#a8b294}.home-footer .footer-divider{color:#a58b4b}.home-footer .footer-meta{color:#859579}
@media(max-width:680px){.home-footer{padding:2px 28px 25px;gap:12px}.footer-ornament{max-width:420px;gap:10px}.footer-signature{font-size:13px;letter-spacing:2.5px}.footer-signature img{width:25px;height:25px}.footer-details{gap:11px;font-size:10px}.home-footer .footer-domain{font-size:11px}}
/* The bilingual wordmark stays within the square crest's height. */
header .brand>.brand-title{display:flex;flex-direction:column;gap:4px;line-height:1}
header .brand>.brand-title::after{content:'LANDGRABBER';font-size:11px;font-weight:400;letter-spacing:3.6px;line-height:1;color:#b6a36f;-webkit-text-stroke:0;text-shadow:none}
@media(max-width:1000px){header .brand>.brand-title::after{font-size:10px;letter-spacing:2.6px}header .brand>.brand-title{gap:3px}}
@media(max-width:680px){header .brand>.brand-title::after{font-size:9px;letter-spacing:2px}header .brand>.brand-title{gap:3px}}
@media(max-width:360px){header .brand>.brand-title::after{font-size:8px;letter-spacing:1.8px}}
/* The matching Play faces arrive in home-fonts.css before the first render. */
:root{--ui:home-play,Arial,Helvetica,sans-serif;font-family:var(--ui);line-height:1.4;scrollbar-gutter:stable}
header .brand img{flex-shrink:0;aspect-ratio:1/1}#home-hero{aspect-ratio:336/208}
.ranking-title h2{line-height:1.2}.ranking-row{height:64px}.ranking-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ranking-score{white-space:nowrap}.ranking-action{display:none}
.ranking-placeholder>span{display:block;height:10px;width:75%;border-radius:3px;background:#9bae7b14}.ranking-placeholder>span:first-child{width:22px;height:18px}.ranking-placeholder>span:last-child{width:100%}.ranking-placeholder:nth-child(even)>span:nth-child(2){width:58%}
@media(max-width:680px){.ranking-scroll{min-height:215px}.ranking-row{height:43px}.ranking-action{display:flow-root;min-height:56px}.ranking-action #ranking-expand{margin-top:14px;height:42px}.ranking-placeholder>span{height:8px}}
#color-cursor{visibility:hidden}
/* Three-point crown, matching the castle's heraldry. */
.ranking-flag:after{width:62%;height:38%;left:19%;top:23%;transform:none;background:var(--crown,#172c24);clip-path:polygon(0 5%,28% 38%,50% 0,72% 38%,100% 5%,88% 78%,88% 100%,12% 100%,12% 78%)}
header .brand h1{font:inherit;letter-spacing:inherit;margin:0;line-height:inherit}
.footer-about{margin:0;max-width:360px;text-align:center;font-size:12px;line-height:1.6;color:#a6b391}.footer-guide{color:#d4bc7a;font-size:12px;text-underline-offset:4px;text-decoration-color:#b39a5b66}.footer-guide:hover{color:#f4d894}
.guide-back{display:block;width:calc(100% - 40px);max-width:780px;margin:28px auto 20px;color:#d4bc7a;text-decoration:none;font-size:14px}.game-guide{display:block;width:calc(100% - 40px);max-width:780px;margin:0 auto 24px;padding:32px;background:#183022e8;border:1px solid #7d9562;border-radius:16px}.guide-heading{border-bottom:1px solid #7d956255;padding-bottom:28px}.guide-heading>img{float:left;margin:0 16px 8px 0}.game-guide h1{font-size:34px;line-height:1.2;margin:8px 0 22px}.game-guide .eyebrow{margin:0 0 4px}.game-guide h2{font-size:23px;line-height:1.3;margin:0 0 12px;color:#edddaa}.game-guide p,.game-guide li{font-size:16px;line-height:1.75;color:#d8dfc6}.game-guide section{padding:25px 0;border-bottom:1px solid #7d956233}.game-guide ul{padding-left:22px}.guide-play{display:inline-block;padding:12px 18px;border:1px solid #e5c579;border-radius:8px;color:#172c20;background:#e5c579;text-decoration:none;font-weight:700;margin-top:14px}.guide-page footer{gap:16px}
@media(max-width:680px){.game-guide{padding:22px 18px;width:calc(100% - 28px)}.game-guide h1{font-size:28px}.game-guide h2{font-size:21px}.game-guide p,.game-guide li{font-size:14px}.guide-back{width:calc(100% - 32px)}.footer-about{font-size:11px}}

/* Desktop footer: one typographic baseline and balanced separators. */
@media(min-width:681px){.home-footer{gap:10px;padding-bottom:28px}.home-footer .footer-details{gap:14px;font-size:13px;line-height:20px;letter-spacing:.25px;white-space:nowrap}.home-footer .footer-domain,.home-footer .footer-meta{font-size:inherit;line-height:inherit}.home-footer .footer-meta{color:#94a287}.home-footer .footer-divider{display:block;flex:none;width:3px;height:3px;border-radius:50%;background:#a58b4b;overflow:hidden;font-size:0;line-height:0}}

/* Warm gold hover for mouse input, without a looping animation. */
@media(hover:hover) and (pointer:fine){.play-button{transition:filter .22s ease,box-shadow .22s ease,border-color .22s ease,transform .15s ease}.play-button:hover,.play-button:focus-visible{filter:brightness(1.12) saturate(1.12);border-color:#fff2bc;box-shadow:0 4px 0 #9c7732,inset 0 1px 0 #fff9df,inset 0 0 20px #ffe8a155,0 0 12px #efbd5340,0 0 28px #efbd5328}.play-button:active{box-shadow:0 1px 0 #8a692f,inset 0 1px 5px #89612344,0 0 16px #efbd5333}}
@media(prefers-reduced-motion:reduce){.play-button{transition:none}}

/* Size the entry scene to the available height, not just the card width. */
@media(min-width:681px){
 header{padding-top:14px;padding-bottom:16px}
 .welcome{padding-bottom:22px}
 .join-card{padding:12px 22px 18px;min-width:0}
 #home-hero{max-width:clamp(200px,calc((100svh - 440px)*1.615),520px)}
 .scene-caption{font-size:18px;margin-bottom:14px}
 #nickname{font-size:19px;padding:12px 16px}
 fieldset{margin:15px 0 18px}legend{margin-bottom:10px;font-size:14px}
 .color-picker{gap:14px}.color-wheel{width:66px;height:66px}.color-wheel:before{inset:10px}.ring-center{inset:13px}.ring-center svg{width:24px;height:30px}
 .color-presets{grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}.color-preset{height:46px;padding:4px}.color-preset svg{height:34px}
 .play-button{min-height:58px;padding:12px;font-size:25px}

 .ranking{padding:22px 18px 18px}.ranking-title{margin-bottom:22px}.ranking-title h2{font-size:26px}
 .ranking-scroll{height:clamp(210px,calc(100svh - 290px),422px)}
}
/* Portrait tablets need a comfortable entry card, not two squeezed columns. */
@media(min-width:681px) and (max-width:799px){
 header{max-width:620px;display:flex;justify-content:space-between;padding:18px 22px 14px}
 header .brand{padding-left:0;font-size:30px;gap:12px}header nav{flex:none}
 .welcome{display:flex;flex-direction:column;max-width:620px;padding:0 22px 24px;gap:18px}
 .join-card,.ranking{width:100%}.join-card{order:-1}
 #home-hero{max-width:min(420px,calc(43svh))}
 .ranking-scroll{height:320px}.ranking-row{height:54px;min-height:54px}
}
@media(min-width:901px) and (max-height:700px){
 header{padding-top:10px;padding-bottom:12px}.brand{font-size:30px}header .brand img{width:42px}.icon-button{width:40px;height:40px}
 .join-card{padding-top:8px;padding-bottom:14px}.scene-caption{font-size:16px;margin-bottom:10px}
 fieldset{margin:12px 0 15px}.ranking-title{margin-bottom:16px}
}

/* Embedded and landscape windows keep the entry action above the fold. */
@media(max-width:900px) and (max-height:600px){
 header{padding-top:8px;padding-bottom:8px}.welcome{gap:16px}
 #home-hero{max-width:clamp(130px,calc((100svh - 330px)*1.615),280px)}
 .join-card{padding-top:6px;padding-bottom:12px}.scene-caption{font-size:14px;margin-bottom:10px}
 #nickname{padding:9px 12px;font-size:17px}
 fieldset{margin:10px 0 13px}legend{margin-bottom:7px;font-size:12px}
 .color-wheel{width:50px;height:50px}.color-wheel:before{inset:8px}.ring-center{inset:11px}.ring-center svg{width:18px;height:25px}
 .color-picker{gap:10px}.color-presets{gap:5px}.color-preset{height:42px}.color-preset svg{height:30px}
 .play-button{min-height:50px;padding:9px;font-size:22px}
}

/* Balance the Russian title with its readable English subtitle. */
header .brand h1.brand-title{font-size:.94em}

/* One mobile header row; scale the brand before shrinking touch targets. */
@media(max-width:680px){
 body:not(.guide-page)>header{min-height:96px;padding:30px 12px 14px;padding-top:max(30px,calc(env(safe-area-inset-top,0px) + 12px));gap:8px;flex-wrap:nowrap}
 header .brand{min-width:0;font-size:clamp(19px,5.6vw,28px);letter-spacing:.5px;gap:7px}
 header .brand img{width:clamp(40px,11.5vw,54px);height:auto}
 header .brand h1.brand-title{font-size:1em;gap:4px}
 header .brand>.brand-title::after{font-size:clamp(8px,2.3vw,10px);letter-spacing:1.6px}
 header nav{width:auto;flex:none;flex-direction:row;flex-wrap:nowrap;gap:6px}
 header .icon-button{flex:none;width:44px;height:44px;border-radius:10px}
 header .icon-button svg{width:23px;height:23px;stroke-width:2.2}
}

/* A stable install entry below Play, without crowding the two header buttons. */
.home-install{order:1;margin-top:14px;text-align:center}
.home-install-button{min-height:44px;width:100%;padding:10px 12px;border:1px solid #9b8b5e;border-radius:9px;background:#233c2c;color:#e5cf95;font-size:16px;font-weight:700}
.home-install-button:hover{background:#304a34}.home-install-button:disabled{opacity:.65;cursor:wait}
.home-install-note{margin:10px 0 0;color:#d3d8ba;font-size:15px;font-weight:700;line-height:1.5}
@media(display-mode:standalone),(display-mode:minimal-ui){.home-install{display:none}}

/* Share spare desktop height around the entry group, slightly above center. */
@media(min-width:800px){
 body:not(.guide-page)::before,body:not(.guide-page)::after{content:"";display:block;min-height:0;flex-basis:0;flex-shrink:0}
 body:not(.guide-page)::before{flex-grow:.85}
 body:not(.guide-page)::after{flex-grow:1.15;order:1}
 body:not(.guide-page)>header,body:not(.guide-page)>.welcome,body:not(.guide-page)>.home-footer{flex-shrink:0}
 body:not(.guide-page)>.home-footer{order:2;margin-top:0}
}

/* Compact desktop/embedded windows keep both cards and the footer in view. */
@media(min-width:800px) and (max-height:1000px){
 body:not(.guide-page)>header{display:flex;justify-content:space-between;max-width:1120px;padding:10px 18px;gap:12px}
 body:not(.guide-page)>header .brand{padding-left:0;gap:12px;font-size:30px;letter-spacing:2px}
 body:not(.guide-page)>header .brand img{width:44px}
 body:not(.guide-page)>header .icon-button{width:44px;height:44px}
 .welcome{display:grid;max-width:1120px;grid-template-columns:minmax(0,1.25fr) minmax(0,.9fr);gap:16px;padding:0 18px 12px}
 .join-card{padding:8px 16px 12px;order:0}
 #home-hero{max-width:clamp(160px,calc((100svh - 480px)*1.615),520px)}
 .scene-caption{font-size:15px;margin-bottom:10px}
 #nickname{font-size:17px;padding:9px 12px;min-height:44px}
 fieldset{margin:10px 0 12px}legend{font-size:12px;margin-bottom:6px}
 .color-picker{gap:10px}.color-wheel{width:50px;height:50px}.color-wheel:before{inset:8px}.ring-center{inset:11px}.ring-center svg{width:18px;height:25px}
 .color-presets{grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}.color-preset{height:44px;padding:3px}.color-preset svg{height:30px}
 .play-button{min-height:48px;padding:9px;font-size:22px}
 .home-install{margin-top:10px}.home-install-button{font-size:14px;padding:8px 10px}

 .ranking{padding:18px 14px 14px}.ranking-title{margin-bottom:16px}.ranking-title h2{font-size:23px}
 .ranking-scroll{height:clamp(210px,calc(100svh - 220px),422px)}.ranking-row{height:54px;min-height:54px}
 body:not(.guide-page)>.home-footer{padding:4px 20px 12px;gap:6px}
 body:not(.guide-page)>.home-footer .footer-ornament{display:none}
}

/* Custom colour follows the presets, with a slightly larger touch ring. */
.color-wheel{width:76px;height:76px}
@media(max-width:680px),(max-height:1000px){.color-wheel{width:56px;height:56px}}
@media(max-width:680px){
 .color-wheel{width:68px;height:68px}
 .color-wheel:before{inset:12px}.ring-center{inset:16px}
}

/* Centre the flag silhouettes and give the small colour tiles a quiet bevel. */
.color-preset{display:grid;place-items:center;line-height:0;background:linear-gradient(155deg,#2c4535,#172d22 75%);box-shadow:inset 0 1px 0 #dce9b824,inset 0 -2px 3px #07170d55,0 2px 2px #06150e40}
.color-preset svg{display:block;filter:drop-shadow(0 1px 1px #06150e80);pointer-events:none}
.color-preset[aria-pressed=true]{border-color:#f3cb61;background:linear-gradient(155deg,#3c4a30,#223525 75%);box-shadow:0 0 0 1px #f3cb61,inset 0 1px 0 #fff0b238,inset 0 -2px 3px #07170d55,0 2px 3px #06150e55}
@media(hover:hover) and (pointer:fine){.color-preset:hover{background:linear-gradient(155deg,#38533d,#213a2a 75%)}}
.color-preset:active{box-shadow:inset 0 2px 4px #06150e66,inset 0 -1px 0 #dce9b81a}

/* Keep a clean, even inset below the final visible button. */
.join-card{padding-bottom:24px}
.home-install:has(>button[hidden]):not(:has(>.home-install-note:not([hidden]))){display:none}
@media(max-width:680px){.join-card{padding-bottom:18px}}
@media(min-width:800px) and (max-height:1000px){.join-card{padding-bottom:20px}}

.play-button{margin-top:8px}

/* Substantial heraldic frames, matching the game's rounded gold crest. */
.join-card,.ranking,.game-guide{border:3px solid #92845a;border-radius:18px;box-shadow:inset 0 1px 0 #f2dda547,inset 0 0 0 1px #d9c58b22,0 3px 0 #081b1370}
.icon-button,.color-preset,.home-install-button,#ranking-expand{border:2px solid #9b8b5e;border-radius:12px;box-shadow:inset 0 2px 0 #e6d5a329,inset 0 -2px 0 #081b1366,0 2px 0 #081b1370;background:linear-gradient(150deg,#304633,#192e23);font-weight:700}
header .icon-button svg{stroke-width:2.8;filter:drop-shadow(0 1px 0 #071a13)}
.icon-button{font-weight:700;text-shadow:0 1px 0 #071a13}
#nickname{border:2px solid #a7996d;border-radius:12px;box-shadow:inset 0 2px 5px #06170f77,0 1px 0 #d9c58b26}
#nickname::placeholder{font-weight:700;color:#a6b096}
.color-preset path:first-child{stroke-width:3.5;stroke-linecap:round}
.color-preset path:last-child{stroke:currentColor;stroke-width:1.5;stroke-linejoin:round}
.color-preset[aria-pressed=true]{border-color:#efcc77;box-shadow:0 0 0 1px #efcc77,inset 0 2px 0 #fff0bb50,inset 0 -2px 0 #111e1655,0 2px 0 #081b1370}
.ring-center svg{filter:drop-shadow(0 1px 0 #081b13);stroke:var(--flag);stroke-width:1;stroke-linejoin:round}
.play-button{border-width:3px;border-radius:14px}
.ranking-row{border-top:2px solid #aeb88b16;box-shadow:inset 0 -2px 0 #0b211b26;border-radius:12px}
.ranking-row:nth-child(odd){background:linear-gradient(115deg,#82914c25,#82914c0b)}
.ranking-flag{border-radius:3px 3px 0 0;box-shadow:inset 0 2px 0 #ffffe75c,inset 2px 0 0 #ffffe726,inset -2px 0 0 #14291d33}
.scene-caption,.ranking-title h2,.ranking-place,.ranking-player,.ranking-score{font-weight:700;text-shadow:0 1px 0 #081b1380}
.ranking-title>span,legend,.ranking-columns,.home-install-note{font-weight:700}
.ranking-columns{color:#c4c9a3}.ranking-score{color:#e1e3c3}
.footer-details{font-weight:700}
#rules{border:3px solid #a08a55;box-shadow:inset 0 2px 0 #fff8df,inset 0 0 0 2px #d5c28e77,0 6px 0 #10231c80,0 24px 70px #020c0a80}
#rules .close{border:2px solid #a89b70;border-radius:10px;font-weight:700;background:linear-gradient(#f8f0d7,#dedbb9);box-shadow:inset 0 1px 0 #fff9e9,0 2px 0 #a3a37a55}
#rules .rules-heading{border-bottom:2px solid #a99b6d66}
#rules .baron-tabs{border:2px solid #b3ab7f;background:#d8dcb9;border-radius:13px}
#rules .baron-tabs button{border-width:2px;border-radius:9px;font-weight:700}
#rules .baron-tabs button[aria-selected=true]{border-color:#a49360;box-shadow:inset 0 1px 0 #fffdf0,0 2px 0 #a3a37a66}
#rules .baron-guide p,#rules .baron-guide small{font-weight:700;color:#455d40}
#rules .baron-sites article,#rules .baron-controls,#rules .baron-callout{border:2px solid #b0ad80;border-radius:12px;box-shadow:inset 0 1px 0 #fff7dfaa}
#rules .baron-rule-icon,#rules .baron-site-picture{box-shadow:inset 0 2px 0 #f9f3d9aa,inset 0 -3px 0 #a3b282;border-radius:10px}
#rules .baron-controls kbd{border-width:2px;border-bottom-width:3px;border-radius:6px}
#rules .baron-tabs svg,#rules .baron-rule-icon svg{filter:drop-shadow(0 1px 0 #fff7ddaa)}
@media(min-width:800px) and (max-height:650px){#home-hero{max-width:clamp(150px,calc((100svh - 488px)*1.615),520px)}}
@media(min-width:800px) and (max-height:650px){.ranking-scroll{height:clamp(210px,calc(100svh - 226px),422px)}}

/* Same sloping cloth, shaded edge and wooden staff as paintCharacter hero. */
.color-picker .hero-flag{stroke:none;image-rendering:pixelated;filter:drop-shadow(0 1px 0 #081b1366)}
.ring-center .hero-flag{color:var(--flag)}

/* Installation is a quiet text action, not a second primary button. */
.home-install .home-install-button{width:auto;min-height:44px;padding:8px 12px;border:0;border-radius:6px;background:none;box-shadow:none;color:#dec58a;font-weight:700;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.home-install .home-install-button:hover{background:none;color:#ffe4a3;text-decoration:none}

.home-install-button::before{content:"";width:21px;height:23px;flex:none;background:currentColor;clip-path:polygon(42% 4%,58% 4%,58% 62%,80% 40%,92% 52%,50% 94%,8% 52%,20% 40%,42% 62%);filter:drop-shadow(0 1px 0 #081b1355)}

/* Centre the visible flag, including its staff, inside the colour ring. */
.ring-center .hero-flag{display:block;width:24px;height:29px;max-width:none;justify-self:center;align-self:center;transform:translateX(2px)}
@media(min-width:681px) and (min-height:1001px){.ring-center .hero-flag{width:28px;height:33px}}

/* One flag scale for every swatch, with enough room inside the RGB ring. */
.color-picker{container-type:inline-size;gap:12px}
.color-wheel{width:72px;height:72px}
.color-wheel:before{inset:11px}
.ring-center{inset:15px}
.color-picker .hero-flag{display:block;--swatch-flag-size:clamp(20px,calc(14cqw - 16px),34px);width:calc(var(--swatch-flag-size)*.833333);height:var(--swatch-flag-size);max-width:none;transform:none;justify-self:center;align-self:center;flex:none}
.color-presets{grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}
@media(max-width:680px){.color-wheel{width:72px;height:72px}.color-picker{gap:10px}.color-preset{padding:2px}}
@media(max-width:360px){.color-picker{gap:8px}.color-presets{gap:4px}}

/* Empty profile status must not reserve space below the play action. */
#profile-status:empty{display:none}
.join-card:has(>.home-install[hidden]){padding-bottom:24px}
.join-card:has(>.home-install[hidden]) fieldset{margin-bottom:12px}
.join-card:has(>.home-install[hidden]) .play-button{margin-top:8px}

/* World cups sit beside the land record, leaving names their own flexible column. */
.ranking-columns,.ranking-row{grid-template-columns:46px minmax(0,1fr) 120px}
.ranking-score{display:flex;align-items:center;justify-content:flex-end;gap:7px}
.ranking-cup{display:inline-flex;align-items:center;gap:3px;color:#edc65e;flex:none}
.ranking-cup svg{display:block;width:22px;height:26px;filter:drop-shadow(0 1px 0 #071a13)}
.ranking-cup b{font:700 15px/1 var(--ui);color:#ecd493;text-shadow:0 1px 0 #081b13}
@media(max-width:1000px){.ranking-columns,.ranking-row{grid-template-columns:32px minmax(0,1fr) 100px;gap:8px}.ranking-score{gap:5px}.ranking-cup svg{width:18px;height:23px}}

@media(max-width:1000px){.ranking-cup b{font-size:13px}}

/* A compact victory portrait, drawn only when a trophy row is opened. */
.ranking-row.has-cups{cursor:pointer}
.ranking-row.has-cups:hover{background-color:#b8a65a22;box-shadow:inset 0 0 0 2px #beaa6555}
.ranking-row.has-cups:focus-visible{outline:2px solid #e9c879;outline-offset:-3px}
#world-trophy{position:fixed;inset:0;margin:auto;box-sizing:border-box;width:min(460px,calc(100% - 24px));max-width:460px;max-height:calc(100dvh - 24px);padding:24px;border:3px solid #ad955e;border-radius:20px;background:radial-gradient(ellipse at 50% 28%,#3b5335,#172f24 70%);color:#f1e8c8;box-shadow:inset 0 2px 0 #eed99d55,0 5px 0 #081c14,0 24px 80px #0008;font:700 15px/1.45 var(--ui);text-align:center;overflow:auto;overscroll-behavior:contain}
#world-trophy::backdrop{background:#061710cf}
#world-trophy button{font:inherit;cursor:pointer}
#world-trophy .trophy-close{position:absolute;top:12px;right:12px;width:38px;height:38px;padding:0;border:2px solid #a18d59;border-radius:10px;color:#e4d5a2;background:#283e2c;font-size:26px;line-height:1}
#world-trophy .trophy-eyebrow{margin:0 30px 8px;font-size:10px;letter-spacing:2px;color:#c9b57b}
#world-trophy .trophy-demo{display:inline-block;padding:3px 9px;margin-bottom:8px;border-radius:6px;background:#bca56722;color:#c9c5a6;font-size:11px}
#world-trophy h2{margin:0;font:700 29px/1.2 var(--ui);color:#f1d381;text-shadow:0 2px #0b2118}
#world-trophy .trophy-stage{position:relative;height:190px;max-width:300px;margin:8px auto 4px;isolation:isolate;background:radial-gradient(ellipse,#ddc77519,transparent 68%)}
#world-trophy canvas{position:absolute;left:50%;top:0;transform:translateX(-50%);width:180px;height:150px;image-rendering:pixelated}
#world-trophy .trophy-prize{position:absolute;left:50%;bottom:0;transform:translateX(-50%);width:64px;filter:drop-shadow(0 4px 0 #07191080)}
#world-trophy .trophy-prize svg{display:block;width:100%;height:74px}
#world-trophy .trophy-banner{position:absolute;top:32px;width:42px;height:100px;background:var(--baron-color);clip-path:polygon(0 0,100% 0,100% 82%,50% 100%,0 82%);box-shadow:inset 0 4px #f8df8c,inset 4px 0 #fff4, inset -4px 0 #0003;opacity:.7}
#world-trophy .trophy-banner-left{left:36px}#world-trophy .trophy-banner-right{right:36px}
#world-trophy h3{font:700 23px/1.25 var(--ui);margin:8px 0;color:var(--baron-color);overflow-wrap:anywhere;text-shadow:0 2px #0b2118}
#world-trophy #world-trophy-story{font:700 14px/1.5 var(--ui);margin:8px 0 18px;color:#d6ddbf}
#world-trophy .trophy-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px}
#world-trophy .trophy-stats>div{padding:11px 6px;border:2px solid #9d905962;border-radius:12px;background:#10271c88;box-shadow:inset 0 1px #ebd89522}
#world-trophy .trophy-stats span{display:block;font-size:12px;color:#bfc9a7}
#world-trophy .trophy-stats strong{display:block;font-size:26px;color:#efd17f}
#world-trophy .trophy-caption{margin:14px 0;font:700 12px/1.45 var(--ui);color:#b8c1a4}
#world-trophy .trophy-done{width:100%;min-height:46px;border:2px solid #ffe3a0;border-radius:12px;background:linear-gradient(110deg,#daad46,#efd080);color:#1c3324;box-shadow:inset 0 1px #fff4c3,0 3px #8a6d35}
#world-trophy :focus-visible{outline:3px solid #ffe3a0;outline-offset:3px}
@media(max-width:380px),(max-height:700px){#world-trophy{padding:18px 16px}#world-trophy h2{font-size:25px}#world-trophy .trophy-stage{height:145px}#world-trophy canvas{width:144px;height:120px}#world-trophy .trophy-prize{width:48px}#world-trophy .trophy-prize svg{height:56px}#world-trophy .trophy-banner{height:75px;width:34px;top:25px}#world-trophy h3{font-size:21px}#world-trophy #world-trophy-story{margin-bottom:12px}}

/* The trophy crowns the scene; banners belong to the misty castle facade. */
#world-trophy .trophy-stage{height:230px;max-width:300px;margin-top:12px}
#world-trophy canvas.trophy-castle{width:300px;height:225px;top:4px;bottom:auto;opacity:.38;z-index:0;mask-image:linear-gradient(transparent,#000 25%,#000 65%,transparent 98%)}
#world-trophy .trophy-stage::after{content:"";position:absolute;inset:60px -8px 10px;z-index:1;pointer-events:none;background:radial-gradient(ellipse at 22% 60%,#c0cba338,transparent 62%),radial-gradient(ellipse at 76% 72%,#b2c5b32b,transparent 60%);border-radius:50%}
#world-trophy canvas.trophy-hero{width:144px;height:120px;top:auto;bottom:0;z-index:2}
#world-trophy .trophy-prize{top:0;bottom:auto;width:54px;z-index:3}
#world-trophy .trophy-prize svg{height:63px}
@media(max-width:380px),(max-height:700px){#world-trophy .trophy-stage{height:200px}#world-trophy canvas.trophy-castle{width:260px;height:195px;top:6px}#world-trophy canvas.trophy-hero{width:132px;height:110px}#world-trophy .trophy-prize{width:46px}#world-trophy .trophy-prize svg{height:54px}}
#world-trophy::backdrop{backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
#world-trophy canvas.trophy-castle{filter:blur(.65px)}
#world-trophy .trophy-stage::after{border-radius:0;mask-image:radial-gradient(ellipse,#000 15%,transparent 72%)}

/* Gold fades gently through the first five places; a whisper on alternate rows below. */
#home-ranking .ranking-row.has-cups:hover{box-shadow:inset 0 0 0 2px #d8bf7777,inset 0 -2px 0 #10251a55}

#world-trophy .trophy-confetti{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:5;border-radius:16px}
#world-trophy .trophy-confetti i{position:absolute;display:block;border-radius:1px;box-shadow:0 1px 0 #0002;pointer-events:none}
@media(prefers-reduced-motion:reduce){#world-trophy .trophy-confetti{display:none}}
/* One server-picked caption: keep every phrase on one line on narrow screens. */
.play-button{container-type:inline-size}
.play-button>span{font-size:min(1em,6.5cqw);white-space:nowrap}
.play-button>svg{flex-shrink:0}
/* Match the ranking caption to the bold game typography. */
.ranking-title{container-type:inline-size;align-items:center;gap:10px}
.ranking-title>span{flex:none;font-size:clamp(12px,3.6cqw,16px);line-height:1.2;font-weight:700;letter-spacing:.35px;color:#e9c775;text-shadow:0 1px 0 #081b1380}
/* Center the entry card's remaining text with its hero and primary action. */
.join-card #nickname{text-align:center}
.join-card legend{width:100%;text-align:center}

/* Ranking on every screen: soft fading sides, no outer frame. */
.ranking{border-color:transparent;box-shadow:none;background:linear-gradient(90deg,#1c332400 0%,#1c332418 4%,#1c33244d 10%,#1c33248c 18%,#1c3324b3 28%,#1c3324bb 40%,#14271fbb 60%,#14271fb3 72%,#14271f8c 82%,#14271f4d 90%,#14271f18 96%,#14271f00 100%)}

/* A little more height for the mobile castle scene. */
@media(max-width:680px){#home-hero{aspect-ratio:336/228}}

/* A fixed, compositor-only curtain joins the game's dark loading backdrop. */
.home-departure{position:fixed;inset:0;z-index:2000;background:#1c2922;opacity:0;pointer-events:none;transition:opacity .6s cubic-bezier(.22,.61,.36,1)}
.home-entering .home-departure{opacity:1;pointer-events:auto}
@media(prefers-reduced-motion:reduce){.home-departure{transition-duration:.12s}}

/* Desktop ranking follows the entry card; only its background fades. */
@media(min-width:800px){
 .ranking{position:relative;isolation:isolate;align-self:stretch;display:flex;flex-direction:column;min-height:0;padding:24px 0 0;border-left-width:0;border-right-width:0;border-bottom-width:0;background:none}
 .ranking::before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(90deg,#1c332400,#1c33244d 10%,#1c3324bb 35%,#14271fbb 65%,#14271f4d 90%,#14271f00);mask-image:linear-gradient(180deg,transparent,#000 36px,#000 calc(100% - 36px),transparent)}
 .ranking-title,.ranking-columns{flex-shrink:0}
 .ranking-title{margin-bottom:24px}
 .ranking-scroll{flex:1 1 0;height:0;min-height:0;overflow-y:auto;mask-image:linear-gradient(#000 calc(100% - 80px),#000e calc(100% - 60px),#0008 calc(100% - 32px),#0002 calc(100% - 12px),transparent)}
 #home-ranking{padding-bottom:80px}
 .ranking-action{display:none}
}

.ranking-title h2{color:var(--ink);text-shadow:0 1px 0 #081b1380}

/* Mobile ranking uses the same full card width as the entry form. */
@media(max-width:799px){.ranking{padding-left:0;padding-right:0;border-left-width:0;border-right-width:0}}

/* Bold gold arrow, sized to the ranking button label. */
#ranking-expand .ranking-arrow{display:block;width:1.45em;height:1.25em;flex:none;pointer-events:none;filter:drop-shadow(0 1px 0 #081b1380)}

.ranking-title{justify-content:center;text-align:center}

/* A quiet ranking list, with emphasis on the first four places. */
.ranking-title{margin-bottom:16px}
#home-ranking .ranking-row:nth-child(n){border:0;border-radius:0;box-shadow:none;background:none}
#home-ranking .ranking-row:nth-child(n+5){border-bottom:1px solid #c9d3a610}
#home-ranking .ranking-row:nth-child(-n+4){border-radius:7px;background:linear-gradient(100deg,rgb(214 180 89 / var(--rank-gold)),#b4953e04);box-shadow:inset 2px 0 0 rgb(213 183 95 / var(--rank-edge));margin-bottom:4px}
#home-ranking .ranking-row:nth-child(1){--rank-gold:.19;--rank-edge:.75}
#home-ranking .ranking-row:nth-child(2){--rank-gold:.12;--rank-edge:.45}
#home-ranking .ranking-row:nth-child(3){--rank-gold:.07;--rank-edge:.28}
#home-ranking .ranking-row:nth-child(4){--rank-gold:.05;--rank-edge:.22}
#home-ranking .ranking-row:nth-child(4) .ranking-place{color:#b5aa80}
#home-ranking .ranking-row.has-cups:hover{background-color:#b8a65a16}
@media(min-width:800px){
 .ranking-title{margin-bottom:16px}
 #home-ranking .ranking-row{height:58px;min-height:58px}
 .ranking::before{inset:0 -12px -12px;background:linear-gradient(90deg,#10231c00,#10231ccc 10%,#10231ce8 50%,#10231ccc 90%,#10231c00);mask-image:linear-gradient(180deg,transparent,#000 50px,#000 calc(100% - 60px),transparent)}
}

/* Start the ranking directly with its column labels. */
.ranking{padding-top:8px}

/* Quieter install link; retain a comfortable touch target. */
.home-install{margin-top:8px}
.home-install .home-install-button{font-size:14px;gap:6px;padding:6px 8px;min-height:44px}
.home-install-button::before{width:16px;height:18px}
@media(max-width:680px){.home-install{margin-top:6px}.home-install .home-install-button{font-size:13px}}

/* Play emblem spans both aligned text rows. */
.play-button{display:grid;grid-template-columns:minmax(32px,1fr) minmax(0,max-content) minmax(32px,1fr);justify-content:center;column-gap:12px;row-gap:4px;padding-block:20px;text-align:left}
.play-button>svg{grid-column:1;grid-row:1/3;width:32px;height:48px;align-self:center;justify-self:center}
.play-button>span{grid-column:2;grid-row:1;justify-self:center;font-size:clamp(12px,5.2cqw,28px);line-height:1.2}
.play-button>.online-caption{grid-column:2;grid-row:2;margin:0;text-align:center;color:#806525;font-size:clamp(9px,3.5cqw,14px);font-weight:700;line-height:1.4;white-space:nowrap;text-shadow:0 1px 0 #fff0ba80,0 -1px 0 #71501b26;pointer-events:none}
@media(max-width:680px){.play-button{grid-template-columns:minmax(26px,1fr) minmax(0,max-content) minmax(26px,1fr);column-gap:6px;padding:16px 10px}.play-button>svg{width:26px;height:40px}}

@media(max-width:680px){.play-button>span{font-size:clamp(14px,6cqw,24px)}.play-button>.online-caption{font-size:clamp(10px,4cqw,14px)}}

/* The local lesson is the first action in the rules, with a readable parchment button. */
.training-entry{display:flex;align-items:center;gap:14px;margin:18px 0 22px;padding:15px 18px;border:1px solid #8b9c69;border-bottom-width:3px;border-radius:12px;background:#dde4bc;color:#294b40;text-decoration:none;box-shadow:inset 0 1px 0 #fff9}.training-entry:hover{background:#d1ddb0}.training-entry:focus-visible{outline:3px solid #9b813e;outline-offset:3px}.training-entry strong{display:block;font-size:21px;font-weight:700}.training-entry small{display:block;margin-top:4px;font-size:14px;font-weight:700;color:#60714b}.training-entry-icon{display:grid;place-items:center;width:44px;height:44px;flex:none;border-radius:10px;background:#f3edcf;color:#637c4c;font-size:30px}.training-entry-arrow{margin-left:auto;width:42px;height:36px;flex:none;color:#879955;filter:drop-shadow(0 2px 0 #526b4330)}@media(max-width:450px){.training-entry{padding:12px;gap:10px}.training-entry strong{font-size:18px}.training-entry small{font-size:12px}.training-entry-icon{width:36px;height:40px;font-size:25px}}

/* Language stays beside Help; on small screens controls get their own row. */
.language-picker{position:relative;flex:none;color:#e6dfbc}
.language-picker .icon-button{display:grid;place-items:center;padding:0;font-size:15px}
#language-options{position:absolute;left:0;right:0;top:calc(100% + 6px);z-index:100;padding:0;border:0;background:none}
#language-options[hidden]{display:none}
#language-options .icon-button{width:100%;color:#f0dfab;background:linear-gradient(150deg,#3b5037,#233b2b);border-color:#b29a62;text-shadow:0 1px 0 #071a13;box-shadow:inset 0 1px 0 #f1df9d24,0 4px 10px #081b1366}#language-toggle[aria-expanded=true]{border-color:#d0b26e;background:linear-gradient(150deg,#3b5037,#233b2b)}
html[lang=en] header .brand>.brand-title::after{content:none;display:none}
@media(max-width:680px){body:not(.guide-page)>header{flex-wrap:wrap;justify-content:center;gap:12px}body:not(.guide-page)>header nav{width:100%;justify-content:center;gap:10px}html[lang=en] header .brand{font-size:clamp(22px,6.4vw,30px)}}

/* One compact mobile row, with secondary actions in a small disclosure. */
#home-more-toggle{display:none}
#home-more{display:flex;align-items:center;gap:inherit}
@media(max-width:680px){
 body:not(.guide-page)>header{flex-wrap:nowrap;justify-content:space-between;gap:8px;padding-left:14px;padding-right:14px}
 body:not(.guide-page)>.welcome{padding-left:14px;padding-right:14px}
 body:not(.guide-page)>header .brand{min-width:0;gap:6px;letter-spacing:.3px;font-size:clamp(17px,calc(10vw - 15px),28px)}
 body:not(.guide-page)>header .brand img{width:50px;flex:none}
 body:not(.guide-page)>header .brand>.brand-title::after{font-size:8px;letter-spacing:1.3px}
 body:not(.guide-page)>header nav{position:relative;flex:none;width:auto;gap:6px;align-items:center}
 #home-more-toggle{display:grid;place-items:center;padding:0}
 #home-more-toggle[aria-expanded=true]{border-color:#d0b26e;background:#314a34}
 #home-more{display:none;position:absolute;z-index:100;right:0;top:calc(100% + 8px);align-items:flex-start;gap:8px;padding:9px;border:1px solid #9b8b5e;border-radius:13px;background:#1c3326;box-shadow:0 6px 18px #081b1380}
 #home-more[data-open]{display:flex}
 #home-more #language-options{position:static;margin-top:6px}
}

/* A quiet footer action and a parchment notice matching the help dialog. */
.privacy-link{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:32px;padding:4px 10px;border:0;border-radius:7px;background:transparent;color:#a8b294;font:inherit;font-size:12px;cursor:pointer}
.privacy-link:hover{color:#f0d28a;background:#b8bc9120}.privacy-link:focus-visible{outline:2px solid #dcc17b;outline-offset:3px}
.privacy-link svg,.privacy-heading svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}.privacy-link svg{width:18px;height:18px}
#privacy{max-width:600px;padding:26px;border:3px solid #a08a55;background:linear-gradient(135deg,#f3edd5,#e9e4c8);box-shadow:inset 0 2px 0 #fff8df,0 6px 0 #10231c80,0 24px 70px #020c0a80;color:#385541}
#privacy::backdrop{background:#071a12ad;backdrop-filter:blur(4px)}
#privacy .close{border:2px solid #a89b70;border-radius:10px;background:linear-gradient(#f8f0d7,#dedbb9);color:#496348;line-height:1}
.privacy-heading{display:flex;align-items:center;gap:12px;padding:4px 38px 18px 0;border-bottom:2px solid #a99b6d66}.privacy-heading svg{width:32px;height:32px;color:#718353}
#privacy h2{font-size:25px;line-height:1.2;margin:0;overflow-wrap:anywhere}#privacy h3{font-size:16px;margin:18px 0 5px}#privacy p{font-size:14px;line-height:1.6;margin:0;color:#526447}
@media(max-width:480px){#privacy{padding:20px 16px;max-height:88svh}#privacy h2{font-size:20px}.privacy-heading{gap:9px}.privacy-heading svg{width:26px;height:26px}}

/* Footer actions share one baseline; small screens retain comfortable text size. */
.home-footer .footer-details{flex-wrap:wrap;row-gap:5px}
.home-footer .privacy-link{font-size:inherit;line-height:inherit;letter-spacing:inherit;min-height:28px;padding:2px 0}
@media(max-width:680px){.home-footer .footer-details{column-gap:9px}.home-footer .privacy-link{font-size:11px}.home-footer .footer-details>.footer-divider:last-of-type{display:none}}

.home-footer{max-width:780px}.privacy-contact{font:inherit;color:#385541;background:#d8dfbf;border:1px solid #a89b70;border-radius:8px;padding:8px 14px;margin-top:12px;cursor:pointer}#privacy-copy>p{margin-top:18px;font-size:12px}

/* Ranking portraits distinguish unclaimed cups from genuine world victories. */
.ranking-clickable{cursor:pointer}.ranking-clickable:focus-visible{outline:2px solid #e9c879;outline-offset:-3px}
#home-ranking .ranking-clickable:hover{background-color:#b8a65a16}
.unclaimed-cup{position:relative;color:#a7b399;opacity:.35;filter:none!important}
.unclaimed-cup .cup-question{position:absolute;left:50%;top:17%;transform:translateX(-50%);font:700 14px/1 var(--ui);color:#10251a}
#world-trophy .unclaimed-cup{opacity:.3;color:#b3bea3}
#world-trophy .unclaimed-cup .cup-question{font-size:27px;top:16%}
#world-trophy .trophy-close{width:44px;height:44px}
#world-trophy.ranking-portrait #world-trophy-count{font-size:22px}
@media(max-height:560px){#world-trophy.ranking-portrait .trophy-stage{height:128px}#world-trophy.ranking-portrait canvas.trophy-castle{width:170px;height:128px;top:0}#world-trophy.ranking-portrait canvas.trophy-hero{width:102px;height:85px}#world-trophy.ranking-portrait .trophy-prize{width:35px}#world-trophy.ranking-portrait .trophy-prize svg{height:41px}#world-trophy.ranking-portrait .cup-question{font-size:20px}}

#world-trophy.ranking-portrait .trophy-caption{white-space:nowrap}

#world-trophy .trophy-blowers{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:5;border-radius:16px}
#world-trophy .party-blower{position:absolute;top:150px;width:clamp(66px,23%,126px);height:56px;transform-origin:center center}
#world-trophy .party-blower.left{left:7px;transform:rotate(-22deg)}
#world-trophy .party-blower.right{right:7px;transform-origin:center center;transform:scaleX(-1) rotate(-22deg)}
#world-trophy .party-blower svg{display:block;width:100%;height:100%}
@media(max-height:560px){#world-trophy .party-blower{top:94px}}
@media(prefers-reduced-motion:reduce){#world-trophy .trophy-blowers{display:none}}

#world-trophy .trophy-caption[hidden]+.trophy-done{margin-top:16px}
