/* Shared workspace chrome. Editor, database colors and service layouts stay local. */
/* Self-hosted Pretendard Variable (SIL OFL 1.1, fonts/OFL.txt): KS X 1001 Hangul + Latin,
   weights 400-930, built by tools/pretendard_subset.py. Pages preload the same URL. */
@font-face {
  font-family: "Pretendard Variable";
  font-style: normal;
  font-weight: 400 930;
  font-display: swap;
  src: url("/fonts/pretendard-variable-ksx1001-f4174d32.woff2") format("woff2-variations"), url("/fonts/pretendard-variable-ksx1001-f4174d32.woff2") format("woff2");
}
/* White and orange palette. Text, muted text and the accent on buttons meet WCAG AA (4.5:1). */
:root:root {
  color-scheme: light;
  --ww-bg: #fffcf8;
  --ww-surface: #fff;
  --ww-sidebar: #fbf6f0;
  --ww-fg: #2a211b;
  --ww-muted: #75685e;
  --ww-border: #efe4d8;
  --ww-accent: #c9480d;
  --ww-accent-bright: #f97316;
  --ww-on-accent: #fff;
  --ww-hover: rgba(249, 115, 22, .08);
  --ww-selection: rgba(249, 115, 22, .18);
  --ww-shadow: 0 1px 2px rgba(74, 42, 16, .04), 0 4px 16px rgba(74, 42, 16, .06);
  --ww-space-1: 4px;
  --ww-space-2: 8px;
  --ww-space-3: 12px;
  --ww-space-4: 16px;
  --ww-space-6: 24px;
  --ww-space-8: 32px;
  --ww-radius-button: 8px;
  --ww-radius-card: 14px;
  --ww-radius-dialog: 16px;
  --ww-font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --bg: var(--ww-bg);
  --fg: var(--ww-fg);
  --muted: var(--ww-muted);
  --hover: var(--ww-hover);
  --border: var(--ww-border);
  --accent: var(--ww-accent);
  --sidebar: var(--ww-sidebar);
  --selection: var(--ww-selection);
}
@media (prefers-color-scheme: dark) {
  :root:root:not([data-theme="light"]) {
    color-scheme: dark;
    --ww-bg: #191512;
    --ww-surface: #221c18;
    --ww-sidebar: #1e1915;
    --ww-fg: #f5eee8;
    --ww-muted: #b8a99c;
    --ww-border: #3b3029;
    --ww-accent: #ff9147;
    --ww-accent-bright: #ffa463;
    --ww-on-accent: #1d130c;
    --ww-hover: rgba(255, 145, 71, .1);
    --ww-selection: rgba(255, 145, 71, .24);
    --ww-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  }
}
:root:root[data-theme="dark"] {
  color-scheme: dark;
  --ww-bg: #191512;
  --ww-surface: #221c18;
  --ww-sidebar: #1e1915;
  --ww-fg: #f5eee8;
  --ww-muted: #b8a99c;
  --ww-border: #3b3029;
  --ww-accent: #ff9147;
  --ww-accent-bright: #ffa463;
  --ww-on-accent: #1d130c;
  --ww-hover: rgba(255, 145, 71, .1);
  --ww-selection: rgba(255, 145, 71, .24);
  --ww-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
}
::selection { background: var(--ww-selection); }
body { background: var(--ww-bg); color: var(--ww-fg); font-family: var(--ww-font); line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ww-accent); outline-offset: 2px;
}
input[type="checkbox"], input[type="radio"], input[type="range"], progress { accent-color: var(--ww-accent); }

/* Common navigation; retain drawer positioning and motion. */
body .wing { background: var(--ww-sidebar); border-color: var(--ww-border); padding: var(--ww-space-2); }
body .wing a, body .authbar :is(button, a, select), body .wing-btn {
  border-radius: var(--ww-radius-button);
}
body .wing a { padding-top: var(--ww-space-2); padding-bottom: var(--ww-space-2); }
body .wing a.on { color: var(--ww-accent); background: var(--ww-hover); }
body #sidebar :is(.side-action, .prow, .authbar button, .authbar a, .wing-btn) {
  border-radius: var(--ww-radius-button);
}
body #sidebar .prow.active { color: var(--ww-accent); background: var(--ww-hover); }
body > header, body #topbar { background: var(--ww-surface); border-color: var(--ww-border); }
body .authbar :is(button, a) { color: var(--ww-muted); }
body .authbar select { background: var(--ww-surface); border-color: var(--ww-border); color: var(--ww-fg); }

/* Home and settings cards. Keep the existing grid, responsive rules and animations. */
body .wrap .card { padding: var(--ww-space-6); }
body .wrap .grid { gap: var(--ww-space-4); }
body .wrap .grid > .card:hover, body .wrap .grid > .card.navigation-selected {
  background: var(--ww-hover); border-color: var(--ww-accent);
}
body .hero h1 { color: var(--ww-fg); letter-spacing: -.04em; }
body .hero p, body .card p, body .lead { color: var(--ww-muted); }
body .tokenbox { border-radius: var(--ww-radius-card); background: var(--ww-hover); }

/* ---------- Shared components ---------- */
/* Inputs: one height, one radius, an accent focus ring. Only application forms are touched. */
body :is(.lbody input, .field input, .field select, .copyrow input, .copyrow textarea,
  .bsearch input, .bsearch select, .crow input, .cform textarea, .fld input, .fld textarea),
body .phase-modal .phase-input,
body dialog.wp-dialog :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]) {
  box-sizing: border-box; min-height: 36px; background: var(--ww-surface); color: var(--ww-fg);
  border: 1px solid var(--ww-border); border-radius: var(--ww-radius-button);
  padding: var(--ww-space-2) var(--ww-space-3); font: inherit; font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
body :is(.lbody input, .field input, .field select, .copyrow input, .copyrow textarea,
  .bsearch input, .bsearch select, .crow input, .cform textarea, .fld input, .fld textarea):focus,
body .phase-modal .phase-input:focus, body dialog.wp-dialog :is(input, select, textarea):focus {
  outline: none; border-color: var(--ww-accent); box-shadow: 0 0 0 3px var(--ww-selection);
}

/* Buttons: secondary (outlined) by default, .primary / .btn.primary filled with the accent. */
body :is(.btn, .dacts button, .copyrow button, .ghost-btn, .primary, .lbody button),
body .phase-modal .quiet-btn, body dialog.wp-dialog button {
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: var(--ww-space-1);
  min-height: 36px; padding: 0 var(--ww-space-4); border: 1px solid var(--ww-border); border-radius: var(--ww-radius-button);
  background: var(--ww-surface); color: var(--ww-fg); font: inherit; font-size: 14px; font-weight: 500; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, filter .15s;
}
body :is(.btn, .dacts button, .copyrow button, .ghost-btn):hover:not(:disabled),
body .phase-modal .quiet-btn:hover:not(:disabled), body dialog.wp-dialog button:hover:not(:disabled) {
  background: var(--ww-hover); border-color: var(--ww-accent-bright);
}
body :is(.primary, .btn.primary, .lbody button) {
  background: var(--ww-accent); border-color: var(--ww-accent); color: var(--ww-on-accent);
}
body :is(.primary, .btn.primary, .lbody button):hover:not(:disabled) { background: var(--ww-accent); filter: brightness(1.08); }
body :is(.btn, .dacts button, .copyrow button, .ghost-btn, .primary, .lbody button):disabled { opacity: .5; cursor: default; }
body .ghost-btn { background: transparent; border-color: transparent; }
/* Destructive actions: outlined in red, filled only on hover so they never read as the primary step. */
:root:root { --ww-danger: #b42318; --ww-danger-soft: rgba(180, 35, 24, .08); }
@media (prefers-color-scheme: dark) { :root:root:not([data-theme="light"]) { --ww-danger: #ff8a7a; --ww-danger-soft: rgba(255, 138, 122, .12); } }
:root:root[data-theme="dark"] { --ww-danger: #ff8a7a; --ww-danger-soft: rgba(255, 138, 122, .12); }
body :is(.btn, button, a).danger {
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 var(--ww-space-4);
  border: 1px solid var(--ww-danger); border-radius: var(--ww-radius-button); background: transparent; color: var(--ww-danger);
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background .15s;
}
body :is(.btn, button, a).danger:hover:not(:disabled) { background: var(--ww-danger-soft); }
body :is(.btn, button).danger:disabled { opacity: .5; cursor: default; }
body .wt-button { min-height: 36px; padding: 0 var(--ww-space-4); font-size: 14px; font-weight: 500; }

/* Cards: one surface, border, radius and shadow. */
body :is(.wrap .card, .wrap .toklist) {
  background: var(--ww-surface); border: 1px solid var(--ww-border); border-radius: var(--ww-radius-card);
  box-shadow: var(--ww-shadow);
}

/* Empty states: a quiet dashed card, the same on every page. */
body :is(.drive .dempty, #view .empty), body .wt-state {
  box-sizing: border-box; margin: var(--ww-space-4) 0; padding: var(--ww-space-8) var(--ww-space-6);
  border: 1px dashed var(--ww-border); border-radius: var(--ww-radius-card);
  background: var(--ww-surface); color: var(--ww-muted); font-size: 14px; text-align: center;
}
body :is(.dacts, .bar, .form-row) { gap: var(--ww-space-2); }
body .dacts { flex-wrap: wrap; }
body .tabs a { border-radius: var(--ww-radius-button); }
body .tabs a.on { background: var(--ww-hover); color: var(--ww-accent); }
body .pager .cur, body .bot-badge:not(.gp), body .wp-badge { color: var(--ww-on-accent); }

/* Higher scoped specificity also beats personal.js styles inserted after load. */
body :is(#login, #pw, #modal, #picker, .phase-modal) .mbox,
body dialog.wp-dialog, body dialog.wt-dialog {
  background: var(--ww-surface); color: var(--ww-fg); border: 1px solid var(--ww-border);
  border-radius: var(--ww-radius-dialog); box-shadow: 0 16px 48px rgba(0, 0, 0, .18);
}
body dialog.wp-dialog, body dialog.wt-dialog { padding: var(--ww-space-6); font-family: var(--ww-font); }
body dialog.wp-dialog::backdrop, body dialog.wt-dialog::backdrop { background: rgba(40, 22, 8, .45); }
body .mbox .mhead { padding: var(--ww-space-3) var(--ww-space-4); border-color: var(--ww-border); }
body .mbox .lbody { padding: var(--ww-space-6); gap: var(--ww-space-3); }
body .mbox .mhead button { color: var(--ww-muted); border-radius: var(--ww-radius-button); }
body #pageActions .tb-btn, body #topbar > button, body #headerTools > .quiet-btn {
  background: transparent; color: var(--ww-muted); border: 0; border-radius: var(--ww-radius-button);
}
body #pageActions .tb-btn:hover, body #topbar > button:hover, body #headerTools > .quiet-btn:hover {
  background: var(--ww-hover); color: var(--ww-fg);
}

/* ---------- Scrolling: content scrolls under the bar, never beside it ---------- */
/* Pages marked <body data-ww-scroll> get their content wrapped in .ww-scroll by wooweb_bar.js
   (or ship the wrapper themselves); the document itself no longer scrolls. */
html:has(body > .ww-scroll), html:has(body > .ww-scroll) > body { height: 100%; overflow: hidden; }
html:has(body > .ww-scroll) > body { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
body > .ww-bar { flex: none; }
body > .ww-scroll {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; outline: 0;
  scrollbar-gutter: stable; overscroll-behavior: contain;
}

/* Slim rounded scrollbar for every scroller on the site. */
:root { --ww-thumb: color-mix(in srgb, var(--ww-muted) 45%, transparent); }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: var(--ww-thumb) transparent; }
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: var(--ww-thumb) padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--ww-accent) padding-box; }
::-webkit-scrollbar-thumb:active { background: var(--ww-accent-bright) padding-box; }

/* ---------- Site bar: the same 56px bar on every page ---------- */
:root:root { --ww-bar-height: 56px; }
body .ww-bar {
  position: sticky; top: 0; z-index: 30; box-sizing: border-box;
  display: flex; align-items: center; gap: var(--ww-space-2);
  height: var(--ww-bar-height); margin: 0; padding: 0 var(--ww-space-4);
  background: var(--ww-surface); border-bottom: 1px solid var(--ww-border);
}
body .ww-bar .wing-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--ww-radius-button);
  background: none; color: var(--ww-fg); font-size: 20px; line-height: 1; cursor: pointer;
}
body .ww-bar .wing-btn:hover { background: var(--ww-hover); }
body .ww-brand {
  display: inline-flex; align-items: center; gap: var(--ww-space-2); flex: none;
  color: var(--ww-fg); font-size: 15px; font-weight: 700; letter-spacing: -.01em; text-decoration: none;
}
body .ww-brand::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(135deg, var(--ww-accent-bright), var(--ww-accent));
}
body .ww-bar-sep { color: var(--ww-border); font-size: 18px; font-weight: 300; }
body .ww-bar-title, body .ww-bar h1.ww-bar-title {
  margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ww-fg); font-size: 15px; font-weight: 600; letter-spacing: normal;
}
body .ww-bar-title a { color: inherit; text-decoration: none; }
body .ww-bar .authbar {
  margin: 0 0 0 auto; padding: 0; display: flex; align-items: center; gap: var(--ww-space-1);
  flex-wrap: nowrap; position: static;
}
body .ww-bar .authbar :is(button, a) {
  display: inline-flex; align-items: center; height: 32px; padding: 0 var(--ww-space-3);
  border: 0; border-radius: var(--ww-radius-button); background: none;
  color: var(--ww-muted); font-size: 13px; text-decoration: none; cursor: pointer;
}
body .ww-bar .authbar :is(button, a):hover { background: var(--ww-hover); color: var(--ww-fg); }
body .ww-bar .authbar select { height: 32px; padding: 0 var(--ww-space-2); font-size: 13px; border-radius: var(--ww-radius-button); }
body .ww-bar .authbar .status { color: var(--ww-muted); font-size: 12px; }
@media (max-width: 640px) {
  body .ww-bar { padding: 0 var(--ww-space-2); }
  body .ww-bar .authbar .status { display: none; }
}

/* Site drawer opened from the bar. Pages that already style it keep their motion. */
body .wing {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 40; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 2px; width: 248px; max-width: 80vw; overflow-y: auto;
  border-right: 1px solid var(--ww-border); transform: translateX(-100%); visibility: hidden;
  transition: transform .22s cubic-bezier(.22, .61, .36, 1), visibility 0s .22s;
}
body .wing.open { transform: none; visibility: visible; transition-delay: 0s; }
body .wing-head {
  display: flex; align-items: center; justify-content: space-between;
  height: calc(var(--ww-bar-height) - var(--ww-space-2)); padding: 0 var(--ww-space-2) var(--ww-space-2);
  font-weight: 700;
}
body .wing-head button { border: 0; background: none; color: var(--ww-muted); font-size: 20px; line-height: 1; cursor: pointer; }
body .wing a { display: block; padding: var(--ww-space-2) var(--ww-space-3); color: var(--ww-fg); font-size: 14px; text-decoration: none; }
body .wing a:hover { background: var(--ww-hover); }
body .wing a.sub { padding-left: var(--ww-space-6); color: var(--ww-muted); }
body .wing a.on { font-weight: 600; }
body .wing-sec { margin-top: var(--ww-space-3); padding: var(--ww-space-1) var(--ww-space-3); color: var(--ww-muted); font-size: 12px; }
body .wing-back { position: fixed; inset: 0; z-index: 39; background: rgba(40, 22, 8, .35); }
body .wing a.wing-foot { margin-top: var(--ww-space-3); border-top: 1px solid var(--ww-border); border-radius: 0 0 var(--ww-radius-button) var(--ww-radius-button); }
@media (max-width: 700px), (pointer: coarse) {
  /* Touch: every drawer row and the close button are at least 44px. */
  body .wing a { display: flex; align-items: center; min-height: 44px; box-sizing: border-box; }
  body .wing-head button { width: 44px; height: 44px; border-radius: 50%; }
}
body .wing-back.hidden { display: none; }
/* Wootion: the site bar spans the window; sidebar and editor fill the rest. */
body #siteBar + #app { height: calc(100vh - var(--ww-bar-height)); height: calc(100dvh - var(--ww-bar-height)); }
html.wootion-peek body #siteBar + #app { height: 100vh; }
@media (max-width: 700px) {
  body #siteBar + #app #sidebar { top: var(--ww-bar-height); height: calc(100% - var(--ww-bar-height)); }
}

/* ---------- Page head: title, one-line description, primary actions on the right ---------- */
body .ww-page-head {
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap;
  gap: var(--ww-space-3) var(--ww-space-4); margin: 0 0 var(--ww-space-6);
}
body .ww-page-heading { flex: 1 1 260px; min-width: 0; }
body .ww-page-title {
  margin: 0; color: var(--ww-fg); font-size: 26px; font-weight: 700; line-height: 1.3; letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
body .ww-page-desc { margin: var(--ww-space-1) 0 0; color: var(--ww-muted); font-size: 14px; line-height: 1.5; }
body .ww-page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ww-space-2); margin: 0; }
body .ww-page-head .crumb { margin: 0 0 var(--ww-space-1); }
body .wing a.sub:hover { color: var(--ww-fg); }

/* Pretendard reads best with slightly tighter headings. */
body :is(h1, h2, h3) { letter-spacing: -.02em; }
/* Language, (install), bell and theme lead the right side of the bar on every page; then 설정 and 로그인.
   Icon buttons are square; the bell is listed here so the bar's 12px text padding cannot squash it. */
body .ww-bar .authbar :is(.ww-theme, .ww-push-btn, .ww-prefs-btn) { flex: none; width: 32px; padding: 0; justify-content: center; }
body .ww-bar .authbar .ww-lang { margin-right: var(--ww-space-1); border: 1px solid var(--ww-border); background: var(--ww-surface); color: var(--ww-fg); }
body .ww-bar .authbar :is(button, a) { white-space: nowrap; }
body .ww-bar .authbar .ww-prefs-btn { display: none; }
body .ww-bar .ww-brand { white-space: nowrap; }
@media (max-width: 640px) {
  /* Phone: one quick-settings button replaces language, theme and bell so the page name has room. */
  body .ww-bar { gap: var(--ww-space-1); }
  body .ww-bar .wing-btn { width: 44px; height: 44px; }
  body .ww-bar .ww-brand { min-height: 44px; }
  body .ww-bar .ww-bar-title { flex: 1 1 auto; }
  body .ww-bar .ww-bar-sep { flex: none; }
  body .ww-bar .authbar { gap: 0; }
  body .ww-bar .authbar > :is(.ww-lang, .ww-theme, .ww-push-btn) { display: none; }
  body .ww-bar .authbar .ww-prefs-btn { display: inline-flex; width: 44px; height: 44px; }
  body .ww-bar .authbar .ww-bar-settings { display: none; } /* still reachable from the ☰ menu */
  body .ww-bar .authbar :is(button, a) { height: 44px; min-width: 44px; padding: 0 var(--ww-space-2); justify-content: center; }
}

/* Quick settings popover (phone). */
body .ww-prefs {
  position: fixed; z-index: 45; top: calc(var(--ww-bar-height) + 6px); right: 8px; box-sizing: border-box;
  width: min(320px, calc(100vw - 16px)); padding: var(--ww-space-2) var(--ww-space-4) var(--ww-space-4);
  background: var(--ww-surface); color: var(--ww-fg); border: 1px solid var(--ww-border);
  border-radius: var(--ww-radius-card); box-shadow: 0 12px 32px rgba(0, 0, 0, .16); font: 14px/1.4 var(--ww-font);
}
body .ww-prefs[hidden] { display: none; }
body .ww-prefs-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--ww-space-1); }
body .ww-prefs-head h2 { margin: 0; font-size: 15px; font-weight: 700; }
body :is(.ww-prefs-close, .ww-more-close) {
  width: 44px; height: 44px; margin-right: -10px; border: 0; border-radius: 50%; background: none;
  color: var(--ww-muted); font-size: 22px; line-height: 1; cursor: pointer;
}
body :is(.ww-prefs-close, .ww-more-close):hover { background: var(--ww-hover); color: var(--ww-fg); }
body .ww-prefs-row { display: flex; align-items: center; justify-content: space-between; gap: var(--ww-space-3); min-height: 52px; border-top: 1px solid var(--ww-border); }
body .ww-prefs-row[hidden] { display: none; }
body .ww-prefs-label { color: var(--ww-muted); font-size: 13px; font-weight: 600; }
body .ww-prefs select {
  min-width: 140px; height: 44px; padding: 0 var(--ww-space-3); border: 1px solid var(--ww-border);
  border-radius: var(--ww-radius-button); background: var(--ww-surface); color: var(--ww-fg); font: inherit;
}
body .ww-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--ww-hover); }
body .ww-seg button, body .ww-prefs-push-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 68px; height: 40px; padding: 0 var(--ww-space-3);
  border: 0; border-radius: var(--ww-radius-button); background: none; color: var(--ww-fg); font: inherit; font-weight: 600; cursor: pointer;
}
body .ww-seg button[aria-pressed="true"] { background: var(--ww-surface); color: var(--ww-accent); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
body .ww-prefs-push-btn { height: 44px; border: 1px solid var(--ww-border); background: var(--ww-surface); }
body .ww-prefs-push-btn:hover { background: var(--ww-hover); }

/* Phone 더보기 sheet: every section in one grid. */
body dialog.ww-more {
  position: fixed; inset: auto 0 0; box-sizing: border-box; width: 100%; max-width: 560px; max-height: 85dvh; margin: 0 auto;
  padding: var(--ww-space-2) var(--ww-space-4) calc(var(--ww-space-4) + env(safe-area-inset-bottom, 0px)); overflow-y: auto;
  border: 1px solid var(--ww-border); border-bottom: 0; border-radius: 18px 18px 0 0;
  background: var(--ww-surface); color: var(--ww-fg); box-shadow: 0 -8px 32px rgba(0, 0, 0, .18); font-family: var(--ww-font);
}
body dialog.ww-more[open] { animation: ww-sheet-in .22s cubic-bezier(.22, .61, .36, 1); }
@keyframes ww-sheet-in { from { transform: translateY(24px); opacity: 0; } }
body dialog.ww-more::backdrop { background: rgba(40, 22, 8, .4); }
body .ww-more-head { display: flex; align-items: center; justify-content: space-between; }
body .ww-more-head h2 { margin: 0; font-size: 16px; font-weight: 700; }
body .ww-more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ww-space-2); margin-top: var(--ww-space-2); }
body .ww-more-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 76px; padding: var(--ww-space-2);
  border: 1px solid var(--ww-border); border-radius: var(--ww-radius-card); color: var(--ww-fg);
  font-size: 13px; font-weight: 600; line-height: 1.25; text-align: center; text-decoration: none; word-break: keep-all;
}
body .ww-more-item svg { color: var(--ww-accent); }
body .ww-more-item:hover { background: var(--ww-hover); border-color: var(--ww-accent-bright); }
body .ww-more-item[aria-current="page"] { background: var(--ww-hover); border-color: var(--ww-accent); color: var(--ww-accent); }
body .ww-bar .authbar a[aria-current="page"] { color: var(--ww-accent); }
body .ww-bar .authbar .status:empty { display: none; }
body .ww-bar [hidden] { display: none !important; }

/* Safe-area chrome: env() is zero on pages without viewport-fit=cover. */
:root:root { --ww-bar-height: calc(56px + env(safe-area-inset-top, 0px)); }
body .ww-bar { padding-top: env(safe-area-inset-top, 0px); }

/* Mobile / installed navigation. Desktop browser layout is unchanged. */
.ww-tabbar { display: none; }
@media (max-width: 700px), (display-mode: standalone) {
  :root.ww-tabs-page:not(.ww-keyboard) {
    --ww-tab-space: calc(56px + env(safe-area-inset-bottom, 0px));
  }
  .ww-tabs-page:not(.ww-keyboard) body > .ww-tabbar {
    box-sizing: border-box; position: fixed; inset: auto 0 0; z-index: 35;
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
    height: var(--ww-tab-space); padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--ww-surface); color: var(--ww-muted);
    border-top: 1px solid var(--ww-border); box-shadow: 0 -2px 12px rgba(0, 0, 0, .06);
  }
  @supports (backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px)) {
    .ww-tabs-page body > .ww-tabbar {
      background: color-mix(in srgb, var(--ww-surface) 90%, transparent);
      -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    }
  }
  body .ww-tabbar .ww-tab {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; min-width: 0; margin: 0; padding: 4px 2px; border: 0; border-radius: 8px;
    background: transparent; color: inherit; font: inherit; font-size: 10px; line-height: 1.2;
    text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: background .15s, transform .15s;
  }
  .ww-tabbar .ww-tab svg { flex: none; }
  .ww-tabbar .ww-tab[aria-current="page"] { color: var(--ww-accent); font-weight: 700; }
  .ww-tabbar .ww-tab[aria-current="page"]::before {
    content: ""; position: absolute; top: 2px; width: 20px; height: 3px;
    border-radius: 999px; background: var(--ww-accent);
  }
  body .ww-tabbar .ww-tab:hover { background: var(--ww-hover); }
  body .ww-tabbar .ww-tab:active { background: var(--ww-selection); transform: scale(.95); }
  body .ww-tabbar .ww-tab:focus-visible { outline: 2px solid var(--ww-accent); outline-offset: -3px; }
  .ww-tabs-page:not(.ww-keyboard) body > .ww-scroll,
  .ww-tabs-page:not(.ww-keyboard) body #app :is(#main, #sidebar) {
    box-sizing: border-box; padding-bottom: var(--ww-tab-space);
    scroll-padding-bottom: var(--ww-tab-space);
  }
  .ww-tabs-page:not(.ww-keyboard) body:has(> #wtScroll) > #status { bottom: calc(28px + var(--ww-tab-space)); }
  .ww-tabs-page:not(.ww-keyboard) body #wt-toast { bottom: calc(22px + var(--ww-tab-space)); }
}

/* Shared toast and in-page dialogs (wooweb_bar.js: WoowebToast, WoowebDialog). */
.ww-toast { position: fixed; left: 50%; bottom: calc(24px + var(--ww-tab-space, 0px)); z-index: 1000; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px; background: var(--ww-fg); color: var(--ww-bg); font: 600 14px/1.45 var(--ww-font); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.ww-toast.on { opacity: 1; transform: translate(-50%, 0); }
.ww-toast[data-type="error"] { background: #b42318; color: #fff; }
.ww-toast[data-type="ok"] { background: #1f7a3d; color: #fff; }
.ww-dialog { border: 1px solid var(--ww-border); border-radius: var(--ww-radius-dialog); background: var(--ww-surface); color: var(--ww-fg); padding: 20px; width: min(420px, calc(100vw - 32px)); box-shadow: var(--ww-shadow); font-family: var(--ww-font); }
.ww-dialog::backdrop { background: rgba(20, 12, 6, .45); }
.ww-dialog h2 { margin: 0 0 8px; font-size: 17px; }
.ww-dialog p { margin: 0 0 12px; color: var(--ww-muted); font-size: 14px; line-height: 1.5; }
.ww-dialog input { width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px 12px; border: 1px solid var(--ww-border); border-radius: var(--ww-radius-button); background: var(--ww-bg); color: var(--ww-fg); font: inherit; }
.ww-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.ww-dialog .ww-btn { min-height: 40px; padding: 0 16px; border-radius: var(--ww-radius-button); border: 1px solid var(--ww-border); background: var(--ww-surface); color: var(--ww-fg); font: 600 14px var(--ww-font); cursor: pointer; }
.ww-dialog .ww-btn-primary { background: var(--ww-accent); border-color: var(--ww-accent); color: var(--ww-on-accent); }
.ww-dialog .ww-btn-danger { background: #b42318; border-color: #b42318; color: #fff; }
