
.journal-period-overview { min-width:0; margin-top:28px; padding:24px; border:1px solid var(--line); border-radius:18px; background:var(--surface); box-shadow:none; }
.period-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:32px; }
.period-heading>div:first-child { min-width:0; }
.period-heading h3 { margin:0; font-size:25px; line-height:1.25; font-weight:600; letter-spacing:-.025em; }
.period-heading p { max-width:620px; margin-top:8px; font-size:17px; line-height:1.6; }
.period-segments { display:flex; gap:4px; padding:4px; border:1px solid var(--line-soft); border-radius:14px; background:var(--bg-deep); flex-shrink:0; }
.period-segments>button { min-height:44px; padding:10px 18px; border-radius:10px; color:var(--muted); font-size:15px; font-weight:600; }
.period-segments>button[aria-pressed=true] { background:var(--surface-2); color:var(--gold-light); }
.journal-period-overview details>summary { list-style:none; cursor:pointer; }
.journal-period-overview details>summary::-webkit-details-marker { display:none; }
.journal-period-overview details>summary>.icon { width:14px; height:14px; flex-shrink:0; }
.journal-period-overview details[open]>summary>.icon { transform:rotate(180deg); }
.period-help { margin-top:4px; }
.period-help>summary { display:flex; align-items:center; gap:8px; width:fit-content; min-height:44px; color:var(--gold-light); font-size:15px; }
.period-help ol { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; margin:0 0 16px; padding:12px 0 16px; list-style:none; counter-reset:period-steps; }
.period-help li { position:relative; padding-left:28px; counter-increment:period-steps; }
.period-help li::before { content:counter(period-steps); position:absolute; left:0; top:0; color:var(--gold); font-size:15px; line-height:1.55; font-variant-numeric:tabular-nums; }
.period-help strong { font-size:15px; line-height:1.6; font-weight:600; color:var(--text); }
.period-help p { margin-top:6px; font-size:15px; line-height:1.55; }
.period-toolbar { display:flex; align-items:center; justify-content:space-between; gap:24px; padding-top:16px; border-top:1px solid var(--line-soft); }
.period-toolbar h4 { margin:0; min-width:0; font-size:21px; line-height:1.4; font-weight:600; letter-spacing:-.025em; }
.period-navigation { display:flex; align-items:center; gap:4px; flex-shrink:0; }
.period-arrow { display:grid; place-items:center; width:44px; height:44px; border:1px solid var(--line-soft); border-radius:12px; color:var(--gold-light); }
.period-arrow .icon { width:17px; height:17px; }
.period-current { min-height:44px; padding:10px 12px; font-size:15px; color:var(--text); }
.period-navigation button:disabled { opacity:.4; cursor:default; }
.period-summary { display:grid; grid-template-columns:1.4fr .85fr 1fr; gap:24px; margin-top:16px; padding-bottom:20px; }
.period-summary>div { min-width:0; }
.period-mean>span,.period-stat>span { display:block; font-size:15px; line-height:1.6; color:var(--muted); }
.period-mean>strong { display:block; font-size:23px; line-height:1.25; letter-spacing:-.025em; font-weight:600; color:var(--gold-light); margin-top:6px; text-wrap:balance; }
.period-mean>p,.period-stat>p { font-size:15px; line-height:1.55; margin-top:6px; }
.period-stat>strong { display:block; font-size:26px; line-height:1.3; font-weight:600; color:var(--text); letter-spacing:-.025em; margin-bottom:3px; font-variant-numeric:tabular-nums; }
.period-stat>strong>small { font-size:15px; font-weight:400; color:var(--muted); }
.period-comparison>strong { font-size:17px; letter-spacing:-.02em; margin:6px 0 0; }
.period-workspace,.period-calendar-panel,.period-insights { min-width:0; }
.period-workspace.is-month { display:grid; grid-template-columns:1.05fr 1fr; align-items:start; gap:28px; }
.period-panel-heading { margin-bottom:14px; }
.period-panel-heading h5,.period-trend-heading h5,.period-trend-empty h5,.period-export-heading h5 { margin:0; font-size:15px; line-height:1.5; font-weight:600; color:var(--text); letter-spacing:-.01em; }
.period-panel-heading p { margin-top:4px; font-size:17px; line-height:1.6; }
.period-days { min-width:0; }
.period-week { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:8px; }
.period-week-day { position:relative; min-width:0; min-height:108px; padding:12px 11px 18px; border:1px solid var(--line-soft); border-radius:12px; text-align:left; display:flex; flex-direction:column; gap:8px; color:var(--text); background:var(--bg-deep); }
.period-day-name { display:flex; justify-content:space-between; gap:6px; color:var(--muted); font-size:15px; line-height:1.4; }
.period-day-name>time { font-size:13px; font-variant-numeric:tabular-nums; }
.period-week-day>strong { color:var(--muted); font-size:15px; line-height:1.4; font-weight:600; overflow-wrap:anywhere; }
.period-week-day.has-moments>strong { color:var(--gold-light); }
.period-day-index { color:var(--muted); font-size:15px; line-height:1.5; }
.period-week-day[aria-pressed=true],.period-calendar-day[aria-pressed=true] { border-color:var(--gold); background:color-mix(in srgb,var(--gold) 7%,var(--bg-deep)); }
.period-week-day[aria-current=date] .period-day-name,.period-calendar-day[aria-current=date] .period-calendar-date { color:var(--gold-light); font-weight:600; }
.period-week-day:disabled,.period-calendar-day:disabled { opacity:.38; cursor:default; }
.period-closing-mark { display:inline-block; width:6px; height:6px; background:var(--gold); border-radius:50%; flex-shrink:0; }
.period-week-day>.period-closing-mark { position:absolute; bottom:8px; right:10px; }
.period-weekday-row,.period-month-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:6px; }
.period-weekday-row { margin-bottom:8px; }
.period-weekday-row>span { text-align:center; font-size:15px; color:var(--muted); }
.period-calendar-day { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; gap:0; min-width:0; min-height:52px; padding:5px 3px 9px; border:1px solid var(--line-soft); border-radius:10px; background:var(--bg-deep); color:var(--text); }
.period-calendar-date { font-size:17px; line-height:1.6; font-variant-numeric:tabular-nums; }
.period-calendar-value { color:var(--muted); font-size:12px; line-height:1.4; font-variant-numeric:tabular-nums; }
.period-calendar-day.has-moments .period-calendar-value { color:var(--gold-light); font-weight:600; }
.period-calendar-day>.period-closing-mark { position:absolute; bottom:6px; right:6px; width:5px; height:5px; }
.period-calendar-key { display:flex; flex-wrap:wrap; align-items:center; gap:4px 16px; margin-top:12px; }
.period-calendar-key>span { display:flex; align-items:center; gap:7px; color:var(--muted); font-size:13px; line-height:1.55; }
.period-calendar-key>p { font-size:17px; line-height:1.55; }
.period-scale-key { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:8px; padding-top:8px; border-top:1px solid var(--line-soft); font-size:13px; line-height:1.5; color:var(--muted); }
.period-insights { display:grid; gap:16px; }
.is-week .period-insights { grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); grid-template-areas:'trend report' 'comparison report'; align-items:start; gap:0 28px; margin-top:20px; padding-top:20px; border-top:1px solid var(--line-soft); }
.period-trend,.period-trend-empty { grid-area:trend; min-width:0; margin:0; }
.is-month .period-trend,.is-month .period-trend-empty { grid-area:auto; }
.period-trend-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:14px; }
.period-trend-heading>span { font-size:13px; color:var(--muted); white-space:nowrap; }
.period-trend-frame { display:grid; grid-template-columns:68px minmax(0,1fr); gap:8px; }
.period-trend-yaxis { height:120px; position:relative; color:var(--muted); font-size:12px; }
.period-trend-yaxis>span { position:absolute; left:0; line-height:1.4; transform:translateY(-50%); }
.period-trend-yaxis>span:nth-child(1) { top:5px; }
.period-trend-yaxis>span:nth-child(2) { top:60px; }
.period-trend-yaxis>span:nth-child(3) { top:115px; }
.period-trend-chart { position:relative; min-width:0; height:143px; margin-inline:4px; }
.period-trend-chart>svg { display:block; width:100%; height:120px; overflow:visible; }
.period-trend-chart>svg>line { stroke:var(--line-soft); stroke-width:1; vector-effect:non-scaling-stroke; }
.period-trend-chart>svg>polyline { fill:none; stroke:var(--gold); stroke-width:1.5; stroke-linejoin:round; stroke-linecap:round; vector-effect:non-scaling-stroke; }
.period-trend-points { position:absolute; top:0; left:0; right:0; height:120px; pointer-events:none; }
.period-trend-points>i { position:absolute; display:block; width:7px; height:7px; border:1px solid var(--surface); border-radius:50%; background:var(--gold-light); transform:translate(-50%,-50%); }
.period-trend-dates { position:relative; min-width:0; height:19px; margin-top:4px; color:var(--muted); font-size:12px; line-height:1.5; font-variant-numeric:tabular-nums; }
.period-trend-dates>span { position:absolute; top:0; white-space:nowrap; }
.period-trend-dates>span:nth-child(1) { left:0; }
.period-trend-dates>span:nth-child(2) { transform:translateX(-50%); }
.period-trend-dates>span:nth-child(3) { right:0; }
.period-trend>figcaption { margin-top:6px; font-size:13px; line-height:1.55; color:var(--muted); }
.period-trend-empty { padding:4px 0; }
.period-trend-empty>p { margin-top:8px; max-width:410px; font-size:17px; line-height:1.55; }
.period-trend-empty>.text-button { min-height:44px; margin-top:4px; padding:0; gap:8px; font-size:15px; color:var(--gold-light); }
.period-trend-empty .icon { width:15px; height:15px; }
.period-previous-comparison { min-width:0; grid-area:comparison; border-top:1px solid var(--line-soft); }
.is-month .period-previous-comparison { grid-area:auto; }
.is-week .period-previous-comparison { margin-top:12px; }
.period-previous-comparison>summary { display:flex; align-items:center; flex-wrap:wrap; gap:4px 12px; min-height:44px; padding-block:8px; }
.period-previous-comparison>summary>span { flex:1; font-size:13px; color:var(--muted); }
.period-previous-comparison>summary>span>small { display:block; margin-top:2px; font-size:13px; line-height:1.5; }
.period-previous-comparison>summary>strong { font-size:15px; line-height:1.5; font-weight:600; color:var(--text); }
.period-previous-comparison>p { margin-bottom:8px; font-size:17px; line-height:1.55; }
.period-export { grid-area:report; min-width:0; padding-top:16px; border-top:1px solid var(--line-soft); }
.is-month .period-export { grid-area:auto; }
.is-week .period-export { padding:0 0 0 28px; border-top:0; border-left:1px solid var(--line-soft); }
.period-export-heading { display:flex; align-items:center; gap:8px; }
.period-export-heading>.icon { width:17px; height:17px; color:var(--gold); }
.period-export>p { margin-top:6px; font-size:17px; line-height:1.55; }
.period-notes-choice { display:flex; align-items:flex-start; gap:10px; min-height:44px; margin-top:12px; padding-block:4px; color:var(--text); font-size:15px; line-height:1.6; cursor:pointer; }
.period-notes-choice>input { width:17px; height:17px; margin:1px 0 0; accent-color:var(--gold); flex-shrink:0; }
.period-notes-choice>input:disabled { opacity:.45; }
.period-notes-choice:has(input:disabled) { color:var(--muted); cursor:default; }
.period-notes-choice small { display:block; margin-top:2px; font-size:13px; line-height:1.6; color:var(--muted); }
.period-export-actions { display:flex; align-items:center; flex-wrap:wrap; gap:4px 20px; margin-top:12px; }
.period-export-actions>.button { min-height:46px; padding:12px 18px; gap:14px; font-size:15px; }
.period-export-actions>.text-button { min-height:44px; font-size:13px; padding:0; gap:7px; }
.period-export-actions .icon { width:16px; height:16px; }
.period-export-actions button:disabled { opacity:.45; cursor:default; }
.period-export>p.period-export-hint { margin-top:8px; font-size:15px; line-height:1.55; }
.period-method { margin-top:20px; border-top:1px solid var(--line-soft); }
.period-method>summary { display:flex; align-items:center; gap:8px; min-height:44px; font-size:13px; color:var(--muted); }
.period-method>p { max-width:880px; padding-bottom:4px; font-size:17px; line-height:1.55; }
.period-export-error { font-size:17px; line-height:1.55; color:var(--red); margin-top:12px; }
@media (hover:hover) and (pointer:fine) {
 .period-week-day:hover:not(:disabled),.period-calendar-day:hover:not(:disabled),.period-arrow:hover:not(:disabled) { border-color:var(--gold); }
 .period-current:hover:not(:disabled),.period-help>summary:hover,.period-method>summary:hover { color:var(--gold-light); }
}
@media (prefers-reduced-motion:no-preference) {
 .period-segments>button { transition:color 150ms ease,background-color 150ms ease; }
}
@media (max-width:1023px) {
 .period-workspace.is-month { gap:24px; grid-template-columns:1fr 1fr; }
 .period-summary { gap:20px; grid-template-columns:1.2fr .9fr 1fr; }
 .period-mean>strong { font-size:22px; }
 .period-week { display:flex; overflow-x:auto; padding:1px 1px 8px; overscroll-behavior-x:contain; scroll-snap-type:x proximity; scrollbar-width:thin; scrollbar-color:var(--line) transparent; }
 .period-week-day { flex:0 0 112px; scroll-snap-align:start; }
 .period-trend-frame { grid-template-columns:60px minmax(0,1fr); gap:6px; }
 .period-trend-yaxis { font-size:11px; }
 .is-week .period-insights { gap-inline:24px; }
 .is-week .period-export { padding-left:24px; }
 .period-export-actions { gap:0 12px; }
}
@media (max-width:767px) {
 .journal-period-overview { padding:20px; margin-top:24px; }
 .period-heading { flex-direction:column; gap:16px; }
 .period-heading h3 { font-size:25px; }
 .period-heading p { font-size:17px; }
 .period-segments { align-self:stretch; }
 .period-segments>button { flex:1; }
 .period-help { margin-top:8px; }
 .period-help ol { grid-template-columns:1fr; gap:16px; padding-top:4px; }
 .period-toolbar { flex-direction:column; align-items:stretch; gap:12px; }
 .period-toolbar h4 { font-size:20px; }
 .period-navigation { justify-content:space-between; }
 .period-current { flex:1; }
 .period-summary { grid-template-columns:1fr 1fr; gap:20px; margin-top:20px; padding-bottom:24px; }
 .period-mean { grid-column:1/-1; }
 .period-mean>strong { font-size:25px; text-wrap:initial; }
 .period-stat>strong { font-size:24px; }
 .period-comparison>strong { font-size:16px; }
 .period-workspace.is-month { grid-template-columns:minmax(0,1fr); gap:24px; }
 .period-insights,.is-week .period-insights { display:flex; flex-direction:column; gap:16px; }
 .period-insights>* { width:100%; }
 .period-calendar-day { min-height:60px; padding-top:8px; }
 .period-month-grid,.period-weekday-row { gap:4px; }
 .period-calendar-key { gap:4px 12px; }
 .period-calendar-key>p { flex-basis:100%; }
 .period-trend-frame { grid-template-columns:68px minmax(0,1fr); gap:8px; }
 .period-trend-yaxis { font-size:12px; }
 .is-week .period-export { padding:16px 0 0; border-left:0; border-top:1px solid var(--line-soft); }
 .is-week .period-previous-comparison { margin-top:0; }
 .period-export-actions { flex-direction:column; align-items:stretch; gap:4px; }
 .period-export-actions>.button { width:100%; }
 .period-export-actions>.text-button { justify-content:center; }
 .period-notes-choice { font-size:15px; }
 .period-notes-choice small { font-size:13px; }
 .period-export>p.period-export-hint { font-size:15px; }
 .period-method { margin-top:16px; }
}
@media (max-width:390px) {
 .journal-period-overview { padding:16px; }
 .period-heading h3 { font-size:23px; }
 .period-summary { gap:16px; }
 .period-mean>strong { font-size:23px; }
 .period-stat>span { font-size:15px; }
 .period-comparison>strong { font-size:15px; }
 .period-calendar-value { font-size:12px; }
 .period-weekday-row>span { font-size:13px; }
 .period-trend-frame { grid-template-columns:60px minmax(0,1fr); gap:6px; }
 .period-trend-yaxis,.period-trend-dates { font-size:11px; }
 .period-previous-comparison>summary { gap:4px 8px; }
}
@media (prefers-reduced-motion:reduce) { .period-week { scroll-behavior:auto; } }
