@charset "UTF-8";
:root {
  color-scheme: light;
  --paper: #f8f7f3;
  --surface: #ffffff;
  --ink: #303c35;
  --muted: #83897f;
  --line: #e5e7df;
  --green: #426552;
  --green-dark: #304d3d;
  --soft: #edf1e9;
  --left-card: #edf1e9;
  --right-card: #fbf1e8;
  --left-ink: #547062;
  --right-ink: #aa7c62;
  --shadow: 0 12px 40px #303c3509;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 15px; line-height: 1.65; }
/* Mood atmosphere: a warm sunny wash for Good, a cool rainy one for Bad. */
body[data-theme="good"] {
  background:
    radial-gradient(120% 85% at 88% -10%, #ffe6ad66 0%, #ffe6ad00 42%),
    radial-gradient(95% 60% at 8% 2%, #ffd98a4d 0%, #ffd98a00 40%),
    linear-gradient(180deg, #fcf6e9 0%, var(--paper) 46%);
}
body[data-theme="bad"] {
  --paper: #f3f5f7; --ink: #364751; --muted: #82909b; --line: #dfe5e9;
  --green: #587381; --green-dark: #405c6b; --soft: #e8eef2;
  --left-card: #e7edf0; --right-card: #f0eded;
  --left-ink: #617a89; --right-ink: #9b8586;
  background:
    radial-gradient(120% 80% at 85% -12%, #b9c6d84d 0%, #b9c6d800 45%),
    radial-gradient(90% 60% at 10% 0%, #cfd8e04d 0%, #cfd8e000 42%),
    linear-gradient(180deg, #eef2f6 0%, var(--paper) 48%);
}
body[data-theme="good"] .main-content::before,
body[data-theme="bad"] .main-content::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-repeat: no-repeat; opacity: .5;
}
/* Soft sun rays in the top-right for Good. */
body[data-theme="good"] .main-content::before {
  background:
    radial-gradient(circle at 90% 8%, #ffcf6e55 0%, #ffcf6e00 16%);
}
/* Falling rain streaks for Bad. */
body[data-theme="bad"] .main-content::before {
  background-image: repeating-linear-gradient(104deg, #9fb3c733 0 1px, transparent 1px 13px);
  background-size: 100% 100%;
  -webkit-mask-image: linear-gradient(180deg, #000 0, transparent 70%);
  mask-image: linear-gradient(180deg, #000 0, transparent 70%);
  opacity: .4;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .5; cursor: wait; }
button, input, textarea { touch-action: manipulation; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
button { border: 0; }
button svg { flex-shrink: 0; }
input, textarea { color: var(--ink); }
a { color: var(--green); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 550; }
h1 { letter-spacing: -.045em; }
button, a { -webkit-user-select: none; user-select: none; }
[hidden] { display: none !important; }
.icon { width: 21px; height: 21px; display: inline-block; vertical-align: middle; flex-shrink: 0; }
.muted { color: var(--muted); }
.full { width: 100%; }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .12em; }
.eyebrow { display: block; color: var(--muted); font-size: 10px; font-weight: 550; letter-spacing: .2em; margin-bottom: 14px; }
.brand { display: inline-flex; background: none; gap: 12px; align-items: center; text-align: left; padding: 0; font-size: 22px; font-weight: 650; letter-spacing: .1em; }
.brand small { display: block; font-size: 8px; font-weight: 500; letter-spacing: .18em; margin-top: -2px; color: var(--muted); }
.brand-mark { display: inline-block; flex-shrink: 0; width: 44px; height: 44px; background: url("/icon.svg") center / cover no-repeat; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); }
.brand-mark.small { width: 30px; height: 30px; border-radius: 7px; }
.avatar { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; font-size: 14px; font-weight: 550; }
.avatar.male { background: #dce5d8; color: #526c54; }
.avatar.female { background: #edddd2; color: #a17864; }
.avatar.tiny { width: 25px; height: 25px; font-size: 11px; }
.avatar.large { width: 62px; height: 62px; font-size: 24px; }
.avatar.xl { width: 74px; height: 74px; font-size: 28px; }
.avatar.unknown { background: none; border: 1px dashed #bac4b5; color: #a3afa0; }
.avatar-button { padding: 0; border-radius: 50%; background: transparent; }
.topbar { max-width: 960px; margin: 0 auto; height: 98px; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; border-bottom: 1px solid var(--line); }
.topbar-right { display: flex; gap: 24px; align-items: center; }
.private-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; letter-spacing: .06em; }
.private-label .icon { width: 14px; height: 14px; }
.demo-bar { display: flex; justify-content: center; gap: 24px; align-items: center; flex-wrap: wrap; padding: 9px 16px; font-size: 11px; border-bottom: 1px solid var(--line); background: #eeeFE8; color: #737e70; }
.demo-bar span { display: flex; gap: 6px; align-items: center; }
.demo-bar i { width: 5px; height: 5px; background: #819677; border-radius: 50%; }
.demo-actions { gap: 12px; }
.demo-bar button { background: none; font-size: 11px; display: flex; gap: 5px; align-items: center; padding: 3px 0; }
.demo-bar .demo-exit { padding: 5px 13px; border-radius: 20px; background: var(--green); color: #fff; font-weight: 550; }
.demo-bar .demo-exit:hover { background: var(--green-dark); }
.demo-bar .icon { width: 13px; height: 13px; }
.connection-state { display: none; color: #a27056; font-size: 11px; }
.offline .connection-state { display: inline; }
.main-content { width: 100%; max-width: 720px; margin: 0 auto; padding: 48px 30px 190px; }
.page-intro { display: flex; align-items: center; justify-content: space-between; margin-bottom: 42px; gap: 20px; }
.page-intro h1 { font-size: 30px; line-height: 1.45; margin-bottom: 12px; }
.page-intro p { color: var(--muted); font-size: 13px; letter-spacing: .015em; }
.mood-seal { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.mood-seal .icon { width: 40px; height: 40px; stroke-width: 1; }
.mood-seal.sunny { background: radial-gradient(circle at 50% 45%, #ffd98a 0%, #f3bf5e 70%); color: #fff; box-shadow: 0 8px 26px #f0b84a40; }
.mood-seal.rainy { background: radial-gradient(circle at 50% 40%, #cdd9e6 0%, #8ba4ba 75%); color: #fff; box-shadow: 0 8px 26px #7e97ad40; }
.pair-legend { display: flex; align-items: center; justify-content: space-between; padding: 17px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.pair-legend > span { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.pair-legend > span:last-child { text-align: right; }
.pair-legend small { font-size: 10px; color: var(--muted); display: block; line-height: 1.4; }
.pair-legend .legend-center { color: #a7b2a3; }
.legend-center .icon { width: 18px; height: 18px; transform: rotate(-30deg); }
.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 65px; left: 50%; border-left: 1px solid var(--line); }
.timeline-date { position: relative; display: flex; justify-content: center; padding: 12px 0 22px; }
.timeline-date > span { display: flex; gap: 10px; align-items: center; background: var(--paper); padding: 6px 13px; font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: var(--muted); }
.timeline-date small { font-family: inherit; color: var(--green); font-size: 10px; }
.timeline-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr); align-items: start; margin-bottom: 19px; }
.moment-card { display: block; border: 1px solid transparent; padding: 18px 19px 12px; text-align: left; border-radius: 16px; width: 100%; min-width: 0; position: relative; box-shadow: 0 3px 9px #36432b03; transition: transform .15s, box-shadow .15s; }
.moment-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.moment-card.left { background: var(--left-card); grid-column: 1; border-top-right-radius: 4px; }
.moment-card.right { background: var(--right-card); grid-column: 3; border-top-left-radius: 4px; }
.moment-author { display: flex; align-items: center; gap: 7px; color: var(--left-ink); font-size: 11px; margin-bottom: 12px; }
.moment-card.right .moment-author { color: var(--right-ink); }
.moment-body { font-size: 14px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.moment-meta { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; margin-top: 16px; }
.moment-meta > span { display: flex; align-items: center; gap: 3px; margin-left: auto; }
.moment-meta .icon { width: 12px; height: 12px; }
.timeline-point { position: absolute; width: 7px; height: 7px; top: 29px; left: calc(50% - 3px); border: 1.5px solid #a5b3a0; border-radius: 50%; background: var(--paper); z-index: 1; }
.timeline-row.right .timeline-point { border-color: #c4ab98; }
.timeline-point::after { content: ""; position: absolute; width: 15px; height: 1px; background: var(--line); top: 2px; right: 6px; }
.timeline-row.right .timeline-point::after { right: auto; left: 6px; }
.timeline-end { position: relative; background: var(--paper); display: flex; align-items: center; justify-content: center; gap: 8px; padding-top: 24px; color: #a7afa1; font-size: 11px; }
.timeline-end .icon { width: 14px; height: 14px; }
.bottom-nav { position: fixed; bottom: max(18px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(450px, calc(100% - 36px)); display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px; background: #fffffff2; border: 1px solid #e5e7df; border-radius: 23px; box-shadow: 0 10px 45px #333e3410; z-index: 5; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.bottom-nav button { background: none; border-radius: 16px; color: #8e948b; display: flex; flex-direction: column; gap: 4px; align-items: center; padding: 10px 6px; font-size: 11px; line-height: 1.4; }
.bottom-nav button.active { background: var(--soft); color: var(--green); }
.bottom-nav .icon { width: 21px; height: 21px; }
.compose-dock { position: fixed; bottom: calc(111px + env(safe-area-inset-bottom)); left: 50%; width: min(660px, calc(100% - 36px)); transform: translateX(-50%); pointer-events: none; display: flex; justify-content: flex-end; z-index: 4; }
.compose-button { pointer-events: all; display: flex; gap: 8px; align-items: center; padding: 14px 20px; border-radius: 50px; color: #fff; background: var(--green); box-shadow: 0 7px 23px #3f5b4b24; font-size: 13px; }
.compose-button:hover { background: var(--green-dark); }
.compose-button .icon { width: 18px; height: 18px; }
.primary, .secondary { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 47px; border-radius: 12px; padding: 12px 19px; line-height: 1.5; font-size: 14px; font-weight: 500; }
.primary { background: var(--green); color: white; }
.primary:hover { background: var(--green-dark); }
.secondary { background: transparent; border: 1px solid var(--line); color: var(--green); }
.secondary:hover { background: var(--soft); }
.primary .icon, .secondary .icon { width: 17px; height: 17px; }
.text-button { background: none; padding: 7px 0; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: var(--green); }
.text-button .icon { width: 15px; height: 15px; }
.icon-button { background: transparent; border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center; flex-shrink: 0; color: var(--muted); }
.icon-button:hover { background: var(--soft); }
.empty-state { text-align: center; padding: 52px 8px; }
.empty-icon { width: 70px; height: 70px; display: inline-grid; place-items: center; background: var(--soft); border-radius: 50%; color: var(--green); margin-bottom: 20px; }
.empty-icon .icon { width: 30px; height: 30px; }
.empty-state h3 { font-size: 17px; margin-bottom: 10px; }
.empty-state p { color: var(--muted); font-size: 13px; margin-bottom: 25px; }
.empty-state > .icon { color: var(--muted); margin-bottom: 15px; width: 30px; height: 30px; }
.auth-layout { min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; max-width: 1400px; margin: auto; }
.auth-story { padding: 52px 12%; background: #ebeee5; display: flex; flex-direction: column; justify-content: space-between; min-height: 820px; }
.auth-story .brand { margin-bottom: 60px; }
.story-copy h1 { font-family: "Songti SC", "Noto Serif CJK SC", "SimSun", Georgia, serif; font-size: clamp(32px, 3.4vw, 49px); font-weight: 500; letter-spacing: .05em; line-height: 1.6; margin: 16px 0 22px; }
.story-copy p { font-size: 14px; line-height: 2; color: #83907e; }
.story-timeline { margin: 36px 0 30px; position: relative; width: 100%; max-width: 330px; height: 205px; }
.story-timeline::before { content: ""; height: 100%; width: 1px; position: absolute; left: 50%; background: #d1d9c9; }
.story-card { padding: 14px 16px; border-radius: 12px; font-size: 12px; width: 64%; position: absolute; box-shadow: 0 5px 24px #31403106; }
.story-card p { max-width: 170px; line-height: 1.9; }
.story-card small { font-size: 9px; display: block; text-align: right; color: #9ca38e; margin-top: 5px; }
.story-card.left { top: 0; left: -10px; transform: rotate(-5deg); background: #f8faf3; }
.story-card.left .icon { color: #b4a579; width: 18px; height: 18px; margin-bottom: 6px; }
.story-card.right { bottom: 0; right: -6px; transform: rotate(4deg); background: #f5eade; }
.story-date { position: absolute; top: 92px; right: -8px; font-family: Georgia, serif; letter-spacing: .13em; font-size: 9px; color: #8e9983; }
.story-foot { color: #8e9983; font-size: 11px; display: flex; align-items: center; gap: 7px; padding-top: 12px; }
.story-foot .icon { width: 13px; height: 13px; }
.auth-panel { padding: 50px 12%; display: flex; align-items: center; }
.auth-panel-inner { width: 100%; max-width: 360px; margin: auto; }
.little-label { display: block; color: #909d88; font-size: 11px; letter-spacing: .08em; margin-bottom: 12px; }
.auth-panel h2 { font-size: 27px; margin-bottom: 9px; letter-spacing: -.03em; }
.auth-panel p.muted { font-size: 12px; margin-bottom: 30px; }
.segmented { display: flex; padding: 4px; border: 1px solid var(--line); background: #eff0e9; border-radius: 12px; gap: 4px; }
.segmented button { flex: 1; padding: 8px 15px; font-size: 13px; background: transparent; border-radius: 8px; color: var(--muted); display: flex; justify-content: center; align-items: center; gap: 7px; }
.segmented button.active { color: var(--green); background: var(--surface); box-shadow: 0 2px 5px #2e3c3105; }
.segmented .icon { width: 16px; height: 16px; }
.auth-tabs { margin-bottom: 24px; }
form label { display: block; font-size: 12px; color: #777e70; margin: 0 0 18px; }
input:not([type="checkbox"]):not([type="radio"]), textarea { display: block; width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; margin-top: 8px; background: var(--surface); outline-offset: 1px; font-size: 14px; min-height: 47px; }
input::placeholder, textarea::placeholder { color: #abb0a4; opacity: 1; }
textarea { resize: vertical; line-height: 1.85; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--green); }
.form-error { font-size: 12px; color: #a75b4e; line-height: 1.6; min-height: 0; margin: 0 0 12px; }
.form-error:empty { margin: 0; }
.auth-divider { text-align: center; position: relative; color: #a4aa9e; font-size: 10px; margin: 26px 0 22px; }
.auth-divider::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--line); }
.auth-divider span { background: var(--paper); padding: 0 14px; position: relative; }
.demo-hint { margin: 14px auto 0; font-size: 10px; color: var(--muted); text-align: center; max-width: 270px; line-height: 1.8; }
.gender-field { border: 0; padding: 0; margin: 0 0 22px; display: flex; gap: 12px; }
.gender-field legend { color: #777e70; font-size: 12px; margin-bottom: 10px; }
.radio-card { display: flex; gap: 8px; align-items: center; flex: 1; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 9px; }
.radio-card small { margin-left: 5px; font-size: 10px; opacity: .65; }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 46px; }
.password-toggle { position: absolute; top: 8px; right: 6px; width: 34px; height: 34px; padding: 0; display: grid; place-items: center; background: none; border-radius: 8px; color: var(--muted); }
.password-toggle:hover { background: var(--soft); color: var(--green); }
.password-toggle .icon { width: 18px; height: 18px; }
.binding-page { max-width: 360px; margin: 65px auto 0; padding-bottom: 45px; text-align: center; }
.binding-symbol { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 32px; }
.binding-link { color: #a9b69e; }
.binding-page h1 { font-size: 27px; margin-bottom: 15px; }
.binding-page > p { font-size: 13px; line-height: 1.9; }
.match-code-card { margin: 28px 0; border: 1px solid var(--line); border-radius: 16px; background: #f0f2eb; padding: 20px; display: flex; flex-direction: column; align-items: center; }
.field-caption { font-size: 11px; color: var(--muted); display: block; }
.match-code { font-family: ui-monospace, Consolas, monospace; font-size: 30px; letter-spacing: .23em; font-weight: 500; margin-top: 6px; padding-left: .23em; }
#pair-form { text-align: left; }
.code-input { text-transform: uppercase; letter-spacing: .13em; text-align: center; }
.code-input::placeholder { text-transform: none; letter-spacing: 0; }
.quiet-note { display: flex; justify-content: center; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; margin-top: 20px; }
.quiet-note .icon { width: 13px; height: 13px; }
.waiting-card { padding: 25px; background: var(--surface); border-radius: 16px; border: 1px solid var(--line); }
.waiting-card > .icon { color: var(--green); margin-bottom: 10px; }
.waiting-card h3 { font-size: 16px; margin-bottom: 8px; }
.waiting-card p { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.binding-actions { display: flex; justify-content: center; gap: 30px; margin-top: 28px; }
.page-intro.compact { margin-bottom: 28px; }
.message-tabs { width: 226px; margin-bottom: 25px; }
.notification-list { display: grid; gap: 12px; }
.notice-card { display: flex; gap: 16px; align-items: flex-start; padding: 20px; width: 100%; background: #ffffffb3; border: 1px solid var(--line); border-radius: 14px; text-align: left; }
.notice-card:hover { background: var(--surface); border-color: #c6d0c1; }
.notice-icon { width: 36px; height: 36px; border-radius: 11px; background: var(--soft); color: var(--green); flex-shrink: 0; display: grid; place-items: center; }
.notice-icon .icon { width: 18px; height: 18px; }
.notice-card.pending .notice-icon { background: #f0e9da; color: #9b875b; }
.notice-content { display: block; flex: 1; min-width: 0; }
.notice-heading { display: block; font-size: 13px; font-weight: 550; margin-bottom: 5px; }
.notice-description { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; color: var(--muted); line-height: 1.8; overflow-wrap: anywhere; white-space: pre-wrap; }
.notice-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 10px; color: #9ca294; margin-top: 12px; }
.notice-card > .icon { width: 14px; height: 14px; color: #b2baa9; align-self: center; }
.status { display: inline-flex; border-radius: 5px; padding: 3px 7px; font-size: 10px; line-height: 1.5; white-space: nowrap; }
.status.pending { background: #f3eddf; color: #9b8150; }
.status.approved { background: #e8eee4; color: #628055; }
.status.rejected { background: #efebe8; color: #978378; }
.partner-card { display: flex; align-items: center; text-align: left; padding: 22px; background: var(--surface); border: 1px solid var(--line); width: 100%; border-radius: 16px; gap: 17px; }
.partner-card strong { font-size: 16px; font-weight: 500; }
.partner-card small { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.partner-card .soon-tag { margin-left: auto; }
.partner-card > .icon { color: var(--muted); width: 15px; height: 15px; }
.soon-tag { display: inline-block; white-space: nowrap; border: 1px solid var(--line); border-radius: 6px; color: #999f91; font-size: 10px; padding: 4px 8px; }
.profile-card { display: flex; align-items: center; gap: 20px; padding: 25px 0 35px; }
.profile-card h2 { font-size: 23px; margin-bottom: 5px; }
.profile-card p { font-size: 12px; color: var(--muted); }
.profile-card .icon-button { margin-left: auto; }
.settings-group { background: #ffffffb3; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.setting-row { padding: 20px 23px; display: flex; justify-content: space-between; align-items: center; gap: 15px; font-size: 13px; width: 100%; background: none; text-align: left; }
.setting-row + .setting-row { border-top: 1px solid var(--line); }
.setting-row > span:nth-child(2) { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; min-width: 0; }
.setting-row > span:first-child { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.setting-row > .icon, .setting-row > span > .icon { width: 16px; height: 16px; color: var(--muted); }
.setting-partner { display: flex; align-items: center; gap: 7px; }
.privacy-note { display: flex; gap: 10px; padding: 25px 15px; font-size: 12px; line-height: 1.8; color: var(--muted); }
.privacy-note .icon { width: 16px; height: 16px; margin-top: 3px; }
.logout-button { background: none; color: #a08272; border: 1px solid #e6ded6; border-radius: 12px; padding: 13px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 13px; }
.logout-button .icon { width: 17px; height: 17px; }
.app-signature { display: flex; flex-direction: column; gap: 11px; align-items: center; margin-top: 45px; font-size: 10px; color: var(--muted); }
.app-signature .brand-mark { opacity: .5; }
.app-signature small { font-size: 8px; letter-spacing: .1em; opacity: .6; }
.back-link { margin: -15px 0 20px; }
.chat-placeholder { padding: 35px 0; text-align: center; }
.chat-placeholder h1 { font-size: 24px; margin: 15px 0 10px; }
.chat-drawing { display: flex; justify-content: center; gap: 10px; margin: 40px 0 35px; }
.chat-drawing span { background: var(--soft); border-radius: 18px 18px 18px 4px; padding: 18px 30px; color: #9cae91; transform: rotate(-5deg); }
.chat-drawing span:last-child { background: #f2e9df; color: #b99c85; transform: rotate(5deg) translateY(16px); }
.chat-drawing .icon { width: 30px; height: 30px; }
.chat-placeholder h2 { font-size: 19px; margin-bottom: 15px; }
.chat-placeholder p { color: var(--muted); font-size: 13px; line-height: 2; margin-bottom: 26px; }
body.modal-open { overflow: hidden; }
dialog { width: min(520px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 22px; color: var(--ink); background: var(--paper); box-shadow: 0 30px 100px #23312125; max-height: calc(100dvh - 60px); }
dialog::backdrop { background: #27342954; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
#modal-content { padding: 28px; }
.modal-header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 26px; }
.modal-header h2 { font-size: 22px; letter-spacing: -.03em; padding-top: 2px; }
.modal-header p { font-size: 12px; color: var(--muted); margin-top: 7px; line-height: 1.8; }
.modal-header .icon-button { margin-right: -8px; margin-top: -3px; }
.mood-label { display: inline-flex; gap: 7px; align-items: center; border-radius: 7px; padding: 5px 9px; font-size: 11px; background: #eeeede; color: #959158; }
.mood-label.bad { background: #e6ecf0; color: #708895; }
.mood-label .icon { width: 15px; height: 15px; }
#compose-form > textarea { margin-top: 18px; min-height: 170px; background: #ffffffa8; }
.character-count { text-align: right; color: #a4ab9d; font-size: 10px; margin-top: 6px; margin-bottom: 21px; }
.time-option { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; color: #7f8977; }
.time-option > div { display: flex; gap: 8px; align-items: center; }
.time-option .icon { width: 16px; height: 16px; }
.time-option .check-label { margin: 0; display: flex; gap: 5px; align-items: center; }
.time-now { padding: 10px 0 16px 24px; font-size: 12px; color: var(--muted); }
.backdate-fields { padding-top: 15px; }
.backdate-fields label { margin-bottom: 10px; }
.field-hint { color: var(--muted); font-size: 11px; line-height: 1.85; margin: 9px 0 20px; }
.form-footer { margin-top: 20px; }
.form-footer p { font-size: 11px; display: flex; gap: 5px; align-items: center; color: #939c8b; margin-bottom: 16px; }
.form-footer p .icon { width: 13px; height: 13px; }
.form-footer .primary { width: 100%; }
.detail-person { display: flex; align-items: center; gap: 11px; font-size: 13px; }
.detail-person strong { font-weight: 500; }
.detail-person small { font-size: 10px; color: var(--muted); display: block; margin-top: 4px; }
.detail-person .mood-label { margin-left: auto; }
.full-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.9; }
.detail-body { margin: 26px 0 30px; font-size: 16px; }
.history-link { display: flex; gap: 7px; align-items: center; width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 13px; background: none; color: var(--muted); font-size: 11px; text-align: left; }
.history-link .icon { width: 15px; height: 15px; }
.history-link > .icon:last-child { margin-left: auto; }
.detail-actions { margin-top: 20px; }
.original-note { font-size: 11px; color: #a1a995; border-top: 1px solid var(--line); padding-top: 16px; }
.original-preview, .compare-block { background: #eeefe9; padding: 16px; border-radius: 12px; margin-bottom: 20px; }
.original-preview .full-body, .compare-block .full-body { font-size: 13px; margin-top: 9px; }
.original-preview { color: #8a9383; }
.required-tag { color: #a9ad9d; font-size: 10px; margin-left: 5px; }
.request-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 22px; }
.request-status > span:last-child { font-size: 11px; color: var(--muted); }
.compare-block.original { background: #eeefe9; color: #8a9383; }
.compare-block.proposed { background: #e7eee2; border: 1px solid #d6e0ce; }
.request-reason { border-left: 2px solid #c7d1be; padding: 0 0 0 14px; margin: 24px 0; }
.request-reason p { font-size: 13px; margin-top: 7px; white-space: pre-wrap; overflow-wrap: anywhere; }
.decision-actions { display: flex; gap: 12px; margin-top: 25px; }
.decision-actions button { flex: 1; }
.revision { padding: 20px 0; border-top: 1px solid var(--line); }
.revision:first-child { padding-top: 0; border-top: 0; }
.revision-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; font-size: 12px; }
.revision-heading em { font-style: normal; font-size: 9px; background: var(--soft); color: var(--green); padding: 3px 5px; margin-left: 8px; border-radius: 4px; }
.revision-heading small { color: var(--muted); font-size: 10px; }
.revision > .full-body { font-size: 13px; }
.revision-reason { background: var(--soft); padding: 12px; border-radius: 9px; margin-top: 14px; }
.revision-reason > span, .revision-reason small, .original-label { font-size: 10px; color: var(--muted); }
.revision-reason p { font-size: 12px; margin: 4px 0; overflow-wrap: anywhere; }
.original-label { display: block; margin-top: 12px; }
.mini-back { padding-top: 0; margin-bottom: 8px; font-size: 11px; }
.install-steps { text-align: center; }
.install-mark { width: 70px; height: 70px; border-radius: 16px; margin-bottom: 20px; }
.install-steps > p { font-size: 12px; color: var(--muted); }
.install-steps ol { text-align: left; padding-left: 22px; margin: 26px 0; }
.install-steps li { font-size: 12px; margin-bottom: 20px; padding-left: 8px; }
.install-steps li strong { display: block; font-weight: 500; margin-bottom: 7px; }
.install-steps li span { color: var(--muted); }
.logout-copy { font-size: 13px; color: var(--muted); line-height: 1.9; }
.loading-detail { text-align: center; color: var(--muted); padding: 50px 10px; font-size: 13px; }
#toast { position: fixed; left: 50%; bottom: 120px; transform: translate(-50%, 12px); background: #364d3f; color: #fff; border-radius: 12px; padding: 12px 19px; max-width: calc(100% - 40px); width: max-content; font-size: 12px; opacity: 0; pointer-events: none; z-index: 20; box-shadow: 0 5px 30px #172b1b17; transition: opacity .15s, transform .15s; }
#toast.visible { opacity: 1; transform: translate(-50%, 0); }
.boot { min-height: 80dvh; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 20px; color: var(--muted); font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (min-width: 1100px) {
  .app-shell { min-height: 100vh; }
  .main-content { max-width: 750px; padding-top: 52px; }
  .topbar { max-width: 1040px; }
}
@media (max-width: 720px) {
  .auth-layout { display: block; }
  .auth-story { min-height: auto; padding: 27px 30px 32px; }
  .auth-story .brand { margin-bottom: 30px; }
  .story-copy h1 { font-size: 32px; line-height: 1.5; margin: 10px 0; }
  .story-copy h1 br { display: none; }
  .story-copy .eyebrow { font-size: 8px; margin-bottom: 10px; }
  .story-copy p { font-size: 12px; }
  .story-copy p br { display: none; }
  .story-timeline, .story-foot { display: none; }
  .auth-panel { padding: 33px 30px 40px; }
  .auth-panel-inner { max-width: 440px; }
  .auth-panel h2 { font-size: 24px; }
  .auth-panel p.muted { margin-bottom: 20px; }
  .auth-panel .little-label { display: none; }
  .topbar { height: 82px; padding: 0 22px; }
  .topbar-right { gap: 15px; }
  .brand { font-size: 20px; }
  .brand-mark { width: 38px; height: 38px; border-radius: 9px; }
  .main-content { padding: 32px 22px 185px; }
  .page-intro { gap: 12px; margin-bottom: 28px; }
  .page-intro h1 { font-size: 24px; margin-bottom: 9px; }
  .page-intro p { font-size: 11px; }
  .eyebrow { font-size: 8px; margin-bottom: 12px; }
  .mood-seal { width: 50px; height: 50px; }
  .mood-seal .icon { width: 30px; height: 30px; }
  .pair-legend { padding: 15px 0; margin-bottom: 18px; }
  .timeline-row { grid-template-columns: minmax(0,1fr) 30px minmax(0,1fr); margin-bottom: 17px; }
  .moment-card { padding: 13px 12px 10px; border-radius: 12px; }
  .moment-author { font-size: 10px; gap: 5px; margin-bottom: 8px; }
  .moment-author .avatar.tiny { width: 21px; height: 21px; font-size: 10px; }
  .moment-body { font-size: 13px; line-height: 1.85; }
  .moment-meta { font-size: 9px; gap: 4px; margin-top: 12px; }
  .moment-meta .icon { width: 10px; height: 10px; }
  .timeline-point { top: 23px; width: 6px; height: 6px; }
  .timeline-point::after { width: 10px; right: 5px; top: 1px; }
  .timeline-row.right .timeline-point::after { left: 5px; }
  .timeline-date { padding: 10px 0 19px; }
  .timeline-date > span { font-size: 10px; gap: 8px; }
  .timeline-date small { font-size: 9px; }
  .notice-card { padding: 17px 14px; gap: 11px; }
  .notice-heading { font-size: 12px; }
  .notice-icon { width: 30px; height: 30px; border-radius: 9px; }
  .notice-description { font-size: 11px; }
  .notice-card > .icon { width: 12px; height: 12px; }
  .profile-card { padding-top: 14px; gap: 15px; }
  .setting-row { padding: 18px 17px; font-size: 12px; }
  .setting-row > span:nth-child(2) { font-size: 11px; }
  .partner-card { padding: 18px 14px; gap: 12px; }
  .partner-card .avatar { width: 46px; height: 46px; font-size: 19px; }
  .partner-card .soon-tag { font-size: 9px; }
  .partner-card strong { font-size: 14px; }
  .partner-card small { font-size: 11px; }
  .binding-page { margin-top: 42px; width: calc(100% - 48px); }
  #modal-content { padding: 23px; }
  .modal-header h2 { font-size: 20px; }
  .revision-heading { flex-wrap: wrap; }
}
@media (max-width: 390px) {
  .private-label { display: none; }
  .main-content { padding-left: 16px; padding-right: 16px; }
  .page-intro h1 { font-size: 22px; }
  .mood-seal { width: 40px; height: 40px; }
  .mood-seal .icon { width: 26px; height: 26px; }
  .moment-card { padding-left: 10px; padding-right: 10px; }
  .moment-meta > .icon:last-child { display: none; }
  .demo-bar { gap: 15px; font-size: 10px; }
  .demo-bar button { font-size: 10px; }
  .detail-person .mood-label { padding: 4px 5px; font-size: 10px; }
  #modal-content { padding: 20px; }
  .story-copy h1 { font-size: 28px; }
  .soon-tag { padding-left: 5px; padding-right: 5px; }
}
@media (max-width: 480px) and (max-height: 780px) {
  dialog { max-height: calc(100dvh - 24px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

.unread-badge {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  min-width: 18px; min-height: 18px; padding: 2px 5px; border-radius: 20px;
  background: #c84d4a; color: #fff; font: 600 10px/14px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: 0;
}
.nav-icon, .partner-avatar { position: relative; display: inline-flex; flex-shrink: 0; }
.nav-icon > .unread-badge { position: absolute; left: 13px; top: -7px; border: 2px solid #fff; min-width: 20px; }
.partner-avatar > .unread-badge { position: absolute; right: -4px; top: -4px; border: 2px solid var(--surface); }
.message-tabs { width: min(300px, 100%); }
.message-tabs button { padding-left: 12px; padding-right: 12px; }
.notice-card > .unread-badge { align-self: center; }
.notice-card.unread .notice-heading { font-weight: 650; }
.chat-back { position: relative; }
.chat-back > .unread-badge { position: absolute; top: -5px; right: -8px; border: 2px solid var(--paper); }

/* Demo space is browse-only: hide every write affordance, keep navigation. */
body.demo-readonly .compose-dock,
body.demo-readonly .chat-composer,
body.demo-readonly .detail-actions,
body.demo-readonly .decision-actions,
body.demo-readonly .empty-state [data-action="compose"],
body.demo-readonly [data-action="profile"],
body.demo-readonly .history-link + .detail-actions { display: none; }
body.demo-readonly .main-content { padding-bottom: 120px; }
body.demo-readonly .chat-scroll { padding-bottom: 24px; }
