@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+KR:wght@400;500;600;700;800;900&display=swap');

:root {
  color-scheme: light;
  font-family: "Shin Go", "A-OTF Shin Go Pro", "A-OTF Shin Go Pr6N", "Shin Gothic", "신고딕", "DM Sans", "Noto Sans KR", system-ui, sans-serif;
  color: #161616;
  background: #fdfcf9;
  --paper: #fff;
  --border: #e8e5de;
  --muted: #67615a;
  --gold: #a47d32;
  --gold-ink: #76551e;
  --gold-soft: #f7efd9;
  --gold-highlight: #ead9ad;
  --sand: #f7f4ed;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { width: min(100% - 32px, 1520px); margin: clamp(22px, 4vh, 40px) auto; }
header { margin-bottom: 24px; }
header a { color: var(--gold-ink); text-underline-offset: 4px; font-size: .875rem; }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); letter-spacing: -.045em; margin: 10px 0 0; }
h2 { margin: 0; font-size: 1.1rem; }
button, input, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
button:focus-visible, summary:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px;
}
.workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.calendar, .records, details, .empty { background: var(--paper); border: 1px solid var(--border); border-radius: 14px; }
.calendar { overflow: hidden; }
.toolbar { display: flex; align-items: center; gap: 6px; padding: 12px; }
.toolbar h2 { margin-right: auto; }
.toolbar button { min-width: 36px; min-height: 36px; background: transparent; border: 1px solid var(--border); border-radius: 8px; }
.toolbar button:not(#today) { font-size: 1.25rem; }
#today { padding: 0 10px; }
.week, .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.week, .legend, footer, .entry-time { color: var(--muted); font-size: .78rem; }
.week { text-align: center; border-block: 1px solid var(--border); padding: 7px 0; }
.days { background: var(--border); gap: 1px; }
.days > span { background: var(--sand); }
.days button { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; min-height: clamp(76px, 11vh, 112px); padding: 8px; border: 0; background: var(--paper); text-align: left; }
.day-number { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: .85rem; }
.days button[aria-current] .day-number { color: #161616; background: var(--gold-highlight); }
.days button:hover, .toolbar button:hover { background: var(--sand); }
.days button[aria-pressed="true"] { background: var(--gold-soft); box-shadow: inset 0 0 0 2px var(--gold); }
.day-preview { display: flex; gap: 3px; width: 100%; align-items: center; border-radius: 5px; padding: 3px 4px; background: var(--gold-highlight); color: #3c2b12; font-size: .74rem; font-weight: 600; white-space: nowrap; }
.day-title { overflow: hidden; text-overflow: ellipsis; }
.day-count { display: none; }
.legend { margin: 0; padding: 9px 12px; border-top: 1px solid var(--border); }
.legend span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 3px; background: var(--gold); }
.records { padding: 16px; }
@media (max-width: 540px) {
  .days button { min-height: 52px; align-items: center; padding: 4px 0; }
  .day-preview { display: none; }
  .day-count { display: inline-block; min-width: 16px; text-align: center; border-radius: 6px; background: var(--gold-highlight); font-size: .68rem; }
}
#entries { display: grid; gap: 8px; margin-top: 9px; }
.empty { padding: 16px; color: var(--muted); margin: 0; }
summary { cursor: pointer; padding: 14px 16px; }
summary strong { overflow-wrap: anywhere; }
.entry-meta { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 8px 3px 4px; }
.entry-step { padding: 3px 8px; border-radius: 6px; color: var(--gold-ink); background: var(--gold-soft); font-size: .78rem; font-weight: 700; }
.entry-time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.entry-kind { display: inline-block; margin-left: 8px; color: var(--gold-ink); font-size: .75rem; white-space: nowrap; }
.entry-body { padding: 0 16px 16px; }
h3 { font-size: .85rem; margin-bottom: 5px; }
.learning-point { border-left: 2px solid var(--gold); padding-left: 10px; }
.prompt-text, .description-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 14px; line-height: 1.6; }
.prompt-text { background: var(--sand); border-radius: 8px; padding: 12px; }
form label { display: block; margin-bottom: 10px; }
input, textarea { display: block; width: 100%; margin-top: 4px; border: 1px solid var(--border); border-radius: 6px; padding: 8px; background: white; }
textarea { resize: vertical; }
.edit, .actions button { background: var(--paper); border: 1px solid var(--border); border-radius: 6px; padding: 7px 12px; }
.actions button[type="submit"] { background: var(--gold-ink); color: white; border-color: var(--gold-ink); margin-right: 6px; }
#status { font-size: .85rem; color: var(--gold-ink); }
footer { margin-top: 22px; line-height: 1.55; }
