/* Every selector is scoped to the navigation itself. No page theme/typography reset.
   Every page links this sheet, so it also brings the shared UI font face and --ui-font stack. */
@import url('/assets/fonts/pretendard.css');
@import url('/assets/fonts/jetbrains-mono.css');
.study-nav-trigger, .study-nav-drawer .study-nav-close { all:unset; box-sizing:border-box; display:inline-grid; place-items:center; min-width:44px; min-height:44px; cursor:pointer; border:1px solid #cecac1; border-radius:10px; color:#292b28; background:#fffdf8; font:700 18px var(--ui-font); flex-shrink:0; }
.study-nav-trigger { margin-right:8px; vertical-align:middle; }
.objective-admin .study-nav-trigger { min-width:44px; }
.study-nav-drawer { box-sizing:border-box; margin:0; inset:0 auto 0 0; width:min(272px,100vw); max-width:100vw; height:100dvh; max-height:100dvh; padding:14px 10px 18px; border:0; border-right:1px solid #e2e9e6; background:#fafffc; color:#374d46; font:14px/1.6 var(--ui-font); overflow-y:auto; overscroll-behavior:contain; box-shadow:8px 0 28px #1d3a3320; }
.study-nav-drawer:not([open]) { display:none !important; }
.study-nav-drawer::backdrop { background:#17191680; }
.study-nav-drawer .study-nav-top { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:0 0 12px; padding:0 4px 12px 10px; border-bottom:1px solid #e2e9e6; }
.study-nav-drawer .study-nav-title { all:unset; color:#263d32; font:700 22px/1.2 "Times New Roman",serif; }
.study-nav-drawer .study-nav-close { font-size:13px; padding:0 10px; border-color:#dce7df; background:#fff; color:#31493e; }
.study-nav-drawer .study-nav-links { display:grid; gap:6px; }
.study-nav-drawer .study-nav-link { all:unset; box-sizing:border-box; display:flex; align-items:center; gap:12px; min-height:46px; padding:8px 12px; border-radius:10px; color:#374d46; background:transparent; font:500 14px/1.4 var(--ui-font); cursor:pointer; overflow-wrap:anywhere; }
.study-nav-drawer .study-nav-link svg { width:21px; height:21px; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.study-nav-drawer .study-nav-link:hover { background:#eef6f1; }
.study-nav-drawer .study-nav-link[aria-current="page"] { background:#e6f4ed; color:#17573f; font-weight:700; }
.study-nav-drawer .study-nav-section, .study-nav-drawer .study-nav-note { all:unset; display:block; font:12px/1.6 var(--ui-font); color:#6d7f75; margin:14px 12px 4px; }
.study-nav-drawer .study-nav-section { padding-top:12px; border-top:1px solid #e2e9e6; font-weight:700; }
/* Shared top bar of the study screens (study-navigation.js). Search, bell and profile come from
   mockup-header-search.js, the pill from pomodoro-pill.js; the order is fixed here whichever script adds its part first. */
.study-masthead { box-sizing:border-box; position:relative; z-index:5; display:flex; align-items:center; gap:12px; min-height:72px; padding:12px 28px; background:#fff; border-bottom:1px solid #dce7df; color:#263d32; font:14px/1.5 var(--ui-font); text-align:left; }
.study-masthead .study-nav-trigger { order:0; margin:0; border-color:#dce7df; background:#fff; color:#263d32; }
.study-masthead .study-page-brand { order:1; display:inline-flex; align-items:center; gap:10px; margin:0 6px 0 4px; color:#263d32; text-decoration:none; font:700 28px/1 "Times New Roman",serif; white-space:nowrap; }
.study-masthead .study-page-brand svg { width:26px; height:26px; fill:none; stroke:#356954; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.study-masthead .study-top-date { order:2; padding-left:16px; border-left:1px solid #e1e7e3; color:#31493e; font-size:14px; white-space:nowrap; }
.study-masthead:not(:has(.mockup-header-search)) .study-top-date { margin-right:auto; }
.study-masthead .mockup-header-search { order:3; flex:0 1 320px; width:auto; margin:0 auto 0 26px; box-sizing:border-box; }
.study-masthead .mockup-header-search input { font-family:inherit; }
.study-masthead .mockup-header-search button { cursor:pointer; }
.study-masthead .mockup-header-search .mockup-search-label { font-size:0; margin:0; }
.study-masthead .mockup-header-search input { border:0; background:transparent; min-height:40px; padding:0; font:400 14px var(--ui-font); }
.study-masthead .mockup-header-search button { min-width:44px; min-height:44px; padding:0; border:0; background:transparent; }
/* The right cluster sits 8px apart inside the bar's 12px rhythm. */
.study-masthead .study-pomo { order:4; }
.study-masthead .study-page-schedule { order:5; display:inline-flex; margin:0 0 0 -4px; }
.study-masthead .mockup-header-utilities { order:6; display:flex; margin-left:-4px; }
.study-masthead .owner-chip { order:7; margin-left:-4px; }
.study-masthead:has(.owner-chip:not([hidden])) .mockup-profile { display:none; }
/* Study Home without the account dialog (no /api/portal): the sign-in chip of owner-session.js is the one account control. */
body.study-dashboard:has(> .owner-chip:not([hidden])) .mockup-profile { display:none; }
/* owner-session.js hides its chip where the account pill opens the account dialog; its own display rule must not undo that. */
.owner-chip[hidden], .study-masthead .owner-chip[hidden] { display:none; }
.study-nav-link[hidden] { display:none; }
/* 사례·기록형 setup: the bar and the form are one scrolling column, so a short screen (tablet browser bars, on-screen
   keyboard) scrolls the form instead of hiding its top under the bar. Auto margins centre the form when it fits. */
#setup-overlay { flex-direction:column; align-items:stretch; justify-content:flex-start; overflow-y:auto; overscroll-behavior:contain; }
#setup-overlay::before, #setup-overlay::after { content:""; flex:none; height:16px; }
#setup-overlay > .study-masthead { order:-1; position:sticky; top:0; flex:none; }
#setup-overlay > .setup-box { flex:none; align-self:center; max-width:calc(100% - 24px); margin:auto; }
/* A tablet browser in landscape leaves about 800px: tighter spacing there, so the whole form shows without scrolling. */
@media(max-height:900px) {
  #setup-overlay::before, #setup-overlay::after { height:8px; }
  #setup-overlay .setup-body { padding:18px 30px; }
  #setup-overlay .form-group { margin-bottom:12px; }
  #setup-overlay .setup-help { margin-bottom:10px; }
  #setup-overlay .btn-start { padding:12px; margin-top:4px; }
}
/* After 시작 the bar is gone: ☰ sits in the examination's own dark header, inside its fixed height. */
#viewHeader > .study-nav-trigger { margin:0; border-color:#ffffff66; background:#ffffff1f; color:#fff; }
.objective-app.in-exam .study-masthead { display:none; }
/* Right cluster of every top bar (the shared bar and Study Home's own header) in the look of the user's v14 prototype
   (.nav-pomo-pill, .dday-pill, .user-chip): timer pill, days left, bell, account, in the prototype's sizes. The pills
   are about 30px tall, so ::before widens what a finger can hit without changing how they look. */
a.study-pomo, .study-masthead .study-page-schedule, body.study-dashboard .header-inner .goal-status,
.mockup-header-utilities a.study-user-chip, .mockup-header-utilities button.study-bell, .study-masthead .owner-chip {
  position:relative; box-sizing:border-box; align-items:center; flex-shrink:0; width:auto; height:auto; min-width:0; min-height:0;
  border-radius:999px; font-family:var(--ui-font); line-height:1.45; white-space:nowrap; text-decoration:none; }
a.study-pomo::before, .study-masthead .study-page-schedule::before, .mockup-header-utilities a.study-user-chip::before,
.mockup-header-utilities button.study-bell::before { content:""; position:absolute; inset:-8px -2px; }
.mockup-header-utilities button.study-bell::before { inset:-7px; }
/* Pomodoro pill: the same server timer as the Pomodoro screen. One look for every state; the digits tell them apart. */
a.study-pomo { display:inline-flex; gap:8px; padding:6px 13px; border:0; background:#1f382c; color:#fff; font-size:12px; font-weight:800; font-variation-settings:'wght' 800; }
a.study-pomo svg { width:14px; height:14px; margin-right:-4px; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
a.study-pomo .study-pomo-time { font-family:'JetBrains Mono',ui-monospace,Consolas,monospace; font-weight:900; font-variation-settings:normal; color:#fca5a5; }
a.study-pomo .study-pomo-time:empty { display:none; }
a.study-pomo:is([data-state="idle"],[data-state="paused"]) .study-pomo-time { opacity:.62; } /* not counting down */
a.study-pomo:is([data-state="off"],[data-state="unknown"]) { color:#ffffffd1; }
/* Days left: the text alone, no icon and no separate label. */
.study-masthead .study-page-schedule, body.study-dashboard .header-inner .goal-status { gap:0; padding:6px 11px; border:0; background:#e8f0ec; color:#2d4f3e; font-size:12px; font-weight:800; font-variation-settings:'wght' 800; }
.study-masthead .study-page-schedule strong, body.study-dashboard .header-inner .goal-status strong { color:inherit; font:inherit; }
body.study-dashboard .header-inner .goal-status { position:static; } /* in the row, never at the earlier fixed header offsets */
/* Bell and account. */
.study-masthead .mockup-header-utilities, body.study-dashboard .mockup-header-utilities { gap:8px; }
.mockup-header-utilities button.study-bell { display:inline-grid; place-items:center; width:30px; height:30px; padding:0; border:0; background:transparent; color:#63736b; cursor:pointer; }
.mockup-header-utilities button.study-bell:hover { color:#2d4f3e; }
.mockup-header-utilities .study-bell svg { width:18px; height:18px; }
.mockup-header-utilities a.study-user-chip, .study-masthead .owner-chip { display:inline-flex; gap:4px; padding:6px 11px; border:1px solid #dfe6e1; background:#fff; box-shadow:none; color:#1c2822; font-size:12.5px; font-weight:700; }
.mockup-header-utilities a.study-user-chip:hover { border-color:#b9cbc0; }
.study-user-chip .study-user-name { max-width:11em; overflow:hidden; text-overflow:ellipsis; }
.study-masthead .owner-chip { position:static; gap:8px; }
.study-masthead .owner-chip button { color:#2d4f3e; font-weight:800; }
@media(max-width:1180px) {
  .study-masthead { padding:12px 24px; }
  .study-masthead .study-top-date, .study-masthead .mockup-header-search { display:none; }
  .study-masthead .study-page-brand { margin-right:auto; }
}
/* Portrait tablet: keep the date and search reachable without squeezing the account cluster. */
@media(min-width:901px) and (max-width:1180px) {
  .study-masthead { display:grid; grid-template-columns:auto minmax(0,1fr) auto auto auto; gap:8px 12px; }
  .study-masthead .study-top-date { display:block; grid-row:2; grid-column:1 / 3; border:0; padding:0; font-size:13px; }
  .study-masthead .mockup-header-search { display:flex; grid-row:2; grid-column:3 / -1; width:100%; margin:0; }
}
@media(max-width:700px) {
  .study-masthead { flex-wrap:wrap; min-height:64px; padding:10px 16px; gap:8px; }
  .study-masthead .study-page-brand { font-size:20px; gap:6px; }
  .study-masthead .study-page-brand svg { width:22px; height:22px; }
  .study-masthead .study-page-schedule, .study-masthead .mockup-notice { display:none; }
  .study-masthead .mockup-header-utilities, .study-masthead .owner-chip { margin-left:0; }
}
@media(max-width:480px) { a.study-pomo .study-pomo-set { display:none; } }
/* Apply after all component resets, so keyboard focus remains visible. */
.study-nav-trigger:focus-visible, .study-nav-drawer :focus-visible, .study-masthead :focus-visible, a.study-pomo:focus-visible { outline:3px solid #9d702d; outline-offset:2px; }
@media print { .study-nav-trigger, .study-nav-drawer, .study-masthead { display:none !important; } }
