:root {
  color-scheme: light;
  --paper: #f8f8f2;
  --card: #fffefa;
  --ink: #26362c;
  --muted: #606e61;
  --green: #315942;
  --green-dark: #274b36;
  --line: #e4e8db;
  --soft-green: #edf1e5;
  --shell: 1120px;
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px;
  background: var(--paper);
  color: var(--ink);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; }
button, a { -webkit-tap-highlight-color: transparent; }
button, a, input, textarea { outline-offset: 3px; }
:focus-visible { outline: 2px solid #407954; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 1.12rem; letter-spacing: -.035em; line-height: 1.35; }
h3 { font-size: .92rem; letter-spacing: -.02em; }
strong { font-weight: 680; }
svg { display: block; flex: 0 0 auto; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 10; left: 16px; top: 10px; padding: 10px; background: white; color: var(--green); translate: 0 -200%; }
.skip-link:focus { translate: 0; }

.site-header { border-bottom: 1px solid #e8eadd; background: #fbfbf6; }
.header-inner { height: 74px; max-width: var(--shell); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--green-dark); text-decoration: none; }
.brand img { display: block; }
.brand-name { display: flex; align-items: baseline; gap: 10px; font-family: Georgia, serif; font-size: 1.65rem; font-weight: 700; letter-spacing: -.055em; }
.brand-name span { color: #637061; font: 550 .74rem/1.2 "Noto Sans KR", "Apple SD Gothic Neo", sans-serif; letter-spacing: .01em; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-date { display: flex; align-items: center; gap: 7px; color: #526454; font-size: .82rem; font-weight: 600; }
.support-header { flex: none; min-height: 44px; padding: 6px 11px; border: 1px solid #d2dfcd; border-radius: 11px; background: #edf3e8; color: var(--green-dark); font-size: .875rem; font-weight: 670; white-space: nowrap; }
.support-header:hover { background: #e4efde; }
.avatar.icon-button { background: #e8eee1; border-color: #e0e8d8; font-weight: 750; }
.icon-button { display: inline-grid; flex: 0 0 auto; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--green); padding: 0; }
.icon-button:hover:not(:disabled) { background: #eef3e8; border-color: #beceb9; }
.icon-button:disabled { color: #a0aa9b; background: #fbfbf6; }

.page-shell { max-width: var(--shell); margin: 0 auto; padding: 27px 24px calc(110px + env(safe-area-inset-bottom)); outline: none; }
.hero { display: flex; min-height: 237px; position: relative; isolation: isolate; align-items: center; overflow: hidden; border-radius: 24px; border: 1px solid #e0e8d6; background: #e9efdf; }
.hero::before { content: ""; position: absolute; z-index: -1; inset: 0 0 0 41%; background: linear-gradient(90deg, #e9efdf 0%, #e9efdf80 19%, #e9efdf00 42%), url("./meadow.webp") center 56% / cover no-repeat; }
.hero-copy { z-index: 0; padding: 28px 38px 30px; }
.hero-kicker { display: flex; align-items: center; gap: 6px; color: #45644d; font-size: .76rem; font-weight: 650; margin-bottom: 12px; }
.hero h1, .page-intro h1 { font-family: "Noto Serif KR", "Nanum Myeongjo", "AppleMyungjo", Georgia, serif; font-weight: 700; letter-spacing: -.06em; color: #274332; }
.hero h1 { font-size: clamp(2rem, 3.35vw, 3.08rem); line-height: 1.17; }
.hero-description { margin-top: 13px; color: #526653; font-size: .9rem; letter-spacing: -.02em; }

.dashboard, .workspace-grid { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.dashboard { margin-top: 18px; }
.dashboard-main, .dashboard-side { display: grid; gap: 16px; min-width: 0; }
.card { min-width: 0; background: var(--card); border-radius: 20px; border: 1px solid var(--line); padding: 20px 22px; box-shadow: 0 2px 5px #31432b05; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; }
.title-lockup { display: flex; align-items: center; gap: 9px; min-width: 0; }
.section-icon { background: var(--soft-green); color: #486b4d; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto; }
.section-copy { color: var(--muted); font-size: .82rem; line-height: 1.48; margin-top: 6px; }
.arrow-button { width: 38px; height: 38px; }
.calendar-period { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; margin: 8px 0; }
.calendar-period .arrow-button { width: 44px; height: 44px; }
.calendar-range { color: var(--ink); text-align: center; font-size: .92rem; font-weight: 650; }
.week-grid, .rhythm-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.calendar-weekdays { text-align: center; font-size: .78rem; color: var(--muted); padding-bottom: 5px; }
.week-day { background: transparent; min-width: 0; min-height: 78px; border: 1px solid transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px 1px; border-radius: 12px; }
.home-month-grid .week-day { min-height: clamp(50px, 7vw, 66px); padding: 4px 1px; border-radius: 10px; background: #fafbf5; border-color: #edf0e4; }
.week-day:not(:disabled):hover, .rhythm-cell:not(:disabled):hover { background: #f0f3e9; }
.week-day.selected, .rhythm-cell.selected { background: #eaf0e2; border-color: #b9cbb2; }
.week-day .weekday { font-size: .72rem; color: #647462; }
.week-day strong { font-size: 1rem; color: #334b3b; line-height: 1.14; }
.week-day[aria-current="date"] strong { text-decoration: underline; text-underline-offset: 3px; }
.week-day:disabled strong, .week-day:disabled .weekday { color: #899588; }
.day-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #dbe3d4; margin: 4px 0; }
.today-dot { background: #6b8a66; }
.date-caption { flex: 0 0 auto; color: #586f55; background: #edf2e7; border-radius: 999px; padding: 5px 9px; font-size: .73rem; font-weight: 650; }
.mood-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-top: 14px; }
.mood-option { display: grid; justify-items: center; align-content: center; gap: 6px; border: 1px solid #eef0e6; background: #fafaf5; border-radius: 12px; min-height: 79px; padding: 6px 3px; font-size: .875rem; font-weight: 650; letter-spacing: -.04em; line-height: 1.2; }
.mood-option > span:last-child { max-width: 100%; overflow-wrap: anywhere; word-break: keep-all; }
.mood-option:hover, .mood-option.chosen { border-color: var(--mood-ink); background: color-mix(in srgb, var(--mood-bg) 37%, #fffefa); }
.mood-option.chosen { box-shadow: inset 0 0 0 1px var(--mood-ink); }
.more-moods { margin-top: 8px; }
.more-moods summary { min-height: 44px; padding: 10px; align-content: center; cursor: pointer; border: 1px solid var(--line); border-radius: 10px; background: #f8f9f2; font-size: .875rem; font-weight: 650; }
.more-moods summary:hover { background: var(--soft-green); }
.more-moods .mood-grid { margin-top: 7px; }
.extra-mood-selection { margin-inline-start: 8px; color: var(--green); }
.face { display: inline-grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; background: var(--mood-bg); color: var(--mood-ink); }
.face svg { width: 100%; height: 100%; }
.calendar-face { width: 18px; height: 18px; margin: -2px 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 45px; border: 1px solid transparent; border-radius: 11px; padding: 9px 15px; font-size: .86rem; font-weight: 680; }
.primary { color: #fff; background: var(--green); }
.primary:hover { background: var(--green-dark); }
.start-button { width: 100%; margin-top: 13px; }
.start-button svg:last-child { margin-left: auto; }
.start-button svg:first-child { margin-right: auto; }
.streak-card { background: #f0f3e8; border-color: #e3e9d8; }
.streak-card .section-icon { background: #e4ebd9; }
.streak-number { display: flex; align-items: baseline; gap: 7px; margin-top: 12px; font-family: Georgia, serif; font-weight: 700; color: #365641; font-size: 3.14rem; line-height: 1; }
.streak-number span { font-family: "Noto Sans KR", sans-serif; color: #516955; font-size: 1rem; letter-spacing: -.045em; }
.progress-copy { margin-top: 18px; display: flex; justify-content: space-between; color: #526553; font-size: .78rem; }
.progress-copy strong { color: var(--green-dark); }
.progress-segments { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 8px; }
.progress-segments i { border-radius: 20px; height: 6px; background: #dce5d5; }
.progress-segments .filled { background: #60865f; }
.aside-copy { color: var(--muted); font-size: .79rem; line-height: 1.55; margin-top: 11px; }
.empty-aside { color: #667465; font-size: .85rem; line-height: 1.65; border: 1px dashed #dfe5d6; border-radius: 12px; padding: 17px 14px; background: #fafbf4; margin-top: 13px; }
.recent-entry { display: flex; gap: 9px; align-items: center; margin-top: 12px; }
.recent-entry .face { width: 35px; height: 35px; }
.recent-entry div { display: grid; gap: 2px; }
.muted { color: var(--muted); font-size: .77rem; }
.preview-text { overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; white-space: pre-wrap; }
.text-button { border: 0; background: transparent; color: var(--green); display: inline-flex; align-items: center; justify-content: center; gap: 4px; border-radius: 7px; padding: 5px 3px; min-height: 36px; font-size: .79rem; font-weight: 720; }
.text-button:hover { background: #edf3e7; }
.recent-card .text-button { margin-top: 4px; }

.dock { position: fixed; z-index: 3; bottom: calc(15px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(496px, calc(100vw - 26px)); padding: 6px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; border: 1px solid #dde5d7; border-radius: 19px; background: #fffefaf5; box-shadow: 0 6px 24px #354f3a17; backdrop-filter: blur(14px); }
.dock button { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 51px; padding: 3px; border: 0; background: transparent; color: #626f62; border-radius: 13px; font-size: .72rem; font-weight: 620; }
.dock button:hover { background: #f1f4ed; }
.dock button[aria-current] { background: #e6eede; color: var(--green-dark); font-weight: 760; }
:root[data-viewport-shortened] .dock { visibility: hidden; }
.notice { position: fixed; z-index: 4; bottom: calc(94px + env(safe-area-inset-bottom)); left: 50%; transform: translate(-50%, 6px); opacity: 0; min-width: max-content; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 12px; background: var(--green-dark); color: #fff; pointer-events: none; transition: opacity .17s, transform .17s; font-size: .82rem; }
.notice.visible { opacity: 1; transform: translate(-50%, 0); }
.notice.error { background: #7b3e34; }
.storage-error, .form-error { color: #873c32; background: #f9eae6; border-radius: 9px; padding: 10px; font-size: .84rem; }
.storage-error { margin-bottom: 12px; }

.page-intro { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #e9efdf; border: 1px solid #e0e8d6; border-radius: 20px; padding: 22px 26px; margin-bottom: 17px; }
.page-intro h1 { font-size: clamp(1.7rem, 3vw, 2.48rem); line-height: 1.19; }
.page-intro p { margin-top: 8px; font-size: .87rem; line-height: 1.45; color: #526653; }
.page-intro-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 17px; background: #dce8d5; color: #406348; flex: 0 0 auto; }
.editor-grid { grid-template-areas: "write settings"; }
.writing-card { grid-area: write; }
.settings-card { grid-area: settings; }
.journal-settings > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; }
.journal-settings > summary::-webkit-details-marker { display: none; }
.journal-settings > summary::after { content: ""; width: 7px; height: 7px; flex: none; border: solid var(--green); border-width: 0 2px 2px 0; transform: rotate(45deg); margin: -3px 3px 0 1px; }
.journal-settings[open] > summary::after { transform: rotate(225deg); margin-top: 3px; }
.settings-title { font-size: 1.05rem; font-weight: 700; letter-spacing: -.03em; }
.settings-selection { margin-inline-start: auto; text-align: end; font-size: .875rem; font-weight: 650; color: var(--green); }
.journal-compose { display: none; }
.saved-pill { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; color: #47634c; border-radius: 999px; padding: 5px 8px; background: #ecf3e5; font-size: .72rem; }
.segmented { display: inline-flex; gap: 3px; padding: 4px; background: #eff2e9; border: 1px solid #e9ede2; border-radius: 12px; }
.segmented button { border: 1px solid transparent; padding: 6px 13px; min-height: 41px; border-radius: 8px; color: #5b6b5d; background: transparent; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 650; font-size: .84rem; }
.segmented button:hover { background: #f8faf4; }
.segmented button[aria-pressed="true"] { color: var(--green-dark); background: #fffefa; border-color: #e1e8da; box-shadow: 0 1px 2px #31432b08; }
.calendar-view { flex: 0 0 auto; padding: 2px; }
.calendar-view button { min-width: 46px; padding-inline: 9px; }
.editor-modes { display: flex; margin: 15px 0; }
.editor-modes button { flex: 1; }
.field-label { font-size: .87rem; line-height: 1.4; font-weight: 660; display: block; margin: 0 0 7px; }
textarea, input[type="text"] { color: var(--ink); border: 1px solid #dce4d5; border-radius: 11px; padding: 11px 12px; width: 100%; background: #fdfdf8; }
textarea { min-height: 106px; display: block; resize: vertical; line-height: 1.65; }
textarea::placeholder, input[type="text"]::placeholder { color: #6e796b; }
.editor-footer { display: flex; gap: 7px; justify-content: space-between; align-items: center; margin-top: 14px; }
.editor-footer p { color: var(--muted); font-size: .77rem; line-height: 1.4; }
.editor-footer .button { flex: 0 0 auto; }
.form-error { margin-top: 8px; }
.settings-card .mood-option { min-height: 70px; }
.settings-card .face { width: 36px; height: 36px; }
.editor-details { border-top: 1px solid var(--line); padding-top: 13px; margin-top: 15px; }
.detail-title, .strength-labels { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.detail-title { margin-bottom: 7px; }
.detail-title span, .strength-labels { color: var(--muted); font-size: .7rem; }
.strength-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.strength-options button { min-height: 42px; border-radius: 8px; border: 1px solid var(--line); background: #f8f9f3; color: #506553; font-weight: 650; }
.strength-options button:hover, .tag-list button:hover { background: #ebf1e4; }
.strength-options button[aria-pressed="true"], .tag-list button[aria-pressed="true"] { background: #e4eedd; border-color: #9db599; color: #284a34; }
.strength-labels { margin-top: 5px; }
.tag-list, .entry-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: #f5f7ef; border-radius: 999px; padding: 4px 8px; color: #526554; font-size: .73rem; font-weight: 600; }
button.tag { min-height: 35px; }
.prompt-track { display: flex; gap: 5px; align-items: center; margin-bottom: 10px; color: var(--muted); font-size: .75rem; }
.prompt-track button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: #f5f7ee; color: #516b53; }
.prompt-track button[aria-pressed="true"] { background: var(--green); color: #fff; border-color: var(--green); }
.prompt-track span { margin-left: auto; }
.prompt { display: flex; border-radius: 11px; background: #edf3e8; align-items: center; gap: 7px; padding: 10px; color: var(--green-dark); font-size: .88rem; font-weight: 650; margin-bottom: 8px; }
.prompt span { padding: 5px; border-radius: 8px; background: #e0ebd9; }
.next-question { margin: 5px 0 0 auto; display: flex; width: max-content; }

.analysis-controls { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; }
.analysis-controls .segmented button { min-width: 44px; }
.analysis-period { display: flex; justify-content: center; align-items: center; gap: 6px; }
.analysis-period strong { text-align: center; padding: 0 3px; min-width: 133px; font-size: .84rem; }
.rhythm-grid { gap: 5px; margin-top: 10px; }
.rhythm-cell { background: #fafbf6; border: 1px solid #eaf0e4; border-radius: 9px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 85px; min-width: 0; padding: 5px 1px; }
.rhythm-cell:disabled { opacity: .65; }
.rhythm-day { color: #58695b; font-size: .74rem; white-space: nowrap; }
.rhythm-face, .rhythm-empty { width: 34px; height: 34px; }
.rhythm-empty { display: grid; place-items: center; color: #899587; }
.rhythm-strength { font-size: .7rem; font-weight: 650; color: #526754; }
.month-rhythm { margin-top: 4px; }
.month-rhythm .rhythm-cell { min-height: 56px; }
.month-rhythm .rhythm-face, .month-rhythm .rhythm-empty { width: 25px; height: 25px; }
.month-weekdays { text-align: center; color: var(--muted); font-size: .75rem; }
.day-preview { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; padding: 12px; border-radius: 12px; background: #f2f5ec; margin-top: 12px; }
.day-preview.blank p { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.day-preview .text-button { flex: 0 0 auto; }
.day-entry { display: flex; align-items: flex-start; gap: 9px; min-width: 0; }
.day-entry > div { min-width: 0; }
.day-entry strong { display: block; margin-top: 2px; }
.day-entry .preview-text { color: #4b5e50; font-size: .83rem; line-height: 1.55; margin-top: 5px; }
.entry-tags { margin-top: 5px; }
.history-card { margin-top: 16px; }
.history-list { display: grid; margin-top: 6px; }
.history-row { display: flex; align-items: center; width: 100%; text-align: left; background: transparent; padding: 8px 2px; border: 0; border-bottom: 1px solid #e9eee2; gap: 9px; min-height: 49px; }
.history-row:last-child { border-bottom: 0; }
.history-row:hover { background: #f6f8ef; }
.history-row > span:nth-child(2) { display: grid; gap: 3px; flex: 1; min-width: 0; }
.history-row .face { width: 34px; height: 34px; }
.history-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.history-row strong { font-size: .82rem; }


.analysis-period { margin-left: auto; }
.analysis-today { white-space: nowrap; padding-inline: 7px; }
.insight-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; }
.insight-metrics > div { padding: 13px 14px; min-width: 0; border: 1px solid #e2e8da; border-radius: 14px; background: #edf2e7; }
.insight-metrics dt { color: #516655; font-size: .77rem; font-weight: 650; }
.insight-metrics dd { margin: 5px 0 0; color: var(--green-dark); font-size: 1.42rem; line-height: 1.3; font-weight: 760; letter-spacing: -.04em; }
.insight-metrics dd small { color: #4f6653; font-size: .78rem; font-weight: 600; letter-spacing: 0; }
.insight-metrics .metric-moods { font-size: 1.06rem; overflow-wrap: anywhere; }
.insight-metrics .metric-note { color: #596c5a; margin-top: 4px; font-size: .7rem; font-weight: 500; letter-spacing: 0; }
.trend-views { margin-top: 10px; }
.trend-views button { min-height: 36px; }
.intensity-chart { --plot-row: 25px; display: grid; grid-template-columns: 18px minmax(0, 1fr); margin: 13px 0 2px; }
.chart-axis { display: grid; grid-template-rows: repeat(5, var(--plot-row)); color: #536958; font-size: .7rem; padding-top: 5px; }
.chart-axis span { align-self: start; transform: translateY(-50%); }
.chart-scroll { overflow-x: auto; padding-top: 5px; padding-bottom: 4px; scrollbar-color: #afc0aa #f1f4ec; scrollbar-width: thin; }
.chart-columns { position: relative; display: grid; grid-template-columns: repeat(var(--days), minmax(0, 1fr)); }
.monthly-chart .chart-columns { grid-template-columns: repeat(var(--days), minmax(30px, 1fr)); }
.chart-day { display: grid; grid-template-rows: calc(5 * var(--plot-row)) 28px; min-width: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; align-items: stretch; }
.chart-day:hover:not(:disabled) { background: #f2f6ec; }
.chart-day.selected { background: #e9f0e2; }
.chart-day:focus-visible { outline-offset: -2px; }
.chart-plot { display: flex; align-items: flex-end; justify-content: center; background: repeating-linear-gradient(0deg, #dfe7da 0 1px, transparent 1px calc(20% - 1px), #dfe7da calc(20% - 1px) 20%); }
.chart-bar { display: block; width: min(45%, 28px); height: calc(var(--level) * 20%); border-radius: 5px 5px 0 0; background: var(--bar-color); }
.chart-caption { align-self: center; justify-self: center; border-radius: 6px; padding: 3px 4px; color: #506654; font-size: .7rem; }
.chart-day.selected .chart-caption { font-weight: 750; color: var(--green-dark); }
.chart-day:disabled .chart-caption { color: #899588; }
.comparison-table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: .77rem; line-height: 1.45; color: #435b49; }
.comparison-table th, .comparison-table td { vertical-align: middle; border-bottom: 1px solid #e8ece1; padding: 7px 3px; text-align: center; }
.comparison-table thead { color: #365641; background: #f1f5ec; }
.comparison-table thead th:first-child { border-radius: 7px 0 0 7px; }
.comparison-table thead th:last-child { border-radius: 0 7px 7px 0; }
.comparison-table th:first-child { text-align: left; padding-left: 6px; }
.comparison-table th:nth-child(n+2), .comparison-table td { width: 34%; }
.comparison-table th small, .comparison-table td small { display: block; color: #627161; font-size: .67rem; font-weight: 500; }
.comparison-table tbody tr:last-child > * { border-bottom: 0; }
.comparison-mood { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.comparison-mood .face { width: 20px; height: 20px; }
.explorer-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 18px; margin-top: 11px; }
.explorer-filters { align-self: start; padding: 11px; border-radius: 12px; background: #f3f6ef; }
.explorer h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.explorer-filters h3:not(:first-child) { margin-top: 13px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.filter-chips .tag { min-height: 40px; padding: 4px 8px; background: var(--card); }
.filter-chips .tag:hover, .filter-chips .tag[aria-pressed="true"] { background: #e5efdd; border-color: #9db599; color: #284a34; }
.mood-chip .face { width: 23px; height: 23px; }
.history-row .history-tags { font-size: .69rem; color: #536b55; }
.day-reading { display: grid; gap: 14px; margin-top: 13px; }
.day-reading > div { padding: 11px; border: 1px solid var(--line); border-radius: 11px; }
.day-reading p, .day-reading dd { margin: 7px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #405544; font-size: .87rem; line-height: 1.65; }
.day-reading dl { margin: 7px 0 0; }
.day-reading dt { margin-top: 10px; color: #486550; font-size: .8rem; font-weight: 700; }
.day-reading dd { margin-top: 2px; }

#profile-form { margin-top: 12px; }
#profile-form .button { margin-top: 10px; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 16px 0 0; }
.profile-stats div { padding: 9px; background: #f2f5ec; border-radius: 10px; }
.profile-stats dt { color: var(--muted); font-size: .74rem; }
.profile-stats dd { margin: 3px 0 0; color: var(--green-dark); font-weight: 700; font-size: .9rem; }
.storage-card p { color: #566657; font-size: .83rem; line-height: 1.66; margin-top: 10px; }
.backup-status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; padding: 10px 12px; margin-top: 13px; border-radius: 10px; background: #eef3e9; color: var(--green-dark); font-size: .875rem; }
.backup-status-line span { color: var(--muted); }
#backup-panel fieldset { min-width: 0; margin-inline: 0; }
.backup-destinations { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; border: 0; margin-top: 15px; }
.backup-destinations legend, .backup-conflict legend { margin-bottom: 6px; color: var(--green-dark); font-size: .875rem; font-weight: 680; }
.backup-destinations label, .backup-conflict label { display: flex; align-items: start; gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fcfdf7; font-size: .875rem; cursor: pointer; }
.backup-destinations label { align-items: center; min-height: 44px; }
#backup-panel input[type="radio"] { accent-color: var(--green); margin: 2px 0; flex: none; }
.backup-destinations label:has(:checked), .backup-conflict label:has(:checked) { border-color: #77957b; background: #edf4e9; }
#backup-panel .field-label { margin-top: 13px; margin-bottom: 4px; }
#backup-panel input[type="password"], #backup-file { width: 100%; min-height: 44px; border: 1px solid #dce4d5; border-radius: 9px; padding: 8px; color: var(--ink); background: #fdfdf8; }
#backup-file { font-size: .875rem; }
.backup-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 13px; }
.backup-actions .quiet { border-color: var(--line); color: var(--green-dark); background: #f7f9f2; }
.backup-actions button:disabled { opacity: .6; }
.backup-subview { margin-top: 16px; }
.backup-subview h3 { color: var(--green-dark); font-size: 1rem; }
.backup-acknowledge { display: flex; align-items: start; gap: 8px; margin-top: 12px; color: var(--green-dark); font-size: .875rem; }
.backup-acknowledge input { flex: none; accent-color: var(--green); }
.backup-archives { display: grid; gap: 8px; padding: 0; list-style: none; margin: 12px 0; }
.backup-archives li { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; font-size: .875rem; }
#backup-panel .backup-result { color: var(--green-dark); font-size: .875rem; }
#backup-panel .backup-result:empty { display: none; }
#backup-panel .backup-error { color: #903c30; }
.backup-conflict { display: grid; gap: 6px; border: 0; padding: 0; margin-top: 14px; }
.backup-conflict label > span { min-width: 0; overflow-wrap: anywhere; }
.backup-conflict label > span > * { display: block; }
.backup-preview { white-space: pre-wrap; max-height: 12rem; overflow: auto; margin-top: 5px; }
@media (max-width: 800px) {
  .header-inner { padding: 0 18px; }
  .page-shell { padding-inline: 18px; }
  .dashboard, .workspace-grid { gap: 12px; }
  .card { padding: 15px; }
  .mood-grid { gap: 4px; }
}
@media (max-width: 655px) {
  :root { scroll-padding-block: 10px calc(83px + env(safe-area-inset-bottom)); }
  .site-header { padding-top: env(safe-area-inset-top); }
  .header-inner { min-height: 58px; height: auto; padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right)); }
  .brand { gap: 7px; }
  .brand img { width: 35px; height: 35px; }
  .brand-name { font-size: 1.4rem; gap: 6px; }
  .brand-name span { font-size: .65rem; }
  .header-actions { gap: 6px; }
  .header-date { gap: 4px; font-size: .69rem; }
  .header-date svg { width: 13px; height: 13px; }
  .avatar.icon-button { width: 44px; height: 44px; }
  .page-shell { padding: 12px max(12px, env(safe-area-inset-right)) calc(95px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .hero { min-height: 168px; border-radius: 17px; }
  .hero::before { left: 28%; background-position: center, 62% 55%; background-image: linear-gradient(90deg, #e9efdf 0%, #e9efdfb5 26%, #e9efdf19 65%), url("./meadow.webp"); }
  .hero-copy { padding: 16px; }
  .hero-kicker { font-size: .68rem; margin-bottom: 7px; }
  .hero h1 { font-size: clamp(1.58rem, 7vw, 2rem); }
  .hero-description { margin-top: 8px; font-size: .875rem; line-height: 1.45; }
  .dashboard, .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard { margin-top: 12px; }
  .dashboard-main, .dashboard-side { gap: 11px; }
  .editor-grid { grid-template-areas: "settings" "write"; }
  .card { border-radius: 15px; padding: 12px; }
  .card h2 { font-size: 1rem; }
  .section-copy, .aside-copy { font-size: .875rem; }
  .section-copy { line-height: 1.55; }
  .title-lockup { gap: 7px; }
  .section-icon { width: 31px; height: 31px; }
  .arrow-button { width: 44px; height: 44px; }
  .week-grid { gap: 3px; }
  .week-day { min-height: 59px; gap: 3px; padding: 4px 1px; }
  .mood-option { min-height: 68px; gap: 4px; border-radius: 10px; }
  .mood-option .face { width: 32px; height: 32px; }
  .settings-card .mood-option { min-height: 65px; }
  .settings-card .face { width: 31px; height: 31px; }
  .journal-compose { display: flex; width: 100%; margin-top: 12px; }
  .strength-options button, .text-button, button.tag, .filter-chips .tag, .segmented button { min-height: 44px; }
  .text-button, .tag, .segmented button, .button { font-size: .875rem; }
  .prompt-track button { width: 44px; height: 44px; }
  .editor-footer { align-items: stretch; flex-direction: column; gap: 8px; }
  .editor-footer p { font-size: .875rem; }
  .writing-body textarea { min-height: 140px; }
  .editor-date { flex-wrap: wrap; }
  .page-intro { padding: 13px 14px; margin-bottom: 12px; border-radius: 15px; }
  .page-intro p { font-size: .875rem; margin-top: 6px; }
  .page-intro-icon { width: 42px; height: 42px; border-radius: 12px; }
  .analysis-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .analysis-controls > .segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-column: 1; grid-row: 1; padding: 2px; }
  .analysis-controls:not(:has(.analysis-today)) > .segmented { grid-column: 1 / -1; }
  .analysis-controls .segmented button { min-width: 0; padding-inline: 5px; }
  .analysis-period { display: grid; grid-column: 1 / -1; grid-template-columns: auto minmax(0, 1fr) auto; margin: 0; padding: 3px; border: 1px solid var(--line); border-radius: 12px; }
  .analysis-period strong { min-width: 0; font-size: .875rem; }
  .analysis-today { grid-column: 2; grid-row: 1; padding-inline: 10px; }
  .insight-metrics { gap: 7px; margin-bottom: 12px; }
  .insight-metrics > div { padding: 9px; border-radius: 10px; }
  .insight-metrics dt, .insight-metrics dd small, .insight-metrics .metric-note { font-size: .81rem; line-height: 1.4; }
  .insight-metrics dd { font-size: 1.16rem; }
  .insight-metrics .metric-moods { font-size: 1rem; }
  .monthly-chart .chart-columns { grid-template-columns: repeat(var(--days), minmax(44px, 1fr)); }
  .explorer-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .rhythm-grid { gap: 3px; }
  .rhythm-cell { min-height: 74px; }
  .rhythm-face, .rhythm-empty { width: 28px; height: 28px; }
  .comparison-table { font-size: .85rem; }
  .comparison-mood { white-space: normal; overflow-wrap: anywhere; }
  .dock { inset-inline: max(9px, env(safe-area-inset-left)) max(9px, env(safe-area-inset-right)); bottom: calc(7px + env(safe-area-inset-bottom)); transform: none; width: auto; padding: 4px; border-radius: 16px; }
  .dock button { min-height: 50px; border-radius: 11px; font-size: .875rem; }
  .notice { min-width: 0; width: max-content; }
}
@media (max-width: 900px) and (max-height: 500px) {
  body:has(textarea:focus, input:is([type="text"],[type="password"]):focus) .dock { visibility: hidden; }
}
@media (max-width: 420px) {
  .insight-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .insight-metrics > div:last-child { grid-column: 1 / -1; }
  .day-preview { flex-direction: column; }
  .backup-actions .button { flex: 1 1 auto; max-width: 100%; min-width: 0; text-align: center; }
}
@media (max-width: 365px) {
  .brand-name span { display: none; }
  .header-date { font-size: .68rem; }
  .mood-option .face, .settings-card .mood-option .face { width: 27px; height: 27px; }
  .rhythm-day { font-size: .68rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

.language-card { margin-top: 16px; }
.language-terms { margin-top: 10px; }
.language-terms .tag { flex-wrap: wrap; max-width: 100%; align-content: center; overflow-wrap: anywhere; }
.language-terms strong { color: #556b57; font-size: .68rem; white-space: nowrap; }
.language-examples { display: grid; gap: 6px; margin-top: 14px; }
.language-example { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 4px 8px; }
.language-example blockquote { margin: 0; color: #465b49; font-size: .83rem; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.language-example .text-button { flex: 0 0 auto; }
.language-example mark { color: #334936; background: #e2edda; border-radius: 3px; padding: 0 2px; }
.reflection-prompt { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #eef3e9; }
.reflection-prompt p { color: #46604b; font-size: .84rem; line-height: 1.6; margin-top: 4px; overflow-wrap: anywhere; }

.reflection-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.reflection-card + .brain-card { margin-top: 16px; }
.reflection-card .button { min-height: 44px; flex: none; }
.monthly-report-card { margin-top: 0; margin-bottom: 14px; }
.monthly-report-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.monthly-report-actions a { text-decoration: none; }
#monthly-report-form { display: grid; gap: 10px; margin-top: 12px; }
#monthly-report-form details { padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
#monthly-report-form summary { cursor: pointer; font-size: .88rem; font-weight: 680; }
#monthly-report-form label { display: block; font-size: .87rem; font-weight: 650; margin: 10px 0 6px; }
#monthly-report-fill { margin-top: 8px; }
#monthly-report-generate { justify-self: start; }
.reflection-dialog {
  width: min(520px, calc(100% - 24px)); max-height: calc(var(--visible-height, 100dvh) - 28px);
  overflow: auto; border: 1px solid var(--line); border-radius: 16px;
  padding: clamp(14px, 4vw, 22px); color: #2e4636; background: #fffefa;
  box-shadow: 0 18px 65px #25382a38;
}
.reflection-dialog::backdrop { background: #263a2d77; }
.reflection-dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 1; background: var(--card); }
.reflection-close { width: 40px; height: 40px; font-size: 1.3rem; line-height: 1; }
#reflection-form { display: grid; gap: 7px; }
.reflection-membership { padding: 11px; margin: 8px 0 10px; border: 1px solid var(--line); border-radius: 11px; background: #f4f7ee; }
.reflection-membership .section-copy { margin: 0; }
.reflection-membership-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.reflection-membership-actions:has(button:not([hidden])) { margin-top: 9px; }
.reflection-membership-actions button { min-height: 44px; }
@media (max-width: 520px) { .reflection-membership-actions button { flex: 1 1 auto; } }
#reflection-form label { margin-top: 8px; color: #384f3d; font-size: .83rem; font-weight: 700; }
#reflection-form select { border: 1px solid var(--line); border-radius: 9px; background: #f8faf4; color: #2e4636; font: inherit; font-size: .9rem; padding: 8px; min-height: 40px; }
#reflection-excerpt { resize: vertical; min-height: 94px; }
.reflection-length { text-align: right; color: var(--muted); font-size: .72rem; }
#reflection-privacy { margin: 0; }
.reflection-send { justify-self: end; margin-top: 4px; min-height: 44px; }
.reflection-send:disabled, .reflection-card .button:disabled { opacity: .57; }
.reflection-status { color: #415c48; font-size: .82rem; margin: 10px 0 0; }
.reflection-status:empty { display: none; }
.reflection-result { background: #eef3e9; border: 1px solid var(--line); border-radius: 10px; padding: 11px; margin-top: 13px; }
.reflection-result h3 { margin: 0; font-size: .86rem; }
.reflection-result p, .reflection-result blockquote { margin: 5px 0 11px; color: #405546; font-size: .85rem; line-height: 1.58; white-space: pre-wrap; overflow-wrap: anywhere; }
.reflection-result p:last-child { margin-bottom: 0; }
.reflection-result blockquote { border-left: 2px solid #a6b8a0; padding-left: 8px; }
@media (max-width: 520px) {
  .reflection-card { align-items: stretch; flex-direction: column; }
  .reflection-card .button, .reflection-send { justify-self: stretch; }
  .reflection-dialog {
    inset: auto env(safe-area-inset-right) var(--viewport-bottom, 0px) env(safe-area-inset-left);
    position: fixed;
    margin: 0;
    width: auto;
    max-width: none;
    max-height: calc(var(--visible-height, 100dvh) - max(12px, env(safe-area-inset-top)));
    padding: 16px 16px max(16px, env(safe-area-inset-bottom));
    border-radius: 17px 17px 0 0;
    overscroll-behavior: contain;
  }
  .reflection-close { width: 44px; height: 44px; }
  #reflection-form select { min-height: 44px; font-size: 1rem; }
  .monthly-report-actions { display: grid; }
  #monthly-report-generate { justify-self: stretch; }
}

.brain-card { margin-bottom: 16px; }
.brain-controls { margin: 11px 0; }
.brain-controls button { min-height: 38px; padding-inline: 11px; }
#brain-date-form { margin: 0 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #f7f9f2; }
.brain-date-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 11rem)) auto; align-items: end; justify-content: start; gap: 8px; }
.brain-date-fields label { display: grid; min-width: 0; gap: 5px; color: var(--green-dark); font-size: .875rem; font-weight: 650; }
.brain-date-fields input { width: 100%; min-width: 0; min-height: 44px; padding: 7px 8px; border: 1px solid #dce4d5; border-radius: 9px; background: var(--card); color: var(--ink); font-size: 1rem; font-weight: 500; }
.brain-date-fields input[aria-invalid="true"] { border-color: #a74736; }
.brain-date-fields .button { min-height: 44px; justify-content: center; white-space: nowrap; }
.brain-applied-dates, .brain-date-error { margin-top: 8px; font-size: .875rem; line-height: 1.5; }
.brain-applied-dates { color: #4e6653; }
.brain-applied-dates time { white-space: nowrap; }
.brain-date-error { color: #983a2b; }
.brain-content { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(230px, 1fr); gap: 14px; align-items: start; }
.brain-figure { margin: 0; min-width: 0; padding: 16px 18px 12px; border: 1px solid #e1e9da; border-radius: 15px;
  background: radial-gradient(ellipse at 49% 31%, #fffcf2 0%, #f2f6ec 68%, #edf2e6 100%); }
.brain-stage { isolation: isolate; position: relative; width: min(100%, 560px); aspect-ratio: 1080 / 866; margin: 0 auto; }
.brain-stage img { display: block; width: 100%; height: auto; opacity: .73; filter: saturate(.37) hue-rotate(40deg); }
.brain-figure figcaption { margin-top: 7px; text-align: center; color: #536957; font-size: .75rem; line-height: 1.5; }
.brain-cloud-field { position: absolute; inset: 0; }
.brain-word { position: absolute; transform: translate(-50%, -50%); text-wrap: nowrap; line-height: 1.17; min-height: 23px;
  padding: 1px 4px; font-weight: 750; border: 0; border-radius: 6px; background: transparent;
  text-shadow: 0 1px 3px #fffdf3, 0 -1px 3px #fffdf3; }
.brain-word:hover, .brain-word[aria-pressed="true"] { background: #fffdf0cd; }
.brain-side { min-width: 0; padding: 12px; border: 1px solid #e5ebde; border-radius: 13px; background: #f9faf5; }
.brain-side h3, .brain-side h4 { margin: 0; color: #334c3a; }
.brain-side h4 { font-size: .86rem; overflow-wrap: anywhere; }
.brain-ranking { display: grid; gap: 4px; margin-top: 7px; }
.brain-rank-button { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 5px 8px;
  border: 1px solid var(--line); border-radius: 9px; background: #fffefa; color: #425947; font-size: .82rem; text-align: start; }
.brain-rank-button span { overflow-wrap: anywhere; }
.brain-rank-button strong { white-space: nowrap; font-size: .75rem; }
.brain-rank-button:hover, .brain-rank-button[aria-pressed="true"] { border-color: #a8bea0; background: #e8f0e1; color: #2e523b; }
.brain-excerpts { margin-top: 11px; }
.brain-excerpts:first-child { margin-top: 0; }
.brain-excerpts p { margin: 5px 0 0; color: #4e6653; font-size: .78rem; line-height: 1.55; }
.brain-excerpt { margin-top: 7px; padding: 6px 9px 4px; border-radius: 8px; background: #f0f4eb; }
.brain-excerpt blockquote { margin: 0; color: #475f4a; font-size: .76rem; line-height: 1.5; overflow-wrap: anywhere; }
.brain-excerpt mark { color: #334936; background: #dcebd0; border-radius: 2px; }
.brain-excerpt button { min-height: 32px; }
.brain-credit { margin: 10px 0 0; }
.brain-credit a { color: #4c6954; font-size: .72rem; text-underline-offset: 2px; }
@media (max-width: 760px) {
  .brain-content { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .brain-figure { padding: 11px 8px 9px; }
  .brain-stage { max-width: 500px; }
  .brain-side { padding: 9px; }
  .brain-controls { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; }
  .brain-controls button { font-size: .875rem; padding-inline: 8px; min-height: 44px; }
  .brain-ranking { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brain-rank-button { min-height: 44px; }
}
@media (max-width: 520px) {
  .brain-date-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brain-date-fields .button { grid-column: 1 / -1; }
}
@media (max-width: 360px) {
  .brain-date-fields { grid-template-columns: minmax(0, 1fr); }
}

.support-suggestion { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 12px 0; padding: 13px 14px; border: 1px solid #d6e2d3; border-radius: 13px; background: #eef4eb; color: #294635; }
.support-suggestion[data-signal="urgent"] { border-color: #e7c4b3; background: #fbf0e8; color: #652f28; }
.support-suggestion p { margin-top: 4px; font-size: .875rem; line-height: 1.5; }
.support-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.support-secondary { border-color: #cddccb; background: #fafcf7; color: #284a36; }
.support-secondary:hover, .support-secondary[aria-pressed="true"] { background: #eaf3e7; border-color: #77957c; }
.support-call { border-color: #853c31; color: white; background: #853c31; }
.support-call:hover { background: #672c25; }
.support-actions a { text-decoration: none; }
@media (min-width: 521px) { .support-dialog { width: min(580px, calc(100vw - 24px)); } }
.support-dialog p, .support-dialog blockquote { font-size: .9rem; line-height: 1.58; overflow-wrap: anywhere; }
#support-intro { margin: 10px 0; }
.support-emergency, .support-detail { padding: 12px; border: 1px solid #dbe6d8; border-radius: 12px; background: #f6f8f2; }
.support-emergency { background: #fbf1ea; border-color: #e7c4b3; }
.support-emergency h3 { color: #65352c; }
.support-detail h3 { color: #284a36; }
.support-emergency p, .support-detail p, .support-detail .support-actions { margin-top: 5px; }
.support-emergency .support-actions, .support-choices, .support-detail { margin-top: 9px; }
.support-dialog .support-meta { margin-top: 7px; color: #4e6153; font-size: .81rem; }
.support-detail blockquote { margin: 7px 0; padding: 6px 0 6px 10px; border-left: 2px solid #8ea790; }
.support-directory { margin-top: 11px; }
.support-directory a { color: #2e5b40; text-underline-offset: 3px; }
#support-copy-status:empty { display: none; }
@media (max-width: 460px) {
  .header-date { display: none; }
  .support-dialog .support-actions > *, .support-suggestion .support-actions > * { flex: 1 1 auto; text-align: center; }
}

.locale-control { display: inline-flex; align-items: center; gap: .5rem; font-size: .875rem; }
.locale-control select { font: inherit; color: inherit; background: #fff; padding: .35rem; border: 1px solid #798276; border-radius: .45rem; max-width: 100%; }
