:root{--app-header-height:0px}
.mobile-bottom-nav{display:none}
.site-credit{margin:24px auto 0;padding:22px 18px 26px;border-top:1px solid #29475a;color:#8fb3c4;text-align:center;font:400 11px/1.7 'DM Sans','Noto Sans KR',sans-serif;overflow-wrap:break-word}
.site-credit-scope{display:block;margin-bottom:5px;color:#668b9d;font-size:9px;font-weight:600;letter-spacing:.16em}
.site-credit-owner{margin:0;color:#a6c1ce}.site-credit-owner strong{font-weight:600;letter-spacing:.025em}
.site-credit-legal{display:block;max-width:720px;margin:9px auto 0;color:#7896a6;font-size:10px;line-height:1.65}.site-credit-legal span{display:block}

.topbar.site-header{position:sticky;top:0;z-index:80;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px 14px;padding:13px 22px;background:#0a1927;box-shadow:0 7px 22px #0005}
.site-header .brand{grid-column:1;grid-row:1;min-width:0}
.site-header .top-actions{grid-column:2;grid-row:1;display:flex;justify-content:flex-end;align-items:center;gap:5px;min-width:0;flex-wrap:wrap}
.site-header .top-actions>a.site-nav-link{min-height:37px;display:inline-flex;align-items:center;justify-content:center;padding:6px 9px;border-color:transparent;background:transparent;color:#bfd4df;text-decoration:none;text-align:center;white-space:nowrap;font-size:11px;line-height:1.15}
.site-header .top-actions>a.site-nav-link small{display:block;color:#84aebf;font-size:9px;font-weight:500;margin-top:2px}
.site-header .top-actions>a.site-nav-link:hover,.site-header .top-actions>a.site-nav-link:focus-visible{border-color:#3a7188;background:#173747;color:#ecfaff;text-decoration:none}
.site-header .top-actions>a.site-nav-link.active{border-color:#41788d;background:#163d4e;color:#e9faff}
.site-header .top-actions>a.site-nav-link.active small{color:#a2dded}
.site-header .top-actions>.btn:not(.site-nav-link){font-size:11px;min-height:37px}
.site-header .site-language,.site-play-header .site-language{display:flex;gap:2px;flex:none;padding:3px;border:1px solid #315568;border-radius:8px;background:#0b2432}
.site-header .site-language{grid-column:3;grid-row:1}
.site-header .site-language button,.site-play-header .site-language button{min-width:33px;min-height:31px;padding:5px 6px;border:0;border-radius:5px;background:transparent;color:#9bb9c8;font-size:11px;font-weight:700;line-height:1.1}
.site-header .site-language button[data-lang=both],.site-play-header .site-language button[data-lang=both]{min-width:45px}
.site-header .site-language button.active,.site-play-header .site-language button.active{background:#23576b;color:#f1fdff}
.site-header .site-language button:focus-visible,.site-play-header .site-language button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.sheet-menu-toggle.site-menu-toggle{display:none;align-items:center;justify-content:center;flex-direction:column;gap:4px;width:42px;height:42px;padding:0;border:1px solid #315568;border-radius:8px;background:#102b39;color:var(--text)}
.site-menu-toggle span{display:block;width:19px;height:2px;border-radius:2px;background:var(--accent);transition:transform .15s,opacity .15s}
.site-menu-toggle[aria-expanded=true] span:first-child{transform:translateY(6px) rotate(45deg)}
.site-menu-toggle[aria-expanded=true] span:nth-child(2){opacity:0}
.site-menu-toggle[aria-expanded=true] span:last-child{transform:translateY(-6px) rotate(-45deg)}
.site-header~main .rulebook-nav,.site-header~main .tutorial-nav{top:calc(var(--app-header-height) + 12px)}

.site-play-header .score-menu-body{max-height:min(72dvh,660px);overflow:auto;overscroll-behavior:contain}
.site-play-header .score-menu-body>a.site-nav-link{min-height:34px;justify-content:flex-start;color:#c9e3ed;text-decoration:none}
.site-play-header .score-menu-body>a.site-nav-link.active{background:#1d4b5e;border-color:#4a8ea5;color:#f3fcff}
.site-play-header .play-top-actions{flex:0 1 auto;min-width:0}
.site-play-header .site-language button{min-width:25px;min-height:35px;padding:4px;font-size:10px}
.site-play-header .site-language button[data-lang=both]{min-width:41px}

@media(max-width:1200px) and (min-width:1101px){
  .topbar.site-header{grid-template-columns:minmax(0,1fr) auto}
  .site-header .top-actions{grid-column:1/-1;grid-row:2;justify-content:flex-start}
  .site-header .site-language{grid-column:2;grid-row:1}
}
@media(max-width:1100px){
  .topbar.site-header{grid-template-columns:minmax(0,1fr) auto auto;gap:7px;padding:9px 12px}
  .site-header .brand h1{font-size:19px}.site-header .eyebrow{font-size:8px;letter-spacing:1.4px}
  .site-header .site-language{grid-column:2;grid-row:1}
  .site-header .site-language button{min-width:26px;min-height:33px;padding:5px 3px;font-size:10px}
  .site-header .site-language button[data-lang=both]{min-width:41px}
  .sheet-menu-toggle.site-menu-toggle{grid-column:3;grid-row:1;display:flex}
  .site-header .top-actions,.sheet-topbar.site-header .top-actions{display:none;position:absolute;top:calc(100% - 1px);left:8px;right:8px;z-index:90;grid-column:auto;grid-row:auto;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;max-height:calc(100dvh - var(--app-header-height) - 78px);overflow:auto;padding:10px;border:1px solid #38647a;border-radius:0 0 11px 11px;background:#0d2130;box-shadow:0 17px 35px #000b}
  .site-header .top-actions.open,.sheet-topbar.site-header .top-actions.open{display:grid}
  .site-header .top-actions>a.site-nav-link,.sheet-topbar.site-header .top-actions>a.site-nav-link{grid-column:auto;min-height:44px;justify-content:flex-start;padding:8px 11px;border:1px solid #2d5164;border-radius:6px;background:#102d3d;text-align:left;white-space:normal}
  .site-header .top-actions>a.site-nav-link small{margin:2px 0 0}
  .site-header .top-actions>:not(.site-nav-link){grid-column:1/-1}
  .site-play-header{flex-wrap:wrap}.site-play-header .play-top-actions{margin-left:auto;flex-wrap:wrap;justify-content:flex-end}
}
@media(max-width:760px){
  body{padding-bottom:calc(70px + env(safe-area-inset-bottom))}
  .mobile-bottom-nav{position:fixed;bottom:0;left:50%;z-index:50;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:min(100%,430px);min-height:70px;padding:5px 8px calc(5px + env(safe-area-inset-bottom));border:1px solid #31566a;border-bottom:0;border-radius:12px 12px 0 0;background:#091724;box-shadow:0 -8px 26px #0008;transform:translateX(-50%)}
  .mobile-bottom-link{min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:4px 1px;border-radius:7px;color:#9bb8c8;text-align:center;text-decoration:none;font:700 10px/1.2 'DM Sans','Noto Sans KR',sans-serif}
  .mobile-bottom-link svg{width:21px;height:21px;flex:none}.mobile-bottom-link span{white-space:nowrap}.mobile-bottom-link small{display:block;font-size:8px;font-weight:500;margin-top:2px}
  .mobile-bottom-link.active{background:#15394b;color:#85e6fa}.mobile-bottom-link:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
}
@media(max-width:400px){
  .site-header .brand{gap:7px}.site-header .brand-mark{width:31px;height:31px;font-size:20px}.site-header .brand h1{font-size:16px}.site-header .eyebrow{display:none}
  .site-header .site-language{padding:2px}.site-header .site-language button{min-width:24px;padding:4px 2px}.site-header .site-language button[data-lang=both]{min-width:39px}
}
@media print{body{padding-bottom:0!important}.mobile-bottom-nav,.site-credit,.site-header .site-language,.site-play-header .site-language{display:none!important}.topbar.site-header{position:static;box-shadow:none}}
