.journal-nav { display: flex; gap: 4px; margin: 0 0 24px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.journal-nav a { flex: 1; min-height: 44px; padding: 11px 16px; border-radius: 10px; color: var(--muted); text-align: center; text-decoration: none; font-size: 14px; font-weight: 550; }
.journal-nav a[aria-current] { background: var(--selected); color: var(--sage); }
.hero { padding: 22px; margin-bottom: 24px; }
.hero #date { color: var(--muted); font-size: 12px; line-height: 1.5; }
.hero h1 { margin: 8px 0; font-size: 32px; font-weight: 650; line-height: 1.15; letter-spacing: -1px; }
.hero p { margin: 0; font-size: 14px; }
h2 { margin: 0 0 16px; }
.entry { margin-bottom: 28px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
fieldset { display: flex; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
fieldset label { flex: 1; position: relative; }
fieldset input { position: absolute; opacity: 0; width: 1px; height: 1px; }
fieldset span { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 44px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 14px; text-align: center; }
fieldset input:checked + span { background: var(--selected); border-color: #748766; color: var(--sage); font-weight: 550; }
fieldset input:focus-visible + span { outline: 2px solid var(--sage); outline-offset: 4px; }
.actions { display: flex; gap: 8px; margin: 18px 0 10px; }
.actions button { flex: 1; min-width: 0; min-height: 48px; padding: 12px 6px; background: var(--sage); color: #182016; border: 0; font-size: 16px; font-weight: 550; cursor: pointer; }
.actions button:active { filter: brightness(.85); }
summary { display: list-item; min-height: 44px; padding: 12px 0; color: var(--muted); font-size: 14px; cursor: pointer; }
#when, .period select { max-width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); color: #f0f2ee; font: inherit; font-size: 16px; }
#when { display: block; width: 100%; margin-top: 6px; }
#status { color: var(--sage); font-size: 13px; line-height: 1.5; }
#status:not(:empty) { margin-top: 12px; }
h3 { margin: 24px 0 8px; color: var(--muted); font-size: 12px; line-height: 1.5; font-weight: 500; letter-spacing: .3px; }
.history-entry { padding: 0 14px; border: 1px solid var(--line); border-bottom: 0; background: var(--surface); }
h3 + .history-entry { border-radius: 16px 16px 0 0; }
.history-entry:has(+ h3), .history-entry:last-child { border-bottom: 1px solid var(--line); border-radius: 0 0 16px 16px; }
h3 + .history-entry:has(+ h3), h3 + .history-entry:last-child { border-radius: 16px; }
.row { display: flex; align-items: center; gap: 4px; min-height: 74px; padding: 10px 0; }
.row > div { min-width: 0; }
.row strong { font-size: 15px; font-weight: 550; }
.row small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.row time { flex-shrink: 0; margin-left: auto; padding-left: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.row button { flex-shrink: 0; width: 40px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 21px; cursor: pointer; }
.row button:hover { color: var(--sage); }
.entry-note { margin: -2px 0 14px; color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.period { display: flex; align-items: center; gap: 10px; margin: 0 0 24px; color: var(--muted); font-size: 14px; }
.trend-section { margin: 0 0 16px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.trend-section h2 { margin-bottom: 8px; }
.trend-section p { margin: 8px 0 16px; font-size: 13px; }
.trend-section table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.trend-section th, .trend-section td { padding: 10px 4px; border-bottom: 1px solid var(--line); text-align: right; }
.trend-section th:first-child { text-align: left; }
.trend-section thead th { color: var(--muted); font-size: 12px; font-weight: 500; }
.trend-section tbody th { font-weight: 500; }
.trend-section tbody tr:last-child > * { border-bottom: 0; }
.peak-times { margin: 12px 0; padding-left: 18px; color: var(--sage); font-size: 13px; line-height: 1.5; }
.peak-times:empty { display: none; }
@media (max-width: 370px) { .entry, .hero, .trend-section { padding: 16px; } .history-entry { padding: 0 10px; } .row button { width: 34px; } .row strong { font-size: 14px; } }

/* Training library */
.journal-nav a { padding-inline: 8px; }
.training-heading { margin: 28px 0 24px; }
.training-heading h2 { margin: 6px 0 18px; font-size: 30px; letter-spacing: -.8px; }
.training-heading .eyebrow { color: var(--sage); font-size: 12px; }
#training-progress { font-size: 14px; margin-bottom: 8px; }
#learned-progress { display: block; width: 100%; height: 5px; border: 0; border-radius: 4px; overflow: hidden; background: var(--line); accent-color: var(--sage); }
#learned-progress::-webkit-progress-bar { background: var(--line); }
#learned-progress::-webkit-progress-value { background: var(--sage); }
.training-guide { padding: 2px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 20px; }
.training-guide summary { color: var(--sage); }
.training-guide p { font-size: 14px; line-height: 1.6; }
.skill-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.skill-toolbar select, #skill-dialog input, #skill-dialog textarea, .skill-notes textarea { min-height: 44px; padding: 10px 12px; background: var(--field); border: 1px solid var(--line); border-radius: 10px; color: var(--text, #eef1ed); font: inherit; font-size: 16px; }
.skill-toolbar button, .skill-body button, #skill-dialog button { min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); background: var(--surface); color: var(--sage); border-radius: 10px; font: inherit; font-size: 14px; cursor: pointer; }
.skill-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; margin: 10px 0; overflow: hidden; }
.skill-card > summary { display: flex; align-items: center; justify-content: space-between; padding: 18px; gap: 14px; list-style: none; }
.skill-card > summary::-webkit-details-marker { display: none; }
.skill-heading { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.skill-heading strong { color: var(--text, #eef1ed); font-size: 16px; font-weight: 550; }
.skill-heading small { color: var(--muted); font-size: 12px; }
.skill-arrow { color: var(--sage); font-size: 24px; }
.skill-card[open] .skill-arrow { transform: rotate(45deg); }
.skill-body { padding: 0 18px 20px; }
.skill-cue { display: inline-block; margin: 0 0 10px; padding: 6px 10px; background: var(--selected); color: var(--sage); border-radius: 8px; font-size: 13px; }
.skill-body ol { padding-left: 21px; margin: 8px 0 22px; }
.skill-body li { margin: 12px 0; padding-left: 3px; font-size: 15px; line-height: 1.65; }
.learned-check { display: flex; align-items: center; gap: 10px; min-height: 48px; margin: 8px 0; border-top: 1px solid var(--line); padding-top: 12px; font-size: 15px; }
.learned-check input { width: 22px; height: 22px; accent-color: var(--sage); }
.skill-body .practice-button { width: 100%; margin: 12px 0 0; }
.practice-button[aria-pressed=true] { background: var(--selected); }
.skill-meta { color: var(--muted); font-size: 12px; line-height: 1.5; }
.skill-notes { margin-top: 20px; }
.skill-notes label, #skill-dialog label { display: grid; gap: 8px; margin-bottom: 12px; font-size: 14px; }
.skill-notes textarea, #skill-dialog input, #skill-dialog textarea { display: block; width: 100%; resize: vertical; box-sizing: border-box; }
.skill-notes .skill-meta { margin-left: 10px; }
.custom-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
#training-status { font-size: 14px; color: var(--sage); }
#training-status:empty { display: none; }
#skill-dialog { width: min(460px, calc(100% - 32px)); max-height: 85dvh; overflow-y: auto; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg, #121615); color: var(--text, #eef1ed); }
#skill-dialog::backdrop { background: #000a; }
#skill-dialog h2 { font-size: 24px; }
#skill-dialog .optional { color: var(--muted); font-size: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
#skill-dialog .primary { background: var(--sage); color: #182016; }
#skill-form-error { color: var(--sage); font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
