:root {
  color-scheme: light;
  font: 16px/1.55 system-ui, sans-serif;
  color: #14283d;
  background: #f3f5f9;
  --accent: #1b58b3;
  --navy: #12263f;
  --muted: #4c5f74;
  --line: #dbe3ee;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
header {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 18px;
  padding: .65rem max(1rem, calc((100% - 70rem) / 2)); background: var(--navy); color: white;
}
header nav { display: flex; align-items: center; gap: .9rem; }
header a { color: #e6eeff; padding-block: .45rem; }
.brand { font-size: 1.35rem; font-weight: 750; letter-spacing: -.04em; }
main { max-width: 72.5rem; margin: auto; padding: 2rem 1.25rem; }
.intro { margin-bottom: 1.4rem; }
h1 { font-size: clamp(2.2rem, 6vw, 3.5rem); line-height: 1.08; margin: .2rem 0; letter-spacing: -.055em; }
h2 { font-size: 1.2rem; margin: 0 0 .8rem; letter-spacing: -.025em; }
#today, .note { color: var(--muted); }
#today { margin: 0; font-weight: 650; }
#prompt { margin: .55rem 0 0; }
.layout { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.card { background: white; padding: clamp(.85rem, 2.5vw, 1.4rem); border: 1px solid var(--line); border-radius: 1rem; }
.viewfinder {
  display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--navy); border-radius: .8rem; text-align: center; color: #e6eeff;
}
.recording-mode { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.recording-mode select { font: inherit; padding: .4rem; }
.viewfinder.voice-only { aspect-ratio: auto; min-height: 4rem; }
.viewfinder audio, .entries audio { width: 100%; }
.viewfinder p { padding: 1rem; }
video { display: block; width: 100%; background: var(--navy); }
.viewfinder video { height: 100%; min-height: 0; object-fit: contain; }
.viewfinder #preview { transform: scaleX(-1); }
.option { display: flex; align-items: center; gap: .45rem; min-height: 44px; }
.option input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.note { font-size: .9rem; margin: .35rem 0 .8rem; }
button, input, textarea, select { font: inherit; color: inherit; }
textarea, input[type="time"], form input, form select {
  border: 1px solid #8092a8; border-radius: .5rem; background: white;
}
textarea { display: block; resize: vertical; width: 100%; margin-top: .35rem; padding: .65rem; }
button, .button {
  min-height: 44px; border: 1px solid #9ab4da; border-radius: .6rem; padding: .45rem .8rem;
  color: #14458b; background: white; font-weight: 650; cursor: pointer;
}
.button { display: inline-flex; align-items: center; text-decoration: none; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 3px solid #4c8bef; outline-offset: 2px; }
#start, #save { background: var(--accent); color: white; border-color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.month { display: flex; align-items: center; justify-content: space-between; gap: .35rem; }
.month h3 { margin: 0; text-align: center; }
.grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .1rem; text-align: center; }
.weekdays { margin: .7rem 0 .35rem; font-size: .8rem; color: var(--muted); }
.grid button { position: relative; min-width: 0; padding: .1rem; border-color: transparent; }
.grid button[aria-current="date"] { border-color: var(--accent); }
.grid button[aria-pressed="true"] { background: #e4efff; outline: 1px solid var(--accent); }
.grid button.recorded::after {
  content: ""; position: absolute; bottom: .21rem; left: calc(50% - .15rem);
  width: .3rem; height: .3rem; border-radius: 50%; background: var(--accent);
}
.reminder, .entries { margin-top: 1rem; }
.reminder input { min-height: 44px; margin: 0 .3rem .5rem; padding: .4rem; }
.entries article { max-width: 38rem; }
.entries article + article { border-top: 1px solid var(--line); margin-top: 1.5rem; }
.entries p { white-space: pre-wrap; overflow-wrap: anywhere; }
#status { color: var(--muted); margin: .45rem 0 0; }
#status:empty, .interim:empty { display: none; }
form { display: grid; gap: .5rem; }
form input, form select { width: 100%; min-height: 44px; padding: .5rem; }
#account-id, #users { overflow-wrap: anywhere; }
#users li + li { margin-top: .5rem; }
.transcript-panel { padding: .75rem; border: 1px solid var(--line); border-radius: .8rem; background: #f7faff; }
.transcript-panel label { display: block; font-weight: 650; }
.interim { margin: .35rem 0 0; font-style: italic; overflow-wrap: anywhere; }
@media (max-width: 760px) { .layout { grid-template-columns: minmax(0, 1fr); } main { padding: 1.15rem .8rem; } }
@media (max-width: 420px) { .actions > button { flex: 1 1 42%; } }
