:root {
  --page: #f2f4f7;
  --glass: rgb(255 255 255 / 0.64);
  --glass-strong: rgb(255 255 255 / 0.82);
  --ink: #182128;
  --ink-soft: #68747e;
  --line: rgb(255 255 255 / 0.74);
  --blue: #007aff;
  --blue-soft: #e5f1ff;
  --green: #258a62;
  --red: #d92d20;
  --shadow: 0 16px 36px rgb(30 43 54 / 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; margin: 0; }
body { background: #dfe4e9; }
button, textarea, input, select { font: inherit; }
button { min-width: 48px; min-height: 48px; cursor: pointer; touch-action: manipulation; }
button:focus-visible, textarea:focus-visible { outline: 3px solid rgb(0 122 255 / .35); outline-offset: 3px; }

.app { position: relative; width: min(100%, 450px); min-height: 100dvh; margin: 0 auto; padding: calc(20px + env(safe-area-inset-top)) 20px calc(94px + env(safe-area-inset-bottom)); overflow: hidden; background: var(--page); }
.error-banner { display: flex; align-items: center; gap: 8px; margin-top: 13px; padding: 10px 11px; border: 1px solid #f2c7c4; border-radius: 10px; color: #a32922; background: #fff3f2; font-size: 13px; }
.error-banner > svg { width: 16px; flex: none; }
.error-banner span { flex: 1; line-height: 1.45; }
.error-banner button { display: grid; width: 28px; height: 28px; place-items: center; padding: 0; border: 0; color: inherit; background: transparent; }
.error-banner button svg { width: 15px; }
.header { display: flex; min-height: 39px; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 17px; letter-spacing: 0; }
.brand-small { font-size: 15px; }
.brand-symbol { position: relative; width: 18px; height: 18px; border-radius: 6px 6px 6px 3px; background: linear-gradient(90deg, transparent 0 31%, #fff 31% 42%, transparent 42% 58%, #fff 58% 69%, transparent 69%) center / 100% 58% no-repeat, var(--blue); }
.brand-symbol::after { position: absolute; bottom: -3px; left: 4px; width: 5px; height: 5px; background: var(--blue); clip-path: polygon(0 0, 100% 0, 0 100%); content: ""; }
.brand-small .brand-symbol { width: 15px; height: 15px; border-radius: 5px 5px 5px 2px; }
.avatar, .back-button { display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; color: var(--ink); background: transparent; }
.avatar { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--glass); backdrop-filter: blur(18px); }
.avatar, .back-button, .icon-action, .assistant-trigger, .error-banner button { min-width: 48px; min-height: 48px; }
.avatar svg { width: 18px; stroke-width: 1.8; }
.back-button { gap: 2px; color: var(--blue); font-size: 15px; }
.back-button svg { width: 21px; }

.welcome { padding: 48px 2px 28px; }
.welcome p, .list-heading p, .flow-heading p { margin: 0 0 8px; color: var(--ink-soft); font-size: 15px; }
.welcome h1, .list-heading h1, .flow-heading h1, .case-detail-heading h1 { margin: 0; font-size: 32px; line-height: 1.25; letter-spacing: 0; }

.compose-card, .glass-section, .profile-card, .case-summary { border: 1px solid var(--line); background: var(--glass); box-shadow: var(--shadow); backdrop-filter: blur(24px) saturate(145%); }
.compose-card { padding: 16px; border-radius: 18px; }
.card-heading { display: flex; align-items: center; gap: 8px; }
.card-heading h2, .section-top h2 { margin: 0; font-size: 16px; }
.heading-icon { display: grid; width: 27px; height: 27px; flex: none; place-items: center; border-radius: 8px; color: var(--blue); background: var(--blue-soft); }
.heading-icon svg { width: 16px; }
.compose-card textarea { display: block; width: 100%; min-height: 120px; margin-top: 14px; padding: 2px 1px; resize: none; border: 0; color: var(--ink); background: transparent; font-size: 16px; line-height: 1.6; }
.compose-card textarea::placeholder, .glass-section textarea::placeholder { color: #8b959d; opacity: 1; }
.compose-card textarea:focus, .glass-section textarea:focus { outline: 0; }
.scene-picker { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgb(24 33 40 / .08); }
.scene-picker > span { color: var(--ink-soft); font-size: 12px; }
.scene-options { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.scene-options::-webkit-scrollbar { display: none; }
.scene-option { flex: none; min-height: 48px; padding: 0 12px; border: 1px solid rgb(24 33 40 / .08); border-radius: 8px; color: var(--ink-soft); background: rgb(255 255 255 / .54); font-size: 12px; }
.scene-option.is-selected { border-color: rgb(0 122 255 / .22); color: var(--blue); background: var(--blue-soft); font-weight: 600; }
.compose-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid rgb(24 33 40 / .08); }
.compose-bottom > span { color: var(--ink-soft); font-size: 12px; }
.compose-bottom button, .primary-action { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 5px; padding: 0 15px; border: 0; border-radius: 10px; color: white; background: var(--blue); font-size: 14px; font-weight: 600; transition: background .2s ease, transform .2s ease; }
.compose-bottom button svg, .primary-action svg { width: 15px; }
.compose-bottom button:hover:not(:disabled), .primary-action:hover { transform: translateY(-1px); background: #006ee6; }
.compose-bottom button:disabled { cursor: not-allowed; color: #9ea8af; background: #d9dee2; }
.primary-action:disabled { cursor: not-allowed; opacity: .58; }

.active-section { margin-top: 36px; }
.section-top { display: flex; align-items: center; justify-content: space-between; }
.section-top button { padding: 4px 0; border: 0; color: var(--blue); background: transparent; font-size: 13px; }
.empty-section { padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: rgb(255 255 255 / .32); }
.empty-section p { margin: 7px 0 0; color: var(--ink-soft); font-size: 13px; }
.case-card { display: grid; width: 100%; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; margin-top: 13px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: var(--glass-strong); box-shadow: 0 8px 22px rgb(30 43 54 / .05); text-align: left; backdrop-filter: blur(18px); }
.case-card:hover { background: white; }
.case-state { display: inline-flex; width: fit-content; padding: 5px 7px; border-radius: 7px; color: var(--green); background: #e2f4eb; font-size: 11px; font-weight: 600; white-space: nowrap; }
.case-state.status-waiting { color: #8a4b08; background: #fff4df; }
.case-state.status-completed { color: #68747e; background: #e8edf1; }
.case-state.status-pending { color: #3a6794; background: #e7f0fa; }
.case-card strong { display: -webkit-box; overflow: hidden; font-size: 14px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.case-card p { margin: 4px 0 0; overflow: hidden; color: var(--ink-soft); font-size: 11px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.case-card > svg { width: 17px; color: var(--ink-soft); }
.privacy { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 22px 0 0; color: var(--ink-soft); font-size: 11px; }
.privacy svg { width: 13px; color: var(--green); }

.flow-heading { padding: 42px 2px 25px; }
.flow-heading p { color: var(--blue); font-size: 13px; font-weight: 600; }
.flow-heading span { display: block; margin-top: 10px; color: var(--ink-soft); font-size: 14px; }
.details-form { display: grid; gap: 12px; }
.glass-section { padding: 16px; border-radius: 16px; }
.glass-section > label { display: block; margin-bottom: 12px; font-size: 15px; font-weight: 600; }
.choice-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { min-height: 34px; padding: 0 11px; border: 1px solid rgb(24 33 40 / .08); border-radius: 9px; color: var(--ink-soft); background: rgb(255 255 255 / .55); font-size: 13px; }
.choice.is-selected { border-color: rgb(0 122 255 / .22); color: var(--blue); background: var(--blue-soft); font-weight: 600; }
.glass-section textarea { display: block; width: 100%; resize: none; border: 0; color: var(--ink); background: transparent; font-size: 15px; line-height: 1.55; }
.glass-section select { display: block; width: 100%; min-height: 42px; padding: 0 10px; border: 1px solid rgb(24 33 40 / .08); border-radius: 9px; color: var(--ink); background: rgb(255 255 255 / .7); font-size: 14px; }
.primary-action { width: 100%; min-height: 50px; margin-top: 7px; }

.case-detail-heading { padding: 43px 2px 25px; }
.case-detail-heading h1 { margin-top: 13px; font-size: 27px; }
.case-detail-heading p { margin: 9px 0 0; color: var(--ink-soft); font-size: 14px; }
.case-summary { display: grid; gap: 0; overflow: hidden; border-radius: 16px; }
.case-summary > div { padding: 15px; }
.case-summary > div + div { border-top: 1px solid rgb(24 33 40 / .08); }
.case-summary span { display: block; margin-bottom: 6px; color: var(--ink-soft); font-size: 12px; }
.case-summary strong { display: block; font-size: 15px; line-height: 1.5; }
.next-card, .profile-card { display: flex; gap: 11px; margin-top: 15px; padding: 16px; border-radius: 16px; }
.next-card strong, .profile-card strong { display: block; font-size: 15px; }
.next-card p, .profile-card p { margin: 5px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
.next-card .inline-action { margin-top: 11px; }
.generation-card, .simulation-card, .reply-card { margin-top: 15px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--glass); box-shadow: var(--shadow); backdrop-filter: blur(24px) saturate(145%); }
.generation-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.generation-head strong { display: block; margin-top: 6px; font-size: 16px; }
.generation-head > span { color: var(--ink-soft); font-size: 12px; }
.dev-tag { display: inline-flex; padding: 3px 6px; border-radius: 5px; color: #3a6794; background: #e7f0fa; font-size: 10px; font-weight: 600; }
.safety-note { margin: 12px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.5; }
.fallback-note { display: flex; align-items: flex-start; gap: 6px; margin: 12px 0 0; padding: 9px 10px; border-radius: 9px; color: #8a4b08; background: #fff4df; font-size: 12px; line-height: 1.45; }
.fallback-note svg { width: 15px; flex: none; }
.plan { margin-top: 12px; padding: 13px; border-radius: 11px; background: rgb(255 255 255 / .58); }
.plan.is-adopted { outline: 2px solid rgb(0 122 255 / .22); }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-top strong { font-size: 14px; }
.plan-top button { display: grid; width: 32px; height: 32px; place-items: center; padding: 0; border: 1px solid rgb(24 33 40 / .08); border-radius: 8px; color: var(--blue); background: rgb(255 255 255 / .72); }
.plan-top button svg { width: 15px; }
.plan p { margin: 10px 0 0; color: var(--ink); font-size: 14px; line-height: 1.6; }
.plan-editable { outline: 0; }
.plan-editable:focus { outline: 2px solid rgb(0 122 255 / .18); outline-offset: 3px; border-radius: 6px; }
.plan-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.plan-actions button { display: inline-flex; align-items: center; gap: 4px; min-height: 31px; padding: 0 8px; border: 0; border-radius: 8px; color: var(--blue); background: var(--blue-soft); font-size: 11px; }
.plan-actions button.is-selected { color: white; background: var(--blue); }
.plan-actions svg { width: 13px; }
.plan-feedback { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 11px; border-top: 1px solid rgb(24 33 40 / .08); }
.plan-feedback > span { color: var(--ink-soft); font-size: 11px; }
.plan-feedback > div { display: flex; gap: 6px; }
.plan-feedback button { display: inline-flex; min-height: 34px; align-items: center; gap: 4px; padding: 0 8px; border: 0; border-radius: 8px; color: var(--ink-soft); background: rgb(24 33 40 / .05); font-size: 11px; }
.plan-feedback button svg { width: 13px; }
.plan-feedback button.is-selected { color: var(--blue); background: var(--blue-soft); font-weight: 600; }
.simulation-card > p, .reply-card > p { margin: 8px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.simulation-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 13px; }
.simulation-options button { min-height: 42px; padding: 0 9px; border: 1px solid rgb(24 33 40 / .09); border-radius: 9px; color: var(--ink); background: rgb(255 255 255 / .62); font-size: 13px; }
.simulation-options button:hover:not(:disabled) { border-color: rgb(0 122 255 / .25); color: var(--blue); background: var(--blue-soft); }
.simulation-options button:disabled { cursor: wait; opacity: .55; }
.simulation-result, .support-result { margin-top: 14px; padding: 13px; border-radius: 11px; background: var(--blue-soft); }
.simulation-result > span, .support-result > span { color: var(--blue); font-size: 12px; font-weight: 700; }
.simulation-result blockquote { margin: 8px 0; color: var(--ink); font-size: 15px; line-height: 1.55; }
.simulation-result p, .support-result p { margin: 6px 0; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
.simulation-result strong { display: block; margin-top: 12px; font-size: 13px; }
.practice-thread { display: grid; gap: 8px; margin-top: 14px; }
.practice-message { max-width: 88%; padding: 9px 11px; border-radius: 11px; background: rgb(24 33 40 / .05); }
.practice-message.is-user { justify-self: end; background: var(--blue-soft); }
.practice-message span { color: var(--ink-soft); font-size: 10px; }
.practice-message p { margin: 4px 0 0; color: var(--ink); font-size: 13px; line-height: 1.5; }
.practice-form { margin-top: 13px; padding-top: 12px; border-top: 1px solid rgb(24 33 40 / .08); }
.practice-form label { display: block; color: var(--ink-soft); font-size: 12px; }
.practice-form textarea { display: block; width: 100%; min-height: 64px; margin-top: 8px; padding: 10px; resize: vertical; border: 1px solid rgb(24 33 40 / .08); border-radius: 10px; color: var(--ink); background: rgb(255 255 255 / .7); font-size: 14px; line-height: 1.55; }
.reply-card textarea { display: block; width: 100%; min-height: 88px; margin-top: 13px; padding: 11px; resize: vertical; border: 1px solid rgb(24 33 40 / .08); border-radius: 10px; color: var(--ink); background: rgb(255 255 255 / .7); font-size: 14px; line-height: 1.55; }
.secondary-action { display: inline-flex; min-height: 42px; align-items: center; gap: 6px; margin-top: 10px; padding: 0 14px; border: 0; border-radius: 9px; color: var(--blue); background: var(--blue-soft); font-size: 13px; font-weight: 600; }
.secondary-action svg { width: 15px; }
.support-result small { display: block; margin-top: 9px; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.real-reply-history { display: grid; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgb(24 33 40 / .08); }
.real-reply-history > span { color: var(--ink-soft); font-size: 12px; }
.real-reply-history > div { padding: 9px 10px; border-radius: 10px; background: rgb(24 33 40 / .04); }
.real-reply-history time { color: var(--ink-soft); font-size: 10px; }
.real-reply-history p { margin: 4px 0 0; color: var(--ink); font-size: 13px; line-height: 1.5; }
.delete-button { display: inline-flex; align-items: center; gap: 6px; margin-top: 23px; padding: 7px 0; border: 0; color: var(--red); background: transparent; font-size: 13px; }
.delete-button svg { width: 15px; }
.text-action { margin-top: 10px; padding: 5px 0; border: 0; color: var(--blue); background: transparent; font-size: 12px; }
.profile-text-actions { display: flex; flex-wrap: wrap; gap: 13px; }
.danger-text { color: var(--red); }
.progress-panel { display: grid; gap: 11px; margin-top: 15px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--glass); box-shadow: var(--shadow); backdrop-filter: blur(24px) saturate(145%); }
.progress-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.progress-head span, .progress-panel > label { display: block; color: var(--ink-soft); font-size: 12px; }
.progress-head strong { display: block; margin-top: 4px; font-size: 15px; }
.status-options { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.status-options button { min-height: 29px; padding: 0 7px; border: 1px solid rgb(24 33 40 / .08); border-radius: 8px; color: var(--ink-soft); background: rgb(255 255 255 / .58); font-size: 10px; }
.status-options button.is-selected { border-color: rgb(0 122 255 / .22); color: var(--blue); background: var(--blue-soft); font-weight: 600; }
.reminder-row { display: flex; gap: 7px; }
.reminder-row input { min-width: 0; flex: 1; padding: 8px 9px; border: 1px solid rgb(24 33 40 / .08); border-radius: 9px; color: var(--ink); background: rgb(255 255 255 / .7); font-size: 12px; }
.reminder-row button { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 0 9px; border: 0; border-radius: 8px; color: var(--blue); background: var(--blue-soft); font-size: 11px; }
.reminder-row svg { width: 13px; }

.list-heading { padding: 45px 2px 25px; }
.list-heading p { color: var(--blue); font-size: 13px; font-weight: 600; }
.list-subtitle { display: block; max-width: 32ch; margin-top: 10px; color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
.voice-profile-card { display: block; }
.profile-card-heading { display: flex; align-items: flex-start; gap: 11px; }
.voice-summary, .voice-preview { margin-top: 15px; padding-top: 14px; border-top: 1px solid rgb(24 33 40 / .08); }
.voice-summary > span, .voice-preview > span { display: block; margin-bottom: 8px; color: var(--ink-soft); font-size: 12px; }
.summary-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.summary-chips b { padding: 5px 8px; border-radius: 7px; color: var(--blue); background: var(--blue-soft); font-size: 12px; font-weight: 600; }
#voice-form { margin-top: 18px; }
#voice-form > label { display: block; font-size: 14px; font-weight: 600; }
.field-hint { margin: 6px 0 10px !important; font-size: 12px !important; }
#voice-form textarea { display: block; width: 100%; min-height: 64px; margin-top: 9px; padding: 10px; resize: vertical; border: 1px solid rgb(24 33 40 / .08); border-radius: 10px; color: var(--ink); background: rgb(255 255 255 / .7); font-size: 14px; line-height: 1.55; }
.voice-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.voice-actions .primary-action, .voice-actions .secondary-action { width: auto; min-height: 44px; margin-top: 0; }
.voice-actions .secondary-action { display: inline-flex; align-items: center; gap: 6px; padding: 0 13px; border: 0; border-radius: 9px; color: var(--blue); background: var(--blue-soft); font-size: 13px; font-weight: 600; }
.voice-actions .secondary-action svg { width: 15px; }
.personalization { display: flex; align-items: center; gap: 6px; margin: 11px 0 0; color: var(--blue); font-size: 12px; }
.personalization svg { width: 14px; }
.relationship-profile-card { display: block; }
.relationship-list { display: grid; gap: 8px; margin-top: 14px; }
.relationship-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px; border-radius: 10px; background: rgb(24 33 40 / .04); }
.relationship-row strong { display: inline; font-size: 14px; }
.relationship-row span { margin-left: 7px; color: var(--ink-soft); font-size: 11px; }
.relationship-row small { display: block; margin-top: 5px; color: var(--ink-soft); font-size: 11px; line-height: 1.4; }
.icon-action { display: grid; width: 30px; height: 30px; flex: none; place-items: center; padding: 0; border: 0; color: var(--red); background: transparent; }
.icon-action svg { width: 15px; }
.relationship-actions { display: flex; flex: none; gap: 2px; }
.relationship-actions [data-edit-relationship] { color: var(--blue); }
.relationship-submit { display: flex; align-items: center; gap: 12px; }
.relationship-submit .secondary-action { margin-top: 2px; }
.relationship-empty { margin-top: 13px !important; color: var(--ink-soft); font-size: 12px !important; }
.relationship-form { display: grid; gap: 8px; margin-top: 14px; padding-top: 13px; border-top: 1px solid rgb(24 33 40 / .08); }
.relationship-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.relationship-form input, .relationship-form textarea { width: 100%; padding: 9px 10px; border: 1px solid rgb(24 33 40 / .08); border-radius: 9px; color: var(--ink); background: rgb(255 255 255 / .7); font-size: 13px; }
.relationship-form textarea { resize: vertical; line-height: 1.5; }
.relationship-form .secondary-action { width: fit-content; margin-top: 2px; }
.relationship-form .secondary-action svg { width: 14px; }
.case-list { display: grid; gap: 10px; }
.case-list .case-card { margin-top: 0; }
.blank-state { display: grid; place-items: center; padding: 47px 20px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink-soft); background: var(--glass); text-align: center; box-shadow: var(--shadow); }
.blank-state > svg { width: 25px; margin-bottom: 12px; color: var(--blue); }
.blank-state strong { color: var(--ink); font-size: 15px; }
.blank-state p { margin: 5px 0 14px; font-size: 13px; }
.inline-action { padding: 7px 13px; border: 0; border-radius: 8px; color: var(--blue); background: var(--blue-soft); font-size: 13px; font-weight: 600; }
.green-icon { color: var(--green); background: #e2f4eb; }

.tabbar { position: fixed; z-index: 10; right: auto; bottom: calc(12px + env(safe-area-inset-bottom)); left: 50%; display: flex; width: min(calc(100% - 24px), 426px); height: 62px; align-items: center; justify-content: space-around; padding: 5px; border: 1px solid var(--line); border-radius: 18px; background: rgb(255 255 255 / .66); box-shadow: 0 12px 32px rgb(30 43 54 / .12); backdrop-filter: blur(22px) saturate(150%); transform: translateX(-50%); }
.tab { display: grid; min-width: 70px; gap: 2px; place-items: center; padding: 5px 12px; border: 0; border-radius: 12px; color: var(--ink-soft); background: transparent; font-size: 10px; }
.tab { min-height: 52px; }
.tab svg { width: 20px; stroke-width: 1.8; }
.tab.is-active { color: var(--blue); background: rgb(255 255 255 / .72); font-weight: 700; }

.access-screen { display: grid; min-height: 100dvh; align-content: center; gap: 28px; padding: calc(28px + env(safe-area-inset-top)) 2px calc(28px + env(safe-area-inset-bottom)); }
.access-screen > div:nth-child(2) > p { margin: 0 0 8px; color: var(--blue); font-size: 13px; font-weight: 600; }
.access-screen h1 { margin: 0; font-size: 30px; line-height: 1.25; }
.access-screen > div:nth-child(2) > span { display: block; max-width: 30ch; margin-top: 11px; color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.access-screen form { display: grid; gap: 9px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--glass); box-shadow: var(--shadow); backdrop-filter: blur(24px) saturate(145%); }
.access-screen label { font-size: 13px; font-weight: 600; }
.access-screen input { min-height: 46px; padding: 0 11px; border: 1px solid rgb(24 33 40 / .12); border-radius: 9px; color: var(--ink); background: rgb(255 255 255 / .78); }
.access-screen .primary-action { margin-top: 4px; }
.access-error { margin: -18px 0 0; color: var(--red); font-size: 13px; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.assistant-trigger { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgb(24 33 40 / .08); border-radius: 50%; color: var(--blue); background: rgb(255 255 255 / .58); }
.assistant-trigger svg { width: 17px; height: 17px; }
.assistant-backdrop { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; background: rgb(24 33 40 / .24); }
.assistant-sheet { width: min(100%, 520px); max-height: min(88vh, 760px); overflow: auto; padding: 9px 18px calc(18px + env(safe-area-inset-bottom)); border: 1px solid rgb(255 255 255 / .72); border-bottom: 0; border-radius: 22px 22px 0 0; color: var(--ink); background: rgb(248 250 252 / .94); box-shadow: 0 -8px 28px rgb(24 33 40 / .16); backdrop-filter: blur(24px) saturate(140%); animation: assistant-rise .24s ease-out both; }
.assistant-handle { width: 38px; height: 4px; margin: 0 auto 12px; border-radius: 3px; background: rgb(24 33 40 / .18); }
.assistant-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.assistant-sheet-head h2 { margin: 4px 0 0; font-size: 24px; letter-spacing: 0; }
.assistant-privacy { margin: 8px 0 14px; color: var(--ink-soft); font-size: 12px; }
#assistant-form { display: grid; gap: 8px; }
#assistant-form label { display: flex; align-items: center; justify-content: space-between; color: var(--ink-soft); font-size: 12px; font-weight: 650; }
#assistant-form label span { color: #8b959d; font-weight: 500; }
#assistant-form textarea, #assistant-form input { width: 100%; padding: 11px 12px; border: 1px solid rgb(24 33 40 / .1); border-radius: 11px; color: var(--ink); background: rgb(255 255 255 / .78); font-size: 14px; line-height: 1.55; }
#assistant-form textarea { resize: vertical; min-height: 78px; }
.assistant-submit { width: 100%; justify-content: center; margin-top: 4px; }
.assistant-result { margin-top: 16px; }
.assistant-summary { margin: 0 0 9px; color: var(--ink-soft); font-size: 13px; }
.assistant-analysis { margin: 0 0 16px; padding: 14px 0; border-top: 1px solid rgb(24 33 40 / .08); border-bottom: 1px solid rgb(24 33 40 / .08); }
.assistant-analysis-title { display: flex; align-items: center; gap: 7px; }
.assistant-analysis-title > span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; color: var(--blue); background: var(--blue-soft); }
.assistant-analysis-title svg { width: 15px; }
.assistant-analysis-title strong { font-size: 14px; }
.assistant-analysis dl { display: grid; gap: 9px; margin: 12px 0 0; }
.assistant-analysis dl > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; }
.assistant-analysis dt { color: var(--ink-soft); font-size: 12px; }
.assistant-analysis dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.5; }
.assistant-plans { display: grid; gap: 9px; }
.assistant-plans h3 { margin: 0 0 2px; font-size: 14px; }
.assistant-plan { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid rgb(24 33 40 / .08); border-radius: 13px; background: rgb(255 255 255 / .74); }
.assistant-plan.is-selected { border-color: rgb(0 122 255 / .45); background: rgb(0 122 255 / .06); }
.assistant-plan strong { font-size: 13px; }
.assistant-plan-label { display: flex; align-items: center; gap: 7px; }
.assistant-plan-label span { padding: 2px 5px; border-radius: 5px; color: var(--blue); background: var(--blue-soft); font-size: 10px; font-weight: 650; }
.assistant-plan p { margin: 5px 0 0; color: var(--ink); font-size: 14px; line-height: 1.55; }
.assistant-plan small { display: block; margin-top: 6px; color: var(--ink-soft); font-size: 11px; line-height: 1.4; }
.assistant-plan-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; }
.assistant-plan-actions button { display: inline-flex; align-items: center; gap: 4px; min-height: 38px; padding: 5px 8px; border: 0; border-radius: 8px; color: var(--blue); background: rgb(0 122 255 / .08); font-size: 11px; }
.assistant-plan-actions button:last-child { width: 38px; justify-content: center; padding: 5px; color: var(--ink-soft); background: transparent; }
.assistant-plan-actions svg { width: 14px; height: 14px; }
.assistant-result-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.assistant-result-actions .secondary-action, .assistant-result-actions .text-action { min-height: 42px; margin-top: 0; }
.assistant-result-actions button:disabled { opacity: .62; }
.assistant-feedback { margin-top: 10px; padding: 12px; border-radius: 11px; background: rgb(24 33 40 / .045); }
.assistant-feedback strong { font-size: 13px; }
.assistant-feedback p { margin: 5px 0 9px; color: var(--ink-soft); font-size: 11px; line-height: 1.5; }
.assistant-feedback textarea { width: 100%; padding: 10px; resize: vertical; border: 1px solid rgb(24 33 40 / .1); border-radius: 9px; color: var(--ink); background: white; font-size: 13px; line-height: 1.5; }
.assistant-feedback > div { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.assistant-feedback .text-action, .assistant-feedback .secondary-action { min-height: 42px; margin-top: 8px; }
.success-note { display: flex; align-items: flex-start; gap: 6px; margin: 12px 0; padding: 9px 10px; border-radius: 9px; color: #176b4a; background: #e2f4eb; font-size: 12px; line-height: 1.45; }
.success-note svg { width: 15px; flex: none; }
.assistant-thread { display: grid; gap: 8px; margin-top: 13px; }
.assistant-turn { max-width: 88%; padding: 8px 10px; border-radius: 10px; background: rgb(24 33 40 / .05); }
.assistant-turn.is-user { justify-self: end; background: var(--blue-soft); }
.assistant-turn span { color: var(--ink-soft); font-size: 10px; }
.assistant-turn p { margin: 3px 0 0; font-size: 12px; line-height: 1.5; }
.assistant-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 15px; color: var(--ink-soft); font-size: 11px; }
.analysis-history-card { display: block; }
.analysis-history-list { display: grid; gap: 1px; margin-top: 13px; overflow: hidden; border-radius: 10px; background: rgb(24 33 40 / .06); }
.analysis-history-row { display: flex; align-items: center; gap: 8px; padding: 9px 7px 9px 11px; background: rgb(255 255 255 / .7); }
.analysis-history-row > button:first-child { min-width: 0; flex: 1; padding: 0; border: 0; color: var(--ink); background: transparent; text-align: left; }
.analysis-history-row strong { display: -webkit-box; overflow: hidden; font-size: 13px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.analysis-history-row span { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 10px; }
.permission-disclosure { margin-top: 15px; padding: 15px; border-radius: 12px; color: var(--ink); background: var(--blue-soft); }
.permission-disclosure > div:first-child { display: flex; align-items: flex-start; gap: 11px; }
.permission-disclosure strong { display: block; font-size: 15px; line-height: 1.45; }
.permission-disclosure p { margin: 7px 0 0; color: #3e596d; font-size: 13px; line-height: 1.6; }
.permission-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 13px; }
.permission-actions .text-action, .permission-actions .primary-action { min-height: 48px; margin-top: 0; }
.privacy-page { min-height: 100dvh; overflow: visible; }
.privacy-page .header { position: sticky; z-index: 2; top: 0; padding-block: 8px; background: rgb(242 244 247 / .9); backdrop-filter: blur(18px); }
.privacy-page .header > span { width: 48px; }
.privacy-page article { max-width: 70ch; margin: 28px auto 0; padding-bottom: 40px; }
.privacy-page h1 { margin: 0; font-size: 30px; line-height: 1.3; }
.privacy-page h2 { margin: 28px 0 8px; font-size: 18px; line-height: 1.4; }
.privacy-page p { margin: 8px 0 0; color: #3e4b55; font-size: 15px; line-height: 1.75; overflow-wrap: anywhere; }
.privacy-page .privacy-updated { color: var(--ink-soft); font-size: 13px; }
.assistant-only { background: transparent; }
.assistant-only .app { width: 100%; min-height: 100dvh; height: 100dvh; padding: 0; background: transparent; overflow: visible; }
.assistant-only .assistant-backdrop { position: fixed; }
.app button, .app .voice-actions .primary-action, .app .voice-actions .secondary-action { min-width: 48px; min-height: 48px; }
@keyframes assistant-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (min-width: 600px) { .app { min-height: 870px; margin-top: 18px; border-radius: 28px; box-shadow: 0 28px 72px rgb(25 37 48 / .22); } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; } }
