/* ==========================================================================
   Maps, Books, Radio, Code, Dictionary and Markets (app/appshell.js and
   app/commands/{maps,books,radio,code,dictionary,markets}.js).
   Built on the Orbit UI kit (.ok-app). Everything that moves lives in the
   "New apps" section of css/motion.css.
   ========================================================================== */

.xa-app {
    --xa-up: #22c55e;
    --xa-down: #ef4444;
    overflow: hidden;
}

.xa-app .xa-header {
    gap: 8px;
    padding: 10px 14px !important;
    min-height: 60px;
    flex-shrink: 0;
}

.xa-app .xa-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--on-surface);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xa-app .xa-hero .ok-hero-title { font-size: 1.5rem; }

/* ---------- Search field ---------- */

.xa-app .xa-search {
    position: relative;
    display: flex;
    margin: 0;
}

.xa-app .xa-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    translate: 0 -50%;
    display: inline-flex;
    color: var(--ok-muted);
    pointer-events: none;
}

.xa-app .xa-search-input {
    height: 48px;
    padding-left: 44px;
    background: var(--ok-card) !important;
}

.xa-app .xa-search-input::-webkit-search-cancel-button { filter: grayscale(1); }

/* ---------- Rows, chips, small buttons ---------- */

.xa-app .xa-row { min-height: 62px; }

.xa-app .ok-round-btn.xa-mini {
    width: 32px;
    height: 32px;
    border-color: transparent;
    color: var(--ok-muted);
}

.xa-app .xa-link {
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: var(--hue);
    cursor: pointer;
}

.xa-app .xa-star.is-on,
.xa-app .xa-heart.is-on { color: #f59e0b; border-color: color-mix(in srgb, #f59e0b 45%, transparent); }
.xa-app .xa-star.is-on svg,
.xa-app .xa-heart.is-on svg { fill: currentColor; }
.xa-app .xa-heart.is-on { color: #ec4899; border-color: transparent; }

.xa-app .ok-chips.xa-wrap { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; }
.xa-app .ok-chip.xa-static { cursor: default; height: 30px; font-size: 0.8rem; }
.xa-app .xa-chip-gap { flex: 0 0 4px; }
.xa-app .ok-chip svg { flex-shrink: 0; }

.xa-app .xa-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px 12px 14px;
    border-radius: 20px;
    background: color-mix(in srgb, var(--error, #e5534b) 10%, var(--ok-card, var(--surface-color)));
    color: var(--on-surface);
    font-size: 0.82rem;
    line-height: 1.35;
}
.xa-app .xa-banner-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 12px; background: color-mix(in srgb, var(--error, #e5534b) 85%, transparent); color: #ffffff; }
.xa-app .xa-banner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; color: var(--ok-muted); }
.xa-app .xa-banner-text b { color: var(--on-surface); font-size: 0.9rem; }
@media (prefers-reduced-motion: no-preference) {
    :root:not(.no-animations) body:not(.no-animations) .xa-app .xa-banner { animation: osRise 0.32s var(--os-ease-out, ease) both; }
}
.xa-app .xa-mono-tile, .xa-app .xa-coin-img { position: relative; }
.xa-app .xa-mono { font: 800 0.74rem var(--font-main); letter-spacing: -0.02em; color: #ffffff; }
.xa-app .xa-coin-img .xa-mono { display: none; }
.xa-app .xa-coin-img.is-broken { background: var(--tile, #64748b); }
.xa-app .xa-coin-img.is-broken .xa-mono { display: inline; }

.xa-app .xa-foot {
    margin: 2px 4px 0;
    font-size: 0.78rem;
    color: var(--ok-muted);
    text-align: center;
}

.xa-app .xa-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 20px;
    border: 1px solid var(--ok-line);
    background: var(--ok-card);
    overflow: hidden;
}

.xa-app .xa-stats > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 13px 16px;
    min-width: 0;
    border-top: 1px solid var(--ok-line);
}

.xa-app .xa-stats > div:nth-child(-n + 2) { border-top: none; }
.xa-app .xa-stats > div:nth-child(even) { border-left: 1px solid var(--ok-line); }
.xa-app .xa-stats span { font-size: 0.76rem; color: var(--ok-muted); }
.xa-app .xa-stats strong { font-size: 0.98rem; color: var(--on-surface); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Loading placeholders */
/* A line that says what's loading, so a skeleton never looks like a dead page. */
.xa-app .xa-loading,
.xa-loading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 4px 2px 12px;
    font-size: 0.84rem;
    color: var(--ok-muted, color-mix(in srgb, var(--on-surface, #fff) 60%, transparent));
}

.xa-loading .xa-loading-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--app-hue, var(--accent-primary, #3b82f6));
}

.xa-loading.is-slow { color: var(--on-surface); }

.xa-app .xa-skeleton {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.xa-app .xa-skeleton i {
    display: block;
    height: 62px;
    border-radius: 18px;
    background: linear-gradient(90deg, var(--ok-line) 0%, color-mix(in srgb, var(--on-surface, #fff) 16%, transparent) 50%, var(--ok-line) 100%);
    background-size: 200% 100%;
}

.xa-app .xa-skeleton i:nth-child(2) { opacity: 0.75; }
.xa-app .xa-skeleton i:nth-child(3) { opacity: 0.55; }
.xa-app .xa-skeleton i:nth-child(n + 4) { opacity: 0.35; }

.xa-app .xa-spin,
.xa-app .xa-map-btn.is-busy::after {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid color-mix(in srgb, currentColor 25%, transparent);
    border-top-color: currentColor;
    flex-shrink: 0;
}

/* Toast */
.xa-app .xa-toast {
    position: absolute;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    translate: -50% 0;
    z-index: 50;
    max-width: calc(100% - 48px);
    padding: 11px 18px;
    border-radius: 999px;
    background: var(--ok-ink);
    color: var(--ok-on-ink);
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.xa-app .xa-toast.is-leaving { opacity: 0; }

/* In-app bottom sheet (Books) */
.xa-app .xa-sheet {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
}

.xa-app .xa-sheet.is-leaving { opacity: 0; }

.xa-app .xa-sheet-card {
    width: 100%;
    max-width: 560px;
    max-height: 72%;
    display: flex;
    flex-direction: column;
    padding: 8px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    border-radius: 26px 26px 0 0;
    border: 1px solid var(--ok-line);
    border-bottom: none;
    background: var(--ok-card);
    color: var(--on-surface);
}

.xa-app .xa-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0 10px;
    font-size: 1.05rem;
}

.xa-app .xa-sheet-list {
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
}

.xa-app .xa-sheet-item {
    padding: 13px 12px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--on-surface);
    font: inherit;
    font-size: 0.92rem;
    text-align: left;
    cursor: pointer;
}

.xa-app .xa-sheet-item.is-on { background: color-mix(in srgb, var(--hue) 18%, transparent); font-weight: 700; }

/* ==========================================================================
   Dictionary
   ========================================================================== */

.xa-dictionary .xa-dict-word { font-size: 2.1rem; word-break: break-word; }
.xa-dictionary .xa-defs { padding: 6px 18px 14px; }

.xa-dictionary .xa-defs ol {
    margin: 0;
    padding-left: 20px;
}

.xa-dictionary .xa-defs li {
    padding: 10px 0 0;
    color: var(--on-surface);
}

.xa-dictionary .xa-defs li::marker { color: var(--hue); font-weight: 700; }
.xa-dictionary .xa-defs li p { line-height: 1.55; }
.xa-dictionary .xa-defs .xa-ex { margin-top: 4px; font-style: italic; color: var(--ok-muted); }

.xa-dictionary .xa-words {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
}

.xa-dictionary .xa-words > span {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ok-muted);
    margin-right: 4px;
}

.xa-dictionary .ok-chip.xa-wordchip { height: 30px; padding: 0 12px; font-size: 0.82rem; }

/* ==========================================================================
   Markets
   ========================================================================== */

.xa-markets .is-up { color: var(--xa-up); }
.xa-markets .is-down { color: var(--xa-down); }

.xa-markets .xa-spark { flex-shrink: 0; overflow: visible; }
.xa-markets .xa-spark path { stroke: currentColor; }
.xa-markets .xa-spark-ph { width: 72px; flex-shrink: 0; }

.xa-markets .xa-mk-val {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 84px;
    flex-shrink: 0;
}

.xa-markets .xa-mk-val strong { font-size: 0.95rem; color: var(--on-surface); font-variant-numeric: tabular-nums; }
.xa-markets .xa-mk-val em { font-style: normal; font-size: 0.8rem; font-weight: 600; font-variant-numeric: tabular-nums; }

.xa-markets .xa-coin-img { background: transparent; overflow: hidden; }
.xa-markets .xa-coin-img img { width: 100%; height: 100%; object-fit: contain; }

.xa-markets .xa-mk-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 4px 0;
}

.xa-markets .xa-mk-name { font-size: 0.9rem; color: var(--ok-muted); }
.xa-markets .xa-mk-price { font-size: 2.2rem; font-weight: 700; letter-spacing: -0.03em; color: var(--on-surface); font-variant-numeric: tabular-nums; }
.xa-markets .xa-mk-change { font-size: 0.9rem; font-weight: 600; min-height: 1.3em; }

.xa-markets .xa-chart-card { padding: 12px 0; }

.xa-markets .xa-chart {
    display: block;
    width: 100%;
    height: 200px;
    touch-action: pan-y;
    cursor: crosshair;
}

.xa-markets .xa-chart-cursor { stroke: var(--ok-muted); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.xa-markets .xa-chart.is-scrub .xa-chart-cursor { opacity: 1; }
.xa-markets .xa-chart-ph { height: 200px; margin: 0 16px; border-radius: 14px; background: var(--ok-line); }
.xa-markets .xa-range { justify-content: center; }

/* ==========================================================================
   Radio
   ========================================================================== */

.xa-radio .xa-radio-art { position: relative; overflow: hidden; }

.xa-radio .xa-radio-art img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #ffffff;
}

.xa-radio .xa-station.is-live .ok-row-title { color: var(--hue); }
.xa-radio .xa-station .ok-row-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.xa-radio .xa-eq {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.xa-radio .xa-eq i {
    flex: 1;
    height: 60%;
    border-radius: 2px;
    background: var(--hue);
    transform-origin: bottom;
}

.xa-radio .xa-eq i:nth-child(2) { height: 100%; }
.xa-radio .xa-eq i:nth-child(3) { height: 40%; }

.xa-radio .xa-recent {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -16px;
    padding: 0 16px 2px;
}

.xa-radio .xa-recent::-webkit-scrollbar { display: none; }

.xa-radio .xa-recent-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 76px;
    flex-shrink: 0;
    padding: 0;
    border: none;
    background: none;
    color: var(--on-surface);
    font: inherit;
    font-size: 0.74rem;
    cursor: pointer;
}

.xa-radio .xa-recent-item .ok-tile { width: 64px; height: 64px; border-radius: 18px; }
.xa-radio .xa-recent-item > span:last-child { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.xa-radio .ok-body.has-player .ok-column { padding-bottom: 120px; }

.xa-radio .xa-player {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 736px;
    margin: 0 auto;
    padding: 10px 10px 10px 12px;
    border-radius: 22px;
    border: 1px solid var(--ok-line-strong);
    background: var(--ok-card);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.xa-radio .xa-player-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.xa-radio .xa-player-text strong { font-size: 0.92rem; color: var(--on-surface); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xa-radio .xa-player-text span { font-size: 0.78rem; color: var(--ok-muted); }
.xa-radio .xa-player.is-error .xa-player-text span { color: var(--error, #e5534b); }
.xa-radio .xa-player .ok-round-btn.xa-player-main { width: 46px; height: 46px; border: none; background: var(--hue); color: #ffffff; }

/* ==========================================================================
   Books
   ========================================================================== */

.xa-books .xa-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(102px, 1fr));
    gap: 20px 14px;
}

.xa-books .xa-book {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    padding: 0;
    border: none;
    background: none;
    color: var(--on-surface);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.xa-books .xa-cover {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 6px 12px 12px 6px;
    overflow: hidden;
    background: linear-gradient(160deg, hsl(var(--h, 30) 45% 34%), hsl(calc(var(--h, 30) + 40) 50% 20%));
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 18px -6px rgba(0, 0, 0, 0.45);
}

/* The spine: a thin shade down the left edge makes a cover read as a book. */
.xa-books .xa-cover::after {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 2;
    width: 7%;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.28), rgba(255, 255, 255, 0.12) 60%, transparent);
    pointer-events: none;
}

.xa-books .xa-cover.is-ghost,
.xa-books .xa-ghost-line {
    background: linear-gradient(90deg, var(--ok-line) 0%, color-mix(in srgb, var(--on-surface, #fff) 14%, transparent) 50%, var(--ok-line) 100%);
    background-size: 200% 100%;
    box-shadow: none;
}
.xa-books .xa-ghost-line { display: block; height: 10px; margin-top: 8px; border-radius: 5px; }
.xa-books .xa-ghost-line.is-short { width: 60%; margin-top: 6px; opacity: 0.7; }
.xa-books .xa-cover.is-ghost::after { display: none; }

.xa-books .xa-cover img {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.xa-books .xa-cover-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px 10px 10px 14px;
    color: #ffffff;
}

.xa-books .xa-cover-fallback strong { font-family: Georgia, 'Times New Roman', serif; font-size: 0.82rem; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; }
.xa-books .xa-cover-fallback em { font-style: normal; font-size: 0.66rem; opacity: 0.8; }

.xa-books .xa-book-title { margin-top: 6px; font-size: 0.82rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.xa-books .xa-book-author { font-size: 0.74rem; color: var(--ok-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.xa-books .xa-shelf-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -16px;
    padding: 0 16px 4px;
}

.xa-books .xa-shelf-row::-webkit-scrollbar { display: none; }
.xa-books .xa-book--row { width: 92px; flex-shrink: 0; }

.xa-books .xa-progress {
    display: block;
    height: 4px;
    margin-top: 8px;
    border-radius: 4px;
    background: var(--ok-line);
    overflow: hidden;
}

.xa-books .xa-progress i { display: block; height: 100%; background: var(--hue); border-radius: inherit; }

/* Continue reading */
.xa-books .xa-continue {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 26px;
    background: linear-gradient(135deg, hsl(var(--h, 30) 40% 24%), hsl(calc(var(--h, 30) + 30) 45% 14%));
    color: #ffffff;
    font: inherit;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
}

.xa-books .xa-continue .xa-cover { width: 84px; flex-shrink: 0; }
.xa-books .xa-continue-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.xa-books .xa-continue-kicker { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; }
.xa-books .xa-continue strong { font-family: Georgia, 'Times New Roman', serif; font-size: 1.2rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.xa-books .xa-continue em { font-style: normal; font-size: 0.85rem; opacity: 0.8; }
.xa-books .xa-continue .xa-progress { background: rgba(255, 255, 255, 0.2); margin-top: 10px; }
.xa-books .xa-continue .xa-progress i { background: #ffffff; }
.xa-books .xa-continue-pct { margin-top: 4px; font-size: 0.76rem; opacity: 0.8; }

/* Book page */
.xa-books .xa-book-body { padding: 0 !important; }

.xa-books .xa-book-hero {
    display: flex;
    justify-content: center;
    padding: 22px 16px 26px;
    background: linear-gradient(180deg, hsl(var(--h, 30) 35% 22% / 0.85), transparent);
}

.xa-books .xa-book-page { padding: 0 16px 64px; align-items: stretch; }
.xa-books .xa-cover--big { width: 150px; border-radius: 8px 16px 16px 8px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 22px 44px -12px rgba(0, 0, 0, 0.6); }
.xa-books .xa-book-big-title { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 1.5rem; line-height: 1.25; color: var(--on-surface); text-align: center; }
.xa-books .xa-book-big-author { margin: 2px 0 10px; color: var(--ok-muted); text-align: center; }
.xa-books .xa-summary p { font-size: 0.92rem; line-height: 1.6; }
.xa-books .xa-summary.is-long p { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.xa-books .xa-summary .xa-link { margin-top: 8px; font-size: 0.86rem; }

/* Reader */

.xa-books { --read-bg: var(--background); --read-ink: var(--on-surface); }
.xa-books[data-page="paper"] { --read-bg: #f6efe1; --read-ink: #2b2620; }
.xa-books[data-page="sepia"] { --read-bg: #e9dcc0; --read-ink: #3d3021; }
.xa-books[data-page="night"] { --read-bg: #000000; --read-ink: #b9b4aa; }

/* While reading, the bars take the page's colors too. */
.xa-books.xa-reading { background: var(--read-bg); }
.xa-books.xa-reading .xa-header {
    --on-surface: var(--read-ink);
    background: var(--read-bg);
    border-bottom-color: color-mix(in srgb, var(--read-ink) 12%, transparent);
}
.xa-books.xa-reading .xa-header .ok-round-btn { border-color: color-mix(in srgb, var(--read-ink) 25%, transparent); }

.xa-books .xa-reader {
    --read-lh: 1.65;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    background: var(--read-bg);
    color: var(--read-ink);
    font-family: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
    font-size: var(--read-size, 18px);
    line-height: var(--read-lh);
    overflow: hidden;
    contain: none;
}

.xa-books .xa-reader.xa-font-sans { font-family: var(--font-main), system-ui, sans-serif; }
.xa-books .xa-reader.xa-space-tight { --read-lh: 1.45; }
.xa-books .xa-reader.xa-space-loose { --read-lh: 1.9; }

.xa-books .xa-reader p { margin: 0 0 0.85em; text-indent: 1.4em; hyphens: auto; -webkit-hyphens: auto; orphans: 2; widows: 2; }
.xa-books .xa-reader.xa-align-justify p { text-align: justify; }
.xa-books .xa-reader p.xa-first { text-indent: 0; }

.xa-books .xa-reader p.xa-first::first-letter {
    float: left;
    margin: 0.06em 0.08em 0 0;
    font-size: 3.1em;
    line-height: 0.85;
    font-weight: 700;
    color: var(--hue);
}

.xa-books .xa-reader h3 {
    margin: 1.4em 0 1.2em;
    font-size: 1.15em;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.06em;
    break-after: avoid;
}

.xa-books .xa-reader h3 span { display: inline-block; padding-bottom: 0.45em; border-bottom: 2px solid color-mix(in srgb, var(--hue) 70%, transparent); }
.xa-books .xa-reader .xa-flash { border-radius: 6px; }

/* Pages */
.xa-books .xa-pager {
    position: relative;
    flex: 1;
    min-height: 0;
    padding: 22px 24px 14px;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

.xa-books .xa-clip { width: 100%; height: 100%; overflow: hidden; }

.xa-books .xa-flow {
    height: 100%;
    column-fill: auto;
    will-change: transform;
}

.xa-books .xa-flow > * { break-inside: auto; }

.xa-books .xa-book-end {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 3em 0 2em;
    text-align: center;
    break-inside: avoid;
    color: var(--read-ink);
    opacity: 0.75;
}

.xa-books .xa-book-end svg { color: var(--hue); }
.xa-books .xa-book-end strong { font-size: 1.3em; font-style: italic; }
.xa-books .xa-book-end span { font-size: 0.8em; }

/* Scroll */
.xa-books .xa-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px 22px 40px;
}

.xa-books .xa-scroll > * { max-width: 680px; margin-left: auto; margin-right: auto; }
.xa-books .xa-chunk { content-visibility: auto; contain-intrinsic-size: auto 3200px; }
.xa-books .xa-reader .xa-reader-title { margin-top: 1.2em; font-size: 1.7em; line-height: 1.2; text-align: center; }
.xa-books .xa-reader .xa-reader-by { text-align: center; text-indent: 0; opacity: 0.7; margin-bottom: 2.4em; }

/* Footer: previous, where you are, next */
.xa-books .xa-read-foot {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    padding: 10px 14px calc(22px + env(safe-area-inset-bottom, 0px));
    background: var(--read-bg, var(--background));
    border-top: 1px solid color-mix(in srgb, var(--read-ink, var(--on-surface)) 12%, transparent);
    color: var(--read-ink, var(--on-surface));
}

.xa-books .xa-turn-btn { width: 46px; height: 46px; border-color: color-mix(in srgb, var(--read-ink, var(--on-surface)) 25%, transparent); color: inherit; }
.xa-books .xa-turn-btn:disabled { opacity: 0.3; cursor: default; }
.xa-books .xa-foot-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.xa-books .xa-foot-where { max-width: 100%; font-size: 0.8rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xa-books .xa-foot-bar { width: 100%; height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--read-ink, var(--on-surface)) 14%, transparent); overflow: hidden; }
.xa-books .xa-foot-bar i { display: block; width: 0; height: 100%; background: var(--hue); }
.xa-books .xa-foot-page { font-size: 0.74rem; opacity: 0.7; font-variant-numeric: tabular-nums; }

.xa-books.xa-immersive .xa-header,
.xa-books.xa-immersive .xa-read-foot { opacity: 0; pointer-events: none; }
.xa-books.xa-immersive .xa-header { margin-top: -60px; }

.xa-books .xa-reader-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-family: var(--font-main);
    font-size: 0.92rem;
    color: var(--ok-muted);
}

.xa-books .xa-book-anim { display: inline-flex; color: var(--hue); }
.xa-books .xa-reader .ok-empty { font-family: var(--font-main); font-size: 0.9rem; margin: auto; }

/* Text and page sheet */
.xa-books .xa-type-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 4px 0 16px;
}

.xa-books .xa-size-dots { display: flex; align-items: center; gap: 8px; }
.xa-books .xa-size-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok-line-strong); }
.xa-books .xa-size-dots i.is-on { background: var(--hue); transform: scale(1.3); }
.xa-books .xa-type-row .ok-btn { width: 64px; font-family: Georgia, serif; font-size: 0.9rem; }
.xa-books .xa-type-row .xa-big-a { font-size: 1.3rem; }

.xa-books .xa-page-picks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }

.xa-books .xa-page-pick {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 4px;
    border-radius: 16px;
    border: 2px solid var(--ok-line);
    background: var(--background);
    color: var(--on-surface);
    font: inherit;
    font-size: 0.78rem;
    cursor: pointer;
}

.xa-books .xa-page-pick span { font-family: Georgia, serif; font-size: 1.3rem; }
.xa-books .xa-page-pick.xa-page-paper { background: #f6efe1; color: #2b2620; }
.xa-books .xa-page-pick.xa-page-sepia { background: #e9dcc0; color: #3d3021; }
.xa-books .xa-page-pick.xa-page-night { background: #000000; color: #b9b4aa; }
.xa-books .xa-page-pick.is-on { border-color: var(--hue); }

.xa-books .xa-type-seg { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 14px 0; }
.xa-books .xa-type-seg .ok-chip { height: 34px; }
.xa-books .xa-sheet-item { display: flex; align-items: center; gap: 10px; }
.xa-books .xa-sheet-item span { flex: 1; min-width: 0; }
.xa-books .xa-sheet-item em { font-style: normal; font-size: 0.78rem; color: var(--ok-muted); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Maps
   ========================================================================== */

.xa-maps .xa-map-wrap {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.xa-maps .xa-map {
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--on-surface, #fff) 8%, var(--background));
    touch-action: none;
}

.xa-maps .xa-map .leaflet-control-attribution {
    font-size: 9px;
    background: color-mix(in srgb, var(--background) 70%, transparent);
    color: var(--ok-muted);
}

.xa-maps .xa-map .leaflet-control-attribution a { color: inherit; }

.xa-maps .xa-map-search {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 500;
    max-width: 560px;
    margin: 0 auto;
}

.xa-maps .xa-map-search input {
    width: 100%;
    height: 50px;
    padding: 0 16px 0 46px;
    border-radius: 999px;
    border: 1px solid var(--ok-line-strong);
    background: var(--ok-card);
    color: var(--on-surface);
    font-family: var(--font-main);
    font-size: 16px;
    outline: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.xa-maps .xa-map-search .xa-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    translate: 0 -50%;
    display: inline-flex;
    color: var(--ok-muted);
    pointer-events: none;
}

.xa-maps .xa-map-tools {
    position: absolute;
    right: 12px;
    top: 74px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.xa-maps .xa-map-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--ok-line-strong);
    background: var(--ok-card);
    color: var(--on-surface);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.xa-maps .xa-map-btn.is-on { color: #2563eb; }
.xa-maps .xa-map-btn.is-follow { background: #2563eb; color: #ffffff; border-color: transparent; }
.xa-maps .xa-map-btn.is-busy svg { opacity: 0; }
.xa-maps .xa-map-btn.is-busy::after { content: ''; position: absolute; color: #2563eb; }

.xa-maps .xa-map-status {
    position: absolute;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    z-index: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100% - 48px);
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid var(--ok-line);
    background: var(--ok-card);
    color: var(--on-surface);
    font-size: 0.9rem;
}

.xa-maps .xa-map-status[hidden],
.xa-maps .xa-map-panel[hidden] { display: none; }

.xa-maps .xa-map-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 700;
    display: flex;
    flex-direction: column;
    max-width: 640px;
    max-height: 58%;
    margin: 0 auto;
    padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0px));
    border-radius: 26px 26px 0 0;
    border: 1px solid var(--ok-line-strong);
    border-bottom: none;
    background: var(--ok-card);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
}

.xa-maps .xa-map-panel[data-panel="route"] { max-height: 66%; }

.xa-maps .xa-panel-grip {
    width: 40px;
    height: 4px;
    margin: 8px auto 4px;
    border-radius: 4px;
    background: var(--ok-line-strong);
    flex-shrink: 0;
}

.xa-maps .xa-panel-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0 12px;
    touch-action: none;
}

.xa-maps .xa-panel-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.xa-maps .xa-panel-titles strong { font-size: 1.12rem; color: var(--on-surface); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xa-maps .xa-panel-titles span { font-size: 0.82rem; color: var(--ok-muted); line-height: 1.4; }

.xa-maps .xa-panel-list {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 0 -8px;
    min-height: 0;
}

.xa-maps .xa-panel-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    border: none;
    border-radius: 14px;
    background: transparent;
    color: var(--on-surface);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.xa-maps .xa-panel-row:active { background: color-mix(in srgb, var(--on-surface, #fff) 6%, transparent); }
.xa-maps .xa-panel-row .ok-row-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.xa-maps .xa-panel-row .ok-row-title { font-size: 0.94rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xa-maps .xa-panel-row .ok-row-sub { font-size: 0.78rem; color: var(--ok-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.xa-maps .xa-dist { flex-shrink: 0; font-size: 0.8rem; font-weight: 600; color: var(--ok-muted); font-variant-numeric: tabular-nums; }

.xa-maps .xa-panel-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.xa-maps .xa-panel-actions .ok-btn:first-child { flex: 1; }
.xa-maps .xa-panel-actions .ok-btn.is-on svg { fill: currentColor; }
.xa-maps .xa-modes { margin: 0 0 12px; padding: 0; flex-shrink: 0; }
.xa-maps :is(.xa-panel-head, .xa-panel-actions, .xa-route-sum, .xa-layer-picks) { flex-shrink: 0; }

.xa-maps .xa-route-sum { display: flex; align-items: baseline; gap: 10px; padding: 0 2px 10px; }
.xa-maps .xa-route-sum strong { font-size: 1.6rem; color: #22c55e; letter-spacing: -0.02em; }
.xa-maps .xa-route-sum span { font-size: 0.85rem; color: var(--ok-muted); }

.xa-maps .xa-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    border-top: 1px solid var(--ok-line);
    font-size: 0.9rem;
    color: var(--on-surface);
}

.xa-maps .xa-step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 10px;
    background: color-mix(in srgb, #2563eb 18%, transparent);
    color: #3b82f6;
}

.xa-maps .xa-step-text { flex: 1; min-width: 0; line-height: 1.35; }

.xa-maps .xa-layer-picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-bottom: 4px; }

.xa-maps .xa-layer-pick {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    border: none;
    background: none;
    color: var(--on-surface);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.xa-maps .xa-layer-pick span {
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    border: 2px solid var(--ok-line);
    background-size: cover;
    background-position: center;
}

.xa-maps .xa-layer-map span { background: linear-gradient(135deg, #e8e4d8 0 40%, #aad3df 40% 55%, #e8e4d8 55%), #e8e4d8; }
.xa-maps .xa-layer-sat span { background: radial-gradient(circle at 30% 40%, #4d6b3a 0 25%, transparent 26%), radial-gradient(circle at 70% 70%, #2f4a5c 0 30%, transparent 31%), #5b5b44; }
.xa-maps .xa-layer-topo span { background: repeating-radial-gradient(circle at 50% 60%, #dfe8cf 0 6px, #c5d6ad 6px 7px); }
.xa-maps .xa-layer-pick.is-on span { border-color: var(--hue); }

/* Map markers */
.xa-me i {
    display: block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    background: #2563eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.leaflet-interactive.xa-me-acc,
path.xa-me-acc { fill: #2563eb; fill-opacity: 0.12; stroke: #2563eb; stroke-opacity: 0.35; stroke-width: 1; }

.xa-pin span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 44px;
    color: #ffffff;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
}

.xa-pin svg { width: 36px; height: 36px; fill: #e11d48; stroke: #ffffff; stroke-width: 1.6; }

/* ==========================================================================
   Code
   ========================================================================== */

.xa-code.xa-code-editing { --code-bg: color-mix(in srgb, var(--background) 92%, #000000); }

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

.xa-code .xa-template {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid var(--ok-line);
    background: var(--ok-card);
    color: var(--on-surface);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.xa-code .xa-code-tabs {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    flex-shrink: 0;
    border-bottom: 1px solid var(--ok-line);
}

.xa-code .xa-code-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    border: none;
    background: none;
    color: var(--ok-muted);
    font-family: var(--font-main);
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
}

.xa-code .xa-code-tab.is-active { color: var(--on-surface); box-shadow: inset 0 -2px 0 var(--hue); }
.xa-code .xa-code-tab svg { fill: currentColor; }
.xa-code .xa-code-tab-ink { display: none; }

.xa-code .xa-code-body {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.xa-code .xa-editor {
    flex: 1;
    min-height: 0;
    width: 100%;
    margin: 0;
    padding: 14px 16px 40px;
    border: none;
    outline: none;
    resize: none;
    background: var(--code-bg);
    color: var(--on-surface);
    font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 14px;
    line-height: 1.6;
    tab-size: 2;
    white-space: pre;
    overflow: auto;
    caret-color: var(--hue);
}

.xa-code .xa-keys {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    overflow-x: auto;
    scrollbar-width: none;
    border-top: 1px solid var(--ok-line);
    background: var(--ok-card);
}

.xa-code .xa-keys::-webkit-scrollbar { display: none; }

.xa-code .xa-keys button {
    min-width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 10px;
    border: 1px solid var(--ok-line-strong);
    background: transparent;
    color: var(--on-surface);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 1rem;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.xa-code .xa-keys button:active { background: var(--ok-line); }

.xa-code .xa-preview {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.xa-code .xa-preview iframe {
    flex: 1;
    min-height: 0;
    width: 100%;
    border: none;
    background: #ffffff;
}

.xa-code .xa-preview-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--ok-line);
    background: var(--ok-card);
}

.xa-code .xa-preview-bar .ok-btn { margin-right: auto; position: relative; }

.xa-code .xa-err-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--error, #e5534b);
    color: #ffffff;
    font-style: normal;
    font-size: 0.7rem;
}

.xa-code .xa-console {
    display: none;
    max-height: 40%;
    min-height: 120px;
    overflow-y: auto;
    padding: 6px 0;
    border-top: 1px solid var(--ok-line);
    background: var(--code-bg);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12.5px;
}

.xa-code .xa-console.is-open { display: block; }
.xa-code .xa-log { padding: 5px 14px; border-bottom: 1px solid var(--ok-line); color: var(--on-surface); white-space: pre-wrap; word-break: break-word; }
.xa-code .xa-log--error { color: #f87171; background: color-mix(in srgb, #ef4444 8%, transparent); }
.xa-code .xa-log--warn { color: #fbbf24; }
.xa-code .xa-log--empty { color: var(--ok-muted); border: none; }

/* Full screen preview: only the page and its bar. */
.xa-code.xa-code-full .xa-header,
.xa-code.xa-code-full .xa-code-tabs { display: none; }

/* ==========================================================================
   Settings pages (app.settings() in app/appshell.js)
   ========================================================================== */

.xa-settings .xa-set-row { min-height: 64px; }
.xa-settings .xa-set-row.is-danger .ok-row-title { color: var(--error, #e5534b); }
.xa-settings .xa-set-choice { padding-bottom: 6px; }

.xa-settings .xa-set-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 14px 14px 64px;
}

.xa-settings .xa-set-options .ok-chip { height: 34px; padding: 0 14px; font-size: 0.84rem; }

.xa-settings .xa-set-note {
    margin: -2px 6px 4px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--ok-muted);
}

.xa-app .xa-switch {
    position: relative;
    flex: none;
    width: 46px;
    height: 28px;
    border-radius: 999px;
    background: var(--ok-line-strong);
}

.xa-app .xa-switch i {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.xa-app .xa-switch.is-on { background: var(--hue); }
.xa-app .xa-switch.is-on i { transform: translateX(18px); }

.ws-preview {
  flex: 1;
  min-height: 0;
}
.ws-preview iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: white;
}
/* Files and App Creator use kit.css for visual components. Only workspace
   layout, code editing and file-grid geometry belong here. */
.xa-files,
.xa-appcreator {
  color: var(--on-surface);
  --ws-line: var(--ok-line);
  --ws-muted: var(--ok-muted);
}
.xa-files .xa-title,
.xa-appcreator .xa-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.studio-library,
.fm-scroll {
  padding: 16px 16px 0;
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.workspace-column {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.workspace-column > .ok-section {
  margin-top: 12px;
}
.workspace-column .ok-card .ok-card {
  border: 0;
  padding: 0;
}
.fm-storage-card .ok-row {
  padding: 0;
}
.fm-storage-track {
  height: 4px;
  overflow: hidden;
  background: var(--ok-line);
  border-radius: 4px;
  margin-top: 16px;
}
.fm-storage-track i {
  display: block;
  height: 100%;
  min-width: 3px;
  background: var(--ok-ink);
}
.studio-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  min-height: 42px;
  box-sizing: border-box;
  font-size: 0.75rem;
  color: var(--ok-muted);
  border-bottom: 1px solid var(--ok-line);
}
.studio-meta > span:nth-child(2) {
  flex: 1;
}
.studio-dot {
  width: 5px;
  height: 5px;
  background: var(--on-surface);
  border-radius: 50%;
}
.studio-meta button {
  font: inherit;
  color: var(--on-surface);
  background: none;
  border: 0;
  padding: 4px;
}
.studio-tabs {
  padding: 12px 16px !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--ok-line);
  flex-shrink: 0;
  gap: 6px !important;
  overflow: auto;
}
.studio-tabs .ok-chip {
  padding: 0 13px;
  font-size: 0.8rem;
}
.studio-pane {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
}
.studio-codebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  gap: 10px;
  border-bottom: 1px solid var(--ok-line);
  font-size: 0.8rem;
}
.studio-codebar > span,
.studio-codebar > div {
  display: flex;
  align-items: center;
  gap: 6px;
}
.studio-codebar select {
  padding: 6px;
  border: 1px solid var(--ok-line-strong);
  border-radius: 8px;
  background: var(--ok-card);
  color: var(--on-surface);
  font: inherit;
  max-width: 90px;
}
.studio-editor {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.studio-code {
  --code-pad: 14px;
  --code-gutter: 50px;
  position: relative;
  flex: 1;
  min-height: 180px;
  overflow: hidden;
  background: var(--background);
}
.studio-code .studio-hl,
.studio-code textarea {
  box-sizing: border-box;
  margin: 0;
  padding: var(--code-pad) var(--code-pad) 40vh var(--code-gutter);
  font: 13px/1.7 ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  letter-spacing: 0;
  tab-size: 2;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}
.studio-code.is-wrap .studio-hl,
.studio-code.is-wrap textarea {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.studio-code .studio-hl {
  position: absolute;
  top: 0;
  left: 0;
  min-width: 100%;
  color: var(--on-surface);
  pointer-events: none;
  counter-reset: line;
  will-change: transform;
}
.studio-code .studio-hl .ln {
  display: block;
  position: relative;
  counter-increment: line;
}
.studio-code .studio-hl .ln::before {
  content: counter(line);
  position: absolute;
  left: calc(-1 * var(--code-gutter));
  width: calc(var(--code-gutter) - 14px);
  text-align: right;
  color: var(--ok-muted);
  opacity: 0.6;
}
.studio-code textarea {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  resize: none;
  border: 0;
  outline: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: var(--on-surface);
  overflow: auto;
  overscroll-behavior: contain;
}
.studio-code textarea::selection {
  background: color-mix(in srgb, #6366f1 38%, transparent);
}
.studio-code::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: calc(var(--code-gutter) - 8px);
  border-right: 1px solid var(--ok-line);
  background: color-mix(in srgb, var(--on-surface) 3%, transparent);
  pointer-events: none;
}
.hl-tag { color: color-mix(in srgb, #ec4899 80%, var(--on-surface)); }
.hl-attr { color: color-mix(in srgb, #f59e0b 75%, var(--on-surface)); }
.hl-string { color: color-mix(in srgb, #22c55e 75%, var(--on-surface)); }
.hl-comment { color: var(--ok-muted); font-style: italic; }
.hl-keyword { color: color-mix(in srgb, #8b5cf6 80%, var(--on-surface)); }
.hl-fn { color: color-mix(in srgb, #3b82f6 80%, var(--on-surface)); }
.hl-number { color: color-mix(in srgb, #f97316 80%, var(--on-surface)); }
.hl-prop { color: color-mix(in srgb, #06b6d4 80%, var(--on-surface)); }
.studio-keys {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  overflow-x: auto;
  flex-shrink: 0;
  border-top: 1px solid var(--ok-line);
  background: var(--ok-card);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.studio-keys::-webkit-scrollbar { display: none; }
.studio-keys.is-docked {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 2147483000;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.25);
}
.studio-keys button {
  flex: 0 0 auto;
  min-width: 42px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--ok-line-strong);
  border-radius: 10px;
  background: var(--background);
  color: var(--on-surface);
  font: 600 16px ui-monospace, Menlo, Consolas, monospace;
  touch-action: manipulation;
}
.studio-codebar > span:first-child {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.studio-codebar > div {
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .studio-pane.is-source > .studio-codebar > span:first-child { display: none; }
  .studio-pane.is-source > .studio-codebar { justify-content: flex-end; }
}
.studio-codebar [data-studio="undo"],
.studio-codebar [data-studio="redo"] {
  min-width: 36px;
  padding: 0 8px !important;
  font-size: 1rem;
}
.studio-codebar [data-studio="wrap"].is-on {
  background: color-mix(in srgb, var(--on-surface) 12%, transparent);
}
.studio-run.ok-btn {
  background: var(--on-surface);
  color: var(--background);
  border-color: transparent;
}
body.desktop-mode .studio-run { display: none !important; }
@media (pointer: fine) {
  body.desktop-mode .studio-keys { display: none; }
}
.studio-sheet {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
}
.studio-sheet-card {
  width: 100%;
  max-width: 560px;
  max-height: 72%;
  overflow: auto;
  box-sizing: border-box;
  padding: 8px 16px 20px;
  background: var(--background);
  border: 1px solid var(--ok-line);
  border-radius: 22px 22px 0 0;
}
.studio-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 2px 14px;
  font-size: 1rem;
}
.studio-sheet-head button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--on-surface) 8%, transparent);
  color: var(--on-surface);
  font: inherit;
}
body.desktop-mode .studio-sheet { align-items: center; }
body.desktop-mode .studio-sheet-card { border-radius: 22px; }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.no-animations) body:not(.no-animations) .studio-sheet { animation: studioFade 0.2s ease both; }
  :root:not(.no-animations) body:not(.no-animations) .studio-sheet-card { animation: studioUp 0.32s cubic-bezier(0.2, 0.9, 0.25, 1) both; }
  :root:not(.no-animations) body:not(.no-animations) .studio-sheet.is-closing { animation: studioFade 0.18s ease reverse both; }
  :root:not(.no-animations) body:not(.no-animations) .studio-sheet.is-closing .studio-sheet-card { animation: studioUp 0.18s ease-in reverse both; }
  :root:not(.no-animations) body:not(.no-animations) .studio-sheet .ok-row { animation: studioUp 0.3s cubic-bezier(0.2, 0.9, 0.25, 1) both; }
  :root:not(.no-animations) body:not(.no-animations) .studio-sheet .ok-row:nth-child(n+2) { animation-delay: 0.03s; }
  :root:not(.no-animations) body:not(.no-animations) .studio-sheet .ok-row:nth-child(n+4) { animation-delay: 0.06s; }
  :root:not(.no-animations) body:not(.no-animations) .studio-sheet .ok-row:nth-child(n+7) { animation-delay: 0.09s; }
  :root:not(.no-animations) body:not(.no-animations) .studio-keys button { transition: transform 0.12s ease, background 0.12s ease; }
  :root:not(.no-animations) body:not(.no-animations) .studio-keys button:active { transform: scale(0.88); background: color-mix(in srgb, var(--on-surface) 14%, var(--background)); }
  :root:not(.no-animations) body:not(.no-animations) .studio-keys.is-docked { animation: studioUp 0.22s cubic-bezier(0.2, 0.9, 0.25, 1) both; }
  :root:not(.no-animations) body:not(.no-animations) .studio-editor { animation: studioFade 0.3s ease both; }
  :root:not(.no-animations) body:not(.no-animations) .studio-codebar button { transition: transform 0.12s ease, background 0.2s ease; }
  :root:not(.no-animations) body:not(.no-animations) .studio-codebar button:active { transform: scale(0.92); }
}
@keyframes studioFade { from { opacity: 0; } }
@keyframes studioUp { from { opacity: 0; transform: translateY(16px); } }
.studio-footer {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 0.7rem;
  color: var(--ok-muted);
  border-top: 1px solid var(--ok-line);
  flex-shrink: 0;
}
.studio-stage {
  background: var(--ok-card);
  flex: 1;
  min-height: 200px;
  overflow: auto;
  padding: 16px;
  display: flex;
  justify-content: center;
}
.studio-stage #studio-frame {
  max-width: 100%;
  height: 100%;
  min-height: 360px;
  flex-shrink: 0;
  background: white;
  overflow: hidden;
  border-radius: 12px;
}
.studio-stage iframe {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
  display: block;
}
.studio-hint {
  font-size: 0.8rem;
  color: var(--ok-muted);
  line-height: 1.6;
  margin: 10px 0;
}
.studio-pane > .studio-hint {
  padding: 0 16px;
}
.studio-assistant {
  padding: 20px 16px;
  max-width: 760px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
}
.studio-assistant h2 {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 16px 0 8px;
}
.studio-assistant > p {
  font-size: 0.9rem;
  color: var(--ok-muted);
  line-height: 1.6;
}
.studio-assistant label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 24px 0 10px;
}
.studio-assistant textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 14px;
  background: var(--ok-card);
  color: var(--on-surface);
  border: 1px solid var(--ok-line-strong);
  border-radius: 16px;
  font-family: var(--font-main);
  font-size: 0.9rem;
  line-height: 1.7;
  resize: vertical;
}
.studio-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 12px 0 20px;
}
.studio-chips .ok-btn {
  font-size: 0.75rem;
  padding: 0 12px;
}
.studio-assistant > .studio-primary {
  width: 100%;
  height: 44px;
}
.studio-assistant > button:not(.studio-primary) {
  display: flex;
  width: 100%;
  margin: 12px 0;
  height: 44px;
}
.studio-danger {
  color: var(--error) !important;
}
.studio-detail {
  display: flex;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--ok-line);
  font-size: 0.85rem;
  gap: 12px;
}
.studio-detail span {
  color: var(--ok-muted);
}
#studio-ai-result {
  font-size: 0.85rem;
  line-height: 1.6;
  margin-top: 12px;
}
.fm-browser {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0 16px;
  max-width: 100%;
  box-sizing: border-box;
}
.fm-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: auto;
  white-space: nowrap;
  padding: 14px 0;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.fm-crumb button {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--ok-muted);
}
.fm-crumb button:last-child {
  color: var(--on-surface);
}
.fm-search {
  margin: 0 !important;
  flex-shrink: 0;
}
.fm-search input {
  width: 100%;
  min-width: 0;
  outline: none;
  border: 0;
  background: none;
  color: var(--on-surface);
  font-family: var(--font-main);
  font-size: 0.95rem;
}
.fm-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 0;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.fm-tools > span {
  flex: 1;
  color: var(--ok-muted);
}
.fm-tools select {
  max-width: 85px;
  background: var(--ok-card);
  color: var(--on-surface);
  border: 1px solid var(--ok-line);
  font-family: var(--font-main);
  font-size: 0.75rem;
  border-radius: 8px;
  padding: 8px;
}
.fm-tools .ok-btn {
  padding: 0 10px;
  font-size: 0.75rem;
}
.fm-content {
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.fm-content.ok-list {
  flex: 0 1 auto;
  margin-bottom: auto;
}
.fm-item {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--ok-line);
  padding: 0 8px 0 14px;
}
.fm-item:last-child {
  border-bottom: 0;
}
.fm-item.is-selected {
  background: color-mix(in srgb, var(--on-surface) 7%, transparent);
}
.fm-open {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  min-width: 0;
  flex: 1;
  border: 0;
  background: none;
  padding: 14px 0;
  color: var(--on-surface);
  cursor: pointer;
  font-family: var(--font-main);
}
.fm-filename {
  min-width: 0;
  flex: 1;
}
.fm-filename b {
  display: block;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.fm-filename small {
  display: block;
  font-size: 0.8rem;
  color: var(--ok-muted);
  margin-top: 4px;
}
.fm-select {
  background: none;
  border: 0;
  min-width: 36px;
  min-height: 44px;
  color: var(--ok-muted);
  cursor: pointer;
}
.fm-select[aria-pressed="true"] {
  color: var(--on-surface);
}
.fm-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 10px;
}
.fm-grid .fm-item {
  position: relative;
  display: block;
  border: 1px solid var(--ok-line);
  border-radius: 16px;
  background: var(--ok-card);
  padding: 8px;
}
.fm-grid .fm-open {
  flex-direction: column;
  width: 100%;
  text-align: center;
  padding: 20px 0 8px;
  gap: 12px;
}
.fm-grid .fm-filename {
  width: 100%;
}
.fm-grid .fm-filename b {
  font-size: 0.8rem;
}
.fm-grid .fm-filename small {
  font-size: 0.65rem;
}
.fm-grid .fm-select {
  position: absolute;
  right: 0;
  top: 0;
  min-width: 28px;
  min-height: 28px;
}
.fm-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-size: 0.7rem;
  color: var(--ok-muted);
  border-top: 1px solid var(--ok-line);
  gap: 10px;
  margin-top: 12px;
  flex-shrink: 0;
}
.fm-bottom .ok-btn {
  font-size: 0.75rem;
  padding: 0 10px;
}
.fm-selection,
.fm-paste {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-bottom: 1px solid var(--ok-line);
  align-items: center;
}
.fm-selection .ok-btn,
.fm-paste .ok-btn {
  font-size: 0.75rem;
  padding: 0 10px;
}
.fm-paste span {
  font-size: 0.8rem;
  flex: 1;
}
.fm-empty {
  text-align: center;
  color: var(--ok-muted);
  padding: 40px 16px;
  grid-column: 1/-1;
}
.fm-empty h2 {
  font-size: 1.1rem;
  margin: 20px 0 10px;
  color: var(--on-surface);
}
.fm-empty p {
  font-size: 0.85rem;
  line-height: 1.6;
}
.fm-preview {
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  overflow: auto;
}
.fm-preview-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.fm-preview-meta b {
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}
.fm-preview-meta small {
  display: block;
  font-size: 0.8rem;
  color: var(--ok-muted);
  margin-top: 6px;
}
.fm-preview-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.fm-preview-actions .ok-btn {
  font-size: 0.8rem;
  padding: 0 12px;
}
#fm-preview-body {
  flex: 1;
  min-height: 200px;
  display: flex;
  overflow: auto;
}
#fm-preview-body img {
  max-width: 100%;
  object-fit: contain;
  margin: auto;
  max-height: 65vh;
}
#fm-preview-body video,
#fm-preview-body audio {
  max-width: 100%;
  margin: auto;
}
.fm-text-editor,
.fm-source {
  width: 100%;
  box-sizing: border-box;
  resize: none;
  border: 1px solid var(--ok-line);
  border-radius: 16px;
  padding: 16px;
  background: var(--ok-card);
  color: var(--on-surface);
  font:
    13px/1.8 ui-monospace,
    monospace;
  margin: 0;
  white-space: pre;
  overflow: auto;
}
@media (min-width: 800px) {
  .studio-library,
  .fm-scroll {
    padding-top: 24px;
  }
  .fm-browser {
    padding: 0 24px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
  }
  .fm-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .studio-assistant {
    padding: 24px 16px;
  }
  .studio-code textarea,
  .studio-code .studio-hl {
    font-size: 14px;
  }
  .studio-stage {
    padding: 24px;
  }
}
/* Phone interaction targets and text fields must stay usable without zooming. */
.xa-files .fm-select{min-width:44px;min-height:44px}
.xa-files .fm-open{touch-action:pan-y;-webkit-touch-callout:none;user-select:none}
.xa-files .fm-text-editor,.xa-appcreator #studio-prompt,.xa-appcreator #studio-source{font-size:16px}
.xa-appcreator .studio-code .studio-hl{font-size:16px}
@media(pointer:coarse){.xa-files .ok-btn,.xa-appcreator .ok-btn,.xa-appcreator .ok-chip{min-height:44px}}
.fm-workspace {
  display: contents;
}
.fm-sidebar,
.studio-desktop-preview {
  display: none;
}
@media (min-width: 1px) {
body.desktop-mode .fm-workspace {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
body.desktop-mode .fm-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 220px;
    flex-shrink: 0;
    padding: 20px 14px;
    box-sizing: border-box;
    border-right: 1px solid var(--ok-line);
    background: var(--ok-card);
    overflow: auto;
  }
body.desktop-mode .fm-sidebar .ok-list {
    border: 0;
    background: transparent;
    border-radius: 0;
  }
body.desktop-mode .fm-sidebar .ok-row {
    gap: 10px;
    border: 0;
    border-radius: 10px;
    margin: 2px 0;
    padding: 12px 10px;
  }
body.desktop-mode .fm-sidebar .ok-row-title {
    font-size: 0.85rem;
  }
body.desktop-mode .fm-sidebar .ok-row.is-current {
    background: color-mix(in srgb, var(--on-surface) 8%, transparent);
  }
body.desktop-mode .fm-sidebar svg {
    flex-shrink: 0;
    color: var(--ok-muted);
  }
body.desktop-mode .fm-workspace > .fm-browser,
body.desktop-mode .fm-workspace > .fm-scroll,
body.desktop-mode .fm-workspace > .fm-preview {
    flex: 1;
    width: auto;
    min-width: 0;
    margin: 0;
  }
body.desktop-mode .fm-workspace > .fm-scroll .workspace-column {
    max-width: 760px;
  }
body.desktop-mode .studio-library .workspace-column {
    max-width: 1040px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 28px;
    align-items: start;
  }
body.desktop-mode .studio-library .workspace-column > :nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }
body.desktop-mode .studio-library .workspace-column > :nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }
body.desktop-mode .studio-library .workspace-column > :nth-child(3) {
    grid-column: 1;
    grid-row: 3;
  }
body.desktop-mode .studio-library .workspace-column > :nth-child(4) {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }
body.desktop-mode .studio-library .workspace-column > :nth-child(5) {
    grid-column: 2;
    grid-row: 1 / span 3;
    margin-top: 38px;
  }
body.desktop-mode .studio-pane.is-source {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
  }
body.desktop-mode .studio-pane.is-source > .studio-codebar {
    grid-column: 1;
    grid-row: 1;
  }
body.desktop-mode .studio-pane.is-source > .studio-editor {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
  }
body.desktop-mode .studio-pane.is-source > .studio-footer {
    grid-column: 1;
    grid-row: 3;
  }
body.desktop-mode .studio-desktop-preview {
    display: flex;
    flex-direction: column;
    grid-column: 2;
    grid-row: 1 / span 3;
    min-width: 0;
    min-height: 0;
    border-left: 1px solid var(--ok-line);
  }
body.desktop-mode .studio-desktop-preview .studio-stage {
    padding: 16px;
    min-height: 0;
  }
body.desktop-mode .studio-inline-frame {
    width: 100%;
    height: 100%;
    min-width: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
  }
body.desktop-mode .studio-inline-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
  }
}
@media(max-height:540px){body.desktop-mode .fm-sidebar{width:168px;padding:8px}body.desktop-mode .fm-sidebar .ok-row{padding:8px}body.desktop-mode .fm-open{padding:8px 0}body.desktop-mode .fm-crumb{padding:6px 0}body.desktop-mode .fm-tools{padding:6px 0}body.desktop-mode .fm-bottom{padding:4px 0;margin-top:4px}body.desktop-mode .fm-search input{height:36px}}

/* ---------- Translate, Read aloud, Passwords, Quotes, To-do, Utility Suite
   (app/commands/toolapps.js). Motion lives in css/motion.css, New apps. ---------- */
.xa-app .xt-langs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.xa-app .xt-select {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 36px 0 16px;
    border-radius: 999px;
    border: 1px solid var(--ok-line-strong);
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    color: var(--on-surface);
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
}

.xa-app .xt-select option { background: var(--surface-color, #1b1d22); color: var(--on-surface); }
.xa-app .xt-select--wide { width: 100%; flex: none; }
.xa-app .xt-select:focus-visible,
.xa-app .xt-area:focus { border-color: color-mix(in srgb, var(--on-surface, #ffffff) 45%, transparent); }

.xa-app .xt-area {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 112px;
    padding: 14px 16px;
    border-radius: 20px;
    border: 1px solid var(--ok-line-strong);
    background: transparent;
    color: var(--on-surface);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.5;
    resize: vertical;
    outline: none;
}

.xa-app .xt-area::placeholder { color: var(--ok-muted); }

.xa-app .xt-result p { margin: 0 0 12px; font-size: 1.1rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.xa-app .xt-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.xa-app .xt-spin {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
}

.xa-app .xt-wrap { white-space: normal; overflow-wrap: anywhere; }

/* Passwords */
.xa-app .xt-password {
    margin: 6px 0 10px;
    font-family: var(--font-mono, monospace);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.02em;
    word-break: break-all;
    user-select: all;
}

.xa-app .xt-meter {
    width: 100%;
    height: 6px;
    margin-bottom: 8px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.25);
    overflow: hidden;
}

.xa-app .xt-meter i { display: block; height: 100%; border-radius: 3px; }

.xa-app .xt-range { width: 100%; margin: 4px 0 8px; accent-color: var(--app-hue); }

.xa-app .xt-switch-row {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

/* Quotes */
.xa-app .xt-quote {
    margin: 4px 0 12px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.35rem;
    line-height: 1.45;
}

/* Read aloud: four bars while it speaks */
.xa-app .xt-bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 24px; }
.xa-app .xt-bars i { display: block; width: 4px; height: 100%; border-radius: 2px; background: #ffffff; transform-origin: bottom; }

/* To-do */
.xa-app .xt-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 8px;
    border: 2px solid var(--ok-line-strong);
    background: transparent;
    color: transparent;
    cursor: pointer;
}

.xa-app .xt-check.is-on { border-color: var(--app-hue); background: var(--app-hue); color: #ffffff; }
.xa-app .xt-todo.is-done .ok-row-title { text-decoration: line-through; color: var(--ok-muted); }
.xa-app .xt-todo .ok-row-sub { display: inline-flex; align-items: center; gap: 4px; }

/* Utility Suite */
.xa-app .xt-run { display: flex; gap: 8px; }
.xa-app .xt-run .ok-btn--ink { height: 44px; }
.xa-app .xt-output { overflow-x: auto; overflow-wrap: anywhere; line-height: 1.5; }
.xa-app .xt-output p { margin: 0 0 6px; }
.xa-app .xt-output p:last-child { margin-bottom: 0; }
.xa-app .xt-output img { max-width: 100%; height: auto; }
.xa-app .xa-foot code { font-family: var(--font-mono, monospace); }

/* Typing with the phone keyboard up: the code gets the room. The status line,
   tabs and footer step aside (the back arrow, Run and the coding keys stay),
   and the editor may shrink below its usual minimum instead of overflowing. */
body.kb-open .xa-appcreator.studio-on-source .studio-meta,
body.kb-open .xa-appcreator.studio-on-source .studio-tabs,
body.kb-open .xa-appcreator .studio-pane.is-source > .studio-footer { display: none; }
body.kb-open .xa-appcreator .studio-pane.is-source { overflow: hidden; }
body.kb-open .xa-appcreator .studio-pane.is-source > .studio-codebar { padding: 6px 12px; }
body.kb-open .xa-appcreator .studio-code { min-height: 0; }
body.kb-open .xa-appcreator .studio-keys { padding: 6px 8px; }
body.kb-open .xa-appcreator .studio-keys button { height: 36px; }

/* ---------- App Creator: Ask AI chat (OrbitCodeAgent, code-agent.js) ---------- */
.xa-appcreator.studio-on-agent .studio-pane { overflow: hidden; }
.xa-appcreator .sa {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}
.xa-appcreator .sa-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ok-line);
  flex-shrink: 0;
}
.xa-appcreator .sa-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.xa-appcreator .sa-who b { font-size: 0.92rem; }
.xa-appcreator .sa-who small { font-size: 0.74rem; color: var(--ok-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xa-appcreator .sa-headbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0 !important; border-radius: 50%;
  border: 1px solid var(--ok-line-strong); background: transparent; color: var(--on-surface); cursor: pointer;
}
.xa-appcreator .sa-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.xa-appcreator .sa-empty { padding: 8px 2px; }
.xa-appcreator .sa-empty h2 { margin: 4px 0 6px; font-size: 1.3rem; letter-spacing: -0.02em; }
.xa-appcreator .sa-empty p { margin: 0 0 14px; color: var(--ok-muted); font-size: 0.86rem; line-height: 1.5; }
.xa-appcreator .sa-ideas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.xa-appcreator .sa-ideas button {
  min-height: 52px; padding: 10px 12px !important; border-radius: 14px; text-align: left;
  border: 1px solid var(--ok-line-strong); background: var(--ok-card); color: var(--on-surface);
  font: 600 0.84rem var(--font-main); line-height: 1.3; cursor: pointer; white-space: normal;
}
.xa-appcreator .sa-connect {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px;
  border: 1px solid color-mix(in srgb, #f59e0b 45%, transparent); background: color-mix(in srgb, #f59e0b 10%, transparent);
}
.xa-appcreator .sa-connect p { margin: 4px 0 10px; font-size: 0.84rem; color: var(--ok-muted); }
.xa-appcreator .sa-msg { display: flex; gap: 8px; align-items: flex-start; }
.xa-appcreator .sa-msg.is-user { justify-content: flex-end; }
.xa-appcreator .sa-bubble {
  max-width: 85%; padding: 10px 14px; border-radius: 18px 18px 6px 18px;
  background: var(--ok-ink, #f3f4f6); color: var(--ok-on-ink, #111318);
  font-size: 0.9rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere;
}
.xa-appcreator .sa-msg.is-error .sa-bubble {
  display: flex; gap: 8px; align-items: flex-start; max-width: 100%; border-radius: 14px;
  background: color-mix(in srgb, var(--error, #e5534b) 14%, transparent); color: var(--on-surface);
  border: 1px solid color-mix(in srgb, var(--error, #e5534b) 40%, transparent); white-space: normal;
}
.xa-appcreator .sa-avatar {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 9px; background: #7c5ce8; color: #fff;
}
.xa-appcreator .sa-body { flex: 1; min-width: 0; }
.xa-appcreator .sa-text { font-size: 0.9rem; line-height: 1.55; overflow-wrap: anywhere; }
.xa-appcreator .sa-text p { margin: 0 0 6px; }
.xa-appcreator .sa-text ul { margin: 2px 0 8px; padding-left: 18px; }
.xa-appcreator .sa-text code {
  padding: 1px 5px; border-radius: 6px; font: 0.82rem ui-monospace, Menlo, Consolas, monospace;
  background: color-mix(in srgb, var(--on-surface) 10%, transparent);
}
.xa-appcreator .sa-change {
  margin-top: 8px; padding: 10px 12px; border-radius: 14px;
  border: 1px solid var(--ok-line-strong); background: var(--ok-card);
}
.xa-appcreator .sa-change-top { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; font-size: 0.8rem; }
.xa-appcreator .sa-diff { color: var(--ok-muted); }
.xa-appcreator .sa-diff b { font-family: ui-monospace, Menlo, Consolas, monospace; margin-right: 6px; }
.xa-appcreator .sa-diff .is-add { color: #22c55e; }
.xa-appcreator .sa-diff .is-del { color: #ef4444; }
.xa-appcreator .sa-health { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.xa-appcreator .sa-health.is-good { color: #22c55e; }
.xa-appcreator .sa-health.is-bad { color: var(--error, #e5534b); }
.xa-appcreator .sa-errors { margin: 8px 0 0; padding-left: 18px; font: 0.76rem/1.45 ui-monospace, Menlo, Consolas, monospace; color: var(--ok-muted); overflow-wrap: anywhere; }
.xa-appcreator .sa-change-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.xa-appcreator .sa-change-actions button,
.xa-appcreator .sa-chips button {
  height: 34px; padding: 0 12px !important; border-radius: 999px; border: 1px solid var(--ok-line-strong);
  background: transparent; color: var(--on-surface); font: 600 0.8rem var(--font-main); cursor: pointer; white-space: nowrap;
}
.xa-appcreator .sa-steps { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.xa-appcreator .sa-step { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; color: var(--ok-muted); }
.xa-appcreator .sa-step.is-now { color: var(--on-surface); font-weight: 600; }
.xa-appcreator .sa-step.is-ok svg { color: #22c55e; }
.xa-appcreator .sa-step.is-error svg { color: var(--error, #e5534b); }
.xa-appcreator .sa-spin {
  flex-shrink: 0; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
}
.xa-appcreator .sa-compose {
  flex-shrink: 0; display: flex; flex-direction: column; gap: 8px;
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--ok-line); background: var(--background);
}
.xa-appcreator .sa-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.xa-appcreator .sa-chips::-webkit-scrollbar { display: none; }
.xa-appcreator .sa-sel {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; padding: 4px 6px 4px 10px;
  border-radius: 999px; font-size: 0.76rem; background: color-mix(in srgb, #7c5ce8 18%, transparent);
}
.xa-appcreator .sa-sel button { width: 24px; height: 24px; padding: 0 !important; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.xa-appcreator .sa-input {
  display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 14px;
  border: 1px solid var(--ok-line-strong); border-radius: 24px; background: var(--ok-card);
}
.xa-appcreator .sa-input:focus-within { border-color: color-mix(in srgb, #7c5ce8 65%, transparent); }
.xa-appcreator .sa-input textarea {
  flex: 1; min-width: 0; min-height: 24px; max-height: 160px; padding: 7px 0; resize: none;
  border: 0 !important; outline: none !important; background: transparent !important; box-shadow: none !important;
  color: var(--on-surface); font: 16px/1.4 var(--font-main);
}
.xa-appcreator .sa-input textarea::placeholder { color: var(--ok-muted); }
.xa-appcreator .sa-send {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0 !important; border: 0; border-radius: 50%;
  background: #7c5ce8; color: #fff; cursor: pointer;
}
.xa-appcreator .sa-send.is-stop { background: var(--ok-ink, #f3f4f6); color: var(--ok-on-ink, #111318); }
/* With the keyboard up the conversation and the box get the room. */
body.kb-open .xa-appcreator.studio-on-agent .studio-meta,
body.kb-open .xa-appcreator.studio-on-agent .studio-tabs,
body.kb-open .xa-appcreator.studio-on-agent .sa-chips { display: none; }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.no-animations) body:not(.no-animations) .xa-appcreator :is(.sa-msg, .sa-ideas button, .sa-connect) { animation: osRise 0.28s var(--os-ease, ease) backwards; animation-delay: calc(var(--i, 0) * 30ms); }
  :root:not(.no-animations) body:not(.no-animations) .xa-appcreator .sa-step.is-now { animation: osRise 0.22s var(--os-ease, ease) backwards; }
  :root:not(.no-animations) body:not(.no-animations) .xa-appcreator .sa-spin { animation: xaSpin 0.8s linear infinite; }
  :root:not(.no-animations) body:not(.no-animations) .xa-appcreator :is(.sa-send, .sa-ideas button, .sa-chips button, .sa-change-actions button, .sa-headbtn) { transition: transform 0.12s ease, background-color 0.2s ease; }
  :root:not(.no-animations) body:not(.no-animations) .xa-appcreator :is(.sa-send, .sa-ideas button, .sa-chips button, .sa-change-actions button, .sa-headbtn):active { transform: scale(0.94); }
}

/* Maps offline: a centered card over a faint map grid. */
.xa-maps.is-offline #maps-map {
    background-color: var(--background, #0b0d12) !important;
    background-image:
        linear-gradient(color-mix(in srgb, var(--on-surface, #ffffff) 6%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--on-surface, #ffffff) 6%, transparent) 1px, transparent 1px);
    background-size: 44px 44px;
}
.xa-maps.is-offline .xa-map-status {
    flex-direction: column;
    gap: 8px;
    width: min(300px, calc(100% - 48px));
    max-width: none;
    padding: 22px 22px 20px;
    border-radius: 26px;
    text-align: center;
    line-height: 1.45;
}
.xa-maps.is-offline .xa-map-status b { font-size: 1.05rem; color: var(--on-surface); }
.xa-maps.is-offline .xa-map-status > span:not(.xa-map-off-icon) { font-size: 0.86rem; color: var(--ok-muted); }
.xa-maps .xa-map-off-icon { display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; margin-bottom: 4px; border-radius: 20px; background: #10b981; color: #ffffff; }
.xa-maps.is-offline .xa-map-status .ok-btn { margin-top: 6px; }

/* Quotes: today's quote and More to read */
.xa-app .xt-daily { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.xa-app .xt-daily-text { flex: 1; font-family: Georgia, 'Times New Roman', serif; font-size: 1.02rem; line-height: 1.5; }
.xa-app .xt-more-q { font-family: Georgia, 'Times New Roman', serif; font-weight: 500 !important; font-size: 0.95rem; line-height: 1.45; }
.xa-app .xt-shuffle { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 0; border: none; background: none; color: var(--app-hue, var(--accent-primary)); font: 700 0.74rem var(--font-main); letter-spacing: 0; text-transform: none; cursor: pointer; }
.xa-app .xa-mini.xa-heart.is-on { color: #ef4444; }
.xa-app .xa-mini.xa-heart.is-on svg { fill: currentColor; }
@media (prefers-reduced-motion: no-preference) {
    :root:not(.no-animations) body:not(.no-animations) .xa-app .xt-daily:active { transform: scale(0.98); }
    :root:not(.no-animations) body:not(.no-animations) .xa-app .xt-daily { transition: transform 0.15s var(--os-ease, ease); }
}

/* ---------- Achievements ---------- */
.xa-achievements .tr-hero { display: flex; align-items: center; gap: 18px; padding: 18px; border-radius: 26px; background: linear-gradient(150deg, color-mix(in srgb, #eab308 30%, var(--ok-card, var(--surface-color))), var(--ok-card, var(--surface-color)) 75%); border: 1px solid var(--ok-line); }
.xa-achievements .tr-ring { --p: 0; position: relative; flex-shrink: 0; width: 96px; height: 96px; border-radius: 50%; background: conic-gradient(#eab308 calc(var(--p) * 1%), color-mix(in srgb, #eab308 18%, transparent) 0); display: flex; align-items: center; justify-content: center; }
.xa-achievements .tr-ring::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: var(--ok-card, var(--surface-color)); }
.xa-achievements .tr-ring span { position: relative; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.xa-achievements .tr-ring b { font-size: 1.6rem; font-weight: 800; }
.xa-achievements .tr-ring em { font-style: normal; font-size: 0.72rem; color: var(--ok-muted); }
.xa-achievements .tr-hero-text h2 { margin: 0; font-size: 1.25rem; font-weight: 800; }
.xa-achievements .tr-hero-text p { margin: 4px 0 0; font-size: 0.84rem; line-height: 1.45; color: var(--ok-muted); }
.xa-app .tr-badge { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; background: var(--c); color: #ffffff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18); }
.xa-achievements .tr-row:not(.is-done) .tr-badge { background: color-mix(in srgb, var(--on-surface) 10%, transparent); color: var(--ok-muted); box-shadow: none; }
.xa-achievements .tr-bar { display: block; height: 5px; margin-top: 6px; border-radius: 5px; background: color-mix(in srgb, var(--on-surface) 10%, transparent); overflow: hidden; }
.xa-achievements .tr-bar i { display: block; height: 100%; border-radius: 5px; background: #eab308; }
.xa-achievements .tr-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.xa-achievements .tr-side b { font-size: 0.86rem; }
.xa-achievements .tr-side em { font-style: normal; font-size: 0.72rem; color: var(--ok-muted); }
.xa-achievements .tr-coins { color: #eab308; }

/* ---------- Your week ---------- */
.xa-recap .rc-hero { padding: 20px 18px; border-radius: 28px; background: linear-gradient(150deg, #8b5cf6, #ec4899); color: #ffffff; }
.xa-recap .rc-kicker { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.85; }
.xa-recap .rc-hero h2 { margin: 6px 0 14px; font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; }
.xa-recap .rc-hero p { margin: 12px 0 0; font-size: 0.92rem; opacity: 0.92; }
.xa-recap .rc-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.xa-recap .rc-day { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 700; opacity: 0.85; }
.xa-recap .rc-day i { width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.45); }
.xa-recap .rc-day.is-on i { border-color: #ffffff; background: #ffffff; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2); }
.xa-recap .rc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 8px; margin-top: 18px; padding: 4px 4px 2px; }
.xa-recap .rc-stat { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
.xa-recap .rc-stat-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin-bottom: 4px; border-radius: 50%; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.xa-recap .rc-stat b { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.xa-recap .rc-stat > span:last-child { font-size: 0.74rem; color: var(--ok-muted); }
.xa-recap .rc-rank { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 0.9rem; }
.xa-recap .rc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.xa-recap .rc-chips .ok-chip { display: inline-flex; align-items: center; gap: 5px; }
.xa-recap .rc-switch { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 20px; }
@media (prefers-reduced-motion: no-preference) {
    :root:not(.no-animations) body:not(.no-animations) .xa-achievements .tr-ring { animation: osPop 0.55s var(--os-spring, ease) both; }
    :root:not(.no-animations) body:not(.no-animations) .xa-achievements .tr-bar i { animation: trFill 0.8s var(--os-ease-out, ease) 0.2s backwards; }
    :root:not(.no-animations) body:not(.no-animations) .xa-recap .rc-day { animation: osPop 0.4s var(--os-spring, ease) backwards; animation-delay: calc(0.1s + var(--i, 0) * 50ms); }
    :root:not(.no-animations) body:not(.no-animations) .xa-recap .rc-stat { animation: osRise 0.45s var(--os-ease-out, ease) backwards; }
    :root:not(.no-animations) body:not(.no-animations) .xa-recap .rc-stat:nth-child(2) { animation-delay: 0.05s; }
    :root:not(.no-animations) body:not(.no-animations) .xa-recap .rc-stat:nth-child(3) { animation-delay: 0.1s; }
    :root:not(.no-animations) body:not(.no-animations) .xa-recap .rc-stat:nth-child(n+4) { animation-delay: 0.15s; }
}
@keyframes trFill { from { width: 0; } }

/* ---------- Developer options ---------- */
.xa-devoptions .dev-banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 22px; background: linear-gradient(150deg, #334155, #0f172a); color: #e2e8f0; }
.xa-devoptions .dev-banner span { display: flex; flex-direction: column; gap: 2px; font-size: 0.8rem; opacity: 0.85; }
.xa-devoptions .dev-banner b { font-size: 0.98rem; opacity: 1; color: #ffffff; }
.xa-devoptions .dev-row { width: 100%; border: none; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.xa-devoptions .dev-speed { align-items: flex-start; cursor: default; }
.xa-devoptions .dev-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.xa-devoptions .dev-chips .ok-chip { height: 32px; padding: 0 12px; }
.xa-devoptions .dev-off { margin-top: 18px; }
.xa-devoptions .dev-off .ok-row-title { color: var(--error, #e5534b); }
.xa-devoptions .dev-mono { font-family: var(--font-mono); font-size: 0.82rem !important; word-break: break-all; white-space: normal !important; }
.xa-devoptions .dev-size { flex-shrink: 0; font-size: 0.76rem; font-weight: 700; color: var(--ok-muted); }
.xa-devoptions .dev-key-actions { display: flex; gap: 8px; }
.xa-devoptions .dev-danger { color: var(--error, #e5534b); }
.xa-devoptions .dev-pre { margin: 0; padding: 14px; border-radius: 18px; border: 1px solid var(--ok-line); background: var(--ok-card, var(--surface-color)); font: 0.76rem/1.5 var(--font-mono); white-space: pre-wrap; word-break: break-all; max-height: none; overflow: auto; }
.xa-devoptions .dev-logs { display: flex; flex-direction: column; border-radius: 20px; border: 1px solid var(--ok-line); background: var(--ok-card, var(--surface-color)); overflow: hidden; }
.xa-devoptions .dev-log { display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; }
.xa-devoptions .dev-log + .dev-log { border-top: 1px solid var(--ok-line); }
.xa-devoptions .dev-log-meta { display: flex; align-items: center; gap: 6px; font: 700 0.7rem var(--font-mono); color: var(--ok-muted); }
.xa-devoptions .dev-log-meta i { width: 7px; height: 7px; border-radius: 50%; }
.xa-devoptions .dev-log-msg { font-size: 0.84rem; line-height: 1.4; word-break: break-word; }

/* Show taps and layout bounds (they work everywhere, not only on this page). */
.dev-tap { position: fixed; left: -18px; top: -18px; z-index: 2147483000; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); border: 2px solid rgba(255, 255, 255, 0.85); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); pointer-events: none; }
.dev-tap.is-up { opacity: 0; transition: opacity 0.25s ease; }
html.dev-bounds body *:not(svg *) { outline: 1px solid rgba(255, 64, 129, 0.55) !important; outline-offset: -1px; }
@media (prefers-reduced-motion: no-preference) {
    :root:not(.no-animations) body:not(.no-animations) .xa-devoptions .dev-banner svg { animation: osPop 0.5s var(--os-spring, ease) both; }
}
