:root {
  color-scheme: light;
  --paper: #f3efe4;
  --ink: #24241f;
  --muted: #6b695e;
  --line: #cbc5b6;
  --red: #e54f3f;
  --blue: #274f76;
  --cream: #fffdf7;
  --yellow: #f2ca52;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background-color: var(--paper); background-image: linear-gradient(rgba(39,79,118,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(39,79,118,.07) 1px, transparent 1px); background-size: 24px 24px; }
button, input, textarea { font: inherit; }
button { color: inherit; }

.topbar { min-height: 86px; padding: 17px clamp(20px, 4vw, 64px); display: flex; align-items: center; gap: 14px; border-bottom: 2px solid var(--ink); background: rgba(243,239,228,.95); }
.brand-mark { width: 48px; height: 48px; display: flex; align-items: end; gap: 4px; padding: 8px; border: 2px solid var(--ink); border-radius: 50%; transform: rotate(-4deg); }
.brand-mark span { width: 8px; background: var(--red); border: 1px solid var(--ink); border-radius: 7px; }
.brand-mark span:nth-child(1) { height: 14px; }.brand-mark span:nth-child(2) { height: 27px; background: var(--yellow); }.brand-mark span:nth-child(3) { height: 20px; background: var(--blue); }
.eyebrow, .step-label { margin: 0 0 3px; color: var(--red); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 24px; }
.privacy-pill { margin-left: auto; padding: 7px 11px; border: 1px solid var(--ink); background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); font-size: 11px; font-weight: 800; transform: rotate(1deg); }
main { width: min(1380px, calc(100% - 32px)); margin: auto; padding-bottom: 48px; }
.intro { display: grid; grid-template-columns: 1.35fr .65fr; align-items: end; gap: 40px; padding: clamp(38px, 7vw, 86px) clamp(0px, 4vw, 48px) 42px; }
.kicker { margin: 0 0 13px; color: var(--blue); font-weight: 800; }
.intro h2 { margin: 0; max-width: 840px; font-family: Georgia, "Songti SC", serif; font-size: clamp(36px, 5vw, 70px); font-weight: 500; line-height: 1.04; letter-spacing: -.035em; }
.intro h2 em { color: var(--red); font-style: italic; }
.intro-copy { margin: 0; padding: 22px 0 4px 22px; border-left: 5px solid var(--yellow); color: var(--muted); font-family: system-ui, sans-serif; line-height: 1.75; }
.workspace { display: grid; grid-template-columns: minmax(330px, .82fr) minmax(500px, 1.18fr); border: 2px solid var(--ink); background: var(--cream); box-shadow: 10px 10px 0 rgba(36,36,31,.16); }
.entry-panel, .log-panel { padding: clamp(22px, 3.2vw, 46px); }
.entry-panel { border-right: 2px solid var(--ink); background: #fffaf0; }
.panel-heading, .log-toolbar { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
h3 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 27px; }
.text-button { padding: 3px; border: 0; border-bottom: 1px solid; background: transparent; cursor: pointer; font-size: 12px; }
.two-col { display: grid; grid-template-columns: 1.2fr .8fr; gap: 12px; }
.field { position: relative; display: grid; gap: 8px; margin-bottom: 20px; font-size: 12px; font-weight: 800; }
input, textarea { width: 100%; padding: 12px 13px; border: 1.5px solid var(--ink); border-radius: 0; outline: none; background: white; }
input:focus, textarea:focus { box-shadow: 4px 4px 0 var(--yellow); }
textarea { resize: vertical; min-height: 82px; line-height: 1.5; }
.number-wrap { position: relative; }.number-wrap span { position: absolute; right: 12px; top: 13px; color: var(--muted); }.number-wrap input { padding-right: 40px; }
fieldset { margin: 0 0 22px; padding: 0; border: 0; }
legend { width: 100%; margin-bottom: 10px; font-size: 12px; font-weight: 800; }
legend span { float: right; color: var(--muted); font-size: 10px; font-weight: 500; }
.shape-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.shape-option input, .color-option input, .attention-option input { position: absolute; opacity: 0; pointer-events: none; }
.shape-option span { min-height: 72px; padding: 9px 4px; display: grid; place-items: center; gap: 5px; border: 1px solid var(--line); background: white; cursor: pointer; text-align: center; font-size: 10px; }
.shape-option b { font-family: Georgia, serif; font-size: 23px; line-height: 1; }
.shape-option input:checked + span { color: white; border-color: var(--blue); background: var(--blue); box-shadow: 3px 3px 0 var(--yellow); }
.color-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.color-option span { display: flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid var(--line); background: white; cursor: pointer; font-size: 10px; }
.color-dot { width: 13px; height: 13px; border: 1px solid rgba(0,0,0,.35); border-radius: 50%; }
.color-option input:checked + span { outline: 2px solid var(--ink); outline-offset: 1px; }
.attention-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.attention-option span { display: block; padding: 7px 9px; border: 1px dashed var(--line); background: white; cursor: pointer; font-size: 10px; }
.attention-option input:checked + span { border-style: solid; border-color: var(--red); color: #8a241b; background: #ffe3dc; }
.custom-note { margin: 11px 0 0; color: var(--muted); }.custom-note input { padding: 9px 11px; }
.char-count { position: absolute; right: 8px; bottom: 7px; color: var(--muted); padding: 2px 4px; background: rgba(255,255,255,.9); font-size: 9px; }
.form-error { min-height: 18px; margin: -8px 0 8px; color: #a22117; font-family: system-ui, sans-serif; font-size: 12px; }
.save-button { width: 100%; padding: 15px; display: flex; justify-content: space-between; border: 2px solid var(--ink); background: var(--yellow); box-shadow: 5px 5px 0 var(--ink); cursor: pointer; font-weight: 900; transition: transform .15s, box-shadow .15s; }
.save-button:hover { transform: translate(2px,2px); box-shadow: 3px 3px 0 var(--ink); }
.window-controls { display: flex; border: 1px solid var(--ink); }
.window-controls button { padding: 8px 11px; border: 0; border-right: 1px solid var(--ink); background: white; cursor: pointer; font-size: 11px; }.window-controls button:last-child { border-right: 0; }
.date-strip { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: -8px 0 18px; padding: 10px 0; border-block: 1px dashed var(--line); }
.date-strip p { margin: 0; color: var(--blue); font-size: 12px; font-weight: 900; }
.date-strip label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }.date-strip input { width: 142px; padding: 6px; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 18px; }
.stat { padding: 13px; border: 1px solid var(--line); background: var(--paper); }
.stat b { display: block; font-family: Georgia, serif; font-size: 24px; }.stat span { color: var(--muted); font-size: 10px; }
.day-list { display: grid; gap: 9px; }
.day-card { display: grid; grid-template-columns: 70px 1fr auto; gap: 14px; align-items: center; min-height: 96px; padding: 14px; border: 1px solid var(--line); background: white; position: relative; }
.day-card.today { outline: 2px solid var(--blue); outline-offset: -2px; }.day-card.flagged { border-left: 7px solid var(--red); }
.day-date { text-align: center; }.day-date b { display: block; font-family: Georgia, serif; font-size: 30px; line-height: 1; }.day-date span { color: var(--muted); font-size: 10px; }
.day-main { min-width: 0; }.day-main h4 { margin: 0 0 5px; font-family: Georgia, "Songti SC", serif; font-size: 16px; }.day-main p { margin: 0; overflow-wrap: anywhere; color: var(--muted); font-family: system-ui, sans-serif; font-size: 11px; line-height: 1.5; }
.tokens { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }.token { padding: 3px 6px; color: #87261e; background: #ffe3dc; font-size: 9px; font-weight: 700; }
.day-actions { display: flex; flex-direction: column; gap: 5px; }.day-actions button { padding: 5px 7px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 9px; }.day-actions .delete { color: #a22117; }
.missing { background: repeating-linear-gradient(-45deg, #faf8f0, #faf8f0 8px, #f0ecdf 8px, #f0ecdf 9px); }.missing .day-main h4 { color: var(--muted); font-weight: 500; }.add-day { padding: 7px 9px; border: 1px solid var(--blue); color: var(--blue); background: white; cursor: pointer; font-size: 9px; }
.notice { max-width: 1000px; margin: 34px auto 0; display: flex; gap: 16px; align-items: start; font-family: system-ui, sans-serif; color: var(--muted); font-size: 12px; line-height: 1.65; }.notice > span { flex: 0 0 30px; height: 30px; display: grid; place-items: center; border: 2px solid var(--red); border-radius: 50%; color: var(--red); font-weight: 900; }.notice p { margin: 3px 0 0; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 5; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 11px 16px; color: white; background: var(--ink); box-shadow: 4px 4px 0 var(--red); font-size: 11px; transition: .25s; }.toast.show { opacity: 1; transform: translate(-50%,0); }

@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; gap: 22px; }.intro-copy { max-width: 680px; }
  .workspace { grid-template-columns: 1fr; }.entry-panel { border-right: 0; border-bottom: 2px solid var(--ink); }
}
@media (max-width: 560px) {
  main { width: min(100% - 18px, 1380px); }.topbar { padding-inline: 12px; }.privacy-pill { font-size: 9px; }.intro { padding: 36px 7px 28px; }.intro h2 { font-size: 38px; }
  .entry-panel, .log-panel { padding: 20px 14px; }.shape-grid { grid-template-columns: repeat(2,1fr); }.log-toolbar { display: block; }.window-controls { margin-top: 14px; width: max-content; }
  .date-strip { align-items: start; flex-direction: column; }.summary { grid-template-columns: repeat(3,1fr); }.stat { padding: 9px; }.stat b { font-size: 19px; }
  .day-card { grid-template-columns: 48px 1fr; gap: 10px; }.day-actions { grid-column: 2; flex-direction: row; }.day-date b { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
