/* 304 Beauty — editorial boutique theme */

@font-face { font-family: "Bodoni Moda"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/bodoni-moda-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/bodoni-moda-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/bodoni-moda-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-style: italic; font-weight: 500; font-display: swap; src: url(fonts/bodoni-moda-latin-500-italic.woff2) format("woff2"); }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/jost-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/jost-latin-500-normal.woff2) format("woff2"); }

:root {
  --paper: #F8F3F3;
  --surface: #FFFFFF;
  --ink: #221A1F;
  --ink-soft: #6B5C64;
  --rule: #E7D8DC;
  --rose: #8C2A47;
  --rose-ink: #FFFFFF;
  --rose-soft: #F3E2E6;
  --danger: #A1262B;
  --focus: #8C2A47;
  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #17121A; --surface: #201A24; --ink: #F3EAEE; --ink-soft: #AC9AA3;
    --rule: #362B33; --rose: #E79AB0; --rose-ink: #221A1F; --rose-soft: #3A2431;
    --danger: #F08A8F; --focus: #E79AB0; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #17121A; --surface: #201A24; --ink: #F3EAEE; --ink-soft: #AC9AA3;
  --rule: #362B33; --rose: #E79AB0; --rose-ink: #221A1F; --rose-soft: #3A2431;
  --danger: #F08A8F; --focus: #E79AB0; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.shell { max-width: 34rem; margin: 0 auto; padding: 0 1.25rem 7rem; }

/* Masthead */
.masthead { display: flex; align-items: center; gap: .75rem; padding: 1.25rem 0 .5rem; }
.cameo { width: 2.75rem; height: 2.75rem; border-radius: 50%; overflow: hidden; flex: none;
  box-shadow: 0 0 0 1px var(--rule), 0 0 0 4px var(--paper), 0 0 0 5px var(--rose); background: #fff; }
.cameo img { width: 100%; height: 100%; object-fit: cover; }
.wordmark { font-family: var(--serif); font-weight: 500; font-size: 1.35rem; letter-spacing: .02em; text-decoration: none; }
.masthead .spacer { flex: 1; }
.icon-btn { width: 2.75rem; height: 2.75rem; display: inline-grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--rule); background: transparent; cursor: pointer; }
.icon-btn:hover { background: var(--rose-soft); }
.icon { width: 1.25rem; height: 1.25rem; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* The reason: the one bold moment */
.reason { position: relative; padding: 2.25rem 0 2rem; border-bottom: 1px solid var(--rule); }
.reason-label { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--rose); margin: 0 0 .25rem; }
.reason-quote { position: relative; margin: 1rem 0 0; padding-top: 2.6rem; }
.reason-quote::before { content: "\201C"; position: absolute; left: -.04em; top: -.05em; font-family: var(--serif);
  font-size: 6rem; line-height: 1; color: var(--rose); opacity: .35; pointer-events: none; }
.reason-text { position: relative; font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 8.2vw, 2.85rem);
  line-height: 1.12; letter-spacing: -.01em; margin: 0; min-height: 2.3em; text-wrap: balance; }
.reason-text.swap { animation: swap .45s ease both; }
@keyframes swap { from { opacity: 0; transform: translateY(.35rem); } to { opacity: 1; transform: none; } }
.reason-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: 1.5rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.875rem;
  padding: .55rem 1.35rem; border-radius: 999px; border: 1px solid var(--ink); background: transparent;
  font-weight: 500; text-decoration: none; cursor: pointer; transition: background .15s, color .15s; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.primary { background: var(--rose); border-color: var(--rose); color: var(--rose-ink); }
.btn.primary:hover { filter: brightness(1.08); background: var(--rose); color: var(--rose-ink); }
.btn.small { min-height: 2.5rem; padding: .4rem 1rem; font-size: .95rem; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: var(--paper); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; padding: .25rem 0; color: var(--ink-soft); text-decoration: underline;
  text-underline-offset: .2em; text-decoration-color: var(--rule); cursor: pointer; font-size: .95rem; }
.link:hover { color: var(--rose); text-decoration-color: currentColor; }

/* Section headings */
.section { padding: 2rem 0; border-bottom: 1px solid var(--rule); }
.section:last-of-type, .section.open-end { border-bottom: 0; }
.section.tools { padding-top: .5rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; line-height: 1.15; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }

/* Streak */
.streak { display: flex; align-items: baseline; gap: .4rem; white-space: nowrap; }
.streak b { font-family: var(--serif); font-weight: 400; font-size: 2.6rem; line-height: 1; color: var(--rose); }
.streak span { color: var(--ink-soft); font-size: .95rem; }

/* Forms */
.field { display: grid; gap: .35rem; margin-bottom: .9rem; }
.field label, .label { font-size: .92rem; color: var(--ink-soft); }
.input, .textarea, .select { width: 100%; padding: .7rem .9rem; border: 1px solid var(--rule); border-radius: .6rem;
  background: var(--surface); min-height: 2.875rem; }
.input:focus, .textarea:focus, .select:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.textarea { min-height: 8rem; resize: vertical; line-height: 1.6; }
.inline-form { display: flex; gap: .5rem; }
.inline-form .input { flex: 1; min-width: 0; }
.row { display: flex; gap: .75rem; }
.row > * { flex: 1; min-width: 0; }
.panel { background: var(--rose-soft); border-radius: 1rem; padding: 1.1rem 1.1rem .4rem; margin: 1rem 0 1.5rem; }
.check-row { display: flex; align-items: center; gap: .7rem; padding: .35rem 0; cursor: pointer; }
.check-row input { width: 1.25rem; height: 1.25rem; accent-color: var(--rose); flex: none; }

/* Lists */
.ledger { list-style: none; margin: 1rem 0 0; padding: 0; }
.ledger li { display: flex; align-items: center; gap: .75rem; padding: .7rem 0; border-top: 1px solid var(--rule); }
.ledger li:last-child { border-bottom: 1px solid var(--rule); }
.ledger .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ledger .mark { color: var(--rose); }
.ledger .done .grow { text-decoration: line-through; color: var(--ink-soft); }
.ghost-btn { width: 2.5rem; height: 2.5rem; display: inline-grid; place-items: center; flex: none; border-radius: 50%;
  border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; }
.ghost-btn:hover { background: var(--rose-soft); color: var(--rose); }
.empty { margin: 1rem 0 0; color: var(--ink-soft); font-style: italic; font-family: var(--serif); font-size: 1.1rem; }

/* Tool directory */
.directory { list-style: none; margin: 0; padding: 0; }
.directory a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding: 1.05rem 0;
  border-top: 1px solid var(--rule); text-decoration: none; }
.directory li:last-child a { border-bottom: 1px solid var(--rule); }
.directory .glyph { width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--rose-soft); color: var(--rose); }
.directory strong { display: block; font-weight: 500; font-size: 1.08rem; }
.directory small { display: block; color: var(--ink-soft); font-size: .92rem; line-height: 1.4; }
.directory .chev { color: var(--ink-soft); }
.directory a:hover strong { color: var(--rose); }

/* ME TIME */
.metime { display: flex; width: 100%; align-items: center; justify-content: center; gap: .65rem; margin: 2rem 0 0;
  min-height: 3.75rem; border-radius: 999px; border: 0; background: var(--ink); color: var(--paper); cursor: pointer;
  font-family: var(--serif); font-size: 1.4rem; letter-spacing: .14em; }
.metime:hover { background: var(--rose); color: var(--rose-ink); }
.metime-float { position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 30;
  display: inline-flex; align-items: center; gap: .45rem; min-height: 3rem; padding: .5rem 1.15rem;
  border-radius: 999px; border: 0; background: var(--ink); color: var(--paper); cursor: pointer;
  font-family: var(--serif); letter-spacing: .1em; font-size: 1.02rem; box-shadow: 0 6px 20px rgba(34, 26, 31, .22); }
.metime-float:hover { background: var(--rose); color: var(--rose-ink); }

/* Inner pages */
.page-head { padding: 1.5rem 0 1.25rem; border-bottom: 1px solid var(--rule); }
.back { display: inline-flex; align-items: center; gap: .3rem; color: var(--ink-soft); text-decoration: none; margin-bottom: 1rem; font-size: .95rem; min-height: 2.75rem; }
.back:hover { color: var(--rose); }
.page-head h1 { font-size: clamp(2.2rem, 9vw, 2.8rem); }
.page-head p { margin: .6rem 0 0; color: var(--ink-soft); max-width: 32rem; }

/* Tabs */
.tabs { display: flex; gap: 1.5rem; border-bottom: 1px solid var(--rule); margin: 0 0 1.5rem; overflow-x: auto; }
.tabs a { padding: .9rem 0 .7rem; text-decoration: none; color: var(--ink-soft); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.tabs a[aria-current="page"] { color: var(--ink); border-color: var(--rose); }

/* Journal */
.entry { padding: 1rem 0; border-top: 1px solid var(--rule); }
.entry:last-child { border-bottom: 1px solid var(--rule); }
.entry-date { font-family: var(--serif); font-style: italic; color: var(--rose); }
.entry-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: .35rem 0 .4rem; font-family: var(--serif); font-size: 1.12rem; line-height: 1.6; }
.entry-tools { display: flex; gap: 1rem; }

/* Calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.cal-head h3 { font-size: 1.5rem; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal .dow { font-size: .8rem; color: var(--ink-soft); padding: .3rem 0; }
.cal button { aspect-ratio: 1; border: 0; background: transparent; border-radius: 50%; cursor: pointer; position: relative;
  font-family: var(--serif); font-size: 1.05rem; min-height: 2.5rem; }
.cal button:hover { background: var(--rose-soft); }
.cal button.today { box-shadow: inset 0 0 0 1px var(--rose); }
.cal button.sel { background: var(--rose); color: var(--rose-ink); }
.cal button.has::after { content: ""; position: absolute; left: 50%; bottom: 14%; width: .3rem; height: .3rem; margin-left: -.15rem;
  border-radius: 50%; background: var(--rose); }
.cal button.sel.has::after { background: var(--rose-ink); }

/* Contacts */
.lifeline { border-left: 3px solid var(--rose); padding: .25rem 0 .25rem 1rem; margin: 1.5rem 0; }
.lifeline p { margin: 0; }
.lifeline .big { font-family: var(--serif); font-size: 1.5rem; line-height: 1.25; }
.hotline { padding: 1rem 0; border-top: 1px solid var(--rule); }
.hotline:last-child { border-bottom: 1px solid var(--rule); }
.hotline strong { font-weight: 500; display: block; }
.hotline .actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }

/* Notice / alert */
.note { font-size: .92rem; color: var(--ink-soft); border-top: 1px solid var(--rule); padding-top: .9rem; margin-top: 1.25rem; }
.status-pill { display: inline-flex; align-items: center; gap: .45rem; font-size: .92rem; color: var(--ink-soft); }
.status-pill i { width: .55rem; height: .55rem; border-radius: 50%; background: var(--rule); }
.status-pill.on i { background: #3E9B6B; box-shadow: 0 0 0 3px rgba(62, 155, 107, .2); }
.alert-banner { position: fixed; inset: 0 0 auto 0; z-index: 70; background: var(--rose); color: var(--rose-ink);
  padding: calc(1rem + env(safe-area-inset-top)) 1.25rem 1.1rem; box-shadow: 0 8px 28px rgba(0, 0, 0, .25); animation: drop .3s ease both; }
.alert-banner .in { max-width: 34rem; margin: 0 auto; }
.alert-banner p { margin: 0 0 .75rem; font-family: var(--serif); font-size: 1.35rem; line-height: 1.25; }
.alert-banner .btn { border-color: currentColor; color: inherit; }
.alert-banner .btn:hover { background: var(--rose-ink); color: var(--rose); }
@keyframes drop { from { transform: translateY(-100%); } to { transform: none; } }
.toast { position: fixed; left: 50%; bottom: calc(5rem + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40;
  background: var(--ink); color: var(--paper); padding: .6rem 1.1rem; border-radius: 999px; font-size: .95rem; animation: swap .25s ease both; }

/* Segmented choice */
.choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.choices label { position: relative; }
.choices input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choices span { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.5rem; padding: .4rem 1rem;
  border: 1px solid var(--rule); border-radius: 999px; cursor: pointer; }
.choices input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.choices input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Legal pages */
.prose { max-width: 34rem; }
.prose h2 { font-size: 1.4rem; margin: 1.75rem 0 .4rem; }
.prose p { margin: 0 0 .9rem; }
.prose .lede { font-family: var(--serif); font-size: 1.6rem; line-height: 1.25; margin-top: 1.5rem; }

.foot { display: flex; justify-content: center; gap: 1.5rem; padding: 2.5rem 0 0; font-size: .92rem; }
.foot a { color: var(--ink-soft); text-underline-offset: .2em; }

/* Passcode lock */
body.is-locked { overflow: hidden; }
.lock { position: fixed; inset: 0; z-index: 60; background: var(--paper); overflow-y: auto;
  display: flex; align-items: center; justify-content: center;
  padding: calc(1.5rem + env(safe-area-inset-top)) 1.25rem calc(1.5rem + env(safe-area-inset-bottom)); }
.lock-in { width: 100%; max-width: 20rem; text-align: center; display: flex; flex-direction: column; align-items: center; }
.lock-cameo { width: 5rem; height: 5rem; }
.lock-title { font-size: 1.9rem; margin: 1rem 0 .25rem; letter-spacing: .02em; }
.lock-msg { margin: 0; min-height: 3em; color: var(--ink-soft); font-family: var(--serif); font-style: italic; font-size: 1.1rem; line-height: 1.35; }
.lock-msg.err { color: var(--rose); }
.pin-dots { display: flex; gap: .9rem; justify-content: center; margin: .5rem 0 1.75rem; min-height: .9rem; }
.pin-dots i { width: .8rem; height: .8rem; border-radius: 50%; border: 1.5px solid var(--ink); transition: background .12s; }
.pin-dots i.on { background: var(--ink); }
.pin-dots.shake { animation: shake .35s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 4.5rem); gap: 1rem 1.5rem; justify-content: center; }
.keypad button { width: 4.5rem; height: 4.5rem; border-radius: 50%; border: 1px solid var(--rule); background: var(--surface);
  font-family: var(--serif); font-size: 1.85rem; cursor: pointer; display: grid; place-items: center; touch-action: manipulation; }
.keypad button:active { background: var(--rose); color: var(--rose-ink); border-color: var(--rose); }
.keypad button[disabled] { opacity: .4; cursor: not-allowed; }
.keypad .key-del { border-color: transparent; background: transparent; color: var(--ink-soft); }
.lock-foot { display: flex; flex-direction: column; align-items: center; gap: .75rem; margin-top: 2rem; }
.pin-input { letter-spacing: .4em; font-size: 1.25rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
