/* Shared presentation rules. Page-specific structure lives in styles.css. */
:root {
  --canvas: #eef3f9;
  --ink: #29364d;
  --muted: #69778b;
  --line: #e3e9f1;
  --berry: #56679a;
  --soft: #eef3f9;
  --shadow: 0 4px 20px rgba(40, 60, 90, .035);
  --card-title: calc(17px + var(--font-bump));
  --body-copy: calc(14px + var(--font-bump));
  --support-copy: calc(12px + var(--font-bump));
  --card-gap: 20px;
  --card-padding: 28px;
  --heading-content-gap: 16px;
  --subheading-content-gap: 12px;
  color: var(--ink);
  background: var(--canvas);
  color-scheme: light;
}
html { min-height: 100%; scroll-padding-top: calc(20px + env(safe-area-inset-top)); }
body { min-height: 100svh; background: var(--canvas); font-size: var(--body-copy); line-height: 1.65; }
body::before {
  inset: 0; z-index: 0; filter: none; transform: none; opacity: 1;
  background-image: radial-gradient(ellipse at 12% 20%, rgba(139,189,220,.36), transparent 60%),
    radial-gradient(ellipse at 90% 55%, rgba(168,155,219,.30), transparent 62%),
    radial-gradient(ellipse at 45% 90%, rgba(114,193,181,.25), transparent 60%);
  background-size: 155% 150%, 150% 160%, 160% 150%;
  background-position: 0% 0%, 100% 20%, 20% 100%;
  /* Let Safari's solid edge tint meet the same canvas without a hard seam. */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 calc(150px + env(safe-area-inset-top)));
  mask-image: linear-gradient(to bottom, transparent, #000 calc(150px + env(safe-area-inset-top)));
  animation: canvasFlow 28s ease-in-out infinite alternate;
  will-change: auto;
}
@keyframes canvasFlow {
  from { background-position: 0% 0%, 100% 20%, 20% 100%; }
  to { background-position: 100% 65%, 0% 90%, 90% 0%; }
}
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; background-position: 35% 30%, 65% 45%, 50% 65%; }
}
body::after { content: none; }
#app { position: relative; }
.shell { min-height: 100svh; grid-template-columns: 212px minmax(0, 1fr); }
.sidebar { padding-top: calc(32px + env(safe-area-inset-top)); background: #fbfcfe; }
.main {
  display: grid; align-content: start; gap: var(--card-gap);
  max-width: 1300px; margin: 0 auto; outline: none;
  padding: calc(32px + env(safe-area-inset-top)) clamp(24px, 4vw, 56px) 56px;
}
.main > *, .main > .card-pad + .card-pad { margin: 0; }
.stack, .network-page-stack, .two-col, .home-daily, .home-lower, .daily-side, .calendar-below, .account-grid { gap: var(--card-gap); }
.stack > .card, .network-page-stack > .card, .account-grid > .card, .home-daily > .card, .two-col > .card { margin: 0; }
.home-lower { display: block; }
.home-lower .daily-side { display: block; }
.topbar, .topbar-home { margin: 0; }
.topbar h1 { font-size: calc(25px + var(--font-bump)); line-height: 1.5; letter-spacing: .025em; }
.topbar-subtitle { font-size: var(--support-copy); line-height: 1.8; margin-top: 8px; color: var(--muted); }
.top-logout { font-weight: 500; color: var(--muted); }
.font-toggle-compact { width: 36px; height: 36px; min-height: 36px; border-color: var(--line); box-shadow: none; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.card-pad, .memo-card, .reading-card, .focus-card, .home-focus .focus-card { padding: var(--card-padding); }
.home-focus .focus-card { background: #f9fcfd; border-color: #dce8ed; box-shadow: var(--shadow); backdrop-filter: none; -webkit-backdrop-filter: none; }
.card h2, .section-head h2, .account-card h2, .network-intro .section-head h2,
.home-focus .focus-heading h2, .home-daily .reading-card .top h2, .home-daily .memo-card h2,
.guideline-intro h2, .guideline-section h2, .current-stage-card h2 {
  font-size: var(--card-title); font-weight: 600; line-height: 1.55; letter-spacing: .035em; margin: 0;
}
.card .eyebrow + h2 { margin-top: 6px; }
.eyebrow { font-size: calc(9px + var(--font-bump)); letter-spacing: .17em; color: #7b89a3; }
.note, .section-head p, .small, .empty-panel { font-size: var(--support-copy); line-height: 1.85; color: var(--muted); }
.card h2 + .note { margin: 12px 0 20px; }
.card p.note:last-child { margin-bottom: 0; }
/* A heading owns no bottom margin; its following content owns the gap. */
.main .card h2 + :not(.eyebrow) { margin-block-start: var(--heading-content-gap); }
.main .card h3 + :is(p, div, ul, ol, form) { margin-block-start: var(--subheading-content-gap); }
.main .card :is(.section-head, .section-title-row, .focus-heading, .journey-heading) > :is(h2, h3) + * { margin-block-start: 0; }
.guideline-group h3, .reading-text h3 { margin-bottom: 0; }
.journey-heading + .journey-subtitle { margin-block: var(--subheading-content-gap); }
.section-head { align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: nowrap; }
.section-head > div:first-child { min-width: 0; flex: 1; }
.section-head > .pill { flex: none; }
.report-section-head { flex-wrap: wrap; }
.report-section-head > div:first-child { flex-basis: 260px; }
.section-head p { margin-top: var(--heading-content-gap); }
.section-head.counted-section-head { display: block; }
.section-title-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.section-title-row h2 { flex: 1; min-width: 0; }
.member-total { flex: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.counted-section-head > .note { margin: var(--heading-content-gap) 0 0; }
.member-row.participation-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; }
.participation-name { min-width: 0; overflow-wrap: anywhere; }
.participation-status { justify-self: end; align-self: center; white-space: nowrap; }
.participation-detail { grid-column: 1 / -1; color: var(--muted); font-size: var(--support-copy); line-height: 1.8; overflow-wrap: anywhere; }
.empty-panel { padding: 28px 12px; }
.account-value, .account-email { color: #35496a; font-family: inherit; font-size: calc(18px + var(--font-bump)); font-weight: 650; line-height: 1.65; margin-top: 14px; }
.account-card .note { margin-top: 14px; }
.current-stage-card { background: #f8fbfd; }
.current-stage-card > p.stage-value { font-size: calc(24px + var(--font-bump)); font-weight: 650; line-height: 1.5; color: #354e76; margin: 14px 0; }
.current-stage-card .note { margin-top: 14px; }
.journey-heading h3 { font-family: inherit; font-size: calc(16px + var(--font-bump)); }
.journey-metric { padding: 20px; background: #f6f9fc; border-color: var(--line); }
.journey-metric p { line-height: 1.8; }
.checkpoint-row { padding: 16px 0; }
.checkpoint-main strong { font-size: calc(13px + var(--font-bump)); font-weight: 600; }
.checkpoint-main small { color: var(--muted); }

/* Controls: one primary action, quiet secondary actions, visible focus. */
button, summary, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid #6b84b1; outline-offset: 4px; }
.button { min-height: 44px; padding: 10px 18px; border-radius: 10px; font-size: calc(13px + var(--font-bump)); line-height: 1.5; font-weight: 600; box-shadow: none; }
.button:hover:not(:disabled) { transform: none; }
.button.small-btn { min-height: 40px; padding: 9px 14px; font-size: var(--support-copy); }
.button.light { color: #435b84; background: #edf2f9; }
.button.ghost { background: #fff; border-color: var(--line); color: #586b87; }
.link, .text-button, .back-link { font-size: var(--support-copy); line-height: 1.6; font-weight: 600; }
.inline-link { padding: 0; border: 0; background: none; color: #536c97; text-decoration: underline; text-underline-offset: 3px; font: inherit; }
.field > span, .birth-field legend { font-size: var(--support-copy); font-weight: 600; color: #46556e; margin-bottom: 8px; }
.field input, .field textarea, .field select, input.input, select.input, textarea.input,
.birth-controls input, .birth-controls select { font-size: var(--body-copy); line-height: 1.5; min-height: 46px; border-radius: 10px; padding: 12px; color: var(--ink); }
.field textarea { min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: #8d97a5; opacity: 1; }
.auth-box .field select, .auth-box .birth-controls select,
.demographics-card .field select, .demographics-card .birth-controls select {
  appearance: none; -webkit-appearance: none; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7e98' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px 16px;
}
.form-grid { gap: 20px 16px; }
.form-grid > .note { margin: 0; }
.editor-disclosure > summary { min-height: 40px; padding: 9px 14px; border: 0; background: #edf2f9; border-radius: 9px; font-weight: 600; font-size: var(--support-copy); }
.editor-disclosure[open] > summary { margin-bottom: 20px; }
.editor-disclosure form { gap: 16px; }
.editor-disclosure > form { margin-top: 0; }
.editor-disclosure form .form-grid { margin-bottom: 0; }
#event-form .form-grid, #personal-event-form .form-grid { margin-top: 0; }
.account-card > .editor-disclosure > summary, .withdrawal-card > .editor-disclosure > summary,
.introducer-card > .editor-disclosure > summary { padding: 4px 0; border: 0; background: transparent; min-height: 32px; font-weight: 500; }
.disclosure-summary { display: inline-flex; align-items: center; gap: 8px; list-style: none; }
.disclosure-summary::-webkit-details-marker { display: none; }
.disclosure-summary::marker { content: ''; }
.disclosure-label { display: block; min-width: 0; line-height: 1.6; }
.disclosure-chevron { display: block; width: 16px; height: 16px; flex: 0 0 16px; color: #7d8fa9; transform-origin: center; transition: transform .16s ease; }
details[open] > .disclosure-summary > .disclosure-chevron { transform: rotate(180deg); }
.person-editor > .disclosure-summary > .disclosure-label { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 16px; }
@media (prefers-reduced-motion: reduce) { .disclosure-chevron { transition: none; } }
.editor-disclosure.person-editor > summary { display: flex; background: none; padding: 10px 0; width: 100%; }
.person-row { padding: 12px 0; }
.person-editor > summary strong { color: #334361; font-size: var(--body-copy); font-weight: 600; }
.person-editor > summary small { font-size: var(--support-copy); }
.person-editor .edit-word { font-weight: 500; }
.person-editor > summary small.person-meta { display: flex; flex-wrap: wrap; gap: 3px 8px; }
.person-meta > span { white-space: nowrap; }
.person-editor > .disclosure-summary > .disclosure-label > span:first-child { min-width: 0; flex: 1; }
.person-fields { padding-top: 14px; }
.form-actions { gap: 12px; }

/* Rows reserve space for an unobtrusive, title-aligned menu. */
.quiet-row { padding: 20px 0; gap: 12px; }
.quiet-row strong, .person-summary-head strong { font-size: var(--body-copy); font-weight: 650; line-height: 1.6; }
.quiet-row small, .quiet-row p, .person-summary-head span, .person-summary-head small { font-size: var(--support-copy); color: var(--muted); }
.compact-menu > summary, .personal-event-row .compact-menu > summary { width: 40px; height: 40px; color: #7a8aa2; font-size: 18px; background: none; border: 0; }
.quiet-row > .compact-menu { margin-top: -9px; }
.personal-event-row { padding-right: 48px; }
.personal-event-row > .compact-menu { top: 11px; margin: 0; right: -6px; }
.compact-menu-items, .personal-event-row .compact-menu-items { top: 40px; right: 0; min-width: 148px; border-radius: 12px; padding: 5px; box-shadow: 0 8px 28px #243d6126; }
.compact-menu-items button { min-height: 44px; font-size: var(--support-copy); }
.compact-menu.opens-above > .compact-menu-items { top: auto; bottom: 40px; }
.event-date { width: 68px; min-width: 68px; height: 74px; padding: 12px 10px; flex-shrink: 0; border-radius: 12px; gap: 5px; }
.event-date small { font-size: calc(11px + var(--font-bump)); }
.event-date b { font-size: calc(26px + var(--font-bump)); white-space: nowrap; line-height: 1; }
.event-item { padding: 20px 0; gap: 16px; }
.event-item strong { font-size: var(--body-copy); line-height: 1.6; }
.event-item p { font-size: var(--support-copy); line-height: 1.75; color: var(--muted); }
.event-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.event-title-row strong { min-width: 0; flex: 1; }
.event-title-row > .pill { flex: 0 1 auto; max-width: 50%; text-align: center; }
.event-with-actions { align-items: flex-start; }
.event-with-actions > .event-date { margin-top: 2px; }
.participation-actions .button.small-btn { min-height: 38px; font-size: calc(11px + var(--font-bump)); padding: 8px 12px; }
.participation-actions .button.ghost { flex: 0 0 auto; border: 0; background: none; padding-left: 0; padding-right: 0; color: var(--muted); }
.calendar-head { margin-bottom: 16px; }
.calendar-detail { background: #f5f8fc; }
.calendar-detail .quiet-row { padding-bottom: 8px; }
.calendar-legend { line-height: 1.7; }
.calendar .day { min-height: 56px; }
.calendar .day.has-content { min-height: 64px; }
.calendar .day.selected { background: #e9f1f8; }
.icon-btn { width: 36px; height: 36px; color: #60738c; }
.schedule-controls .date-input { font-size: var(--support-copy); line-height: 1.5; min-height: 46px; }
.tabs { margin-bottom: 0; gap: 6px; }
.tabs button { min-height: 46px; padding: 10px 16px; font-size: var(--support-copy); }
.tabs button.active { color: #3f5989; border-color: #6d83ac; }
.leader-current-heading, .leader-match + .leader-current-heading { margin: 32px 0 16px; font-size: var(--card-title); }
.network-counts { margin: 20px 0; }
.outreach-actions { margin-top: 20px; }
.outreach-actions > .editor-disclosure { flex: 0 1 auto; }
.outreach-actions > .editor-disclosure[open] { flex-basis: 100%; }
.share-link input { background: #f7f9fc; font-size: var(--support-copy); }
.notice-row { padding: 20px 0; }
.notice-list h2 { margin-bottom: 0; }
.notice-row-title { font-size: var(--body-copy); }
.notice-row-preview { font-size: var(--support-copy); }
.notice-detail h2 { font-size: calc(19px + var(--font-bump)); line-height: 1.7; margin: 14px 0 0; }
.notice-detail .notice-back, .back-link { font-size: calc(11px + var(--font-bump)); font-weight: 500; }
.notice-detail-body, .experience-body, .saved-memo { font-size: var(--body-copy); line-height: 1.9; }
.experience-form textarea { min-height: 140px; }
.experience-privacy { font-size: calc(11px + var(--font-bump)); line-height: 1.8; color: #78869a; }
.profile-return-note { color: #63748e; font-size: var(--support-copy); margin: 16px 0 8px; }
.demographics-card { scroll-margin-top: calc(24px + env(safe-area-inset-top)); }
.experience-entry > .experience-body { margin: 0; }
.experience-entry-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 12px; }
.experience-entry-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; flex: 1; min-width: 0; color: #78869a; font-size: calc(10px + var(--font-bump)); line-height: 1.7; padding-block: 6px; }
.experience-entry-meta time { white-space: nowrap; color: #8590a1; }
.experience-entry-bottom > .experience-good { flex: none; }
.experience-good { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 30px; padding: 4px 8px; border: 1px solid #e1e7ef; border-radius: 15px; background: transparent; color: #6b7e98; font: inherit; font-size: calc(11px + var(--font-bump)); line-height: 1.4; white-space: nowrap; cursor: pointer; }
.experience-good::after { content: ""; position: absolute; inset: -7px -3px; }
.experience-good svg { width: 15px; height: 15px; stroke-width: 1.6; flex: none; }
.experience-good-count { font-variant-numeric: tabular-nums; min-width: 1ch; }
.experience-good.is-active { color: #49689b; background: #edf2fa; border-color: #cbd8ed; }
.experience-good.is-active svg { fill: #dbe6f6; }
.experience-good:hover { background: #f0f4fa; }
.experience-good:focus-visible { outline: 2px solid #5978aa; outline-offset: 3px; }
.experience-good:disabled { opacity: .6; cursor: wait; }
.public-initial-field input { display: block; width: 88px; text-transform: uppercase; }
.public-initial-field small { display: block; margin-top: 8px; font-size: var(--support-copy); color: #78869a; line-height: 1.8; }
.experience-tabs button { min-height: 44px; }
.experience-entry-footer > .editor-disclosure[open], .experience-saved-actions > .editor-disclosure[open] { flex-basis: 100%; }
.reading-card .reading-tap { position: static; box-shadow: none; }
.reading-text { margin-top: 24px; padding-top: 24px; }
.reading-text h3 { font-size: var(--card-title); line-height: 1.7; }
.reading-text p { font-size: calc(17px + var(--font-bump)); line-height: 2; margin: 0; white-space: normal; text-wrap: wrap; line-break: strict; text-align: justify; text-align-last: start; text-justify: inter-ideograph; }
.reading-text p:last-child { margin-bottom: 15px; }
.auth-box h2 { font-size: calc(25px + var(--font-bump)); }
.auth-simple .auth-box h1 { font-size: calc(25px + var(--font-bump)); line-height: 1.5; }
.auth-wrap.auth-simple { padding-top: calc(24px + env(safe-area-inset-top)); padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.auth-box form .birth-field, .auth-box form .demographic-selects, .auth-box form .registration-profile-note { margin: 0; }
.auth-visual { animation: none; }
.auth-panel { padding-top: calc(48px + env(safe-area-inset-top)); padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
.auth-box .intro { font-size: var(--body-copy); margin-bottom: 28px; }
.registration-login-note { font-size: var(--support-copy); line-height: 1.8; color: #536781; background: #f2f6fb; border-radius: 10px; padding: 12px 14px; margin: 0; }
.registration-share { border-block: 1px solid var(--line); padding-block: 24px; }
.registration-share h2 { font-size: var(--card-title); line-height: 1.7; margin: 0 0 12px; }
.registration-share .note { margin: 0; }
.registration-share .registration-code { margin: 20px 0; font-size: calc(32px + var(--font-bump)); letter-spacing: .12em; }
.registration-share-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.registration-share-actions a { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.registration-next-note { margin: 20px 0; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 210; background: #fff; padding: 12px 20px; border-radius: 8px; }
.skip-link:focus { top: calc(12px + env(safe-area-inset-top)); }
.toast { z-index: 220; bottom: 28px; }

@media (max-width: 980px) {
  .shell { grid-template-columns: 180px minmax(0, 1fr); }
  .main { padding-inline: 24px; }
}
@media (max-width: 700px) {
  :root { --card-padding: 22px; }
  .home-daily .reading-card { padding: 18px; }
  .reading-card .top { gap: 10px; }
  .reading-card .top .eyebrow { font-size: calc(9px + var(--font-bump)); }
  .reading-card .reading-progress { padding: 12px 0 8px; }
  .reading-card .remaining strong { font-size: 38px; }
  .reading-card .remaining small { font-size: calc(18px + var(--font-bump)); }
  .reading-card .nine-steps { margin-top: 8px; }
  .reading-card .nine-steps span { padding-block: 4px; }
  .reading-card .reading-encourage { margin: 8px 0 0; font-size: calc(11px + var(--font-bump)); line-height: 1.5; }
  .reading-card .reading-text { margin-top: 14px; padding-top: 14px; padding-bottom: 0; }
  .reading-card .reading-text h3 { font-size: calc(15px + var(--font-bump)); line-height: 1.6; margin-top: 0; }
  .home-daily .reading-card .reading-text p { font-size: calc(15px + var(--font-bump)); line-height: 1.65; }
  .main .reading-card .reading-text h3 + p { margin-top: 10px; }
  .reading-card .reading-text p:last-child { margin-bottom: 0; }
  .reading-card .reading-tap { margin-top: 14px; min-height: 44px; padding: 10px 12px; font-size: calc(12px + var(--font-bump)); }
  .reading-card .foot { margin-top: 8px; font-size: calc(10px + var(--font-bump)); line-height: 1.5; }
  .shell { display: block; }
  .main { padding: calc(20px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(100px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .topbar h1 { font-size: calc(21px + var(--font-bump)); }
  .topbar-subtitle { font-size: var(--support-copy); }
  .topbar-heading-row { gap: 8px; }
  .topbar-actions { gap: 3px; }
  .top-logout { padding-inline: 4px; font-size: calc(10px + var(--font-bump)); }
  .font-toggle-compact { width: 32px; height: 34px; min-height: 34px; }
  .card { border-radius: 15px; }
  .home-daily, .two-col, .account-grid, .calendar-below { grid-template-columns: minmax(0, 1fr); }
  .home-focus .focus-card { padding: var(--card-padding); }
  .journey-metrics { gap: 12px; }
  .journey-metric { padding: 16px; }
  .journey-metric > strong { font-size: calc(32px + var(--font-bump)); }
  .calendar .day { min-height: 44px; padding: 6px; }
  .calendar .day.has-content { min-height: 52px; }
  .calendar .weekday { padding: 3px 0 6px; }
  .calendar-head { flex-wrap: wrap; gap: 12px; }
  .calendar-head .eyebrow { display: none; }
  .month-nav { width: 100%; justify-content: space-between; }
  .calendar-legend { gap: 8px 12px; }
  .tabs { margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
  .participation-actions .button { flex: 1 1 auto; min-width: 0; }
  .participation-actions .button.ghost { flex: 0 0 auto; }
  .field input, .field textarea, .field select, input.input, select.input, textarea.input,
  .birth-controls input, .birth-controls select { font-size: max(16px, var(--body-copy)); }
  .schedule-controls select { font-size: max(16px, var(--body-copy)); padding: 10px 2px; }
  .schedule-controls { grid-template-columns: minmax(0, 1fr) 62px 62px; gap: 6px; }
  .mobile-nav { padding: 8px max(4px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left)); background: #fbfcfe; box-shadow: none; }
  .mobile-nav button { min-height: 48px; font-weight: 500; gap: 5px; color: #7f8a9b; }
  .mobile-nav button span:not(.nav-badge) { font-size: calc(9px + var(--font-bump)); }
  .mobile-nav svg { width: 21px; height: 21px; }
  .mobile-nav button.active { color: #466392; font-weight: 700; }
  .mobile-nav button.active::before { content: ''; position: absolute; width: 28px; height: 2px; border-radius: 2px; background: #7690b7; top: -8px; }
  .toast { bottom: calc(88px + env(safe-area-inset-bottom)); }
  .auth-visual { padding-top: calc(28px + env(safe-area-inset-top)); min-height: 200px; }
  .auth-panel { padding: 32px 24px calc(36px + env(safe-area-inset-bottom)); }
  .auth-simple .auth-panel { padding: 0; }
  .auth-wrap.auth-simple { padding: calc(16px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
}
@media (max-width: 360px) {
  :root { --card-padding: 18px; }
  .home-daily .reading-card { padding: 14px; }
  .reading-card .reading-text { margin-top: 12px; padding-top: 12px; }
  .reading-card .reading-text h3 { font-size: calc(14px + var(--font-bump)); }
  .home-daily .reading-card .reading-text p { font-size: calc(14px + var(--font-bump)); line-height: 1.6; }
  .reading-card .reading-tap { margin-top: 12px; }
  .main { padding-inline: 12px; }
  .topbar-heading-row { flex-wrap: wrap; }
  .topbar-heading-row h1 { flex-basis: 100%; }
  .topbar-actions { margin-left: auto; }
  .journey-metrics { grid-template-columns: minmax(0, 1fr); }
  .event-item { gap: 12px; }
  .schedule-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-controls .date-input { grid-column: 1 / -1; }
  .tabs { margin-inline: -12px; padding-inline: 12px; }
  .mobile-nav button span:not(.nav-badge) { font-size: calc(8px + var(--font-bump)); }
  .birth-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .birth-controls > label:first-child { grid-column: 1 / -1; }
}
