:root {
  color-scheme: light;
  --bg: #faf9fe;
  --surface: #fff;
  --muted-bg: #f3f0fb;
  --text: #18181b;
  --secondary: #535164;
  --border: #ddd9e8;
  --accent: #6f35ee;
  --accent-text: #fff;
  --focus: #8b5cf6;
  --notice: #6b38b4;
  font-family: Inter, Pretendard, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #14131b;
    --surface: #1c1b25;
    --muted-bg: #262238;
    --text: #f2effa;
    --secondary: #c0b9d0;
    --border: #3c354d;
    --accent: #c3a8ff;
    --accent-text: #241148;
    --notice: #d5bbff;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14131b;
  --surface: #1c1b25;
  --muted-bg: #262238;
  --text: #f2effa;
  --secondary: #c0b9d0;
  --border: #3c354d;
  --accent: #c3a8ff;
  --accent-text: #241148;
  --notice: #d5bbff;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--bg); line-height: 1.65; overflow-wrap: anywhere; }
:lang(ko) { word-break: keep-all; }
a { color: var(--accent); text-underline-offset: .2em; }
button, input, select { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.visually-hidden, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { position: absolute; z-index: 5; background: var(--surface); padding: .5rem; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-inner { max-width: 1152px; min-height: 64px; padding: 0 1rem; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.brand, .controls { display: flex; align-items: center; gap: .6rem; }
.brand { color: var(--text); text-decoration: none; line-height: 1.2; }
.brand img, .controls { flex: none; }
.brand strong, .languages { white-space: nowrap; }
.brand small { display: block; margin-top: .125rem; color: var(--secondary); font-size: .75rem; }
.languages { display: flex; padding: 2px; background: var(--muted-bg); border: 1px solid var(--border); border-radius: .45rem; }
.languages a { border-radius: .3rem; padding: .25rem .55rem; color: var(--secondary); text-decoration: none; font-weight: 700; font-size: .75rem; }
.languages a[aria-current] { color: var(--text); background: var(--surface); }
.theme, .menu summary, .restart button { border: 0; background: none; color: var(--secondary); padding: .35rem; }
.theme { min-width: 36px; min-height: 36px; }
.menu { position: relative; }
.menu summary { display: grid; place-items: center; min-width: 36px; min-height: 36px; list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu nav { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 2; min-width: 10rem; padding: .5rem; background: var(--surface); border: 1px solid var(--border); border-radius: .5rem; }
.menu nav a, .menu nav button { display: block; padding: .35rem .5rem; }
.menu nav button { background: none; border: 0; color: var(--accent); }
.auth-layout { min-height: calc(100svh - 65px); display: grid; align-items: start; justify-items: center; padding: clamp(2rem, 9vh, 6rem) 1rem 2rem; }
.auth-card { width: min(100%, 30rem); background: var(--surface); border: 1px solid var(--border); border-radius: .8rem; padding: clamp(1.25rem, 5vw, 2.4rem); }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; font-size: .75rem; color: var(--accent); }
h1 { margin: .4rem 0 .55rem; font-size: clamp(1.75rem, 4vw, 2.4rem); letter-spacing: -.025em; line-height: 1.2; }
h2 { line-height: 1.3; }
h1 + p { margin: 0 0 1rem; color: var(--secondary); }
.steps { display: flex; list-style: none; margin: 1.5rem 0; padding: 0 0 .75rem; border-bottom: 1px solid var(--border); gap: .85rem; align-items: center; font-size: .8125rem; color: var(--secondary); }
.steps li { white-space: nowrap; }
.steps li + li::before { content: "→"; margin-right: .65rem; }
.steps li[aria-current] { color: var(--accent); font-weight: 700; }
.auth-form { display: grid; }
label { margin: 0 0 .25rem; font-weight: 600; }
.auth-form label:not(:first-of-type) { margin-top: 1rem; }
input:not([type="hidden"]), select { width: 100%; min-width: 0; padding: .55rem .7rem; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: .45rem; }
input::placeholder { color: var(--secondary); }
.password-field { position: relative; }
.password-field input { padding-inline-end: 4.75rem; }
.password-field button { position: absolute; inset: .25rem .25rem .25rem auto; padding: 0 .65rem; color: var(--accent); background: none; border: 0; font-weight: 600; }
.primary { padding: .55rem 1rem; border: 1px solid transparent; border-radius: .45rem; background: var(--accent); color: var(--accent-text); font-weight: 650; }
.auth-form .primary { margin-top: 1.25rem; }
.notice { background: var(--muted-bg); color: var(--notice); padding: .625rem .75rem; border-radius: .4rem; }
.recovery, .restart { font-size: .85rem; color: var(--secondary); }
.restart { margin-top: .75rem; }
.restart button { padding-inline: 0; text-decoration: underline; text-underline-offset: .2em; }
.workspace { width: min(calc(100% - 2rem), 1120px); margin: 0 auto; padding-bottom: 3rem; }
.workspace-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; padding: 1rem 0; margin-bottom: 1.75rem; border-bottom: 1px solid var(--border); }
.workspace-nav a { color: var(--secondary); text-decoration: none; font-weight: 600; }
.search { display: grid; grid-template-columns: minmax(0, 1fr) minmax(8rem, 13rem) auto; gap: .55rem; max-width: 760px; margin: 1rem 0 1.5rem; }
.entries { list-style: none; padding: 0; max-width: 780px; }
.entries li { padding: .85rem 0; border-bottom: 1px solid var(--border); }
.entries p, .entries small { margin: .2rem 0 0; color: var(--secondary); }
article { max-width: 810px; }
article img { max-width: 100%; height: auto; }
article pre { overflow: auto; padding: .9rem; background: var(--muted-bg); border-radius: .4rem; }
article table { display: block; overflow: auto; border-collapse: collapse; }
article th, article td { border: 1px solid var(--border); padding: .5rem; }
.answer-tabs { display: flex; gap: 1rem; }
.answer-tabs [aria-current] { font-weight: 700; }
.workspace-hero {
  padding: clamp(1.25rem, 5vw, 3rem);
  background: var(--muted-bg);
  border: 1px solid var(--border);
  border-radius: .8rem;
}
.workspace-hero .search { margin-bottom: 0; }
.home-section { margin-top: 2rem; }
.home-links, .home-categories { padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .65rem; }
.home-links a {
  display: block;
  padding: .35rem .8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2rem;
  text-decoration: none;
}
.home-links a:hover, .home-categories a:hover { text-decoration: underline; }
.home-categories { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.home-categories li { padding: 1rem; border: 1px solid var(--border); border-radius: .65rem; background: var(--surface); }
.home-categories h3, .home-categories p { margin: 0; }
.home-categories p { margin-top: .25rem; color: var(--secondary); }
@media (max-width: 600px) {
  .header-inner { min-height: 55px; }
  .brand small { display: none; }
  .brand { font-size: .85rem; }
  .controls { gap: .25rem; }
  .auth-layout { min-height: calc(100svh - 56px); }
  .search { grid-template-columns: minmax(0, 1fr) auto; }
  .search input { grid-column: 1 / -1; }
}
@media (max-width: 360px) {
  .header-inner { padding-inline: .55rem; }
  .brand { gap: .4rem; font-size: .8rem; }
  .brand img { width: 28px; height: 28px; }
  .theme, .menu summary { min-width: 31px; }
  .languages a { padding-inline: .35rem; }
}
