/* ================= THE MACHINE: platinum case fills the viewport, black bezel, glass ================= */
.has-crt body { overflow:hidden; padding:0; background:#cfc9b8; background-image:none; }
.has-crt body::before { display:none; }
#crt { --case:#d8d3c4; --case-hi:#eae6da; --case-lo:#b3ad9a; position:fixed; inset:0; z-index:1000; display:flex; flex-direction:column; padding:14px 18px 0;
  background:
    repeating-linear-gradient(to bottom, rgba(255,255,255,.05) 0 1px, rgba(0,0,0,.025) 1px 2px),
    linear-gradient(155deg,var(--case-hi),var(--case) 35%,var(--case-lo));
  box-shadow:inset 0 3px 0 rgba(255,255,255,.7), inset 0 -4px 0 rgba(0,0,0,.18), inset 4px 0 0 rgba(255,255,255,.35), inset -4px 0 0 rgba(0,0,0,.1); }
.crt-bezel { flex:1; min-height:0; padding:10px; background:#0b0b0b; border-radius:30px;
  box-shadow:0 0 0 3px var(--case-lo), 0 0 0 4px rgba(0,0,0,.35), inset 0 3px 6px rgba(255,255,255,.07), inset 0 -3px 8px rgba(0,0,0,.8); }
.crt-screen { position:relative; height:100%; overflow:hidden; border-radius:22px / 20px; background:#000; }
.crt-inner { display:flex; flex-direction:column; height:100%; transform-origin:50% 50%; }
.crt-inner.boot { animation:crt-on .7s cubic-bezier(.2,.7,.2,1) both; }
@keyframes crt-on { 0% { transform:scale(1,.003); filter:brightness(5); } 35% { transform:scale(1,.003) scaleX(.6); filter:brightness(5); } 70% { transform:scale(1,1.02); filter:brightness(1.8); } 100% { transform:none; filter:none; } }

.crt-desk { flex:1; min-height:0; position:relative; overflow:hidden; padding:0; background:var(--paper);
  background-image:radial-gradient(rgba(26,26,26,.13) 1px,transparent 1.2px); background-size:22px 22px; scrollbar-color:var(--ink) var(--beige); scrollbar-width:thin; }
.crt-glass { position:absolute; inset:0; z-index:30; pointer-events:none; border-radius:inherit;
  background:
    radial-gradient(ellipse 60% 35% at 22% 8%, rgba(255,255,255,.18), transparent 70%),
    radial-gradient(ellipse at center, transparent 62%, rgba(0,0,0,.28) 100%),
    repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.04) 3px);
  box-shadow:inset 0 0 40px rgba(0,0,0,.35); }
.crt-screen #xp-taskbar { position:relative; flex:none; }
.crt-screen #xp-menu { position:absolute; bottom:40px; z-index:20; }
.crt-screen #xp-off { position:absolute; z-index:22; }

/* chin: rainbow badge, floppy slot, vents, LED */
.crt-chin { flex:none; height:46px; display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:0 .8rem; color:#4a4638; }
.crt-chin .brand { display:flex; align-items:center; gap:.55rem; font:700 .8rem "Jost",sans-serif; letter-spacing:.32em; text-transform:uppercase; color:#2b2a25; }
.rb { display:inline-flex; flex-direction:column; width:20px; height:16px; border-radius:3px; overflow:hidden; border:1px solid rgba(0,0,0,.45); }
.rb i { flex:1; } .rb i:nth-child(1){background:var(--s1)} .rb i:nth-child(2){background:var(--s2)} .rb i:nth-child(3){background:var(--s3)}
.rb i:nth-child(4){background:var(--s4)} .rb i:nth-child(5){background:var(--s5)} .rb i:nth-child(6){background:var(--s6)}
.slot { display:grid; place-items:center; width:min(220px,30vw); height:22px; border-radius:5px; background:linear-gradient(var(--case-lo),var(--case));
  border:2px solid #4a4638; box-shadow:inset 0 2px 3px rgba(0,0,0,.25), 0 1px 0 rgba(255,255,255,.7); }
.slot i { width:78%; height:5px; border-radius:3px; background:#111; box-shadow:inset 0 1px 2px #000; }
.crt-chin .right { display:flex; align-items:center; gap:.9rem; }
.vents { display:flex; gap:4px; } .vents i { width:3px; height:18px; border-radius:2px; background:rgba(0,0,0,.35); box-shadow:1px 0 0 rgba(255,255,255,.5); }
.led { width:9px; height:9px; border-radius:50%; background:#3cff6b; border:1px solid #1a1a1a; box-shadow:0 0 8px 2px rgba(60,255,107,.65); }

@media (max-width:760px) {
  #crt { padding:6px 6px 0; }
  .crt-bezel { padding:5px; border-radius:18px; }
  .crt-screen { border-radius:14px / 13px; }
  .crt-chin { height:26px; } .crt-chin .slot, .crt-chin .vents { display:none; } .crt-chin .brand { font-size:.6rem; }
}
@media (max-width:560px) { .xp-start { padding:0 12px 0 8px; font-size:1.1rem; } .xp-tray #xp-clock { display:none; } .xp-tray { padding:0 10px; } }
@media (prefers-reduced-motion: reduce) { .crt-inner.boot { animation:none; } }
