:root {
    --paper: #f3f0e8;
    --paper-deep: #e8e2d5;
    --surface: #fffdf8;
    --ink: #28362f;
    --ink-soft: #677269;
    --sage: #738d7d;
    --sage-deep: #4d6b5a;
    --sage-pale: #dfe8df;
    --clay: #b8755b;
    --clay-pale: #f5e4dc;
    --line: #dcd8cd;
    --shadow: 0 20px 60px rgba(45, 55, 48, .08);
    --shadow-small: 0 8px 24px rgba(45, 55, 48, .07);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --serif: "Noto Serif SC", "Songti SC", serif;
    --sans: "Noto Sans SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 5%, rgba(255,255,255,.9), transparent 28rem),
        var(--paper);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; }
button, label[for] { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
.hidden { display: none !important; }
.language-link { float: right; color: var(--ink-soft); font-size: .72rem; font-weight: 600; text-decoration: none; }
.language-link:hover { color: var(--researcher-deep); }
.compact-link { float: none; white-space: nowrap; }

.eyebrow {
    margin: 0 0 12px;
    color: var(--sage-deep);
    font-size: .73rem;
    font-weight: 600;
    letter-spacing: .18em;
}

.muted { color: var(--ink-soft); }

.brand-mark {
    position: relative;
    width: 82px;
    height: 82px;
    margin-bottom: 36px;
}

.brand-mark span {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(77,107,90,.65);
    border-radius: 50%;
}

.brand-mark span:nth-child(2) { transform: translateX(22px); }
.brand-mark span:nth-child(3) { transform: translate(11px, 19px); }

.brand-mark.small { width: 30px; height: 30px; margin: 0 14px 0 0; }
.brand-mark.small span:nth-child(2) { transform: translateX(8px); }
.brand-mark.small span:nth-child(3) { transform: translate(4px, 7px); }

.auth-layout {
    display: grid;
    grid-template-columns: minmax(420px, 1.05fr) minmax(480px, .95fr);
    min-height: 100vh;
}

.auth-story {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10vw;
    overflow: hidden;
    position: relative;
}

.auth-story::after {
    content: "";
    position: absolute;
    width: 440px;
    height: 440px;
    left: -160px;
    bottom: -260px;
    border: 1px solid rgba(77,107,90,.2);
    border-radius: 50%;
    box-shadow: 80px -30px 0 -1px var(--paper), 80px -30px 0 0 rgba(77,107,90,.15), 160px 10px 0 -1px var(--paper), 160px 10px 0 0 rgba(77,107,90,.12);
}

.auth-story h1 {
    margin: 0;
    font: 500 clamp(3.4rem, 6vw, 6rem)/1.1 var(--serif);
    letter-spacing: .12em;
}

.auth-story .lead {
    max-width: 560px;
    margin: 30px 0 64px;
    color: var(--ink-soft);
    font: 400 1.15rem/2 var(--serif);
    letter-spacing: .05em;
}

.auth-panel {
    display: grid;
    place-items: center;
    padding: 7vw;
    background: rgba(255,253,248,.7);
    border-left: 1px solid rgba(220,216,205,.8);
}

.auth-card { width: min(100%, 470px); }
.auth-card h2 { margin: 0 0 12px; font: 500 1.9rem var(--serif); }
.auth-card > .muted { margin: 0 0 34px; line-height: 1.8; font-size: .91rem; }
.auth-tabs { display: flex; gap: 8px; margin: 0 0 18px; }
.auth-tab { flex: 1; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); background: transparent; cursor: pointer; font-size: .82rem; font-weight: 700; transition: .18s ease; }
.auth-tab.active { color: #fff; background: var(--sage-deep); border-color: transparent; }
.auth-pane.hidden { display: none; }
.auth-pane > .muted { margin: 0 0 18px; line-height: 1.8; font-size: .86rem; }
.privacy-details { margin: -12px 0 24px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(243,240,232,.58); }
.privacy-details summary { padding: 14px 16px; color: var(--sage-deep); cursor: pointer; font-size: .78rem; font-weight: 600; }
.privacy-details > div { padding: 0 16px 10px; color: var(--ink-soft); font-size: .7rem; line-height: 1.75; }
.privacy-details p { margin: 0 0 10px; }
.privacy-details strong { color: var(--ink); }

label:not(.consent-row):not(.share-choice):not(.photo-button):not(.observer-share):not(.share-option):not(.checkin-plan-option) {
    display: block;
    margin: 20px 0 9px;
    font-size: .84rem;
    font-weight: 600;
}

input[type="text"], input:not([type]), textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    outline: none;
    color: var(--ink);
    background: rgba(255,255,255,.72);
    transition: border-color .2s, box-shadow .2s, background .2s;
}

input[type="text"], input:not([type]) { height: 54px; padding: 0 17px; }
textarea { padding: 18px; resize: vertical; line-height: 1.8; }
input:focus, textarea:focus { border-color: var(--sage); background: #fff; box-shadow: 0 0 0 4px rgba(115,141,125,.12); }

.consent-row, .share-choice, .observer-share { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; }
.consent-row { margin: 24px 0; color: var(--ink-soft); font-size: .76rem; line-height: 1.7; }
input[type="checkbox"] { width: 17px; height: 17px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--sage-deep); }

.button {
    min-height: 50px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: .03em;
    transition: transform .2s, box-shadow .2s, background .2s, opacity .2s;
}

.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:disabled { cursor: wait; opacity: .55; }
.button.primary { color: #fff; background: var(--sage-deep); box-shadow: 0 9px 24px rgba(77,107,90,.2); }
.button.primary:hover:not(:disabled) { background: #3f5d4d; box-shadow: 0 12px 28px rgba(77,107,90,.26); }
.button.secondary { border: 1px solid var(--line); background: var(--surface); }
.button.compact { min-height: 40px; padding: 0 18px; font-size: .8rem; }
.auth-card .button { width: 100%; }
.safety-note { margin: 24px 0 0; color: #8a756d; font-size: .72rem; text-align: center; }

.toast {
    position: fixed;
    z-index: 100;
    left: 50%;
    top: 20px;
    max-width: calc(100vw - 32px);
    padding: 12px 18px;
    border-radius: 999px;
    color: #fff;
    background: var(--ink);
    box-shadow: var(--shadow-small);
    opacity: 0;
    transform: translate(-50%, -20px);
    pointer-events: none;
    transition: .25s ease;
    font-size: .84rem;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #8b4f43; }
.toast.success { background: var(--sage-deep); }

.topbar {
    position: sticky;
    z-index: 20;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
    padding: 0 max(28px, calc((100vw - 1180px)/2));
    border-bottom: 1px solid rgba(220,216,205,.8);
    background: rgba(243,240,232,.9);
    backdrop-filter: blur(18px);
}

.brand { display: flex; align-items: center; color: inherit; text-decoration: none; }
.brand-daily-button { padding: 0; border: 0; text-align: left; background: transparent; cursor: pointer; }
.brand-daily-button .brand-mark { transition: transform .25s ease; }
.brand-daily-button:hover .brand-mark { transform: rotate(-7deg) scale(1.05); }
.brand strong { display: block; font: 800 1.04rem var(--serif); letter-spacing: .08em; }
.brand small, .identity small { display: block; margin-top: 3px; color: var(--ink-soft); font-size: .67rem; }
.identity { display: flex; align-items: center; gap: 10px; font-size: .8rem; }
.identity > * { flex: 0 0 auto; }
.observer-group-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(55,127,189,.24);
    border-radius: 999px;
    color: var(--researcher-deep);
    background: rgba(232,244,252,.7);
}
.observer-group-switcher > span {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .08em;
    white-space: nowrap;
}
.observer-group-switcher select {
    width: 100%;
    min-width: 0;
    max-width: 200px;
    padding: 0;
    border: 0;
    color: var(--researcher-deep);
    background-color: transparent;
    font: 700 .72rem var(--sans);
    cursor: pointer;
}
.observer-group-switcher select:focus { outline: 0; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; background: var(--sage); font-family: var(--serif); }
.identity-profile-entry { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 10px 4px 5px; border: 0; border-radius: 999px; text-align: left; background: transparent; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.identity-profile-entry:hover:not(:disabled) { background: rgba(255,255,255,.58); transform: translateY(-1px); }
.identity-profile-entry:disabled { cursor: default; }
.identity-profile-copy { display: block; }
.identity-profile-copy strong { display: block; }
.text-button { display: grid; place-items: center; min-height: 40px; border: 0; border-left: 1px solid var(--line); margin-left: 8px; padding: 5px 0 5px 16px; color: var(--ink-soft); background: none; cursor: pointer; font-size: .75rem; }

.daily-card-dialog { width: min(94vw, 570px); max-width: none; max-height: 94dvh; padding: 0; border: 0; overflow: visible; background: transparent; }
.daily-card-dialog::backdrop { background: rgba(25,39,37,.64); backdrop-filter: blur(11px); }
.daily-card-panel { position: relative; max-height: 94dvh; padding: 20px; overflow-y: auto; border-radius: 34px; background: #f5f0e5; box-shadow: 0 34px 110px rgba(17,48,42,.38); }
.daily-card-close { position: absolute; z-index: 4; top: 30px; right: 30px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid rgba(8,112,88,.22); border-radius: 50%; color: var(--member-deep); background: rgba(255,250,239,.88); cursor: pointer; font-size: 1.35rem; line-height: 1; }
.daily-card { position: relative; min-height: 620px; padding: 38px 40px 34px; overflow: hidden; border: 4px solid var(--member-deep); border-radius: 28px; color: #193b33; background: #fffaef url("assets/daily-card-puzzle-bg-v1.png?v=2") center/cover no-repeat; isolation: isolate; }
.daily-card::before { content: ""; position: absolute; z-index: 0; inset: 0; background: linear-gradient(90deg, rgba(255,250,239,.92) 0%, rgba(255,250,239,.82) 47%, rgba(255,250,239,.18) 72%, rgba(255,250,239,.02) 100%); pointer-events: none; }
.daily-card::after { display: none; }
.daily-card-header { position: relative; z-index: 2; display: flex; align-items: flex-start; gap: 15px; padding-right: 40px; }
.daily-card-mark { flex: 0 0 auto; width: 38px !important; height: 38px !important; margin-right: 4px !important; }
.daily-card-header p { margin: 0 0 10px; color: var(--member-deep); font-size: .66rem; font-weight: 900; letter-spacing: .16em; }
.daily-card-header time, .daily-card-header small { display: block; }
.daily-card-header time { font-size: .78rem; font-weight: 800; }
.daily-card-header small { margin-top: 3px; color: #6c786e; font-size: .63rem; letter-spacing: .04em; }
.daily-card blockquote { position: relative; z-index: 2; margin: 128px 0 0; }
.daily-card blockquote p { margin: 0; }
.daily-card blockquote p:first-child { color: #164c3e; font: 900 clamp(2rem, 8vw, 2.7rem)/1.28 var(--sans); letter-spacing: -.045em; text-wrap: balance; }
.daily-card blockquote p:first-child > span { display: block; width: max-content; max-width: 100%; white-space: nowrap; }
.daily-card blockquote p[lang="en"] { width: 90%; margin-top: 24px; color: var(--ai-deep); font: 700 1rem/1.55 var(--sans); letter-spacing: .01em; }
.daily-card footer { position: absolute; z-index: 2; left: 40px; bottom: 34px; }
.daily-card footer strong, .daily-card footer small { display: block; }
.daily-card footer strong { font-size: .72rem; }
.daily-card footer small { margin-top: 5px; color: #66766d; font-size: .62rem; letter-spacing: .08em; }
.daily-card-accept { width: 100%; margin-top: 14px; background: var(--member-deep) !important; }
.daily-card-dialog.after-submission .daily-card { border-color: var(--ai-deep); }
.daily-card-dialog.after-submission .daily-card-accept { background: var(--ai-deep) !important; }

.member-app, .observer-app { width: min(100% - 40px, 1180px); margin: 0 auto; }
.member-app { padding: 34px 0 80px; }
.member-nav { display: flex; justify-content: center; gap: 6px; margin-bottom: 62px; }
.nav-button, .filter-button { border: 0; border-radius: 999px; padding: 9px 18px; color: var(--ink-soft); background: transparent; cursor: pointer; font-size: .82rem; }
.nav-button.active, .filter-button.active { color: var(--sage-deep); background: var(--sage-pale); font-weight: 600; }
.member-section { display: none; }
.member-section.active { display: block; animation: enter .35s ease both; }
#notebook-section.member-section.active { animation: none; transform: none; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }

.welcome-block { max-width: 680px; margin: 0 auto 34px; text-align: center; }
.welcome-block h1, .section-heading h1, .observer-heading h1 { margin: 0; font: 500 clamp(1.8rem, 3.5vw, 2.7rem)/1.35 var(--serif); letter-spacing: .03em; }
.welcome-block > p:last-child { margin: 14px 0 0; color: var(--ink-soft); font-family: var(--serif); }

#checkin-form[hidden] { display: none !important; }
.notebook-workspace { display: grid; grid-template-columns: minmax(0, 840px) 56px; align-items: start; justify-content: center; gap: 22px; width: 100%; }
.notebook-shell { position: relative; width: 100%; margin: 0; overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.notebook-shell::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .13; background-image: linear-gradient(rgba(8,112,88,.10) 1px, transparent 1px), linear-gradient(90deg, rgba(8,112,88,.07) 1px, transparent 1px); background-size: 18px 18px; }
.notebook-cover { position: relative; z-index: 1; display: block; padding: 0 0 25px; border-bottom: 1px solid rgba(27,154,116,.18); background: transparent; }
.notebook-cover .eyebrow { color: var(--member-deep); }
.notebook-cover h2 { margin: 5px 0 7px; font-size: clamp(1.6rem, 3vw, 2.35rem); font-weight: 900; }
.notebook-cover p:last-child { max-width: 540px; margin: 0; color: var(--ink-soft); font-size: .75rem; line-height: 1.75; }
.notebook-private-seal { display: none; }
.notebook-days { position: relative; z-index: 1; padding: 10px 0 0; }
.notebook-day { position: relative; padding: 20px 0 6px; }
.notebook-day.past { opacity: .56; transition: opacity .2s ease; }
.notebook-day.past[open] { opacity: .82; }
.notebook-day > summary { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; list-style: none; cursor: pointer; color: var(--member-deep); font-size: .72rem; font-weight: 850; letter-spacing: .08em; }
.notebook-day > summary::-webkit-details-marker { display: none; }
.notebook-day > summary::before, .notebook-day > summary::after { content: ""; height: 1px; background: linear-gradient(90deg, transparent, rgba(8,112,88,.32)); }
.notebook-day > summary::after { background: linear-gradient(90deg, rgba(8,112,88,.32), transparent); }
.notebook-day > summary small { display: block; margin-top: 3px; text-align: center; color: var(--ink-soft); font-size: .58rem; font-weight: 500; letter-spacing: .02em; }
.notebook-day > summary > span { position: relative; z-index: 4; min-width: 112px; text-align: center; }
.notebook-blocks { display: grid; gap: 12px; padding: 18px 0 8px; }
.notebook-block { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: 12px; align-items: start; padding: 15px 0 18px; border-bottom: 1px solid rgba(27,154,116,.11); border-radius: 0; background: transparent; transition: border-color .2s ease; }
.notebook-block:focus-within, .notebook-block:hover { border-bottom-color: rgba(27,154,116,.28); background: transparent; }
.notebook-block textarea { min-height: 70px; padding: 6px 4px; overflow: hidden; resize: none; border: 0; background: transparent; box-shadow: none; font: 400 1rem/1.95 var(--serif); }
.notebook-block-status { position: absolute; left: 20px; bottom: 4px; color: var(--ink-soft); font-size: .52rem; opacity: 0; transition: opacity .2s ease; }
.notebook-block.saving .notebook-block-status, .notebook-block.saved .notebook-block-status { opacity: 1; }
.notebook-selector { position: relative; z-index: 4; display: grid; place-items: center; width: 31px; height: 31px; padding: 0; border: 0; border-radius: 50%; color: var(--member-deep); background: transparent; cursor: pointer; font-size: 1.5rem; line-height: 1; }
.notebook-selector.selected { color: var(--member-deep); font-size: 1.35rem; }
.notebook-selector:disabled { cursor: default; opacity: .24; }
.notebook-media { overflow: hidden; border-radius: 17px; background: rgba(243,240,232,.72); }
.notebook-media img { display: block; width: 100%; max-height: 520px; object-fit: contain; }
.notebook-media-caption { padding: 9px 12px; color: var(--ink-soft); font-size: .6rem; }
.notebook-voice-card { display: flex; align-items: center; gap: 13px; min-height: 74px; padding: 14px 16px; border-radius: 18px; background: linear-gradient(135deg, rgba(242,138,61,.15), rgba(255,250,239,.86)); }
.notebook-voice-card > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; background: var(--ai-deep); font-size: 1rem; }
.notebook-voice-card audio { width: min(100%, 390px); height: 34px; }
.notebook-voice-card time { margin-left: auto; color: var(--ai-deep); font-size: .72rem; font-weight: 800; }
.notebook-current-editor { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; margin: 10px 0 0; padding: 18px 0 22px; border: 0; border-bottom: 1px solid rgba(27,154,116,.18); border-radius: 0; background: transparent; }
.notebook-current-editor textarea { min-height: 115px; padding: 7px 4px; overflow: hidden; border: 0; resize: none; background: transparent; box-shadow: none; font: 400 1.03rem/2 var(--serif); }
.notebook-current-editor #notebook-current-selector { position: relative; z-index: 3; grid-column: 2; grid-row: 1; justify-self: end; }
.notebook-current-editor textarea { position: relative; z-index: 1; grid-column: 1 / -1; grid-row: 1; padding-right: 42px; }
#notebook-autosave-status { grid-column: 1 / -1; justify-self: center; text-align: center; color: var(--ink-soft); font-size: .58rem; }
.notebook-new-fragment { display: block; margin: 8px auto 0; padding: 7px 12px; border: 0; border-radius: 999px; color: var(--member-deep); background: rgba(217,243,231,.68); cursor: pointer; font-size: .7rem; font-weight: 850; letter-spacing: .02em; }
.notebook-tool-dock { position: fixed; z-index: 7; top: 50%; right: max(12px, calc((100vw - 918px) / 2)); display: flex; flex-direction: column; align-items: center; gap: 12px; width: 56px; height: max-content; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; transform: translateY(-50%); }
.notebook-tool { display: grid; place-items: center; flex: 0 0 auto; box-sizing: border-box; width: 50px; height: 50px; margin: 0; padding: 0; border: 1px solid rgba(27,154,116,.22); border-radius: 50%; color: var(--member-deep); background: rgba(255,250,239,.94); box-shadow: 0 8px 20px rgba(8,112,88,.08); cursor: pointer; line-height: 0; }
.notebook-tool-dock label.notebook-tool { display: grid; place-items: center; margin: 0; }
.notebook-tool:hover, .notebook-tool.recording, .notebook-tool.active { color: #fff; background: var(--member-deep); }
.notebook-tool.recording { background: #bd5648; animation: notebook-pulse 1.3s ease infinite; }
@keyframes notebook-pulse { 50% { box-shadow: 0 0 0 7px rgba(189,86,72,.14); } }
.notebook-tool svg { display: block; width: 23px; height: 23px; margin: auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notebook-voice-time { padding: 3px 0; color: #9b473c; font-size: .62rem; font-weight: 800; }
.notebook-paper-ink-preview { position: absolute; z-index: 2; left: 0; display: block; width: 100%; pointer-events: none; object-fit: fill; }
.notebook-inline-sketch { position: absolute; z-index: 6; left: 0; right: 0; margin: 0; overflow: visible; border: 0; border-radius: 0; background: transparent; }
.notebook-sketch-base-canvas { position: absolute; z-index: 0; left: 0; top: 0; display: block; width: 100%; height: auto; pointer-events: none; }
#notebook-sketch-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; touch-action: none; background: transparent; cursor: crosshair; }
.notebook-sketch-toolbar { position: fixed; z-index: 9; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 14px; width: min(calc(100vw - 28px), 720px); padding: 10px 13px; overflow-x: auto; border: 1px solid rgba(27,154,116,.22); border-radius: 999px; background: rgba(255,250,239,.96); box-shadow: 0 18px 55px rgba(23,63,53,.18); transform: translateX(-50%); backdrop-filter: blur(12px); }
.notebook-sketch-colors, .notebook-sketch-sizes { display: flex; align-items: center; gap: 7px; }
.notebook-sketch-colors button { width: 24px; height: 24px; padding: 0; border: 3px solid #f7f3e8; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 1px rgba(30,50,45,.16); cursor: pointer; }
.notebook-sketch-colors button.active { box-shadow: 0 0 0 2px var(--member-deep), 0 0 0 5px #f7f3e8; }
.notebook-sketch-sizes { padding-left: 13px; border-left: 1px solid var(--line); }
.notebook-sketch-sizes button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.notebook-sketch-sizes button.active { background: rgba(217,243,231,.86); }
.notebook-sketch-sizes i { width: var(--size); height: var(--size); border-radius: 50%; background: var(--member-deep); }
.notebook-sketch-eraser { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--ink-soft); background: rgba(255,253,248,.9); cursor: pointer; transition: .15s ease; }
.notebook-sketch-eraser svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notebook-sketch-eraser.active { color: #fff; border-color: var(--member-deep); background: var(--member-deep); }
.notebook-sketch-eraser:focus-visible { outline: 2px solid rgba(27,154,116,.55); outline-offset: 2px; }
#notebook-sketch-status { margin-left: auto; color: var(--ink-soft); font-size: .58rem; white-space: nowrap; }
#notebook-sketch-close { width: 34px; height: 34px; border: 0; border-radius: 50%; color: var(--member-deep); background: rgba(217,243,231,.72); cursor: pointer; }
.notebook-reflection-guide { position: relative; z-index: 1; margin: 0; padding: 18px 0 8px; color: var(--ink-soft); font-size: .66rem; line-height: 1.7; }
.notebook-reflection-guide span { margin-right: 5px; color: var(--member-deep); font-size: 1rem; }
.reflection-window-callout { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: min(100%, 840px); margin: 14px auto 0; padding: 15px 20px; border: 1px solid rgba(242,138,61,.22); border-radius: 18px; color: var(--ink-soft); background: rgba(255,236,217,.48); font-size: .7rem; }
.reflection-window-callout strong { color: var(--ai-deep); font-size: .66rem; letter-spacing: .08em; }
.reflection-panel { width: min(100%, 840px); margin: 18px auto 0; padding: 30px; border: 2px solid var(--ai-deep); border-radius: 28px; background: #fff8ed; box-shadow: 0 24px 70px rgba(179,91,39,.12); }
.reflection-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.reflection-panel h2 { margin: 5px 0 7px; font-size: 1.7rem; }
.reflection-panel header p:last-child { max-width: 570px; margin: 0; color: var(--ink-soft); font-size: .7rem; line-height: 1.7; }
#reflection-window-badge { flex: 0 0 auto; padding: 8px 11px; border-radius: 999px; color: var(--ai-deep); background: rgba(242,138,61,.13); font-size: .6rem; font-weight: 800; }
.reflection-items { display: grid; gap: 10px; }
.reflection-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 14px; border: 1px solid rgba(242,138,61,.18); border-radius: 18px; background: rgba(255,253,246,.72); }
.reflection-item textarea { min-height: 96px; border: 0; padding: 4px; background: transparent; box-shadow: none; font: 400 .92rem/1.8 var(--serif); }
.reflection-item img { display: block; width: 100%; max-height: 360px; object-fit: contain; border-radius: 13px; background: #f4f1e8; }
.reflection-item-actions { display: flex; flex-direction: column; gap: 5px; }
.reflection-item-actions button { display: grid; place-items: center; width: 31px; height: 31px; padding: 0; border: 0; border-radius: 50%; color: var(--ai-deep); background: rgba(242,138,61,.10); cursor: pointer; }
.reflection-summary { display: block; margin-top: 18px; }
.reflection-summary > span { display: block; margin-bottom: 7px; font-size: .74rem; font-weight: 800; }
.reflection-summary small { color: var(--ink-soft); font-weight: 400; }
.reflection-summary textarea { min-height: 120px; }
.reflection-share-choice { margin-top: 16px; background: rgba(242,138,61,.09); }
.reflection-panel > footer { display: grid; grid-template-columns: .8fr 1.2fr; gap: 10px; margin-top: 18px; }
.reflection-panel > footer .button { width: 100%; }

.journey-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 34px; }
.shared-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 34px; }
.journey-tab, .shared-tab { min-height: 62px; padding: 12px 18px; border: 1px solid rgba(27,154,116,.18); border-radius: 20px; color: var(--ink-soft); background: rgba(255,253,246,.65); cursor: pointer; font-size: .82rem; font-weight: 750; transition: .18s ease; }
.journey-tab.active, .shared-tab.active { border-color: var(--member); color: #fff; background: var(--member); box-shadow: 0 10px 25px rgba(8,112,88,.16); }
.journey-collection, .shared-collection { margin-top: 28px; }
.journey-pane, .shared-pane { display: none; min-width: 0; }
.journey-pane.active, .shared-pane.active { display: block; animation: enter .25s ease both; }
.journey-pane-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.journey-pane-heading > div { display: flex; align-items: center; gap: 12px; }
.journey-pane-heading span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; background: var(--member); font-size: .58rem; font-weight: 850; }
.journey-pane-heading h2 { margin: 0; font-size: 1.15rem; }
.journey-pane-heading p { margin: 0; color: var(--ink-soft); font-size: .67rem; }

.phase-banner { width: min(100%, 780px); margin: 0 auto 26px; padding: 13px 18px; border: 1px dashed rgba(27,154,116,.35); border-radius: 16px; color: var(--member-deep); background: rgba(217,243,231,.5); font-size: .76rem; line-height: 1.7; text-align: center; }
.checkin-calendar { width: min(100%, 780px); margin: 0 auto 34px; padding: 22px 24px 24px; border: 1px solid rgba(220,216,205,.9); border-radius: var(--radius-lg); background: rgba(255,253,248,.74); box-shadow: var(--shadow); }
.checkin-calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.checkin-calendar-head h3 { margin: 0; font: 500 1.15rem var(--serif); }
.checkin-calendar-nav { display: flex; gap: 8px; }
.checkin-calendar-nav button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--member-deep); background: rgba(255,253,248,.9); cursor: pointer; font-size: 1.05rem; transition: .15s ease; }
.checkin-calendar-nav button:hover { border-color: var(--sage); background: rgba(217,243,231,.7); }
.checkin-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.checkin-calendar-dow { padding: 4px 0 8px; color: var(--ink-soft); font-size: .66rem; font-weight: 700; text-align: center; }
.checkin-calendar-day { position: relative; display: grid; place-items: center; height: 42px; border-radius: 12px; color: var(--ink); font-size: .78rem; }
.checkin-calendar-day.future { color: rgba(60,70,64,.28); }
.checkin-calendar-day.today { box-shadow: inset 0 0 0 1.5px var(--member); font-weight: 800; }
.checkin-calendar-day.marked { background: rgba(217,243,231,.85); color: var(--member-deep); font-weight: 700; cursor: pointer; }
.checkin-calendar-day.marked:hover { background: rgba(196,230,214,.95); }
.checkin-calendar-day.marked::after { content: ""; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--member); }
.checkin-calendar-day.blank { color: rgba(60,70,64,.35); }
.checkin-calendar-day.empty { color: transparent; }
.checkin-calendar-hint { margin: 14px 0 0; color: var(--ink-soft); font-size: .66rem; line-height: 1.6; }
.two-week-card { width: min(100%, 720px); margin: 0 auto; padding: 30px; border: 1px solid rgba(220,216,205,.9); border-radius: var(--radius-xl); background: rgba(255,253,248,.8); box-shadow: var(--shadow); }
.two-week-card h2 { margin: 6px 0 10px; font: 500 1.5rem var(--serif); }
.two-week-card > p { margin: 0; color: var(--ink-soft); line-height: 1.9; font-size: .82rem; }
.checkin-prompts { margin: 18px 0 0; padding: 0; list-style: none; }
.checkin-prompts li { position: relative; margin: 9px 0; padding-left: 22px; color: var(--ink); font-size: .8rem; line-height: 1.7; }
.checkin-prompts li::before { content: "·"; position: absolute; left: 6px; color: var(--member); font-weight: 900; }
.checkin-plan-options { display: grid; gap: 10px; margin: 14px 0 4px; }
.checkin-plan-option { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,253,248,.85); cursor: pointer; transition: .15s ease; }
.checkin-plan-option:has(input:checked) { border-color: var(--member); background: rgba(223,232,223,.5); }
.checkin-plan-option input { margin-top: 3px; accent-color: var(--member); }
.checkin-plan-option span { display: grid; gap: 3px; }
.checkin-plan-option strong { font-size: .86rem; }
.checkin-plan-option small { color: var(--ink-soft); font-size: .74rem; line-height: 1.55; }
.checkin-note-label { display: block; margin: 22px 0 9px; font-size: .82rem; font-weight: 700; }
.two-week-card textarea { min-height: 150px; }
.two-week-card #checkin-plan-custom { min-height: 84px; }
.checkin-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.checkin-saved-hint { color: var(--ink-soft); font-size: .7rem; }
.phase-plan-option-row { display: grid; gap: 8px; grid-template-columns: 1fr; margin: 10px 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,253,248,.8); }
.phase-plan-option-row .text-button { justify-self: start; min-height: 30px; padding: 0; border: 0; border-left: 0; margin: 0; color: var(--clay); font-size: .72rem; }
.phase-plan-option-title { width: 100%; }
.phase-plan-option-description { min-height: 52px; }
.phase-plan-save-row { justify-content: flex-start; margin-top: 16px; }

.today-writing-composer { width: min(100%, 760px); margin-top: 0; }
.today-writing-composer .checkin-segment-text:focus::placeholder { color: transparent; }
.today-selected-media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.today-selected-media figure { position: relative; min-width: 0; margin: 0; overflow: hidden; border-radius: 18px; background: rgba(243,240,232,.76); }
.today-selected-media img { display: block; width: 100%; height: 230px; object-fit: contain; }
.today-selected-media button { position: absolute; top: 9px; right: 9px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: rgba(23,63,53,.78); cursor: pointer; font-size: 1rem; }

.composer { width: min(100%, 720px); margin: 0 auto; padding: 28px; border: 1px solid rgba(220,216,205,.9); border-radius: var(--radius-xl); background: rgba(255,253,248,.8); box-shadow: var(--shadow); }
.composer-topline { display: flex; justify-content: space-between; color: var(--ink-soft); font-size: .76rem; }
.composer-topline span:first-child { color: var(--ink); font-weight: 600; }
.composer textarea { min-height: 190px; margin-top: 18px; border: 0; padding: 0; background: transparent; font: 400 1rem/2 var(--serif); box-shadow: none; }
.composer-actions { display: flex; justify-content: space-between; align-items: center; padding: 16px 0 22px; color: var(--ink-soft); font-size: .72rem; }
.photo-button { display: inline-flex; align-items: center; gap: 10px; color: var(--sage-deep); cursor: pointer; font-weight: 700; }
.entry-mode-card.has-visual { border-color: rgba(27,154,116,.55); background: rgba(217,243,231,.72); }
.entry-mode-card.has-visual .entry-mode-icon { box-shadow: 0 0 0 5px rgba(27,154,116,.11), 0 7px 18px rgba(8,112,88,.18); }
.visual-input-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 2px solid var(--member-deep);
    border-radius: 50%;
    color: #fff;
    background: var(--member-deep);
    box-shadow: 0 7px 18px rgba(8,112,88,.18);
}
.visual-input-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.image-preview-wrap {
    position: relative;
    margin: 2px 0 16px;
    overflow: hidden;
    scroll-margin-top: 110px;
    border: 1px solid rgba(27,154,116,.25);
    border-radius: var(--radius-lg);
    background: rgba(233,247,239,.66);
    box-shadow: 0 14px 34px rgba(8,112,88,.10);
}
.image-preview-wrap.revealed { animation: visual-arrival .46s ease both; }
@keyframes visual-arrival { from { opacity: .45; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.visual-added-note { display: flex; align-items: center; gap: 11px; padding: 12px 14px; color: var(--member-deep); background: rgba(217,243,231,.84); }
.visual-added-note > span { display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 auto; border-radius: 50%; color: #fff; background: var(--member-deep); font-size: .74rem; font-weight: 800; }
.visual-added-note strong, .visual-added-note small { display: block; }
.visual-added-note strong { font-size: .76rem; }
.visual-added-note small { margin-top: 2px; color: var(--ink-soft); font-size: .65rem; }
.image-preview-wrap img { display: block; width: 100%; max-height: 440px; object-fit: contain; background: #f4f1e8; }
.image-preview-wrap button { position: absolute; top: 62px; right: 12px; padding: 7px 12px; border: 0; border-radius: 999px; color: #fff; background: rgba(20,30,24,.76); cursor: pointer; font-size: .72rem; }
.share-choice { margin: 0 -4px 22px; padding: 16px; border-radius: var(--radius-md); background: rgba(223,232,223,.48); }
.share-choice strong, .share-choice small { display: block; }
.share-choice strong { margin-bottom: 4px; font-size: .82rem; }
.share-choice small { color: var(--ink-soft); line-height: 1.6; font-size: .7rem; }
.share-choice-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 -4px 16px; padding: 0; border: 0; }
.share-option { position: relative; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); background: rgba(223,232,223,.48); cursor: pointer; font-size: .8rem; font-weight: 700; transition: .18s ease; user-select: none; }
.share-option input { position: absolute; opacity: 0; pointer-events: none; }
.share-option:has(input:checked), .share-option.checked-option { border-color: var(--member); color: var(--member-deep); background: linear-gradient(110deg, rgba(217,243,231,.85), rgba(246,203,85,.18)); box-shadow: 0 8px 20px rgba(8,112,88,.10); }
.share-option:has(input:focus-visible) { outline: 2px solid rgba(27,154,116,.55); outline-offset: 2px; }
.share-option-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.silent-submit-button { display: flex; align-items: center; justify-content: center; gap: 9px; width: calc(100% + 8px); margin: 0 -4px 22px; min-height: 52px; border: 1.5px dashed rgba(27,154,116,.6); border-radius: 999px; color: var(--sage-deep); background: rgba(255,253,248,.92); cursor: pointer; font-size: .86rem; font-weight: 800; letter-spacing: .02em; transition: .18s ease; }
.silent-submit-button svg { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.silent-submit-button:hover:not(:disabled) { border-style: solid; border-color: var(--sage); background: rgba(217,243,231,.78); transform: translateY(-1px); }
.silent-submit-button:disabled { cursor: wait; opacity: .6; }
.composer > .button { width: 100%; }

.submitted-state { width: min(100%, 620px); margin: 80px auto; text-align: center; }
.success-ring { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 24px; border: 1px solid var(--sage); border-radius: 50%; color: var(--sage-deep); font-size: 1.5rem; }
.submitted-state h2 { font: 500 1.7rem var(--serif); }
.submitted-state p { max-width: 520px; margin: 14px auto 28px; color: var(--ink-soft); line-height: 1.9; }

.section-heading, .observer-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 42px; }
.section-heading > p, .observer-heading > div > p:last-child { max-width: 520px; margin: 0; color: var(--ink-soft); font-size: .8rem; line-height: 1.8; text-align: right; }
.timeline { width: min(100%, 780px); margin: 0 auto; }
.timeline-item { display: grid; grid-template-columns: 22px 1fr; gap: 17px; position: relative; padding-bottom: 28px; }
.timeline-item::before { content: ""; position: absolute; top: 17px; bottom: -17px; left: 5px; width: 1px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-marker { z-index: 1; width: 11px; height: 11px; margin-top: 12px; border: 3px solid var(--paper); border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 1px var(--sage); }
.record-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,253,248,.74); }
.record-meta { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; color: var(--ink-soft); font-size: .72rem; }
.status { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px; font-size: .68rem; white-space: nowrap; }
.status.waiting { color: #846550; background: #f3e8dc; }
.status.responded { color: var(--sage-deep); background: var(--sage-pale); }
.silent-day-body { display: flex; align-items: center; gap: 13px; padding: 14px 0 4px; color: var(--ink-soft); }
.silent-day-mark { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; border: 1px solid rgba(27,154,116,.4); border-radius: 50%; color: var(--sage-deep); font-size: .9rem; }
.silent-day-body p { margin: 0; font: 400 1.02rem var(--serif); }
.silent-inbox-note { margin: 0; color: var(--ink-soft); font-style: italic; }
.checkin-notes-block { width: min(100%, 780px); margin: 0 auto 26px; }
.checkin-notes-block h3 { margin: 0 0 12px; font-size: .8rem; color: var(--researcher-deep); }
.checkin-note-card { margin-bottom: 12px; padding: 16px 18px; border-left: 3px solid var(--researcher); border-radius: 0 14px 14px 0; background: rgba(220,238,250,.5); }
.checkin-note-card .eyebrow { margin: 0 0 6px; }
.checkin-note-card p:last-child { margin: 0; color: var(--ink); line-height: 1.8; font-size: .8rem; }
.record-text { margin: 0; white-space: pre-wrap; font: 400 .95rem/1.9 var(--serif); }
.record-image { display: block; width: 100%; max-height: 420px; margin-top: 17px; border-radius: var(--radius-md); object-fit: cover; }
.record-image-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 17px; }
.record-image-gallery.count-1 { grid-template-columns: 1fr; }
.record-image-gallery .record-image { height: 100%; min-height: 180px; margin: 0; object-fit: cover; }
.share-label { margin: 15px 0 0; color: var(--sage-deep); font-size: .7rem; }
.observer-response { margin-top: 22px; padding: 20px; border-left: 2px solid var(--sage); background: rgba(223,232,223,.4); }
.observer-response span { color: var(--sage-deep); font-size: .7rem; font-weight: 600; letter-spacing: .08em; }
.observer-response p { margin: 9px 0 0; white-space: pre-wrap; font: 400 .9rem/1.9 var(--serif); }

.shared-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
    gap: clamp(54px, 7vw, 92px) 22px;
    padding: 8px 0 58px;
}
.shared-card {
    grid-column: var(--share-start, 1) / span var(--share-columns, 6);
    align-self: start;
    min-width: 0;
    height: auto;
    padding: clamp(24px, 3vw, 34px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255,253,248,.72);
    transform: translateY(var(--share-shift, 0)) rotate(var(--share-rotation, 0deg));
    transform-origin: center;
}
.shared-card--compact { border-radius: 30px 19px 27px 22px; }
.shared-card--medium { border-radius: 23px 32px 21px 29px; }
.shared-card--long { border-radius: 31px 21px 35px 19px; }
.shared-card--wide { border-radius: 25px 34px 23px 31px; }
.quote-mark { display: block; height: 30px; color: var(--sage); font: 3rem/1 var(--serif); }
.shared-card-header {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 24px;
    margin-bottom: clamp(27px, 3vw, 39px);
}
.shared-member-link {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--ink);
    background: transparent;
    cursor: pointer;
    text-align: left;
}
.shared-member-link:hover .shared-member-name,
.shared-member-link:focus-visible .shared-member-name { color: var(--member-deep); }
.shared-member-avatar {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    border-radius: 46% 54% 44% 56%;
    color: #fff;
    background: var(--member-deep);
    font-size: .9rem;
    font-weight: 800;
}
.shared-member-avatar.has-image { background-size: cover; background-position: center; }
.shared-member-copy {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    column-gap: 10px;
    row-gap: 2px;
    min-width: 0;
}
.shared-member-name {
    overflow: hidden;
    font-size: 1rem;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .18s ease;
}
.shared-member-code {
    color: var(--member-deep);
    font-size: .67rem;
    font-weight: 700;
    letter-spacing: .08em;
    white-space: nowrap;
}
.shared-member-hint {
    grid-column: 1/-1;
    display: block;
    margin: 4px 0 0 !important;
    color: var(--ink-soft);
    font-size: .61rem;
}
.shared-card-date {
    display: grid;
    justify-items: end;
    gap: 3px;
    min-width: max-content;
    padding-left: 18px;
    border-left: 1px solid rgba(27,154,116,.18);
}
.shared-card-date strong {
    color: var(--member-deep);
    font-size: .72rem;
    letter-spacing: .1em;
    white-space: nowrap;
}
.shared-card-date span {
    color: var(--ink-soft);
    font-size: .63rem;
    letter-spacing: .13em;
}
.shared-card-body {
    position: relative;
    z-index: 1;
    min-height: 0;
    margin: 0 0 28px;
    white-space: pre-wrap;
    font: 400 .94rem/1.9 var(--serif);
}
.shared-visibility-note {
    position: relative;
    z-index: 1;
    display: block;
    margin: 24px 0 0;
    padding-top: 16px;
    border-top: 1px solid rgba(27,154,116,.13);
    color: var(--ink-soft);
    font-size: .66rem;
    line-height: 1.6;
}
.shared-ai-reply { position: relative; z-index: 1; margin: 14px 0 0; padding: 14px 16px; border-left: 3px solid var(--researcher); border-radius: 0 14px 14px 0; background: rgba(220,238,250,.55); }
.shared-ai-reply span { display: block; margin-bottom: 6px; color: var(--researcher-deep); font-size: .68rem; font-weight: 800; }
.shared-ai-reply p { margin: 0; color: var(--ink); white-space: pre-wrap; font: 400 .84rem/1.85 var(--serif); }
.public-share-card .record-image-gallery { position: relative; z-index: 1; }
.atmosphere-card { grid-column: span 1; }
.atmosphere-card h3 { margin: 8px 0 18px; font: 500 1.12rem var(--serif); }
.echo-themes { display: grid; gap: 9px; }
.echo-themes p { margin: 0; padding: 11px 13px; border-radius: 10px; background: var(--paper); font: 400 .82rem/1.6 var(--serif); }

.empty-state { grid-column: 1/-1; padding: 76px 20px; text-align: center; color: var(--ink-soft); }
.empty-state h3 { margin: 18px 0 6px; color: var(--ink); font: 500 1.15rem var(--serif); }
.empty-state p { margin: 0; font-size: .8rem; }
.empty-orbit { width: 38px; height: 38px; margin: auto; border: 1px solid var(--sage); border-radius: 50%; box-shadow: 12px 0 0 -1px var(--paper), 12px 0 0 0 var(--sage); opacity: .6; }

.observer-app { padding: 54px 0 90px; }
.observer-heading { align-items: center; }
.observer-heading > div > p:last-child { margin-top: 12px; text-align: left; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 42px; }
.metrics article { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,253,248,.72); }
.metrics span { display: block; color: var(--ink-soft); font-size: .72rem; }
.metrics strong { display: block; margin-top: 8px; font: 500 2rem var(--serif); }
.inbox-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.filter-tabs { display: flex; gap: 6px; }
#inbox-count { color: var(--ink-soft); font-size: .72rem; }
.observer-inbox { display: grid; gap: 18px; }
.inbox-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-xl); background: rgba(255,253,248,.82); box-shadow: var(--shadow-small); }
.inbox-card.attention { border-color: rgba(184,117,91,.6); }
.inbox-card > header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.person { display: flex; align-items: center; gap: 12px; }
.person > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--sage-deep); background: var(--sage-pale); font-family: var(--serif); }
.person strong, .person small { display: block; }
.person strong { font-size: .86rem; }
.person small { margin-top: 3px; color: var(--ink-soft); font-size: .68rem; }
.card-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.risk-tag { padding: 5px 10px; border-radius: 999px; color: #8b4f43; background: var(--clay-pale); font-size: .68rem; }
.member-submission { padding: 28px 28px 10px; }
.member-submission > p { margin: 0; white-space: pre-wrap; font: 400 1rem/1.9 var(--serif); }
.member-submission .record-image { max-width: 520px; }
.draft-area { margin: 20px 28px; padding: 20px; border-radius: var(--radius-lg); background: rgba(223,232,223,.45); }
.draft-area > div { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.draft-area span { color: var(--sage-deep); font-size: .75rem; font-weight: 600; }
.draft-area small { color: var(--ink-soft); font-size: .67rem; }
.draft-area textarea { min-height: 280px; max-height: 62dvh; resize: vertical; border-color: rgba(115,141,125,.28); background: rgba(255,255,255,.7); font: 400 .88rem/1.8 var(--serif); }
.inbox-card > footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 0 28px 24px; }
.observer-share { color: var(--ink-soft); font-size: .75rem; }
.observer-share-control { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.observer-share { cursor: default; }
.observer-share input:disabled + span { opacity: 1; }
.observer-share.private-status { opacity: .62; }
.share-approval-action { color: var(--researcher-deep); border-color: rgba(55,127,189,.34); background: var(--researcher-pale); }
.share-approval-action.approved { color: #8b4f43; border-color: rgba(184,92,43,.28); background: rgba(255,230,210,.66); }
.response-actions, .safety-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.safety-panel { margin: 20px 28px; padding: 20px; border: 1px solid rgba(184,117,91,.55); border-radius: var(--radius-lg); background: var(--clay-pale); }
.safety-panel.critical { border-width: 2px; background: #f4ddd7; }
.safety-panel h3 { margin: 0 0 8px; color: #7d4137; font: 600 1rem var(--serif); }
.safety-panel > p { margin: 0 0 15px; color: #725b54; font-size: .74rem; line-height: 1.75; }
.safety-panel > small { display: block; margin: 12px 0; color: #86675e; font-size: .65rem; line-height: 1.6; }
.safety-panel textarea { min-height: 100px; margin: 8px 0; border-color: rgba(184,117,91,.35); background: rgba(255,255,255,.7); font-size: .78rem; }
.safety-flow { display: flex; flex-wrap: wrap; gap: 6px; }
.safety-flow span { padding: 6px 9px; border: 1px solid rgba(184,117,91,.3); border-radius: 999px; color: #8c746d; background: rgba(255,255,255,.55); font-size: .61rem; }
.safety-flow span.complete { color: #fff; border-color: #8b4f43; background: #8b4f43; }
.safety-actions { margin-top: 10px; justify-content: flex-start; }

.version-history, .interaction-history { margin: 14px 28px; padding: 15px 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,253,248,.6); }
.version-history summary, .interaction-history summary { color: var(--sage-deep); cursor: pointer; font-size: .73rem; font-weight: 600; }
.version-list { display: grid; gap: 10px; margin-top: 14px; }
.version-list article { padding: 14px; border-left: 3px solid var(--sage); border-radius: 8px; background: var(--paper); }
.version-list article > div { display: flex; justify-content: space-between; gap: 12px; }
.version-list strong { font-size: .69rem; }
.version-list time { color: var(--ink-soft); font-size: .62rem; }
.version-list p { margin: 9px 0 0; white-space: pre-wrap; font: 400 .76rem/1.7 var(--serif); }
.interaction-history ol { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.interaction-history li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.interaction-history li:last-child { border: 0; }
.interaction-history strong { font-size: .68rem; }
.interaction-history time { color: var(--ink-soft); font-size: .62rem; }

@media (max-width: 840px) {
    .auth-layout { grid-template-columns: 1fr; }
    .auth-story { min-height: 42vh; padding: 60px 28px 48px; }
    .auth-story .brand-mark { width: 48px; height: 48px; margin-bottom: 28px; }
    .auth-story .brand-mark span:nth-child(2) { transform: translateX(13px); }
    .auth-story .brand-mark span:nth-child(3) { transform: translate(6px, 11px); }
    .auth-story h1 { font-size: 2.8rem; }
    .auth-story .lead { margin: 20px 0 0; font-size: .95rem; }
    .auth-panel { padding: 42px 24px 60px; border: 0; border-top: 1px solid var(--line); }
    .topbar { padding: 0 20px; }
    .brand small { display: none; }
    .member-app, .observer-app { width: min(100% - 28px, 1180px); }
    .section-heading { display: block; }
    .section-heading > p { margin-top: 12px; text-align: left; }
    .metrics { grid-template-columns: repeat(2, 1fr); }
    .shared-grid {
        display: block;
        padding-bottom: 22px;
    }
    .shared-card {
        width: var(--share-mobile-width, 88%);
        margin: 0 0 58px;
        transform: rotate(var(--share-rotation, 0deg));
    }
    .shared-card:nth-of-type(even) { margin-left: auto; }
    .shared-card--compact { --share-mobile-width: 74%; }
    .shared-card--medium { --share-mobile-width: 85%; }
    .shared-card--long { --share-mobile-width: 94%; }
    .shared-card--wide { --share-mobile-width: 100%; }
    .group-recap-card {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 560px) {
    .topbar { height: 68px; }
    .brand-mark.small { width: 24px; height: 24px; margin-right: 10px; }
    .identity > div:not(.avatar) { display: none; }
    .identity-profile-entry { padding: 2px; }
    .identity-profile-copy { display: none; }
    .avatar { width: 32px; height: 32px; }
    .daily-card-dialog { width: min(96vw, 470px); }
    .daily-card-panel { padding: 10px; border-radius: 27px; }
    .daily-card { min-height: 570px; padding: 28px 24px 26px; border-width: 3px; border-radius: 23px; }
    .daily-card-close { top: 19px; right: 19px; }
    .daily-card-header { padding-right: 35px; }
    .daily-card::before { background: linear-gradient(90deg, rgba(255,250,239,.94) 0%, rgba(255,250,239,.86) 59%, rgba(255,250,239,.2) 100%); }
    .daily-card blockquote { margin-top: 132px; }
    .daily-card blockquote p:first-child { font-size: clamp(1.62rem, 8vw, 2.25rem); }
    .daily-card blockquote p[lang="en"] { width: 94%; font-size: .88rem; }
    .daily-card footer { left: 24px; bottom: 27px; }
    .daily-card-accept { margin-top: 10px; }
    .member-app { padding-top: 20px; }
    .member-nav { position: sticky; z-index: 10; top: 68px; justify-content: flex-start; margin: 0 -14px 42px; padding: 10px 8px; overflow-x: auto; border-radius: 0; background: rgba(243,240,232,.94); backdrop-filter: blur(14px); scrollbar-width: none; }
    .member-nav::-webkit-scrollbar { display: none; }
    .nav-button { flex: 0 0 auto; padding: 8px 11px; font-size: .7rem; }
    .welcome-block { text-align: left; }
    .welcome-block h1 { font-size: 1.75rem; }
    .composer { padding: 20px; border-radius: 22px; }
    .composer textarea { min-height: 180px; }
    .submitted-state { margin: 54px auto; }
    .metrics { grid-template-columns: 1fr; }
    .shared-card { padding: 22px 20px; }
    .shared-card--compact { --share-mobile-width: 88%; }
    .shared-card--medium { --share-mobile-width: 94%; }
    .shared-card--long, .shared-card--wide { --share-mobile-width: 100%; }
    .shared-card-header {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 28px;
    }
    .shared-member-link {
        grid-template-columns: 46px minmax(0, 1fr);
        gap: 12px;
    }
    .shared-member-avatar { width: 46px; height: 46px; }
    .shared-card-date {
        grid-auto-flow: column;
        justify-content: start;
        justify-items: start;
        align-items: baseline;
        gap: 10px;
        padding: 12px 0 0;
        border-top: 1px solid rgba(27,154,116,.18);
        border-left: 0;
    }
    .timeline-item { grid-template-columns: 13px 1fr; gap: 10px; }
    .record-card { padding: 19px; }
    .record-meta { align-items: flex-start; }
    .observer-app { padding-top: 34px; }
    .notebook-workspace { grid-template-columns: minmax(0, 1fr) 44px; gap: 7px; }
    .notebook-shell { border-radius: 0; }
    .notebook-cover { display: block; padding: 0 0 21px; }
    .notebook-days { padding: 8px 0 0; }
    .notebook-day > summary { gap: 8px; }
    .notebook-block { grid-template-columns: minmax(0, 1fr) 30px; gap: 5px; padding-left: 10px; }
    .notebook-current-editor { margin: 8px 0 0; }
    .notebook-tool-dock { top: 50%; right: 5px; width: 44px; margin: 0; gap: 9px; transform: translateY(-50%); }
    .notebook-tool { width: 42px; height: 42px; }
    .notebook-tool svg { width: 21px; height: 21px; }
    .notebook-inline-sketch { margin: 0; border-radius: 0; }
    .notebook-sketch-toolbar { gap: 9px; }
    #notebook-sketch-status { display: none; }
    .notebook-reflection-guide { padding: 16px 0 8px; }
    .reflection-window-callout { align-items: flex-start; flex-direction: column; gap: 5px; }
    .reflection-panel { padding: 21px 17px; border-radius: 23px; }
    .reflection-panel > header { display: block; }
    #reflection-window-badge { display: inline-block; margin-top: 12px; }
    .reflection-panel > footer { grid-template-columns: 1fr; }
    .journey-tabs, .shared-tabs { gap: 8px; }
    .journey-tab { min-height: 52px; padding: 10px 5px; border-radius: 16px; font-size: .71rem; }
    .shared-tab { min-height: 54px; padding: 10px; border-radius: 16px; font-size: .74rem; }
    .share-choice-group { grid-template-columns: 1fr; }
    .journey-pane-heading { display: block; }
    .journey-pane-heading > p { margin: 8px 0 0 46px; }
    .today-selected-media { grid-template-columns: 1fr; }
    .today-selected-media img { height: auto; max-height: 330px; }
    .observer-heading { display: block; }
    .observer-heading .button { margin-top: 20px; }
    .metrics { grid-template-columns: repeat(2, 1fr); gap: 9px; }
    .metrics article { padding: 16px; }
    .inbox-toolbar { align-items: flex-end; }
    .filter-button { padding: 8px 11px; }
    .inbox-card > header { align-items: flex-start; padding: 18px; }
    .card-tags { max-width: 120px; }
    .member-submission { padding: 22px 18px 8px; }
    .draft-area { margin: 18px; padding: 16px; }
    .draft-area > div { display: block; }
    .draft-area small { display: block; margin-top: 4px; }
    .inbox-card > footer { display: grid; padding: 0 18px 20px; }
    .inbox-card > footer .button { width: 100%; }
    .response-actions { display: grid; }
    .safety-panel, .version-history, .interaction-history { margin-left: 18px; margin-right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Research platform modules */
select, input[type="date"] {
    min-height: 42px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    background: var(--surface);
    outline: none;
}

.inline-action {
    margin-top: 14px;
    padding: 0;
    border: 0;
    color: var(--sage-deep);
    background: none;
    cursor: pointer;
    font-size: .7rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.weekly-list { display: grid; gap: 18px; width: min(100%, 820px); margin: 0 auto; }
.weekly-card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,253,248,.78); box-shadow: var(--shadow-small); }
.weekly-card h2 { margin: 0 0 16px; font: 500 1.25rem var(--serif); }
.weekly-body { margin: 14px 0 0; white-space: pre-wrap; font: 400 .9rem/1.9 var(--serif); }
.group-recap-card {
    grid-column: 1/-1;
    border-color: rgba(115,141,125,.55);
    background: rgba(223,232,223,.44);
    transform: none;
}
.group-recap-card h3 { margin: 6px 0 4px; font: 500 1.15rem var(--serif); }
.group-recap-card > p {
    min-height: auto;
    margin: 8px 0 0;
    white-space: pre-wrap;
    font: 400 .92rem/1.85 var(--serif);
}

.research-nav {
    position: sticky;
    z-index: 15;
    top: 76px;
    display: flex;
    gap: 5px;
    margin: -20px 0 44px;
    padding: 12px;
    border: 1px solid rgba(220,216,205,.75);
    border-radius: 999px;
    background: rgba(243,240,232,.94);
    backdrop-filter: blur(18px);
}

.research-nav-button {
    flex: 1;
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    color: var(--ink-soft);
    background: transparent;
    cursor: pointer;
    font-size: .78rem;
}
.research-nav-button.active { color: #fff; background: var(--sage-deep); font-weight: 600; }
.research-section { display: none; }
.research-section.active { display: block; animation: enter .3s ease both; }
.heading-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; }

.privacy-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: -18px 0 24px;
    padding: 14px 18px;
    border: 1px solid rgba(115,141,125,.35);
    border-radius: var(--radius-md);
    background: rgba(223,232,223,.48);
    color: var(--ink-soft);
    font-size: .74rem;
    line-height: 1.6;
}
.privacy-banner strong { color: var(--sage-deep); white-space: nowrap; }

.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-card { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,253,248,.8); }
.chart-card.wide { grid-column: 1/-1; }
.chart-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 22px; }
.chart-heading h2 { margin: 0; font: 500 1rem var(--serif); }
.chart-heading p { margin: 5px 0 0; color: var(--ink-soft); font-size: .68rem; }
.chart-legend { display: flex; gap: 14px; color: var(--ink-soft); font-size: .65rem; }
.chart-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 2px; background: var(--sage); }
.chart-legend .legend-emotion::before { border-radius: 50%; background: var(--clay); }
.trend-chart h3 { margin: 20px 0 10px; color: var(--ink-soft); font-size: .67rem; font-weight: 500; }
.activity-bars { display: flex; align-items: flex-end; gap: 2px; height: 92px; padding-top: 8px; border-bottom: 1px solid var(--line); }
.activity-bars span { position: relative; flex: 1; min-width: 2px; border-radius: 2px 2px 0 0; background: var(--sage); }
.activity-bars span[data-label]::after { content: attr(data-label); position: absolute; left: 0; top: calc(100% + 4px); color: var(--ink-soft); font-size: 8px; }
.trend-chart svg { display: block; width: 100%; max-height: 190px; overflow: visible; }
.trend-chart svg text { fill: var(--ink-soft); font: 9px var(--sans); }
.chart-grid { stroke: #e8e4db; stroke-width: 1; }
.zero-grid { stroke: #a8aea9; stroke-width: 1.2; }
.emotion-line { fill: none; stroke: var(--clay); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.trend-chart circle { fill: var(--surface); stroke: var(--clay); stroke-width: 2; }
.sparse-note { padding: 14px; border-radius: 12px; background: var(--paper); color: var(--ink-soft); font-size: .72rem; line-height: 1.7; }
.sparse-days { display: grid; gap: 7px; }
.sparse-days > div { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: .72rem; }
.sparse-days strong { font-weight: 600; }
.sparse-days em { color: var(--ink-soft); font-style: normal; text-align: right; }
.bar-chart { display: grid; gap: 13px; }
.bar-row { display: grid; grid-template-columns: 92px 1fr 28px; align-items: center; gap: 10px; font-size: .7rem; }
.bar-row > div { height: 10px; overflow: hidden; border-radius: 999px; background: var(--paper-deep); }
.bar-row i { display: block; height: 100%; border-radius: inherit; background: var(--sage); }
.bar-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .7rem; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--ink-soft); font-weight: 500; }
.method-note { margin: 16px 2px 0; color: var(--ink-soft); font-size: .65rem; line-height: 1.7; }

.coding-strip { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.coding-strip span { padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); background: var(--paper); font-size: .65rem; }
.coding-strip .theme-chip { color: var(--sage-deep); border-color: rgba(115,141,125,.35); background: var(--sage-pale); }
.research-note-area { margin: 0 28px 20px; padding: 15px 18px; border: 1px dashed var(--line); border-radius: var(--radius-md); }
.research-note-area summary { color: var(--sage-deep); cursor: pointer; font-size: .73rem; font-weight: 600; }
.research-note-area textarea { min-height: 110px; margin: 14px 0 10px; font-size: .8rem; }

.research-timeline { display: grid; gap: 14px; }
.timeline-research-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,253,248,.78); }
.timeline-research-head { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.timeline-research-head strong { font-size: .82rem; }
.timeline-research-head time { color: var(--ink-soft); font-size: .68rem; }
.coding-detail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.coding-detail > div { padding: 12px; border-radius: 10px; background: var(--paper); }
.coding-detail span, .coding-detail strong { display: block; }
.coding-detail span { color: var(--ink-soft); font-size: .63rem; }
.coding-detail strong { margin-top: 4px; font: 500 1.05rem var(--serif); }
.coding-detail > p { grid-column: 1/-1; margin: 2px 0 0; color: var(--ink-soft); font-size: .67rem; }
.timeline-note { margin-top: 13px; padding: 13px; border-left: 2px solid var(--clay); background: var(--clay-pale); white-space: pre-wrap; font-size: .72rem; line-height: 1.7; }

.weekly-workspace { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.workspace-card, .prompt-editor-card { padding: 25px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,253,248,.8); }
.workspace-card h2, .prompt-editor-card h2 { margin: 0 0 10px; font: 500 1.05rem var(--serif); }
.workspace-card > p { margin: 0 0 18px; color: var(--ink-soft); font-size: .72rem; line-height: 1.7; }
.form-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.form-row select { flex: 1; min-width: 170px; }
.editor-meta { margin: 12px 0 8px; color: var(--ink-soft); font-size: .68rem; }
#weekly-editor, #group-weekly-editor { min-height: 230px; font: 400 .82rem/1.8 var(--serif); }
#weekly-editor-wrap .button, #group-weekly-editor-wrap .button { margin-top: 10px; }
.section-subheading { margin: 38px 0 16px; }
.section-subheading h2 { font: 500 1.1rem var(--serif); }
.compact-weekly { padding: 20px; }
.compact-weekly .status { float: right; margin-top: -31px; }

.private-status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.private-status-grid article { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,253,248,.78); }
.private-status-grid span, .private-status-grid strong, .private-status-grid small { display: block; }
.private-status-grid span { color: var(--ink-soft); font-size: .68rem; }
.private-status-grid strong { margin: 9px 0 6px; overflow-wrap: anywhere; font: 500 .95rem/1.5 var(--serif); }
.private-status-grid small { color: var(--ink-soft); font-size: .65rem; line-height: 1.6; }
.invite-workspace { margin-top: 16px; }
.invite-heading p { margin: 0; color: var(--ink-soft); font-size: .72rem; line-height: 1.7; }
.invite-workspace .form-row input { flex: 2; min-width: 220px; }
.invite-workspace .form-row select { flex: 0 0 110px; min-width: 110px; }
.section-subheading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.section-subheading p { margin: 0; color: var(--ink-soft); font-size: .68rem; }
.invite-list { display: grid; gap: 10px; }
.invite-card { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(210px, auto) auto; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,253,248,.78); }
.invite-card strong, .invite-card small { display: block; }
.invite-card strong { font-size: .8rem; }
.invite-card small { margin-top: 5px; color: var(--ink-soft); font-size: .65rem; }
.invite-code { padding: 8px 12px; border: 1px dashed rgba(77,107,90,.5); border-radius: 9px; color: var(--sage-deep); background: var(--sage-pale); cursor: pointer; font: 600 .72rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; }
.invite-card .stop-invite { margin: 0; padding-left: 14px; }

.engine-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.engine-grid article { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,253,248,.76); }
.engine-grid article.engine-privacy { border-color: rgba(115,141,125,.4); background: var(--sage-pale); }
.engine-grid article.engine-connection.available { border-color: rgba(115,141,125,.55); background: var(--sage-pale); }
.engine-grid article.engine-connection.unavailable { border-color: rgba(184,117,91,.55); background: var(--clay-pale); }
.engine-grid h3 { margin: 0; font: 500 .85rem var(--serif); }
.engine-grid p { margin: 7px 0 0; color: var(--ink-soft); font-size: .68rem; line-height: 1.6; }
.prompt-editor-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.prompt-editor-heading p { margin: 0; color: var(--ink-soft); font-size: .68rem; }
.prompt-editor-list { display: grid; gap: 18px; }
.prompt-purpose { margin: 12px 0 0; color: var(--ink-soft); font-size: .72rem; line-height: 1.7; }
.prompt-editor { min-height: 440px; margin-top: 18px; font: 400 .76rem/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; }
.agent-config-scope-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.agent-config-scope-row label { margin: 0; }
.agent-config-version { flex: 1 1 160px; color: var(--ink-soft); font-size: .66rem; }
.agent-config-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.agent-config-grid label { margin: 0; }
.agent-response-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 18px; }
.agent-response-presets strong { margin-right: 3px; color: var(--ink-soft); font-size: .7rem; }
.agent-custom-instruction { display: grid; gap: 8px; margin-top: 18px; }
.agent-custom-instruction textarea { min-height: 92px; resize: vertical; }
.agent-config-fieldset { margin: 22px 0 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.agent-config-fieldset legend { padding: 0 8px; color: var(--ink-soft); font-size: .68rem; font-weight: 800; }
.agent-config-toggles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.agent-toggle.locked { opacity: .72; cursor: not-allowed; }
.agent-toggle { display: flex !important; align-items: flex-start; gap: 10px; margin: 0 !important; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,253,248,.7); cursor: pointer; }
.agent-toggle input { flex: 0 0 auto; margin-top: 2px; }
.agent-toggle span { display: grid; gap: 3px; font-size: .7rem; font-weight: 700; }
.agent-toggle small { color: var(--ink-soft); font-size: .6rem; font-weight: 400; line-height: 1.5; }
.agent-toggle.danger { border-color: rgba(184,117,91,.5); background: var(--clay-pale); }
.agent-config-history { margin-top: 22px; }
.agent-config-history summary { cursor: pointer; color: var(--member-deep); font-size: .72rem; font-weight: 800; }
.agent-config-history-list { display: grid; gap: 9px; margin-top: 13px; }
.config-version-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); font-size: .68rem; }
.config-version-row.active { border-color: rgba(27,154,116,.5); background: var(--member-pale, var(--sage-pale)); }
.config-version-row button { margin-left: auto; }
.family-member-summary { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.family-member-chip { padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .68rem; background: rgba(255,253,248,.8); }
.family-relationship-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; }
.family-relationship-form label { margin: 0; }
.family-relationship-form .button { grid-column: span 3; justify-self: start; }
.family-relationship-list { display: grid; gap: 9px; margin: 16px 0; }
.family-relationship-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); font-size: .68rem; }
.family-relationship-row strong { font-weight: 800; }
.family-relationship-row button { margin-left: auto; }
.agent-runs-list { display: grid; gap: 10px; margin-top: 16px; }
.agent-run-row { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,253,248,.72); font-size: .68rem; }
.agent-run-row header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 7px; }
.agent-run-row header strong { font-size: .72rem; }
.agent-run-badge { padding: 3px 9px; border-radius: 999px; background: var(--sage-pale); color: var(--member-deep); font-size: .58rem; font-weight: 800; }
.agent-run-badge.family { background: var(--clay-pale); color: #8c4f38; }
.agent-run-row p { margin: 0; color: var(--ink-soft); line-height: 1.65; }

@media (max-width: 840px) {
    .research-nav { top: 68px; overflow-x: auto; border-radius: 16px; }
    .research-nav-button { flex: 0 0 auto; }
    .dashboard-grid, .weekly-workspace, .private-status-grid { grid-template-columns: 1fr; }
    .engine-grid { grid-template-columns: repeat(2, 1fr); }
    .agent-config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .agent-config-toggles, .family-relationship-form { grid-template-columns: 1fr; }
    .family-relationship-form .button { grid-column: 1; }
    .observer-heading { align-items: flex-start; }
    .heading-actions { justify-content: flex-start; margin-top: 18px; }
}

@media (max-width: 560px) {
    .research-nav { margin-top: -18px; margin-bottom: 30px; padding: 8px; }
    .privacy-banner { align-items: flex-start; }
    .privacy-banner strong { white-space: normal; }
    .heading-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .heading-actions select { grid-column: 1/-1; }
    .chart-card { padding: 18px; }
    .sparse-days > div { grid-template-columns: 1fr; }
    .sparse-days em { text-align: left; }
    .coding-detail { grid-template-columns: 1fr; }
    .coding-detail > p { grid-column: 1; }
    .engine-grid { grid-template-columns: 1fr; }
    .agent-config-grid { grid-template-columns: 1fr; }
    .agent-config-scope-row { display: grid; grid-template-columns: 1fr; }
    .agent-config-version { flex: none; }
    .prompt-editor-heading { display: block; }
    .prompt-editor-heading .button { margin-top: 14px; }
    .prompt-editor { min-height: 380px; }
    .invite-card { grid-template-columns: 1fr auto; }
    .invite-code { grid-column: 1/-1; grid-row: 2; text-align: left; overflow-wrap: anywhere; }
    .invite-card .stop-invite { grid-column: 2; grid-row: 1; }
}

/*
 * Permanent visual language
 * Participant = green · Researcher = blue · AI = warm orange.
 * The soft colour fields and fine grain are inspired by the supplied references.
 */
:root {
    --paper: #f8f5ea;
    --paper-deep: #eee9dc;
    --surface: rgba(255, 253, 246, .86);
    --ink: #243438;
    --ink-soft: #6f7b7b;
    --line: rgba(55, 76, 79, .14);
    --member: #1b9a74;
    --member-deep: #087058;
    --member-pale: #d9f3e7;
    --researcher: #377fbd;
    --researcher-deep: #205c91;
    --researcher-pale: #dceefa;
    --ai: #ef8a48;
    --ai-deep: #b85c2b;
    --ai-pale: #ffe6d2;
    --rose: #ef91a1;
    --sun: #f6cb55;
    --sage: var(--member);
    --sage-deep: var(--member-deep);
    --sage-pale: var(--member-pale);
    --clay: var(--ai);
    --clay-pale: var(--ai-pale);
    --shadow: 0 24px 70px rgba(33, 65, 68, .10);
    --shadow-small: 0 10px 30px rgba(33, 65, 68, .08);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    --serif: var(--sans);
}

body {
    position: relative;
    font-family: var(--sans);
    font-weight: 400;
    background-color: var(--paper);
    background-image:
        radial-gradient(ellipse at 10% 4%, rgba(239,145,161,.25) 0, rgba(239,145,161,0) 30%),
        radial-gradient(ellipse at 88% 16%, rgba(246,203,85,.24) 0, rgba(246,203,85,0) 32%),
        radial-gradient(ellipse at 62% 100%, rgba(75,163,201,.18) 0, rgba(75,163,201,0) 34%);
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    z-index: 90;
    inset: 0;
    pointer-events: none;
    opacity: .13;
    background-image: radial-gradient(rgba(25,45,48,.55) .48px, transparent .7px);
    background-size: 3px 3px;
    mix-blend-mode: multiply;
}

body[data-role="member"] {
    background-image:
        radial-gradient(ellipse at 4% 8%, rgba(27,154,116,.20) 0, transparent 31%),
        radial-gradient(ellipse at 98% 24%, rgba(246,203,85,.19) 0, transparent 28%),
        radial-gradient(ellipse at 72% 95%, rgba(239,145,161,.14) 0, transparent 34%);
}

body[data-role="observer"] {
    background-image:
        radial-gradient(ellipse at 3% 6%, rgba(55,127,189,.22) 0, transparent 32%),
        radial-gradient(ellipse at 97% 26%, rgba(138,184,217,.25) 0, transparent 31%),
        radial-gradient(ellipse at 70% 100%, rgba(239,138,72,.10) 0, transparent 30%);
}

.auth-story {
    isolation: isolate;
    z-index: 91;
    background:
        radial-gradient(rgba(73,86,79,.16) .45px, transparent .7px) 0 0 / 4px 4px,
        radial-gradient(ellipse at 18% 24%, rgba(239,145,161,.86) 0 11%, transparent 31%),
        radial-gradient(ellipse at 75% 18%, rgba(74,157,191,.75) 0 15%, transparent 37%),
        radial-gradient(ellipse at 23% 78%, rgba(246,203,85,.78) 0 17%, transparent 38%),
        radial-gradient(ellipse at 80% 77%, rgba(27,154,116,.70) 0 15%, transparent 38%),
        #f6f2e7;
}
.auth-story::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 48%;
    aspect-ratio: .78;
    right: 6%;
    bottom: -8%;
    border-radius: 48% 52% 22% 78% / 54% 30% 70% 46%;
    background: linear-gradient(145deg, rgba(55,127,189,.78), rgba(27,154,116,.66) 43%, rgba(239,138,72,.73) 75%, rgba(239,145,161,.70));
    box-shadow: -12vw -11vw 0 -9vw rgba(246,203,85,.7);
    filter: blur(1px);
}
.auth-story::after { opacity: .32; }
.auth-story h1 {
    position: relative;
    width: max-content;
    color: #fffaef;
    background: none;
    -webkit-text-fill-color: #fffaef;
    font-size: clamp(4.35rem, 7vw, 7.5rem);
    font-weight: 900;
    line-height: .96;
    letter-spacing: .045em;
    text-shadow: none;
}
.auth-story .lead { color: rgba(36,52,56,.78); font-weight: 300; }
.auth-panel { background: rgba(255,253,246,.80); backdrop-filter: blur(24px); }
.auth-card h2, .welcome-block h1, .section-heading h1, .observer-heading h1 { font-weight: 700; }
.auth-card > .muted, .section-heading > p, .observer-heading > div > p:last-child { font-weight: 300; }

.topbar {
    border-bottom-color: rgba(55,76,79,.12);
    background: rgba(248,245,234,.82);
    box-shadow: 0 8px 30px rgba(33,65,68,.04);
}
body[data-role="member"] .topbar { border-bottom-color: rgba(27,154,116,.22); }
body[data-role="observer"] .topbar { border-bottom-color: rgba(55,127,189,.22); }
body[data-role="member"] .avatar { background: var(--member); }
body[data-role="observer"] .avatar { background: var(--researcher); }
body[data-role="member"] .brand-mark span { border-color: rgba(27,154,116,.75); }
body[data-role="observer"] .brand-mark span { border-color: rgba(55,127,189,.75); }

.member-nav {
    width: max-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 6px;
    border: 1px solid rgba(27,154,116,.18);
    border-radius: 999px;
    background: rgba(255,253,246,.62);
}
.nav-button.active { color: #fff; background: var(--member); box-shadow: 0 8px 20px rgba(27,154,116,.20); }
.member-app .button.primary { background: var(--member-deep); box-shadow: 0 10px 25px rgba(8,112,88,.22); }
.member-app input:focus, .member-app textarea:focus { border-color: var(--member); box-shadow: 0 0 0 4px rgba(27,154,116,.12); }
.composer, .record-card, .shared-card, .weekly-card {
    border-color: rgba(27,154,116,.17);
    background: rgba(255,253,246,.75);
    backdrop-filter: blur(16px);
}
.composer { box-shadow: 0 26px 70px rgba(8,112,88,.10); }
.composer-topline span:first-child, .photo-button, .share-label, .inline-action { color: var(--member-deep); }
.share-choice { background: linear-gradient(110deg, rgba(217,243,231,.82), rgba(246,203,85,.16)); }
.timeline-marker { border-color: var(--paper); background: var(--member); box-shadow: 0 0 0 1px var(--member); }
.public-share-card { position: relative; overflow: hidden; }
.public-share-card::after { content: ""; position: absolute; width: 90px; height: 90px; right: -26px; top: -35px; border-radius: 55% 45% 60% 40%; background: rgba(27,154,116,.13); }

.observer-response {
    border-left-color: var(--researcher);
    background: rgba(220,238,250,.66);
}
.observer-response span { color: var(--researcher-deep); }

.research-nav {
    border-color: rgba(55,127,189,.20);
    background: rgba(241,248,252,.88);
    box-shadow: 0 14px 34px rgba(32,92,145,.08);
}
.research-nav-button.active { color: #fff; background: var(--researcher); box-shadow: 0 8px 20px rgba(32,92,145,.22); }
.observer-app .button.primary { background: var(--researcher-deep); box-shadow: 0 10px 25px rgba(32,92,145,.20); }
.observer-app input:focus, .observer-app textarea:focus, .observer-app select:focus { border-color: var(--researcher); box-shadow: 0 0 0 4px rgba(55,127,189,.11); }
.metrics article, .inbox-card, .chart-card, .timeline-research-card, .workspace-card, .private-status-grid article, .invite-card {
    border-color: rgba(55,127,189,.16);
    background: rgba(255,253,246,.78);
    backdrop-filter: blur(14px);
}
.metrics strong { color: var(--researcher-deep); font-weight: 700; }
.filter-button.active { color: var(--researcher-deep); background: var(--researcher-pale); }
.person > span { color: var(--researcher-deep); background: var(--researcher-pale); }
.coding-strip .theme-chip { color: var(--researcher-deep); border-color: rgba(55,127,189,.24); background: var(--researcher-pale); }
.research-note-area summary, .version-history summary, .interaction-history summary { color: var(--researcher-deep); }
.activity-bars span, .bar-row i { background: var(--researcher); }
.chart-legend span::before { background: var(--researcher); }

.member-submission {
    margin: 18px 28px 8px;
    padding: 24px;
    border-left: 4px solid var(--member);
    border-radius: 18px;
    background: linear-gradient(110deg, rgba(217,243,231,.56), rgba(255,253,246,.42));
}
.draft-area {
    border: 1px solid rgba(239,138,72,.24);
    background: linear-gradient(115deg, rgba(255,230,210,.84), rgba(255,248,234,.68));
}
.draft-area span { color: var(--ai-deep); }
.draft-area textarea { border-color: rgba(239,138,72,.28); }
.button.ai-action { color: #fff; border: 0; background: var(--ai-deep); box-shadow: 0 9px 22px rgba(184,92,43,.20); }
.button.ai-action:hover:not(:disabled) { background: #9f4d24; }
.version-list article { border-left-color: var(--researcher); }
.version-list article.version-ai-draft { border-left-color: var(--ai); background: rgba(255,230,210,.52); }
.version-list article.version-researcher-edit, .version-list article.version-final { border-left-color: var(--researcher); background: rgba(220,238,250,.45); }

#research-ai-section .observer-heading .eyebrow,
#research-ai-section .observer-heading h1,
#research-ai-section .prompt-editor-heading h2 { color: var(--ai-deep); }
#research-ai-section .engine-grid article,
#research-ai-section .prompt-editor-card { border-color: rgba(239,138,72,.25); background: rgba(255,246,234,.78); }
#research-ai-section .engine-grid article.engine-connection.available,
#research-ai-section .engine-grid article.engine-privacy { border-color: rgba(239,138,72,.32); background: var(--ai-pale); }
#research-ai-section .button.primary { background: var(--ai-deep); box-shadow: 0 10px 24px rgba(184,92,43,.20); }
#research-ai-section .prompt-editor:focus { border-color: var(--ai); box-shadow: 0 0 0 4px rgba(239,138,72,.12); }

.eyebrow { font-weight: 700; }
.record-text, .member-submission > p, .draft-area textarea, .weekly-body, .observer-response p { font-weight: 300; }
.button, .nav-button.active, .research-nav-button.active { font-weight: 700; }

.draft-explainer {
    margin: 14px 0 20px;
    color: var(--ink-soft);
    font-size: .76rem;
    font-weight: 300;
    line-height: 1.75;
}
.submission-window-note {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    padding: 13px 16px;
    border: 1px solid rgba(27,154,116,.20);
    border-radius: 16px;
    background: rgba(217,243,231,.58);
    color: var(--ink-soft);
    font-size: .72rem;
    line-height: 1.55;
}
.submission-window-note strong { flex: 0 0 auto; color: var(--member-deep); font-size: .74rem; }
.submission-window-note.closed { border-color: rgba(239,138,72,.28); background: rgba(255,230,210,.58); }
.submission-window-note.closed strong { color: var(--ai-deep); }

.response-schedule-controls input[type="datetime-local"] {
    width: 100%;
    height: 44px;
    padding: 0 13px;
    border: 1px solid rgba(55,127,189,.22);
    border-radius: 13px;
    color: var(--ink);
    background: rgba(255,255,255,.78);
}

.draft-area > .response-timing-panel {
    display: grid;
    align-items: stretch;
    gap: 12px;
    margin: 14px 0 0;
    padding: 15px;
    border: 1px solid rgba(239,138,72,.24);
    border-radius: 16px;
    background: rgba(255,248,234,.82);
}
.timing-advice-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.timing-advice-heading strong { color: var(--ai-deep); font-size: .75rem; }
.timing-advice-heading em { padding: 5px 9px; border-radius: 999px; color: var(--ai-deep); background: var(--ai-pale); font-size: .64rem; font-style: normal; font-weight: 700; }
.response-timing-panel > p { margin: 0; color: #79513a; font-size: .72rem; line-height: 1.65; }
.response-schedule-controls { display: grid; grid-template-columns: minmax(230px, 1fr) auto; align-items: end; gap: 10px; }
.response-schedule-controls label { margin: 0 !important; }
.response-schedule-controls label span { display: block; margin-bottom: 7px; color: var(--ink-soft); font-size: .66rem; }
.response-schedule-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.scheduled-response-note { margin: 0 !important; padding: 10px 12px; border-radius: 12px; color: var(--researcher-deep) !important; background: var(--researcher-pale); font-weight: 700; }
.timing-safety-note { color: #934a35 !important; background: rgba(255,230,210,.75) !important; }
.draft-segments { display: grid; gap: 12px; }
.draft-segment {
    padding: 16px 17px 10px;
    border: 1px solid rgba(27,154,116,.16);
    border-radius: 18px;
    background: rgba(233,247,239,.42);
}
.draft-segment-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.draft-segment-heading strong { color: var(--member-deep); font-size: .74rem; letter-spacing: .04em; }
.draft-segment-heading small { padding: 4px 8px; border-radius: 999px; color: var(--member-deep); background: rgba(217,243,231,.85); font-size: .62rem; font-weight: 700; }
.composer .draft-segment textarea {
    min-height: 210px;
    margin: 0;
    padding: 8px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.entry-mode-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 20px;
}
.entry-mode-card {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    min-width: 0;
    min-height: 76px;
    padding: 10px 13px;
    overflow: hidden;
    border: 1px solid rgba(27,154,116,.22);
    border-radius: 20px;
    color: var(--member-deep);
    background: rgba(255,253,246,.92);
    box-shadow: none;
    cursor: pointer;
    font: inherit;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.entry-mode-card::after {
    content: "";
    position: absolute;
    width: 48px;
    height: 48px;
    right: -22px;
    bottom: -25px;
    border-radius: 58% 42% 46% 54%;
    background: rgba(246,203,85,.20);
}
.entry-mode-card:hover, .entry-mode-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(27,154,116,.48);
    box-shadow: none;
}
.entry-mode-card strong { position: relative; z-index: 1; white-space: nowrap; font-size: .78rem; font-weight: 800; letter-spacing: .02em; }
.entry-mode-icon {
    position: relative;
    z-index: 1;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--member-deep);
    box-shadow: none;
}
.entry-mode-icon::after { content: none; }
.entry-mode-icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.palette-icon .palette-dot { stroke: none; }
.palette-icon .dot-one { fill: #f3c64f; }
.palette-icon .dot-two { fill: #ff9b68; }
.palette-icon .dot-three { fill: #f19db2; }
.palette-icon .dot-four { fill: #8ed4e5; }
.sketch-open-button { font: inherit; }
.composer-count-row { justify-content: flex-end; padding: 12px 0 20px; }
.draft-footer { padding-top: 2px; }
.draft-status { margin: 0 0 10px; color: var(--member-deep); font-size: .71rem; }
#character-count.over-limit { color: #9f493b; font-weight: 700; }
.draft-actions { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px; }
.draft-actions .button { width: 100%; padding: 0 16px; }
.draft-icon-button { display: grid; place-items: center; width: 50px; height: 50px; padding: 0; border-radius: 50%; cursor: pointer; }
.draft-icon-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.draft-delete { border: 1px solid rgba(139,79,67,.30); color: #8b4f43; background: rgba(255,253,248,.82); }
.draft-save { border: 1px solid var(--member-deep); color: #fff; background: var(--member-deep); box-shadow: 0 8px 20px rgba(8,112,88,.18); }
.draft-icon-button:disabled { cursor: wait; opacity: .55; }
.record-segments { display: grid; gap: 12px; margin: 18px 0; }
.record-segment { padding-left: 14px; border-left: 2px solid rgba(27,154,116,.30); }
.record-segment > span { color: var(--member-deep); font-size: .66rem; font-weight: 600; }
.record-segment .record-text { margin: 5px 0 0; }

.profile-hero {
    display: flex;
    align-items: center;
    gap: 22px;
    width: min(100%, 960px);
    margin: 0 auto 28px;
}
.profile-page-avatar {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    flex: 0 0 auto;
    border-radius: 42% 58% 48% 52% / 55% 42% 58% 45%;
    color: #fff;
    background: linear-gradient(145deg, var(--member), var(--member-deep));
    box-shadow: 0 16px 34px rgba(8,112,88,.20);
    font-size: 1.8rem;
    font-weight: 800;
}
.profile-hero .eyebrow { margin-bottom: 6px; color: var(--member-deep); }
.profile-hero h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; }
.profile-hero > div:last-child > p:last-child { margin: 7px 0 0; color: var(--ink-soft); }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr); gap: 18px; width: min(100%, 960px); margin: 0 auto; }
.profile-summary { display: grid; gap: 18px; }
.profile-card { padding: 26px; border: 1px solid rgba(27,154,116,.17); border-radius: 26px; background: rgba(255,253,246,.78); box-shadow: 0 20px 54px rgba(8,112,88,.08); }
.profile-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.profile-card h2 { margin: 0; font-size: 1.25rem; }
.profile-card-heading > span { padding: 6px 10px; border-radius: 999px; color: var(--member-deep); background: var(--member-pale); font-size: .72rem; font-weight: 800; }
.profile-editor-card textarea { min-height: 140px; }
.profile-editor-card .button { width: 100%; margin-top: 18px; }
.profile-avatar-actions { display: flex; align-items: center; gap: 12px; margin: 20px 0 18px; }
.profile-avatar-actions .button { width: auto; margin: 0; cursor: pointer; }
.profile-avatar-actions .text-button { margin: 0; padding-left: 12px; }
.profile-visibility-note { margin: 8px 0 0; color: var(--ink-soft); font-size: .68rem; line-height: 1.65; }
.profile-visibility-note.public { color: var(--member-deep); }
.profile-membership dl { display: grid; gap: 13px; margin: 20px 0 0; }
.profile-membership dl div { display: flex; justify-content: space-between; gap: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.profile-membership dl div:last-child { padding-bottom: 0; border: 0; }
.profile-membership dt { color: var(--ink-soft); font-size: .75rem; }
.profile-membership dd { margin: 0; font-size: .78rem; font-weight: 700; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.profile-stats article { padding: 18px 12px; border: 1px solid rgba(27,154,116,.16); border-radius: 20px; text-align: center; background: linear-gradient(150deg, rgba(217,243,231,.82), rgba(255,253,246,.72)); }
.profile-stats span, .profile-stats small { display: block; color: var(--ink-soft); font-size: .64rem; }
.profile-stats strong { display: inline-block; margin: 8px 3px 2px 0; color: var(--member-deep); font-size: 1.75rem; line-height: 1; }
.profile-stats small { display: inline; }
.profile-journey-card { width: min(100%, 960px); margin: 18px auto 0; }
.profile-journey-card .profile-card-heading > div > p:last-child { margin: 8px 0 0; color: var(--ink-soft); font-size: .72rem; line-height: 1.7; }
.profile-journey-card form { display: grid; gap: 16px; margin-top: 24px; }
.profile-fieldset { display: grid; gap: 15px; margin: 0; padding: 20px; border: 1px solid rgba(27,154,116,.16); border-radius: 20px; background: rgba(233,247,239,.32); }
.profile-fieldset legend { padding: 0 8px; color: var(--member-deep); font-size: .82rem; font-weight: 900; }
.profile-rhythm-edit-note { margin: 0; padding: 10px 12px; border-radius: 13px; color: var(--member-deep); background: rgba(217,243,231,.72); font-size: .68rem; line-height: 1.6; }
.profile-rhythm-edit-note.locked { color: #7a5b31; background: rgba(246,203,85,.22); }
.profile-fieldset select:disabled { cursor: not-allowed; opacity: .62; }
.profile-fieldset label > span, .profile-goals-field > span { display: block; margin-bottom: 7px; font-size: .74rem; font-weight: 750; }
.profile-fieldset label > small, .profile-goals-field small { display: block; margin: -2px 0 7px; color: var(--ink-soft); font-size: .65rem; font-weight: 400; line-height: 1.6; }
.profile-fieldset textarea { min-height: 112px; }
.profile-form-grid { display: grid; gap: 12px; }
.profile-form-grid.three-columns { grid-template-columns: repeat(3, 1fr); }
.profile-choice-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-choice-chips label { cursor: pointer; }
.profile-choice-chips input { position: absolute; opacity: 0; pointer-events: none; }
.profile-choice-chips label > span { margin: 0; padding: 8px 13px; border: 1px solid rgba(27,154,116,.22); border-radius: 999px; color: var(--ink-soft); background: #fffcf4; font-size: .7rem; }
.profile-choice-chips input:checked + span { border-color: var(--member-deep); color: #fff; background: var(--member-deep); }
.profile-goals-field > input { margin-top: 10px; }
.profile-privacy-summary { grid-template-columns: repeat(3, 1fr); }
.profile-privacy-summary legend { grid-column: 1 / -1; }
.profile-privacy-summary label { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border-radius: 15px; background: rgba(255,253,246,.78); }
.profile-privacy-summary label > span { margin: 0; }
.profile-privacy-summary label b, .profile-privacy-summary label small { display: block; }
.profile-privacy-summary label small { margin: 3px 0 0; }
.profile-privacy-summary input[type="checkbox"] { width: 20px; height: 20px; flex: 0 0 auto; opacity: 1; accent-color: var(--member-deep); }
.profile-journey-card form > .button { width: min(100%, 320px); justify-self: end; }

.public-profile-dialog { width: min(92vw, 560px); max-width: none; padding: 0; border: 0; border-radius: 30px; background: transparent; }
.public-profile-dialog::backdrop { background: rgba(25,39,37,.58); backdrop-filter: blur(10px); }
.public-profile-panel { position: relative; padding: 32px; overflow: hidden; border: 2px solid var(--member-deep); border-radius: 28px; background: #fffaef; box-shadow: 0 34px 100px rgba(17,48,42,.30); }
.public-profile-panel::after { content: ""; position: absolute; z-index: 0; width: 170px; height: 170px; right: -80px; top: -85px; border-radius: 44% 56% 62% 38%; background: rgba(244,200,74,.32); }
.public-profile-close { position: absolute; z-index: 3; top: 20px; right: 20px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid rgba(8,112,88,.25); border-radius: 50%; color: var(--member-deep); background: #fffaef; cursor: pointer; font-size: 1.35rem; }
.public-profile-hero { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; padding-right: 45px; }
.public-profile-hero .profile-page-avatar { width: 74px; height: 74px; font-size: 1.5rem; }
.public-profile-hero h2 { margin: 2px 0 0; font-size: 1.8rem; }
.public-profile-hero p:last-child { margin: 5px 0 0; color: var(--ink-soft); font-size: .7rem; }
.public-profile-bio { position: relative; z-index: 1; min-height: 48px; margin: 24px 0 16px; padding: 18px; border-left: 3px solid var(--member); color: var(--ink); background: rgba(233,247,239,.58); font: 400 .88rem/1.8 var(--serif); white-space: pre-wrap; }
.public-profile-membership { position: relative; z-index: 1; padding: 20px; box-shadow: none; }
.public-profile-membership h3 { margin: 0; font-size: 1.05rem; }
.public-profile-stats { position: relative; z-index: 1; margin-top: 12px; }
.public-profile-privacy { position: relative; z-index: 1; margin: 16px 4px 0; color: var(--ink-soft); font-size: .65rem; line-height: 1.6; }

.sketch-dialog {
    width: min(920px, calc(100vw - 32px));
    max-height: 92dvh;
    padding: 0;
    border: 0;
    border-radius: 28px;
    color: var(--ink);
    background: transparent;
    box-shadow: 0 36px 100px rgba(24,50,45,.28);
}
.sketch-dialog::backdrop { background: rgba(28,42,39,.52); backdrop-filter: blur(8px); }
.sketch-panel {
    max-height: 92dvh;
    padding: 20px 26px 22px;
    overflow-y: auto;
    border: 1px solid rgba(27,154,116,.20);
    border-radius: 28px;
    background: #f7f3e8;
}
.sketch-heading {
    position: sticky;
    top: -26px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: -20px -26px 0;
    padding: 22px 26px 14px;
    border-bottom: 1px solid rgba(27,154,116,.12);
    background: rgba(247,243,232,.94);
    backdrop-filter: blur(12px);
}
.sketch-heading .eyebrow { margin-bottom: 4px; color: var(--member-deep); }
.sketch-heading h2 { margin: 0; font-size: 1.45rem; }
.sketch-heading-actions,
.sketch-secondary-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 8px;
}
.sketch-icon-button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(27,154,116,.20);
    border-radius: 50%;
    color: var(--member-deep);
    background: rgba(255,253,246,.84);
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.sketch-icon-button:hover:not(:disabled) { transform: translateY(-1px); border-color: rgba(27,154,116,.48); background: #fffdf6; }
.sketch-icon-button svg,
.sketch-mode-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sketch-icon-button.primary-icon { color: #fff; border-color: var(--member-deep); background: var(--member-deep); box-shadow: 0 7px 18px rgba(8,112,88,.18); }
.save-sketch-button { color: #fff; border-color: var(--member-deep); background: var(--member-deep); box-shadow: 0 7px 18px rgba(8,112,88,.18); }
.save-sketch-button.saved { color: var(--member-deep); border-color: rgba(8,112,88,.30); background: rgba(255,253,246,.92); box-shadow: none; }
.sketch-use-action { width: auto; min-height: 42px; padding: 0 18px; white-space: nowrap; }
.sketch-note { margin: 9px 0 12px; color: var(--ink-soft); font-size: .75rem; line-height: 1.7; }
.sketch-note strong { display: inline-block; margin-left: 8px; color: var(--member-deep); font-size: .67rem; }
.sketch-canvas-wrap {
    width: min(100%, max(270px, calc((92dvh - 300px) * 1.5)));
    margin-inline: auto;
    overflow: hidden;
    border: 1px solid rgba(27,154,116,.20);
    border-radius: 20px;
    background: #fffdf6;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.65);
}
#sketch-canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    cursor: crosshair;
    touch-action: none;
}
#sketch-canvas.eraser-active { cursor: cell; }
.sketch-tool-row {
    display: grid;
    grid-template-columns: auto minmax(220px, 1fr) minmax(220px, 1fr);
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    padding: 10px;
    border: 1px solid rgba(27,154,116,.14);
    border-radius: 16px;
    background: rgba(255,253,246,.58);
    overflow-x: auto;
}
.sketch-mode-toggle { display: flex; gap: 5px; padding: 4px; border-radius: 999px; background: rgba(217,243,231,.72); }
.sketch-mode-toggle button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--ink-soft);
    background: transparent;
    cursor: pointer;
}
.sketch-mode-toggle button.active { color: #fff; background: var(--member-deep); box-shadow: 0 5px 14px rgba(8,112,88,.18); }
.brush-size-control { display: grid; grid-template-columns: auto minmax(90px, 1fr) auto; align-items: center; gap: 9px; min-width: 0; color: var(--ink-soft); font-size: .71rem; white-space: nowrap; }
.brush-size-control input { width: 100%; min-width: 90px; accent-color: var(--member-deep); cursor: pointer; }
.brush-size-control output { min-width: 24px; color: var(--member-deep); font-weight: 700; text-align: right; }
.opacity-control output { min-width: 42px; }
.sketch-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 0; padding: 2px; overflow-x: auto; }
.sketch-palette { display: flex; flex: 1 0 auto; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 7px; min-width: 510px; }
.color-swatch {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 3px solid #f7f3e8;
    border-radius: 50%;
    background: var(--swatch);
    box-shadow: 0 0 0 1px rgba(38,52,55,.18);
    cursor: pointer;
}
.color-swatch.active { box-shadow: 0 0 0 2px var(--member-deep), 0 0 0 5px #f7f3e8; }
.cream-swatch { box-shadow: 0 0 0 1px rgba(38,52,55,.34), inset 0 0 0 1px rgba(255,255,255,.95); }
.sketch-undo { border: 1px solid rgba(27,154,116,.28); color: var(--member-deep); background: rgba(217,243,231,.78); }
.sketch-undo:disabled { border-color: rgba(160,160,150,.18); color: #aaa69c; background: rgba(238,236,229,.62); cursor: default; }
.sketch-clear { border: 1px solid rgba(184,92,43,.26); color: #984f34; background: rgba(255,230,210,.72); }

.sketch-download-dialog {
    width: min(760px, calc(100vw - 32px));
    max-height: 94dvh;
    padding: 0;
    border: 0;
    border-radius: 28px;
    color: var(--ink);
    background: transparent;
    box-shadow: 0 36px 100px rgba(24,50,45,.34);
}
.sketch-download-dialog::backdrop { background: rgba(25,39,37,.62); backdrop-filter: blur(10px); }
.sketch-download-panel { padding: 24px; border: 1px solid rgba(27,154,116,.20); border-radius: 28px; background: #f7f3e8; }
.sketch-download-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.sketch-download-heading .eyebrow { margin-bottom: 4px; color: var(--member-deep); }
.sketch-download-heading h2 { margin: 0; font-size: 1.28rem; }
#sketch-download-preview { display: block; width: 100%; max-height: 65dvh; object-fit: contain; border: 1px solid rgba(27,154,116,.18); border-radius: 20px; background: #fffdf6; }
.sketch-download-actions { display: grid; grid-template-columns: .8fr 1.2fr; gap: 10px; margin-top: 18px; }
.sketch-download-actions .button { width: 100%; }

@media (max-width: 840px) {
    .auth-story h1 { font-size: clamp(3.2rem, 14vw, 5rem); }
}
@media (max-width: 560px) {
    body::before { opacity: .09; }
    .member-nav { width: auto; border-radius: 18px; }
    .member-submission { margin: 14px 18px 4px; padding: 18px; }
    .auth-story::before { width: 58%; right: -8%; bottom: -18%; }
    .composer { padding: 20px; }
    .draft-actions { grid-template-columns: 1fr 1fr; }
    .draft-actions #submit-checkin { grid-column: 1 / -1; }
    .draft-delete.hidden { display: none; }
    .composer-actions { align-items: flex-end; gap: 10px; }
    .entry-mode-actions { gap: 7px; }
    .entry-mode-card { flex-direction: column; justify-content: center; gap: 7px; min-height: 94px; padding: 9px 5px; border-radius: 17px; }
    .entry-mode-icon { width: 46px; height: 46px; }
    .entry-mode-icon svg { width: 27px; height: 27px; }
    .entry-mode-card strong { font-size: .69rem; }
    .sketch-dialog { width: calc(100vw - 14px); max-height: 96dvh; }
    .sketch-panel { max-height: 96dvh; padding: 14px; border-radius: 22px; }
    .sketch-heading { top: -18px; margin: -18px -18px 0; padding: 16px 18px 12px; }
    .sketch-heading { flex-wrap: wrap; }
    .sketch-heading-actions { width: 100%; justify-content: space-between; gap: 5px; }
    .sketch-icon-button { width: 38px; height: 38px; }
    .sketch-use-action { min-height: 38px; padding: 0 13px; font-size: .68rem; }
    .sketch-note { margin: 7px 0 9px; font-size: .66rem; }
    .sketch-note strong { margin-left: 4px; }
    .sketch-canvas-wrap { width: min(100%, max(220px, calc((96dvh - 370px) * 1.5))); border-radius: 15px; }
    .sketch-tool-row { grid-template-columns: auto minmax(0, 1fr); gap: 8px; margin-top: 9px; padding: 7px; overflow: visible; }
    .sketch-tool-row .opacity-control { grid-column: 1 / -1; }
    .brush-size-control { gap: 6px; font-size: .62rem; }
    .brush-size-control input { min-width: 70px; }
    .sketch-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 8px 0 0; overflow: visible; }
    .sketch-palette { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 7px; min-width: 0; }
    .color-swatch { width: 24px; height: 24px; border-width: 2px; }
    .sketch-secondary-actions { flex-direction: column; gap: 6px; }
    .sketch-download-panel { padding: 18px; }
    .profile-hero { align-items: flex-start; }
    .profile-page-avatar { width: 66px; height: 66px; font-size: 1.35rem; }
    .profile-layout { grid-template-columns: 1fr; }
    .profile-stats { grid-template-columns: repeat(3, 1fr); }
    .profile-journey-card { padding: 19px; }
    .profile-card-heading { align-items: flex-start; }
    .profile-form-grid.three-columns, .profile-privacy-summary { grid-template-columns: 1fr; }
    .profile-fieldset { padding: 16px; }
    .profile-journey-card form > .button { width: 100%; }
    .public-profile-dialog { width: calc(100vw - 24px); }
    .public-profile-panel { padding: 24px 18px; border-radius: 24px; }
    .public-profile-close { top: 14px; right: 14px; }
    .public-profile-hero { align-items: flex-start; gap: 13px; padding-right: 36px; }
    .public-profile-hero .profile-page-avatar { width: 58px; height: 58px; }
    .public-profile-hero h2 { font-size: 1.45rem; }
    .public-profile-stats article { padding: 15px 5px; }
    .public-profile-stats strong { font-size: 1.45rem; }
    .submission-window-note { align-items: flex-start; flex-direction: column; gap: 4px; }
    .response-schedule-controls { grid-template-columns: 1fr; }
}

@media (min-width: 561px) and (max-width: 840px) {
    .profile-layout { grid-template-columns: 1fr; }
}

/* Qualitative Research Dashboard */
#research-data-section {
    --research-paper: #f7f3ea;
    --research-ink: #173652;
    --research-line: rgba(55,127,189,.18);
}
#research-data-section > .observer-heading {
    align-items: flex-start;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--research-line);
}
#research-data-section .observer-heading .eyebrow,
#research-data-section .research-chapter-heading p { color: var(--researcher-deep); }
#research-data-section .heading-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 9px;
    width: min(100%, 430px);
}
#research-data-section .heading-actions select,
#research-data-section .heading-actions .button {
    width: 100%;
    min-height: 42px;
    margin: 0;
}
.analytics-filter-status {
    grid-column: 1 / -1;
    min-height: 1.4em;
    color: var(--researcher-deep);
    font-size: .59rem;
    line-height: 1.4;
    text-align: right;
}
#research-data-section[aria-busy="true"] .research-chapter {
    opacity: .58;
    transition: opacity .16s ease;
}
#research-data-section .privacy-banner {
    border-color: rgba(55,127,189,.22);
    background: linear-gradient(100deg, rgba(220,238,250,.82), rgba(255,230,210,.36));
}
#research-data-section .privacy-banner strong { color: var(--researcher-deep); }
.research-journey {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 24px 0 58px;
}
.research-journey::before {
    content: "";
    position: absolute;
    left: 9%;
    right: 9%;
    top: 28px;
    height: 1px;
    background: linear-gradient(90deg, var(--member), var(--researcher), var(--ai), var(--researcher-deep));
    opacity: .34;
}
.research-journey a {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 42px 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 10px;
    min-height: 76px;
    padding: 13px;
    border: 1px solid var(--research-line);
    border-radius: 20px;
    color: var(--research-ink);
    background: rgba(255,253,246,.9);
    text-decoration: none;
    box-shadow: 0 9px 28px rgba(32,92,145,.06);
}
.research-journey a span {
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    background: var(--researcher);
    font-size: .73rem;
    font-weight: 800;
}
.research-journey a:nth-child(1) span { background: var(--member); }
.research-journey a:nth-child(3) span { background: var(--ai); }
.research-journey a:nth-child(4) span { background: var(--researcher-deep); }
.research-journey strong { align-self: end; font-size: .77rem; letter-spacing: .04em; }
.research-journey small { align-self: start; margin-top: 3px; color: var(--ink-soft); font-size: .62rem; }
.research-chapter {
    position: relative;
    scroll-margin-top: 96px;
    margin: 0 0 72px;
    padding: 34px 0 0;
    border-top: 1px solid var(--research-line);
}
.research-chapter-heading {
    display: flex;
    align-items: flex-start;
    gap: 17px;
    margin-bottom: 26px;
}
.research-chapter-heading > span {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    border: 1px solid var(--research-line);
    border-radius: 20px 45% 45% 20px;
    color: var(--researcher-deep);
    background: var(--researcher-pale);
    font-size: .82rem;
    font-weight: 800;
}
.participation-chapter .research-chapter-heading > span { color: var(--member-deep); background: var(--member-pale); }
.emotion-chapter .research-chapter-heading > span { color: var(--ai-deep); background: var(--ai-pale); }
.research-chapter-heading p { margin: 2px 0 6px; font-size: .67rem; font-weight: 800; letter-spacing: .16em; }
.research-chapter-heading h2 { margin: 0; color: var(--research-ink); font-size: clamp(1.18rem, 2.2vw, 1.65rem); line-height: 1.45; }
.qual-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.qual-metrics article {
    min-height: 126px;
    padding: 18px;
    border: 1px solid rgba(27,154,116,.18);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(217,243,231,.64), rgba(255,253,246,.92));
}
.qual-metrics span,
.qual-metrics small,
.qual-metrics strong { display: block; }
.qual-metrics span { color: var(--member-deep); font-size: .69rem; font-weight: 700; }
.qual-metrics strong { margin: 12px 0 8px; color: var(--research-ink); font-size: clamp(1.38rem, 2.5vw, 2rem); line-height: 1; font-variant-numeric: tabular-nums; }
.qual-metrics small { color: var(--ink-soft); font-size: .61rem; line-height: 1.5; }
.qualitative-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.qualitative-grid .wide { grid-column: 1 / -1; }
#research-data-section .chart-card,
.relationship-timeline-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--research-line);
    border-radius: 24px;
    background: rgba(255,253,246,.88);
    box-shadow: 0 13px 38px rgba(32,92,145,.055);
}
#research-data-section .chart-heading { margin-bottom: 18px; }
#research-data-section .chart-heading h3 { margin: 0 0 5px; color: var(--research-ink); font-size: .94rem; }
#research-data-section .chart-heading p { margin: 0; color: var(--ink-soft); font-size: .63rem; line-height: 1.55; }
.research-chart svg,
.theme-river svg,
.emotion-timeline svg,
.relationship-timeline svg { display: block; width: 100%; height: auto; overflow: visible; }
.research-chart svg text,
.theme-river svg text,
.emotion-timeline svg text { fill: var(--ink-soft); font-family: var(--sans); font-size: 10px; }
.qual-grid-line { stroke: rgba(55,127,189,.14); stroke-width: 1; }
.participation-line { fill: none; stroke: var(--member); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.research-chart circle { fill: var(--member); stroke: #fffdf6; stroke-width: 2; }
.sparse-note,
.research-empty {
    margin: 0;
    padding: 13px 14px;
    border-radius: 14px;
    color: var(--ink-soft);
    background: rgba(220,238,250,.42);
    font-size: .66rem;
    line-height: 1.6;
}
.week-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 9px; margin-top: 12px; }
.week-cards article { padding: 13px; border: 1px solid rgba(27,154,116,.17); border-radius: 16px; background: var(--member-pale); }
.week-cards span, .week-cards strong, .week-cards small { display: block; }
.week-cards span, .week-cards small { color: var(--ink-soft); font-size: .6rem; }
.week-cards strong { margin: 6px 0; color: var(--member-deep); font-size: .86rem; }
.participation-heatmap { overflow-x: auto; }
.calendar-heat-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 13px); grid-auto-columns: 13px; gap: 3px; width: max-content; min-width: 100%; }
.heat-cell { border: 1px solid rgba(27,154,116,.10); border-radius: 3px; background: color-mix(in srgb, var(--member) calc(var(--heat, 0) * 88%), #eef4ed); }
.heat-cell.empty { visibility: hidden; }
.heat-legend { margin-top: 10px; color: var(--ink-soft); font-size: .59rem; }
.qual-timeline { display: grid; gap: 9px; max-height: 360px; overflow-y: auto; }
.qual-timeline article {
    display: grid;
    grid-template-columns: 78px 64px 1fr;
    align-items: start;
    gap: 9px;
    padding: 11px 0;
    border-bottom: 1px solid var(--research-line);
}
.qual-timeline article:last-child { border-bottom: 0; }
.qual-timeline time,
.qual-timeline article > span { color: var(--ink-soft); font-size: .62rem; }
.qual-timeline strong { color: var(--researcher-deep); font-size: .65rem; }
.qual-timeline p { margin: 0; color: var(--ink-soft); font-size: .64rem; line-height: 1.55; }
.theme-status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.theme-status-grid > article { min-height: 96px; padding: 16px; border: 1px solid var(--research-line); border-radius: 20px; background: rgba(220,238,250,.38); }
.theme-status-grid > article:nth-child(2) { background: rgba(217,243,231,.42); }
.theme-status-grid > article:nth-child(3) { background: rgba(255,230,210,.34); }
.theme-status-grid > article > span { display: block; margin-bottom: 11px; color: var(--researcher-deep); font-size: .65rem; font-weight: 800; }
.theme-chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.theme-chip-list span { padding: 5px 8px; border-radius: 999px; color: var(--researcher-deep); background: #fffdf6; font-size: .61rem; }
.theme-chip-list small { color: var(--ink-soft); font-size: .61rem; }
.theme-week-list { display: grid; gap: 9px; margin-top: 12px; }
.theme-week-list article { display: grid; grid-template-columns: 82px 1fr; gap: 10px; align-items: start; }
.theme-week-list time { color: var(--ink-soft); font-size: .61rem; }
.theme-week-list div { display: flex; flex-wrap: wrap; gap: 5px; }
.theme-week-list span { padding: 5px 7px; border-radius: 999px; color: var(--researcher-deep); background: var(--researcher-pale); font-size: .59rem; }
.river-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 11px; }
.river-legend span { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-soft); font-size: .59rem; }
.river-legend span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--river-color); }
.movement-chart { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.movement-chart article { padding: 13px; border-radius: 17px; background: var(--researcher-pale); }
.movement-chart article[data-movement="Expand"],
.movement-chart article[data-movement="Action"] { background: var(--member-pale); }
.movement-chart article[data-movement="Reframe"] { background: var(--ai-pale); }
.movement-chart article[data-movement="Silence"] { background: #ecebe5; }
.movement-chart span, .movement-chart strong, .movement-chart small { display: block; }
.movement-chart span { color: var(--ink-soft); font-size: .61rem; }
.movement-chart strong { display: inline-block; margin: 8px 4px 0 0; font-size: 1.5rem; }
.movement-chart small { display: inline; color: var(--ink-soft); font-size: .6rem; }
.emotion-bars .bar-row i { background: var(--ai); }
.volatility-list { display: grid; gap: 9px; }
.volatility-list article { display: grid; grid-template-columns: 60px 78px 1fr; gap: 9px; align-items: center; padding: 12px; border-radius: 15px; background: rgba(255,230,210,.4); }
.volatility-list strong { color: var(--researcher-deep); font-size: .67rem; }
.volatility-list span { color: var(--ai-deep); font-size: .66rem; font-weight: 700; }
.volatility-list small { color: var(--ink-soft); font-size: .61rem; line-height: 1.45; }
.relationship-indicators { margin-bottom: 18px; }
.relationship-radar-panel {
    min-width: 0;
    padding: 22px 26px 18px;
    border: 1px solid rgba(55,127,189,.2);
    border-radius: 26px;
    background: linear-gradient(150deg, rgba(220,238,250,.5), rgba(255,253,246,.94));
    box-shadow: 0 13px 38px rgba(32,92,145,.055);
}
.relationship-radar-panel > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}
.relationship-radar-panel h3 { margin: 0 0 5px; color: var(--research-ink); font-size: .94rem; }
.relationship-radar-panel p { margin: 0; color: var(--ink-soft); font-size: .63rem; line-height: 1.55; }
.relationship-radar-panel > header > span {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 999px;
    color: var(--researcher-deep);
    background: rgba(220,238,250,.82);
    font-size: .6rem;
    font-weight: 750;
}
.relationship-radar-controls {
    display: grid;
    grid-template-columns: 38px minmax(240px, 430px) 38px;
    justify-content: center;
    gap: 8px;
    margin: 18px auto 4px;
}
.relationship-radar-controls select,
.relationship-radar-controls button {
    min-height: 38px;
    border: 1px solid rgba(55,127,189,.25);
    border-radius: 13px;
    color: var(--research-ink);
    background: rgba(255,253,246,.9);
    font-family: var(--sans);
    font-size: .64rem;
    font-weight: 700;
}
.relationship-radar-controls select { width: 100%; padding: 0 12px; }
.relationship-radar-controls button { padding: 0; color: var(--researcher-deep); font-size: .9rem; }
.relationship-radar-controls button:disabled { opacity: .32; cursor: not-allowed; }
.relationship-radar-comparison {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px 18px;
    min-height: 26px;
    margin-top: 9px;
}
.relationship-radar-comparison span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--ink-soft);
    font-size: .61rem;
}
.relationship-radar-comparison span::before {
    width: 27px;
    height: 0;
    border-top: 3px solid var(--researcher);
    content: "";
}
.relationship-radar-comparison span.previous::before {
    border-top-color: rgba(55,127,189,.5);
    border-top-style: dashed;
}
.relationship-radar-host { min-height: 420px; }
.relationship-radar-chart {
    display: block;
    width: min(100%, 780px);
    height: auto;
    margin: 2px auto 0;
    overflow: visible;
}
.relationship-radar-ring {
    stroke: rgba(55,127,189,.58);
    stroke-width: 1.45;
    stroke-linejoin: round;
}
.relationship-radar-ring.level-5 { fill: rgba(55,127,189,.11); stroke-width: 2.2; }
.relationship-radar-ring.level-3 { fill: rgba(55,127,189,.075); }
.relationship-radar-ring.level-1 { fill: rgba(55,127,189,.065); }
.relationship-radar-axis { stroke: rgba(55,127,189,.2); stroke-width: 1.2; }
.relationship-radar-shape {
    fill: rgba(55,127,189,.34);
    stroke: var(--researcher);
    stroke-width: 3;
    stroke-linejoin: round;
}
.relationship-radar-shape.previous {
    fill: rgba(55,127,189,.08);
    stroke: rgba(55,127,189,.54);
    stroke-width: 2.4;
    stroke-dasharray: 8 7;
}
.relationship-radar-shape.current { fill: rgba(55,127,189,.34); }
.relationship-radar-point { fill: var(--researcher-deep); stroke: #fffdf6; stroke-width: 2.2; }
.relationship-radar-scale {
    fill: var(--researcher-deep);
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 800;
}
.relationship-radar-label {
    fill: var(--research-ink);
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 750;
}
.relationship-radar-value {
    fill: var(--researcher-deep);
    font-size: 12px;
    font-weight: 850;
}
.relationship-timeline { display: grid; gap: 10px; }
.relationship-timeline article { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 16px; padding: 12px; border: 1px solid rgba(55,127,189,.12); border-radius: 18px; background: rgba(220,238,250,.2); }
.relationship-timeline article > div { display: grid; gap: 5px; }
.relationship-timeline article > div strong { color: var(--researcher-deep); font-size: .67rem; }
.relationship-timeline article > div span { color: var(--ink-soft); font-size: .6rem; }
.relationship-line { fill: none; stroke: var(--researcher); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.relationship-timeline circle { fill: var(--researcher); stroke: #fffdf6; stroke-width: 2; }
#research-data-section .table-wrap table { width: 100%; border-collapse: collapse; }
#research-data-section .table-wrap th,
#research-data-section .table-wrap td { padding: 11px 10px; border-bottom: 1px solid var(--research-line); text-align: left; white-space: nowrap; font-size: .64rem; }
#research-data-section .table-wrap th { color: var(--researcher-deep); font-weight: 700; }
#research-data-section .table-wrap td { color: var(--ink-soft); }
#research-data-section > .method-note { margin-top: -38px; padding: 16px; border-radius: 16px; background: rgba(220,238,250,.35); line-height: 1.7; }
.observer-response.response-read-confirmed { box-shadow: inset 3px 0 0 rgba(55,127,189,.28); }

@media (max-width: 980px) {
    .qual-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .research-journey { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .research-journey::before { display: none; }
}
@media (max-width: 720px) {
    #research-data-section > .observer-heading { display: block; }
    #research-data-section .heading-actions { grid-template-columns: 1fr 1fr; width: 100%; margin-top: 18px; }
    .qualitative-grid { grid-template-columns: 1fr; }
    .qualitative-grid .wide { grid-column: auto; }
    .theme-status-grid { grid-template-columns: 1fr; }
    .relationship-timeline article { grid-template-columns: 1fr; }
    .relationship-radar-panel { padding: 18px 12px 12px; }
}
@media (max-width: 500px) {
    .research-journey { grid-template-columns: 1fr; }
    .qual-metrics { grid-template-columns: 1fr 1fr; }
    .qual-metrics article { min-height: 112px; padding: 14px; }
    .qual-timeline article { grid-template-columns: 68px 58px 1fr; }
    .movement-chart { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .relationship-radar-panel > header { display: block; padding: 0 6px; }
    .relationship-radar-panel > header > span { display: inline-block; margin-top: 9px; }
    .relationship-radar-controls { grid-template-columns: 35px minmax(0, 1fr) 35px; }
    .relationship-radar-controls select { padding: 0 7px; font-size: .58rem; }
    .relationship-radar-comparison { justify-content: flex-start; padding: 0 6px; }
    .relationship-radar-chart { width: calc(100% + 14px); margin-left: -7px; }
    #research-data-section .heading-actions { grid-template-columns: 1fr; }
}

/* First-entry journey */
.journey-entry-button {
    display: grid;
    gap: 1px;
    align-content: center;
    min-height: 40px;
    padding: 7px 13px;
    border: 1px solid rgba(27,154,116,.26);
    border-radius: 999px;
    color: var(--member-deep);
    background: linear-gradient(120deg, rgba(217,243,231,.88), rgba(246,203,85,.24));
    cursor: pointer;
    text-align: left;
}
.journey-entry-button span { font-size: .7rem; font-weight: 800; }
.journey-entry-button small { color: var(--ink-soft); font-size: .52rem; }
.onboarding-dialog {
    width: min(900px, calc(100vw - 28px));
    max-height: 94dvh;
    padding: 0;
    border: 0;
    border-radius: 34px;
    color: var(--ink);
    background: transparent;
    box-shadow: 0 42px 120px rgba(21,54,49,.30);
}
.onboarding-dialog::backdrop { background: rgba(23,44,42,.58); backdrop-filter: blur(10px); }
.onboarding-shell {
    position: relative;
    max-height: 94dvh;
    overflow-y: auto;
    border: 1px solid rgba(27,154,116,.24);
    border-radius: 34px;
    background:
        radial-gradient(ellipse at 3% 8%, rgba(239,145,161,.25), transparent 30%),
        radial-gradient(ellipse at 100% 16%, rgba(246,203,85,.28), transparent 28%),
        radial-gradient(ellipse at 80% 100%, rgba(27,154,116,.16), transparent 35%),
        #f8f5ea;
}
.onboarding-topline {
    position: sticky;
    z-index: 4;
    top: 0;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 13px;
    padding: 18px 24px 12px;
    background: rgba(248,245,234,.92);
    backdrop-filter: blur(16px);
}
.onboarding-progress { height: 5px; overflow: hidden; border-radius: 999px; background: rgba(27,154,116,.13); }
.onboarding-progress i { display: block; width: 20%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--member), #5ebc91); transition: width .28s ease; }
.onboarding-topline > span { min-width: 34px; color: var(--member-deep); font-size: .62rem; font-weight: 800; }
.onboarding-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(27,154,116,.20);
    border-radius: 50%;
    color: var(--member-deep);
    background: rgba(255,253,246,.78);
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
}
#onboarding-form { min-height: 620px; }
.onboarding-step { display: none; min-height: 500px; padding: 44px clamp(26px, 7vw, 72px) 20px; animation: onboarding-enter .28s ease both; }
.onboarding-step.active { display: block; }
@keyframes onboarding-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.welcome-step { text-align: center; padding-top: 85px; }
.onboarding-welcome-mark { position: relative; width: 76px; height: 76px; margin: 0 auto 34px; }
.onboarding-welcome-mark span { position: absolute; inset: 0; border: 2px solid var(--member); border-radius: 50%; }
.onboarding-welcome-mark span:nth-child(2) { transform: translateX(20px); border-color: var(--ai); }
.onboarding-welcome-mark span:nth-child(3) { transform: translate(10px, 18px); border-color: var(--researcher); }
.welcome-step .eyebrow { color: var(--member-deep); }
.welcome-step h1 { margin: 26px 0 18px; font-size: clamp(2.25rem, 6vw, 4.3rem); font-weight: 900; letter-spacing: .02em; }
.welcome-step > p:last-child { margin: 0 auto; color: var(--ink-soft); font-size: clamp(.9rem, 2vw, 1.1rem); font-weight: 300; line-height: 1.9; }
.onboarding-step-heading { display: flex; align-items: flex-start; gap: 17px; margin-bottom: 32px; }
.onboarding-step-heading > span {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    flex: 0 0 auto;
    border-radius: 42% 58% 48% 52%;
    color: #fff;
    background: var(--member);
    font-size: .72rem;
    font-weight: 800;
}
.onboarding-step-heading .eyebrow { margin-bottom: 5px; color: var(--member-deep); }
.onboarding-step-heading h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.15rem); line-height: 1.35; }
.onboarding-step-heading div > p:last-child { margin: 9px 0 0; color: var(--ink-soft); font-size: .72rem; line-height: 1.7; }
.onboarding-profile-grid { display: grid; grid-template-columns: 190px 1fr; gap: 34px; align-items: start; }
.onboarding-avatar-field { display: grid; justify-items: center; gap: 8px; }
.onboarding-avatar-preview {
    position: relative;
    display: grid !important;
    place-items: center;
    width: 150px;
    height: 150px;
    margin: 0 !important;
    overflow: hidden;
    border: 2px dashed rgba(27,154,116,.38);
    border-radius: 46% 54% 45% 55% / 54% 44% 56% 46%;
    color: #fff;
    background: linear-gradient(145deg, var(--member), var(--member-deep));
    cursor: pointer;
    box-shadow: 0 18px 38px rgba(8,112,88,.16);
}
.onboarding-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.onboarding-avatar-preview > span { font-size: 2.4rem; font-weight: 900; }
.onboarding-avatar-preview small { position: absolute; right: 0; bottom: 0; left: 0; padding: 8px; color: #fff; background: rgba(8,70,55,.62); text-align: center; font-size: .58rem; }
.onboarding-avatar-field .text-button { border: 0; margin: 0; padding: 4px 8px; color: var(--member-deep); }
.onboarding-step label:not(.onboarding-avatar-preview) { margin-top: 0 !important; }
.onboarding-profile-grid > div:last-child > label { display: flex !important; justify-content: space-between; margin-bottom: 8px !important; }
.onboarding-profile-grid label em,
.onboarding-profile-grid label small { color: var(--ink-soft); font-size: .61rem; font-style: normal; font-weight: 400; }
.onboarding-profile-grid input { margin-bottom: 22px; }
.onboarding-profile-grid textarea { min-height: 128px; }
.rhythm-periods,
.onboarding-questions fieldset { padding: 0; border: 0; }
.rhythm-periods legend,
.onboarding-questions legend { margin-bottom: 13px; color: var(--ink-soft); font-size: .68rem; font-weight: 700; }
.rhythm-periods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.rhythm-periods legend { grid-column: 1 / -1; }
.rhythm-periods label { position: relative; margin: 0 !important; cursor: pointer; }
.rhythm-periods input { position: absolute; opacity: 0; }
.rhythm-periods label > span { display: grid; gap: 8px; min-height: 94px; padding: 18px; border: 1px solid rgba(27,154,116,.18); border-radius: 21px; background: rgba(255,253,246,.68); transition: .18s ease; }
.rhythm-periods b { color: var(--ink); font-size: .82rem; }
.rhythm-periods small { color: var(--ink-soft); font-size: .58rem; }
.rhythm-periods input:checked + span { border-color: var(--member); color: var(--member-deep); background: var(--member-pale); box-shadow: inset 0 0 0 1px var(--member); transform: translateY(-2px); }
.rhythm-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.rhythm-detail-grid label { padding: 15px; border: 1px solid rgba(27,154,116,.16); border-radius: 19px; background: rgba(255,253,246,.68); }
.rhythm-detail-grid label > span { display: block; margin-bottom: 9px; color: var(--member-deep); font-size: .66rem; font-weight: 700; }
.rhythm-detail-grid select { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: #fffdf6; padding: 0 12px; }
.onboarding-questions { display: grid; gap: 25px; }
.onboarding-questions > label > span,
.onboarding-questions legend { display: block; color: var(--ink); font-size: .78rem; font-weight: 800; }
.onboarding-questions > label > small { display: block; margin: 8px 0 10px; color: var(--ink-soft); font-size: .62rem; line-height: 1.55; }
.onboarding-questions textarea { min-height: 108px; margin-top: 10px; }
.onboarding-choice-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.onboarding-choice-chips label,
.onboarding-radio-list label { position: relative; margin: 0 !important; cursor: pointer; }
.onboarding-choice-chips input,
.onboarding-radio-list input { position: absolute; opacity: 0; }
.onboarding-choice-chips span { display: block; padding: 10px 15px; border: 1px solid rgba(27,154,116,.20); border-radius: 999px; background: rgba(255,253,246,.72); font-size: .68rem; }
.onboarding-choice-chips input:checked + span { color: #fff; border-color: var(--member); background: var(--member); }
.onboarding-other-input { width: 100%; margin-top: 12px; }
.onboarding-radio-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.onboarding-radio-list span { display: flex; align-items: center; min-height: 52px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,253,246,.72); font-size: .66rem; }
.onboarding-radio-list input:checked + span { color: var(--member-deep); border-color: var(--member); background: var(--member-pale); box-shadow: inset 0 0 0 1px var(--member); }
.onboarding-privacy-list { display: grid; gap: 11px; }
.onboarding-privacy-list label { display: grid !important; grid-template-columns: 1fr auto; align-items: center; gap: 16px; margin: 0 !important; padding: 18px; border: 1px solid rgba(27,154,116,.17); border-radius: 21px; background: rgba(255,253,246,.72); cursor: pointer; }
.onboarding-privacy-list label.fixed { cursor: default; }
.onboarding-privacy-list b,
.onboarding-privacy-list small { display: block; }
.onboarding-privacy-list b { font-size: .76rem; }
.onboarding-privacy-list small { margin-top: 4px; color: var(--ink-soft); font-size: .61rem; font-weight: 400; }
.onboarding-privacy-list input { position: absolute; opacity: 0; }
.onboarding-privacy-list i { position: relative; width: 46px; height: 26px; border-radius: 99px; background: #d6d9d2; transition: .18s ease; }
.onboarding-privacy-list i::after { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 7px rgba(20,40,36,.16); transition: .18s ease; }
.onboarding-privacy-list input:checked + i { background: var(--member); }
.onboarding-privacy-list input:checked + i::after { transform: translateX(20px); }
.onboarding-public-note { margin: -8px 0 20px; padding: 13px 15px; border-left: 3px solid var(--member); color: var(--member-deep); background: rgba(217,243,231,.56); font-size: .7rem; line-height: 1.7; }
.onboarding-rhythm-edit-note { margin-top: 9px !important; padding: 9px 12px; border-radius: 12px; color: var(--member-deep) !important; background: rgba(217,243,231,.65); font-size: .66rem !important; font-weight: 700; }
.onboarding-rhythm-edit-note.locked { color: #7a5b31 !important; background: rgba(246,203,85,.24); }
.rhythm-periods input:disabled + span, .rhythm-detail-grid select:disabled { cursor: not-allowed; opacity: .58; }
.onboarding-memory-notice { margin: 18px 0; padding: 14px 16px; border-left: 3px solid var(--ai); border-radius: 12px; color: var(--ink-soft); background: var(--ai-pale); font-size: .62rem; line-height: 1.7; }
.onboarding-finish-copy { display: grid; gap: 5px; text-align: center; margin-top: 26px; }
.onboarding-finish-copy strong { color: var(--member-deep); font-size: .82rem; }
.onboarding-finish-copy span { color: var(--ink-soft); font-size: .62rem; }
.onboarding-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 22px; background: linear-gradient(180deg, rgba(248,245,234,0), #f8f5ea 28%); }
.onboarding-actions .button { min-width: 160px; }

@media (max-width: 720px) {
    .journey-entry-button { padding: 7px 10px; }
    .journey-entry-button small { display: none; }
    .observer-group-switcher { min-width: 132px; padding: 5px 8px; }
    .observer-group-switcher > span { display: none; }
    .observer-group-switcher select { font-size: .66rem; }
    .onboarding-step { min-height: 560px; padding: 34px 20px 16px; }
    .onboarding-profile-grid { grid-template-columns: 1fr; gap: 22px; }
    .onboarding-avatar-preview { width: 118px; height: 118px; }
    .rhythm-periods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rhythm-detail-grid { grid-template-columns: 1fr; }
    .onboarding-radio-list { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .journey-entry-button { max-width: 82px; }
    .identity { gap: 7px; }
    .identity .compact-link { display: none; }
    body[data-role="observer"] .journey-entry-button { display: none; }
    .observer-group-switcher { min-width: 104px; max-width: 118px; }
    .onboarding-dialog { width: calc(100vw - 14px); }
    .onboarding-shell { border-radius: 25px; }
    .onboarding-topline { padding: 13px 15px 9px; }
    .onboarding-step-heading > span { width: 42px; height: 42px; }
    .welcome-step { padding-top: 70px; }
    .onboarding-actions { padding: 13px 15px 17px; }
    .onboarding-actions .button { min-width: 0; flex: 1; }
}

/* In My Pocket dictation uses the existing paper, type and button styles. */
.writing-dictation { margin: 16px 0; padding: 14px; border: 1px solid #d8dfd5; border-radius: 14px; }
.writing-dictation p { font-size: .85rem; line-height: 1.6; }
.dictation-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.dictation-upload { display: grid; gap: 4px; font-size: .8rem; max-width: 100%; }
.dictation-upload input { max-width: 100%; font-size: .8rem; }
.writing-dictation textarea { display: block; width: 100%; margin: 8px 0; }
.writing-dictation [hidden] { display: none !important; }
