    :root {
      /* Core palette – warm navy + vibrant amber accent */
      --bg:        #0e1523;
      --surface:   #162035;
      --surface2:  #1c2a45;
      --surface3:  #243354;
      --border:    rgba(255,255,255,.09);
      --border2:   rgba(255,255,255,.15);

      --text:      #eef1fa;
      --text2:     #b0bcd8;
      --text3:     #7888aa;

      --accent:    #f5a623;       /* warm amber */
      --accent2:   #ffc656;
      --accentBg:  rgba(245,166,35,.13);
      --accentGlow:rgba(245,166,35,.28);

      --ok:        #3ecf74;
      --okBg:      rgba(62,207,116,.12);
      --okGlow:    rgba(62,207,116,.25);

      --danger:    #f55252;
      --dangerBg:  rgba(245,82,82,.12);

      --info:      #5ba4f5;
      --infoBg:    rgba(91,164,245,.12);

      --shadow:    0 8px 32px rgba(0,0,0,.45);
      --shadow2:   0 20px 60px rgba(0,0,0,.55);
      --radius:    20px;
      --radius2:   28px;
      --radiusSm:  12px;

      --touch:     64px;          /* minimum tap target */
      --touchSm:   54px;
      --headerH:   88px;
      --gap:       18px;
      --pageMax:   clamp(1100px, 94vw, 1800px);

      font-synthesis-weight: none;
    }

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

    html, body {
      height: auto;
      min-height: 100%;
    }

    body {
      background:
        radial-gradient(ellipse 120% 60% at 10% -5%, rgba(91,164,245,.10) 0%, transparent 55%),
        radial-gradient(ellipse 80% 50% at 90% 80%, rgba(245,166,35,.07) 0%, transparent 50%),
        var(--bg);
      color: var(--text);
      font: 18px/1.4 'Nunito', system-ui, sans-serif;
      overflow: auto;
      overscroll-behavior: none;
      touch-action: pan-y;
      -ms-touch-action: pan-y;
      user-select: none;
      -webkit-tap-highlight-color: transparent;
    }

    .app { min-height: 100vh; display: block; }

    /* ============================================================
       TOPBAR
    ============================================================ */
    .topbar {
      position: sticky;
      top: 0;
      z-index: 50;
      background: rgba(14,21,35,.92);
      border-bottom: 1px solid var(--border2);
      box-shadow: 0 4px 24px rgba(0,0,0,.3);
    }
    .topbarInner {
      max-width: var(--pageMax);
      margin: 0 auto;
      min-height: var(--headerH);
      padding: 12px 24px;
      display: flex;
      align-items: center;
      gap: 18px;
    }
    .logo {
      height: 64px;
      width: auto;
      display: block;
      border-radius: 10px;
      flex: 0 0 auto;
    }
    .titlewrap {
      flex: 1;
      min-width: 0;
    }
    .title {
      font-size: 22px;
      font-weight: 900;
      letter-spacing: -.2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      color: var(--text);
    }
    .title-sub {
      font-size: 13px;
      color: var(--text3);
      font-weight: 600;
      margin-top: 2px;
    }

    /* Status pill */
    .statusArea {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      flex: 0 0 auto;
    }
    .clock {
      font-size: 28px;
      font-weight: 900;
      color: var(--text);
      letter-spacing: 1px;
      font-variant-numeric: tabular-nums;
      min-width: 80px;
      text-align: right;
    }

    /* Station pill */
    .pill {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 16px;
      border-radius: 999px;
      border: 1px solid var(--border2);
      background: var(--surface);
      box-shadow: var(--shadow);
      min-width: 0;
    }
    .pill.ok { border-color: rgba(62,207,116,.35); background: rgba(22,32,53,.85); }
    .dot {
      width: 12px; height: 12px;
      border-radius: 999px;
      background: var(--danger);
      box-shadow: 0 0 0 4px rgba(245,82,82,.2);
      flex: 0 0 auto;
      animation: pulseDanger 2s ease-in-out infinite;
    }
    .pill.ok .dot {
      background: var(--ok);
      box-shadow: 0 0 0 4px rgba(62,207,116,.2);
      animation: pulseOk 2s ease-in-out infinite;
    }
    @keyframes pulseDanger {
      0%,100% { box-shadow: 0 0 0 4px rgba(245,82,82,.2); }
      50%      { box-shadow: 0 0 0 8px rgba(245,82,82,.05); }
    }
    @keyframes pulseOk {
      0%,100% { box-shadow: 0 0 0 4px rgba(62,207,116,.2); }
      50%      { box-shadow: 0 0 0 8px rgba(62,207,116,.05); }
    }
    .pill .txt { display: flex; flex-direction: column; line-height: 1.15; gap: 1px; }
    .pill .txt b  { font-size: 14px; font-weight: 800; }
    .pill .txt span { color: var(--text2); font-size: 12px; font-weight: 600; }

    /* USB Actions in topbar */
    .usbActions {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    /* Admin & restart buttons small */
    .iconBtn {
      width: var(--touchSm);
      height: var(--touchSm);
      padding: 0;
      border-radius: 999px;
      border: 1px solid var(--border2);
      background: var(--surface2);
      color: var(--text);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      box-shadow: var(--shadow);
      user-select: none;
      font-size: 18px;
    }
    .iconBtn:active { transform: scale(.95); }
    .iconBtn[disabled] { opacity: .45; cursor: not-allowed; }
    .iconBtn svg { width: 22px; height: 22px; }
    .iconBtn.spinning svg { animation: spin 0.9s linear infinite; }

    /* ============================================================
       MAIN AREA
    ============================================================ */
    .main {
      padding: 22px 24px 36px;
      max-width: var(--pageMax);
      margin: 0 auto;
      overflow: visible;
      touch-action: pan-y;
    }

    .screen { display: none; min-height: 100%; }
    .screen.active { display: block; }

    /* ============================================================
       CARDS
    ============================================================ */
    .card {
      background: var(--surface);
      border: 1px solid var(--border2);
      border-radius: var(--radius2);
      box-shadow: var(--shadow2);
      padding: 28px;
    }

    /* ============================================================
       BUTTONS  – big, obvious, easy to tap
    ============================================================ */
    .btn {
      height: var(--touch);
      padding: 0 28px;
      border-radius: 999px;
      border: 1.5px solid var(--border2);
      background: var(--surface2);
      color: var(--text);
      font: 700 17px/1 'Nunito', sans-serif;
      letter-spacing: .2px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      box-shadow: 0 4px 18px rgba(0,0,0,.3);
      user-select: none;
      white-space: nowrap;
    }
    .btn:active    { transform: scale(.97); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
    .btn.secondary { background: var(--surface3); border-color: var(--border); }
    .btn.accent    { background: var(--accent); border-color: var(--accent2); color: #0e1523; font-weight: 900; box-shadow: 0 4px 22px var(--accentGlow); }
    .btn.accent:active { background: var(--accent2); }
    .btn.ok        { background: var(--okBg); border-color: rgba(62,207,116,.45); color: var(--ok); font-weight: 800; box-shadow: 0 4px 18px var(--okGlow); }
    .btn.danger    { background: var(--dangerBg); border-color: rgba(245,82,82,.4); color: var(--danger); }
    .btn[disabled] { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none; }

    /* ============================================================
       START SCREEN – large category tiles
    ============================================================ */
    .startGrid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 20px;
      margin-top: 8px;
    }
    @media (min-width: 1200px) {
      .startGrid { grid-template-columns: repeat(3, 1fr); }
    }

    .bigChoice {
      min-height: 210px;
      border-radius: var(--radius2);
      border: 2px solid var(--border2);
      background: linear-gradient(145deg, var(--surface2) 0%, var(--surface) 100%);
      box-shadow: var(--shadow2);
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 14px;
      cursor: pointer;
      position: relative;
      overflow: hidden;
    }
    .bigChoice::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(135deg, rgba(245,166,35,.06) 0%, transparent 60%);
      opacity: 0;
    }
    .bigChoice:hover::before, .bigChoice:active::before { opacity: 1; }
    .bigChoice:active {
      transform: scale(.97);
      box-shadow: 0 4px 16px rgba(0,0,0,.35);
    }
    .bigChoice:hover {
      border-color: var(--accent);
      box-shadow: 0 12px 40px rgba(245,166,35,.18), var(--shadow2);
    }
    .bigChoice.disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }
    .bigChoice .icon {
      width: 72px; height: 72px;
      border-radius: 999px;
      background: var(--accentBg);
      border: 2px solid var(--border2);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 32px;
    }
    .bigChoice .label {
      font-size: 26px;
      font-weight: 900;
      letter-spacing: -.3px;
      text-align: center;
    }
    .bigChoice .hint {
      color: var(--text2);
      font-size: 15px;
      font-weight: 600;
      text-align: center;
      padding: 0 14px;
    }

    /* ============================================================
       SCREEN HEADERS / BREADCRUMBS
    ============================================================ */
    .screenHeader {
      display: flex;
      align-items: center;
      gap: 14px;
      flex-wrap: wrap;
      margin-bottom: 22px;
      padding-bottom: 18px;
      border-bottom: 1px solid var(--border);
    }
    .screenHeader .backBtn,
    .actionBar .backBtn {
      height: 56px;
      padding: 0 22px;
      border-radius: 999px;
      border: 2px solid var(--border2);
      background: var(--surface2);
      color: var(--text);
      font: 800 16px 'Nunito', sans-serif;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      box-shadow: var(--shadow);
      white-space: nowrap;
    }
    .screenHeader .backBtn:active,
    .actionBar .backBtn:active { transform: scale(.96); }
    .screenHeader h1 {
      font-size: 26px;
      font-weight: 900;
      letter-spacing: -.3px;
      flex: 1;
    }
    .screenHeader .hint {
      color: var(--text2);
      font-size: 15px;
      font-weight: 600;
    }

    /* Chip / badge */
    .chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 8px 14px;
      border-radius: 999px;
      background: var(--surface3);
      border: 1px solid var(--border);
      color: var(--text2);
      font-size: 14px;
      font-weight: 700;
      white-space: nowrap;
    }
    .chip.accent { background: var(--accentBg); border-color: rgba(245,166,35,.35); color: var(--accent); }
    .chip.ok     { background: var(--okBg); border-color: rgba(62,207,116,.35); color: var(--ok); }

    /* ============================================================
       CALENDAR
    ============================================================ */
    .calControls {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      margin-bottom: 20px;
    }
    .calendar {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 6px;
    }
    .calDow {
      text-align: center;
      font-size: 13px;
      font-weight: 800;
      color: var(--text3);
      padding: 6px 0;
      text-transform: uppercase;
      letter-spacing: .5px;
    }
    .calDay {
      aspect-ratio: 1;
      border-radius: var(--radiusSm);
      border: 1.5px solid var(--border);
      background: var(--surface2);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      gap: 4px;
      min-height: 72px;
    }
    .calDay:active { transform: scale(.95); }
    .calDay:hover  { border-color: var(--accent); background: var(--accentBg); }
    .calDay.empty  { background: transparent; border-color: transparent; cursor: default; pointer-events: none; }
    .calDay.today  { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accentGlow); }
    .calDay.hasData { border-color: rgba(91,164,245,.4); }
    .calDay.hasData:hover { border-color: var(--accent); }
    .calDay .dayNum {
      font-size: 22px;
      font-weight: 800;
    }
    .calDay .dayBadge {
      font-size: 11px;
      font-weight: 700;
      color: var(--info);
      background: var(--infoBg);
      padding: 2px 7px;
      border-radius: 999px;
    }

    select, input[type="text"] {
      height: var(--touchSm);
      border-radius: 14px;
      border: 1.5px solid var(--border2);
      background: var(--surface2);
      color: var(--text);
      padding: 0 16px;
      font: 700 16px 'Nunito', sans-serif;
      outline: none;
      transition: border-color .15s;
    }
    select:focus, input[type="text"]:focus { border-color: var(--accent); }

    /* ============================================================
       LISTS
    ============================================================ */
    .list {
      display: flex;
      flex-direction: column;
      gap: 8px;
      touch-action: pan-y;
    }
    .listItem {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 16px 18px;
      border-radius: var(--radius);
      border: 1.5px solid var(--border);
      background: var(--surface2);
      cursor: pointer;
      min-height: 68px;
    }
    .listItem:hover   { border-color: var(--border2); background: var(--surface3); }
    .listItem:active  { transform: scale(.99); }
    .listItem.selected {
      border-color: var(--accent);
      background: var(--accentBg);
    }
    .listItem .liIcon {
      width: 42px; height: 42px;
      border-radius: 12px;
      background: var(--surface3);
      border: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      flex: 0 0 auto;
    }
    .listItem.selected .liIcon { background: var(--accentBg); border-color: rgba(245,166,35,.4); }
    .listItem .liMain { flex: 1; min-width: 0; }
    .listItem .liName {
      font-size: 17px;
      font-weight: 800;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .listItem .liSub {
      font-size: 13px;
      color: var(--text2);
      font-weight: 600;
      margin-top: 2px;
    }
    .listItem .liCheck {
      width: 32px; height: 32px;
      border-radius: 10px;
      border: 2px solid var(--border2);
      background: var(--surface);
      display: flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
      font-size: 18px;
      color: var(--accent);
      transition: border-color .12s, background .12s;
    }
    .listItem.selected .liCheck {
      border-color: var(--accent);
      background: var(--accentBg);
    }

    /* Variants list */
    .variantItem {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 22px 22px;
      border-radius: var(--radius2);
      border: 2px solid var(--border);
      background: var(--surface2);
      cursor: pointer;
      min-height: 90px;
    }
    .variantItem:active { transform: scale(.99); }
    .variantItem.selected {
      border-color: var(--accent);
      background: var(--accentBg);
      box-shadow: 0 0 0 3px var(--accentGlow);
    }
    .variantItem .vLabel { font-size: 22px; font-weight: 900; flex: 1; }
    .variantItem .vSub   { font-size: 14px; color: var(--text2); font-weight: 600; margin-top: 4px; }
    .variantItem .vCheck {
      width: 40px; height: 40px;
      border-radius: 12px;
      border: 2px solid var(--border2);
      background: var(--surface3);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 22px;
      color: var(--accent);
      transition: all .12s;
    }
    .variantItem.selected .vCheck {
      border-color: var(--accent);
      background: var(--accentBg);
    }

    /* ============================================================
       FILES SCREEN – two-column layout
    ============================================================ */
    .filesLayout {
      display: grid;
      grid-template-columns: 340px 1fr;
      gap: 18px;
      align-items: flex-start;
    }
    @media (max-width: 1000px) {
      .filesLayout { grid-template-columns: 1fr; }
    }

    .actionBar {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-bottom: 18px;
    }
    .actionBar .row1 {
      display: flex;
      align-items: center;
      gap: 14px;
      flex-wrap: wrap;
      padding-bottom: 18px;
      border-bottom: 1px solid var(--border);
      margin-bottom: 4px;
    }
    .actionBar .row2 {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      padding: 12px 16px;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: var(--radius);
    }
    /* hide search row in file screen per original behavior */
    #screenFiles #search,
    #screenFiles #searchKbd,
    #screenFiles #clearSearch { display: none !important; }

    /* Cart / selection panel */
    .cartPanel {
      background: var(--surface);
      border: 1.5px solid var(--border2);
      border-radius: var(--radius2);
      box-shadow: var(--shadow2);
      padding: 22px;
      position: sticky;
      top: calc(var(--headerH) + 22px);
    }
    .cartTitle {
      font-size: 18px;
      font-weight: 900;
      margin-bottom: 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .cartEmptyHint {
      color: var(--text3);
      font-size: 14px;
      font-weight: 600;
      padding: 12px 0;
    }
    .cartActions {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-top: 14px;
    }
    .cartActions .btn {
      width: 100%;
      justify-content: center;
    }
    .cartList {
      max-height: 420px;
      overflow: auto;
      touch-action: pan-y;
    }

    /* ============================================================
       COPYING SCREEN – big, animated, reassuring
    ============================================================ */
    .copyingScreen {
      max-width: 700px;
      margin: 0 auto;
    }
    .copyStatusBig {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 24px;
      padding: 40px 28px;
      text-align: center;
    }
    .copyAnimIcon {
      width: 120px; height: 120px;
      border-radius: 999px;
      background: var(--accentBg);
      border: 3px solid var(--accentGlow);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 56px;
      position: relative;
    }
    .copyAnimIcon.running::after {
      content: '';
      position: absolute;
      inset: -6px;
      border-radius: 999px;
      border: 3px solid transparent;
      border-top-color: var(--accent);
      animation: spin 1s linear infinite;
    }
    .copyAnimIcon.done {
      background: var(--okBg);
      border-color: var(--okGlow);
    }
    .copyAnimIcon.error {
      background: var(--dangerBg);
      border-color: rgba(245,82,82,.3);
    }
    .copyStatusTitle {
      font-size: 32px;
      font-weight: 900;
      letter-spacing: -.5px;
    }
    .copyStatusMsg {
      font-size: 20px;
      font-weight: 700;
      color: var(--text2);
      min-height: 28px;
    }

    /* Progress bar */
    .progressBox {
      width: 100%;
      background: var(--surface2);
      border: 1.5px solid var(--border2);
      border-radius: var(--radius2);
      padding: 22px 24px;
    }
    .progressHeader {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 14px;
    }
    .progressLabel {
      font-size: 16px;
      font-weight: 800;
      color: var(--text2);
    }
    .progressPct {
      font-size: 36px;
      font-weight: 900;
      color: var(--accent);
      font-variant-numeric: tabular-nums;
    }
    .progressTrack {
      height: 18px;
      border-radius: 999px;
      background: var(--surface3);
      overflow: hidden;
      border: 1px solid var(--border);
    }
    #progBar {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, var(--accent), var(--accent2));
      border-radius: 999px;
      transition: width .4s ease;
      position: relative;
    }
    #progBar.running::after {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.25) 50%, transparent 100%);
      animation: shimmer 1.5s ease-in-out infinite;
    }
    @keyframes shimmer {
      0%   { transform: translateX(-100%); }
      100% { transform: translateX(200%); }
    }
    .progressExtra {
      margin-top: 10px;
      font-size: 14px;
      font-weight: 700;
      color: var(--text3);
      display: none;
      text-align: center;
    }
    .progressMsg {
      margin-top: 10px;
      font-size: 15px;
      font-weight: 700;
      color: var(--text2);
      display: none;
    }

    /* USB list during copying */
    .usbChoiceWrap {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin: 14px 0;
    }
    .usbChoice {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 18px 20px;
      border-radius: var(--radius);
      border: 2px solid var(--border2);
      background: var(--surface2);
      cursor: pointer;
      transition: all .12s;
      font-weight: 800;
      font-size: 17px;
    }
    .usbChoice:hover  { border-color: var(--accent); background: var(--accentBg); }
    .usbChoice:active { transform: scale(.98); }

    /* Copying action row */
    .copyActions {
      display: flex;
      gap: 12px;
      justify-content: center;
      flex-wrap: wrap;
      margin-top: 24px;
    }

    /* ============================================================
       SUMMARY SCREEN
    ============================================================ */
    .summaryBox {
      background: var(--surface2);
      border: 1.5px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
    }
    .summaryBox .gtitle {
      padding: 14px 18px;
      font-size: 16px;
      font-weight: 900;
      background: var(--surface3);
      border-bottom: 1px solid var(--border);
      color: var(--text);
    }
    .summaryBox .line {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 18px;
      border-bottom: 1px solid var(--border);
      font-size: 14px;
      font-weight: 700;
    }
    .summaryBox .line:last-child { border-bottom: none; }
    .summaryBox .line .fn { color: var(--text2); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .summaryBox .line .fs { color: var(--text3); flex: 0 0 auto; margin-left: 12px; }

    /* ============================================================
       STATUS BOX / HINT BOX
    ============================================================ */
    .hintbox {
      padding: 16px 18px;
      border-radius: var(--radius);
      border: 1.5px solid var(--border);
      background: var(--surface2);
      color: var(--text2);
      font-size: 15px;
      font-weight: 700;
      max-width: 980px;
    }
    .hintbox.warn { border-color: rgba(245,166,35,.4); background: var(--accentBg); color: var(--accent); }
    .hintbox.err  { border-color: rgba(245,82,82,.4); background: var(--dangerBg); color: var(--danger); }
    .hintbox.ok   { border-color: rgba(62,207,116,.4); background: var(--okBg); color: var(--ok); }

    /* ============================================================
       PHOTO GRID
    ============================================================ */
    .photoGrid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 12px;
      touch-action: pan-y;
    }
    .photoThumb {
      aspect-ratio: 1;
      border-radius: 14px;
      border: 2px solid var(--border);
      overflow: hidden;
      cursor: pointer;
      position: relative;
      background: var(--surface2);
    }
    .photoThumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .photoThumb.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accentGlow); }
    .photoThumb:active { transform: scale(.97); }
    .photoThumb .selOverlay {
      position: absolute; top: 8px; right: 8px;
      width: 30px; height: 30px;
      border-radius: 8px;
      background: var(--accentBg);
      border: 2px solid var(--accent);
      display: none;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      color: var(--accent);
    }
    .photoThumb.selected .selOverlay { display: flex; }

    /* ============================================================
       PLAYER BAR
    ============================================================ */
    .playerbar {
      display: none;
      background: var(--surface);
      border: 1.5px solid var(--border2);
      border-radius: var(--radius2);
      padding: 14px 18px;
      margin-bottom: 18px;
      box-shadow: var(--shadow2);
    }
    .playerbar.on { display: block; }
    .playerbar.active { display: block; }  /* backwards compat */
    .playerrow {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: nowrap;
    }
    .pbtn {
      height: var(--touchSm);
      min-width: var(--touchSm);
      padding: 0 14px;
      border-radius: 999px;
      border: 1.5px solid var(--border2);
      background: var(--surface2);
      color: var(--text);
      font: 700 14px 'Nunito', sans-serif;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      flex-shrink: 0;
    }
    .pbtn:active { transform: scale(.95); }
    .pbtn.danger { background: var(--dangerBg); border-color: rgba(245,82,82,.4); color: var(--danger); }
    .pbtn.secondary { background: var(--surface3); }
    .time { font-size: 15px; font-weight: 800; color: var(--text2); white-space: nowrap; font-variant-numeric: tabular-nums; flex-shrink: 0; }
    #pSeek { flex: 1; min-width: 100px; accent-color: var(--accent); cursor: pointer; }
    .volbox { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
    .vol    { width: 90px; accent-color: var(--accent); cursor: pointer; }
    .fn     { font-size: 13px; color: var(--text2); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    /* ============================================================
       MODAL
    ============================================================ */
    .modal {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.80);
      z-index: 1000;
      align-items: center;
      justify-content: center;
    }
    .modal.on { display: flex; }
    .modalCard {
      background: var(--surface);
      border: 1.5px solid var(--border2);
      border-radius: var(--radius2);
      box-shadow: var(--shadow2);
      padding: 32px;
      max-width: 520px;
      width: 90%;
    }
    .modalCard h2 { font-size: 26px; font-weight: 900; margin-bottom: 12px; }
    .modalCard p  { font-size: 17px; font-weight: 600; color: var(--text2); margin-bottom: 18px; }

    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.4; }
    }

    /* Photo grid performance */
    .photoTile img {
      image-rendering: auto;
      will-change: auto;
    }
    .pvImg {
      image-rendering: auto;
    }

    /* ============================================================
       PIN MODAL
    ============================================================ */
    .pinModal {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.82);
      z-index: 700;
      align-items: center;
      justify-content: center;
    }
    .pinModal.on { display: flex; }
    .pinCard {
      background: var(--surface);
      border: 1.5px solid var(--border2);
      border-radius: var(--radius2);
      box-shadow: var(--shadow2);
      padding: 36px 28px;
      max-width: 560px;
      width: 95%;
      text-align: center;
    }
    .pinTitle { font-size: 28px; font-weight: 900; margin-bottom: 8px; }
    .pinHint  { font-size: 17px; color: var(--text2); font-weight: 600; margin-bottom: 24px; }
    .pinDisplay {
      display: flex;
      gap: 24px;
      justify-content: center;
      margin-bottom: 24px;
    }
    .pinDot {
      width: 32px; height: 32px;
      border-radius: 999px;
      border: 3px solid rgba(255,255,255,.25);
      background: rgba(255,255,255,.08);
    }
    .pinDot.filled { background: var(--accent); border-color: var(--accent); }
    .pinDot.on {
      background: var(--accent);
      border-color: var(--accent2);
      transform: scale(1.15);
    }
    .pinErr { color: var(--danger); font-size: 15px; font-weight: 700; min-height: 22px; margin-bottom: 14px; }
    .pinPad {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 14px;
      margin-bottom: 24px;
    }
    .pinKey {
      height: 100px;
      border-radius: 20px;
      border: 1.5px solid var(--border2);
      background: var(--surface2);
      color: var(--text);
      font: 900 32px 'Nunito', sans-serif;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
    }
    .pinKey:active { background: var(--surface3); }
    .pinActions { display: flex; gap: 14px; justify-content: center; }

    /* ============================================================
       QR VIEW
    ============================================================ */
    .qrview {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.82);
      z-index: 200;
      align-items: center;
      justify-content: center;
    }
    .qrview.on { display: flex; }
    .qrCard {
      background: var(--surface);
      border: 1.5px solid var(--border2);
      border-radius: var(--radius2);
      box-shadow: var(--shadow2);
      padding: 28px;
      max-width: 820px;
      width: 95%;
    }
    .qrTop {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 18px;
    }
    .qrTitle { font-size: 24px; font-weight: 900; }
    .qrBody {
      display: grid;
      grid-template-columns: 1.6fr 1fr;
      gap: 24px;
      align-items: start;
    }
    @media (max-width: 540px) { .qrBody { grid-template-columns: 1fr; } }
    .qrBox {
      background: #fff;
      border-radius: var(--radius);
      aspect-ratio: 1;
      min-height: 280px;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      padding: 12px;
    }
    .qrBox svg { width: 100%; height: 100%; }
    .qrBox img { width: 100%; height: 100%; object-fit: contain; }
    .qrLoading { display: flex; flex-direction: column; align-items: center; gap: 12px; color: #111; text-align: center; }
    .qrInfo { display: flex; flex-direction: column; gap: 12px; }
    .qrHint { background: var(--infoBg); border: 1.5px solid rgba(91,164,245,.3); border-radius: var(--radius); padding: 14px 16px; font-size: 15px; font-weight: 700; color: var(--info); }
    .qrLink { font-size: 13px; color: var(--accent); word-break: break-all; font-weight: 600; }
    .qrRed  { color: var(--danger); font-weight: 700; }
    .muted  { color: var(--text3); font-size: 13px; font-weight: 600; }

    /* ============================================================
       ON-SCREEN KEYBOARD
    ============================================================ */
    .kbdOverlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.82);
      z-index: 300;
      align-items: flex-end;
      justify-content: center;
    }
    .kbdCard {
      background: var(--surface);
      border: 1.5px solid var(--border2);
      border-radius: var(--radius2) var(--radius2) 0 0;
      box-shadow: var(--shadow2);
      padding: 24px;
      width: 100%;
      max-width: 960px;
    }
    .kbdTop {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 14px;
    }
    .kbdTitle { font-size: 20px; font-weight: 900; }
    .kbdKeys {
      display: grid;
      gap: 8px;
      margin-top: 12px;
    }
    .kbdKey {
      height: 56px;
      border-radius: 12px;
      border: 1.5px solid var(--border2);
      background: var(--surface2);
      color: var(--text);
      font: 700 18px 'Nunito', sans-serif;
      cursor: pointer;
    }
    .kbdKey:active { transform: scale(.95); background: var(--surface3); }
    .kbdHistRow { margin-top: 8px; }
    .kbdHistSelect { width: 100%; }

    /* ============================================================
       PHOTO VIEWER
    ============================================================ */
    .photoview {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.88);
      z-index: 180;
      align-items: center;
      justify-content: center;
    }
    .photoview.on { display: flex; }
    .pvCard {
      background: var(--surface);
      border: 1.5px solid var(--border2);
      border-radius: var(--radius2);
      box-shadow: var(--shadow2);
      padding: 18px;
      max-width: 94vw;
      width: 94vw;
      max-height: 92vh;
      height: 92vh;
      display: flex;
      flex-direction: column;
      gap: 12px;
      overflow: hidden;
    }
    .pvTop {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
    }
    .pvLeft { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
    .pvName { font-size: 15px; font-weight: 700; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .pvBody { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; overflow: hidden; }
    .pvBody img { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 12px; object-fit: contain; display: block; }
    .pvSel { font-size: 22px; }

    /* ============================================================
       SCREENSAVER
    ============================================================ */
    .screensaver {
      display: none;
      position: fixed;
      inset: 0;
      background: var(--bg);
      z-index: 500;
      cursor: pointer;
    }
    .screensaver.on { display: flex; align-items: center; justify-content: center; }
    .ss-inner { display: flex; flex-direction: column; align-items: center; gap: 28px; }
    .ss-top { display: flex; align-items: center; gap: 18px; }
    .ss-title { font-size: 26px; font-weight: 900; }
    .ss-mid { text-align: center; }
    .ss-tap { font-size: 20px; color: var(--text2); font-weight: 700; animation: pulse 2s ease-in-out infinite; }
    @keyframes pulse {
      0%,100% { opacity: 1; }
      50%      { opacity: .4; }
    }

    /* ============================================================
       LOCK OVERLAY
    ============================================================ */
    #lockOverlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(10,16,28,.97);
      z-index: 600;
      align-items: center;
      justify-content: center;
    }
    #lockOverlay.on { display: flex; }
    #lockOverlay .box { text-align: center; display: flex; flex-direction: column; gap: 14px; }
    #lockOverlay .title { font-size: 42px; font-weight: 900; color: var(--danger); }
    #lockOverlay .until { font-size: 28px; font-weight: 800; color: var(--text); }
    #lockOverlay .reason { font-size: 18px; color: var(--text2); font-weight: 600; }

    /* ============================================================
       SEARCH OVERLAY
    ============================================================ */
    .searchCard {
      background: var(--surface);
      border: 1.5px solid var(--border2);
      border-radius: var(--radius2);
      box-shadow: var(--shadow2);
      padding: 28px;
      max-width: 900px;
      width: 94%;
      max-height: 88vh;
      overflow: auto;
    }
    #mp3SearchOverlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.82);
      z-index: 200;
      align-items: center;
      justify-content: center;
    }
    #mp3SearchOverlay.on { display: flex; }
    .chipRow { display: flex; gap: 8px; flex-wrap: wrap; }

    /* ============================================================
       WIPE PROGRESS MODAL
    ============================================================ */
    .wipeModal {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.82);
      z-index: 300;
      align-items: center;
      justify-content: center;
    }
    .wipeModal.on { display: flex; }
    .wipeCard {
      background: var(--surface);
      border: 1.5px solid var(--border2);
      border-radius: var(--radius2);
      box-shadow: var(--shadow2);
      padding: 32px;
      max-width: 500px;
      width: 90%;
      text-align: center;
    }
    .progWrap {
      width: 100%;
      height: 12px;
      background: var(--surface3);
      border-radius: 999px;
      overflow: hidden;
      margin-top: 14px;
    }
    .progBar {
      height: 100%;
      background: var(--accent);
      border-radius: 999px;
      transition: width .3s ease;
    }

    /* ============================================================
       ROW UTILITY
    ============================================================ */
    .row {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      align-items: center;
    }
    .grow { flex: 1; min-width: 0; }
    .mlAuto { margin-left: auto; }
    .searchWrap { position: relative; width: min(520px, 100%); }

    /* ============================================================
       SPINNER
    ============================================================ */
    .spinner {
      width: 52px; height: 52px;
      border: 6px solid rgba(255,255,255,.12);
      border-top-color: var(--accent);
      border-radius: 999px;
      animation: spin 1s linear infinite;
      display: inline-block;
    }
    @keyframes spin {
      to { transform: rotate(360deg); }
    }

    /* ============================================================
       CD HOME SCREEN
    ============================================================ */
    .cdGrid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
      margin-top: 18px;
    }

    /* ============================================================
       RESPONSIVE TWEAKS
    ============================================================ */
    @media (min-width: 1400px) {
      .bigChoice { min-height: 260px; }
      .bigChoice .icon { width: 88px; height: 88px; font-size: 40px; }
      .bigChoice .label { font-size: 32px; }
      .calendar { gap: 8px; }
      .calDay { min-height: 80px; }
    }
    @media (max-width: 800px) {
      .topbar .title { font-size: 16px; }
      .clock { font-size: 22px; }
      .bigChoice { min-height: 160px; }
      .bigChoice .label { font-size: 22px; }
      .card { padding: 18px; }
      .filesLayout { grid-template-columns: 1fr; }
    }

    /* ============================================================
       DYNAMICALLY INJECTED ELEMENTS (built by JS)
    ============================================================ */

    /* Calendar cells (JS: .dow, .day, .day.on, .day.today, .marker, .p, .badge) */
    .dow {
      text-align: center;
      font-size: 13px;
      font-weight: 800;
      color: var(--text3);
      padding: 6px 0 10px;
      text-transform: uppercase;
      letter-spacing: .5px;
    }
    .day {
      border-radius: 14px;
      border: 1.5px solid var(--border);
      background: rgba(255,255,255,.03);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      font-weight: 800;
      cursor: default;
      position: relative;
      height: clamp(44px, 9.5vh, 80px);
      color: rgba(255,255,255,.18);   /* very dim – clearly empty */
    }
    /* === DAYS WITH CONTENT: clearly highlighted === */
    .day.on {
      color: #fff;
      cursor: pointer;
      border: 2px solid rgba(245,166,35,.55);
      background: linear-gradient(145deg, rgba(245,166,35,.18) 0%, rgba(245,166,35,.08) 100%);
      box-shadow: 0 2px 12px rgba(245,166,35,.15), inset 0 1px 0 rgba(255,255,255,.06);
    }
    .day.on:hover {
      border-color: var(--accent);
      background: linear-gradient(145deg, rgba(245,166,35,.32) 0%, rgba(245,166,35,.16) 100%);
      box-shadow: 0 4px 20px rgba(245,166,35,.28), inset 0 1px 0 rgba(255,255,255,.1);
      transform: scale(1.04);
    }
    .day.on:active { transform: scale(.97); }
    .day.today {
      border-color: var(--accent) !important;
      box-shadow: 0 0 0 3px var(--accentGlow), 0 4px 16px rgba(245,166,35,.3) !important;
      color: var(--accent);
    }
    .marker {
      position: absolute;
      bottom: 5px;
      right: 5px;
      display: flex;
      align-items: center;
      gap: 3px;
    }
    .p {
      width: 7px; height: 7px;
      border-radius: 999px;
      background: var(--accent);
      opacity: .7;
    }
    .badge {
      font-size: 11px;
      font-weight: 900;
      background: rgba(245,166,35,.25);
      border: 1px solid rgba(245,166,35,.5);
      color: var(--accent2);
      border-radius: 999px;
      padding: 2px 7px;
      min-width: 20px;
      text-align: center;
    }

    /* Variant buttons (JS: .variantBtn, .left) */
    .variantBtn {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      padding: 22px 24px;
      border-radius: var(--radius2);
      border: 2px solid var(--border);
      background: var(--surface2);
      cursor: pointer;
      margin-bottom: 12px;
      min-height: 90px;
    }
    .variantBtn:hover  { border-color: var(--accent); background: var(--accentBg); }
    .variantBtn:active { transform: scale(.99); }
    .variantBtn .left  { display: flex; flex-direction: column; gap: 4px; }
    .variantBtn .left b { font-size: 22px; font-weight: 900; }
    .variantBtn .left span { font-size: 14px; color: var(--text2); font-weight: 600; }

    /* File list items (JS: .item, .fname, .size, .meta, .name) */
    .item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 16px;
      border-radius: var(--radius);
      border: 1.5px solid var(--border);
      background: var(--surface2);
      cursor: pointer;
      margin-bottom: 6px;
      min-height: 62px;
      font-weight: 700;
    }
    .item:hover   { border-color: var(--border2); background: var(--surface3); }
    .item:active  { transform: scale(.99); }
    .item.selected { border-color: var(--accent); background: var(--accentBg); }
    .item.folder  { border-color: rgba(91,164,245,.25); }
    .item .fname, .item .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
    .item .size, .item .meta  { font-size: 12px; color: var(--text3); font-weight: 600; flex: 0 0 auto; }
    .item .pcb   { width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--border2); background: var(--surface3); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; color: var(--accent); font-size: 16px; transition: all .1s; }
    .item.selected .pcb { border-color: var(--accent); background: var(--accentBg); }

    /* Native checkbox inside .item rows - make large, styled, touch-friendly */
    .item input[type="checkbox"],
    .item label input[type="checkbox"] {
      appearance: none;
      -webkit-appearance: none;
      width: 32px;
      height: 32px;
      min-width: 32px;
      border-radius: 10px;
      border: 2.5px solid var(--border2);
      background: var(--surface3);
      cursor: pointer;
      flex: 0 0 auto;
      position: relative;
      transition: border-color .12s, background .12s;
    }
    .item input[type="checkbox"]:checked,
    .item label input[type="checkbox"]:checked {
      background: var(--accent);
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accentGlow);
    }
    .item input[type="checkbox"]:checked::after,
    .item label input[type="checkbox"]:checked::after {
      content: "";
      position: absolute;
      left: 8px; top: 4px;
      width: 9px; height: 14px;
      border: 3px solid #0e1523;
      border-top: none;
      border-left: none;
      transform: rotate(45deg);
    }
    .item input[type="checkbox"]:active,
    .item label input[type="checkbox"]:active { transform: scale(.92); }

    /* Cart list items */
    .cartItem {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 14px;
      border-radius: var(--radiusSm);
      border: 1.5px solid var(--border);
      background: var(--surface2);
      margin-bottom: 6px;
      font-size: 14px;
      font-weight: 700;
    }
    .cartItem .pname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .cartItem .psize { font-size: 12px; color: var(--text3); font-weight: 600; }
    .cartItem .pmeta { font-size: 11px; color: var(--text3); font-weight: 600; }

    /* Folder items (JS: .folderItem, .folderList) */
    .folderList {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-bottom: 14px;
    }
    .folderItem {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 18px;
      border-radius: var(--radius);
      border: 1.5px solid var(--border);
      background: var(--surface2);
      cursor: pointer;
      font-weight: 800;
      font-size: 17px;
      min-height: 62px;
    }
    .folderItem:hover  { border-color: rgba(91,164,245,.4); background: var(--infoBg); }
    .folderItem:active { transform: scale(.99); }
    .folderItem .arrow { margin-left: auto; font-size: 22px; color: var(--text3); }

    /* Photo tiles (JS: .photoTile) */
    .photoTile {
      aspect-ratio: 1;
      border-radius: 14px;
      border: 2px solid var(--border);
      overflow: hidden;
      cursor: pointer;
      position: relative;
      background: var(--surface2);
      /* Skip rendering off-screen tiles - huge GPU/CPU savings */
      content-visibility: auto;
      contain-intrinsic-size: 196px 196px;
    }
    .photoTile img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .photoTile.selected { border-color: var(--accent); }
    .photoTile:active { opacity: 0.85; }

    /* History chips (JS: .histChip, .histChipBtn, .histChipX) */
    .histChip {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: var(--surface2);
      border: 1.5px solid var(--border2);
      border-radius: 999px;
      padding: 6px 12px;
    }
    .histChipBtn {
      font-size: 14px;
      font-weight: 700;
      color: var(--text);
      background: none;
      border: none;
      cursor: pointer;
      padding: 0;
    }
    .histChipX {
      font-size: 12px;
      color: var(--text3);
      background: none;
      border: none;
      cursor: pointer;
      padding: 0 2px;
    }
    .histEmpty { font-size: 13px; color: var(--text3); font-weight: 600; }

    /* Summary elements (JS: .gtitle, .line, .fn, .fs) – already styled via .summaryBox but add standalone */
    .gtitle { padding: 14px 18px; font-size: 16px; font-weight: 900; background: var(--surface3); border-bottom: 1px solid var(--border); }
    .line {
      display: flex; align-items: center; justify-content: space-between;
      padding: 12px 18px; border-bottom: 1px solid var(--border);
      font-size: 14px; font-weight: 700;
    }
    .line .fn { color: var(--text2); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .line .fs { color: var(--text3); flex: 0 0 auto; margin-left: 12px; }

    /* Keyboard rows */
    .kbdRow {
      display: flex;
      gap: 6px;
      margin-bottom: 6px;
      justify-content: center;
    }
    .kbdKey {
      flex: 1;
      height: 54px;
      max-width: 68px;
      border-radius: 12px;
      border: 1.5px solid var(--border2);
      background: var(--surface2);
      color: var(--text);
      font: 700 17px 'Nunito', sans-serif;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      user-select: none;
    }
    .kbdKey:active { transform: scale(.93); background: var(--surface3); }

    /* Wipe progress (modal injected by JS) */
    #wipeModal {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.82);
      z-index: 300;
      align-items: center;
      justify-content: center;
    }
    #wipeModal.on { display: flex; }

    /* ============================================================
       USB MANAGER PANEL
    ============================================================ */
    #usbManagerOverlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.78);
      z-index: 280;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }
    #usbManagerOverlay.on { display: flex; }
    .usbPanel {
      background: var(--surface);
      border: 1px solid var(--border2);
      border-radius: 24px;
      width: 100%;
      max-width: 820px;
      min-width: 480px;
      max-height: 90vh;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      box-shadow: 0 24px 80px rgba(0,0,0,.7);
    }
    .usbPanelHandle {
      width: 40px; height: 5px;
      background: var(--border2);
      border-radius: 999px;
      margin: 14px auto 6px;
      flex-shrink: 0;
    }
    .usbPanelHead {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 6px 24px 14px;
      flex-shrink: 0;
      border-bottom: 1px solid var(--border);
    }
    .usbPanelHead h2 {
      font-size: 18px;
      font-weight: 900;
      color: var(--text);
      flex: 1;
      margin: 0;
    }
    .usbPanelClose {
      width: 36px; height: 36px;
      border-radius: 50%;
      border: 1px solid var(--border2);
      background: var(--surface2);
      color: var(--text2);
      display: flex; align-items: center; justify-content: center;
      cursor: pointer;
      font-size: 18px;
      line-height: 1;
    }
    .usbPanelBody {
      flex: 1;
      overflow-y: auto;
      padding: 20px 28px 28px;
    }
    /* Storage bar */
    .usbStorageWrap {
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 16px;
      margin-bottom: 14px;
    }
    .usbStorageTop {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
    }
    .usbDriveName { font-size: 15px; font-weight: 800; color: var(--text); }
    .usbDriveMeta { font-size: 12px; color: var(--text3); margin-top: 2px; }
    .usbStoragePill {
      font-size: 12px; font-weight: 700;
      padding: 4px 12px;
      border-radius: 999px;
    }
    .usbStoragePill.ok   { background: var(--okBg); color: var(--ok); border: 1px solid rgba(62,207,116,.3); }
    .usbStoragePill.warn { background: var(--accentBg); color: var(--accent); border: 1px solid rgba(245,166,35,.3); }
    .usbStoragePill.full { background: var(--dangerBg); color: var(--danger); border: 1px solid rgba(245,82,82,.3); }
    .usbBarTrack {
      height: 12px;
      background: var(--surface3);
      border-radius: 999px;
      overflow: hidden;
      margin-bottom: 8px;
    }
    .usbBarFill {
      height: 100%;
      border-radius: 999px;
    }
    .usbBarFill.ok   { background: var(--ok); }
    .usbBarFill.warn { background: var(--accent); }
    .usbBarFill.full { background: var(--danger); }
    .usbStorageStats {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 8px;
      margin-top: 10px;
    }
    .usbStatBox {
      background: var(--surface3);
      border-radius: 10px;
      padding: 8px 10px;
      text-align: center;
    }
    .usbStatNum { font-size: 14px; font-weight: 800; color: var(--text); display: block; }
    .usbStatLbl { font-size: 11px; color: var(--text3); }
    /* Warning banner */
    .usbWarnBanner {
      background: var(--accentBg);
      border: 1px solid rgba(245,166,35,.3);
      border-radius: 12px;
      padding: 10px 14px;
      display: flex;
      gap: 10px;
      align-items: flex-start;
      margin-bottom: 14px;
      font-size: 13px;
      color: var(--accent2);
      line-height: 1.45;
    }
    /* Tab row */
    .usbTabs {
      display: flex;
      gap: 6px;
      margin-bottom: 12px;
    }
    .usbTab {
      font-size: 13px;
      font-weight: 700;
      padding: 7px 16px;
      border-radius: 999px;
      border: 1px solid var(--border2);
      background: transparent;
      color: var(--text2);
      cursor: pointer;
      font-family: inherit;
    }
    .usbTab.active {
      background: var(--surface3);
      color: var(--text);
      border-color: var(--border2);
    }
    /* File list */
    .usbFileList {
      display: flex;
      flex-direction: column;
      gap: 2px;
      max-height: 420px;
      overflow-y: auto;
    }
    .usbFileItem {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 10px;
      border-radius: 10px;
      cursor: pointer;
    }
    .usbFileItem:hover { background: var(--surface2); }
    .usbFileItem.sel   { background: var(--accentBg); }
    .usbFileIcon { font-size: 20px; flex-shrink: 0; width: 28px; text-align: center; }
    .usbFileName { flex: 1; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .usbFileSize { font-size: 12px; color: var(--text3); flex-shrink: 0; }
    .usbFileDelBtn {
      display: none;
      background: none;
      border: none;
      cursor: pointer;
      color: var(--danger);
      font-size: 16px;
      padding: 2px 4px;
      border-radius: 6px;
    }
    .usbFileItem:hover .usbFileDelBtn { display: block; }
    .usbFileActBar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 10px;
      min-height: 36px;
    }
    .usbDelSelBtn {
      display: none;
      align-items: center;
      gap: 6px;
      font-family: inherit;
      font-size: 13px;
      font-weight: 700;
      padding: 7px 16px;
      border-radius: 999px;
      border: 1px solid rgba(245,82,82,.4);
      background: var(--dangerBg);
      color: var(--danger);
      cursor: pointer;
    }
    .usbDelSelBtn.visible { display: inline-flex; }
    /* Actions tab */
    .usbActionGrid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-bottom: 14px;
    }
    .usbActionBtn {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 16px;
      background: var(--surface2);
      border: 1px solid var(--border2);
      border-radius: 14px;
      cursor: pointer;
      color: var(--text);
      font-family: inherit;
      text-align: left;
    }
    .usbActionBtn:hover { background: var(--surface3); }
    .usbActionBtn.danger { border-color: rgba(245,82,82,.3); color: var(--danger); }
    .usbActionBtn.danger:hover { background: var(--dangerBg); }
    .usbActionBtn.accent { border-color: rgba(91,164,245,.3); color: var(--info); }
    .usbActionBtn.accent:hover { background: var(--infoBg); }
    .usbActionBtnIcon { font-size: 22px; flex-shrink: 0; }
    .usbActionBtnLabel { font-size: 14px; font-weight: 800; display: block; }
    .usbActionBtnSub   { font-size: 12px; opacity: .65; display: block; margin-top: 1px; }
    /* Format options */
    .usbFmtOpts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
    .usbFmtOpt {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 12px 14px;
      border: 1px solid var(--border2);
      border-radius: 12px;
      cursor: pointer;
      transition: border-color .15s, background .15s;
    }
    .usbFmtOpt.sel { border-color: var(--info); background: var(--infoBg); }
    .usbFmtOpt input { margin-top: 3px; flex-shrink: 0; cursor: pointer; accent-color: var(--info); }
    .usbFmtOptLabel { font-size: 14px; font-weight: 800; color: var(--text); }
    .usbFmtOptRec {
      font-size: 11px; font-weight: 700;
      background: var(--okBg); color: var(--ok);
      padding: 1px 8px; border-radius: 999px;
      margin-left: 8px;
    }
    .usbFmtOptDesc { font-size: 12px; color: var(--text3); margin-top: 3px; }
    /* Info cards */
    .usbInfoCard {
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 14px;
      margin-bottom: 10px;
    }
    .usbInfoCardTitle { font-size: 13px; font-weight: 800; color: var(--text2); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em; }
    .usbFsRow { padding: 8px 10px; background: var(--surface3); border-radius: 8px; margin-bottom: 6px; }
    .usbFsRow:last-child { margin-bottom: 0; }
    .usbFsName { font-size: 13px; font-weight: 800; color: var(--text); }
    .usbFsDesc { font-size: 12px; color: var(--text3); margin-top: 2px; }
    .usbNoStick {
      text-align: center;
      padding: 40px 20px;
      color: var(--text3);
    }
    .usbNoStick .usbNoStickIcon { font-size: 48px; margin-bottom: 12px; display: block; }

    /* Global MP3 Search items */
    .mp3ResultItem {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 16px;
      border-radius: var(--radiusSm);
      border: 1.5px solid var(--border);
      background: var(--surface2);
      margin-bottom: 6px;
      cursor: pointer;
      transition: border-color .12s, background .12s;
      font-size: 15px;
      font-weight: 700;
    }
    .mp3ResultItem:hover   { border-color: var(--border2); }
    .mp3ResultItem.selected { border-color: var(--accent); background: var(--accentBg); }

    /* CD status box */
    #cdStatusBox { margin-top: 14px; }

    /* ============================================================
       FONT SIZE LEVELS – skaliert ALLE Komponenten lückenlos
       fs-large  = Groß      (A+)
       fs-xlarge = Sehr groß (A++)
       fs-xxxlarge = Maximal (A+++)
    ============================================================ */

    /* ── Basis-Schriftgröße des Dokuments ─────────────────────── */
    html.fs-large    body { font-size: 21px; }
    html.fs-xlarge   body { font-size: 24px; }
    html.fs-xxxlarge body { font-size: 32px; }

    /* ── Start-Screen: Hauptkacheln ───────────────────────────── */
    html.fs-large    .bigChoice .label { font-size: 27px; }
    html.fs-large    .bigChoice .hint  { font-size: 15px; }
    html.fs-xlarge   .bigChoice .label { font-size: 31px; }
    html.fs-xlarge   .bigChoice .hint  { font-size: 17px; }
    html.fs-xlarge   .bigChoice { min-height: 240px; }
    html.fs-xxxlarge .bigChoice .label { font-size: 42px; }
    html.fs-xxxlarge .bigChoice .hint  { font-size: 22px; }
    html.fs-xxxlarge .bigChoice { min-height: 300px; }

    /* ── Buttons (gilt für ALLE .btn) ─────────────────────────── */
    html.fs-large    .btn { font-size: 19px; min-height: 60px; padding-top: 0; padding-bottom: 0; }
    html.fs-xlarge   .btn { font-size: 21px; min-height: 72px; }
    html.fs-xxxlarge .btn { font-size: 28px; min-height: 88px; }

    /* ── Zurück-Buttons / Screen-Header ───────────────────────── */
    html.fs-large    .screenHeader .backBtn,
    html.fs-large    .actionBar .backBtn    { height: 64px; font-size: 18px; }
    html.fs-xlarge   .screenHeader .backBtn,
    html.fs-xlarge   .actionBar .backBtn    { height: 72px; font-size: 20px; }
    html.fs-xxxlarge .screenHeader .backBtn,
    html.fs-xxxlarge .actionBar .backBtn    { height: 88px; font-size: 26px; }

    html.fs-large    .screenHeader h1 { font-size: 30px; }
    html.fs-xlarge   .screenHeader h1 { font-size: 34px; }
    html.fs-xxxlarge .screenHeader h1 { font-size: 44px; }

    html.fs-large    .screenHeader .hint { font-size: 17px; }
    html.fs-xlarge   .screenHeader .hint { font-size: 19px; }
    html.fs-xxxlarge .screenHeader .hint { font-size: 24px; }

    /* ── Datei-/Ordner-Listen ─────────────────────────────────── */
    html.fs-large    .item .fname, html.fs-large    .item .name { font-size: 18px; }
    html.fs-xlarge   .item .fname, html.fs-xlarge   .item .name { font-size: 20px; }
    html.fs-xxxlarge .item .fname, html.fs-xxxlarge .item .name { font-size: 28px; }

    html.fs-large    .item .size, html.fs-large    .item .meta { font-size: 14px; }
    html.fs-xlarge   .item .size, html.fs-xlarge   .item .meta { font-size: 15px; }
    html.fs-xxxlarge .item .size, html.fs-xxxlarge .item .meta { font-size: 18px; }

    html.fs-large    .item { min-height: 64px; }
    html.fs-xlarge   .item { min-height: 72px; }
    html.fs-xxxlarge .item { min-height: 88px; }

    html.fs-large    .folderItem { font-size: 19px; min-height: 64px; }
    html.fs-xlarge   .folderItem { font-size: 22px; min-height: 72px; }
    html.fs-xxxlarge .folderItem { font-size: 30px; min-height: 88px; }

    /* ── Varianten-Buttons ────────────────────────────────────── */
    html.fs-large    .variantBtn .left b { font-size: 26px; }
    html.fs-xlarge   .variantBtn .left b { font-size: 30px; }
    html.fs-xxxlarge .variantBtn .left b { font-size: 40px; }

    html.fs-large    .variantItem .vLabel { font-size: 24px; }
    html.fs-xlarge   .variantItem .vLabel { font-size: 28px; }
    html.fs-xxxlarge .variantItem .vLabel { font-size: 36px; }

    html.fs-large    .variantItem .vSub { font-size: 16px; }
    html.fs-xlarge   .variantItem .vSub { font-size: 18px; }
    html.fs-xxxlarge .variantItem .vSub { font-size: 22px; }

    html.fs-large    .variantItem   { min-height: 72px; }
    html.fs-xlarge   .variantItem   { min-height: 84px; }
    html.fs-xxxlarge .variantItem   { min-height: 100px; }

    /* ── Generisches Modal (openModal) ────────────────────────── */
    html.fs-large    .modalCard        { max-width: 580px; }
    html.fs-xlarge   .modalCard        { max-width: 640px; }
    html.fs-xxxlarge .modalCard        { max-width: 720px; }

    html.fs-large    .modalCard h2 { font-size: 30px; }
    html.fs-xlarge   .modalCard h2 { font-size: 34px; }
    html.fs-xxxlarge .modalCard h2 { font-size: 44px; }

    html.fs-large    .modalCard p  { font-size: 20px; }
    html.fs-xlarge   .modalCard p  { font-size: 22px; }
    html.fs-xxxlarge .modalCard p  { font-size: 28px; }

    /* ── PIN-Tastatur ─────────────────────────────────────────── */
    html.fs-large    .pinKey { height: 92px;  font-size: 30px; }
    html.fs-xlarge   .pinKey { height: 104px; font-size: 34px; }
    html.fs-xxxlarge .pinKey { height: 120px; font-size: 42px; }

    html.fs-large    .pinDot  { width: 32px; height: 32px; }
    html.fs-xlarge   .pinDot  { width: 36px; height: 36px; }
    html.fs-xxxlarge .pinDot  { width: 44px; height: 44px; }

    html.fs-large    .pinTitle { font-size: 30px; }
    html.fs-xlarge   .pinTitle { font-size: 34px; }
    html.fs-xxxlarge .pinTitle { font-size: 44px; }

    html.fs-large    .pinHint  { font-size: 19px; }
    html.fs-xlarge   .pinHint  { font-size: 21px; }
    html.fs-xxxlarge .pinHint  { font-size: 26px; }

    html.fs-large    .pinErr   { font-size: 17px; }
    html.fs-xlarge   .pinErr   { font-size: 19px; }
    html.fs-xxxlarge .pinErr   { font-size: 23px; }

    /* ── On-Screen-Tastatur (kbdKey) ──────────────────────────── */
    html.fs-large    .kbdKey { height: 68px;  font-size: 20px; max-width: none; }
    html.fs-xlarge   .kbdKey { height: 78px;  font-size: 22px; max-width: none; }
    html.fs-xxxlarge .kbdKey { height: 96px;  font-size: 28px; max-width: none; }

    html.fs-large    .kbdTitle { font-size: 23px; }
    html.fs-xlarge   .kbdTitle { font-size: 26px; }
    html.fs-xxxlarge .kbdTitle { font-size: 32px; }

    /* ── CD-Bestell-Modals (cdOrderCard / cdStatusModal) ─────── */
    /* Card-Breite wächst damit alles Platz hat */
    html.fs-large    .cdOrderCard { max-width: 600px; }
    html.fs-xlarge   .cdOrderCard { max-width: 680px; }
    html.fs-xxxlarge .cdOrderCard { max-width: 780px; }

    /* Header */
    html.fs-large    .cdOrderTitle { font-size: 28px; }
    html.fs-xlarge   .cdOrderTitle { font-size: 32px; }
    html.fs-xxxlarge .cdOrderTitle { font-size: 42px; }

    html.fs-large    .cdOrderSub  { font-size: 16px; }
    html.fs-xlarge   .cdOrderSub  { font-size: 18px; }
    html.fs-xxxlarge .cdOrderSub  { font-size: 22px; }

    html.fs-large    .cdOrderIcon { font-size: 52px; }
    html.fs-xlarge   .cdOrderIcon { font-size: 60px; }
    html.fs-xxxlarge .cdOrderIcon { font-size: 72px; }

    /* Label */
    html.fs-large    .cdOrderLabel { font-size: 18px; }
    html.fs-xlarge   .cdOrderLabel { font-size: 20px; }
    html.fs-xxxlarge .cdOrderLabel { font-size: 26px; }

    /* Eingabefeld – Höhe und Schrift wachsen mit */
    html.fs-large    .cdOrderInput { height: 72px;  font-size: 22px; }
    html.fs-xlarge   .cdOrderInput { height: 84px;  font-size: 25px; }
    html.fs-xxxlarge .cdOrderInput { height: 100px; font-size: 30px; padding: 0 22px; }

    /* Tastatur-Button neben dem Feld */
    html.fs-large    .cdOrderKbdBtn { width: 72px;  height: 72px;  font-size: 28px; }
    html.fs-xlarge   .cdOrderKbdBtn { width: 84px;  height: 84px;  font-size: 32px; }
    html.fs-xxxlarge .cdOrderKbdBtn { width: 100px; height: 100px; font-size: 38px; }

    /* Feldhinweis */
    html.fs-large    .cdOrderFieldHint { font-size: 15px; }
    html.fs-xlarge   .cdOrderFieldHint { font-size: 17px; }
    html.fs-xxxlarge .cdOrderFieldHint { font-size: 20px; }

    /* Mengenauswahl */
    html.fs-large    .cdOrderQtyBtn { width: 84px;  height: 76px;  font-size: 34px; }
    html.fs-xlarge   .cdOrderQtyBtn { width: 96px;  height: 88px;  font-size: 38px; }
    html.fs-xxxlarge .cdOrderQtyBtn { width: 116px; height: 108px; font-size: 46px; }

    html.fs-large    .cdOrderQtyVal { font-size: 36px; line-height: 76px;  min-width: 90px; }
    html.fs-xlarge   .cdOrderQtyVal { font-size: 40px; line-height: 88px;  min-width: 100px; }
    html.fs-xxxlarge .cdOrderQtyVal { font-size: 50px; line-height: 108px; min-width: 120px; }

    /* Zusammenfassung + Fehler */
    html.fs-large    .cdOrderSummary { font-size: 17px; padding: 16px 20px; }
    html.fs-xlarge   .cdOrderSummary { font-size: 19px; padding: 18px 22px; }
    html.fs-xxxlarge .cdOrderSummary { font-size: 23px; padding: 22px 26px; }

    html.fs-large    .cdOrderErr { font-size: 17px; }
    html.fs-xlarge   .cdOrderErr { font-size: 19px; }
    html.fs-xxxlarge .cdOrderErr { font-size: 23px; }

    /* Aktions-Leiste unten */
    html.fs-large    .cdOrderActions { padding: 18px 28px 26px; gap: 14px; }
    html.fs-xlarge   .cdOrderActions { padding: 20px 32px 28px; gap: 16px; }
    html.fs-xxxlarge .cdOrderActions { padding: 24px 36px 32px; gap: 20px; }

    /* CD-Status Ergebnis-Items */
    html.fs-large    .cdStatusItem .statusBadge { font-size: 16px; padding: 8px 16px; }
    html.fs-xlarge   .cdStatusItem .statusBadge { font-size: 18px; padding: 10px 18px; }
    html.fs-xxxlarge .cdStatusItem .statusBadge { font-size: 22px; padding: 12px 22px; }

    html.fs-large    .cdStatusItem .statusMeta { font-size: 15px; }
    html.fs-xlarge   .cdStatusItem .statusMeta { font-size: 17px; }
    html.fs-xxxlarge .cdStatusItem .statusMeta { font-size: 21px; }

    html.fs-large    .cdStatusEmpty { font-size: 17px; }
    html.fs-xlarge   .cdStatusEmpty { font-size: 19px; }
    html.fs-xxxlarge .cdStatusEmpty { font-size: 23px; }

    /* ── Zusammenfassungs-Screen (.summaryBox) ────────────────── */
    html.fs-large    .summaryBox .gtitle { font-size: 20px; }
    html.fs-xlarge   .summaryBox .gtitle { font-size: 23px; }
    html.fs-xxxlarge .summaryBox .gtitle { font-size: 28px; }

    html.fs-large    .summaryBox .line { font-size: 16px; min-height: 48px; }
    html.fs-xlarge   .summaryBox .line { font-size: 18px; min-height: 54px; }
    html.fs-xxxlarge .summaryBox .line { font-size: 22px; min-height: 66px; }

    /* ── Kopier-Screen / Fortschrittsanzeige ─────────────────── */
    html.fs-large    #progMsg, html.fs-large    #progExtra { font-size: 19px; }
    html.fs-xlarge   #progMsg, html.fs-xlarge   #progExtra { font-size: 22px; }
    html.fs-xxxlarge #progMsg, html.fs-xxxlarge #progExtra { font-size: 28px; }

    /* ── QR-Code Overlay ──────────────────────────────────────── */
    html.fs-large    .qrTitle { font-size: 28px; }
    html.fs-xlarge   .qrTitle { font-size: 32px; }
    html.fs-xxxlarge .qrTitle { font-size: 40px; }

    html.fs-large    .qrHint { font-size: 17px; }
    html.fs-xlarge   .qrHint { font-size: 19px; }
    html.fs-xxxlarge .qrHint { font-size: 24px; }

    html.fs-large    .qrLink { font-size: 15px; }
    html.fs-xlarge   .qrLink { font-size: 17px; }
    html.fs-xxxlarge .qrLink { font-size: 20px; }

    /* ── USB-Manager Panel ────────────────────────────────────── */
    html.fs-large    .usbPanelHead h2 { font-size: 22px; }
    html.fs-xlarge   .usbPanelHead h2 { font-size: 26px; }
    html.fs-xxxlarge .usbPanelHead h2 { font-size: 32px; }

    /* USB-Dateilisten im Panel */
    html.fs-large    .usbFileName     { font-size: 17px; }
    html.fs-xlarge   .usbFileName     { font-size: 19px; }
    html.fs-xxxlarge .usbFileName     { font-size: 24px; }

    html.fs-large    .usbFileMeta     { font-size: 13px; }
    html.fs-xlarge   .usbFileMeta     { font-size: 14px; }
    html.fs-xxxlarge .usbFileMeta     { font-size: 17px; }

    html.fs-large    .usbDriveName    { font-size: 19px; }
    html.fs-xlarge   .usbDriveName    { font-size: 22px; }
    html.fs-xxxlarge .usbDriveName    { font-size: 28px; }

    html.fs-large    .usbDriveMeta    { font-size: 14px; }
    html.fs-xlarge   .usbDriveMeta    { font-size: 15px; }
    html.fs-xxxlarge .usbDriveMeta    { font-size: 18px; }

    /* ── Player-Leiste ────────────────────────────────────────── */
    html.fs-large    #pName { font-size: 15px; }
    html.fs-xlarge   #pName { font-size: 17px; }
    html.fs-xxxlarge #pName { font-size: 21px; }

    html.fs-large    #pTime { font-size: 17px; }
    html.fs-xlarge   #pTime { font-size: 19px; }
    html.fs-xxxlarge #pTime { font-size: 23px; }

    /* ── Toast ────────────────────────────────────────────────── */
    html.fs-large    .fontSizeToast { font-size: 18px; padding: 12px 22px; }
    html.fs-xlarge   .fontSizeToast { font-size: 20px; padding: 14px 26px; }
    html.fs-xxxlarge .fontSizeToast { font-size: 24px; padding: 16px 30px; }
    .fontSizeToast {
      position: fixed; top: 100px; right: 24px;
      background: var(--surface); border: 1.5px solid var(--border2);
      border-radius: 12px; padding: 10px 18px;
      font-size: 15px; font-weight: 800;
      box-shadow: var(--shadow2); z-index: 800;
      opacity: 0; transition: opacity .2s; pointer-events: none;
    }
    .fontSizeToast.show { opacity: 1; }

    /* ============================================================
       CALENDAR DAY TOOLTIP
    ============================================================ */
    .calTooltip {
      position: fixed; background: var(--surface);
      border: 1.5px solid var(--accent); border-radius: 14px;
      padding: 10px 14px; box-shadow: var(--shadow2);
      z-index: 999; min-width: 160px; max-width: 260px;
      pointer-events: none; opacity: 0; transition: opacity .15s;
    }
    .calTooltip.show { opacity: 1; }
    .calTooltip .ttDate { font-size: 13px; font-weight: 800; color: var(--accent); margin-bottom: 6px; }
    .calTooltip .ttItem { font-size: 13px; font-weight: 700; color: var(--text2); padding: 3px 0; border-bottom: 1px solid var(--border); }
    .calTooltip .ttItem:last-child { border-bottom: none; }

    /* ============================================================
       NEWEST PANEL items
    ============================================================ */
    .newestItem {
      display: flex; align-items: center; gap: 14px;
      padding: 14px 18px; border-radius: var(--radius);
      border: 1.5px solid rgba(62,207,116,.25);
      background: rgba(62,207,116,.07);
      cursor: pointer; font-weight: 800; font-size: 16px;
      min-height: 58px;
    }
    .newestItem:hover  { border-color: var(--ok); background: rgba(62,207,116,.14); }
    .newestItem:active { transform: scale(.99); }
    .newestItem .ni-date  { font-size: 15px; font-weight: 900; color: var(--ok); min-width: 100px; }
    .newestItem .ni-label { flex: 1; font-size: 15px; color: var(--text2); font-weight: 700; }
    .newestItem .ni-count { font-size: 12px; color: var(--text3); font-weight: 600; white-space: nowrap; }

    /* Indeterminate progress */
    #progBar.indet {
      background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
      background-size: 200% 100%;
      animation: indeterminate 1.5s ease-in-out infinite;
    }
    @keyframes indeterminate {
      0%   { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }
    /* ============================================================
       CD ORDER MODAL
    ============================================================ */
    .cdOrderModal {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.72);
      z-index: 280;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }
    .cdOrderModal.on { display: flex; }
    .cdOrderCard {
      background: var(--surface);
      border: 1.5px solid var(--border2);
      border-radius: var(--radius2);
      box-shadow: var(--shadow2);
      width: 100%;
      max-width: 520px;
      overflow: hidden;
    }
    .cdOrderHeader {
      display: flex;
      align-items: center;
      gap: 18px;
      padding: 24px 28px 20px;
      border-bottom: 1px solid var(--border);
      background: var(--surface2);
    }
    .cdOrderIcon {
      font-size: 42px;
      line-height: 1;
      flex: 0 0 auto;
    }
    .cdOrderTitle {
      font-size: 24px;
      font-weight: 900;
      color: var(--text);
    }
    .cdOrderSub {
      font-size: 14px;
      font-weight: 600;
      color: var(--text3);
      margin-top: 2px;
    }
    .cdOrderBody {
      padding: 24px 28px;
      display: flex;
      flex-direction: column;
      gap: 20px;
    }
    .cdOrderField {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .cdOrderLabel {
      font-size: 15px;
      font-weight: 800;
      color: var(--text2);
    }
    .cdOrderInputWrap {
      display: flex;
      gap: 10px;
      align-items: center;
    }
    .cdOrderInput {
      flex: 1;
      height: 60px;
      border-radius: 16px;
      border: 2px solid var(--border2);
      background: var(--surface2);
      color: var(--text);
      padding: 0 18px;
      font: 700 20px 'Nunito', sans-serif;
      outline: none;
      transition: border-color .15s;
    }
    .cdOrderInput:focus { border-color: var(--accent); }
    .cdOrderInput.has-value { border-color: rgba(62,207,116,.45); }
    .cdOrderKbdBtn {
      width: 60px;
      height: 60px;
      border-radius: 16px;
      border: 2px solid var(--border2);
      background: var(--surface2);
      color: var(--text);
      font-size: 24px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
    }
    .cdOrderKbdBtn:active { transform: scale(.93); }
    .cdOrderFieldHint {
      font-size: 13px;
      font-weight: 600;
      color: var(--text3);
    }
    /* Quantity selector */
    .cdOrderQtyRow {
      display: flex;
      align-items: center;
      gap: 0;
      background: var(--surface2);
      border: 2px solid var(--border2);
      border-radius: 16px;
      overflow: hidden;
      align-self: flex-start;
    }
    .cdOrderQtyBtn {
      width: 72px;
      height: 64px;
      border: none;
      background: transparent;
      color: var(--text);
      font-size: 30px;
      font-weight: 900;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .cdOrderQtyBtn:hover  { background: var(--surface3); }
    .cdOrderQtyBtn:active { background: var(--accentBg); }
    .cdOrderQtyVal {
      min-width: 80px;
      text-align: center;
      font-size: 32px;
      font-weight: 900;
      color: var(--accent);
      padding: 0 10px;
      border-left: 1px solid var(--border);
      border-right: 1px solid var(--border);
      line-height: 64px;
      font-variant-numeric: tabular-nums;
    }
    /* Summary box inside modal */
    .cdOrderSummary {
      background: var(--surface2);
      border: 1.5px solid var(--border);
      border-radius: var(--radius);
      padding: 14px 18px;
      font-size: 15px;
      font-weight: 700;
      color: var(--text2);
      line-height: 1.7;
    }
    .cdOrderSummary strong { color: var(--text); }
    .cdOrderErr {
      min-height: 20px;
      font-size: 14px;
      font-weight: 700;
      color: var(--danger);
    }
    .cdOrderActions {
      padding: 16px 28px 24px;
      display: flex;
      gap: 12px;
      justify-content: flex-end;
      border-top: 1px solid var(--border);
    }

    /* CD Status results */
    .cdStatusItem {
      background: var(--surface2);
      border: 1.5px solid var(--border);
      border-radius: var(--radius);
      padding: 16px 18px;
      margin-bottom: 10px;
    }
    .cdStatusItem .statusBadge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 14px;
      border-radius: 999px;
      font-size: 14px;
      font-weight: 800;
      margin-bottom: 8px;
    }
    .cdStatusItem .statusBadge.pending  { background: var(--infoBg); color: var(--info); border: 1px solid rgba(91,164,245,.3); }
    .cdStatusItem .statusBadge.done     { background: var(--okBg); color: var(--ok); border: 1px solid rgba(62,207,116,.3); }
    .cdStatusItem .statusBadge.error    { background: var(--dangerBg); color: var(--danger); border: 1px solid rgba(245,82,82,.3); }
    .cdStatusItem .statusBadge.default  { background: var(--surface3); color: var(--text2); border: 1px solid var(--border); }
    .cdStatusItem .statusMeta { font-size: 13px; color: var(--text3); font-weight: 600; margin-top: 4px; }
    .cdStatusEmpty { text-align: center; padding: 20px 0; color: var(--text3); font-weight: 600; font-size: 15px; }

