:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: #123c37;
  background: #f5f6f2;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #cba36b; outline-offset: 2px; }
button:disabled { opacity: .45; cursor: default; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; width: 20px; height: 20px; }
.app-shell { min-height: 100vh; }
.topbar { background: #082f2c; min-height: 84px; display: flex; justify-content: space-between; align-items: center; padding: 15px clamp(18px, 4vw, 64px); gap: 16px; color: #fff; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-seal { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #bda071; border-radius: 50%; color: #dcc18b; font-family: Georgia, serif; font-size: 15px; letter-spacing: -.05em; }
.brand-title { display: grid; gap: 3px; }
.brand-title strong { font-family: Georgia, 'Times New Roman', serif; font-size: 19px; font-weight: normal; letter-spacing: .04em; }
.brand-title strong span { color: #d4b47c; }
.brand-title small { color: #a1bcb2; font-size: 9px; letter-spacing: .21em; font-weight: 700; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.button { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 19px; border-radius: 9px; font-size: 13px; font-weight: 700; border: 1px solid transparent; white-space: nowrap; }
.button-primary { color: #133c34; background: #e0c18b; }
.button-primary:hover { background: #f0d8aa; }
.button-quiet { background: transparent; color: #e4e5e0; border-color: #52726b; }
.button-quiet svg { width: 16px; height: 16px; }
.button-outline { border-color: #d7dfd7; color: #31514a; background: #fff; }
.backup-wrap { position: relative; }
.backup-menu { position: absolute; z-index: 12; top: calc(100% + 10px); right: 0; min-width: 235px; border: 1px solid #e2e8e2; border-radius: 12px; background: white; box-shadow: 0 18px 42px #072f2c21; color: #23433e; padding: 7px; }
.backup-menu[hidden] { display: none; }
.backup-menu button { width: 100%; text-align: left; padding: 12px; border: none; border-radius: 8px; background: white; font-weight: 700; color: #123c37; }
.backup-menu button:hover { background: #f3f6f2; }
.backup-menu p { padding: 0 12px; font-size: 11px; color: #78857f; line-height: 1.5; }
.workspace { max-width: 1510px; margin: 0 auto; padding: 40px clamp(16px, 3.5vw, 60px) 24px; }
.heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 27px; }
.eyebrow, .overline { margin: 0; font-size: 10px; color: #9b855c; letter-spacing: .16em; font-weight: 800; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-family: Georgia, serif; font-size: clamp(26px, 3.3vw, 41px); line-height: 1.15; font-weight: normal; margin: 9px 0 0; letter-spacing: -.04em; }
.stats { display: flex; gap: 10px; }
.stat { display: grid; grid-template-columns: auto auto; align-items: center; gap: 9px; padding: 15px 18px; border: 1px solid #dce4db; background: #fff; border-radius: 12px; min-width: 120px; }
.stat strong { font-size: 24px; font-weight: 600; font-family: Georgia, serif; }
.stat span { color: #71857c; font-size: 12px; }
.layout { display: grid; grid-template-columns: minmax(0, 1.64fr) minmax(295px, .88fr); align-items: start; gap: 20px; }
.panel { background: white; border: 1px solid #e2e7e0; border-radius: 18px; box-shadow: 0 6px 24px #082f2c06; min-width: 0; }
.calendar-panel { overflow: hidden; }
.panel-head { padding: 26px 26px 18px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
h2 { font-size: 22px; line-height: 1.25; font-family: Georgia, serif; font-weight: 500; margin: 7px 0 0; }
.month-actions { display: flex; align-items: center; gap: 7px; }
.icon-button { background: #f7f8f5; color: #17443e; border: 1px solid #e5ebe5; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }
.icon-button svg { width: 17px; height: 17px; }
.button-today { border: none; background: transparent; padding: 8px; color: #496c5f; font-size: 12px; font-weight: 700; }
.weekdays { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); text-align: center; color: #74857c; font-size: 10px; text-transform: uppercase; font-weight: 800; letter-spacing: .08em; padding: 11px 13px; border-bottom: 1px solid #e7ebe5; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: #e8ece7; gap: 1px; border-bottom: 1px solid #e8ece7; }
.day { background: #fff; min-height: 104px; padding: 9px; border: 0; color: #193b35; text-align: left; min-width: 0; display: flex; flex-direction: column; gap: 4px; position: relative; }
.day:hover { background: #f8faf6; }
.day.outside { color: #c5cdc7; background: #fbfcfa; }
.day.selected { background: #eef5ef; box-shadow: inset 0 0 0 2px #b4c9ba; }
.day.today .day-number { background: #0c443c; color: white; }
.day-number { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.day-pills { display: grid; gap: 4px; width: 100%; }
.day-pill { font-size: 10px; line-height: 1.35; border-radius: 4px; padding: 4px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #e5f0e8; color: #1b5847; font-weight: 700; }
.day-pill.pending { background: #f8eee0; color: #92672e; }
.day-more { font-size: 10px; color: #6b7870; }
.day-agenda { padding: 23px 27px 27px; border-top: 1px solid #e7ebe5; }
.day-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.day-header h3 { margin: 6px 0 0; font-family: Georgia, serif; font-size: 19px; font-weight: normal; }
.small-add { border: 1px solid #dae6dc; background: #f6faf7; color: #23584d; border-radius: 8px; padding: 10px 13px; font-size: 12px; font-weight: 700; }
.day-items { display: grid; gap: 8px; }
.day-entry { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; border: 1px solid #ecf0e9; border-radius: 9px; padding: 12px 14px; gap: 8px; cursor: pointer; }
.day-entry:hover { background: #fafcf8; }
.day-entry strong { font-size: 13px; }
.day-entry small { color: #718078; font-size: 11px; display: block; margin-top: 5px; }
.empty-day { padding: 18px 15px; background: #f8faf7; border-radius: 9px; color: #85928a; font-size: 12px; }
.list-panel { display: grid; gap: 19px; }
.list-section { padding: 25px 24px 22px; min-height: 235px; }
.list-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.list-head h2 { display: flex; align-items: center; gap: 8px; }
.count-badge { background: #eff3ec; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 11px; color: #517064; display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 20px; padding: 0 5px; }
.list-dot { width: 10px; height: 10px; border-radius: 50%; }
.confirmed-dot { background: #3b8f6c; }
.pending-dot { background: #c7a062; }
.record-list { display: grid; gap: 0; max-height: 480px; overflow-y: auto; }
.record { padding: 15px 2px; display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: 12px; align-items: start; border-top: 1px solid #edf0eb; }
.record-date { width: 43px; min-height: 45px; border: 1px solid #e1e9e0; border-radius: 9px; display: grid; place-items: center; padding: 5px 2px; }
.record-date strong { font-size: 18px; font-family: Georgia, serif; font-weight: normal; line-height: 1; }
.record-date small { color: #8b978e; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.record-name { font-size: 13px; font-weight: 750; line-height: 1.35; text-align: left; margin: 3px 0 5px; border: none; background: transparent; padding: 0; color: #163d36; }
.record-name:hover { text-decoration: underline; }
.record-meta { color: #85928a; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; max-height: 33px; overflow: hidden; }
.status-tag { font-size: 10px; border-radius: 15px; padding: 6px 8px; font-weight: 800; white-space: nowrap; border: 0; }
.status-tag.confirmed { color: #267656; background: #e7f5e9; }
.status-tag.pending { color: #946b2e; background: #f8efdc; }
.status-tag:hover { filter: brightness(.96); }
.empty-list { padding: 29px 8px 38px; text-align: center; color: #94a29a; font-size: 12px; line-height: 1.6; }
.empty-icon { width: 38px; height: 38px; display: grid; place-items: center; border: 1px dashed #cbd8cd; border-radius: 50%; margin: 0 auto 11px; font-size: 22px; color: #89a094; }
.privacy-footnote { color: #8b978d; text-align: center; margin: 23px 0; font-size: 11px; }
.mobile-nav, .mobile-fab { display: none; }
.record-dialog { background: white; border: none; border-radius: 20px; padding: 0; width: min(470px, calc(100% - 28px)); max-height: min(90dvh, 800px); box-shadow: 0 30px 120px #061f1b50; color: #1a423a; }
.record-dialog::backdrop { background: #061e1bc2; backdrop-filter: blur(2px); }
.record-form { padding: 25px; overflow-y: auto; max-height: min(90dvh, 800px); }
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 20px; }
.dialog-head h2 { font-size: 25px; margin-top: 8px; }
.close-button { border: none; background: #f2f5f1; color: #32574d; border-radius: 9px; font-size: 26px; height: 36px; width: 36px; }
.field { display: grid; gap: 9px; margin: 17px 0; }
.field > span, .status-field legend { font-size: 12px; font-weight: 750; color: #425a52; }
.field b { color: #b49359; }
.field input, .field textarea { border: 1px solid #d9e2da; border-radius: 9px; background: #fbfcfb; padding: 14px 13px; color: #173f38; width: 100%; outline-offset: -2px; font-size: 14px; }
.field textarea { resize: vertical; min-height: 85px; }
.status-field { border: 0; padding: 0; margin: 20px 0 26px; }
.status-field legend { margin-bottom: 11px; }
.status-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.status-options label { cursor: pointer; }
.status-options input { position: absolute; opacity: 0; }
.status-options span { display: block; border: 1px solid #dce4dc; border-radius: 9px; padding: 13px 4px; text-align: center; background: #f9fbf8; font-size: 12px; font-weight: 750; }
.status-options input:checked + span { background: #e4f0e7; border-color: #578c6c; color: #225a44; }
.status-options input:focus-visible + span { outline: 3px solid #cba36b; }
.form-buttons { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.delete-record { display: block; margin: 18px auto 0; border: none; background: transparent; color: #a65c4d; font-size: 12px; text-decoration: underline; }
.delete-record[hidden] { display: none; }
.toast { position: fixed; z-index: 200; bottom: 30px; left: 50%; transform: translate(-50%,20px); background: #0f4239; color: white; border-radius: 10px; padding: 12px 18px; max-width: calc(100% - 32px); font-size: 13px; box-shadow: 0 8px 30px #082f2c38; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
@media (max-width: 1050px) { .layout { grid-template-columns: minmax(0,1.3fr) minmax(280px,.8fr); gap: 13px; } .calendar-panel .panel-head { padding: 19px; } .day { min-height: 89px; padding: 6px; } .list-section { padding: 20px 17px; } .record { grid-template-columns: 39px minmax(0,1fr); } .record .status-tag { grid-column: 2; justify-self: start; } }
@media (max-width: 750px) {
  .topbar { min-height: 70px; padding: 12px 17px; }
  .brand-seal { width: 39px; height: 39px; }
  .brand-title strong { font-size: 17px; }
  .top-actions .button-primary { display: none; }
  .top-actions .button-quiet { padding: 9px 11px; font-size: 12px; }
  .top-actions .button-quiet svg { display: none; }
  .workspace { padding: 25px 13px 110px; }
  .heading { margin-bottom: 16px; align-items: start; flex-wrap: wrap; }
  .heading .eyebrow { font-size: 9px; }
  h1 { font-size: 28px; margin-top: 8px; }
  .stats { width: 100%; }
  .stat { flex: 1; padding: 9px 13px; min-width: 0; }
  .stat strong { font-size: 22px; }
  .layout { display: block; }
  .panel { border-radius: 14px; }
  .calendar-panel .panel-head { padding: 21px 15px; }
  .calendar-header h2 { font-size: 22px; }
  .month-actions { gap: 5px; }
  .day { min-height: 67px; padding: 5px 3px; }
  .day-number { width: 24px; height: 24px; font-size: 12px; }
  .day-pills { gap: 3px; }
  .day-pill { font-size: 0; height: 5px; width: 13px; padding: 0; border-radius: 6px; }
  .day-more { font-size: 8px; }
  .weekdays { padding: 9px 6px; font-size: 9px; }
  .day-agenda { padding: 22px 15px; }
  .list-panel { display: contents; }
  .list-section { display: none; padding: 23px 18px; }
  .layout.view-calendar .calendar-panel { display: block; }
  .layout.view-calendar .list-section { display: none; }
  .layout.view-confirmed .calendar-panel, .layout.view-pending .calendar-panel { display: none; }
  .layout.view-confirmed #confirmedSection { display: block; }
  .layout.view-pending #pendingSection { display: block; }
  .record-list { max-height: none; }
  .record { grid-template-columns: 44px minmax(0,1fr) auto; }
  .record .status-tag { grid-column: auto; }
  .privacy-footnote { display: none; }
  .mobile-nav { display: flex; justify-content: space-around; padding: 7px 11px calc(8px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #d8e1d8; background: #fff; position: fixed; z-index: 40; bottom: 0; left: 0; right: 0; box-shadow: 0 -4px 30px #092b2714; }
  .mobile-tab { min-width: 88px; border: none; background: transparent; color: #829188; display: grid; justify-items: center; gap: 4px; font-size: 10px; font-weight: 750; padding: 7px 3px; }
  .mobile-tab svg { width: 21px; height: 21px; }
  .mobile-tab.active { color: #0e5141; }
  .mobile-fab { display: grid; place-items: center; position: fixed; z-index: 42; right: 17px; bottom: calc(89px + env(safe-area-inset-bottom,0px)); width: 55px; height: 55px; border: none; border-radius: 18px; font-size: 31px; font-weight: 400; background: #0e4a3f; color: #eed3a1; box-shadow: 0 7px 22px #0b4a3c45; }
  .toast { bottom: 156px; }
}
@media (max-width: 385px) { .brand-title strong { font-size: 15px; } .brand { gap: 8px; } .top-actions .button-quiet { padding: 9px; } .stat { gap: 6px; } .stat span { font-size: 11px; } .record { grid-template-columns: 40px minmax(0,1fr); } .record .status-tag { grid-column: 2; justify-self: start; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
