@charset "UTF-8";
:root {
  --paper: #f1efe6;
  --surface: #fffdf8;
  --lime: #daf17e;
  --surface-soft: #f4f4ec;
  --ink: #303329;
  --muted: #626858;
  --subtle: #747b68;
  --line: #dedfd1;
  --line-strong: #cfd2c0;
  --accent: #5b7045;
  --accent-hover: #4d613a;
  --pale: #e9eed9;
  --green: #52744c;
  --red: #a45b4e;
  --amber: #8e733e;
  --radius: 10px;
  --mono: Consolas, "SFMono-Regular", "Malgun Gothic", monospace;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; background: none; border: 0; }
button:disabled { cursor: wait; opacity: .5; }
a { color: var(--accent); text-underline-offset: 3px; }
button, a, input, textarea, select, summary { outline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); }
input, textarea, select { border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); }
input, select { min-height: 36px; padding: 8px 11px; }
textarea { padding: 11px 13px; line-height: 1.8; }
input::placeholder, textarea::placeholder { color: var(--subtle); }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
input[type="checkbox"], input[type="radio"] { min-height: 0; accent-color: var(--accent); }
h1, h2, h3, h4, p { margin-top: 0; }
svg.icon { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: fixed; top: -70px; left: 16px; z-index: 100; background: var(--surface); padding: 10px; }
.skip:focus { top: 10px; }
.app-header { min-height: 68px; padding: 0 max(32px, calc((100vw - 1120px) / 2)); display: flex; align-items: center; gap: 52px; border-bottom: 1px solid var(--line); background: #f8f6ee; }
.brand { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; padding: 0; color: var(--ink); text-decoration: none; font-size: 21px; font-weight: 750; letter-spacing: -.85px; }
.brand-mark { width: 29px; height: 31px; display: grid; place-items: center; background: var(--lime); border: 1px solid #d0e575; border-radius: 8px; color: #262b20; }
.brand-mark svg { width: 18px; height: 21px; fill: currentColor; }
.session-logout { flex: 0 0 auto; margin-left: auto; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); font-size: 11px; white-space: nowrap; }
.main-tabs { display: flex; align-items: center; gap: 5px; }
.main-tabs button, .main-tabs a { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 13px; border-radius: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; color: var(--muted); text-decoration: none; }
.main-tabs .icon { width: 15px; height: 15px; }
.main-tabs button:hover, .main-tabs a:hover { background: var(--surface-soft); color: var(--ink); }
.main-tabs .active { color: var(--ink); background: #e7ead9; }
#save-status { margin-left: auto; font-size: 11px; color: var(--muted); text-align: right; max-width: 210px; line-height: 1.5; }
#save-status:empty { display: none; }
#save-status.error { color: var(--red); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 8px 13px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); font-size: 12px; font-weight: 500; line-height: 1.5; text-decoration: none; color: var(--ink); white-space: nowrap; transition: background .15s, border-color .15s; }
.button:hover { background: var(--surface-soft); border-color: #bcc3aa; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #f8f6ee; box-shadow: inset 0 1px 0 #ffffff14, 0 1px 2px #303b2412; }
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button.small { min-height: 30px; font-size: 11px; padding: 5px 10px; }
.button.selected { color: var(--accent); background: var(--pale); border-color: #d0daba; }
.button.danger { color: var(--red); border-color: #dfc9bc; }
.button .icon { width: 15px; height: 15px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 5px; padding: 4px 7px; background: #eeede1; color: #7e8371; font-size: 10px; font-weight: 500; line-height: 1.5; white-space: nowrap; }
.badge::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.badge.correct, .badge.completed { background: #e8efdd; color: var(--green); }
.badge.review, .badge.in_progress { background: #f4edd8; color: var(--amber); }
.badge.incorrect, .badge.blank { background: #f4e7de; color: var(--red); }
.back { padding: 0; margin-bottom: 23px; font-size: 12px; color: var(--muted); }
.back:hover { color: var(--ink); }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 1.8; margin: 18px 0; }
.checkbox-label input { width: 15px; height: 15px; margin: 0; }
.errors, .editor-error { color: var(--red); font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; white-space: pre-wrap; }
.errors { padding: 15px; border: 1px solid #e5d1c2; background: #f6ece2; border-radius: 8px; margin-bottom: 20px; }
dialog { width: min(800px, 94vw); max-height: 88vh; border: 1px solid var(--line); padding: 26px; border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 18px 80px #323b2524; }
dialog::backdrop { background: #303a2860; backdrop-filter: blur(2px); }
dialog h2 { font-size: 20px; font-weight: 600; letter-spacing: -.6px; margin-bottom: 18px; }
dialog p { color: var(--muted); font-size: 12px; line-height: 1.8; }
dialog .actions { justify-content: flex-end; margin-top: 22px; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); font-size: 12px; }
@media(max-width:760px) {
  .app-header { padding: 17px 20px 12px; gap: 0; flex-wrap: wrap; }
  .brand { font-size: 20px; }
  .main-tabs { width: 100%; order: 3; margin-top: 16px; gap: 4px; }
  .main-tabs button, .main-tabs a { flex: 1; padding: 9px 12px; font-size: 12px; }
  #save-status { font-size: 10px; max-width: 140px; }
  dialog { padding: 22px; }
}
.code-panel.code-syntax { background: #fff; border-color: #ccd1c7; }
.code-syntax .code-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: #283524; background: #fff; border-bottom-color: #d7ddd1; }
.code-syntax .code-language { flex-shrink: 0; font-size: 10px; font-family: var(--mono); color: #283524; }
.code-panel.code-syntax pre { color: #171717; font-size: 13px; font-weight: 500; line-height: 1.85; tab-size: 4; white-space: pre-wrap; overflow-wrap: anywhere; }
.code-panel.code-syntax code { white-space: pre-wrap; }
.code-syntax .syntax-comment { color: #006b16; }
.code-syntax .syntax-keyword, .code-syntax .syntax-directive { color: #8000a8; font-weight: 600; }
.code-syntax .syntax-type { color: #0033c4; }
.code-syntax .syntax-function { color: #0054a6; font-weight: 600; }
.code-syntax .syntax-string { color: #a31515; }
.code-syntax .syntax-number { color: #9a3d00; }
.code-syntax .syntax-constant { color: #6419a8; }
.code-syntax .syntax-variable { color: #7500a1; }
.code-syntax .syntax-operator { color: #9b1547; }
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
