:root {
  --bg: #fffaf7;
  --surface: #ffffff;
  --surface-soft: #fff3f1;
  --ink: #3d2635;
  --muted: #927f87;
  --line: #f0dadd;
  --accent: #f45178;
  --accent-dark: #bd3159;
  --accent-soft: #ffe2e7;
  --blue: #58728b;
  --green: #708572;
  --shadow: 0 18px 50px rgba(107, 54, 72, .10);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: 0; color: inherit; }
button:disabled { cursor: not-allowed; opacity: .45; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(244,81,120,.34); outline-offset: 2px; }

.app-shell { min-height: 100vh; padding-bottom: 82px; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; min-height: 62px; padding: 10px 18px; background: rgba(255,250,247,.94); border-bottom: 1px solid rgba(240,218,221,.7); backdrop-filter: blur(16px); }
.brand { display: inline-flex; align-items: center; gap: 9px; padding: 0; color: var(--ink); background: transparent; font-weight: 800; letter-spacing: .02em; text-decoration: none; }
.brand:visited { color: var(--ink); }
.landing-brand, .landing-login { text-decoration: none; }
.landing-login { display: inline-flex; align-items: center; justify-content: center; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid var(--accent); border-radius: 50%; color: var(--accent); }
.ui-icon { display: block; flex: none; }
.brand-mark .ui-icon { width: 20px; height: 20px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.account-menu { position: relative; }
.ticket-menu { position: relative; }
.icon-button, .language-button, .account-button { min-height: 38px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; }
.icon-button { display: inline-grid; place-items: center; width: 38px; color: var(--accent-dark); font-weight: 800; }
.language-button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 72px; padding: 0 12px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0; }
.language-button span.active { color: var(--accent-dark); }
.ticket-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 48px; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--accent-dark); background: var(--surface); font-size: 13px; font-weight: 850; }
.ticket-button:hover, .ticket-button[aria-expanded="true"] { border-color: var(--accent); background: var(--accent-soft); }
.ticket-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 20; width: min(330px, calc(100vw - 36px)); padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 18px 42px rgba(61,38,53,.16); }
.ticket-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ticket-summary span { color: var(--muted); font-size: 12px; font-weight: 750; }
.ticket-summary strong { color: var(--accent-dark); font-size: 24px; }
.ticket-purchases { display: grid; gap: 6px; margin-top: 14px; }
.ticket-purchase { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 0; border-top: 1px solid var(--line); background: transparent; text-align: left; }
.ticket-purchase span { display: grid; gap: 2px; min-width: 0; }
.ticket-purchase strong { font-size: 13px; }
.ticket-purchase small { color: var(--muted); font-size: 11px; }
.ticket-purchase b { flex: none; color: var(--accent-dark); font-size: 12px; }
.account-button { max-width: min(280px, 46vw); overflow: hidden; padding: 0 13px; color: var(--accent-dark); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.account-button.authenticated { max-width: min(280px, 46vw); }
.account-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 20; width: min(300px, calc(100vw - 36px)); padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 18px 42px rgba(61,38,53,.16); }
.account-summary { display: flex; align-items: center; gap: 10px; min-width: 0; }
.account-avatar { display: grid; flex: none; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--accent-dark); background: var(--accent-soft); }
.account-email { min-width: 0; overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.account-divider { height: 1px; margin: 14px 0 10px; background: var(--line); }
.account-actions { display: grid; gap: 6px; }
.profile-action, .logout-button { display: flex; align-items: center; justify-content: flex-start; gap: 8px; width: 100%; min-height: 38px; padding: 0 10px; border-radius: 10px; font-size: 13px; font-weight: 750; }
.profile-action { background: transparent; }
.profile-action:hover, .logout-button:hover { background: var(--surface-soft); }
.upgrade-action { color: var(--accent-dark); }
.settings-action { color: var(--ink); }
.premium-badge { display: inline-flex; align-items: center; width: fit-content; min-height: 24px; padding: 0 8px; border-radius: 999px; color: #80611b; background: #fff1b8; font-size: 10px; font-weight: 850; letter-spacing: .04em; }
.account-panel > .logout-button { margin-top: 6px; color: var(--muted); }
.app-content { width: min(100%, 760px); margin: 0 auto; padding: 28px 18px 36px; }
.app-shell.has-bottom-nav .app-content { padding-bottom: calc(124px + env(safe-area-inset-bottom)); }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 16px; font-size: clamp(30px, 8vw, 54px); line-height: 1.1; letter-spacing: 0; }
h2 { margin-bottom: 12px; font-size: 22px; line-height: 1.25; letter-spacing: 0; }
h3 { margin-bottom: 8px; font-size: 16px; letter-spacing: 0; }
p { line-height: 1.7; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.section { margin-top: 28px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.section-heading h2 { margin-bottom: 0; }
.view-title { margin-bottom: 24px; }
.view-title p { max-width: 680px; color: var(--muted); }
.view-title.centered { max-width: 680px; margin-inline: auto; text-align: center; }
.view-title.centered p { margin-inline: auto; }
.person-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); justify-content: center; gap: 14px; max-width: 460px; margin: 36px auto 24px; }
.person-choice { position: relative; display: grid; place-items: center; gap: 10px; min-height: 150px; padding: 24px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.person-choice:hover, .person-choice:focus-within { border-color: var(--accent); background: var(--surface-soft); }
.person-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px rgba(244,81,120,.14), var(--shadow); }
.person-choice-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.person-choice .person-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); }
.person-choice strong { font-size: 16px; word-break: break-word; }
.person-choices + .hero-actions { justify-content: center; }
.self-selection-form { display: grid; gap: 22px; }
.self-selection-form .view-title { margin-bottom: 0; }
.self-selection-form > .hero-actions { justify-content: center; }
.self-selection-card .person-choices { margin-top: 24px; margin-bottom: 0; }
.relationship-fields { display: grid; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.relationship-fields h2 { margin-bottom: 0; font-size: 20px; }
.relationship-note { margin: -5px 0 0; color: var(--muted); font-size: 13px; }
.relationship-options { display: grid; gap: 8px; }
.relationship-option { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fffdfc; color: var(--ink); font-size: 14px; font-weight: 700; }
.relationship-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.relationship-option input { accent-color: var(--accent); }
.relationship-inputs { display: grid; gap: 12px; }
.relationship-inputs label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 750; }
.relationship-inputs input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fffdfc; color: var(--ink); }
.relationship-inputs small { color: var(--muted); font-size: 11px; font-weight: 500; }

.hero { padding: 12px 0 8px; }
.hero p { max-width: 680px; color: var(--muted); font-size: 15px; }
.pwa-recommendation { margin: 18px 0 0; color: var(--accent-dark); font-size: 13px; font-weight: 800; text-align: center; }
.pwa-recommendation a { text-decoration: underline; text-underline-offset: 3px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 19px; border-radius: 15px; background: var(--accent); color: #fff; font-weight: 800; box-shadow: 0 11px 24px rgba(244,81,120,.22); transition: transform .18s ease, background .18s ease; }
.button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.button.secondary { background: var(--surface); color: var(--accent-dark); border: 1px solid var(--line); box-shadow: none; }
.button.tertiary { min-height: 38px; padding: 0 12px; background: transparent; color: var(--accent-dark); box-shadow: none; }
.button.icon { padding: 0 15px; }
.home-resource-grid { display: grid; gap: 10px; margin-top: 28px; }
.resource-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 15px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); text-align: left; }
.resource-card:hover, .resource-card:focus-visible { border-color: var(--accent); background: var(--surface-soft); }
.resource-card-icon { display: grid; flex: none; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: var(--accent-dark); background: var(--accent-soft); }
.resource-card-copy { display: grid; min-width: 0; gap: 3px; }
.resource-card-copy strong { font-size: 14px; }
.resource-card-copy small { overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.resource-card-arrow { display: grid; flex: none; place-items: center; margin-left: auto; color: var(--accent-dark); }
.info-page { display: grid; gap: 22px; }
.info-page .view-title { margin-bottom: 0; }
.info-section { padding-top: 22px; border-top: 1px solid var(--line); }
.info-section h2 { margin-bottom: 14px; font-size: 20px; }
.info-section > p { margin-bottom: 0; color: var(--muted); font-size: 14px; }
.info-feature-list, .info-step-list { margin: 0; padding: 0; list-style: none; }
.info-feature-list { border-top: 1px solid var(--line); }
.info-feature { display: flex; align-items: flex-start; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.info-feature-icon { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: var(--accent-dark); background: var(--accent-soft); }
.info-feature > span:last-child { display: grid; gap: 3px; }
.info-feature strong { font-size: 14px; }
.info-feature small { color: var(--muted); font-size: 13px; line-height: 1.6; }
.info-step-list { display: grid; gap: 10px; counter-reset: steps; }
.info-step { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); font-size: 14px; font-weight: 750; }
.info-step b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; background: var(--accent); font-size: 12px; }
.info-actions { margin-top: 0; }
.legal-links { margin-top: 0; }
.legal-footer { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 28px auto 0; padding: 16px 12px max(18px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; text-align: center; }
.legal-footer-link { padding: 3px 0; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.legal-footer-link:hover, .legal-footer-link:focus-visible { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.legal-footer-separator { color: var(--muted); user-select: none; }
.legal-page .view-title { margin-bottom: 0; }
.legal-updated { margin: 0; }
.operator-facts { display: grid; gap: 0; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.operator-fact { display: grid; grid-template-columns: minmax(120px, .35fr) minmax(0, 1fr); gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.operator-fact dt { color: var(--muted); font-size: 13px; font-weight: 750; }
.operator-fact dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.contact-form-panel { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.contact-form { display: grid; gap: 16px; }
.form-group { display: grid; gap: 7px; }
.form-group label { color: var(--muted); font-size: 13px; font-weight: 750; }
.form-input, .form-select, .form-textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fffdfc; color: var(--ink); }
.form-input, .form-select { min-height: 46px; padding: 10px 12px; }
.form-textarea { min-height: 170px; padding: 12px; resize: vertical; }
.form-status-msg { margin: 0; padding: 11px 12px; border-radius: 10px; font-size: 13px; }
.form-status-msg:empty { display: none; }
.form-status-msg.success { color: #426249; background: #eef7ee; }
.form-status-msg.error { color: #8b4254; background: #fff0f0; }
.form-submit-btn { width: 100%; }
.contact-character-count { margin: -2px 2px 0; color: var(--muted); font-size: 12px; text-align: right; }
.hp-container { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-confirm-modal { width: min(calc(100% - 32px), 520px); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 0; overflow: hidden; color: var(--ink); background: transparent; }
.contact-confirm-modal::backdrop { background: rgba(53,34,42,.52); }
.contact-confirm-panel { max-height: calc(100dvh - 32px); overflow: hidden; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); box-shadow: 0 20px 50px rgba(61,38,53,.22); }
.contact-confirm-panel h2 { margin-bottom: 18px; font-size: 20px; }
.contact-confirm-list { display: grid; gap: 0; max-height: min(52dvh, 430px); margin: 0 0 20px; padding: 0; overflow-y: auto; border-top: 1px solid var(--line); }
.contact-confirm-list > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-confirm-list dt { margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 750; }
.contact-confirm-list dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 14px; line-height: 1.65; }
.contact-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.contact-confirm-actions .button { width: 100%; }
.subscription-list { display: grid; gap: 12px; }
.subscription-card { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.subscription-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.subscription-card h3 { margin-bottom: 4px; font-size: 18px; }
.subscription-card-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.subscription-card-heading > strong { flex: none; color: var(--accent-dark); font-family: Georgia, "Times New Roman", serif; font-size: 25px; }
.subscription-carry { margin: 15px 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink); font-size: 13px; }
.subscription-card .button { width: 100%; }
.dropzone { display: grid; place-items: center; min-height: 190px; padding: 28px; border: 1.5px dashed #e9aab8; border-radius: var(--radius); background: var(--surface-soft); text-align: center; }
.dropzone.dragging { border-color: var(--accent); background: var(--accent-soft); }
.dropzone strong { display: block; margin-bottom: 6px; font-size: 18px; }
.dropzone input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dropzone-label { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 15px; border-radius: 13px; background: var(--accent); color: #fff; font-weight: 800; }
.platform-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 4px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.platform-switch button { min-height: 43px; border-radius: 11px; background: transparent; color: var(--muted); font-weight: 800; }
.platform-switch button.active { background: var(--accent-soft); color: var(--accent-dark); }
.privacy-note, .notice { padding: 15px 16px; border-left: 3px solid var(--green); background: #f4f8f3; color: #526456; border-radius: 0 13px 13px 0; font-size: 13px; }
.notice.warning { border-left-color: var(--accent); background: #fff2f0; color: #895267; }
.link-button { padding: 0; background: transparent; color: var(--accent-dark); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

.empty-panel, .list-section, .score-panel, .metric-section, .timeline-section, .ai-section, .settings-section { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.empty-panel { margin-top: 34px; text-align: center; }
.empty-panel h2 { font-size: 19px; }
.empty-panel p { color: var(--muted); font-size: 14px; }
.local-list { display: grid; gap: 9px; }
.local-item, .conversation-item, .package-item, .setting-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; padding: 14px 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.local-item:last-child, .conversation-item:last-child, .package-item:last-child, .setting-row:last-child { border-bottom: 0; }
.local-item strong, .conversation-item strong { display: block; margin-bottom: 4px; }
.local-item span, .conversation-item span { color: var(--muted); font-size: 12px; }
.chevron { color: var(--accent); font-size: 20px; }

.analysis-header { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.analysis-header h1 { margin-bottom: 6px; font-size: 28px; }
.analysis-header p { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.analysis-actions { display: flex; gap: 8px; }
.analysis-route-page, .analysis-loading-page { animation: none; }
.analysis-loading { display: grid; min-height: 340px; place-items: center; align-content: center; gap: 13px; padding: 32px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.analysis-loading h1 { margin: 0; font-size: 30px; }
.analysis-loading p { max-width: 34em; margin: 0; color: var(--muted); font-size: 14px; }
.analysis-spinner { width: 34px; height: 34px; border: 3px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: analysis-spin .8s linear infinite; }
@keyframes analysis-spin { to { transform: rotate(360deg); } }
.analysis-route-context { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; color: var(--muted); font-size: 13px; }
.analysis-route-context > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.consultation-route-actions { display: flex; align-items: center; gap: 6px; flex: none; min-width: 0; }
.route-back-button { display: inline-flex; min-height: 42px; align-items: center; gap: 3px; flex: 0 0 auto; padding: 0 10px 0 4px; border-radius: 12px; background: var(--surface-soft); color: var(--accent-dark); font-size: 13px; font-weight: 800; }
.route-back-button .ui-icon { transform: rotate(180deg); }
.consultation-new-button { display: inline-flex; min-height: 36px; align-items: center; gap: 4px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--accent-dark); background: var(--surface); font-size: 12px; font-weight: 800; white-space: nowrap; }
.consultation-new-button:hover, .consultation-new-button:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.book-page-card { position: relative; overflow: hidden; padding: 25px 24px 24px 32px; border: 1px solid #e6d7c4; border-radius: 5px 18px 18px 5px; background: repeating-linear-gradient(to bottom, #fffdf5 0, #fffdf5 31px, #f1e6d6 32px); box-shadow: 10px 18px 30px rgba(105,74,46,.13), inset 12px 0 0 #f3e4d2; }
.book-page-card::before { position: absolute; top: 0; bottom: 0; left: 18px; width: 1px; background: rgba(216,126,132,.34); content: ''; }
.book-page-top, .book-page-details, .book-page-settings, .book-page-platform, .book-page-bottom-actions { position: relative; z-index: 1; }
.book-page-top { display: flex; align-items: start; justify-content: space-between; gap: 12px; color: var(--accent-dark); font-size: 16px; font-weight: 850; letter-spacing: .02em; }
.book-page-title-block { display: grid; min-width: 0; gap: 5px; }
.book-page-heading { display: inline-flex; align-items: center; gap: 5px; width: fit-content; max-width: 100%; padding: 0; overflow-wrap: anywhere; color: var(--accent-dark); background: transparent; font: inherit; text-align: left; }
.book-page-heading:hover { color: var(--accent); }
.book-page-platform { color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: 0; }
.book-page-add { flex: none; }
.book-page-rule { width: 100%; height: 1px; margin: 13px 0 23px; background: #e5d4bf; }
.book-page-card h2 { max-width: 88%; margin-bottom: 11px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(25px, 7vw, 38px); line-height: 1.2; }
.book-page-score { display: flex; align-items: baseline; gap: 5px; color: var(--accent-dark); font-family: Georgia, "Times New Roman", serif; }
.book-page-score strong { font-size: clamp(58px, 16vw, 96px); line-height: .95; }
.book-page-score span { color: var(--muted); font-size: 15px; font-weight: 800; }
.book-page-progress { height: 8px; margin: 19px 0 14px; overflow: hidden; border-radius: 99px; background: #f0e0d3; }
.book-page-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e6a06e, var(--accent)); }
.book-page-note { max-width: 620px; margin-bottom: 18px; color: var(--muted); font-size: 12px; }
.book-page-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 19px; }
.book-page-details div { min-width: 0; }
.book-page-details dt { color: #a18a76; font-size: 10px; font-weight: 800; }
.book-page-details dd { margin: 4px 0 0; overflow-wrap: anywhere; color: var(--ink); font-size: 13px; font-weight: 800; }
.book-page-settings { font-size: 12px; }
.book-page-bottom-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.conversation-danger-zone { display: flex; justify-content: center; margin: 24px 0 8px; }
.danger-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 16px; border: 1px solid #e6a9b6; border-radius: 12px; color: #9a3f5a; background: #fff7f8; font-size: 13px; font-weight: 800; }
.danger-button:hover { border-color: #d77b93; background: #fff0f2; }
.danger-confirm { border-color: #d77b93; background: #fff0f2; }
.ai-context { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-soft); color: var(--accent-dark); font-size: 12px; font-weight: 750; }
.score-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pill { display: inline-flex; align-items: center; min-height: 29px; padding: 0 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 12px; font-weight: 800; }
.pill.neutral { background: #edf2ee; color: #5b6c60; }
.analysis-tabs { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 4px; margin: 24px 0 6px; padding: 4px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.analysis-tabs button { min-height: 42px; border-radius: 11px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; }
.analysis-tabs button.active { background: var(--accent); color: #fff; }
.score-list { display: grid; gap: 12px; }
.score-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.score-row label { font-size: 13px; }
.score-row output { color: var(--accent-dark); font-weight: 800; }
.score-bar { grid-column: 1 / -1; height: 7px; overflow: hidden; border-radius: 999px; background: #fae7e9; }
.score-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.trend-canvas { display: block; width: 100%; height: 210px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 12px; }
.legend-dot { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: var(--accent); }
.legend-dot.blue { background: var(--blue); }
.legend-dot.green { background: var(--green); }
.turning-list { display: grid; gap: 12px; }
.turning-item { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.turning-item:last-child { border-bottom: 0; }
.turning-item time { color: var(--accent-dark); font-size: 12px; font-weight: 800; }

.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.stat { padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fffdfc; }
.stat strong { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.stat b { font-size: 22px; }
.ratio-row { display: flex; overflow: hidden; height: 11px; margin: 9px 0 5px; border-radius: 99px; background: #edf0f2; }
.ratio-row i:first-child { background: var(--accent); }
.ratio-row i:last-child { background: var(--blue); }
.two-column { display: grid; gap: 14px; }
.word-list { display: flex; flex-wrap: wrap; gap: 7px; }
.word { padding: 6px 9px; border-radius: 10px; background: var(--surface-soft); color: var(--accent-dark); font-size: 12px; }

.ai-section textarea, .sheet textarea { width: 100%; min-height: 125px; resize: vertical; padding: 14px; border: 1.5px solid #efb6c2; border-radius: 16px; background: #fffdfc; color: var(--ink); line-height: 1.6; }
.ai-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.ai-disclaimer { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.reply-list { display: grid; gap: 12px; margin-top: 18px; }
.reply-item { padding: 15px; border-radius: 16px; background: var(--surface-soft); }
.suggestion-item { display: grid; gap: 8px; }
.suggestion-card { width: 100%; border: 0; color: inherit; text-align: left; cursor: pointer; }
.suggestion-card.selected { outline: 2px solid var(--accent); outline-offset: 2px; }
.suggestion-option-heading { display: inline-flex; min-width: 0; align-items: center; gap: 10px; }
.suggestion-option-heading > span:last-child { display: grid; min-width: 0; gap: 2px; }
.suggestion-number { display: inline-flex; flex: 0 0 auto; width: 31px; height: 31px; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent); color: #fff; font-size: 14px; font-weight: 850; }
.suggestion-scenario { color: var(--muted); font-size: 11px; font-weight: 700; }
.suggestion-label { display: block; margin-bottom: 6px; color: var(--accent-dark); font-size: 11px; font-weight: 800; }
.suggestion-message { margin-bottom: 7px; }
.suggestion-hint { display: block; }
.ai-input-summary { margin-top: 18px; padding: 13px 14px; border: 1px solid #efb6c2; border-radius: 14px; background: #fff8f8; }
.ai-input-summary span { display: block; margin-bottom: 5px; color: var(--accent-dark); font-size: 11px; font-weight: 800; }
.ai-input-summary p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.expected-reply { margin-top: 16px; padding: 16px; border: 1px solid #eab4c1; border-radius: 16px; background: #fff8f8; }
.suggestion-expected { margin-top: 0; }
.expected-reply h3 { color: var(--accent-dark); }
.expected-reply p { margin-bottom: 7px; white-space: pre-wrap; }
.expected-reply small { color: var(--muted); line-height: 1.5; }
.reply-item header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.reply-item header strong { font-size: 14px; }
.reply-item p { margin-bottom: 7px; white-space: pre-wrap; }
.reply-item small { color: var(--muted); line-height: 1.5; }
.loading { color: var(--accent-dark); font-weight: 800; }
.recent-context { margin: 18px 0 24px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fffdfc; }
.recent-context .section-heading { align-items: center; }
.recent-context .section-heading h3 { margin-bottom: 0; }
.recent-turns { display: grid; gap: 8px; }
.context-scroll { max-height: min(52vh, 560px); overflow-y: auto; overscroll-behavior: contain; padding: 4px 6px 4px 2px; }
.recent-turn { width: fit-content; max-width: 92%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 4px 13px 13px 13px; background: var(--surface); }
.recent-turn.user { margin-left: auto; border-color: #f6adc0; border-radius: 13px 4px 13px 13px; background: var(--accent-soft); }
.context-turn-time { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; line-height: 1.2; white-space: nowrap; }
.recent-turn p { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 13px; }
.history-subsection { margin-top: 24px; }
.history-subsection + .history-subsection { padding-top: 24px; border-top: 1px solid var(--line); }
.history-list { display: grid; gap: 9px; }
.history-list-item { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto 17px; align-items: center; gap: 10px; width: 100%; padding: 14px 12px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: #fffdfc; text-align: left; }
.history-list-item:hover, .history-list-item:focus-visible { border-color: var(--accent); background: #fff8f8; }
.history-list-item time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.history-list-summary { display: grid; min-width: 0; gap: 3px; }
.history-list-summary strong { color: var(--accent-dark); font-size: 12px; }
.history-list-summary span { overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.history-list-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.history-list-item > svg { color: var(--accent-dark); }
.history-detail { display: grid; gap: 14px; }
.history-detail-heading { display: flex; align-items: center; gap: 12px; }
.history-detail-heading > div { min-width: 0; }
.history-detail-heading h2 { margin: 0 0 3px; }
.history-detail-heading .button { min-height: 38px; padding-inline: 10px; }
.current-history-list { display: grid; gap: 12px; }
.current-history-item { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fffdfc; }
.current-history-item > header, .current-history-proposal > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.current-history-item > header { margin-bottom: 12px; }
.current-history-item > header div { display: grid; gap: 3px; }
.current-history-draft { padding: 12px; border: 1px solid #efb6c2; border-radius: 13px; background: #fff8f8; }
.current-history-draft > span, .current-history-context > span, .current-history-expected > span { display: block; margin-bottom: 6px; color: var(--accent-dark); font-size: 11px; font-weight: 800; }
.current-history-draft p, .current-history-expected p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.current-history-context { margin-top: 13px; }
.current-history-messages { display: grid; gap: 7px; }
.current-history-message { width: fit-content; max-width: 92%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px 12px 12px 12px; background: var(--surface); }
.current-history-message.user { margin-left: auto; border-color: #f6adc0; border-radius: 12px 4px 12px 12px; background: var(--accent-soft); }
.current-history-message p { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 13px; }
.current-history-proposals { display: grid; gap: 9px; margin-top: 13px; }
.current-history-proposal { padding: 12px; border: 1px solid #efb6c2; border-radius: 14px; background: var(--surface-soft); }
.current-history-proposal > header { margin-bottom: 9px; }
.current-history-proposal > p { margin: 0 0 8px; white-space: pre-wrap; word-break: break-word; }
.current-history-expected { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }

.timeline { display: grid; gap: 18px; }
.timeline-date { margin: 4px auto 0; padding: 6px 10px; border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: 11px; }
.message-row { display: flex; align-items: flex-end; gap: 8px; min-width: 0; }
.message-row.user { justify-content: flex-end; }
.message-bubble { min-width: 0; max-width: 82%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; background: #fff; }
.message-row.user .message-bubble { border-color: #f6adc0; border-radius: 16px 4px 16px 16px; background: var(--accent-soft); }
.message-bubble button { padding: 0; background: transparent; text-align: left; }
.message-bubble button { width: 100%; }
.message-bubble p { margin: 0; white-space: pre-wrap; word-break: break-word; line-height: 1.55; }
.message-time { flex: 0 0 auto; margin-bottom: 3px; color: var(--muted); font-size: 11px; line-height: 1; white-space: nowrap; }
.message-event { color: var(--muted); font-style: italic; }
.whatif-editor-inline { margin: 10px 0 6px; padding: 14px; border: 1.5px solid #efb6c2; border-radius: 16px; background: #fff8f8; }
.whatif-editor-inline .section-heading { align-items: center; }
.whatif-editor-inline .section-heading h3 { margin-bottom: 0; }
.whatif-editor-inline textarea { width: 100%; min-height: 110px; resize: vertical; padding: 13px; border: 1.5px solid #efb6c2; border-radius: 14px; background: #fffdfc; color: var(--ink); line-height: 1.6; }
.whatif-workspace { display: grid; gap: 15px; margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: #fffafb; }
.whatif-workspace-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.whatif-workspace-heading h3 { margin: 0 0 4px; }
.whatif-workspace-heading .button { flex: none; min-height: 38px; padding-inline: 10px; font-size: 12px; }
.whatif-context { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fffdfc; }
.whatif-context .section-heading { align-items: center; margin-bottom: 0; }
.whatif-context .section-heading h3 { margin: 0; color: var(--muted); font-size: 12px; }
.whatif-context-messages { display: grid; gap: 7px; }
.whatif-context-message { display: flex; width: 100%; }
.whatif-context-message.user { justify-content: flex-end; }
.whatif-context-message .context-turn-content { display: grid; max-width: 88%; gap: 3px; }
.whatif-context-message p { margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px 13px 13px 13px; background: #fff; white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.5; }
.whatif-context-message.user p { border-color: #f6adc0; border-radius: 13px 4px 13px 13px; background: var(--accent-soft); }
.whatif-draft-card { display: grid; gap: 8px; }
.whatif-draft-card label { color: var(--accent-dark); font-size: 13px; font-weight: 800; }
.whatif-draft-card textarea { width: 100%; min-height: 112px; resize: vertical; padding: 12px 13px; border: 1.5px solid #efb6c2; border-radius: 14px; background: #fffdfc; color: var(--ink); line-height: 1.6; }
.whatif-draft-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.whatif-draft-actions .button { flex: none; }
.whatif-bottom-cta { display: flex; justify-content: center; margin-top: 18px; }
.whatif-bottom-cta .button { width: min(100%, 360px); }
.whatif-chat { display: grid; gap: 14px; margin-top: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: #fffafb; }
.whatif-chat .whatif-context { padding: 0; border: 0; background: transparent; }
.whatif-world-divider { display: grid; gap: 5px; align-items: center; color: var(--accent-dark); font-size: 12px; font-weight: 850; text-align: center; }
.whatif-world-divider::before, .whatif-world-divider::after { width: 100%; height: 1px; background: #e6a7b5; content: ''; }
.whatif-world-divider small { color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.5; }
.whatif-chat-messages { display: grid; gap: 9px; min-height: 80px; max-height: 48vh; overflow-y: auto; padding: 4px 2px; }
.whatif-chat-message { display: flex; width: 100%; }
.whatif-chat-message.user { justify-content: flex-end; }
.whatif-chat-bubble { max-width: min(88%, 430px); padding: 10px 13px; border: 1px solid var(--line); border-radius: 5px 16px 16px 16px; background: #fff; }
.whatif-chat-message.user .whatif-chat-bubble { border-color: #f6adc0; border-radius: 16px 5px 16px 16px; background: var(--accent-soft); }
.whatif-chat-bubble p { margin: 0; white-space: pre-wrap; word-break: break-word; line-height: 1.55; }
.whatif-chat-status { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.whatif-chat-status strong { color: var(--accent-dark); text-align: right; }
.whatif-reply-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.whatif-reply-mode button { min-height: 36px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: #fff; font-size: 11px; font-weight: 750; }
.whatif-reply-mode button.active { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }
.whatif-chat-composer { display: flex; align-items: end; gap: 8px; }
.whatif-chat-composer textarea { flex: 1; min-height: 48px; max-height: 150px; resize: vertical; padding: 12px 13px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: #fff; line-height: 1.5; }
.whatif-send-button { display: grid; flex: none; width: 48px; height: 48px; place-items: center; border-radius: 50%; color: #fff; background: var(--accent); box-shadow: 0 8px 18px rgba(244,81,120,.2); }
.whatif-send-button:hover, .whatif-send-button:focus-visible { background: var(--accent-dark); }
.whatif-send-spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: analysis-spin .7s linear infinite; }
.whatif-chat-error { margin: 0; padding: 9px 11px; border: 1px solid #efb6c2; border-radius: 10px; color: #8c4660; background: #fff0f2; font-size: 12px; }
.whatif-chat-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.whatif-chat-actions .if-share-actions { margin-top: 0; }
.consultation-section { display: flex; flex-direction: column; gap: 0; min-height: calc(100dvh - 190px); }
.consultation-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 2px; }
.consultant-profile { display: flex; align-items: center; gap: 10px; min-width: 0; }
.consultant-profile h2 { margin: 0; }
.consultant-profile small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.consultant-avatar { display: inline-grid; flex: none; width: 42px; height: 42px; place-items: center; border: 1px solid #efb6c2; border-radius: 50%; color: var(--accent); background: var(--accent-soft); }
.consultation-message .consultant-avatar { width: 30px; height: 30px; align-self: end; }
.consultation-ticket-status { color: var(--muted); font-size: 11px; line-height: 1.4; text-align: right; }
.consultation-messages { display: flex; flex: 1 1 0; flex-direction: column; min-height: min(52vh, 430px); max-height: none; overflow-y: auto; padding: 22px 3px 30px; overscroll-behavior: contain; overflow-anchor: none; scrollbar-gutter: stable; scroll-behavior: auto; }
.consultation-message-list { display: grid; gap: 13px; min-height: 100%; align-content: start; }
.consultation-message { display: flex; align-items: flex-end; gap: 8px; width: 100%; }
.consultation-message.user { justify-content: flex-end; }
.consultation-bubble { max-width: min(88%, 470px); padding: 11px 14px; border: 1px solid var(--line); border-radius: 6px 18px 18px 18px; background: var(--surface); box-shadow: 0 6px 18px rgba(107,54,72,.04); font-size: 14px; }
.consultation-message.user .consultation-bubble { border-color: #f6adc0; border-radius: 18px 6px 18px 18px; background: var(--accent-soft); }
.consultation-bubble p { margin: 0; white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; line-height: 1.6; }
.consultation-typing { margin: -3px 0 2px; }
.consultation-typing .consultation-bubble { min-width: 55px; padding: 14px 15px; }
.consultation-typing-dots { display: inline-flex; gap: 4px; align-items: center; }
.consultation-typing-dots i { display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: consultation-typing 1.05s ease-in-out infinite; }
.consultation-typing-dots i:nth-child(2) { animation-delay: .14s; }
.consultation-typing-dots i:nth-child(3) { animation-delay: .28s; }
@keyframes consultation-typing { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.consultation-composer { position: sticky; bottom: calc(67px + env(safe-area-inset-bottom)); z-index: 2; display: flex; align-items: end; gap: 8px; margin-top: auto; padding: 10px 0 calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,250,247,.95); backdrop-filter: blur(12px); }
.consultation-composer textarea { flex: 1; min-height: 48px !important; max-height: 140px; resize: vertical; padding: 12px 15px !important; border: 1px solid #efb6c2 !important; border-radius: 24px !important; background: var(--accent-soft) !important; }
.consultation-send-button { display: grid; flex: none; width: 48px; height: 48px; place-items: center; border-radius: 50%; color: #fff; background: var(--accent); box-shadow: 0 8px 18px rgba(244,81,120,.2); }
.consultation-send-button:hover, .consultation-send-button:focus-visible { background: var(--accent-dark); }
.consultation-send-spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: analysis-spin .7s linear infinite; }
.consultation-error { margin: 0 0 10px; padding: 9px 11px; border: 1px solid #efb6c2; border-radius: 10px; color: #8c4660; background: #fff0f2; font-size: 12px; }
.consultation-history-messages { min-height: 0; max-height: 460px; padding: 3px 0; }
.consultation-history-count { margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.consultation-history-item { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fffdfc; }
.consultation-history-item > header { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.consultation-history-item > header div { display: grid; gap: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.if-history-chat-list { display: grid; gap: 7px; }
.if-history-chat-row { display: flex; }
.if-history-chat-row.user { justify-content: flex-end; }
.if-history-chat-row p { max-width: 86%; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px 12px 12px 12px; background: #fff; white-space: pre-wrap; word-break: break-word; font-size: 13px; }
.if-history-chat-row.user p { border-color: #f6adc0; border-radius: 12px 5px 12px 12px; background: var(--accent-soft); }
.if-history-list { display: grid; gap: 12px; }
.if-history-item { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fffdfc; }
.if-history-item header { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.if-history-item header div { display: grid; gap: 3px; }
.if-history-item header strong { font-size: 13px; }
.if-history-context { margin: -4px 0 12px; color: var(--accent-dark); font-size: 11px; font-weight: 800; }
.if-history-draft span, .if-history-reply span { color: var(--muted); font-size: 11px; font-weight: 800; }
.if-history-draft p, .if-history-reply p { margin: 5px 0 0; white-space: pre-wrap; word-break: break-word; }
.if-history-replies { display: grid; gap: 10px; margin-top: 14px; }
.if-history-reply { padding-top: 10px; border-top: 1px solid var(--line); }
.if-message-preview { display: grid; gap: 8px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: #fff8f8; }
.if-preview-heading { margin: 0 0 2px; color: var(--muted); font-size: 11px; font-weight: 800; }
.if-preview-row { width: fit-content; max-width: 88%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px 13px 13px 13px; background: #fff; }
.if-preview-row.user { margin-left: auto; border-color: #f6adc0; border-radius: 13px 4px 13px 13px; background: var(--accent-soft); }
.if-preview-row span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 10px; font-weight: 800; }
.if-preview-row p { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 13px; }
.if-preview-divider { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; color: var(--accent-dark); font-size: 11px; font-weight: 850; text-align: center; }
.if-preview-divider::before, .if-preview-divider::after { flex: 1; height: 1px; background: #e6a7b5; content: ''; }
.if-share-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.if-share-actions .button { min-height: 42px; padding-inline: 13px; font-size: 12px; }

.package-list { display: grid; gap: 0; }
.package-item { align-items: center; }
.package-item strong { display: block; margin-bottom: 4px; }
.package-item span { color: var(--muted); font-size: 12px; }
.price { text-align: right; white-space: nowrap; }
.price b { display: block; color: var(--accent-dark); font-size: 18px; }
.price small { color: var(--muted); }
.setting-row { padding: 15px 0; }
.setting-row button { min-height: 36px; padding: 0 11px; border-radius: 10px; background: var(--surface-soft); color: var(--accent-dark); font-weight: 800; }
.subscription-management p { margin-bottom: 0; }

.bottom-nav { position: fixed; z-index: 12; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 8px max(8px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right)); border-top: 1px solid var(--line); background: rgba(255,250,247,.96); backdrop-filter: blur(16px); }
.bottom-nav button { min-height: 51px; border-radius: 13px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; }
.bottom-nav button span { display: block; width: 20px; margin: 0 auto 2px; line-height: 1; }
.person-icon { display: grid; place-items: center; color: var(--accent); }
.bottom-nav button.active { background: var(--accent-soft); color: var(--accent-dark); }

.modal-backdrop { position: fixed; z-index: 30; inset: 0; display: grid; align-items: end; background: rgba(53,34,42,.52); }
.sheet { width: min(100%, 680px); max-height: 90vh; overflow: auto; margin: 0 auto; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: var(--bg); box-shadow: 0 -20px 70px rgba(50,25,34,.24); }
.sheet.center { align-self: center; justify-self: center; border-radius: 24px; margin: 18px; }
.login-sheet { width: min(100%, 380px); max-height: calc(100vh - 32px); padding: 32px; border-radius: 16px; background: #fff; color: var(--ink); text-align: center; }
.login-sheet header { margin-bottom: 24px; }
.login-sheet header h2 { color: var(--ink); font-size: 24px; }
.login-subtitle { margin-bottom: 24px; color: var(--ink); font-size: 12px; font-weight: 700; line-height: 1.7; }
.login-subtitle span { color: var(--muted); font-size: 10px; font-weight: 400; }
.auth-methods { display: grid; gap: 14px; }
.auth-provider, .login-submit { position: relative; display: flex; width: 100%; min-height: 48px; align-items: center; justify-content: center; gap: 12px; border-radius: 999px; padding: 12px 24px; font-weight: 750; }
.google-provider { border: 1px solid #cfd7e3; color: #3b4658; background: #fff; }
.line-provider { color: #fff; background: #06c755; }
.recommend-label { position: absolute; top: -3px; left: 8px; border-radius: 5px; padding: 2px 8px; color: #111827; background: #fde047; font-size: 9px; font-weight: 850; line-height: 1; }
.provider-icon { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; border-radius: 999px; font-size: 14px; font-weight: 850; }
.google-icon { border: 1px solid #dce3ee; color: #4285f4; }
.line-icon { color: #06c755; background: #fff; }
.auth-form { display: grid; gap: 10px; margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; text-align: left; }
.auth-form label { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.auth-form input { width: 100%; min-height: 48px; border: 1px solid #cfd7e3; border-radius: 999px; padding: 12px 20px; color: var(--ink); background: #fff; outline: none; }
.auth-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(244,81,120,.15); }
.login-submit { border: 0; color: #fff; background: var(--ink); }
.terms-text { margin: 10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.terms-text a { color: inherit; text-decoration: underline; }
.sheet header { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sheet header h2 { margin-bottom: 0; }
.close-button { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-soft); color: var(--accent-dark); font-size: 20px; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 15px; }
.conversation-picker-sheet, .delete-conversation-sheet { width: min(100% - 36px, 520px); }
.update-conversation-sheet { width: min(100% - 36px, 520px); }
.update-conversation-sheet.is-processing { pointer-events: none; }
.update-dropzone { margin-top: 4px; }
.update-file-name { margin: 10px 0 0; color: var(--accent-dark); font-size: 12px; font-weight: 750; }
.update-guide-links { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 14px; }
.update-guide-links a { font-size: 12px; }
.update-import-actions { margin-top: 16px; }
.update-import-actions .button { width: 100%; }
.update-processing { display: grid; justify-items: center; gap: 12px; padding: 28px 8px 14px; text-align: center; }
.update-processing h3, .update-processing p, .update-result-message { margin-bottom: 0; }
.update-processing h3 { font-size: 18px; }
.update-processing p, .update-result-message { color: var(--muted); font-size: 13px; }
.update-complete-actions { grid-template-columns: 1fr; }
.conversation-picker-list { display: grid; gap: 8px; margin-top: 14px; }
.conversation-picker-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 13px 12px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--surface); text-align: left; }
.conversation-picker-item:hover, .conversation-picker-item.active { border-color: var(--accent); background: var(--accent-soft); }
.conversation-picker-copy { display: grid; min-width: 0; gap: 4px; }
.conversation-picker-copy strong { overflow-wrap: anywhere; }
.conversation-picker-copy small, .conversation-picker-current { color: var(--muted); font-size: 12px; }
.conversation-picker-current { flex: none; color: var(--accent-dark); font-weight: 800; }
.conversation-picker-add { width: 100%; margin-top: 14px; }
.modal-list { display: grid; gap: 10px; }
.sample-group + .sample-group { margin-top: 22px; }
.sample-group h3 { margin-bottom: 8px; color: var(--accent-dark); font-size: 14px; }
.modal-list button { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: left; }
.modal-list button strong { display: block; margin-bottom: 4px; }
.modal-list button small { display: block; margin-top: 3px; color: var(--muted); }
.toast { position: fixed; z-index: 40; right: 16px; bottom: 96px; left: 16px; display: none; max-width: 620px; margin: auto; padding: 13px 15px; border: 1px solid #e6a9b6; border-radius: 14px; background: #fff0f2; color: #7e3d54; box-shadow: var(--shadow); font-size: 13px; }
.toast.show { display: block; }
.hidden { display: none !important; }

/* Keep the Cloudflare-Test auth surface while the rest of the app uses If-Reply UI. */
.login-modal { position: fixed; inset: 0; z-index: 30; display: grid; align-items: center; justify-content: center; padding: 16px; background: rgba(53,34,42,.52); backdrop-filter: blur(4px); }
.login-modal-card { position: relative; width: min(100%, 380px); max-height: calc(100vh - 32px); overflow: auto; padding: 32px; border-radius: 16px; color: var(--ink); background: #fff; box-shadow: 0 20px 50px rgba(61,38,53,.22); text-align: center; }
.login-modal-card h2 { margin-bottom: 24px; color: var(--ink); font-size: 24px; }
.close-login-button { position: absolute; top: 16px; right: 16px; display: grid; width: 36px; height: 36px; place-items: center; border: 0; border-radius: 50%; color: var(--accent-dark); background: var(--surface-soft); cursor: pointer; }
.login-methods { display: grid; gap: 14px; }
.oauth-button, .email-submit-button { position: relative; display: flex; width: 100%; min-height: 48px; align-items: center; justify-content: center; gap: 12px; border-radius: 999px; padding: 12px 24px; cursor: pointer; font: inherit; font-weight: 750; }
.google-button { border: 1px solid #cfd7e3; color: #3b4658; background: #fff; }
.line-button { border: 0; color: #fff; background: #06c755; }
.otp-form { display: grid; gap: 10px; margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; text-align: left; }
.otp-form input { width: 100%; min-height: 48px; border: 1px solid #cfd7e3; border-radius: 999px; padding: 12px 20px; color: var(--ink); background: #fff; outline: none; }
.otp-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(244,81,120,.15); }
.email-submit-button { border: 0; color: #fff; background: var(--ink); }

.report-launch-row { display: flex; justify-content: center; margin-top: 16px; }
.report-launch { min-height: 44px; }
.report-viewer { position: fixed; z-index: 35; inset: 0; display: flex; flex-direction: column; min-height: 100dvh; overflow: hidden; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); color: #fff; background: linear-gradient(160deg, #f95a82 0%, #e73568 56%, #b92858 100%); animation: report-enter .34s ease-out both; }
.report-viewer.closing { animation: report-exit .32s ease-in both; }
.report-topbar { position: absolute; z-index: 2; top: env(safe-area-inset-top); right: 0; left: 0; display: flex; align-items: start; gap: 12px; padding: 14px 18px 0; }
.report-progress { display: flex; flex: 1; gap: 5px; padding-top: 10px; }
.report-progress span { display: block; flex: 1; height: 3px; border-radius: 99px; background: rgba(255,255,255,.34); transition: background .25s ease; }
.report-progress span.active { background: #fff; }
.report-controls { display: flex; gap: 6px; }
.report-control-button { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; color: #fff; background: rgba(111,20,55,.16); }
.report-control-button:hover, .report-control-button:focus-visible { background: rgba(255,255,255,.18); }
.report-track { display: flex; width: 100%; height: 100%; transition: transform .36s ease-out; will-change: transform; }
.report-page { position: relative; flex: 0 0 100%; min-width: 100%; height: 100%; overflow-y: auto; padding: 104px 20px 82px; overscroll-behavior: contain; scrollbar-width: none; }
.report-page::-webkit-scrollbar { display: none; }
.report-page-content { width: min(100%, 560px); min-height: 100%; margin: 0 auto; }
.report-cover-content { display: flex; flex-direction: column; align-items: center; justify-content: center; padding-bottom: 22px; text-align: center; }
.report-cover-mark { display: grid; place-items: center; width: 82px; height: 82px; margin-bottom: 26px; border: 1px solid rgba(255,255,255,.66); border-radius: 50%; background: rgba(255,255,255,.13); animation: report-reveal .52s .04s ease-out both; }
.report-kicker { margin-bottom: 13px; color: rgba(255,255,255,.78); font-size: 14px; font-weight: 750; animation: report-reveal .52s .16s ease-out both; }
.report-cover h2 { margin-bottom: 8px; font-size: clamp(26px, 7vw, 42px); line-height: 1.25; animation: report-reveal .52s .26s ease-out both; }
.report-cover h2 span { opacity: .65; }
.report-cover-title { margin-bottom: 22px; font-size: clamp(20px, 5vw, 28px); font-weight: 800; animation: report-reveal .52s .34s ease-out both; }
.report-cover-meta { color: rgba(255,255,255,.84); font-size: 13px; line-height: 1.9; animation: report-reveal .52s .42s ease-out both; }
.report-page-content > .report-page-title { margin-bottom: 26px; font-size: clamp(25px, 6vw, 36px); animation: report-title-in .45s ease-out both; }
.report-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 14px 10px; color: rgba(255,255,255,.82); font-size: 12px; font-weight: 800; text-align: center; }
.report-metric-list { display: grid; gap: 10px; }
.report-metric-row { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(60px, .75fr) minmax(60px, .75fr); align-items: center; gap: 8px; min-height: 66px; padding: 11px 13px; border: 1px solid rgba(255,255,255,.23); border-radius: 16px; background: rgba(255,255,255,.13); animation: report-row-in .42s ease-out both; }
.report-metric-row:nth-child(2) { animation-delay: .1s; }
.report-metric-row:nth-child(3) { animation-delay: .2s; }
.report-metric-row:nth-child(4) { animation-delay: .3s; }
.report-metric-label { color: rgba(255,255,255,.86); font-size: 12px; line-height: 1.45; }
.report-metric-value { min-width: 0; color: #fff; font-size: 20px; font-weight: 850; text-align: center; word-break: break-word; }
.report-metric-value .report-number { display: inline-block; }
.report-metric-row-shared { grid-template-columns: 1fr auto; }
.report-metric-shared-value { min-width: 90px; color: #fff; font-size: 22px; font-weight: 850; text-align: right; }
.report-summary-page .report-page-title { text-align: center; }
.report-summary-gauge { display: grid; grid-template-columns: 1fr 104px 1fr; align-items: center; gap: 8px; margin: 0 auto 3px; }
.report-score-person { color: rgba(255,255,255,.9); font-size: 13px; text-align: center; word-break: break-word; }
.report-gauge-wrap { display: grid; justify-items: center; }
.report-gauge { height: 150px; transform: scale(.68); transform-origin: center bottom; margin-bottom: -10px; }
.report-temperature { position: relative; z-index: 1; margin-top: 54px; font-size: 26px; }
.report-summary-label { margin: 0 0 18px; color: rgba(255,255,255,.76); font-size: 12px; text-align: center; }
.report-summary-list { display: grid; gap: 7px; }
.report-summary-list .report-metric-row { min-height: 47px; padding-block: 7px; border-radius: 12px; }
.report-summary-list .report-metric-label { text-align: center; }
.report-summary-list .report-metric-value { font-size: 16px; }
.report-brand { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; color: rgba(255,255,255,.8); font-size: 12px; font-weight: 800; }
.report-footer { position: absolute; z-index: 2; right: 0; bottom: calc(16px + env(safe-area-inset-bottom)); left: 0; display: flex; justify-content: center; pointer-events: none; }
.report-footer span { color: rgba(255,255,255,.83); font-size: 11px; font-weight: 750; letter-spacing: .04em; }
.report-viewer { color: var(--ink); background: #d8c7b2; }
.report-topbar { color: var(--ink); }
.report-progress span { background: rgba(61,38,53,.2); }
.report-progress span.active { background: var(--accent-dark); }
.report-control-button { border-color: rgba(61,38,53,.24); color: var(--ink); background: rgba(255,253,245,.72); }
.report-control-button:hover, .report-control-button:focus-visible { background: #fffdf5; }
.report-page { padding-top: 94px; }
.report-page-content { position: relative; min-height: calc(100% - 10px); padding: 34px 28px 30px; border: 1px solid #e6d7c4; border-radius: 4px 18px 18px 4px; color: var(--ink); background: repeating-linear-gradient(to bottom, #fffdf5 0, #fffdf5 31px, #f1e6d6 32px); box-shadow: 10px 18px 30px rgba(105,74,46,.13), inset 12px 0 0 #f3e4d2; }
.report-page-content::before { position: absolute; top: 0; bottom: 0; left: 18px; width: 1px; background: rgba(216,126,132,.34); content: ''; }
.report-cover-content { justify-content: center; }
.report-cover-mark { border-color: #d8bfae; color: var(--accent-dark); background: #fff5ea; }
.report-kicker, .report-cover-meta, .report-summary-label, .report-footer span { color: var(--muted); }
.report-cover h2, .report-cover-title, .report-page-content > .report-page-title { color: var(--ink); }
.report-columns { color: var(--muted); }
.report-metric-row { border-color: #e6d7c4; background: rgba(255,255,255,.58); }
.report-metric-label { color: var(--muted); }
.report-metric-value, .report-metric-shared-value { color: var(--ink); }
.report-summary-book { position: relative; margin: 0 auto 22px; padding: 21px 20px 18px; border: 1px solid #e6d7c4; border-radius: 4px 14px 14px 4px; background: #fff8ed; box-shadow: 4px 8px 16px rgba(105,74,46,.1); text-align: center; }
.report-summary-kicker { margin-bottom: 2px; color: var(--accent-dark); font-size: 12px; font-weight: 850; letter-spacing: .08em; }
.report-relationship-score { display: inline-block; color: var(--accent-dark); font-family: Georgia, "Times New Roman", serif; font-size: clamp(55px, 15vw, 86px); line-height: 1; }
.report-relationship-score .report-number { display: inline-block; }
.report-relationship-unit { color: var(--muted); font-size: 14px; font-weight: 800; }
.report-summary-rank { margin: 7px 0 5px; color: var(--ink); font-size: 17px; font-weight: 850; }
.report-summary-goal { margin-bottom: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.report-brand { color: var(--muted); }
@keyframes report-enter { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes report-exit { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(100%); } }
@keyframes report-reveal { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes report-title-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes report-row-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes page-enter { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) {
  .analysis-spinner { animation: none; }
  .report-viewer, .report-viewer.closing, .report-cover-mark, .report-kicker, .report-cover h2, .report-cover-title, .report-cover-meta, .report-page-content > .report-page-title, .report-metric-row, .analysis-route-page { animation: none; }
  .report-track, .report-progress span { transition: none; }
}

@media (min-width: 720px) {
  .app-shell { padding-bottom: 0; }
  .topbar { padding-inline: max(24px, calc((100vw - 760px) / 2)); }
  .app-content { padding-top: 42px; padding-bottom: 60px; }
  .app-shell.has-bottom-nav .app-content { padding-bottom: 60px; }
  .bottom-nav { position: fixed; right: auto; top: 50%; bottom: auto; left: max(18px, calc(50% - 550px)); display: flex; flex-direction: column; width: 74px; transform: translateY(-50%); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
  .bottom-nav button { width: 58px; margin: auto; }
  .two-column { grid-template-columns: 1fr 1fr; }
  .analysis-tabs { grid-template-columns: repeat(6, minmax(0,1fr)); }
  .stat-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .empty-panel { padding: 34px; }
  .sheet { border-radius: 26px; margin: 18px; align-self: center; }
  .modal-backdrop { align-items: center; }
}

@media (max-width: 480px) {
  .topbar { padding-inline: 12px; }
  .topbar-actions { gap: 5px; }
  .ticket-panel { position: fixed; top: calc(62px + env(safe-area-inset-top)); right: 12px; left: 12px; width: auto; max-height: calc(100dvh - 92px); overflow-y: auto; }
  .platform-switch { gap: 4px; }
  .platform-switch button { min-width: 0; padding-inline: 3px; font-size: 11px; }
  .language-button { min-width: 62px; padding-inline: 8px; }
  .ticket-button { min-width: 42px; padding-inline: 8px; }
  .account-button, .account-button.authenticated { max-width: 35vw; padding-inline: 9px; }
  .resource-card-copy small { white-space: normal; }
  .info-actions { display: grid; }
  .info-actions .button { width: 100%; }
  .contact-confirm-modal { width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
  .contact-confirm-panel { max-height: calc(100dvh - 24px); padding: 20px 16px; }
  .contact-confirm-actions { grid-template-columns: 1fr; }
  .report-page { padding-inline: 15px; }
  .report-topbar { padding-inline: 12px; }
  .report-metric-row { grid-template-columns: minmax(0, 1.25fr) minmax(50px, .7fr) minmax(50px, .7fr); padding-inline: 10px; }
  .report-metric-label { font-size: 11px; }
  .report-metric-value { font-size: 17px; }
  .report-summary-gauge { grid-template-columns: 1fr 88px 1fr; }
  .book-page-card { padding: 22px 18px 21px 28px; }
  .book-page-details { grid-template-columns: 1fr 1fr; }
  .book-page-platform { font-size: 12px; }
  .report-page-content { padding-inline: 23px; }
  .history-list-item { grid-template-columns: 45px minmax(0, 1fr) auto 15px; gap: 7px; padding-inline: 10px; }
  .history-list-summary span { font-size: 12px; }
  .history-list-count { font-size: 11px; }
  .history-detail-heading { align-items: start; }
  .history-detail-heading .button span { display: none; }
  .whatif-workspace-heading { display: grid; }
  .whatif-workspace-heading .button { justify-self: start; }
  .whatif-draft-actions { align-items: stretch; flex-direction: column; }
  .whatif-draft-actions .button { width: 100%; }
}

/* Public landing page */
.landing-body {
  --bg: #fff8f7;
  --surface: #ffffff;
  --surface-soft: #ffeaf1;
  --ink: #352533;
  --muted: #6e5d67;
  --line: #f3dce4;
  --accent: #ff5b8a;
  --accent-dark: #f34d7e;
  --accent-soft: #ffeaf1;
  --plum: #7e4b63;
  --green: #4e7a5c;
  --green-soft: #eaf6ef;
  --shadow: 0 18px 46px rgba(126, 75, 99, .10);
  background: var(--bg);
}

.landing-body .app-shell { padding-bottom: 0; }
.landing-body .topbar { background: rgba(255,248,247,.94); border-bottom-color: rgba(243,220,228,.82); }
.landing-topbar { gap: 20px; padding-inline: max(18px, calc((100vw - 1180px) / 2)); }
.landing-topbar-actions { flex: none; }
.landing-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.landing-nav a { color: var(--muted); font-size: 13px; font-weight: 750; text-decoration: none; }
.landing-nav a:hover, .landing-nav a:focus-visible { color: var(--accent-dark); }
.landing-header-cta { min-height: 38px; padding-inline: 15px; border-radius: 999px; font-size: 12px; box-shadow: 0 8px 18px rgba(255,91,138,.18); }
.landing-body .button { text-decoration: none; }
.landing-mobile-menu { display: none; position: relative; }
.landing-mobile-menu summary { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; list-style: none; }
.landing-mobile-menu summary::-webkit-details-marker { display: none; }
.landing-mobile-menu summary:focus-visible { outline: 3px solid rgba(255,91,138,.28); outline-offset: 2px; }
.landing-menu-icon { display: grid; gap: 4px; width: 16px; }
.landing-menu-icon i { display: block; height: 1.5px; border-radius: 2px; background: var(--plum); }
.landing-mobile-menu nav { position: absolute; top: calc(100% + 10px); right: 0; z-index: 20; display: grid; width: 170px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 18px 42px rgba(53,37,51,.16); }
.landing-mobile-menu nav a { padding: 11px 10px; border-radius: 10px; color: var(--ink); font-size: 13px; font-weight: 750; text-decoration: none; }
.landing-mobile-menu nav a:hover, .landing-mobile-menu nav a:focus-visible { background: var(--surface-soft); color: var(--accent-dark); }
.landing-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.landing-content { width: min(100%, 1180px); padding: 0 18px 88px; }
.landing-hero { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(340px, .98fr); align-items: center; gap: clamp(38px, 7vw, 90px); padding: 66px 0 20px; }
.landing-hero-copy { min-width: 0; }
.landing-hero + .landing-section { padding-top: 28px; }
.landing-hero h1 { margin-bottom: 18px; color: var(--ink); font-size: clamp(38px, 5.6vw, 68px); line-height: 1.1; letter-spacing: -.045em; }
.landing-hero h1 > span { display: block; }
.landing-hero-subtitle { margin-bottom: 18px; color: var(--plum); font-size: clamp(20px, 2.5vw, 28px); font-weight: 800; line-height: 1.45; }
.landing-hero-description { max-width: none; margin-bottom: 0; color: var(--muted); font-size: 15px; line-height: 1.9; }
.landing-hero-actions { margin-top: 28px; }
.landing-hero-actions .button { min-width: 148px; }
.landing-assurance-list { display: grid; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; color: var(--green); font-size: 14px; font-weight: 750; line-height: 1.65; }
.landing-assurance-list li { display: flex; align-items: flex-start; gap: 8px; }
.landing-assurance-list li::before { width: 7px; height: 7px; flex: none; margin-top: .62em; border-radius: 50%; background: var(--green); content: ''; }
.landing-assurance-note { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.landing-chat-mock { width: min(100%, 440px); justify-self: end; padding: 18px; border: 1px solid var(--line); border-radius: 28px; background: rgba(255,255,255,.78); box-shadow: 0 22px 55px rgba(126,75,99,.14); transform: rotate(1.2deg); }
.landing-chat-mock-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.landing-mock-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.landing-chat-thread { display: grid; gap: 12px; padding: 18px; border-radius: 20px; background: linear-gradient(145deg, #fffafb, #fff1f5); }
.landing-chat-bubble { width: fit-content; max-width: 88%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); font-size: 13px; line-height: 1.55; }
.landing-chat-bubble.is-you { margin-left: auto; border-color: #ffc2d3; border-radius: 16px 5px 16px 16px; background: var(--accent-soft); }
.landing-chat-bubble.is-them { border-radius: 5px 16px 16px 16px; background: var(--surface); }
.landing-suggestion-panel { padding: 15px; border: 1px solid #f2c8d5; border-radius: 16px; background: var(--surface); box-shadow: 0 8px 20px rgba(126,75,99,.07); }
.landing-mock-label { display: block; margin-bottom: 8px; color: var(--accent-dark); font-size: 11px; font-weight: 850; }
.landing-suggestion-panel ol { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; counter-reset: suggestion; }
.landing-suggestion-panel li { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 12px; font-weight: 700; }
.landing-suggestion-panel li::before { display: grid; flex: none; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; background: var(--accent); font-size: 10px; counter-increment: suggestion; content: counter(suggestion); }
.landing-if-mock { display: grid; gap: 4px; padding: 14px 15px; border: 1px solid #e7d5c9; border-radius: 16px 5px 16px 16px; background: #fff9ef; }
.landing-if-mock span { color: var(--plum); font-size: 10px; font-weight: 850; letter-spacing: .06em; }
.landing-if-mock strong { color: var(--ink); font-size: 13px; }

.landing-section { scroll-margin-top: 82px; padding-top: 72px; }
.landing-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 22px; margin-bottom: 24px; }
.landing-section-heading h2 { margin-bottom: 0; color: var(--ink); font-size: clamp(25px, 3vw, 35px); letter-spacing: -.025em; }
.landing-section-heading p { flex: none; margin: 0; color: var(--muted); font-size: 13px; }
.landing-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.landing-feature-card { display: flex; flex-direction: column; min-height: 250px; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.landing-feature-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 20px; border-radius: 14px; color: var(--accent-dark); background: var(--accent-soft); }
.landing-feature-card h3 { margin-bottom: 11px; color: var(--ink); font-size: 18px; line-height: 1.45; }
.landing-feature-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }

.landing-use-cases { padding-top: 76px; }
.landing-use-case-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.landing-use-case-grid div { display: grid; place-items: center; min-height: 88px; padding: 14px 10px; border: 1px solid var(--line); border-radius: 17px; color: var(--plum); background: rgba(255,255,255,.7); font-size: 13px; font-weight: 800; line-height: 1.5; text-align: center; }

.landing-pwa-note { display: flex; align-items: center; gap: 15px; margin: 0; padding: 16px 18px; border: 1px solid #d4e7d8; border-radius: 16px; color: var(--green); background: var(--green-soft); font-size: 13px; font-weight: 750; }
.landing-assurance-note + .landing-pwa-note { margin-top: 18px; }
.landing-pwa-note > span { flex: 1; }
.landing-compact-button { flex: none; min-height: 38px; padding-inline: 13px; border-color: #c9ddcf; color: var(--green); font-size: 12px; }
.landing-compact-button:hover { color: #3f674a; background: #f8fffa; }
.landing-step-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.landing-step-grid li { display: grid; align-content: start; gap: 10px; min-height: 190px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.landing-step-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: var(--accent-dark); background: var(--accent-soft); }
.landing-step-grid strong { color: var(--ink); font-size: 16px; line-height: 1.5; }
.landing-step-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

.landing-analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.landing-analysis-card { padding: 24px; border-radius: 21px; }
.landing-analysis-card.is-data { border: 1px solid var(--line); background: var(--surface); }
.landing-analysis-card.is-ai { border: 1px solid #ead9c9; background: #fff9ef; }
.landing-analysis-card h3 { margin-bottom: 17px; color: var(--ink); font-size: 18px; }
.landing-analysis-card ul { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.landing-analysis-card li { display: flex; align-items: baseline; gap: 9px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.landing-analysis-card li::before { width: 6px; height: 6px; flex: none; margin-top: .45em; border-radius: 50%; background: var(--accent); content: ''; }
.landing-analysis-card.is-ai li::before { background: var(--plum); }
.landing-analysis-card p { margin: 18px 0 0; padding-top: 15px; border-top: 1px solid #ead9c9; color: var(--muted); font-size: 12px; line-height: 1.7; }

.landing-privacy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.landing-privacy-grid article { padding: 23px; border: 1px solid #d4e7d8; border-radius: 20px; background: var(--green-soft); }
.landing-privacy-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 17px; border-radius: 13px; color: var(--green); background: #fff; }
.landing-privacy-grid h3 { margin-bottom: 9px; color: var(--green); font-size: 16px; line-height: 1.5; }
.landing-privacy-grid p { margin: 0; color: #587460; font-size: 13px; line-height: 1.7; }

.landing-faq-list { border-top: 1px solid var(--line); }
.landing-faq-list details { border-bottom: 1px solid var(--line); }
.landing-faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; padding: 12px 2px; color: var(--ink); font-size: 14px; font-weight: 800; cursor: pointer; list-style: none; }
.landing-faq-list summary::-webkit-details-marker { display: none; }
.landing-faq-list summary::after { color: var(--accent-dark); font-size: 20px; font-weight: 500; content: '+'; }
.landing-faq-list details[open] summary::after { content: '−'; }
.landing-faq-list summary:focus-visible { outline: 3px solid rgba(255,91,138,.28); outline-offset: 4px; }
.landing-faq-list details p { max-width: 760px; margin: -2px 32px 17px 2px; color: var(--muted); font-size: 13px; line-height: 1.8; }

.landing-final-cta { margin-top: 78px; padding: 56px 24px; border: 1px solid #f4c6d3; border-radius: 26px; background: linear-gradient(145deg, #fff0f5, #fffaf9); text-align: center; }
.landing-final-cta h2 { margin-bottom: 13px; color: var(--ink); font-size: clamp(25px, 4vw, 38px); }
.landing-final-cta p { margin-bottom: 24px; color: var(--muted); font-size: 14px; }
.landing-final-cta .button { min-width: 160px; }
.landing-body footer { width: min(100%, 1180px); margin: 0 auto; }
.landing-body .legal-footer { margin-top: 0; }

@media (min-width: 720px) {
  .landing-content { padding: 0 24px 100px; }
  .landing-topbar { padding-inline: max(24px, calc((100vw - 1180px) / 2)); }
}

@media (max-width: 719px) {
  .landing-nav, .landing-header-cta { display: none; }
  .landing-mobile-menu { display: block; }
  .landing-content { padding-bottom: 60px; }
  .landing-hero { grid-template-columns: 1fr; gap: 34px; padding: 42px 0 20px; }
  .landing-hero h1 { font-size: clamp(34px, 9.5vw, 56px); }
  .landing-section { padding-top: 56px; }
  .landing-hero + .landing-section { padding-top: 28px; }
  .landing-section-heading { display: grid; gap: 8px; }
  .landing-feature-grid, .landing-step-grid, .landing-privacy-grid { grid-template-columns: 1fr; }
  .landing-feature-card { min-height: 0; }
  .landing-chat-mock { width: min(100%, 440px); justify-self: center; transform: none; }
  .landing-use-case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing-use-case-grid div:last-child { grid-column: 1 / -1; }
  .landing-pwa-note { align-items: flex-start; flex-direction: column; gap: 12px; }
  .landing-pwa-note .landing-compact-button { width: fit-content; }
  .landing-analysis-grid { grid-template-columns: 1fr; }
  .landing-final-cta { margin-top: 60px; padding: 44px 19px; }
}

@media (prefers-reduced-motion: reduce) {
  .landing-body *, .landing-body *::before, .landing-body *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
