/* mobile.css: the phone layout (max-width 720px), so the site reads as an iOS
   app and not a shrunken desktop page; it also applies to the iOS app's web
   view, where html[data-native-app] is set. Loaded before reverie.css, which restyles it.
   One UI typeface (the system font, SF Pro on iPhone) for every control, label
   and list; Cinzel only for the wordmark and screen titles; Literata for the
   story. Filled rounded surfaces instead of outlined boxes, one bright button
   per screen, 44pt touch targets. Sizes come from the phone scale in
   tokens.css (--sv-fs-10..28, --sv-r-m-*, --sv-m-*). Designed on the live
   preview canvas, 2026-10-29. */
@media (max-width: 720px) {
  html[data-sv-theme]:root {
    --sv-m-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", system-ui, sans-serif;
    --sv-m-title: 'Cinzel', Georgia, serif;
    --sv-font-display: var(--sv-m-ui);
    --sv-font-body: var(--sv-m-ui);
    --sv-ls-label: 0; --sv-ls-control: 0; --sv-ls-title: 0;
    --sv-r: 12px;
    --sv-m-fill: rgba(255,255,255,.055);
    --sv-m-fill-2: rgba(255,255,255,.09);
    --sv-m-sep: rgba(255,255,255,.08);
    --sv-m-label: rgba(235,235,245,.6);      /* iOS secondary label */
    --sv-m-label-3: rgba(235,235,245,.38);   /* iOS tertiary label */
    --sv-m-bar: rgba(12,12,13,.82);
  }
  html[data-sv-theme] body { -webkit-font-smoothing: antialiased; }
  /* The starfield stays, quieter: behind lists it read as noise. */
  html constellation-sky { opacity: .45; }

  /* ---------- type roles ---------- */
  html .sv-title-1 { font-family: var(--sv-m-title); font-size: var(--sv-fs-28); line-height: 1.15; letter-spacing: 0; }
  html .sv-title-2 { font-size: var(--sv-fs-20); font-weight: 700; line-height: 1.25; }
  html .sv-title-3 { font-size: var(--sv-fs-16); font-weight: 600; line-height: 1.3; }
  html .sv-eyebrow { font-size: var(--sv-fs-13); font-weight: 600; letter-spacing: 0; text-transform: none; }
  html .sv-label { font-size: var(--sv-fs-13); font-weight: 500; letter-spacing: 0; color: var(--sv-m-label); }
  html .sv-text { font-size: var(--sv-fs-15); line-height: 1.4; }
  html .sv-text--italic, html .sv-hint { font-style: normal; }
  html .sv-hint { font-size: var(--sv-fs-13); line-height: 1.35; color: var(--sv-m-label-3); }
  html .sv-data { font-family: var(--sv-m-ui); font-variant-numeric: tabular-nums; }

  /* ---------- controls ---------- */
  html .sv-btn { height: 44px; padding: 0 16px; border: 0 solid transparent; border-radius: var(--sv-r-m-lg); background: var(--sv-m-fill-2);
    font-family: var(--sv-m-ui); font-size: var(--sv-fs-15); font-weight: 600; letter-spacing: 0; text-transform: none; box-shadow: none; color: var(--sv-text); }
  html .sv-btn::before, html .sv-btn::after { display: none; }
  html .sv-btn.is-loading::after { display: block; }
  html .sv-btn--sm { height: 32px; padding: 0 12px; border-radius: var(--sv-r-m-md); font-size: var(--sv-fs-13); }
  html .sv-btn--lg { height: 50px; border-radius: var(--sv-r-m-lg); font-size: var(--sv-fs-16); }
  html .sv-btn--icon { width: 40px; height: 40px; padding: 0; border-radius: var(--sv-r-pill); background: transparent; }
  html .sv-btn--icon.sv-btn--sm { width: 32px; height: 32px; border-radius: var(--sv-r-pill); }
  html .sv-btn--icon.sv-btn--lg { width: 48px; height: 48px; }
  html .sv-btn--quiet { background: transparent; }
  html .sv-btn--primary, html .sv-btn--primary:hover { background: var(--sv-violet); color: #15110a; text-shadow: none; }
  html .sv-btn--primary .sv-icon { color: #15110a; }
  html .sv-card, html .sv-panel { border: 0; border-radius: var(--sv-r-m-xl); background: var(--sv-m-fill); box-shadow: none; }
  html .sv-card::before, html .sv-card::after, html .sv-panel::before, html .sv-panel::after { display: none; }
  html .sv-section-head { margin: 28px 0 12px; gap: 12px; }
  html .sv-section-head .sv-label { font-size: var(--sv-fs-20); font-weight: 700; color: var(--sv-text); }
  html .sv-section-head__rule { display: none; }
  html .sv-section-head__link { font-family: var(--sv-m-ui); font-size: var(--sv-fs-15); font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--sv-violet); margin-left: auto; }
  html .sv-section-head__link .sv-icon { display: none; }
  html .sv-chip { height: 32px; padding: 0 14px; border: 0; border-radius: var(--sv-r-pill); background: var(--sv-m-fill-2);
    font-family: var(--sv-m-ui); font-size: var(--sv-fs-14); font-weight: 500; letter-spacing: 0; text-transform: none; }
  html .sv-chip.is-selected, html .sv-chip[aria-pressed="true"] { background: var(--sv-text); color: #000; }
  html input.sv-toggle { position: relative; width: 51px; height: 31px; border: 0; border-radius: var(--sv-r-pill); background: rgba(120,120,128,.32); }
  html input.sv-toggle::after, html input.sv-toggle:checked::after { top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
    box-shadow: var(--sv-m-knob); }
  html input.sv-toggle:checked { background: #34c759; border: 0; }
  html input.sv-toggle:checked::after { left: 22px; }
  html .sv-input, html .sv-textarea, html .sv-select { border: 0; border-radius: var(--sv-r-m-lg); background-color: var(--sv-m-fill-2); font-family: var(--sv-m-ui); font-size: var(--sv-fs-16); }

  /* ---------- Home: top bar ---------- */
  html #sv-home .m-topbar { min-height: 0; height: auto; padding: 6px 16px 6px 8px !important; gap: 6px; border-bottom: 1px solid var(--sv-m-sep);
    background: var(--sv-m-bar); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); }
  /* The menu die keeps its 48 px brand size (Lucas, 2026-10-20) and the account chip is frozen (sv-frozen). */
  html #sv-home .svh-ink { height: 40px; padding: 0 14px; gap: 6px; border-radius: var(--sv-r-pill); background: var(--sv-m-fill-2); }
  html #sv-home .svh-ink .sv-data { font-size: var(--sv-fs-14); font-weight: 600; }
  html #sv-home .svh-bell { width: 40px; height: 40px; background: transparent; border: 0; }

  /* ---------- Home: content ---------- */
  html #sv-home .svh-pane { padding-left: 16px; padding-right: 16px; }
  html #sv-home .svh-hero { padding-top: 12px; }
  html #sv-home .svh-hero__eyebrow { color: var(--sv-m-label); font-weight: 500; margin-bottom: 4px; }
  html #sv-home .svh-hero__title { font-size: var(--sv-fs-28); margin: 0 0 18px; }
  html #sv-home .svh-hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  html #sv-home .svh-hero-actions > :first-child { grid-column: 1 / -1; }
  html #sv-home .svh-hero-actions .sv-btn:not(.sv-btn--primary) { height: 44px; min-width: 0; padding: 0 10px; gap: 6px; font-size: var(--sv-fs-15); border-radius: var(--sv-r-m-lg); white-space: nowrap; }
  @media (max-width: 360px) { html #sv-home .svh-hero-actions .sv-btn:not(.sv-btn--primary) { font-size: var(--sv-fs-14); } }

  html #sv-home .svh-row { grid-auto-columns: 232px; gap: 12px; }
  html #sv-home .svh-tale, html #sv-home .svh-starter { padding: 0; overflow: hidden; border-radius: var(--sv-r-m-xl); }
  html #sv-home .svh-tale__art { height: 130px; border-radius: 0; border: 0; }
  html #sv-home .svh-card__body { padding: 12px 14px 14px; gap: 2px; }
  html #sv-home .svh-meta { font-size: var(--sv-fs-12); color: var(--sv-violet); font-weight: 600; }
  html #sv-home .svh-title { font-family: var(--sv-m-ui); font-size: var(--sv-fs-16); font-weight: 600; line-height: 1.3; margin: 2px 0 4px; min-height: 0; }
  html #sv-home .svh-card__body .sv-text, html #sv-home .sv-starter-hook { font-size: var(--sv-fs-14); line-height: 1.35; color: var(--sv-m-label); }
  html #sv-home .svh-date { font-size: var(--sv-fs-12); color: var(--sv-m-label-3); margin-top: 8px; height: auto; }
  html #sv-home .svh-tale__play { width: 44px; height: 44px; }
  html #sv-home .sv-card--new { min-height: 0; border-radius: var(--sv-r-m-xl); font-family: var(--sv-m-ui); font-size: var(--sv-fs-15); font-weight: 600; letter-spacing: 0; }
  html #sv-home .svh-starter { padding: 14px; }
  html #sv-home .sv-starter-numeral { display: none; }

  /* ---------- Home: tab bar ---------- */
  html #sv-home .m-bottom { height: auto; padding-top: 6px; padding-bottom: calc(env(safe-area-inset-bottom) + 0px); border-top: 1px solid var(--sv-m-sep);
    background: var(--sv-m-bar); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); align-items: flex-start; }
  html #sv-home .svh-bottom__item { height: 49px; padding: 2px 0 0; gap: 3px; justify-content: flex-start; color: var(--sv-m-label-3); box-shadow: none; }
  html #sv-home .svh-bottom__item::before, html #sv-home .svh-bottom__item::after { display: none; }
  html #sv-home .svh-bottom__item .sv-icon { width: 25px; height: 25px; }
  html #sv-home .svh-bottom__item .sv-label { font-size: var(--sv-fs-10); font-weight: 500; letter-spacing: .01em; color: inherit; }
  html #sv-home .svh-bottom__item.is-selected { color: var(--sv-violet); }
  html #sv-home .svh-bottom__create { height: 49px; display: flex; align-items: flex-start; justify-content: center; padding-top: 2px; }
  html #sv-home .svh-bottom__create .sv-btn { width: 46px; height: 34px; border-radius: var(--sv-r-m-lg); }

  /* ---------- Home: library ---------- */
  html #sv-home .svh-library__head .sv-eyebrow { display: none; }
  html #sv-home .svh-library__head .sv-btn { height: 34px; font-size: var(--sv-fs-14); border-radius: var(--sv-r-pill); }
  html #sv-home .svh-libcard { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 12px; min-height: 0; border-radius: var(--sv-r-m-xl); }
  html #sv-home .svh-libcard .sv-art-edit { position: relative; inset: auto; width: 84px; height: 112px; border-radius: var(--sv-r-m-md); border: 0; background: var(--sv-m-fill-2); }
  html #sv-home .svh-libcard .sv-art-edit .sv-label { display: none; }
  html #sv-home .svh-libcard .svh-libcard__img { position: relative; inset: auto; width: 84px; height: 112px; border-radius: var(--sv-r-m-md); }
  html #sv-home .svh-libcard .svh-card__body { padding: 0; min-width: 0; background: none; }
  /* A sealed tale has no picture cell, so its text takes the whole card. */
  html #sv-home .svh-libcard > .svh-card__body:first-child { grid-column: 1 / -1; }
  html #sv-home .svh-libcard .sv-clamp-3 { -webkit-line-clamp: 2; }
  html #sv-home .svh-libcard__foot { padding: 6px 0 0; margin: 0; border: 0; min-height: 0; }
  html #sv-home .svh-libcard__hero { color: var(--sv-m-label); font-size: var(--sv-fs-12); }
  html #sv-home .svh-libcard__date { color: var(--sv-m-label-3); font-size: var(--sv-fs-12); }
  html #sv-home .sv-library-grid { gap: 10px; }

  /* ---------- Home: side menu ---------- */
  html #sv-home .svh-drawer { border: 0; background: #0e0e0f; }
  html #sv-home .svh-drawer__head { border-bottom: 0; }
  html #sv-home .svh-wordmark { font-family: var(--sv-m-title); }
  html #sv-home .sv-menu__item { min-height: 46px; height: auto; border-radius: var(--sv-r-m-lg); font-size: var(--sv-fs-16); font-family: var(--sv-m-ui); }
  html #sv-home .sv-menu__item.is-selected { background: var(--sv-m-fill-2); box-shadow: none; }
  html #sv-home .sv-menu__item.is-selected::before { display: none; }
  html #sv-home .svh-drawer__label { font-size: var(--sv-fs-13); color: var(--sv-m-label-3); padding-left: 12px; }

  /* ---------- Story ---------- */
  html #app-view.sv-adventure .topbar { height: auto; min-height: 0; padding: 4px 8px 4px 4px; gap: 2px; border-bottom: 1px solid var(--sv-m-sep);
    background: var(--sv-m-bar); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
  html #app-view.sv-adventure .topbar .sv-btn { width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--sv-r-pill); background: transparent; }
  html #app-view.sv-adventure .topbar #memory-btn { width: auto; padding: 0 10px; gap: 4px; }
  html #app-view.sv-adventure .topbar .sv-icon { width: 22px; height: 22px; }
  html #app-view.sv-adventure .sv-adventure-brand { font-family: var(--sv-m-title); font-size: var(--sv-fs-15); letter-spacing: .08em; }
  html #app-view.sv-adventure .tale-panel { margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  html #app-view.sv-adventure .tale-panel .panel-h { display: none; }
  html #app-view.sv-adventure .cast-strip { height: clamp(140px, 22vh, 190px); }
  html #app-view.sv-adventure .cast-strip__bg::after { background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(1,1,1,.95)); }
  html #app-view.sv-adventure .cast-strip__name { font-family: var(--sv-m-ui); font-size: var(--sv-fs-13); font-weight: 600; letter-spacing: 0; color: rgba(255,255,255,.85); }
  html #app-view.sv-adventure #story-log { padding: 18px 20px 12px !important; }
  html #app-view.sv-adventure #story-log .turn.assistant, html #app-view.sv-adventure #story-log .narr { font-size: var(--sv-fs-17); line-height: var(--read-line, 1.7); }
  html #app-view.sv-adventure #story-log .turn.user { font-family: var(--sv-m-ui); font-size: var(--sv-fs-15); line-height: 1.45; color: var(--sv-m-label);
    margin: 18px 0; padding: 2px 0 2px 12px; border: 0; border-left: 2px solid var(--sv-violet); border-radius: 0; background: none; }
  html #app-view.sv-adventure .walk-back { height: 30px; padding: 0 12px; border-radius: var(--sv-r-pill); background: var(--sv-m-fill); font-size: var(--sv-fs-13); font-weight: 500; color: var(--sv-m-label); }
  html #app-view.sv-adventure .sv-tale-tools { padding: 4px 12px; gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; border: 0; background: none; }
  html #app-view.sv-adventure .sv-tale-tools .sv-btn { height: 32px; padding: 0 12px; border-radius: var(--sv-r-pill); background: var(--sv-m-fill); font-size: var(--sv-fs-13); font-weight: 500; flex: none; }
  html #app-view.sv-adventure .sv-tale-tools .sv-btn--icon { width: 32px; padding: 0; }
  html #app-view .lichy-suggest { margin: 0 12px 6px; padding: 8px 12px; border-radius: var(--sv-r-m-lg); background: var(--sv-m-fill); }
  html #app-view .lichy-suggest .lsug-title { font-size: var(--sv-fs-12); font-weight: 600; color: var(--sv-violet); }
  html #app-view .lichy-suggest .lsug-head .sv-btn { width: 28px; height: 28px; }
  html #app-view .lichy-suggest .lsug-state { font-size: var(--sv-fs-13); margin: 0; padding: 0; }
  html #app-view .lichy-suggest .lsug-text { font-family: var(--sv-m-ui); font-size: var(--sv-fs-14); }

  html #app-view.sv-adventure .cmdbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: end; gap: 8px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--sv-m-sep);
    background: var(--sv-m-bar); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
  html #app-view.sv-adventure #input-box { grid-column: 2; grid-row: 1; min-height: 40px; height: 40px; max-height: 140px; padding: 9px 14px;
    border: 0; border-radius: var(--sv-r-pill); background: var(--sv-m-fill-2); font-family: var(--sv-m-ui); font-size: var(--sv-fs-16); line-height: 22px; resize: none; box-shadow: none; }
  html #app-view.sv-adventure .sv-mode-chooser { grid-column: 1; grid-row: 1; }
  html #app-view.sv-adventure .sv-mode-toggle { width: auto; height: 40px; padding: 0 12px; gap: 6px; border-radius: var(--sv-r-pill); background: var(--sv-m-fill-2); }
  html #app-view.sv-adventure .sv-mode-toggle .sv-mode-chevron { display: none; }
  html #app-view.sv-adventure .sv-mode-toggle .sv-mode-name { font-size: var(--sv-fs-14); font-weight: 600; }
  html #app-view.sv-adventure #roll-btn { grid-column: 3; grid-row: 1; width: 40px; height: 40px; border-radius: var(--sv-r-pill); background: transparent; }
  html #app-view.sv-adventure #send-btn { grid-column: 4; grid-row: 1; width: 40px; height: 40px; padding: 0; border-radius: var(--sv-r-pill); }
  html #app-view.sv-adventure #send-btn .sva-btn-label { display: none; }

  /* The Party sheet ran under the status bar and the home indicator. */
  html #app-view.sv-adventure[data-ledger-open="1"] #ledger-panel { top: calc(env(safe-area-inset-top) + 8px); bottom: calc(env(safe-area-inset-bottom) + 8px); border-radius: var(--sv-r-m-xl); }

  /* ---------- Sheets and Settings ---------- */
  html .sv-modal__head { border-bottom: 0; }
  html .sv-modal__title { font-family: var(--sv-m-ui); font-size: var(--sv-fs-17); font-weight: 600; letter-spacing: 0; }
  html #set-panel .sv-modal__title { font-family: var(--sv-m-title); font-size: var(--sv-fs-22); }
  html .svl-settings__nav { padding: 4px 16px 10px; }
  html .svl-settings__tabs { gap: 8px !important; padding: 0 !important; }
  html .svl-settings__tabs .sv-tab { height: 34px; padding: 0 14px !important; border-radius: var(--sv-r-pill); background: var(--sv-m-fill); font-family: var(--sv-m-ui); font-size: var(--sv-fs-14); font-weight: 500; box-shadow: none !important; }
  html .svl-settings__tabs .sv-tab[aria-selected="true"] { background: var(--sv-text); color: #000; }
  html .svl-settings__tabs .sv-tab[aria-selected="true"] .sv-icon { color: #000; }
  html .svl-set-pane__head .sv-eyebrow { display: none; }
  html .svl-set-pane__title { font-size: var(--sv-fs-22); }
  html .svl-set-pane__lead { font-size: var(--sv-fs-14); color: var(--sv-m-label); }
  html .svl-set-group { background: #141415; border-radius: var(--sv-r-m-lg); padding: 0 16px; margin-bottom: 20px; }
  html .svl-set-row { min-height: 50px; padding: 8px 0; border-bottom: 1px solid var(--sv-m-sep); align-items: center; }
  html .svl-set-row:last-child { border-bottom: 0; }
  html .svl-set-name { font-family: var(--sv-m-ui); font-size: var(--sv-fs-16); }
  html .svl-set-row .sv-select, html .svl-set-row .eu-btn { width: auto; min-width: 0; height: 34px; background-color: transparent; color: var(--sv-m-label); font-size: var(--sv-fs-16); padding-right: 26px; }
  html .svl-set-row .eu-lbl { font-family: var(--sv-m-ui); font-size: var(--sv-fs-16); }

  /* ================= Round 1 polish: fit, alignment, consistency ================= */
  /* Focus: a quiet ring drawn inside the control, so scroll areas never clip it
     and a tapped button never wears a gold halo. */
  html :focus-visible { outline-color: rgba(255,255,255,.4) !important; outline-width: 2px !important; outline-offset: -2px !important; }
  /* Sans italics read as a mistake; everything outside the story itself is upright. */
  html *:not(#story-log *):not(em):not(i) { font-style: normal; }
  html ::placeholder { font-style: normal !important; color: var(--sv-m-label-3) !important; opacity: 1; }
  html .sv-title-1, html .sv-title-2, html h1, html h2, html h3 { text-wrap: balance; }
  html .sv-tab__count { font-family: var(--sv-m-ui); font-size: var(--sv-fs-12); font-weight: 600; }
  html .sv-card.is-selected, html .sv-card.is-selected:hover { box-shadow: var(--sv-m-ring); background: var(--sv-m-fill-2); }
  html .sv-badge { font-family: var(--sv-m-ui); letter-spacing: 0; text-transform: none; border-radius: var(--sv-r-m-sm); }

  /* Home */
  html #sv-home .sv-section-head__link { padding: 12px 0; margin: -12px 0 -12px auto; }
  html #sv-home .svh-popover { top: calc(env(safe-area-inset-top) + 58px); left: 12px; right: 12px; width: auto; max-width: none;
    border: 0; border-radius: var(--sv-r-m-lg); background: rgba(28,28,30,.97); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
    box-shadow: var(--sv-m-pop); }
  html #sv-home .svh-popover--acct { left: auto; width: 270px; }
  html #sv-home .svh-popover__head { padding: 12px 14px 8px; border-bottom: 1px solid var(--sv-m-sep); }
  html #sv-home .svh-popover__list { padding: 6px; }
  html #sv-home .svh-notif { min-height: 58px; padding: 10px 12px; align-items: flex-start; }
  html #sv-home .svh-notif__title { font-size: var(--sv-fs-15); font-weight: 600; }
  html #sv-home .svh-notif__body { font-size: var(--sv-fs-14); color: var(--sv-m-label); }
  html #sv-home .svh-starter { display: flex; flex-direction: column; gap: 4px; }
  html #sv-home .svh-well { padding: 14px; border-radius: var(--sv-r-m-lg); }
  html #sv-home .svh-well__gauge { border: 0; border-radius: var(--sv-r-m-md); background: rgba(255,255,255,.04); overflow: hidden; box-shadow: none; }
  html #sv-home .svh-well__actions .sv-btn { flex: 1; }
  /* In the iOS app Store and Plans are both renamed Ink (no store there), so one button is enough. */
  html[data-native-app] #sv-home .svh-well__actions [data-on-click="goPlans"] { display: none; }

  /* Friends: the page title matches every other page */
  html #sv-home .sv-ib-title .sv-title-2 { font-family: var(--sv-m-title); font-size: var(--sv-fs-28); font-weight: 600; }
  html #sv-home .sv-ib-tabs .sv-tab { font-size: var(--sv-fs-15); font-weight: 600; }

  /* Pages: the tab bar already says where you are, so no eyebrow over a page title */
  html #sv-home .svh-page-head .sv-eyebrow { display: none; }

  /* Creation */
  html #hub-hero-screen .svc-option__desc { font-size: var(--sv-fs-15); line-height: 1.4; color: var(--sv-m-label); font-style: normal; }
  html #hub-hero-screen .svc-option { transform: none; }

  /* Story */
  html .adv2 #story-log .turn.user[data-tag]::before { font-family: var(--sv-m-ui); font-size: var(--sv-fs-10); font-weight: 700; letter-spacing: .04em;
    border-radius: var(--sv-r-m-sm); padding: 2px 6px; }
  html #app-view.sv-adventure #story-log .turn.user, html #app-view.sv-adventure #story-log .turn.user * { font-style: normal; }
  html #app-view.sv-adventure #input-box:focus { outline: none !important; box-shadow: none; background-color: rgba(255,255,255,.13); }
  html #app-view .sv-mode-option { min-height: 52px; height: auto; border-radius: var(--sv-r-m-lg); box-shadow: none; }
  html #app-view .sv-mode-option.is-selected, html #app-view .sv-mode-option[aria-checked="true"], html #app-view .sv-mode-option[aria-selected="true"] { background: var(--sv-m-fill-2); box-shadow: none; }
  html #app-view .sv-mode-option kbd { display: none; }
  html #app-view .sv-mode-option strong { font-size: var(--sv-fs-15); }
  html #app-view .sv-mode-option span { font-size: var(--sv-fs-13); color: var(--sv-m-label); }
  html #app-view .sv-mode-option .sv-mode-icon { border: 0; border-radius: var(--sv-r-m-md); background: var(--sv-m-fill-2); }
  html #app-view .sv-mode-option[aria-checked="true"] .sv-mode-icon, html #app-view .sv-mode-option.is-selected .sv-mode-icon { background: rgba(var(--sv-glow-rgb), .2); }
  html #app-view.sv-adventure .sva-ledger-head .sv-rule, html #app-view.sv-adventure .sva-ledger-head .rule { display: none; }
  html #app-view.sv-adventure .sva-ledger-head { border-bottom: 1px solid var(--sv-m-sep); }
  html #app-view.sv-adventure .sva-hero__avatar { border: 0; border-radius: 50%; background: rgba(var(--sv-glow-rgb), .16); color: var(--sv-violet-bright); font-weight: 700; }

  /* Memory: a full-height sheet, no edge peeking under the status bar */
  html .sv-memory-shell { padding: 0; }
  html #memory-panel.sv-memory-vault { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: #030303; }
  html .sv-memory-header { padding-top: calc(env(safe-area-inset-top) + 4px); }
  html .sv-memory-vault #mem-tabs .sv-tab { font-size: var(--sv-fs-15); font-weight: 600; gap: 6px; }
  html .lm-btn, html .lm-counts, html .lm-micro, html .lm-lbl, html .lm-turn, html .lm-live, html .lm-on, html [class*="lm-"] button {
    font-family: var(--sv-m-ui) !important; text-transform: none !important; letter-spacing: 0 !important; }
  html .lm-btn, html .lm-counts { font-size: var(--sv-fs-13) !important; }
  html .lm-micro, html .lm-lbl, html .lm-live { font-size: var(--sv-fs-11) !important; }
  html .lm-turn, html .lm-on, html .lm-turn i { font-size: var(--sv-fs-12) !important; }
  html .lm-search { font-family: var(--sv-m-ui) !important; font-size: var(--sv-fs-16) !important; border-radius: var(--sv-r-m-lg) !important; }
  html [class*="lm-legend"] button, html .lm-lbl { min-height: 28px; }

  /* Settings */
  html .svl-set-row:has(.eu-btn, select.sv-select):not(.svl-set-slider) { flex-wrap: nowrap; }
  html .svl-set-row:has(.eu-btn, select.sv-select):not(.svl-set-slider) > .sv-stack { flex: 1 1 auto; min-width: 0; }
  html .svl-set-row:has(.eu-btn, select.sv-select):not(.svl-set-slider) > .svl-set-name { flex: 0 0 auto; white-space: nowrap; margin-right: 12px; }
  html .svl-set-row:has(.eu-btn, select.sv-select):not(.svl-set-slider) > .svl-set-name + * { flex: 1 1 auto; min-width: 0; display: flex; justify-content: flex-end; }
  html .svl-set-row:not(.svl-set-slider) .sv-select, html .svl-set-row:not(.svl-set-slider) .eu-btn { flex: 0 1 auto; max-width: 100%; margin-left: auto;
    text-align: right; text-align-last: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html .svl-set-row:not(.svl-set-slider) .eu-lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html .svl-range, html .svh-range { height: 32px; }
  html .svl-range::-webkit-slider-runnable-track { height: 4px; border-radius: var(--sv-r-pill); }
  html .svl-range::-moz-range-track { height: 4px; border-radius: var(--sv-r-pill); }
  html .svl-range::-moz-range-progress { height: 4px; border-radius: var(--sv-r-pill); }
  html .svl-range::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -11px; border-radius: 50%; background: #fff; box-shadow: var(--sv-m-knob); }
  html .svl-range::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: var(--sv-m-knob); }
  html .sv-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; flex: 1 0 100%; padding: 0; border: 0; background: none; }
  html .sv-seg__btn { height: 36px; border: 0 !important; border-radius: var(--sv-r-m-md); background: var(--sv-m-fill-2); font-family: var(--sv-m-ui); font-size: var(--sv-fs-14); font-weight: 600; color: var(--sv-m-label); box-shadow: none; }
  html .sv-seg__btn[aria-pressed="true"], html .sv-seg__btn.is-selected, html .sv-seg__btn[aria-checked="true"] { background: var(--sv-text); color: #000; box-shadow: none !important; }
}
