/* Grinders app shell (2026-11): left sidebar on desktop, slim top bar on tablet/mobile.
   Applies to pages with the shared academy header (.pg-site-header.ac-header).
   Selectors are deliberately specific (html body …) because older layers use !important. */
:root{
 /* Shared design tokens (2026-11). New and touched styles use these instead of literal values;
    older layers still carry their own numbers and can migrate gradually. */
 --sh-font:Pretendard,'Noto Sans KR',system-ui,-apple-system,sans-serif;
 --sh-radius-sm:10px;--sh-radius-md:14px;--sh-radius-lg:18px;--sh-radius-xl:24px;--sh-radius-pill:999px;
 --sh-shadow-card:0 1px 2px #0000000a,0 10px 24px -18px #00000040;
 --sh-page-max:1120px;--sh-page-x:40px;
 --sh-w:252px;
 --sh-bg:#fbfaf7;--sh-surface:#ffffff;--sh-line:#e8e3da;--sh-text:#17181c;--sh-muted:#6c6b73;--sh-hover:#f1ede6;
 --sh-accent:#11795a;--sh-accent-soft:#11795a14;--sh-gold:#c9952e;
}
html[data-pg-theme="dark"]{
 --sh-bg:#0e1013;--sh-surface:#15181d;--sh-line:#23272e;--sh-text:#eef0f3;--sh-muted:#98a0aa;--sh-hover:#1c2026;
 --sh-accent:#41d29b;--sh-accent-soft:#41d29b17;--sh-gold:#f0c35a;
 --sh-shadow-card:0 1px 0 #ffffff0d inset;
}
@media (max-width:1079.98px){:root{--sh-page-x:24px}}
@media (max-width:780px){:root{--sh-page-x:16px}}

/* ---------- nav items (all sizes) ---------- */
html body .pg-site-header.ac-header .ac-nav a{display:flex!important;align-items:center!important;gap:10px!important;text-decoration:none!important;color:var(--sh-muted)!important;font:600 14px/1.2 var(--sh-font)!important;letter-spacing:-.2px!important;border-radius:10px!important;white-space:nowrap!important;transition:background .15s,color .15s!important}
html body .pg-site-header.ac-header .ac-nav a svg{flex:none;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
html body .pg-site-header.ac-header .ac-nav a:hover{background:var(--sh-hover)!important;color:var(--sh-text)!important}
html body .pg-site-header.ac-header .ac-nav a[aria-current="page"]{background:var(--sh-accent-soft)!important;color:var(--sh-accent)!important}
html body .pg-site-header.ac-header .ac-nav a::after{display:none!important}
html body .pg-site-header.ac-header .ac-nav .nav-badge{margin-left:auto;padding:2px 7px;border-radius:99px;background:var(--sh-gold);color:#1d1400;font:800 10px/1.4 system-ui,sans-serif;letter-spacing:.3px}
html body .pg-site-header.ac-header .ac-nav .ac-nav-label{display:none}

/* ---------- desktop: sidebar ---------- */
@media (min-width:1080px){
 html body:has(.pg-site-header.ac-header){padding-left:var(--sh-w)!important}
 html body .pg-site-header.ac-header{position:fixed!important;inset:0 auto 0 0!important;z-index:1000!important;width:var(--sh-w)!important;height:100vh!important;height:100dvh!important;min-height:0!important;max-height:none!important;
  display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;gap:4px!important;padding:22px 14px 16px!important;margin:0!important;
  background:var(--sh-bg)!important;border:0!important;border-right:1px solid var(--sh-line)!important;box-shadow:none!important;overflow-y:auto!important;overscroll-behavior:contain}
 html body .pg-site-header.ac-header .brand{padding:4px 10px 22px!important;margin:0!important;font-size:19px!important}
 html body .pg-site-header.ac-header .ac-nav{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:2px!important;margin:0!important;padding:0!important;position:static!important;transform:none!important;width:auto!important;height:auto!important;flex:none!important}
 html body .pg-site-header.ac-header .ac-nav a{min-height:42px!important;padding:0 12px!important;margin:0!important}
 html body .pg-site-header.ac-header .ac-nav .ac-nav-label{display:block;margin:18px 12px 6px;font:700 11px/1 system-ui,sans-serif;letter-spacing:.6px;color:var(--sh-muted);opacity:.8}
 /* bottom block: classroom + settings */
 html body .pg-site-header.ac-header .ac-header-room{margin:auto 0 0!important;display:flex!important;align-items:center!important;gap:10px!important;min-height:48px!important;padding:0 12px!important;border:1px solid var(--sh-line)!important;border-radius:12px!important;background:var(--sh-surface)!important;color:var(--sh-text)!important;font:700 14px/1 var(--sh-font)!important;text-decoration:none!important;box-shadow:none!important}
 html body .pg-site-header.ac-header .ac-header-room::before{content:'';flex:none;width:28px;height:28px;border-radius:50%;background:var(--sh-accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2311795a' stroke-width='1.9' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8.5' r='3.6'/%3E%3Cpath d='M5 20a7 7 0 0 1 14 0'/%3E%3C/svg%3E") center/18px no-repeat}
 html[data-pg-theme="dark"] body .pg-site-header.ac-header .ac-header-room::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2341d29b' stroke-width='1.9' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8.5' r='3.6'/%3E%3Cpath d='M5 20a7 7 0 0 1 14 0'/%3E%3C/svg%3E")}
 html body .pg-site-header.ac-header .ac-header-room:hover{background:var(--sh-hover)!important}
 html body .pg-site-header.ac-header .ac-header-room[aria-current="page"]{border-color:var(--sh-accent)!important}
 html body .pg-site-header.ac-header .topnav{margin:6px 0 0!important;height:auto!important;display:block!important;position:relative!important}
 html body .pg-site-header.ac-header .accountmenu{position:relative!important;display:block!important}
 html body .pg-site-header.ac-header summary.pg-menu-button{width:100%!important;max-width:none!important;min-width:0!important;height:42px!important;display:flex!important;justify-content:flex-start!important;gap:10px!important;padding:0 12px!important;border-radius:10px!important;color:var(--sh-muted)!important;font:600 14px/1 var(--sh-font)!important}
 html body .pg-site-header.ac-header summary.pg-menu-button svg{width:20px!important;height:20px!important;stroke-width:1.8!important}
 html body .pg-site-header.ac-header summary.pg-menu-button:hover{background:var(--sh-hover)!important;color:var(--sh-text)!important}
 html body .pg-site-header.ac-header .pg-menu-label{display:inline!important}
 html body .pg-site-header.ac-header .accountpop{position:absolute!important;left:calc(100% + 14px)!important;right:auto!important;top:auto!important;bottom:0!important;width:260px!important;transform:none!important}
 /* page content: keep the familiar centered column inside the remaining width */
 html body:has(.pg-site-header.ac-header) .pg-bottom-nav{display:none!important}
}

/* ---------- tablet: slim top bar with icon+label links ---------- */
@media (min-width:781px) and (max-width:1079.98px){
 html body .pg-site-header.ac-header{height:64px!important;min-height:64px!important;max-height:64px!important;padding:0 20px!important;gap:16px!important;position:sticky!important;top:0!important;background:color-mix(in srgb,var(--sh-bg) 88%,transparent)!important;backdrop-filter:saturate(160%) blur(14px);-webkit-backdrop-filter:saturate(160%) blur(14px);border-bottom:1px solid var(--sh-line)!important}
 html body .pg-site-header.ac-header .ac-nav{display:flex!important;gap:2px!important;margin:0 0 0 8px!important}
 html body .pg-site-header.ac-header .ac-nav a{min-height:38px!important;padding:0 10px!important;gap:6px!important;font-size:13.5px!important}
 html body .pg-site-header.ac-header .ac-nav a svg{width:18px;height:18px}
 html body .pg-site-header.ac-header .ac-nav .nav-badge{display:none}
 html body .pg-site-header.ac-header .pg-menu-label{display:none!important}
}

/* ---------- mobile: brand + classroom + menu; bottom tabs do the navigation ---------- */
@media (max-width:780px){
 html body .pg-site-header.ac-header{height:58px!important;min-height:58px!important;max-height:58px!important;padding:0 16px!important;position:sticky!important;top:0!important;background:color-mix(in srgb,var(--sh-bg) 88%,transparent)!important;backdrop-filter:saturate(160%) blur(14px);-webkit-backdrop-filter:saturate(160%) blur(14px);border-bottom:1px solid var(--sh-line)!important}
 html body .pg-site-header.ac-header .ac-nav{display:none!important}
 html body .pg-site-header.ac-header .pg-menu-label{display:none!important}
 html body .pg-site-header.ac-header .ac-header-room{min-height:36px!important;padding:0 14px!important;border:1px solid var(--sh-line)!important;border-radius:99px!important;font-size:13px!important;font-weight:700!important;color:var(--sh-text)!important}
}
.pg-menu-label{display:none}
/* 2026-11: text labels under the bottom-tab icons */
html body .pg-bottom-nav.pg-bottom-nav>a{flex-direction:column!important;gap:3px!important}
html body .pg-bottom-nav.pg-bottom-nav>a svg{width:22px!important;height:22px!important;stroke-width:1.7!important}
html body .pg-bottom-nav .pg-tab-text{display:block;font:700 10.5px/1 var(--sh-font);letter-spacing:-.2px;white-space:nowrap}
html body .pg-bottom-nav .pg-tab-text{position:relative;z-index:2}

/* Tactile press (tactile.js): sink under the finger, spring back on release. */
.tc-down{transform:translateY(1px) scale(.975)!important;transition:transform .08s ease-out!important;filter:brightness(.97)}
.tc-up{transition:transform .38s cubic-bezier(.2,1.8,.4,1)!important}
:is(a.h26-tile,.h26-reco,.lt-next,.pd-card,.curr-unit-summary,.quest-mission).tc-down{transform:translateY(1px) scale(.985)!important}
@media(prefers-reduced-motion:reduce){.tc-down,.tc-up{transform:none!important;transition:none!important;filter:none}}

/* Admin shortcut: sidebar only (desktop). Tablet top bar and mobile keep it in the settings menu. */
@media(max-width:1079px){html body .pg-site-header.ac-header .ac-nav :is(.ac-nav-admin,.ac-nav-admin-label){display:none!important}}

/* 2026-11: the floating tab bar reads as one solid surface, so content scrolling under it never shows
   through as overlapping text. Same token-based glass as the mobile top bar. */
@media (max-width:780px){
 html body>.pg-bottom-nav.pg-bottom-nav.pg-bottom-nav.pg-bottom-nav{background:color-mix(in srgb,var(--sh-bg) 96%,transparent)!important;border-color:var(--sh-line)!important;box-shadow:0 10px 30px -12px #00000059!important}
}
