* { box-sizing: border-box; }
:root { color-scheme: light; --bg: #f6f7f6; --surface: #fff; --soft: #edf2f1; --text: #203b3d; --muted: #526b6c; --line: #d9e2e1; --accent: #17676c; --danger: #944327; }
:root[data-theme="dark"] { color-scheme: dark; --bg: #131c1e; --surface: #1a2629; --soft: #223336; --text: #e0ebea; --muted: #a3b9b8; --line: #34484b; --accent: #8cc9ca; --danger: #f0b29c; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Aptos', 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; line-height: 1.5; }
.container { --page-gutter: clamp(.5rem, 1.4vw, 1.2rem); width: 100%; max-width: none; margin: 0; padding: .55rem var(--page-gutter) .6rem; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .3rem; }
.page-meta { display: grid; gap: .15rem; justify-items: end; font-style: normal; }
.page-clock { font-size: .82rem; font-variant-numeric: tabular-nums; color: var(--text); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; letter-spacing: -.04em; }
h2 { font-size: 1.1rem; font-weight: 600; letter-spacing: -.02em; }
.eyebrow { font-size: .65rem; text-transform: uppercase; letter-spacing: .13em; font-weight: 650; color: var(--accent); margin-bottom: .3rem; }
.subtitle, .section-description { font-size: .82rem; color: var(--muted); margin-top: .3rem; }
.page-date { font-size: .75rem; color: var(--muted); text-align: right; }
.page-nav { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: .5rem; background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .3rem 0; margin-bottom: .45rem; }
.nav-links { display: flex; gap: 1.4rem; }
.page-nav a { font-size: .8rem; color: var(--text); text-decoration: none; }
.page-nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }
.theme-control { display: flex; gap: .5rem; align-items: center; font-size: .72rem; color: var(--muted); }
select { border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--text); padding: .45rem; font: inherit; max-width: 100%; }
section { scroll-margin-top: 5rem; }
.np-sec { width: calc(100% + 2 * var(--page-gutter)); margin: 0 0 .8rem calc(-1 * var(--page-gutter)); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.np-header { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem .75rem; align-items: center; }
.np-actions { display: flex; align-items: center; justify-content: flex-end; gap: .55rem; flex-wrap: wrap; }
.np-doc-frame-wrap { height: calc(100vh - 175px); height: calc(100dvh - 175px); min-height: 380px; border-top: 1px solid var(--line); background: var(--surface); }
.np-doc-frame-wrap iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--surface); }
.np-doc-hint { padding: .25rem .75rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .65rem; }
textarea::placeholder { color: var(--muted); }
.np-toolbar { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; padding: .7rem 1rem; border-top: 1px solid var(--line); }
.np-hint { color: var(--muted); font-size: .7rem; margin-left: auto; }
button { cursor: pointer; font: inherit; }
.rd-btn, .shortcut { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 36px; border: 1px solid var(--line); border-radius: 5px; padding: .4rem .7rem; background: var(--surface); color: var(--text); font-size: .75rem; font-weight: 550; text-decoration: none; }
button:hover, .quick-link:hover { background: var(--soft); border-color: var(--accent); }
button:disabled { cursor: default; opacity: .6; }
.launch { color: var(--accent); border-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.np-box textarea:focus-visible { outline-offset: -3px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .7rem; }
.launch-hint { color: var(--muted); font-size: .7rem; margin: 0 0 .8rem; }
.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .5rem; }
.quick-link { display: flex; align-items: center; gap: .6rem; padding: .8rem .7rem; background: var(--surface); color: var(--text); text-decoration: none; border: 1px solid var(--line); border-radius: 5px; min-width: 0; }
.quick-index { font-size: .65rem; color: var(--accent); }
.quick-copy { display: grid; min-width: 0; }
.quick-copy strong { font-size: .77rem; font-weight: 600; }
.quick-copy small { font-size: .65rem; color: var(--muted); }
.quick-arrow { margin-left: auto; color: var(--muted); }
.rd-sec { margin-top: 2.6rem; }
.rd-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin: .8rem 0; font-size: .72rem; }
.rd-status { color: var(--muted); }
.rd-status.err { color: var(--danger); }
.rd-actions { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
a.rd-link, .footer a { color: var(--muted); text-underline-offset: 3px; }
.embed-wrap { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.embed-wrap iframe { display: block; width: 100%; height: 580px; border: 0; background: #fff; }
.footer { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem; font-size: .7rem; color: var(--muted); margin-top: 2rem; }
.notice { padding: .8rem 1rem; border-top: 1px solid var(--line); font-size: .8rem; }
.warning { color: var(--danger); }
.conflict-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: .8rem 0; }
.conflict-grid label, .combine-label { display: grid; gap: .4rem; color: var(--muted); font-size: .75rem; }
.notice textarea { width: 100%; min-height: 140px; resize: vertical; border: 1px solid var(--line); border-radius: 4px; padding: .65rem; background: var(--bg); color: var(--text); font: .8rem/1.6 Consolas, monospace; }
.notice .rd-actions { margin-top: .7rem; }
#np-recovery-list { width: 100%; margin-top: .5rem; }
#np-copy-status { font-size: .7rem; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
[hidden] { display: none !important; }
.spinning svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 700px) {
  .container { padding: .45rem var(--page-gutter) .5rem; }
  .page-header { display: flex; align-items: flex-start; gap: .5rem; }
  .page-date { display: block; margin-top: 0; text-align: right; }
  .page-meta { flex: 0 0 auto; font-size: .68rem; }
  .page-clock { font-size: .75rem; }
  .nav-links { gap: .85rem; }
  .theme-control > span { display: none; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .quick-head { align-items: start; flex-direction: column; gap: .6rem; }
  .np-sec { margin-bottom: .55rem; }
  .np-header { padding: .35rem .5rem; align-items: center; }
  .np-actions { gap: .35rem; }
  .np-open { flex: 0 1 auto; }
  .np-doc-frame-wrap { height: calc(100vh - 195px); height: calc(100dvh - 195px); min-height: 320px; }
  .rd-toolbar { align-items: start; flex-direction: column; }
  .conflict-grid { grid-template-columns: 1fr; }
  .embed-wrap iframe { height: 65svh; min-height: 380px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; } }
