:root {
  --purple: #6b3fa0;
  --purple-dark: #452460;
  --purple-soft: #eee4f8;
  --orange: #f47735;
  --orange-soft: #fff0e7;
  --ink: #252029;
  --muted: #675f6d;
  --line: #e5d9ef;
  --paper: #fffdf9;
  --white: #fff;
  --danger: #a13d36;
  --success: #356842;
  --shadow: 0 22px 70px rgba(69, 36, 96, 0.16);
}

* { box-sizing: border-box; }
html { background: #eadff4; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: radial-gradient(circle at 8% 4%, #fff2e9 0 14%, transparent 38%), linear-gradient(145deg, #faf5fd, #e9dcf5); font: 16px/1.5 "Avenir Next", Avenir, Inter, system-ui, sans-serif; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
[hidden] { display: none !important; }

.app-shell { width: min(100%, 540px); min-height: 100vh; margin: 0 auto; background: var(--paper); box-shadow: var(--shadow); }
.brandbar { position: sticky; top: 0; z-index: 5; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 20px; background: rgba(255, 253, 249, .94); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(107, 63, 160, .08); }
.brandbar img { width: 150px; max-height: 48px; object-fit: contain; object-position: left; }
.brandbar span { color: var(--purple); font-size: .78rem; font-weight: 900; letter-spacing: .04em; }
main { padding: 22px 20px 110px; }
.eyebrow { margin: 0 0 8px; color: #b94712; font-size: .76rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { color: var(--purple); letter-spacing: -.035em; line-height: 1.07; }
h1 { margin-bottom: 13px; font-size: clamp(2rem, 8vw, 2.75rem); }
h2 { margin-bottom: 8px; font-size: 1.55rem; }
.lead { margin-bottom: 22px; color: var(--muted); font-size: 1rem; }

.auth-photo { position: relative; height: 190px; overflow: hidden; margin: 0 0 16px; border-radius: 28px; background: var(--purple-soft); }
.auth-photo img { width: 100%; height: 100%; object-fit: cover; }
.auth-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(50, 25, 69, .86), transparent 75%); }
.auth-photo div { position: absolute; z-index: 1; left: 17px; right: 17px; bottom: 14px; color: white; }
.auth-photo strong, .auth-photo span { display: block; }
.auth-photo strong { font-size: .94rem; }
.auth-photo span { margin-top: 2px; color: #f5edf9; font-size: .78rem; }
.auth-card { padding: 19px; border: 1px solid var(--line); border-radius: 26px; background: white; box-shadow: 0 12px 35px rgba(69, 36, 96, .07); }
.form-heading p { margin-bottom: 18px; color: var(--muted); font-size: .84rem; }
.auth-card > label:not(.consent), #dogForm label { display: block; margin: 13px 0 7px; font-size: .82rem; font-weight: 850; }
input[type="email"], input[type="password"], input[type="text"], input[type="date"], #dogName { width: 100%; min-width: 0; min-height: 51px; padding: 12px 14px; color: var(--ink); border: 1.5px solid var(--line); border-radius: 16px; background: white; }
.password-field { position: relative; }
.password-field input { padding-right: 72px; }
.password-field button { position: absolute; right: 7px; top: 7px; min-height: 37px; padding: 0 10px; border: 0; border-radius: 11px; color: var(--purple); background: var(--purple-soft); font-size: .76rem; font-weight: 850; cursor: pointer; }
.login-note { margin: 8px 2px 0; color: var(--muted); font-size: .76rem; line-height: 1.4; }
.consent { display: flex; align-items: flex-start; gap: 9px; margin: 16px 0; color: var(--muted); font-size: .76rem; }
.consent input { width: 19px; height: 19px; flex: 0 0 19px; margin-top: 1px; accent-color: var(--purple); }
.consent a { color: var(--purple); }
.primary { min-height: 53px; padding: 0 19px; color: white; border: 0; border-radius: 17px; background: var(--purple); box-shadow: 0 8px 20px rgba(107, 63, 160, .2); font-weight: 850; cursor: pointer; }
.primary:hover { background: var(--purple-dark); }
.primary:disabled { opacity: .55; cursor: wait; }
.auth-card > .primary { width: 100%; }
.text-button { width: 100%; min-height: 44px; margin-top: 5px; color: var(--purple); border: 0; background: transparent; font-size: .84rem; font-weight: 850; cursor: pointer; }
.legal-link { width: 100%; margin-top: 7px; color: var(--muted); border: 0; background: transparent; font-size: .74rem; text-decoration: underline; cursor: pointer; }
.form-message { min-height: 0; margin: 9px 0; font-size: .8rem; }
.form-message:empty { margin: 0; }
.form-message.error { color: var(--danger); }
.form-message.success { color: var(--success); }
.welcome-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.account-actions { display: flex; gap: 7px; }
.welcome-row h1 { font-size: 2rem; }
.avatar-button { min-height: 40px; padding: 0 13px; color: var(--purple); border: 1px solid var(--line); border-radius: 14px; background: white; font-size: .78rem; font-weight: 850; cursor: pointer; }
.avatar-button.has-unread { position: relative; }
.avatar-button.has-unread::after { content: ""; position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border: 2px solid white; border-radius: 50%; background: var(--orange); }
.dog-empty { margin-top: 14px; padding: 29px 20px 22px; text-align: center; border: 1px solid var(--line); border-radius: 28px; background: white; }
.paw { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 13px; border-radius: 20px; background: var(--orange-soft); font-size: 1.8rem; }
.dog-empty > p { color: var(--muted); font-size: .9rem; }
#dogForm { margin-top: 22px; text-align: left; }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.dog-switcher { width: 100%; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 10px; margin: 8px 0 14px; padding: 11px 13px; text-align: left; color: var(--ink); border: 1px solid var(--line); border-radius: 18px; background: white; cursor: pointer; }
.dog-switcher > span:first-child { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: var(--orange-soft); font-size: 1.3rem; }
.dog-switcher small, .dog-switcher strong { display: block; }
.dog-switcher small { color: var(--muted); font-size: .7rem; }
.dog-switcher .chevron { color: var(--purple); font-size: 1.1rem; transition: transform .18s ease; }
.dog-switcher[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.next-action { padding: 22px; color: white; border-radius: 28px; background: linear-gradient(145deg, var(--purple), var(--purple-dark)); overflow: hidden; }
.next-action .eyebrow { color: #ff9b63; }
.next-action h2 { color: white; font-size: 1.8rem; }
.next-action p:not(.eyebrow) { color: #f0e9f4; font-size: .87rem; }
.record-cta { width: 100%; min-height: 52px; color: var(--purple-dark); border: 0; border-radius: 16px; background: white; font-weight: 900; cursor: pointer; }
.record-cta span { color: var(--orange); margin-right: 6px; }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.value-grid article { min-width: 0; padding: 12px 7px; text-align: center; border: 1px solid var(--line); border-radius: 18px; background: white; }
.value-grid span, .value-grid strong { display: block; }
.value-grid strong { margin-top: 2px; color: var(--purple); font-size: 1.2rem; }
.value-grid p { margin: 2px 0 0; color: var(--muted); font-size: .66rem; line-height: 1.25; }
.progress-card { margin: 12px 0; padding: 17px; border: 1px solid var(--line); border-radius: 22px; background: white; }
.progress-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.progress-top small, .progress-top strong { display: block; }
.progress-top small { color: var(--muted); font-size: .72rem; }
.progress-top > div > strong { color: var(--purple); font-size: 1.05rem; }
.streak { display: flex; align-items: center; gap: 4px; padding: 7px 10px; border-radius: 14px; background: var(--orange-soft); }
.streak strong { color: #a33e11; }
.streak small { color: #7a4c33; }
.progress-track { height: 8px; margin: 13px 0 7px; overflow: hidden; border-radius: 999px; background: var(--purple-soft); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange), var(--purple)); transition: width .3s ease; }
.progress-card > p { margin: 0; color: var(--muted); font-size: .74rem; }
.badge-row { display: flex; gap: 7px; margin-top: 12px; }
.badge { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 12px; font-size: 1rem; }
.badge.earned { background: var(--orange-soft); box-shadow: inset 0 0 0 1px #f3c8ae; }
.badge.locked { color: #9f95a5; background: #eee9f0; }
.weekly-card { display: flex; align-items: center; gap: 13px; padding: 17px; border: 1px solid #f0d8c9; border-radius: 22px; background: var(--orange-soft); }
.weekly-card div { flex: 1; }
.weekly-card small { color: #b94712; font-weight: 850; }
.weekly-card h3 { margin: 3px 0; font-size: .98rem; }
.weekly-card p { margin: 0; color: var(--muted); font-size: .75rem; }
.weekly-card button { flex: 0 0 auto; padding: 9px 11px; color: var(--purple); border: 1px solid var(--line); border-radius: 12px; background: white; font-size: .75rem; font-weight: 850; }
.in-app-report { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-bottom: 11px; padding: 16px; color: white; border-radius: 22px; background: linear-gradient(145deg, var(--purple), var(--purple-dark)); }
.report-mark { display: grid; place-items: center; width: 42px; height: 42px; color: var(--purple); border-radius: 14px; background: #fff; font-size: 1.2rem; font-weight: 900; }
.in-app-report small { color: #ffc09a; font-weight: 850; }
.in-app-report h3 { margin: 2px 0 4px; color: #fff; font-size: .98rem; }
.in-app-report p { margin: 0; color: #f1e9f5; font-size: .74rem; }
.in-app-report button { padding: 9px 11px; color: var(--purple); border: 0; border-radius: 12px; background: white; font-size: .72rem; font-weight: 850; }

.content-view { padding: 8px 0 16px; }
.content-view > p:not(.eyebrow) { color: var(--muted); }
.content-view > .primary { width: 100%; margin-top: 14px; }
.journal-list { display: grid; gap: 10px; margin: 18px 0 4px; }
.journal-empty { padding: 22px 17px; text-align: center; color: var(--muted); border: 1px dashed #ccb5de; border-radius: 20px; background: #fbf7fd; }
.journal-empty strong, .journal-empty span { display: block; }
.journal-empty strong { margin: 7px 0 3px; color: var(--purple); }
.journal-entry { padding: 15px; border: 1px solid var(--line); border-radius: 19px; background: white; }
.journal-entry header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.journal-entry h3 { margin: 0; color: var(--purple); font-size: .96rem; }
.journal-entry time { color: var(--muted); font-size: .7rem; }
.journal-entry p { margin: 7px 0 0; font-size: .78rem; }
.journal-entry .confidence { display: inline-block; margin-top: 9px; padding: 4px 8px; color: var(--purple); border-radius: 9px; background: var(--purple-soft); font-size: .68rem; font-weight: 850; }
.open-report { width: 100%; min-height: 42px; margin-top: 12px; color: var(--purple); border: 1px solid #cbb2de; border-radius: 13px; background: white; font-size: .76rem; font-weight: 850; cursor: pointer; }
.open-report:hover { background: var(--purple-soft); }
.challenge-detail, .community-status, .challenge-empty { display: flex; gap: 12px; margin: 19px 0 5px; padding: 17px; border: 1px solid var(--line); border-radius: 20px; background: white; }
.challenge-detail > span, .community-status > span { font-size: 1.5rem; }
.challenge-detail strong, .community-status strong { color: var(--purple); }
.challenge-detail p, .community-status p { margin: 3px 0 0; font-size: .8rem; }
.admin-access { color: white; border-color: var(--purple); background: var(--purple); }
.admin-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 18px 0; }
.admin-stats article { padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.admin-stats strong, .admin-stats span { display: block; }
.admin-stats strong { color: var(--purple); font-size: 1.55rem; }
.admin-stats span { color: var(--muted); font-size: .74rem; }
.admin-roadmap { padding: 17px; border-radius: 20px; background: var(--purple-soft); }
.admin-roadmap h3 { margin: 0 0 5px; color: var(--purple); font-size: .95rem; }
.admin-roadmap p { margin: 0; font-size: .8rem; }
.admin-section { margin: 18px 0; padding: 17px; border: 1px solid var(--line); border-radius: 20px; background: white; }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.section-heading small { color: var(--orange); font-weight: 850; }
.section-heading h3 { margin: 2px 0 12px; color: var(--purple); font-size: .98rem; }
.status-pill { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; font-size: .65rem; font-weight: 850; }
.status-pill.ready { color: #216145; background: #daf3e6; }
.status-pill.pending { color: #8c4d20; background: #fbe8d7; }
.admin-section textarea { min-height: 90px; }
.admin-section form > label { display: block; margin: 11px 0 7px; font-size: .8rem; font-weight: 850; }
.admin-section .two-fields { margin: 11px 0; }
.admin-challenge-list { display: grid; gap: 7px; margin-top: 14px; }
.admin-challenge-list article { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px; border-radius: 14px; background: var(--purple-soft); }
.admin-item-actions { display: grid; justify-items: end; gap: 3px; }
.admin-challenge-list strong, .admin-challenge-list small { display: block; }
.admin-challenge-list small { margin-top: 2px; color: var(--muted); font-size: .68rem; }
.challenge-list { display: grid; gap: 11px; margin: 18px 0; }
.challenge-card { padding: 17px; border: 1px solid var(--line); border-radius: 20px; background: white; }
.challenge-card small { color: var(--orange); font-weight: 850; }
.challenge-card h3 { margin: 4px 0; color: var(--purple); }
.challenge-card p { margin: 0 0 13px; color: var(--muted); font-size: .8rem; }
.challenge-card .primary { width: 100%; }
.challenge-status { display: inline-block; margin: 0 0 11px; padding: 5px 8px; border-radius: 9px; color: var(--purple); background: var(--purple-soft); font-size: .7rem; font-weight: 850; }
.challenge-status.approved, .challenge-status.completed { color: #216145; background: #daf3e6; }
.challenge-status.rejected { color: #8d352f; background: #fae0dd; }
.community-feed, .moderation-list { display: grid; gap: 12px; margin-top: 16px; }
.community-card, .community-empty, .moderation-card { padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: white; }
.community-card > small, .moderation-card > small { color: var(--orange); font-weight: 800; }
.community-card h3 { margin: 4px 0; color: var(--purple); }
.community-card p, .community-empty p, .moderation-card p { margin: 4px 0 12px; color: var(--muted); font-size: .8rem; }
.video-preview video { width: 100%; max-height: 360px; border-radius: 15px; background: #17131a; }
.video-play, .secondary-button { width: 100%; min-height: 45px; padding: 8px 13px; color: var(--purple); border: 1px solid #cbb2de; border-radius: 14px; background: white; font-weight: 850; cursor: pointer; }
.moderation-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 9px; }
.approve-button, .reject-button { min-height: 43px; border: 0; border-radius: 13px; font-weight: 850; cursor: pointer; }
.approve-button { color: #174d35; background: #daf3e6; }
.reject-button { color: #81332d; background: #fae0dd; }
.comparison-hero { padding: 19px; color: white; border-radius: 22px; background: linear-gradient(145deg, var(--purple), var(--purple-dark)); }
.comparison-hero small, .comparison-hero strong { display: block; }
.comparison-hero small { color: #ffc09a; font-weight: 850; }
.comparison-hero strong { margin: 5px 0; font-size: 1.2rem; }
.comparison-hero p { margin: 0; color: #f1e9f5; font-size: .8rem; }
.comparison-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.comparison-grid article { min-width: 0; padding: 12px 9px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.comparison-grid small, .comparison-grid strong, .comparison-grid span { display: block; }
.comparison-grid small { color: var(--muted); font-size: .66rem; }
.comparison-grid strong { margin: 4px 0; color: var(--purple); font-size: 1rem; }
.comparison-grid span { color: var(--muted); font-size: .66rem; }
.pattern-chart { padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.pattern-chart h3 { color: var(--purple); font-size: .95rem; }
.chart-row { display: grid; grid-template-columns: minmax(90px, 1fr) 1.5fr 22px; align-items: center; gap: 8px; margin: 9px 0; font-size: .72rem; }
.chart-row i { height: 8px; overflow: hidden; border-radius: 999px; background: var(--purple-soft); }
.chart-row b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange), var(--purple)); }
.empty-copy { margin: 8px 0; color: var(--muted); font-size: .8rem; }
.settings-body { display: grid; gap: 11px; }
.profile-name { display: block; padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.profile-name strong, .profile-name small { display: block; }
.profile-name small { margin: 2px 0 8px; color: var(--muted); font-size: .7rem; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.setting-row strong, .setting-row small { display: block; }
.setting-row small { color: var(--muted); font-size: .7rem; }
.setting-row input { width: 22px; height: 22px; flex: 0 0 22px; accent-color: var(--purple); }
.notification-section { margin-top: 7px; }
.notification-section h3 { margin: 0; color: var(--purple); }
.mini-button { color: var(--purple); border: 0; background: transparent; font-size: .7rem; font-weight: 850; cursor: pointer; }
.notification-item { padding: 11px 2px; border-bottom: 1px solid var(--line); }
.notification-item.read { opacity: .62; }
.notification-item strong, .notification-item small { display: block; }
.notification-item p { margin: 3px 0; color: var(--muted); font-size: .76rem; }
.notification-item small { color: var(--muted); font-size: .66rem; }
.danger-button { width: 100%; min-height: 45px; margin-top: 8px; padding: 8px 13px; color: #8d352f; border: 1px solid #e9b8b3; border-radius: 14px; background: #fff6f5; font-weight: 850; cursor: pointer; }
.legal-copy h3 { margin: 14px 0 4px; color: var(--purple); font-size: .95rem; }
.legal-copy p { margin: 0; font-size: .82rem; }
#videoForm > label:not(.consent), #resetPasswordForm label { display: block; margin: 12px 0 7px; font-size: .82rem; font-weight: 850; }
#challengeVideo { width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.bottom-nav { position: fixed; z-index: 8; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); width: min(calc(100% - 24px), 516px); display: grid; grid-template-columns: repeat(4, 1fr); padding: 7px; transform: translateX(-50%); border: 1px solid rgba(107, 63, 160, .16); border-radius: 22px; background: rgba(255, 253, 249, .97); box-shadow: 0 12px 35px rgba(69, 36, 96, .2); backdrop-filter: blur(14px); }
.bottom-nav button { min-width: 0; min-height: 54px; display: grid; place-items: center; align-content: center; gap: 1px; padding: 4px 2px; color: var(--muted); border: 0; border-radius: 16px; background: transparent; font-size: .66rem; font-weight: 800; cursor: pointer; }
.bottom-nav .nav-icon { width: 22px; height: 22px; display: block; color: inherit; line-height: 1; }
.bottom-nav .nav-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav button[aria-current="page"] { color: var(--purple); background: var(--purple-soft); }

dialog { width: min(calc(100% - 32px), 410px); padding: 25px; color: var(--ink); border: 0; border-radius: 26px; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(37, 32, 41, .58); backdrop-filter: blur(4px); }
dialog h2 { margin-top: 10px; }
dialog p { color: var(--muted); }
dialog .primary { width: 100%; }
.dialog-icon { width: 50px; height: 50px; display: grid; place-items: center; color: white; border-radius: 17px; background: var(--purple); font-size: 1.4rem; font-weight: 900; }

.dog-dialog { width: min(calc(100% - 24px), 480px); max-height: 88vh; padding: 0; overflow: auto; background: var(--paper); }
.dog-dialog-body { padding: 18px 20px 22px; }
.dog-list { display: grid; gap: 9px; }
.dog-choice { width: 100%; min-height: 62px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 11px; padding: 9px 12px; text-align: left; color: var(--ink); border: 1.5px solid var(--line); border-radius: 17px; background: white; cursor: pointer; }
.dog-choice:hover { border-color: #c9addf; }
.dog-choice[aria-selected="true"] { border-color: var(--purple); background: var(--purple-soft); }
.dog-choice .dog-face { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: var(--orange-soft); font-size: 1.25rem; }
.dog-choice strong, .dog-choice small { display: block; }
.dog-choice small { color: var(--muted); font-size: .72rem; }
.dog-choice .selected-mark { color: var(--purple); font-weight: 900; }
.add-dog-form { margin-top: 19px; padding-top: 17px; border-top: 1px solid var(--line); }
.add-dog-form > label { display: block; margin-bottom: 8px; font-size: .82rem; font-weight: 850; }
.add-dog-form .primary { width: auto; }

.report-dialog { width: min(calc(100% - 20px), 540px); max-height: min(94vh, 900px); padding: 0; overflow: auto; background: var(--paper); }
.report-body { padding: 20px; }
.report-hero { padding: 19px; color: white; border-radius: 22px; background: linear-gradient(145deg, var(--purple), var(--purple-dark)); }
.report-hero .analysis-heading { color: #ffc09a; }
.report-hero .analysis-heading strong { color: var(--purple); }
.report-hero h3 { margin: 0 0 8px; color: white; font-size: 1.32rem; }
.report-hero p { margin: 0; color: #f2eaf7; font-size: .84rem; }
.report-audio-button { width: 100%; min-height: 48px; margin: 13px 0 0; color: var(--purple); border: 1px solid #cbb2de; border-radius: 15px; background: white; font-weight: 850; cursor: pointer; }
.report-audio-button:disabled { opacity: .65; cursor: wait; }
#reportAudio { width: 100%; margin: 10px 0 0; }
.report-metrics { display: grid; grid-template-columns: 1.25fr .7fr 1fr; gap: 8px; margin: 13px 0; }
.report-metrics div { min-width: 0; padding: 11px 9px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.report-metrics small, .report-metrics strong { display: block; }
.report-metrics small { color: var(--muted); font-size: .64rem; }
.report-metrics strong { margin-top: 3px; color: var(--purple); font-size: .78rem; line-height: 1.25; }
.report-insight { display: flex; gap: 12px; margin-top: 10px; padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.report-insight.action { border-color: #ead0bf; background: var(--orange-soft); }
.report-insight > span { flex: 0 0 auto; font-size: 1.25rem; }
.report-insight h3, .report-notes h3 { margin: 0 0 4px; color: var(--purple); font-size: .9rem; }
.report-insight p, .report-notes p { margin: 0; color: var(--muted); font-size: .78rem; }
.report-notes { margin-top: 10px; padding: 15px; border-left: 4px solid var(--purple); border-radius: 4px 16px 16px 4px; background: var(--purple-soft); }
.report-disclaimer { margin: 14px 3px 2px; color: var(--muted); font-size: .7rem; }

.observation-dialog { width: min(calc(100% - 20px), 520px); max-height: min(92vh, 850px); padding: 0; overflow: auto; background: var(--paper); }
.observation-dialog[open] { animation: dialog-in .22s ease-out; }
.dialog-topbar { position: sticky; top: 0; z-index: 3; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 20px 20px 13px; background: rgba(255, 253, 249, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.dialog-topbar h2 { margin: 0; }
.dialog-topbar .eyebrow { margin-bottom: 5px; }
.dialog-close { width: 42px; height: 42px; flex: 0 0 42px; color: var(--purple); border: 1px solid var(--line); border-radius: 14px; background: white; font-size: 1.45rem; line-height: 1; cursor: pointer; }
.recorder-panel { padding: 25px 20px 21px; text-align: center; }
.recording-orb { width: 94px; height: 94px; display: grid; place-items: center; margin: 0 auto 16px; border: 1px solid #ddcaec; border-radius: 50%; background: radial-gradient(circle, white 36%, var(--purple-soft)); box-shadow: 0 12px 35px rgba(69, 36, 96, .12); font-size: 2.2rem; }
.recording-orb.is-recording { animation: recording-pulse 1.25s ease-in-out infinite; background: radial-gradient(circle, white 34%, #ffd7c2); border-color: #f7b18b; }
.recording-status { max-width: 390px; min-height: 48px; margin: 0 auto 13px; color: var(--muted); font-size: .9rem; }
.audio-meter { height: 54px; display: flex; align-items: center; justify-content: center; gap: 5px; margin: 3px 0 6px; }
.audio-meter i { width: 6px; height: calc(8px + var(--level, 0) * 32px); min-height: 8px; max-height: 42px; border-radius: 10px; background: linear-gradient(var(--orange), var(--purple)); transition: height .09s linear; opacity: calc(.35 + var(--level, 0) * .65); }
.recording-time { display: block; margin-bottom: 17px; color: var(--purple); font-size: 1.45rem; font-variant-numeric: tabular-nums; }
#recordingPlayback { width: 100%; margin: 0 0 15px; }
.recorder-actions { display: grid; grid-template-columns: 1fr; gap: 9px; }
.stop-button { min-height: 53px; color: white; border: 0; border-radius: 17px; background: #b8453e; font-weight: 850; cursor: pointer; }
.privacy-note { margin: 13px 0 0; color: var(--muted); font-size: .74rem; }
#observationForm { padding: 0 20px 22px; }
.analysis-card { margin: 20px 0; padding: 18px; border: 1px solid #dac7ea; border-radius: 22px; background: linear-gradient(145deg, #f7f0fc, #fffaf6); }
.analysis-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: #a33e11; font-size: .76rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.analysis-heading strong { padding: 5px 8px; color: var(--purple); border-radius: 10px; background: white; font-size: .72rem; letter-spacing: 0; }
.analysis-card h3 { margin: 0 0 7px; color: var(--purple); font-size: 1.15rem; }
.analysis-card > p { margin: 0; color: var(--muted); font-size: .84rem; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 14px; }
.metric-grid div { padding: 9px 5px; text-align: center; border-radius: 14px; background: white; }
.metric-grid strong, .metric-grid span { display: block; }
.metric-grid strong { color: var(--purple); font-size: 1.08rem; }
.metric-grid span { color: var(--muted); font-size: .66rem; }
fieldset { min-width: 0; margin: 17px 0; padding: 0; border: 0; }
legend, .two-fields label, .notes-label { display: block; margin-bottom: 8px; color: var(--ink); font-size: .82rem; font-weight: 850; }
select, textarea { width: 100%; color: var(--ink); border: 1.5px solid var(--line); border-radius: 15px; background: white; }
select { min-height: 49px; padding: 9px 12px; }
textarea { min-height: 92px; padding: 12px 14px; resize: vertical; }
.signal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.signal-grid label { display: flex; align-items: center; gap: 7px; min-height: 45px; padding: 9px; border: 1px solid var(--line); border-radius: 14px; background: white; font-size: .76rem; }
.signal-grid input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--purple); }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two-fields label { margin: 0; }
.two-fields select { margin-top: 7px; }
.notes-label span { color: var(--muted); font-weight: 500; }
.save-observation { width: 100%; }

@keyframes recording-pulse { 50% { transform: scale(1.055); box-shadow: 0 0 0 13px rgba(244, 119, 53, .13); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }

@media (min-width: 760px) {
  body { padding: 30px; }
  .app-shell { min-height: calc(100vh - 60px); border-radius: 38px; overflow: hidden; }
  main { padding: 26px 28px 118px; }
}

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

@media (max-width: 430px) {
  .in-app-report { grid-template-columns: auto 1fr; }
  .in-app-report button { grid-column: 1 / -1; width: 100%; }
  .signal-grid, .two-fields { grid-template-columns: 1fr; }
  .report-metrics { grid-template-columns: 1fr 1fr; }
  .report-metrics div:first-child { grid-column: 1 / -1; }
  .observation-dialog { max-height: 95vh; }
  .comparison-grid { grid-template-columns: 1fr; }
  .welcome-row { display: block; }
  .account-actions { margin-bottom: 12px; }
}
