:root {
    --bg: #0b0f14;
    --bg-raise: #121821;
    --grid-line: rgba(148, 163, 184, 0.055);
    --grid-cross: rgba(148, 163, 184, 0.14);
    --ink: #dbe4ee;
    --ink-dim: #7d8a99;
    --ink-faint: #46525f;
    --accent: #7ee7c4;          /* mint — the "//" color */
    --accent-dim: rgba(126, 231, 196, 0.14);
    --line: rgba(148, 163, 184, 0.16);
    --drawer-w: 340px;
    --ease: cubic-bezier(0.32, 0.72, 0, 1);
  }

  /* ---------- theme palettes (dark = :root defaults) ---------- */
  body[data-theme="cotton-candy"] {
    --bg:#241026; --bg-raise:#341838; --ink:#ffe3f3; --ink-dim:#d69ec6; --ink-faint:#8c6486;
    --accent:#ff8fd4; --accent-dim:rgba(255,143,212,.16); --line:rgba(255,143,212,.18);
    --grid-line:rgba(255,180,220,.05); --grid-cross:rgba(255,180,220,.13);
  }
  body[data-theme="forest"] {
    --bg:#0b140f; --bg-raise:#13201a; --ink:#d8ecdb; --ink-dim:#82a58c; --ink-faint:#4c6355;
    --accent:#64e58a; --accent-dim:rgba(100,229,138,.14); --line:rgba(120,200,150,.15);
    --grid-line:rgba(150,220,170,.05); --grid-cross:rgba(150,220,170,.13);
  }
  body[data-theme="rose"] {
    --bg:#190d10; --bg-raise:#26151a; --ink:#f6dde1; --ink-dim:#c48d96; --ink-faint:#6e4952;
    --accent:#ff8296; --accent-dim:rgba(255,130,150,.15); --line:rgba(255,150,165,.16);
    --grid-line:rgba(255,170,180,.05); --grid-cross:rgba(255,170,180,.12);
  }
  body[data-theme="ocean"] {
    --bg:#071019; --bg-raise:#0e1f2d; --ink:#cfe6f5; --ink-dim:#79a0bd; --ink-faint:#43606f;
    --accent:#4fc8ff; --accent-dim:rgba(79,200,255,.15); --line:rgba(90,180,230,.16);
    --grid-line:rgba(130,190,230,.05); --grid-cross:rgba(130,190,230,.13);
  }
  body[data-theme="sunset"] {
    --bg:#1a0f0c; --bg-raise:#281713; --ink:#ffe6d4; --ink-dim:#c99781; --ink-faint:#6f4d40;
    --accent:#ff9b57; --accent-dim:rgba(255,155,87,.16); --line:rgba(255,160,100,.16);
    --grid-line:rgba(255,180,130,.05); --grid-cross:rgba(255,180,130,.12);
  }
  body[data-theme="cyberpunk"] {
    --bg:#08050f; --bg-raise:#14082a; --ink:#ecd6ff; --ink-dim:#a481d4; --ink-faint:#5d4880;
    --accent:#ff2fd6; --accent-dim:rgba(255,47,214,.18); --line:rgba(180,80,255,.22);
    --grid-line:rgba(200,100,255,.06); --grid-cross:rgba(0,240,255,.16);
  }
  body { transition: background-color 0.4s var(--ease), color 0.4s var(--ease); }

  /* ---------- entrance animations ---------- */
  @keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

  /* home loads in on first paint */
  .wordmark    { animation: riseIn 0.6s var(--ease) both; }
  .search-wrap { animation: riseIn 0.6s var(--ease) 0.09s both; }
  .status      { animation: riseIn 0.6s var(--ease) 0.18s both; }

  /* page header rises when a section opens */
  body[data-view="games"] #page-games .page-head,
  body[data-view="applications"] #page-applications .page-head,
  body[data-view="settings"] #page-settings .page-head {
    animation: riseIn 0.5s var(--ease) both;
  }

  /* tiles stagger in when their section becomes active */
  body[data-view="games"] #page-games .tile,
  body[data-view="applications"] #page-applications .tile,
  body[data-view="settings"] #page-settings .tile {
    animation: riseIn 0.5s var(--ease) both;
  }
  .tile-grid .tile:nth-child(1) { animation-delay: 0.06s; }
  .tile-grid .tile:nth-child(2) { animation-delay: 0.11s; }
  .tile-grid .tile:nth-child(3) { animation-delay: 0.16s; }
  .tile-grid .tile:nth-child(4) { animation-delay: 0.21s; }
  .tile-grid .tile:nth-child(5) { animation-delay: 0.26s; }
  .tile-grid .tile:nth-child(6) { animation-delay: 0.31s; }
  .tile-grid .tile:nth-child(7) { animation-delay: 0.36s; }
  .tile-grid .tile:nth-child(8) { animation-delay: 0.41s; }

  /* scrim behind the drawer */
  .scrim {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.38);
    opacity: 0; pointer-events: none;
    transition: opacity 0.45s var(--ease);
    z-index: 35;
  }
  body.drawer-open .scrim { opacity: 1; pointer-events: auto; }

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

  /* custom cursor — driven by --cursor so the Cursor setting can swap it */
  * {
    cursor: var(--cursor, url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'><path d='M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z' fill='%239aa3ad' stroke='black' stroke-width='1.7' stroke-linejoin='round' stroke-linecap='round'/></svg>") 5 5, auto) !important;
  }

  html, body { height: 100%; }

  body {
    background: var(--bg);
    color: var(--ink);
    font-family: "JetBrains Mono", ui-monospace, monospace;
    overflow: hidden;
    /* math grid */
    background-image:
      linear-gradient(var(--grid-line) 1px, transparent 1px),
      linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 44px 44px;
  }

  /* plus-signs at grid intersections, sparse */
  .crosses {
    position: fixed; inset: 0; pointer-events: none;
    background-image:
      radial-gradient(circle at center, transparent 0, transparent 100%);
  }
  .crosses::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
      linear-gradient(var(--grid-cross) 1px, transparent 1px),
      linear-gradient(90deg, var(--grid-cross) 1px, transparent 1px);
    background-size: 220px 220px;
    background-position: 21px 21px;
    -webkit-mask-image: repeating-linear-gradient(0deg, black 0 9px, transparent 9px 220px),
                        repeating-linear-gradient(90deg, black 0 9px, transparent 9px 220px);
    mask-image: repeating-linear-gradient(0deg, black 0 9px, transparent 9px 220px);
  }

  /* ---------- home ---------- */
  main {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 26px;
    transition: transform 0.55s var(--ease), opacity 0.4s var(--ease);
    padding: 0 24px;
  }
  body.drawer-open main {
    transform: translateX(calc(var(--drawer-w) / -2));
  }
  /* home slides away when a section is open */
  body:not([data-view="home"]) main {
    transform: translateX(-70px);
    opacity: 0;
    pointer-events: none;
  }

  /* ---------- section pages ---------- */
  .page {
    position: fixed;
    inset: 0;
    padding: 70px clamp(24px, 7vw, 110px) 60px;
    overflow-y: auto;
    opacity: 0;
    transform: translateX(70px);
    pointer-events: none;
    transition: transform 0.55s var(--ease), opacity 0.4s var(--ease);
    z-index: 10;
  }
  body[data-view="games"] #page-games,
  body[data-view="applications"] #page-applications,
  body[data-view="settings"] #page-settings {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
  }

  .page-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
  }
  .back-btn {
    width: 38px; height: 38px;
    display: grid;
    place-items: center;
    background: var(--bg-raise);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    font-family: inherit;
    transition: border-color 0.2s;
  }
  .back-btn:hover { border-color: var(--accent); }
  .back-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .back-btn svg { width: 16px; height: 16px; stroke: var(--ink); }
  .page-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
  }
  .page-title .slashes { color: #fff; font-weight: 300; font-style: italic; }
  .page-count { display: none; }

  /* tiles (games + apps) */
  .tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
  }
  .tile {
    aspect-ratio: 1;
    background: var(--bg-raise);
    border: 1px solid var(--line);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--ink);
    font-family: inherit;
    font-size: 0.85rem;
    padding: 0;
    transition: border-color 0.18s, transform 0.18s, background 0.18s;
    user-select: none;
  }
  .tile:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
    transform: translateY(-3px);
  }
  .tile svg { width: 30px; height: 30px; stroke: var(--accent); }
  .tile .soon {
    font-size: 0.62rem;
    color: var(--ink-faint);
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }
  .tile.ghost {
    border-style: dashed;
    color: var(--ink-faint);
  }
  .tile.ghost:hover { transform: none; background: var(--bg-raise); border-color: var(--ink-faint); }
  .tile.ghost svg { stroke: var(--ink-faint); }

  /* bigger game tiles */
  #page-games .tile-grid { grid-template-columns: repeat(auto-fill, minmax(177px, 1fr)); gap: 16px; }
  #page-applications .tile-grid { grid-template-columns: repeat(auto-fill, minmax(177px, 1fr)); gap: 16px; }

  /* drop-in game art: add <img class="art" src="..."> inside a .tile and it fills
     the box, hides the placeholder icon, and overlays the title along the bottom */
  .tile { position: relative; overflow: hidden; }
  .tile .art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .tile:has(.art) { justify-content: flex-end; align-items: stretch; gap: 0; }
  .tile:has(.art) > svg, .tile:has(.art) .soon { display: none; }
  .tile:has(.art) > span:not(.soon) {
    position: relative; z-index: 1; text-align: left;
    padding: 24px 12px 11px; font-size: 0.92rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.82));
  }
  .tile:has(.art):hover { background: var(--bg-raise); }

  /* pin button on tiles */
  .tile .pin {
    position: absolute; top: 7px; right: 7px; z-index: 3;
    width: 27px; height: 27px; border-radius: 8px;
    background: rgba(8, 12, 18, 0.6); border: 1px solid var(--line);
    display: grid; place-items: center; padding: 0; cursor: pointer;
    opacity: 0; transition: opacity 0.15s, background 0.15s, border-color 0.15s;
  }
  .tile:hover .pin, .tile .pin.pinned, .tile:focus-within .pin { opacity: 1; }
  .tile .pin svg { width: 15px; height: 15px; stroke: var(--ink-dim); fill: none; }
  .tile .pin:hover { border-color: var(--accent); }
  .tile .pin.pinned { background: var(--accent-dim); border-color: var(--accent); }
  .tile .pin.pinned svg { stroke: var(--accent); fill: var(--accent); }

  /* bottom dock */
  .dock {
    position: fixed; left: 50%; bottom: 18px;
    transform: translate(-50%, 24px);
    display: flex; gap: 10px; padding: 10px 12px;
    background: var(--bg-raise); border: 1px solid var(--line); border-radius: 18px;
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.5);
    z-index: 45; opacity: 0; pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  }
  .dock.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
  .dock-item {
    position: relative; width: 48px; height: 48px; border-radius: 12px;
    background: var(--bg); border: 1px solid var(--line); color: var(--accent);
    display: grid; place-items: center; padding: 0; cursor: pointer;
    transition: transform 0.15s var(--ease), border-color 0.15s;
  }
  .dock-item:hover { transform: translateY(-6px); border-color: var(--accent); }
  .dock-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 11px; }
  .dock-item svg { width: 24px; height: 24px; stroke: var(--accent); fill: none; }
  .dock-item .unpin {
    position: absolute; top: -7px; right: -7px; width: 19px; height: 19px;
    border-radius: 50%; background: var(--bg-raise); border: 1px solid var(--line);
    color: var(--ink-dim); font-size: 13px; line-height: 1; display: none;
    align-items: center; justify-content: center;
  }
  .dock-item:hover .unpin { display: flex; }
  .dock-item .unpin:hover { color: #f0846b; border-color: #f0846b; }

  /* ---------- settings list (grouped) ---------- */
  .set-wrap { max-width: 600px; margin: 84px auto 0; display: flex; flex-direction: column; gap: 26px; }
  .set-group h3 {
    font-size: 0.66rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--ink-faint); margin: 0 0 10px 4px;
  }
  .set-card {
    background: var(--bg-raise); border: 1px solid var(--line);
    border-radius: 14px; overflow: hidden;
  }
  .set-row {
    display: flex; align-items: center; gap: 14px; width: 100%;
    padding: 14px 15px; background: none; border: none; color: var(--ink);
    font-family: inherit; font-size: 0.9rem; text-align: left;
    transition: background 0.15s var(--ease);
  }
  .set-row + .set-row { border-top: 1px solid var(--line); }
  .set-row:hover { background: var(--accent-dim); }
  .set-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  .set-row .ic {
    width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px;
    background: var(--bg); border: 1px solid var(--line);
    display: grid; place-items: center;
  }
  .set-row .ic svg { width: 19px; height: 19px; stroke: var(--accent); fill: none; }
  .set-row .txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .set-row .txt small { color: var(--ink-faint); font-size: 0.68rem; letter-spacing: 0.01em; }
  .set-row .val {
    margin-left: auto; color: var(--accent); font-size: 0.74rem;
    letter-spacing: 0.04em; white-space: nowrap; flex-shrink: 0;
  }
  .set-row .go { display: grid; place-items: center; flex-shrink: 0; }
  .set-row .go svg { width: 16px; height: 16px; stroke: var(--ink-faint); fill: none; transition: transform 0.15s var(--ease); }
  .set-row:hover .go svg { transform: translateX(2px); stroke: var(--accent); }

  /* staggered entrance for setting rows */
  body[data-view="settings"] #page-settings .set-row { animation: riseIn 0.5s var(--ease) both; }
  .set-card .set-row:nth-child(1) { animation-delay: 0.04s; }
  .set-card .set-row:nth-child(2) { animation-delay: 0.09s; }
  .set-card .set-row:nth-child(3) { animation-delay: 0.14s; }
  .set-card .set-row:nth-child(4) { animation-delay: 0.19s; }

  .set-foot {
    max-width: 600px;
    margin: 34px auto 0;
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.7;
    color: var(--ink-faint);
    letter-spacing: 0.02em;
  }
  .set-foot span { display: block; margin-top: 4px; color: var(--accent); }

  /* settings cubes */
  #page-settings .tile-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 18px;
  }
  .set-tile { gap: 10px; font-size: 0.95rem; }
  .set-tile svg { width: 38px; height: 38px; }
  .set-tile .control {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 6px;
    min-height: 24px;
  }
  .set-tile .desc {
    font-size: 0.62rem;
    color: var(--ink-faint);
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .toggle {
    display: inline-block;
    width: 42px; height: 23px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg);
    position: relative;
    flex-shrink: 0;
    vertical-align: middle;
  }
  .toggle::after {
    content: "";
    position: absolute;
    top: 2px; left: 2px;
    width: 17px; height: 17px;
    border-radius: 50%;
    background: var(--ink-dim);
    transition: left 0.2s var(--ease), background 0.2s;
  }
  .toggle.on { background: var(--accent-dim); border-color: var(--accent); }
  .toggle.on::after { left: 21px; background: var(--accent); }

  .swatch {
    width: 22px; height: 22px;
    border-radius: 7px;
    border: 1px solid var(--line);
    flex-shrink: 0;
  }
  .swatch.sel { outline: 2px solid var(--accent); outline-offset: 2px; }


  .wordmark {
    font-size: clamp(3rem, 9vw, 5.2rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    user-select: none;
  }
  .wordmark .slashes {
    color: #fff;
    font-weight: 300;
    font-style: italic;
  }
  .wordmark .cursor {
    display: inline-block;
    width: 0.5ch;
    color: #fff;
    animation: blink 1.1s steps(1) infinite;
    font-weight: 300;
  }
  @keyframes blink { 50% { opacity: 0; } }

  /* ---------- search ---------- */
  .search-wrap {
    position: relative;
    width: min(520px, 90vw);
    z-index: 10;
  }
  .search {
    width: 100%;
    background: var(--bg-raise);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px 16px 14px 44px;
    color: var(--ink);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .search::placeholder { color: var(--ink-faint); }
  .search:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
  }
  .search-wrap svg.magnifier {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    stroke: var(--ink-dim);
    pointer-events: none;
  }

  .results {
    position: absolute;
    top: calc(100% + 8px);
    width: 100%;
    background: var(--bg-raise);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    z-index: 30;
    box-shadow: 0 16px 40px rgba(0,0,0,0.45);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  }
  .results:empty { box-shadow: none; border-color: transparent; background: none; }
  .results.show { opacity: 1; transform: none; pointer-events: auto; }
  .result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    cursor: pointer;
    font-size: 0.85rem;
  }
  .result:hover, .result.active { background: var(--accent-dim); }
  .result .tag {
    margin-left: auto;
    font-size: 0.68rem;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .result svg { width: 16px; height: 16px; stroke: var(--ink-dim); flex-shrink: 0; }
  .no-results {
    padding: 14px;
    font-size: 0.8rem;
    color: var(--ink-faint);
  }

  /* ---------- status line ---------- */
  .status {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.85rem;
    color: var(--ink-dim);
    user-select: none;
    position: relative;
    z-index: 1;
  }
  .status .sep { color: var(--ink-faint); }
  .status .chip { display: flex; align-items: center; gap: 7px; }

  .batt {
    width: 24px; height: 12px;
    border: 1.5px solid var(--ink-dim);
    border-radius: 3px;
    position: relative;
  }
  .batt::after { /* nub */
    content: "";
    position: absolute;
    right: -4.5px; top: 2.5px;
    width: 2.5px; height: 5px;
    background: var(--ink-dim);
    border-radius: 0 2px 2px 0;
  }
  .batt .fill {
    position: absolute;
    left: 1.5px; top: 1.5px; bottom: 1.5px;
    width: calc((100% - 3px) * var(--level, 1));
    background: var(--accent);
    border-radius: 1.5px;
    transition: width 0.4s;
  }
  .batt.low .fill { background: #f0846b; }

  /* ---------- chevron ---------- */
  .chev {
    position: fixed;
    right: 18px; top: 50%;
    transform: translateY(-50%);
    width: 40px; height: 64px;
    display: grid;
    place-items: center;
    background: var(--bg-raise);
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    z-index: 50;
    transition: right 0.55s var(--ease), border-color 0.2s, background 0.2s;
  }
  .chev:hover { border-color: var(--accent); }
  .chev:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .chev svg {
    width: 18px; height: 18px;
    stroke: var(--ink);
    transition: transform 0.55s var(--ease);
  }
  body.drawer-open .chev { right: calc(var(--drawer-w) + 34px); }
  body.drawer-open .chev svg { transform: rotate(180deg); }

  /* ---------- drawer ---------- */
  .drawer {
    position: fixed;
    top: 50%; right: 16px;
    width: var(--drawer-w);
    background: var(--bg-raise);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    transform: translate(calc(100% + 16px), -50%);
    transition: transform 0.55s var(--ease);
    z-index: 40;
    display: flex;
    flex-direction: column;
    padding: 18px;
    gap: 10px;
  }
  body.drawer-open .drawer { transform: translate(0, -50%); }

  .drawer h2 {
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--ink-faint);
    margin-bottom: 14px;
  }
  .drawer h2 .slashes { color: var(--accent); }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    background: none;
    color: var(--ink);
    font-family: inherit;
    font-size: 0.95rem;
    text-align: left;
    transition: background 0.18s, border-color 0.18s, transform 0.18s;
    /* staggered entrance */
    opacity: 0;
    transform: translateX(24px);
  }
  body.drawer-open .nav-item {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.4s var(--ease), transform 0.45s var(--ease),
                background 0.18s, border-color 0.18s;
  }
  body.drawer-open .nav-item:nth-child(2) { transition-delay: 0.10s, 0.10s, 0s, 0s; }
  body.drawer-open .nav-item:nth-child(3) { transition-delay: 0.17s, 0.17s, 0s, 0s; }
  body.drawer-open .nav-item:nth-child(4) { transition-delay: 0.24s, 0.24s, 0s, 0s; }
  body.drawer-open .nav-item:nth-child(5) { transition-delay: 0.31s, 0.31s, 0s, 0s; }

  .nav-item:hover { background: var(--accent-dim); border-color: var(--line); }
  .nav-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .nav-item svg { width: 26px; height: 26px; stroke: var(--accent); flex-shrink: 0; }
  .nav-item .sub {
    display: block;
    font-size: 0.7rem;
    color: var(--ink-faint);
    margin-top: 3px;
  }

  .drawer footer {
    margin-top: auto;
    font-size: 0.68rem;
    color: var(--ink-faint);
    letter-spacing: 0.05em;
  }

  @media (max-width: 560px) {
    :root { --drawer-w: 84vw; }
    body.drawer-open main { transform: translateX(-24vw); }
  }

  /* ---------- settings status text on cubes ---------- */
  .set-tile .status { font-size: 0.62rem; color: var(--accent); letter-spacing: 0.06em; text-align: center; }

  /* ---------- modal ---------- */
  .modal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: grid; place-items: center;
    padding: 24px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s var(--ease);
    z-index: 60;
  }
  .modal.open { opacity: 1; pointer-events: auto; }
  .modal-card {
    width: min(560px, 100%);
    max-height: 84vh;
    overflow-y: auto;
    background: var(--bg-raise);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 26px;
    transform: translateY(14px) scale(0.98);
    opacity: 0;
    transition: transform 0.35s var(--ease), opacity 0.3s var(--ease);
  }
  .modal.open .modal-card { transform: translateY(0) scale(1); opacity: 1; }
  .modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
  .modal-head svg { width: 22px; height: 22px; stroke: var(--accent); }
  .modal-head h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
  .modal-head .x {
    margin-left: auto; width: 32px; height: 32px; border-radius: 9px;
    background: var(--bg); border: 1px solid var(--line); color: var(--ink);
    font-family: inherit; display: grid; place-items: center; font-size: 1rem;
  }
  .modal-head .x:hover { border-color: var(--accent); }
  .panel { display: none; }
  .panel.active { display: block; }
  .panel p.hint { font-size: 0.78rem; color: var(--ink-dim); line-height: 1.55; margin-bottom: 16px; }
  .panel p.hint code {
    background: var(--bg); border: 1px solid var(--line); border-radius: 5px;
    padding: 1px 6px; color: var(--accent); font-size: 0.9em;
  }

  /* cloak list */
  .opt-list { display: flex; flex-direction: column; gap: 8px; }
  .opt {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg); border: 1px solid var(--line); border-radius: 11px;
    padding: 12px 14px; color: var(--ink); font-family: inherit; font-size: 0.88rem;
    text-align: left; transition: border-color 0.16s, background 0.16s;
  }
  .opt:hover { border-color: var(--accent); }
  .opt.sel { border-color: var(--accent); background: var(--accent-dim); }
  .opt .favi { width: 18px; height: 18px; border-radius: 4px; flex-shrink: 0; object-fit: contain; background: #fff2; }
  .opt .check { margin-left: auto; color: var(--accent); opacity: 0; }
  .opt.sel .check { opacity: 1; }

  /* key recorder */
  .combo-box {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg); border: 1px solid var(--line); border-radius: 11px;
    padding: 16px; margin-bottom: 14px;
  }
  .combo-keys { display: flex; gap: 6px; flex-wrap: wrap; }
  .kbd {
    background: var(--bg-raise); border: 1px solid var(--line); border-bottom-width: 2px;
    border-radius: 6px; padding: 4px 9px; font-size: 0.8rem; color: var(--ink);
  }
  .rec-btn {
    margin-left: auto; background: var(--accent-dim); border: 1px solid var(--accent);
    color: var(--accent); font-family: inherit; font-size: 0.78rem;
    padding: 8px 14px; border-radius: 9px; white-space: nowrap;
  }
  .rec-btn.recording { animation: pulse 1s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: 0.5; } }

  /* theme picker */
  .theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .theme-opt {
    border: 1px solid var(--line); border-radius: 13px; padding: 14px; background: var(--bg);
    text-align: left; font-family: inherit; color: var(--ink); transition: border-color 0.16s, transform 0.16s;
  }
  .theme-opt:hover { border-color: var(--accent); transform: translateY(-2px); }
  .theme-opt.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-dim); }
  .theme-name { font-size: 0.82rem; margin-bottom: 10px; text-transform: capitalize; }
  .theme-dots { display: flex; gap: 5px; }
  .theme-dots span { width: 15px; height: 15px; border-radius: 5px; border: 1px solid rgba(255,255,255,0.12); }

  /* about */
  .about-cat {
    display: block; width: 100%; max-width: 240px; height: auto;
    margin: 4px auto 20px;
  }
  .about-rows { display: flex; flex-direction: column; gap: 1px; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
  .credits-h {
    font-size: 0.66rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--ink-faint); margin: 20px 0 10px 4px;
  }
  .credits-note {
    text-align: center; font-size: 0.72rem; color: var(--ink-faint);
    margin-top: 16px; letter-spacing: 0.02em;
  }
  .credits-link {
    background: none; border: none; padding: 0; font: inherit;
    color: var(--accent); cursor: pointer;
  }
  .credits-link:hover { text-decoration: underline; }

  /* ---------- in-app browser ---------- */
  .browser {
    position: fixed; inset: 0; z-index: 70; background: var(--bg);
    display: flex; flex-direction: column;
    opacity: 0; visibility: hidden; transform: translateY(14px) scale(0.99);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s linear 0.3s;
  }
  .browser.show {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s;
  }

  /* tab strip */
  .browser-tabs {
    display: flex; align-items: flex-end; gap: 4px;
    background: var(--bg); padding: 7px 8px 0; overflow-x: auto;
    border-bottom: 1px solid var(--line);
  }
  .browser-tabs::-webkit-scrollbar { height: 0; }
  .br-tab {
    display: flex; align-items: center; gap: 8px; flex-shrink: 0;
    background: var(--bg-raise); border: 1px solid var(--line); border-bottom: none;
    border-radius: 10px 10px 0 0; padding: 8px 8px 8px 13px;
    font-size: 0.76rem; color: var(--ink-dim);
    max-width: 190px; min-width: 96px; cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
  }
  .br-tab:hover { color: var(--ink); }
  .br-tab.active { color: var(--ink); border-color: var(--accent); }
  .br-tab .t-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .br-tab .t-close {
    background: none; border: none; color: var(--ink-faint);
    font-size: 1.05rem; line-height: 1; padding: 0 3px; border-radius: 5px; flex-shrink: 0;
  }
  .br-tab .t-close:hover { color: var(--ink); background: var(--line); }
  .br-newtab {
    background: none; border: none; color: var(--ink-dim);
    font-size: 1.3rem; line-height: 1; width: 30px; height: 30px;
    border-radius: 8px; flex-shrink: 0; align-self: center; cursor: pointer;
  }
  .br-newtab:hover { background: var(--bg-raise); color: var(--accent); }

  .browser-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; background: var(--bg-raise); border-bottom: 1px solid var(--line);
  }
  .browser-bar button {
    width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; padding: 0;
    background: var(--bg); border: 1px solid var(--line); color: var(--ink);
    display: grid; place-items: center; cursor: pointer;
    transition: border-color 0.15s, opacity 0.15s;
  }
  .browser-bar button:hover:not(:disabled) { border-color: var(--accent); }
  .browser-bar button:disabled { opacity: 0.35; cursor: default; }
  .browser-bar button svg { width: 17px; height: 17px; stroke: var(--ink); fill: none; }
  .browser-url {
    flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line);
    border-radius: 999px; padding: 9px 16px; color: var(--ink);
    font-family: inherit; font-size: 0.85rem; outline: none;
  }
  .browser-url:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }

  /* frames — one per tab, only the active one visible */
  .browser-frames { flex: 1; position: relative; }
  .browser-frame {
    position: absolute; inset: 0; width: 100%; height: 100%;
    border: none; background: #fff; display: none;
  }
  .browser-frame.active { display: block; }
  .about-rows div { display: flex; justify-content: space-between; padding: 12px 15px; font-size: 0.82rem; background: var(--bg); }
  .about-rows div span:first-child { color: var(--ink-dim); }

  /* ---------- IXL teacher screen (recreation) ---------- */
  .ixl {
    position: fixed; inset: 0; z-index: 9999;
    background: #fff; color: #545454;
    font-family: Verdana, Geneva, Arial, sans-serif;
    display: flex; flex-direction: column;
    cursor: auto; overflow-y: auto;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.22s var(--ease), visibility 0s linear 0.22s;
  }
  .ixl.show {
    opacity: 1; visibility: visible; pointer-events: auto;
    transition: opacity 0.22s var(--ease), visibility 0s;
  }
  .ixl, .ixl * { cursor: auto !important; }

  /* ---------- shared fake-page cover ---------- */
  .cover {
    position: fixed; inset: 0; z-index: 9999; background: #fff; color: #202124;
    display: flex; flex-direction: column; overflow-y: auto;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.22s var(--ease), visibility 0s linear 0.22s;
  }
  .cover.show { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.22s var(--ease), visibility 0s; }
  .cover, .cover * { cursor: auto !important; box-sizing: border-box; }

  /* ---------- Google Docs ---------- */
  .cdocs { font-family: Arial, "Helvetica Neue", sans-serif; background: #fff; color: #202124; }
  .gd-head { padding: 8px 16px 0; }
  .gd-top { display: flex; align-items: center; gap: 12px; }
  .gd-doclogo { width: 25px; height: 32px; flex-shrink: 0; }
  .gd-titlecol { min-width: 0; }
  .gd-titlerow { display: flex; align-items: center; gap: 12px; }
  .gd-title { font-size: 18px; color: #3c4043; }
  .gd-titlerow svg { width: 18px; height: 18px; stroke: #5f6368; fill: none; }
  .gd-menu { display: flex; gap: 17px; font-size: 14px; color: #444; margin-top: 1px; }
  .gd-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
  .gd-actions .ico { color: #5f6368; display: flex; align-items: center; }
  .gd-actions .ico svg { width: 22px; height: 22px; stroke: #444746; fill: none; }
  .gd-share { background: #c2e7ff; color: #001d35; border-radius: 20px; padding: 9px 20px; font-size: 15px; display: flex; align-items: center; gap: 9px; }
  .gd-share svg { width: 17px; height: 17px; stroke: #001d35; fill: none; }
  .gd-avatar { width: 30px; height: 30px; border-radius: 50%; background: #d56c4e; color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 500; }
  .gd-toolbar { display: flex; align-items: center; margin: 8px 12px 0; padding: 4px 8px; background: #edf2fa; border-radius: 22px; font-size: 14px; color: #444; overflow: hidden; height: 40px; }
  .gd-toolbar .t-ico { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #444; flex-shrink: 0; }
  .gd-toolbar svg { width: 17px; height: 17px; stroke: #444; fill: none; }
  .gd-toolbar .div { width: 1px; height: 22px; background: #d3d7db; margin: 0 5px; flex-shrink: 0; }
  .gd-pill { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 4px; white-space: nowrap; }
  .gd-pill.style { width: 104px; } .gd-pill.font { width: 78px; }
  .gd-fs { display: flex; align-items: center; gap: 5px; }
  .gd-fs .box { border: 1px solid #c7ccd1; border-radius: 2px; min-width: 30px; text-align: center; padding: 3px 0; background: #fff; font-size: 13px; }
  .gd-toolbar b { font-weight: 700; } .gd-toolbar i { font-style: italic; } .gd-toolbar u { text-decoration: underline; }
  .gd-ab { display: grid; place-items: center; width: 26px; height: 26px; }
  .gd-edit { margin-left: auto; display: flex; align-items: center; gap: 12px; padding-left: 10px; }
  .gd-edit .pill { display: flex; align-items: center; gap: 7px; background: #d3e3fd; border-radius: 16px; padding: 5px 12px; font-size: 13px; color: #041e49; }
  .gd-edit .pill svg { stroke: #041e49; }
  .gd-body { flex: 1; display: flex; background: #f9fbfd; overflow: hidden; position: relative; }
  .gd-side { position: absolute; top: 0; left: 0; bottom: 0; width: 274px; flex-shrink: 0; padding: 16px 14px; }
  .gd-side .back svg { width: 22px; height: 22px; stroke: #444746; fill: none; }
  .gd-tabs-hd { display: flex; align-items: center; justify-content: space-between; color: #3c4043; font-size: 14px; margin: 24px 4px 12px; }
  .gd-tabs-hd .plus { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #444; }
  .gd-tab { display: flex; align-items: center; gap: 10px; background: #c2e7ff; border-radius: 10px; padding: 11px 12px; color: #001d35; font-size: 14px; }
  .gd-tab .num { margin-left: auto; color: #444; }
  .gd-note { color: #5f6368; font-size: 12px; font-style: italic; margin: 14px 12px; line-height: 1.4; }
  .gd-stage { flex: 1; overflow: hidden; display: flex; justify-content: center; padding: 40px 20px 0; }
  .gd-page { background: #fff; width: 816px; max-width: 100%; box-shadow: 0 1px 3px rgba(60,64,67,.3); padding: 60px 90px; }
  .gd-chips { display: flex; align-items: center; gap: 14px; }
  .gd-caret { display: inline-block; width: 2px; height: 21px; background: #202124; vertical-align: middle; margin-right: 6px; animation: blink 1.1s steps(1) infinite; }
  .gd-chip { display: inline-flex; align-items: center; gap: 9px; border: 1px solid #dadce0; border-radius: 8px; padding: 9px 15px; font-size: 13px; color: #3c4043; background: #fff; }
  .gd-chip svg { width: 16px; height: 16px; stroke: #1a73e8; fill: none; }

  /* ---------- Wikipedia ---------- */
  .cwiki { font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; color: #202122; background: #fff; font-size: 14px; }
  .wk-top { display: flex; align-items: center; gap: 18px; padding: 9px 18px; }
  .wk-burger { display: flex; flex-direction: column; gap: 3px; padding: 6px; }
  .wk-burger i { width: 16px; height: 2px; background: #54595d; display: block; }
  .wk-logo { display: flex; align-items: center; gap: 8px; }
  .wk-globe { width: 44px; height: 44px; flex-shrink: 0; display: block; }
  .wk-wm .t { font-family: "Linux Libertine", Georgia, serif; font-size: 17px; letter-spacing: 1px; }
  .wk-wm .s { font-size: 9px; color: #54595d; }
  .wk-search { flex: 1; max-width: 640px; display: flex; position: relative; }
  .wk-search .in { flex: 1; border: 1px solid #a2a9b1; border-right: none; border-radius: 2px 0 0 2px; padding: 8px 10px 8px 34px; color: #72777d; }
  .wk-search .mag { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; stroke: #54595d; fill: none; }
  .wk-search .btn { background: #f8f9fa; border: 1px solid #a2a9b1; border-radius: 0 2px 2px 0; padding: 8px 16px; color: #202122; }
  .wk-auth { margin-left: auto; display: flex; gap: 15px; color: #3366cc; font-size: 13px; }
  .wk-main { display: flex; padding: 0 22px; }
  .wk-toc { width: 210px; flex-shrink: 0; padding: 20px 16px 0 0; font-size: 13px; }
  .wk-toc .hd { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 12px; }
  .wk-toc .hd .tag { font-weight: 400; color: #3366cc; border: 1px solid #a2a9b1; border-radius: 2px; font-size: 11px; padding: 1px 6px; }
  .wk-toc a { display: block; color: #3366cc; padding: 4px 0; }
  .wk-toc a.top { color: #202122; font-weight: 500; }
  .wk-toc a .car { color: #72777d; margin-right: 4px; font-size: 10px; }
  .wk-art { flex: 1; min-width: 0; padding: 16px 26px; border-left: 1px solid #eaecf0; }
  .wk-langs { float: right; color: #3366cc; border: 1px solid #a2a9b1; border-radius: 2px; padding: 4px 10px; font-size: 12px; display: inline-flex; gap: 5px; align-items: center; }
  .wk-h1 { font-family: "Linux Libertine", Georgia, serif; font-weight: 400; font-size: 28px; }
  .wk-tabs { display: flex; align-items: flex-end; border-bottom: 1px solid #a2a9b1; margin: 12px 0; font-size: 13px; }
  .wk-tabs .l, .wk-tabs .r { display: flex; gap: 16px; } .wk-tabs .r { margin-left: auto; color: #3366cc; }
  .wk-tabs .sel { border-bottom: 2px solid #202122; padding-bottom: 8px; margin-bottom: -1px; }
  .wk-tabs a { color: #3366cc; }
  .wk-sub { color: #54595d; font-size: 13px; margin: 6px 0; }
  .wk-dis { font-style: italic; margin-bottom: 12px; color: #202122; }
  .wk-dis a { color: #3366cc; }
  .wk-art p { line-height: 1.62; margin-bottom: 12px; }
  .wk-art a { color: #3366cc; text-decoration: none; }
  .wk-art h2 { font-family: "Linux Libertine", Georgia, serif; font-weight: 400; font-size: 21px; border-bottom: 1px solid #a2a9b1; margin: 20px 0 10px; padding-bottom: 5px; }
  .wk-fig { float: right; width: 300px; margin: 4px 0 14px 20px; border: 1px solid #c8ccd1; background: #f8f9fa; padding: 3px; font-size: 12px; color: #54595d; }
  .wk-fig .cap { padding: 6px 4px 2px; line-height: 1.4; }
  .wk-diagram { height: 200px; background: linear-gradient(180deg,#dfeefb 55%,#e7d8c3 55%); position: relative; overflow: hidden; }
  .wk-diagram .sun { position: absolute; top: 8px; left: 8px; width: 40px; height: 40px; border-radius: 50%; background: #ffd23f; }
  .wk-diagram .stem { position: absolute; left: 50%; bottom: 0; width: 4px; height: 90px; background: #4a8c3f; transform: translateX(-50%); }
  .wk-diagram .leaf { position: absolute; left: 50%; bottom: 60px; width: 40px; height: 24px; background: #5aa84f; border-radius: 0 50% 0 50%; }
  .wk-diagram .flower { position: absolute; left: 50%; bottom: 84px; width: 34px; height: 34px; border-radius: 50%; background: #ffb800; transform: translateX(-50%); box-shadow: 0 0 0 6px #ffd23f; }
  .wk-app { width: 190px; flex-shrink: 0; padding: 20px 0 0 20px; font-size: 13px; }
  .wk-app .hd { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 16px; }
  .wk-app .hd .tag { font-weight: 400; color: #3366cc; border: 1px solid #a2a9b1; border-radius: 2px; font-size: 11px; padding: 1px 6px; }
  .wk-app .grp { margin-bottom: 18px; }
  .wk-app .lbl { color: #54595d; margin-bottom: 8px; }
  .wk-app .opt {
    display: flex; align-items: center; gap: 9px; padding: 5px 0;
    background: none; border: none; border-radius: 0;
    color: #202122; font-family: inherit; font-size: 13px; text-align: left;
  }
  .wk-app .opt:hover { background: none; }
  .wk-app .radio { width: 15px; height: 15px; border: 1px solid #72777d; border-radius: 50%; flex-shrink: 0; }
  .wk-app .radio.on { border: 4px solid #3366cc; }
  .ixl * { box-sizing: border-box; }

  /* top green bar */
  .ixl-top { background: #52b700; }
  .ixl-top-row {
    display: flex; align-items: center; gap: 18px;
    max-width: 1200px; margin: 0 auto; padding: 12px 20px 0;
  }
  .ixl-logo {
    background: #fff; border-radius: 7px; padding: 6px 10px;
    flex-shrink: 0; display: flex; align-items: center;
  }
  .ixl-logo img { height: 26px; display: block; }
  .ixl-search {
    flex: 1; max-width: 460px; margin: 0 auto; position: relative;
    background: #fff; border-radius: 43px; height: 37px;
    display: flex; align-items: center;
  }
  .ixl-search .mag {
    width: 37px; height: 37px; border-radius: 50%; background: #84d839;
    display: grid; place-items: center; flex-shrink: 0;
  }
  .ixl-search .mag svg { width: 18px; height: 18px; stroke: #fff; }
  .ixl-search input {
    border: none; outline: none; flex: 1; font: 14px Arial, sans-serif;
    color: #3f3f3f; padding: 0 10px; background: none;
  }
  .ixl-search .go {
    border: none; background: none; color: #b7b7b7; font-size: 22px;
    padding: 0 14px 0 8px; cursor: default; border-left: 1px solid #e2e2e2; height: 60%;
  }
  .ixl-auth { display: flex; gap: 10px; flex-shrink: 0; }
  .ixl-btn {
    border: none; border-radius: 5px; height: 35px; padding: 0 15px;
    font: 600 15px "Open Sans", Arial, sans-serif; display: inline-flex;
    align-items: center; gap: 6px; cursor: default;
  }
  .ixl-signin { background: #0193c9; color: #fff; font-weight: 400; }
  .ixl-membership { background: linear-gradient(88.52deg,#e1ffbb 33.8%,#63efd6 205.86%); color: #0289bb; }
  .ixl-tabs {
    display: flex; justify-content: center; gap: 34px;
    max-width: 1200px; margin: 0 auto; padding: 8px 20px 0;
  }
  .ixl-tabs a {
    color: #fff; text-decoration: none; font: 300 22px/2.4 "Roboto Slab", Georgia, serif;
    opacity: 0.92; position: relative;
  }
  .ixl-tabs a.on { opacity: 1; }
  .ixl-tabs a.on::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0;
    border-bottom: 3px solid #fff;
  }

  /* subject nav (white) */
  .ixl-subjects {
    display: flex; justify-content: center; gap: 30px;
    background: #fff; padding: 10px 20px; border-bottom: 1px solid #eee;
    flex-wrap: wrap;
  }
  .ixl-subj {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    color: #6b7a86; font: 13px Verdana, sans-serif; text-decoration: none;
    padding-bottom: 4px; min-width: 60px;
  }
  .ixl-subj svg { width: 24px; height: 24px; stroke: #8a97a1; fill: none; }
  .ixl-subj.on { color: #00adef; box-shadow: inset 0 -3px #00adef; }
  .ixl-subj.on svg { stroke: #00adef; }

  /* breadcrumb */
  .ixl-crumb {
    background: #f4f8fa; font: 12px/19px Verdana, sans-serif; color: #666;
    padding: 10px 0;
  }
  .ixl-crumb .in { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
  .ixl-crumb .lk { color: #00afef; text-decoration: none; }
  .ixl-crumb .sep { color: #bcbcbc; font-size: 9px; padding: 0 6px; }
  .ixl-crumb .code { color: #138808; font-weight: bold; }
  .ixl-crumb .unc { color: #9aa6ad; margin-left: 6px; }

  /* stage */
  .ixl-stage {
    flex: 1;
    background: linear-gradient(180deg,#bfeafb 0%,#dff4ec 62%,#eef9f1 100%);
    padding: 26px 20px 50px;
  }
  .ixl-card {
    max-width: 1140px; margin: 0 auto; background: #fff; border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08); display: flex; overflow: hidden;
  }
  .ixl-main { flex: 1; padding: 28px 40px 40px; min-width: 0; }
  .ixl-example {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    color: #00adef; font: 15px Verdana, sans-serif; padding-bottom: 20px;
    border-bottom: 1px solid #eef1f3; margin-bottom: 26px;
  }
  .ixl-example a { color: #00adef; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; }
  .ixl-example .dot { width: 22px; height: 22px; border-radius: 50%; background: #00adef; display: grid; place-items: center; }
  .ixl-example .dot svg { width: 13px; height: 13px; stroke: #fff; fill: #fff; }
  .ixl-example .or { color: #9aa6ad; }
  .ixl-question { font: 18px/1.5 Verdana, sans-serif; color: #333; margin-bottom: 26px; }
  .ixl-question sup { font-size: 0.7em; vertical-align: 0.4em; }
  .ixl-choices { display: flex; gap: 18px; margin-bottom: 30px; }
  .ixl-choice {
    background: #fff; border: 1px solid #bfe3f2; border-radius: 4px;
    padding: 14px 34px; font: 15px Verdana, sans-serif; color: #545454; cursor: default;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  }
  .ixl-submit {
    background: #5bbf00; color: #fff; border: none; border-radius: 5px;
    padding: 11px 30px; font: 600 16px "Open Sans", Arial, sans-serif; cursor: default;
  }
  .ixl-workout { text-align: center; margin-top: 46px; }
  .ixl-workout h4 { color: #00adef; font: 700 18px Verdana, sans-serif; margin-bottom: 4px; }
  .ixl-workout p { color: #6b7a86; font: 13px Verdana, sans-serif; margin-bottom: 16px; }
  .ixl-help { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .ixl-help div {
    display: flex; align-items: center; gap: 10px; text-align: left;
    background: #f7fcff; border-radius: 8px; padding: 14px 16px;
    color: #1f9ac7; font: 13px Verdana, sans-serif;
  }
  .ixl-help div.lesson { background: #f4f2fb; color: #6a5ea8; }
  .ixl-help .gem { width: 22px; height: 18px; flex-shrink: 0; }

  /* stats sidebar */
  .ixl-stats { width: 118px; padding: 22px 14px; flex-shrink: 0; }
  .ixl-stat { margin-bottom: 4px; text-align: center; }
  .ixl-stat-hd { color: #fff; font: 700 11px Verdana, sans-serif; padding: 7px 4px; line-height: 1.2; }
  .ixl-stat-hd.green  { background: #6cbf1e; border-radius: 4px 4px 0 0; }
  .ixl-stat-hd.blue   { background: #0193c9; }
  .ixl-stat-hd.orange { background: #e8631e; }
  .ixl-stat-hd .q { opacity: 0.85; font-weight: 400; }
  .ixl-stat-val {
    background: #f3f3f3; color: #4a4a4a; font: 800 30px Verdana, sans-serif;
    padding: 12px 0; border-radius: 0 0 4px 4px; margin-bottom: 14px;
  }
  .ixl-time { display: flex; gap: 4px; justify-content: center; padding: 10px 0 4px; margin-bottom: 14px; }
  .ixl-time div { text-align: center; }
  .ixl-time b { display: block; border: 1px solid #e2e2e2; border-radius: 3px; padding: 4px 6px; font: 400 13px Verdana; color: #e8631e; }
  .ixl-time small { font-size: 8px; color: #9aa6ad; }
  .ixl-teacher { display: block; text-align: center; color: #0193c9; font: 12px Verdana; text-decoration: none; margin-top: 6px; }
  .ixl-pencil { text-align: center; margin-top: 14px; font-size: 20px; }

  .ixl-hint {
    position: fixed; bottom: 0; left: 0; right: 0;
    font: 11px Verdana, sans-serif; color: rgba(0,0,0,0.35);
    text-align: center; padding: 8px; background: rgba(255,255,255,0.7);
  }