:root {
  --ink: #173326; --muted: #617267; --leaf-50: #f1fbf4; --leaf-100: #dcf7e3;
  --leaf-200: #bbebc9; --leaf-300: #85d89f; --leaf-400: #48bd70; --leaf-500: #219b50;
  --leaf-600: #147d3e; --leaf-700: #116433; --leaf-800: #11502b; --leaf-900: #0f4226; --earth-700: #73501e;
  --line: #d7e6dc; --danger: #a33b3b; --soft-shadow: 0 16px 38px rgba(18, 80, 43, .1);
  --paper-shadow: 0 24px 60px rgba(18, 80, 43, .14);
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  color: var(--ink); background: #f5fbf6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--ink); background: radial-gradient(circle at 8% 0%, rgba(133, 216, 159, .25), transparent 30rem), linear-gradient(180deg, #f1fbf4 0%, #fff 48%, #eef8f1 100%); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(33, 155, 80, .35); outline-offset: 3px; }
.page-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header { border-bottom: 1px solid rgba(187, 235, 201, .9); background: rgba(255, 255, 255, .76); backdrop-filter: blur(14px); }
.header-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 42px 0 28px; }
.eyebrow, .section-kicker, .strip-label { margin: 0; color: var(--leaf-600); font-size: .76rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 850px; margin: 11px 0 10px; color: var(--leaf-900); font-size: clamp(2.1rem, 5vw, 4.4rem); font-weight: 950; letter-spacing: -.065em; line-height: .98; }
.title-break { display: block; color: var(--leaf-600); }
.intro-copy { margin: 0; color: var(--muted); font-size: 1.08rem; line-height: 1.7; }
.header-actions, .review-heading, .archive-heading, .archive-tools, .dialog-heading, .footer-inner, .paper-byline, .paper-meta, .paper-source, .backup-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.header-actions { flex-shrink: 0; }
.quiet-button, .text-button, .primary-link, .primary-button, .secondary-button, .icon-button { border: 0; border-radius: 12px; font-weight: 850; text-decoration: none; transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease; }
.quiet-button, .text-button { padding: 11px 14px; background: transparent; color: var(--leaf-700); font-size: .86rem; }
.quiet-button:hover, .text-button:hover { background: var(--leaf-100); }
.primary-link, .primary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 18px; background: var(--leaf-600); color: #fff; box-shadow: 0 10px 25px rgba(20, 125, 62, .2); }
.primary-link:hover, .primary-button:hover { background: var(--leaf-700); transform: translateY(-1px); }
.secondary-button { min-height: 44px; padding: 10px 15px; border: 1px solid var(--leaf-300); background: #fff; color: var(--leaf-700); }
.secondary-button:hover { border-color: var(--leaf-500); background: var(--leaf-50); transform: translateY(-1px); }
.learning-strip { display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; padding: 20px 22px; border: 1px solid var(--leaf-200); border-radius: 18px; background: linear-gradient(120deg, rgba(241, 251, 244, .95), rgba(255, 255, 255, .9)); }
.learning-strip h2 { max-width: 490px; margin: 7px 0 0; color: var(--leaf-900); font-size: clamp(1.1rem, 2vw, 1.55rem); line-height: 1.35; }
.standard-list { display: grid; gap: 8px; align-content: center; color: var(--leaf-700); font-size: .9rem; line-height: 1.55; }
.standard-list p { margin: 0; }
.standard-list strong { color: var(--earth-700); }
.local-only-banner { display: flex; align-items: center; gap: 9px; margin: 14px 0 24px; color: var(--leaf-700); font-size: .86rem; line-height: 1.5; }
.status-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 999px; background: var(--leaf-500); box-shadow: 0 0 0 5px rgba(33, 155, 80, .12); }
.main-content { padding: 28px 0 60px; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr); gap: 22px; align-items: start; }
.panel { border: 1px solid var(--leaf-200); border-radius: 20px; background: rgba(255, 255, 255, .92); box-shadow: var(--soft-shadow); }
.writer-panel, .preview-panel, .archive-panel { padding: clamp(20px, 3vw, 30px); }
.section-heading { display: flex; align-items: flex-start; gap: 13px; }
.step-number { display: inline-grid; width: 35px; height: 35px; flex: 0 0 auto; place-items: center; border-radius: 11px; background: var(--leaf-700); color: #fff; font-size: 1.05rem; font-weight: 950; box-shadow: 0 7px 15px rgba(17, 100, 51, .18); }
.section-heading h2, .review-heading h2, .archive-heading h2, .dialog-heading h2 { margin: 3px 0 6px; color: var(--leaf-900); font-size: clamp(1.35rem, 2.4vw, 1.85rem); font-weight: 950; letter-spacing: -.04em; }
.section-heading p:not(.section-kicker), .review-help, .archive-heading p:not(.section-kicker) { margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.65; }
.preview-heading { flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid var(--leaf-100); }
.preview-heading > div { flex: 1 1 260px; }
.preview-heading .primary-button { flex: 0 1 auto; }
.field-group, .form-fields { margin-top: 25px; }
.field-group { padding: 0; border: 0; }
.field-group legend, .field-label > span, .picker-label { color: var(--leaf-900); font-size: .96rem; font-weight: 900; }
.field-label > span { display: block; }
.field-label b { color: var(--danger); }
.field-label small, .picker-label { display: block; margin-top: 6px; color: var(--muted); font-size: .78rem; font-weight: 650; line-height: 1.5; }
.theme-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 11px; }
.theme-option { position: relative; display: block; min-height: 104px; padding: 14px; border: 2px solid var(--leaf-100); border-radius: 15px; background: #fff; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease; }
.theme-option:hover { border-color: var(--leaf-300); transform: translateY(-1px); }
.theme-option:has(input:checked) { border-color: var(--leaf-500); background: var(--leaf-50); box-shadow: 0 10px 24px rgba(33, 155, 80, .12); }
.theme-option input { position: absolute; opacity: 0; }
.theme-option-title { display: block; color: var(--leaf-900); font-size: .98rem; font-weight: 900; line-height: 1.35; }
.theme-option-prompt { display: block; margin-top: 7px; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.form-fields { display: grid; gap: 17px; }
.field-label { position: relative; display: block; }
.field-label input, .field-label textarea { width: 100%; margin-top: 8px; border: 2px solid var(--leaf-200); border-radius: 12px; background: #fff; color: var(--ink); font-size: 1rem; line-height: 1.55; transition: border-color .18s ease, box-shadow .18s ease; }
.field-label input { min-height: 48px; padding: 11px 13px; }
.field-label textarea { min-height: 94px; padding: 11px 13px; resize: vertical; }
.field-label input::placeholder, .field-label textarea::placeholder { color: #93a29a; }
.field-label input:focus, .field-label textarea:focus { border-color: var(--leaf-500); box-shadow: 0 0 0 4px rgba(33, 155, 80, .1); outline: 0; }
.structured-field > span em { display: inline-block; margin-right: 4px; padding: 2px 7px; border-radius: 6px; background: var(--leaf-100); color: var(--leaf-700); font-size: .76rem; font-style: normal; }
.character-count { position: absolute; right: 11px; bottom: 9px; color: var(--muted); font-size: .72rem; font-weight: 750; }
.image-fields { display: grid; gap: 15px; padding: 16px; border: 1px solid var(--leaf-200); border-radius: 15px; background: var(--leaf-50); }
.preset-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.preset-button { min-height: 42px; padding: 8px 10px; border: 1px solid var(--leaf-200); border-radius: 10px; background: #fff; color: var(--leaf-800); font-size: .8rem; font-weight: 850; text-align: left; }
.preset-button:hover, .preset-button.is-selected { border-color: var(--leaf-500); background: var(--leaf-100); }
.review-panel { margin-top: 24px; padding: 18px; border: 1px solid #d8e9dc; border-radius: 16px; background: linear-gradient(135deg, #f8fcf8, #eef8f1); }
.review-panel.is-complete { border-color: var(--leaf-400); background: #e8f8ed; }
.review-heading h2 { font-size: 1.3rem; }
.step-status, .count-badge { padding: 7px 10px; border-radius: 999px; background: #fff; color: var(--leaf-700); font-size: .76rem; font-weight: 900; white-space: nowrap; }
.check-list { display: grid; gap: 8px; margin: 14px 0 16px; }
.check-row { display: flex; align-items: flex-start; gap: 9px; color: var(--leaf-900); font-size: .88rem; font-weight: 750; line-height: 1.5; }
.check-row input { width: 19px; height: 19px; flex: 0 0 auto; margin: 0; accent-color: var(--leaf-600); }
.gi-pulse { animation: gi-pulse 2.2s ease-in-out infinite; }
@keyframes gi-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(33, 155, 80, .38), 0 10px 25px rgba(20, 125, 62, .18); } 50% { box-shadow: 0 0 0 9px rgba(33, 155, 80, 0), 0 10px 25px rgba(20, 125, 62, .18); } }
.news-paper { margin-top: 24px; overflow: hidden; border: 1px solid #cbd8ce; border-radius: 15px; background: linear-gradient(rgba(255, 255, 255, .88), rgba(255, 255, 255, .94)), repeating-linear-gradient(0deg, rgba(17, 80, 43, .045) 0 1px, transparent 1px 7px); box-shadow: var(--paper-shadow); }
.paper-header { padding: 18px 20px 15px; border-bottom: 4px solid var(--leaf-900); text-align: center; }
.paper-date { margin: 0; color: var(--leaf-700); font-size: .68rem; font-weight: 800; letter-spacing: .18em; }
.paper-name { margin: 4px 0 0; color: var(--leaf-900); font-family: Georgia, "Apple SD Gothic Neo", serif; font-size: clamp(2rem, 5vw, 3rem); font-weight: 950; letter-spacing: .04em; line-height: 1; }
.paper-subtitle { margin: 8px 0 0; color: var(--leaf-800); font-size: .75rem; font-weight: 850; }
.paper-content { padding: 20px; }
.paper-meta { justify-content: flex-start; flex-wrap: wrap; color: var(--leaf-700); font-size: .78rem; font-weight: 800; }
.topic-badge { padding: 5px 10px; border-radius: 999px; color: #fff; font-size: .76rem; font-weight: 900; }
.tag-green { background: #116433; } .tag-cyan { background: #0e7490; } .tag-blue { background: #1e3a8a; } .tag-amber { background: #b45309; }
.paper-headline { margin: 16px 0 13px; color: var(--leaf-900); font-family: Georgia, "Apple SD Gothic Neo", serif; font-size: clamp(2rem, 5vw, 3.35rem); font-weight: 950; letter-spacing: -.065em; line-height: .98; }
.paper-byline { padding: 8px 0; border-top: 1px solid #cbd8ce; border-bottom: 1px solid #cbd8ce; color: var(--leaf-800); font-size: .75rem; font-weight: 850; }
.paper-main-grid { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 17px; margin-top: 18px; }
.paper-figure { align-self: start; margin: 0; overflow: hidden; border: 1px solid #cbd8ce; border-radius: 10px; background: var(--leaf-50); }
.paper-figure img { display: block; width: 100%; height: 220px; object-fit: cover; }
.paper-figure figcaption { padding: 9px 10px; border-top: 1px solid #cbd8ce; background: #fff; color: var(--leaf-700); font-size: .7rem; font-weight: 750; line-height: 1.45; }
.preview-story { display: grid; gap: 11px; }
.preview-block { padding-bottom: 10px; border-bottom: 1px dashed #cbd8ce; }
.preview-block:last-child { padding-bottom: 0; border-bottom: 0; }
.preview-block span { color: var(--leaf-700); font-size: .7rem; font-weight: 950; }
.preview-block p { margin: 4px 0 0; color: var(--ink); font-size: .87rem; line-height: 1.6; white-space: pre-wrap; }
.paper-source { align-items: flex-start; margin: 18px 0 0; padding-top: 12px; border-top: 1px solid #cbd8ce; color: var(--muted); font-size: .73rem; line-height: 1.5; }
.paper-source strong { flex: 0 0 auto; color: var(--leaf-700); }
.form-message { min-height: 25px; margin: 14px 0 0; padding: 9px 11px; border-radius: 10px; font-size: .88rem; font-weight: 850; line-height: 1.5; }
.form-message:empty { padding: 0; }
.message-success { background: var(--leaf-50); color: var(--leaf-800); } .message-warn { background: #fff7e5; color: #805a1a; } .message-error { background: #fff0f0; color: var(--danger); }
.archive-panel { margin-top: 22px; }
.archive-heading { align-items: flex-end; padding-bottom: 20px; border-bottom: 1px solid var(--leaf-100); }
.archive-heading .section-heading { flex: 1; }
.count-badge { background: var(--leaf-50); font-size: .86rem; }
.archive-tools { align-items: flex-start; margin-top: 17px; padding: 14px 16px; border: 1px solid var(--leaf-100); border-radius: 14px; background: #fbfefb; }
.storage-status, .storage-note { margin: 0; color: var(--leaf-700); font-size: .82rem; font-weight: 800; line-height: 1.5; }
.storage-note { margin-top: 4px; color: var(--muted); font-size: .75rem; font-weight: 650; }
.storage-error { color: var(--danger); } .storage-migrated { color: var(--earth-700); }
.backup-actions { flex: 0 0 auto; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.empty-board { margin-top: 20px; padding: 34px 20px; border: 2px dashed var(--leaf-200); border-radius: 15px; background: var(--leaf-50); text-align: center; }
.empty-icon { display: block; color: var(--leaf-500); font-size: 2rem; }
.empty-board h3 { margin: 10px 0 6px; color: var(--leaf-900); font-size: 1.2rem; }
.empty-board p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.board-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.archive-card { overflow: hidden; border: 1px solid var(--leaf-200); border-radius: 15px; background: #fff; }
.archive-card > img { display: block; width: 100%; height: 160px; object-fit: cover; }
.archive-card-body { padding: 15px; }
.archive-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .7rem; font-weight: 800; }
.archive-card h3 { margin: 10px 0 5px; color: var(--leaf-900); font-size: 1.18rem; line-height: 1.25; }
.archive-reporter { margin: 0; color: var(--leaf-700); font-size: .76rem; font-weight: 850; }
.archive-details { display: grid; gap: 9px; margin: 14px 0 0; }
.archive-detail { margin: 0; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--ink); font-size: .78rem; line-height: 1.55; white-space: pre-wrap; }
.archive-detail strong { display: block; margin-bottom: 2px; color: var(--leaf-700); font-size: .7rem; }
.archive-source { margin: 12px 0 0; padding: 9px; border-radius: 9px; background: var(--leaf-50); color: var(--muted); font-size: .72rem; line-height: 1.45; }
.archive-source strong { color: var(--leaf-700); }
.delete-button { width: 100%; min-height: 40px; margin-top: 14px; padding: 8px 12px; border: 1px solid #edcaca; border-radius: 10px; background: #fff6f6; color: var(--danger); font-size: .78rem; font-weight: 850; }
.delete-button:hover { background: #ffe9e9; }
.site-footer { border-top: 1px solid var(--leaf-200); background: rgba(255, 255, 255, .75); }
.footer-inner { min-height: 70px; color: var(--muted); font-size: .78rem; }
.footer-inner p { margin: 0; }
.updates-dialog { width: min(520px, calc(100% - 30px)); padding: 0; border: 0; border-radius: 18px; background: transparent; color: var(--ink); }
.updates-dialog::backdrop { background: rgba(15, 66, 38, .35); backdrop-filter: blur(3px); }
.dialog-card { padding: 24px; border: 1px solid var(--leaf-200); border-radius: 18px; background: #fff; box-shadow: var(--paper-shadow); }
.dialog-heading { align-items: flex-start; padding-bottom: 16px; border-bottom: 1px solid var(--leaf-100); }
.icon-button { width: 38px; height: 38px; background: var(--leaf-50); color: var(--leaf-700); font-size: 1.7rem; line-height: 1; }
.icon-button:hover { background: var(--leaf-100); }
.update-list { display: grid; gap: 17px; margin: 18px 0 0; padding-left: 20px; }
.update-list li { padding-left: 4px; color: var(--muted); font-size: .88rem; line-height: 1.6; }
.update-list time { display: block; margin-bottom: 3px; color: var(--leaf-700); font-size: .74rem; font-weight: 900; }

@media (max-width: 980px) {
  .workspace-grid { grid-template-columns: 1fr; }
  .preview-panel { order: -1; }
  .board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .page-shell { width: min(100% - 24px, 1180px); }
  .header-top, .learning-strip, .archive-tools, .archive-heading { display: block; }
  .header-top { padding-top: 28px; }
  .header-actions { justify-content: flex-start; margin-top: 22px; }
  .learning-strip { padding: 17px; }
  .standard-list { margin-top: 15px; }
  .local-only-banner { align-items: flex-start; }
  .theme-list, .paper-main-grid, .board-grid { grid-template-columns: 1fr; }
  .preview-heading .primary-button { width: 100%; margin-top: 5px; }
  .paper-figure img { height: 190px; }
  .archive-tools .backup-actions { justify-content: flex-start; margin-top: 14px; }
  .backup-actions .secondary-button { flex: 1 1 140px; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
