*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      /* Bleu nuit (moins saturé / moins "clinquant" que #000080) */
      --navy: #0D1B2A;
      --navy-deep: #081321;
      --navy-light: #142D4D;
      --creme: #FAF4DA;
      --creme-dark: #F0E8C4;
      --creme-deeper: #E8DDB0;
      --gold: #C9A84C;
      --gold-light: #E2C97E;
      --white: #FFFFFF;
      --text-on-navy: #FAF4DA;
      --text-muted: rgba(250, 244, 218, 0.55);
      --border: rgba(201, 168, 76, 0.25);
      --border-strong: rgba(201, 168, 76, 0.5);
    }

    html, body {
      height: 100%;
      width: 100%;
      overflow: hidden;
      -webkit-tap-highlight-color: transparent;
      touch-action: pan-y;
      -webkit-user-select: none;
      user-select: none;
    }

    body {
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", Arial, sans-serif;
      background: var(--navy);
      color: var(--creme);
      margin: 0;
      /* Root layout fix: avoid flex-centering interactions between body height
         and the JS-calibrated app viewport on legacy iPhone Safari. The app box
         centers itself horizontally via margin-inline instead of body flex. */
      display: block;
    }

    #app {
      width: 100%;
      max-width: 430px;
      /* Root hotfix: anchor the app box to the top of the viewport so iOS
         viewport/body mismatches cannot create a visible gap above the header. */
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      margin: 0 auto;
      /* Use JS-calibrated height on iOS to prevent first-render overlap issues.
         Fallback to dynamic viewport units when the variable is not set. */
      height: var(--app-h, 100dvh);
      min-height: var(--app-h, 100dvh);
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    
    /* ── HORIZONTAL LOCK (iOS/ Mobile) ── */
    html, body { overscroll-behavior-x: none; }
    #app, .screen { overflow-x: hidden; }
    .home-content,
    .about-content,
    .breathe-content,
    .anchor-content,
    .calibrate-content,
    .emovox-practice-content,
    .trace-content,
    .modal-body,
    .sheet,
    .sheet-inner{
      overflow-x: hidden;
      overscroll-behavior-x: none;
      touch-action: pan-y;
    }
    img, svg, canvas { max-width: 100%; }
/* ── SCREENS ── */
    .screen {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      min-height: 0;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.4s ease;
    }
    .screen.active {
      opacity: 1;
      pointer-events: all;
    }
    .screen:focus{ outline: none; }


    /* ── HEADER ── */
    .header {
      /* Reduced header height while preserving iOS safe-area */
      padding-top: 16px; /* fallback Chrome < 79 / old Android */
      padding: max(16px, env(safe-area-inset-top)) 20px 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
    }
    .header-logo {
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
      font-size: 22px;
      font-weight: 600;
      letter-spacing: 0.15em;
      color: var(--creme);
    }
    .header-logo span {
      color: var(--gold);
    }
    .header-sub {
      font-size: 9px;
      font-weight: 500;
      letter-spacing: 0.2em;
      color: rgba(250,244,218,0.92);
      text-transform: uppercase;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .header-right{
      display:flex;
      flex-direction:column;
      align-items:flex-end;
      gap:6px;
      min-width: 120px;
    }

    .header-link{
      border: 1px solid rgba(176,145,68,0.55);
      background: rgba(250,244,218,0.03);
      color: var(--gold-light);
      font-size: 8px;
      font-weight: 700;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      border-radius: 999px;
      padding: 7px 10px;
      line-height: 1;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }
    .header-link:active{
      transform: scale(0.98);
      background: rgba(176,145,68,0.18);
    }



    /* Brand images */
    .header-brand-img {
      width: auto;
      max-width: 380px;
      display: block;
    }
    .header-brand-img--home { height: 44px; max-width: 380px; margin-bottom: 0; object-fit: contain; }
    .header-brand-img--small { height: 40px; max-width: 380px; margin-bottom: 0; object-fit: contain; }

        /* ── HEADER (internal screens) ──
       Navigation principale = barre du bas.
       Le header reste constant : logo à gauche, libellé à droite. */
    .header--internal{
      gap: 12px;
    }
    .header--internal .header-sub{
      text-align: right;
      max-width: none;
      white-space: normal;
      overflow: visible;
      text-overflow: clip;
      line-height: 1.2;
      letter-spacing: 0.16em;
    }
    @media (max-width: 380px){
      .header--internal .header-sub{
        font-size: 8px;
        letter-spacing: 0.14em;
      }
    }
    .header--internal .header-brand-img--small{
      max-width: min(380px, calc(100% - 140px));
    }

    /* ── HOME SCREEN ── */
    .home-content {
      width: 100%;
      width: 100%;
      flex: 1;
      display: flex;
      flex-direction: column;
      min-height: 0;
      padding: 36px 28px 20px;
      gap: 16px;
      overflow-y: auto;
      scroll-padding-bottom: 120px;
    }

    .greeting {
      margin-bottom: 8px;
    }
    .greeting-time {
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.25em;
      color: var(--gold);
      text-transform: uppercase;
      margin-bottom: 6px;
    }
    .greeting-text {
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
      font-size: 28px;
      font-weight: 300;
      color: var(--creme);
      line-height: 1.2;
    }
    .greeting-text em {
      font-style: italic;
      color: var(--gold-light);
    }

    .home-feature{
      margin-top: 10px;
      width: 100%;
    }
    .home-divider{
      display:flex;
      align-items:center;
      justify-content:center;
      padding: 6px 0 8px;
    }
    .home-divider span{
      display:block;
      width: min(84%, 336px);
      height: 1px;
      border-radius: 999px;
      margin: 0 auto;
      background: linear-gradient(90deg, rgba(201,168,76,0), rgba(201,168,76,0.20) 14%, rgba(250,244,218,0.78) 50%, rgba(201,168,76,0.20) 86%, rgba(201,168,76,0));
      box-shadow: 0 0 18px rgba(201,168,76,0.10);
    }

    /* ── ACTION BUTTONS ── */
    .action-grid {
      width: 100%;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
      margin-top: 10px;
    }
    .action-btn {
      background: rgba(250, 244, 218, 0.04);
      border: 1px solid var(--border);
      border-radius: 16px;
      overflow: hidden;
      padding: 22px 16px;
      cursor: pointer;
      transition: all 0.2s ease;
      text-align: left;
      display: flex;
      flex-direction: column;
      gap: 10px;
      min-width: 0;
      min-height: 148px;
      min-width: 0;
      -webkit-tap-highlight-color: transparent;
    }
    .action-btn:active { transform: scale(0.97); background: rgba(250, 244, 218, 0.08); }
    .action-btn.primary {
      grid-column: 1 / -1;
      background: var(--navy-light);
      border-color: var(--gold);
      flex-direction: row;
      align-items: center;
      padding: 24px 22px;
      gap: 18px;
    }
    .action-btn.primary:active { background: var(--gold); }
    .action-btn.primary .btn-icon {
      width: 34px;
      height: 34px;
      flex: 0 0 34px;
    }
    .action-btn.primary .btn-icon .icon-svg { width: 34px; height: 34px; }
    .action-btn.primary .btn-desc {
      max-width: 42ch;
      color: rgba(250,244,218,0.96);
    }
    .action-btn.wide {
      grid-column: 1 / -1;
    }
    
    /* Full-width row action button (ex: Rythme) */
    .action-btn.row:not(.primary){
      grid-column: 1 / -1;
      flex-direction: row;
      align-items: center;
      padding: 24px 22px;
      gap: 18px;
    }
    .action-btn.row:not(.primary) .btn-icon{
      font-size: 28px;
    }
    .action-btn.row:not(.primary) .btn-title{
      font-size: 22px;
    }
.btn-icon {
      width: 28px;
      height: 28px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--gold);
      opacity: 0.95;
    }
    .btn-icon .icon-svg{ width: 28px; height: 28px; display:block; }

    /* Make the "Respirer" pictogram as legible as the others (home + nav) */
    .action-btn[data-go="breathe"] .btn-icon{
      width: 30px;
      height: 30px;
    }
    .action-btn[data-go="breathe"] .btn-icon .icon-svg{ width: 30px; height: 30px; }
    .btn-label {
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--gold);
      margin-bottom: 2px;
    }
    .action-btn.primary .btn-label {
      color: var(--gold-light);
    }

    /* Situation home card: align with the editorial layout of EMOVOX */
    .action-btn[data-go="situation"] .btn-label{
      display: block;
      white-space: normal;
      max-width: 32ch;
      line-height: 1.35;
      margin-bottom: 0;
    }
    .action-btn[data-go="situation"] .btn-title{
      text-transform: uppercase;
      letter-spacing: 0.03em;
    }
    .action-btn[data-go="situation"] .btn-desc{
      max-width: 42ch;
    }

    .btn-title {
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
      font-size: 20px;
      font-weight: 500;
      color: var(--creme);
      line-height: 1.1;
    }
    .action-btn.primary .btn-title { font-size: 22px; }
    .action-btn-copy{
      min-width: 0;
      display:flex;
      flex-direction:column;
      gap: 4px;
    }
    .action-btn--emovox{
      position: relative;
      width: 100%;
      box-sizing: border-box;
      min-height: 148px;
      align-items: center;
      padding-top: 20px;
      overflow: visible;
    }
    .action-btn--emovox .btn-icon{
      width: 36px;
      height: 36px;
      flex: 0 0 36px;
    }
    .action-btn--emovox .btn-icon .icon-svg{
      width: 36px;
      height: 36px;
    }
    .home-feature-badge{
      display:inline-flex;
      align-self:flex-start;
      padding: 6px 10px;
      border-radius: 999px;
      border: 1px solid rgba(250,244,218,0.18);
      background: rgba(37, 64, 104, 0.96);
      color: var(--creme);
      font-size: 8px;
      font-weight: 800;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      margin-bottom: 2px;
      white-space: nowrap;
    }
    .action-btn--emovox .home-feature-badge{
      position: absolute;
      top: 0;
      left: 22px;
      margin: 0;
      transform: translateY(-50%);
      z-index: 2;
      box-shadow: 0 8px 20px rgba(5,18,35,0.24);
    }
    .action-btn--emovox .btn-label{
      color: var(--gold-light);
      margin-bottom: 0;
    }
    .action-btn--emovox .btn-title{
      margin-top: 1px;
    }
    .action-btn--emovox .btn-desc{
      max-width: 50ch;
      display:-webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 3;
      overflow: hidden;
    }
    .btn-desc {
      font-size: 11px;
      font-weight: 400;
      color: rgba(250,244,218,0.92);
      line-height: 1.4;
    }

    /* Streak tracker */
    .streak-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px;
      background: rgba(250, 244, 218, 0.03);
      border: 1px solid var(--border);
      border-radius: 12px;
    }
    .streak-label {
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: rgba(250,244,218,0.92);
    }
    .streak-dots {
      display: flex;
      gap: 6px;
    }
    .streak-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--border);
    }
    .streak-dot.done { background: var(--gold); }

    /* ── CALIBRATE SCREEN ── */
    .calibrate-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      padding: 36px 28px 24px;
      gap: 0;
      overflow-y: auto;
    }
    .screen-title {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.25em;
      text-transform: uppercase;
      color: var(--gold);
      margin-bottom: 8px;
    }
    .screen-headline {
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
      font-size: 26px;
      font-weight: 300;
      color: var(--creme);
      margin-bottom: 6px;
      line-height: 1.2;
    }
    .screen-sub {
      font-size: 12px;
      color: rgba(250,244,218,0.92);
      line-height: 1.5;
      margin-bottom: 28px;
    }

    .signal-card {
      background: rgba(250, 244, 218, 0.04);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 20px;
      margin-bottom: 12px;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .signal-card:active { transform: scale(0.98); }
    .signal-card.selected {
      border-color: var(--gold);
      background: rgba(201, 168, 76, 0.08);
    }
    .signal-question {
      font-size: 13px;
      font-weight: 500;
      color: var(--creme);
      margin-bottom: 14px;
      line-height: 1.4;
    }
    .signal-options {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }
    .signal-option {
      padding: 10px 12px;
      border-radius: 8px;
      border: 1px solid var(--border);
      font-size: 11px;
      font-weight: 500;
      color: rgba(250,244,218,0.92);
      text-align: center;
      cursor: pointer;
      transition: all 0.15s ease;
      line-height: 1.3;
    }
    .signal-option:active { transform: scale(0.96); }
    .signal-option.selected-a {
      background: rgba(80, 180, 120, 0.2);
      border-color: rgba(80, 180, 120, 0.6);
      color: #7DDBA8;
    }
    .signal-option.selected-b {
      background: rgba(201, 168, 76, 0.15);
      border-color: var(--gold);
      color: var(--gold-light);
    }

    .calibrate-result {
      margin-top: 20px;
      padding: 20px;
      border-radius: 14px;
      border: 1px solid var(--border-strong);
      background: rgba(250, 244, 218, 0.05);
      text-align: center;
      display: none;
    }
    .calibrate-result.show { display: block; }
    .result-label {
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: rgba(250,244,218,0.92);
      margin-bottom: 6px;
    }
    .result-status {
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
      font-size: 22px;
      font-weight: 500;
      margin-bottom: 8px;
    }
    .result-status.optimal { color: #7DDBA8; }
    .result-status.neutral { color: var(--gold-light); }
    .result-status.degrade { color: #F08080; }
    .result-advice {
      font-size: 12px;
      color: rgba(250,244,218,0.92);
      line-height: 1.5;
      margin-bottom: 16px;
    }
    .result-cta {
      background: var(--navy-light);
      border: 1px solid var(--gold);
      border-radius: 10px;
      padding: 14px 20px;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      color: var(--gold-light);
      cursor: pointer;
      width: 100%;
      transition: all 0.2s ease;
    }
    .result-cta:active { background: var(--gold); color: var(--navy); }

    /* ── BREATHE SCREEN ── */
    .breathe-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      padding: 32px 28px 24px;
      align-items: center;
    }

    .breathe-top {
      width: 100%;
      margin-bottom: 20px;
    }

    /* Protocol selector */
    .protocol-tabs {
      display: flex;
      gap: 8px;
      margin-bottom: 20px;
      width: 100%;
    }
    .protocol-tab {
      flex: 1;
      padding: 10px 4px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: transparent;
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.1em;
      color: rgba(250,244,218,0.92);
      cursor: pointer;
      text-align: center;
      transition: all 0.2s ease;
    }
    .protocol-tab.active {
      border-color: var(--gold);
      background: rgba(201, 168, 76, 0.1);
      color: var(--gold-light);
    }
    .protocol-tab-name { font-size: 9px; display: block; margin-bottom: 2px; }
    .protocol-tab-rhythm { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; font-size: 14px; font-weight: 500; display: block; }

    /* Duration selector */
    .duration-tabs {
      display: flex;
      gap: 8px;
      margin-bottom: 28px;
      width: 100%;
    }
    .duration-tab {
      flex: 1;
      padding: 9px 4px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: transparent;
      font-size: 11px;
      font-weight: 600;
      color: rgba(250,244,218,0.92);
      cursor: pointer;
      text-align: center;
      transition: all 0.2s ease;
    }
    .duration-tab.active {
      border-color: var(--gold);
      background: rgba(201, 168, 76, 0.1);
      color: var(--gold);
    }

    /* Breathing guide */
    .circle-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      flex: 1;
      justify-content: center;
      width: 100%;
    }

    .breath-guide {
      width: 100%;
      max-width: 360px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      padding: 12px 0 8px;
    }

    .breath-bar-track {
      position: relative;
      width: 100%;
      height: 14px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: rgba(250, 244, 218, 0.03);
      overflow: hidden;
    }

    .breath-bar-fill {
      position: absolute;
      inset: 0;
      border-radius: 999px;
      /* Par défaut : inspiration (doré) – plus opaque pour mieux distinguer la fin */
      background: linear-gradient(90deg,
        rgba(201, 168, 76, 0.0),
        rgba(201, 168, 76, 0.84),
        rgba(201, 168, 76, 0.0)
      );
      transform: scaleX(0);
      transform-origin: center;
      box-shadow: 0 0 28px rgba(201, 168, 76, 0.30);
    }

    /* Expiration : crème / blanc (charte) */
    .breath-bar-fill.exhale {
      background: linear-gradient(90deg,
        rgba(250, 244, 218, 0.0),
        rgba(250, 244, 218, 0.86),
        rgba(250, 244, 218, 0.0)
      );
      box-shadow: 0 0 28px rgba(250, 244, 218, 0.24);
    }

    .breath-bar-center {
      position: absolute;
      left: 50%;
      top: -7px;
      width: 2px;
      height: 28px;
      background: rgba(201, 168, 76, 0.35);
      transform: translateX(-50%);
      border-radius: 2px;
      pointer-events: none;
    }

    .session-progress-track {
      width: 100%;
      height: 4px;
      border-radius: 999px;
      background: rgba(250, 244, 218, 0.08);
      border: 1px solid rgba(201, 168, 76, 0.18);
      overflow: hidden;
      margin-top: 8px;
    }

    .session-progress-fill {
      height: 100%;
      width: 0%;
      background: var(--gold);
      border-radius: 999px;
      transition: width 1s linear;
    }

    .breath-phase-label {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: var(--gold);
      margin-bottom: 4px;
    }
    .breath-count {
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
      font-size: 42px;
      font-weight: 300;
      color: var(--creme);
      line-height: 1;
    }
    .breath-count-unit {
      font-size: 11px;
      font-weight: 500;
      color: rgba(250,244,218,0.92);
      letter-spacing: 0.1em;
    }

/* Progress arc */
    .progress-arc {
      position: absolute;
      top: 0; left: 0;
      width: 220px;
      height: 220px;
    }
    .progress-arc circle {
      fill: none;
      stroke: var(--gold);
      stroke-width: 2;
      stroke-linecap: round;
      stroke-dasharray: 660;
      stroke-dashoffset: 660;
      transform: rotate(-90deg);
      transform-origin: center;
      transition: stroke-dashoffset linear;
    }

    .breathe-info {
      text-align: center;
      margin-top: 24px;
      margin-bottom: 16px;
    }
    .breathe-cycles {
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: rgba(250,244,218,0.92);
      margin-bottom: 4px;
    }
    .breathe-timer {
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
      font-size: 18px;
      color: var(--creme);
    }

    .breathe-start-btn {
      width: 100%;
      padding: 18px;
      border-radius: 14px;
      border: 1px solid var(--gold);
      background: var(--navy-light);
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", Arial, sans-serif;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--gold-light);
      cursor: pointer;
      transition: all 0.2s ease;
      margin-top: auto;
    }
    .breathe-start-btn:active { background: var(--gold); color: var(--navy); }
    .breathe-start-btn.running {
      background: rgba(240, 128, 128, 0.15);
      border-color: rgba(240, 128, 128, 0.5);
      color: #F08080;
    }

    /* ── ANCRAGE SCREEN ── */
    .anchor-content{
      flex: 1;
      display: flex;
      flex-direction: column;
      padding: 22px 22px 16px;
      gap: 0;
      overflow-y: auto; /* should fit without scroll; kept as safety */
    }

    /* When a recommended plan is active, reduce cognitive load at the top:
       keep the title, hide the long mantra block so the CTA stays above the fold. */
    .anchor-content--plan .anchor-mantra,
    .anchor-content--plan .anchor-note{
      display: none;
      display: none;
    }

    .anchor-intro{ margin-bottom: 12px; }

    /* Compact intro: one actionable line (reduce cognitive load) */
    .anchor-kicker{
      margin-top: 8px;
      font-size: 12px;
      color: rgba(250, 244, 218, 0.75);
      line-height: 1.45;
    }


    .anchor-mantra{
      display: none;
      margin-top: 10px;
      padding: 12px 14px;
      border-radius: 14px;
      border: 1px solid var(--border);
      background: rgba(250, 244, 218, 0.035);
    }
    .anchor-mantra-line{
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
      font-size: 16px;
      font-weight: 300;
      color: var(--creme);
      line-height: 1.35;
    }
    .anchor-mantra-line + .anchor-mantra-line{ margin-top: 6px; }
    .anchor-mantra-line strong{ font-weight: 500; color: var(--gold-light); }

    .anchor-note{
      margin-top: 8px;
      font-size: 10px;
      color: rgba(250, 244, 218, 0.58);
      letter-spacing: 0.02em;
    }
    /* Filters (library mode only)
       Goal: highly visible + always clickable (avoid being visually “lost”). */
    .anchor-filters{
      /*
        Placement demandé (cf. maquette):
        - 4 objectifs groupés
        - “Tous” isolé en dessous
        - rendu moins “pilule”, plus “bouton”
      */
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      overflow-x: visible;

      /* Keep filters visible and above cards */
      position: sticky;
      top: 0;
      z-index: 50;

      /* Full-width background (compensate anchor-content padding: 22px) */
      margin: -6px -22px 10px;
      padding: 12px 22px 12px;
      background: linear-gradient(to bottom, rgba(13, 27, 42, 0.98), rgba(13, 27, 42, 0.88));
      backdrop-filter: blur(10px);

      border-bottom: 1px solid rgba(201, 168, 76, 0.18);
    }
    .anchor-filters::-webkit-scrollbar{ display:none; }

    .anchor-filters-label{
      grid-column: 1 / -1;
      display: inline-flex;
      align-items: center;
      padding-right: 2px;
      margin-right: 2px;
      margin-bottom: 2px;
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: rgba(201, 168, 76, 0.95);
      opacity: 0.95;
    }

    .anchor-card.is-filtered-out{
      display: none !important;
    }

    .anchor-filter{
      width: 100%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 42px;
      padding: 10px 12px;
      border-radius: 12px;
      border: 1px solid rgba(201, 168, 76, 0.42);
      background: rgba(201, 168, 76, 0.10);
      color: rgba(250, 244, 218, 0.92);
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.10em;
      text-transform: uppercase;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      pointer-events: auto;
      user-select: none;
      white-space: nowrap;
    }
    .anchor-filter:active{ transform: scale(0.98); }
    .anchor-filter.active{
      border-color: rgba(226, 201, 126, 0.95);
      background: var(--gold);
      color: var(--navy);
      box-shadow: 0 8px 18px rgba(201, 168, 76, 0.22);
    }

    /* “Tous” isolé en dessous (plein largeur en mobile) */
    #anchorFilterAll{ grid-column: 1 / -1; }

    /* Sur écrans plus larges : 4 boutons sur une ligne, “Tous” centré en dessous */
    @media (min-width: 520px){
      .anchor-filters{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
      #anchorFilterAll{ grid-column: 2 / span 2; }
    }

    /* Micro-ajustements pour très petits écrans */
    @media (max-width: 360px){
      .anchor-filter{ font-size: 10px; letter-spacing: 0.08em; }
    }

    /* Other anchors wrapper (guided mode) */
    .anchor-more{
      border: 1px solid var(--border);
      border-radius: 14px;
      background: rgba(250, 244, 218, 0.025);
      margin-top: 6px;
      overflow: hidden;
    }

    .anchor-more-summary{
      list-style: none;
      padding: 14px 14px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: rgba(250, 244, 218, 0.85);
      background: rgba(250, 244, 218, 0.02);
      -webkit-tap-highlight-color: transparent;
    }
    .anchor-more-summary::-webkit-details-marker{ display:none; }
    .anchor-more-summary::after{
      content: '▾';
      color: rgba(201,168,76,0.85);
      transform: rotate(0deg);
      transition: transform 0.18s ease;
    }
    details[open].anchor-more .anchor-more-summary::after{ transform: rotate(180deg); }

    .anchor-more .anchor-list{
      padding: 12px 12px 2px;
    }

    /* Library mode: keep list open and remove wrapper chrome */
    .anchor-more.is-library{
      border: none;
      background: transparent;
      margin-top: 0;
      overflow: visible;
    }
    .anchor-more.is-library .anchor-more-summary{ display: none; }
    .anchor-more.is-library .anchor-list{ padding: 0; }

    /* Détails toggle */
    .anchor-details-btn{
      align-self: flex-start;
      background: transparent;
      border: none;
      padding: 0;
      margin-top: -2px;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: rgba(201,168,76,0.85);
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }
    .anchor-details-btn:active{ transform: scale(0.98); }

    /* Guided mode: tighten above the fold */
    .anchor-content--guided .anchor-filters{ display:none; }

    .anchor-card{
      background: rgba(250, 244, 218, 0.04);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 14px 14px 12px;
      margin-bottom: 10px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      scroll-margin-top: 84px; /* keep card visible below sticky filters */
    }
    .anchor-card-top{
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 12px;
    }
    .anchor-card-title{
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
      font-size: 18px;
      font-weight: 500;
      color: var(--creme);
      letter-spacing: 0.02em;
      line-height: 1.1;
      text-transform: uppercase;
    }
    .anchor-card-sub{
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: rgba(250,244,218,0.92);
      line-height: 1.3;
    }
    .anchor-card-desc{
      font-size: 11px;
      color: rgba(250,244,218,0.92);
      line-height: 1.45;
      display: none;
    }
    .anchor-card.show-desc .anchor-card-desc{
      display: -webkit-box;
      -webkit-line-clamp: 5;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    .anchor-card-btn{
      margin-top: 2px;
      width: 100%;
      padding: 11px 14px;
      border-radius: 12px;
      border: 1px solid var(--border-strong);
      background: rgba(250, 244, 218, 0.03);
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", Arial, sans-serif;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: rgba(250, 244, 218, 0.6);
      cursor: not-allowed;
    }
    .anchor-card-btn span{ color: var(--gold-light); }

    /* Anchor audio controls (POINT ZÉRO) */
    .anchor-audio{
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-top: 2px;
    }
    .anchor-audio-btn{
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      padding: 12px 14px;
      border-radius: 12px;
      border: 1px solid var(--gold);
      background: rgba(201, 168, 76, 0.10);
      color: var(--gold-light);
      cursor: pointer;
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", Arial, sans-serif;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      -webkit-tap-highlight-color: transparent;
    }
    .anchor-audio-btn:active{ transform: scale(0.98); background: rgba(201, 168, 76, 0.18); }
    .anchor-audio-btn.playing{
      background: rgba(250, 244, 218, 0.06);
      border-color: rgba(250, 244, 218, 0.35);
      color: var(--creme);
    }
    .anchor-audio-ic{
      display: inline-flex;
      width: 22px;
      height: 22px;
      align-items: center;
      justify-content: center;
      border-radius: 999px;
      border: 1px solid rgba(201, 168, 76, 0.45);
      color: inherit;
      font-size: 12px;
      line-height: 1;
      flex: 0 0 auto;
    }
    .anchor-audio-bar{
      width: 100%;
      height: 6px;
      border-radius: 999px;
      background: rgba(250, 244, 218, 0.10);
      border: 1px solid rgba(201, 168, 76, 0.20);
      overflow: hidden;
      cursor: pointer;
    }
    .anchor-audio-bar-fill{
      height: 100%;
      width: 0%;
      border-radius: 999px;
      background: var(--gold);
    }
    .anchor-audio-meta{
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 10px;
      color: rgba(250, 244, 218, 0.62);
    }
    .anchor-audio-time{
      font-variant-numeric: tabular-nums;
      letter-spacing: 0.04em;
    }
    .anchor-audio-hint{
      color: rgba(250, 244, 218, 0.50);
    }


    @media (max-height: 760px){
      .anchor-content{ padding: 18px 20px 14px; }
      .anchor-card{ padding: 12px 12px 10px; margin-bottom: 8px; }
      .anchor-card-desc{ -webkit-line-clamp: 1; }
      .anchor-mantra{ padding: 10px 12px; }
      .anchor-mantra-line{ font-size: 15px; }
    }

    /* ── RYTHME (TRACKING MINIMAL) ── */
    .trace-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      padding: 36px 28px 24px;
      overflow-y: auto;
    }

    .trace-headline {
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
      font-size: 26px;
      font-weight: 300;
      color: var(--creme);
      margin-bottom: 4px;
    }
    .trace-sub {
      font-size: 12px;
      color: rgba(250,244,218,0.92);
      margin-bottom: 28px;
    }

    /* NOTE: l'ancien calendrier mensuel (V1) a été retiré au profit d'un suivi 7 jours.
       On conserve un design minimal et actionnable (Présence / Série / Dernière). */

    .stats-row {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 10px;
      margin-bottom: 20px;
    }
    .stat-card {
      background: rgba(250, 244, 218, 0.04);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 16px 12px;
      text-align: center;
    }
    .stat-value {
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
      font-size: 28px;
      font-weight: 400;
      color: var(--gold-light);
      line-height: 1;
      margin-bottom: 4px;
    }
    .stat-label {
      font-size: 9px;
      font-weight: 600;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: rgba(250,244,218,0.92);
    }

    .trace-today-card {
      background: rgba(201, 168, 76, 0.06);
      border: 1px solid var(--border-strong);
      border-radius: 14px;
      padding: 20px;
      text-align: center;
      margin-bottom: 16px;
    }
    .trace-today-label {
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--gold);
      margin-bottom: 8px;
    }
    .trace-today-text {
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
      font-size: 18px;
      color: var(--creme);
      margin-bottom: 14px;
      line-height: 1.4;
    }
    .trace-insight-card,
    .trace-history-card {
      background: rgba(250, 244, 218, 0.04);
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 16px 14px;
      margin-bottom: 12px;
    }
    .trace-insight-head{
      display:flex;
      flex-direction:column;
      gap:4px;
      margin-bottom: 12px;
    }
    .trace-insight-title{
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--gold-light);
    }
    .trace-insight-sub{
      font-size: 12px;
      line-height: 1.45;
      color: rgba(250,244,218,0.82);
    }
    .trace-impact-grid{
      display:grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
    }
    .trace-impact-item{
      border: 1px solid rgba(250,244,218,0.10);
      border-radius: 14px;
      background: rgba(7, 20, 54, 0.62);
      padding: 14px 10px;
      text-align:center;
    }
    .trace-impact-label{
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: rgba(250,244,218,0.86);
      margin-bottom: 8px;
      line-height: 1.35;
    }
    .trace-impact-value{
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
      font-size: 18px;
      color: var(--creme);
      line-height: 1.1;
    }
    .trace-history-list{
      display:flex;
      flex-direction:column;
      gap:10px;
    }
    .trace-history-empty{
      border: 1px dashed rgba(250,244,218,0.16);
      border-radius: 14px;
      padding: 14px 12px;
      text-align:center;
      font-size: 12px;
      line-height: 1.45;
      color: rgba(250,244,218,0.74);
    }
    .trace-entry{
      border: 1px solid rgba(250,244,218,0.10);
      border-radius: 14px;
      background: rgba(7, 20, 54, 0.56);
      padding: 12px 12px;
    }
    .trace-entry-top{
      display:flex;
      justify-content:space-between;
      gap:10px;
      align-items:flex-start;
      margin-bottom: 8px;
    }
    .trace-entry-title{
      font-size: 13px;
      font-weight: 700;
      color: var(--creme);
      line-height: 1.35;
    }
    .trace-entry-time{
      font-size: 11px;
      color: rgba(250,244,218,0.74);
      white-space: nowrap;
    }
    .trace-entry-badges{
      display:flex;
      flex-wrap:wrap;
      gap:6px;
    }
    .trace-badge{
      display:inline-flex;
      align-items:center;
      padding: 6px 9px;
      border-radius: 999px;
      border: 1px solid rgba(201,168,76,0.28);
      background: rgba(201,168,76,0.10);
      color: rgba(250,244,218,0.94);
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.04em;
    }
    .trace-entry-delta{
      margin-top: 8px;
      font-size: 11px;
      line-height: 1.4;
      color: rgba(250,244,218,0.74);
    }
    @media (max-width: 420px){
      .trace-impact-grid{ grid-template-columns: 1fr; }
      .trace-entry-top{ flex-direction:column; }
      .trace-entry-time{ white-space: normal; }
    }

    .mark-btn {
      width: 100%;
      padding: 16px;
      border-radius: 12px;
      border: 1px solid var(--gold);
      background: var(--navy-light);
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", Arial, sans-serif;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--gold-light);
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .mark-btn:active { background: var(--gold); color: var(--navy); }
    .mark-btn.done-today {
      background: rgba(80, 180, 120, 0.15);
      border-color: rgba(80, 180, 120, 0.5);
      color: #7DDBA8;
    }

    .baseline-quote {
      margin-top: auto;
      padding-top: 20px;
      text-align: center;
      border-top: 1px solid var(--border);
    }
    .baseline-text {
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
      font-size: 15px;
      font-style: italic;
      color: rgba(250,244,218,0.92);
      line-height: 1.5;
    }

    /* ── NAV BAR ── */
    .nav-bar {
      display: flex;
      border-top: 1px solid var(--border);
      padding: 12px 0 max(12px, env(safe-area-inset-bottom));
      background: var(--navy-deep);
      flex-shrink: 0;
    }
    .nav-item {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      cursor: pointer;
      padding: 6px;
      transition: all 0.2s ease;
    }
    .nav-icon {
      width: 22px;
      height: 22px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--creme);
      opacity: 0.68;
      transition: opacity 0.2s, color 0.2s;
    }
    .nav-icon .icon-svg{ width: 22px; height: 22px; display:block; }
    .nav-item[data-go="breathe"] .nav-icon{ width: 24px; height: 24px; }
    .nav-item[data-go="breathe"] .nav-icon .icon-svg{ width: 24px; height: 24px; }
    .nav-item[data-go="emovox-modules"] .nav-icon{ width: 20px; height: 20px; }
    .nav-item[data-go="emovox-modules"] .nav-icon .icon-svg{ width: 20px; height: 20px; }
    .nav-item[data-go="emovox-modules"] .nav-label { font-size: 7px; letter-spacing: 0.11em; }
    .nav-label {
      font-size: 8px;
      font-weight: 700;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      color: rgba(250,244,218,0.92);
      transition: color 0.2s;
    }
    .nav-item.active .nav-icon { opacity: 1; color: var(--gold); }
    .nav-item.active .nav-label { color: var(--gold); }

    /* ── BACK BUTTON ── */
    .back-btn{
      background: none;
      border: none;
      color: var(--text-on-navy);
      cursor: pointer;
      width: 44px;
      height: 44px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      opacity: 0.85;
      transition: opacity 0.2s, color 0.2s, background 0.2s;
    }
    .back-btn:active{ color: var(--gold); opacity: 1; }
    .back-btn:hover{ opacity: 1; }
    .back-btn:focus-visible{
      outline: 2px solid var(--border-strong);
      outline-offset: 2px;
    }
    .back-icon{
      width: 22px;
      height: 22px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2.8;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

/* ── SPLASH ── */
    #splash {
      position: fixed;
      inset: 0;
      background: var(--navy-deep);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      /* Optical vertical centering (accounts for iOS home-indicator area) */
      padding-top: env(safe-area-inset-top);
      padding-bottom: calc(env(safe-area-inset-bottom) + 28px);
      z-index: 100;
      transition: none;
    }
    #splash.fade{ pointer-events: none; }
    .splash-inner{
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      opacity: 1;
      transition: opacity 0.5s ease;
    }
    #splash.fade .splash-inner{
      opacity: 0;
    }
    .splash-logo {
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
      font-size: 48px;
      font-weight: 300;
      letter-spacing: 0.2em;
      color: var(--creme);
      margin-bottom: 6px;
    }
    .splash-logo span { color: var(--gold); }
    .splash-os {
      font-size: 11px; /* +10% */
      font-weight: 700;
      letter-spacing: 0.4em;
      text-transform: uppercase;
      color: rgba(250,244,218,0.92);
      margin-bottom: 60px;
    }
    .splash-line {
      width: 60px;
      height: 1px;
      background: var(--gold);
      margin-bottom: 20px;
    }
    .splash-baseline {
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
      font-size: 15.4px; /* +10% */
      font-style: italic;
      color: rgba(250,244,218,0.92);
      letter-spacing: 0.05em;
    }

    /* Splash language chooser */
    .splash-lang-hint{
      margin-top: 172px;
      font-size: 12px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: rgba(250,244,218,0.92);
      opacity: 0.9;
    }
    .splash-lang{
      display: flex;
      gap: 12px;
      margin-top: 10px;
    }
    .splash-lang-btn{
      border: 1px solid rgba(212,175,55,0.55);
      background: transparent;
      color: var(--creme);
      padding: 10px 14px;
      border-radius: 12px;
      font-weight: 600;
      letter-spacing: 0.02em;
    }
    .splash-lang-btn--selected{
      background: rgba(212,175,55,0.18);
      border-color: rgba(212,175,55,0.85);
    }
    .splash-lang-btn:active{ transform: translateY(1px); }
    .splash-lang-btn:focus{
      outline: none;
      box-shadow: 0 0 0 3px rgba(212,175,55,0.18);
    }

    .splash-enter-btn{
      margin-top: 14px;
      width: 360px;
      max-width: 86vw;
      border: 1px solid rgba(212,175,55,0.65);
      background: rgba(212,175,55,0.10);
      color: var(--creme);
      padding: 12px 14px;
      border-radius: 14px;
      font-weight: 700;
      letter-spacing: 0.16em;
      text-transform: uppercase;
    }
    .splash-enter-btn:active{ transform: translateY(1px); }
    .splash-enter-btn:focus{ outline: none; box-shadow: 0 0 0 3px rgba(212,175,55,0.18); }

    /* Splash first steps (entry point to the user guide) */
    .splash-firststeps{
      margin-top: 18px;
      width: 360px;
      max-width: 86vw;
      background: rgba(4,15,43,0.92);
      border: 1px solid rgba(201,168,76,0.35);
      border-radius: 16px;
      padding: 12px 12px;
      box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    }



    /* Splash logo (accueil) */
    .splash-logo-wrap{
      position: relative;
      width: 360px;
      max-width: 86vw;
      margin-bottom: 10px;
    }
    .splash-logo-img{
      width: 100%;
      height: auto;
      display: block;
    }


/* ── STARTUP / SMALL IPHONE SAFETY ───────────────────────────────────── */
#splash{
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 340px), (max-height: 620px){
  #splash{
    justify-content: flex-start;
    padding: max(10px, env(safe-area-inset-top)) 12px calc(env(safe-area-inset-bottom) + 16px);
  }
  .splash-inner{
    width: 100%;
    min-height: 100%;
    justify-content: flex-start;
    padding: 6px 0 14px;
  }
  .splash-logo-wrap,
  .splash-firststeps,
  .splash-enter-btn{
    width: min(100%, 320px);
    max-width: 100%;
  }
  .splash-logo-wrap{
    margin-bottom: 6px;
  }
  .splash-os{
    margin-bottom: 18px;
    font-size: 10px;
  }
  .splash-line{
    margin-bottom: 12px;
  }
  .splash-baseline{
    font-size: 13px;
    text-align: center;
  }
  .splash-firststeps{
    margin-top: 14px;
    padding: 10px 10px;
  }
  .splash-lang-hint{
    margin-top: 18px;
    font-size: 11px;
    text-align: center;
  }
  .splash-lang{
    margin-top: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .splash-lang-btn{
    min-height: 42px;
  }
  .splash-enter-btn{
    margin-top: 12px;
  }
}
/* ── COMPLETE SCREEN ── */
    .complete-overlay {
      position: fixed;
      inset: 0;
      background:
        radial-gradient(circle at top, rgba(27, 60, 106, 0.34), transparent 32%),
        linear-gradient(180deg, #071634 0%, #04112a 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 50;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.35s ease;
      padding: 26px;
      text-align: center;
    }
    .complete-overlay.show { opacity: 1; pointer-events: all; }
    .complete-shell{
      width: min(100%, 560px);
      max-height: min(92dvh, 860px);
      overflow-y: auto;
      padding: 10px 0 6px;
    }
    .complete-shell::-webkit-scrollbar{ display:none; }
    .complete-icon { font-size: 56px; margin-bottom: 18px; }
    .complete-title {
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
      font-size: 32px;
      font-weight: 300;
      color: var(--creme);
      margin-bottom: 12px;
    }
    .complete-msg {
      font-size: 13px;
      color: rgba(250,244,218,0.92);
      line-height: 1.6;
      white-space: pre-line;
      margin: 0 auto 24px;
      max-width: 520px;
    }
    .complete-btn {
      padding: 16px 26px;
      border-radius: 12px;
      border: 1px solid var(--gold);
      background: rgba(13, 27, 42, 0.88);
      box-shadow: 0 8px 24px rgba(0,0,0,0.22);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--gold-light);
      cursor: pointer;
      width: 100%;
    }
    .complete-btn:active { background: var(--gold); color: var(--navy); }
    .complete-btn--ghost{
      background: rgba(250, 244, 218, 0.04);
      border-color: rgba(250, 244, 218, 0.18);
      color: rgba(250,244,218,0.92);
      box-shadow: none;
    }
    .complete-btn--primary{
      background: rgba(7, 28, 62, 0.92);
    }
    .complete-feedback{
      margin-top: 14px;
      border: 1px solid rgba(250,244,218,0.14);
      border-radius: 22px;
      background: rgba(12, 24, 72, 0.76);
      box-shadow: 0 16px 40px rgba(0,0,0,0.22);
      padding: 24px 18px 18px;
      text-align: left;
      backdrop-filter: blur(10px);
    }
    .complete-feedback-title{
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
      font-size: 22px;
      line-height: 1.15;
      color: var(--creme);
      margin-bottom: 8px;
    }
    .complete-feedback-sub{
      font-size: 13px;
      line-height: 1.5;
      color: rgba(250,244,218,0.88);
      margin-bottom: 16px;
    }
    .complete-metric + .complete-metric{ margin-top: 12px; }
    .complete-metric-label{
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--gold-light);
      margin-bottom: 8px;
    }
    .complete-segment{
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }
    .complete-segment-btn{
      min-height: 48px;
      border-radius: 14px;
      border: 1px solid rgba(250,244,218,0.18);
      background: rgba(17, 33, 89, 0.84);
      color: rgba(250,244,218,0.96);
      font-size: 12px;
      font-weight: 700;
      padding: 10px 8px;
      cursor: pointer;
      transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    }
    .complete-segment-btn:active{ transform: scale(0.98); }
    .complete-segment-btn.is-selected{
      border-color: rgba(226,201,126,0.92);
      background: rgba(201,168,76,0.18);
      color: var(--creme);
      box-shadow: 0 10px 22px rgba(201,168,76,0.16);
    }
    .complete-before{
      margin-top: 14px;
      font-size: 12px;
      line-height: 1.45;
      color: rgba(250,244,218,0.88);
    }
    .complete-feedback-actions{
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-top: 16px;
    }
    @media (max-width: 420px){
      .complete-overlay{ padding: 18px 16px; }
      .complete-shell{ width: 100%; }
      .complete-title{ font-size: 28px; }
      .complete-feedback{ padding: 20px 14px 14px; }
      .complete-feedback-title{ font-size: 18px; }
      .complete-segment-btn{ font-size: 11px; min-height: 46px; }
      .complete-feedback-actions{ gap: 10px; }
    }

    /* scrollbar */
    .home-content::-webkit-scrollbar,
    .calibrate-content::-webkit-scrollbar,
    .anchor-content::-webkit-scrollbar,
    .trace-content::-webkit-scrollbar { display: none; }
  
    /* ── UPDATE BANNER (PWA) ── */
    .update-banner{
      position: fixed;
      left: 18px;
      right: 18px;
      bottom: 92px;
      background: rgba(4,15,43,0.96);
      border: 1px solid rgba(250,244,218,0.16);
      border-radius: 16px;
      overflow: hidden;
      padding: 12px 12px;
      display: flex;
      gap: 12px;
      align-items: center;
      justify-content: space-between;
      box-shadow: 0 10px 30px rgba(0,0,0,0.25);
      opacity: 0;
      transform: translateY(10px);
      pointer-events: none;
      transition: opacity 0.18s ease, transform 0.18s ease;
      z-index: 9998;
    }
    .update-banner.show{
      opacity: 1;
      transform: translateY(0);
      pointer-events: auto;
    }
    .update-banner__text{
      min-width: 0;
      flex: 1;
    }
    .update-banner__title{
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--gold-light);
      margin-bottom: 4px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .update-banner__sub{
      font-size: 12px;
      line-height: 1.25;
      color: rgba(250,244,218,0.86);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .update-banner__actions{
      display: flex;
      gap: 8px;
      flex: 0 0 auto;
    }
    .update-btn{
      border-radius: 12px;
      border: 1px solid rgba(250,244,218,0.22);
      background: rgba(250,244,218,0.10);
      color: var(--creme);
      padding: 10px 10px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      cursor: pointer;
      white-space: nowrap;
    }
    .update-btn:active{
      background: rgba(250,244,218,0.18);
    }
    .update-btn--primary{
      border-color: rgba(209,178,80,0.55);
      background: rgba(209,178,80,0.18);
      color: var(--gold-light);
    }

    /* ── TOAST ── */
    .toast{
      position: fixed;
      left: 50%;
      transform: translateX(-50%);
      bottom: 92px;
      background: rgba(4,15,43,0.92);
      border: 1px solid rgba(250,244,218,0.14);
      color: var(--creme);
      padding: 10px 12px;
      border-radius: 12px;
      font-size: 12px;
      max-width: calc(100% - 56px);
      text-align: center;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.18s ease;
      z-index: 9999;
    }
    .toast.show{ opacity: 1; }



    /* ── Utilities (no inline styles) ── */
    .mt-14 { margin-top: 14px; }
    .mt-12 { margin-top: 12px; }
    .mt-6 { margin-top: 6px; }
    .signal-hint { font-size: 10px; opacity: 0.7; display: inline-block; }

    /* Variant button (tracking reset) */
    .mark-btn--ghost {
      background: rgba(250, 244, 218, 0.02);
      border-color: rgba(201, 168, 76, 0.35);
    }

    /* ── MODE SITUATION ── */
    .situation-content{
      flex: 1;
      display: flex;
      flex-direction: column;
      padding: 36px 28px 24px;
      overflow-y: auto;
      gap: 16px;
    }

    .situation-grid{
      display: grid;
      grid-template-columns: 1fr;
      gap: 12px;
      margin-top: 6px;
    }

    .situation-btn{
      background: rgba(250, 244, 218, 0.04);
      border: 1px solid var(--border);
      border-radius: 16px;
      overflow: hidden;
      padding: 18px 18px;
      text-align: left;
      cursor: pointer;
      transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
      -webkit-tap-highlight-color: transparent;
    }

    .situation-btn:active{
      transform: scale(0.98);
      background: rgba(250, 244, 218, 0.08);
      border-color: var(--border-strong);
    }

    .situation-btn-top{
      display:flex;
      align-items:center;
      gap: 12px;
      margin-bottom: 10px;
    }

    .situation-ic{
      width: 42px;
      height: 42px;
      border-radius: 12px;
      border: 1px solid var(--border);
      display:flex;
      align-items:center;
      justify-content:center;
      color: var(--gold);
      background: rgba(250,244,218,0.03);
      flex-shrink: 0;
    }
    .situation-ic .icon-svg{ width: 22px; height: 22px; display:block; }

    .situation-label{
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--gold);
      margin-bottom: 4px;
    }

    .situation-badge{
      display: inline-flex;
      align-items: center;
      margin-top: 8px;
      padding: 4px 8px;
      border-radius: 999px;
      border: 1px solid rgba(250, 244, 218, 0.14);
      background: rgba(9, 43, 68, 0.68);
      color: var(--gold);
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      line-height: 1;
    }

    .situation-title{
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
      font-size: 20px;
      font-weight: 500;
      line-height: 1.15;
      color: var(--creme);
    }

    .situation-desc{
      font-size: 12px;
      line-height: 1.5;
      color: rgba(250,244,218,0.92);
    }

    .situation-back{
      margin-top: 10px;
      width: 100%;
      padding: 14px 16px;
      border-radius: 12px;
      border: 1px solid var(--border);
      background: rgba(250,244,218,0.02);
      color: var(--creme);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      cursor: pointer;
    }

    .situation-back:active{
      transform: scale(0.98);
      background: rgba(250,244,218,0.06);
    }

    /* ── EMOVOX context cards: compact premium composition ── */
    #screen-emovox-situation .situation-btn{
      position: relative;
      overflow: visible;
      padding: 16px 18px 14px;
    }

    #screen-emovox-situation .situation-btn-top{
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 8px;
    }

    #screen-emovox-situation .situation-btn-top > div:last-child{
      flex: 1;
      min-width: 0;
      padding-right: 116px;
    }

    #screen-emovox-situation .situation-label{
      margin-bottom: 3px;
    }

    #screen-emovox-situation .situation-title{
      line-height: 1.08;
    }

    #screen-emovox-situation .situation-badge{
      position: absolute;
      top: 0;
      right: 16px;
      margin-top: 0;
      transform: translateY(-52%);
      padding: 5px 10px;
      font-size: 9px;
      letter-spacing: 0.14em;
      background: linear-gradient(180deg, rgba(39, 57, 75, 0.98) 0%, rgba(24, 40, 56, 0.98) 100%);
      box-shadow: 0 4px 10px rgba(0,0,0,0.18);
      z-index: 1;
      white-space: nowrap;
    }

    #screen-emovox-situation .situation-desc{
      line-height: 1.46;
    }

    @media (max-width: 360px){
      #screen-emovox-situation .situation-btn-top > div:last-child{
        padding-right: 104px;
      }
      #screen-emovox-situation .situation-badge{
        right: 14px;
        padding: 4px 8px;
        font-size: 8px;
      }
    }


    /* ── FLOW UI (Mode Situation) ── */
    .flow-overlay{
      position: absolute;
      inset: 0;
      z-index: 50;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 22px;
      background: rgba(13, 27, 42, 0.86);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
    }

    .flow-card,
    .flow-inline{
      width: 100%;
      max-width: 420px;
      background: rgba(250, 244, 218, 0.04);
      border: 1px solid var(--border-strong);
      border-radius: 18px;
      padding: 18px 18px;
      box-shadow: 0 18px 60px rgba(0,0,0,0.35);
    }

    .flow-inline{
      margin-bottom: 12px;
      box-shadow: none;
    }

    .flow-chip{
      display:inline-flex;
      align-items:center;
      gap: 8px;
      padding: 8px 10px;
      border-radius: 999px;
      border: 1px solid rgba(201,168,76,0.45);
      background: rgba(250,244,218,0.02);
      color: var(--gold-light);
      font-size: 9px;
      font-weight: 800;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      margin-bottom: 12px;
    }

    .flow-title{
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
      font-size: 22px;
      font-weight: 500;
      color: var(--creme);
      line-height: 1.2;
      margin-bottom: 8px;
    }

    .flow-sub{
      font-size: 12px;
      color: rgba(250,244,218,0.92);
      line-height: 1.5;
      margin-bottom: 12px;
    }

    .flow-sub--tight{
      margin-top: -6px;
      margin-bottom: 12px;
      opacity: 0.95;
    }

    .flow-form{
      display: grid;
      gap: 10px;
      margin: 0 0 12px 0;
    }

    .flow-row{
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 10px 12px;
      border-radius: 14px;
      border: 1px solid rgba(201,168,76,0.24);
      background: linear-gradient(180deg, rgba(250,244,218,0.04), rgba(250,244,218,0.02));
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
    }

    .flow-row--stacked{
      flex-direction: column;
      align-items: stretch;
      justify-content: flex-start;
      padding: 12px;
      gap: 10px;
    }

    .flow-row-top{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap: 12px;
    }

    .flow-row-label{
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
      font-size: 15px;
      color: rgba(250,244,218,0.97);
      font-weight: 600;
      font-variant-caps: all-small-caps;
      letter-spacing: 0.08em;
      line-height: 1.15;
      min-width: 0;
      text-rendering: geometricPrecision;
    }

    .flow-row-meta{
      font-size: 8px;
      font-weight: 700;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: rgba(201,168,76,0.62);
      white-space: nowrap;
      opacity: 0.82;
    }

    .flow-pillset{
      display:grid;
      grid-template-columns: repeat(2, minmax(0,1fr));
      gap: 8px;
      width: 100%;
    }

    .flow-choice{
      min-height: 42px;
      padding: 10px 12px;
      border-radius: 12px;
      border: 1px solid rgba(250,244,218,0.12);
      background: rgba(13,27,42,0.64);
      color: rgba(250,244,218,0.86);
      font-size: 11px;
      font-weight: 600;
      line-height: 1.15;
      text-align: center;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: border-color .18s ease, background .18s ease, color .18s ease, transform .12s ease, box-shadow .18s ease;
    }

    .flow-choice:active{
      transform: scale(0.985);
    }

    .flow-choice:focus-visible{
      outline: 2px solid rgba(201,168,76,0.55);
      outline-offset: 2px;
    }

    .flow-choice.is-selected{
      border-color: rgba(201,168,76,0.82);
      background: linear-gradient(180deg, rgba(201,168,76,0.22), rgba(201,168,76,0.12));
      color: var(--gold-light);
      box-shadow: inset 0 0 0 1px rgba(201,168,76,0.18), 0 10px 24px rgba(5,10,20,0.22);
    }

    .flow-list{
      list-style: none;
      display: grid;
      gap: 8px;
      margin: 0 0 14px 0;
      padding: 0;
    }

    .flow-list li{
      padding: 10px 12px;
      border-radius: 12px;
      border: 1px solid rgba(201,168,76,0.22);
      background: rgba(250,244,218,0.02);
      font-size: 12px;
      color: rgba(250,244,218,0.86);
    }

    .flow-timer{
      font-size: 34px;
      font-weight: 700;
      letter-spacing: 0.04em;
      color: var(--gold-light);
      text-align: center;
      margin: 2px 0 14px;
      font-variant-numeric: tabular-nums;
    }

    .flow-note{
      text-align: center;
      font-size: 11px;
      color: rgba(250,244,218,0.78);
      margin: -8px 0 14px;
    }

    .flow-actions{
      display:flex;
      gap: 10px;
    }

    .flow-btn{
      flex: 1;
      padding: 14px 14px;
      border-radius: 12px;
      border: 1px solid rgba(201,168,76,0.55);
      background: rgba(201,168,76,0.16);
      color: var(--creme);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }

    /* More obvious CTA for recommended sessions */
    .flow-btn--primary{
      /* Premium, high-contrast CTA: gold fill + navy label */
      background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
      border-color: var(--gold);
      color: var(--navy);
      box-shadow:
        0 10px 22px rgba(201,168,76,0.22),
        0 1px 0 rgba(255,255,255,0.24) inset;
    }

    .flow-btn--primary:active{
      background: var(--gold);
      color: var(--navy);
      box-shadow: 0 8px 18px rgba(201,168,76,0.18);
    }

    .flow-btn:active{ transform: scale(0.98); background: rgba(201,168,76,0.26); }

    .flow-btn--ghost{
      background: rgba(250,244,218,0.02);
      border: 1px solid var(--border);
      color: rgba(250,244,218,0.92);
    }

    .flow-btn--ghost:active{ background: rgba(250,244,218,0.06); }

    .flow-target{
      border-color: var(--gold);
      box-shadow: 0 0 0 1px rgba(201,168,76,0.25) inset;
    }




    /* ── HOME GRID: keep the 4 cards strictly same size on mobile ── */
    @media (max-width: 520px){
      /* Slightly widen the 2x2 home grid on mobile (use the available side space)
         so the Situation tile description fits without truncation. */
      .home-content{
        padding-left: 20px;
        padding-right: 20px;
      }

      .home-cta-bar{
        padding-left: 20px;
        padding-right: 20px;
      }

      .action-grid{
        align-items: stretch;
      }
      .action-grid > .action-btn:not(.primary){
        /* Keep only the 2 secondary cards visually aligned. */
        aspect-ratio: 4 / 5;
        min-height: 0;
        padding: 18px 14px;
        gap: 8px;
      }
      /* Keep text from changing card height */
      .btn-desc{
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 4;
        overflow: hidden;
      }
      /* Full-width cards: compact height, no square ratio on iPhone */
      .home-feature .action-btn.primary,
      .action-grid > .action-btn.primary{
        width: 100%;
        aspect-ratio: auto !important;
        min-height: 156px;
        padding: 20px 18px;
        gap: 14px;
      }
      .action-btn.primary .action-btn-copy{
        flex: 1 1 auto;
        min-width: 0;
      }
      /* Situation tile: allow the kicker to wrap cleanly instead of overflowing. */
      .action-btn[data-go="situation"] .btn-label{
        white-space: normal;
        display: block;
        font-size: 8.5px;
        letter-spacing: 0.12em;
        line-height: 1.34;
        max-width: none;
      }
      .action-btn[data-go="situation"] .btn-desc{
        font-size: 10.6px;
        line-height: 1.34;
        -webkit-line-clamp: 3;
      }
      .action-btn--emovox{
        width: 100%;
        min-height: 156px;
        padding-top: 18px;
      }
      .action-btn--emovox .action-btn-copy{
        gap: 3px;
      }
      .home-feature-badge{
        font-size: 7.5px;
        letter-spacing: 0.13em;
        padding: 5px 9px;
      }
      .action-btn--emovox .home-feature-badge{
        left: 16px;
      }
      .action-btn.primary .btn-title{ font-size: 21px; }
      .action-btn.primary .btn-desc{ -webkit-line-clamp: 4; }
      .action-btn--emovox .btn-desc{ -webkit-line-clamp: 2; }

    }
    @supports not (aspect-ratio: 4 / 5){
      @media (max-width: 520px){
        .action-btn{ height: 214px; }
      }
    }



/* ── MOBILE FRAME FIX (iOS): prevent horizontal mis-framing ── */
@media (max-width: 520px){
  body{ align-items: stretch; }
  #app{ max-width: 100vw; width: 100vw; left: 0; right: 0; margin: 0 auto; }
  .screen{ width: 100vw; }
}


/* ── SESSION PLANNER ── */
.plan-content{
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 32px 28px 24px;
  overflow-y: auto;
  gap: 14px;
}

.plan-window-card{
  padding: 18px 18px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: rgba(250, 244, 218, 0.05);
}
.plan-window-label{
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(250,244,218,0.92);
  margin-bottom: 8px;
}
.plan-window-status{
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 8px;
}
.plan-window-status.optimal{ color: #7DDBA8; }
.plan-window-status.neutral{ color: var(--gold-light); }
.plan-window-status.degrade{ color: #F08080; }
.plan-window-advice{
  font-size: 12px;
  color: rgba(250,244,218,0.92);
  line-height: 1.5;
}

.plan-step{
  margin-top: 2px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.plan-intent-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.plan-intent-card{
  background: rgba(250, 244, 218, 0.04);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 16px;
  text-align: left;
}

.plan-intent-top{
  display:flex;
  align-items:center;
  gap: 12px;
  margin-bottom: 10px;
}

.plan-intent-ic{
      width: 34px;
      height: 34px;
      border-radius: 12px;
      border: 1px solid rgba(201,168,76,0.35);
      display:flex;
      align-items:center;
      justify-content:center;
      color: var(--gold);
      background: rgba(250,244,218,0.03);
      flex-shrink: 0;
    }
    .plan-intent-ic .icon-svg{ width: 18px; height: 18px; display:block; }

.plan-intent-label{
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.plan-intent-title{
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--creme);
}

.plan-intent-desc{
  font-size: 12px;
  line-height: 1.5;
  color: rgba(250,244,218,0.92);
  margin-bottom: 12px;
}

.plan-q-list{
  display:flex;
  flex-direction: column;
  gap: 8px;
}

.plan-q{
  width: 100%;
  text-align: left;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(250,244,218,0.02);
  color: var(--creme);
  font-size: 12px;
  line-height: 1.35;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.plan-q:active{
  transform: scale(0.99);
  border-color: var(--border-strong);
  background: rgba(250,244,218,0.05);
}

.plan-q.selected{
  border-color: var(--gold);
  background: rgba(201,168,76,0.10);
  color: var(--gold-light);
}

.plan-summary{
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: rgba(250, 244, 218, 0.04);
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.plan-summary-title{
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--creme);
  margin-bottom: 2px;
}

.plan-summary-row{
  display:flex;
  justify-content: space-between;
  gap: 10px;
}

.plan-summary-k{
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(250,244,218,0.92);
  flex: 0 0 92px;
}

.plan-summary-v{
  font-size: 12px;
  line-height: 1.35;
  color: var(--creme);
  flex: 1;
  text-align: right;
}

.plan-start-btn{
  margin-top: 6px;
  background: var(--navy-light);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-light);
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
}

.plan-start-btn:disabled{
  opacity: 0.45;
  cursor: not-allowed;
}

.plan-start-btn:active{ background: var(--gold); color: var(--navy); }

.plan-back-btn{
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(250,244,218,0.02);
  color: var(--creme);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.plan-hint{
  font-size: 12px;
  color: rgba(250,244,218,0.92);
  line-height: 1.5;
  text-align: center;
  margin-top: 2px;
}

.plan-flow{
  margin-top: 10px;
  background: rgba(250, 244, 218, 0.085);
  border-color: rgba(201,168,76,0.42);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.plan-flow .flow-chip{
  border-color: rgba(201,168,76,0.60);
  background: rgba(250,244,218,0.06);
  color: var(--gold);
}

.plan-flow .flow-sub{
  color: rgba(250,244,218,0.86);
}

/* ── HOME: BOTTOM CTA BAR ─────────────────────────────────────────────── */
.home-cta-bar{
  padding: 0 28px 14px;
  flex-shrink: 0;
}
.home-cta{
  width: 100%;
  height: 64px;
  background: rgba(250,244,218,0.03);
  border: 1px solid rgba(201,168,76,0.62);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.home-cta:active{
  transform: scale(0.985);
  background: rgba(250,244,218,0.08);
}
.home-cta-title{
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-light);
}


/* ── HOME: COMPACT LAYOUT (small heights / iOS) ─────────────────────────── */
html.home-compact #screen-home .home-content{
  padding-top: 26px;
  padding-bottom: 12px;
  gap: 12px;
}
html.home-compact #screen-home .greeting-text{ font-size: 26px; }
html.home-compact #screen-home .action-grid > .action-btn:not(.primary){
  aspect-ratio: 1 / 1.12;
  padding: 16px 12px;
  gap: 7px;
}
html.home-compact #screen-home .home-feature .action-btn.primary,
html.home-compact #screen-home .action-grid > .action-btn.primary{
  aspect-ratio: auto !important;
  min-height: 148px;
}
html.home-compact #screen-home .btn-desc{ font-size: 10.5px; line-height: 1.32; }
html.home-compact #screen-home .home-cta{ height: 56px; }

html.home-compact2 #screen-home .home-content{ padding-top: 22px; }
html.home-compact2 #screen-home .greeting-text{ font-size: 24px; }
html.home-compact2 #screen-home .action-grid > .action-btn:not(.primary){ aspect-ratio: 1 / 1.02; }
html.home-compact2 #screen-home .home-feature .action-btn.primary,
html.home-compact2 #screen-home .action-grid > .action-btn.primary{
  aspect-ratio: auto !important;
  min-height: 142px;
}
html.home-compact2 #screen-home .home-cta{ height: 52px; }
/* Legacy (previous grid CTA) — kept for safety */
.action-btn--cta{ grid-column: 1 / -1; min-height: 64px; padding: 16px 18px; border-radius: 14px; border-color: rgba(201,168,76,0.62); background: rgba(250,244,218,0.03); display: flex; align-items: center; justify-content: center; text-align: center; gap: 0; }
.action-btn--cta:active{ transform: scale(0.985); background: rgba(250,244,218,0.08); }
.action-btn--cta .cta-title{ font-size: 11px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-light); }

/* ── ABOUT / POUR ALLER PLUS LOIN ─────────────────────────────────────── */
.about-content{
  flex: 1;
  display: block;
  padding: 18px 16px 110px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.about-content::-webkit-scrollbar{
  width: 0;
  height: 0;
  display: none;
}
.about-section{
  margin-top: 18px;
}
.about-section-title{
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 10px;
}
.about-card{
  background: rgba(250, 244, 218, 0.04);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 14px;
  color: var(--creme);
  font-size: 13px;
  line-height: 1.6;
}
.about-profiles{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.about-profile{
  background: rgba(250, 244, 218, 0.04);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.about-photo{
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid rgba(201,168,76,0.35);
  background: rgba(10, 22, 34, 0.45);
  overflow: hidden;
  position: relative;
  --about-photo-url: none;
  --about-photo-pos: center;
}
.about-photo::before{
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 25%, rgba(201,168,76,0.22), transparent 55%);
}
.about-photo::after{
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--about-photo-url);
  background-size: cover;
  background-position: var(--about-photo-pos);
  background-repeat: no-repeat;
  filter: saturate(1.02) contrast(1.02);
}
.about-photo--claire{
  --about-photo-url: url('./assets/about/claire.webp');
  --about-photo-pos: center 18%;
}
.about-photo--thierry{
  --about-photo-url: url('./assets/about/thierry.webp');
  --about-photo-pos: center 22%;
}

.about-profile-name{
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--gold-light);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.about-profile-role{
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250,244,218,0.72);
}
.about-profile-text{
  font-size: 14px;
  color: rgba(250,244,218,0.88);
  line-height: 1.72;
}
.about-profile-text strong{
  color: rgba(250,244,218,0.96);
  font-weight: 700;
}

.about-card, .about-profile-text, .about-content .screen-sub{ white-space: pre-line; }

.about-cta{
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  margin-top: 12px;
  padding: 15px 18px;
  border-radius: 16px;
  border: 1px solid rgba(201,168,76,0.92);
  background: linear-gradient(180deg, rgba(226,198,110,0.98) 0%, rgba(201,168,76,0.98) 100%);
  color: #10233a;
  text-decoration: none;
  text-align: center;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.32;
  text-transform: uppercase;
  white-space: pre-line;
  box-shadow: 0 10px 26px rgba(201,168,76,0.22), inset 0 1px 0 rgba(255,245,210,0.35);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.about-cta:active{
  transform: scale(0.985);
  filter: brightness(0.98);
  box-shadow: 0 6px 18px rgba(201,168,76,0.18), inset 0 1px 0 rgba(255,245,210,0.28);
}
.about-cta:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.22), 0 10px 26px rgba(201,168,76,0.22), inset 0 1px 0 rgba(255,245,210,0.35);
}

.emovox-practice-content{
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 22px 22px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.emovox-practice-card{
  margin-top: 10px;
  padding: 16px 14px 14px;
}
.anchor-card-top--emovox{
  align-items: flex-start;
  gap: 10px;
}
.emovox-practice-badge{
  position: static;
  margin-left: auto;
  white-space: nowrap;
}
.emovox-practice-audio{
  margin-top: 14px;
}
.emovox-breath-card{
  margin-top: 14px;
  padding: 12px 12px 10px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(250, 244, 218, 0.025);
}
.emovox-breath-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.emovox-breath-rhythm{
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold-light);
}
.emovox-breath-guide{
  padding: 6px 0 0;
}
.emovox-breath-meta{
  margin-top: 8px;
}
#screen-emovox-practice .situation-back{
  margin-top: 14px;
}
@media (max-width: 420px){
  .emovox-practice-content{ padding: 18px 20px 14px; }
  .anchor-card-top--emovox{ flex-direction: column; }
  .emovox-practice-badge{ margin-left: 0; }
}

.emovox-page{
  padding-top: 24px;
  padding-bottom: 110px;
}
.emovox-intro{
  margin-bottom: 12px;
}
.emovox-headline{
  max-width: 12ch;
}
.emovox-byline{
  max-width: 34ch;
}
.emovox-portrait-byline{
  max-width: 24ch;
  margin-top: 0;
  white-space: normal;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 12.5px;
  line-height: 1.14;
  color: rgba(250,244,218,0.96);
}
.emovox-portrait-card{
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  min-height: 248px;
  margin: 0 0 20px;
  padding: 14px 16px 0;
  border-radius: 18px;
  border: 1px solid rgba(201,168,76,0.34);
  background:
    radial-gradient(circle at 18% 18%, rgba(201,168,76,0.18), transparent 46%),
    linear-gradient(180deg, rgba(250,244,218,0.05), rgba(250,244,218,0.02));
  overflow: hidden;
}
.emovox-portrait-card::after{
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 44%;
  background: linear-gradient(180deg, rgba(10,22,34,0), rgba(10,22,34,0.78));
  pointer-events: none;
}
.emovox-portrait-copy{
  position: relative;
  z-index: 1;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  max-width: 42%;
  padding-bottom: 18px;
}
.emovox-portrait-name{
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 8px;
  white-space: nowrap;
}
.emovox-portrait-img{
  position: relative;
  z-index: 1;
  align-self: flex-end;
  display: block;
  width: auto;
  height: 232px;
  max-width: 58%;
  object-fit: contain;
  object-position: center bottom;
  margin-right: -6px;
}
.emovox-section{
  margin-top: 0;
  padding-top: 0;
}
.emovox-section + .emovox-section{
  margin-top: 18px;
}
.emovox-paragraph{
  font-size: 15px;
  line-height: 1.62;
  color: rgba(250,244,218,0.92);
}
.emovox-pillars{
  font-size: 14px;
  line-height: 1.75;
}
.emovox-accent-card{
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(201,168,76,0.42);
  background: linear-gradient(180deg, rgba(201,168,76,0.14), rgba(201,168,76,0.08));
  color: rgba(250,244,218,0.98);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 21px;
  line-height: 1.28;
  box-shadow: 0 14px 30px rgba(5,10,20,0.16);
}
.emovox-actions{
  margin-top: 18px;
}
.emovox-actions .flow-btn{
  width: 100%;
}
@media (max-width: 420px){
  .emovox-portrait-card{
    min-height: 224px;
    padding-left: 14px;
    padding-right: 12px;
  }
  .emovox-portrait-copy{
    max-width: 42%;
  }
  .emovox-portrait-name{
    font-size: 8px;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
  }
  .emovox-portrait-byline{
    margin-top: 0;
    font-size: 11px;
    line-height: 1.1;
    max-width: 22ch;
  }
  .emovox-portrait-img{
    width: auto;
    height: 208px;
    max-width: 60%;
    margin-right: -12px;
  }
  .emovox-accent-card{
    font-size: 19px;
  }
}
.about-card--contact{
  padding: 10px 12px;
}
.about-contact-lead{
  font-size: 12px;
  color: rgba(250,244,218,0.92);
  line-height: 1.5;
  padding: 6px 0 12px;
  border-bottom: 1px solid rgba(250,244,218,0.08);
  margin-bottom: 2px;
  white-space: pre-line;
}
.about-contact-row{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(250,244,218,0.08);
}
.about-contact-row:last-child{ border-bottom: none; }
.about-contact-k{
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250,244,218,0.70);
}
.about-contact-v{
  font-size: 13px;
  color: var(--creme);
  opacity: 0.9;
  text-align: right;
}

.about-contact-link{
  color: var(--gold-light);
  text-decoration: none;
  border-bottom: 1px solid rgba(226,201,126,0.35);
  padding-bottom: 1px;
}
.about-contact-link:active{
  opacity: 0.85;
}
.about-ety{
  color: rgba(250,244,218,0.78);
  font-style: italic;
}

@media (max-width: 900px){
  .about-profiles{ grid-template-columns: 1fr; }
}


/* ── HEADER ACTIONS (home) ───────────────────────────────────────────── */
.header-actions{ display:flex; align-items:center; gap:8px; }
.header-icon-btn{
  width: 34px;
  height: 30px;
  display:flex;
  align-items:center;
  justify-content:center;
  border: 1px solid rgba(176,145,68,0.55);
  background: rgba(250,244,218,0.03);
  color: var(--gold-light);
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.header-icon-btn:active{ transform: scale(0.98); background: rgba(176,145,68,0.18); }
.header-icon-btn .icon-svg{ width: 18px; height: 18px; }

/* Sound button state (Breathe) */
.header-icon-btn--sound{ position: relative; }
.header-icon-btn--sound.off{
  border-color: rgba(250,244,218,0.18);
  color: rgba(250,244,218,0.62);
}
.header-icon-btn--sound.off::after{
  content: "";
  position: absolute;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transform: rotate(-35deg);
}


/* ── SETTINGS ───────────────────────────────────────────────────────── */
.settings-content{
  flex: 1;
  display: block;
  padding: 18px 16px 110px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.settings-content::-webkit-scrollbar{ width: 0; height: 0; display:none; }

.settings-seg{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.settings-seg-btn{
  border: 1px solid rgba(250,244,218,0.14);
  background: rgba(250,244,218,0.03);
  color: rgba(250,244,218,0.88);
  border-radius: 14px;
  padding: 12px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.settings-seg-btn.active{
  border-color: rgba(201,168,76,0.70);
  background: rgba(201,168,76,0.10);
  color: var(--gold-light);
}
.settings-seg-btn:active{ transform: scale(0.99); }

.settings-row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
}
.settings-row-left{ min-width:0; }
.settings-row-title{
  font-size: 13px;
  font-weight: 700;
  color: var(--creme);
  line-height: 1.25;
}
.settings-row-sub{
  margin-top: 4px;
  font-size: 12px;
  color: rgba(250,244,218,0.92);
  line-height: 1.35;
}

.settings-toggle{
  flex: 0 0 auto;
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(201,168,76,0.55);
  background: rgba(250,244,218,0.03);
  color: var(--gold-light);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.settings-toggle-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(201,168,76,0.85);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.18);
}
.settings-toggle.off{
  border-color: rgba(250,244,218,0.18);
  color: rgba(250,244,218,0.72);
}
.settings-toggle.off .settings-toggle-dot{
  background: rgba(250,244,218,0.35);
  box-shadow: 0 0 0 3px rgba(250,244,218,0.10);
}
.settings-toggle-text{
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.settings-danger{
  flex: 0 0 auto;
  border: 1px solid rgba(250,120,120,0.45);
  background: rgba(250,120,120,0.06);
  color: rgba(250,200,200,0.92);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.settings-danger:active{ transform: scale(0.99); }

.settings-version{
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(250,244,218,0.78);
}


/* ── SETTINGS DEBUG (hidden) ─────────────────────────────────────── */
.debug-section{
  margin-top: 4px;
}
.debug-card{
  padding: 12px 14px;
}
.debug-row{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(250,244,218,0.08);
}
.debug-row:last-child{
  border-bottom: none;
}
.debug-k{
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(250,244,218,0.55);
  flex: 0 0 auto;
}
.debug-v{
  font-size: 12px;
  font-weight: 700;
  color: rgba(250,244,218,0.82);
  text-align: right;
  max-width: 62%;
  overflow-wrap: anywhere;
}
.debug-hint{
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.35;
  color: rgba(250,244,218,0.62);
}

/* ───────────────────────────────────────────────
   P1 polish: onboarding modal + protocol micro-hints
─────────────────────────────────────────────── */

.protocol-hint{
  margin: 10px 2px 10px;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(250,244,218,0.76);
}

.modal{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 18px 16px;
}
.modal[hidden]{ display: none; }

.modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.58);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.modal-card{
  position: relative;
  width: min(430px, calc(100vw - 32px));
  background: rgba(13,27,42,0.96);
  border: 1px solid rgba(250,244,218,0.14);
  border-radius: 18px;
  padding: 18px 16px 14px;
  box-shadow: 0 22px 70px rgba(0,0,0,0.55);
}

.modal-title{
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250,244,218,0.92);
}

.modal-text{
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(250,244,218,0.86);
}

.modal-actions{
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-btn{
  flex: 1 1 auto;
  border: 1px solid rgba(250,244,218,0.16);
  background: rgba(250,244,218,0.06);
  color: rgba(250,244,218,0.92);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.modal-btn:active{ transform: scale(0.99); }

.modal-btn--primary{
  border-color: rgba(201,168,76,0.55);
  background: rgba(201,168,76,0.16);
}

.modal-close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(250,244,218,0.12);
  background: rgba(250,244,218,0.06);
  color: rgba(250,244,218,0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}


/* ───────────────────────────────────────────────
   USER GUIDE (Mode d’emploi)
   ─────────────────────────────────────────────── */
#screen-guide{ display:flex; flex-direction:column; }
.guide-content{ flex:1; overflow-y:auto; padding:18px 18px 120px; -webkit-overflow-scrolling: touch; scrollbar-width:none; }
.guide-content::-webkit-scrollbar{ width:0; height:0; display:none; }

.guide-hero{ margin:10px 0 14px; padding:16px; border-radius:16px; border:1px solid var(--border); background:rgba(250,244,218,0.04); box-shadow:0 10px 24px rgba(0,0,0,0.18); }
.guide-hero-text{ font-size:14px; line-height:1.45; color:rgba(250,244,218,0.92); }
.guide-hero-lead{ font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; font-size:18px; font-weight:500; color:var(--creme); margin-bottom:10px; }
.guide-hero-sub{ font-size:13px; line-height:1.5; color:var(--text-muted); }
.guide-hero-sign{ margin-top:12px; padding-top:12px; border-top:1px solid rgba(201,168,76,0.25); }
.guide-sign-name{ font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; font-size:16px; letter-spacing:0.10em; color:var(--creme); }
.guide-sign-line{ font-size:10px; font-weight:800; letter-spacing:0.22em; text-transform:uppercase; color:var(--gold); margin-top:6px; }

.guide-section{ margin:14px 0; }
.guide-section-title{ font-size:10px; font-weight:800; letter-spacing:0.22em; text-transform:uppercase; color:var(--gold); }
.guide-section-text{ margin-top:8px; font-size:13px; line-height:1.5; color:rgba(250,244,218,0.88); }
.guide-section-text p{ margin:0 0 10px; color:rgba(250,244,218,0.88); }
.guide-section-text ul{ margin:10px 0 0 18px; }
.guide-section-text li{ margin:6px 0; }
.guide-shot{ margin-top:12px; padding:12px; border-radius:14px; border:1px dashed rgba(201,168,76,0.28); color:var(--text-muted); font-size:12px; line-height:1.35; background:rgba(250,244,218,0.03); }
.guide-shot-img{ width:100%; height:auto; display:block; border-radius:12px; border:1px solid rgba(201,168,76,0.18); background:rgba(0,0,0,0.12); }
.guide-shot-cap{ margin-top:10px; }
.guide-actions{ margin-top:18px; display:flex; flex-direction:column; gap:10px; }
.guide-never{ background:none; border:none; padding:6px 0 0; font-size:12px; color:var(--text-muted); text-decoration:underline; }

/* Settings: link row */
.settings-row--link{ width:100%; cursor:pointer; text-align:left; display:flex; align-items:center; justify-content:space-between; gap:14px; }
.settings-link-arrow{ font-size:22px; line-height:1; color:var(--muted); opacity:.8; }


/* ── GLOBAL SCROLLBAR HIDE ─────────────────────────────────────────── */
*{ scrollbar-width:none; -ms-overflow-style:none; }
*::-webkit-scrollbar{ width:0; height:0; display:none; }


/* ── FIRST STEPS BANNER (Home) ─────────────────────────────────────── */
.firststeps-banner{
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 92px;
  background: rgba(4,15,43,0.96);
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 16px;
  padding: 12px 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 9997;
}
.firststeps-banner.show{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.firststeps-inner{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.firststeps-title{
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.firststeps-btn{
  border: 1px solid rgba(201,168,76,0.55);
  background: rgba(201,168,76,0.16);
  color: rgba(250,244,218,0.96);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.firststeps-btn:active{ transform: scale(0.99); }
.firststeps-never{
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  font-size: 12px;
  color: rgba(250,244,218,0.92);
  text-decoration: underline;
  cursor: pointer;
}


/* ── DISABLED LANGUAGE (EN coming soon) ─────────────────────────────── */
.splash-lang-btn--disabled, .settings-seg-btn.disabled{
  opacity: 0.45;
  pointer-events: none;
}


.about-section--cta{
  margin-top: 8px;
}
.about-section--cta-inline{
  margin-top: 14px;
}
.about-cta--bibliography{
  min-height: 58px;
  margin-top: 0;
}
.books-content{
  min-height: calc(100dvh - 92px);
  padding: 26px 18px 118px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.books-content::-webkit-scrollbar{ width:0; height:0; }
.books-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 18px;
}
.book-card{
  display: grid;
  grid-template-columns: 112px minmax(0,1fr);
  gap: 14px;
  align-items: stretch;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.035) 0%, rgba(255,255,255,0.02) 100%);
  box-shadow: 0 14px 36px rgba(0,0,0,0.24);
}
.book-cover{
  position: relative;
  width: 118px;
  align-self: start;
}
.book-cover--visual{
  min-height: 0;
  padding: 0;
  border: none;
  background: none;
  overflow: visible;
  display: block;
}
.book-cover::after{ display:none; }
.book-cover-img{
  display:block;
  width: 118px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(201,168,76,0.28);
  box-shadow: 0 16px 36px rgba(0,0,0,0.28);
}
.book-cover-mark,
.book-cover-title,
.book-cover-author{
  display:none;
}
.book-meta{
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.book-title{
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 18px;
  line-height: 1.15;
  color: var(--creme);
  margin-bottom: 8px;
}
.book-summary{
  font-size: 13px;
  line-height: 1.56;
  color: rgba(255,255,255,0.78);
  margin-bottom: 10px;
}
.book-price{
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(223,196,118,0.92);
  margin-bottom: 12px;
}
.book-cta{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(201,168,76,0.9);
  background: linear-gradient(180deg, rgba(226,198,110,0.98) 0%, rgba(201,168,76,0.98) 100%);
  color: #10233a;
  text-decoration: none;
  text-align: center;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
  box-shadow: 0 10px 26px rgba(201,168,76,0.18), inset 0 1px 0 rgba(255,245,210,0.3);
}
.book-cta:active{
  transform: scale(0.985);
  filter: brightness(0.98);
}
.book-cta:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.22), 0 10px 26px rgba(201,168,76,0.18), inset 0 1px 0 rgba(255,245,210,0.3);
}
@media (max-width: 380px){
  .book-card{
    grid-template-columns: 1fr;
  }
  .book-cover{
    width: min(52vw, 180px);
    justify-self: center;
    margin-bottom: 2px;
  }
  .book-cover-img{
    width: 100%;
  }
}

@media (max-width: 640px){
  .about-section--cta-inline{
    margin-top: 12px;
  }
  .about-cta--bibliography{
    min-height: 56px;
    font-size: 11px;
    letter-spacing: 0.16em;
  }
}


/* ── iPhone SE (1st gen / 320px) compatibility pass ───────────────────── */
@media (max-width: 340px){
  .header{
    padding: max(12px, env(safe-area-inset-top)) 14px 10px;
    gap: 10px;
  }
  .header-brand-img--home{ height: 36px; }
  .header-brand-img--small{ height: 34px; }
  .header-right{
    min-width: 102px;
    gap: 5px;
  }
  .header-link{
    font-size: 7.2px;
    letter-spacing: 0.14em;
    padding: 6px 8px;
  }
  .header-actions{ gap: 6px; }
  .header-icon-btn{
    width: 32px;
    height: 28px;
    border-radius: 11px;
  }
  .header--internal .header-sub{
    font-size: 7.2px;
    letter-spacing: 0.12em;
    line-height: 1.15;
  }
  .header--internal .header-brand-img--small{
    max-width: min(188px, calc(100% - 110px));
  }

  .home-content{
    padding: 22px 16px 16px;
    gap: 12px;
  }
  .greeting{ margin-bottom: 4px; }
  .greeting-time{
    font-size: 9px;
    letter-spacing: 0.18em;
    margin-bottom: 4px;
  }
  .greeting-text{
    font-size: 22px;
    line-height: 1.12;
  }
  .home-feature{ margin-top: 6px; }
  .home-divider{
    padding: 2px 0 6px;
  }
  .home-divider span{
    width: min(80%, 248px);
  }
  .action-grid{
    gap: 10px;
    margin-top: 6px;
  }
  .action-grid > .action-btn:not(.primary){
    aspect-ratio: auto;
    min-height: 132px;
    padding: 14px 12px;
    gap: 7px;
    border-radius: 15px;
  }
  .home-feature .action-btn.primary,
  .action-grid > .action-btn.primary{
    min-height: 132px;
    padding: 16px 14px;
    gap: 10px;
    border-radius: 18px;
  }
  .action-btn--emovox{
    min-height: 132px;
    padding-top: 16px;
  }
  .action-btn.primary .btn-icon,
  .action-btn--emovox .btn-icon{
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }
  .action-btn.primary .btn-icon .icon-svg,
  .action-btn--emovox .btn-icon .icon-svg{
    width: 28px;
    height: 28px;
  }
  .home-feature-badge{
    font-size: 6.9px;
    letter-spacing: 0.11em;
    padding: 4px 8px;
  }
  .action-btn--emovox .home-feature-badge{
    left: 12px;
  }
  .btn-label{
    font-size: 7.6px;
    letter-spacing: 0.16em;
  }
  .action-btn[data-go="situation"] .btn-label{
    font-size: 7.6px;
    letter-spacing: 0.10em;
    line-height: 1.28;
  }
  .btn-title{
    font-size: 17px;
  }
  .action-btn.primary .btn-title{
    font-size: 18px;
  }
  .btn-desc,
  .action-btn[data-go="situation"] .btn-desc{
    font-size: 9.8px;
    line-height: 1.32;
    -webkit-line-clamp: 3;
  }
  .home-cta-bar{
    padding-left: 16px;
    padding-right: 16px;
  }
  .home-cta{
    min-height: 52px;
    border-radius: 16px;
  }
  .home-cta-title{
    font-size: 10px;
    letter-spacing: 0.18em;
  }

  .about-content,
  .emovox-page{
    padding: 14px 12px 102px;
  }
  .screen-headline{
    font-size: 16px;
    line-height: 1.28;
  }
  .screen-sub{
    font-size: 13px;
    line-height: 1.55;
  }
  .about-section{
    margin-top: 14px;
  }
  .about-card,
  .about-profile{
    border-radius: 14px;
  }
  .about-card{
    padding: 12px;
    font-size: 12.5px;
    line-height: 1.58;
  }
  .about-profile{
    padding: 12px;
    gap: 7px;
  }
  .about-photo{
    aspect-ratio: auto;
    height: 204px;
  }
  .about-profile-name{
    font-size: 16px;
  }
  .about-profile-role{
    font-size: 9px;
    letter-spacing: 0.14em;
  }
  .about-profile-text{
    font-size: 13px;
    line-height: 1.62;
  }
  .about-cta{
    min-height: 54px;
    padding: 13px 14px;
    font-size: 10px;
    letter-spacing: 0.12em;
    border-radius: 14px;
  }
  .about-contact-row{
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .about-contact-v{
    text-align: left;
    font-size: 12.5px;
    width: 100%;
  }

  .emovox-headline{
    max-width: none;
  }
  .emovox-portrait-card{
    min-height: 208px;
    padding: 12px 12px 0;
    gap: 10px;
  }
  .emovox-portrait-copy{
    max-width: 44%;
    padding-bottom: 14px;
  }
  .emovox-portrait-name{
    font-size: 7.4px;
    letter-spacing: 0.12em;
    margin-bottom: 7px;
  }
  .emovox-portrait-byline{
    font-size: 10.2px;
    line-height: 1.08;
    max-width: 18ch;
  }
  .emovox-portrait-img{
    height: 182px;
    max-width: 58%;
    margin-right: -10px;
  }
  .emovox-paragraph,
  .emovox-pillars{
    font-size: 13.5px;
    line-height: 1.58;
  }
  .emovox-accent-card{
    padding: 14px 15px;
    font-size: 18px;
    line-height: 1.24;
  }

  .book-card{
    padding: 12px;
    border-radius: 14px;
  }
  .book-cover{
    width: 82px;
  }
  .book-cover-img{
    width: 82px;
  }

  .nav-bar{
    padding: 10px 0 max(10px, env(safe-area-inset-bottom));
  }
  .nav-item{
    padding: 5px 3px;
    gap: 3px;
  }
  .nav-icon{
    width: 20px;
    height: 20px;
  }
  .nav-icon .icon-svg{
    width: 20px;
    height: 20px;
  }
  .nav-item[data-go="breathe"] .nav-icon,
  .nav-item[data-go="breathe"] .nav-icon .icon-svg{
    width: 21px;
    height: 21px;
  }
  .nav-item[data-go="emovox-modules"] .nav-icon,
  .nav-item[data-go="emovox-modules"] .nav-icon .icon-svg{
    width: 19px;
    height: 19px;
  }
  .nav-item[data-go="emovox-modules"] .nav-label{
    font-size: 6.2px;
    letter-spacing: 0.08em;
  }
  .nav-label{
    font-size: 7px;
    letter-spacing: 0.11em;
  }
}

@media (max-width: 340px) and (max-height: 600px){
  .home-content{
    padding-top: 18px;
    padding-bottom: 12px;
  }
  .greeting-text{
    font-size: 20px;
  }
  .home-feature .action-btn.primary,
  .action-grid > .action-btn.primary,
  .action-btn--emovox{
    min-height: 124px;
  }
  .action-grid > .action-btn:not(.primary){
    min-height: 124px;
  }
  .about-content,
  .emovox-page{
    padding-bottom: 96px;
  }
}


/* ── iPhone SE hard fix + cache-bust pass (v2.7.59-iphone-se-hardfix-cachebust) ───────────────────────── */
@media (max-width: 340px){
  .header{
    padding: max(10px, env(safe-area-inset-top)) 10px 8px !important;
    gap: 8px !important;
  }
  .header-brand-img--home{
    height: 30px !important;
    max-width: calc(100% - 96px) !important;
  }
  .header-brand-img--small{
    height: 28px !important;
    max-width: calc(100% - 88px) !important;
  }
  .header-right{
    min-width: 88px !important;
    gap: 4px !important;
  }
  .header-link{
    font-size: 6.4px !important;
    letter-spacing: 0.12em !important;
    padding: 5px 7px !important;
  }
  .header-actions{ gap: 4px !important; }
  .header-icon-btn{
    width: 28px !important;
    height: 24px !important;
    border-radius: 10px !important;
  }
  .header--internal .header-sub{
    font-size: 6.8px !important;
    letter-spacing: 0.10em !important;
    line-height: 1.1 !important;
  }

  .home-content{
    padding: 16px 10px 10px !important;
    gap: 10px !important;
  }
  .greeting{ margin-bottom: 2px !important; }
  .greeting-time{
    font-size: 8px !important;
    letter-spacing: 0.16em !important;
    margin-bottom: 3px !important;
  }
  .greeting-text{
    font-size: 19px !important;
    line-height: 1.08 !important;
  }
  .home-feature{ margin-top: 2px !important; }
  .home-divider{ padding: 0 0 3px !important; }
  .home-divider span{ width: min(74%, 220px) !important; }
  .action-grid{
    gap: 8px !important;
    margin-top: 4px !important;
  }
  .home-feature .action-btn.primary,
  .action-grid > .action-btn.primary,
  .action-btn--emovox{
    aspect-ratio: auto !important;
    min-height: 112px !important;
    padding: 14px 11px !important;
    gap: 9px !important;
    border-radius: 16px !important;
  }
  .action-btn.primary .btn-icon,
  .action-btn--emovox .btn-icon{
    width: 24px !important;
    height: 24px !important;
    flex: 0 0 24px !important;
  }
  .action-btn.primary .btn-icon .icon-svg,
  .action-btn--emovox .btn-icon .icon-svg{
    width: 24px !important;
    height: 24px !important;
  }
  .action-btn--emovox{
    padding-top: 15px !important;
  }
  .home-feature-badge{
    font-size: 6.1px !important;
    letter-spacing: 0.10em !important;
    padding: 3px 7px !important;
  }
  .action-btn--emovox .home-feature-badge{
    left: 9px !important;
    top: 0 !important;
  }
  .btn-label{
    font-size: 6.8px !important;
    letter-spacing: 0.12em !important;
    line-height: 1.18 !important;
  }
  .action-btn[data-go='situation'] .btn-label{
    font-size: 6.8px !important;
    letter-spacing: 0.09em !important;
    line-height: 1.18 !important;
    max-width: 24ch !important;
  }
  .btn-title,
  .action-btn.primary .btn-title{
    font-size: 15px !important;
    line-height: 1.02 !important;
  }
  .action-btn .action-btn-copy{ gap: 2px !important; }
  .btn-desc,
  .action-btn[data-go='situation'] .btn-desc{
    font-size: 8.8px !important;
    line-height: 1.24 !important;
    -webkit-line-clamp: 3 !important;
    max-width: none !important;
  }
  .action-grid > .action-btn:not(.primary){
    aspect-ratio: auto !important;
    min-height: 108px !important;
    padding: 12px 10px !important;
    gap: 6px !important;
    border-radius: 14px !important;
  }
  .home-cta-bar{
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  .home-cta{
    min-height: 48px !important;
    border-radius: 14px !important;
  }
  .home-cta-title{
    font-size: 9px !important;
    letter-spacing: 0.14em !important;
  }

  .about-content,
  .emovox-page{
    padding: 10px 8px 92px !important;
  }
  .screen-headline{
    font-size: 15px !important;
    line-height: 1.18 !important;
    margin-bottom: 2px !important;
  }
  .screen-sub{
    font-size: 12px !important;
    line-height: 1.42 !important;
    margin-bottom: 18px !important;
  }
  .about-section-title{
    font-size: 8.8px !important;
    letter-spacing: 0.18em !important;
  }
  .about-section{ margin-top: 12px !important; }
  .about-card,
  .about-profile{
    padding: 10px !important;
    border-radius: 12px !important;
  }
  .about-card{
    font-size: 11.8px !important;
    line-height: 1.48 !important;
  }
  .about-photo{
    height: 168px !important;
    border-radius: 12px !important;
  }
  .about-profile-name{
    font-size: 14px !important;
    line-height: 1.1 !important;
  }
  .about-profile-role{
    font-size: 8px !important;
    letter-spacing: 0.12em !important;
  }
  .about-profile-text{
    font-size: 11.5px !important;
    line-height: 1.46 !important;
  }
  .about-cta{
    min-height: 48px !important;
    padding: 12px 10px !important;
    font-size: 8.8px !important;
    letter-spacing: 0.10em !important;
    border-radius: 12px !important;
  }
  .about-contact-row{
    gap: 4px !important;
    padding: 8px 0 !important;
  }
  .about-contact-k{
    font-size: 8px !important;
    letter-spacing: 0.12em !important;
  }
  .about-contact-v{
    font-size: 11.5px !important;
    line-height: 1.4 !important;
  }

  .emovox-portrait-card{
    min-height: 188px !important;
    padding: 10px 10px 0 !important;
    gap: 8px !important;
  }
  .emovox-portrait-copy{
    max-width: 45% !important;
    padding-bottom: 10px !important;
  }
  .emovox-portrait-name{
    font-size: 7px !important;
    line-height: 1.04 !important;
    margin-bottom: 5px !important;
  }
  .emovox-portrait-byline{
    font-size: 9px !important;
    line-height: 1.04 !important;
    max-width: 16ch !important;
  }
  .emovox-portrait-img{
    height: 166px !important;
    max-width: 56% !important;
    margin-right: -8px !important;
  }
  .emovox-paragraph,
  .emovox-pillars{
    font-size: 12px !important;
    line-height: 1.46 !important;
  }
  .emovox-accent-card{
    padding: 12px 12px !important;
    font-size: 16px !important;
    line-height: 1.18 !important;
  }

  .book-card{
    padding: 10px !important;
    border-radius: 12px !important;
  }
  .book-cover{
    width: 74px !important;
  }
  .book-cover-img{
    width: 74px !important;
  }
  .book-title{ font-size: 15px !important; }
  .book-summary{ font-size: 11.5px !important; line-height: 1.42 !important; }
  .book-price{ font-size: 12px !important; }
  .book-cta{ min-height: 44px !important; font-size: 8.8px !important; }

  .nav-bar{
    padding: 8px 0 max(8px, env(safe-area-inset-bottom)) !important;
  }
  .nav-item{
    padding: 4px 2px !important;
    gap: 2px !important;
  }
  .nav-icon,
  .nav-icon .icon-svg{
    width: 18px !important;
    height: 18px !important;
  }
  .nav-item[data-go='breathe'] .nav-icon,
  .nav-item[data-go='breathe'] .nav-icon .icon-svg{
    width: 19px !important;
    height: 19px !important;
  }
  .nav-item[data-go='emovox-modules'] .nav-icon,
  .nav-item[data-go='emovox-modules'] .nav-icon .icon-svg{
    width: 17px !important;
    height: 17px !important;
  }
  .nav-item[data-go='emovox-modules'] .nav-label{
    font-size: 5.8px !important;
    letter-spacing: 0.06em !important;
  }
  .nav-label{
    font-size: 6.2px !important;
    letter-spacing: 0.08em !important;
  }
}

@media (max-width: 340px) and (max-height: 600px){
  .home-content{ padding-top: 12px !important; }
  .home-feature .action-btn.primary,
  .action-grid > .action-btn.primary,
  .action-btn--emovox{ min-height: 104px !important; }
  .action-grid > .action-btn:not(.primary){ min-height: 100px !important; }
  .about-photo{ height: 152px !important; }
}


/* ── Scroll hard fix (iPhone SE / old iOS Safari-PWA) ─────────────────── */
.screen{
  min-height: 100%;
}
.home-content,
.about-content,
.books-content,
.anchor-content,
.situation-content,
.emovox-practice-content,
.track-content,
.guide-content,
.settings-content,
.plan-content,
.breathe-content,
.complete-content,
.trace-content,
.modal-body,
.sheet-inner{
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
.home-content,
.about-content,
.books-content,
.anchor-content,
.situation-content,
.emovox-practice-content,
.track-content,
.guide-content,
.settings-content,
.plan-content,
.complete-content,
.trace-content,
.modal-body,
.sheet-inner{
  overflow-y: auto;
}
.breathe-content{
  overflow-y: auto;
}

/* Small / legacy iPhone: keep one narrow-screen fallback path and avoid stacked top-offset hacks. */
@media (max-width: 340px){
  html, body{
    height: 100%;
    min-height: 100%;
  }
  #app{
    height: var(--app-h, 100vh) !important;
    min-height: var(--app-h, 100vh) !important;
  }
  #splash{
    justify-content: flex-start !important;
    padding-top: 6px !important;
    padding-bottom: calc(env(safe-area-inset-bottom) + 12px) !important;
  }
  .splash-inner{
    min-height: auto !important;
    justify-content: flex-start !important;
    padding-top: 0 !important;
  }
  .header{
    padding-top: 4px !important;
  }
  .screen.active{
    overflow: hidden;
  }
  .home-content,
  .about-content,
  .books-content,
  .anchor-content,
  .situation-content,
  .guide-content,
  .settings-content,
  .track-content,
  .plan-content,
  .breathe-content,
  .calibrate-content,
  .trace-content,
  .emovox-page{
    min-height: 0 !important;
    max-height: none !important;
    touch-action: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
    padding-top: 4px !important;
    padding-bottom: calc(108px + env(safe-area-inset-bottom)) !important;
  }
  .nav-bar{
    position: sticky;
    bottom: 0;
    z-index: 20;
  }
}

/* CSS-only SE page-scroll fallback removed in lot 1: legacy mode is now gated by JS/class to avoid affecting all <=340px devices. */

/* ── Legacy iPhone page-scroll mode (robust fallback) ───────────────────── */
html.legacy-scroll-mode,
html.legacy-scroll-mode body{
  height: auto !important;
  min-height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-y: auto !important;
  touch-action: auto !important;
}
html.legacy-scroll-mode body{
  display: block !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
}
html.legacy-scroll-mode #app{
  position: static !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  margin: 0 !important;
  display: block !important;
  width: 100% !important;
  max-width: 100vw !important;
  height: auto !important;
  min-height: 100vh !important;
  overflow: visible !important;
}
html.legacy-scroll-mode #splash{
  justify-content: flex-start !important;
  padding-top: 6px !important;
  padding-bottom: calc(env(safe-area-inset-bottom) + 12px) !important;
}
html.legacy-scroll-mode .splash-inner{
  min-height: auto !important;
  justify-content: flex-start !important;
  padding-top: 0 !important;
}
html.legacy-scroll-mode .header{
  padding-top: 6px !important;
}
html.legacy-scroll-mode .screen{
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  min-height: 100vh !important;
  display: none !important;
  opacity: 1 !important;
  pointer-events: none !important;
  overflow: visible !important;
}
html.legacy-scroll-mode .screen.active{
  display: flex !important;
  pointer-events: auto !important;
}
html.legacy-scroll-mode .home-content,
html.legacy-scroll-mode .about-content,
html.legacy-scroll-mode .books-content,
html.legacy-scroll-mode .anchor-content,
html.legacy-scroll-mode .situation-content,
html.legacy-scroll-mode .guide-content,
html.legacy-scroll-mode .settings-content,
html.legacy-scroll-mode .track-content,
html.legacy-scroll-mode .plan-content,
html.legacy-scroll-mode .breathe-content,
html.legacy-scroll-mode .complete-content,
html.legacy-scroll-mode .trace-content,
html.legacy-scroll-mode .emovox-page,
html.legacy-scroll-mode .calibrate-content{
  flex: 0 0 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  -webkit-overflow-scrolling: auto !important;
  padding-top: 4px !important;
  padding-bottom: calc(108px + env(safe-area-inset-bottom)) !important;
}
html.legacy-scroll-mode .home-cta-bar,
html.legacy-scroll-mode .nav-bar{
  position: sticky !important;
  left: 0 !important;
  right: 0 !important;
}
html.legacy-scroll-mode .home-cta-bar{
  bottom: calc(52px + env(safe-area-inset-bottom)) !important;
  z-index: 19 !important;
}
html.legacy-scroll-mode .nav-bar{
  bottom: 0 !important;
  z-index: 20 !important;
}



.emovox-actions--stacked{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.emovox-actions--stacked .flow-btn{
  width:100%;
}
.emovox-modules-page{
  gap:14px;
}

.emovox-modules-intro{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:8px;
}
.emovox-modules-page-badge{
  align-self:flex-start;
}
.emovox-modules-grid{
  display:grid;
  gap:12px;
}
.emovox-module-btn{
  width:100%;
  text-align:left;
  cursor:pointer;
}
.emovox-module-badge{
  flex-shrink:0;
}
.anchor-card-top--emovox-module{
  align-items:flex-start;
  gap:12px;
}
.anchor-card-top--emovox-module .emovox-module-badge{
  margin-left:12px;
}
@media (max-width: 420px){
  .anchor-card-top--emovox-module{
    flex-direction:column;
  }
  .anchor-card-top--emovox-module .emovox-module-badge{
    margin-left:0;
  }
}


.emovox-module-btn .anchor-card-desc{
  display:block;
  overflow:visible;
  -webkit-line-clamp:unset;
  -webkit-box-orient:initial;
}
.emovox-module-btn .anchor-card-sub,
.emovox-module-btn .anchor-card-desc{
  white-space:normal;
}
.emovox-module-btn{
  min-height:0;
}

/* ═══════════════════════════════════════════════
   BETA GATE
═══════════════════════════════════════════════ */
#beta-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}
#beta-gate.beta-gate--hidden {
  display: none;
}
.beta-gate-inner {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.beta-gate-logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-transform: uppercase;
}
.beta-gate-os {
  font-size: 13px;
  letter-spacing: 0.25em;
  margin-left: 6px;
  color: var(--gold-light);
  vertical-align: middle;
}
.beta-gate-line {
  width: 40px;
  height: 1px;
  background: var(--gold);
  opacity: 0.45;
  margin: 18px auto 22px;
}
.beta-gate-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--creme);
  text-align: center;
  margin-bottom: 8px;
}
.beta-gate-sub {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 28px;
}
.beta-gate-field-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.beta-gate-input {
  width: 100%;
  background: var(--navy-light);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--creme);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  padding: 14px 16px;
  outline: none;
  -webkit-user-select: text;
  user-select: text;
  touch-action: manipulation;
}
.beta-gate-input::placeholder {
  color: rgba(250,244,218,0.3);
  font-weight: 400;
  letter-spacing: 0.08em;
}
.beta-gate-input:focus {
  border-color: var(--gold);
}
.beta-gate-error {
  font-size: 12px;
  color: #e07070;
  text-align: center;
  padding: 4px 0;
}
.beta-gate-btn {
  width: 100%;
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 15px 24px;
  cursor: pointer;
  text-transform: uppercase;
  margin-top: 4px;
}
.beta-gate-btn:active {
  opacity: 0.85;
}
