:root {
      color-scheme: light;
      --bg: #F7F0E8;
      --bg-soft: #F3E6DA;
      --surface: #FFF8F1;
      --surface-raised: #fffdf8;
      --card: #FFF8F1;
      --card-soft: #F3E6DA;
      --card-muted: #EEDCCF;
      --heading: #8B3E38;
      --text: #5A4A42;
      --text-soft: #6B5C4D;
      --muted: #8B7A70;
      --line: #E8D7CC;
      --line-strong: #D5BFB1;
      --graphite: #5A4A42;
      --accent: #DCA18D;
      --accent-strong: #A24A3F;
      --accent-soft: #F3D8CA;
      --blue: #9DB5C4;
      --blue-strong: #6F8C9E;
      --blue-soft: #EEF4F5;
      --sand: #C9AE96;
      --sand-soft: #F2E2D3;
      --lavender: #CBBBC7;
      --lavender-soft: #F1EAF0;
      --info: #6F8C9E;
      --info-soft: #EEF4F5;
      --success: #81906F;
      --success-soft: #ECF0E4;
      --warning: #B68463;
      --warning-soft: #F4E1C8;
      --danger: #A45A50;
      --danger-soft: #EED8D1;
      --heart: #A24A3F;
      --leaf: #8D8A68;
      --on-accent: #fffaf6;
      --radius: 30px;
      --radius-sm: 24px;
      --shadow: 0 12px 32px rgba(139, 62, 56, 0.08);
      --shadow-soft: 0 8px 25px rgba(139, 62, 56, 0.07);
      --shadow-lift: 0 18px 48px rgba(139, 62, 56, 0.16);
      --shadow-ambient: 0 24px 70px rgba(139, 62, 56, 0.13);
      --focus: 0 0 0 3px rgba(220, 161, 141, 0.24);
      --spring: cubic-bezier(.2, .82, .2, 1);
      --serif: Georgia, "Times New Roman", serif;
      --script: "Segoe Print", "Bradley Hand ITC", Georgia, serif;
    }

    * { box-sizing: border-box; }

    html {
      min-height: 100%;
      background: var(--bg);
    }

    body {
      min-height: 100%;
      margin: 0;
      background:
        radial-gradient(circle at 12% 8%, rgba(220,161,141,0.18) 0 0, transparent 28%),
        radial-gradient(circle at 92% 18%, rgba(243,230,218,0.7) 0 0, transparent 25%),
        linear-gradient(180deg, #fbf3eb 0%, var(--bg) 48%, #f1e4d8 100%);
      color: var(--text);
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      font-size: clamp(14px, 3.5vw, 15px);
      line-height: 1.48;
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
      overflow-wrap: break-word;
      word-break: normal;
      hyphens: none;
    }

    /* Mobile readability safety: never break words letter-by-letter, never
       hyphenate headings/buttons. Long words wrap whole, not vertically. */
    h1, h2, h3, h4, h5, p, span, strong, li, label, button, .title, .child-name,
    .reference-title, .reference-memo-title, .book-cover-title, .status-title,
    .metric-title, .metric-value, .list-title, .section-head h2 {
      overflow-wrap: break-word;
      word-break: normal;
      hyphens: none;
    }

    body::before {
      content: "";
      position: fixed;
      inset: 0;
      z-index: -1;
      pointer-events: none;
      background:
        linear-gradient(180deg, rgba(255,248,241,0.62), transparent 28%),
        radial-gradient(circle at 30% 20%, rgba(90,74,66,0.055) 0 0.7px, transparent 1.4px),
        radial-gradient(circle at 80% 38%, rgba(139,62,56,0.04) 0 0.8px, transparent 1.6px);
      background-size: auto, 18px 18px, 26px 26px;
    }

    body::after {
      content: "";
      position: fixed;
      right: max(10px, calc((100vw - 560px) / 2 + 12px));
      top: calc(8px + env(safe-area-inset-top));
      z-index: -1;
      width: 150px;
      height: 120px;
      pointer-events: none;
      opacity: 0.18;
      background-repeat: no-repeat;
      background-size: contain;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 120'%3E%3Cg fill='none' stroke='%238B3E38' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M34 92c26-24 46-48 58-80'/%3E%3Cpath d='M61 61c-13-8-25-10-39-5 10 10 22 13 39 5zM75 42c-8-13-8-26 0-39 9 13 8 26 0 39zM91 21c13-7 25-8 38-2-11 9-23 10-38 2zM45 78c-10-7-21-8-33-3 9 8 19 10 33 3z'/%3E%3Cpath d='M124 74c7-12 25-4 17 11-4 8-17 17-17 17s-13-9-17-17c-8-15 10-23 17-11z'/%3E%3C/g%3E%3C/svg%3E");
    }

    button,
    input,
    select,
    textarea {
      font: inherit;
      -webkit-tap-highlight-color: transparent;
    }

    button {
      cursor: pointer;
      transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
    }

    button:focus-visible,
    input:focus-visible,
    select:focus-visible,
    textarea:focus-visible {
      outline: none;
      box-shadow: var(--focus);
      border-color: var(--accent);
    }

    h1, h2, h3, p { margin: 0; }

    /* App Shell — single canonical implementation (Home width & rhythm reference). */
    .app {
      width: min(100%, var(--rz-canon-shell, 390px));
      max-width: var(--rz-canon-shell, 390px);
      min-height: 100vh;
      margin: 0 auto;
      padding: calc(14px + env(safe-area-inset-top)) var(--rz-canon-side, 14px) calc(96px + env(safe-area-inset-bottom));
      background:
        radial-gradient(circle at 50% -80px, rgba(255, 255, 255, 0.72), transparent 210px),
        var(--background);
      isolation: isolate;
    }

    .topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 16px;
      padding: 2px 2px 0;
    }

    .eyebrow {
      color: var(--heading);
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
    }

    .title {
      margin-top: 2px;
      font-size: clamp(22px, 6vw, 28px);
      line-height: 1.08;
      font-weight: 800;
      letter-spacing: 0;
      font-family: var(--serif);
      color: var(--heading);
    }

    .brand-subtitle {
      margin-top: 4px;
      color: var(--text-soft);
      font-size: 13px;
      line-height: 1.35;
      font-family: var(--script);
      font-style: italic;
    }

    .icon-button {
      min-width: 42px;
      height: 42px;
      border: 1px solid var(--line);
      border-radius: 9999px;
      background: var(--surface);
      color: var(--text);
      box-shadow: var(--shadow-soft);
    }

    .notice {
      display: grid;
      gap: 10px;
      margin-bottom: 12px;
      padding: 14px;
      border: 1px solid #d8b9b3;
      border-radius: var(--radius);
      background: var(--danger-soft);
      color: #663b38;
    }

    [hidden],
    .notice[hidden],
    .modal-actions.single #modalCancel {
      display: none !important;
    }

    .retry {
      justify-self: start;
      min-height: 42px;
      border: 1px solid var(--line-strong);
      border-radius: var(--radius);
      padding: 9px 13px;
      background: var(--card);
      color: var(--text);
      font-weight: 700;
    }

    .tab {
      display: none;
      animation: pageIn 0.34s var(--spring) both;
    }

    .tab.active { display: block; }

    .section {
      margin-bottom: 16px;
    }

    .card {
      position: relative;
      border: 1px solid rgba(232, 215, 204, 0.92);
      border-radius: var(--radius);
      background:
        linear-gradient(180deg, rgba(255,248,241,0.98), rgba(250,239,228,0.94)),
        var(--card);
      box-shadow: var(--shadow);
      overflow: hidden;
      backdrop-filter: blur(10px);
    }

    .card::after {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      border-radius: inherit;
      background:
        radial-gradient(circle at 10% 0%, rgba(255,255,255,0.62), transparent 26%),
        linear-gradient(135deg, rgba(139,62,56,0.035), transparent 42%);
    }

    .card > * {
      position: relative;
      z-index: 1;
    }

    .card-pad {
      padding: 20px;
    }

    .hero {
      overflow: hidden;
      background:
        linear-gradient(145deg, rgba(255,248,241,0.98) 0%, rgba(243,230,218,0.92) 58%, rgba(247,240,232,0.95) 100%);
      box-shadow: var(--shadow-ambient);
    }

    .hero::before,
    .more-hero::before,
    .about-card::before {
      content: "";
      position: absolute;
      right: 18px;
      top: 14px;
      width: 58px;
      height: 34px;
      pointer-events: none;
      opacity: 0.22;
      background-repeat: no-repeat;
      background-size: contain;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 46'%3E%3Cg fill='none' stroke='%238B3E38' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M40 32c9-14 29-5 19 10-5 8-19 15-19 15S26 50 21 42C11 27 31 18 40 32z'/%3E%3Cpath d='M5 14c8-4 16-5 25-3M50 9c8-5 16-7 25-6'/%3E%3C/g%3E%3C/svg%3E");
    }

    .child-row {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 14px;
    }

    .child-row > div {
      flex: 1 1 auto;
      min-width: 0;
    }

    .child-name {
      max-width: 100%;
      font-size: clamp(22px, 6vw, 28px);
      line-height: 1.08;
      font-weight: 800;
      color: var(--heading);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      overflow-wrap: normal;
      word-break: keep-all;
    }

    .pill {
      flex: 0 0 auto;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-height: 31px;
      padding: 7px 10px;
      border: 1px solid rgba(232, 154, 126, 0.32);
      border-radius: 999px;
      background: rgba(251, 225, 212, 0.86);
      color: var(--accent-strong);
      font-size: 12px;
      font-weight: 700;
      white-space: nowrap;
    }

    .child-facts {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      margin-top: 12px;
    }

    .child-fact {
      min-width: 0;
      padding: 9px 10px;
      border: 1px solid rgba(232, 154, 126, 0.18);
      border-radius: var(--radius-sm);
      background: rgba(255, 249, 244, 0.72);
    }

    .child-fact span {
      display: block;
      color: var(--muted);
      font-size: clamp(10px, 2.5vw, 11px);
      font-weight: 700;
    }

    .child-fact strong {
      display: block;
      margin-top: 2px;
      overflow: hidden;
      color: var(--text);
      font-size: clamp(12px, 3vw, 13px);
      font-weight: 800;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .status {
      display: grid;
      grid-template-columns: 44px 1fr;
      gap: 12px;
      align-items: start;
      padding: 14px;
      border: 1px solid rgba(232, 215, 204, 0.95);
      border-radius: var(--radius);
      background: linear-gradient(180deg, rgba(255,248,241,0.94), rgba(243,230,218,0.72));
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.78), 0 10px 24px rgba(139,62,56,0.08);
    }

    .status-icon,
    .event-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 9999px;
      background: linear-gradient(145deg, #F2D5C8, #FFF8F1);
      color: var(--heading);
    }

    .status-icon {
      width: 44px;
      height: 44px;
      border: 1px solid rgba(232, 215, 204, 0.9);
    }

    .ui-svg,
    .event-svg {
      display: block;
      width: 22px;
      height: 22px;
      color: currentColor;
      fill: none;
      stroke: currentColor;
      stroke-width: 2.2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .event-svg {
      width: 21px;
      height: 21px;
    }

    .status-title {
      display: block;
      font-size: clamp(18px, 4vw, 20px);
      line-height: 1.2;
      font-weight: 800;
      color: var(--heading);
    }

    .status-detail {
      display: block;
      margin-top: 4px;
      color: var(--text-soft);
      font-size: 14px;
    }

    .insight {
      display: grid;
      grid-template-columns: 1fr;
      gap: 8px;
      margin-top: 12px;
      padding: 12px;
      border: 1px solid rgba(232, 215, 204, 0.95);
      border-radius: var(--radius);
      background: linear-gradient(135deg, #FFF8F1, #F3E6DA);
      color: #4f4136;
      font-size: 14px;
    }

    .grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 9px;
    }

    .grid > .empty,
    #homeCards > .metric {
      grid-column: 1 / -1;
    }

    .assistant-card {
      width: 100%;
      text-align: left;
      cursor: pointer;
      display: block;
      border-color: rgba(232, 154, 126, 0.22);
      background: linear-gradient(180deg, rgba(255, 246, 238, 0.98), rgba(255, 249, 244, 0.96));
    }

    .assistant-card .metric-note {
      margin-top: 8px;
    }

    .about-card {
      position: relative;
      display: grid;
      gap: 14px;
      border-color: rgba(232, 215, 204, 0.96);
      background:
        linear-gradient(180deg, rgba(255,248,241,0.98), rgba(243,230,218,0.86)),
        var(--card);
    }

    .about-card h2 {
      color: var(--heading);
      font-family: var(--serif);
      font-size: 25px;
      line-height: 1.14;
    }

    .script-ribbon {
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      max-width: 100%;
      margin-top: 10px;
      padding: 8px 18px 9px;
      border-radius: 9999px;
      background: linear-gradient(180deg, #F0D0C0, #EAC2B1);
      color: var(--heading);
      font-family: var(--script);
      font-size: 14px;
      font-style: italic;
      line-height: 1.35;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.62);
    }

    .script-ribbon::after {
      content: "";
      position: absolute;
      left: 50%;
      bottom: -6px;
      width: 54%;
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(139,62,56,0.62), transparent);
      transform: translateX(-50%);
    }

    .illustration-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 112px;
      gap: 12px;
      align-items: center;
      padding: 12px;
      border: 1px solid rgba(232,215,204,0.92);
      border-radius: var(--radius-sm);
      background: rgba(255,248,241,0.74);
    }

    .soft-illustration {
      width: 100%;
      max-width: 118px;
      height: auto;
      justify-self: center;
      overflow: visible;
    }

    .soft-illustration .ink {
      stroke: var(--heart);
      stroke-width: 3;
      stroke-linecap: round;
      stroke-linejoin: round;
      fill: none;
    }

    .soft-illustration .soft-fill { fill: #EED4C7; }
    .soft-illustration .cream-fill { fill: #FFF8F1; }
    .soft-illustration .leaf-fill { fill: #D7CEB1; }
    .soft-illustration .heart-fill { fill: #DCA18D; }

    .about-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .about-item {
      display: grid;
      grid-template-columns: 48px 1fr;
      gap: 11px;
      align-items: start;
      min-width: 0;
      padding: 13px;
      border: 1px solid rgba(232, 215, 204, 0.92);
      border-radius: var(--radius-sm);
      background: rgba(255, 248, 241, 0.82);
      color: var(--text-soft);
      font-size: 13px;
      line-height: 1.35;
      box-shadow: 0 6px 18px rgba(139,62,56,0.055);
    }

    .about-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 48px;
      height: 48px;
      border-radius: 9999px;
      background: #F3E6DA;
      color: var(--heading);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.78);
    }

    .about-icon svg {
      width: 34px;
      height: 34px;
      display: block;
    }

    .about-icon .ink {
      fill: none;
      stroke: var(--heading);
      stroke-width: 3;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .about-cta {
      width: 100%;
      min-height: 52px;
      justify-content: center;
      font-size: 14px;
      box-shadow: 0 10px 26px rgba(139,62,56,0.16);
    }

    .book-intro {
      position: relative;
      display: grid;
      gap: 12px;
      margin-bottom: 14px;
      padding: 16px;
      border: 1px solid rgba(232, 215, 204, 0.96);
      border-radius: var(--radius);
      background:
        radial-gradient(circle at 88% 12%, rgba(220,161,141,0.18), transparent 30%),
        linear-gradient(180deg, rgba(255,248,241,0.98), rgba(243,230,218,0.8));
      box-shadow: var(--shadow-soft);
      overflow: hidden;
    }

    .book-intro h4,
    .book-detail h4 {
      margin: 0;
      color: var(--heading);
      font-family: var(--serif);
      font-size: clamp(18px, 4vw, 20px);
      line-height: 1.15;
    }

    .book-intro .script-ribbon {
      margin-top: 0;
      justify-self: start;
      font-size: 13px;
    }

    .book-library {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
      margin-top: 12px;
    }

    .book-cover {
      position: relative;
      display: grid;
      gap: 10px;
      min-height: 214px;
      padding: 14px;
      border: 1px solid rgba(232, 215, 204, 0.98);
      border-radius: var(--radius);
      background:
        linear-gradient(180deg, rgba(255,248,241,0.98), rgba(243,230,218,0.86)),
        var(--surface);
      box-shadow: var(--shadow-soft);
      color: var(--text);
      text-align: left;
      overflow: hidden;
    }

    .book-cover::after {
      content: "";
      position: absolute;
      left: 12px;
      right: 12px;
      bottom: 10px;
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(139,62,56,0.22), transparent);
    }

    .book-cover:active {
      transform: translateY(1px) scale(0.99);
    }

    .book-cover-visual,
    .book-detail-visual {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 96px;
      border: 1px solid rgba(232, 215, 204, 0.88);
      border-radius: 24px;
      background:
        radial-gradient(circle at 50% 42%, rgba(255,248,241,0.95), rgba(243,230,218,0.65) 62%, rgba(220,161,141,0.18));
    }

    .book-detail-visual {
      min-height: 140px;
      margin: 10px 0 14px;
    }

    .book-svg {
      display: block;
      width: 82px;
      height: 82px;
      color: var(--heading);
      fill: none;
      stroke: currentColor;
      stroke-width: 2.25;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .book-detail-visual .book-svg {
      width: 112px;
      height: 112px;
    }

    .book-cover-title {
      color: var(--heading);
      font-family: var(--serif);
      font-size: 19px;
      line-height: 1.14;
      font-weight: 800;
    }

    .book-cover-text {
      color: var(--text-soft);
      font-size: 13px;
      line-height: 1.38;
    }

    .book-cover-tag,
    .book-media-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: fit-content;
      border: 1px solid rgba(220, 161, 141, 0.32);
      border-radius: 999px;
      padding: 4px 9px;
      background: rgba(243, 216, 202, 0.58);
      color: var(--heading);
      font-family: var(--script);
      font-style: italic;
      font-size: 12px;
      line-height: 1.2;
    }

    .book-detail {
      display: grid;
      gap: 12px;
    }

    .book-note-card {
      padding: 13px;
      border: 1px solid rgba(232, 215, 204, 0.95);
      border-radius: var(--radius-sm);
      background: rgba(255,248,241,0.82);
      box-shadow: 0 6px 18px rgba(139,62,56,0.055);
    }

    .book-note-card h5 {
      margin: 0 0 7px;
      color: var(--heading);
      font-family: var(--serif);
      font-size: 16px;
      line-height: 1.15;
    }

    .book-note-card ul {
      margin: 0;
      padding-left: 18px;
      color: var(--text-soft);
      line-height: 1.42;
    }

    .book-media-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .book-media-card {
      display: grid;
      gap: 6px;
      padding: 12px;
      border: 1px dashed rgba(220, 161, 141, 0.42);
      border-radius: var(--radius-sm);
      background: rgba(243,230,218,0.62);
      color: var(--text-soft);
      font-size: 13px;
      line-height: 1.36;
    }

    .reference-sheet {
      position: relative;
      overflow: hidden;
      border-color: rgba(216, 191, 174, 0.92);
      background:
        radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.62), transparent 22%),
        radial-gradient(circle at 84% 24%, rgba(220, 161, 141, 0.14), transparent 27%),
        linear-gradient(180deg, rgba(255, 249, 244, 0.98), rgba(246, 235, 225, 0.94)),
        var(--surface);
      box-shadow: 0 14px 38px rgba(139, 62, 56, 0.09);
    }

    .reference-sheet::after {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background:
        radial-gradient(circle at 22% 32%, rgba(90,74,66,0.055) 0 0.55px, transparent 1.2px),
        radial-gradient(circle at 70% 68%, rgba(139,62,56,0.035) 0 0.75px, transparent 1.45px);
      background-size: 18px 18px, 24px 24px;
      mix-blend-mode: multiply;
      opacity: 0.58;
    }

    .reference-sheet > * {
      position: relative;
      z-index: 1;
    }

    .reference-header {
      position: relative;
      display: grid;
      justify-items: center;
      gap: 10px;
      padding: 8px 6px 10px;
      text-align: center;
    }

    .reference-corner {
      position: absolute;
      top: 0;
      width: 76px;
      height: 58px;
      color: var(--accent-strong);
      opacity: 0.8;
      fill: none;
      stroke: currentColor;
      stroke-width: 2.1;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .reference-corner.left { left: -2px; }
    .reference-corner.right {
      right: -2px;
      transform: scaleX(-1);
    }

    .reference-heart {
      width: 56px;
      height: 30px;
      color: var(--accent-strong);
      fill: none;
      stroke: currentColor;
      stroke-width: 2.2;
      stroke-linecap: round;
      stroke-linejoin: round;
      opacity: 0.86;
    }

    .reference-title {
      max-width: 92%;
      color: var(--heading);
      font-family: var(--serif);
      font-size: clamp(29px, 8.5vw, 44px);
      font-weight: 800;
      line-height: 1.04;
      letter-spacing: 0;
    }

    .reference-ribbon {
      position: relative;
      display: inline-flex;
      justify-content: center;
      max-width: 94%;
      margin: 2px auto 0;
      padding: 10px 22px 11px;
      border-radius: 9999px;
      background: linear-gradient(180deg, #F2CCB9 0%, #EDC1AD 100%);
      color: #6F332E;
      font-family: var(--script);
      font-size: clamp(16px, 4.7vw, 24px);
      font-style: italic;
      line-height: 1.25;
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.7),
        0 8px 18px rgba(139,62,56,0.08);
    }

    .reference-ribbon::after {
      content: "";
      position: absolute;
      left: 50%;
      bottom: -8px;
      width: 45%;
      height: 2px;
      border-radius: 999px;
      background: linear-gradient(90deg, transparent, rgba(90,74,66,0.52), transparent);
      transform: translateX(-50%);
    }

    .reference-intro {
      max-width: 86%;
      color: var(--text-soft);
      font-size: 14px;
      line-height: 1.45;
    }

    .reference-layout {
      position: relative;
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(108px, 34%);
      gap: 14px;
      align-items: end;
      margin-top: 8px;
    }

    .reference-memo-list {
      display: grid;
      gap: 13px;
      min-width: 0;
    }

    .reference-memo-card {
      position: relative;
      display: grid;
      grid-template-columns: 82px minmax(0, 1fr);
      gap: 13px;
      align-items: center;
      min-height: 102px;
      padding: 13px 15px 13px 12px;
      border: 1px solid rgba(216, 191, 174, 0.92);
      border-radius: 22px;
      background:
        linear-gradient(180deg, rgba(255,252,248,0.96), rgba(255,248,241,0.92)),
        var(--surface);
      box-shadow: 0 8px 22px rgba(139, 62, 56, 0.075);
      color: var(--text);
    }

    .reference-memo-card::before {
      content: "";
      position: absolute;
      left: -1px;
      top: 16px;
      bottom: 16px;
      width: 11px;
      border-radius: 0 999px 999px 0;
      background: rgba(243, 230, 218, 0.82);
    }

    .reference-memo-visual {
      position: relative;
      display: grid;
      place-items: center;
      width: 76px;
      height: 76px;
      border-radius: 999px;
      background:
        radial-gradient(circle at 34% 28%, rgba(255,255,255,0.75), transparent 28%),
        linear-gradient(180deg, rgba(245, 219, 205, 0.94), rgba(239, 205, 188, 0.68));
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.72), 0 8px 18px rgba(139,62,56,0.08);
    }

    .reference-memo-svg {
      display: block;
      width: 48px;
      height: 48px;
      fill: none;
      stroke: var(--accent-strong);
      stroke-width: 2.35;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .reference-memo-title {
      display: block;
      margin-bottom: 5px;
      color: var(--heading);
      font-family: var(--serif);
      font-size: clamp(18px, 4vw, 20px);
      font-weight: 800;
      line-height: 1.08;
    }

    .reference-memo-text {
      display: block;
      color: var(--text);
      font-size: clamp(14px, 3.5vw, 15px);
      line-height: 1.33;
    }

    .reference-label {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      margin-bottom: 4px;
      color: var(--heading);
      font-family: var(--serif);
      font-weight: 800;
    }

    .reference-mini-check {
      width: 22px;
      height: 22px;
      color: var(--success);
      fill: none;
      stroke: currentColor;
      stroke-width: 2.5;
      stroke-linecap: round;
      stroke-linejoin: round;
      flex: 0 0 auto;
    }

    .reference-side {
      position: sticky;
      bottom: 0;
      display: grid;
      justify-items: center;
      gap: 10px;
      align-self: end;
    }

    .reference-bunny {
      display: block;
      width: min(100%, 190px);
      height: auto;
      overflow: visible;
      filter: drop-shadow(0 10px 18px rgba(139,62,56,0.08));
    }

    .reference-bunny .ink,
    .reference-flourish .ink,
    .reference-flower .ink {
      fill: none;
      stroke: var(--accent-strong);
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .reference-bunny .ink { stroke-width: 2.2; }
    .reference-bunny .fur { fill: #F0DCCB; }
    .reference-bunny .cream { fill: #FFF8F1; }
    .reference-bunny .blush { fill: #EAB29F; opacity: 0.68; }
    .reference-bunny .heart { fill: #E5A18F; }
    .reference-bunny .leaf { fill: #D7C7A8; opacity: 0.72; }

    .reference-flourish {
      display: block;
      width: min(72%, 240px);
      height: 42px;
      margin: 8px auto 0;
      color: var(--accent-strong);
    }

    .reference-flourish .ink {
      stroke: currentColor;
      stroke-width: 2.1;
    }

    .reference-media-strip {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      margin-top: 14px;
    }

    .reference-media-card {
      display: grid;
      gap: 7px;
      padding: 13px;
      border: 1px dashed rgba(162, 74, 63, 0.28);
      border-radius: 22px;
      background: rgba(243, 230, 218, 0.68);
      color: var(--text-soft);
      font-size: 13px;
      line-height: 1.36;
    }

    .reference-media-card strong {
      color: var(--heading);
      font-family: var(--serif);
      font-size: 16px;
    }

    .reference-warning {
      margin-top: 12px;
      padding: 14px;
      border: 1px solid rgba(162, 74, 63, 0.2);
      border-radius: 22px;
      background: rgba(255, 248, 241, 0.78);
      color: var(--text-soft);
      line-height: 1.43;
    }

    .reference-about {
      display: grid;
      gap: 15px;
    }

    .reference-about .about-grid {
      grid-template-columns: 1fr;
      gap: 11px;
    }

    .reference-about .about-item {
      grid-template-columns: 74px 1fr;
      min-height: 92px;
      align-items: center;
      border-radius: 22px;
      background: rgba(255, 252, 248, 0.86);
    }

    .reference-about .about-icon {
      width: 64px;
      height: 64px;
      background: linear-gradient(180deg, #F4DDD0, #F0D1C0);
    }

    .reference-about .about-icon svg {
      width: 42px;
      height: 42px;
    }

    .book-page-card {
      border-color: rgba(232, 215, 204, 0.96);
      background:
        radial-gradient(circle at 92% 6%, rgba(220, 161, 141, 0.13), transparent 24%),
        linear-gradient(180deg, rgba(255, 248, 241, 0.98), rgba(246, 235, 225, 0.9)),
        var(--surface);
    }

    .book-page-card::before {
      content: "";
      position: absolute;
      right: 14px;
      top: 12px;
      width: 68px;
      height: 54px;
      opacity: 0.14;
      pointer-events: none;
      background-repeat: no-repeat;
      background-size: contain;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 60'%3E%3Cg fill='none' stroke='%238B3E38' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 50C26 36 39 22 48 8'/%3E%3Cpath d='M27 35c-9-6-18-7-27-3 7 7 16 9 27 3zM39 22c-5-10-4-19 2-28 6 9 5 18-2 28zM49 10c10-5 19-6 29-1-8 7-17 8-29 1z'/%3E%3C/g%3E%3C/svg%3E");
    }

    .book-section-title {
      display: grid;
      grid-template-columns: 58px minmax(0, 1fr);
      gap: 12px;
      align-items: center;
      margin-bottom: 12px;
    }

    .book-section-title h2,
    .book-section-title h3 {
      margin: 0;
      color: var(--heading);
      font-family: var(--serif);
      line-height: 1.12;
    }

    .book-section-title p {
      margin-top: 4px;
      color: var(--text-soft);
      font-size: 13px;
      line-height: 1.38;
    }

    .book-illustration,
    .book-action-icon,
    .book-list-icon,
    .metric-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 9999px;
      border: 1px solid rgba(232, 215, 204, 0.9);
      background:
        radial-gradient(circle at 35% 28%, rgba(255,255,255,0.78), transparent 30%),
        linear-gradient(180deg, rgba(245, 219, 205, 0.95), rgba(239, 205, 188, 0.72));
      color: var(--accent-strong);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.72), 0 8px 18px rgba(139,62,56,0.08);
      flex: 0 0 auto;
    }

    .book-illustration {
      width: 58px;
      height: 58px;
    }

    .book-list-icon,
    .metric-icon {
      width: 46px;
      height: 46px;
    }

    .book-action-icon {
      width: 34px;
      height: 34px;
    }

    .book-svg-small,
    .action-svg,
    .metric-svg {
      display: block;
      width: 28px;
      height: 28px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2.2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .book-illustration .book-svg-small {
      width: 36px;
      height: 36px;
    }

    .book-card-row {
      display: grid;
      grid-template-columns: 52px minmax(0, 1fr);
      gap: 11px;
      align-items: center;
    }

    .book-card-row + .book-card-row {
      margin-top: 10px;
    }

    .book-card-row h3,
    .book-card-row h4 {
      margin: 0;
    }

    .metric {
      display: grid;
      grid-template-columns: 46px minmax(0, 1fr);
      gap: 11px;
      align-items: center;
    }

    .metric-title,
    .list-title,
    .chart-title {
      font-family: var(--serif);
      color: var(--heading);
    }

    .metric-value {
      font-family: var(--serif);
      color: var(--text);
    }

    .action {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-width: 0;
    }

    .action .action-label {
      min-width: 0;
      overflow-wrap: break-word;
      word-break: normal;
      hyphens: none;
      text-align: center;
      line-height: 1.2;
    }

    .event-icon {
      color: var(--accent-strong);
      background:
        radial-gradient(circle at 35% 28%, rgba(255,255,255,0.8), transparent 28%),
        linear-gradient(180deg, rgba(245, 219, 205, 0.96), rgba(239, 205, 188, 0.7));
    }

    .event {
      border-left: 0;
      grid-template-columns: 55px 46px minmax(0, 1fr);
      background:
        linear-gradient(180deg, rgba(255,252,248,0.97), rgba(255,248,241,0.93)),
        var(--surface);
    }

    .event::before {
      background: var(--accent);
    }

    .event.care,
    .event.health,
    .event.medications,
    .event.development,
    .event.other {
      border-left: 0;
    }

    .timeline::before {
      left: 73px;
      background: linear-gradient(180deg, rgba(162,74,63,0.22), rgba(220,161,141,0.4), rgba(162,74,63,0.18));
    }

    .timeline-group-title {
      color: var(--heading);
      font-family: var(--script);
      font-size: 14px;
      font-style: italic;
      text-transform: none;
      letter-spacing: 0;
    }

    .chart-card,
    .guide-block,
    .weekly-section,
    .help-section,
    .field,
    .storage-note,
    .pdf-ready,
    .timezone-current,
    .locked-action {
      border-radius: var(--radius);
      border-color: rgba(232, 215, 204, 0.92);
      background:
        linear-gradient(180deg, rgba(255,252,248,0.96), rgba(255,248,241,0.9)),
        var(--surface);
      box-shadow: var(--shadow-soft);
    }

    .list-item {
      position: relative;
      overflow: hidden;
      border-color: rgba(232, 215, 204, 0.92);
      background:
        linear-gradient(180deg, rgba(255,252,248,0.96), rgba(255,248,241,0.9)),
        var(--surface);
    }

    .more-item.with-icon {
      display: grid;
      grid-template-columns: 48px minmax(0, 1fr);
      gap: 11px;
      align-items: center;
    }

    .more-item.with-icon .list-title,
    .more-item.with-icon .list-meta {
      grid-column: 2;
    }

    .more-item.with-icon .book-list-icon {
      grid-row: 1 / span 2;
      grid-column: 1;
    }

    .modal {
      background:
        radial-gradient(circle at 92% 4%, rgba(220,161,141,0.13), transparent 24%),
        linear-gradient(180deg, var(--surface), #F3E6DA);
    }

    .about-item strong {
      display: block;
      margin-bottom: 3px;
      color: var(--text);
      font-family: var(--serif);
      font-size: 13.5px;
    }

    .important-title-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .home-assistant-slot {
      margin-top: 10px;
    }

    .timezone-current,
    .locked-action,
    .storage-note,
    .pdf-ready {
      display: grid;
      gap: 8px;
      padding: 12px;
      border: 1px solid rgba(232, 154, 126, 0.18);
      border-radius: var(--radius);
      background: rgba(255,249,244,0.78);
    }

    .locked-action {
      border-color: rgba(155, 81, 77, 0.24);
      background: var(--danger-soft);
      color: #6d3d39;
    }

    .storage-note {
      border-color: rgba(232, 154, 126, 0.22);
      background: var(--accent-soft);
      color: var(--accent-strong);
      font-size: 13px;
      margin-bottom: 12px;
    }

    .weekly-card {
      display: grid;
      gap: 10px;
    }

    .weekly-section {
      display: grid;
      gap: 6px;
      padding: 10px 0;
      border-top: 1px solid var(--line);
    }

    .weekly-section:first-child {
      border-top: 0;
      padding-top: 0;
    }

    .weekly-section h3 {
      margin: 0;
      color: var(--accent-strong);
      font-size: 13px;
      font-weight: 800;
    }

    .weekly-section ul {
      margin: 0;
      padding-left: 18px;
      color: var(--text-soft);
      font-size: 14px;
    }

    .weekly-section li + li {
      margin-top: 5px;
    }

    .weekly-section strong {
      color: var(--text);
      font-weight: 800;
    }

    .check-list {
      display: grid;
      gap: 7px;
      margin-top: 9px;
    }

    .check-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      color: var(--text-soft);
      font-size: 13px;
    }

    .check-row.done {
      color: var(--accent-strong);
    }

    .check-mark {
      flex: 0 0 auto;
      font-weight: 800;
    }

    .task-row {
      display: grid;
      grid-template-columns: 46px minmax(0, 1fr);
      gap: 11px;
      align-items: flex-start;
    }

    .task-row .document-actions {
      grid-column: 1 / -1;
    }

    .task-row.done .list-title {
      color: var(--muted);
      text-decoration: line-through;
    }

    .list-subhead {
      margin: 14px 2px 7px;
      color: var(--accent-strong);
      font-size: 12px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

    .chip-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 9px;
      margin-bottom: 10px;
    }

    .metric {
      min-height: 86px;
      padding: 14px;
      border: 1px solid rgba(232, 154, 126, 0.16);
      border-radius: var(--radius);
      background: linear-gradient(180deg, rgba(255,249,244,0.95), rgba(252,237,228,0.86));
      box-shadow: var(--shadow-soft);
    }

    .metric-title {
      display: block;
      color: var(--heading);
      font-family: var(--serif);
      font-size: 12px;
      font-weight: 800;
    }

    .metric-value {
      display: block;
      margin-top: 5px;
      color: var(--text);
      font-family: var(--serif);
      font-size: 18px;
      font-weight: 800;
    }

    .metric-note {
      display: block;
      margin-top: 4px;
      color: var(--text-soft);
      font-size: 13px;
    }

    /* Iconless metric cards (assistant tip "Сейчас актуально" and empty states)
       keep the original stacked layout. The 46px icon grid must only apply to
       cards that actually have a .metric-icon, otherwise the text is squeezed
       into the 46px first column. */
    .metric.assistant-card {
      display: block;
      grid-template-columns: none;
    }

    .metric:not(:has(> .metric-icon)) {
      display: block;
      grid-template-columns: none;
    }

    .summary-chip {
      display: grid;
      grid-template-columns: 32px 1fr;
      gap: 8px;
      align-items: center;
      min-height: 58px;
      padding: 10px;
      border: 1px solid rgba(232, 215, 204, 0.92);
      border-radius: var(--radius);
      background: linear-gradient(180deg, rgba(255,248,241,0.96), rgba(243,230,218,0.86));
      box-shadow: var(--shadow-soft);
    }

    .summary-chip-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      border-radius: 9999px;
      background: linear-gradient(145deg, #F3E6DA, #FFF8F1);
      color: var(--heading);
    }

    .summary-chip-value {
      display: block;
      color: var(--text);
      font-size: 18px;
      line-height: 1.05;
      font-weight: 800;
    }

    .summary-chip-label {
      display: block;
      margin-top: 2px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .section-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin: 18px 2px 10px;
    }

    .section-head h2 {
      font-size: 19px;
      line-height: 1.2;
      font-weight: 800;
      font-family: var(--serif);
      color: var(--heading);
    }

    .section-note {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .child-segments {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 4px;
      margin-bottom: 14px;
      padding: 4px;
      border: 1px solid rgba(232, 215, 204, 0.92);
      border-radius: var(--radius);
      background: rgba(243, 230, 218, 0.78);
      box-shadow: inset 0 1px 3px rgba(194, 109, 94, 0.07);
    }

    .segment-button {
      min-height: 42px;
      border: 1px solid transparent;
      border-radius: 9999px;
      background: transparent;
      color: var(--text-soft);
      font-size: 13px;
      font-weight: 700;
    }

    .segment-button.active {
      border-color: rgba(220, 161, 141, 0.34);
      background: var(--surface-raised);
      color: var(--heading);
      box-shadow: var(--shadow-soft);
    }

    .child-section { display: none; }

    .child-section.active {
      display: block;
      animation: pageIn 0.28s var(--spring) both;
    }

    .actions {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 8px;
    }

    .action {
      position: relative;
      overflow: hidden;
      min-height: 52px;
      border: 1px solid rgba(232, 215, 204, 0.92);
      border-radius: 9999px;
      padding: 10px;
      background: linear-gradient(180deg, #FFF8F1, #F3E6DA);
      color: var(--text);
      box-shadow: var(--shadow-soft);
      font-size: 13px;
      font-weight: 800;
      letter-spacing: 0;
    }

    .action::before {
      content: "";
      position: absolute;
      inset: 0;
      opacity: 0;
      background: linear-gradient(120deg, transparent, rgba(255,255,255,0.36), transparent);
      transform: translateX(-42%);
      transition: opacity 0.2s ease, transform 0.34s var(--spring);
    }

    .action:hover::before,
    .action.is-loading::before {
      opacity: 1;
      transform: translateX(42%);
    }

    .action.secondary {
      border: 1px solid rgba(232, 154, 126, 0.16);
      background: var(--surface);
      color: var(--text);
      box-shadow: var(--shadow-soft);
    }

    .action.is-success {
      border-color: rgba(125, 154, 111, 0.34);
      background: var(--success-soft);
      color: var(--success);
    }

    .action.danger {
      background: var(--danger-soft);
      color: #743936;
      box-shadow: var(--shadow-soft);
    }

    .action.is-loading {
      color: rgba(255,250,246,0.92);
      cursor: progress;
    }

    .action:hover,
    .icon-button:hover,
    .retry:hover,
    .mini-button:hover {
      transform: translateY(-1px);
    }

    .action:active,
    .nav-button:active,
    .retry:active {
      transform: translateY(1px) scale(0.985);
    }

    .action:disabled {
      opacity: 0.62;
      box-shadow: none;
      cursor: default;
    }

    .loading-button {
      opacity: 0.72;
      pointer-events: none;
    }

    .result {
      margin-top: 10px;
      color: var(--text-soft);
      font-size: 14px;
    }

    .filters {
      display: flex;
      gap: 8px;
      margin-bottom: 10px;
      overflow-x: auto;
      padding-bottom: 2px;
      scrollbar-width: none;
    }

    .filters::-webkit-scrollbar { display: none; }

    .filter {
      min-height: 36px;
      border: 1px solid rgba(232, 215, 204, 0.92);
      border-radius: 999px;
      padding: 8px 13px;
      background: var(--surface);
      color: var(--text-soft);
      font-size: 13px;
      font-weight: 700;
      white-space: nowrap;
    }

    .filter.active {
      border-color: rgba(220, 161, 141, 0.5);
      background: var(--accent-soft);
      color: var(--heading);
      box-shadow: var(--shadow-soft);
    }

    .timeline {
      position: relative;
      display: grid;
      gap: 16px;
      padding-left: 6px;
    }

    .timeline::before {
      content: "";
      position: absolute;
      top: 8px;
      bottom: 8px;
      left: 74px;
      width: 2px;
      border-radius: 999px;
      background: linear-gradient(180deg, rgba(220,161,141,0.34), rgba(139,62,56,0.24), rgba(201,174,150,0.28));
    }

    .timeline-group {
      display: grid;
      gap: 10px;
    }

    .timeline-group-title {
      justify-self: start;
      margin: 7px 0 0 60px;
      padding: 6px 11px;
      border: 1px solid rgba(232, 215, 204, 0.92);
      border-radius: 999px;
      background: rgba(255, 248, 241, 0.92);
      box-shadow: var(--shadow-soft);
      color: var(--heading);
      font-size: 12px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      backdrop-filter: blur(10px);
    }

    .event {
      position: relative;
      display: grid;
      grid-template-columns: 56px 42px 1fr;
      gap: 11px;
      align-items: start;
      padding: 13px;
      border: 1px solid rgba(232, 215, 204, 0.92);
      border-radius: var(--radius);
      background:
        linear-gradient(180deg, rgba(255,248,241,0.98), rgba(243,230,218,0.9)),
        var(--surface);
      box-shadow: var(--shadow-soft);
      cursor: pointer;
      transition: transform 0.2s var(--spring), box-shadow 0.2s ease, border-color 0.2s ease;
      animation: cardIn 0.34s var(--spring) both;
    }

    .event::before {
      content: "";
      position: absolute;
      left: 66px;
      top: 24px;
      width: 12px;
      height: 12px;
      border: 2px solid var(--surface-raised);
      border-radius: 999px;
      background: var(--accent);
      box-shadow: 0 0 0 3px rgba(220,161,141,0.16);
      transform: translateX(-50%);
    }

    .event:hover {
      border-color: rgba(220, 161, 141, 0.46);
      box-shadow: var(--shadow);
      transform: translateY(-1px);
    }

    .event:active { transform: translateY(1px); }

    .event.care { border-left: 4px solid var(--accent); }
    .event.health { border-left: 4px solid var(--warning); }
    .event.medications { border-left: 4px solid var(--lavender); }
    .event.development { border-left: 4px solid var(--blue); }
    .event.other { border-left: 4px solid var(--sand); }

    .event.health::before { background: var(--warning); box-shadow: 0 0 0 3px rgba(183,116,79,0.12); }
    .event.medications::before { background: var(--lavender); box-shadow: 0 0 0 3px rgba(123,120,145,0.12); }
    .event.development::before { background: var(--blue); box-shadow: 0 0 0 3px rgba(115,149,174,0.13); }
    .event.other::before { background: var(--sand); box-shadow: 0 0 0 3px rgba(177,162,150,0.14); }

    .event-time {
      align-self: center;
      color: var(--graphite);
      font-size: 14px;
      font-weight: 800;
      font-variant-numeric: tabular-nums;
    }

    .event-icon {
      width: 40px;
      height: 40px;
      border: 1px solid rgba(232, 215, 204, 0.92);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
    }

    .event-body {
      min-width: 0;
    }

    .event-text {
      color: var(--text);
      font-size: 15.5px;
      line-height: 1.26;
      font-weight: 800;
    }

    .event-type {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      margin-top: 7px;
      padding: 4px 8px;
      border: 1px solid rgba(232,215,204,0.84);
      border-radius: 999px;
      background: rgba(243,230,218,0.7);
      color: var(--heading);
      font-size: 12px;
      font-weight: 700;
    }

    .event-meta {
      margin-top: 7px;
      color: var(--muted);
      font-size: 12.5px;
      line-height: 1.35;
    }

    .list {
      display: grid;
      gap: 9px;
    }

    .list-item {
      padding: 12px;
      border: 1px solid rgba(232, 154, 126, 0.15);
      border-radius: var(--radius);
      background: rgba(255, 249, 244, 0.9);
      box-shadow: var(--shadow-soft);
    }

    .more-item {
      width: 100%;
      text-align: left;
    }

    .more-item:active {
      transform: translateY(1px);
      background: #FBE8DD;
    }

    .more-hero {
      background:
        linear-gradient(145deg, rgba(255,249,244,0.98), rgba(252,225,211,0.86)),
        var(--surface);
      box-shadow: var(--shadow-ambient);
    }

    .more-hero h2 {
      margin: 2px 0 4px;
      font-size: 24px;
    }

    .list-title {
      display: block;
      font-weight: 800;
      color: var(--text);
    }

    .milestone-button {
      width: 100%;
      display: grid;
      grid-template-columns: 24px 1fr;
      gap: 9px;
      text-align: left;
      transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
    }

    .milestone-button:active {
      transform: scale(0.992);
    }

    .milestone-button.done {
      border-color: rgba(129, 144, 111, 0.34);
      background: var(--success-soft);
    }

    .milestone-mark {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      height: 24px;
      color: var(--muted);
    }

    .milestone-mark.done {
      color: var(--success);
    }

    .age-secondary {
      display: block;
      margin-top: 3px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .document-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-top: 8px;
    }

    .status-line,
    .setting-row,
    .family-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .status-line + .status-line,
    .setting-row + .setting-row,
    .family-row + .family-row {
      margin-top: 9px;
    }

    .family-row.is-current {
      border-color: rgba(220, 161, 141, 0.38);
      background: linear-gradient(180deg, rgba(255,239,229,0.96), rgba(255,249,244,0.95));
    }

    /* Family rows: icon left, name/role hugging it, optional chip/button on the
       right — no large empty gap from space-between. */
    .family-row {
      display: grid;
      grid-template-columns: 46px minmax(0, 1fr) auto;
      gap: 11px;
      align-items: center;
      justify-content: stretch;
    }

    .family-row .family-body {
      min-width: 0;
    }

    .family-row .status-chip {
      justify-self: end;
    }

    /* Compact toggle list (e.g. "Настроить важное"): equal-height rows, label
       left / switch right, thin separators, no large empty gaps. */
    .toggle-list {
      display: grid;
      margin-bottom: 12px;
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      overflow: hidden;
      background: rgba(255, 249, 244, 0.78);
    }

    .toggle-list .setting-row {
      margin: 0;
      min-height: 46px;
      padding: 9px 13px;
      border-top: 1px solid var(--line);
    }

    .toggle-list .setting-row:first-child {
      border-top: 0;
    }

    .toggle-list .setting-row .list-title {
      font-weight: 700;
    }

    .status-chip {
      display: inline-flex;
      align-items: center;
      min-height: 27px;
      padding: 5px 8px;
      border: 1px solid rgba(232, 154, 126, 0.2);
      border-radius: 999px;
      background: var(--accent-soft);
      color: var(--accent-strong);
      font-size: clamp(10px, 2.5vw, 11px);
      font-weight: 800;
    }

    .status-chip.warning {
      border-color: rgba(183, 116, 79, 0.22);
      background: var(--warning-soft);
      color: #6a4f32;
    }

    .status-chip.muted {
      border-color: rgba(232, 154, 126, 0.14);
      background: var(--card-soft);
      color: var(--muted);
    }

    .switch {
      position: relative;
      display: inline-flex;
      flex: 0 0 auto;
      width: 45px;
      height: 27px;
    }

    .switch input {
      position: absolute;
      opacity: 0;
      pointer-events: none;
    }

    .switch-track {
      position: absolute;
      inset: 0;
      border: 1px solid rgba(232, 154, 126, 0.22);
      border-radius: 999px;
      background: #F1DACE;
      transition: background 0.18s ease, border-color 0.18s ease;
    }

    .switch-track::after {
      content: "";
      position: absolute;
      top: 3px;
      left: 3px;
      width: 19px;
      height: 19px;
      border-radius: 999px;
      background: var(--surface);
      box-shadow: 0 2px 6px rgba(47, 48, 51, 0.18);
      transition: transform 0.18s ease;
    }

    .switch input:checked + .switch-track {
      border-color: rgba(232, 154, 126, 0.46);
      background: var(--accent);
    }

    .switch input:checked + .switch-track::after {
      transform: translateX(18px);
    }

    .help-section {
      margin-top: 12px;
      padding-top: 11px;
      border-top: 1px solid rgba(232, 154, 126, 0.14);
    }

    .help-section h4 {
      margin-bottom: 6px;
      color: var(--accent-strong);
      font-size: 13px;
    }

    .help-section ul {
      margin: 0;
      padding-left: 18px;
      color: var(--text-soft);
      font-size: 14px;
    }

    .help-section li + li {
      margin-top: 5px;
    }

    .file-input {
      position: absolute;
      width: 1px;
      height: 1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
    }

    .list-meta {
      display: block;
      margin-top: 4px;
      color: var(--muted);
      font-size: 13px;
    }

    .guide {
      display: grid;
      gap: 10px;
    }

    .guide-block h3 {
      margin-bottom: 6px;
      font-size: clamp(16px, 4vw, 18px);
    }

    .guide-block ul {
      margin: 0;
      padding-left: 18px;
      color: var(--text-soft);
      font-size: 14px;
    }

    .guide-block li + li { margin-top: 4px; }

    .progress {
      height: 10px;
      overflow: hidden;
      border-radius: 999px;
      background: #F1DACE;
      box-shadow: inset 0 1px 3px rgba(194, 109, 94, 0.08);
    }

    .progress-fill {
      height: 100%;
      width: 0%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--accent), #F3BC96);
      transition: width 0.26s ease;
    }

    .empty {
      position: relative;
      padding: 18px 17px 18px 48px;
      border: 1px dashed rgba(232, 154, 126, 0.36);
      border-radius: var(--radius);
      background: linear-gradient(145deg, rgba(255,249,244,0.92), rgba(252,237,228,0.82));
      color: var(--text-soft);
      font-size: 14px;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
    }

    .empty::before {
      content: "";
      position: absolute;
      left: 17px;
      top: 17px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 22px;
      height: 22px;
      border-radius: 999px;
      background: var(--accent-soft);
      box-shadow: inset 0 0 0 7px rgba(255,248,241,0.9), 0 0 0 1px rgba(220,161,141,0.25);
    }

    .weekly-text {
      white-space: pre-line;
      color: var(--text-soft);
      font-size: 14px;
    }

    .chart-grid {
      display: grid;
      gap: 11px;
    }

    .chart-card {
      /* surface unified under .rz-card; padding preserved */
      padding: 15px;
    }

    .chart-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 8px;
    }

    .chart-title {
      color: var(--text);
      font-weight: 800;
      letter-spacing: 0;
    }

    .chart-value {
      color: var(--accent-strong);
      font-size: 12px;
      font-weight: 700;
    }

    .mini-chart {
      display: block;
      width: 100%;
      height: 62px;
      margin-top: 2px;
    }

    .chart-gridline {
      stroke: rgba(194,109,94,0.1);
      stroke-width: 0.5;
    }
    .chart-area { fill: rgba(232, 154, 126, 0.13); }
    .chart-line {
      fill: none;
      stroke: var(--accent);
      stroke-width: 2.8;
      stroke-linecap: round;
      stroke-linejoin: round;
      filter: drop-shadow(0 2px 4px rgba(194,109,94,0.16));
    }
    .chart-dot {
      fill: var(--surface-raised);
      stroke: var(--accent-strong);
      stroke-width: 1.4;
    }

    .chart-latest {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-top: 8px;
      padding: 5px 8px;
      border: 1px solid rgba(232,154,126,0.18);
      border-radius: 999px;
      background: var(--accent-soft);
      color: var(--accent-strong);
      font-size: 12px;
      font-weight: 700;
    }

    .bottom-nav {
      position: fixed;
      left: 50%;
      bottom: 0;
      z-index: 20;
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 7px;
      width: min(100%, 560px);
      padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
      border-top: 1px solid rgba(232, 215, 204, 0.95);
      background: rgba(255, 248, 241, 0.96);
      box-shadow: 0 -18px 42px rgba(139, 62, 56, 0.11);
      transform: translateX(-50%);
      backdrop-filter: blur(16px);
    }

    .nav-button {
      position: relative;
      min-height: 56px;
      border: 1px solid transparent;
      border-radius: 9999px;
      background: transparent;
      color: var(--text-soft);
      font-size: 12px;
      font-weight: 800;
    }

    .nav-button.active {
      border-color: rgba(220, 161, 141, 0.38);
      background: linear-gradient(180deg, var(--accent-soft), rgba(255, 248, 241, 0.94));
      color: var(--heading);
      box-shadow: inset 0 0 0 1px rgba(220, 161, 141, 0.12), var(--shadow-soft);
    }

    .nav-button.active::after {
      content: "";
      position: absolute;
      left: 50%;
      bottom: 6px;
      width: 18px;
      height: 3px;
      border-radius: 999px;
      background: var(--accent-strong);
      transform: translateX(-50%);
    }

    .skeleton {
      position: relative;
      overflow: hidden;
      color: transparent !important;
      border-radius: 6px;
      background: linear-gradient(90deg, #e4d4c8 0%, #fbf4ed 50%, #e4d4c8 100%);
      background-size: 200% 100%;
      animation: shimmer 1.1s infinite linear;
    }

    .toast {
      position: fixed;
      left: 50%;
      bottom: calc(78px + env(safe-area-inset-bottom));
      z-index: 40;
      width: min(calc(100% - 28px), 520px);
      padding: 13px 15px;
      border-radius: 9999px;
      border: 1px solid rgba(255,248,241,0.36);
      background: linear-gradient(135deg, var(--heading), var(--accent-strong));
      color: var(--on-accent);
      box-shadow: var(--shadow-lift);
      font-weight: 700;
      transform: translate(-50%, 18px);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.22s ease, transform 0.22s var(--spring);
    }

    .toast.show {
      opacity: 1;
      transform: translate(-50%, 0);
    }

    .modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 35;
      display: none;
      align-items: end;
      padding: 14px;
      background: rgba(90, 74, 66, 0.38);
      backdrop-filter: blur(8px);
      overflow: hidden;
    }

    .modal-backdrop.show { display: flex; }

    .modal {
      width: min(100%, 560px);
      margin: 0 auto calc(env(safe-area-inset-bottom));
      padding: 18px;
      border: 1px solid rgba(232, 215, 204, 0.98);
      border-radius: var(--radius);
      background:
        radial-gradient(circle at 92% 4%, rgba(220,161,141,0.15), transparent 24%),
        linear-gradient(180deg, var(--surface), #F3E6DA);
      box-shadow: var(--shadow-lift);
      animation: modalIn 0.24s var(--spring) both;
      max-height: calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
      overflow-y: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
      padding-bottom: calc(18px + env(safe-area-inset-bottom));
    }

    .modal h3 {
      margin-bottom: 8px;
      font-size: clamp(18px, 4vw, 20px);
      line-height: 1.18;
      font-family: var(--serif);
      color: var(--heading);
    }

    .modal h3:empty {
      display: none;
    }

    .modal > .result {
      font-family: var(--script);
      font-style: italic;
      color: var(--text-soft);
    }

    .modal > .result:empty {
      display: none;
    }

    .field {
      display: grid;
      gap: 6px;
      margin-top: 10px;
    }

    .field label {
      color: var(--accent-strong);
      font-size: 12px;
      font-weight: 700;
    }

    .field input,
    .field select,
    .field textarea {
      display: block;
      min-height: 44px;
      width: 100%;
      max-width: 100%;
      min-width: 0;
      box-sizing: border-box;
      border: 1px solid rgba(232, 154, 126, 0.24);
      border-radius: 18px;
      padding: 11px 12px;
      background: rgba(255, 249, 244, 0.95);
      color: var(--text);
      box-shadow: inset 0 1px 2px rgba(194, 109, 94, 0.04);
    }

    /* Native date/time inputs can render wider than their box on iOS — clamp them. */
    .field input[type="date"],
    .field input[type="time"],
    .field input[type="datetime-local"] {
      -webkit-appearance: none;
      appearance: none;
    }

    /* The fields column itself must never push past the card on narrow screens. */
    .field {
      min-width: 0;
    }

    #modalFields {
      min-width: 0;
      overflow-wrap: break-word;
    }

    .field textarea {
      min-height: 78px;
      resize: vertical;
    }

    .choice-row,
    .inline-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 10px;
    }

    .mini-button {
      min-height: 38px;
      border: 1px solid rgba(232, 154, 126, 0.18);
      border-radius: 9999px;
      padding: 8px 13px;
      background: #FFF9F4;
      color: var(--text);
      font-size: 13px;
      font-weight: 700;
    }

    .mini-button.primary {
      border-color: rgba(232, 154, 126, 0.38);
      background: linear-gradient(180deg, #E89A7E, #D77F68);
      color: var(--on-accent);
    }

    .mini-button.danger {
      border-color: rgba(180, 93, 84, 0.24);
      background: var(--danger-soft);
      color: #743936;
    }

    .modal-warning {
      margin-top: 10px;
      padding: 10px 11px;
      border: 1px solid rgba(183, 116, 79, 0.24);
      border-radius: var(--radius);
      background: var(--warning-soft);
      color: #57412b;
      font-size: 13px;
    }

    /* Footer lives in normal flow (not sticky) so it can never overlap the last
       block of content. The modal body scrolls; the buttons sit at the end with
       a clear separator and breathing room above. */
    .modal-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-top: 18px;
      padding-top: 14px;
      border-top: 1px solid var(--line);
    }

    .modal-actions.single {
      grid-template-columns: 1fr;
    }

    /* Inside a scrolling modal a sticky-bottom illustration would float over the
       content and the "Закрыть" button — keep it in normal flow there. */
    .modal .reference-side {
      position: relative;
      bottom: auto;
    }

    /* Reserve room under the scrolling content so the footer never crowds the
       last line. */
    .modal #modalFields {
      margin-bottom: 6px;
    }

    /* Numeric values/counters read better in the system font with lining
       tabular figures — the decorative serif turns "0" into a letter-like "о".
       Headings keep the serif; only the value/counter elements switch. */
    .metric-value,
    .summary-chip-value,
    .child-fact strong,
    .status-chip,
    .chart-value,
    .event-time,
    .age-secondary {
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      font-variant-numeric: tabular-nums lining-nums;
      font-feature-settings: "tnum" 1, "lnum" 1;
    }

    @media (min-width: 470px) {
      .actions { grid-template-columns: repeat(3, 1fr); }
      .grid { grid-template-columns: repeat(3, 1fr); }
      .chip-grid { grid-template-columns: repeat(4, 1fr); }
      .chart-grid { grid-template-columns: repeat(2, 1fr); }
    }

    /* Phones: information cards go full width so multi-line text is never
       squeezed into a narrow column; short quick buttons stay at 2 columns. */
    @media (max-width: 480px) {
      .grid { grid-template-columns: 1fr; }
      .actions { grid-template-columns: repeat(2, 1fr); }
      .chip-grid { grid-template-columns: repeat(2, 1fr); }
      .about-grid { grid-template-columns: 1fr; }
      .book-library,
      .book-media-grid,
      .reference-media-strip { grid-template-columns: 1fr; }
      .illustration-row { grid-template-columns: 1fr; }
      .reference-layout { grid-template-columns: 1fr; }
      .reference-side { position: relative; }
      .soft-illustration { max-width: 108px; }
      .reference-bunny { width: min(64%, 150px); }
      .book-detail-visual { min-height: 120px; }
      .book-detail-visual .book-svg { width: 92px; height: 92px; }
      body::after { width: 104px; height: 84px; opacity: 0.12; }
    }

    @media (max-width: 390px) {
      .about-grid { grid-template-columns: 1fr; }
      .book-library,
      .book-media-grid { grid-template-columns: 1fr; }
      .book-cover { min-height: 190px; }
      .illustration-row { grid-template-columns: 1fr; }
      .soft-illustration { max-width: 104px; }
      .script-ribbon { font-size: 13px; }
      .reference-corner { width: 54px; height: 44px; opacity: 0.62; }
      .reference-layout { grid-template-columns: 1fr; }
      .reference-side { position: relative; }
      .reference-bunny { width: min(74%, 176px); }
      .reference-memo-card {
        grid-template-columns: 70px minmax(0, 1fr);
        padding: 12px;
      }
      .reference-memo-visual {
        width: 66px;
        height: 66px;
      }
      .reference-memo-title { font-size: 18px; }
      .reference-media-strip { grid-template-columns: 1fr; }
      .reference-about .about-item { grid-template-columns: 60px 1fr; }
      .reference-about .about-icon { width: 54px; height: 54px; }
    }

    /* Narrowest phones (iPhone SE / small Android): stack tighter and shrink
       illustrations a touch more so nothing overflows or wraps badly. */
    @media (max-width: 360px) {
      .chip-grid { grid-template-columns: 1fr; }
      .child-facts { grid-template-columns: 1fr; }
      .action { font-size: 12px; }
      .book-cover { min-height: 178px; }
      .reference-title { font-size: clamp(24px, 8vw, 30px); }
      .soft-illustration { max-width: 92px; }
      .reference-bunny { width: min(58%, 130px); }
    }

    /* Reference alignment v1: compact book-like mobile surfaces. */
    .title,
    .child-name,
    .status-title,
    .metric-title,
    .metric-value,
    .list-title,
    .section-head h2,
    .reference-title,
    .reference-memo-title,
    .book-cover-title,
    .book-topic-title,
    .book-topic-row-title,
    .book-article-title,
    .assistant-card-title {
      overflow-wrap: normal;
      word-break: normal;
      hyphens: none;
      text-wrap: balance;
      min-width: 0;
    }

    .card,
    .metric,
    .list-item,
    .book-cover,
    .book-topic-row,
    .home-feature-card,
    .assistant-card {
      border-radius: var(--radius-sm);
      border-color: rgba(232, 215, 204, 0.96);
      box-shadow: var(--shadow-soft);
    }

    .home-assistant-slot {
      margin-bottom: 16px;
    }

    .assistant-card {
      display: grid;
      grid-template-columns: 46px minmax(0, 1fr) auto;
      gap: 12px;
      align-items: center;
      width: 100%;
      min-width: 0;
      padding: 14px;
      text-align: left;
      background:
        radial-gradient(circle at 92% 10%, rgba(220, 161, 141, 0.14), transparent 24%),
        linear-gradient(180deg, rgba(255, 248, 241, 0.98), rgba(243, 230, 218, 0.84));
      color: var(--text);
    }

    .assistant-card-icon,
    .home-feature-icon,
    .book-topic-icon,
    .book-topic-row-icon,
    .book-article-visual {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
      border-radius: 9999px;
      background: linear-gradient(180deg, #F4DDD0, #FFF8F1);
      color: var(--accent-strong);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.78);
    }

    .assistant-card-icon,
    .home-feature-icon,
    .book-topic-row-icon {
      width: 46px;
      height: 46px;
    }

    .assistant-card-icon .book-svg-small,
    .home-feature-icon .book-svg-small,
    .book-topic-row-icon .reference-memo-svg {
      width: 28px;
      height: 28px;
    }

    .assistant-card-body {
      display: grid;
      gap: 3px;
      min-width: 0;
    }

    .assistant-card-kicker {
      color: var(--muted);
      font-size: 12px;
      font-weight: 600;
    }

    .assistant-card-title {
      color: var(--heading);
      font-family: var(--serif);
      font-size: clamp(18px, 4.8vw, 22px);
      font-weight: 700;
      line-height: 1.14;
    }

    .assistant-card-text {
      color: var(--text-soft);
      font-size: 13px;
      line-height: 1.38;
    }

    .assistant-card-action {
      align-self: center;
      border: 1px solid rgba(220, 161, 141, 0.34);
      border-radius: 999px;
      padding: 7px 10px;
      color: var(--heading);
      font-size: 12px;
      font-weight: 600;
      white-space: nowrap;
      background: rgba(255, 248, 241, 0.72);
    }

    .home-feature-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
    }

    .home-feature-card {
      display: grid;
      grid-template-columns: 46px minmax(0, 1fr);
      gap: 12px;
      align-items: center;
      min-width: 0;
      min-height: 78px;
      padding: 13px;
      border: 1px solid rgba(232, 215, 204, 0.96);
      background: rgba(255, 248, 241, 0.9);
      color: var(--text);
      text-align: left;
    }

    .home-feature-card strong,
    .home-feature-card small {
      display: block;
      min-width: 0;
    }

    .home-feature-card strong {
      color: var(--heading);
      font-family: var(--serif);
      font-size: 17px;
      line-height: 1.15;
      font-weight: 700;
    }

    .home-feature-card small {
      margin-top: 4px;
      color: var(--text-soft);
      font-size: 13px;
      line-height: 1.32;
    }

    #aboutZabotCard {
      padding: 16px;
    }

    #aboutZabotCard .illustration-row,
    #aboutZabotCard .about-grid,
    #aboutZabotCard .reference-flourish {
      display: none;
    }

    #aboutZabotCard .reference-title {
      font-size: clamp(22px, 6vw, 27px);
    }

    #aboutZabotCard .reference-intro {
      max-width: 100%;
    }

    .book-cover {
      min-height: 142px;
      gap: 8px;
      padding: 13px;
    }

    .book-cover-visual {
      min-height: 64px;
      border-radius: 20px;
    }

    .book-cover-visual .book-svg {
      width: 46px;
      height: 46px;
    }

    .book-cover-tag {
      display: none;
    }

    .book-cover-title {
      font-size: 17px;
      font-weight: 700;
    }

    .book-cover-text {
      font-size: 12px;
      line-height: 1.34;
    }

    .book-topic,
    .book-article {
      display: grid;
      gap: 14px;
    }

    .book-topic-head,
    .book-article-cover {
      display: grid;
      grid-template-columns: 58px minmax(0, 1fr);
      gap: 13px;
      align-items: center;
      min-width: 0;
      padding: 12px;
      border: 1px solid rgba(232, 215, 204, 0.92);
      border-radius: var(--radius-sm);
      background: rgba(255, 248, 241, 0.78);
    }

    .book-topic-icon,
    .book-article-visual {
      width: 58px;
      height: 58px;
    }

    .book-topic-icon .book-svg-small,
    .book-article-visual .reference-memo-svg {
      width: 34px;
      height: 34px;
    }

    .book-topic-title,
    .book-article-title {
      display: block;
      margin-top: 2px;
      color: var(--heading);
      font-family: var(--serif);
      font-size: clamp(21px, 5.5vw, 27px);
      line-height: 1.1;
      font-weight: 700;
    }

    .book-topic-text,
    .book-article-lead {
      display: block;
      margin-top: 5px;
      color: var(--text-soft);
      font-size: 13px;
      line-height: 1.38;
    }

    .book-topic-list,
    .book-article-sections {
      display: grid;
      gap: 9px;
    }

    .book-topic-row {
      display: grid;
      grid-template-columns: 48px minmax(0, 1fr) 16px;
      gap: 11px;
      align-items: center;
      min-width: 0;
      min-height: 76px;
      padding: 12px;
      border: 1px solid rgba(232, 215, 204, 0.94);
      background: rgba(255, 248, 241, 0.88);
      color: var(--text);
      text-align: left;
    }

    .book-topic-row-body {
      display: grid;
      gap: 3px;
      min-width: 0;
    }

    .book-topic-row-title {
      color: var(--heading);
      font-family: var(--serif);
      font-size: 16px;
      line-height: 1.16;
      font-weight: 700;
    }

    .book-topic-row-text {
      color: var(--text-soft);
      font-size: 12.5px;
      line-height: 1.35;
    }

    .book-topic-arrow {
      color: var(--accent-strong);
      font-size: 23px;
      line-height: 1;
    }

    .reference-warning.compact {
      margin-top: 0;
    }

    .book-article-note {
      padding: 13px;
      border: 1px solid rgba(220, 161, 141, 0.24);
      border-radius: var(--radius-sm);
      background: rgba(243, 230, 218, 0.6);
    }

    .book-note-card p {
      margin: 0;
      color: var(--text-soft);
      font-size: 13px;
      line-height: 1.4;
    }

    .book-illustration,
    .reference-memo-visual {
      width: 58px;
      height: 58px;
    }

    .book-svg-small,
    .reference-memo-svg {
      max-width: 34px;
      max-height: 34px;
    }

    .modal {
      display: flex;
      flex-direction: column;
      gap: 0;
      overflow-y: auto;
      padding-bottom: calc(22px + env(safe-area-inset-bottom));
    }

    #modalFields {
      min-height: 0;
      padding-bottom: 8px;
    }

    .modal-actions {
      position: relative;
      flex: 0 0 auto;
      margin-top: 14px;
    }

    @media (min-width: 430px) {
      .home-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 480px) {
      .child-row,
      .book-section-title,
      .more-item.with-icon,
      .status-line {
        min-width: 0;
      }

      .book-section-title,
      .more-item.with-icon {
        grid-template-columns: 46px minmax(0, 1fr);
      }

      .book-illustration,
      .book-action-icon,
      .metric-icon,
      .reference-memo-visual {
        width: 48px;
        height: 48px;
      }

      .reference-memo-card {
        min-height: 78px;
        grid-template-columns: 50px minmax(0, 1fr);
        gap: 10px;
      }

      .reference-memo-title {
        font-size: 16px;
      }

      .reference-memo-text {
        font-size: 12.5px;
      }

      .assistant-card {
        grid-template-columns: 44px minmax(0, 1fr);
      }

      .assistant-card-action {
        grid-column: 2;
        justify-self: start;
        margin-top: 4px;
      }
    }

    @media (max-width: 390px) {
      .card-pad {
        padding: 15px;
      }

      .book-library {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
      }

      .book-cover {
        min-height: 128px;
        padding: 11px;
      }

      .book-cover-visual {
        min-height: 52px;
      }

      .book-cover-visual .book-svg {
        width: 38px;
        height: 38px;
      }

      .book-cover-title {
        font-size: 15.5px;
      }

      .book-cover-text {
        font-size: 11.5px;
      }

      .modal {
        padding: 15px;
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
      }
    }

    @media (max-width: 360px) {
      .book-library,
      .actions {
        grid-template-columns: 1fr;
      }

      .home-feature-card,
      .assistant-card,
      .book-topic-head,
      .book-article-cover,
      .book-topic-row {
        grid-template-columns: 42px minmax(0, 1fr);
      }

      .book-topic-arrow {
        display: none;
      }

      .assistant-card-action {
        grid-column: 1 / -1;
      }
    }

    /* Reference alignment v2: home, library, article and mobile consistency. */
    .home-current-card {
      display: grid;
      gap: 14px;
      padding: 18px;
      background:
        radial-gradient(circle at 92% 8%, rgba(220, 161, 141, 0.16), transparent 24%),
        linear-gradient(180deg, rgba(255, 248, 241, 0.98), rgba(255, 248, 241, 0.86));
    }

    .home-current-head {
      align-items: flex-start;
      gap: 12px;
    }

    .home-current-head h2 {
      margin-top: 4px;
      color: var(--heading);
      font-family: var(--serif);
      font-size: clamp(24px, 7vw, 32px);
      font-weight: 800;
      line-height: 1.05;
    }

    .home-current-head .pill {
      flex: 0 0 auto;
      max-width: 132px;
      white-space: normal;
      text-align: right;
      line-height: 1.22;
      background: rgba(243, 230, 218, 0.72);
      color: var(--heading);
    }

    .reference-current-list {
      display: grid;
      gap: 8px;
      min-width: 0;
    }

    .reference-current-row {
      display: grid;
      grid-template-columns: 44px minmax(0, 1fr) auto;
      gap: 11px;
      align-items: center;
      min-width: 0;
      padding: 11px;
      border: 1px solid rgba(232, 215, 204, 0.92);
      border-radius: 20px;
      background: rgba(255, 248, 241, 0.84);
      box-shadow: 0 8px 20px rgba(162, 74, 63, 0.045);
    }

    .reference-current-row > div:nth-child(2) {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .reference-current-time {
      color: var(--muted);
      font-size: 11.5px;
      font-weight: 600;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }

    .compact-hidden,
    .home-legacy-hidden {
      display: none !important;
    }

    .important-home-head {
      margin-top: 18px;
    }

    .tab[data-tab-panel="home"] .actions {
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 9px;
    }

    .tab[data-tab-panel="home"] .actions [data-action="sleep_end"],
    .tab[data-tab-panel="home"] .actions [data-action="medication"] {
      display: none;
    }

    .tab[data-tab-panel="home"] .action {
      min-height: 78px;
      padding: 10px 6px;
    }

    .tab[data-tab-panel="home"] .action-label {
      font-size: 11.5px;
      line-height: 1.15;
    }

    .book-library-head {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 42px;
      gap: 12px;
      align-items: start;
      margin-bottom: 14px;
      min-width: 0;
    }

    .book-library-head .reference-title {
      margin: 2px 0 0;
      font-size: clamp(26px, 7vw, 34px);
      line-height: 1.04;
    }

    .soft-bookmark {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 42px;
      height: 42px;
      border: 1px solid rgba(220, 161, 141, 0.25);
      border-radius: 16px;
      background: rgba(255, 248, 241, 0.8);
      color: var(--accent-strong);
    }

    .book-library {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .book-cover {
      display: grid;
      grid-template-rows: 58px auto auto;
      min-width: 0;
      min-height: 148px;
      padding: 12px;
      text-align: left;
    }

    .book-cover-visual {
      min-height: 58px;
      justify-content: flex-start;
      background:
        radial-gradient(circle at 35% 35%, rgba(255, 248, 241, 0.92), transparent 46%),
        linear-gradient(180deg, rgba(243, 230, 218, 0.72), rgba(255, 248, 241, 0.76));
    }

    .book-cover-title,
    .book-cover-text {
      min-width: 0;
    }

    .book-cover-text {
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .book-helper-card {
      display: grid;
      grid-template-columns: 46px minmax(0, 1fr) auto;
      gap: 12px;
      align-items: center;
      width: 100%;
      margin-top: 14px;
      padding: 13px;
      border: 1px solid rgba(232, 215, 204, 0.94);
      border-radius: var(--radius-sm);
      background: rgba(255, 248, 241, 0.9);
      color: var(--text);
      text-align: left;
      box-shadow: var(--shadow-soft);
    }

    .tiny-svg {
      width: 22px;
      height: 22px;
    }

    .reading-time {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      width: fit-content;
      margin-top: 10px;
      padding: 6px 10px;
      border-radius: 999px;
      background: rgba(243, 230, 218, 0.74);
      color: var(--muted);
      font-size: 12px;
      font-weight: 600;
    }

    .article-section-title {
      margin: 0 0 8px;
      color: var(--heading);
      font-family: var(--serif);
      font-size: 18px;
      line-height: 1.16;
      font-weight: 700;
    }

    .article-fact-list {
      display: grid;
      gap: 8px;
      min-width: 0;
    }

    .article-fact-row {
      display: grid;
      grid-template-columns: 38px minmax(0, 1fr);
      gap: 10px;
      align-items: start;
      min-width: 0;
      padding: 9px;
      border-radius: 16px;
      background: rgba(255, 248, 241, 0.82);
    }

    .article-detail {
      border: 1px solid rgba(232, 215, 204, 0.94);
      border-radius: 18px;
      background: rgba(255, 248, 241, 0.86);
      overflow: hidden;
    }

    .article-detail summary {
      cursor: pointer;
      padding: 12px 14px;
      color: var(--heading);
      font-weight: 700;
      list-style: none;
    }

    .article-detail summary::-webkit-details-marker {
      display: none;
    }

    .article-detail summary::after {
      content: "›";
      float: right;
      color: var(--accent-strong);
      transform: rotate(90deg);
    }

    .article-detail[open] summary::after {
      transform: rotate(-90deg);
    }

    .article-detail p {
      margin: 0;
      padding: 0 14px 13px;
      color: var(--text-soft);
      font-size: 13.5px;
      line-height: 1.45;
    }

    .book-action-strip {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 9px;
      min-width: 0;
    }

    .book-action-card {
      display: grid;
      justify-items: center;
      gap: 7px;
      min-width: 0;
      min-height: 84px;
      padding: 10px 6px;
      border: 1px solid rgba(232, 215, 204, 0.94);
      border-radius: 18px;
      background: rgba(255, 248, 241, 0.9);
      color: var(--heading);
      text-align: center;
      font-size: 12px;
      line-height: 1.2;
      font-weight: 700;
      box-shadow: 0 8px 18px rgba(162, 74, 63, 0.04);
    }

    .book-action-card small {
      display: block;
      color: var(--muted);
      font-size: 11px;
      font-weight: 600;
      line-height: 1.2;
    }

    .list-item,
    .more-item,
    .task-row,
    .document-card,
    .family-member-card,
    .medical-record-card {
      min-width: 0;
      overflow-wrap: normal;
      word-break: normal;
      hyphens: none;
    }

    .event {
      min-width: 0;
      overflow-wrap: normal;
      word-break: normal;
      hyphens: none;
    }

    .timeline {
      gap: 9px;
    }

    .timeline::before {
      left: 70px;
      opacity: 0.55;
    }

    .event {
      display: grid;
      grid-template-columns: 44px minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      padding: 11px;
      border: 1px solid rgba(232, 215, 204, 0.94);
      border-radius: 20px;
      background: rgba(255, 248, 241, 0.92);
      box-shadow: 0 8px 18px rgba(162, 74, 63, 0.04);
    }

    .event-time {
      grid-column: 3;
      grid-row: 1;
      justify-self: end;
      color: var(--muted);
      font-size: 11.5px;
      font-weight: 700;
      white-space: nowrap;
    }

    .event-icon {
      grid-column: 1;
      grid-row: 1;
      width: 44px;
      height: 44px;
    }

    .event-body {
      grid-column: 2;
      grid-row: 1;
      min-width: 0;
    }

    .event-text {
      color: var(--heading);
      font-family: var(--serif);
      font-size: 16px;
      line-height: 1.18;
      font-weight: 700;
    }

    .event-type {
      margin-top: 4px;
      padding: 0;
      border: 0;
      background: transparent;
      color: var(--muted);
      font-size: 12px;
      font-weight: 600;
    }

    .event-meta {
      margin-top: 4px;
      color: var(--text-soft);
      font-size: 12.5px;
      line-height: 1.34;
    }

    .event-title,
    .event-detail,
    .list-title,
    .list-meta,
    .more-title,
    .more-subtitle {
      min-width: 0;
      overflow-wrap: normal;
      word-break: normal;
      hyphens: none;
    }

    .book-card-row {
      display: grid;
      grid-template-columns: 46px minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      min-width: 0;
    }

    .book-card-row h4,
    .book-card-row .list-title {
      min-width: 0;
    }

    .book-card-row .status-chip {
      justify-self: end;
    }

    .list-item.more-item.with-icon,
    .help-section,
    .storage-note,
    .pdf-ready,
    .timezone-current,
    .locked-action {
      border-color: rgba(232, 215, 204, 0.94);
      background:
        radial-gradient(circle at 96% 6%, rgba(220, 161, 141, 0.09), transparent 20%),
        rgba(255, 248, 241, 0.92);
      box-shadow: var(--shadow-soft);
    }

    .family-row.is-current {
      border: 1px solid rgba(162, 74, 63, 0.22);
      box-shadow: 0 10px 24px rgba(162, 74, 63, 0.07);
    }

    .family-row .list-title,
    .family-row .list-meta {
      display: block;
    }

    .document-actions {
      gap: 8px;
      margin-top: 10px;
    }

    .document-file-preview {
      margin-top: 12px;
      padding: 12px;
      border: 1px solid rgba(232, 215, 204, 0.94);
      border-radius: 18px;
      background: rgba(255, 248, 241, 0.86);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
    }

    .document-file-preview[hidden] {
      display: none !important;
    }

    .document-actions .mini-button {
      min-width: 0;
      white-space: normal;
      line-height: 1.2;
    }

    .grid .metric,
    .grid .card,
    .grid .list-item {
      min-width: 0;
    }

    @media (max-width: 480px) {
      .home-current-card {
        padding: 16px;
      }

      .home-current-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
      }

      .reference-current-row {
        grid-template-columns: 42px minmax(0, 1fr) auto;
        gap: 9px;
      }

      .status-icon {
        width: 42px;
        height: 42px;
      }

      .book-action-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .event {
        grid-template-columns: 42px minmax(0, 1fr) auto;
      }

      .book-card-row {
        grid-template-columns: 42px minmax(0, 1fr);
      }

      .book-card-row .status-chip {
        grid-column: 2;
        justify-self: start;
      }
    }

    @media (max-width: 390px) {
      .home-current-head {
        grid-template-columns: 1fr;
      }

      .home-current-head .pill {
        max-width: 100%;
        justify-self: start;
        text-align: left;
      }

      .tab[data-tab-panel="home"] .actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .book-action-strip {
        grid-template-columns: 1fr;
      }

      .book-helper-card {
        grid-template-columns: 42px minmax(0, 1fr);
      }

      .book-helper-card .book-topic-arrow {
        display: none;
      }

      .event {
        grid-template-columns: 40px minmax(0, 1fr);
      }

      .event-time {
        grid-column: 2;
        grid-row: auto;
        justify-self: start;
      }
    }

    @media (max-width: 360px) {
      .reference-current-row {
        grid-template-columns: 40px minmax(0, 1fr);
      }

      .reference-current-time {
        grid-column: 2;
        justify-self: start;
      }
    }

    /* Hard reference rebuild v3: primary flows are built from rz-* components. */
    /* App Shell override removed — folded into canonical .app (component: App Shell). */

    /* Header: dead .topbar override removed — fully superseded by later global .topbar. */

    .topbar .eyebrow {
      display: none;
    }

    .title {
      color: var(--heading);
      font-family: var(--serif);
      font-size: 22px;
      line-height: 1.08;
      font-weight: 800;
      letter-spacing: 0;
    }

    .brand-subtitle {
      margin-top: 4px;
      color: var(--text-soft);
      font-size: 12.5px;
      line-height: 1.25;
      font-weight: 500;
    }

    .icon-button {
      width: 38px;
      height: 38px;
      border-radius: 999px;
      border: 1px solid rgba(232, 215, 204, 0.94);
      background: rgba(255, 248, 241, 0.9);
      color: var(--accent-strong);
      box-shadow: 0 8px 18px rgba(162, 74, 63, 0.05);
    }

    .icon-button svg {
      display: none;
    }

    .icon-button::before {
      content: "";
      width: 13px;
      height: 15px;
      border: 1.8px solid currentColor;
      border-radius: 8px 8px 6px 6px;
      border-top-color: transparent;
      transform: translateY(1px);
    }

    .rz-page {
      display: grid;
      gap: 14px;
      min-width: 0;
    }

    .rz-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      min-width: 0;
    }

    .rz-header-with-back {
      justify-content: flex-start;
      align-items: center;
    }

    .rz-title,
    .rz-section-title {
      display: block;
      color: var(--heading);
      font-family: var(--serif);
      font-size: clamp(22px, 6vw, 28px);
      line-height: 1.08;
      font-weight: 800;
      overflow-wrap: normal;
      word-break: normal;
      hyphens: none;
    }

    .rz-section-title {
      font-size: clamp(20px, 5.4vw, 24px);
    }

    .rz-subtitle,
    .rz-date,
    .rz-help-text {
      display: block;
      color: var(--text-soft);
      font-size: 12.5px;
      line-height: 1.35;
      font-weight: 500;
    }

    .rz-date {
      margin-bottom: 6px;
      color: var(--text);
    }

    /* Card — single canonical implementation (computed result preserved). */
    .rz-card {
      min-width: 0;
      border: 1px solid #F3E6E1;
      border-radius: 18px;
      background: #FFFFFF;
      box-shadow: 0 8px 22px rgba(140, 58, 54, 0.045);
      color: var(--text);
    }

    .rz-current-card,
    .rz-diary-card,
    .rz-profile-card {
      padding: 14px;
    }

    .rz-current-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: flex-start;
      margin-bottom: 12px;
    }

    .rz-age-pill {
      display: inline-flex;
      flex-direction: column;
      align-items: flex-end;
      max-width: 126px;
      padding: 6px 9px;
      border-radius: 999px;
      background: rgba(243, 230, 218, 0.75);
      color: var(--heading);
      font-size: 11.5px;
      line-height: 1.18;
      font-weight: 700;
      text-align: right;
      font-variant-numeric: tabular-nums;
    }

    .rz-event-list {
      display: grid;
      gap: 8px;
      min-width: 0;
    }

    .rz-event-row {
      display: grid;
      grid-template-columns: 40px minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      min-width: 0;
      padding: 9px;
      border-radius: 15px;
      border: 1px solid rgba(232, 215, 204, 0.9);
      background: rgba(255, 252, 248, 0.78);
      box-shadow: none;
    }

    .rz-event-copy,
    .rz-topic-copy {
      display: grid;
      gap: 3px;
      min-width: 0;
    }

    .rz-event-title,
    .rz-topic-title,
    .rz-card-title {
      color: var(--text);
      font-size: 13.5px;
      line-height: 1.2;
      font-weight: 800;
      overflow-wrap: normal;
      word-break: normal;
      hyphens: none;
    }

    .rz-card-title {
      color: var(--heading);
      font-family: var(--serif);
      font-size: 16px;
    }

    .rz-event-note,
    .rz-topic-text,
    .rz-card-text {
      color: var(--text-soft);
      font-size: 11.8px;
      line-height: 1.34;
      font-weight: 500;
    }

    .rz-event-time {
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }

    /* Icon Bubble — canonical implementation lives below (computed result preserved). */

    .rz-icon-bubble::before {
      content: "";
      width: 15px;
      height: 15px;
      border: 2px solid currentColor;
      border-radius: 999px;
      opacity: 0.78;
    }

    .rz-icon-bubble[data-rz-icon="feeding"]::before,
    .rz-icon-bubble[data-rz-icon="temperature"]::before,
    .rz-icon-bubble[data-rz-icon="document"]::before,
    .rz-icon-bubble[data-rz-icon="pdf"]::before {
      border-radius: 5px;
    }

    .rz-icon-bubble[data-rz-icon="sleep"]::before {
      border-color: transparent currentColor currentColor transparent;
      border-radius: 999px;
      transform: rotate(28deg);
    }

    .rz-icon-bubble[data-rz-icon="development"]::before,
    .rz-icon-bubble[data-rz-icon="check"]::before {
      width: 17px;
      height: 10px;
      border-top: 0;
      border-right: 0;
      border-radius: 0;
      transform: rotate(-45deg);
    }

    .rz-section {
      display: grid;
      gap: 9px;
      min-width: 0;
    }

    .rz-block-title,
    .rz-section-label {
      margin: 0;
      color: var(--heading);
      font-family: var(--serif);
      font-size: 15px;
      line-height: 1.2;
      font-weight: 800;
    }

    .rz-quick-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 9px;
    }

    .rz-quick-action {
      display: grid;
      justify-items: center;
      gap: 7px;
      min-width: 0;
      min-height: 76px;
      padding: 9px 4px;
      border: 1px solid rgba(232, 215, 204, 0.94);
      border-radius: 16px;
      background: rgba(255, 248, 241, 0.94);
      color: var(--text);
      box-shadow: 0 10px 22px rgba(139, 62, 56, 0.045);
    }

    .rz-quick-action .action-label {
      font-size: 11px;
      line-height: 1.15;
      font-weight: 700;
      text-align: center;
    }

    .rz-help-card {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 82px;
      gap: 12px;
      align-items: center;
      width: 100%;
      padding: 13px;
      text-align: left;
    }

    .rz-help-copy {
      display: grid;
      gap: 5px;
      min-width: 0;
    }

    .rz-help-image,
    .rz-illustration,
    .rz-article-image {
      display: block;
      width: 82px;
      max-width: 100%;
      height: 82px;
      object-fit: contain;
    }

    .rz-card-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      min-width: 0;
    }

    .rz-home-tile,
    .rz-category-card {
      display: grid;
      align-content: start;
      gap: 6px;
      min-height: 96px;
      padding: 12px;
      text-align: left;
    }

    .rz-category-card {
      min-height: 142px;
    }

    .rz-category-card .rz-illustration {
      width: 82px;
      height: 82px;
      justify-self: start;
      margin-bottom: 2px;
    }

    .rz-topic-list {
      display: grid;
      gap: 9px;
    }

    .rz-topic-row {
      display: grid;
      grid-template-columns: 42px minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      width: 100%;
      min-width: 0;
      min-height: 68px;
      padding: 10px;
      border: 1px solid rgba(232, 215, 204, 0.94);
      border-radius: 16px;
      background: rgba(255, 248, 241, 0.94);
      color: var(--text);
      text-align: left;
      box-shadow: 0 9px 18px rgba(139, 62, 56, 0.04);
    }

    .rz-chevron {
      color: var(--accent-strong);
      font-size: 21px;
      line-height: 1;
      font-weight: 500;
    }

    .rz-note-card {
      padding: 13px;
    }

    .rz-note-title {
      display: block;
      margin-bottom: 5px;
      color: var(--heading);
      font-family: var(--serif);
      font-weight: 800;
    }

    .rz-note-card p {
      margin: 0;
      color: var(--text-soft);
      font-size: 12.5px;
      line-height: 1.42;
    }

    .rz-back-button,
    .rz-icon-action {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 34px;
      height: 34px;
      border: 1px solid rgba(232, 215, 204, 0.94);
      border-radius: 999px;
      background: rgba(255, 248, 241, 0.92);
      color: var(--accent-strong);
      font-size: 20px;
      line-height: 1;
    }

    .rz-article-hero {
      display: grid;
      grid-template-columns: 100px minmax(0, 1fr);
      gap: 14px;
      align-items: center;
      padding: 14px;
      border: 1px solid rgba(232, 215, 204, 0.94);
      border-radius: 18px;
      background: rgba(255, 248, 241, 0.96);
      box-shadow: 0 12px 30px rgba(139, 62, 56, 0.055);
    }

    .rz-article-image {
      width: 92px;
      height: 92px;
    }

    .rz-article-title {
      display: block;
      color: var(--heading);
      font-family: var(--serif);
      font-size: 22px;
      line-height: 1.08;
      font-weight: 800;
    }

    .rz-article-text {
      display: block;
      margin-top: 7px;
      color: var(--text);
      font-size: 13px;
      line-height: 1.42;
    }

    .rz-reading-time {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-top: 10px;
      padding: 5px 9px;
      border-radius: 999px;
      background: rgba(243, 230, 218, 0.78);
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
    }

    .rz-icon-small {
      width: 22px;
      height: 22px;
      flex-basis: 22px;
      border-radius: 9px;
    }

    .rz-icon-small::before {
      width: 9px;
      height: 9px;
      border-width: 1.5px;
    }

    .rz-article-section {
      display: grid;
      gap: 8px;
    }

    .rz-fact-list {
      display: grid;
      gap: 8px;
    }

    .rz-fact-row {
      display: grid;
      grid-template-columns: 38px minmax(0, 1fr);
      gap: 10px;
      align-items: start;
      padding: 10px;
      border-radius: 15px;
      background: rgba(255, 248, 241, 0.94);
      border: 1px solid rgba(232, 215, 204, 0.9);
    }

    .rz-fact-row p {
      margin: 0;
      color: var(--text);
      font-size: 12.8px;
      line-height: 1.4;
    }

    .rz-accordion-row {
      border: 1px solid rgba(232, 215, 204, 0.94);
      border-radius: 15px;
      background: rgba(255, 248, 241, 0.94);
      overflow: hidden;
    }

    .rz-accordion-row summary {
      cursor: pointer;
      padding: 12px;
      color: var(--text);
      font-size: 13px;
      font-weight: 800;
      list-style: none;
    }

    .rz-accordion-row summary::-webkit-details-marker {
      display: none;
    }

    .rz-accordion-row p {
      margin: 0;
      padding: 0 12px 12px;
      color: var(--text-soft);
      font-size: 12.5px;
      line-height: 1.42;
    }

    .rz-action-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 9px;
    }

    .rz-action-card {
      display: grid;
      justify-items: center;
      gap: 7px;
      min-height: 84px;
      padding: 9px 5px;
      border: 1px solid rgba(232, 215, 204, 0.94);
      border-radius: 16px;
      background: rgba(255, 248, 241, 0.94);
      color: var(--heading);
      text-align: center;
      font-size: 11.5px;
      line-height: 1.22;
      font-weight: 800;
    }

    .rz-text-button {
      justify-self: center;
      border: 0;
      background: transparent;
      color: var(--accent-strong);
      font-weight: 800;
    }

    .rz-profile-top {
      display: grid;
      grid-template-columns: 74px minmax(0, 1fr) auto;
      gap: 12px;
      align-items: center;
    }

    .rz-avatar,
    .rz-avatar-small {
      display: inline-flex;
      border-radius: 999px;
      background:
        radial-gradient(circle at 50% 38%, #F6D9C8 0 16%, transparent 17%),
        radial-gradient(circle at 50% 74%, #DCA18D 0 29%, transparent 30%),
        #FFF1E8;
      border: 1px solid rgba(232, 215, 204, 0.94);
    }

    .rz-avatar {
      width: 68px;
      height: 68px;
    }

    .rz-avatar-small {
      width: 38px;
      height: 38px;
      flex: 0 0 38px;
    }

    .rz-list-card {
      display: grid;
      gap: 7px;
      padding: 8px;
      border: 1px solid rgba(232, 215, 204, 0.94);
      border-radius: 18px;
      background: rgba(255, 248, 241, 0.92);
    }

    .rz-member-row {
      display: grid;
      grid-template-columns: 38px minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      padding: 9px;
      border-radius: 14px;
      color: var(--text);
    }

    .rz-member-row.is-current {
      background: rgba(243, 230, 218, 0.62);
    }

    .rz-invite-card {
      display: grid;
      gap: 9px;
      padding: 13px;
    }

    .rz-button-primary,
    .rz-button-secondary {
      min-height: 42px;
      padding: 10px 14px;
      border-radius: 999px;
      font-weight: 800;
      line-height: 1.2;
    }

    /* Button: dead .rz-button-primary override removed — superseded by later global rule. */

    /* Button: dead .rz-button-secondary skin override removed — superseded by later global rule. */

    .rz-family-footer {
      margin: 4px 0 0;
      color: var(--text-soft);
      text-align: center;
      font-size: 12px;
    }

    .bottom-nav {
      left: 50%;
      right: auto;
      bottom: calc(10px + env(safe-area-inset-bottom));
      width: min(430px, calc(100% - 28px));
      transform: translateX(-50%);
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 2px;
      padding: 7px 8px;
      border: 1px solid rgba(232, 215, 204, 0.96);
      border-radius: 22px;
      background: rgba(255, 248, 241, 0.96);
      box-shadow: 0 18px 45px rgba(139, 62, 56, 0.12);
    }

    .nav-button {
      min-width: 0;
      min-height: 46px;
      padding: 6px 2px;
      border-radius: 16px;
      color: var(--muted);
      font-size: 10.5px;
      font-weight: 700;
    }

    .nav-button::before {
      content: "";
      display: block;
      width: 17px;
      height: 17px;
      margin: 0 auto 4px;
      border: 1.6px solid currentColor;
      border-radius: 7px;
      opacity: 0.78;
    }

    .nav-button.active {
      background: rgba(220, 161, 141, 0.18);
      color: var(--accent-strong);
      box-shadow: none;
    }

    .modal-backdrop {
      padding: 14px;
      align-items: flex-end;
    }

    .modal {
      border-radius: 24px;
      border: 1px solid rgba(232, 215, 204, 0.96);
      background: rgba(255, 248, 241, 0.98);
      box-shadow: 0 28px 80px rgba(65, 46, 37, 0.24);
    }

    .modal h3:empty,
    .modal > .result:empty {
      display: none;
    }

    .modal-actions {
      gap: 9px;
      padding-top: 12px;
      border-top: 1px solid rgba(232, 215, 204, 0.8);
    }

    .modal-actions .action {
      min-height: 42px;
      border-radius: 999px;
    }

    .book-illustration svg,
    .book-list-icon svg,
    .assistant-card svg,
    .book-cover svg,
    .book-topic-row svg,
    .book-article svg {
      display: none !important;
    }

    @media (max-width: 390px) {
      .rz-card-grid {
        gap: 8px;
      }

      .rz-category-card {
        min-height: 132px;
      }

      .rz-category-card .rz-illustration {
        width: 72px;
        height: 72px;
      }

      .rz-quick-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 7px;
      }

      .rz-article-hero {
        grid-template-columns: 82px minmax(0, 1fr);
      }

      .rz-article-image,
      .rz-help-image {
        width: 74px;
        height: 74px;
      }

      .rz-profile-top {
        grid-template-columns: 60px minmax(0, 1fr);
      }

      .rz-profile-top .rz-age-pill {
        grid-column: 2;
        justify-self: start;
      }

      .rz-action-grid {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 350px) {
      .rz-current-head {
        display: grid;
      }

      .rz-age-pill {
        align-items: flex-start;
        text-align: left;
      }

      .rz-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .rz-card-grid,
      .rz-library-grid {
        grid-template-columns: 1fr;
      }
    }

    /* Hard reference precision pass: exact palette, softer density, no modal overlap. */
    :root {
      --bg: #FFF9F6;
      --background: #FFF9F6;
      --surface: #FFFFFF;
      --surface-raised: #FFFFFF;
      --card: #FFFFFF;
      --card-soft: #FDF1EB;
      --heading: #8C3A36;
      --text: #4A3E3D;
      --text-soft: #8A7E7D;
      --muted: #8A7E7D;
      --line: #F3E6E1;
      --line-strong: #EAD8D1;
      --accent: #8C3A36;
      --accent-strong: #8C3A36;
      --accent-soft: #FDF1EB;
      --success: #6E8268;
      --shadow: 0 8px 24px rgba(140, 58, 54, 0.055);
      --shadow-soft: 0 6px 18px rgba(140, 58, 54, 0.04);
      --radius: 18px;
      --radius-sm: 14px;
    }

    html,
    body {
      overflow-x: hidden;
      background: #FFF9F6;
    }

    body {
      color: var(--text);
    }

    /* App Shell override removed — background folded into canonical .app. */

    /* Header: dead .topbar margin override removed — superseded by later global .topbar. */

    .title {
      font-family: "Playfair Display", Georgia, serif;
      font-size: 20px;
      font-weight: 700;
    }

    .brand-subtitle {
      font-size: 12px;
      color: var(--text-soft);
    }

    /* Card: second .rz-card override removed — folded into canonical .rz-card. */

    .rz-current-card {
      padding: 13px;
      box-shadow: 0 8px 22px rgba(140, 58, 54, 0.05);
    }

    .rz-current-head {
      margin-bottom: 10px;
    }

    .rz-current-card .rz-section-title {
      font-size: 15px;
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      font-weight: 800;
      color: var(--text);
    }

    .rz-event-row {
      min-height: 48px;
      padding: 7px 8px;
      border-color: transparent;
      background: transparent;
      box-shadow: none;
    }

    .rz-event-title {
      font-size: 12.8px;
      color: var(--text);
    }

    .rz-event-note {
      font-size: 11px;
      color: var(--text-soft);
    }

    .rz-event-time {
      font-size: 10.5px;
      color: var(--text-soft);
      font-variant-numeric: tabular-nums;
    }

    /* Icon Bubble: 34px variant removed — folded into canonical .rz-icon-bubble. */

    .rz-icon-bubble::before {
      width: 13px;
      height: 13px;
      border-width: 1.55px;
    }

    .rz-quick-grid {
      gap: 8px;
    }

    .rz-quick-action {
      min-height: 62px;
      padding: 8px 3px;
      border: 0;
      background: transparent;
      box-shadow: none;
    }

    .rz-quick-action .rz-icon-bubble {
      width: 42px;
      height: 42px;
      flex-basis: 42px;
      border-radius: 15px;
      box-shadow: 0 6px 14px rgba(140, 58, 54, 0.055);
    }

    .rz-quick-action .action-label {
      font-size: 10.8px;
      color: var(--text);
      font-weight: 600;
    }

    .rz-help-card {
      grid-template-columns: minmax(0, 1fr) 92px;
      min-height: 94px;
      padding: 12px 13px;
      border-radius: 17px;
      background: #FFFFFF;
    }

    .rz-help-visual {
      position: relative;
      display: grid;
      place-items: center;
      width: 92px;
      height: 78px;
      border-radius: 18px;
      background: #FDF1EB;
      overflow: hidden;
    }

    .rz-help-visual.is-fallback::before {
      content: "";
      width: 54px;
      height: 54px;
      border-radius: 20px 20px 24px 24px;
      background:
        radial-gradient(circle at 38% 30%, #FFFFFF 0 8px, transparent 9px),
        radial-gradient(circle at 62% 30%, #FFFFFF 0 8px, transparent 9px),
        linear-gradient(180deg, #EED0C4, #DCA18D);
      opacity: 0.92;
    }

    .rz-help-image {
      width: 88px;
      height: 78px;
      object-fit: contain;
    }

    .rz-library-grid {
      gap: 12px;
    }

    .rz-category-card {
      min-height: 150px;
      padding: 14px;
      gap: 7px;
      border-radius: 17px;
      box-shadow: 0 7px 18px rgba(140, 58, 54, 0.04);
    }

    .rz-category-card .rz-illustration {
      width: 88px;
      height: 88px;
      justify-self: center;
      margin: 0 0 2px;
    }

    .rz-card-title {
      font-size: 15.5px;
      font-weight: 700;
    }

    .rz-card-text {
      font-size: 11.2px;
      line-height: 1.32;
    }

    .rz-topic-list {
      gap: 8px;
    }

    .rz-topic-row {
      min-height: 58px;
      grid-template-columns: 36px minmax(0, 1fr) 12px;
      gap: 9px;
      padding: 9px 10px;
      border-radius: 15px;
      border-color: #F3E6E1;
      box-shadow: none;
      background: #FFFFFF;
    }

    .rz-topic-row .rz-icon-bubble {
      width: 32px;
      height: 32px;
      flex-basis: 32px;
      border-radius: 11px;
    }

    .rz-topic-title {
      font-size: 12.7px;
      line-height: 1.18;
    }

    .rz-topic-text {
      font-size: 10.8px;
      line-height: 1.22;
    }

    .rz-chevron {
      font-size: 16px;
      font-weight: 400;
      color: var(--accent-strong);
      opacity: 0.82;
    }

    .rz-note-card {
      background: #FFFFFF;
      border-color: #F3E6E1;
      box-shadow: none;
    }

    .rz-article-hero {
      grid-template-columns: 112px minmax(0, 1fr);
      padding: 13px;
      background: #FFFFFF;
      border-color: #F3E6E1;
      box-shadow: 0 8px 22px rgba(140, 58, 54, 0.045);
    }

    .rz-article-image {
      width: 104px;
      height: 104px;
    }

    .rz-article-title {
      font-size: 22px;
      color: var(--heading);
      font-weight: 700;
    }

    .rz-article-text {
      font-size: 12.8px;
      line-height: 1.42;
    }

    .rz-reading-time {
      background: #FDF1EB;
      color: var(--accent-strong);
      font-size: 10.8px;
      font-variant-numeric: tabular-nums;
    }

    .rz-fact-row {
      padding: 9px;
      background: #FFFFFF;
      border-color: #F3E6E1;
    }

    .rz-fact-row p {
      font-size: 12.3px;
      line-height: 1.38;
      font-variant-numeric: tabular-nums;
    }

    .rz-accordion-row {
      background: #FFFFFF;
      border-color: #F3E6E1;
      box-shadow: none;
    }

    .rz-accordion-row summary {
      padding: 11px 12px;
      font-size: 12.4px;
    }

    .rz-accordion-row summary::after {
      content: "›";
      float: right;
      color: var(--accent-strong);
      font-weight: 400;
      opacity: 0.75;
    }

    .rz-accordion-row p {
      padding: 0 12px 12px;
      font-size: 12.2px;
      line-height: 1.5;
    }

    .rz-action-card {
      background: #FFFFFF;
      border-color: #F3E6E1;
      box-shadow: none;
      font-size: 11px;
    }

    .modal-backdrop {
      align-items: stretch;
      padding: 14px;
      overflow: hidden;
    }

    .modal {
      display: flex !important;
      flex-direction: column;
      width: min(100%, 430px);
      max-height: calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
      margin: auto auto calc(env(safe-area-inset-bottom));
      padding: 16px;
      overflow: hidden !important;
      background: #FFF9F6;
      border-color: #F3E6E1;
      border-radius: 24px;
    }

    #modalFields {
      flex: 1 1 auto;
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
      padding-right: 2px;
      padding-bottom: 84px;
      overscroll-behavior: contain;
    }

    .modal-actions {
      position: relative !important;
      flex: 0 0 auto;
      margin-top: 10px;
      padding-top: 10px;
      background: #FFF9F6;
      border-top: 1px solid #F3E6E1;
      z-index: 2;
    }

    .document-actions,
    .inline-actions,
    .field,
    .document-file-preview {
      max-width: 100%;
      overflow-x: hidden;
    }

    input,
    select,
    textarea {
      max-width: 100%;
      color: var(--text);
      background: #FFFFFF;
      border-color: #F3E6E1;
    }

    .rz-button-primary,
    .mini-button.primary {
      background: #8C3A36;
      border-color: #8C3A36;
      color: #FFFFFF;
      box-shadow: none;
    }

    .rz-button-secondary,
    .mini-button {
      background: #FFFFFF;
      border-color: #F3E6E1;
      color: var(--accent-strong);
      box-shadow: none;
    }

    @media (max-width: 390px) {
      .rz-category-card .rz-illustration {
        width: 78px;
        height: 78px;
      }

      .rz-help-card {
        grid-template-columns: minmax(0, 1fr) 82px;
      }

      .rz-help-visual {
        width: 82px;
        height: 72px;
      }

      .rz-article-hero {
        grid-template-columns: 92px minmax(0, 1fr);
      }

      .rz-article-image {
        width: 88px;
        height: 88px;
      }
    }

    @keyframes shimmer {
      from { background-position: 100% 0; }
      to { background-position: -100% 0; }
    }

    @keyframes fade {
      from { opacity: 0; transform: translateY(6px); }
      to { opacity: 1; transform: translateY(0); }
    }

    @keyframes pageIn {
      from { opacity: 0; transform: translateY(10px) scale(0.995); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }

    @keyframes cardIn {
      from { opacity: 0; transform: translateY(8px); }
      to { opacity: 1; transform: translateY(0); }
    }

    @keyframes modalIn {
      from { opacity: 0; transform: translateY(14px); }
      to { opacity: 1; transform: translateY(0); }
    }

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

    /* HOME GREETING CARD FIX V5: contained greeting card and larger bunny. */
    .topbar {
      box-sizing: border-box;
      width: 100%;
      max-width: 100%;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 34px;
      align-items: center;
      gap: 10px;
      margin: 0 0 13px;
      padding: 10px 12px;
      border: 1px solid rgba(243, 230, 225, 0.95);
      border-radius: 21px;
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 249, 246, 0.82)),
        #FFF9F6;
      box-shadow: 0 8px 22px rgba(140, 58, 54, 0.045);
      overflow: hidden;
    }

    .topbar > div {
      min-width: 0;
      max-width: 100%;
      overflow: hidden;
    }

    .topbar .title {
      display: block;
      max-width: 100%;
      margin: 0;
      overflow: hidden;
      color: var(--accent-strong);
      font-family: Georgia, "Times New Roman", serif;
      font-size: clamp(17px, 4.9vw, 19px);
      line-height: 1.08;
      font-weight: 800;
      letter-spacing: 0;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .topbar .brand-subtitle {
      display: block;
      max-width: 100%;
      margin-top: 3px;
      overflow: hidden;
      color: var(--muted);
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      font-size: 10.6px;
      font-style: normal;
      font-weight: 500;
      line-height: 1.24;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .topbar .icon-button {
      width: 34px;
      height: 34px;
      justify-self: end;
      flex: 0 0 34px;
      border: 1px solid rgba(243, 230, 225, 0.98);
      border-radius: 999px;
      background: #FDF1EB;
      color: var(--accent-strong);
      box-shadow: none;
    }

    .topbar .icon-button::before {
      width: 16px;
      height: 16px;
    }

    .rz-home .rz-help-card {
      grid-template-columns: minmax(0, 1fr) 158px;
      min-height: 116px;
      padding: 13px 6px 10px 13px;
      gap: 0;
    }

    .rz-home .rz-help-copy {
      min-width: 0;
      max-width: 176px;
      align-self: center;
      z-index: 1;
    }

    .rz-home .rz-help-card .rz-card-text {
      max-width: 148px;
    }

    .rz-home .rz-help-visual {
      width: 158px;
      height: 112px;
      justify-self: end;
      align-self: center;
      margin: -5px -4px -5px 0;
      overflow: visible;
    }

    .rz-home .rz-help-image {
      width: 178px;
      height: 128px;
      max-width: none;
      object-fit: contain;
      object-position: right center;
      transform: translate(0, -2px);
    }

    @media (max-width: 360px) {
      .topbar {
        grid-template-columns: minmax(0, 1fr) 32px;
        padding: 9px 10px 9px 11px;
      }

      .topbar .icon-button {
        width: 32px;
        height: 32px;
      }

      .topbar .title {
        font-size: 16.5px;
      }

      .rz-home .rz-help-card {
        grid-template-columns: minmax(0, 1fr) 126px;
        min-height: 108px;
        padding-left: 12px;
      }

      .rz-home .rz-help-copy {
        max-width: 150px;
      }

      .rz-home .rz-help-card .rz-card-text {
        max-width: 132px;
      }

      .rz-home .rz-help-visual {
        width: 126px;
        height: 104px;
      }

      .rz-home .rz-help-image {
        width: 146px;
        height: 116px;
      }
    }

    /* HOME GREETING POLISH V4: softer premium header and final help-card fit. */
    .topbar {
      grid-template-columns: minmax(0, 1fr) 32px;
      gap: 10px;
      margin: 0 0 13px;
      padding: 10px 10px 10px 13px;
      border: 1px solid rgba(243, 230, 225, 0.74);
      border-radius: 22px;
      background:
        radial-gradient(circle at 15% 0%, rgba(255, 255, 255, 0.82), transparent 72px),
        rgba(255, 249, 246, 0.72);
      box-shadow: 0 8px 24px rgba(140, 58, 54, 0.035);
      backdrop-filter: blur(8px);
    }

    .topbar .title {
      font-size: 18px;
      line-height: 1.08;
      letter-spacing: 0;
      text-wrap: balance;
    }

    .topbar .brand-subtitle {
      margin-top: 3px;
      font-size: 10.8px;
      line-height: 1.22;
      color: #7F7472;
      font-weight: 600;
      font-style: normal;
    }

    .topbar .brand-subtitle::after {
      width: 8px;
      height: 8px;
      margin-left: 5px;
      background: #DCA18D;
      opacity: 0.95;
    }

    .topbar .icon-button {
      width: 31px;
      height: 31px;
      justify-self: end;
      border: 1px solid rgba(243, 230, 225, 0.72);
      background: rgba(253, 241, 235, 0.84);
      color: var(--accent-strong);
    }

    .topbar .icon-button::before {
      width: 16px;
      height: 16px;
      -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 7v5h-5'/%3E%3Cpath d='M19.2 13.5A7.4 7.4 0 1 1 17.7 6.9L20 12'/%3E%3C/svg%3E") center / contain no-repeat;
              mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 7v5h-5'/%3E%3Cpath d='M19.2 13.5A7.4 7.4 0 1 1 17.7 6.9L20 12'/%3E%3C/svg%3E") center / contain no-repeat;
    }

    .rz-home .rz-help-card {
      grid-template-columns: minmax(0, 1fr) 146px;
      min-height: 112px;
      padding: 13px 7px 10px 13px;
      gap: 0;
    }

    .rz-home .rz-help-copy {
      align-self: center;
      max-width: 190px;
    }

    .rz-home .rz-help-card .rz-card-title {
      font-size: 15px;
      line-height: 1.12;
    }

    .rz-home .rz-help-card .rz-card-text {
      max-width: 150px;
      font-size: 10.8px;
      line-height: 1.3;
    }

    .rz-home .rz-help-visual {
      align-self: center;
      justify-self: end;
      width: 146px;
      height: 106px;
      margin: -4px -4px -5px 0;
      overflow: visible;
    }

    .rz-home .rz-help-image {
      width: 162px;
      height: 122px;
      object-fit: contain;
      object-position: right center;
      transform: translate(1px, -1px);
    }

    @media (max-width: 360px) {
      .topbar {
        padding: 9px 9px 9px 12px;
      }

      .topbar .title {
        font-size: 17px;
      }

      .rz-home .rz-help-card {
        grid-template-columns: minmax(0, 1fr) 118px;
        min-height: 104px;
        padding-right: 6px;
      }

      .rz-home .rz-help-card .rz-card-text {
        max-width: 138px;
      }

      .rz-home .rz-help-visual {
        width: 118px;
        height: 100px;
      }

      .rz-home .rz-help-image {
        width: 140px;
        height: 112px;
      }
    }

    /* HOME REFERENCE EXACT V1: match the attached first-screen reference. */
    /* App Shell override removed — these were the winning values, now in canonical .app. */

    /* Header: dead .topbar grid override removed — fully superseded by later global .topbar. */

    .topbar::before {
      content: none;
      display: none;
    }

    .topbar .icon-button {
      width: 30px;
      height: 30px;
      border: 0;
      border-radius: 999px;
      background: rgba(253, 241, 235, 0.92);
      box-shadow: none;
      color: var(--accent-strong);
    }

    .topbar > div {
      min-width: 0;
    }

    .topbar .eyebrow {
      display: none;
    }

    .topbar .title {
      margin: 0;
      color: var(--accent-strong);
      font-family: Georgia, "Times New Roman", serif;
      font-size: 19px;
      line-height: 1.08;
      font-weight: 800;
      letter-spacing: 0;
    }

    .topbar .brand-subtitle {
      margin-top: 3px;
      color: var(--muted);
      font-size: 10.5px;
      line-height: 1.2;
      font-weight: 600;
      font-style: normal;
    }

    .topbar .brand-subtitle::after {
      content: "";
      display: inline-block;
      width: 9px;
      height: 9px;
      margin-left: 4px;
      background: #DCA18D;
      vertical-align: -1px;
      -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 21s-7.5-4.6-9.4-9.2C1.1 8.3 3.1 5 6.4 5c2 0 3.6 1.2 4.6 2.8C12 6.2 13.6 5 15.6 5c3.3 0 5.3 3.3 3.8 6.8C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
              mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 21s-7.5-4.6-9.4-9.2C1.1 8.3 3.1 5 6.4 5c2 0 3.6 1.2 4.6 2.8C12 6.2 13.6 5 15.6 5c3.3 0 5.3 3.3 3.8 6.8C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
    }

    .topbar .icon-button {
      display: grid;
      place-items: center;
      padding: 0;
    }

    .topbar .icon-button .ui-svg {
      display: none;
    }

    .topbar .icon-button::before {
      content: "";
      width: 17px;
      height: 17px;
      background: currentColor;
      -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.85' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6v5h-5'/%3E%3Cpath d='M19.2 13.4A7.2 7.2 0 1 1 17.6 6.8L20 11'/%3E%3C/svg%3E") center / contain no-repeat;
              mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.85' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6v5h-5'/%3E%3Cpath d='M19.2 13.4A7.2 7.2 0 1 1 17.6 6.8L20 11'/%3E%3C/svg%3E") center / contain no-repeat;
    }

    .rz-page.rz-home {
      gap: 14px;
    }

    .rz-home .rz-card {
      border: 1px solid #F3E6E1;
      border-radius: 18px;
      background: #FFFFFF;
      box-shadow: 0 8px 24px rgba(140, 58, 54, 0.045);
    }

    .rz-home .rz-current-card {
      padding: 12px 13px 10px;
    }

    .rz-home .rz-current-head {
      display: block;
      margin-bottom: 8px;
    }

    .rz-home .rz-current-head > div {
      display: grid;
      gap: 4px;
    }

    .rz-home .rz-current-card .rz-section-title {
      order: 1;
      margin: 0;
      color: var(--text);
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      font-size: 13.5px;
      line-height: 1.18;
      font-weight: 800;
    }

    .rz-home .rz-current-card .rz-date {
      order: 2;
      margin: 0;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.2;
      font-weight: 600;
    }

    .rz-home .rz-age-pill,
    .rz-home .compact-hidden,
    .rz-home #actionResult:empty {
      display: none !important;
    }

    .rz-home .rz-event-list {
      gap: 5px;
    }

    .rz-home .rz-event-row {
      grid-template-columns: 31px minmax(0, 1fr) 40px;
      gap: 8px;
      min-height: 38px;
      padding: 3px 0;
      border: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
    }

    .rz-home .rz-event-title {
      color: var(--text);
      font-size: 11.8px;
      line-height: 1.2;
      font-weight: 800;
    }

    .rz-home .rz-event-note {
      color: var(--muted);
      font-size: 10.5px;
      line-height: 1.25;
      font-weight: 500;
    }

    .rz-home .rz-event-note:empty {
      display: none;
    }

    .rz-home .rz-event-time {
      color: var(--muted);
      font-size: 9.7px;
      line-height: 1;
      font-weight: 700;
      text-align: right;
    }

    .rz-block-title {
      color: var(--text);
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      font-size: 12.5px;
      line-height: 1.2;
      font-weight: 800;
    }

    .rz-home .rz-section {
      gap: 8px;
    }

    .rz-home .rz-quick-grid {
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 7px;
      padding: 0 1px;
    }

    .rz-home .rz-quick-action {
      display: grid;
      justify-items: center;
      align-content: start;
      gap: 6px;
      min-height: 64px;
      padding: 0;
      border: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
      color: var(--text);
    }

    .rz-home .rz-quick-action .action-label {
      max-width: 100%;
      color: var(--text);
      font-size: 10.2px;
      line-height: 1.12;
      font-weight: 500;
      white-space: nowrap;
    }

    .rz-icon-bubble {
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21c4.4 0 8-3.6 8-8 0-2.9-1.6-5.5-4-6.9.3 4.7-2.8 8.8-7.3 9.9a7.9 7.9 0 0 0 3.3 5z'/%3E%3C/svg%3E");
      width: 31px;
      height: 31px;
      flex: 0 0 31px;
      border: 0;
      border-radius: 999px;
      background: #FDF1EB;
      color: var(--accent-strong);
      box-shadow: none;
    }

    .rz-icon-bubble::before {
      width: 20px;
      height: 20px;
      border: 0 !important;
      border-radius: 0 !important;
      background: currentColor;
      opacity: 1;
      transform: none !important;
      -webkit-mask: var(--rz-icon-mask) center / contain no-repeat;
              mask: var(--rz-icon-mask) center / contain no-repeat;
    }

    .rz-home .rz-quick-action .rz-icon-bubble {
      width: 46px;
      height: 46px;
      flex-basis: 46px;
      border-radius: 16px;
      background: #FDF1EB;
      box-shadow: 0 5px 14px rgba(140, 58, 54, 0.04);
    }

    .rz-icon-bubble[data-rz-icon="sleep"] {
      --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 14.5A7 7 0 0 1 9.5 5a8 8 0 1 0 9.5 9.5z'/%3E%3Cpath d='M17 5l.6 1.4L19 7l-1.4.6L17 9l-.6-1.4L15 7l1.4-.6L17 5z'/%3E%3C/svg%3E");
    }

    .rz-icon-bubble[data-rz-icon="day"] {
      --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4 12H2M22 12h-2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M19.1 4.9l-1.4 1.4M6.3 17.7l-1.4 1.4'/%3E%3C/svg%3E");
    }

    .rz-icon-bubble[data-rz-icon="temperature"] {
      --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 14.8V5a3 3 0 1 0-6 0v9.8a5 5 0 1 0 6 0z'/%3E%3Cpath d='M11 6v8'/%3E%3Cpath d='M11 18h.01'/%3E%3C/svg%3E");
    }

    .rz-icon-bubble[data-rz-icon="feeding"] {
      --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3h5l2 4v12a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V7l2-4z'/%3E%3Cpath d='M7 8h8'/%3E%3Cpath d='M9 12h3'/%3E%3Cpath d='M9 15h3'/%3E%3C/svg%3E");
    }

    .rz-icon-bubble[data-rz-icon="diaper"] {
      --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 6h14v7a7 7 0 0 1-14 0V6z'/%3E%3Cpath d='M5 9c2 1.5 4 2.2 7 2.2S17 10.5 19 9'/%3E%3Cpath d='M8 6V4h8v2'/%3E%3C/svg%3E");
    }

    .rz-icon-bubble[data-rz-icon="book"],
    .rz-icon-bubble[data-rz-icon="health"] {
      --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20s-6-3.6-8.2-7.6C2.2 9.5 3.7 6 7 6c1.8 0 3.1 1 4 2.2C11.9 7 13.2 6 15 6c3.3 0 4.8 3.5 3.2 6.4C16 16.4 12 20 12 20z'/%3E%3C/svg%3E");
    }

    .rz-home .rz-help-card {
      grid-template-columns: minmax(0, 1fr) 132px;
      gap: 2px;
      min-height: 106px;
      padding: 12px 8px 10px 12px;
      border-radius: 17px;
      overflow: hidden;
    }

    .rz-home .rz-help-card .rz-card-title {
      color: var(--accent-strong);
      font-family: Georgia, "Times New Roman", serif;
      font-size: 14.5px;
      line-height: 1.15;
      font-weight: 800;
    }

    .rz-home .rz-help-card .rz-card-text {
      color: var(--muted);
      font-size: 10.6px;
      line-height: 1.28;
      font-weight: 600;
    }

    .rz-home .rz-help-visual {
      align-self: center;
      width: 132px;
      height: 102px;
      margin: -5px -5px -6px 0;
      border-radius: 0;
      background: transparent;
      overflow: visible;
    }

    .rz-home .rz-help-image {
      width: 150px;
      height: 116px;
      object-fit: contain;
      object-position: right center;
      transform: translateX(2px);
      transform-origin: right center;
    }

    .rz-home .rz-card-grid {
      gap: 8px;
    }

    .rz-home .rz-home-tile {
      cursor: pointer;
      min-height: 72px;
      padding: 11px 12px;
      border-radius: 14px;
      gap: 5px;
      background: #FFFFFF;
      transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
    }

    .rz-home .rz-home-tile:active,
    .rz-home .rz-quick-action:active,
    .topbar .icon-button:active {
      transform: translateY(1px);
    }

    .rz-home .rz-home-tile:focus-visible,
    .topbar .icon-button:focus-visible {
      outline: 2px solid rgba(140, 58, 54, 0.22);
      outline-offset: 2px;
    }

    .rz-sleep-choice-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .rz-sleep-choice {
      display: grid;
      justify-items: center;
      gap: 8px;
      min-height: 92px;
      padding: 14px 10px;
      border: 1px solid #F3E6E1;
      border-radius: 18px;
      background: #FFFFFF;
      color: var(--text);
      font-weight: 700;
      box-shadow: 0 8px 22px rgba(140, 58, 54, 0.045);
    }

    .rz-sleep-choice .rz-icon-bubble {
      width: 44px;
      height: 44px;
      flex-basis: 44px;
    }

    .rz-home .rz-home-tile-title {
      color: var(--text);
      font-size: 11.4px;
      line-height: 1.18;
      font-weight: 800;
    }

    .rz-home .rz-home-tile-text {
      color: var(--muted);
      font-size: 10.2px;
      line-height: 1.25;
      font-weight: 500;
    }

    .bottom-nav {
      left: 50%;
      right: auto;
      bottom: calc(8px + env(safe-area-inset-bottom));
      width: min(364px, calc(100% - 22px));
      transform: translateX(-50%);
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 2px;
      padding: 6px 7px;
      border: 1px solid rgba(243, 230, 225, 0.96);
      border-radius: 23px;
      background: rgba(255, 255, 255, 0.95);
      box-shadow: 0 14px 38px rgba(140, 58, 54, 0.11);
      backdrop-filter: blur(18px);
    }

    .nav-button {
      --nav-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 11.5 12 6l7 5.5V19a1 1 0 0 1-1 1h-4v-5h-4v5H6a1 1 0 0 1-1-1v-7.5z'/%3E%3C/svg%3E");
      min-width: 0;
      min-height: 48px;
      padding: 6px 2px 5px;
      border: 0;
      border-radius: 17px;
      background: transparent;
      color: #8A7E7D;
      font-size: 9.5px;
      line-height: 1.05;
      font-weight: 600;
      box-shadow: none;
    }

    .nav-button::before {
      content: "";
      display: block;
      width: 17px;
      height: 17px;
      margin: 0 auto 4px;
      border: 0 !important;
      border-radius: 0 !important;
      background: currentColor;
      opacity: 1;
      -webkit-mask: var(--nav-icon-mask) center / contain no-repeat;
              mask: var(--nav-icon-mask) center / contain no-repeat;
    }

    .nav-button[data-tab="home"] {
      --nav-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 11.5 12 6l7 5.5V19a1 1 0 0 1-1 1h-4v-5h-4v5H6a1 1 0 0 1-1-1v-7.5z'/%3E%3C/svg%3E");
    }

    .nav-button[data-tab="today"] {
      --nav-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='15' rx='3'/%3E%3Cpath d='M8 3v4M16 3v4M4 10h16M8 14h3M13 14h3'/%3E%3C/svg%3E");
    }

    .nav-button[data-tab="child"] {
      --nav-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='13' r='6'/%3E%3Cpath d='M8 8 6 5M16 8l2-3M9.5 13h.01M14.5 13h.01M10 16c1.2.8 2.8.8 4 0'/%3E%3C/svg%3E");
    }

    .nav-button[data-tab="family"] {
      --nav-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='9' r='3'/%3E%3Ccircle cx='16' cy='9' r='3'/%3E%3Cpath d='M3.5 19c.8-3 2.5-5 4.5-5s3.7 2 4.5 5M11.5 19c.8-3 2.5-5 4.5-5s3.7 2 4.5 5'/%3E%3C/svg%3E");
    }

    .nav-button[data-tab="more"] {
      --nav-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='5' width='5' height='5' rx='1.2'/%3E%3Crect x='14' y='5' width='5' height='5' rx='1.2'/%3E%3Crect x='5' y='14' width='5' height='5' rx='1.2'/%3E%3Crect x='14' y='14' width='5' height='5' rx='1.2'/%3E%3C/svg%3E");
    }

    .nav-button.active {
      background: #FDF1EB;
      color: var(--accent-strong);
      box-shadow: none;
    }

    .nav-button.active::after {
      display: none;
    }

    @media (max-width: 360px) {
      .app {
        padding-left: 12px;
        padding-right: 12px;
      }

      .rz-home .rz-help-card {
        grid-template-columns: minmax(0, 1fr) 112px;
      }

      .rz-home .rz-help-visual {
        width: 112px;
      }

      .rz-home .rz-help-image {
        width: 132px;
      }

      .bottom-nav {
        width: min(346px, calc(100% - 16px));
      }
    }

/* HOME TOP AND BUNNY POSITION HOTFIX: must stay after earlier home layers. */
.topbar {
  box-sizing: border-box;
  width: calc(100% - 8px);
  max-width: calc(100% - 8px);
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  margin: 0 4px 14px;
  padding: 13px 12px 12px 22px;
  border: 1px solid rgba(243, 230, 225, 0.96);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 249, 246, 0.86)),
    #FFF9F6;
  box-shadow: 0 8px 22px rgba(140, 58, 54, 0.045);
  overflow: hidden;
}

.topbar > div {
  min-width: 0;
  overflow: hidden;
}

.topbar .title {
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--accent-strong);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(17px, 4.8vw, 18.5px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar .brand-subtitle {
  max-width: 100%;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10.8px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.24;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar .brand-subtitle::after {
  width: 8px;
  height: 8px;
  margin-left: 5px;
}

.topbar .icon-button {
  width: 34px;
  height: 34px;
  justify-self: end;
  border: 1px solid rgba(243, 230, 225, 0.98);
  border-radius: 999px;
  background: #FDF1EB;
  color: var(--accent-strong);
  box-shadow: none;
}

.topbar .icon-button::before {
  width: 16px;
  height: 16px;
}

.rz-home .rz-help-card {
  position: relative;
  grid-template-columns: minmax(0, 158px) minmax(0, 1fr);
  min-height: 118px;
  padding: 14px 0 10px 13px;
  gap: 0;
  overflow: hidden;
}

.rz-home .rz-help-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 158px;
  min-width: 0;
}

.rz-home .rz-help-card .rz-card-title {
  font-size: 15px;
  line-height: 1.12;
}

.rz-home .rz-help-card .rz-card-text {
  max-width: 142px;
  font-size: 10.8px;
  line-height: 1.3;
}

.rz-home .rz-help-visual {
  position: absolute;
  inset: 0 0 0 142px;
  display: grid;
  place-items: center end;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  pointer-events: none;
}

.rz-home .rz-help-image {
  width: min(248px, 66vw);
  height: 128px;
  max-width: none;
  object-fit: contain;
  object-position: right center;
  transform: translate(-6px, -1px);
}

@media (max-width: 360px) {
  .topbar {
    width: calc(100% - 6px);
    max-width: calc(100% - 6px);
    margin-left: 3px;
    margin-right: 3px;
    padding-left: 18px;
  }

  .topbar .title {
    font-size: 16.5px;
  }

  .rz-home .rz-help-card {
    grid-template-columns: minmax(0, 142px) minmax(0, 1fr);
    min-height: 112px;
    padding-left: 12px;
  }

  .rz-home .rz-help-copy {
    max-width: 142px;
  }

  .rz-home .rz-help-card .rz-card-text {
    max-width: 126px;
  }

  .rz-home .rz-help-visual {
    inset: 0 0 0 124px;
  }

  .rz-home .rz-help-image {
    width: min(214px, 64vw);
    height: 118px;
    transform: translate(-4px, -1px);
  }
}

/* PARENT HELP REFERENCE SCREEN: category library like the attached reference. */
.modal-backdrop.help-library-modal {
  align-items: stretch;
  padding: 0;
  background: #FFF9F6;
}

.help-library-modal .modal {
  width: min(100%, 390px);
  max-height: 100dvh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% -70px, rgba(255, 255, 255, 0.78), transparent 210px),
    #FFF9F6;
  box-shadow: none;
}

.help-library-modal #modalTitle,
.help-library-modal #modalText {
  display: none;
}

.help-library-modal #modalFields {
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(94px + env(safe-area-inset-bottom));
  overflow-y: auto;
}

.help-library-modal .modal-actions {
  display: none;
}

.rz-help-library {
  min-height: calc(100dvh - 28px);
  align-content: start;
  gap: 18px;
}

.rz-help-library-header {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 10px;
  min-height: 42px;
}

.rz-help-library-header .rz-back-button,
.rz-help-library-header .rz-header-action {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: #FDF1EB;
  color: var(--accent-strong);
  box-shadow: none;
}

.rz-help-library-header .rz-back-button {
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
}

.rz-help-library-header .rz-header-action {
  display: grid;
  place-items: center;
  justify-self: end;
}

.rz-help-library-header .rz-header-action::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 9a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M10 21h4'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 9a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M10 21h4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.rz-help-library-header .rz-title {
  color: var(--accent-strong);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0;
}

.rz-help-library-header .rz-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10.5px;
  line-height: 1.2;
  font-weight: 500;
}

.rz-help-library .rz-library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.rz-help-library .rz-category-card {
  min-height: 142px;
  display: grid;
  grid-template-rows: 74px auto auto;
  align-content: start;
  gap: 7px;
  padding: 13px 12px 12px;
  border: 1px solid #F3E6E1;
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: 0 8px 22px rgba(140, 58, 54, 0.045);
  text-align: left;
}

.rz-help-library .rz-category-card .rz-illustration {
  width: 78px;
  height: 78px;
  justify-self: start;
  align-self: center;
  margin: -3px 0 0;
  object-fit: contain;
}

.rz-help-library .rz-category-card .rz-card-title {
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  line-height: 1.18;
  font-weight: 800;
}

.rz-help-library .rz-category-card .rz-card-text {
  color: var(--muted);
  font-size: 10.4px;
  line-height: 1.28;
  font-weight: 500;
}

.rz-help-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(8px + env(safe-area-inset-bottom));
  z-index: 38;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  width: min(364px, calc(100% - 22px));
  padding: 6px 7px;
  border: 1px solid rgba(243, 230, 225, 0.96);
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 38px rgba(140, 58, 54, 0.11);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.rz-help-bottom-nav button {
  min-width: 0;
  min-height: 48px;
  padding: 6px 2px 5px;
  border: 0;
  border-radius: 17px;
  background: transparent;
  color: #8A7E7D;
  font-size: 9.5px;
  line-height: 1.05;
  font-weight: 600;
}

.rz-help-bottom-nav button::before {
  content: "";
  display: block;
  width: 17px;
  height: 17px;
  margin: 0 auto 4px;
  border: 1.6px solid currentColor;
  border-radius: 6px;
  opacity: 0.82;
}

.rz-help-bottom-nav button.active {
  background: #FDF1EB;
  color: var(--accent-strong);
}

@media (max-width: 360px) {
  .help-library-modal #modalFields {
    padding-left: 14px;
    padding-right: 14px;
  }

  .rz-help-library .rz-library-grid {
    gap: 10px;
  }

  .rz-help-library .rz-category-card {
    min-height: 132px;
    padding: 11px 10px;
  }

  .rz-help-library .rz-category-card .rz-illustration {
    width: 70px;
    height: 70px;
  }
}

/* HELP LIBRARY REFERENCE FIX V2: compact category library matching the reference screen. */
.help-library-modal #modalFields {
  padding: calc(12px + env(safe-area-inset-top)) 14px calc(90px + env(safe-area-inset-bottom));
}

.rz-help-library {
  gap: 14px;
  min-height: calc(100dvh - 24px);
}

.rz-help-library .rz-help-library-header {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) 31px;
  align-items: center;
  gap: 9px;
  min-height: 60px;
  padding: 10px 11px;
  border: 1px solid rgba(243, 230, 225, 0.96);
  border-radius: 21px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 249, 246, 0.86)),
    #FFF9F6;
  box-shadow: 0 8px 22px rgba(140, 58, 54, 0.045);
}

.rz-help-library .rz-help-library-header > div {
  min-width: 0;
}

.rz-help-library .rz-help-library-header .rz-back-button,
.rz-help-library .rz-help-library-header .rz-header-action {
  width: 31px;
  height: 31px;
  border: 1px solid rgba(243, 230, 225, 0.72);
  background: #FDF1EB;
}

.rz-help-library .rz-help-library-header .rz-back-button {
  font-size: 24px;
}

.rz-help-library .rz-help-library-header .rz-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.04;
  font-weight: 800;
  white-space: normal;
}

.rz-help-library .rz-help-library-header .rz-subtitle {
  margin: 3px 0 0;
  font-size: 10.4px;
  line-height: 1.16;
  font-weight: 500;
}

.rz-help-library .rz-library-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.rz-help-library .rz-category-card {
  min-height: 128px;
  height: 128px;
  grid-template-rows: 76px auto auto;
  align-content: start;
  gap: 4px;
  padding: 9px 10px 8px;
  border: 1px solid rgba(243, 230, 225, 0.98);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 249, 246, 0.82)),
    #FFFFFF;
  box-shadow: 0 7px 18px rgba(140, 58, 54, 0.04);
  overflow: hidden;
}

.rz-help-library .rz-category-card .rz-illustration {
  width: 112px;
  height: 82px;
  max-width: 84%;
  justify-self: start;
  align-self: center;
  margin: -3px 0 0 -2px;
  object-fit: contain;
}

.rz-help-library .rz-category-card .rz-card-title {
  min-width: 0;
  color: #4F403A;
  font-size: 11.3px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: 0;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
}

.rz-help-library .rz-category-card .rz-card-text {
  min-width: 0;
  color: #8B7A70;
  font-size: 9.5px;
  line-height: 1.18;
  font-weight: 500;
  max-height: 2.36em;
  overflow: hidden;
  word-break: normal;
  overflow-wrap: normal;
}

.rz-help-library .rz-help-bottom-nav {
  width: min(364px, calc(100% - 22px));
  padding: 6px 7px;
  border-radius: 23px;
}

.rz-help-library .rz-help-bottom-nav button.active {
  background: #FDF1EB;
  color: var(--accent-strong);
}

@media (max-width: 390px) {
  .rz-help-library .rz-category-card {
    min-height: 124px;
    height: 124px;
    grid-template-rows: 72px auto auto;
  }

  .rz-help-library .rz-category-card .rz-illustration {
    width: 104px;
    height: 78px;
  }
}

@media (max-width: 360px) {
  .help-library-modal #modalFields {
    padding-left: 12px;
    padding-right: 12px;
  }

  .rz-help-library {
    gap: 12px;
  }

  .rz-help-library .rz-help-library-header {
    min-height: 56px;
    padding: 9px 10px;
    grid-template-columns: 29px minmax(0, 1fr) 29px;
  }

  .rz-help-library .rz-help-library-header .rz-back-button,
  .rz-help-library .rz-help-library-header .rz-header-action {
    width: 29px;
    height: 29px;
  }

  .rz-help-library .rz-help-library-header .rz-title {
    font-size: 17px;
  }

  .rz-help-library .rz-library-grid {
    gap: 9px;
  }

  .rz-help-library .rz-category-card {
    min-height: 120px;
    height: 120px;
    grid-template-rows: 68px auto auto;
    padding: 8px 9px 7px;
  }

  .rz-help-library .rz-category-card .rz-illustration {
    width: 96px;
    height: 72px;
  }

  .rz-help-library .rz-category-card .rz-card-title {
    font-size: 10.8px;
  }

  .rz-help-library .rz-category-card .rz-card-text {
    font-size: 9.1px;
  }
}

/* HELP LIBRARY CSS APPLY DEBUG V1: final explicit selectors for Telegram WebView. */
#actionModal.help-library-modal #modalFields {
  padding: calc(12px + env(safe-area-inset-top)) 14px calc(92px + env(safe-area-inset-bottom));
}

#actionModal.help-library-modal .rz-help-library {
  gap: 12px;
}

#actionModal.help-library-modal .rz-help-library .rz-help-library-header {
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid #EEDCD2;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 248, 241, 0.9)),
    #FFF8F1;
  box-shadow: 0 10px 26px rgba(140, 58, 54, 0.08);
}

#actionModal.help-library-modal .rz-help-library .rz-help-library-header .rz-title {
  color: #8B3E38;
}

#actionModal.help-library-modal .rz-help-library .rz-library-grid {
  gap: 10px;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card {
  position: relative;
  min-height: 122px;
  height: 122px;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  grid-template-rows: min-content min-content;
  align-content: center;
  gap: 4px 6px;
  padding: 10px 9px 9px 10px;
  border: 1px solid #F0DED3;
  border-radius: 17px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 249, 244, 0.88)),
    #FFFFFF;
  box-shadow: 0 8px 20px rgba(140, 58, 54, 0.055);
  overflow: hidden;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-illustration {
  grid-row: 1 / 3;
  grid-column: 1;
  width: 140px;
  height: 110px;
  max-width: none;
  justify-self: start;
  align-self: center;
  margin: 0 0 0 -24px;
  object-fit: contain;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-title,
#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-text {
  grid-column: 2;
  position: relative;
  z-index: 1;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-title {
  align-self: end;
  font-size: 11.4px;
  line-height: 1.12;
  font-weight: 700;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-text {
  align-self: start;
  font-size: 9.4px;
  line-height: 1.18;
  max-height: 3.54em;
}

#actionModal.help-library-modal .rz-help-library .rz-help-bottom-nav button.active {
  background: #FDF1EB;
  color: #A24A3F;
}

@media (max-width: 390px) {
  #actionModal.help-library-modal .rz-help-library .rz-category-card {
    min-height: 118px;
    height: 118px;
    grid-template-columns: 78px minmax(0, 1fr);
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-illustration {
    width: 140px;
    height: 108px;
    margin-left: -28px;
  }
}

@media (max-width: 360px) {
  #actionModal.help-library-modal .rz-help-library .rz-category-card {
    min-height: 114px;
    height: 114px;
    grid-template-columns: 72px minmax(0, 1fr);
    padding: 9px 8px 8px 9px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-illustration {
    width: 132px;
    height: 104px;
    margin-left: -30px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-title {
    font-size: 10.7px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-text {
    font-size: 9px;
  }
}

/* HELP CONTENT RESTORE V1: restored old guides inside current reference UI. */
#actionModal.help-library-modal .rz-help-library .rz-refresh-action::before {
  width: 17px;
  height: 17px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6v5h-5'/%3E%3Cpath d='M4 18v-5h5'/%3E%3Cpath d='M19 11a7 7 0 0 0-12.2-4.2L4 9'/%3E%3Cpath d='M5 13a7 7 0 0 0 12.2 4.2L20 15'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6v5h-5'/%3E%3Cpath d='M4 18v-5h5'/%3E%3Cpath d='M19 11a7 7 0 0 0-12.2-4.2L4 9'/%3E%3Cpath d='M5 13a7 7 0 0 0 12.2 4.2L20 15'/%3E%3C/svg%3E") center / contain no-repeat;
}

#actionModal.help-library-modal .rz-extra-guides {
  display: grid;
  gap: 9px;
  margin-top: 2px;
  padding-bottom: 4px;
}

#actionModal.help-library-modal .rz-extra-guides-head {
  display: grid;
  gap: 2px;
  padding: 0 2px;
}

#actionModal.help-library-modal .rz-extra-guides-head h4 {
  margin: 0;
  color: #8B3E38;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.1;
  font-weight: 800;
}

#actionModal.help-library-modal .rz-extra-guides-head p {
  margin: 0;
  color: #8B7A70;
  font-size: 10.4px;
  line-height: 1.25;
  font-weight: 500;
}

#actionModal.help-library-modal .rz-extra-guide-list {
  display: grid;
  gap: 7px;
}

#actionModal.help-library-modal .rz-extra-guide-row {
  width: 100%;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid #F0DED3;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 249, 244, 0.88)),
    #FFFFFF;
  box-shadow: 0 7px 18px rgba(140, 58, 54, 0.04);
  color: #5A4A42;
  text-align: left;
}

#actionModal.help-library-modal .rz-extra-guide-row .rz-icon-bubble {
  width: 34px;
  height: 34px;
}

#actionModal.help-library-modal .rz-extra-guide-row span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

#actionModal.help-library-modal .rz-extra-guide-row strong {
  color: #4F403A;
  font-size: 12px;
  line-height: 1.15;
  font-weight: 700;
}

#actionModal.help-library-modal .rz-extra-guide-row small {
  color: #8B7A70;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 500;
}

#actionModal.help-library-modal .rz-extra-guide-screen .rz-extra-hero {
  grid-template-columns: 56px minmax(0, 1fr);
}

#actionModal.help-library-modal .rz-extra-hero-icon {
  width: 48px;
  height: 48px;
}

#actionModal.help-library-modal .rz-help-bottom-nav button::before {
  border: 0;
  border-radius: 0;
  background: currentColor;
  opacity: 0.78;
}

#actionModal.help-library-modal .rz-help-bottom-nav button[data-help-nav="home"]::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11.5 12 5l8 6.5'/%3E%3Cpath d='M6.5 10.5V20h11v-9.5'/%3E%3Cpath d='M10 20v-5h4v5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11.5 12 5l8 6.5'/%3E%3Cpath d='M6.5 10.5V20h11v-9.5'/%3E%3Cpath d='M10 20v-5h4v5'/%3E%3C/svg%3E") center / contain no-repeat;
}

#actionModal.help-library-modal .rz-help-bottom-nav button[data-help-nav="today"]::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='6' width='14' height='14' rx='3'/%3E%3Cpath d='M8 4v4M16 4v4M8 11h8M8 15h5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='6' width='14' height='14' rx='3'/%3E%3Cpath d='M8 4v4M16 4v4M8 11h8M8 15h5'/%3E%3C/svg%3E") center / contain no-repeat;
}

#actionModal.help-library-modal .rz-help-bottom-nav button[data-help-nav="child"]::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='11' r='5'/%3E%3Cpath d='M8 8 6.5 5.8M16 8l1.5-2.2M9.5 13h5M9.5 10h.1M14.5 10h.1M7 19c1.3-2 3-3 5-3s3.7 1 5 3'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='11' r='5'/%3E%3Cpath d='M8 8 6.5 5.8M16 8l1.5-2.2M9.5 13h5M9.5 10h.1M14.5 10h.1M7 19c1.3-2 3-3 5-3s3.7 1 5 3'/%3E%3C/svg%3E") center / contain no-repeat;
}

#actionModal.help-library-modal .rz-help-bottom-nav button[data-help-nav="family"]::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='9' r='3'/%3E%3Ccircle cx='16' cy='10' r='2.5'/%3E%3Cpath d='M4.5 19c1-3 2.5-4.5 4.5-4.5s3.5 1.5 4.5 4.5M13 18.5c.8-2 1.8-3 3-3 1.4 0 2.5 1 3.5 3'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='9' r='3'/%3E%3Ccircle cx='16' cy='10' r='2.5'/%3E%3Cpath d='M4.5 19c1-3 2.5-4.5 4.5-4.5s3.5 1.5 4.5 4.5M13 18.5c.8-2 1.8-3 3-3 1.4 0 2.5 1 3.5 3'/%3E%3C/svg%3E") center / contain no-repeat;
}

#actionModal.help-library-modal .rz-help-bottom-nav button[data-help-nav="more"]::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='5' width='5' height='5' rx='1.5'/%3E%3Crect x='14' y='5' width='5' height='5' rx='1.5'/%3E%3Crect x='5' y='14' width='5' height='5' rx='1.5'/%3E%3Crect x='14' y='14' width='5' height='5' rx='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='5' width='5' height='5' rx='1.5'/%3E%3Crect x='14' y='5' width='5' height='5' rx='1.5'/%3E%3Crect x='5' y='14' width='5' height='5' rx='1.5'/%3E%3Crect x='14' y='14' width='5' height='5' rx='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* TOPIC SCREEN REFERENCE EXACT V1: category topic list like reference #3. */
#actionModal.help-library-modal .rz-topic-screen {
  display: grid;
  gap: 12px;
  align-content: start;
}

#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid #EEDCD2;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 248, 241, 0.9)),
    #FFF8F1;
  box-shadow: 0 10px 26px rgba(140, 58, 54, 0.08);
}

#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back .rz-back-button {
  width: 31px;
  min-width: 31px;
  height: 31px;
  padding: 0 0 2px;
  border: 1px solid rgba(243, 230, 225, 0.8);
  border-radius: 999px;
  background: #FDF1EB;
  color: #A24A3F;
  font-size: 23px;
  font-weight: 400;
  box-shadow: none;
}

#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back .rz-title {
  color: #8B3E38;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: 0;
}

#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back .rz-subtitle {
  color: #8B7A70;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10.4px;
  line-height: 1.18;
  font-weight: 500;
}

#actionModal.help-library-modal .rz-topic-screen .rz-topic-list {
  display: grid;
  gap: 8px;
}

#actionModal.help-library-modal .rz-topic-screen .rz-topic-row {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid #F0DED3;
  border-radius: 17px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 249, 244, 0.9)),
    #FFFFFF;
  color: #5A4A42;
  box-shadow: 0 8px 20px rgba(140, 58, 54, 0.045);
  text-align: left;
}

#actionModal.help-library-modal .rz-topic-screen .rz-topic-row .rz-icon-bubble {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 13px;
  background: #FDF1EB;
  color: #A24A3F;
}

#actionModal.help-library-modal .rz-topic-screen .rz-topic-row .rz-icon-bubble::before {
  width: 20px;
  height: 20px;
}

#actionModal.help-library-modal .rz-topic-screen .rz-topic-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

#actionModal.help-library-modal .rz-topic-screen .rz-topic-title {
  color: #4F403A;
  font-size: 12.7px;
  line-height: 1.16;
  font-weight: 700;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
}

#actionModal.help-library-modal .rz-topic-screen .rz-topic-text {
  display: -webkit-box;
  color: #8B7A70;
  font-size: 10.4px;
  line-height: 1.22;
  font-weight: 500;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

#actionModal.help-library-modal .rz-topic-screen .rz-chevron {
  justify-self: end;
  align-self: center;
  color: #A24A3F;
  font-size: 18px;
  line-height: 1;
  font-weight: 400;
  opacity: 0.74;
}

#actionModal.help-library-modal .rz-topic-screen .rz-note-card {
  position: relative;
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 13px;
  border: 1px solid #F0DED3;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 249, 244, 0.9)),
    #FFFFFF;
  box-shadow: 0 8px 20px rgba(140, 58, 54, 0.045);
  overflow: hidden;
}

#actionModal.help-library-modal .rz-topic-screen .rz-note-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

#actionModal.help-library-modal .rz-topic-screen .rz-note-title {
  margin: 0;
  color: #8B3E38;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  line-height: 1.1;
  font-weight: 800;
}

#actionModal.help-library-modal .rz-topic-screen .rz-note-card p {
  margin: 0;
  color: #8B7A70;
  font-size: 10.6px;
  line-height: 1.28;
  font-weight: 500;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

#actionModal.help-library-modal .rz-topic-screen .rz-note-illustration {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 16px;
  background: #FDF1EB;
  opacity: 0.78;
}

#actionModal.help-library-modal .rz-topic-row .rz-icon-bubble[data-rz-icon="wait"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}

#actionModal.help-library-modal .rz-topic-row .rz-icon-bubble[data-rz-icon="calendar"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='5' width='14' height='15' rx='3'/%3E%3Cpath d='M8 3v4M16 3v4M5 10h14M8 14h3M8 17h5'/%3E%3C/svg%3E");
}

#actionModal.help-library-modal .rz-topic-row .rz-icon-bubble[data-rz-icon="medication"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3h6l1 4v12a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2V7l1-4z'/%3E%3Cpath d='M8 8h8M10 13h4M12 11v4'/%3E%3C/svg%3E");
}

#actionModal.help-library-modal .rz-topic-row .rz-icon-bubble[data-rz-icon="vaccine"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 19 9-9M13 5l6 6M11 7l6 6M8 16l3 3M16 4l4 4M4 20l3-1'/%3E%3C/svg%3E");
}

#actionModal.help-library-modal .rz-topic-row .rz-icon-bubble[data-rz-icon="doctor"],
#actionModal.help-library-modal .rz-topic-row .rz-icon-bubble[data-rz-icon="heart"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20s-6-3.6-8.2-7.6C2.2 9.5 3.7 6 7 6c1.8 0 3.1 1 5 3 1.9-2 3.2-3 5-3 3.3 0 4.8 3.5 3.2 6.4C18 16.4 12 20 12 20z'/%3E%3Cpath d='M9 12h6M12 9v6'/%3E%3C/svg%3E");
}

#actionModal.help-library-modal .rz-topic-row .rz-icon-bubble[data-rz-icon="medicalCard"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h8l3 3v15H7z'/%3E%3Cpath d='M15 3v4h4M10 12h5M12.5 9v6M10 18h6'/%3E%3C/svg%3E");
}

#actionModal.help-library-modal .rz-topic-row .rz-icon-bubble[data-rz-icon="firstAid"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='7' width='14' height='12' rx='3'/%3E%3Cpath d='M9 7V5h6v2M12 10v6M9 13h6'/%3E%3C/svg%3E");
}

#actionModal.help-library-modal .rz-topic-row .rz-icon-bubble[data-rz-icon="warning"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4 21 20H3z'/%3E%3Cpath d='M12 9v5M12 17h.01'/%3E%3C/svg%3E");
}

#actionModal.help-library-modal .rz-topic-row .rz-icon-bubble[data-rz-icon="tooth"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 4c1.5 0 2.5 1 4 1s2.5-1 4-1c2.2 0 3.5 1.8 3.5 4.4 0 4.2-2 11.6-4.2 11.6-1.1 0-1.1-4.2-3.3-4.2S9.8 20 8.7 20C6.5 20 4.5 12.6 4.5 8.4 4.5 5.8 5.8 4 8 4z'/%3E%3C/svg%3E");
}

#actionModal.help-library-modal .rz-topic-row .rz-icon-bubble[data-rz-icon="growth"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 20h14M7 17c4-8 6-8 10 0M8 13h8M10 9h4M12 5v15'/%3E%3C/svg%3E");
}

#actionModal.help-library-modal .rz-topic-row .rz-icon-bubble[data-rz-icon="family"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='9' r='3'/%3E%3Ccircle cx='16' cy='10' r='2.5'/%3E%3Cpath d='M4.5 19c1-3 2.5-4.5 4.5-4.5s3.5 1.5 4.5 4.5M13 18.5c.8-2 1.8-3 3-3 1.4 0 2.5 1 3.5 3'/%3E%3C/svg%3E");
}

#actionModal.help-library-modal .rz-topic-row .rz-icon-bubble[data-rz-icon="massage"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 12V7a2 2 0 0 1 4 0v5M11 12V5a2 2 0 0 1 4 0v7M15 12V8a2 2 0 0 1 4 0v6c0 4-3 7-7 7H9c-3 0-5-2-5-5v-3a2 2 0 0 1 3-1z'/%3E%3C/svg%3E");
}

#actionModal.help-library-modal .rz-topic-row .rz-icon-bubble[data-rz-icon="swaddle"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='6' r='2.5'/%3E%3Cpath d='M7 10c2.5-2 7.5-2 10 0v7a5 5 0 0 1-10 0zM7 12l10 5M17 12 7 17'/%3E%3C/svg%3E");
}

@media (max-width: 360px) {
  #actionModal.help-library-modal .rz-topic-screen {
    gap: 10px;
  }

  #actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back {
    min-height: 58px;
    padding: 9px 10px;
  }

  #actionModal.help-library-modal .rz-topic-screen .rz-topic-row {
    min-height: 60px;
    grid-template-columns: 35px minmax(0, 1fr) 12px;
    gap: 8px;
    padding: 8px 9px;
  }

  #actionModal.help-library-modal .rz-topic-screen .rz-topic-row .rz-icon-bubble {
    width: 33px;
    height: 33px;
  }
}

/* REFERENCE CLONE MODE V1: article, family, today, child and controls. */
.rz-button-primary,
.rz-button-secondary,
.rz-text-button {
  min-height: 40px;
  border-radius: 999px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0;
}

.rz-button-primary {
  border: 1px solid #A24A3F;
  background: linear-gradient(180deg, #B65349, #9D4038);
  color: #FFFFFF;
  box-shadow: 0 8px 18px rgba(162, 74, 63, 0.18);
}

.rz-button-secondary {
  border: 1px solid #C96E64;
  background: #FFF8F1;
  color: #A24A3F;
  box-shadow: none;
}

.rz-text-button {
  border: 0;
  background: transparent;
  color: #A24A3F;
  box-shadow: none;
}

#actionModal.help-library-modal .rz-article-screen {
  display: grid;
  gap: 12px;
  align-content: start;
  padding-bottom: 88px;
}

#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back,
.rz-family-screen > .rz-header {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid #EEDCD2;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 248, 241, 0.9)), #FFF8F1;
  box-shadow: 0 10px 26px rgba(140, 58, 54, 0.08);
}

#actionModal.help-library-modal .rz-article-hero {
  position: relative;
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 154px;
  padding: 14px;
  border: 1px solid #EEDCD2;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 249, 244, 0.92)), #FFF8F1;
  box-shadow: 0 10px 24px rgba(140, 58, 54, 0.07);
  overflow: hidden;
}

#actionModal.help-library-modal .rz-article-hero::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 6px;
  width: 54px;
  height: 54px;
  opacity: 0.16;
  background: #DCA18D;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 50c12-18 25-30 42-37M20 40c-7-4-12-4-17-1 5 6 11 7 17 1zM33 28c-5-7-5-14 0-21 5 7 5 14 0 21zM45 18c6-4 12-5 17-2-5 5-10 6-17 2z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 50c12-18 25-30 42-37M20 40c-7-4-12-4-17-1 5 6 11 7 17 1zM33 28c-5-7-5-14 0-21 5 7 5 14 0 21zM45 18c6-4 12-5 17-2-5 5-10 6-17 2z'/%3E%3C/svg%3E") center / contain no-repeat;
}

#actionModal.help-library-modal .rz-article-image {
  width: 116px;
  height: 116px;
  object-fit: contain;
  justify-self: center;
}

#actionModal.help-library-modal .rz-article-title {
  display: block;
  color: #8B3E38;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.05;
  font-weight: 800;
}

#actionModal.help-library-modal .rz-article-text {
  display: block;
  margin-top: 7px;
  color: #5A4A42;
  font-size: 12.2px;
  line-height: 1.36;
  font-weight: 500;
}

#actionModal.help-library-modal .rz-reading-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid #F0DED3;
  border-radius: 999px;
  color: #A24A3F;
  background: #FFF8F1;
  font-size: 10.5px;
  font-weight: 700;
}

#actionModal.help-library-modal .rz-section-label {
  margin: 0 0 7px;
  color: #8B3E38;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  line-height: 1.1;
  font-weight: 800;
}

#actionModal.help-library-modal .rz-fact-list {
  display: grid;
  gap: 0;
  border: 1px solid #F0DED3;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  overflow: hidden;
}

#actionModal.help-library-modal .rz-fact-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-bottom: 1px solid #F3E6E1;
}

#actionModal.help-library-modal .rz-fact-row:last-child {
  border-bottom: 0;
}

#actionModal.help-library-modal .rz-fact-row .rz-icon-bubble {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: #FDF1EB;
  color: #A24A3F;
}

#actionModal.help-library-modal .rz-fact-row strong {
  display: block;
  color: #3F3530;
  font-size: 12.4px;
  line-height: 1.2;
  font-weight: 800;
}

#actionModal.help-library-modal .rz-fact-row small {
  display: block;
  margin-top: 2px;
  color: #6B5C4D;
  font-size: 11px;
  line-height: 1.28;
  font-weight: 500;
}

#actionModal.help-library-modal .rz-accordion-row {
  border: 1px solid #F0DED3;
  border-bottom: 0;
  background: #FFFFFF;
  overflow: hidden;
}

#actionModal.help-library-modal .rz-accordion-row:first-of-type {
  border-radius: 16px 16px 0 0;
}

#actionModal.help-library-modal .rz-accordion-row:last-of-type {
  border-bottom: 1px solid #F0DED3;
  border-radius: 0 0 16px 16px;
}

#actionModal.help-library-modal .rz-accordion-row summary {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  color: #4A3F35;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}

#actionModal.help-library-modal .rz-accordion-row summary::-webkit-details-marker {
  display: none;
}

#actionModal.help-library-modal .rz-accordion-row summary::after {
  content: "⌄";
  justify-self: end;
  color: #A24A3F;
  font-size: 15px;
  line-height: 1;
}

#actionModal.help-library-modal .rz-accordion-row[open] summary::after {
  transform: rotate(180deg);
}

#actionModal.help-library-modal .rz-accordion-row p {
  margin: 0;
  padding: 0 12px 12px;
  color: #6B5C4D;
  font-size: 11.5px;
  line-height: 1.36;
  font-weight: 500;
}

#actionModal.help-library-modal .rz-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#actionModal.help-library-modal .rz-action-card {
  min-height: 86px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  padding: 10px 6px;
  border: 1px solid #F0DED3;
  border-radius: 18px;
  background: #FFF8F1;
  color: #5A4A42;
  box-shadow: 0 8px 20px rgba(140, 58, 54, 0.045);
  text-align: center;
}

#actionModal.help-library-modal .rz-action-card .rz-icon-bubble {
  width: 36px;
  height: 36px;
}

#actionModal.help-library-modal .rz-action-card strong {
  color: #5A4A42;
  font-size: 10.8px;
  line-height: 1.12;
  font-weight: 800;
}

#actionModal.help-library-modal .rz-action-card span:not(.rz-icon-bubble) {
  color: #8B7A70;
  font-size: 9.6px;
  line-height: 1.1;
  font-weight: 600;
}

.rz-today-page .rz-diary-card {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.rz-today-page .rz-header {
  display: block;
  padding: 0 2px 8px;
}

.rz-today-page .rz-title {
  color: #8B3E38;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.08;
  font-weight: 800;
}

.rz-today-page #todayCount,
.rz-today-page #timelineFilters {
  display: none;
}

.rz-today-page .rz-event-list {
  display: grid;
  gap: 8px;
}

.rz-today-page .rz-event-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid #F0DED3;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 18px rgba(140, 58, 54, 0.04);
}

.rz-today-page .event-time {
  justify-self: end;
  color: #8B7A70;
  font-size: 10px;
  font-weight: 700;
}

.rz-family-screen {
  display: grid;
  gap: 12px;
  align-content: start;
}

.rz-family-screen .rz-list-card {
  display: grid;
  gap: 0;
  padding: 0;
  border: 1px solid #F0DED3;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.rz-family-screen .rz-member-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid #F3E6E1;
}

.rz-family-screen .rz-member-row:last-child {
  border-bottom: 0;
}

.rz-family-screen .rz-member-row.is-current {
  background: #FFF5EF;
}

.rz-family-screen .rz-avatar-small {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 35%, #F5C8B9 0 17%, transparent 18%),
    radial-gradient(circle at 50% 70%, #EED7C8 0 36%, transparent 37%),
    #FDF1EB;
  border: 1px solid #F0DED3;
}

.rz-family-screen .rz-invite-open-card {
  min-height: 46px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  text-align: left;
}

.rz-family-screen .rz-invite-plus {
  justify-self: end;
  color: #A24A3F;
  font-size: 20px;
  line-height: 1;
}

.rz-family-footer {
  text-align: center;
  color: #8B7A70;
  font-size: 11.5px;
}

.rz-invite-code-card {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.modal-backdrop.rz-invite-modal-active {
  align-items: center;
  padding: 18px;
}

.rz-invite-modal-active .modal {
  width: min(100%, 340px);
  max-height: calc(100dvh - 36px);
  border-radius: 24px;
}

.rz-invite-modal-active #modalTitle,
.rz-invite-modal-active #modalText,
.rz-invite-modal-active .modal-actions {
  display: none;
}

.rz-invite-modal-screen {
  display: grid;
  gap: 11px;
}

.rz-invite-modal-head {
  position: relative;
  padding: 2px 28px 2px 0;
  text-align: center;
}

.rz-invite-modal-head .rz-title {
  color: #8B3E38;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.12;
  font-weight: 800;
}

.rz-modal-close {
  position: absolute;
  right: 0;
  top: 0;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #C79B8E;
  font-size: 20px;
  line-height: 1;
}

.rz-invite-modal-screen .field {
  margin: 0;
}

.rz-invite-modal-screen input,
.rz-invite-modal-screen select {
  min-height: 38px;
  border: 1px solid #EEDCD2;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: #5A4A42;
}

.rz-access-options {
  display: grid;
  gap: 8px;
}

.rz-access-options label {
  min-height: 48px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid #F0DED3;
  border-radius: 14px;
  background: #FFFFFF;
}

.rz-access-options input {
  width: 16px;
  height: 16px;
  accent-color: #A24A3F;
}

.rz-access-options strong {
  display: block;
  color: #5A4A42;
  font-size: 12px;
  line-height: 1.16;
}

.rz-access-options small {
  display: block;
  margin-top: 2px;
  color: #8B7A70;
  font-size: 10px;
  line-height: 1.12;
}

.rz-invite-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding-top: 4px;
}

.rz-profile-card {
  padding: 12px;
  border-radius: 18px;
}

.rz-child-profile-menu {
  padding: 0;
  overflow: hidden;
}

.rz-profile-menu-row {
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0 12px;
  border: 0;
  border-bottom: 1px solid #F3E6E1;
  background: #FFFFFF;
  color: #4A3F35;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.rz-profile-menu-row:last-child {
  border-bottom: 0;
}

.rz-development-reference {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.rz-development-stage-list {
  display: grid;
  gap: 8px;
}

.rz-development-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 12px;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid #F0DED3;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.88);
  text-align: left;
}

.rz-development-row .rz-icon-bubble {
  width: 32px;
  height: 32px;
}

.rz-stage-progress {
  color: #8B7A70;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.rz-development-guide-card {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  text-align: left;
}

.rz-development-guide-card strong {
  display: block;
  color: #8B3E38;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  line-height: 1.12;
}

.rz-development-guide-card small {
  display: block;
  margin-top: 3px;
  color: #8B7A70;
  font-size: 10.5px;
  font-weight: 600;
}

.rz-guide-bunny {
  width: 72px;
  height: 62px;
  background: url("/static/img/help/help_home.png") right center / contain no-repeat;
}

@media (max-width: 360px) {
  #actionModal.help-library-modal .rz-article-hero {
    grid-template-columns: 98px minmax(0, 1fr);
    min-height: 132px;
    gap: 10px;
    padding: 11px;
  }

  #actionModal.help-library-modal .rz-article-image {
    width: 94px;
    height: 94px;
  }

  #actionModal.help-library-modal .rz-action-grid {
    gap: 6px;
  }

  #actionModal.help-library-modal .rz-action-card {
    min-height: 78px;
  }

  .rz-development-row {
    grid-template-columns: 32px minmax(0, 1fr) auto 10px;
    gap: 7px;
  }
}

/* REFERENCE CONSISTENCY FIX V2 */
.rz-title,
.rz-card-title,
.rz-topic-title,
.rz-event-title,
.rz-article-title {
  min-width: 0;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.rz-event-copy,
.rz-topic-copy,
.family-body,
.rz-article-hero > span,
.rz-member-row > span {
  min-width: 0;
}

.rz-page .empty {
  margin: 0;
  padding: 12px;
  border: 1px solid #F0DED3;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: #8B7A70;
  font-size: 12px;
  line-height: 1.36;
  font-weight: 500;
}

.rz-today-page {
  gap: 12px;
  padding-bottom: calc(98px + env(safe-area-inset-bottom));
}

.rz-today-page .rz-diary-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #EEDCD2;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 241, 0.92)), #FFF8F1;
  box-shadow: 0 12px 28px rgba(140, 58, 54, 0.08);
}

.rz-today-page .rz-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  padding: 0;
}

.rz-today-page .rz-title {
  font-size: clamp(21px, 6vw, 24px);
}

.rz-today-page .rz-subtitle {
  color: #8B7A70;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 600;
}

.rz-today-page .rz-event-list {
  gap: 0;
  border: 1px solid #F0DED3;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.rz-today-page .rz-event-row {
  min-height: 58px;
  grid-template-columns: 38px minmax(0, 1fr) 42px;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #F3E6E1;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.rz-today-page .rz-event-row:last-child {
  border-bottom: 0;
}

.rz-today-page .rz-icon-bubble,
.rz-today-page .event-icon {
  width: 34px;
  height: 34px;
  border-radius: 13px;
  background: #FDF1EB;
  color: #A24A3F;
}

.rz-today-page .event-text,
.rz-today-page .rz-event-title {
  color: #4A3F35;
  font-size: 12.5px;
  line-height: 1.18;
  font-weight: 800;
}

.rz-today-page .event-type,
.rz-today-page .rz-event-note {
  margin-top: 2px;
  color: #8B7A70;
  font-size: 10.7px;
  line-height: 1.22;
  font-weight: 500;
}

.rz-family-screen {
  gap: 11px;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}

.rz-family-screen > .rz-header {
  min-height: 58px;
  padding: 10px 13px;
  border-radius: 22px;
}

.rz-family-screen .rz-list-card,
.rz-family-screen .rz-card,
.rz-family-join-card {
  border: 1px solid #F0DED3;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(140, 58, 54, 0.05);
}

.rz-family-screen .rz-member-row {
  min-height: 56px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  padding: 9px 12px;
}

.rz-family-screen .rz-topic-title {
  color: #4A3F35;
  font-size: 12.5px;
  line-height: 1.2;
  font-weight: 800;
}

.rz-family-screen .rz-topic-text {
  color: #8B7A70;
  font-size: 10.8px;
  line-height: 1.22;
}

.rz-family-screen .rz-icon-action.danger {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #F0DED3;
  border-radius: 999px;
  background: #FFF8F1;
  color: #A24A3F;
  font-size: 10px;
}

.rz-family-join-card {
  display: grid;
  gap: 9px;
  padding: 12px;
}

.rz-family-join-card .field {
  margin: 0;
}

.rz-family-join-card input,
.rz-family-join-card select {
  min-height: 38px;
  border: 1px solid #EEDCD2;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
}

#actionModal.help-library-modal .rz-article-screen {
  gap: 12px;
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

#actionModal.help-library-modal .rz-article-hero {
  grid-template-columns: 156px minmax(0, 1fr);
  min-height: 176px;
  gap: 14px;
  padding: 14px;
}

#actionModal.help-library-modal .rz-article-image {
  width: 152px;
  height: 152px;
  object-fit: contain;
}

#actionModal.help-library-modal .rz-article-title {
  font-size: clamp(18px, 5.3vw, 23px);
  line-height: 1.08;
}

#actionModal.help-library-modal .rz-article-text {
  font-size: 12px;
  line-height: 1.34;
}

#actionModal.help-library-modal .rz-fact-row strong {
  display: inline;
  margin-right: 4px;
}

#actionModal.help-library-modal .rz-fact-row small {
  display: inline;
  margin-top: 0;
}

#actionModal.help-library-modal .rz-action-card {
  min-width: 0;
  min-height: 82px;
  padding: 9px 6px;
}

#actionModal.help-library-modal .rz-action-card strong {
  font-size: 10.8px;
  line-height: 1.12;
}

#actionModal.help-library-modal .rz-action-card span:not(.rz-icon-bubble) {
  max-width: 84px;
  font-size: 9.2px;
}

#actionModal.help-library-modal .rz-topic-screen .rz-topic-row {
  min-height: 64px;
}

#actionModal.help-library-modal .rz-topic-screen .rz-topic-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#actionModal.help-library-modal .rz-topic-screen .rz-note-card {
  min-height: 78px;
}

.rz-child-page .rz-profile-card,
.tab[data-tab-panel="child"] .rz-profile-card {
  border: 1px solid #EEDCD2;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 248, 241, 0.9)), #FFF8F1;
  box-shadow: 0 10px 24px rgba(140, 58, 54, 0.07);
}

.rz-child-profile-menu {
  border: 1px solid #F0DED3;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.rz-profile-menu-row {
  min-height: 48px;
  grid-template-columns: minmax(0, 1fr) 18px;
  padding: 0 13px;
  background: transparent;
}

.rz-profile-menu-row span:first-child {
  min-width: 0;
  color: #4A3F35;
  font-size: 12.5px;
  line-height: 1.2;
  white-space: normal;
}

.rz-development-reference,
.rz-development-stage-list,
#milestones,
#upcomingMilestones {
  min-width: 0;
}

.rz-development-row,
.rz-development-reference .rz-topic-row,
#milestones .rz-topic-row,
#upcomingMilestones .rz-topic-row {
  min-width: 0;
  border: 1px solid #F0DED3;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 18px rgba(140, 58, 54, 0.04);
}

.rz-development-row .rz-topic-title,
.rz-development-reference .rz-topic-title,
#milestones .rz-topic-title,
#upcomingMilestones .rz-topic-title {
  font-size: 12.2px;
  line-height: 1.18;
}

.rz-check-chip {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #E1D5C8;
  border-radius: 999px;
  background: #F6EEE7;
  color: #7D6D55;
  font-size: 9.8px;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
}

.rz-development-guide-card {
  grid-template-columns: minmax(0, 1fr) 94px;
  min-height: 92px;
}

.rz-guide-bunny {
  width: 94px;
  height: 82px;
  justify-self: end;
}

.rz-icon-bubble[data-rz-icon="moonClock"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 15.5A7 7 0 0 1 8.5 6a8 8 0 1 0 9.5 9.5z'/%3E%3Ccircle cx='16' cy='8' r='4'/%3E%3Cpath d='M16 6v2.5l1.8 1'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="sleepy"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M8.5 10.5h.01M15.5 10.5h.01M9 15c2 1 4 1 6 0M16 4l3-1-2 3h3'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="checklist"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='4' width='12' height='16' rx='3'/%3E%3Cpath d='M9 9l1.2 1.2L13 7.5M9 14l1.2 1.2L13 12.5M15 9h1M15 14h1'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="moonWake"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 15.5A7 7 0 0 1 8.5 6a8 8 0 1 0 9.5 9.5z'/%3E%3Cpath d='M6 4l1.5 2M12 2v3M18 4l-1.5 2'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="sunCloud"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3Cpath d='M8 1.5v2M8 12.5v2M1.5 8h2M12.5 8h2M3.5 3.5l1.4 1.4M11.1 11.1l1.4 1.4M3.5 12.5l1.4-1.4M11.1 4.9l1.4-1.4M7 19h10a4 4 0 0 0 0-8 5 5 0 0 0-9.6 2'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="bottle"] {
  --rz-icon-mask: var(--rz-icon-mask-feeding, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3h5l2 4v12a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V7l2-4z'/%3E%3Cpath d='M7 8h8M9 12h3M9 15h3'/%3E%3C/svg%3E"));
}

.rz-icon-bubble[data-rz-icon="spoon"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3c2 0 3 2 3 4s-1 4-3 4-3-2-3-4 1-4 3-4zM8 11v10M15 3v18M19 3v7a2 2 0 0 1-4 0V3'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="bowl"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 11h14c0 5-3 8-7 8s-7-3-7-8zM7 21h10M9 8c.8-1 1.4-2 0-3M13 8c.8-1 1.4-2 0-3M17 8c.8-1 1.4-2 0-3'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="clock"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="brush"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 19 16 8M14 6l4 4M4 20l2-2M15 5l4 4M17 3l4 4M7 16l2 2M10 13l2 2'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="movement"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 17c2-4 5-6 9-6M15 11l-2-3M15 11l3-2M8 19c3 1 7 0 10-3M5 6c2 1 3.5 1 5 0M7.5 4v5'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="chat"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 6h14v9H9l-4 4z'/%3E%3Cpath d='M8 10h8M8 13h5'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="people"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Ccircle cx='16' cy='10' r='2.5'/%3E%3Cpath d='M4 19c1-3 2.6-5 5-5s4 2 5 5M14 18c.8-2 1.8-3 3-3 1.3 0 2.4 1 3 3'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="brain"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5a3 3 0 0 0-3 3 3 3 0 0 0-2 3c0 2 1.5 3 3 3v2a3 3 0 0 0 6 0V7a3 3 0 0 0-4-2zM15 5a3 3 0 0 1 3 3 3 3 0 0 1 2 3c0 2-1.5 3-3 3v2a3 3 0 0 1-6 0'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="blocks"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='13' width='6' height='6' rx='1.5'/%3E%3Crect x='10' y='7' width='6' height='6' rx='1.5'/%3E%3Crect x='16' y='13' width='4' height='6' rx='1.5'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="water"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3s6 6.3 6 11a6 6 0 0 1-12 0c0-4.7 6-11 6-11z'/%3E%3Cpath d='M9 15a3 3 0 0 0 3 3'/%3E%3C/svg%3E");
}

@media (max-width: 390px) {
  #actionModal.help-library-modal .rz-article-hero {
    grid-template-columns: 136px minmax(0, 1fr);
    min-height: 164px;
    gap: 12px;
  }

  #actionModal.help-library-modal .rz-article-image {
    width: 132px;
    height: 132px;
  }

  #actionModal.help-library-modal .rz-action-grid {
    gap: 7px;
  }

  .rz-development-guide-card {
    grid-template-columns: minmax(0, 1fr) 82px;
  }

  .rz-guide-bunny {
    width: 82px;
    height: 72px;
  }
}

@media (max-width: 360px) {
  #actionModal.help-library-modal .rz-article-hero {
    grid-template-columns: 118px minmax(0, 1fr);
    min-height: 150px;
  }

  #actionModal.help-library-modal .rz-article-image {
    width: 116px;
    height: 116px;
  }

  #actionModal.help-library-modal .rz-article-title {
    font-size: clamp(17px, 5vw, 20px);
  }

  .rz-today-page .rz-event-row {
    grid-template-columns: 34px minmax(0, 1fr) 38px;
    gap: 8px;
    padding: 9px 10px;
  }
}

/* HELP ARTICLE ICONS UNIFICATION V1 */
#actionModal.help-library-modal .rz-article-hero {
  grid-template-columns: 184px minmax(0, 1fr);
  min-height: 198px;
}

#actionModal.help-library-modal .rz-article-image {
  width: 180px;
  height: 180px;
  object-fit: contain;
  object-position: center;
}

#actionModal.help-library-modal .rz-article-title {
  font-size: clamp(18px, 5vw, 24px);
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

#actionModal.help-library-modal .rz-note-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  align-items: center;
  gap: 10px;
  min-height: 82px;
  padding: 12px;
  overflow: hidden;
}

#actionModal.help-library-modal .rz-note-illustration-img {
  width: 90px;
  height: 78px;
  object-fit: contain;
  object-position: right bottom;
  justify-self: end;
  filter: drop-shadow(0 8px 14px rgba(140, 58, 54, 0.08));
}

#actionModal.help-library-modal .rz-note-card::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 6px;
  width: 70px;
  height: 70px;
  opacity: 0.1;
  pointer-events: none;
  background: #DCA18D;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 50c12-18 25-30 42-37M20 40c-7-4-12-4-17-1 5 6 11 7 17 1zM33 28c-5-7-5-14 0-21 5 7 5 14 0 21zM45 18c6-4 12-5 17-2-5 5-10 6-17 2z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 50c12-18 25-30 42-37M20 40c-7-4-12-4-17-1 5 6 11 7 17 1zM33 28c-5-7-5-14 0-21 5 7 5 14 0 21zM45 18c6-4 12-5 17-2-5 5-10 6-17 2z'/%3E%3C/svg%3E") center / contain no-repeat;
}

#actionModal.help-library-modal .rz-extra-hero {
  grid-template-columns: 118px minmax(0, 1fr);
  min-height: 154px;
}

.rz-extra-guide-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 50%, rgba(220, 161, 141, 0.14), transparent 58%),
    linear-gradient(180deg, rgba(255, 248, 241, 0.9), rgba(243, 230, 218, 0.72));
  overflow: hidden;
}

.rz-extra-guide-visual::before {
  content: "";
  position: absolute;
  inset: 14px;
  opacity: 0.18;
  background: #DCA18D;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M10 48c13-18 28-29 45-34M20 39c-8-4-14-4-19 1 6 6 13 6 19-1zM36 27c-4-8-3-15 3-21 5 8 4 15-3 21zM47 18c6-5 12-6 17-3-4 6-10 7-17 3z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M10 48c13-18 28-29 45-34M20 39c-8-4-14-4-19 1 6 6 13 6 19-1zM36 27c-4-8-3-15 3-21 5 8 4 15-3 21zM47 18c6-5 12-6 17-3-4 6-10 7-17 3z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.rz-extra-guide-visual .rz-extra-hero-icon {
  width: 58px;
  height: 58px;
  border-radius: 22px;
  z-index: 1;
}

#actionModal.help-library-modal .rz-accordion-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0 14px 13px 28px;
  color: #6B5C4D;
  font-size: 11.5px;
  line-height: 1.35;
}

#actionModal.help-library-modal .rz-accordion-list li::marker {
  color: #A24A3F;
}

#actionModal.help-library-modal .rz-action-card .rz-icon-bubble[data-rz-icon="journal"],
#actionModal.help-library-modal .rz-action-card .rz-icon-bubble[data-rz-icon="section"],
#actionModal.help-library-modal .rz-action-card .rz-icon-bubble[data-rz-icon="pdf"],
#actionModal.help-library-modal .rz-action-card .rz-icon-bubble[data-rz-icon="share"] {
  width: 34px;
  height: 34px;
  border-radius: 13px;
}

.rz-icon-bubble[data-rz-icon="journal"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 4h10v16H7zM10 4v16M13 8h2M13 12h2M13 16h2'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="section"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='7' height='6' rx='1.5'/%3E%3Crect x='13' y='5' width='7' height='6' rx='1.5'/%3E%3Crect x='4' y='13' width='7' height='6' rx='1.5'/%3E%3Crect x='13' y='13' width='7' height='6' rx='1.5'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="share"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='12' r='2.5'/%3E%3Ccircle cx='17' cy='6' r='2.5'/%3E%3Ccircle cx='17' cy='18' r='2.5'/%3E%3Cpath d='M8.3 10.9 14.7 7.1M8.3 13.1l6.4 3.8'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="noFood"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3c2 0 3 2 3 4s-1 4-3 4-3-2-3-4 1-4 3-4zM8 11v10M15 3v18M19 3v7a2 2 0 0 1-4 0V3M4 4l16 16'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="doctorShield"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 19 6v5c0 4.5-2.8 7.8-7 10-4.2-2.2-7-5.5-7-10V6z'/%3E%3Cpath d='M9 12h6M12 9v6'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="sadTooth"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 4c1.5 0 2.5 1 4 1s2.5-1 4-1c2.2 0 3.5 1.8 3.5 4.4 0 4.2-2 11.6-4.2 11.6-1.1 0-1.1-4.2-3.3-4.2S9.8 20 8.7 20C6.5 20 4.5 12.6 4.5 8.4 4.5 5.8 5.8 4 8 4z'/%3E%3Cpath d='M9 10h.01M15 10h.01M9.5 14c1.5-1 3.5-1 5 0'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="dental"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 4c1.5 0 2.5 1 4 1s2.5-1 4-1c2.2 0 3.5 1.8 3.5 4.4 0 4.2-2 11.6-4.2 11.6-1.1 0-1.1-4.2-3.3-4.2S9.8 20 8.7 20C6.5 20 4.5 12.6 4.5 8.4 4.5 5.8 5.8 4 8 4z'/%3E%3Cpath d='M12 8v5M9.5 10.5h5'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="warningThermo"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 14.5V6a2.5 2.5 0 0 1 5 0v8.5a4.5 4.5 0 1 1-5 0zM12.5 8v7'/%3E%3Cpath d='M18 5l3 5h-6zM18 8h.01'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="bandage"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='8' width='16' height='8' rx='4' transform='rotate(-35 12 12)'/%3E%3Cpath d='M10 10h.01M12 12h.01M14 14h.01'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="allergy"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3c4 4 6 7 6 11a6 6 0 0 1-12 0c0-4 2-7 6-11z'/%3E%3Cpath d='M8 8c3 1 5 3 8 0M8 15c2 2 6 2 8 0'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="emergency"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='6' width='14' height='13' rx='3'/%3E%3Cpath d='M9 6V4h6v2M12 10v5M9.5 12.5h5M4 4l2 2M20 4l-2 2'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="heartHands"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 11c3-4 8-1.5 6 3-1.2 2.7-6 6-6 6s-4.8-3.3-6-6c-2-4.5 3-7 6-3z'/%3E%3Cpath d='M4 19c2-2 4-3 7-2M20 19c-2-2-4-3-7-2'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="shield"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 19 6v5c0 4.5-2.8 7.8-7 10-4.2-2.2-7-5.5-7-10V6z'/%3E%3Cpath d='m9 12 2 2 4-5'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="safeSleep"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 15.5A7 7 0 0 1 8.5 6a8 8 0 1 0 9.5 9.5z'/%3E%3Cpath d='M12 21c-3-1.6-5-4-5-7v-3l5-2 5 2v3c0 3-2 5.4-5 7z'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="blanket"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 6h14v12H5zM5 10h14M9 6v12M15 6v12'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="calendarGrowth"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='5' width='14' height='15' rx='3'/%3E%3Cpath d='M8 3v4M16 3v4M5 10h14M9 17c2-4 4-5 6 0M12 13v5'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="stroller"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9h12c0 4-3 7-7 7H8zM6 9a6 6 0 0 1 12 0M7 20h.01M17 20h.01M11 16l-3 4M14 16l3 4'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="kindergarten"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V9l8-5 8 5v11zM9 20v-6h6v6M7 11h2M15 11h2'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="suitcase"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='7' width='14' height='12' rx='3'/%3E%3Cpath d='M9 7V5h6v2M9 11h6M12 11v4'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="mood"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M9 10h.01M15 10h.01M8.5 15c2.2-1.4 4.8-1.4 7 0'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="appGuide"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7' y='3' width='10' height='18' rx='2'/%3E%3Cpath d='M10 6h4M10 10h4M10 14h4M12 18h.01'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="assistant"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1 3 3 1-3 1-1 3-1-3-3-1 3-1zM6 13l.7 2 2 .7-2 .7-.7 2-.7-2-2-.7 2-.7zM17 14l.8 2.4 2.2.6-2.2.6L17 20l-.8-2.4-2.2-.6 2.2-.6z'/%3E%3C/svg%3E");
}

@media (max-width: 390px) {
  #actionModal.help-library-modal .rz-article-hero {
    grid-template-columns: 154px minmax(0, 1fr);
    min-height: 178px;
  }

  #actionModal.help-library-modal .rz-article-image {
    width: 150px;
    height: 150px;
  }

  #actionModal.help-library-modal .rz-extra-hero {
    grid-template-columns: 108px minmax(0, 1fr);
    min-height: 146px;
  }

  .rz-extra-guide-visual {
    width: 104px;
    height: 104px;
  }
}

@media (max-width: 360px) {
  #actionModal.help-library-modal .rz-article-hero {
    grid-template-columns: 132px minmax(0, 1fr);
    min-height: 164px;
  }

  #actionModal.help-library-modal .rz-article-image {
    width: 128px;
    height: 128px;
  }

  .rz-extra-guide-visual {
    width: 94px;
    height: 94px;
  }
}

/* HELP REFERENCE PIXEL FIX V2 */
#actionModal.help-library-modal .rz-help-library .rz-category-card {
  height: 122px;
  min-height: 122px;
  grid-template-columns: 70px minmax(0, 1fr);
  grid-template-rows: 1fr auto auto 1fr;
  gap: 2px 9px;
  padding: 10px 9px;
  overflow: hidden;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-illustration {
  grid-row: 1 / 5;
  grid-column: 1;
  width: 124px;
  height: 104px;
  margin: 0 0 0 -26px;
  align-self: center;
  justify-self: start;
  object-fit: contain;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-title {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  font-size: 11.4px;
  line-height: 1.12;
  font-weight: 800;
  color: #3F3530;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-text {
  grid-column: 2;
  grid-row: 3;
  align-self: start;
  display: block;
  max-height: 3.7em;
  overflow: hidden;
  color: #8B7A70;
  font-size: 9.6px;
  line-height: 1.22;
  font-weight: 500;
}

#actionModal.help-library-modal .rz-extra-guide-list {
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

#actionModal.help-library-modal .rz-extra-guide-row .rz-icon-bubble {
  color: #A24A3F;
}

#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back .rz-title {
  font-size: clamp(24px, 6.2vw, 30px);
  line-height: 1;
  white-space: nowrap;
}

#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back .rz-subtitle {
  font-size: 15px;
  line-height: 1.15;
}

#actionModal.help-library-modal .rz-article-hero {
  grid-template-columns: 178px minmax(0, 1fr);
  min-height: 202px;
  padding: 15px;
}

#actionModal.help-library-modal .rz-article-image {
  width: 194px;
  height: 194px;
  margin-left: -12px;
  object-fit: contain;
  object-position: center;
}

#actionModal.help-library-modal .rz-article-title {
  font-size: clamp(18px, 4.3vw, 22px);
  line-height: 1.06;
  max-width: 100%;
}

#actionModal.help-library-modal .rz-fact-row {
  grid-template-columns: 38px minmax(0, 1fr);
  padding: 11px 12px;
}

#actionModal.help-library-modal .rz-fact-row .rz-icon-bubble {
  width: 34px;
  height: 34px;
}

#actionModal.help-library-modal .rz-accordion-row,
#actionModal.help-library-modal .rz-accordion-row:first-of-type,
#actionModal.help-library-modal .rz-accordion-row:last-of-type {
  margin: 0 0 8px;
  border: 1px solid #EEDCD2;
  border-radius: 18px;
  background: #FFFFFF;
  box-shadow: 0 8px 18px rgba(140, 58, 54, 0.035);
  overflow: hidden;
}

#actionModal.help-library-modal .rz-accordion-row:last-child {
  margin-bottom: 0;
}

#actionModal.help-library-modal .rz-accordion-row summary {
  min-height: 46px;
  padding: 13px 14px;
  border-radius: 18px;
  background: #FFFFFF;
  font-size: 12.5px;
  line-height: 1.2;
}

#actionModal.help-library-modal .rz-accordion-row[open] summary {
  border-radius: 18px 18px 0 0;
}

#actionModal.help-library-modal .rz-accordion-row p {
  padding: 0 14px 14px;
}

.rz-icon-bubble[data-rz-icon="eye"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12s3.5-6 9-6 9 6 9 6-3.5 6-9 6-9-6-9-6z'/%3E%3Ccircle cx='12' cy='12' r='2.6'/%3E%3C/svg%3E");
}

@media (max-width: 390px) {
  #actionModal.help-library-modal .rz-help-library .rz-category-card {
    grid-template-columns: 66px minmax(0, 1fr);
    height: 118px;
    min-height: 118px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-illustration {
    width: 116px;
    height: 98px;
    margin-left: -25px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-text {
    font-size: 9.2px;
  }

  #actionModal.help-library-modal .rz-article-hero {
    grid-template-columns: 150px minmax(0, 1fr);
    min-height: 184px;
    gap: 10px;
  }

  #actionModal.help-library-modal .rz-article-image {
    width: 164px;
    height: 164px;
    margin-left: -10px;
  }

  #actionModal.help-library-modal .rz-article-screen > .rz-header-with-back .rz-title {
    font-size: clamp(23px, 6vw, 28px);
  }
}

@media (max-width: 360px) {
  #actionModal.help-library-modal .rz-help-library .rz-category-card {
    grid-template-columns: 60px minmax(0, 1fr);
    height: 114px;
    min-height: 114px;
    padding: 9px 8px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-illustration {
    width: 108px;
    height: 92px;
    margin-left: -26px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-title {
    font-size: 10.8px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-text {
    font-size: 8.9px;
  }

  #actionModal.help-library-modal .rz-article-hero {
    grid-template-columns: 130px minmax(0, 1fr);
    min-height: 168px;
  }

  #actionModal.help-library-modal .rz-article-image {
    width: 142px;
    height: 142px;
  }

  #actionModal.help-library-modal .rz-article-title {
    font-size: 18px;
  }
}

/* HELP ARTICLE ICONS + FIT FIX V3 */
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back {
  grid-template-columns: 40px minmax(0, 1fr);
}

#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back .rz-title {
  font-size: clamp(22px, 5.4vw, 26px);
  line-height: 1.02;
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back .rz-subtitle {
  font-size: 13px;
  line-height: 1.16;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card {
  height: 118px;
  min-height: 118px;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 1px 9px;
  padding: 9px 9px;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-illustration {
  width: 130px;
  height: 104px;
  margin-left: -28px;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-title {
  font-size: 11px;
  line-height: 1.12;
  overflow: visible;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-text {
  font-size: 9px;
  line-height: 1.15;
  max-height: 3.5em;
}

#actionModal.help-library-modal .rz-article-hero {
  grid-template-columns: minmax(166px, 52%) minmax(0, 1fr);
  min-height: 206px;
  padding: 15px;
  gap: 10px;
  overflow: hidden;
}

#actionModal.help-library-modal .rz-article-image {
  width: 212px;
  height: 204px;
  margin-left: -18px;
  align-self: center;
  object-fit: contain;
  object-position: center;
}

#actionModal.help-library-modal .rz-article-title {
  font-size: clamp(17px, 4.2vw, 20px);
  line-height: 1.08;
  overflow: visible;
}

#actionModal.help-library-modal .rz-fact-row {
  border-radius: 18px;
}

#actionModal.help-library-modal .rz-fact-row .rz-icon-bubble[data-rz-icon="eye"] {
  color: #A24A3F;
}

#actionModal.help-library-modal .rz-accordion-list {
  display: grid;
  gap: 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

#actionModal.help-library-modal .rz-accordion-row,
#actionModal.help-library-modal .rz-accordion-row:first-of-type,
#actionModal.help-library-modal .rz-accordion-row:last-of-type {
  margin: 0;
  border: 1px solid #EEDCD2;
  border-radius: 18px;
  background: #FFFFFF;
  box-shadow: 0 7px 16px rgba(140, 58, 54, 0.032);
  overflow: hidden;
}

#actionModal.help-library-modal .rz-accordion-row summary,
#actionModal.help-library-modal .rz-accordion-row[open] summary {
  border-radius: 18px;
  background: #FFFFFF;
}

#actionModal.help-library-modal .rz-accordion-row[open] summary {
  border-radius: 18px 18px 0 0;
}

.rz-icon-bubble[data-rz-icon="warning"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4 21 20H3z'/%3E%3Cpath d='M12 9v5M12 17h.01'/%3E%3C/svg%3E");
}

@media (max-width: 390px) {
  #actionModal.help-library-modal .rz-article-screen > .rz-header-with-back .rz-title {
    font-size: clamp(21px, 5.3vw, 24px);
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card {
    grid-template-columns: 68px minmax(0, 1fr);
    height: 116px;
    min-height: 116px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-illustration {
    width: 120px;
    height: 98px;
    margin-left: -27px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-title {
    font-size: 10.6px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-text {
    font-size: 8.7px;
  }

  #actionModal.help-library-modal .rz-article-hero {
    grid-template-columns: minmax(146px, 51%) minmax(0, 1fr);
    min-height: 188px;
  }

  #actionModal.help-library-modal .rz-article-image {
    width: 184px;
    height: 180px;
    margin-left: -16px;
  }

  #actionModal.help-library-modal .rz-article-title {
    font-size: clamp(16px, 4.1vw, 18px);
  }
}

@media (max-width: 360px) {
  #actionModal.help-library-modal .rz-article-screen > .rz-header-with-back .rz-title {
    font-size: 21px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card {
    grid-template-columns: 62px minmax(0, 1fr);
    height: 112px;
    min-height: 112px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-illustration {
    width: 112px;
    height: 92px;
    margin-left: -27px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-title {
    font-size: 10.2px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-text {
    font-size: 8.35px;
    line-height: 1.13;
  }

  #actionModal.help-library-modal .rz-article-hero {
    grid-template-columns: minmax(124px, 50%) minmax(0, 1fr);
    min-height: 170px;
  }

  #actionModal.help-library-modal .rz-article-image {
    width: 154px;
    height: 152px;
    margin-left: -14px;
  }

  #actionModal.help-library-modal .rz-article-title {
    font-size: 16px;
  }
}

/* HELP REFERENCE FIXES V4 */
#actionModal.help-library-modal .rz-help-library .rz-category-card {
  grid-template-columns: 84px minmax(0, 1fr);
  grid-template-rows: 1fr auto auto 1fr;
  column-gap: 11px;
  row-gap: 4px;
  height: 120px;
  min-height: 120px;
  padding: 9px 10px;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-illustration {
  width: 128px;
  height: 104px;
  margin-left: -24px;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-title {
  align-self: end;
  font-size: 11px;
  line-height: 1.08;
  font-weight: 800;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-text {
  align-self: start;
  font-size: 8.85px;
  line-height: 1.16;
  max-height: 3.5em;
}

#actionModal.help-library-modal .rz-extra-guide-screen .rz-extra-hero {
  grid-template-columns: 136px minmax(0, 1fr);
  min-height: 170px;
  gap: 12px;
  align-items: center;
}

#actionModal.help-library-modal .rz-extra-guide-screen .rz-article-title,
#actionModal.help-library-modal .rz-assistant-screen .rz-article-title {
  font-size: clamp(20px, 5.2vw, 24px);
  line-height: 1.08;
}

.rz-extra-guide-visual {
  width: 132px;
  height: 132px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 50% 52%, rgba(255, 248, 241, 0.96), rgba(255, 248, 241, 0.52) 42%, transparent 67%),
    radial-gradient(circle at 20% 86%, rgba(220, 161, 141, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(255, 248, 241, 0.9), rgba(243, 230, 218, 0.68));
  box-shadow: inset 0 0 0 1px rgba(238, 220, 210, 0.6);
}

.rz-extra-guide-visual::before {
  inset: 10px;
  opacity: 0.2;
}

.rz-extra-guide-visual::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 46px;
  height: 42px;
  opacity: 0.18;
  background: #A24A3F;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 44' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M8 36c14-16 29-25 48-30M19 28c-8-4-15-3-19 2 6 5 13 5 19-2zM38 17c-4-7-3-12 3-17 4 7 3 12-3 17zM48 11c5-4 10-5 15-2-4 5-9 6-15 2z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 44' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M8 36c14-16 29-25 48-30M19 28c-8-4-15-3-19 2 6 5 13 5 19-2zM38 17c-4-7-3-12 3-17 4 7 3 12-3 17zM48 11c5-4 10-5 15-2-4 5-9 6-15 2z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.rz-extra-guide-visual .rz-extra-hero-icon {
  width: 68px;
  height: 68px;
  border-radius: 24px;
  color: #A24A3F;
  background: rgba(253, 241, 235, 0.78);
}

.rz-extra-guide-visual[data-guide-key="age_guide"] .rz-extra-hero-icon,
.rz-extra-guide-visual[data-guide-key="checklists"] .rz-extra-hero-icon,
.rz-extra-guide-visual[data-guide-key="howto"] .rz-extra-hero-icon {
  color: #8B3E38;
}

.rz-extra-guide-visual[data-guide-key="red_flags"] .rz-extra-hero-icon,
.rz-extra-guide-visual[data-guide-key="safety"] .rz-extra-hero-icon {
  color: #B9574D;
}

.rz-extra-guide-visual[data-guide-key="travel_walk"] .rz-extra-hero-icon,
.rz-extra-guide-visual[data-guide-key="kindergarten"] .rz-extra-hero-icon,
.rz-extra-guide-visual[data-guide-key="vacation"] .rz-extra-hero-icon {
  color: #7F9A7B;
}

.rz-icon-bubble[data-rz-icon="pdf"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h7l4 4v14H7z'/%3E%3Cpath d='M14 3v5h5M9 12h6M9 15h5M9 18h4'/%3E%3C/svg%3E");
}

#actionModal.help-library-modal .rz-action-card .rz-icon-bubble[data-rz-icon="pdf"] {
  color: #A24A3F;
}

#actionModal.help-library-modal .rz-assistant-screen {
  min-height: calc(100dvh - 28px);
  display: grid;
  gap: 14px;
}

#actionModal.help-library-modal .rz-assistant-hero {
  grid-template-columns: 136px minmax(0, 1fr);
  min-height: 168px;
  align-items: center;
}

#actionModal.help-library-modal .rz-assistant-screen .rz-topic-list {
  display: grid;
  gap: 8px;
}

#actionModal.help-library-modal .rz-assistant-screen .rz-topic-row {
  background: #FFFFFF;
}

#actionModal.help-library-modal .rz-assistant-note {
  grid-template-columns: minmax(0, 1fr);
  min-height: auto;
  padding: 13px 14px;
  background: #F7E3C9;
}

#actionModal.help-library-modal .rz-assistant-note strong {
  display: block;
  color: #8B3E38;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.16;
  margin-bottom: 4px;
}

#actionModal.help-library-modal .rz-assistant-note small {
  color: #5A4A42;
  font-size: 12.5px;
  line-height: 1.35;
}

@media (max-width: 390px) {
  #actionModal.help-library-modal .rz-help-library .rz-category-card {
    grid-template-columns: 78px minmax(0, 1fr);
    height: 118px;
    min-height: 118px;
    column-gap: 10px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-illustration {
    width: 120px;
    height: 98px;
    margin-left: -25px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-title {
    font-size: 10.6px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-text {
    font-size: 8.55px;
  }

  #actionModal.help-library-modal .rz-extra-guide-screen .rz-extra-hero,
  #actionModal.help-library-modal .rz-assistant-hero {
    grid-template-columns: 116px minmax(0, 1fr);
    min-height: 152px;
  }

  .rz-extra-guide-visual {
    width: 112px;
    height: 112px;
  }

  .rz-extra-guide-visual .rz-extra-hero-icon {
    width: 58px;
    height: 58px;
  }
}

@media (max-width: 360px) {
  #actionModal.help-library-modal .rz-help-library .rz-category-card {
    grid-template-columns: 72px minmax(0, 1fr);
    height: 114px;
    min-height: 114px;
    column-gap: 8px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-illustration {
    width: 112px;
    height: 92px;
    margin-left: -25px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-title {
    font-size: 10px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-text {
    font-size: 8px;
  }

  #actionModal.help-library-modal .rz-extra-guide-screen .rz-extra-hero,
  #actionModal.help-library-modal .rz-assistant-hero {
    grid-template-columns: 98px minmax(0, 1fr);
    min-height: 140px;
  }

  .rz-extra-guide-visual {
    width: 96px;
    height: 96px;
  }

  .rz-extra-guide-visual .rz-extra-hero-icon {
    width: 52px;
    height: 52px;
  }
}

/* HELP REFERENCE PRECISION V5 */
#actionModal.help-library-modal .rz-help-library .rz-library-grid {
  gap: 10px 10px;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card {
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-rows: 1fr auto 5px auto 1fr;
  column-gap: 10px;
  row-gap: 0;
  height: 112px;
  min-height: 112px;
  padding: 9px 9px;
  overflow: hidden;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-illustration {
  grid-row: 1 / 6;
  grid-column: 1;
  width: 112px;
  height: 92px;
  margin: 0 0 0 -21px;
  align-self: center;
  justify-self: start;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-title {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  color: #3F3530;
  font-size: 10.8px;
  line-height: 1.08;
  font-weight: 800;
  overflow: visible;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-text {
  grid-column: 2;
  grid-row: 4;
  align-self: start;
  color: #6F625A;
  font-size: 8.2px;
  line-height: 1.12;
  font-weight: 500;
  max-height: 3.42em;
  overflow: hidden;
  word-break: normal;
  overflow-wrap: anywhere;
}

#actionModal.help-library-modal .rz-topic-row > span:not(.rz-icon-bubble),
#actionModal.help-library-modal .rz-topic-row .rz-topic-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
  align-content: center;
}

#actionModal.help-library-modal .rz-topic-row strong,
#actionModal.help-library-modal .rz-topic-row small,
#actionModal.help-library-modal .rz-topic-row .rz-topic-title,
#actionModal.help-library-modal .rz-topic-row .rz-topic-text {
  display: block;
  min-width: 0;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

#actionModal.help-library-modal .rz-topic-row strong,
#actionModal.help-library-modal .rz-topic-row .rz-topic-title {
  color: #3F3530;
  font-size: 13px;
  line-height: 1.16;
  font-weight: 800;
}

#actionModal.help-library-modal .rz-topic-row small,
#actionModal.help-library-modal .rz-topic-row .rz-topic-text {
  color: #6F625A;
  font-size: 11.2px;
  line-height: 1.28;
  font-weight: 500;
}

#actionModal.help-library-modal .rz-assistant-screen > .rz-header-with-back {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 64px;
  padding: 11px 13px;
  border: 1px solid #EEDCD2;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 248, 241, 0.92)),
    #FFF8F1;
  box-shadow: 0 10px 26px rgba(140, 58, 54, 0.08);
}

#actionModal.help-library-modal .rz-assistant-screen > .rz-header-with-back .rz-title {
  font-size: clamp(24px, 6.3vw, 30px);
  line-height: 1;
}

#actionModal.help-library-modal .rz-assistant-screen > .rz-header-with-back .rz-subtitle {
  font-size: 13px;
  line-height: 1.16;
}

#actionModal.help-library-modal .rz-assistant-note {
  position: relative;
  border: 1px solid #EEDCD2;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 248, 241, 0.94), rgba(255, 248, 241, 0.9)),
    #FFF8F1;
  box-shadow: 0 7px 16px rgba(140, 58, 54, 0.035);
  overflow: hidden;
}

#actionModal.help-library-modal .rz-assistant-note::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 6px;
  width: 74px;
  height: 60px;
  opacity: 0.12;
  background: #DCA18D;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 60' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 50C26 36 39 22 48 8'/%3E%3Cpath d='M27 35c-9-6-18-7-27-3 7 7 16 9 27 3zM39 22c-5-10-4-19 2-28 6 9 5 18-2 28zM49 10c10-5 19-6 29-1-8 7-17 8-29 1z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 60' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 50C26 36 39 22 48 8'/%3E%3Cpath d='M27 35c-9-6-18-7-27-3 7 7 16 9 27 3zM39 22c-5-10-4-19 2-28 6 9 5 18-2 28zM49 10c10-5 19-6 29-1-8 7-17 8-29 1z'/%3E%3C/svg%3E") center / contain no-repeat;
}

#actionModal.help-library-modal .rz-assistant-note strong,
#actionModal.help-library-modal .rz-assistant-note small {
  position: relative;
  z-index: 1;
}

@media (max-width: 390px) {
  #actionModal.help-library-modal .rz-help-library .rz-category-card {
    grid-template-columns: 72px minmax(0, 1fr);
    height: 110px;
    min-height: 110px;
    column-gap: 9px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-illustration {
    width: 106px;
    height: 88px;
    margin-left: -20px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-title {
    font-size: 10.4px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-text {
    font-size: 7.9px;
  }
}

@media (max-width: 360px) {
  #actionModal.help-library-modal .rz-help-library .rz-category-card {
    grid-template-columns: 66px minmax(0, 1fr);
    height: 108px;
    min-height: 108px;
    column-gap: 8px;
    padding: 8px 8px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-illustration {
    width: 98px;
    height: 82px;
    margin-left: -20px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-title {
    font-size: 10px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-text {
    font-size: 7.6px;
  }
}

/* HELP ILLUSTRATION SCALE POLISH V1 */
#actionModal.help-library-modal .rz-help-library .rz-category-card {
  grid-template-columns: 88px minmax(0, 1fr);
  height: 116px;
  min-height: 116px;
  column-gap: 10px;
  padding: 8px 10px;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-illustration {
  width: 138px;
  height: 112px;
  margin-left: -30px;
  object-fit: contain;
  object-position: center;
  align-self: center;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-title {
  align-self: end;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-text {
  align-self: start;
}

#actionModal.help-library-modal .rz-article-hero {
  grid-template-columns: minmax(188px, 54%) minmax(0, 1fr);
  min-height: 214px;
  gap: 8px;
}

#actionModal.help-library-modal .rz-article-image {
  width: 248px;
  height: 232px;
  margin-left: -30px;
  object-fit: contain;
  object-position: center;
  align-self: center;
}

#actionModal.help-library-modal .rz-extra-guide-screen .rz-extra-hero,
#actionModal.help-library-modal .rz-assistant-screen .rz-assistant-hero {
  grid-template-columns: 158px minmax(0, 1fr);
  min-height: 184px;
  gap: 12px;
}

#actionModal.help-library-modal .rz-extra-guide-screen .rz-extra-guide-visual,
#actionModal.help-library-modal .rz-assistant-screen .rz-extra-guide-visual {
  width: 148px;
  height: 148px;
  border-radius: 34px;
}

#actionModal.help-library-modal .rz-extra-guide-screen .rz-extra-guide-visual .rz-extra-hero-icon,
#actionModal.help-library-modal .rz-assistant-screen .rz-extra-guide-visual .rz-extra-hero-icon {
  width: 88px;
  height: 88px;
  border-radius: 28px;
}

#actionModal.help-library-modal .rz-note-card {
  grid-template-columns: minmax(0, 1fr) 104px;
  min-height: 92px;
}

#actionModal.help-library-modal .rz-note-illustration-img {
  width: 116px;
  height: 92px;
  object-fit: contain;
  object-position: right center;
}

#actionModal.help-library-modal .rz-assistant-note::after {
  right: 8px;
  bottom: 4px;
  width: 96px;
  height: 78px;
  opacity: 0.14;
}

@media (max-width: 390px) {
  #actionModal.help-library-modal .rz-help-library .rz-category-card {
    grid-template-columns: 82px minmax(0, 1fr);
    height: 114px;
    min-height: 114px;
    column-gap: 9px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-illustration {
    width: 130px;
    height: 106px;
    margin-left: -29px;
  }

  #actionModal.help-library-modal .rz-article-hero {
    grid-template-columns: minmax(166px, 53%) minmax(0, 1fr);
    min-height: 198px;
  }

  #actionModal.help-library-modal .rz-article-image {
    width: 218px;
    height: 206px;
    margin-left: -28px;
  }

  #actionModal.help-library-modal .rz-extra-guide-screen .rz-extra-hero,
  #actionModal.help-library-modal .rz-assistant-screen .rz-assistant-hero {
    grid-template-columns: 136px minmax(0, 1fr);
    min-height: 172px;
  }

  #actionModal.help-library-modal .rz-extra-guide-screen .rz-extra-guide-visual,
  #actionModal.help-library-modal .rz-assistant-screen .rz-extra-guide-visual {
    width: 128px;
    height: 128px;
  }

  #actionModal.help-library-modal .rz-extra-guide-screen .rz-extra-guide-visual .rz-extra-hero-icon,
  #actionModal.help-library-modal .rz-assistant-screen .rz-extra-guide-visual .rz-extra-hero-icon {
    width: 78px;
    height: 78px;
  }
}

@media (max-width: 360px) {
  #actionModal.help-library-modal .rz-help-library .rz-category-card {
    grid-template-columns: 76px minmax(0, 1fr);
    height: 112px;
    min-height: 112px;
    column-gap: 8px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-illustration {
    width: 120px;
    height: 98px;
    margin-left: -28px;
  }

  #actionModal.help-library-modal .rz-article-hero {
    grid-template-columns: minmax(142px, 52%) minmax(0, 1fr);
    min-height: 180px;
  }

  #actionModal.help-library-modal .rz-article-image {
    width: 184px;
    height: 174px;
    margin-left: -24px;
  }

  #actionModal.help-library-modal .rz-extra-guide-screen .rz-extra-hero,
  #actionModal.help-library-modal .rz-assistant-screen .rz-assistant-hero {
    grid-template-columns: 116px minmax(0, 1fr);
    min-height: 158px;
  }

  #actionModal.help-library-modal .rz-extra-guide-screen .rz-extra-guide-visual,
  #actionModal.help-library-modal .rz-assistant-screen .rz-extra-guide-visual {
    width: 110px;
    height: 110px;
  }

  #actionModal.help-library-modal .rz-extra-guide-screen .rz-extra-guide-visual .rz-extra-hero-icon,
  #actionModal.help-library-modal .rz-assistant-screen .rz-extra-guide-visual .rz-extra-hero-icon {
    width: 66px;
    height: 66px;
  }
}

/* HELP LIBRARY TEXT + HERO DENSITY FIX V2 */
#actionModal.help-library-modal .rz-help-library .rz-category-card {
  grid-template-columns: 80px minmax(0, 1fr);
  column-gap: 8px;
  height: 116px;
  min-height: 116px;
  padding: 8px 10px;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-illustration {
  width: 136px;
  height: 112px;
  margin-left: -29px;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-title,
#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-text {
  width: 100%;
  min-width: 0;
  justify-self: start;
  text-align: left;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-title {
  font-size: 11px;
  line-height: 1.12;
}

#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-text {
  font-size: 8.45px;
  line-height: 1.16;
  max-height: 3.55em;
  overflow: hidden;
}

#actionModal.help-library-modal .rz-article-hero {
  grid-template-columns: minmax(152px, 48%) minmax(0, 1fr);
  min-height: 168px;
  padding: 12px;
  gap: 8px;
  align-items: center;
}

#actionModal.help-library-modal .rz-article-image {
  width: 174px;
  height: 148px;
  margin-left: -10px;
  transform: scale(1.32);
  transform-origin: center;
}

@media (max-width: 390px) {
  #actionModal.help-library-modal .rz-help-library .rz-category-card {
    grid-template-columns: 76px minmax(0, 1fr);
    height: 114px;
    min-height: 114px;
    column-gap: 8px;
    padding: 8px 9px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-illustration {
    width: 128px;
    height: 106px;
    margin-left: -28px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-title {
    font-size: 10.6px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-text {
    font-size: 8px;
    line-height: 1.14;
  }

  #actionModal.help-library-modal .rz-article-hero {
    grid-template-columns: minmax(142px, 48%) minmax(0, 1fr);
    min-height: 158px;
    padding: 12px;
  }

  #actionModal.help-library-modal .rz-article-image {
    width: 162px;
    height: 140px;
    margin-left: -10px;
    transform: scale(1.32);
  }
}

@media (max-width: 360px) {
  #actionModal.help-library-modal .rz-help-library .rz-category-card {
    grid-template-columns: 70px minmax(0, 1fr);
    height: 112px;
    min-height: 112px;
    column-gap: 7px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-illustration {
    width: 118px;
    height: 100px;
    margin-left: -27px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-title {
    font-size: 10.2px;
  }

  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-text {
    font-size: 7.75px;
  }

  #actionModal.help-library-modal .rz-article-hero {
    grid-template-columns: minmax(128px, 47%) minmax(0, 1fr);
    min-height: 150px;
    gap: 7px;
  }

  #actionModal.help-library-modal .rz-article-image {
    width: 148px;
    height: 130px;
    margin-left: -9px;
    transform: scale(1.28);
  }
}

/* HELP TEXT, NOTE AND FACT ALIGNMENT V3 */
#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-title,
#actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-text {
  margin-left: -4px;
  width: calc(100% + 5px);
}

#actionModal.help-library-modal .rz-topic-screen .rz-note-card {
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 8px;
  min-height: 84px;
  padding: 12px 10px 12px 14px;
  align-items: center;
}

#actionModal.help-library-modal .rz-topic-screen .rz-note-copy {
  min-width: 0;
  max-width: 100%;
  padding-right: 0;
}

#actionModal.help-library-modal .rz-topic-screen .rz-note-illustration-img {
  width: 104px;
  height: 78px;
  justify-self: end;
  align-self: center;
  object-fit: contain;
  object-position: right center;
}

#actionModal.help-library-modal .rz-fact-row > span {
  display: grid;
  gap: 4px;
  min-width: 0;
  align-content: center;
}

#actionModal.help-library-modal .rz-fact-row strong,
#actionModal.help-library-modal .rz-fact-row small {
  display: block;
  min-width: 0;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

#actionModal.help-library-modal .rz-fact-row strong {
  line-height: 1.18;
}

#actionModal.help-library-modal .rz-fact-row small {
  line-height: 1.32;
}

@media (max-width: 390px) {
  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-title,
  #actionModal.help-library-modal .rz-help-library .rz-category-card .rz-card-text {
    margin-left: -3px;
    width: calc(100% + 4px);
  }

  #actionModal.help-library-modal .rz-topic-screen .rz-note-card {
    grid-template-columns: minmax(0, 1fr) 100px;
    min-height: 82px;
  }

  #actionModal.help-library-modal .rz-topic-screen .rz-note-illustration-img {
    width: 96px;
    height: 74px;
  }
}

@media (max-width: 360px) {
  #actionModal.help-library-modal .rz-topic-screen .rz-note-card {
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 6px;
    padding-right: 8px;
  }

  #actionModal.help-library-modal .rz-topic-screen .rz-note-illustration-img {
    width: 88px;
    height: 68px;
  }
}

/* DAMAGE CONTROL V1: scoped only to the feeding side selector kept from the
   previous stage. No global tab/card/nav overrides here. */
#actionModal .rz-feeding-side {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 4px;
  border: 1px solid rgba(232, 215, 204, 0.88);
  border-radius: 18px;
  background: rgba(255, 248, 241, 0.78);
}

#actionModal .rz-choice-pill {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

#actionModal .rz-choice-pill.active {
  border-color: rgba(162, 74, 63, 0.18);
  background: #F7DCD2;
  color: var(--accent-strong);
}

/* REMAINING SCREENS REFERENCE V1: scoped to non-home/non-help screens only. */
.rz-core-today,
.rz-core-child,
.rz-core-more {
  --rz-core-card: #FFFFFF;
  --rz-core-line: #F3E6E1;
  --rz-core-heading: #8C3A36;
  --rz-core-text: #4A3E3D;
  --rz-core-muted: #8A7E7D;
  --rz-core-shadow: 0 8px 22px rgba(140, 58, 54, 0.045);
}

.rz-core-today .rz-page,
.rz-core-child .rz-page {
  gap: 14px;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

.rz-core-today .rz-diary-card,
.rz-core-child .rz-profile-card,
.rz-core-child .rz-list-card,
.rz-core-more .more-hero,
.rz-core-more #moreList > .book-page-card,
.rz-child-health .book-page-card,
.rz-child-health .rz-health-menu,
.rz-child-dynamics .book-page-card,
/* .rz-child-dynamics .chart-card surface override removed — provided by canonical .rz-card */

.rz-core-today .rz-header,
.rz-core-child .rz-header,
.rz-core-section-header,
.rz-core-more .more-hero .child-row {
  align-items: center;
  min-width: 0;
}

.rz-core-title,
.rz-core-today .rz-title,
.rz-core-child .rz-title,
.rz-core-child .book-section-title h2,
.rz-core-child .child-row h2,
.rz-core-more .child-name,
.rz-core-more .book-section-title h2 {
  color: var(--rz-core-heading);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.rz-core-title {
  margin: 0;
  font-size: clamp(24px, 6vw, 31px);
}

.rz-core-subtitle,
.rz-core-today .rz-subtitle,
.rz-core-child .rz-subtitle,
.rz-core-child .list-meta,
.rz-core-more .list-meta,
.rz-core-more .section-note {
  color: var(--rz-core-muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.28;
}

.rz-core-today .rz-diary-card {
  padding: 16px;
}

.rz-core-today .filters {
  display: flex;
  gap: 7px;
  margin: 12px 0 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.rz-core-today .filters::-webkit-scrollbar {
  display: none;
}

.rz-core-today .filter {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--rz-core-line);
  border-radius: 999px;
  background: #FFF8F1;
  color: var(--rz-core-muted);
  font-size: 12px;
  font-weight: 600;
}

.rz-core-today .filter.active {
  border-color: rgba(162, 74, 63, 0.28);
  background: rgba(220, 161, 141, 0.24);
  color: var(--rz-core-heading);
}

.rz-core-today .rz-event-list {
  display: grid;
  gap: 0;
}

.rz-core-today .rz-event-row,
.rz-child-health .list-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(232, 215, 204, 0.72);
}

.rz-core-today .rz-event-row:last-child,
.rz-child-health .list-item:last-child {
  border-bottom: 0;
}

.rz-core-today .rz-event-title,
.rz-child-health .list-title,
.rz-core-more .list-title,
.rz-core-modal .list-title {
  color: var(--rz-core-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.rz-core-today .rz-event-note,
.rz-core-today .rz-event-time {
  color: var(--rz-core-muted);
  font-size: 12px;
  line-height: 1.25;
}

.rz-core-today .rz-event-time {
  justify-self: end;
  font-variant-numeric: tabular-nums;
}

.rz-core-today #todayAddButton,
.rz-core-modal .rz-button-primary,
.rz-core-modal .mini-button.primary,
.rz-core-modal .action:not(.secondary):not(.danger) {
  min-height: 44px;
  border: 1px solid rgba(162, 74, 63, 0.18);
  border-radius: 12px;
  background: linear-gradient(180deg, #B84E45, #A9433D);
  color: #FFF8F1;
  box-shadow: 0 12px 22px rgba(162, 74, 63, 0.16);
  font-weight: 700;
}

.rz-core-child .rz-profile-card {
  padding: 14px;
}

.rz-core-child .rz-profile-top {
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
}

.rz-core-child .rz-avatar {
  width: 58px;
  height: 58px;
  border: 1px solid #E8D7CC;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 36%, rgba(220, 161, 141, 0.2), transparent 31%), linear-gradient(180deg, #FFF3EA, #F4E5DA);
}

.rz-core-child .rz-age-pill,
.rz-core-today .rz-age-pill,
.rz-core-more .pill {
  border: 1px solid rgba(232, 215, 204, 0.86);
  border-radius: 999px;
  background: #F7ECE5;
  color: #8B3E38;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.rz-core-child .rz-profile-menu-row,
.rz-core-row,
.rz-core-more .more-item.with-icon {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 10px 4px;
  border: 0;
  border-bottom: 1px solid rgba(232, 215, 204, 0.76);
  background: transparent;
  color: var(--rz-core-text);
  text-align: left;
}

.rz-core-child .rz-profile-menu-row:last-child,
.rz-child-health .rz-core-row:last-child,
.rz-core-more .more-item.with-icon:last-child {
  border-bottom: 0;
}

.rz-core-child .rz-profile-menu-row .rz-topic-title {
  display: block;
  color: var(--rz-core-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.18;
}

.rz-child-health .rz-health-menu {
  padding: 6px 12px;
}

.rz-child-health .rz-core-row .rz-icon-bubble,
.rz-core-child .rz-profile-menu-row .rz-icon-bubble,
.rz-core-today .rz-icon-bubble,
.rz-core-modal .rz-icon-bubble {
  width: 36px;
  height: 36px;
  border-radius: 13px;
  background: rgba(220, 161, 141, 0.12);
  color: #A24A3F;
}

.rz-child-health .rz-core-row .rz-icon-bubble::before,
.rz-core-today .rz-icon-bubble::before,
.rz-core-modal .rz-icon-bubble::before {
  width: 19px;
  height: 19px;
}

.rz-child-health .rz-topic-copy,
.rz-core-more .more-item.with-icon {
  min-width: 0;
}

.rz-child-health .rz-topic-title,
.rz-core-more .more-item .list-title {
  display: block;
  color: var(--rz-core-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.18;
}

.rz-child-health .rz-topic-text,
.rz-core-more .more-item .list-meta {
  display: block;
  margin-top: 3px;
  color: var(--rz-core-muted);
  font-size: 12px;
  line-height: 1.25;
}

.rz-child-health .book-page-card {
  padding: 14px;
}

.rz-child-health .book-section-title,
.rz-child-health .child-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.rz-child-health .book-section-title .book-illustration,
.rz-child-health .child-row .book-illustration {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(220, 161, 141, 0.12);
  color: #A24A3F;
}

.rz-child-health .inline-actions,
.rz-child-dynamics .inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.rz-child-health .mini-button,
.rz-child-dynamics .mini-button,
.rz-core-modal .mini-button,
.rz-core-modal .action.secondary {
  min-height: 38px;
  border: 1px solid rgba(162, 74, 63, 0.22);
  border-radius: 12px;
  background: #FFF8F1;
  color: #8B3E38;
  font-weight: 700;
}

.rz-child-dynamics .chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.rz-child-dynamics .chart-card {
  padding: 13px;
}

.rz-child-dynamics .chart-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.rz-child-dynamics .chart-title {
  color: var(--rz-core-text);
  font-weight: 700;
}

.rz-child-dynamics .chart-value,
.rz-child-dynamics .chart-latest {
  color: var(--rz-core-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.rz-child-dynamics .mini-chart {
  width: 100%;
  height: 76px;
  margin-top: 10px;
}

.rz-child-dynamics .chart-line {
  stroke: #A24A3F;
  stroke-width: 2.2;
}

.rz-child-dynamics .chart-area {
  fill: rgba(220, 161, 141, 0.14);
}

.rz-child-dynamics .chart-dot {
  fill: #A24A3F;
}

.rz-core-more .more-hero {
  padding: 14px;
}

.rz-core-more .child-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.rz-core-more .child-fact {
  padding: 9px;
  border: 1px solid rgba(232, 215, 204, 0.78);
  border-radius: 14px;
  background: rgba(247, 236, 229, 0.84);
}

.rz-core-more #moreList {
  display: grid;
  gap: 12px;
}

.rz-core-more #moreList > .book-page-card {
  padding: 12px;
}

.rz-core-more .more-item.with-icon {
  position: relative;
  grid-template-columns: 40px minmax(0, 1fr) 14px;
}

.rz-core-more .more-item.with-icon .book-list-icon {
  grid-row: 1 / 3;
}

.rz-core-more .more-item.with-icon .list-title,
.rz-core-more .more-item.with-icon .list-meta {
  grid-column: 2;
}

.rz-core-more .more-item.with-icon::after {
  content: "›";
  grid-column: 3;
  grid-row: 1 / 3;
  justify-self: end;
  align-self: center;
  color: #A24A3F;
  font-size: 20px;
  line-height: 1;
}

.rz-core-more .more-item.with-icon .book-list-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 13px;
  background: rgba(220, 161, 141, 0.12);
  color: #A24A3F;
}

#actionModal.rz-core-modal {
  --rz-core-card: #FFFFFF;
  --rz-core-line: #F3E6E1;
  --rz-core-heading: #8C3A36;
  --rz-core-text: #4A3E3D;
  --rz-core-muted: #8A7E7D;
  align-items: flex-end;
  padding: 14px;
}

#actionModal.rz-core-modal .modal {
  width: min(100%, 390px);
  max-height: calc(100dvh - 28px);
  padding: 18px;
  overflow-y: auto;
  border: 1px solid #E8D7CC;
  border-radius: 24px 24px 28px 28px;
  background: radial-gradient(circle at 92% 10%, rgba(220, 161, 141, 0.12), transparent 24%), linear-gradient(180deg, #FFFDFB 0%, #FFF8F1 100%);
  box-shadow: 0 18px 48px rgba(90, 74, 66, 0.18);
}

#actionModal.rz-core-modal .modal h3 {
  margin: 0 0 5px;
  color: #8B3E38;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(22px, 6vw, 30px);
  line-height: 1.08;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

#actionModal.rz-core-modal .modal > .result {
  margin: 0 0 14px;
  color: #8B7A70;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-style: normal;
  line-height: 1.35;
}

#actionModal.rz-core-modal #modalFields {
  display: grid;
  gap: 12px;
}

#actionModal.rz-core-modal[data-core-modal="child-form"] #modalFields::before {
  content: "";
  justify-self: center;
  width: 82px;
  height: 82px;
  border: 1px solid #E8D7CC;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 34%, rgba(162, 74, 63, 0.12), transparent 28%), linear-gradient(180deg, #FFF6EF, #F2E2D7);
  box-shadow: inset 0 0 0 12px rgba(255, 248, 241, 0.72);
}

#actionModal.rz-core-modal .field {
  display: grid;
  gap: 6px;
}

#actionModal.rz-core-modal .field label {
  color: #5A4A42;
  font-size: 12px;
  font-weight: 700;
}

#actionModal.rz-core-modal input,
#actionModal.rz-core-modal select,
#actionModal.rz-core-modal textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #E8D7CC;
  border-radius: 12px;
  outline: none;
  background: rgba(255, 252, 248, 0.92);
  color: #5A4A42;
  font: 500 14px/1.25 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#actionModal.rz-core-modal textarea {
  min-height: 86px;
  resize: vertical;
}

#actionModal.rz-core-modal .list-item,
#actionModal.rz-core-modal .pdf-ready,
#actionModal.rz-core-modal .help-section,
#actionModal.rz-core-modal .book-page-card,
#actionModal.rz-core-modal .rz-card {
  border: 1px solid #E8D7CC;
  border-radius: 18px;
  background: rgba(255, 252, 248, 0.94);
  box-shadow: 0 10px 28px rgba(162, 74, 63, 0.06);
}

#actionModal.rz-core-modal .list-item {
  display: grid;
  gap: 5px;
  padding: 12px;
}

#actionModal.rz-core-modal .setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  border-bottom: 1px solid rgba(232, 215, 204, 0.72);
}

#actionModal.rz-core-modal .setting-row:last-child {
  border-bottom: 0;
}

#actionModal.rz-core-modal .choice-row,
#actionModal.rz-core-modal .rz-sleep-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

#actionModal.rz-core-modal .rz-sleep-choice {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 104px;
  border: 1px solid #E8D7CC;
  border-radius: 18px;
  background: #FFF8F1;
  color: #8B3E38;
  font-weight: 700;
}

#actionModal.rz-core-modal .modal-warning {
  border: 1px solid rgba(162, 74, 63, 0.16);
  border-radius: 14px;
  background: rgba(247, 236, 229, 0.82);
  color: #8B3E38;
  font-size: 12px;
  line-height: 1.35;
}

#actionModal.rz-core-modal .modal-actions {
  position: sticky;
  bottom: -18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 8px -18px -18px;
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255, 248, 241, 0), #FFF8F1 18%);
}

#actionModal.rz-core-modal .modal-actions.single {
  grid-template-columns: 1fr;
}

#actionModal.rz-core-modal .action {
  border-radius: 12px;
}

#actionModal.rz-core-modal .action.danger {
  border-color: rgba(162, 74, 63, 0.22);
  background: #A9433D;
  color: #FFF8F1;
}

.rz-core-child .rz-icon-bubble[data-rz-icon="growth"],
.rz-child-health .rz-icon-bubble[data-rz-icon="growth"],
#actionModal.rz-core-modal .rz-icon-bubble[data-rz-icon="growth"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 20h14M7 17c4-8 6-8 10 0M8 13h8M10 9h4M12 5v15'/%3E%3C/svg%3E");
}

.rz-core-child .rz-icon-bubble[data-rz-icon="vaccine"],
.rz-child-health .rz-icon-bubble[data-rz-icon="vaccine"],
#actionModal.rz-core-modal .rz-icon-bubble[data-rz-icon="vaccine"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 19 9-9M13 5l6 6M11 7l6 6M8 16l3 3M16 4l4 4M4 20l3-1'/%3E%3C/svg%3E");
}

.rz-core-child .rz-icon-bubble[data-rz-icon="medicalCard"],
.rz-core-more .rz-icon-bubble[data-rz-icon="medicalCard"],
.rz-child-health .rz-icon-bubble[data-rz-icon="medicalCard"],
#actionModal.rz-core-modal .rz-icon-bubble[data-rz-icon="medicalCard"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h8l3 3v15H7z'/%3E%3Cpath d='M15 3v4h4M10 12h5M12.5 9v6M10 18h6'/%3E%3C/svg%3E");
}

.rz-core-child .rz-icon-bubble[data-rz-icon="tooth"],
.rz-child-health .rz-icon-bubble[data-rz-icon="tooth"],
#actionModal.rz-core-modal .rz-icon-bubble[data-rz-icon="tooth"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 4c1.5 0 2.5 1 4 1s2.5-1 4-1c2.2 0 3.5 1.8 3.5 4.4 0 4.2-2 11.6-4.2 11.6-1.1 0-1.1-4.2-3.3-4.2S9.8 20 8.7 20C6.5 20 4.5 12.6 4.5 8.4 4.5 5.8 5.8 4 8 4z'/%3E%3C/svg%3E");
}

@media (max-width: 390px) {
  .rz-core-today .rz-diary-card,
  .rz-core-child .rz-profile-card,
  .rz-core-more .more-hero,
  .rz-child-health .book-page-card,
  .rz-child-health .rz-health-menu,
  .rz-child-dynamics .book-page-card,
  #actionModal.rz-core-modal .modal {
    border-radius: 20px;
  }

  .rz-core-child .rz-profile-top {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .rz-core-child .rz-profile-top .rz-age-pill {
    grid-column: 2;
    justify-self: start;
  }

  .rz-core-more .child-facts {
    grid-template-columns: 1fr;
  }
}

/* Today now uses the canonical app topbar (like Home/More); legacy header removed. */

.today-reference-screen {
  --today-card: #FFFFFF;
  --today-line: #F3E6E1;
  --today-heading: #8C3A36;
  --today-text: #4A3E3D;
  --today-muted: #8A7E7D;
  --today-accent: #A24A3F;
  --today-soft: #FDF1EB;
  --today-shadow: 0 8px 22px rgba(140, 58, 54, 0.045);
}

.today-reference-screen .today-reference-page {
  gap: 12px;
  padding: 22px 18px calc(94px + env(safe-area-inset-bottom));
}

.today-reference-screen .today-header-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 12px 14px;
  border: 1px solid rgba(232, 215, 204, 0.84);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 253, 251, 0.98), rgba(255, 248, 241, 0.94));
  box-shadow: var(--today-shadow);
}

.today-reference-screen .today-header-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.today-reference-screen .today-header-title {
  margin: 0;
  color: var(--today-heading);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.today-reference-screen .today-header-date {
  margin: 0;
  color: var(--today-muted);
  font: 500 11px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  word-break: normal;
  overflow-wrap: normal;
}

.today-reference-screen .today-refresh-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--today-soft);
  color: var(--today-accent);
  box-shadow: none;
}

.today-reference-screen .today-refresh-button .rz-icon-bubble {
  width: 18px;
  height: 18px;
  border: 0;
  background: transparent;
  color: inherit;
}

.today-reference-screen .today-refresh-button .rz-icon-bubble::before {
  width: 17px;
  height: 17px;
}

.today-reference-screen .rz-icon-bubble[data-rz-icon="refresh"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8 8 0 0 0-14.7-4.4M4 5v5h5'/%3E%3Cpath d='M4 13a8 8 0 0 0 14.7 4.4M20 19v-5h-5'/%3E%3C/svg%3E");
}

.today-reference-screen .rz-icon-bubble[data-rz-icon="medication"]::before,
#actionModal.today-entry-modal .rz-icon-bubble[data-rz-icon="medication"]::before,
#actionModal.today-form-modal .rz-icon-bubble[data-rz-icon="medication"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3h6l1 4v12a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2V7l1-4z'/%3E%3Cpath d='M8 8h8M10 13h4M12 11v4'/%3E%3C/svg%3E");
}

.today-reference-screen .rz-icon-bubble[data-rz-icon="moodHappy"]::before,
#actionModal.today-entry-modal .rz-icon-bubble[data-rz-icon="moodHappy"]::before,
#actionModal.today-form-modal .rz-icon-bubble[data-rz-icon="moodHappy"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M9 10h.01M15 10h.01M8.5 14.5c1.7 2 5.3 2 7 0'/%3E%3C/svg%3E");
}

.today-reference-screen .rz-icon-bubble[data-rz-icon="skill"]::before,
#actionModal.today-entry-modal .rz-icon-bubble[data-rz-icon="skill"]::before,
#actionModal.today-form-modal .rz-icon-bubble[data-rz-icon="skill"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4l2.1 4.3 4.7.7-3.4 3.3.8 4.7-4.2-2.2L7.8 17l.8-4.7L5.2 9l4.7-.7z'/%3E%3Cpath d='M12 15v5'/%3E%3C/svg%3E");
}

.today-reference-screen .rz-icon-bubble[data-rz-icon="task"]::before,
#actionModal.today-entry-modal .rz-icon-bubble[data-rz-icon="task"]::before,
#actionModal.today-form-modal .rz-icon-bubble[data-rz-icon="task"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='16' rx='3'/%3E%3Cpath d='M9 9h6M9 13h6M9 17h4M7.5 9l.8.8 1.4-1.6'/%3E%3C/svg%3E");
}

.today-reference-screen .rz-icon-bubble[data-rz-icon="plus"]::before,
#actionModal.today-entry-modal .rz-icon-bubble[data-rz-icon="plus"]::before,
#actionModal.today-form-modal .rz-icon-bubble[data-rz-icon="plus"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.85' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
}

.today-reference-screen .today-diary-card {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.today-reference-screen .today-count,
.today-reference-screen #timelineFilters {
  display: none;
}

.today-reference-screen .today-event-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(232, 215, 204, 0.76);
  border-radius: 18px;
  background: rgba(255, 252, 248, 0.94);
  box-shadow: var(--today-shadow);
}

.today-reference-screen .timeline::before,
.today-reference-screen .timeline::after,
.today-reference-screen .today-event-list::before,
.today-reference-screen .today-event-list::after,
.today-reference-screen .today-event-row::before,
.today-reference-screen .today-event-row::after {
  display: none;
  content: none;
}

.today-reference-screen .today-event-list.is-empty {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.today-reference-screen .today-event-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(232, 215, 204, 0.62);
  cursor: pointer;
}

.today-reference-screen .today-event-row:last-child {
  border-bottom: 0;
}

.today-reference-screen .today-event-icon,
.today-reference-screen .today-empty-icon,
.today-reference-screen .today-add-icon {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  background: var(--today-soft);
  color: var(--today-accent);
}

.today-reference-screen .today-event-icon::before,
.today-reference-screen .today-empty-icon::before,
.today-reference-screen .today-add-icon::before {
  width: 16px;
  height: 16px;
}

.today-reference-screen .today-event-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.today-reference-screen .today-event-title {
  color: var(--today-text);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.18;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.today-reference-screen .today-event-note {
  color: var(--today-muted);
  font-size: 10.7px;
  font-weight: 500;
  line-height: 1.2;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.today-reference-screen .today-event-time {
  justify-self: end;
  align-self: center;
  color: var(--today-muted);
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.today-reference-screen .today-empty-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 62px;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid rgba(232, 215, 204, 0.76);
  border-radius: 18px;
  background: rgba(255, 252, 248, 0.94);
  box-shadow: var(--today-shadow);
  color: var(--today-muted);
  font: 500 11.5px/1.32 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.today-reference-screen .today-add-section {
  display: grid;
  margin-top: 0;
}

.today-reference-screen .today-add-button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid rgba(232, 215, 204, 0.78);
  border-radius: 18px;
  background: rgba(255, 238, 231, 0.78);
  color: var(--today-text);
  box-shadow: none;
  text-align: left;
}

.today-reference-screen .today-add-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.today-reference-screen .today-add-title {
  color: var(--today-heading);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.16;
}

.today-reference-screen .today-add-subtitle {
  color: var(--today-muted);
  font-size: 10.7px;
  font-weight: 500;
  line-height: 1.2;
}

#actionModal.today-entry-modal,
#actionModal.today-form-modal {
  align-items: flex-end;
  padding: 12px;
}

#actionModal.today-entry-modal *,
#actionModal.today-form-modal * {
  box-sizing: border-box;
}

#actionModal.today-entry-modal .modal,
#actionModal.today-form-modal .modal {
  position: relative;
  width: min(100%, 390px);
  max-height: calc(100dvh - 24px);
  padding: 18px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid #E8D7CC;
  border-radius: 24px 24px 28px 28px;
  background: linear-gradient(180deg, #FFFDFB 0%, #FFF8F1 100%);
  box-shadow: 0 18px 48px rgba(90, 74, 66, 0.18);
}

#actionModal.today-form-modal .modal::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  min-height: 62px;
  height: auto;
  bottom: auto;
  border: 1px solid rgba(232, 215, 204, 0.84);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 253, 251, 0.98), rgba(255, 248, 241, 0.94));
  box-shadow: 0 8px 24px rgba(162, 74, 63, 0.06);
  pointer-events: none;
}

#actionModal.today-form-modal .today-modal-back {
  position: absolute;
  z-index: 2;
  top: 32px;
  left: 32px;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  padding: 0;
  border: 1px solid rgba(232, 215, 204, 0.86);
  border-radius: 999px;
  background: rgba(255, 248, 241, 0.92);
  color: #A24A3F;
  box-shadow: none;
  font: 400 23px/1 Georgia, "Times New Roman", serif;
}

#actionModal:not(.today-entry-modal):not(.today-form-modal) .today-modal-back {
  display: none;
}

#actionModal.today-form-modal .modal h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 3px 58px;
  padding-top: 10px;
  color: #8B3E38;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.04;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

#actionModal.today-form-modal .modal > .result {
  position: relative;
  z-index: 1;
  margin: 0 0 24px 58px;
  color: #8B7A70;
  font: 500 11.4px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#actionModal.today-form-modal #modalFields {
  display: grid;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

#actionModal.today-entry-modal .today-entry-list {
  display: grid;
  gap: 8px;
}

#actionModal.today-entry-modal .today-entry-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid #E8D7CC;
  border-radius: 17px;
  background: rgba(255, 252, 248, 0.94);
  color: #5A4A42;
  text-align: left;
}

#actionModal.today-entry-modal .today-entry-icon {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  background: rgba(220, 161, 141, 0.14);
  color: #A24A3F;
}

#actionModal.today-entry-modal .today-entry-icon::before {
  width: 16px;
  height: 16px;
}

#actionModal.today-entry-modal .today-entry-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

#actionModal.today-entry-modal .today-entry-title {
  color: #5A4A42;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.18;
}

#actionModal.today-entry-modal .today-entry-subtitle {
  color: #8B7A70;
  font-size: 10.7px;
  font-weight: 500;
  line-height: 1.2;
}

#actionModal.today-entry-modal .modal-actions {
  display: none;
}

#actionModal.today-form-modal .today-modal-field {
  display: grid;
  gap: 6px;
  width: 100%;
  min-width: 0;
  padding: 0;
  color: #5A4A42;
  font-size: 11.5px;
  font-weight: 700;
}

#actionModal.today-form-modal .today-modal-field[hidden] {
  display: none;
}

#actionModal.today-form-modal .today-modal-field > span {
  display: block;
  padding-left: 1px;
  line-height: 1.2;
}

#actionModal.today-form-modal input,
#actionModal.today-form-modal select,
#actionModal.today-form-modal textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #E8D7CC;
  border-radius: 13px;
  outline: none;
  background: rgba(255, 252, 248, 0.96);
  color: #5A4A42;
  font: 500 14px/1.24 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

#actionModal.today-form-modal textarea {
  min-height: 78px;
  resize: vertical;
}

#actionModal.today-form-modal .today-date-control {
  position: relative;
  display: block;
  width: 100%;
}

#actionModal.today-form-modal .today-date-control input {
  padding-right: 42px;
  -webkit-appearance: none;
  appearance: none;
}

#actionModal.today-form-modal .today-date-control input::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0 8px 0 auto;
  width: 34px;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

#actionModal.today-form-modal .today-date-icon {
  position: absolute;
  top: 50%;
  right: 11px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #A24A3F;
  pointer-events: none;
}

#actionModal.today-form-modal .today-date-icon::before {
  width: 16px;
  height: 16px;
}

#actionModal.today-form-modal .today-date-icon[data-rz-icon="calendar"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='5' width='14' height='15' rx='3'/%3E%3Cpath d='M8 3v4M16 3v4M5 10h14M8 14h3M8 17h5'/%3E%3C/svg%3E");
}

#actionModal.today-form-modal .today-choice-grid {
  display: grid;
  gap: 0;
  width: 100%;
  padding: 3px;
  border: 1px solid #E8D7CC;
  border-radius: 15px;
  overflow: hidden;
  background: rgba(255, 252, 248, 0.96);
}

#actionModal.today-form-modal .today-choice-cols-1 {
  grid-template-columns: 1fr;
}

#actionModal.today-form-modal .today-choice-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#actionModal.today-form-modal .today-choice-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#actionModal.today-form-modal .today-choice-button {
  min-width: 0;
  min-height: 38px;
  padding: 8px 9px;
  border: 0;
  border-right: 1px solid rgba(232, 215, 204, 0.9);
  border-bottom: 1px solid rgba(232, 215, 204, 0.9);
  border-radius: 0;
  background: rgba(255, 252, 248, 0.96);
  color: #5A4A42;
  font: 700 12px/1.18 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: center;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

#actionModal.today-form-modal .today-choice-button:first-child {
  border-top-left-radius: 11px;
}

#actionModal.today-form-modal .today-choice-cols-2 .today-choice-button:nth-child(2),
#actionModal.today-form-modal .today-choice-cols-3 .today-choice-button:nth-child(3) {
  border-top-right-radius: 11px;
}

#actionModal.today-form-modal .today-choice-cols-2 .today-choice-button:nth-child(2n),
#actionModal.today-form-modal .today-choice-cols-3 .today-choice-button:nth-child(3n) {
  border-right: 0;
}

#actionModal.today-form-modal .today-choice-cols-2 .today-choice-button:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  border-right: 0;
  border-bottom-left-radius: 11px;
  border-bottom-right-radius: 11px;
}

#actionModal.today-form-modal .today-choice-cols-2 .today-choice-button:nth-last-child(2):nth-child(odd),
#actionModal.today-form-modal .today-choice-cols-3 .today-choice-button:nth-last-child(3) {
  border-bottom: 0;
  border-bottom-left-radius: 11px;
}

#actionModal.today-form-modal .today-choice-cols-2 .today-choice-button:last-child:nth-child(even),
#actionModal.today-form-modal .today-choice-cols-3 .today-choice-button:last-child {
  border-bottom: 0;
  border-bottom-right-radius: 11px;
}

#actionModal.today-form-modal .today-choice-cols-2 .today-choice-button:last-child:nth-child(odd),
#actionModal.today-form-modal .today-choice-cols-3 .today-choice-button:nth-last-child(-n + 3) {
  border-bottom: 0;
}

#actionModal.today-form-modal .today-choice-cols-1 .today-choice-button,
#actionModal.today-form-modal .today-choice-cols-1 .today-choice-button:first-child,
#actionModal.today-form-modal .today-choice-cols-1 .today-choice-button:last-child {
  border-radius: 11px;
}

#actionModal.today-form-modal .today-choice-button.active {
  background: rgba(220, 161, 141, 0.32);
  color: #8B3E38;
  box-shadow: inset 0 0 0 1px rgba(162, 74, 63, 0.12);
}

#actionModal.today-form-modal .rz-feeding-side {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 3px;
  border: 1px solid #E8D7CC;
  border-radius: 15px;
  overflow: hidden;
  background: rgba(232, 215, 204, 0.8);
}

#actionModal.today-form-modal .rz-choice-pill {
  min-height: 38px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 252, 248, 0.96);
  color: #5A4A42;
  font-size: 13px;
  font-weight: 700;
}

#actionModal.today-form-modal .rz-choice-pill:first-child {
  border-radius: 11px 0 0 11px;
}

#actionModal.today-form-modal .rz-choice-pill:last-child {
  border-radius: 0 11px 11px 0;
}

#actionModal.today-form-modal .rz-choice-pill.active {
  background: rgba(220, 161, 141, 0.32);
  color: #8B3E38;
  box-shadow: inset 0 0 0 1px rgba(162, 74, 63, 0.12);
}

#actionModal.today-form-modal .today-field-hint {
  margin: 5px 2px 0;
  color: #8B7A70;
  font: 500 10.5px/1.25 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#actionModal.today-form-modal .modal-actions {
  position: sticky;
  bottom: -18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px -18px -18px;
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255, 248, 241, 0), #FFF8F1 18%);
}

#actionModal.today-form-modal .action {
  min-height: 44px;
  border-radius: 13px;
}

#actionModal.today-form-modal .action:not(.secondary):not(.danger) {
  background: linear-gradient(180deg, #B84E45, #A9433D);
  color: #FFF8F1;
  box-shadow: 0 10px 20px rgba(162, 74, 63, 0.14);
}

@media (max-width: 390px) {
  .today-reference-screen .today-reference-page {
    padding-inline: 16px;
    gap: 11px;
  }

  #actionModal.today-entry-modal .modal,
  #actionModal.today-form-modal .modal {
    border-radius: 22px 22px 26px 26px;
    padding: 16px;
  }

}

/* CHILD REFERENCE V1 */
.rz-core-child {
  --child-card: #FFFFFF;
  --child-line: #F3E6E1;
  --child-heading: #8C3A36;
  --child-text: #4A3E3D;
  --child-muted: #8A7E7D;
  --child-accent: #DCA18D;
}

.rz-core-child .rz-child-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px calc(94px + env(safe-area-inset-bottom));
}

.rz-core-child .rz-child-titlebar {
  order: 1;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.rz-core-child .rz-child-title-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.rz-core-child .rz-child-title {
  color: var(--child-heading);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0;
}

.rz-core-child .rz-child-subtitle {
  color: var(--child-muted);
  font: 500 10.6px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rz-core-child .rz-child-nav-button,
.rz-core-child .rz-child-bookmark-button {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #FFF3ED;
  color: #A24A3F;
  box-shadow: none;
}

.rz-core-child .rz-child-nav-button {
  padding-bottom: 2px;
  font: 400 22px/1 Georgia, "Times New Roman", serif;
}

.rz-core-child .rz-child-bookmark-button::before {
  content: "";
  width: 15px;
  height: 15px;
  display: block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 5.5A2.5 2.5 0 0 1 9.5 3h5A2.5 2.5 0 0 1 17 5.5V21l-5-3-5 3z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 5.5A2.5 2.5 0 0 1 9.5 3h5A2.5 2.5 0 0 1 17 5.5V21l-5-3-5 3z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.rz-core-child .rz-profile-card {
  order: 2;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.rz-core-child .rz-profile-top {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.rz-core-child .rz-profile-top > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.rz-core-child .rz-profile-top .rz-subtitle,
.rz-core-child .rz-profile-card .result,
.rz-core-child .rz-age-pill {
  display: none !important;
}

.rz-core-child .rz-avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  border: 1px solid #E8D7CC;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 232, 219, 0.95) 0 20%, transparent 21%),
    radial-gradient(circle at 42% 43%, rgba(139, 62, 56, 0.22) 0 2px, transparent 2.5px),
    radial-gradient(circle at 58% 43%, rgba(139, 62, 56, 0.22) 0 2px, transparent 2.5px),
    radial-gradient(circle at 50% 56%, rgba(220, 161, 141, 0.36) 0 6px, transparent 6.5px),
    linear-gradient(180deg, #FFF6EF, #F3E6DA);
  box-shadow: 0 8px 20px rgba(162, 74, 63, 0.08);
}

.rz-core-child #profileChildName {
  margin: 0;
  color: var(--child-heading);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.08;
}

.rz-core-child .age-secondary,
.rz-core-child .rz-child-birth {
  color: var(--child-muted);
  font: 500 10.8px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rz-core-child .rz-child-birth:empty {
  display: none;
}

.rz-core-child .rz-child-profile-menu {
  display: none;
}

.rz-core-child .child-segments {
  order: 3;
  margin: 2px 0 4px;
  min-height: 34px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 243, 237, 0.78);
  border-color: rgba(232, 215, 204, 0.7);
  box-shadow: none;
}

.rz-core-child[data-child-view="health"] .child-segments {
  display: none;
}

.rz-core-child .segment-button {
  min-height: 28px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
}

.rz-core-child .child-section {
  order: 4;
}

.rz-core-child:not([data-child-view="health"]) .rz-profile-card {
  display: none;
}

.rz-core-child .rz-child-health .rz-core-section-header {
  display: none;
}

.rz-core-child .rz-child-health .rz-health-menu {
  padding: 7px 12px;
  border-radius: 18px;
  border: 1px solid rgba(232, 215, 204, 0.78);
  background: rgba(255, 252, 248, 0.94);
  box-shadow: 0 10px 28px rgba(162, 74, 63, 0.055);
}

.rz-core-child .rz-child-health .rz-core-row {
  min-height: 48px;
  grid-template-columns: 32px minmax(0, 1fr) 12px;
  gap: 9px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(232, 215, 204, 0.62);
}

.rz-core-child .rz-child-health .rz-core-row .rz-icon-bubble {
  width: 29px;
  height: 29px;
  border-radius: 10px;
  background: rgba(220, 161, 141, 0.12);
  color: #A24A3F;
}

.rz-core-child .rz-child-health .rz-core-row .rz-icon-bubble::before {
  width: 16px;
  height: 16px;
}

.rz-core-child .rz-child-health .rz-topic-title {
  color: var(--child-text);
  font-size: 12.2px;
  font-weight: 800;
  line-height: 1.12;
}

.rz-core-child .rz-child-health .rz-topic-text {
  margin-top: 2px;
  color: var(--child-muted);
  font-size: 10.4px;
  line-height: 1.16;
  font-weight: 500;
  max-height: 2.4em;
  overflow: hidden;
}

.rz-core-child .rz-child-health .rz-chevron {
  color: #A24A3F;
  font-size: 16px;
  line-height: 1;
}

.rz-core-child .rz-child-health > .book-page-card,
.rz-core-child .rz-child-health > .card {
  display: none;
}

#actionModal.rz-core-modal[data-core-modal="child-form"] .modal {
  width: min(100%, 360px);
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, #FFFDFB 0%, #FFF8F1 100%);
}

#actionModal.rz-core-modal[data-core-modal="child-form"] .modal h3 {
  margin-bottom: 16px;
  font-size: 18px;
  line-height: 1.08;
}

#actionModal.rz-core-modal[data-core-modal="child-form"] .modal > .result {
  display: none;
}

#actionModal.rz-core-modal[data-core-modal="child-form"] #modalFields {
  gap: 12px;
}

#actionModal.rz-core-modal[data-core-modal="child-form"] #modalFields::before {
  content: none;
}

#actionModal.rz-core-modal[data-core-modal="child-form"] .rz-child-photo-upload {
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--child-muted);
  font: 500 11px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}

#actionModal.rz-core-modal[data-core-modal="child-form"] .rz-child-photo-circle {
  width: 82px;
  height: 82px;
  border: 1px solid #E8D7CC;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 42%, rgba(220, 161, 141, 0.14) 0 22%, transparent 23%),
    linear-gradient(180deg, #FFF6EF, #F3E6DA);
  position: relative;
}

#actionModal.rz-core-modal[data-core-modal="child-form"] .rz-child-photo-circle::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 22px;
  height: 22px;
  background: #A24A3F;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 8l1.5-2h5L16 8h2a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3v-6a3 3 0 0 1 3-3z'/%3E%3Ccircle cx='12' cy='14' r='3.2'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 8l1.5-2h5L16 8h2a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3v-6a3 3 0 0 1 3-3z'/%3E%3Ccircle cx='12' cy='14' r='3.2'/%3E%3C/svg%3E") center/contain no-repeat;
}

#actionModal.rz-core-modal[data-core-modal="child-form"] .field {
  gap: 6px;
}

#actionModal.rz-core-modal[data-core-modal="child-form"] .field label {
  color: var(--child-text);
  font-size: 11.4px;
  font-weight: 700;
}

#actionModal.rz-core-modal[data-core-modal="child-form"] input {
  min-height: 40px;
  border-radius: 10px;
  font-size: 12.2px;
}

#actionModal.rz-core-modal[data-core-modal="child-form"] .rz-core-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#actionModal.rz-core-modal[data-core-modal="child-form"] .rz-core-choice {
  min-height: 40px;
  border: 1px solid #E8D7CC;
  border-radius: 11px;
  background: rgba(255, 252, 248, 0.95);
  color: var(--child-text);
  font: 700 12px/1.15 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#actionModal.rz-core-modal[data-core-modal="child-form"] .rz-core-choice.active {
  background: rgba(220, 161, 141, 0.26);
  color: #8B3E38;
  box-shadow: inset 0 0 0 1px rgba(162, 74, 63, 0.12);
}

#actionModal.rz-core-modal[data-core-modal="child-form"] .modal-actions {
  margin-top: 18px;
}

@media (max-width: 390px) {
  .rz-core-child .rz-child-page {
    padding-inline: 18px;
  }
  .rz-core-child .rz-child-health .rz-topic-text {
    font-size: 10.2px;
  }
}

/* CHILD WINDOW REFERENCE V2 */
.rz-core-child {
  --child-shadow-soft: 0 8px 22px rgba(140, 58, 54, 0.045);
}

.rz-core-child .rz-child-page {
  gap: 12px;
  padding: 18px 20px calc(96px + env(safe-area-inset-bottom));
}

.rz-core-child .rz-child-titlebar {
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  min-height: 38px;
  padding: 0 2px;
}

.rz-core-child .rz-child-back-button,
.rz-core-child .rz-child-add-button,
.rz-core-child .rz-child-refresh-button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #FFF3ED;
  color: #A24A3F;
  box-shadow: none;
}

.rz-core-child .rz-child-back-button {
  font: 400 22px/1 Georgia, "Times New Roman", serif;
  padding-bottom: 2px;
}

.rz-core-child .rz-child-back-button[hidden] {
  visibility: hidden;
  display: grid !important;
}

.rz-core-child .rz-child-add-button {
  font: 600 18px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rz-core-child .rz-child-title {
  font-size: 17px;
}

.rz-core-child .rz-child-subtitle:empty {
  display: none;
}

.rz-core-child .rz-profile-card {
  order: 2;
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(232, 215, 204, 0.76);
  border-radius: 18px;
  background: rgba(255, 252, 248, 0.94);
  box-shadow: var(--child-shadow-soft);
  text-align: left;
  color: inherit;
}

.rz-core-child .rz-profile-top {
  grid-template-columns: 54px minmax(0, 1fr) 12px;
  gap: 10px;
}

.rz-core-child .rz-profile-top .rz-chevron {
  color: #A24A3F;
  font-size: 17px;
  justify-self: end;
}

.rz-core-child .rz-avatar {
  border-radius: 18px;
}

.rz-core-child #profileChildName {
  font-size: 15.5px;
}

.rz-core-child .age-secondary,
.rz-core-child .rz-child-birth {
  font-size: 10.6px;
}

.rz-core-child .child-segments {
  order: 3;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  min-height: 32px;
  padding: 2px;
  border: 1px solid rgba(232, 215, 204, 0.72);
  border-radius: 10px;
  background: rgba(255, 252, 248, 0.92);
}

.rz-core-child[data-child-view="main"] .child-segments,
.rz-core-child[data-child-view="health"] .child-segments {
  display: grid !important;
}

.rz-core-child .segment-button {
  min-height: 28px;
  border-radius: 8px;
  font-size: 10.4px;
  font-weight: 650;
  color: var(--child-text);
}

.rz-core-child .segment-button.active {
  background: rgba(220, 161, 141, 0.32);
  color: #A24A3F;
}

.rz-core-child .child-section {
  order: 4;
}

.rz-core-child:not([data-child-view="main"]) .rz-child-main,
.rz-core-child[data-child-view="main"] .rz-child-health,
.rz-core-child[data-child-view="main"] .rz-child-development,
.rz-core-child[data-child-view="main"] .rz-child-dynamics {
  display: none !important;
}

.rz-core-child:not([data-child-view="main"]) .rz-profile-card {
  display: block;
}

.rz-core-child .rz-child-main {
  display: grid;
  gap: 12px;
}

.rz-core-child .rz-child-today-card,
.rz-core-child .rz-child-add-entry {
  border: 1px solid rgba(232, 215, 204, 0.76);
  border-radius: 18px;
  background: rgba(255, 252, 248, 0.94);
  box-shadow: var(--child-shadow-soft);
}

.rz-core-child .rz-child-today-card {
  padding: 12px 0 0;
  overflow: hidden;
}

.rz-core-child .rz-child-today-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: start;
  gap: 8px;
  padding: 0 12px 8px;
}

.rz-core-child .rz-child-today-head strong {
  display: block;
  color: var(--child-heading);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15.8px;
  line-height: 1.1;
  font-weight: 800;
}

.rz-core-child .rz-child-today-head small {
  display: block;
  margin-top: 2px;
  color: var(--child-muted);
  font: 500 10.4px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rz-core-child .rz-child-refresh-button::before {
  content: "";
  width: 15px;
  height: 15px;
  display: block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8 8 0 0 0-14.7-4.4M4 5v5h5'/%3E%3Cpath d='M4 13a8 8 0 0 0 14.7 4.4M20 19v-5h-5'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8 8 0 0 0-14.7-4.4M4 5v5h5'/%3E%3Cpath d='M4 13a8 8 0 0 0 14.7 4.4M20 19v-5h-5'/%3E%3C/svg%3E") center/contain no-repeat;
}

.rz-core-child .rz-child-event-list {
  display: grid;
}

.rz-core-child .rz-child-event-row,
.rz-core-child .rz-child-empty-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 8px 12px;
  border-top: 1px solid rgba(232, 215, 204, 0.62);
}

.rz-core-child .rz-child-empty-row {
  grid-template-columns: 30px minmax(0, 1fr);
  color: var(--child-muted);
  font: 500 11px/1.35 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rz-core-child .rz-child-row-icon {
  width: 29px;
  height: 29px;
  border-radius: 10px;
  background: rgba(220, 161, 141, 0.12);
  color: #A24A3F;
}

.rz-core-child .rz-child-row-icon::before {
  width: 16px;
  height: 16px;
}

.rz-core-child .rz-icon-bubble[data-rz-icon="plus"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.85' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
}

.rz-core-child .rz-child-event-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.rz-core-child .rz-child-event-title {
  color: var(--child-text);
  font-size: 12.3px;
  line-height: 1.12;
  font-weight: 800;
}

.rz-core-child .rz-child-event-note {
  color: var(--child-muted);
  font-size: 10.4px;
  line-height: 1.16;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rz-core-child .rz-child-event-time {
  color: var(--child-muted);
  font: 500 10.2px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rz-core-child .rz-child-add-entry {
  width: 100%;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 9px 12px;
  color: inherit;
  text-align: left;
}

.rz-core-child .rz-child-add-entry strong {
  display: block;
  color: #A24A3F;
  font-size: 12.5px;
  line-height: 1.15;
  font-weight: 800;
}

.rz-core-child .rz-child-add-entry small {
  display: block;
  margin-top: 2px;
  color: var(--child-muted);
  font-size: 10.3px;
  line-height: 1.16;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rz-core-child .rz-child-add-entry .rz-chevron {
  color: #A24A3F;
  font-size: 16px;
}

.rz-core-child .rz-child-health .rz-health-menu {
  padding: 0;
  overflow: hidden;
}

.rz-core-child .rz-child-health .rz-core-row {
  padding: 8px 12px;
}

.rz-core-child .rz-development-reference,
.rz-core-child .rz-child-dynamics > .book-page-card,
.rz-core-child .rz-child-dynamics .weekly-card {
  border: 1px solid rgba(232, 215, 204, 0.76);
  border-radius: 18px;
  background: rgba(255, 252, 248, 0.94);
  box-shadow: var(--child-shadow-soft);
}

.rz-core-child .rz-child-dynamics .section-head {
  margin: 6px 0 -4px;
}

.rz-core-child .rz-child-dynamics .section-head h2 {
  color: var(--child-heading);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.1;
}

@media (max-width: 390px) {
  .rz-core-child .rz-child-page {
    padding-inline: 18px;
  }
  .rz-core-child .rz-child-event-note,
  .rz-core-child .rz-child-add-entry small {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

.rz-core-child[data-child-view="main"] .rz-profile-card {
  display: block !important;
}

.rz-core-child[data-child-view="main"] .rz-child-back-button {
  visibility: hidden;
}

/* CHILD PROFILE MASTER V1 */
.rz-core-child[data-child-view="main"] > .rz-child-page > .child-segments:not(.rz-child-main-tabs) { display: none !important; }
.rz-core-child:not([data-child-view="main"]) .rz-child-main-tabs { display: none !important; }
.rz-core-child:not([data-child-view="main"]) .rz-child-add-button { visibility: hidden; pointer-events: none; }
.rz-core-child .rz-child-main { gap: 11px; }
.rz-core-child .rz-child-master-list,
.rz-core-child .rz-child-insight-list,
.rz-core-child .rz-child-sub-list {
  display: grid;
  padding: 7px 12px;
  border: 1px solid rgba(232, 215, 204, 0.76);
  border-radius: 18px;
  background: rgba(255, 252, 248, 0.94);
  box-shadow: var(--child-shadow-soft);
}
.rz-core-child .rz-child-master-row,
.rz-core-child .rz-child-insight-row,
.rz-core-child .rz-child-sub-list .rz-core-row {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto 12px;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid rgba(232, 215, 204, 0.58);
  background: transparent;
  text-align: left;
  color: inherit;
}
.rz-core-child .rz-child-master-row:last-child,
.rz-core-child .rz-child-insight-row:last-child,
.rz-core-child .rz-child-sub-list .rz-core-row:last-child { border-bottom: 0; }
.rz-core-child .rz-child-master-row .rz-icon-bubble,
.rz-core-child .rz-child-insight-row .rz-icon-bubble,
.rz-core-child .rz-child-sub-list .rz-icon-bubble {
  width: 29px;
  height: 29px;
  border-radius: 10px;
  background: rgba(220, 161, 141, 0.12);
  color: #A24A3F;
}
.rz-core-child .rz-child-master-row .rz-icon-bubble::before,
.rz-core-child .rz-child-insight-row .rz-icon-bubble::before,
.rz-core-child .rz-child-sub-list .rz-icon-bubble::before { width: 16px; height: 16px; }
.rz-core-child .rz-child-master-row .rz-topic-title,
.rz-core-child .rz-child-insight-row .rz-topic-title,
.rz-core-child .rz-child-sub-list .rz-topic-title {
  color: var(--child-text);
  font-size: 12.2px;
  font-weight: 800;
  line-height: 1.14;
}
.rz-core-child .rz-child-master-row .rz-topic-text,
.rz-core-child .rz-child-insight-row .rz-topic-text,
.rz-core-child .rz-child-sub-list .rz-topic-text {
  margin-top: 2px;
  color: var(--child-muted);
  font-size: 10.4px;
  line-height: 1.18;
  font-weight: 500;
}
.rz-core-child .rz-child-master-row .rz-chevron,
.rz-core-child .rz-child-insight-row .rz-chevron,
.rz-core-child .rz-child-sub-list .rz-chevron {
  justify-self: end;
  color: #A24A3F;
  font-size: 16px;
  line-height: 1;
}
.rz-core-child .rz-child-row-meta {
  color: #A24A3F;
  font-size: 10.5px;
  line-height: 1.15;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}
.rz-core-child .rz-child-insight-row { min-height: 54px; }
.rz-core-child .rz-child-sub-list .rz-core-row { min-height: 50px; }
.rz-core-child .rz-child-js-shim { display: none !important; }
#actionModal.rz-core-modal[data-core-modal="child-master-actions"] .modal,
#actionModal.rz-core-modal[data-core-modal="child-switch-sheet"] .modal,
#actionModal.rz-core-modal[data-core-modal="child-info-panel"] .modal {
  width: min(100%, 360px);
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, #FFFDFB 0%, #FFF8F1 100%);
}
#actionModal.rz-core-modal[data-core-modal="child-master-actions"] .modal h3,
#actionModal.rz-core-modal[data-core-modal="child-switch-sheet"] .modal h3,
#actionModal.rz-core-modal[data-core-modal="child-info-panel"] .modal h3 {
  color: #8B3E38;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.08;
}
#actionModal.rz-core-modal[data-core-modal="child-master-actions"] #modalFields,
#actionModal.rz-core-modal[data-core-modal="child-switch-sheet"] #modalFields { gap: 10px; }
.rz-child-action-list { display: grid; gap: 8px; }
.rz-child-action-row {
  width: 100%;
  min-height: 50px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(232, 215, 204, 0.76);
  border-radius: 16px;
  background: rgba(255, 252, 248, 0.96);
  color: inherit;
  text-align: left;
}
.rz-child-action-row .rz-icon-bubble {
  width: 31px;
  height: 31px;
  border-radius: 11px;
  background: rgba(220, 161, 141, 0.12);
  color: #A24A3F;
}
.rz-child-action-row .rz-topic-title { color: #5A4A42; font-size: 12.4px; font-weight: 800; line-height: 1.14; }
.rz-child-action-row .rz-topic-text { margin-top: 2px; color: #8B7A70; font-size: 10.5px; line-height: 1.18; font-weight: 500; }
.rz-child-action-avatar { width: 31px; height: 31px; border-radius: 11px; }
.rz-child-note-card {
  padding: 14px;
  border: 1px solid rgba(232, 215, 204, 0.76);
  border-radius: 16px;
  background: rgba(255, 252, 248, 0.96);
}
.rz-child-note-card strong { display: block; margin-bottom: 5px; color: #8B3E38; font-family: Georgia, "Times New Roman", serif; font-size: 16px; line-height: 1.12; }
.rz-child-note-card p { margin: 0; color: #5A4A42; font-size: 12.3px; line-height: 1.42; }
@media (max-width: 390px) {
  .rz-core-child .rz-child-master-row,
  .rz-core-child .rz-child-insight-row,
  .rz-core-child .rz-child-sub-list .rz-core-row { gap: 8px; }
  .rz-core-child .rz-child-row-meta { font-size: 10px; }
}

/* CHILD SECTION FINAL UX/UI POLISH V1 */
.rz-core-child .rz-child-page {
  gap: 9px;
  padding-top: 14px;
}

.rz-core-child .rz-child-titlebar {
  min-height: 34px;
  margin-bottom: -1px;
}

.rz-core-child .rz-profile-card {
  padding: 8px 10px;
}

.rz-core-child .child-segments {
  margin: -1px 0 2px;
}

.rz-core-child .rz-child-main-tabs {
  display: none !important;
}

.rz-core-child[data-child-view="main"] > .rz-child-page > .child-segments:not(.rz-child-main-tabs) {
  display: grid !important;
}

.rz-core-child[data-child-view="main"] .child-segments .segment-button,
.rz-core-child[data-child-view="main"] .child-segments .segment-button.active {
  background: transparent;
  color: var(--child-text);
  box-shadow: none;
}

.rz-core-child[data-child-view="main"] .child-segments .segment-button:active,
.rz-core-child[data-child-view="main"] .child-segments .segment-button:focus-visible {
  background: rgba(220, 161, 141, 0.18);
  color: #A24A3F;
}

.rz-core-child:not([data-child-view="main"]) .rz-child-add-button {
  visibility: visible;
  pointer-events: auto;
  font-size: 0;
}

.rz-core-child .rz-child-add-button[data-child-header-action="refresh"]::before {
  content: "";
  width: 15px;
  height: 15px;
  display: block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8 8 0 0 0-14.7-4.4M4 5v5h5'/%3E%3Cpath d='M4 13a8 8 0 0 0 14.7 4.4M20 19v-5h-5'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8 8 0 0 0-14.7-4.4M4 5v5h5'/%3E%3Cpath d='M4 13a8 8 0 0 0 14.7 4.4M20 19v-5h-5'/%3E%3C/svg%3E") center/contain no-repeat;
}

.rz-core-child .rz-child-master-list,
.rz-core-child .rz-child-insight-list,
.rz-core-child .rz-child-sub-list {
  padding-top: 6px;
  padding-bottom: 6px;
}

.rz-core-child .rz-child-insight-row {
  grid-template-columns: 30px minmax(0, 1fr) minmax(54px, auto) 12px;
}

.rz-core-child .rz-icon-bubble[data-rz-icon="ruler"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="chartUp"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 20h14M7 17c4-8 6-8 10 0M8 13h8M10 9h4M12 5v15'/%3E%3C/svg%3E");
}

.rz-core-child .rz-icon-bubble[data-rz-icon="syringe"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 19 9-9M13 5l6 6M11 7l6 6M8 16l3 3M16 4l4 4M4 20l3-1'/%3E%3C/svg%3E");
}

.rz-core-child .rz-icon-bubble[data-rz-icon="medicine"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3h5l2 4v12a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V7l2-4z'/%3E%3Cpath d='M7 8h8M9 13h4M11 11v4'/%3E%3C/svg%3E");
}

.rz-core-child .rz-icon-bubble[data-rz-icon="medicalCross"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='5' width='14' height='14' rx='3'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E");
}

.rz-core-child .rz-icon-bubble[data-rz-icon="star"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 2.6 5.4 5.9.8-4.3 4.1 1 5.8L12 16.3 6.8 19.1l1-5.8-4.3-4.1 5.9-.8z'/%3E%3C/svg%3E");
}

.rz-core-child .rz-icon-bubble[data-rz-icon="message"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 6h14v9H9l-4 4z'/%3E%3Cpath d='M8 10h8M8 13h5'/%3E%3C/svg%3E");
}

.rz-core-child .rz-icon-bubble[data-rz-icon="image"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='5' width='14' height='14' rx='3'/%3E%3Ccircle cx='9' cy='9' r='1.5'/%3E%3Cpath d='m7 17 4-4 3 3 2-2 2 3'/%3E%3C/svg%3E");
}

.rz-core-child .rz-icon-bubble[data-rz-icon="scale"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='5' width='14' height='14' rx='4'/%3E%3Cpath d='M8 10a5 5 0 0 1 8 0M12 10l2-2'/%3E%3C/svg%3E");
}

.rz-core-child .rz-icon-bubble[data-rz-icon="analytics"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 19V5M5 19h14'/%3E%3Cpath d='M8 15l3-4 3 2 4-6'/%3E%3Ccircle cx='8' cy='15' r='1'/%3E%3Ccircle cx='11' cy='11' r='1'/%3E%3Ccircle cx='14' cy='13' r='1'/%3E%3Ccircle cx='18' cy='7' r='1'/%3E%3C/svg%3E");
}

.rz-core-child .rz-icon-bubble[data-rz-icon="ruler"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="chartUp"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="syringe"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="medicine"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="medicalCross"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="star"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="message"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="image"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="scale"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="analytics"]::before {
  border: 0;
  border-radius: 0;
  background: currentColor;
  -webkit-mask: var(--rz-icon-mask) center/contain no-repeat;
          mask: var(--rz-icon-mask) center/contain no-repeat;
}

@media (max-width: 390px) {
  .rz-core-child .rz-child-page {
    gap: 8px;
    padding-top: 12px;
  }
  .rz-core-child .rz-child-insight-row {
    grid-template-columns: 29px minmax(0, 1fr) minmax(48px, auto) 12px;
  }
}

/* CHILD SECTION FINAL UX/UI POLISH V1 ICON PATCH */
.rz-core-child .rz-icon-bubble[data-rz-icon="temperature"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 14.5V5a3 3 0 0 1 6 0v9.5a5 5 0 1 1-6 0z'/%3E%3Cpath d='M13 7v8'/%3E%3C/svg%3E");
}

.rz-core-child .rz-icon-bubble[data-rz-icon="temperature"]::before {
  border: 0;
  border-radius: 0;
  background: currentColor;
  -webkit-mask: var(--rz-icon-mask) center/contain no-repeat;
          mask: var(--rz-icon-mask) center/contain no-repeat;
}

/* CHILD SCREEN FINAL BUGFIX V2: keep child screen independent from home topbar. */
body[data-active-tab="child"] .topbar {
  display: none !important;
}

.rz-core-child[data-child-view="main"] .rz-child-titlebar {
  grid-template-columns: minmax(0, 1fr) 32px;
  padding: 0 2px;
}

.rz-core-child[data-child-view="main"] .rz-child-back-button {
  display: none !important;
}

.rz-core-child[data-child-view="main"] .rz-child-title-copy {
  grid-column: 1;
}

.rz-core-child[data-child-view="main"] .rz-child-add-button {
  grid-column: 2;
  justify-self: end;
}

.rz-core-child:not([data-child-view="main"]) .rz-child-titlebar {
  grid-template-columns: 30px minmax(0, 1fr) 30px;
}

.rz-core-child .rz-core-section-header {
  display: none !important;
}

.rz-core-child .rz-profile-card {
  padding: 10px 12px;
  border-radius: 19px;
}

.rz-core-child .rz-profile-top {
  grid-template-columns: 64px minmax(0, 1fr) 12px;
  gap: 12px;
}

.rz-core-child .rz-avatar {
  width: 64px;
  height: 64px;
  border-radius: 20px;
}

.rz-core-child #profileChildName {
  font-size: 16.6px;
}

.rz-core-child .age-secondary,
.rz-core-child .rz-child-birth {
  display: block;
  margin-top: 2px;
  color: var(--child-muted);
  font: 500 10.8px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#actionModal.rz-core-modal[data-core-modal="child-switch-sheet"] .rz-child-action-row {
  grid-template-columns: 34px minmax(0, 1fr) 22px;
}

.rz-child-current-check {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  justify-self: end;
  border-radius: 999px;
  background: rgba(220, 161, 141, 0.2);
  color: #A24A3F;
  font: 800 12px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rz-child-action-divider {
  height: 1px;
  margin: 2px 4px;
  background: rgba(232, 215, 204, 0.72);
}

.rz-core-more .rz-icon-bubble[data-rz-icon="user"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="user"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3.2'/%3E%3Cpath d='M5.5 19c1.2-4 4-6 6.5-6s5.3 2 6.5 6'/%3E%3C/svg%3E");
}

.rz-core-more .rz-icon-bubble[data-rz-icon="file"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="file"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 4h7l4 4v12H7z'/%3E%3Cpath d='M14 4v5h5M10 13h6M10 16h4'/%3E%3C/svg%3E");
}

.rz-core-more .rz-icon-bubble[data-rz-icon="users"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="users"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Ccircle cx='16' cy='9' r='2.4'/%3E%3Cpath d='M3.5 19c1-3.8 3.5-5.6 5.5-5.6s4.5 1.8 5.5 5.6M13.8 14c2.4.2 4.4 1.8 5.2 5'/%3E%3C/svg%3E");
}

.rz-core-more .rz-icon-bubble[data-rz-icon="gear"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="gear"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 3v3M12 18v3M4.2 7.5l2.6 1.5M17.2 15l2.6 1.5M19.8 7.5 17.2 9M6.8 15l-2.6 1.5M3 12h3M18 12h3'/%3E%3C/svg%3E");
}

.rz-core-child .rz-icon-bubble[data-rz-icon="bottle"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3h6v3l-1 2v11a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2V8L8 6V3z'/%3E%3Cpath d='M9 8h6M10 12h4M10 15h4'/%3E%3C/svg%3E");
}

.rz-core-child .rz-icon-bubble[data-rz-icon="shield"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 5 6v5c0 4.5 2.6 7.7 7 10 4.4-2.3 7-5.5 7-10V6z'/%3E%3Cpath d='m9 12 2 2 4-5'/%3E%3C/svg%3E");
}

.rz-core-child .rz-icon-bubble[data-rz-icon="book"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 5h6a3 3 0 0 1 3 3v11a3 3 0 0 0-3-2H5zM14 8a3 3 0 0 1 3-3h2v12h-2a3 3 0 0 0-3 2z'/%3E%3C/svg%3E");
}

.rz-core-child .rz-icon-bubble[data-rz-icon="movement"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 17c4-6 8-6 14-2'/%3E%3Cpath d='M9 9h.1M13 8h.1M17 9h.1M7 14l2 3M14 13l1 4M20 14l-2 3'/%3E%3C/svg%3E");
}

.rz-core-child .rz-icon-bubble[data-rz-icon="people"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='9' r='2.5'/%3E%3Ccircle cx='16' cy='9' r='2.5'/%3E%3Cpath d='M4 19c.8-3 2.5-4.5 4-4.5s3.2 1.5 4 4.5M12 19c.8-3 2.5-4.5 4-4.5s3.2 1.5 4 4.5'/%3E%3C/svg%3E");
}

.rz-core-child .rz-icon-bubble[data-rz-icon="tooth"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.5 4.5c1.5-1 3-.4 4.5.5 1.5-.9 3-1.5 4.5-.5 2 1.3 2.1 4.2 1.2 7.2-.8 2.8-2 7.3-4.1 7.3-1.2 0-1.1-3.8-1.6-3.8s-.4 3.8-1.6 3.8c-2.1 0-3.3-4.5-4.1-7.3-.9-3-.8-5.9 1.2-7.2z'/%3E%3C/svg%3E");
}

.rz-core-more .rz-icon-bubble[data-rz-icon="user"]::before,
.rz-core-more .rz-icon-bubble[data-rz-icon="file"]::before,
.rz-core-more .rz-icon-bubble[data-rz-icon="users"]::before,
.rz-core-more .rz-icon-bubble[data-rz-icon="gear"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="user"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="file"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="users"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="gear"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="bottle"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="shield"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="book"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="movement"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="people"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="tooth"]::before {
  border: 0;
  border-radius: 0;
  background: currentColor;
  -webkit-mask: var(--rz-icon-mask) center/contain no-repeat;
          mask: var(--rz-icon-mask) center/contain no-repeat;
}

@media (max-width: 390px) {
  .rz-core-child .rz-profile-top {
    grid-template-columns: 60px minmax(0, 1fr) 12px;
    gap: 10px;
  }

  .rz-core-child .rz-avatar {
    width: 60px;
    height: 60px;
  }
}

/* CHILD HEADER CARD ALIGNMENT V3 */
.rz-core-child .rz-child-page {
  padding-top: 18px;
  gap: 11px;
}

.rz-core-child .rz-child-titlebar {
  box-sizing: border-box;
  width: 100%;
  min-height: 58px;
  margin: 0 0 2px;
  padding: 10px 12px;
  align-items: center;
  border: 1px solid rgba(243, 230, 225, 0.95);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 249, 246, 0.84)),
    #FFF9F6;
  box-shadow: 0 8px 22px rgba(140, 58, 54, 0.045);
  overflow: hidden;
}

.rz-core-child[data-child-view="main"] .rz-child-titlebar {
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 10px;
  padding-left: 14px;
}

.rz-core-child:not([data-child-view="main"]) .rz-child-titlebar {
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  gap: 8px;
}

.rz-core-child .rz-child-title-copy {
  min-width: 0;
  gap: 2px;
}

.rz-core-child .rz-child-title {
  font-size: clamp(19px, 5.1vw, 21px);
  line-height: 1.05;
}

.rz-core-child .rz-child-subtitle {
  margin-top: 1px;
  color: var(--child-muted);
  font-size: 11px;
  line-height: 1.18;
}

.rz-core-child .rz-child-back-button,
.rz-core-child .rz-child-add-button,
.rz-core-child .rz-child-refresh-button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(243, 230, 225, 0.98);
  background: #FDF1EB;
  color: #A24A3F;
}

.rz-core-child .rz-child-add-button {
  font-size: 18px;
  font-weight: 700;
}

.rz-core-child .rz-child-back-button {
  font-size: 23px;
}

.rz-core-child .rz-profile-card {
  margin-top: 0;
}

.rz-core-child .rz-child-birth:empty {
  display: none;
}

@media (max-width: 390px) {
  .rz-core-child .rz-child-page {
    padding-top: 16px;
    gap: 10px;
  }

  .rz-core-child .rz-child-titlebar {
    min-height: 56px;
    border-radius: 21px;
  }

  .rz-core-child .rz-child-title {
    font-size: 19px;
  }
}


/* REFERENCE HEADER UNIFICATION V1 (Today now keeps the canonical topbar) */
body[data-active-tab="child"] .topbar {
  display: none !important;
}

.today-reference-screen .today-reference-page,
.rz-core-child .rz-child-page {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.today-reference-screen .today-reference-page {
  padding-top: 18px !important;
  gap: 13px !important;
}

.rz-core-child .rz-child-page {
  padding-top: 18px !important;
  gap: 13px !important;
}

.today-reference-screen .today-header-card,
.rz-core-child .rz-child-titlebar,
#actionModal.help-library-modal .rz-help-library .rz-help-library-header,
#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back,
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 58px;
  margin: 0 0 13px;
  padding: 10px 12px;
  border: 1px solid rgba(243, 230, 225, 0.95);
  border-radius: 21px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 249, 246, 0.82)),
    #FFF9F6;
  box-shadow: 0 8px 22px rgba(140, 58, 54, 0.045);
  overflow: hidden;
}

.today-reference-screen .today-header-card,
#actionModal.help-library-modal .rz-help-library .rz-help-library-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
}

.rz-core-child[data-child-view="main"] .rz-child-titlebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  padding-left: 12px;
}

.rz-core-child:not([data-child-view="main"]) .rz-child-titlebar,
#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back,
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
}

#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back > span,
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back > span,
.rz-core-child .rz-child-title-copy,
.today-reference-screen .today-header-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.today-reference-screen .today-header-title,
.rz-core-child .rz-child-title,
#actionModal.help-library-modal .rz-help-library .rz-help-library-header .rz-title,
#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back .rz-title,
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back .rz-title {
  display: block;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  color: #8B3E38;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(17px, 4.9vw, 19px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.today-reference-screen .today-header-date,
.rz-core-child .rz-child-subtitle,
#actionModal.help-library-modal .rz-help-library .rz-help-library-header .rz-subtitle,
#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back .rz-subtitle,
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back .rz-subtitle {
  display: block;
  max-width: 100%;
  margin: 3px 0 0;
  overflow: hidden;
  color: #8B7A70;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10.6px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.24;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.today-reference-screen .today-refresh-button,
.rz-core-child .rz-child-back-button,
.rz-core-child .rz-child-add-button,
.rz-core-child .rz-child-refresh-button,
#actionModal.help-library-modal .rz-help-library .rz-refresh-action,
#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back .rz-back-button,
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back .rz-back-button,
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back .rz-bookmark-button,
#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back .rz-bookmark-button {
  box-sizing: border-box;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  justify-self: end;
  padding: 0;
  border: 1px solid rgba(243, 230, 225, 0.98);
  border-radius: 999px;
  background: #FDF1EB;
  color: #A24A3F;
  box-shadow: none;
}

.rz-core-child .rz-child-back-button,
#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back .rz-back-button,
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back .rz-back-button {
  justify-self: start;
  padding-bottom: 2px;
  font: 400 23px/1 Georgia, "Times New Roman", serif;
}

.rz-core-child .rz-child-add-button {
  font: 800 18px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rz-core-child .rz-child-add-button[data-child-header-action="refresh"] {
  font-size: 0;
}

.rz-core-child .rz-child-add-button[data-child-header-action="refresh"]::before,
.today-reference-screen .today-refresh-button .rz-icon-bubble::before,
#actionModal.help-library-modal .rz-help-library .rz-refresh-action::before {
  content: "";
  width: 16px;
  height: 16px;
  display: block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8 8 0 0 0-14.7-4.4M4 5v5h5'/%3E%3Cpath d='M4 13a8 8 0 0 0 14.7 4.4M20 19v-5h-5'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8 8 0 0 0-14.7-4.4M4 5v5h5'/%3E%3Cpath d='M4 13a8 8 0 0 0 14.7 4.4M20 19v-5h-5'/%3E%3C/svg%3E") center/contain no-repeat;
}

.today-reference-screen .today-refresh-button .rz-icon-bubble {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
}

.today-reference-screen .today-diary-card,
.today-reference-screen .today-add-section,
.rz-core-child .rz-profile-card,
.rz-core-child .child-segments,
.rz-core-child .child-section {
  margin-left: 0;
  margin-right: 0;
}

@media (max-width: 390px) {
  .today-reference-screen .today-reference-page,
  .rz-core-child .rz-child-page {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .today-reference-screen .today-header-card,
  .rz-core-child .rz-child-titlebar,
  #actionModal.help-library-modal .rz-help-library .rz-help-library-header,
  #actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back,
  #actionModal.help-library-modal .rz-article-screen > .rz-header-with-back {
    min-height: 56px;
    border-radius: 21px;
  }
}


/* HELP LIBRARY HEADER GRID FIX V1 */
#actionModal.help-library-modal .rz-help-library .rz-help-library-header {
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  gap: 8px;
}

#actionModal.help-library-modal .rz-help-library .rz-help-library-header > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

#actionModal.help-library-modal .rz-help-library .rz-help-library-header .rz-back-button {
  box-sizing: border-box;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  justify-self: start;
  padding: 0 0 2px;
  border: 1px solid rgba(243, 230, 225, 0.98);
  border-radius: 999px;
  background: #FDF1EB;
  color: #A24A3F;
  box-shadow: none;
  font: 400 23px/1 Georgia, "Times New Roman", serif;
}


/* CHILD RHYTHM ALIGNMENT V1 */
.rz-core-child {
  --child-surface: #FFFFFF;
  --child-row-surface: #FFFFFF;
  --child-border-soft: #F3E6E1;
  --child-shadow-header: 0 8px 22px rgba(140, 58, 54, 0.045);
  --child-shadow-card: 0 8px 22px rgba(140, 58, 54, 0.045);
}

.rz-core-child .rz-child-page {
  gap: 12px !important;
  padding-top: 18px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.rz-core-child .rz-child-titlebar {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 58px !important;
  margin: 0 0 0 !important;
  padding: 10px 12px !important;
  border: 1px solid var(--child-border-soft) !important;
  border-radius: 21px !important;
  background: var(--child-surface) !important;
  box-shadow: var(--child-shadow-header) !important;
  overflow: hidden;
}

.rz-core-child[data-child-view="main"] .rz-child-titlebar {
  grid-template-columns: minmax(0, 1fr) 34px !important;
  gap: 10px !important;
}

.rz-core-child:not([data-child-view="main"]) .rz-child-titlebar {
  grid-template-columns: 34px minmax(0, 1fr) 34px !important;
  gap: 8px !important;
}

.rz-core-child .rz-child-title-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.rz-core-child .rz-child-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #8B3E38;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(17px, 4.9vw, 19px) !important;
  font-weight: 800;
  line-height: 1.08 !important;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rz-core-child .rz-child-subtitle {
  display: block;
  max-width: 100%;
  margin-top: 3px !important;
  overflow: hidden;
  color: #8B7A70;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10.6px !important;
  font-style: normal;
  font-weight: 500;
  line-height: 1.24 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rz-core-child .rz-child-back-button,
.rz-core-child .rz-child-add-button,
.rz-core-child .rz-child-refresh-button {
  box-sizing: border-box;
  width: 34px !important;
  min-width: 34px;
  height: 34px !important;
  min-height: 34px;
  display: grid !important;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(243, 230, 225, 0.98) !important;
  border-radius: 999px !important;
  background: #FDF1EB !important;
  color: #A24A3F !important;
  box-shadow: none !important;
}

.rz-core-child .rz-child-back-button {
  justify-self: start;
  padding-bottom: 2px;
  font: 400 23px/1 Georgia, "Times New Roman", serif !important;
}

.rz-core-child .rz-child-add-button {
  justify-self: end;
  font: 800 18px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.rz-core-child .rz-profile-card {
  box-sizing: border-box;
  width: 100%;
  padding: 11px 12px !important;
  border: 1px solid var(--child-border-soft) !important;
  border-radius: 21px !important;
  background: var(--child-surface) !important;
  box-shadow: var(--child-shadow-card) !important;
}

.rz-core-child .rz-profile-top {
  grid-template-columns: 62px minmax(0, 1fr) 14px !important;
  align-items: center;
  gap: 12px !important;
}

.rz-core-child .rz-avatar {
  width: 62px !important;
  height: 62px !important;
  border-radius: 20px !important;
}

.rz-core-child #profileChildName {
  font-size: clamp(17px, 4.8vw, 19px) !important;
  line-height: 1.06 !important;
}

.rz-core-child .age-secondary,
.rz-core-child .rz-child-birth {
  display: block;
  margin-top: 2px !important;
  color: #8B7A70;
  font: 500 11px/1.22 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.rz-core-child .child-segments {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px !important;
  min-height: 43px !important;
  margin: 0 !important;
  padding: 3px !important;
  border: 1px solid rgba(232, 215, 204, 0.78) !important;
  border-radius: 14px !important;
  background: rgba(255, 252, 248, 0.94) !important;
  box-shadow: none !important;
}

.rz-core-child .segment-button {
  min-height: 35px !important;
  border: 1px solid transparent !important;
  border-radius: 11px !important;
  background: transparent;
  color: #5A4A42;
  font-size: 11.4px !important;
  font-weight: 700 !important;
  line-height: 1.1;
}

.rz-core-child[data-child-view="main"] .segment-button,
.rz-core-child[data-child-view="main"] .segment-button.active {
  background: transparent !important;
  color: #5A4A42 !important;
  box-shadow: none !important;
}

.rz-core-child:not([data-child-view="main"]) .segment-button.active {
  border-color: rgba(220, 161, 141, 0.26) !important;
  background: rgba(220, 161, 141, 0.30) !important;
  color: #8B3E38 !important;
  box-shadow: inset 0 0 0 1px rgba(162, 74, 63, 0.06) !important;
}

.rz-core-child .rz-child-master-list,
.rz-core-child .rz-child-insight-list,
.rz-core-child .rz-child-sub-list,
.rz-core-child .rz-child-health .rz-health-menu,
.rz-core-child .rz-development-reference,
.rz-core-child .rz-child-dynamics > .book-page-card,
.rz-core-child .rz-child-dynamics .weekly-card {
  box-sizing: border-box;
  width: 100%;
  padding: 7px 12px !important;
  border: 1px solid rgba(232, 215, 204, 0.78) !important;
  border-radius: 20px !important;
  background: var(--child-row-surface) !important;
  box-shadow: var(--child-shadow-card) !important;
  overflow: hidden;
}

.rz-core-child .rz-child-master-row,
.rz-core-child .rz-child-insight-row,
.rz-core-child .rz-child-sub-list .rz-core-row,
.rz-core-child .rz-child-health .rz-core-row {
  min-height: 53px !important;
  grid-template-columns: 32px minmax(0, 1fr) auto 12px !important;
  gap: 10px !important;
  padding: 9px 0 !important;
  border-bottom: 1px solid rgba(232, 215, 204, 0.58) !important;
}

.rz-core-child .rz-child-health .rz-core-row,
.rz-core-child .rz-child-sub-list .rz-core-row {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.rz-core-child .rz-child-master-row:last-child,
.rz-core-child .rz-child-insight-row:last-child,
.rz-core-child .rz-child-sub-list .rz-core-row:last-child,
.rz-core-child .rz-child-health .rz-core-row:last-child {
  border-bottom: 0 !important;
}

.rz-core-child .rz-child-master-row .rz-icon-bubble,
.rz-core-child .rz-child-insight-row .rz-icon-bubble,
.rz-core-child .rz-child-sub-list .rz-icon-bubble,
.rz-core-child .rz-child-health .rz-core-row .rz-icon-bubble {
  width: 31px !important;
  height: 31px !important;
  border-radius: 11px !important;
  background: rgba(220, 161, 141, 0.13) !important;
  color: #A24A3F !important;
}

.rz-core-child .rz-child-master-row .rz-icon-bubble::before,
.rz-core-child .rz-child-insight-row .rz-icon-bubble::before,
.rz-core-child .rz-child-sub-list .rz-icon-bubble::before,
.rz-core-child .rz-child-health .rz-core-row .rz-icon-bubble::before {
  width: 16px !important;
  height: 16px !important;
}

.rz-core-child .rz-child-master-row .rz-topic-title,
.rz-core-child .rz-child-insight-row .rz-topic-title,
.rz-core-child .rz-child-sub-list .rz-topic-title,
.rz-core-child .rz-child-health .rz-topic-title {
  color: #5A4A42 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.14 !important;
}

.rz-core-child .rz-child-master-row .rz-topic-text,
.rz-core-child .rz-child-insight-row .rz-topic-text,
.rz-core-child .rz-child-sub-list .rz-topic-text,
.rz-core-child .rz-child-health .rz-topic-text {
  margin-top: 2px !important;
  color: #8B7A70 !important;
  font-size: 10.8px !important;
  font-weight: 500 !important;
  line-height: 1.18 !important;
}

.rz-core-child .rz-child-row-meta {
  color: #A24A3F;
  font-size: 10.4px !important;
  font-weight: 700;
  line-height: 1.15;
  text-align: right;
  white-space: nowrap;
}

.rz-core-child .rz-chevron,
.rz-core-child .rz-child-master-row .rz-chevron,
.rz-core-child .rz-child-insight-row .rz-chevron,
.rz-core-child .rz-child-sub-list .rz-chevron,
.rz-core-child .rz-child-health .rz-chevron {
  color: #A24A3F !important;
  font-size: 16px !important;
  line-height: 1;
}

@media (max-width: 390px) {
  .rz-core-child .rz-child-page {
    gap: 11px !important;
    padding-top: 16px !important;
  }

  .rz-core-child .rz-profile-top {
    grid-template-columns: 60px minmax(0, 1fr) 14px !important;
    gap: 10px !important;
  }

  .rz-core-child .rz-avatar {
    width: 60px !important;
    height: 60px !important;
  }

  .rz-core-child .segment-button {
    font-size: 11px !important;
  }

  .rz-core-child .rz-child-master-row,
  .rz-core-child .rz-child-insight-row,
  .rz-core-child .rz-child-sub-list .rz-core-row,
  .rz-core-child .rz-child-health .rz-core-row {
    gap: 8px !important;
  }
}

/* CHILD MODAL FORM FIX V1 */
#actionModal.rz-core-modal .modal,
#actionModal[data-core-modal] .modal,
#actionModal.today-form-modal .modal {
  overflow-x: hidden;
}

#actionModal.rz-core-modal #modalFields,
#actionModal[data-core-modal] #modalFields,
#actionModal.today-form-modal #modalFields {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: grid;
  gap: 12px;
  padding-left: 0;
  padding-right: 0;
  overflow: visible;
}

#actionModal.rz-core-modal .field,
#actionModal[data-core-modal] .field,
#actionModal.today-form-modal .field,
#actionModal .field {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0 1px;
  overflow: visible;
}

#actionModal.rz-core-modal .field > label,
#actionModal[data-core-modal] .field > label,
#actionModal.today-form-modal .field > label,
#actionModal .field > label {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 0 3px;
  overflow: visible;
  color: #5A4A42;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  text-indent: 0;
  transform: none;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

#actionModal.rz-core-modal .field input,
#actionModal.rz-core-modal .field select,
#actionModal.rz-core-modal .field textarea,
#actionModal[data-core-modal] .field input,
#actionModal[data-core-modal] .field select,
#actionModal[data-core-modal] .field textarea,
#actionModal.today-form-modal .field input,
#actionModal.today-form-modal .field select,
#actionModal.today-form-modal .field textarea,
#actionModal .field > input,
#actionModal .field > select,
#actionModal .field > textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
}

#actionModal.rz-core-modal .rz-core-choice-grid,
#actionModal[data-core-modal] .rz-core-choice-grid,
#actionModal.today-form-modal .today-choice-grid {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

#actionModal.rz-core-modal .rz-icon-bubble[data-rz-icon="plus"]::before,
#actionModal[data-core-modal] .rz-icon-bubble[data-rz-icon="plus"]::before,
#actionModal .rz-child-action-row .rz-icon-bubble[data-rz-icon="plus"]::before,
.rz-core-child .rz-icon-bubble[data-rz-icon="plus"]::before {
  content: "";
  width: 16px;
  height: 16px;
  display: block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.85' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.85' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center/contain no-repeat;
  border: 0;
  border-radius: 0;
}

/* HEADER RHYTHM MATCH HOME V1 */
/* App Shell: per-tab background override removed — folded into canonical .app. */

.today-reference-screen .today-reference-page,
.rz-core-child .rz-child-page {
  padding-top: 0 !important;
  gap: 14px !important;
}

.today-reference-screen .today-header-card,
.rz-core-child .rz-child-titlebar,
#actionModal.help-library-modal .rz-help-library .rz-help-library-header,
#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back,
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back,
#actionModal.help-library-modal .rz-assistant-screen > .rz-header-with-back {
  width: calc(100% - 8px) !important;
  max-width: calc(100% - 8px) !important;
  min-height: 66px !important;
  margin: 0 4px 14px !important;
  border-radius: 24px !important;
  border-color: rgba(243, 230, 225, 0.96) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 249, 246, 0.86)),
    #FFF9F6 !important;
  box-shadow: 0 8px 22px rgba(140, 58, 54, 0.045) !important;
}

.today-reference-screen .today-header-card,
.rz-core-child[data-child-view="main"] .rz-child-titlebar {
  grid-template-columns: minmax(0, 1fr) 34px !important;
  gap: 10px !important;
  padding: 13px 12px 12px 22px !important;
}

.rz-core-child:not([data-child-view="main"]) .rz-child-titlebar,
#actionModal.help-library-modal .rz-help-library .rz-help-library-header,
#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back,
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back,
#actionModal.help-library-modal .rz-assistant-screen > .rz-header-with-back {
  grid-template-columns: 34px minmax(0, 1fr) 34px !important;
  gap: 8px !important;
  padding: 13px 12px 12px 10px !important;
}

.today-reference-screen .today-header-copy,
.rz-core-child .rz-child-title-copy,
#actionModal.help-library-modal .rz-help-library .rz-help-library-header > div,
#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back > span,
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back > span,
#actionModal.help-library-modal .rz-assistant-screen > .rz-header-with-back > span {
  align-self: center;
  min-width: 0;
  overflow: hidden;
}

.today-reference-screen .today-header-title,
.rz-core-child .rz-child-title,
#actionModal.help-library-modal .rz-help-library .rz-help-library-header .rz-title,
#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back .rz-title,
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back .rz-title,
#actionModal.help-library-modal .rz-assistant-screen > .rz-header-with-back .rz-title {
  font-size: clamp(17px, 4.8vw, 18.5px) !important;
  line-height: 1.12 !important;
}

.today-reference-screen .today-header-date,
.rz-core-child .rz-child-subtitle,
#actionModal.help-library-modal .rz-help-library .rz-help-library-header .rz-subtitle,
#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back .rz-subtitle,
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back .rz-subtitle,
#actionModal.help-library-modal .rz-assistant-screen > .rz-header-with-back .rz-subtitle {
  margin-top: 3px !important;
  font-size: 10.8px !important;
  line-height: 1.24 !important;
  font-weight: 500 !important;
}

.today-reference-screen .today-refresh-button,
.rz-core-child .rz-child-back-button,
.rz-core-child .rz-child-add-button,
.rz-core-child .rz-child-refresh-button,
#actionModal.help-library-modal .rz-help-library .rz-refresh-action,
#actionModal.help-library-modal .rz-help-library .rz-back-button,
#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back .rz-back-button,
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back .rz-back-button,
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back .rz-bookmark-button,
#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back .rz-bookmark-button,
#actionModal.help-library-modal .rz-assistant-screen > .rz-header-with-back .rz-back-button {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  border: 1px solid rgba(243, 230, 225, 0.98) !important;
  background: #FDF1EB !important;
  color: #8B3E38 !important;
  box-shadow: none !important;
}

.today-reference-screen .today-diary-card,
.today-reference-screen .today-empty-card,
.rz-core-child .rz-profile-card,
.rz-core-child .rz-child-master-list,
.rz-core-child .rz-child-insight-list,
.rz-core-child .rz-child-sub-list,
.rz-core-child .rz-child-health .rz-health-menu,
.rz-core-child .rz-development-reference,
.rz-core-child .rz-child-dynamics > .book-page-card,
.rz-core-child .rz-child-dynamics .weekly-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 250, 247, 0.88)),
    #FFFFFF !important;
}

.rz-core-child .child-segments {
  width: calc(100% - 8px) !important;
  max-width: calc(100% - 8px) !important;
  margin: 0 4px !important;
  background: rgba(255, 255, 255, 0.92) !important;
}

@media (max-width: 360px) {
  .today-reference-screen .today-header-card,
  .rz-core-child .rz-child-titlebar,
  #actionModal.help-library-modal .rz-help-library .rz-help-library-header,
  #actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back,
  #actionModal.help-library-modal .rz-article-screen > .rz-header-with-back,
  #actionModal.help-library-modal .rz-assistant-screen > .rz-header-with-back {
    width: calc(100% - 6px) !important;
    max-width: calc(100% - 6px) !important;
    margin-left: 3px !important;
    margin-right: 3px !important;
  }

  .today-reference-screen .today-header-card,
  .rz-core-child[data-child-view="main"] .rz-child-titlebar {
    padding-left: 18px !important;
  }
}

/* HELP LIBRARY RHYTHM MATCH HOME V1 */
#actionModal.help-library-modal #modalFields {
  padding-top: calc(14px + env(safe-area-inset-top)) !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}

#actionModal.help-library-modal .rz-help-library,
#actionModal.help-library-modal .rz-topic-screen,
#actionModal.help-library-modal .rz-article-screen,
#actionModal.help-library-modal .rz-extra-guide-screen,
#actionModal.help-library-modal .rz-assistant-screen {
  align-content: start;
  gap: 14px !important;
}

#actionModal.help-library-modal .rz-help-library .rz-help-library-header,
#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back,
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back,
#actionModal.help-library-modal .rz-extra-guide-screen > .rz-header-with-back,
#actionModal.help-library-modal .rz-assistant-screen > .rz-header-with-back {
  margin-top: 0 !important;
  margin-bottom: 14px !important;
}

/* CHILD TABS CONSISTENCY V1 */
.rz-core-child .rz-child-page {
  padding-bottom: calc(112px + env(safe-area-inset-bottom)) !important;
}

.rz-core-child .child-segments {
  box-sizing: border-box;
  width: calc(100% - 8px) !important;
  max-width: calc(100% - 8px) !important;
  min-height: 50px !important;
  margin: 0 4px !important;
  padding: 4px !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 4px !important;
  border: 1px solid rgba(232, 215, 204, 0.82) !important;
  border-radius: 17px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 251, 248, 0.92)),
    #FFFFFF !important;
  overflow: hidden !important;
}

.rz-core-child .segment-button {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 40px !important;
  height: 40px !important;
  margin: 0 !important;
  padding: 0 6px !important;
  display: grid !important;
  place-items: center;
  border: 1px solid transparent !important;
  border-radius: 13px !important;
  background: transparent !important;
  color: #5A4A42 !important;
  font-size: 11.4px !important;
  font-weight: 750 !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rz-core-child:not([data-child-view="main"]) .segment-button.active {
  border-color: rgba(220, 161, 141, 0.34) !important;
  border-radius: 13px !important;
  background: rgba(220, 161, 141, 0.27) !important;
  color: #8B3E38 !important;
  box-shadow: inset 0 0 0 1px rgba(162, 74, 63, 0.055) !important;
}

.rz-core-child[data-child-view="main"] .segment-button,
.rz-core-child[data-child-view="main"] .segment-button.active {
  border-color: transparent !important;
  background: transparent !important;
  color: #5A4A42 !important;
  box-shadow: none !important;
}

.rz-core-child .rz-child-sub-list,
.rz-core-child .rz-child-health .rz-health-menu,
.rz-core-child .rz-child-dynamics > .book-page-card,
.rz-core-child .rz-child-dynamics .weekly-card,
.rz-core-child .rz-development-reference {
  width: calc(100% - 8px) !important;
  max-width: calc(100% - 8px) !important;
  margin-left: 4px !important;
  margin-right: 4px !important;
  border-radius: 22px !important;
  border-color: rgba(232, 215, 204, 0.82) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 250, 247, 0.9)),
    #FFFFFF !important;
}

.rz-core-child .rz-child-sub-list .rz-core-row,
.rz-core-child .rz-child-health .rz-core-row {
  min-height: 57px !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

.rz-core-child .rz-child-sub-list .rz-topic-title,
.rz-core-child .rz-child-health .rz-topic-title {
  font-size: 13.2px !important;
  line-height: 1.14 !important;
}

.rz-core-child .rz-child-sub-list .rz-topic-text,
.rz-core-child .rz-child-health .rz-topic-text {
  font-size: 11px !important;
  line-height: 1.2 !important;
}

@media (max-width: 360px) {
  .rz-core-child .child-segments,
  .rz-core-child .rz-child-sub-list,
  .rz-core-child .rz-child-health .rz-health-menu,
  .rz-core-child .rz-child-dynamics > .book-page-card,
  .rz-core-child .rz-child-dynamics .weekly-card,
  .rz-core-child .rz-development-reference {
    width: calc(100% - 6px) !important;
    max-width: calc(100% - 6px) !important;
    margin-left: 3px !important;
    margin-right: 3px !important;
  }

  .rz-core-child .segment-button {
    font-size: 11px !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
  }
}

/* CHILD SUBSCREEN RHYTHM V2: keep Health, Development and Dynamics visually aligned. */
.rz-core-child:not([data-child-view="main"]) .rz-child-page {
  padding-bottom: calc(144px + env(safe-area-inset-bottom)) !important;
}

.rz-core-child:not([data-child-view="main"]) .child-segments {
  margin-bottom: 14px !important;
}

.rz-core-child[data-child-view="health"] .rz-child-health,
.rz-core-child[data-child-view="development"] .rz-child-development,
.rz-core-child[data-child-view="dynamics"] .rz-child-dynamics {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.rz-core-child[data-child-view="health"] .rz-health-menu,
.rz-core-child[data-child-view="development"] .rz-child-development-menu,
.rz-core-child[data-child-view="dynamics"] .rz-child-dynamics-menu {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

@media (max-width: 360px) {
  .rz-core-child:not([data-child-view="main"]) .child-segments {
    margin-bottom: 14px !important;
  }
}

/* FAMILY REFERENCE FULL V1 */
#actionModal.family-modal {
  align-items: stretch;
  padding: 0;
  background: var(--bg);
  backdrop-filter: none;
}

#actionModal.family-modal .modal {
  width: min(100%, 560px);
  min-height: 100dvh;
  max-height: 100dvh;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, var(--surface-raised) 0%, var(--bg) 48%, var(--surface) 100%);
  box-shadow: none;
  animation: none;
}

#actionModal.family-modal .modal > h3,
#actionModal.family-modal .modal > .result,
#actionModal.family-modal .modal-actions {
  display: none;
}

#actionModal.family-modal #modalFields {
  min-height: 100%;
  padding: 0;
  overflow: visible;
}

#actionModal.family-modal .family-reference-screen {
  min-height: 100dvh;
  color: var(--text);
  background:
    linear-gradient(180deg, var(--surface-raised) 0%, var(--bg) 54%, var(--surface) 100%);
}

#actionModal.family-modal .family-reference-header {
  position: sticky;
  top: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: calc(8px + env(safe-area-inset-top)) 18px 8px;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(255, 253, 248, 0.9));
}

#actionModal.family-modal .family-header-copy {
  min-width: 0;
  text-align: center;
}

#actionModal.family-modal .family-header-title {
  display: block;
  color: var(--heading);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
}

#actionModal.family-modal .family-header-subtitle {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}

#actionModal.family-modal .family-header-button,
#actionModal.family-modal .family-header-spacer {
  width: auto;
  min-width: 32px;
  height: 32px;
}

#actionModal.family-modal .family-header-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--accent-strong);
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
}

#actionModal.family-modal .family-header-action {
  justify-self: end;
  font-size: 20px;
}

#actionModal.family-modal .family-header-action-menu {
  font-size: 15px;
  letter-spacing: 1px;
}

#actionModal.family-modal .family-header-action-save {
  min-width: 72px;
  font-size: 12px;
  font-weight: 850;
}

#actionModal.family-modal .family-screen-body {
  display: grid;
  gap: 14px;
  padding: 10px 20px calc(108px + env(safe-area-inset-bottom));
}

#actionModal.family-modal[data-family-screen*="family-invite-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-join-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-access-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-action-sheet-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-member-actions-screen"] .family-screen-body {
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}

#actionModal.family-modal .family-section {
  display: grid;
  gap: 10px;
}

#actionModal.family-modal .family-section-title,
#actionModal.family-modal .family-field-title {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

#actionModal.family-modal .family-hero-card {
  /* surface unified under .rz-card; layout preserved */
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px;
  color: var(--text);
  text-align: left;
}

#actionModal.family-modal .family-hero-copy,
#actionModal.family-modal .family-row-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

#actionModal.family-modal .family-hero-title {
  color: var(--heading);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

#actionModal.family-modal .family-hero-text,
#actionModal.family-modal .family-row-text,
#actionModal.family-modal .family-row-copy small {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 560;
  line-height: 1.26;
}

#actionModal.family-modal .family-ref-list {
  overflow: hidden;
  border: 1px solid rgba(232, 215, 204, 0.86);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 8px 24px rgba(139, 62, 56, 0.045);
}

#actionModal.family-modal .family-ref-list + .family-ref-list {
  margin-top: 2px;
}

#actionModal.family-modal .family-ref-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto 12px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 61px;
  padding: 10px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  box-shadow: none;
}

#actionModal.family-modal .family-ref-row + .family-ref-row {
  border-top: 1px solid rgba(232, 215, 204, 0.74);
}

#actionModal.family-modal .family-ref-row:active {
  transform: scale(0.995);
}

#actionModal.family-modal .family-row-title,
#actionModal.family-modal .family-row-copy strong {
  color: var(--text);
  font-size: 13.4px;
  font-weight: 850;
  line-height: 1.15;
}

#actionModal.family-modal .family-row-status {
  max-width: 92px;
  color: var(--success);
  font-size: 10.4px;
  font-weight: 800;
  line-height: 1.18;
  text-align: right;
}

#actionModal.family-modal .family-chevron {
  color: var(--accent-strong);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  opacity: 0.78;
}

#actionModal.family-modal .family-action-row .family-row-status {
  display: none;
}

#actionModal.family-modal .family-danger-row,
#actionModal.family-modal .family-danger-list .family-ref-row {
  color: var(--danger);
}

#actionModal.family-modal .family-danger-row .family-row-title,
#actionModal.family-modal .family-danger-list .family-row-title {
  color: var(--danger);
}

#actionModal.family-modal .family-avatar,
#actionModal.family-modal .family-illustration {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
}

#actionModal.family-modal .family-avatar {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

#actionModal.family-modal .family-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#actionModal.family-modal .family-avatar::before {
  content: "";
  width: 19px;
  height: 19px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3.2'/%3E%3Cpath d='M5.5 19c1.2-4 4-6 6.5-6s5.3 2 6.5 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3.2'/%3E%3Cpath d='M5.5 19c1.2-4 4-6 6.5-6s5.3 2 6.5 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

#actionModal.family-modal .family-avatar:has(img)::before {
  display: none;
}

#actionModal.family-modal .family-avatar-mother,
#actionModal.family-modal .family-avatar-grandmother,
#actionModal.family-modal .family-avatar-aunt {
  background: var(--lavender-soft);
  color: var(--heading);
}

#actionModal.family-modal .family-avatar-nanny,
#actionModal.family-modal .family-avatar-father,
#actionModal.family-modal .family-avatar-grandfather {
  background: var(--blue-soft);
  color: var(--blue-strong);
}

#actionModal.family-modal .family-illustration {
  width: 70px;
  height: 70px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 42% 30%, rgba(255, 255, 255, 0.82), transparent 38%),
    var(--accent-soft);
  color: var(--accent-strong);
}

#actionModal.family-modal .family-centered-panel .family-illustration {
  width: 132px;
  height: 132px;
  margin: 0 auto 12px;
  border-radius: 32px;
}

#actionModal.family-modal .family-illustration img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#actionModal.family-modal .family-illustration.is-fallback::before {
  content: "";
  width: 54%;
  height: 54%;
  border: 2px solid currentColor;
  border-radius: 38% 38% 46% 46%;
  opacity: 0.72;
}

#actionModal.family-modal .family-centered-panel {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px 8px 6px;
  color: var(--text);
  text-align: center;
}

#actionModal.family-modal .family-centered-panel h4,
#actionModal.family-modal .family-profile-hero h4 {
  margin: 0;
  color: var(--heading);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.18;
}

#actionModal.family-modal .family-centered-panel p,
#actionModal.family-modal .family-note {
  margin: 0;
  color: var(--text-soft);
  font-size: 12.2px;
  font-weight: 560;
  line-height: 1.35;
}

#actionModal.family-modal .family-note {
  padding: 14px;
  text-align: center;
}

#actionModal.family-modal .family-role-grid,
#actionModal.family-modal .family-assignee-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#actionModal.family-modal .family-role-choice,
#actionModal.family-modal .family-assignee-choice {
  min-height: 43px;
  padding: 9px 10px;
  border: 1px solid rgba(232, 215, 204, 0.86);
  border-radius: 12px;
  background: rgba(255, 248, 241, 0.72);
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.18;
  box-shadow: none;
}

#actionModal.family-modal .family-role-choice.active,
#actionModal.family-modal .family-assignee-choice.active {
  border-color: rgba(162, 74, 63, 0.28);
  background: var(--accent-soft);
  color: var(--heading);
}

#actionModal.family-modal .family-form-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--text);
}

#actionModal.family-modal .family-form-field[hidden] {
  display: none;
}

#actionModal.family-modal .family-form-field > span {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

#actionModal.family-modal .family-form-field input,
#actionModal.family-modal .family-form-field textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  min-width: 0;
  border: 1px solid rgba(232, 215, 204, 0.94);
  border-radius: 12px;
  padding: 11px 12px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--text);
  box-shadow: none;
}

#actionModal.family-modal .family-form-field textarea {
  min-height: 84px;
  resize: vertical;
}

#actionModal.family-modal .family-access-options {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(232, 215, 204, 0.86);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.9);
}

#actionModal.family-modal .family-access-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 63px;
  padding: 12px;
  border-top: 1px solid rgba(232, 215, 204, 0.74);
  background: transparent;
}

#actionModal.family-modal .family-access-option:first-child {
  border-top: 0;
}

#actionModal.family-modal .family-access-option.active {
  background: rgba(243, 216, 202, 0.44);
}

#actionModal.family-modal .family-access-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

#actionModal.family-modal .family-radio-mark {
  position: relative;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
}

#actionModal.family-modal .family-access-option.active .family-radio-mark {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

#actionModal.family-modal .family-access-option.active .family-radio-mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  background: var(--surface-raised);
}

#actionModal.family-modal .family-button-stack {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

#actionModal.family-modal .family-button-stack .rz-button-primary,
#actionModal.family-modal .family-button-stack .rz-button-secondary {
  width: 100%;
  min-height: 45px;
  border-radius: 12px;
}

#actionModal.family-modal .family-summary-card,
#actionModal.family-modal .family-capability-card,
#actionModal.family-modal .family-link-card {
  /* surface unified under .rz-card; layout preserved */
  display: grid;
  gap: 10px;
  padding: 14px;
}

#actionModal.family-modal .family-summary-card span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.25;
}

#actionModal.family-modal .family-summary-card strong {
  color: var(--text);
  font-style: normal;
}

#actionModal.family-modal .family-summary-card em {
  color: var(--text);
  font-style: normal;
  font-weight: 750;
  text-align: right;
}

#actionModal.family-modal .family-capability-card span {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.28;
}

#actionModal.family-modal .family-capability-card .rz-icon-bubble {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
}

#actionModal.family-modal .family-qr-placeholder {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 188px;
  height: 188px;
  margin: 14px auto 0;
  padding: 18px;
  border: 1px solid rgba(232, 215, 204, 0.9);
  border-radius: 18px;
  background: var(--surface-raised);
}

#actionModal.family-modal .family-qr-placeholder span {
  border-radius: 6px;
  background:
    linear-gradient(90deg, var(--heading) 0 45%, transparent 45% 58%, var(--heading) 58% 100%),
    linear-gradient(0deg, var(--heading) 0 42%, transparent 42% 60%, var(--heading) 60% 100%);
  opacity: 0.88;
}

#actionModal.family-modal .family-link-card {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-align: center;
}

#actionModal.family-modal .family-profile-hero {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px 0 2px;
  text-align: center;
}

#actionModal.family-modal .family-profile-hero .family-avatar {
  width: 72px;
  height: 72px;
  border-radius: 26px;
}

#actionModal.family-modal .family-profile-hero .family-avatar::before {
  width: 36px;
  height: 36px;
}

#actionModal.family-modal .family-profile-hero p,
#actionModal.family-modal .family-profile-hero small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}

#actionModal.family-modal .family-danger-button {
  width: 100%;
  min-height: 45px;
  border: 1px solid rgba(164, 90, 80, 0.32);
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
}

#actionModal.family-modal .family-segments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  padding: 4px;
  border: 1px solid rgba(232, 215, 204, 0.86);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.82);
}

#actionModal.family-modal .family-segments button {
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 800;
  box-shadow: none;
}

#actionModal.family-modal .family-segments button.active {
  background: var(--accent-strong);
  color: var(--on-accent);
}

#actionModal.family-modal .family-task-list {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(232, 215, 204, 0.86);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.9);
}

#actionModal.family-modal .family-task-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 63px;
  padding: 11px 12px;
  border: 0;
  border-top: 1px solid rgba(232, 215, 204, 0.74);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  box-shadow: none;
}

#actionModal.family-modal .family-task-row:first-child {
  border-top: 0;
}

#actionModal.family-modal .family-task-check {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  background: transparent;
}

#actionModal.family-modal .family-task-row.done .family-task-check {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

#actionModal.family-modal .family-task-row.done .family-task-check::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 7px;
  height: 10px;
  border: solid var(--surface-raised);
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}

#actionModal.family-modal .family-task-row.done .family-row-title {
  color: var(--muted);
}

#actionModal.family-modal .family-loading-indicator {
  width: 28px;
  height: 28px;
  margin-top: 10px;
  border: 3px solid var(--line);
  border-top-color: var(--accent-strong);
  border-radius: 999px;
  animation: familySpin 0.75s linear infinite;
}

@keyframes familySpin {
  to { transform: rotate(360deg); }
}

#actionModal.family-modal .family-modal-nav {
  width: min(calc(100% - 28px), 520px);
  z-index: 8;
}

#actionModal.family-modal .family-modal-nav .nav-button {
  min-width: 0;
}

#actionModal.family-modal .family-modal-nav .family-nav-icon {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  border: 0;
  background: transparent;
  color: currentColor;
  box-shadow: none;
}

#actionModal.family-modal .family-modal-nav .family-nav-icon::before,
#actionModal.family-modal .family-ref-row .rz-icon-bubble::before,
#actionModal.family-modal .family-capability-card .rz-icon-bubble::before {
  border: 0;
  border-radius: 0;
  background: currentColor;
  -webkit-mask: var(--rz-icon-mask) center / contain no-repeat;
  mask: var(--rz-icon-mask) center / contain no-repeat;
}

#actionModal.family-modal .family-ref-row .rz-icon-bubble {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: none;
}

#actionModal.family-modal .rz-icon-bubble[data-rz-icon="home"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 11 8-7 8 7'/%3E%3Cpath d='M6 10v10h12V10M10 20v-6h4v6'/%3E%3C/svg%3E");
}

.rz-core-more .rz-icon-bubble[data-rz-icon="calendar"]::before,
#actionModal.family-modal .rz-icon-bubble[data-rz-icon="calendar"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='15' rx='3'/%3E%3Cpath d='M8 3v4M16 3v4M4 10h16'/%3E%3C/svg%3E");
}

#actionModal.family-modal .rz-icon-bubble[data-rz-icon="baby"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='13' r='6'/%3E%3Cpath d='M9 10h.01M15 10h.01M9.5 15c1.4 1 3.6 1 5 0M8 4l2.5 3M16 4l-2.5 3'/%3E%3C/svg%3E");
}

#actionModal.family-modal .rz-icon-bubble[data-rz-icon="family"],
.rz-core-more .rz-icon-bubble[data-rz-icon="family"],
#actionModal.family-modal .rz-icon-bubble[data-rz-icon="people"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='9' r='2.5'/%3E%3Ccircle cx='16' cy='9' r='2.5'/%3E%3Cpath d='M4 19c.8-3 2.5-4.5 4-4.5s3.2 1.5 4 4.5M12 19c.8-3 2.5-4.5 4-4.5s3.2 1.5 4 4.5'/%3E%3C/svg%3E");
}

#actionModal.family-modal .rz-icon-bubble[data-rz-icon="more"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='6' r='1.5'/%3E%3Ccircle cx='18' cy='6' r='1.5'/%3E%3Ccircle cx='6' cy='18' r='1.5'/%3E%3Ccircle cx='18' cy='18' r='1.5'/%3E%3C/svg%3E");
}

#actionModal.family-modal .rz-icon-bubble[data-rz-icon="plus"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
}

#actionModal.family-modal .rz-icon-bubble[data-rz-icon="task"]::before,
#actionModal.family-modal .rz-icon-bubble[data-rz-icon="journal"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='16' rx='3'/%3E%3Cpath d='M9 9h6M9 13h6M9 17h4M7.5 9l.8.8 1.4-1.6'/%3E%3C/svg%3E");
}

#actionModal.family-modal .rz-icon-bubble[data-rz-icon="settings"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 3v3M12 18v3M4.2 7.5l2.6 1.5M17.2 15l2.6 1.5M19.8 7.5 17.2 9M6.8 15l-2.6 1.5M3 12h3M18 12h3'/%3E%3C/svg%3E");
}

#actionModal.family-modal .rz-icon-bubble[data-rz-icon="user"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3.2'/%3E%3Cpath d='M5.5 19c1.2-4 4-6 6.5-6s5.3 2 6.5 6'/%3E%3C/svg%3E");
}

#actionModal.family-modal .rz-icon-bubble[data-rz-icon="telegram"]::before,
#actionModal.family-modal .rz-icon-bubble[data-rz-icon="share"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12 20 5l-4 14-4-5-4 4 1-6z'/%3E%3C/svg%3E");
}

#actionModal.family-modal .rz-icon-bubble[data-rz-icon="link"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7 0l2-2a5 5 0 0 0-7-7l-1.2 1.2'/%3E%3Cpath d='M14 11a5 5 0 0 0-7 0l-2 2a5 5 0 0 0 7 7l1.2-1.2'/%3E%3C/svg%3E");
}

#actionModal.family-modal .rz-icon-bubble[data-rz-icon="qr"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 5h5v5H5zM14 5h5v5h-5zM5 14h5v5H5zM14 14h2v2h-2zM18 14h1v5h-5v-1h4zM14 18h1'/%3E%3C/svg%3E");
}

#actionModal.family-modal .rz-icon-bubble[data-rz-icon="check"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4 10-10'/%3E%3C/svg%3E");
}

@media (max-width: 360px) {
  #actionModal.family-modal .family-screen-body {
    padding-left: 14px;
    padding-right: 14px;
  }

  #actionModal.family-modal .family-ref-row {
    grid-template-columns: 34px minmax(0, 1fr) auto 10px;
    gap: 8px;
    padding-left: 10px;
    padding-right: 10px;
  }

  #actionModal.family-modal .family-row-status {
    max-width: 72px;
    font-size: 10px;
  }
}

/* FAMILY FINAL ALIGNMENT V1: match core Bot Zabot screens and remove temporary styling. */
#actionModal.family-modal #modalFields {
  padding: calc(14px + env(safe-area-inset-top)) 14px 0 !important;
}

#actionModal.family-modal .family-reference-screen {
  background: linear-gradient(180deg, var(--surface-raised) 0%, var(--bg) 58%, var(--surface) 100%) !important;
}

#actionModal.family-modal .family-reference-header {
  position: relative !important;
  top: auto !important;
  box-sizing: border-box;
  width: calc(100% - 8px);
  max-width: calc(100% - 8px);
  min-height: 66px;
  margin: 0 4px 14px;
  padding: 13px 12px 12px;
  border: 1px solid rgba(243, 230, 225, 0.95);
  border-radius: 21px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 241, 0.92)),
    var(--surface-raised);
  box-shadow: 0 8px 22px rgba(139, 62, 56, 0.055);
}

#actionModal.family-modal .family-reference-header.is-root {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
  padding-left: 22px;
}

#actionModal.family-modal .family-reference-header.has-back {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
  padding-left: 10px;
}

#actionModal.family-modal .family-header-copy {
  align-self: center;
  min-width: 0;
  overflow: hidden;
  text-align: left;
}

#actionModal.family-modal .family-reference-header.has-back .family-header-copy {
  text-align: center;
}

#actionModal.family-modal .family-header-title {
  display: block;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  color: #8B3E38;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(17px, 4.8vw, 18.5px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#actionModal.family-modal .family-header-subtitle {
  display: none;
}

#actionModal.family-modal .family-header-button,
#actionModal.family-modal .family-header-spacer {
  box-sizing: border-box;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
}

#actionModal.family-modal .family-header-button {
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(243, 230, 225, 0.98);
  border-radius: 999px;
  background: #FDF1EB;
  color: #A24A3F;
  box-shadow: none;
}

#actionModal.family-modal .family-back-button {
  justify-self: start;
  padding-bottom: 2px;
  font: 400 23px/1 Georgia, "Times New Roman", serif;
}

#actionModal.family-modal .family-header-action {
  justify-self: end;
  font: 800 18px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#actionModal.family-modal .family-header-action-menu {
  font-size: 0;
}

#actionModal.family-modal .family-header-action-menu::before {
  content: "...";
  font: 800 15px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 1px;
}

#actionModal.family-modal .family-header-action-save {
  width: auto;
  min-width: 76px;
  padding: 0 10px;
  font-size: 12px;
}

#actionModal.family-modal .family-screen-body {
  gap: 14px;
  padding: 0 4px calc(136px + env(safe-area-inset-bottom)) !important;
}

#actionModal.family-modal[data-family-screen*="family-invite-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-join-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-access-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-action-sheet-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-member-actions-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-task-form-screen"] .family-screen-body {
  padding-bottom: calc(34px + env(safe-area-inset-bottom)) !important;
}

#actionModal.family-modal .family-empty-state {
  display: grid;
  gap: 14px;
}

/* family-hero-card surface override removed — provided by canonical .rz-card */

#actionModal.family-modal .family-empty-card {
  align-items: center;
}

#actionModal.family-modal .family-illustration.is-fallback {
  display: none;
}

#actionModal.family-modal .family-hero-card:has(.family-illustration.is-fallback) {
  grid-template-columns: minmax(0, 1fr);
}

#actionModal.family-modal .family-avatar,
#actionModal.family-modal .family-avatar-mother,
#actionModal.family-modal .family-avatar-grandmother,
#actionModal.family-modal .family-avatar-aunt,
#actionModal.family-modal .family-avatar-nanny,
#actionModal.family-modal .family-avatar-father,
#actionModal.family-modal .family-avatar-grandfather {
  background: #FDF1EB;
  color: #A24A3F;
}

#actionModal.family-modal .family-row-status {
  color: var(--muted);
}

#actionModal.family-modal .family-capability-card .rz-icon-bubble {
  background: #FDF1EB;
  color: #A24A3F;
}

#actionModal.family-modal .family-capability-card span {
  color: var(--text);
}

#actionModal.family-modal .family-ref-row {
  min-height: 61px;
}

#actionModal.family-modal .family-member-ref-row:not(:has(.family-row-status)) {
  grid-template-columns: 36px minmax(0, 1fr) 12px;
}

#actionModal.family-modal .family-action-row {
  grid-template-columns: 36px minmax(0, 1fr) 12px;
}

@media (max-width: 360px) {
  #actionModal.family-modal #modalFields {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  #actionModal.family-modal .family-reference-header {
    width: calc(100% - 6px);
    max-width: calc(100% - 6px);
    margin-left: 3px;
    margin-right: 3px;
  }

  #actionModal.family-modal .family-reference-header.is-root {
    padding-left: 18px;
  }
}

/* FAMILY FINAL ALIGNMENT V2: scroll, safe-area and text scale corrections. */
#actionModal.family-modal .modal {
  height: 100dvh !important;
  min-height: 100dvh !important;
  max-height: 100dvh !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

#actionModal.family-modal #modalFields {
  min-height: auto !important;
  overflow: visible !important;
  padding-bottom: 0 !important;
  scroll-padding-bottom: calc(180px + env(safe-area-inset-bottom));
}

#actionModal.family-modal .family-reference-screen {
  min-height: auto !important;
  overflow: visible !important;
}

#actionModal.family-modal .family-screen-body {
  padding-bottom: calc(184px + env(safe-area-inset-bottom)) !important;
}

#actionModal.family-modal[data-family-screen*="family-invite-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-join-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-access-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-action-sheet-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-member-actions-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-task-form-screen"] .family-screen-body {
  padding-bottom: calc(78px + env(safe-area-inset-bottom)) !important;
}

#actionModal.family-modal .family-header-title {
  font-size: 18px !important;
  line-height: 1.12 !important;
  letter-spacing: 0 !important;
}

#actionModal.family-modal .family-section-title,
#actionModal.family-modal .family-field-title {
  font-size: 13px !important;
  line-height: 1.18 !important;
}

#actionModal.family-modal .family-hero-title,
#actionModal.family-modal .family-row-title,
#actionModal.family-modal .family-row-copy strong,
#actionModal.family-modal .family-access-option .family-row-copy strong {
  font-size: 13.2px !important;
  line-height: 1.15 !important;
  letter-spacing: 0 !important;
}

#actionModal.family-modal .family-hero-text,
#actionModal.family-modal .family-row-text,
#actionModal.family-modal .family-row-copy small,
#actionModal.family-modal .family-access-option .family-row-copy small,
#actionModal.family-modal .family-summary-card span,
#actionModal.family-modal .family-profile-hero p,
#actionModal.family-modal .family-profile-hero small {
  font-size: 11.2px !important;
  line-height: 1.24 !important;
  letter-spacing: 0 !important;
}

#actionModal.family-modal .family-row-status {
  max-width: 104px !important;
  color: var(--muted) !important;
  font-size: 10.5px !important;
  line-height: 1.16 !important;
}

#actionModal.family-modal .family-centered-panel h4,
#actionModal.family-modal .family-profile-hero h4 {
  font-size: 16px !important;
  line-height: 1.16 !important;
  letter-spacing: 0 !important;
}

#actionModal.family-modal .family-ref-row {
  min-height: 57px !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

#actionModal.family-modal .family-profile-hero {
  gap: 5px !important;
  padding-top: 8px !important;
}

#actionModal.family-modal .family-profile-hero .family-avatar {
  width: 66px !important;
  height: 66px !important;
  border-radius: 24px !important;
}

#actionModal.family-modal .family-capability-card span {
  font-size: 11.8px !important;
  line-height: 1.24 !important;
}

/* FAMILY HELP-LIBRARY ALIGNMENT V3 */
#actionModal.family-modal #modalFields {
  padding-top: calc(14px + env(safe-area-inset-top)) !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}

#actionModal.family-modal .family-reference-screen {
  background: linear-gradient(180deg, var(--surface-raised) 0%, var(--bg) 58%, var(--surface) 100%) !important;
}

#actionModal.family-modal .family-reference-header {
  width: calc(100% - 8px) !important;
  max-width: calc(100% - 8px) !important;
  min-height: 66px !important;
  margin: 0 4px 14px !important;
  border-radius: 24px !important;
  border-color: rgba(243, 230, 225, 0.96) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 249, 246, 0.86)),
    #FFF9F6 !important;
  box-shadow: 0 8px 22px rgba(140, 58, 54, 0.045) !important;
}

#actionModal.family-modal .family-reference-header.is-root {
  grid-template-columns: minmax(0, 1fr) 34px !important;
  gap: 10px !important;
  padding: 13px 12px 12px 22px !important;
}

#actionModal.family-modal .family-reference-header.has-back {
  grid-template-columns: 34px minmax(0, 1fr) 34px !important;
  gap: 8px !important;
  padding: 13px 12px 12px 10px !important;
}

#actionModal.family-modal .family-header-title {
  color: #8B3E38 !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(17px, 4.8vw, 18.5px) !important;
  font-weight: 800 !important;
  line-height: 1.12 !important;
}

#actionModal.family-modal .family-header-button,
#actionModal.family-modal .family-header-spacer {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  border: 1px solid rgba(243, 230, 225, 0.98) !important;
  background: #FDF1EB !important;
  color: #8B3E38 !important;
  box-shadow: none !important;
}

#actionModal.family-modal .family-header-spacer {
  visibility: hidden !important;
  border-color: transparent !important;
  background: transparent !important;
}

#actionModal.family-modal .family-reference-header.has-save-action {
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
}

#actionModal.family-modal .family-header-action-save {
  width: auto !important;
  min-width: 82px !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  font-size: 11.6px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

#actionModal.family-modal .family-screen-body {
  gap: 14px !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
}

#actionModal.family-modal .family-section {
  gap: 8px !important;
}

#actionModal.family-modal .family-section-title,
#actionModal.family-modal .family-field-title {
  color: #4F403A !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 12.8px !important;
  font-weight: 800 !important;
  line-height: 1.16 !important;
}

#actionModal.family-modal .family-hero-card {
  /* surface unified under .rz-card; layout preserved */
  grid-template-columns: 78px minmax(0, 1fr) !important;
  gap: 10px !important;
  min-height: 86px !important;
  padding: 10px !important;
}

#actionModal.family-modal .family-illustration {
  width: 78px !important;
  height: 66px !important;
  border-radius: 16px !important;
  background: transparent !important;
}

#actionModal.family-modal .family-centered-panel .family-illustration {
  width: 132px !important;
  height: 132px !important;
}

#actionModal.family-modal .family-ref-list,
#actionModal.family-modal .family-task-list,
#actionModal.family-modal .family-access-options,
/* family summary/capability/link surface override removed — provided by canonical .rz-card */

#actionModal.family-modal .family-ref-row {
  min-height: 54px !important;
  grid-template-columns: 36px minmax(0, 1fr) auto 12px !important;
  gap: 9px !important;
  padding: 8px 10px !important;
}

#actionModal.family-modal .family-member-ref-row:not(:has(.family-row-status)),
#actionModal.family-modal .family-action-row {
  grid-template-columns: 36px minmax(0, 1fr) 12px !important;
}

#actionModal.family-modal .family-activity-row {
  grid-template-columns: 36px minmax(0, 1fr) auto !important;
}

#actionModal.family-modal .family-avatar,
#actionModal.family-modal .family-ref-row .rz-icon-bubble {
  width: 34px !important;
  height: 34px !important;
  flex-basis: 34px !important;
  border-radius: 13px !important;
  background: #FDF1EB !important;
  color: #A24A3F !important;
}

#actionModal.family-modal .family-hero-title,
#actionModal.family-modal .family-row-title,
#actionModal.family-modal .family-row-copy strong,
#actionModal.family-modal .family-access-option .family-row-copy strong {
  color: #4F403A !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  font-weight: 700 !important;
}

#actionModal.family-modal .family-hero-text,
#actionModal.family-modal .family-row-text,
#actionModal.family-modal .family-row-copy small,
#actionModal.family-modal .family-access-option .family-row-copy small,
#actionModal.family-modal .family-summary-card span,
#actionModal.family-modal .family-profile-hero p,
#actionModal.family-modal .family-profile-hero small {
  color: #8B7A70 !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
  font-weight: 500 !important;
}

#actionModal.family-modal .family-row-status {
  max-width: 92px !important;
  color: #8B7A70 !important;
  font-size: 10px !important;
  line-height: 1.16 !important;
  font-weight: 650 !important;
}

#actionModal.family-modal .family-role-choice,
#actionModal.family-modal .family-assignee-choice {
  min-height: 40px !important;
  border-color: #F0DED3 !important;
  border-radius: 12px !important;
  background: rgba(255, 248, 241, 0.72) !important;
  color: #4F403A !important;
  font-size: 11.6px !important;
  font-weight: 700 !important;
}

#actionModal.family-modal .family-role-choice.active,
#actionModal.family-modal .family-assignee-choice.active {
  border-color: rgba(162, 74, 63, 0.28) !important;
  background: #FDF1EB !important;
  color: #8B3E38 !important;
}

#actionModal.family-modal .family-access-option {
  min-height: 58px !important;
  padding: 10px !important;
}

#actionModal.family-modal .family-form-field > span {
  font-size: 11.8px !important;
}

#actionModal.family-modal .family-form-field input,
#actionModal.family-modal .family-form-field textarea {
  min-height: 42px !important;
  border-radius: 12px !important;
  font-size: 12px !important;
}

#actionModal.family-modal .family-button-stack .rz-button-primary,
#actionModal.family-modal .family-button-stack .rz-button-secondary,
#actionModal.family-modal .family-danger-button {
  min-height: 40px !important;
  border-radius: 999px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
}

#actionModal.family-modal .family-button-stack .rz-button-primary {
  border: 1px solid #A24A3F !important;
  background: linear-gradient(180deg, #B65349, #9D4038) !important;
  color: #FFFFFF !important;
  box-shadow: 0 8px 18px rgba(162, 74, 63, 0.18) !important;
}

#actionModal.family-modal .family-button-stack .rz-button-secondary,
#actionModal.family-modal .family-danger-button {
  border: 1px solid #C96E64 !important;
  background: #FFF8F1 !important;
  color: #A24A3F !important;
  box-shadow: none !important;
}

#actionModal.family-modal .family-segments {
  padding: 4px !important;
  border-color: #F0DED3 !important;
  border-radius: 17px !important;
  background: rgba(255, 255, 255, 0.92) !important;
}

#actionModal.family-modal .family-segments button {
  min-height: 34px !important;
  border-radius: 13px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
}

#actionModal.family-modal .family-segments button.active {
  background: #A24A3F !important;
  color: #FFFFFF !important;
}

#actionModal.family-modal .family-profile-hero {
  gap: 4px !important;
  padding: 6px 0 0 !important;
}

#actionModal.family-modal .family-profile-hero .family-avatar {
  width: 62px !important;
  height: 62px !important;
  border-radius: 22px !important;
}

#actionModal.family-modal .family-centered-panel h4,
#actionModal.family-modal .family-profile-hero h4 {
  color: #8B3E38 !important;
  font-size: 15.5px !important;
  line-height: 1.16 !important;
}

#actionModal.family-modal .family-capability-card span {
  font-size: 11.5px !important;
  line-height: 1.24 !important;
}

#actionModal.family-modal .family-capability-card .rz-icon-bubble {
  background: #FDF1EB !important;
  color: #A24A3F !important;
}

#actionModal.family-modal .family-modal-nav {
  z-index: 38 !important;
  width: min(364px, calc(100% - 22px)) !important;
  padding: 6px 7px !important;
  border: 1px solid rgba(243, 230, 225, 0.96) !important;
  border-radius: 23px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 14px 38px rgba(140, 58, 54, 0.11) !important;
}

#actionModal.family-modal .family-modal-nav .nav-button {
  min-height: 48px !important;
  display: grid !important;
  justify-items: center !important;
  align-content: center !important;
  gap: 4px !important;
  padding: 6px 2px 5px !important;
  border: 0 !important;
  border-radius: 17px !important;
  background: transparent !important;
  color: #8A7E7D !important;
  font-size: 9.5px !important;
  line-height: 1.05 !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

#actionModal.family-modal .family-modal-nav .nav-button.active {
  background: #FDF1EB !important;
  color: #A24A3F !important;
}

#actionModal.family-modal .family-modal-nav .nav-button::before,
#actionModal.family-modal .family-modal-nav .nav-button::after {
  content: none !important;
  display: none !important;
}

#actionModal.family-modal .family-modal-nav .family-nav-icon {
  width: 17px !important;
  height: 17px !important;
  flex-basis: 17px !important;
  margin: 0 !important;
  opacity: 0.82 !important;
}

#actionModal.family-modal .family-modal-nav .family-nav-icon::before,
#actionModal.family-modal .family-ref-row .rz-icon-bubble::before,
#actionModal.family-modal .family-capability-card .rz-icon-bubble::before {
  width: 18px !important;
  height: 18px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: currentColor !important;
  -webkit-mask: var(--rz-icon-mask) center / contain no-repeat !important;
  mask: var(--rz-icon-mask) center / contain no-repeat !important;
}

#actionModal.family-modal .rz-icon-bubble[data-rz-icon="medication"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3h6l1 4v12a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2V7l1-4z'/%3E%3Cpath d='M8 8h8M10 13h4M12 11v4'/%3E%3C/svg%3E");
}

#actionModal.family-modal .rz-icon-bubble[data-rz-icon="skill"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4l2.1 4.3 4.7.7-3.4 3.3.8 4.7-4.2-2.2L7.8 17l.8-4.7L5.2 9l4.7-.7z'/%3E%3Cpath d='M12 15v5'/%3E%3C/svg%3E");
}

#actionModal.family-modal .rz-icon-bubble[data-rz-icon="moodHappy"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M9 10h.01M15 10h.01M8.5 14.5c1.7 2 5.3 2 7 0'/%3E%3C/svg%3E");
}

#actionModal.family-modal .rz-icon-bubble[data-rz-icon="document"]::before,
#actionModal.family-modal .rz-icon-bubble[data-rz-icon="note"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h7l4 4v14H7z'/%3E%3Cpath d='M14 3v5h5M10 12h6M10 16h5'/%3E%3C/svg%3E");
}

#actionModal.family-modal .rz-icon-bubble[data-rz-icon="vaccine"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 3l5 5M14 5l5 5M6 19l8-8M4 21l2-2M10 7l7 7M8 9l7 7M12 5l7 7'/%3E%3C/svg%3E");
}

#actionModal.family-modal .rz-icon-bubble[data-rz-icon="growth"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 20V4M5 20h14M9 16l3-4 3 2 4-7'/%3E%3Cpath d='M17 7h2v2'/%3E%3C/svg%3E");
}

@media (max-width: 360px) {
  #actionModal.family-modal .family-reference-header {
    width: calc(100% - 6px) !important;
    max-width: calc(100% - 6px) !important;
    margin-left: 3px !important;
    margin-right: 3px !important;
  }

  #actionModal.family-modal .family-reference-header.is-root {
    padding-left: 18px !important;
  }
}

/* CHILD HELP-LIBRARY ALIGNMENT V4 */
.rz-core-child .rz-child-page {
  gap: 14px !important;
  padding-top: 14px !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}

.rz-core-child .rz-child-titlebar {
  width: calc(100% - 8px) !important;
  max-width: calc(100% - 8px) !important;
  min-height: 66px !important;
  margin: 0 4px 14px !important;
  border-radius: 24px !important;
  border-color: rgba(243, 230, 225, 0.96) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 249, 246, 0.86)),
    #FFF9F6 !important;
  box-shadow: 0 8px 22px rgba(140, 58, 54, 0.045) !important;
}

.rz-core-child[data-child-view="main"] .rz-child-titlebar {
  grid-template-columns: minmax(0, 1fr) 34px !important;
  padding: 13px 12px 12px 22px !important;
}

.rz-core-child:not([data-child-view="main"]) .rz-child-titlebar {
  grid-template-columns: 34px minmax(0, 1fr) 34px !important;
  padding: 13px 12px 12px 10px !important;
}

.rz-core-child .rz-child-title {
  color: #8B3E38 !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(17px, 4.8vw, 18.5px) !important;
  font-weight: 800 !important;
  line-height: 1.12 !important;
}

.rz-core-child .rz-child-subtitle {
  color: #8B7A70 !important;
  font-size: 10.8px !important;
  font-weight: 500 !important;
  line-height: 1.24 !important;
}

.rz-core-child .rz-child-back-button,
.rz-core-child .rz-child-add-button,
.rz-core-child .rz-child-refresh-button {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  border-color: rgba(243, 230, 225, 0.98) !important;
  background: #FDF1EB !important;
  color: #8B3E38 !important;
  box-shadow: none !important;
}

.rz-core-child .rz-profile-card,
.rz-core-child .rz-child-master-list,
.rz-core-child .rz-child-insight-list,
.rz-core-child .rz-child-sub-list,
.rz-core-child .rz-child-health .rz-health-menu,
.rz-core-child .rz-development-reference,
.rz-core-child .rz-child-dynamics > .book-page-card,
.rz-core-child .rz-child-dynamics .weekly-card {
  width: calc(100% - 8px) !important;
  max-width: calc(100% - 8px) !important;
  margin-left: 4px !important;
  margin-right: 4px !important;
  border-color: #F0DED3 !important;
  border-radius: 17px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 249, 244, 0.88)),
    #FFFFFF !important;
  box-shadow: 0 7px 18px rgba(140, 58, 54, 0.04) !important;
}

.rz-core-child .rz-profile-card {
  padding: 10px !important;
}

.rz-core-child .rz-profile-top {
  grid-template-columns: 56px minmax(0, 1fr) 12px !important;
  gap: 10px !important;
}

.rz-core-child .rz-avatar {
  width: 56px !important;
  height: 56px !important;
  border-radius: 18px !important;
}

.rz-core-child #profileChildName {
  color: #4F403A !important;
  font-size: 15.5px !important;
  line-height: 1.12 !important;
}

.rz-core-child .age-secondary,
.rz-core-child .rz-child-birth {
  color: #8B7A70 !important;
  font-size: 10.4px !important;
  line-height: 1.2 !important;
  font-weight: 500 !important;
}

.rz-core-child .child-segments {
  width: calc(100% - 8px) !important;
  max-width: calc(100% - 8px) !important;
  min-height: 42px !important;
  margin: 0 4px 14px !important;
  padding: 4px !important;
  gap: 4px !important;
  border-color: #F0DED3 !important;
  border-radius: 17px !important;
  background: rgba(255, 255, 255, 0.92) !important;
}

.rz-core-child .segment-button {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 5px !important;
  border-radius: 13px !important;
  color: #4F403A !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  line-height: 1.08 !important;
}

.rz-core-child:not([data-child-view="main"]) .segment-button.active {
  border-color: rgba(162, 74, 63, 0.18) !important;
  background: #FDF1EB !important;
  color: #8B3E38 !important;
  box-shadow: none !important;
}

.rz-core-child[data-child-view="main"] .segment-button,
.rz-core-child[data-child-view="main"] .segment-button.active {
  background: transparent !important;
  color: #4F403A !important;
  box-shadow: none !important;
}

.rz-core-child .rz-child-master-row,
.rz-core-child .rz-child-insight-row,
.rz-core-child .rz-child-sub-list .rz-core-row,
.rz-core-child .rz-child-health .rz-core-row {
  min-height: 54px !important;
  grid-template-columns: 34px minmax(0, 1fr) auto 12px !important;
  gap: 9px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

.rz-core-child .rz-child-master-row .rz-icon-bubble,
.rz-core-child .rz-child-insight-row .rz-icon-bubble,
.rz-core-child .rz-child-sub-list .rz-icon-bubble,
.rz-core-child .rz-child-health .rz-core-row .rz-icon-bubble {
  width: 34px !important;
  height: 34px !important;
  flex-basis: 34px !important;
  border-radius: 13px !important;
  background: #FDF1EB !important;
  color: #A24A3F !important;
}

.rz-core-child .rz-child-master-row .rz-topic-title,
.rz-core-child .rz-child-insight-row .rz-topic-title,
.rz-core-child .rz-child-sub-list .rz-topic-title,
.rz-core-child .rz-child-health .rz-topic-title {
  color: #4F403A !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
}

.rz-core-child .rz-child-master-row .rz-topic-text,
.rz-core-child .rz-child-insight-row .rz-topic-text,
.rz-core-child .rz-child-sub-list .rz-topic-text,
.rz-core-child .rz-child-health .rz-topic-text {
  color: #8B7A70 !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
  font-weight: 500 !important;
}

.rz-core-child .rz-child-row-meta,
.rz-core-child .rz-child-event-time,
.rz-core-child .chart-latest {
  color: #8B7A70 !important;
  font-size: 10px !important;
  line-height: 1.16 !important;
  font-weight: 650 !important;
}

.rz-core-child .rz-core-section-header,
.rz-core-child .section-head {
  margin: 0 4px 8px !important;
}

.rz-core-child .rz-core-section-header h2,
.rz-core-child .section-head h2,
.rz-core-child .chart-title {
  color: #4F403A !important;
  font-size: 12.8px !important;
  font-weight: 800 !important;
  line-height: 1.16 !important;
}

.rz-core-child .rz-development-reference .rz-topic-row {
  min-height: 54px !important;
  padding: 8px 10px !important;
}

.rz-core-child .rz-development-reference .rz-topic-title {
  font-size: 12px !important;
  font-weight: 700 !important;
}

.rz-core-child .rz-development-reference .rz-topic-text {
  font-size: 10px !important;
  line-height: 1.2 !important;
}

#actionModal.family-modal .family-segments {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

#actionModal.family-modal .family-segments button,
#actionModal.family-modal .family-assignee-choice {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#actionModal.family-modal .family-assignee-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

#actionModal.family-modal .family-assignee-choice {
  display: grid !important;
  place-items: center !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

@media (max-width: 360px) {
  .rz-core-child .rz-child-page {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .rz-core-child .rz-child-titlebar,
  .rz-core-child .child-segments,
  .rz-core-child .rz-profile-card,
  .rz-core-child .rz-child-master-list,
  .rz-core-child .rz-child-insight-list,
  .rz-core-child .rz-child-sub-list,
  .rz-core-child .rz-child-health .rz-health-menu,
  .rz-core-child .rz-development-reference,
  .rz-core-child .rz-child-dynamics > .book-page-card,
  .rz-core-child .rz-child-dynamics .weekly-card {
    width: calc(100% - 6px) !important;
    max-width: calc(100% - 6px) !important;
    margin-left: 3px !important;
    margin-right: 3px !important;
  }
}

/* FAMILY NAV FLASH + CHILD RHYTHM FIX V1 */
body[data-active-tab="family"] .topbar {
  display: none !important;
}

.rz-core-child .rz-child-page {
  gap: 14px !important;
  padding-top: 14px !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}

.rz-core-child .rz-child-titlebar {
  margin: 0 4px !important;
}

.rz-core-child .rz-profile-card,
.rz-core-child .child-segments,
.rz-core-child .rz-child-master-list,
.rz-core-child .rz-child-insight-list,
.rz-core-child .rz-child-sub-list,
.rz-core-child .rz-child-health .rz-health-menu,
.rz-core-child .rz-development-reference,
.rz-core-child .rz-child-dynamics > .book-page-card,
.rz-core-child .rz-child-dynamics .weekly-card {
  width: calc(100% - 8px) !important;
  max-width: calc(100% - 8px) !important;
  margin-left: 4px !important;
  margin-right: 4px !important;
}

.rz-core-child .child-segments {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.rz-core-child .rz-child-master-list,
.rz-core-child .rz-child-insight-list,
.rz-core-child .rz-child-sub-list,
.rz-core-child .rz-child-health .rz-health-menu,
.rz-core-child .rz-development-reference,
.rz-core-child .rz-child-dynamics > .book-page-card,
.rz-core-child .rz-child-dynamics .weekly-card {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.rz-core-child .rz-profile-card {
  min-height: 88px !important;
}

.rz-core-child .rz-profile-top {
  min-height: 66px !important;
  align-items: center !important;
}

@media (max-width: 360px) {
  .rz-core-child .rz-child-page {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .rz-core-child .rz-child-titlebar,
  .rz-core-child .child-segments,
  .rz-core-child .rz-profile-card,
  .rz-core-child .rz-child-master-list,
  .rz-core-child .rz-child-insight-list,
  .rz-core-child .rz-child-sub-list,
  .rz-core-child .rz-child-health .rz-health-menu,
  .rz-core-child .rz-development-reference,
  .rz-core-child .rz-child-dynamics > .book-page-card,
  .rz-core-child .rz-child-dynamics .weekly-card {
    width: calc(100% - 6px) !important;
    max-width: calc(100% - 6px) !important;
    margin-left: 3px !important;
    margin-right: 3px !important;
  }
}

/* App Shell: CHILD WIDTH MATCH FAMILY V1 removed — canonical .app handles width. */

.rz-core-child {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.rz-core-child .rz-child-page {
  width: 100% !important;
  max-width: 100% !important;
  gap: 14px !important;
  padding-top: 14px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.rz-core-child .rz-child-titlebar,
.rz-core-child .rz-profile-card,
.rz-core-child .child-segments,
.rz-core-child .rz-child-master-list,
.rz-core-child .rz-child-insight-list,
.rz-core-child .rz-child-sub-list,
.rz-core-child .rz-child-health .rz-health-menu,
.rz-core-child .rz-development-reference,
.rz-core-child .rz-child-dynamics > .book-page-card,
.rz-core-child .rz-child-dynamics .weekly-card {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.rz-core-child .rz-child-titlebar,
.rz-core-child .child-segments,
.rz-core-child .rz-child-master-list,
.rz-core-child .rz-child-insight-list,
.rz-core-child .rz-child-sub-list,
.rz-core-child .rz-child-health .rz-health-menu,
.rz-core-child .rz-development-reference,
.rz-core-child .rz-child-dynamics > .book-page-card,
.rz-core-child .rz-child-dynamics .weekly-card {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

@media (max-width: 360px) {
  body[data-active-tab="child"] .app {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .rz-core-child .rz-child-titlebar,
  .rz-core-child .child-segments,
  .rz-core-child .rz-profile-card,
  .rz-core-child .rz-child-master-list,
  .rz-core-child .rz-child-insight-list,
  .rz-core-child .rz-child-sub-list,
  .rz-core-child .rz-child-health .rz-health-menu,
  .rz-core-child .rz-development-reference,
  .rz-core-child .rz-child-dynamics > .book-page-card,
  .rz-core-child .rz-child-dynamics .weekly-card {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* Do not create screen-specific visual duplicates. Use DESIGN_SYSTEM.md. */
/* CANON SHELL ALIGNMENT V1: Home is the width and rhythm reference. */
:root {
  --rz-canon-shell: 390px;
  --rz-canon-side: 14px;
  --rz-canon-nav: 364px;
}

/* App Shell: today/child width force removed — canonical .app already uses canon shell. */

#actionModal .modal {
  width: min(100%, var(--rz-canon-shell)) !important;
  max-width: var(--rz-canon-shell) !important;
}

#actionModal.family-modal .modal,
#actionModal.help-library-modal .modal {
  width: min(100%, var(--rz-canon-shell)) !important;
  max-width: var(--rz-canon-shell) !important;
}

.today-reference-screen .today-reference-page,
.rz-core-child .rz-child-page {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  gap: 14px !important;
}

.today-reference-screen .today-header-card,
.rz-core-child .rz-child-titlebar,
#actionModal.family-modal .family-reference-header,
#actionModal.help-library-modal .rz-help-library .rz-help-library-header,
#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back,
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back,
#actionModal.help-library-modal .rz-assistant-screen > .rz-header-with-back {
  box-sizing: border-box !important;
  width: calc(100% - 8px) !important;
  max-width: calc(100% - 8px) !important;
  min-height: 66px !important;
  margin: 0 4px 14px !important;
  border: 1px solid rgba(243, 230, 225, 0.96) !important;
  border-radius: 24px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 249, 246, 0.86)),
    #FFF9F6 !important;
  box-shadow: 0 8px 22px rgba(140, 58, 54, 0.045) !important;
  overflow: hidden !important;
}

.today-reference-screen .today-header-card,
.rz-core-child[data-child-view="main"] .rz-child-titlebar,
#actionModal.family-modal .family-reference-header.is-root {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 34px !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 13px 12px 12px 22px !important;
}

.rz-core-child:not([data-child-view="main"]) .rz-child-titlebar,
#actionModal.family-modal .family-reference-header.has-back,
#actionModal.help-library-modal .rz-help-library .rz-help-library-header,
#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back,
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back,
#actionModal.help-library-modal .rz-assistant-screen > .rz-header-with-back {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) 34px !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 13px 12px 12px 10px !important;
}

.topbar .title,
.today-reference-screen .today-header-title,
.rz-core-child .rz-child-title,
#actionModal.family-modal .family-header-title,
#actionModal.help-library-modal .rz-help-library .rz-help-library-header .rz-title,
#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back .rz-title,
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back .rz-title,
#actionModal.help-library-modal .rz-assistant-screen > .rz-header-with-back .rz-title {
  color: var(--accent-strong) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(17px, 4.8vw, 18.5px) !important;
  font-weight: 800 !important;
  line-height: 1.12 !important;
  letter-spacing: 0 !important;
}

.today-reference-screen .today-header-date,
.rz-core-child .rz-child-subtitle,
#actionModal.family-modal .family-header-subtitle,
#actionModal.help-library-modal .rz-help-library .rz-help-library-header .rz-subtitle,
#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back .rz-subtitle,
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back .rz-subtitle,
#actionModal.help-library-modal .rz-assistant-screen > .rz-header-with-back .rz-subtitle {
  color: var(--muted) !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 10.8px !important;
  font-weight: 500 !important;
  line-height: 1.24 !important;
  letter-spacing: 0 !important;
}

.topbar .icon-button,
.today-reference-screen .today-refresh-button,
.rz-core-child .rz-child-back-button,
.rz-core-child .rz-child-add-button,
.rz-core-child .rz-child-refresh-button,
#actionModal.family-modal .family-header-button,
#actionModal.family-modal .family-header-spacer,
#actionModal.help-library-modal .rz-help-library .rz-refresh-action,
#actionModal.help-library-modal .rz-help-library .rz-back-button,
#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back .rz-back-button,
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back .rz-back-button,
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back .rz-bookmark-button,
#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back .rz-bookmark-button,
#actionModal.help-library-modal .rz-assistant-screen > .rz-header-with-back .rz-back-button {
  box-sizing: border-box !important;
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  border: 1px solid rgba(243, 230, 225, 0.98) !important;
  border-radius: 999px !important;
  background: #FDF1EB !important;
  color: var(--accent-strong) !important;
  box-shadow: none !important;
}

#actionModal.family-modal .family-header-spacer {
  visibility: hidden !important;
  border-color: transparent !important;
  background: transparent !important;
}

#actionModal.family-modal .family-header-action-save {
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  overflow: hidden !important;
  color: transparent !important;
  font-size: 0 !important;
}

#actionModal.family-modal #modalFields {
  padding: calc(14px + env(safe-area-inset-top)) var(--rz-canon-side) 0 !important;
}

#actionModal.family-modal .family-reference-screen {
  width: 100% !important;
  max-width: 100% !important;
}

#actionModal.family-modal .family-screen-body {
  width: 100% !important;
  max-width: 100% !important;
  gap: 14px !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
}

#actionModal.family-modal .family-section-title,
#actionModal.family-modal .family-field-title,
.rz-core-child .rz-core-section-header h2,
.rz-core-child .section-head h2,
.rz-core-child .chart-title {
  color: var(--text) !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 12.8px !important;
  font-weight: 800 !important;
  line-height: 1.16 !important;
}

.rz-core-child .segment-button,
#actionModal.family-modal .family-segments button {
  min-width: 0 !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 5px !important;
  border-radius: 13px !important;
  color: var(--text) !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  line-height: 1.08 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.rz-core-child .child-segments,
#actionModal.family-modal .family-segments {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 4px !important;
  gap: 4px !important;
  border: 1px solid #F0DED3 !important;
  border-radius: 17px !important;
  background: rgba(255, 255, 255, 0.92) !important;
}

.rz-core-child:not([data-child-view="main"]) .segment-button.active {
  border-color: rgba(162, 74, 63, 0.18) !important;
  background: #FDF1EB !important;
  color: var(--accent-strong) !important;
  box-shadow: none !important;
}

#actionModal.family-modal .family-segments {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

#actionModal.family-modal .family-segments button.active {
  background: var(--accent-strong) !important;
  color: #FFFFFF !important;
}

#actionModal.family-modal .family-assignee-grid,
#actionModal.family-modal .family-role-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

#actionModal.family-modal .family-assignee-choice,
#actionModal.family-modal .family-role-choice {
  min-width: 0 !important;
  min-height: 40px !important;
  padding: 8px 10px !important;
  overflow: hidden !important;
  border-radius: 12px !important;
  text-overflow: ellipsis !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

#actionModal.family-modal .family-ref-row,
.rz-core-child .rz-child-master-row,
.rz-core-child .rz-child-insight-row,
.rz-core-child .rz-child-sub-list .rz-core-row,
.rz-core-child .rz-child-health .rz-core-row {
  min-height: 54px !important;
}

#actionModal.family-modal .family-row-title,
.rz-core-child .rz-topic-title {
  color: var(--text) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
}

#actionModal.family-modal .family-row-text,
#actionModal.family-modal .family-row-status,
.rz-core-child .rz-topic-text,
.rz-core-child .rz-child-row-meta,
.rz-core-child .rz-child-event-time,
.rz-core-child .chart-latest {
  color: var(--muted) !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
}

#actionModal.family-modal .family-activity-row .rz-icon-bubble,
#actionModal.family-modal .family-ref-row .rz-icon-bubble {
  display: grid !important;
  place-items: center !important;
}

#actionModal.family-modal .family-button-stack .rz-button-primary,
#actionModal.family-modal .family-button-stack .rz-button-secondary,
#actionModal.family-modal .family-danger-button {
  width: 100% !important;
  min-height: 40px !important;
  border-radius: 999px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
}

.bottom-nav,
#actionModal.family-modal .family-modal-nav,
#actionModal.help-library-modal .rz-help-bottom-nav {
  width: min(var(--rz-canon-nav), calc(100% - 22px)) !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
}

@media (max-width: 360px) {
  body[data-active-tab="today"] .app,
  body[data-active-tab="child"] .app {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  #actionModal.family-modal #modalFields {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* FAMILY SCROLL REACHABILITY V1 */
#actionModal.family-modal[data-family-screen*="family-home-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-members-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-member-profile-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-management-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-task-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-task-form-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-activity-screen"] .family-screen-body {
  padding-bottom: calc(184px + env(safe-area-inset-bottom)) !important;
}

#actionModal.family-modal[data-family-screen*="family-invite-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-join-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-access-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-action-sheet-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-member-actions-screen"] .family-screen-body,
#actionModal.family-modal[data-family-screen*="family-role-screen"] .family-screen-body {
  padding-bottom: calc(78px + env(safe-area-inset-bottom)) !important;
}

/* App Shell: MORE NAV CENTER V1 width force removed — canonical .app already uses canon shell. */

.rz-core-more .rz-more-page {
  display: grid !important;
  width: 100% !important;
  max-width: 100% !important;
  gap: 14px !important;
  padding-bottom: calc(112px + env(safe-area-inset-bottom)) !important;
}

.rz-core-more .rz-more-card {
  box-sizing: border-box !important;
  width: calc(100% - 8px) !important;
  max-width: calc(100% - 8px) !important;
  margin: 0 4px !important;
  padding: 8px 12px !important;
  overflow: hidden !important;
  border-color: var(--line) !important;
  border-radius: 17px !important;
  background: var(--surface-raised) !important;
  box-shadow: 0 7px 18px rgba(140, 58, 54, 0.04) !important;
}

.rz-core-more .rz-more-card .rz-block-title {
  margin: 2px 0 4px !important;
  color: var(--text) !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 12.8px !important;
  font-weight: 800 !important;
  line-height: 1.16 !important;
}

.rz-core-more .rz-more-card-list {
  display: grid !important;
  width: 100% !important;
}

.rz-core-more .rz-core-row {
  grid-template-columns: 34px minmax(0, 1fr) 12px !important;
  min-height: 54px !important;
  gap: 9px !important;
  padding: 8px 0 !important;
  border-bottom: 1px solid var(--line) !important;
}

.rz-core-more .rz-core-row:last-child {
  border-bottom: 0 !important;
}

.rz-core-more .rz-core-row .rz-icon-bubble {
  width: 34px !important;
  height: 34px !important;
  flex-basis: 34px !important;
  border-radius: 13px !important;
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
}

.rz-core-more .rz-topic-copy {
  min-width: 0 !important;
}

.rz-core-more .rz-topic-title {
  display: block !important;
  color: var(--text) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
}

.rz-core-more .rz-topic-text {
  display: block !important;
  margin-top: 3px !important;
  color: var(--muted) !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
}

.rz-core-more .rz-chevron {
  justify-self: end !important;
  color: var(--accent-strong) !important;
  font-size: 17px !important;
  line-height: 1 !important;
}

@media (max-width: 360px) {
  body[data-active-tab="more"] .app {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* MORE INNER SCREENS CANON V1 */
#actionModal.more-inner-modal {
  align-items: stretch !important;
  padding: 0 !important;
  background: var(--bg) !important;
  backdrop-filter: none !important;
}

#actionModal.more-inner-modal .modal {
  width: min(100%, var(--rz-canon-shell)) !important;
  max-width: var(--rz-canon-shell) !important;
  min-height: 100dvh !important;
  max-height: 100dvh !important;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow-y: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background:
    linear-gradient(180deg, var(--surface-raised) 0%, var(--bg) 48%, var(--surface) 100%) !important;
  box-shadow: none !important;
  animation: none !important;
}

#actionModal.more-inner-modal .modal > h3,
#actionModal.more-inner-modal .modal > .result,
#actionModal.more-inner-modal .modal-actions {
  display: none !important;
}

#actionModal.more-inner-modal #modalFields {
  min-height: 100% !important;
  padding: calc(14px + env(safe-area-inset-top)) var(--rz-canon-side) 0 !important;
  overflow: visible !important;
}

#actionModal.more-inner-modal .more-inner-screen {
  display: grid !important;
  align-content: start !important;
  gap: 14px !important;
  min-height: 100dvh !important;
  padding-bottom: calc(112px + env(safe-area-inset-bottom)) !important;
  color: var(--text) !important;
}

#actionModal.more-inner-modal .more-reference-header {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) 34px !important;
  align-items: center !important;
  gap: 8px !important;
  width: calc(100% - 8px) !important;
  min-height: 66px !important;
  margin: 0 4px !important;
  padding: 13px 12px 12px 10px !important;
  border: 1px solid var(--line) !important;
  border-radius: 24px !important;
  background: var(--surface-raised) !important;
  box-shadow: 0 8px 22px rgba(140, 58, 54, 0.045) !important;
}

#actionModal.more-inner-modal .more-header-copy {
  display: grid !important;
  min-width: 0 !important;
  text-align: center !important;
}

#actionModal.more-inner-modal .more-header-title {
  color: var(--accent-strong) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(17px, 4.8vw, 18.5px) !important;
  font-weight: 800 !important;
  line-height: 1.12 !important;
}

#actionModal.more-inner-modal .more-header-subtitle {
  margin-top: 2px !important;
  color: var(--muted) !important;
  font-size: 10.8px !important;
  font-weight: 500 !important;
  line-height: 1.24 !important;
}

#actionModal.more-inner-modal .more-header-button {
  box-sizing: border-box !important;
  display: grid !important;
  place-items: center !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
  box-shadow: none !important;
  font-size: 20px !important;
  line-height: 1 !important;
}

#actionModal.more-inner-modal .more-header-button .rz-icon-bubble {
  width: 18px !important;
  height: 18px !important;
  flex-basis: 18px !important;
  border: 0 !important;
  background: transparent !important;
}

#actionModal.more-inner-modal .more-inner-body {
  display: grid !important;
  gap: 14px !important;
  width: 100% !important;
}

#actionModal.more-inner-modal .more-inner-card,
#actionModal.more-inner-modal .more-about-hero,
#actionModal.more-inner-modal .more-pdf-card {
  box-sizing: border-box !important;
  width: calc(100% - 8px) !important;
  max-width: calc(100% - 8px) !important;
  margin: 0 4px !important;
  padding: 8px 12px !important;
  overflow: hidden !important;
  border: 1px solid var(--line) !important;
  border-radius: 17px !important;
  background: var(--surface-raised) !important;
  box-shadow: 0 7px 18px rgba(140, 58, 54, 0.04) !important;
}

#actionModal.more-inner-modal .more-card-title {
  margin: 2px 0 4px !important;
  color: var(--text) !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 12.8px !important;
  font-weight: 800 !important;
  line-height: 1.16 !important;
}

#actionModal.more-inner-modal .more-card-list {
  display: grid !important;
}

#actionModal.more-inner-modal .rz-core-row {
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
  min-height: 54px !important;
  gap: 9px !important;
  padding: 8px 0 !important;
  border-bottom: 1px solid var(--line) !important;
  color: var(--text) !important;
}

#actionModal.more-inner-modal .rz-core-row:last-child {
  border-bottom: 0 !important;
}

#actionModal.more-inner-modal .rz-icon-bubble {
  width: 34px !important;
  height: 34px !important;
  flex-basis: 34px !important;
  border-radius: 13px !important;
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
  box-shadow: none !important;
}

#actionModal.more-inner-modal .rz-icon-bubble[data-rz-icon="user"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3.2'/%3E%3Cpath d='M5.5 19c1.2-4 4-6 6.5-6s5.3 2 6.5 6'/%3E%3C/svg%3E");
}

#actionModal.more-inner-modal .rz-icon-bubble[data-rz-icon="file"],
#actionModal.more-inner-modal .rz-icon-bubble[data-rz-icon="document"],
#actionModal.more-inner-modal .rz-icon-bubble[data-rz-icon="journal"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 4h7l4 4v12H7z'/%3E%3Cpath d='M14 4v5h5M10 13h6M10 16h4'/%3E%3C/svg%3E");
}

#actionModal.more-inner-modal .rz-icon-bubble[data-rz-icon="gear"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 3v3M12 18v3M4.2 7.5l2.6 1.5M17.2 15l2.6 1.5M19.8 7.5 17.2 9M6.8 15l-2.6 1.5M3 12h3M18 12h3'/%3E%3C/svg%3E");
}

#actionModal.more-inner-modal .rz-icon-bubble[data-rz-icon="calendar"]::before,
#actionModal.more-inner-modal .rz-icon-bubble[data-rz-icon="clock"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='15' rx='3'/%3E%3Cpath d='M8 3v4M16 3v4M4 10h16'/%3E%3C/svg%3E");
}

#actionModal.more-inner-modal .rz-icon-bubble[data-rz-icon="ruler"]::before,
#actionModal.more-inner-modal .rz-icon-bubble[data-rz-icon="scale"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 20h14M7 17c4-8 6-8 10 0M8 13h8M10 9h4M12 5v15'/%3E%3C/svg%3E");
}

#actionModal.more-inner-modal .rz-topic-copy {
  min-width: 0 !important;
}

#actionModal.more-inner-modal .rz-topic-title {
  color: var(--text) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
}

#actionModal.more-inner-modal .rz-topic-text,
#actionModal.more-inner-modal .more-card-note,
#actionModal.more-inner-modal .more-document-meta,
#actionModal.more-inner-modal .field label {
  color: var(--muted) !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
}

#actionModal.more-inner-modal .more-row-meta {
  justify-self: end !important;
  max-width: 112px !important;
  color: var(--muted) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  text-align: right !important;
}

#actionModal.more-inner-modal .rz-chevron {
  color: var(--accent-strong) !important;
  font-size: 17px !important;
  line-height: 1 !important;
}

#actionModal.more-inner-modal .more-form-card,
#actionModal.more-inner-modal .more-document-row,
#actionModal.more-inner-modal .more-medical-row {
  display: grid !important;
  gap: 9px !important;
}

#actionModal.more-inner-modal .field {
  display: grid !important;
  gap: 5px !important;
  margin: 0 !important;
}

#actionModal.more-inner-modal input,
#actionModal.more-inner-modal select,
#actionModal.more-inner-modal textarea {
  width: 100% !important;
  min-height: 40px !important;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
}

#actionModal.more-inner-modal textarea {
  min-height: 78px !important;
}

#actionModal.more-inner-modal .more-button-row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-top: 4px !important;
}

#actionModal.more-inner-modal .rz-button-primary,
#actionModal.more-inner-modal .rz-button-secondary {
  min-height: 40px !important;
  border-radius: 999px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
}

#actionModal.more-inner-modal .rz-button-secondary.danger,
#actionModal.more-inner-modal .more-row-action {
  color: var(--accent-strong) !important;
}

#actionModal.more-inner-modal .more-sticky-button {
  width: calc(100% - 8px) !important;
  margin: 0 4px !important;
}

#actionModal.more-inner-modal .setting-row {
  grid-template-columns: 34px minmax(0, 1fr) 40px !important;
}

#actionModal.more-inner-modal .switch {
  width: 40px !important;
  height: 24px !important;
}

#actionModal.more-inner-modal .switch-track::after {
  width: 16px !important;
  height: 16px !important;
}

#actionModal.more-inner-modal .switch input:checked + .switch-track::after {
  transform: translateX(16px) !important;
}

#actionModal.more-inner-modal .more-about-hero,
#actionModal.more-inner-modal .more-pdf-card {
  display: grid !important;
  grid-template-columns: 72px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 14px !important;
}

#actionModal.more-inner-modal .more-about-visual {
  display: grid !important;
  place-items: center !important;
  width: 72px !important;
  height: 72px !important;
  overflow: hidden !important;
  border-radius: 18px !important;
  background: var(--accent-soft) !important;
}

#actionModal.more-inner-modal .more-about-visual img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

#actionModal.more-inner-modal .more-about-copy {
  display: grid !important;
  gap: 4px !important;
}

#actionModal.more-inner-modal .more-about-title {
  color: var(--accent-strong) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.12 !important;
}

#actionModal.more-inner-modal .more-about-version,
#actionModal.more-inner-modal .more-about-text {
  color: var(--muted) !important;
  font-size: 10.8px !important;
  line-height: 1.24 !important;
}

@media (max-width: 360px) {
  #actionModal.more-inner-modal #modalFields {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  #actionModal.more-inner-modal .more-button-row {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   GLOBAL FORM NORMALIZATION (Home / More canon) — des7 pass.
   Consistent field sizing across every modal/screen + no iOS zoom.
   ============================================================ */
#actionModal input,
#actionModal select,
#actionModal textarea,
.field input,
.field select,
.field textarea,
.today-modal-field input,
.today-modal-field select,
.today-modal-field textarea {
  font-size: 16px !important;
}

/* STRUCTURAL SCREEN NORMALIZATION V1 */
#actionModal.more-inner-modal .more-profile-summary {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 54px !important;
}

#actionModal.more-inner-modal .more-profile-summary .rz-icon-bubble {
  width: 34px !important;
  height: 34px !important;
  border-radius: 13px !important;
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
}

#actionModal.more-inner-modal .rz-core-row[disabled] {
  opacity: 0.72 !important;
  pointer-events: none !important;
}

#actionModal.rz-core-modal:not(.more-inner-modal):not(.family-modal):not(.today-entry-modal):not(.today-form-modal):not(.help-library-modal) {
  align-items: flex-end !important;
  padding: 14px var(--rz-canon-side) calc(14px + env(safe-area-inset-bottom)) !important;
}

#actionModal.rz-core-modal:not(.more-inner-modal):not(.family-modal):not(.today-entry-modal):not(.today-form-modal):not(.help-library-modal) .modal {
  width: min(100%, var(--rz-canon-shell)) !important;
  max-width: var(--rz-canon-shell) !important;
  max-height: calc(100dvh - 28px) !important;
  padding: 16px !important;
  border: 1px solid var(--line) !important;
  border-radius: 24px !important;
  background: var(--surface-raised) !important;
  box-shadow: 0 14px 38px rgba(140, 58, 54, 0.11) !important;
}

#actionModal.rz-core-modal:not(.more-inner-modal):not(.family-modal):not(.today-entry-modal):not(.today-form-modal):not(.help-library-modal) .modal h3 {
  margin-bottom: 4px !important;
  color: var(--accent-strong) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1.12 !important;
  letter-spacing: 0 !important;
}

#actionModal.rz-core-modal:not(.more-inner-modal):not(.family-modal):not(.today-entry-modal):not(.today-form-modal):not(.help-library-modal) .modal > .result {
  margin-bottom: 12px !important;
  color: var(--muted) !important;
  font-size: 11px !important;
  line-height: 1.3 !important;
}

#actionModal.rz-core-modal:not(.more-inner-modal):not(.family-modal):not(.today-entry-modal):not(.today-form-modal):not(.help-library-modal) #modalFields {
  display: grid !important;
  gap: 12px !important;
}

#actionModal.rz-core-modal:not(.more-inner-modal):not(.family-modal):not(.today-entry-modal):not(.today-form-modal):not(.help-library-modal) .modal-actions {
  margin-top: 12px !important;
}

#actionModal.rz-core-modal:not(.more-inner-modal):not(.family-modal):not(.today-entry-modal):not(.today-form-modal):not(.help-library-modal) .more-form-card {
  display: grid !important;
  gap: 8px !important;
  padding: 12px !important;
  border: 1px solid var(--line) !important;
  border-radius: 18px !important;
  background: var(--surface) !important;
  box-shadow: none !important;
}

#actionModal.rz-core-modal:not(.more-inner-modal):not(.family-modal):not(.today-entry-modal):not(.today-form-modal):not(.help-library-modal) .more-card-title {
  margin: 0 !important;
  color: var(--text) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
}

#actionModal.rz-core-modal:not(.more-inner-modal):not(.family-modal):not(.today-entry-modal):not(.today-form-modal):not(.help-library-modal) .more-card-note {
  margin: 0 !important;
  color: var(--muted) !important;
  font-size: 10.8px !important;
  line-height: 1.28 !important;
}

#actionModal.rz-core-modal:not(.more-inner-modal):not(.family-modal):not(.today-entry-modal):not(.today-form-modal):not(.help-library-modal) .more-button-row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

#actionModal.rz-core-modal:not(.more-inner-modal):not(.family-modal):not(.today-entry-modal):not(.today-form-modal):not(.help-library-modal) .more-button-row .rz-button-secondary {
  display: grid !important;
  place-items: center !important;
  min-height: 38px !important;
  padding: 9px 10px !important;
  border: 1px solid rgba(162, 74, 63, 0.22) !important;
  border-radius: 12px !important;
  background: var(--surface-raised) !important;
  color: var(--accent-strong) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  text-align: center !important;
}

#actionModal .document-file-preview {
  display: grid !important;
  gap: 8px !important;
  margin-top: 2px !important;
}

#actionModal .document-file-preview[hidden] {
  display: none !important;
}

#actionModal .document-preview-row {
  min-height: 44px !important;
  padding: 0 !important;
  border-bottom: 0 !important;
}

#actionModal.family-modal .family-modal-nav .family-nav-icon {
  display: none !important;
}

#actionModal.family-modal .family-modal-nav .nav-button::before {
  content: "" !important;
  display: block !important;
  width: 17px !important;
  height: 17px !important;
  background: currentColor !important;
  -webkit-mask: var(--nav-icon-mask) center / contain no-repeat !important;
          mask: var(--nav-icon-mask) center / contain no-repeat !important;
}

#actionModal.family-modal .family-modal-nav .nav-button::after {
  content: none !important;
  display: none !important;
}

#actionModal.family-modal .family-section,
#actionModal.family-modal .family-empty-state {
  display: grid !important;
  gap: 10px !important;
}

#actionModal.family-modal .family-ref-list,
#actionModal.family-modal .family-task-list,
#actionModal.family-modal .family-access-options,
#actionModal.family-modal .family-summary-card,
#actionModal.family-modal .family-capability-card {
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 360px) {
  #actionModal.rz-core-modal:not(.more-inner-modal):not(.family-modal):not(.today-entry-modal):not(.today-form-modal):not(.help-library-modal) .more-button-row {
    grid-template-columns: 1fr !important;
  }
}

/* MAIN TAB SHELL NORMALIZATION V1 */
[data-tab-panel="today"] .rz-page.rz-home,
.rz-core-child .rz-child-page {
  display: grid !important;
  width: 100% !important;
  max-width: 100% !important;
  gap: 14px !important;
  padding-bottom: calc(112px + env(safe-area-inset-bottom)) !important;
}

[data-tab-panel="today"] .rz-current-card,
[data-tab-panel="today"] .rz-list-card,
.rz-core-child .rz-child-titlebar,
.rz-core-child .rz-profile-card,
.rz-core-child .child-segments,
.rz-core-child .rz-child-master-list,
.rz-core-child .rz-child-insight-list,
.rz-core-child .rz-child-sub-list,
.rz-core-child .rz-child-health .rz-health-menu,
.rz-core-child .rz-development-reference,
.rz-core-child .rz-child-dynamics > .book-page-card,
.rz-core-child .rz-child-dynamics .weekly-card,
#actionModal.family-modal .family-reference-header,
#actionModal.family-modal .family-hero-card,
#actionModal.family-modal .family-ref-list,
#actionModal.family-modal .family-task-list,
#actionModal.family-modal .family-access-options,
#actionModal.family-modal .family-summary-card,
#actionModal.family-modal .family-capability-card,
#actionModal.family-modal .family-link-card,
#actionModal.family-modal .family-qr-card {
  box-sizing: border-box !important;
  width: calc(100% - 8px) !important;
  max-width: calc(100% - 8px) !important;
  margin-left: 4px !important;
  margin-right: 4px !important;
  border: 1px solid var(--line) !important;
  border-radius: 18px !important;
  background: var(--surface-raised) !important;
  box-shadow: 0 7px 18px rgba(140, 58, 54, 0.04) !important;
}

[data-tab-panel="today"] .rz-current-card {
  padding: 12px 13px 10px !important;
}

[data-tab-panel="today"] .rz-list-card,
.rz-core-child .rz-child-master-list,
.rz-core-child .rz-child-insight-list,
.rz-core-child .rz-child-sub-list,
.rz-core-child .rz-child-health .rz-health-menu,
#actionModal.family-modal .family-ref-list,
#actionModal.family-modal .family-task-list {
  overflow: hidden !important;
  padding: 8px 12px !important;
}

.rz-core-child .rz-child-titlebar,
#actionModal.family-modal .family-reference-header {
  min-height: 66px !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  border-radius: 24px !important;
  box-shadow: 0 8px 22px rgba(140, 58, 54, 0.045) !important;
}

.rz-core-child[data-child-view="main"] .rz-child-titlebar,
#actionModal.family-modal .family-reference-header.is-root {
  grid-template-columns: minmax(0, 1fr) 34px !important;
  padding: 13px 12px 12px 22px !important;
  text-align: left !important;
}

.rz-core-child:not([data-child-view="main"]) .rz-child-titlebar,
#actionModal.family-modal .family-reference-header.has-back {
  grid-template-columns: 34px minmax(0, 1fr) 34px !important;
  padding: 13px 12px 12px 10px !important;
}

#actionModal.family-modal .family-reference-header.has-save-action {
  grid-template-columns: 34px minmax(0, 1fr) minmax(72px, auto) !important;
}

.rz-core-child .rz-child-title-copy,
#actionModal.family-modal .family-header-copy {
  display: grid !important;
  min-width: 0 !important;
  gap: 2px !important;
}

.rz-core-child:not([data-child-view="main"]) .rz-child-title-copy,
#actionModal.family-modal .family-reference-header.has-back .family-header-copy {
  text-align: center !important;
}

.rz-core-child .rz-child-title,
#actionModal.family-modal .family-header-title {
  color: var(--accent-strong) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 19px !important;
  font-weight: 800 !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
}

.rz-core-child .rz-child-subtitle,
#actionModal.family-modal .family-header-subtitle {
  color: var(--muted) !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
}

.rz-core-child .rz-child-back-button,
.rz-core-child .rz-child-add-button,
.rz-core-child .rz-child-refresh-button,
#actionModal.family-modal .family-header-button,
#actionModal.family-modal .family-header-spacer {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
  box-shadow: none !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

#actionModal.family-modal .family-header-spacer {
  visibility: hidden !important;
  border-color: transparent !important;
  background: transparent !important;
}

#actionModal.family-modal .family-header-action-save {
  width: auto !important;
  min-width: 72px !important;
  max-width: none !important;
  padding: 0 10px !important;
  color: var(--accent-strong) !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
}

.rz-core-child .rz-profile-card {
  min-height: 74px !important;
  padding: 10px 12px !important;
}

.rz-core-child .rz-profile-top {
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) 12px !important;
  align-items: center !important;
  gap: 10px !important;
}

.rz-core-child .rz-avatar {
  width: 46px !important;
  height: 46px !important;
  border-radius: 16px !important;
}

.rz-core-child .rz-profile-card .rz-title {
  color: var(--text) !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  line-height: 1.16 !important;
}

.rz-core-child .rz-profile-card .rz-age-pill {
  display: none !important;
}

.rz-core-child .rz-profile-card .age-secondary,
.rz-core-child .rz-profile-card .rz-child-birth,
.rz-core-child .rz-profile-card .result {
  color: var(--muted) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

.rz-core-child .rz-profile-card .result:empty {
  display: none !important;
}

.rz-core-child .child-segments,
#actionModal.family-modal .family-segments {
  display: grid !important;
  min-height: 42px !important;
  padding: 4px !important;
  gap: 4px !important;
  border-radius: 17px !important;
}

.rz-core-child .child-segments {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.rz-core-child .segment-button,
#actionModal.family-modal .family-segments button {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 5px !important;
  border-radius: 13px !important;
  font-size: 11.2px !important;
  font-weight: 700 !important;
  line-height: 1.05 !important;
  letter-spacing: 0 !important;
}

[data-tab-panel="today"] .rz-core-row,
[data-tab-panel="today"] .rz-event-row,
.rz-core-child .rz-child-master-row,
.rz-core-child .rz-child-insight-row,
.rz-core-child .rz-child-sub-list .rz-core-row,
.rz-core-child .rz-child-health .rz-core-row,
#actionModal.family-modal .family-ref-row,
#actionModal.family-modal .family-task-row,
#actionModal.family-modal .family-activity-row {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 9px !important;
  width: 100% !important;
  min-height: 54px !important;
  padding: 8px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  text-align: left !important;
}

[data-tab-panel="today"] .rz-event-row:last-child,
[data-tab-panel="today"] .rz-core-row:last-child,
.rz-core-child .rz-child-master-row:last-child,
.rz-core-child .rz-child-insight-row:last-child,
.rz-core-child .rz-child-sub-list .rz-core-row:last-child,
.rz-core-child .rz-child-health .rz-core-row:last-child,
#actionModal.family-modal .family-ref-row:last-child,
#actionModal.family-modal .family-task-row:last-child,
#actionModal.family-modal .family-activity-row:last-child {
  border-bottom: 0 !important;
}

[data-tab-panel="today"] .rz-event-row {
  grid-template-columns: 31px minmax(0, 1fr) auto !important;
  min-height: 38px !important;
  gap: 8px !important;
  padding: 3px 0 !important;
  border-bottom: 0 !important;
}

[data-tab-panel="today"] .rz-event-list {
  gap: 5px !important;
}

[data-tab-panel="today"] .rz-icon-bubble,
.rz-core-child .rz-icon-bubble,
#actionModal.family-modal .rz-icon-bubble,
#actionModal.family-modal .family-avatar {
  width: 34px !important;
  height: 34px !important;
  flex: 0 0 34px !important;
  border: 0 !important;
  border-radius: 13px !important;
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
  box-shadow: none !important;
}

[data-tab-panel="today"] .rz-event-row .rz-icon-bubble {
  width: 31px !important;
  height: 31px !important;
  flex-basis: 31px !important;
  border-radius: 999px !important;
}

[data-tab-panel="today"] .rz-icon-bubble::before,
.rz-core-child .rz-icon-bubble::before,
#actionModal.family-modal .rz-icon-bubble::before,
#actionModal.family-modal .family-avatar::before {
  width: 19px !important;
  height: 19px !important;
}

[data-tab-panel="today"] .rz-event-row .rz-icon-bubble::before {
  width: 20px !important;
  height: 20px !important;
}

[data-tab-panel="today"] .rz-topic-title,
[data-tab-panel="today"] .rz-event-title,
.rz-core-child .rz-topic-title,
#actionModal.family-modal .family-row-title,
#actionModal.family-modal .family-row-copy strong,
#actionModal.family-modal .family-hero-title {
  color: var(--text) !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  letter-spacing: 0 !important;
}

[data-tab-panel="today"] .rz-event-title {
  font-size: 11.8px !important;
}

[data-tab-panel="today"] .rz-topic-text,
[data-tab-panel="today"] .rz-event-note,
[data-tab-panel="today"] .rz-event-time,
.rz-core-child .rz-topic-text,
.rz-core-child .rz-child-row-meta,
.rz-core-child .rz-child-event-time,
.rz-core-child .chart-latest,
#actionModal.family-modal .family-row-text,
#actionModal.family-modal .family-row-status,
#actionModal.family-modal .family-hero-text,
#actionModal.family-modal .family-row-copy small {
  color: var(--muted) !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

[data-tab-panel="today"] .rz-event-note {
  font-size: 10.5px !important;
  font-weight: 500 !important;
}

[data-tab-panel="today"] .rz-event-time,
#actionModal.family-modal .family-row-status {
  justify-self: end !important;
  text-align: right !important;
}

.rz-core-child .rz-core-section-header,
.rz-core-child .section-head,
#actionModal.family-modal .family-section-title,
#actionModal.family-modal .family-field-title {
  margin: 0 4px !important;
}

.rz-core-child .rz-core-section-header h2,
.rz-core-child .section-head h2,
.rz-core-child .chart-title,
#actionModal.family-modal .family-section-title,
#actionModal.family-modal .family-field-title {
  color: var(--text) !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

.rz-core-child .rz-core-section-header p,
.rz-core-child .section-note {
  color: var(--muted) !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
}

#actionModal.family-modal {
  align-items: stretch !important;
  padding: 0 !important;
  background: var(--bg) !important;
  backdrop-filter: none !important;
}

#actionModal.family-modal .modal {
  width: min(100%, var(--rz-canon-shell)) !important;
  max-width: var(--rz-canon-shell) !important;
  min-height: 100dvh !important;
  max-height: 100dvh !important;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow-y: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background:
    linear-gradient(180deg, var(--surface-raised) 0%, var(--bg) 48%, var(--surface) 100%) !important;
  box-shadow: none !important;
  animation: none !important;
}

#actionModal.family-modal .modal > h3,
#actionModal.family-modal .modal > .result,
#actionModal.family-modal .modal > .modal-actions {
  display: none !important;
}

#actionModal.family-modal #modalFields {
  min-height: 100% !important;
  padding: calc(14px + env(safe-area-inset-top)) var(--rz-canon-side) 0 !important;
  overflow: visible !important;
}

#actionModal.family-modal .family-reference-screen {
  display: grid !important;
  align-content: start !important;
  gap: 14px !important;
  min-height: 100dvh !important;
  padding-bottom: calc(112px + env(safe-area-inset-bottom)) !important;
  color: var(--text) !important;
}

#actionModal.family-modal .family-screen-body {
  display: grid !important;
  width: 100% !important;
  max-width: 100% !important;
  gap: 14px !important;
  padding: 0 0 calc(82px + env(safe-area-inset-bottom)) !important;
}

#actionModal.family-modal .family-section,
#actionModal.family-modal .family-empty-state {
  display: grid !important;
  gap: 10px !important;
}

#actionModal.family-modal .family-hero-card {
  display: grid !important;
  grid-template-columns: 62px minmax(0, 1fr) !important;
  align-items: center !important;
  min-height: 84px !important;
  gap: 12px !important;
  padding: 11px 12px !important;
  text-align: left !important;
}

#actionModal.family-modal .family-illustration {
  width: 62px !important;
  height: 62px !important;
  border-radius: 18px !important;
  background: var(--accent-soft) !important;
}

#actionModal.family-modal .family-centered-panel .family-illustration {
  width: 112px !important;
  height: 112px !important;
  border-radius: 28px !important;
}

#actionModal.family-modal .family-centered-panel h4,
#actionModal.family-modal .family-profile-hero h4 {
  color: var(--accent-strong) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  line-height: 1.12 !important;
}

#actionModal.family-modal .family-centered-panel p,
#actionModal.family-modal .family-note {
  color: var(--muted) !important;
  font-size: 10.8px !important;
  font-weight: 600 !important;
  line-height: 1.28 !important;
}

#actionModal.family-modal .family-button-stack .rz-button-primary,
#actionModal.family-modal .family-button-stack .rz-button-secondary,
#actionModal.family-modal .family-danger-button,
#actionModal.family-modal .rz-button-primary,
#actionModal.family-modal .rz-button-secondary {
  min-height: 40px !important;
  border-radius: 999px !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
}

#actionModal.family-modal .family-modal-nav {
  width: min(var(--rz-canon-nav), calc(100% - 22px)) !important;
  left: 50% !important;
  right: auto !important;
  bottom: calc(8px + env(safe-area-inset-bottom)) !important;
  transform: translateX(-50%) !important;
}

#actionModal.family-modal .family-member-ref-row {
  grid-template-columns: 34px minmax(0, 1fr) auto 12px !important;
}

#actionModal.family-modal .family-action-row {
  grid-template-columns: 34px minmax(0, 1fr) 12px !important;
}

#actionModal.family-modal .family-row-status {
  max-width: 82px !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

@media (max-width: 360px) {
  [data-tab-panel="today"] .rz-page.rz-home,
  .rz-core-child .rz-child-page {
    gap: 12px !important;
  }

  #actionModal.family-modal #modalFields {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* VISUAL TOKEN NORMALIZATION V1: Home / More are the color reference. */
body[data-active-tab="today"],
body[data-active-tab="child"],
#actionModal.family-modal {
  --rz-canon-bg: var(--bg);
  --rz-canon-card: #FFFFFF;
  --rz-canon-card-soft: var(--surface-raised);
  --rz-canon-line: #F3E6E1;
  --rz-canon-icon-bg: #FDF1EB;
  --rz-canon-heading: var(--accent-strong);
  --rz-canon-text: var(--text);
  --rz-canon-muted: var(--muted);
  --rz-canon-shadow: 0 8px 24px rgba(140, 58, 54, 0.045);
}

body[data-active-tab="today"] .app,
body[data-active-tab="child"] .app {
  background:
    radial-gradient(circle at 50% -80px, rgba(255, 255, 255, 0.72), transparent 210px),
    var(--background) !important;
}

body[data-active-tab="today"] .topbar,
body[data-active-tab="child"] .topbar,
.rz-core-child .rz-child-titlebar,
#actionModal.family-modal .family-reference-header {
  border-color: var(--rz-canon-line) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 249, 246, 0.86)),
    #FFF9F6 !important;
  box-shadow: var(--rz-canon-shadow) !important;
}

body[data-active-tab="today"] .topbar .title,
body[data-active-tab="child"] .topbar .title,
.rz-core-child .rz-child-title,
#actionModal.family-modal .family-header-title {
  color: var(--rz-canon-heading) !important;
}

body[data-active-tab="today"] .topbar .brand-subtitle,
body[data-active-tab="child"] .topbar .brand-subtitle,
.rz-core-child .rz-child-subtitle,
#actionModal.family-modal .family-header-subtitle {
  color: var(--rz-canon-muted) !important;
}

body[data-active-tab="today"] .topbar .icon-button,
body[data-active-tab="child"] .topbar .icon-button,
.rz-core-child .rz-child-back-button,
.rz-core-child .rz-child-add-button,
.rz-core-child .rz-child-refresh-button,
#actionModal.family-modal .family-header-button {
  border-color: var(--rz-canon-line) !important;
  background: var(--rz-canon-icon-bg) !important;
  color: var(--rz-canon-heading) !important;
}

.rz-core-child .rz-child-add-button[data-child-header-action="refresh"] {
  border-color: rgba(243, 230, 225, 0.98) !important;
  background: #FDF1EB !important;
  color: var(--accent-strong) !important;
}

.rz-core-child .rz-child-add-button[data-child-header-action="refresh"]::before {
  width: 16px !important;
  height: 16px !important;
  background: currentColor !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.85' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6v5h-5'/%3E%3Cpath d='M19.2 13.4A7.2 7.2 0 1 1 17.6 6.8L20 11'/%3E%3C/svg%3E") center / contain no-repeat !important;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.85' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6v5h-5'/%3E%3Cpath d='M19.2 13.4A7.2 7.2 0 1 1 17.6 6.8L20 11'/%3E%3C/svg%3E") center / contain no-repeat !important;
}
.rz-home .rz-event-row {
  grid-template-columns: 31px minmax(0, 1fr) minmax(0, 42px) !important;
}

.rz-home .rz-event-copy,
[data-tab-panel="today"] .rz-event-copy,
.rz-core-child .rz-topic-copy,
#actionModal.family-modal .family-row-copy,
#actionModal.family-modal .family-hero-copy {
  min-width: 0 !important;
}

.rz-home .rz-event-time {
  min-width: 0 !important;
  max-width: 42px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.rz-home .rz-event-note,
[data-tab-panel="today"] .rz-event-note,
.rz-core-child .rz-topic-text,
#actionModal.family-modal .family-row-text,
#actionModal.family-modal .family-hero-text {
  overflow-wrap: anywhere !important;
}

[data-tab-panel="today"] .rz-current-card,
[data-tab-panel="today"] .rz-list-card,
.rz-core-child .rz-profile-card,
.rz-core-child .child-segments,
.rz-core-child .rz-child-master-list,
.rz-core-child .rz-child-insight-list,
.rz-core-child .rz-child-sub-list,
.rz-core-child .rz-child-health .rz-health-menu,
.rz-core-child .rz-development-reference,
.rz-core-child .rz-child-dynamics > .book-page-card,
.rz-core-child .rz-child-dynamics .weekly-card,
#actionModal.family-modal .family-hero-card,
#actionModal.family-modal .family-ref-list,
#actionModal.family-modal .family-task-list,
#actionModal.family-modal .family-access-options,
#actionModal.family-modal .family-summary-card,
#actionModal.family-modal .family-capability-card,
#actionModal.family-modal .family-link-card,
#actionModal.family-modal .family-qr-card {
  border-color: var(--rz-canon-line) !important;
  background: var(--rz-canon-card) !important;
  box-shadow: var(--rz-canon-shadow) !important;
}

[data-tab-panel="today"] .rz-list-card {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

[data-tab-panel="today"] .rz-event-list.is-empty {
  gap: 0 !important;
}

[data-tab-panel="today"] .rz-child-empty-row {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 9px !important;
  min-height: 54px !important;
  padding: 8px 0 !important;
  color: var(--rz-canon-muted) !important;
  font: 600 11px/1.28 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

[data-tab-panel="today"] .rz-child-empty-row .rz-icon-bubble {
  width: 34px !important;
  height: 34px !important;
  flex-basis: 34px !important;
  border-radius: 13px !important;
}

[data-tab-panel="today"] .rz-core-row {
  min-height: 54px !important;
  color: var(--rz-canon-text) !important;
}

[data-tab-panel="today"] .rz-topic-title,
.rz-core-child .rz-topic-title,
#actionModal.family-modal .family-row-title,
#actionModal.family-modal .family-row-copy strong,
#actionModal.family-modal .family-hero-title {
  color: var(--rz-canon-text) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

[data-tab-panel="today"] .rz-topic-text,
[data-tab-panel="today"] .rz-event-note,
[data-tab-panel="today"] .rz-event-time,
.rz-core-child .rz-topic-text,
.rz-core-child .rz-child-row-meta,
.rz-core-child .rz-child-event-time,
.rz-core-child .chart-latest,
#actionModal.family-modal .family-row-text,
#actionModal.family-modal .family-row-status,
#actionModal.family-modal .family-hero-text,
#actionModal.family-modal .family-row-copy small {
  color: var(--rz-canon-muted) !important;
}

[data-tab-panel="today"] .rz-icon-bubble,
.rz-core-child .rz-icon-bubble,
#actionModal.family-modal .rz-icon-bubble,
#actionModal.family-modal .family-avatar,
#actionModal.family-modal .family-avatar-mother,
#actionModal.family-modal .family-avatar-grandmother,
#actionModal.family-modal .family-avatar-aunt,
#actionModal.family-modal .family-avatar-nanny,
#actionModal.family-modal .family-avatar-father,
#actionModal.family-modal .family-avatar-grandfather {
  background: var(--rz-canon-icon-bg) !important;
  color: var(--rz-canon-heading) !important;
}

.rz-core-child .segment-button {
  color: var(--rz-canon-text) !important;
  background: transparent !important;
}

.rz-core-child .segment-button.active,
.rz-core-child:not([data-child-view="main"]) .segment-button.active {
  border-color: rgba(162, 74, 63, 0.16) !important;
  background: var(--rz-canon-icon-bg) !important;
  color: var(--rz-canon-heading) !important;
}

.rz-core-child .rz-profile-card .rz-title {
  color: var(--rz-canon-text) !important;
}

.rz-core-child .rz-profile-card .age-secondary,
.rz-core-child .rz-profile-card .rz-child-birth,
.rz-core-child .rz-profile-card .result {
  color: var(--rz-canon-muted) !important;
}

.rz-core-child .rz-core-section-header h2,
.rz-core-child .section-head h2,
.rz-core-child .chart-title,
#actionModal.family-modal .family-section-title,
#actionModal.family-modal .family-field-title {
  color: var(--rz-canon-text) !important;
}

.rz-core-child .rz-core-section-header p,
.rz-core-child .section-note {
  color: var(--rz-canon-muted) !important;
}

#actionModal.family-modal {
  background:
    radial-gradient(circle at 50% -80px, rgba(255, 255, 255, 0.72), transparent 210px),
    var(--background) !important;
}

#actionModal.family-modal .modal {
  background:
    radial-gradient(circle at 50% -80px, rgba(255, 255, 255, 0.72), transparent 210px),
    var(--background) !important;
}

#actionModal.family-modal .family-reference-screen {
  background: transparent !important;
}

#actionModal.family-modal .family-ref-row,
#actionModal.family-modal .family-member-ref-row,
#actionModal.family-modal .family-action-row,
#actionModal.family-modal .family-task-row,
#actionModal.family-modal .family-activity-row {
  border-bottom-color: var(--rz-canon-line) !important;
}

#actionModal.family-modal .family-member-ref-row {
  grid-template-columns: 34px minmax(0, 1fr) 12px !important;
}

#actionModal.family-modal .family-member-ref-row .family-row-copy {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

#actionModal.family-modal .family-member-ref-row .family-row-status {
  grid-column: 2 !important;
  grid-row: 2 !important;
  justify-self: start !important;
  max-width: 100% !important;
  margin-top: -1px !important;
  text-align: left !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
}

#actionModal.family-modal .family-member-ref-row .rz-chevron {
  grid-column: 3 !important;
  grid-row: 1 / span 2 !important;
  align-self: center !important;
}

#actionModal.family-modal .family-row-status {
  color: var(--rz-canon-muted) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
}

/* CHILD STRUCTURE ALIGNMENT V1: match the Home/More shell rhythm. */
.rz-core-child .rz-child-page {
  padding-top: 0 !important;
  gap: 14px !important;
}

.rz-core-child .rz-child-page > .section,
.rz-core-child .child-section > .section {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.rz-core-child .rz-child-titlebar {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.rz-core-child .rz-profile-card,
.rz-core-child .child-segments,
.rz-core-child .rz-child-master-list,
.rz-core-child .rz-child-insight-list,
.rz-core-child .rz-child-sub-list,
.rz-core-child .rz-child-health .rz-health-menu,
.rz-core-child .rz-development-reference,
.rz-core-child .rz-child-dynamics > .book-page-card,
.rz-core-child .rz-child-dynamics .weekly-card {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.rz-core-child .rz-child-master-row,
.rz-core-child .rz-child-insight-row,
.rz-core-child .rz-child-sub-list .rz-core-row,
.rz-core-child .rz-child-health .rz-core-row {
  grid-template-columns: 34px minmax(0, 1fr) minmax(0, auto) 12px !important;
}

.rz-core-child .rz-child-master-row .rz-topic-copy,
.rz-core-child .rz-child-insight-row .rz-topic-copy,
.rz-core-child .rz-child-sub-list .rz-core-row .rz-topic-copy,
.rz-core-child .rz-child-health .rz-core-row .rz-topic-copy {
  grid-column: 2 !important;
}

.rz-core-child .rz-child-row-meta {
  grid-column: 3 !important;
  justify-self: end !important;
  min-width: 0 !important;
  max-width: 54px !important;
  overflow: hidden !important;
  text-align: right !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.rz-core-child .rz-child-master-row .rz-chevron,
.rz-core-child .rz-child-insight-row .rz-chevron,
.rz-core-child .rz-child-sub-list .rz-core-row .rz-chevron,
.rz-core-child .rz-child-health .rz-core-row .rz-chevron {
  grid-column: 4 !important;
  justify-self: end !important;
  align-self: center !important;
  width: 12px !important;
  min-width: 12px !important;
  text-align: right !important;
  white-space: nowrap !important;
}

/* CHILD SUBSCREEN RHYTHM V1: keep subscreens aligned with the main child page. */
.rz-core-child:not([data-child-view="main"]) .rz-child-title-copy {
  justify-self: stretch !important;
  text-align: left !important;
}

.rz-core-child:not([data-child-view="main"]) .rz-child-title,
.rz-core-child:not([data-child-view="main"]) .rz-child-subtitle {
  text-align: left !important;
}

.rz-core-child:not([data-child-view="main"]) .child-segments,
.rz-core-child .child-segments {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

#actionModal.help-library-modal .rz-help-library {
  gap: 14px !important;
}

#actionModal.help-library-modal .rz-help-library .rz-help-library-header,
#actionModal.help-library-modal .rz-topic-screen > .rz-header-with-back,
#actionModal.help-library-modal .rz-article-screen > .rz-header-with-back,
#actionModal.help-library-modal .rz-assistant-screen > .rz-header-with-back {
  margin-bottom: 0 !important;
}

/* CHILD MENU LIST CANON V1: one list/row rhythm for Health, Development and Dynamics. */
.rz-core-child .rz-health-menu,
.rz-core-child .rz-child-development-menu,
.rz-core-child .rz-child-dynamics-menu {
  box-sizing: border-box !important;
  display: grid !important;
  gap: 0 !important;
  width: calc(100% - 8px) !important;
  max-width: calc(100% - 8px) !important;
  margin: 0 4px !important;
  padding: 8px 12px !important;
  overflow: hidden !important;
  border: 1px solid var(--line) !important;
  border-radius: 17px !important;
  background: var(--surface-raised) !important;
  box-shadow: 0 7px 18px rgba(140, 58, 54, 0.04) !important;
}

.rz-core-child .rz-health-menu .rz-core-row,
.rz-core-child .rz-child-development-menu .rz-core-row,
.rz-core-child .rz-child-dynamics-menu .rz-core-row {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) 12px !important;
  align-items: center !important;
  gap: 9px !important;
  width: 100% !important;
  min-height: 54px !important;
  padding: 8px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  text-align: left !important;
}

.rz-core-child .rz-health-menu .rz-core-row:last-child,
.rz-core-child .rz-child-development-menu .rz-core-row:last-child,
.rz-core-child .rz-child-dynamics-menu .rz-core-row:last-child {
  border-bottom: 0 !important;
}

.rz-core-child .rz-health-menu .rz-core-row .rz-icon-bubble,
.rz-core-child .rz-child-development-menu .rz-core-row .rz-icon-bubble,
.rz-core-child .rz-child-dynamics-menu .rz-core-row .rz-icon-bubble {
  width: 34px !important;
  height: 34px !important;
  flex: 0 0 34px !important;
  border: 0 !important;
  border-radius: 13px !important;
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
  box-shadow: none !important;
}

.rz-core-child .rz-health-menu .rz-core-row .rz-icon-bubble::before,
.rz-core-child .rz-child-development-menu .rz-core-row .rz-icon-bubble::before,
.rz-core-child .rz-child-dynamics-menu .rz-core-row .rz-icon-bubble::before {
  width: 19px !important;
  height: 19px !important;
}

.rz-core-child .rz-health-menu .rz-topic-copy,
.rz-core-child .rz-child-development-menu .rz-topic-copy,
.rz-core-child .rz-child-dynamics-menu .rz-topic-copy {
  grid-column: 2 !important;
  min-width: 0 !important;
}

.rz-core-child .rz-health-menu .rz-topic-title,
.rz-core-child .rz-child-development-menu .rz-topic-title,
.rz-core-child .rz-child-dynamics-menu .rz-topic-title {
  display: block !important;
  color: var(--text) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
}

.rz-core-child .rz-health-menu .rz-topic-text,
.rz-core-child .rz-child-development-menu .rz-topic-text,
.rz-core-child .rz-child-dynamics-menu .rz-topic-text {
  display: block !important;
  margin-top: 3px !important;
  color: var(--muted) !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  overflow-wrap: anywhere !important;
}

.rz-core-child .rz-health-menu .rz-chevron,
.rz-core-child .rz-child-development-menu .rz-chevron,
.rz-core-child .rz-child-dynamics-menu .rz-chevron {
  grid-column: 3 !important;
  justify-self: end !important;
  align-self: center !important;
  width: 12px !important;
  min-width: 12px !important;
  color: var(--accent-strong) !important;
  font-size: 17px !important;
  line-height: 1 !important;
  text-align: right !important;
  white-space: nowrap !important;
}

/* APP TEXT WEIGHT RESTORE V1: keep list geometry, return text weight to More/Home canon. */
.rz-home .rz-current-card .rz-section-title,
.rz-home .rz-current-card .rz-event-title,
[data-tab-panel="today"] #todayAddButton .rz-topic-title,
[data-tab-panel="today"] .rz-event-title,
.rz-core-child .rz-child-master-row .rz-topic-title,
.rz-core-child .rz-child-insight-row .rz-topic-title,
.rz-core-child .rz-child-sub-list .rz-topic-title,
.rz-core-child .rz-child-health .rz-topic-title,
#actionModal.family-modal .family-row-title,
#actionModal.family-modal .family-row-copy strong,
#actionModal.family-modal .family-hero-title {
  font-weight: 700 !important;
}

[data-tab-panel="today"] #todayAddButton .rz-topic-text,
[data-tab-panel="today"] .rz-event-note,
.rz-core-child .rz-topic-text,
#actionModal.family-modal .family-row-text,
#actionModal.family-modal .family-row-status {
  font-weight: 500 !important;
}

/* Child section refresh uses the same visual contract as the Home refresh button. */
.rz-core-child:not([data-child-view="main"]) .rz-child-titlebar {
  grid-template-columns: 34px minmax(0, 1fr) 34px !important;
}

.rz-core-child .rz-child-add-button[data-child-header-action="refresh"] {
  box-sizing: border-box !important;
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  flex: 0 0 34px !important;
  display: grid !important;
  place-items: center !important;
  justify-self: end !important;
  padding: 0 !important;
  border: 1px solid rgba(243, 230, 225, 0.98) !important;
  border-radius: 999px !important;
  background: #FDF1EB !important;
  color: var(--accent-strong) !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.rz-core-child .rz-child-add-button[data-child-header-action="refresh"]::before {
  width: 16px !important;
  height: 16px !important;
}


/* Family and More UX alignment pass */
#actionModal.family-modal .family-summary-strip {
  display: grid !important;
  grid-template-columns: 58px minmax(0, 1fr) !important;
  align-items: center !important;
  min-height: 74px !important;
  gap: 10px !important;
  padding: 10px 12px !important;
}

#actionModal.family-modal .family-summary-strip .family-illustration {
  width: 58px !important;
  height: 52px !important;
  border-radius: 15px !important;
}

#actionModal.family-modal .family-pending-list .family-ref-row {
  opacity: 0.92 !important;
}

#actionModal.family-modal .family-section + .family-section {
  margin-top: 0 !important;
}

#actionModal.more-inner-modal .more-reference-header {
  box-sizing: border-box !important;
  grid-template-columns: 34px minmax(0, 1fr) 34px !important;
  width: calc(100% - 8px) !important;
  max-width: calc(100% - 8px) !important;
  min-height: 66px !important;
  margin: 0 4px !important;
  padding: 13px 12px 12px 10px !important;
  border: 1px solid var(--rz-canon-line, var(--line)) !important;
  border-radius: 24px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 249, 246, 0.86)),
    #FFF9F6 !important;
  box-shadow: var(--rz-canon-shadow, 0 8px 22px rgba(140, 58, 54, 0.045)) !important;
}

#actionModal.more-inner-modal .more-header-copy {
  text-align: left !important;
  gap: 2px !important;
}

#actionModal.more-inner-modal .more-header-title {
  color: var(--rz-canon-heading, var(--accent-strong)) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 19px !important;
  font-weight: 800 !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
}

#actionModal.more-inner-modal .more-header-subtitle {
  color: var(--rz-canon-muted, var(--muted)) !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

#actionModal.more-inner-modal .more-header-button {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  border-color: var(--rz-canon-line, var(--line)) !important;
  background: var(--rz-canon-icon-bg, var(--accent-soft)) !important;
  color: var(--rz-canon-heading, var(--accent-strong)) !important;
  box-shadow: none !important;
}

#actionModal.more-inner-modal .more-header-refresh .rz-icon-bubble {
  width: 16px !important;
  height: 16px !important;
  flex-basis: 16px !important;
}

/* Release design alignment pass v1: keep active rows, forms and sheets on one visual rail. */
#actionModal.today-entry-modal .today-entry-row.rz-core-row,
#actionModal.family-modal .family-ref-row,
#actionModal.family-modal .family-task-row,
#actionModal.family-modal .family-activity-row,
#actionModal.more-inner-modal .rz-core-row,
.rz-core-child .rz-child-health .list-item,
#actionModal.rz-core-modal .list-item {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) 12px !important;
  align-items: center !important;
  gap: 9px !important;
  min-height: 54px !important;
  width: 100% !important;
  padding: 8px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--rz-canon-line, var(--line)) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--rz-canon-text, var(--text)) !important;
  text-align: left !important;
}

#actionModal.today-entry-modal .today-entry-row.rz-core-row:last-child,
#actionModal.family-modal .family-ref-row:last-child,
#actionModal.family-modal .family-task-row:last-child,
#actionModal.family-modal .family-activity-row:last-child,
#actionModal.more-inner-modal .rz-core-row:last-child,
.rz-core-child .rz-child-health .list-item:last-child,
#actionModal.rz-core-modal .list-item:last-child {
  border-bottom: 0 !important;
}

#actionModal.today-entry-modal .today-entry-copy,
#actionModal.family-modal .family-row-copy,
#actionModal.more-inner-modal .rz-topic-copy,
.rz-core-child .rz-child-health .list-item > span:not(.summary-chip-icon):not(.book-list-icon):not(.rz-icon-bubble),
#actionModal.rz-core-modal .list-item > span:not(.summary-chip-icon):not(.book-list-icon):not(.rz-icon-bubble) {
  display: grid !important;
  min-width: 0 !important;
  gap: 2px !important;
}

#actionModal.today-entry-modal .today-entry-title,
#actionModal.family-modal .family-row-title,
#actionModal.family-modal .family-row-copy strong,
#actionModal.more-inner-modal .rz-topic-title,
.rz-core-child .rz-child-health .list-title,
#actionModal.rz-core-modal .list-title {
  color: var(--rz-canon-text, var(--text)) !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  letter-spacing: 0 !important;
}

#actionModal.today-entry-modal .today-entry-subtitle,
#actionModal.family-modal .family-row-text,
#actionModal.family-modal .family-row-status,
#actionModal.family-modal .family-row-copy small,
#actionModal.more-inner-modal .rz-topic-text,
#actionModal.more-inner-modal .more-row-meta,
.rz-core-child .rz-child-health .list-meta,
#actionModal.rz-core-modal .list-meta {
  color: var(--rz-canon-muted, var(--muted)) !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

#actionModal.today-entry-modal .today-entry-icon,
#actionModal.family-modal .rz-icon-bubble,
#actionModal.family-modal .family-avatar,
#actionModal.more-inner-modal .rz-icon-bubble,
.rz-core-child .rz-child-health .summary-chip-icon,
.rz-core-child .rz-child-health .book-list-icon,
#actionModal.rz-core-modal .summary-chip-icon,
#actionModal.rz-core-modal .book-list-icon {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  flex-basis: 34px !important;
  border: 0 !important;
  border-radius: 13px !important;
  background: var(--rz-canon-icon-bg, var(--accent-soft)) !important;
  color: var(--rz-canon-heading, var(--accent-strong)) !important;
  box-shadow: none !important;
}

#actionModal.family-modal .family-member-ref-row {
  grid-template-columns: 34px minmax(0, 1fr) 12px !important;
}

#actionModal.family-modal .family-member-ref-row .family-row-copy {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

#actionModal.family-modal .family-member-ref-row .family-row-status {
  display: block !important;
  grid-column: auto !important;
  grid-row: auto !important;
  justify-self: start !important;
  max-width: 100% !important;
  margin: 0 !important;
  text-align: left !important;
}

#actionModal.family-modal .family-member-ref-row .rz-chevron {
  grid-column: 3 !important;
  grid-row: 1 !important;
  align-self: center !important;
}

#actionModal.family-modal .family-access-options {
  overflow: hidden !important;
  border: 1px solid var(--rz-canon-line, var(--line)) !important;
  border-radius: 18px !important;
  background: var(--rz-canon-card, #FFFFFF) !important;
  box-shadow: var(--rz-canon-shadow, 0 8px 22px rgba(140, 58, 54, 0.045)) !important;
}

#actionModal.family-modal .family-access-option {
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 10px !important;
  min-height: auto !important;
  padding: 10px 12px !important;
  border-top: 1px solid var(--rz-canon-line, var(--line)) !important;
}

#actionModal.family-modal .family-access-option:first-child {
  border-top: 0 !important;
}

#actionModal.family-modal .family-access-option .family-row-copy {
  display: grid !important;
  min-width: 0 !important;
  gap: 3px !important;
}

#actionModal.family-modal .family-role-choice,
#actionModal.family-modal .family-assignee-choice {
  min-height: 40px !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
  font-size: 11.8px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
}

#actionModal.family-modal .family-button-stack .rz-button-primary,
#actionModal.family-modal .family-button-stack .rz-button-secondary,
#actionModal.family-modal .family-danger-button,
#actionModal.more-inner-modal .rz-button-primary,
#actionModal.more-inner-modal .rz-button-secondary,
#actionModal.rz-core-modal .mini-button,
.rz-core-child .rz-child-health .mini-button {
  min-height: 40px !important;
  border-radius: 999px !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

#actionModal.family-modal .family-section-title,
#actionModal.family-modal .family-field-title,
#actionModal.more-inner-modal .more-card-title,
.rz-core-child .rz-child-health .section-head h2 {
  color: var(--rz-canon-text, var(--text)) !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.18 !important;
  letter-spacing: 0 !important;
}

/* Home current rows and compact sleep sheet: use canonical rz-* components. */
.rz-home .rz-home-current-row {
  cursor: pointer;
}

.rz-home .rz-home-current-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.rz-home .rz-home-current-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  margin-left: auto;
  padding-right: 2px;
}

.rz-home .rz-home-info-button,
.rz-home .rz-home-current-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  min-width: 24px;
  padding: 0;
  font-size: 13px;
  line-height: 1;
  text-align: center;
}

.rz-home .rz-home-current-arrow::before,
.rz-home .rz-home-info-button::before {
  content: none !important;
  display: none !important;
}

.rz-home .rz-home-current-arrow[hidden],
.rz-home .rz-home-info-button[hidden] {
  display: none !important;
}

.rz-home .rz-home-current-carousel {
  grid-template-columns: 31px minmax(0, 1fr) auto !important;
}

.rz-home .rz-home-carousel-actions {
  gap: 3px;
}

.rz-home .rz-home-current-carousel .rz-event-copy,
.rz-home .rz-home-current-carousel .rz-event-note {
  min-width: 0;
}

.rz-home .rz-home-current-carousel .rz-event-note {
  white-space: normal;
  overflow-wrap: normal !important;
  word-break: normal;
}

.rz-home .rz-home-current-carousel .rz-event-time {
  max-width: none !important;
}

.rz-home .rz-home-current-carousel .rz-event-time:empty {
  display: none;
}

.rz-home #homeFeedingSummary {
  white-space: pre-line;
}

.rz-home .rz-icon-bubble[data-rz-icon="development"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.85' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l2.7 5.5 6.1.9-4.4 4.3 1 6.1L12 16.9 6.6 19.8l1-6.1-4.4-4.3 6.1-.9L12 3z'/%3E%3C/svg%3E");
}

.rz-home .rz-icon-bubble[data-rz-icon="syringe"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.85' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 2l4 4'/%3E%3Cpath d='M17 7l-8.5 8.5'/%3E%3Cpath d='M14 4l6 6'/%3E%3Cpath d='M7 14l3 3'/%3E%3Cpath d='M6 18l-2 2'/%3E%3C/svg%3E");
}

.rz-home .rz-icon-bubble[data-rz-icon="task"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.85' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='17' rx='2'/%3E%3Cpath d='M9 8h6M9 12h6M9 16h4'/%3E%3C/svg%3E");
}

.rz-home .rz-icon-bubble[data-rz-icon="medication"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.85' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7' y='3' width='10' height='18' rx='2'/%3E%3Cpath d='M9 7h6M10 12h4M12 10v4'/%3E%3C/svg%3E");
}

.rz-icon-bubble[data-rz-icon="diaper"] {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 7h14v6.5A7 7 0 0 1 12 21a7 7 0 0 1-7-7.5V7z'/%3E%3Cpath d='M5 10c2 1.6 4.2 2.4 7 2.4s5-.8 7-2.4'/%3E%3Cpath d='M8.5 7V5h7v2'/%3E%3Cpath d='M9 16c1.8 1.4 4.2 1.4 6 0'/%3E%3C/svg%3E");
}

#actionModal.rz-core-modal .modal-actions[hidden] {
  display: none !important;
}

#actionModal.rz-core-modal[data-core-modal="sleep-choice"] {
  align-items: flex-end;
}

#actionModal.rz-core-modal[data-core-modal="sleep-choice"] .modal {
  position: relative;
  display: block;
  width: min(calc(100% - 68px), 276px) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: calc(100dvh - 20px) !important;
  padding: 18px 12px 8px !important;
  overflow: visible;
  border-radius: 24px 24px 22px 22px;
}

#actionModal.rz-core-modal[data-core-modal="sleep-choice"] .modal::before {
  content: none;
  display: none;
}

#actionModal.rz-core-modal[data-core-modal="sleep-choice"] .modal > .result {
  margin: 0 0 8px !important;
  text-align: left;
  align-items: flex-start;
}

#actionModal.rz-core-modal[data-core-modal="sleep-choice"] #modalTitle {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 18px;
  line-height: 1.02;
}

#actionModal.rz-core-modal[data-core-modal="sleep-choice"] #modalText {
  max-width: none;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.18;
  text-align: left;
}

#actionModal.rz-core-modal[data-core-modal="sleep-choice"] #modalFields {
  display: block !important;
  height: auto !important;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: visible;
}

#actionModal.rz-core-modal[data-core-modal="sleep-choice"] .rz-sheet-handle {
  display: none;
}

#actionModal.rz-core-modal[data-core-modal="sleep-choice"] .rz-sleep-round-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  justify-items: center;
  gap: 10px;
  margin: 3px 24px 8px;
}

#actionModal.rz-core-modal[data-core-modal="sleep-choice"] .rz-sleep-round-action {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: 54px;
  min-width: 0;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent-strong);
  font: inherit;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.06;
  cursor: pointer;
}

#actionModal.rz-core-modal[data-core-modal="sleep-choice"] .rz-sleep-round-action .rz-sleep-round-icon {
  display: inline-flex;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  max-width: 44px;
  max-height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-strong);
  box-shadow: none;
}

#actionModal.rz-core-modal[data-core-modal="sleep-choice"] .rz-sleep-round-action .rz-sleep-round-icon::before {
  width: 19px;
  height: 19px;
}

#actionModal.rz-core-modal[data-core-modal="sleep-choice"] .rz-sleep-round-action.is-loading {
  opacity: .72;
  pointer-events: none;
}

#actionModal.rz-core-modal[data-core-modal="sleep-choice"] .rz-sleep-last-action {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: var(--soft);
  box-shadow: none;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
  text-align: center;
}

#actionModal.rz-core-modal[data-core-modal="sleep-choice"] .rz-sleep-last-action strong {
  color: var(--text);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.1;
}

#actionModal.rz-core-modal[data-core-modal="sleep-choice"] .rz-sleep-status {
  min-height: 0;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
}

#actionModal.rz-core-modal[data-core-modal="sleep-choice"] .rz-sleep-status:empty {
  display: none;
}

#actionModal.rz-core-modal[data-core-modal="sleep-choice"] #modalActions,
#actionModal.rz-core-modal[data-core-modal="sleep-choice"] .modal-actions,
#actionModal.rz-core-modal[data-core-modal="sleep-choice"] .modal-actions[hidden] {
  display: none !important;
  height: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

#actionModal.rz-core-modal[data-core-modal="home-sleep-info"] .modal,
#actionModal.rz-core-modal[data-core-modal="home-feeding-info"] .modal {
  display: block;
  width: min(calc(100% - 44px), 360px) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: calc(100dvh - 28px) !important;
  padding: 22px 18px 18px !important;
  overflow: visible;
  border-radius: 24px 24px 22px 22px;
}

#actionModal.rz-core-modal[data-core-modal="home-sleep-info"] .modal > .result,
#actionModal.rz-core-modal[data-core-modal="home-feeding-info"] .modal > .result {
  margin: 0 0 12px !important;
  text-align: left;
  align-items: flex-start;
}

#actionModal.rz-core-modal[data-core-modal="home-sleep-info"] #modalTitle,
#actionModal.rz-core-modal[data-core-modal="home-feeding-info"] #modalTitle {
  color: var(--accent);
}

#actionModal.rz-core-modal[data-core-modal="home-sleep-info"] #modalText,
#actionModal.rz-core-modal[data-core-modal="home-feeding-info"] #modalText {
  max-width: none;
  margin-top: 4px;
  text-align: left;
}

#actionModal.rz-core-modal[data-core-modal="home-sleep-info"] #modalFields,
#actionModal.rz-core-modal[data-core-modal="home-feeding-info"] #modalFields {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

#actionModal.rz-core-modal[data-core-modal="home-sleep-info"] .home-info-actions,
#actionModal.rz-core-modal[data-core-modal="home-feeding-info"] .home-info-actions {
  display: grid;
  gap: 10px;
}

#actionModal.rz-core-modal[data-core-modal="home-sleep-info"] .home-info-actions .rz-button-primary,
#actionModal.rz-core-modal[data-core-modal="home-feeding-info"] .home-info-actions .rz-button-primary {
  min-height: 52px;
}

#actionModal.rz-core-modal[data-core-modal="home-sleep-info"] .home-info-actions .rz-button-secondary,
#actionModal.rz-core-modal[data-core-modal="home-feeding-info"] .home-info-actions .rz-button-secondary {
  min-height: 50px;
  background: var(--surface);
}

#actionModal.rz-core-modal[data-core-modal="home-sleep-info"] #modalActions,
#actionModal.rz-core-modal[data-core-modal="home-feeding-info"] #modalActions,
#actionModal.rz-core-modal[data-core-modal="home-sleep-info"] .modal-actions,
#actionModal.rz-core-modal[data-core-modal="home-feeding-info"] .modal-actions {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

@media (max-width: 360px) {
  #actionModal.rz-core-modal[data-core-modal="sleep-choice"] .modal {
    width: min(calc(100% - 56px), 268px) !important;
    padding-left: 11px !important;
    padding-right: 11px !important;
  }

  #actionModal.rz-core-modal[data-core-modal="sleep-choice"] .rz-sleep-round-grid {
    margin-left: 18px;
    margin-right: 18px;
  }
}


/* TODAY ENTRY SHEET ALIGNMENT V1: reuse child row rhythm for the entry picker. */
[data-tab-panel="today"] #todayAddButton .rz-icon-bubble[data-rz-icon="plus"]::before {
  --rz-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.85' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
}

#actionModal.today-entry-modal .modal {
  width: min(100%, 390px) !important;
  padding: 18px !important;
  background: linear-gradient(180deg, var(--surface-raised) 0%, var(--bg) 100%) !important;
}

#actionModal.today-entry-modal .today-entry-list {
  display: grid !important;
  gap: 0 !important;
  width: calc(100% - 8px) !important;
  max-width: calc(100% - 8px) !important;
  margin: 0 4px !important;
  padding: 8px 12px !important;
  overflow: hidden !important;
  border: 1px solid var(--line) !important;
  border-radius: 17px !important;
  background: var(--surface-raised) !important;
  box-shadow: 0 7px 18px rgba(140, 58, 54, 0.04) !important;
}

#actionModal.today-entry-modal .today-entry-row.rz-core-row {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) 12px !important;
  align-items: center !important;
  gap: 9px !important;
  min-height: 54px !important;
  width: 100% !important;
  padding: 8px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  text-align: left !important;
}

#actionModal.today-entry-modal .today-entry-row.rz-core-row:last-child {
  border-bottom: 0 !important;
}

#actionModal.today-entry-modal .today-entry-icon.rz-icon-bubble {
  width: 34px !important;
  height: 34px !important;
  flex: 0 0 34px !important;
  border: 0 !important;
  border-radius: 13px !important;
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
  box-shadow: none !important;
}

#actionModal.today-entry-modal .today-entry-icon.rz-icon-bubble::before {
  width: 19px !important;
  height: 19px !important;
}

#actionModal.today-entry-modal .today-entry-copy {
  display: grid !important;
  min-width: 0 !important;
  gap: 2px !important;
}

#actionModal.today-entry-modal .today-entry-title {
  color: var(--text) !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  letter-spacing: 0 !important;
}

#actionModal.today-entry-modal .today-entry-subtitle {
  color: var(--muted) !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  overflow-wrap: anywhere !important;
}

#actionModal.today-entry-modal .today-entry-row .rz-chevron {
  grid-column: 3 !important;
  justify-self: end !important;
  align-self: center !important;
  width: 12px !important;
  min-width: 12px !important;
  color: var(--accent-strong) !important;
  font-size: 17px !important;
  line-height: 1 !important;
  text-align: right !important;
  white-space: nowrap !important;
}


/* TODAY FORM MODAL COMPACT V1: keep add-entry forms on the compact sheet rail. */
#actionModal.today-form-modal {
  align-items: flex-end !important;
  padding: 12px !important;
}

#actionModal.today-form-modal .modal {
  width: min(calc(100% - 24px), 390px) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: calc(100dvh - 24px) !important;
  padding: 18px 18px 14px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  border: 1px solid var(--line) !important;
  border-radius: 24px 24px 22px 22px !important;
  background: var(--surface-raised) !important;
  box-shadow: 0 18px 48px rgba(90, 74, 66, 0.16) !important;
}

#actionModal.today-form-modal .modal::before {
  content: none !important;
  display: none !important;
}

#actionModal.today-form-modal .today-modal-back {
  top: 18px !important;
  left: 18px !important;
  width: 34px !important;
  height: 34px !important;
  border: 1px solid var(--line) !important;
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
  font-size: 22px !important;
}

#actionModal.today-form-modal .modal h3 {
  margin: 0 0 3px 44px !important;
  min-height: 20px !important;
  padding-top: 1px !important;
  color: var(--accent) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
}

#actionModal.today-form-modal .modal > .result {
  margin: 0 0 12px 44px !important;
  color: var(--muted) !important;
  font-size: 10.8px !important;
  font-weight: 500 !important;
  line-height: 1.22 !important;
}

#actionModal.today-form-modal #modalFields {
  display: grid !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
}

#actionModal.today-form-modal .today-modal-field {
  gap: 5px !important;
  color: var(--text) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

#actionModal.today-form-modal input,
#actionModal.today-form-modal select,
#actionModal.today-form-modal textarea {
  min-height: 38px !important;
  padding: 8px 10px !important;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.22 !important;
  box-shadow: none !important;
}

#actionModal.today-form-modal textarea {
  min-height: 58px !important;
}

#actionModal.today-form-modal .today-date-control input {
  padding-right: 38px !important;
}

#actionModal.today-form-modal .today-date-icon {
  right: 10px !important;
  width: 17px !important;
  height: 17px !important;
  color: var(--accent-strong) !important;
}

#actionModal.today-form-modal .today-date-icon::before {
  width: 15px !important;
  height: 15px !important;
}

#actionModal.today-form-modal .today-choice-grid,
#actionModal.today-form-modal .rz-feeding-side {
  padding: 3px !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  background: var(--surface) !important;
}

#actionModal.today-form-modal .today-choice-button,
#actionModal.today-form-modal .rz-choice-pill {
  min-height: 34px !important;
  padding: 7px 8px !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.12 !important;
}

#actionModal.today-form-modal .today-choice-button.active,
#actionModal.today-form-modal .rz-choice-pill.active {
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
  box-shadow: inset 0 0 0 1px rgba(162, 74, 63, 0.12) !important;
}

#actionModal.today-form-modal .today-field-hint {
  margin: 3px 1px 0 !important;
  color: var(--muted) !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
}

#actionModal.today-form-modal .modal-actions {
  position: static !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  margin: 12px 0 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

#actionModal.today-form-modal .action {
  min-height: 40px !important;
  border-radius: 13px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}


/* TODAY FORM KEYBOARD GUARD V1: keep focused fields above the mobile keyboard. */
#actionModal.today-form-modal.keyboard-open {
  padding-bottom: calc(12px + var(--rz-modal-keyboard-offset, 0px)) !important;
}

#actionModal.today-form-modal.keyboard-open .modal {
  max-height: calc(var(--rz-modal-visual-height, 100dvh) - 24px) !important;
  scroll-padding-bottom: 74px !important;
}

#actionModal.today-form-modal.keyboard-open #modalFields {
  padding-bottom: 2px !important;
}


/* TODAY FORM KEYBOARD GUARD V2: prevent iOS input zoom and force focused fields above keyboard. */
#actionModal.today-form-modal input,
#actionModal.today-form-modal select,
#actionModal.today-form-modal textarea {
  font-size: 16px !important;
  line-height: 1.2 !important;
  -webkit-text-size-adjust: 100% !important;
}

#actionModal.today-form-modal.keyboard-open .modal {
  max-height: min(430px, calc(100dvh - var(--rz-modal-keyboard-offset, 0px) - 24px)) !important;
  scroll-padding-bottom: 88px !important;
}

#actionModal.today-form-modal.keyboard-open .modal-actions {
  margin-top: 10px !important;
}


/* TODAY ENTRY CARDS V1: reference-style add-entry picker; colors stay on Home/Today surfaces. */
#actionModal.today-entry-modal .modal,
#actionModal.today-form-modal .modal {
  background: linear-gradient(180deg, var(--surface-raised) 0%, var(--bg) 100%) !important;
}

#actionModal.today-entry-modal .modal {
  padding: 14px 14px 16px !important;
}

#actionModal.today-entry-modal .today-entry-list {
  display: grid !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

#actionModal.today-entry-modal .today-entry-row.rz-core-row {
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr) 14px !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 64px !important;
  padding: 10px 12px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  box-shadow: none !important;
  text-align: left !important;
}

#actionModal.today-entry-modal .today-entry-row.rz-core-row:last-child {
  border-bottom: 0 !important;
}

#actionModal.today-entry-modal .today-entry-icon.rz-icon-bubble {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  flex: 0 0 40px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
  box-shadow: none !important;
}

#actionModal.today-entry-modal .today-entry-icon.rz-icon-bubble::before {
  width: 19px !important;
  height: 19px !important;
}

#actionModal.today-entry-modal .today-entry-copy {
  gap: 3px !important;
}

#actionModal.today-entry-modal .today-entry-title {
  color: var(--text) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.14 !important;
}

#actionModal.today-entry-modal .today-entry-subtitle {
  color: var(--muted) !important;
  font-size: 10.5px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
}

#actionModal.today-entry-modal .today-entry-row .rz-chevron {
  color: var(--muted) !important;
  font-size: 18px !important;
}

#actionModal.today-form-modal #modalFields {
  gap: 10px !important;
}

#actionModal.today-form-modal .today-modal-field {
  padding: 0 !important;
}

#actionModal.today-form-modal input,
#actionModal.today-form-modal select,
#actionModal.today-form-modal textarea,
#actionModal.today-form-modal .today-choice-grid,
#actionModal.today-form-modal .rz-feeding-side {
  border: 0 !important;
  background: var(--surface) !important;
  box-shadow: none !important;
}

#actionModal.today-form-modal input,
#actionModal.today-form-modal select,
#actionModal.today-form-modal textarea {
  min-height: 44px !important;
  border-radius: 14px !important;
  padding: 9px 12px !important;
}

#actionModal.today-form-modal textarea {
  min-height: 74px !important;
}

#actionModal.today-form-modal .today-choice-grid,
#actionModal.today-form-modal .rz-feeding-side {
  border-radius: 14px !important;
}

#actionModal.today-form-modal .today-choice-button,
#actionModal.today-form-modal .rz-choice-pill {
  min-height: 38px !important;
  background: var(--surface) !important;
}

#actionModal.today-form-modal .today-choice-button.active,
#actionModal.today-form-modal .rz-choice-pill.active {
  background: var(--accent-soft) !important;
}

#actionModal.today-form-modal .modal-actions {
  gap: 10px !important;
  margin-top: 14px !important;
}

#actionModal.today-form-modal .action {
  min-height: 44px !important;
}

/* TODAY ENTRY CANONICAL HEADER V2: same topbar surface as Today, back action on the left. */
#actionModal:not(.today-entry-modal) #todayEntryHeader,
#todayEntryHeader[hidden] {
  display: none !important;
}

#actionModal.today-entry-modal .modal::before,
#actionModal.today-entry-modal .modal > #modalTitle,
#actionModal.today-entry-modal .modal > #modalText,
#actionModal.today-entry-modal .modal > #todayModalBack {
  display: none !important;
  content: none !important;
}

#actionModal.today-entry-modal #todayEntryHeader {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
}

#actionModal.today-entry-modal #todayEntryHeader .icon-button {
  justify-self: start !important;
}

#actionModal.today-entry-modal #todayEntryHeader > div {
  min-width: 0 !important;
}

#actionModal.today-entry-modal #todayEntryBackButton::before,
#actionModal.today-entry-modal #todayEntryBackButton::after {
  content: none !important;
  display: none !important;
}

#actionModal.today-entry-modal #todayEntryBackButton .ui-svg {
  width: 16px !important;
  height: 16px !important;
}

#actionModal.today-entry-modal #todayEntryBackButton .ui-svg path {
  stroke: currentColor !important;
  stroke-width: 3 !important;
  fill: none !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

#actionModal.today-entry-modal .today-entry-list {
  padding-bottom: 8px !important;
}

#actionModal.today-entry-modal .today-entry-row.rz-core-row {
  border: 1px solid var(--line) !important;
  background: var(--surface-raised) !important;
  box-shadow: none !important;
}

#actionModal.today-entry-modal .today-entry-row.rz-core-row:active {
  border-color: var(--line-strong) !important;
  background: var(--surface) !important;
}

#actionModal.today-entry-modal .today-entry-row.rz-core-row:last-child {
  margin-bottom: 1px !important;
  border-bottom: 1px solid var(--line) !important;
}

#actionModal.today-entry-modal .today-entry-icon.rz-icon-bubble {
  border: 1px solid var(--line) !important;
  background: var(--accent-soft) !important;
}

#actionModal.today-form-modal .modal {
  display: flex !important;
  flex-direction: column !important;
  max-height: calc(100dvh - 24px) !important;
  padding-bottom: 14px !important;
}

#actionModal.today-form-modal #modalFields {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

#actionModal.today-form-modal input,
#actionModal.today-form-modal select,
#actionModal.today-form-modal textarea,
#actionModal.today-form-modal .today-date-control input {
  min-height: 42px !important;
  padding: 8px 10px !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
}

#actionModal.today-form-modal textarea {
  min-height: 70px !important;
}

#actionModal.today-form-modal input::placeholder,
#actionModal.today-form-modal textarea::placeholder {
  font-size: 13px !important;
  line-height: 1.2 !important;
}

#actionModal.today-form-modal .today-date-control {
  min-height: 42px !important;
}

#actionModal.today-form-modal .modal-actions {
  position: static !important;
  flex: 0 0 auto !important;
  margin: 12px 0 0 !important;
  padding: 0 !important;
  border-top: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#actionModal.today-form-modal .modal-actions::before,
#actionModal.today-form-modal .modal-actions::after {
  content: none !important;
  display: none !important;
}

#actionModal.today-form-modal.keyboard-open {
  align-items: center !important;
  padding: 12px !important;
}

#actionModal.today-form-modal.keyboard-open .modal {
  width: min(calc(100% - 24px), 390px) !important;
  max-height: calc(var(--rz-modal-visual-height, 100dvh) - 24px) !important;
  overflow-y: auto !important;
  transform: none !important;
}

#actionModal.today-form-modal.keyboard-open #modalFields {
  padding-bottom: 12px !important;
}

#actionModal.today-form-modal.keyboard-open .modal-actions {
  position: static !important;
  margin-top: 10px !important;
}

/* TODAY FORM OUTLINES V1: restore visible field and choice borders without changing palette. */
#actionModal.today-entry-modal #todayEntryBackButton {
  color: var(--accent-strong) !important;
  font-size: 21px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

#actionModal.today-entry-modal #todayEntryBackButton .today-entry-back-glyph {
  display: block !important;
  transform: translateY(-1px) !important;
}

#actionModal.today-entry-modal #todayEntryHeader .brand-subtitle {
  max-width: 100% !important;
  text-overflow: ellipsis !important;
}

#actionModal.today-form-modal input:not([type=hidden]),
#actionModal.today-form-modal select,
#actionModal.today-form-modal textarea {
  border: 1px solid var(--line) !important;
  background: var(--surface-raised) !important;
  box-shadow: none !important;
}

#actionModal.today-form-modal .today-date-control {
  border: 1px solid var(--line) !important;
  background: var(--surface-raised) !important;
  box-shadow: none !important;
}

#actionModal.today-form-modal .today-date-control input {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#actionModal.today-form-modal .today-choice-grid,
#actionModal.today-form-modal .rz-feeding-side {
  border: 1px solid var(--line) !important;
  background: var(--surface-raised) !important;
  box-shadow: none !important;
}

#actionModal.today-form-modal .today-choice-button,
#actionModal.today-form-modal .rz-choice-pill {
  border: 1px solid var(--line) !important;
  background: var(--surface-raised) !important;
  box-shadow: none !important;
}

#actionModal.today-form-modal .today-choice-button.active,
#actionModal.today-form-modal .rz-choice-pill.active {
  border-color: var(--line-strong) !important;
  background: var(--accent-soft) !important;
}

/* TODAY FORM KEYBOARD STABILITY V1: keep form sheets stable while typing. */
#actionModal.today-form-modal.keyboard-open {
  align-items: flex-end !important;
  justify-content: flex-end !important;
  padding: 12px !important;
  padding-bottom: calc(12px + var(--rz-modal-keyboard-offset, 0px)) !important;
}

#actionModal.today-form-modal.keyboard-open .modal {
  width: min(calc(100% - 24px), 390px) !important;
  max-height: min(430px, calc(100dvh - var(--rz-modal-keyboard-offset, 0px) - 24px), calc(var(--rz-modal-visual-height, 100dvh) - 24px)) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  transform: none !important;
  scroll-padding-bottom: 88px !important;
}

#actionModal.today-form-modal.keyboard-open #modalFields {
  flex: 0 1 auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding-bottom: 8px !important;
}

#actionModal.today-form-modal.keyboard-open .modal-actions {
  position: static !important;
  flex: 0 0 auto !important;
  margin-top: 10px !important;
}

/* TODAY FORM KEYBOARD FLOW V2: scroll the sheet content instead of squeezing fields under actions. */
#actionModal.today-form-modal .modal {
  display: block !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
}

#actionModal.today-form-modal #modalFields {
  display: grid !important;
  flex: none !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding-bottom: 0 !important;
}

#actionModal.today-form-modal .modal-actions {
  position: static !important;
  z-index: auto !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  margin: 12px 0 0 !important;
  padding: 0 !important;
  border-top: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#actionModal.today-form-modal .today-date-control {
  border-radius: 14px !important;
  overflow: hidden !important;
}

#actionModal.today-form-modal .today-date-control input {
  border-radius: 14px !important;
}

#actionModal.today-form-modal.keyboard-open {
  align-items: flex-end !important;
  justify-content: flex-end !important;
  padding: 8px 12px calc(8px + var(--rz-modal-keyboard-offset, 0px)) !important;
}

#actionModal.today-form-modal.keyboard-open .modal {
  display: block !important;
  width: min(calc(100% - 24px), 390px) !important;
  max-height: min(calc(var(--rz-modal-visual-height, 100dvh) - 16px), calc(100dvh - var(--rz-modal-keyboard-offset, 0px) - 16px)) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  transform: none !important;
  scroll-padding-top: 16px !important;
  scroll-padding-bottom: 112px !important;
}

#actionModal.today-form-modal.keyboard-open #modalFields {
  display: grid !important;
  flex: none !important;
  overflow: visible !important;
  padding-bottom: 10px !important;
}

#actionModal.today-form-modal.keyboard-open .modal-actions {
  position: static !important;
  z-index: auto !important;
  margin: 10px 0 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* HOME SLEEP HELPER SURFACE V1: warm Bot Zabot surface for sleep helper sheets. */
#actionModal.rz-core-modal[data-core-modal=sleep-choice] .modal,
#actionModal.rz-core-modal[data-core-modal=home-sleep-info] .modal,
#actionModal.rz-core-modal[data-core-modal=home-feeding-info] .modal {
  border: 1px solid var(--line) !important;
  background: linear-gradient(180deg, var(--surface-raised) 0%, var(--bg) 100%) !important;
  box-shadow: 0 18px 48px rgba(90, 74, 66, 0.16) !important;
}

#actionModal.rz-core-modal[data-core-modal=sleep-choice] .rz-sleep-round-action .rz-sleep-round-icon {
  border: 1px solid var(--line) !important;
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
}

#actionModal.rz-core-modal[data-core-modal=sleep-choice] .rz-sleep-last-action {
  border: 1px solid var(--line) !important;
  background: var(--accent-soft) !important;
  color: var(--muted) !important;
}

#actionModal.rz-core-modal[data-core-modal=sleep-choice] .rz-sleep-last-action strong {
  color: var(--text) !important;
}

#actionModal.rz-core-modal[data-core-modal=home-sleep-info] .home-info-actions .rz-button-secondary,
#actionModal.rz-core-modal[data-core-modal=home-feeding-info] .home-info-actions .rz-button-secondary {
  background: var(--surface-raised) !important;
}
