:root {
  --canvas: #f8f6f1;
  --ink: #21362f;
  --jade: #3e786a;
  --jade-dark: #285e51;
  --apricot: #e9a077;
  --muted: #69716b;
  --line: #e1e2db;
  --white: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.shell { min-height: 100vh; display: grid; grid-template-columns: 242px minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; padding: 31px 20px; background: #eff1e9; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; font-size: 22px; font-weight: 800; line-height: 1.05; letter-spacing: -.04em; }
.brand small { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .1em; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border: 2px solid var(--apricot); border-radius: 12px 12px 12px 4px; color: var(--jade); }
nav { display: grid; gap: 6px; margin-top: 57px; }
.nav-item { width: 100%; border: 0; border-radius: 12px; background: transparent; color: var(--muted); padding: 12px 14px; text-align: left; font-weight: 650; }
.nav-item:hover, .nav-item.active { background: var(--white); color: var(--ink); }
.nav-item span { float: right; color: var(--jade); }
.sidebar-note { margin-top: auto; padding: 24px 14px; line-height: 1.65; font-size: 14px; color: var(--muted); }
.quiet-button { align-self: start; padding: 8px 14px; border: 0; background: transparent; color: var(--muted); }
.main { padding: 36px clamp(22px, 4vw, 66px) 70px; min-width: 0; }
.eyebrow { margin: 0 0 10px; color: var(--jade); font-size: 11px; font-weight: 800; letter-spacing: .17em; }
h1 { margin: 0; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.045em; }
h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.intro { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.login-panel { max-width: 430px; margin: min(15vh, 130px) auto; padding: 34px; background: var(--white); border: 1px solid var(--line); border-radius: 22px; }
form label { display: grid; gap: 8px; margin-top: 21px; font-size: 13px; font-weight: 700; }
input, textarea { width: 100%; min-height: 45px; border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; background: var(--white); color: var(--ink); outline-color: var(--jade); }
textarea { resize: vertical; }
.primary-button, .outline-button { min-height: 43px; padding: 10px 17px; border-radius: 11px; font-size: 13px; font-weight: 750; }
.primary-button { border: 1px solid var(--jade); background: var(--jade); color: white; }
.primary-button:hover { background: var(--jade-dark); }
.outline-button { border: 1px solid var(--line); background: white; color: var(--ink); }
.outline-button:hover { border-color: var(--jade); }
#login-form .primary-button { width: 100%; margin-top: 23px; }
.feedback { min-height: 22px; color: #a34339; font-size: 13px; }
.topbar { display: flex; justify-content: space-between; align-items: start; gap: 24px; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.operator { color: var(--muted); font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 31px; }
.stat { padding: 21px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; }
.stat strong { display: block; font-size: 28px; line-height: 1; }
.stat span { display: block; margin-top: 12px; color: var(--muted); font-size: 13px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 29px 0 13px; }
.term-form { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; }
.term-form input { max-width: 300px; }
.search-label { width: min(100%, 390px); }
.result-count { color: var(--muted); font-size: 13px; }
.content { display: grid; gap: 10px; }
.record { display: grid; gap: 14px; padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: 15px; }
.record-top, .record-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.record-top time { margin-left: auto; color: var(--muted); font-size: 12px; }
.record h3 { margin: 0; font-size: 17px; }
.record p { margin: 0; line-height: 1.55; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.record small { color: var(--muted); overflow-wrap: anywhere; }
.pill { display: inline-block; border-radius: 100px; padding: 5px 9px; background: #eaf0eb; color: var(--jade-dark); font-size: 11px; font-weight: 750; }
.pill.open, .pill.hidden { background: #fce9df; color: #9a5130; }
.record-actions { justify-content: flex-end; }
.record-actions button { padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); font-size: 12px; font-weight: 700; }
.record-actions button:hover { border-color: var(--jade); }
.empty { padding: 40px; border: 1px dashed var(--line); border-radius: 15px; text-align: center; color: var(--muted); }
dialog { width: min(440px, calc(100vw - 30px)); border: 1px solid var(--line); border-radius: 18px; padding: 25px; box-shadow: 0 20px 70px #1f362f22; }
dialog::backdrop { background: #1c302d88; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { padding: 16px; }
  .sidebar nav { display: flex; overflow-x: auto; margin-top: 19px; }
  .nav-item { white-space: nowrap; width: auto; }
  .sidebar-note { display: none; }
  .main { padding: 25px 17px 50px; }
  .topbar { display: block; }
  .topbar-actions { margin-top: 20px; }
  .stats { grid-template-columns: 1fr 1fr; }
}
.share-page { max-width: 680px; margin: 0 auto; padding: 28px 20px 60px; }
.share-card { margin-top: 55px; padding: clamp(24px, 5vw, 42px); background: white; border: 1px solid var(--line); border-radius: 24px; }
.share-card h1 { font-size: clamp(26px, 5vw, 38px); }
.share-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 9px; margin: 28px 0 18px; }
.share-choice, .share-choices > div { padding: 20px; border: 1px solid var(--line); border-radius: 13px; font-weight: 700; text-align: center; }
.share-open { display: block; margin-top: 20px; text-align: center; text-decoration: none; }
.share-footnote { margin-top: 20px; color: var(--muted); font-size: 12px; text-align: center; }
