/* Shared public chrome. Selectors never enter the standalone game iframes. */
body.site-shell{--site-bg:#0e1316;--site-surface:#182024;--site-raised:#202b30;--site-line:#344147;--site-text:#f1eee6;--site-muted:#aebbbd;--site-gold:#d1b47a;--site-sidebar:224px;--member-entry-bg:var(--site-gold);--member-entry-text:#141b1e;margin:0;padding-left:var(--site-sidebar);background:var(--site-bg);color:var(--site-text);font-family:'Noto Sans KR','Apple SD Gothic Neo','Malgun Gothic',system-ui,sans-serif;color-scheme:dark}
.site-shell .site-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.site-shell .site-skip{position:fixed;top:8px;left:240px;z-index:10010;transform:translateY(-180%);padding:12px 18px;background:var(--site-gold);color:#141b1e;border-radius:8px}
.site-shell .site-skip:focus{transform:none}
.site-shell .site-sidebar{box-sizing:border-box;position:fixed;inset:0 auto 0 0;z-index:50;width:var(--site-sidebar);padding:24px 16px;background:#10191c;border-right:1px solid var(--site-line);overflow-y:auto;scrollbar-width:thin;scrollbar-color:#455257 transparent}
.site-shell .site-brand{display:flex;gap:10px;align-items:center;padding:4px 8px 24px;color:var(--site-text);font-size:23px;letter-spacing:-.05em;text-decoration:none;white-space:nowrap}
.site-brand svg,.site-footer-brand svg{width:34px;height:34px;flex:none}
.site-shell .site-menu{border:0;padding:0;margin:0}
.site-shell .site-menu>summary{display:none}
.site-shell .site-menu nav{display:grid;gap:4px}
.site-shell .site-menu nav a{display:flex;align-items:center;gap:12px;min-height:44px;padding:10px 12px;border:1px solid transparent;border-radius:8px;color:var(--site-muted);font-size:14px;line-height:1.5;text-decoration:none;overflow-wrap:anywhere}
.site-shell .site-menu nav a>span{display:flex;flex:none;width:20px;height:20px}
.site-shell .site-menu nav a:hover{background:var(--site-raised);color:var(--site-text)}
.site-shell .site-menu nav a[aria-current=page]{background:var(--site-gold);color:#141b1e;font-weight:750}
.site-shell .site-menu nav .site-nav-secondary{margin-top:14px;border-top-color:var(--site-line);border-radius:0 0 8px 8px;padding-top:17px}
.site-shell .site-sidebar-note{font-size:12px;color:var(--site-muted);line-height:1.8;margin:28px 12px 0}
body.site-shell .site-header{box-sizing:border-box;display:flex;align-items:center;justify-content:flex-end;gap:16px;margin:0;max-width:none;width:100%;height:auto;min-height:76px;padding:14px 32px;background:var(--site-bg);border-bottom:1px solid var(--site-line);color:var(--site-text)}
body.site-shell .site-header .header-search{display:flex;align-items:center;gap:8px;margin:0 auto 0 0;max-width:420px;min-width:180px;flex:1;padding:0 6px 0 14px;min-height:44px;background:var(--site-surface);border:1px solid var(--site-line);border-radius:8px;color:var(--site-muted)}
body.site-shell .site-header .header-search input[type=search]{width:100%;min-width:0;padding:10px 0;border:0;border-radius:0;background:transparent;color:var(--site-text);font:inherit;font-size:14px;outline:none;box-shadow:none}
.site-header input::placeholder{color:#a1afb2;opacity:1}
body.site-shell .site-header .header-search button{display:grid;place-items:center;flex:none;min-width:40px;min-height:40px;margin:0;padding:0;border:0;background:transparent;color:var(--site-gold);font-size:20px;border-radius:6px}
body.site-shell .site-header .header-search:focus-within{outline:2px solid var(--site-gold);outline-offset:3px}
body.site-shell .site-header .member-entry{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;margin:0;padding:11px 16px;min-height:44px;border:1px solid var(--site-gold);border-radius:8px;background:var(--site-gold);color:#141b1e;font-size:14px;font-weight:750;text-decoration:none;line-height:1.4}
body.site-shell .site-header .language-picker{display:flex;align-items:center;flex:0 0 auto;order:0;margin:0;color:var(--site-muted)}
body.site-shell .site-header .language-picker select{max-width:130px;min-width:96px;min-height:44px;padding:9px 10px;border:1px solid var(--site-line);border-radius:8px;background:var(--site-surface);color:var(--site-text);font:inherit;font-size:14px}
.site-shell :is(.site-sidebar,.site-header,.site-footer) :is(a,button,summary,select):focus-visible{outline:3px solid var(--site-gold);outline-offset:3px}
.site-shell .hm-wrap{margin:0 auto;max-width:1600px}
body.site-shell .site-footer{box-sizing:border-box;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:20px 32px;max-width:none;margin:0;padding:28px 32px;border-top:1px solid var(--site-line);background:var(--site-bg);color:var(--site-muted);font-size:13px}
.site-shell .site-footer-brand{display:flex;align-items:center;gap:9px;color:var(--site-text);font-size:19px;font-weight:750;text-decoration:none}
.site-shell .site-footer p{margin:8px 0 0;font-size:13px}
.site-shell .site-footer nav{display:flex;flex-wrap:wrap;align-items:center;gap:8px 20px}
.site-shell .site-footer nav a,.site-shell .site-footer nav button{display:inline-flex;align-items:center;min-height:44px;color:var(--site-muted);font:inherit;text-decoration:none;background:none;border:0;padding:0;cursor:pointer}
.site-shell .site-footer small{flex-basis:100%;font-size:12px;color:var(--site-muted)}
/* Outer game toolbar and supporting content share the site palette. */
.site-shell .story-game-tools{background:var(--site-surface);color:var(--site-text);border-bottom:1px solid var(--site-line)}
.site-shell .story-game-tools button{min-height:44px;background:var(--site-raised);border:1px solid var(--site-line);color:var(--site-text);border-radius:8px}
.site-shell :is(.story-game-note,.story-library-note,.back){color:var(--site-muted)}
.site-shell :is(.game-play-info,.play-notes,.play-guide-summary,.next-games .catalog-card){background:var(--site-surface);border-color:var(--site-line);color:var(--site-text)}
.site-shell :is(.game-play-info,.play-notes,.play-guide-summary) :is(h2,h3,p,li,summary){color:inherit}
.site-shell .next-games :is(p,.small-note){color:var(--site-muted)}
.site-shell .product-return{background:var(--site-surface);border-color:var(--site-line);color:var(--site-text)}
.site-shell .product-return a{background:var(--site-raised);color:var(--site-text);border-color:var(--site-line)}
/* Catalogues and information pages use the same surfaces, type and buttons. */
.site-catalog{--bg:var(--site-bg);--panel:var(--site-surface);--panel2:var(--site-raised);--text:var(--site-text);--muted:var(--site-muted);--edge:var(--site-line);--lime:var(--site-gold);--mint:#b89a61}
.site-shell.site-catalog .wrap{max-width:1400px;padding:36px 32px 56px}
.site-catalog :is(.home-heading h1,.story-heading h1,.trial-library h1,.document>h1,.party-catalog-heading h1){font-family:inherit;font-size:clamp(30px,3.2vw,44px);font-weight:750;letter-spacing:-.045em;color:var(--site-text)}
.site-catalog :is(.intro,.small-note,.count,.story-heading p,.story-library-note,.story-language-note,.story-warning){color:var(--site-muted)}
.site-catalog :is(.eyebrow,.story-heading .eyebrow){color:var(--site-gold)}
.site-catalog :is(.catalog-card,.guide-card,.strategy-card,.waiting-card,.card,.story-feature,.trial-feature,.document .panel){background:var(--site-surface);border-color:var(--site-line);color:var(--site-text);border-radius:12px;box-shadow:none}
.site-catalog :is(.catalog-card,.guide-card,.strategy-card,.waiting-card,.story-detail) :is(p,.small-note){color:var(--site-muted)}
.site-catalog :is(.catalog-card,.guide-card,.strategy-card) :is(h2,h3){color:var(--site-text)}
.site-catalog :is(.filter,.story-filters button,#story-reset,.random-button,.button){min-height:44px;padding:10px 16px;background:var(--site-surface);color:var(--site-text);border:1px solid var(--site-line);border-radius:8px;font-size:14px}
.site-catalog :is(.filter.selected,.filter.active,.story-filters button[aria-pressed=true],.button.primary,.cta){background:var(--site-gold);color:#141b1e;border-color:var(--site-gold);border-radius:8px}
.site-catalog .story-search input{min-height:44px;background:var(--site-surface);color:var(--site-text);border-color:var(--site-line);border-radius:8px}
.site-catalog :is(.card-play,.text-link,.story-metrics dd){color:var(--site-gold)}
.site-catalog :is(.story-metrics dt,.story-detail .story-subtitle){color:var(--site-muted)}
.site-catalog .story-tags span{background:var(--site-raised);color:var(--site-muted);border-color:var(--site-line)}
.site-catalog .party-surface{--bg:var(--site-bg);--panel:var(--site-surface);--panel2:var(--site-raised);--text:var(--site-text);--muted:var(--site-muted);--edge:var(--site-line);--lime:var(--site-gold);--mint:var(--site-gold)}
.site-catalog .party-surface :is(.game-card,.note-banner){background:var(--site-surface);border-color:var(--site-line);color:var(--site-text)}
.site-catalog .party-surface :is(.card-art,.filter,.party-tools button){background:var(--site-raised);color:var(--site-text);border-color:var(--site-line)}
.site-catalog .party-surface .filter.active{background:var(--site-gold);color:#141b1e}
.site-catalog .party-surface :is(.card-bottom,.note-banner strong){color:var(--site-muted)}
.site-catalog .document{color:var(--site-text)}
.site-catalog .document>p,.site-catalog .document>section>p{color:var(--site-muted)}
/* Game-specific boards, dialogs and canvases retain their own contrast. */
.site-shell:not(.site-catalog) :is(.panel,.guide-card){color:#212321;color-scheme:light}
.site-shell :is(.omok-room,.game-room-layout,.go-game,.sl){color-scheme:light}
body.site-shell:has(.story-expanded,.go-expanded){padding-left:0}
body.site-shell:has(.story-expanded,.go-expanded)>.site-sidebar,html:fullscreen .site-shell>.site-sidebar{display:none}
@media(max-width:1200px) and (min-width:901px){.site-shell .play-page .play-layout{grid-template-columns:minmax(0,1fr)}.site-shell .play-page .sidebar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}}
@media(max-width:900px){
 body.site-shell{padding-left:0}
 .site-shell .site-sidebar{position:relative;inset:auto;width:100%;display:flex;align-items:center;justify-content:space-between;overflow:visible;padding:10px 20px;border-right:0;border-bottom:1px solid var(--site-line)}
 .site-shell .site-brand{font-size:21px;padding:0;min-height:44px}
 .site-shell .site-brand svg{width:30px;height:30px}
 .site-shell .site-menu>summary{display:flex;gap:12px;align-items:center;justify-content:center;min-height:44px;padding:8px 12px;border:1px solid var(--site-line);border-radius:8px;color:var(--site-text);cursor:pointer;font-size:14px;list-style:none;margin:0}
 .site-shell .site-menu>summary::-webkit-details-marker{display:none}
 .site-shell .site-menu nav{position:absolute;top:100%;left:0;right:0;max-height:70dvh;overflow:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:16px;gap:6px;background:#10191c;border-bottom:1px solid var(--site-line);box-shadow:0 20px 30px #0007}
 .site-shell .site-menu nav .site-nav-secondary{margin:0;padding-top:10px;border:1px solid transparent;border-radius:8px}
 .site-shell .site-sidebar-note{display:none}
 body.site-shell .site-header{padding:12px 20px;gap:10px;min-height:68px;flex-wrap:wrap}
 .site-shell .site-skip{left:16px}
 .site-shell.site-catalog .wrap{padding:28px 20px 44px}
 body.site-shell .site-footer{padding:24px 20px}
}
@media(max-width:600px){
 body.site-shell .site-header .header-search{flex:1 0 100%;width:100%;max-width:none;order:0}
 body.site-shell .site-header .member-entry{margin-right:auto;font-size:13px;max-width:calc(100% - 110px);white-space:normal}
 body.site-shell .site-header .language-picker{order:0;margin:0}
 body.site-shell .site-header .language-picker select{font-size:14px;max-width:100px;min-width:96px}
 body.site-shell .site-header{padding:10px 16px}
 .site-shell .site-sidebar{padding:8px 16px}
 .site-shell.site-catalog .wrap{padding:24px 16px 40px}
 .site-shell .story-game-tools{padding:10px 16px;gap:10px;flex-wrap:wrap}
 .site-shell .site-footer nav{gap:0 16px}
 .site-shell .site-menu nav a{font-size:13px;padding:10px 8px;gap:8px}
}
.site-shell .product-return:empty{display:none}
.site-shell .product-return>span{color:var(--site-muted)}
.site-shell.site-catalog .filters .filter[aria-pressed=true]{background:var(--site-gold);border-color:var(--site-gold);color:#141b1e}
html:fullscreen body.site-shell{padding-left:0}
