:root{--bg-base: #fbf9f7;--bg-surface: #ffffff;--bg-subtle: #f2eeea;--bg-accent-soft: #eeeefc;--bg-calm-soft: #e6f2f2;--bg-alert-soft: #fdedec;--bg-warm-soft: #fbf1e3;--accent-primary: #5b5bd6;--accent-primary-pressed: #4a4ac4;--accent-calm: #4fa3a5;--accent-alert: #d9534f;--accent-warm: #d9a23f;--text-primary: #1c1a19;--text-secondary: #6b6460;--text-tertiary: #9c958f;--text-on-accent: #ffffff;--text-accent: #4a4ac4;--text-alert: #c0403c;--text-calm: #3e8688;--border-subtle: #e2ddd8;--border-strong: #cfc8c1;--emo-anxiety: #7c6bd6;--emo-sadness: #5b82c4;--emo-anger: #d9684f;--emo-guilt: #b5785c;--emo-lonely: #6e7fa3;--emo-empty: #8a8a94;--emo-joy: #d9a23f;--emo-unclear: #a0968c;--radius-sm: 10px;--radius-md: 16px;--radius-lg: 22px;--radius-xl: 28px;--radius-pill: 999px;--space-4: 4px;--space-8: 8px;--space-12: 12px;--space-16: 16px;--space-20: 20px;--space-24: 24px;--space-32: 32px;--font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;--type-display-size: 28px;--type-display-height: 34px;--type-h1-size: 22px;--type-h1-height: 28px;--type-h2-size: 18px;--type-h2-height: 24px;--type-body-size: 15px;--type-body-height: 22px;--type-small-size: 13px;--type-small-height: 18px;--type-caption-size: 11px;--type-caption-height: 14px}*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}html,body{height:100%}body{font-family:var(--font-family);font-size:var(--type-body-size);line-height:var(--type-body-height);color:var(--text-primary);background:var(--bg-base);-webkit-font-smoothing:antialiased;overscroll-behavior-y:none;overflow-x:hidden}#root{display:flex;justify-content:center;min-height:100%;min-height:var(--app-height, 100dvh);background:var(--bg-base)}.screen{display:flex;flex-direction:column;width:100%;min-width:0;min-height:100%;min-height:var(--app-height, 100dvh);background:var(--bg-base)}@media(min-width:560px){#root{align-items:flex-start;padding:var(--space-24) var(--space-16);background:var(--bg-subtle)}.screen{max-width:460px;min-height:min(840px,calc(var(--app-height, 100dvh) - 48px));border-radius:var(--radius-xl);overflow:hidden;box-shadow:0 2px 28px #1c1a191a}}.screen--alert{background:var(--bg-alert-soft)}.screen--chat{background:var(--bg-subtle)}.screen__body{flex:1;display:flex;flex-direction:column;gap:var(--space-16);min-width:0;padding:var(--space-12) var(--space-20) var(--space-24);padding-bottom:calc(var(--space-24) + env(safe-area-inset-bottom));overflow-y:auto}.screen__body--tight{gap:var(--space-12)}.welcome-intro{display:grid;gap:var(--space-16);padding:clamp(24px,8vw,40px) var(--space-24);margin-top:var(--space-24);border-radius:var(--radius-xl);background:var(--bg-accent-soft)}.consent-option{display:flex;align-items:center;gap:var(--space-12);min-height:48px;padding:var(--space-8) var(--space-12);border:1px solid var(--border-subtle);border-radius:var(--radius-sm);background:var(--bg-surface);cursor:pointer}.consent-option input{flex:none;width:22px;height:22px;accent-color:var(--accent-primary)}:is(button,a,input):focus-visible{outline:2px solid var(--accent-primary);outline-offset:3px}.spacer{flex:1;min-height:var(--space-16)}.topbar{display:flex;align-items:center;gap:var(--space-12);padding:var(--space-12) var(--space-16)}.topbar__back{border:0;background:none;padding:0;cursor:pointer;color:var(--text-secondary);display:flex}.topbar__title{font-size:var(--type-body-size);font-weight:500}.tabbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(4px,2vw,10px);flex-shrink:0;border-top:1px solid var(--border-subtle);background:var(--bg-surface);padding:var(--space-8) max(var(--space-12),env(safe-area-inset-right)) calc(var(--space-8) + env(safe-area-inset-bottom)) max(var(--space-12),env(safe-area-inset-left))}.tabbar__item{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:56px;padding:6px 2px;gap:var(--space-4);border:0;border-radius:var(--radius-md);background:none;cursor:pointer;font-family:inherit;font-size:12px;line-height:16px;font-weight:500;color:var(--text-secondary)}.tabbar__item--active{color:var(--text-accent);background:var(--bg-accent-soft);font-weight:650}.tabbar__item:active{background:var(--bg-accent-soft)}@media(hover:hover){.tabbar__item:not(.tabbar__item--active):hover{background:var(--bg-subtle)}}.t-display{font-size:var(--type-display-size);line-height:var(--type-display-height);font-weight:700;letter-spacing:-.01em}.t-h1{font-size:var(--type-h1-size);line-height:var(--type-h1-height);font-weight:600}.t-h2{font-size:var(--type-h2-size);line-height:var(--type-h2-height);font-weight:600}.t-body{font-size:var(--type-body-size);line-height:var(--type-body-height)}.t-body-m{font-size:var(--type-body-size);line-height:var(--type-body-height);font-weight:500}.t-small{font-size:var(--type-small-size);line-height:var(--type-small-height)}.t-caption{font-size:var(--type-caption-size);line-height:var(--type-caption-height);font-weight:500;letter-spacing:.04em;text-transform:uppercase}.c-secondary{color:var(--text-secondary)}.c-tertiary{color:var(--text-tertiary)}.c-accent{color:var(--text-accent)}.c-alert{color:var(--text-alert)}.c-calm{color:var(--text-calm)}.card{display:flex;flex-direction:column;gap:var(--space-8);min-width:0;padding:var(--space-16) 18px;border-radius:var(--radius-lg);background:var(--bg-surface);border:1px solid transparent;overflow-wrap:anywhere}.card--bordered{border-color:var(--border-subtle)}.card--subtle{background:var(--bg-subtle)}.card--calm{background:var(--bg-calm-soft)}.card--alert{background:var(--bg-alert-soft)}.card--warm{background:var(--bg-warm-soft)}.card--accent{background:var(--bg-accent-soft)}.card--tappable{cursor:pointer;text-align:left;font-family:inherit;width:100%}.row{display:flex;align-items:center;gap:var(--space-12);min-width:0}.row--between{justify-content:space-between}.row--top{align-items:flex-start}.bullet{display:flex;align-items:flex-start;gap:var(--space-12)}.bullet__dot-box{display:flex;align-items:center;justify-content:center;flex:0 0 7px;width:7px;height:var(--type-small-height)}.bullet__dot{width:7px;height:7px;border-radius:var(--radius-pill);background:var(--accent-primary)}.bullet__text{flex:1;min-width:0}.btn{display:flex;align-items:center;justify-content:center;width:100%;min-height:52px;padding:0 var(--space-20);border:1px solid transparent;border-radius:var(--radius-md);font-family:inherit;font-size:var(--type-body-size);font-weight:500;cursor:pointer;transition:background-color .12s ease}.btn:active{background:var(--accent-primary-pressed)}.btn--primary{background:var(--accent-primary);color:var(--text-on-accent)}.btn--secondary{background:var(--bg-surface);color:var(--text-primary);border-color:var(--border-strong)}.btn--secondary:active{background:var(--bg-subtle)}.btn--ghost{background:none;color:var(--text-secondary)}.btn--ghost:active{background:var(--bg-subtle)}.btn--alert{background:var(--accent-alert);color:var(--text-on-accent)}.btn--alert:active{filter:brightness(.92)}.btn--loading{opacity:.7;pointer-events:none}.btn-stack{display:flex;flex-direction:column;gap:var(--space-8)}.chips{display:flex;flex-wrap:wrap;gap:var(--space-8)}.chip{display:inline-flex;align-items:center;gap:var(--space-8);padding:11px 16px;border-radius:var(--radius-pill);border:1px solid var(--border-subtle);background:var(--bg-surface);font-family:inherit;font-size:var(--type-small-size);line-height:var(--type-small-height);font-weight:500;color:var(--text-secondary);cursor:pointer}.chip--selected{border-color:var(--accent-primary);border-width:1.5px;background:var(--bg-accent-soft);color:var(--text-accent)}.chip--emotion{color:var(--text-primary)}.dynamics-emotion>img{flex:none}.dynamics-emotion__label{flex:0 1 96px;min-width:0}.dynamics-chart{display:flex;gap:clamp(4px,2vw,14px);padding-top:var(--space-8)}.dynamics-chart__column{display:grid;justify-items:center;gap:var(--space-4);flex:1;min-width:0}.dynamics-chart__column>img{max-width:100%;object-fit:contain}.dynamics-chart__track{display:flex;flex-direction:column;justify-content:flex-end;width:100%;height:112px}.dynamics-chart__track>div{border-radius:8px}.badge{display:inline-flex;align-self:flex-start;padding:6px 10px;border-radius:var(--radius-sm);background:var(--bg-accent-soft);color:var(--text-accent)}.badge--calm{background:var(--bg-calm-soft);color:var(--text-calm)}.badge--alert{background:var(--bg-alert-soft);color:var(--text-alert)}.textarea{width:100%;min-height:160px;padding:14px 16px;border-radius:var(--radius-lg);border:1px solid var(--border-subtle);background:var(--bg-surface);font-family:inherit;font-size:var(--type-body-size);line-height:var(--type-body-height);color:var(--text-primary);resize:none}.textarea:focus{outline:none;border-color:var(--accent-primary);border-width:1.5px}.textarea::placeholder{color:var(--text-tertiary)}.scale{display:flex;flex-direction:column;gap:var(--space-12);align-items:center}.scale__value{font-size:64px;line-height:68px;font-weight:700}.scale__input{width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:8px;border-radius:var(--radius-pill);background:var(--bg-subtle);outline:none}.scale__input::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:28px;height:28px;border-radius:var(--radius-pill);background:var(--bg-surface);border:3px solid var(--accent-primary);cursor:pointer}.scale__input::-moz-range-thumb{width:28px;height:28px;border-radius:var(--radius-pill);background:var(--bg-surface);border:3px solid var(--accent-primary);cursor:pointer}.scale__ends{display:flex;justify-content:space-between;width:100%}.skeleton{height:14px;border-radius:7px;background:var(--bg-subtle);animation:pulse 1.2s ease-in-out infinite}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.breath{width:200px;height:200px;border-radius:var(--radius-pill);background:var(--bg-surface);border:2px solid var(--accent-alert);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-4);margin:0 auto;animation:breathe 10s ease-in-out infinite}@keyframes breathe{0%,to{transform:scale(.88)}40%{transform:scale(1)}60%{transform:scale(1)}}.history__item{display:flex;align-items:center;gap:var(--space-12);padding:var(--space-12) 0;border-bottom:1px solid var(--border-subtle)}.history__item:last-child{border-bottom:0;padding-bottom:0}.history__emoji{display:grid;place-items:center;flex:0 0 38px;height:38px;border-radius:var(--radius-sm);background:var(--bg-subtle)}.history__topic{display:block;overflow-wrap:anywhere}.history__item>:last-child{flex-shrink:0}.history__item:first-child{padding-top:0}.history__meta{flex:1;min-width:0}
