/* Nūr Home — Fitplan-inspired 2026 visual system
   Warm editorial typography, confident contrast, soft colour zoning and roomy layouts. */

:root {
  --bg: #f3f1ed;
  --surface: #fffefb;
  --surface-solid: #fffefb;
  --ink: #242126;
  --muted: #878188;
  --line: #e8e4df;
  --accent: #ff7654;
  --accent-deep: #d94d2f;
  --accent-soft: #ffd2c4;
  --sage: #a9c783;
  --peach: #ff9e81;
  --lilac: #afa3ef;
  --blue: #83bfd6;
  --gold: #edc34f;
  --danger: #c95757;
  --shadow: 0 22px 60px rgba(43, 37, 44, .10);
  --shadow-soft: 0 10px 30px rgba(43, 37, 44, .075);
  --radius-lg: 26px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --sidebar: 252px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Text", "Segoe UI", sans-serif;
  background: var(--bg);
}

html { background: var(--bg); }
body {
  background:
    radial-gradient(circle at 74% -8%, rgba(255, 208, 192, .24), transparent 30%),
    var(--bg);
}

h1, h2, h3, .date-number, .stat-value, .budget-figure, .brand-row strong {
  font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", Inter, ui-sans-serif, system-ui, sans-serif !important;
}

button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline-color: rgba(239, 127, 97, .38);
}

.ambient-one {
  width: 520px;
  height: 520px;
  top: -300px;
  right: -120px;
  opacity: .45;
  background: radial-gradient(circle, rgba(239,127,97,.2), transparent 68%);
}
.ambient-two { display: none; }

/* Desktop shell */
.app-shell { grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar {
  inset: 16px auto 16px 16px;
  width: calc(var(--sidebar) - 20px);
  padding: 24px 15px 16px;
  border: 0;
  border-radius: 27px;
  color: #fffaf5;
  background:
    radial-gradient(circle at 15% 0%, rgba(239,127,97,.14), transparent 27%),
    linear-gradient(165deg, #302c31 0%, #211e22 68%, #1c1a1d 100%);
  box-shadow: 0 25px 62px rgba(34, 30, 35, .22);
  overflow: hidden;
}
.sidebar::after {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  left: -125px;
  bottom: 110px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 50%;
  box-shadow: 0 0 0 32px rgba(255,255,255,.018), 0 0 0 65px rgba(255,255,255,.012);
  pointer-events: none;
}
.brand-row { position: relative; z-index: 1; gap: 11px; padding: 0 10px; }
.brand-row strong { font-size: 21px; font-weight: 760; letter-spacing: -.75px; }
.brand-row span { color: rgba(255,255,255,.48); font-size: 10px; letter-spacing: .02em; }
.brand-mark {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: transparent;
  font-size: 0;
  background: linear-gradient(145deg, #ffa88b, #eb7255);
  box-shadow: 0 10px 24px rgba(230, 105, 76, .26);
  overflow: hidden;
}
.brand-mark::before {
  content: "";
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff9f0;
  box-shadow: 6px -2px 0 1px #f47d5e;
  transform: translateX(-2px);
}
.brand-mark::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  top: 10px;
  right: 9px;
  background: #fff9f0;
}
.brand-mark-large { width: 62px; height: 62px; border-radius: 21px; margin-bottom: 24px; }
.brand-mark-large::before { width: 25px; height: 25px; box-shadow: 9px -3px 0 2px #f47d5e; }
.brand-mark-large::after { width: 6px; height: 6px; top: 15px; right: 14px; }

.main-nav { position: relative; z-index: 1; gap: 3px; margin-top: 35px; }
.main-nav::before {
  content: "YOUR HOME";
  display: block;
  padding: 0 13px 10px;
  color: rgba(255,255,255,.30);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .15em;
}
.nav-item {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 13px;
  color: rgba(255,255,255,.58);
  font-size: 12px;
  font-weight: 520;
}
.nav-item:hover { color: white; background: rgba(255,255,255,.07); transform: none; }
.nav-item.active {
  color: #272329;
  background: #fffaf4;
  font-weight: 720;
  box-shadow: 0 10px 24px rgba(0,0,0,.17);
}
.nav-item.active::before { display: none; }
.nav-item svg { width: 18px; height: 18px; }
.nav-item .nav-count { color: #6c3c31; background: #ffd8ca; }
.sidebar-bottom { position: relative; z-index: 1; }
.quiet-card {
  grid-template-columns: 27px 1fr auto;
  padding: 12px;
  margin: 0 0 9px;
  border: 1px solid rgba(255,255,255,.08);
  color: #fff;
  background: rgba(255,255,255,.06);
}
.quiet-card span, .quiet-card .quiet-icon { color: rgba(255,255,255,.48); }
.quiet-card .switch { background: #6a626b; }
.quiet-card .switch.is-on { background: var(--accent); }
.profile-button { border-color: rgba(255,255,255,.09); color: white; }
.profile-button .profile-copy small { color: rgba(255,255,255,.43); }
.profile-button > span:last-child { color: rgba(255,255,255,.42); }
.avatar { border-color: rgba(255,255,255,.75); box-shadow: 0 6px 16px rgba(30,24,31,.14); }

.main-content {
  grid-column: 2;
  width: min(100%, 1540px);
  min-height: 100vh;
  padding: 40px clamp(28px, 3.8vw, 66px) 178px;
  background: transparent;
}
.topbar { min-height: 82px; margin-bottom: 28px; align-items: flex-start; }
.page-kicker { margin-bottom: 9px; font-size: 11px; font-weight: 650; }
.profile-kicker i { box-shadow: 0 0 0 5px color-mix(in srgb, var(--member-accent) 13%, transparent); }
.page-title { font-size: clamp(34px, 3.5vw, 50px); line-height: 1.03; letter-spacing: -2.25px; font-weight: 760; }
.page-title span { color: var(--ink); position: relative; }
.page-title span::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 0;
  bottom: 1px;
  height: 8px;
  z-index: -1;
  border-radius: 8px;
  background: color-mix(in srgb, var(--member-accent) 34%, #ffd7ca);
}
.page-subtitle { margin-top: 10px; font-size: 13px; }
.top-actions { gap: 8px; }
.icon-button, .close-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 7px 20px rgba(45,38,45,.055);
}
.soft-dot { background: var(--accent); }
.view-container { animation-duration: .45s; }

/* Card language */
.dashboard-grid { grid-template-columns: minmax(0, 1.34fr) minmax(310px, .66fr); gap: 18px; }
.stack { gap: 18px; }
.card {
  border: 0;
  border-radius: 24px;
  background: var(--surface);
  padding: 23px;
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 12px 35px rgba(46,39,47,.055);
}
.card-hover:hover { transform: translateY(-3px); box-shadow: 0 18px 42px rgba(46,39,47,.09); }
.card-head { margin-bottom: 17px; }
.card-head h2, .card-head h3 { font-size: 16px; font-weight: 750; }
.card-head p { font-size: 10px; }
.card-head > svg { width: 20px; height: 20px; flex: 0 0 auto; }
.text-button { color: var(--accent-deep); font-weight: 720; }

.day-card {
  position: relative;
  padding: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% -10%, rgba(217,210,244,.63), transparent 30%),
    var(--surface);
}
.day-card::after {
  content: "TODAY";
  position: absolute;
  right: 28px;
  bottom: 16px;
  color: rgba(36,33,38,.025);
  font-size: 76px;
  font-weight: 900;
  letter-spacing: -.06em;
  pointer-events: none;
}
.day-summary { position: relative; z-index: 1; }
.date-number {
  width: 60px;
  height: 64px;
  border-radius: 19px;
  color: #2a2325;
  background: linear-gradient(145deg, #ffad91, #f18465);
  box-shadow: none;
  font-size: 26px;
}
.date-block h2 { font-size: 19px; }
.timeline { position: relative; z-index: 1; }
.timeline::before { background: #e5e0e5; }
.timeline-content::before { box-shadow: 0 0 0 5px var(--event-bg); }

.home-grid { gap: 10px; }
.mini-area {
  min-height: 132px;
  padding: 18px;
  border: 0;
  border-radius: 21px;
  box-shadow: none;
}
.mini-area:nth-child(1) { --area-bg: #ffad94 !important; }
.mini-area:nth-child(2) { --area-bg: #b8acf2 !important; }
.mini-area:nth-child(3) { --area-bg: #9ecce0 !important; }
.mini-area:nth-child(4) { --area-bg: #f0ca58 !important; }
.mini-area:hover { box-shadow: 0 14px 30px rgba(46,39,47,.08); }
.mini-icon { width: 36px; height: 36px; margin-bottom: 20px; border-radius: 12px; background: rgba(255,255,255,.72); }
.mini-area strong { color: #2a262a; font-size: 13px; }
.mini-area span { color: rgba(42,38,42,.58); }

.prayer-card {
  color: white;
  background: linear-gradient(145deg, #343038 0%, #28242b 54%, #453b45 100%);
  box-shadow: 0 18px 40px rgba(37,31,38,.16);
}
.prayer-card::after { border-color: rgba(255,255,255,.09); }
.wellbeing-strip { background: #fffaf6; }
.wellbeing-icon { color: #8f321d; background: #ffb59f; }
.water-mini-track { background: #eee8e3; }
.water-mini-track span { background: linear-gradient(90deg, #ffa084, #ef785b); }
.water-add { background: #302c31; }
.list-row { border-color: #eeeae6; }
.check { border-color: #c8c1c4; background: white; }
.check.done { border-color: var(--accent); background: var(--accent); }
.tag { color: #6e5b4a; background: #f2e8dc; }

.content-grid { grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; }
.section-tabs { border: 0; padding: 4px; margin-bottom: 18px; background: #e9e5e1; }
.section-tabs button { border-radius: 10px; font-weight: 600; }
.section-tabs button.active { background: var(--surface); box-shadow: 0 4px 13px rgba(46,39,47,.08); }
.primary-button, .soft-button, .danger-button { min-height: 44px; border-radius: 13px; font-weight: 720; }
.primary-button { color: #2e2221; background: linear-gradient(145deg, #ff9d80, #ef795b); box-shadow: 0 9px 20px rgba(218,92,61,.18); }
.primary-button:hover { color: white; background: var(--accent-deep); }
.soft-button { color: #3a3134; background: #eee9e5; }
.field { border: 0; border-radius: 13px; background: #f3f0ed; }
.field:focus { box-shadow: 0 0 0 3px rgba(239,127,97,.16); }
.soft-progress { background: #ede8e4; }
.soft-progress span { background: var(--progress, var(--accent)); }
.day-pill { background: #ece8e4; }
.day-pill.active { color: #3b2420; background: #ffc1ae; }
.day-pill.active strong { color: #2f2425; background: var(--accent); }

/* Feature surfaces */
.meal-hero {
  background:
    radial-gradient(circle at 92% 12%, rgba(255,255,255,.46), transparent 30%),
    linear-gradient(135deg, #ffb49c 0%, #ff8b68 100%);
}
.meal-hero::after { border-color: rgba(63,40,43,.10); }
.plan-health, .repeat-pill { color: #594843; background: rgba(255,255,255,.58); }
.water-card { background: linear-gradient(150deg, #a8d7e7, #7fc2d8); }
.water-orb { color: #215f73; background: rgba(255,255,255,.72); }
.water-dots span { background: rgba(255,255,255,.55); }
.water-dots button.filled span { background: linear-gradient(180deg, #80bdce, #4d91a5); }
.mood-card { background: #b9adf1; }
.mood-options button { border: 0; background: rgba(255,255,255,.46); }
.mood-options button.selected { border: 0; background: white; }
.mood-response { background: rgba(255,255,255,.52); }
.sleep-card { background: #efd064; }
.trip-cover { height: 145px; background: linear-gradient(135deg, #d8d2f1, #f3bdaa); }
.trip-cover::before { opacity: .28; }
.budget-total { background: linear-gradient(145deg, #f3d363, #f1b95d); }
.budget-figure small { font-family: inherit; }
.integration-status, .cloud-setup-note { background: #eeeae6; }
.install-card { background: #a8cde0; }
.voice-home-card { background: #bcb1ee; }
.profile-card.selected { box-shadow: 0 0 0 2px var(--accent), 0 14px 34px rgba(46,39,47,.09); }

.chat-card { border-radius: 24px; }
.chat-scroll { min-height: 440px; }
.message-bubble { color: #3c3539; background: #eee9e5; }
.message.mine .message-bubble { color: #2c2324; background: #ffb19a; }
.mention-row, .chat-composer { border-color: #ebe6e2; background: #fffdfa; }
.mention-row button { border: 0; color: #5f5056; background: #ece8e4; }

/* Calendar: generous planner board */
.calendar-shell { grid-template-columns: 276px minmax(0, 1fr); gap: 18px; }
.calendar-rail { padding: 12px; border: 0; border-radius: 25px; background: #29262b; box-shadow: 0 18px 42px rgba(37,31,38,.13); }
.rail-panel { border: 0; border-radius: 19px; background: #fffefa; }
.calendar-rail .rail-panel:first-child { background: #f6f1ec; }
.calendar-board { border-radius: 25px; box-shadow: 0 12px 34px rgba(46,39,47,.055); }
.calendar-board-head h2 { font-size: 26px; }
.mini-month-head span { display: flex; gap: 3px; }
.mini-month-head button { width: 26px; height: 26px; border: 0; border-radius: 9px; color: #6f6870; background: #ece7e2; cursor: pointer; }
.mini-month-head button:hover { color: #241f25; background: #ffb49c; }
.calendar-week-head button.today strong { color: #2d2426; background: var(--accent); box-shadow: none; }
.calendar-event-block { border: 0; border-radius: 14px; box-shadow: none; }
.calendar-day-column.today { background: rgba(239,127,97,.035); }

/* Nūr assistant */
.ai-dock { bottom: 22px; width: min(720px, calc(100vw - var(--sidebar) - 72px)); }
.ai-glow { background: rgba(239,127,97,.14); }
.ai-dock-inner {
  min-height: 72px;
  border: 0;
  border-radius: 22px;
  background: rgba(255,254,251,.94);
  box-shadow: 0 20px 55px rgba(37,31,38,.14);
}
.assistant-orb { color: #302328; background: linear-gradient(145deg, #ffd0c0, #f28a6d); }
.send-button { color: #fff; background: #2c282e; }
.send-button:hover { background: #171519; }
.quick-prompts button { border: 0; color: #625b61; background: rgba(255,254,251,.9); box-shadow: 0 6px 17px rgba(42,35,42,.07); }
.assistant-panel, .popover, .search-dialog, .cloud-dialog { border: 0; background: rgba(255,254,251,.98); box-shadow: 0 28px 80px rgba(37,31,38,.20); }
.result-action { background: #f0ebe7; }

.row-actions, .card-actions { display: flex; align-items: center; gap: 4px; margin-left: 5px; }
.action-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: #736c71;
  background: transparent;
  cursor: pointer;
  opacity: .58;
}
.action-icon:hover { color: #28242a; background: #eee9e5; opacity: 1; }
.action-icon.danger:hover { color: #a6382c; background: #ffe0d8; }
.action-icon svg { width: 15px; height: 15px; }
.list-row:hover .action-icon, .memory-card:hover .action-icon, .trip-card:hover .action-icon { opacity: 1; }
.memory-card, .trip-card { position: relative; }
.memory-card .card-actions, .trip-card .card-actions { position: absolute; top: 14px; right: 14px; z-index: 2; }
.starter-tag { color: #642d22; background: #ffb49c; }

.editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(29,25,30,.52);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transition: .25s ease;
}
.editor-overlay.open { opacity: 1; visibility: visible; }
.editor-dialog {
  width: min(540px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow-y: auto;
  border-radius: 26px;
  padding: 25px;
  background: #fffefb;
  box-shadow: 0 35px 90px rgba(23,19,24,.28);
  transform: translateY(12px) scale(.98);
  transition: .3s var(--spring);
}
.editor-overlay.open .editor-dialog { transform: none; }
.editor-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 21px; }
.editor-head h2 { margin: 0; font-size: 24px; letter-spacing: -.8px; }
.editor-fields { display: grid; gap: 14px; }
.editor-split { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.editor-fields label, .settings-field, .prayer-time-fields label { display: flex; flex-direction: column; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.editor-fields textarea { min-height: 90px; resize: vertical; }
.editor-fields .member-checks { display: flex; gap: 9px; }
.editor-fields .member-checks label { flex-direction: row; align-items: center; padding: 10px 12px; border-radius: 12px; background: #f0ece8; }
.editor-message { min-height: 17px; margin: 9px 0 0; color: var(--danger); font-size: 11px; }
.mobile-more-popover { display: none; }
.mobile-more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mobile-more-item { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 9px 11px; border: 0; border-radius: 16px; background: #f7f1eb; color: #322c31; text-align: left; }
.mobile-more-item .mini-icon { width: 34px; height: 34px; margin: 0; background: white; }
.mobile-more-item strong { font-size: 12px; }
.mobile-more-item.active { background: #ffb09a; }
.editor-actions, .form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.editor-actions .danger-button { margin-right: auto; }
.prayer-time-fields { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; margin-top: 15px; }
.prayer-time-fields input { padding-inline: 8px; }
.settings-field > span { margin-top: 2px; }
.setup-card { text-align: left; }
.setup-card .inline-add { margin: 16px 0 0; }
.empty-list-copy { margin: 0; color: var(--muted); }

/* Entry screen is deliberately bolder, echoing Fitplan's mobile welcome. */
.privacy-gate {
  background:
    radial-gradient(circle at 8% 10%, rgba(239,127,97,.20), transparent 28%),
    radial-gradient(circle at 90% 90%, rgba(217,210,244,.14), transparent 31%),
    #211e22;
}
.privacy-card {
  width: min(440px, 100%);
  border: 0;
  border-radius: 30px;
  background: #fffaf4;
  box-shadow: 0 35px 90px rgba(0,0,0,.28);
}
.privacy-card h1 { font-size: 38px; letter-spacing: -1.8px; }
.privacy-card .eyebrow { color: var(--accent-deep); }
.member-choice { border: 0; background: #eeeae6; }
.member-choice.selected { border: 0; background: #ffb59f; box-shadow: 0 0 0 2px var(--accent) inset; }
.member-choices { grid-template-columns: repeat(2, 1fr); }
.pin-wrap input { border: 0; background: #eeeae6; }

@media (min-width: 1280px) {
  .main-content { padding-left: 54px; padding-right: 54px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.45fr) minmax(330px, .65fr); }
}

/* Tablet */
@media (max-width: 1080px) and (min-width: 761px) {
  :root { --sidebar: 98px; }
  .sidebar { width: 78px; padding-inline: 11px; }
  .sidebar .brand-row { justify-content: center; padding: 0; }
  .brand-row > div:last-child,
  .main-nav::before,
  .nav-item > span:not(.nav-count),
  .quiet-card div,
  .profile-copy,
  .profile-button > span:last-child { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-count { position: absolute; top: 2px; right: 2px; }
  .quiet-card { grid-template-columns: 1fr; justify-items: center; }
  .quiet-card .switch { display: none; }
  .profile-button { justify-content: center; }
  .main-content { padding-inline: 27px; }
  .page-kicker { font-size: 12px; }
  .page-title { font-size: 42px; letter-spacing: -1.9px; }
  .page-subtitle { font-size: 14px; }
  .card-head h2, .card-head h3 { font-size: 17px; }
  .card-head p { font-size: 11px; }
  .section-hero h2 { font-size: 22px; }
  .section-hero p { font-size: 13px; }
  .row-copy strong { font-size: 13px; }
  .row-copy span { font-size: 10.5px; }
  .timeline-content strong { font-size: 14px; }
  .timeline-content span { font-size: 11px; }
  .mini-area strong { font-size: 14px; }
  .mini-area span { font-size: 11px; }
  .meal-copy strong { font-size: 13px; }
  .meal-copy span { font-size: 10px; }
  .field, .composer-wrap textarea { font-size: 14px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid > .stack:last-child { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); align-items: start; }
}

@media (max-width: 1180px) {
  .calendar-shell { grid-template-columns: 1fr; }
  .calendar-rail { display: grid; grid-template-columns: repeat(3, 1fr); }
}

/* Mobile */
@media (max-width: 760px) {
  :root { --sidebar: 0px; }
  body { background: #f5f3ef; }
  .main-content { padding: 13px 14px calc(186px + env(safe-area-inset-bottom)); }
  .mobile-header {
    min-height: 48px;
    margin: 0 0 25px;
    padding: 2px 1px;
  }
  .mobile-header .brand-row > div:last-child { display: flex; }
  .mobile-header .brand-row span { color: var(--muted); }
  .mobile-header .brand-mark { width: 38px; height: 38px; }
  .topbar { min-height: 64px; margin-bottom: 19px; }
  .top-actions { padding-top: 2px; }
  .icon-button { width: 40px; height: 40px; background: #fffefa; }
  .page-kicker { font-size: 10px; margin-bottom: 7px; }
  .page-kicker { font-size: 11px; }
  .page-title { font-size: 34px; letter-spacing: -1.65px; line-height: 1.04; }
  .page-title span::after { height: 6px; }
  .dashboard-grid, .content-grid { grid-template-columns: 1fr; }
  .stack, .dashboard-grid { gap: 13px; }
  .card { padding: 19px; border-radius: 22px; box-shadow: 0 8px 24px rgba(46,39,47,.045); }
  .card-head h2, .card-head h3 { font-size: 17px; }
  .card-head p { font-size: 11px; }
  .section-hero h2 { font-size: 22px; }
  .section-hero p { font-size: 12px; line-height: 1.45; }
  .day-card { padding: 20px; }
  .day-card::after { font-size: 52px; right: 16px; }
  .date-number { width: 52px; height: 56px; border-radius: 17px; }
  .date-block { gap: 12px; }
  .date-block h2 { font-size: 18px; }
  .date-block p { font-size: 11.5px; line-height: 1.4; }
  .timeline-time { font-size: 10px; }
  .timeline-content strong { font-size: 14px; }
  .timeline-content span { font-size: 11px; }
  .text-button { font-size: 11.5px; }
  .row-copy strong { font-size: 13px; }
  .row-copy span { font-size: 10.5px; line-height: 1.35; }
  .tag { font-size: 9.5px; }
  .home-grid { gap: 9px; }
  .mini-area { min-height: 118px; padding: 15px; border-radius: 19px; }
  .mini-icon { margin-bottom: 15px; }
  .mini-area strong { font-size: 14px; }
  .mini-area span { font-size: 11px; line-height: 1.35; }
  .dashboard-grid > .stack:last-child { display: contents; }
  .prayer-card { margin-top: 1px; }
  .section-tabs { width: 100%; overflow-x: auto; }
  .section-tabs button { flex: 1 0 auto; }
  .calendar-board { padding: 19px 15px; order: -1; }
  .calendar-rail { display: flex; background: #29262b; }
  .calendar-board-head { gap: 13px; }
  .calendar-week-head, .calendar-canvas { min-width: 760px; }
  .meal-hero { padding: 21px; }
  .meal-hero h2 { font-size: 24px; }
  .meal-hero p { font-size: 13px; line-height: 1.55; }
  .meal-source { font-size: 10px; }
  .meal-source strong { font-size: 11px; }
  .meal-day { font-size: 10px; }
  .meal-copy strong { font-size: 13px; line-height: 1.3; }
  .meal-copy span { font-size: 10px; line-height: 1.35; }
  .wellbeing-main strong, .sleep-glance strong { font-size: 12.5px; }
  .wellbeing-main small, .sleep-glance small { font-size: 10px; }
  .mood-options span { font-size: 8.5px; }
  .mood-response strong { font-size: 11px; }
  .mood-response span { font-size: 10px; }
  .sleep-time strong { font-size: 11px; }
  .sleep-note { font-size: 10px; }
  .chat-scroll { min-height: 360px; max-height: 52vh; padding: 17px; }
  .message { max-width: 88%; }
  .message-bubble { font-size: 13px; }
  .mention-row > span, .mention-row button { font-size: 9px; }
  .field, .composer-wrap textarea { font-size: 15px; }
  .memory-grid { gap: 10px; }

  .mobile-nav {
    inset: auto 10px calc(9px + env(safe-area-inset-bottom));
    height: 66px;
    padding: 0 5px;
    border: 0;
    border-radius: 22px;
    color: rgba(255,255,255,.56);
    background: rgba(37,33,38,.96);
    box-shadow: 0 16px 36px rgba(29,24,30,.24);
    backdrop-filter: blur(28px) saturate(140%);
  }
  .mobile-nav .nav-item {
    min-height: 60px;
    border-radius: 17px;
    color: rgba(255,255,255,.52);
    font-size: 9px;
  }
  .mobile-nav .nav-item span { display: block; }
  .mobile-nav .nav-item.active { color: #292328; background: #ff9a7c; }
  .mobile-nav .nav-item.active::before { display: none; }
  .mobile-nav .nav-item .nav-count { top: 4px; right: 9px; }
  .mobile-more-popover { display: block; left: 12px; right: 12px; bottom: calc(92px + env(safe-area-inset-bottom)); width: auto; padding: 14px; }

  .ai-dock { left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); width: calc(100vw - 24px); }
  .ai-dock-inner { min-height: 62px; border-radius: 20px; padding: 8px 8px 8px 10px; }
  .ai-dock .assistant-orb { width: 40px; height: 40px; border-radius: 13px; }
  .ai-dock .send-button { width: 40px; height: 40px; }
  .ai-dock.is-compact { right: 14px; bottom: calc(88px + env(safe-area-inset-bottom)); width: 54px; }
  .ai-dock.is-compact .ai-dock-inner { min-height: 52px; padding: 6px; border-radius: 18px; }
  .ai-dock.is-compact .composer-wrap { display: none; }
  .ai-dock.is-compact .assistant-orb { width: 40px; height: 40px; }
  .ai-dock.is-compact .ai-glow { display: none; }
  .assistant-panel { right: 12px; bottom: calc(150px + env(safe-area-inset-bottom)); }
  .action-icon { width: 34px; height: 34px; opacity: .82; }
  .editor-dialog { padding: 21px; border-radius: 23px; }
  .prayer-time-fields { grid-template-columns: repeat(2,1fr); }
  .editor-split { grid-template-columns: 1fr; }
  .editor-actions > button { flex: 1; }
}

@media (max-width: 420px) {
  .privacy-card { padding: 27px 22px; }
  .privacy-card h1 { font-size: 34px; }
  .member-choices { grid-template-columns: repeat(2,1fr); }
  .page-title { max-width: 270px; }
  .day-summary { align-items: center; }
  .date-block p { max-width: 180px; }
  .mini-area strong { font-size: 12px; }
}

@media (display-mode: standalone) and (max-width: 760px) {
  .main-content { padding-top: calc(13px + env(safe-area-inset-top)); }
}
