/* Piontime 32 — a quiet, legible, responsive visual system. */
:root {
 --ink:#213a33;--ink-soft:#52655e;--muted:#6d7d75;--surface:#fff;
 --surface-soft:#f2f6f2;--line:rgba(44,76,60,.09);--line-strong:rgba(44,76,60,.16);
 --card-line:rgba(53,88,68,.10);--radius:14px;--radius-lg:24px;
 --card-shadow:0 8px 32px -20px rgba(34,63,48,.20),0 1px 2px rgba(34,63,48,.025);
 --shadow-elevated:0 24px 70px -24px rgba(30,59,43,.22);
 --ease-out:cubic-bezier(.2,.8,.2,1);
}
:root[data-theme="auto"],:root[data-theme="spring"] {--accent:#357660;--accent-hover:#285e4b;--accent-soft:#ecf5ee;--page:#f6f7f2;}
:root[data-theme="summer"] {--accent:#30768d;--accent-hover:#245d70;--accent-soft:#eaf4f6;--page:#f3f7f7;}
:root[data-theme="autumn"] {--accent:#a66936;--accent-hover:#855029;--accent-soft:#fbf1e6;--page:#f9f6f0;}
:root[data-theme="winter"] {--accent:#526f9a;--accent-hover:#3e587e;--accent-soft:#eef2f8;--page:#f4f6fa;}
:root[data-theme="neutral"] {--accent:#56685d;--accent-hover:#3d4d43;--accent-soft:#f0f3ef;--page:#f5f6f3;}
:root[data-theme="auto"][data-season="summer"] {--accent:#30768d;--accent-hover:#245d70;--accent-soft:#eaf4f6;}
:root[data-theme="auto"][data-season="autumn"] {--accent:#52755b;--accent-hover:#3d5945;--accent-soft:#f0f4e9;--page:#f8f7f1;}
:root[data-theme="auto"][data-season="winter"] {--accent:#526f9a;--accent-hover:#3e587e;--accent-soft:#eef2f8;--page:#f4f6fa;}
body {background:radial-gradient(ellipse at 12% 0%,color-mix(in srgb,var(--accent) 5%,transparent),transparent 45%),var(--page);font-size:15px;}
button,input,textarea,select {font:inherit;}
button {touch-action:manipulation;}
.app-shell {width:min(1184px,100%);padding-inline:32px;}
.topbar {gap:20px;min-height:86px;background:color-mix(in srgb,var(--page) 93%,transparent);border-bottom:1px solid var(--line);box-shadow:none;}
.brand-copy strong {color:var(--ink);font-weight:700;letter-spacing:-.025em;}
.brand-copy small {font-size:11px;letter-spacing:.055em;}
.brand-mark {border-radius:15px;box-shadow:0 4px 12px -5px rgba(29,76,51,.25);}
.view-tabs {height:48px;padding:4px;border-radius:16px;background:#e9ede6;border:1px solid rgba(42,69,52,.035);box-shadow:inset 0 1px 3px rgba(40,65,50,.035);}
.view-tab {height:38px;min-width:96px;border-radius:12px;color:var(--muted);font-size:13px;gap:8px;}
.view-tab.is-active {background:#fff;color:var(--accent-hover);box-shadow:0 2px 6px rgba(35,58,42,.07),0 0 0 1px rgba(35,58,42,.025);}
.header-actions>.icon-button {background:rgba(255,255,255,.74);border-radius:14px;box-shadow:none;}
.header-actions>.icon-button:hover {background:var(--accent-soft);}
.summary-band {overflow:hidden;margin-top:25px;border-radius:24px;background:linear-gradient(112deg,#edf4eb 0%,#f3f7ef 55%,#f6f7ed 100%);border:1px solid rgba(79,113,78,.10);box-shadow:var(--card-shadow);}
.summary-band::after {content:"";position:absolute;right:12px;top:50%;width:170px;height:140px;transform:translateY(-50%);background:url('assets/time-garden-v32.svg') center/contain no-repeat;pointer-events:none;}
.summary-item {padding:26px 32px;gap:7px;}
.summary-month {padding-right:166px;border-left:1px solid rgba(70,111,72,.09);}
.summary-value {font-size:clamp(25px,3.5vw,38px);line-height:1.3;font-weight:650;font-variant-numeric:tabular-nums;letter-spacing:-.045em;color:#2c5841;}
.summary-value>span:last-child {color:#62806b;font-weight:450;font-size:.52em;letter-spacing:0;}
.summary-label {font-size:12px;color:#62775f;letter-spacing:.06em;}
.summary-meta {font-size:11px;color:#718169;}
.summary-divider {display:none;}
.calendar-layout {gap:24px;margin-top:26px;grid-template-columns:minmax(0,1fr) 290px;align-items:start;}
.calendar-tool,.month-goal-card,.day-panel {border:1px solid var(--card-line);border-radius:22px;box-shadow:var(--card-shadow);background:#fff;}
.calendar-tool {padding-bottom:14px;overflow:hidden;}
.calendar-toolbar {min-height:84px;padding:20px 24px 15px;background:transparent;}
.month-navigation {gap:12px;}
.month-navigation h1 {font-size:21px;font-weight:650;letter-spacing:-.035em;}
.month-navigation .icon-button {border:1px solid var(--line);border-radius:11px;background:#fff;width:33px;height:33px;}
.quiet-button {border-radius:11px;min-height:36px;font-size:12px;font-weight:600;}
.weekday-row {margin:0 18px;padding:8px 0 12px;background:none;color:#8b978e;font-size:11px;font-weight:500;}
.calendar-grid {margin:0 14px;gap:5px;}
.calendar-day {border:1px solid transparent;border-radius:14px;background:#fafbf8;min-height:72px;isolation:isolate;}
.calendar-day.is-outside {background:transparent;opacity:.42;}
.calendar-day:not(.is-outside):hover {background:var(--accent-soft);}
.calendar-day.is-selected {background:color-mix(in srgb,var(--accent-soft) 80%,white);box-shadow:inset 0 0 0 1.5px var(--accent),0 3px 8px -5px var(--accent);}
.calendar-day.is-today:not(.is-selected) {box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 35%,transparent);}
.day-number {font-size:13px;font-weight:550;font-variant-numeric:tabular-nums;}
.day-duration {font-size:9px;letter-spacing:-.01em;}
.calendar-side {gap:20px;}
.month-goal-card {padding:22px;min-height:178px;text-align:left;}
.month-goal-top {background:transparent;}
.month-goal-label {font-size:12px;color:var(--muted);}
.month-goal-value {font-size:28px;font-weight:600;line-height:1.45;letter-spacing:-.03em;}
.month-goal-meta {font-size:11px;line-height:1.6;}
.month-goal-track {height:5px;flex-basis:5px;background:var(--accent-soft);border-radius:8px;}
.month-goal-track>span {background:linear-gradient(90deg,var(--accent),#94b88c);border-radius:8px;transition:width 600ms var(--ease-out);}
.month-goal-edit {width:30px;height:30px;border-radius:10px;}
.day-panel {padding:22px;min-height:292px;}
.day-panel-header {background:none;padding:0;}
.day-panel-header h2 {font-size:13px;}
.day-panel-header .icon-button {width:31px;height:31px;}
.day-total {font-size:27px;font-weight:600;margin-top:18px;letter-spacing:-.04em;}
.day-date {font-size:11px;margin-top:5px;color:var(--muted);}
.empty-state {padding:14px 8px 6px;border:0;background:none;gap:4px;}
.empty-state p {font-size:12px;line-height:1.7;color:#859188;}
.empty-illustration {width:98px;height:72px;object-fit:contain;display:block;margin:auto;}
.record-row {padding:15px 0;border-bottom:1px solid var(--line);}
.record-duration>span {font-size:15px;font-weight:600;}
.record-duration small {color:var(--muted);font-size:11px;}
.analysis-header {margin-top:34px;margin-bottom:26px;align-items:center;}
.analysis-header h1 {font-size:30px;font-weight:650;letter-spacing:-.045em;}
.analysis-header-actions {display:flex;align-items:center;gap:8px;flex-shrink:0;}
.analysis-record-button {width:44px;height:44px;flex-shrink:0;border:1px solid var(--line);border-radius:13px;background:var(--accent-soft);box-shadow:none;}
.eyebrow {font-size:10px;font-weight:650;color:var(--accent);letter-spacing:.085em;line-height:1.5;}
.trend-overview {margin:28px 0 0;background:transparent;border:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);box-shadow:none;border-radius:0;}
.trend-block {padding:22px 6px;}
.trend-block>span {font-size:12px;}
.trend-block strong {font-size:22px;}
.trend-block small {font-size:11px;}
.analysis-layout {margin-top:28px;}
.analysis-main {gap:28px;min-width:0;}
.analysis-section {border-radius:22px;}
.section-heading {padding-bottom:16px;}
.section-heading h2 {font-size:18px;font-weight:650;}
.monthly-chart {padding:20px 14px 14px;border:1px solid var(--card-line);border-radius:20px;background:#fff;box-shadow:var(--card-shadow);gap:8px;}
.bar-button {min-width:42px;border-radius:10px;padding:4px;}
.bar-plot {height:166px;}
.bar-fill {background:linear-gradient(180deg,#abc2a1,#d8e4d2);border-radius:7px 7px 3px 3px;min-height:0;max-height:100%;transform-origin:bottom;animation:bar-rise 580ms var(--ease-out) both;}
.bar-button.is-current .bar-fill {background:linear-gradient(180deg,var(--accent),color-mix(in srgb,var(--accent) 72%,white));box-shadow:0 4px 12px -7px var(--accent);}
.bar-button.is-future {opacity:.46;}
.bar-button.is-future .bar-fill {min-height:3px!important;height:3px!important;background:#e6ebe2;}
.bar-value {font-size:10px;font-weight:550;white-space:nowrap;}
.bar-label {font-size:11px;color:var(--muted);}
.quarter-grid {gap:12px;}
.quarter-card {border-radius:17px;box-shadow:none;padding:20px;background:#fff;}
.quarter-card.is-current {border-color:color-mix(in srgb,var(--accent) 30%,white);background:linear-gradient(140deg,#fff,var(--accent-soft));}
.quarter-card.is-future {opacity:.66;}
.quarter-total {font-size:22px;letter-spacing:-.03em;}
.quarter-trend {font-size:11px;line-height:1.7;}
.quarter-current-tag {font-size:10px;border-radius:7px;background:var(--accent-soft);color:var(--accent);}
.table-wrap {border-radius:18px;overflow:auto;border:1px solid var(--line);box-shadow:none;background:#fff;}
.table-wrap table {min-width:610px;font-size:12px;}
.table-wrap th {background:#f6f8f3;font-size:11px;font-weight:600;padding:15px 18px;white-space:nowrap;}
.table-wrap td {padding:15px 18px;white-space:nowrap;border-bottom:1px solid var(--line);}
.table-wrap tr.is-current td {background:var(--accent-soft);font-weight:550;}
.ai-panel {border-radius:22px;background:linear-gradient(135deg,#fff,#f7faf4);padding:26px;border:1px solid var(--card-line);box-shadow:var(--card-shadow);}
.ai-panel-header h2 {font-size:18px;}
.ai-icon {border-radius:13px;background:var(--accent-soft);}
.ai-content {font-size:14px;line-height:1.95;color:var(--ink-soft);}
.ai-content h3 {font-size:14px;color:var(--ink);margin:22px 0 8px;font-weight:650;}
.ai-content h3:first-child {margin-top:0;}
.ai-content p {margin:10px 0;}
.ai-content ul,.ai-content ol {padding-left:22px;}
.ai-content li {margin:9px 0;}
.ai-updated {font-size:10px;color:var(--muted);border-top:1px solid var(--line);padding-top:14px;margin-top:22px;}
.insight-dashboard {display:grid;gap:20px;}
.insight-section-heading {display:flex;justify-content:space-between;gap:16px;align-items:flex-end;}
.insight-section-heading h2 {font-size:20px;font-weight:600;letter-spacing:-.03em;margin:3px 0 0;}
.insight-section-heading .eyebrow {margin:0;}
.insight-asof {font-size:11px;color:var(--muted);white-space:nowrap;}
.insight-metrics {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;}
.insight-metric {min-width:0;padding:22px 21px;border-radius:18px;border:1px solid var(--card-line);background:#fff;box-shadow:var(--card-shadow);}
.insight-metric-top {display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--muted);font-size:11px;}
.insight-metric-top svg {width:17px;height:17px;color:var(--accent);stroke-width:1.5;flex-shrink:0;}
.insight-metric strong {display:block;margin:14px 0 7px;font-size:clamp(18px,2.1vw,26px);font-weight:600;letter-spacing:-.04em;line-height:1.4;font-variant-numeric:tabular-nums;}
.insight-metric small {display:block;font-size:10px;line-height:1.6;color:var(--muted);}
.insight-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;}
.insight-card {min-width:0;background:#fff;border:1px solid var(--card-line);border-radius:22px;padding:26px;box-shadow:var(--card-shadow);}
.insight-card-header {display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:22px;}
.insight-card-header .eyebrow {margin:0 0 5px;}
.insight-card-header h2 {margin:0;font-size:18px;font-weight:600;letter-spacing:-.025em;line-height:1.45;}
.insight-card-header>svg {height:19px;width:19px;color:var(--accent);stroke-width:1.5;}
.insight-goal-layout {display:flex;align-items:center;gap:25px;}
.insight-ring {position:relative;flex:0 0 128px;width:128px;height:128px;}
.insight-ring svg {display:block;width:100%;height:100%;}
.insight-ring-track {stroke:#edf2e9;}
.insight-ring-progress {stroke:var(--accent);stroke-linecap:round;transition:stroke-dasharray 700ms var(--ease-out);}
.insight-ring-center {position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;}
.insight-ring-center strong {font-size:28px;font-weight:600;letter-spacing:-.06em;color:var(--accent-hover);}
.insight-ring-center span {font-size:10px;color:var(--muted);}
.insight-goal-stats {margin:0;flex:1;min-width:0;display:grid;gap:14px;}
.insight-goal-stats>div {display:flex;gap:10px;justify-content:space-between;align-items:baseline;}
.insight-goal-stats dt {font-size:11px;color:var(--muted);}
.insight-goal-stats dd {margin:0;font-size:13px;font-weight:550;text-align:right;font-variant-numeric:tabular-nums;}
.insight-fact {padding:14px 16px;margin-top:22px;border-radius:12px;background:var(--accent-soft);color:var(--accent-hover);font-size:12px;line-height:1.85;}
.insight-goal-button {margin-top:12px;padding:0;background:transparent;color:var(--accent);text-align:left;}
.insight-note {color:var(--muted);font-size:11px;line-height:1.85;margin:16px 0 0;}
.insight-comparison,.insight-forecast {display:flex;flex-direction:column;gap:8px;}
.insight-comparison>span,.insight-forecast>span {font-size:12px;color:var(--muted);}
.insight-comparison strong {font-size:22px;font-weight:550;letter-spacing:-.03em;line-height:1.4;}
.insight-comparison small,.insight-forecast small {font-size:11px;color:var(--muted);line-height:1.6;}
.insight-forecast {margin-top:20px;padding-top:20px;border-top:1px dashed var(--line-strong);}
.insight-forecast strong {font-size:24px;font-weight:600;color:var(--accent);letter-spacing:-.04em;}
.insight-weekly-chart {display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:18px;padding:12px 0 0;}
.insight-week-bar {display:flex;flex-direction:column;align-items:center;border:0;padding:0 6px;border-radius:10px;background:none;min-width:0;color:var(--ink);cursor:pointer;}
.insight-week-plot {height:170px;width:100%;display:flex;flex-direction:column;align-items:center;}
.insight-week-track {height:140px;width:min(100%,42px);display:flex;align-items:flex-end;border-bottom:1px solid var(--line-strong);}
.insight-week-fill {width:100%;height:var(--bar-size);min-height:2px;border-radius:7px 7px 3px 3px;background:linear-gradient(0deg,#d9e5d4,#adc5a4);transform-origin:bottom;animation:bar-rise 650ms var(--ease-out) both;}
.insight-week-bar.is-current .insight-week-fill {background:linear-gradient(0deg,color-mix(in srgb,var(--accent) 75%,white),var(--accent));}
.insight-week-bar[aria-pressed="true"] {background:var(--accent-soft);}
.insight-week-value {font-size:11px;font-weight:600;margin:0 0 9px;white-space:nowrap;}
.insight-week-label {font-size:10px;color:var(--muted);padding:10px 0;white-space:nowrap;}
.insight-chart-detail {padding:12px 16px;border-radius:11px;background:#f6f8f3;font-size:12px;line-height:1.7;min-height:45px;margin:15px 0 0;color:var(--ink-soft);}
.insight-distribution {display:grid;gap:15px;}
.insight-distribution-row {display:grid;grid-template-columns:34px minmax(0,1fr) 54px;align-items:center;gap:15px;font-size:11px;color:var(--muted);}
.insight-distribution-track {height:7px;border-radius:10px;background:#f1f4ed;overflow:hidden;}
.insight-distribution-fill {display:block;height:100%;border-radius:10px;background:linear-gradient(90deg,#abc49e,var(--accent));transform-origin:left;animation:bar-wide 700ms var(--ease-out);}
.insight-distribution-row strong {font-size:11px;font-weight:550;text-align:right;color:var(--ink);}
.insight-period-stack {display:flex;gap:4px;border-radius:10px;overflow:hidden;height:28px;background:#f3f5ef;}
.insight-period-stack>span {min-width:3px;}
.period-0 {background:#e1b879;}.period-1 {background:#81a386;}.period-2 {background:#7b94ad;}.period-3 {background:#d7dcd3;}
.insight-period-legend {display:grid;gap:18px;margin-top:24px;}
.insight-period-legend>div {display:grid;grid-template-columns:9px minmax(0,1fr) auto 32px;align-items:center;gap:10px;font-size:12px;}
.insight-period-dot {height:8px;width:8px;border-radius:3px;}
.insight-period-legend strong {font-weight:550;font-size:12px;}
.insight-period-legend small {text-align:right;color:var(--muted);font-size:10px;}
.insight-plan-choices {display:flex;flex-wrap:wrap;gap:9px;}
.insight-plan-choices button {font-size:12px;border-radius:12px;min-height:39px;box-shadow:none;}
.insight-plan-choices button[aria-pressed="true"] {color:var(--accent-hover);background:var(--accent-soft);border-color:var(--accent);}
.insight-plan-result {padding:20px 0 0;}
.insight-plan-result>strong {font-size:19px;font-weight:600;}
.insight-plan-result>p {font-size:12px;line-height:1.85;color:var(--ink-soft);margin:10px 0;}
.insight-plan-result>small {font-size:11px;color:var(--muted);line-height:1.85;display:block;}
.insight-methods {border-radius:14px;background:#f0f3eb;border:1px solid var(--line);padding:15px 20px;font-size:12px;line-height:1.9;color:var(--muted);}
.insight-methods summary {cursor:pointer;color:var(--ink-soft);font-weight:550;}
.insight-methods ul {padding-left:20px;margin:12px 0 0;}
.insight-methods li {margin:6px 0;}
#aiView .analysis-chat {border-radius:24px;border-color:var(--card-line);background:linear-gradient(145deg,#fff,#f8faf5);box-shadow:var(--card-shadow);}
#aiView .chat-header {padding-top:18px;}
.chat-heading h2 {font-weight:600;font-size:16px;}
#aiView .chat-status {font-size:10px;color:var(--muted);}
#aiView .chat-welcome {max-width:620px;margin:auto;gap:10px;padding-top:20px;}
#aiView .chat-welcome h3 {font-size:clamp(23px,3vw,31px);font-weight:550;letter-spacing:-.05em;color:var(--ink);line-height:1.4;}
#aiView .chat-welcome>p {font-size:13px;line-height:1.85;max-width:380px;color:var(--muted);}
.chat-welcome-art {width:156px;height:130px;object-fit:contain;margin:0 auto 8px;animation:quiet-float 8s ease-in-out infinite;}
#aiView .chat-suggestions {gap:9px;margin-top:14px;display:flex;flex-wrap:wrap;justify-content:center;}
#aiView .chat-suggestions button {background:rgba(255,255,255,.95);border:1px solid var(--line-strong);border-radius:12px;font-size:11px;padding:11px 14px;box-shadow:0 3px 10px -7px rgba(38,65,47,.15);white-space:normal;line-height:1.5;}
#aiView .chat-suggestions button:hover {background:var(--accent-soft);}
.chat-message-content {min-width:0;max-width:100%;padding:15px 18px;border-radius:16px;background:#fff;border:1px solid var(--line);font-size:14px;line-height:1.9;overflow-wrap:anywhere;white-space:pre-wrap;}
.is-assistant .chat-message-content {background:transparent;border:0;padding:3px 0 10px;white-space:normal;}
.is-user .chat-message-content {background:var(--accent-soft);color:var(--ink);border-color:transparent;}
.chat-message-content p {margin:0 0 12px!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;white-space:pre-wrap;}
.chat-message-content p:last-child {margin-bottom:0!important;}
.chat-message-content h3 {font-size:14px;font-weight:650;margin:20px 0 8px;line-height:1.6;}
.chat-message-content h3:first-child {margin-top:0;}
.chat-message-content ul,.chat-message-content ol {margin:10px 0;padding-left:23px;}
.chat-message-content li {margin:8px 0;}
.chat-message-content a {color:var(--accent);text-decoration:underline;text-underline-offset:3px;}
.chat-message-content code,.ai-content code {background:#edf2e9;border-radius:5px;padding:2px 4px;font-size:.92em;}
.chat-message-content pre {max-width:100%;overflow:auto;padding:14px;border-radius:12px;background:#edf2e9;white-space:pre;font-size:12px;}
.rich-table-wrap {max-width:100%;overflow:auto;margin:14px 0;border:1px solid var(--line);border-radius:10px;}
.rich-table-wrap table {min-width:260px;width:100%;border-collapse:collapse;font-size:12px;}
.rich-table-wrap th,.rich-table-wrap td {padding:9px 12px;text-align:left;border-bottom:1px solid var(--line);}
.rich-table-wrap th {background:#eef3e9;font-weight:600;}
.rich-quote {border-left:3px solid var(--accent)!important;padding-left:12px!important;color:var(--muted);}
#aiView .chat-form {border-top-color:var(--line);background:rgba(255,255,255,.9);padding-top:16px;}
#chatInput {background:#f5f7f2;border:1px solid var(--line);border-radius:17px;line-height:1.7;padding:15px 58px 15px 17px;font-size:14px;}
#chatInput:focus {border-color:color-mix(in srgb,var(--accent) 50%,white);box-shadow:0 0 0 3px var(--accent-soft);outline:none;}
.chat-send-button {border-radius:12px;box-shadow:0 3px 9px -5px var(--accent);}
.chat-thinking-track {border-radius:10px;background:#eef2e8;border:1px solid var(--line);}
.chat-thinking-thumb {border-radius:7px;background:#fff;box-shadow:0 1px 4px rgba(30,60,40,.08);}
.chat-thinking-track button {font-size:11px;}
#chatInputHint {font-size:10px;}
.app-dialog {border-radius:24px;background:#fcfdf9;padding:28px;border:1px solid rgba(255,255,255,.9);box-shadow:0 32px 100px -24px rgba(23,49,32,.30);}
.app-dialog::backdrop {background:rgba(25,44,31,.30);backdrop-filter:blur(5px);}
.dialog-header h2 {font-size:22px;font-weight:650;letter-spacing:-.035em;}
.field>span,.field>label {font-size:12px;}
.field input,.field select,.field textarea {border-radius:12px;border-color:var(--line-strong);background:#fff;}
.primary-button {border-radius:12px;background:var(--accent);box-shadow:0 3px 7px -4px var(--accent-hover),inset 0 1px rgba(255,255,255,.18);}
.secondary-button,.danger-button {border-radius:12px;box-shadow:none;}
.quick-toggle {width:54px;height:54px;border-radius:18px;background:var(--accent);box-shadow:0 10px 25px -9px rgba(38,71,47,.38),inset 0 1px rgba(255,255,255,.24);}
.quick-menu {border-radius:18px;border:1px solid var(--line);box-shadow:var(--shadow-elevated);padding:7px;}
.quick-option {border-radius:12px;font-size:13px;}
.view-panel:not([hidden]) {animation:panel-arrive 340ms var(--ease-out) both;}
@keyframes panel-arrive {from{opacity:.5;transform:translateY(7px)}to{opacity:1;transform:none}}
@keyframes bar-rise {from{transform:scaleY(.02);opacity:.45}to{transform:scaleY(1);opacity:1}}
@keyframes bar-wide {from{transform:scaleX(.02)}to{transform:scaleX(1)}}
@keyframes quiet-float {0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-5px) rotate(1deg)}}
@media(hover:hover){.insight-week-bar:hover{background:var(--accent-soft)}.insight-metric:hover{border-color:color-mix(in srgb,var(--accent) 25%,white)}}
@media(min-width:1100px){.calendar-day{min-height:78px}.calendar-layout{grid-template-columns:minmax(0,1fr) 310px}.month-goal-card{min-height:191px}}
@media(max-width:960px){.app-shell{padding-inline:22px}.calendar-layout{grid-template-columns:minmax(0,1fr) 254px;gap:18px}.summary-item{padding-inline:25px}.summary-month{padding-right:124px}.summary-band::after{width:130px;right:3px}.insight-metrics{gap:10px}.insight-metric{padding:18px 14px}.insight-card{padding:22px}.insight-goal-layout{gap:15px}.insight-ring{width:112px;height:112px;flex-basis:112px}.insight-goal-stats>div{display:block}.insight-goal-stats dd{text-align:left;margin-top:4px}}
@media(max-width:720px){
 .app-shell{padding-inline:16px}.topbar{min-height:112px;gap:12px;padding-top:12px;padding-bottom:12px;background:color-mix(in srgb,var(--page) 96%,white)}
 .view-tabs{height:44px;border-radius:14px;width:100%}.view-tab{height:35px;min-width:0;flex:1;border-radius:10px;font-size:12px}
 .header-actions>.icon-button{height:36px;width:36px;border-radius:12px}.header-actions{gap:7px}.brand-copy strong{font-size:16px}.brand-copy small{font-size:10px}
 .summary-band{margin-top:18px;border-radius:19px}.summary-item{padding:20px 20px;gap:5px}.summary-month{padding-right:20px}.summary-band::after{display:none}.summary-value{font-size:25px}.summary-meta{font-size:10px}.summary-label{font-size:11px}
 .calendar-layout{grid-template-columns:1fr;gap:18px;margin-top:19px}.calendar-toolbar{padding:18px 16px 12px;min-height:72px}.calendar-tool{border-radius:20px}.calendar-grid{margin:0 10px;gap:4px}.weekday-row{margin:0 10px}.calendar-day{min-height:62px;border-radius:12px}.calendar-side{display:grid;grid-template-columns:1fr 1.22fr;gap:12px;align-items:stretch}.month-goal-card{padding:18px;min-height:190px;border-radius:18px}.day-panel{padding:18px;min-height:220px;border-radius:18px}.month-goal-value{font-size:23px}.day-total{font-size:23px}.day-panel-header h2{font-size:12px}.empty-illustration{width:80px;height:61px}.empty-state p{font-size:10px}.record-row{flex-wrap:wrap;gap:8px}.record-actions{margin-left:auto}
 .analysis-header{margin-top:26px;margin-bottom:22px}.analysis-header h1{font-size:27px}.ai-status-button{font-size:10px;padding:7px 10px;min-height:34px;gap:5px}.insight-dashboard{gap:15px}.insight-section-heading h2{font-size:18px}.insight-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.insight-metric{padding:17px 15px;border-radius:16px}.insight-metric strong{font-size:23px;margin:11px 0 4px}.insight-metric-top{font-size:10px}.insight-metric small{font-size:10px}.insight-grid{grid-template-columns:1fr;gap:15px}.insight-card{padding:21px;border-radius:19px}.insight-card-header{margin-bottom:19px}.insight-card-header h2{font-size:17px}.insight-goal-layout{gap:28px}.insight-ring{width:120px;height:120px;flex-basis:120px}.insight-goal-stats>div{display:flex}.insight-goal-stats dd{text-align:right;margin:0}.insight-fact{font-size:12px;margin-top:17px}.insight-comparison strong{font-size:21px}.insight-weekly-chart{gap:4px}.insight-week-bar{padding-inline:3px}.insight-week-value{font-size:9px}.insight-week-label{font-size:9px;letter-spacing:-.03em}.insight-week-track{width:min(100%,27px);height:111px}.insight-week-plot{height:140px}.insight-chart-detail{font-size:11px;padding:10px 12px}.insight-note{font-size:10px}.insight-section-heading{gap:8px}.insight-asof{font-size:10px}.insight-methods{padding:13px 16px;font-size:11px}.insight-plan-result>strong{font-size:17px}
 .trend-overview{margin-top:24px}.trend-block{padding:20px 8px}.trend-block strong{font-size:20px}.trend-block small{font-size:10px}.trend-block>span{font-size:11px}.quarter-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.quarter-card{padding:17px 14px}.quarter-total{font-size:21px}.quarter-trend{font-size:10px}.quarter-current-tag{font-size:9px;padding:3px 5px}.bar-plot{height:150px}.ai-panel{padding:21px;border-radius:19px}.ai-content{font-size:13px}.ai-panel-header{gap:10px}.ai-panel-header .secondary-button{font-size:11px;padding:9px 11px}
 #aiView .analysis-chat{border-radius:19px}#aiView .chat-header,#aiView .chat-status,#aiView .chat-messages,#aiView .chat-form{padding-inline:18px}#aiView .chat-welcome{padding-top:8px}.chat-welcome-art{width:125px;height:108px;margin-bottom:4px}#aiView .chat-welcome h3{font-size:24px}#aiView .chat-welcome>p{font-size:12px;max-width:270px}#aiView .chat-suggestions{gap:7px;margin-top:7px}#aiView .chat-suggestions button{font-size:10px;padding:9px 11px}.chat-message-content{font-size:13px;padding:12px 14px}.is-assistant .chat-message-content{padding:3px 0}.chat-message-avatar{flex-shrink:0}#chatInput{font-size:16px;padding-top:12px;padding-bottom:12px}.chat-input-options{gap:6px}.app-dialog{border-radius:22px;padding:23px 20px}.quick-toggle{width:50px;height:50px;border-radius:16px}.quick-actions{right:20px}
}
@media(max-width:400px){.app-shell{padding-inline:12px}.summary-item{padding:18px 15px}.summary-value{font-size:22px}.summary-meta{font-size:9px}.calendar-side{grid-template-columns:1fr}.month-goal-card{min-height:145px}.day-panel{min-height:220px}.insight-card{padding:19px 17px}.insight-goal-layout{gap:17px}.insight-goal-stats dt{font-size:10px}.insight-goal-stats dd{font-size:11px}.insight-metric strong{font-size:20px}.calendar-day{min-height:54px}.day-duration{font-size:8px}.insight-weekly-chart{gap:0}.insight-week-label{font-size:8px}.insight-asof{white-space:normal;text-align:right;max-width:88px}.chat-input-options{flex-wrap:wrap}#chatInputHint{font-size:9px}.chat-welcome-art{width:100px;height:83px}#aiView .chat-welcome h3{font-size:21px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.bar-fill,.insight-week-fill,.insight-distribution-fill{transform:none!important}}
@media print{.topbar,.quick-actions,.chat-form,.insight-goal-button,.insight-plan-choices,.ai-status-button{display:none!important}.app-shell{width:100%;padding:0}.insight-card,.insight-metric,.analysis-section{box-shadow:none;break-inside:avoid}.view-panel{animation:none!important}.insight-methods{display:block}.insight-grid{gap:12px}}
/* Resolve legacy size containment and nested spacing; content drives card height. */
.calendar-side {contain:none;grid-template-rows:auto auto;}
.calendar-layout .month-goal-card {height:auto;min-height:200px;justify-content:flex-start;}
.calendar-layout .month-goal-top,.calendar-layout .day-panel-header {flex-basis:auto;min-height:32px;padding:0 0 14px;border:0;background:none;backdrop-filter:none;}
.calendar-layout .month-goal-value,.calendar-layout .day-total {display:block;flex:none;min-height:0;margin:0;padding:5px 0 0;line-height:1.45;}
.calendar-layout .month-goal-card .month-goal-value {font-size:30px;}
.calendar-layout .month-goal-meta,.calendar-layout .day-date {min-height:0;margin:7px 0 0;line-height:1.65;}
.calendar-layout .month-goal-track {margin:16px 0 0;flex:none;}
.calendar-layout .day-panel {min-height:242px;}
.calendar-layout .record-list {padding:16px 0 0;margin:0;overflow:visible;}
.calendar-layout .day-panel-header h2 {font-size:13px;}
.calendar-layout .month-goal-label {font-size:12px;}
:root[data-theme][data-season] .summary-band {background:linear-gradient(110deg,color-mix(in srgb,var(--accent-soft) 76%,white),color-mix(in srgb,var(--page) 75%,white));border-color:var(--card-line);}
:root[data-theme][data-season] .topbar {background:color-mix(in srgb,var(--page) 96%,transparent);}
.summary-value {color:var(--accent-hover);}
.summary-value>span:last-child,.summary-label,.summary-meta {color:var(--ink-soft);}
.calendar-day .day-duration {font-family:inherit;font-size:12px;font-weight:550;color:var(--accent-hover);line-height:1.4;}
.calendar-day .day-water {opacity:.7;}
.calendar-day .day-wave-art img {filter:saturate(.45) drop-shadow(0 1px 1px rgba(38,80,55,.10));}
@media(max-width:720px){
 .calendar-side{grid-template-rows:auto;}
 .calendar-layout .month-goal-card{min-height:195px;}
 .calendar-layout .month-goal-card .month-goal-value{font-size:27px;}
 .calendar-layout .day-panel{min-height:220px;}
 .calendar-day .day-duration{font-size:10px;}
}
@media(max-width:400px){
 .calendar-side{grid-template-rows:auto auto;}
 .calendar-layout .month-goal-card{min-height:160px;}
}
/* Keep the original daily water-level meaning with new muted jade artwork. */
.day-water::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 32' preserveAspectRatio='none'%3E%3Cpath d='M0 16 Q30 0 60 16 T120 16 T180 16 T240 16 V32 H0Z' fill='%23a2bfab'/%3E%3C/svg%3E");}
.day-water::after{background:linear-gradient(#a2bfab,#7ea894);}
.calendar-day .day-wave-art img{filter:drop-shadow(0 1px 1px rgba(38,80,55,.08));}
html[lang] .calendar-layout .month-goal-card .month-goal-value{font-size:32px;}
html[lang] .calendar-layout .month-goal-label,html[lang] .calendar-layout .day-panel-header h2{font-size:13px;}
@media(max-width:720px){html[lang] .calendar-layout .month-goal-card .month-goal-value{font-size:28px}.calendar-layout .record-actions{padding-right:0;}}
@media(max-width:640px){.calendar-layout .month-goal-top{padding-right:57px;}.calendar-layout .day-panel-header{padding-right:57px;}.app-shell{padding-bottom:94px;}.calendar-grid{grid-template-rows:repeat(6,minmax(58px,auto));}}
