@font-face { font-family: 'Bebas Neue'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/bebas-neue-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 300; font-display: swap; src: url('/fonts/ibm-plex-mono-300.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/ibm-plex-mono-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/ibm-plex-mono-500.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/ibm-plex-mono-700.woff2') format('woff2'); }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --g:  #39ff14;
  --g2: rgba(57,255,20,0.62);
  --g3: rgba(57,255,20,0.44);
  --g4: rgba(57,255,20,0.22);
  --g5: rgba(57,255,20,0.05);
  --bg:  #030803;
  --bg2: #060e06;
  --mid: #0d1a0d;
  --mono: 'IBM Plex Mono', monospace;
  --disp: 'Bebas Neue', sans-serif;
  /* ANSI CGA 16-color palette */
  --a-black:    #000000;
  --a-red:      #AA0000;
  --a-green:    #00AA00;
  --a-brown:    #AA5500;
  --a-blue:     #0000AA;
  --a-magenta:  #AA00AA;
  --a-cyan:     #00AAAA;
  --a-lgray:    #AAAAAA;
  --a-dgray:    #555555;
  --a-bred:     #FF5555;
  --a-bgreen:   #55FF55;
  --a-yellow:   #FFFF55;
  --a-bblue:    #5555FF;
  --a-bmagenta: #FF55FF;
  --a-bcyan:    #55FFFF;
  --a-white:    #FFFFFF;
  --bbs-bg:     #000820;
}

html, body { height: 100%; overflow: hidden; }
body {
  background: radial-gradient(ellipse at 50% 35%, #0c120c 0%, #050805 50%, #020302 100%);
  font-family: var(--mono); font-size: 15px; color: var(--g);
}
.desk-glow {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 800px; height: 140px; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(255,255,255,0.06) 0%, transparent 70%);
}

.scale-root { position: fixed; transform-origin: top left; z-index: 1; opacity: 0;
  filter: drop-shadow(0 60px 120px rgba(0,0,0,0.98)) drop-shadow(0 0 100px rgba(255,255,255,0.06)); }

/* ============================================================
   MONITOR
============================================================ */
.monitor-wrap {
  display: flex; flex-direction: column; align-items: center;
}

.monitor-body {
  position: relative; width: 1000px;
  background: linear-gradient(150deg,
    #b8b09a 0%, #ada896 12%, #a5a08c 35%,
    #9e9884 55%, #a4a08a 78%, #a09c86 100%);
  border-radius: 22px;
  padding: 28px 38px 80px;
  box-shadow:
    inset  0    1px  0   rgba(255,255,255,0.22),
    inset  1px  0    0   rgba(255,255,255,0.1),
    inset -1px  0    0   rgba(0,0,0,0.12),
    inset  0   -1px  0   rgba(0,0,0,0.18),
    0 0 0 1px rgba(40,36,28,0.55),
    0 8px 32px rgba(0,0,0,0.65);
}

.monitor-bezel {
  background: #060606; border-radius: 20px; padding: 0; overflow: hidden;
  box-shadow:
    inset 0 3px 14px rgba(0,0,0,0.98),
    inset 0 0 50px rgba(0,0,0,0.9),
    0 0 40px rgba(57,255,20,0.05);
}

.screen-container {
  position: relative;
  width: 100%; height: 750px;
  border-radius: 12px;
  overflow: hidden;
}
.screen-glass {
  position: absolute; inset: 0; pointer-events: none; z-index: 10;
}
.monitor-screen {
  width: 100%; height: 100%;
  border-radius: 12px; overflow: hidden;
  position: relative; background: #000820;
  filter: url(#barrel-distort);
  box-shadow:
    inset 0 0 100px 28px rgba(0,0,0,0.65),
    inset 0 0 6px 2px rgba(0,0,0,0.95),
    inset 6px 6px 30px rgba(0,0,0,0.5),
    inset -6px -6px 30px rgba(0,0,0,0.5);
}

/* Degauss animation on the screen element */
@keyframes degaussAnim {
  0%   { transform: scaleX(1)     scaleY(1);     filter: brightness(1)   contrast(1)   blur(0px); }
  4%   { transform: scaleX(1.055) scaleY(0.945); filter: brightness(3.2) contrast(0.3) blur(2px); }
  9%   { transform: scaleX(0.945) scaleY(1.055); filter: brightness(0.25) contrast(2.2) blur(1px); }
  15%  { transform: scaleX(1.04)  scaleY(0.965); filter: brightness(2.4) contrast(0.5) blur(1.5px); }
  22%  { transform: scaleX(0.965) scaleY(1.035); filter: brightness(0.5) contrast(1.9) blur(0.8px); }
  30%  { transform: scaleX(1.025) scaleY(0.978); filter: brightness(1.7) contrast(0.8) blur(0.5px); }
  39%  { transform: scaleX(0.988) scaleY(1.012); filter: brightness(1.2) contrast(1.15) blur(0.3px); }
  50%  { transform: scaleX(1.008) scaleY(0.993); filter: brightness(1.05) contrast(1.05) blur(0px); }
  63%  { transform: scaleX(0.997) scaleY(1.003); filter: brightness(1.02) contrast(1.02); }
  78%  { transform: scaleX(1)     scaleY(1);     filter: brightness(1)   contrast(1); }
  100% { transform: scaleX(1)     scaleY(1);     filter: brightness(1)   contrast(1); }
}
.monitor-screen.degaussing,
#henOverlay.degaussing { animation: degaussAnim 1.35s ease-out forwards; }

/* Glass layers */
.scanlines {
  position: absolute; inset: 0; z-index: 50; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom, transparent 0px, transparent 2px,
    rgba(0,0,0,0.12) 2px, rgba(0,0,0,0.12) 4px);
}
@keyframes scanSweep {
  0%   { top: -8%; }
  100% { top: 108%; }
}
.scan-sweep {
  position: absolute; left: 0; right: 0; height: 8%;
  z-index: 50; pointer-events: none; will-change: transform;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255,255,255,0.016) 40%,
    rgba(255,255,255,0.030) 50%,
    rgba(255,255,255,0.016) 60%,
    transparent 100%
  );
  animation: scanSweep 3s linear infinite;
}
.glass-tint  { position: absolute; inset: 0; z-index: 51; pointer-events: none; background: rgba(0,0,8,0.07); }
.glass-glare {
  position: absolute; inset: 0; z-index: 52; pointer-events: none;
  background:
    radial-gradient(ellipse at 30% 22%, rgba(255,255,255,0.055) 0%, rgba(255,255,255,0.01) 28%, transparent 52%),
    radial-gradient(ellipse at 70% 80%, rgba(255,255,255,0.008) 0%, transparent 35%);
}
.screen-vignette {
  position: absolute; inset: 0; z-index: 53; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 36%, rgba(0,0,0,0.41) 100%);
}
@keyframes grainShift {
  0%   { transform: translate(  0px,   0px); }
  10%  { transform: translate(-15px, -10px); }
  20%  { transform: translate( 10px,  15px); }
  30%  { transform: translate( -5px,  20px); }
  40%  { transform: translate( 20px,  -5px); }
  50%  { transform: translate(-20px,  10px); }
  60%  { transform: translate( 15px, -20px); }
  70%  { transform: translate(-10px,  15px); }
  80%  { transform: translate(  5px, -10px); }
  90%  { transform: translate(-15px, -15px); }
}
.screen-grain {
  position: absolute; inset: -25px; z-index: 54; pointer-events: none;
  opacity: 0.3; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  will-change: transform;
  animation: grainShift 0.15s steps(1, end) infinite;
}

.power-line {
  position: absolute; z-index: 200; pointer-events: none;
  left: 0; right: 0; top: 50%; transform: translateY(-50%);
  height: 4px;
  background: linear-gradient(90deg,
    transparent 0%, rgba(57,255,20,0.3) 8%,
    rgba(180,255,180,0.9) 25%, rgba(255,255,255,1) 50%,
    rgba(180,255,180,0.9) 75%, rgba(57,255,20,0.3) 92%, transparent 100%);
  filter: blur(0.5px); display: none;
}
.power-line.active { display: block; }
.power-line.fading { animation: lineFade 1s ease-out forwards; }
@keyframes lineFade {
  0%   { opacity: 1; height: 4px; filter: blur(0px); transform: translateY(-50%) scaleX(1); }
  25%  { height: 3px; }
  60%  { opacity: 0.5; height: 2px; filter: blur(1px); }
  100% { opacity: 0; height: 1px; filter: blur(3px); transform: translateY(-50%) scaleX(0.8); }
}

@keyframes crtTurnOff {
  0%   { transform: scaleY(1);     filter: brightness(1); }
  18%  { transform: scaleY(0.25);  filter: brightness(1.6); }
  45%  { transform: scaleY(0.018); filter: brightness(4); }
  70%  { transform: scaleY(0.007); filter: brightness(2.5); }
  88%  { transform: scaleY(0.003) scaleX(0.97); filter: brightness(1.2); }
  100% { transform: scaleY(0.001) scaleX(0.9);  filter: brightness(0); opacity: 0; }
}
@keyframes crtTurnOn {
  0%   { transform: scaleY(0.001) scaleX(0.75); filter: brightness(0);   opacity: 0; }
  8%   { transform: scaleY(0.002) scaleX(1.08); filter: brightness(7);   opacity: 1; }
  20%  { transform: scaleY(0.012) scaleX(1.03); filter: brightness(4.5); }
  40%  { transform: scaleY(0.12)  scaleX(1.01); filter: brightness(2.5); }
  62%  { transform: scaleY(1.04)  scaleX(1);    filter: brightness(1.6); }
  78%  { transform: scaleY(0.97)  scaleX(1);    filter: brightness(1);   }
  90%  { transform: scaleY(1.01)  scaleX(1);    filter: brightness(1.05); }
  100% { transform: scaleY(1)     scaleX(1);    filter: brightness(1);   }
}

/* ============================================================
   CHIN
============================================================ */
.monitor-chin {
  position: absolute; bottom: 0; left: 0; right: 0; height: 78px;
  display: flex; align-items: center; padding: 0 30px; gap: 18px;
  border-top: 1px solid rgba(0,0,0,0.55);
}

/* Power */
.power-btn {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; cursor: pointer;
  background: radial-gradient(circle at 38% 35%, #b8ac84 0%, #a89c74 55%, #9c9068 100%);
  border: 1px solid rgba(80,70,40,0.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), inset 0 -1px 0 rgba(0,0,0,0.2), 0 3px 6px rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.08s, box-shadow 0.08s; position: relative; z-index: 10;
}
.power-btn:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), inset 0 -1px 0 rgba(0,0,0,0.2), 0 3px 8px rgba(0,0,0,0.4), 0 0 8px rgba(57,255,20,0.15); }
.power-btn:active { transform: scale(0.92); box-shadow: inset 0 2px 5px rgba(0,0,0,0.3), 0 1px 3px rgba(0,0,0,0.3); }
#powerLed {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--g); transition: background 0.4s, box-shadow 0.4s;
  box-shadow: 0 0 5px var(--g), 0 0 12px rgba(57,255,20,0.55);
}
#powerLed.on  { background: var(--g); animation: ledPulse 4s ease-in-out infinite; }
#powerLed.off { background: rgba(57,255,20,0.18); box-shadow: 0 0 2px rgba(57,255,20,0.2); animation: none; }
@keyframes ledPulse {
  0%,100% { opacity: 1;   box-shadow: 0 0 5px var(--g), 0 0 12px rgba(57,255,20,0.55); }
  50%      { opacity: 0.4; box-shadow: 0 0 2px var(--g), 0 0 5px rgba(57,255,20,0.3); }
}

/* Dials with labels */
.chin-dials { display: flex; gap: 12px; }
.dial-group  { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.chin-label  { font-family: var(--mono); font-size: 0.38rem; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(0,0,0,0.22); user-select: none; }

.dial {
  width: 22px; height: 22px; border-radius: 50%; position: relative;
  background: radial-gradient(circle at 40% 35%, #b0a47a 0%, #a09468 70%, #948860 100%);
  border: 1px solid rgba(80,70,40,0.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 2px 4px rgba(0,0,0,0.35);
  cursor: ns-resize; user-select: none;
  transition: box-shadow 0.1s;
}
.dial:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 2px 6px rgba(0,0,0,0.45), 0 0 6px rgba(57,255,20,0.1); }
.dial::after {
  content: ''; position: absolute; top: 3px; left: 50%; transform: translateX(-50%);
  width: 2px; height: 7px; background: rgba(0,0,0,0.35); border-radius: 1px;
}

/* Brand — absolutely centered in chin */
.brand-plate {
  position: absolute; left: 50%; transform: translateX(-50%);
  text-align: center; pointer-events: none;
}
.brand-name  { font-size: 0.65rem; letter-spacing: 6px; color: rgba(0,0,0,0.2); text-transform: uppercase; display: block; }
.brand-model { font-size: 0.5rem; letter-spacing: 3px; color: rgba(0,0,0,0.12); text-transform: uppercase; margin-top: 2px; display: block; }

/* Degauss button */
.degauss-group { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-left: auto; }
.degauss-btn {
  width: 28px; height: 18px;
  background: linear-gradient(to bottom, #b8ac84, #a89c74);
  border-radius: 3px; border: 1px solid rgba(80,70,40,0.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 2px 5px rgba(0,0,0,0.35);
  cursor: pointer; transition: transform 0.07s, box-shadow 0.07s;
}
.degauss-btn:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 2px 6px rgba(0,0,0,0.4), 0 0 8px rgba(57,255,20,0.12); }
.degauss-btn:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(0,0,0,0.35), 0 1px 2px rgba(0,0,0,0.3); }

/* ============================================================
   STAND
============================================================ */
.monitor-neck {
  display: none;
}
.monitor-base {
  width: 560px; height: 16px; border-radius: 4px 4px 18px 18px;
  background: linear-gradient(to bottom, #c4b88c 0%, #b8ac80 50%, #aca072 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 12px 35px rgba(0,0,0,0.7), 0 4px 12px rgba(0,0,0,0.4);
}


/* BOOT OVERLAY */
#bootOverlay {
  position:absolute; inset:0; z-index:12;
  background:var(--bbs-bg);
  padding:28px 36px;
  font-family:var(--mono); font-size:.8125rem; color:var(--a-lgray);
  line-height:1.78; letter-spacing:.3px;
  transition:opacity 0.6s ease;
}
.boot-ok { color:var(--a-bgreen); }

#introScreen {
  display: none;
  position: absolute; inset: 0; z-index: 13;
  background: var(--bbs-bg);
  align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .8125rem; color: var(--a-lgray);
  line-height: 1.8; letter-spacing: .3px;
}
#introScreen pre {
  margin: 0; text-align: center; color: var(--a-lgray);
  white-space: pre;
}
@keyframes introBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}
.intro-prompt {
  color: var(--a-white);
  animation: introBlink 1.2s ease-in-out infinite;
}

/* ============================================================
   RESPONSIVE — desktop/mobile visibility
============================================================ */
#mobileView { display: none; }
@media (max-width: 768px) {
  #desktopView { display: none !important; }
  #mobileView {
    display: flex; align-items: center; justify-content: center;
    position: fixed; inset: 0; background: #0a0a0a;
  }
  body { font-family: -apple-system, Helvetica, Arial, sans-serif; background: #0a0a0a; }
}

/* ============================================================
   IPHONE HARDWARE
============================================================ */
.iphone-scale-root { position: fixed; transform-origin: top left; z-index: 1; opacity: 0; }
.iphone-stage { width: 342px; height: 608px; display: flex; align-items: center; justify-content: center; }

@keyframes vibrate {
  0%,100% { transform: rotate(0deg); }
  8%  { transform: rotate(-2.6deg); }
  18% { transform: rotate(2.6deg); }
  27% { transform: rotate(-3deg); }
  37% { transform: rotate(3deg); }
  47% { transform: rotate(-2.2deg); }
  57% { transform: rotate(2.2deg); }
  66% { transform: rotate(-1.4deg); }
  75% { transform: rotate(1.4deg); }
  84% { transform: rotate(-0.6deg); }
  92% { transform: rotate(0.6deg); }
}
.iphone-body.vibrating { animation: vibrate 0.65s ease-out; }

.iphone-body {
  width: 324px; position: relative;
  background: linear-gradient(175deg, #1e1e20, #111 35%, #080808);
  border-radius: 44px;
  box-shadow: 0 0 0 1px #999, 0 0 0 2.5px #555, 0 0 0 4px #999, 0 0 0 5.5px #3a3a3a,
    0 28px 70px rgba(0,0,0,0.96), 0 6px 24px rgba(0,0,0,0.7);
}
.iphone-top { height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.earpiece { width: 58px; height: 6px; border-radius: 3px; background: #000; position: relative; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.9), 0 0 0 1px #252525; }
.earpiece::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent, transparent 1.5px, rgba(0,0,0,0.6) 1.5px, rgba(0,0,0,0.6) 2.5px); }
.ambient-sensor { width: 4px; height: 4px; border-radius: 50%; background: #0a0a0a; box-shadow: 0 0 0 1px #1a1a1a; }
.iphone-screen-wrap { margin: 0 8px; background: #000; border-radius: 6px; overflow: hidden; position: relative; box-shadow: inset 0 0 0 1px #1a1a1a; }
.iphone-screen { width: 100%; height: 440px; position: relative; overflow: hidden; background: #000; }
.iphone-bottom { height: 108px; display: flex; align-items: center; justify-content: center; }
.home-btn { width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle at 38% 28%, #dcdcde, #adadb2 45%, #7a7a82); box-shadow: 0 0 0 1.5px #555, 0 0 0 3px #b0b0b8, 0 0 0 4.5px #444, inset 0 1px 0 rgba(255,255,255,0.75), 0 4px 14px rgba(0,0,0,0.88); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.08s; }
.home-btn:active { transform: scale(0.92); }
.home-btn-inner { width: 24px; height: 24px; border-radius: 5px; background: radial-gradient(circle at 38% 28%, #c4c4c8, #7e7e88); border: 1.5px solid rgba(120,120,130,0.8); box-shadow: inset 0 1px 3px rgba(0,0,0,0.45), 0 1px 0 rgba(255,255,255,0.45); }
.iphone-body::before { content: ''; position: absolute; left: -7px; top: 95px; width: 5px; height: 28px; background: linear-gradient(to right, #555, #999, #666); border-radius: 3px 0 0 3px; box-shadow: 0 38px 0 #777; }
.iphone-body::after { content: ''; position: absolute; right: -7px; top: 115px; width: 5px; height: 50px; background: linear-gradient(to left, #555, #999, #666); border-radius: 0 3px 3px 0; }

/* ============================================================
   IPHONE SCREEN LAYERS
============================================================ */
.i-screen { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity 0.5s ease; }
.i-screen.active { opacity: 1; pointer-events: all; }

/* Boot */
#screenBoot { background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.apple-logo-wrap { width: 42px; height: 50px; }
.apple-logo-wrap svg { width: 100%; height: 100%; }
.boot-spinner { width: 22px; height: 22px; border: 2px solid rgba(255,255,255,0.18); border-top-color: rgba(255,255,255,0.75); border-radius: 50%; animation: i-spin 0.8s linear infinite; }
@keyframes i-spin { to { transform: rotate(360deg); } }

/* Lock screen */
#screenLock { background: linear-gradient(to bottom, #0a0a14 0%, #060608 100%); display: flex; flex-direction: column; }
.lock-status { height: 22px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: bold; color: rgba(255,255,255,0.85); }
.i-bars { display: flex; align-items: flex-end; gap: 2px; }
.i-bar { width: 3px; background: rgba(255,255,255,0.85); border-radius: 1px; }
.i-bar:nth-child(1){height:4px}.i-bar:nth-child(2){height:6px}.i-bar:nth-child(3){height:8px}.i-bar:nth-child(4){height:10px}.i-bar:nth-child(5){height:12px}
.i-batt { width: 20px; height: 10px; border: 1.5px solid rgba(255,255,255,0.8); border-radius: 2px; position: relative; }
.i-batt::after { content:''; position:absolute; right:-4px; top:50%; transform:translateY(-50%); width:2px; height:5px; background:rgba(255,255,255,0.6); border-radius:0 1px 1px 0; }
.i-batt-fill { position:absolute; left:1px; top:1px; bottom:1px; width:70%; background:rgba(255,255,255,0.85); border-radius:1px; }
.lock-clock-area { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-bottom: 40px; }
.lock-time { font-size: 72px; font-weight: 100; color: white; letter-spacing: -4px; line-height: 1; text-shadow: 0 0 40px rgba(255,255,255,0.15); }
.lock-date { font-size: 14px; color: rgba(255,255,255,0.6); margin-top: 6px; letter-spacing: 0.3px; }
.slide-track { position: absolute; bottom: 22px; left: 14px; right: 14px; height: 46px; border-radius: 23px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.18); display: flex; align-items: center; overflow: hidden; padding-right: 6px; }
.slide-thumb { width: 38px; height: 38px; flex-shrink: 0; background: linear-gradient(to bottom, #fff, #d8d8d8); border-radius: 19px; margin-left: 4px; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,0.4); transform: translateX(0); transition: transform 0.9s cubic-bezier(0.25,0.46,0.45,0.94); z-index: 2; position: relative; }
.slide-thumb-arrow { font-size: 18px; color: #aaa; line-height: 1; }
.slide-text-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.slide-text { font-size: 16px; font-weight: 300; letter-spacing: 1.5px; padding-left: 12px; background: linear-gradient(90deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.9) 35%, rgba(255,255,255,0.18) 70%, rgba(255,255,255,0.08) 100%); background-size: 250% 100%; background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: i-shimmer 2.2s linear infinite; }
@keyframes i-shimmer { 0% { background-position: 120% 0; } 100% { background-position: -120% 0; } }

/* Status bar (springboard + app) */
.i-status-bar { height: 22px; padding: 0 9px; flex-shrink: 0; background: rgba(0,0,0,0.88); display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: bold; color: #fff; position: relative; z-index: 10; cursor: pointer; user-select: none; }

/* Springboard */
#screenSpringboard { display: flex; flex-direction: column; background: linear-gradient(to bottom, #0a0a0e, #06060a 60%, #030305); }
.springboard-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.notif-banner { position: absolute; top: 0; left: 0; right: 0; z-index: 500; transform: translateY(-110%); transition: transform 0.4s cubic-bezier(0.34,1.1,0.64,1); pointer-events: none; }
.notif-banner.show { transform: translateY(0); pointer-events: all; }
.notif-inner { margin: 6px 8px; background: rgba(28,28,32,0.95); border-radius: 13px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; box-shadow: 0 4px 20px rgba(0,0,0,0.65), 0 1px 0 rgba(255,255,255,0.07); cursor: pointer; }
.notif-icon { width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0; background: linear-gradient(145deg, #0a5510, #148020 60%, #1aaa28); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.notif-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; background: #e0000e; border-radius: 9px; border: 2px solid #0a0a0e; color: white; font-size: 11px; font-weight: bold; display: flex; align-items: center; justify-content: center; padding: 0 4px; z-index: 50; font-family: -apple-system, Arial, sans-serif; }
.notif-text { flex: 1; }
.notif-app  { font-size: 11px; color: rgba(255,255,255,0.45); font-weight: 600; letter-spacing: 0.3px; margin-bottom: 2px; }
.notif-msg  { font-size: 13px; color: #fff; font-weight: 500; line-height: 1.3; }
.notif-time { font-size: 11px; color: rgba(255,255,255,0.35); align-self: flex-start; margin-top: 1px; }

/* Icon grid */
.icon-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px 0; padding: 14px 4px 8px; flex: 1; align-content: start; }
.app-icon { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.app-icon-img { width: 60px; height: 60px; border-radius: 14px; position: relative; overflow: hidden; box-shadow: 0 3px 8px rgba(0,0,0,0.55), 0 1px 2px rgba(0,0,0,0.3); transition: transform 0.1s; }
.app-icon:active .app-icon-img { transform: scale(0.87); }
.app-icon-img::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 46%; background: linear-gradient(to bottom, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.08) 55%, rgba(255,255,255,0.0) 100%); border-radius: 14px 14px 50% 50% / 14px 14px 30px 30px; z-index: 20; pointer-events: none; }
.icon-home    { background: linear-gradient(160deg, #0a2010, #0f3018 40%, #1a5022); }
.icon-work    { background: linear-gradient(160deg, #0a1535, #142050 40%, #1e3a8a); }
.icon-skills  { background: linear-gradient(160deg, #2a1200, #4a2000 40%, #8a3800); }
.icon-messages { background: linear-gradient(160deg, #0a5510, #148020 40%, #1aaa28); }
.icon-snake   { background: linear-gradient(160deg, #021804, #042a04 40%, #063a06); }
.icon-cats    { background: linear-gradient(160deg, #2a1018, #4a1535 40%, #7a1a50); }
.icon-phone   { background: linear-gradient(160deg, #4cd964, #25a838); }
.icon-mail    { background: linear-gradient(160deg, #5ac8fa, #007aff); }
.icon-safari  { background: radial-gradient(circle at 42% 32%, #72cee8 0%, #1e78ca 45%, #0d4fad 100%); }
.icon-ipod    { background: linear-gradient(160deg, #ff80c0, #b5009f); }
.icon-weather { background: linear-gradient(160deg, #5ac8fa, #3478f6); }
.icon-calc    { background: linear-gradient(160deg, #777, #1c1c1c); }
.icon-calendar { background: linear-gradient(160deg, #c41230, #e52b2b); }
.i-icon-content { position: absolute; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; }
.icon-prompt { font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 21px; color: rgba(57,255,20,0.95); text-shadow: 0 0 14px rgba(57,255,20,0.6); letter-spacing: -1px; }
.icon-doc { width: 30px; height: 36px; background: rgba(255,255,255,0.92); border-radius: 3px 0 3px 3px; position: relative; }
.icon-doc::before { content: ''; position: absolute; top: 0; right: 0; width: 0; height: 0; border-style: solid; border-width: 0 9px 9px 0; border-color: transparent rgba(30,60,138,0.6) transparent transparent; }
.icon-doc-line { position: absolute; left: 5px; right: 5px; height: 1.5px; background: rgba(30,60,138,0.35); border-radius: 1px; }
.icon-code { font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 19px; color: rgba(255,255,255,0.92); letter-spacing: -1px; }
.icon-bubble-wrap { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.icon-bubble { width: 36px; height: 28px; background: white; border-radius: 8px; position: relative; }
.icon-bubble::after { content: ''; position: absolute; bottom: -7px; left: 8px; border-top: 8px solid white; border-right: 8px solid transparent; border-left: 2px solid transparent; }
.icon-emoji { font-size: 32px; line-height: 1; }
.app-label { font-size: 11px; color: rgba(255,255,255,0.92); text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,0.9); }
.icon-youtube { background: linear-gradient(155deg, #1a0000, #2d0000 45%, #1a0000); }
/* Messages app */
.msg-wrap { display: flex; flex-direction: column; flex: 1; background: #fff; overflow: hidden; }
.msg-inbox-row { display: flex; align-items: center; padding: 12px 14px; border-bottom: 1px solid #e5e5ea; cursor: pointer; gap: 12px; }
.msg-avatar { width: 44px; height: 44px; border-radius: 22px; background: linear-gradient(145deg, #25a025, #1a7a1a); display: flex; align-items: center; justify-content: center; font-size: 18px; color: white; font-weight: bold; flex-shrink: 0; font-family: -apple-system, Arial, sans-serif; }
.msg-row-text { flex: 1; min-width: 0; }
.msg-row-name { font-size: 14px; font-weight: bold; color: #1c1c1e; font-family: -apple-system, Arial, sans-serif; }
.msg-row-preview { font-size: 13px; color: #8e8e93; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: -apple-system, Arial, sans-serif; }
.msg-row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.msg-row-time { font-size: 11px; color: #8e8e93; font-family: -apple-system, Arial, sans-serif; }
.msg-unread-dot { width: 10px; height: 10px; background: #007aff; border-radius: 50%; }
.msg-thread-wrap { display: flex; flex-direction: column; flex: 1; background: #fff; overflow: hidden; }
.msg-thread { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.msg-bubble-row { display: flex; }
.msg-bubble-row.from-me { justify-content: flex-end; }
.msg-bubble-row.from-them { justify-content: flex-start; }
.msg-bubble { max-width: 75%; padding: 9px 13px; border-radius: 18px; font-size: 13px; line-height: 1.4; font-family: -apple-system, Arial, sans-serif; }
.msg-bubble.from-me { background: #007aff; color: white; border-bottom-right-radius: 4px; }
.msg-bubble.from-them { background: #e5e5ea; color: #1c1c1e; border-bottom-left-radius: 4px; }
.msg-timestamp { font-size: 10px; color: #8e8e93; text-align: center; margin: 4px 0; font-family: -apple-system, Arial, sans-serif; }
.msg-input-row { display: flex; align-items: center; padding: 8px 10px; border-top: 1px solid #d1d1d6; gap: 8px; background: #fff; flex-shrink: 0; }
.msg-input { flex: 1; border: 1px solid #d1d1d6; border-radius: 18px; padding: 7px 14px; font-size: 13px; outline: none; font-family: -apple-system, Arial, sans-serif; }
.msg-send-btn { width: 30px; height: 30px; border-radius: 50%; background: #007aff; border: none; color: white; font-size: 16px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.msg-typing-wrap { display: flex; align-items: center; gap: 4px; background: #e5e5ea; border-radius: 18px 18px 18px 4px; padding: 10px 14px; width: fit-content; }
.msg-typing-dot { width: 6px; height: 6px; border-radius: 50%; background: #8e8e93; animation: msgDot 1.2s infinite; }
.msg-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.msg-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes msgDot { 0%,60%,100% { opacity:0.3; transform:translateY(0); } 30% { opacity:1; transform:translateY(-4px); } }
.msg-cal-btn { display: inline-block; background: rgba(255,255,255,0.22); color: #fff; border: 1.5px solid rgba(255,255,255,0.5); border-radius: 14px; padding: 6px 13px; margin: 5px 0 2px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: -apple-system, Arial, sans-serif; }
.i-dock { background: linear-gradient(to bottom, rgba(195,202,215,0.45), rgba(148,155,172,0.35) 55%, rgba(105,112,130,0.3)); border-top: 1px solid rgba(255,255,255,0.32); padding: 10px 2px 14px; display: grid; grid-template-columns: repeat(4,1fr); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.22); }
.i-dock .app-icon-img { width: 58px; height: 58px; border-radius: 14px; }

/* App view */
.app-view { position: absolute; inset: 0; z-index: 300; display: flex; flex-direction: column; transform: scale(0.06); opacity: 0; transform-origin: center center; transition: transform 0.28s cubic-bezier(0.25,0.46,0.45,0.94), opacity 0.16s; pointer-events: none; background: #f2f2f7; }
.app-view.open { transform: scale(1); opacity: 1; pointer-events: all; }
.app-nav-bar { background: linear-gradient(to bottom, #c8cfd7, #b0b8c2 50%, #a8b0ba 51%, #b8c0ca); border-bottom: 1px solid #7a8290; height: 44px; flex-shrink: 0; display: flex; align-items: center; padding: 0 8px; gap: 6px; box-shadow: 0 1px 4px rgba(0,0,0,0.35); }
.nav-back-btn { background: linear-gradient(to bottom, #6a9aca, #3a6a9a 50%, #2a5a8a 51%, #4a7aaa); border: 1px solid #1a4a7a; border-radius: 8px; padding: 5px 10px 5px 4px; font-size: 12px; color: #fff; font-weight: bold; display: flex; align-items: center; gap: 2px; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 1px 3px rgba(0,0,0,0.35); white-space: nowrap; max-width: 80px; overflow: hidden; }
.nav-back-btn::before { content: '‹'; font-size: 18px; line-height: 1; margin-top: -1px; }
.nav-back-btn:active { filter: brightness(0.85); }
.i-nav-title { flex: 1; text-align: center; font-size: 18px; font-weight: bold; color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,0.45); letter-spacing: -0.4px; }
.app-content { flex: 1; overflow-y: auto; background: #f2f2f7; display: flex; flex-direction: column; }

/* Safari mini-browser */
.safari-chrome { background: linear-gradient(to bottom, #ccc, #aaa); padding: 6px 8px; flex-shrink: 0; }
.safari-url-bar { background: rgba(255,255,255,0.88); border-radius: 8px; height: 26px; display: flex; align-items: center; padding: 0 8px; gap: 5px; border: 1px solid #888; }
.safari-url-text { flex: 1; text-align: center; font-size: 11px; color: #333; font-family: -apple-system, sans-serif; }
.safari-page { flex: 1; overflow-y: auto; background: #fff; }

/* iPod */
.ipod-wrap { display: flex; flex-direction: column; flex: 1; background: #fff; }
.ipod-art-area { padding: 14px 0 6px; display: flex; justify-content: center; flex-shrink: 0; }
.ipod-art { width: 162px; height: 162px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 64px; box-shadow: 3px 5px 20px rgba(0,0,0,0.4); background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); }
.ipod-info { text-align: center; padding: 6px 20px 0; flex-shrink: 0; }
.ipod-title { font-size: 15px; font-weight: bold; color: #1c1c1e; font-family: -apple-system, sans-serif; }
.ipod-artist { font-size: 12px; color: #8e8e93; margin-top: 2px; font-family: -apple-system, sans-serif; }
.ipod-scrub { padding: 8px 20px 2px; flex-shrink: 0; }
.ipod-track { width: 100%; height: 3px; background: #e5e5ea; border-radius: 2px; }
.ipod-fill { height: 100%; background: #1c1c1e; border-radius: 2px; width: 0%; transition: width 0.5s linear; }
.ipod-times { display: flex; justify-content: space-between; font-size: 10px; color: #8e8e93; margin-top: 3px; font-family: -apple-system, sans-serif; }
.ipod-ctrls { display: flex; align-items: center; justify-content: center; gap: 36px; padding: 8px 0 6px; flex-shrink: 0; }
.ipod-ctrl-btn { background: none; border: none; cursor: pointer; font-size: 28px; color: #1c1c1e; line-height: 1; padding: 4px; }
.ipod-ctrl-btn:active { opacity: 0.5; }
.ipod-vol-row { display: flex; align-items: center; padding: 0 20px 6px; gap: 10px; flex-shrink: 0; }
.ipod-vol-slider { flex: 1; height: 3px; background: #e5e5ea; border-radius: 2px; }
.ipod-vol-fill { width: 65%; height: 100%; background: #8e8e93; border-radius: 2px; }
.ipod-tabs { display: flex; border-top: 1px solid #d1d1d6; background: linear-gradient(to bottom, #f2f2f7, #e8e8ed); flex-shrink: 0; }
.ipod-tab { flex: 1; padding: 4px 0; text-align: center; font-size: 7px; color: #8e8e93; font-family: -apple-system, sans-serif; line-height: 1.2; }
.ipod-tab.active { color: #007aff; }
.ipod-tab-icon { font-size: 17px; display: block; margin-bottom: 1px; }

/* Weather */
.wx-wrap { display: flex; flex-direction: column; flex: 1; background: linear-gradient(170deg, #1566b3 0%, #4ba3e3 50%, #5fc0f8 100%); color: #fff; }
.wx-city { text-align: center; padding: 22px 0 4px; font-size: 22px; font-weight: 300; font-family: -apple-system, sans-serif; }
.wx-temp { text-align: center; font-size: 78px; font-weight: 100; line-height: 1; padding: 6px 0 4px; font-family: -apple-system, sans-serif; }
.wx-cond { text-align: center; font-size: 17px; font-weight: 300; opacity: 0.92; font-family: -apple-system, sans-serif; }
.wx-hi-lo { text-align: center; font-size: 13px; opacity: 0.8; padding-top: 4px; font-weight: 300; font-family: -apple-system, sans-serif; }
.wx-sun-row { display: flex; justify-content: center; gap: 28px; padding: 14px 0 0; font-size: 12px; opacity: 0.85; font-family: -apple-system, sans-serif; }
.wx-spacer { flex: 1; min-height: 16px; }
.wx-forecast { background: rgba(255,255,255,0.18); border-top: 1px solid rgba(255,255,255,0.3); display: flex; flex-shrink: 0; }
.wx-day { flex: 1; text-align: center; padding: 10px 0; border-right: 1px solid rgba(255,255,255,0.2); }
.wx-day:last-child { border-right: none; }
.wx-day-name { font-size: 10px; font-weight: 600; opacity: 0.85; font-family: -apple-system, sans-serif; }
.wx-day-icon { font-size: 20px; margin: 4px 0; }
.wx-day-temp { font-size: 12px; font-weight: 300; font-family: -apple-system, sans-serif; }

/* YouTube 2007 */
.yt-wrap { display: flex; flex-direction: column; flex: 1; background: #fff; font-family: Arial, Helvetica, sans-serif; overflow: hidden; }
.yt-header { background: #000; padding: 7px 10px; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.yt-logo { display: flex; align-items: stretch; height: 20px; flex-shrink: 0; }
.yt-logo-you { background: #c00; color: #fff; font-size: 11px; font-weight: 900; padding: 0 5px; display: flex; align-items: center; border-radius: 3px 0 0 3px; }
.yt-logo-tube { background: #fff; color: #000; font-size: 11px; font-weight: 900; padding: 0 5px; display: flex; align-items: center; border-radius: 0 3px 3px 0; }
.yt-search { flex: 1; background: #222; border: 1px solid #444; color: #fff; padding: 3px 7px; border-radius: 3px; font-size: 11px; outline: none; }
.yt-search::placeholder { color: #888; }
.yt-player { background: #000; width: 100%; aspect-ratio: 16/9; position: relative; flex-shrink: 0; cursor: pointer; overflow: hidden; }
.yt-thumb { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 60px; background: radial-gradient(circle at 50% 60%, #1a0a00, #000); }
.yt-play-btn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.yt-play-circle { width: 48px; height: 48px; background: rgba(200,0,0,0.88); border-radius: 10px; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 12px rgba(0,0,0,0.6); }
.yt-play-triangle { width: 0; height: 0; border-top: 14px solid transparent; border-bottom: 14px solid transparent; border-left: 22px solid white; margin-left: 5px; }
.yt-anim { position: absolute; inset: 0; background: #000; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 0; }
.yt-anim.active { display: flex; }
.yt-notes { height: 32px; display: flex; align-items: flex-end; gap: 12px; margin-bottom: 2px; }
.yt-note { font-size: 18px; color: #ff0; opacity: 0; animation: ytNote 1.4s ease-out infinite; }
.yt-note:nth-child(2) { animation-delay: 0.45s; font-size: 14px; color: #fa0; }
.yt-note:nth-child(3) { animation-delay: 0.9s; font-size: 16px; color: #ff0; }
.yt-cat-body { font-size: 44px; animation: ytBop 0.55s ease-in-out infinite; display: block; }
.yt-paws { display: flex; gap: 6px; margin-top: -6px; }
.yt-paw { font-size: 22px; }
.yt-paw:first-child { animation: ytPawL 0.55s ease-in-out infinite; }
.yt-paw:last-child  { animation: ytPawR 0.55s ease-in-out infinite; }
.yt-keys { display: flex; gap: 2px; margin-top: 4px; }
.yt-key { width: 16px; height: 28px; background: #f5f5f0; border: 1px solid #ccc; border-radius: 0 0 3px 3px; box-shadow: inset 0 -2px 4px rgba(0,0,0,0.1); }
.yt-key.active { background: #ddd; box-shadow: inset 0 2px 3px rgba(0,0,0,0.2); }
.yt-pause-btn { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,0.6); border: none; color: #fff; font-size: 18px; width: 28px; height: 28px; border-radius: 4px; cursor: pointer; display: none; align-items: center; justify-content: center; }
.yt-pause-btn.vis { display: flex; }
.yt-progress { position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: rgba(255,255,255,0.2); }
.yt-prog-fill { height: 100%; background: #c00; width: 0%; }
.yt-info { padding: 8px 10px; border-bottom: 1px solid #ddd; flex-shrink: 0; }
.yt-title { font-size: 12px; font-weight: bold; color: #0645ad; margin-bottom: 3px; line-height: 1.3; }
.yt-meta { font-size: 10px; color: #888; }
.yt-desc { padding: 7px 10px; border-bottom: 1px solid #ddd; font-size: 10.5px; color: #333; line-height: 1.45; flex-shrink: 0; }
.yt-stars { padding: 5px 10px; border-bottom: 1px solid #ddd; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.yt-related-hdr { padding: 5px 10px; font-size: 11px; font-weight: bold; color: #333; border-bottom: 1px solid #ddd; background: #f0f0f0; flex-shrink: 0; }
.yt-related { flex: 1; overflow-y: auto; }
.yt-rel-row { display: flex; gap: 8px; padding: 7px 10px; border-bottom: 1px solid #eee; cursor: pointer; }
.yt-rel-thumb { width: 72px; height: 54px; border-radius: 2px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.yt-rel-title { font-size: 10.5px; color: #0645ad; font-weight: bold; line-height: 1.3; margin-bottom: 3px; }
.yt-rel-meta { font-size: 9.5px; color: #888; }
@keyframes ytNote { 0% { opacity: 1; transform: translateY(0) rotate(-8deg); } 80% { opacity: 0.2; } 100% { opacity: 0; transform: translateY(-28px) rotate(8deg); } }
@keyframes ytBop  { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
@keyframes ytPawL { 0%,100% { transform: translateY(0) rotate(-5deg); } 35% { transform: translateY(10px) rotate(5deg); } }
@keyframes ytPawR { 0%,100% { transform: translateY(0) rotate(5deg); } 65% { transform: translateY(10px) rotate(-5deg); } }
@keyframes ytProgAnim { from { width: 0%; } to { width: 100%; } }

/* Calculator */
.calc-wrap { display: flex; flex-direction: column; flex: 1; background: #000; }
.calc-display { background: #000; color: #fff; font-size: 52px; font-weight: 200; text-align: right; padding: 14px 22px 8px; min-height: 88px; display: flex; align-items: flex-end; justify-content: flex-end; font-family: -apple-system, Helvetica, sans-serif; letter-spacing: -1px; flex-shrink: 0; word-break: break-all; }
.calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: #1c1c1c; flex: 1; }
.calc-key { border: none; font-size: 22px; font-weight: 300; cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: -apple-system, Helvetica, sans-serif; }
.calc-key:active { filter: brightness(1.4); }
.calc-num { background: #333; color: #fff; }
.calc-fn  { background: #a5a5a5; color: #000; font-size: 19px; }
.calc-op  { background: #f5a623; color: #fff; font-size: 26px; }
.calc-zero { justify-content: flex-start; padding-left: 26px; grid-column: span 2; }
.app-content::-webkit-scrollbar { display: none; }

/* Table UI */
.i-section { margin-top: 18px; }
.i-header { font-size: 13px; color: #5a5a6a; padding: 0 16px 6px; text-transform: uppercase; letter-spacing: 0.6px; }
.i-group { background: #fff; border-top: 1px solid #c8c8cf; border-bottom: 1px solid #c8c8cf; }
.i-row { display: flex; align-items: center; padding: 11px 16px; border-bottom: 1px solid #e0e0e8; gap: 12px; cursor: pointer; min-height: 44px; }
.i-row:last-child { border-bottom: none; }
.i-row:active { background: #d5d5dc; }
.i-row.no-tap { cursor: default; }
.i-row.no-tap:active { background: transparent; }
.i-row-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.i-row-text { flex: 1; min-width: 0; }
.i-row-title { font-size: 16px; color: #000; }
.i-row-detail { font-size: 12px; color: #888; margin-top: 1px; }
.i-row-value { font-size: 15px; color: #888; }
.i-chev { color: #b0b0b8; font-size: 20px; }
.i-hero { padding: 22px 16px 18px; text-align: center; border-bottom: 1px solid #e0e0e8; }
.i-hero-name { font-size: 21px; font-weight: bold; color: #1a1a2a; margin-bottom: 6px; }
.i-hero-sub { font-size: 13px; color: #666; line-height: 1.6; }

/* Photos */
.photo-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2px; background: #000; }
.photo-cell { aspect-ratio: 1; overflow: hidden; background: #1a1a1a; }
.photo-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Snake */
.snake-wrap { background: #040804; display: flex; flex-direction: column; align-items: center; padding: 12px 8px; min-height: 100%; }
.snake-hud { display: flex; justify-content: space-between; width: 260px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: #3a7a12; margin-bottom: 8px; padding: 0 2px; }
#snakeCanvas { display: block; border: 1px solid #0a1e06; }
.snake-msg { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: #4a8a1a; margin-top: 10px; text-align: center; min-height: 30px; line-height: 1.6; }
.snake-hint { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: #162a0a; margin-top: 4px; text-align: center; letter-spacing: 1px; }

/* ── Modem dial screen (Telix 3.21b aesthetic) ──────── */
#dialScreen {
  position: absolute; inset: 0; background: var(--bbs-bg);
  font-family: 'IBM Plex Mono', monospace; font-size: .84rem;
  display: none; flex-direction: column; z-index: 20;
}
#modemText {
  flex: 1; padding: 1.5rem 2rem; line-height: 1.7;
  overflow-y: auto; white-space: pre-wrap; color: var(--a-bgreen);
}
#modemText.awaiting-dial::after {
  content: '_';
  animation: blink-cursor 0.9s step-end infinite;
}
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
/* Telix status bar — dark red bg, yellow text, pipe separators */
#telixStatus {
  flex-shrink: 0; background: var(--a-red); color: var(--a-yellow);
  font-family: 'IBM Plex Mono', monospace; font-size: .8rem;
  padding: 3px 10px; white-space: nowrap; overflow: hidden;
}
#dialBtn {
  margin: 0 2rem 0.8rem; align-self: flex-start;
  background: none; border: none; color: var(--a-yellow);
  font-family: inherit; font-size: .84rem;
  padding: 0; cursor: pointer; letter-spacing: 1px; display: none;
}
#dialBtn:hover { color: var(--a-white); }

/* ── BBS window ────────────────────────────────────── */
/* Single tuning point — all cp-* use em so they scale with this */
#bbsWindow {
  position: absolute; inset: 0; background: var(--bbs-bg);
  color: var(--a-lgray); font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem; display: none; flex-direction: column; z-index: 20;
}
#bbsTitleBar {
  background: #0a0a0c;
  display: flex; align-items: flex-end; gap: 6px;
  padding: 6px 12px 0; flex-shrink: 0; user-select: none;
  border-left: 4px solid #ffb000;
  border-bottom: 2px solid #2a2a35;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.9em;
}
.hdr-brand {
  color: #ffb000; font-weight: bold; letter-spacing: 0.1em; font-size: 0.9em;
  text-shadow: 1px 0 2px rgba(255,176,0,0.4);
  padding-bottom: 7px; margin-right: 6px;
}
.hdr-section { display: none; }
.hdr-right { margin-left: auto; display: flex; gap: 14px; align-items: center; padding-bottom: 6px; }
.hdr-user { color: rgba(255,255,255,0.62); font-size: 0.78em; }
.hdr-time { color: rgba(255,176,0,0.60); font-size: 0.76em; }
.hdr-nav { display: flex; gap: 2px; align-items: flex-end; }
.hdr-nav-btn {
  background: #0a0a0c; border: 1px solid #2a2a35; border-bottom: none; border-radius: 0;
  color: #9da8bc; font-family: 'IBM Plex Mono', monospace;
  font-size: 0.76em; padding: 5px 10px; cursor: pointer; letter-spacing: 0.04em;
  text-transform: uppercase; position: relative; bottom: -2px; transition: none;
}
.hdr-nav-btn:hover:not(.hdr-nav-active) { background: #1a1a22; color: #eaecf0; border-color: #4b5563; }
.hdr-nav-btn.hdr-nav-active { background: #ffb000; color: #000; border-color: #ffb000; font-weight: bold; }
#bbsScreen {
  flex: 1; overflow-y: auto; padding: .35rem .5rem;
  scrollbar-width: thin; scrollbar-color: var(--a-cyan) var(--bbs-bg);
}
#bbsStatus {
  flex-shrink: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 3px 14px;
  background: #0a0a0c;
  color: #9da8bc;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.76em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap; overflow: hidden;
  border-top: 2px solid #2a2a35;
  border-left: 4px solid #ffb000;
}
.bar-left { display: flex; align-items: center; }
.bar-dot { color: #ffb000; margin-right: 6px; animation: barDotPulse 2s step-end infinite; }
@keyframes barDotPulse { 0%,65%,100% { opacity:1; } 32% { opacity:0.25; } }
.bar-right { color: #9da8bc; }
.bar-new-msg { color: #ffb000; animation: henBlink 0.8s step-end infinite; margin-left: 8px; }
/* Clickable menu rows */
.bbs-mi { cursor: pointer; }
.bbs-mi:hover { background: rgba(255,255,255,0.06); }

/* ASCII block cursor for the CRT monitor screen */
#monitorScreen {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='18'%3E%3Crect width='12' height='16' fill='%23ffffff' opacity='0.9'/%3E%3C/svg%3E") 0 0, auto;
}
#monitorScreen .bbs-mi,
#monitorScreen input {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='18'%3E%3Crect width='12' height='16' fill='%23ffffff' opacity='0.9'/%3E%3C/svg%3E") 0 0, pointer;
}

/* ANSI color spans */
.bc  { color: var(--a-bcyan);    }
.by  { color: var(--a-yellow);   }
.bw  { color: var(--a-white);    }
.bg  { color: var(--a-bgreen);   }
.br  { color: var(--a-bred);     }
.bm  { color: var(--a-bmagenta); }
.bd  { color: var(--a-dgray);    }
.bb  { color: var(--a-bblue);    }
/* BBS input */
.bbs-input {
  background: var(--a-blue); color: var(--a-white);
  border: none; outline: none;
  font-family: 'IBM Plex Mono', monospace; font-size: 1rem;
  padding: .1rem .3rem; caret-color: var(--a-yellow);
}
.bar-new-msg { color: var(--a-bgreen); animation: henBlink 0.8s step-end infinite; }
/* ── H.E.N. Overlay ─────────────────────────────── */
#henOverlay {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}
#henCanvas {
  position: absolute;
  width: 64px; height: 64px;
  bottom: 30px; left: 100px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transition: width 0.2s, height 0.2s, bottom 0.2s, left 0.3s;
  pointer-events: auto;
  cursor: pointer;
}
#henCanvas.hen-corner {
  width: 32px; height: 32px;
  bottom: 10px; left: 10px;
  pointer-events: auto;
  cursor: pointer;
}
#henSpeech {
  display: none;
  position: absolute;
  pointer-events: auto;
  background: linear-gradient(180deg, rgba(22,22,30,0.97) 0%, rgba(12,12,18,0.95) 100%);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.07);
  border-top: 1px solid rgba(255,255,255,0.13);
  border-radius: 10px;
  color: rgba(255,255,255,0.95);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  padding: 10px 13px;
  width: 310px;
  white-space: normal;
  line-height: 1.6;
  z-index: 51;
  bottom: 100px;
  left: 100px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.04) inset;
}
.hen-q-text { color: rgba(255,255,255,0.92); }
.hen-answers { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.hen-ans-btn {
  background: transparent; border: 1px solid rgba(255,255,255,0.1); border-radius: 6px;
  color: rgba(255,255,255,0.80); font-family: 'IBM Plex Mono', monospace; font-size: 0.84rem;
  padding: 5px 10px; cursor: pointer; text-align: left; transition: all 0.15s ease;
}
.hen-ans-btn:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.88); border-color: rgba(255,255,255,0.25); }
.hen-text-input {
  background: transparent; color: rgba(255,255,255,0.85);
  border: none; border-bottom: 1px solid rgba(255,255,255,0.18);
  font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem;
  padding: 2px 4px; outline: none; width: 100%; margin-top: 4px;
}
@keyframes henFlicker {
  0%,100% { opacity:1; }
  10%      { opacity:0; }
  20%      { opacity:1; }
  30%      { opacity:0.3; }
  50%      { opacity:1; }
  60%      { opacity:0; }
  70%      { opacity:1; }
}
.hen-flicker { animation: henFlicker 0.9s steps(1) 1; }
@keyframes henBlink {
  0%,100% { opacity:1; }
  50%      { opacity:0; }
}
.hen-blink { animation: henBlink 1s step-end infinite; }

/* ════════════════════════════════════════════════════════════
   CYBERPUNK BBS THEME  (cp- namespace)
   Palette: amber/cyan/green/red
════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'VT323';
  src: url('/fonts/vt323-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}

/* Dot pattern background on the BBS content area */
#bbsScreen {
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='2' cy='2' r='1' fill='rgba(255,176,0,0.045)'/%3E%3C/svg%3E");
}

/* ── Layout ──────────────────────────────────────────── */
.cp-page { padding: 6px 8px 16px; }
.cp-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 10px; }
.cp-col-main { display: flex; flex-direction: column; gap: 10px; }
.cp-col-side  { display: flex; flex-direction: column; gap: 8px; }

.cp-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid #2a2a35; padding-bottom: 8px; margin-bottom: 10px;
}
.cp-title    { font-family: 'VT323', monospace; font-size: 1.5em; color: #fff; letter-spacing: 0.04em; }
.cp-title-lg { font-size: 1.75em; }

/* ── Cards ───────────────────────────────────────────── */
.cp-card {
  background: #0a0a0c; border: 1px solid #2a2a35;
  border-left: 4px solid #2a2a35; position: relative; padding: 12px;
}
.cp-card::before {
  content: '■■■'; position: absolute; top: -9px; right: 8px;
  background: #000820; padding: 0 4px;
  color: #2a2a35; font-size: 9px; letter-spacing: 2px;
  font-family: 'IBM Plex Mono', monospace;
}
.cp-card-amber { border-left-color: #ffb000; }
.cp-card-cyan  { border-left-color: #00e5ff; }
.cp-card-green { border-left-color: #00ff66; }
.cp-card-red   { border-left-color: #ff3366; }

.cp-card-head {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #2a2a35; padding-bottom: 8px; margin-bottom: 10px;
}
.cp-card-solid {
  display: flex; justify-content: space-between;
  padding: 4px 12px; font-size: 0.76em; font-weight: bold;
  text-transform: uppercase; letter-spacing: 0.06em;
  font-family: 'IBM Plex Mono', monospace;
}
.cp-solid-cyan  { background: #00e5ff; color: #000; }
.cp-solid-amber { background: #ffb000; color: #000; }

/* ── Badges ──────────────────────────────────────────── */
.cp-badge {
  font-size: 0.7em; font-family: 'IBM Plex Mono', monospace;
  background: #000820; border: 1px solid #2a2a35;
  color: #9da8bc; padding: 1px 5px; text-transform: uppercase; letter-spacing: 0.04em;
}
.cp-badge-cyan { border-color: #00e5ff; color: #00e5ff; }

/* ── Color utilities ─────────────────────────────────── */
.cp-amber { color: #ffb000; }
.cp-cyan  { color: #00e5ff; }
.cp-green { color: #00ff66; }
.cp-red   { color: #ff3366; }
.cp-muted { color: #9da8bc; }
.cp-wh    { color: #ffffff; }
.cp-bold  { font-weight: bold; }
.cp-name  { color: #ffffff; font-weight: bold; }
.cp-active-badge {
  color: #00ff66; font-size: 0.74em; font-family: 'IBM Plex Mono', monospace;
  animation: barDotPulse 2s step-end infinite;
}

/* ── Bio block ───────────────────────────────────────── */
.cp-greeting {
  font-size: 0.78em; color: #9da8bc; margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.cp-bio { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.cp-bio p { font-size: 0.85em; color: #eaecf0; line-height: 1.5; }
.cp-bio span.cp-amber { margin-right: 5px; }

/* ── Stats grid ──────────────────────────────────────── */
.cp-stat-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  border-top: 1px dashed #2a2a35; padding-top: 10px;
}
.cp-stat { background: #000820; border: 1px solid #2a2a35; padding: 6px 8px; }
.cp-stat-lbl { font-size: 0.7em; color: #9da8bc; text-transform: uppercase; margin-bottom: 2px; }
.cp-stat-val { font-size: 0.82em; font-weight: bold; }

/* ── System events table ─────────────────────────────── */
.cp-evt-table { width: 100%; border-collapse: collapse; font-size: 0.78em; }
.cp-evt-table th {
  color: #9da8bc; border-bottom: 1px solid #2a2a35;
  padding: 3px 5px; font-weight: normal; text-transform: uppercase; font-size: 0.7em;
}
.cp-evt-table td { padding: 5px; border-bottom: 1px solid rgba(42,42,53,0.5); }
.cp-evt-table tr:last-child td { border-bottom: none; }
.cp-evt-table tr:hover td { background: rgba(255,255,255,0.03); }
.cp-ts   { color: #9da8bc; white-space: nowrap; font-size: 0.72em; }
.cp-etag {
  display: inline-block; padding: 1px 4px; font-weight: bold; font-size: 0.72em;
  white-space: nowrap; font-family: 'IBM Plex Mono', monospace;
}
.cp-etag-amber { background: rgba(255,176,0,0.15);  color: #ffb000; }
.cp-etag-cyan  { background: rgba(0,229,255,0.15);   color: #00e5ff; }
.cp-etag-green { background: rgba(0,255,102,0.15);   color: #00ff66; }
.cp-etag-red   { background: rgba(255,51,102,0.15);  color: #ff3366; }
.cp-etag-muted { background: rgba(107,114,128,0.15); color: #9da8bc; }
.cp-evt-detail { color: #eaecf0; }

/* ── Diagnostic rows ─────────────────────────────────── */
.cp-diag-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0; border-bottom: 1px solid #2a2a35; font-size: 0.78em;
}
.cp-diag-row:last-child { border-bottom: none; }
.cp-diag-lbl { color: #9da8bc; text-transform: uppercase; font-size: 0.72em; }
.cp-diag-val { color: #fff; text-align: right; }

/* ── Mini terminal ───────────────────────────────────── */
.cp-mini-term { border: 1px solid #2a2a35; border-left: 4px solid #ff3366; background: #050505; }
.cp-mini-term-hdr {
  background: #2a2a35; padding: 2px 8px; display: flex; justify-content: space-between;
  font-size: 0.72em; color: #9da8bc; text-transform: uppercase;
  font-family: 'IBM Plex Mono', monospace;
}
.cp-mini-term-out {
  padding: 6px 8px; min-height: 54px; max-height: 68px;
  overflow-y: auto; font-size: 0.76em; line-height: 1.6;
  font-family: 'IBM Plex Mono', monospace;
  scrollbar-width: thin; scrollbar-color: #2a2a35 #050505;
}
.cp-mini-term-input {
  display: flex; align-items: center; gap: 5px;
  border-top: 1px solid #2a2a35; padding: 3px 8px;
}
.cp-mini-term-prompt { color: #ff3366; font-weight: bold; font-size: 0.84em; font-family: 'IBM Plex Mono', monospace; }
.cp-mini-term-field {
  background: transparent; border: none; outline: none;
  color: #fff; font-family: 'IBM Plex Mono', monospace; font-size: 0.76em; flex: 1;
}

/* ── Link grid ───────────────────────────────────────── */
.cp-link-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cp-link-btn {
  background: #0a0a0c; border: 1px solid #2a2a35; padding: 8px 6px;
  text-align: center; font-size: 0.78em; font-weight: bold;
  text-transform: uppercase; cursor: pointer; color: #eaecf0;
  display: block; text-decoration: none; width: 100%;
  font-family: 'IBM Plex Mono', monospace; transition: border-color 0.1s, color 0.1s;
}
.cp-link-amber:hover { border-color: #ffb000; color: #ffb000; }
.cp-link-cyan:hover  { border-color: #00e5ff; color: #00e5ff; }
.cp-link-sub { display: block; font-size: 0.68em; color: #9da8bc; font-weight: normal; margin-top: 2px; }

/* ── Project cards ───────────────────────────────────── */
.cp-proj-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cp-proj-card { border: 1px solid #2a2a35; background: #0a0a0c; position: relative; }
.cp-proj-card::before {
  content: '■■■'; position: absolute; top: -9px; right: 8px;
  background: #000820; padding: 0 4px;
  color: #2a2a35; font-size: 9px; letter-spacing: 2px;
  font-family: 'IBM Plex Mono', monospace;
}
.cp-proj-hdr {
  padding: 3px 10px; font-size: 0.72em; font-weight: bold;
  display: flex; justify-content: space-between; text-transform: uppercase;
  letter-spacing: 0.04em; font-family: 'IBM Plex Mono', monospace;
}
.cp-proj-body { padding: 10px; }
.cp-proj-name { font-size: 0.88em; color: #fff; font-weight: bold; margin-bottom: 4px; }
.cp-proj-desc { font-size: 0.76em; color: #c4cad4; margin-bottom: 8px; line-height: 1.45; }
.cp-proj-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.cp-proj-tag {
  border: 1px solid #2a2a35; padding: 1px 5px;
  font-size: 0.68em; text-transform: uppercase; font-family: 'IBM Plex Mono', monospace;
}
.cp-proj-tag-amber { color: #ffb000; }
.cp-proj-tag-cyan  { color: #00e5ff; }
.cp-proj-tag-green { color: #00ff66; }
.cp-proj-tag-red   { color: #ff3366; }
.cp-proj-tag-muted { color: #9da8bc; }

/* ── Skill bars ──────────────────────────────────────── */
.cp-skill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; }
.cp-skill-top  { display: flex; justify-content: space-between; margin-bottom: 2px; }
.cp-skill-lbl  { font-size: 0.78em; text-transform: uppercase; font-weight: bold; }
.cp-skill-pct  { font-size: 0.78em; font-weight: bold; }
.cp-skill-bar  { font-size: 0.74em; letter-spacing: 0.1em; margin-bottom: 2px; font-family: 'IBM Plex Mono', monospace; }
.cp-skill-bar-amber { color: #ffb000; }
.cp-skill-bar-cyan  { color: #00e5ff; }
.cp-skill-bar-green { color: #00ff66; }
.cp-skill-bar-red   { color: #ff3366; }
.cp-skill-sub  { font-size: 0.72em; color: #9da8bc; }

/* ── Testimonials ────────────────────────────────────── */
.cp-testimonial-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cp-testimonial { background: #0a0a0c; border: 1px solid #2a2a35; border-left: 4px solid #2a2a35; padding: 10px; }
.cp-t-body { font-size: 0.78em; color: #eaecf0; line-height: 1.55; margin-bottom: 8px; font-style: italic; }
.cp-t-from { font-size: 0.72em; color: #ffb000; }

/* ── Glitch ──────────────────────────────────────────── */
@keyframes cp-glitch {
  0%   { transform: translate(0);       }
  20%  { transform: translate(-2px, 1px); }
  40%  { transform: translate(-1px,-1px); }
  60%  { transform: translate(2px, 1px); }
  80%  { transform: translate(1px,-1px); }
  100% { transform: translate(0);       }
}
.cp-glitch { animation: cp-glitch 0.18s linear; }

/* ── Missing variants ────────────────────────────────── */
.cp-badge-amber { border-color: #ffb000; color: #ffb000; }
.cp-badge-green { border-color: #00ff66; color: #00ff66; }
.cp-badge-red   { border-color: #ff3366; color: #ff3366; }
.cp-badge-muted { color: #9da8bc; }
.cp-proj-hdr-amber { background: rgba(255,176,0,0.15);  color: #ffb000; }
.cp-proj-hdr-cyan  { background: rgba(0,229,255,0.15);  color: #00e5ff; }
.cp-proj-hdr-green { background: rgba(0,255,102,0.15);  color: #00ff66; }
.cp-proj-hdr-red   { background: rgba(255,51,102,0.15); color: #ff3366; }
.cp-proj-hdr-muted { background: rgba(107,114,128,0.15);color: #9da8bc; }

/* ── Message bubbles ─────────────────────────────────── */
#msgThread { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.cp-msg-bubble { border-left: 3px solid; padding: 8px 10px; background: #050508; }
.cp-msg-user   { border-left-color: #ffb000; }
.cp-msg-lee    { border-left-color: #00e5ff; }
.cp-msg-from   { font-size: 0.72em; margin-bottom: 4px; font-family: 'IBM Plex Mono', monospace; }
.cp-msg-body   { font-size: 0.84em; color: #eaecf0; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }

/* ============================================================
   REFINEMENT PASS v2 — Bold moves
   Append to public/styles/main.css (or merge into existing rules).

   This pass touches:
   • Room composition (background, dust motes, ambient lighting)
   • Monitor chrome readability (labels, brand plate, LED, bezel)
   • Modem screen (Telix top menu bar, signal scope, ATA pulse)
   • BBS title bar (scanline texture + uptime/baud chrome)
   • BBS cards (corner tags, section heads, hierarchy)
   • H.E.N. phosphor presence + speech bubble polish
   ============================================================ */

/* ----- ROOM COMPOSITION ----- */

/* Replace the flat radial body bg with an atmospheric stack:
   1. cool moonlit ceiling key from above
   2. warm tungsten kick from lower-right (out-of-frame desk lamp)
   3. base dark-tobacco floor
   The desk-glow becomes the floor "bounce". */
body {
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%,
      rgba(110, 160, 200, 0.10) 0%,
      transparent 70%),
    radial-gradient(ellipse 50% 60% at 90% 90%,
      rgba(255, 170, 80, 0.07) 0%,
      transparent 65%),
    radial-gradient(ellipse at 50% 35%,
      #0c120c 0%, #050805 50%, #020302 100%) !important;
}

/* Drifting dust motes (CSS-only, 6 keyframed sparkles).
   Live behind the monitor (z-index 0), pointer-events:none. */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 12% 22%, rgba(255,255,255,0.35) 0.6px, transparent 1.2px),
    radial-gradient(circle at 78% 14%, rgba(180,220,200,0.28) 0.5px, transparent 1px),
    radial-gradient(circle at 28% 78%, rgba(255,230,180,0.25) 0.5px, transparent 1px),
    radial-gradient(circle at 88% 64%, rgba(200,220,255,0.22) 0.5px, transparent 1px),
    radial-gradient(circle at 56% 88%, rgba(255,255,255,0.18) 0.4px, transparent 1px),
    radial-gradient(circle at 42% 8%,  rgba(180,200,180,0.20) 0.4px, transparent 1px);
  background-size: 1100px 1100px;
  animation: mote-drift 28s linear infinite;
  opacity: 0.55;
}
@keyframes mote-drift {
  0%   { background-position: 0 0,         200px 100px, 0 0,         300px 200px, 0 0,         400px 80px; }
  100% { background-position: 60px -120px, 280px -40px, -120px 80px, 220px 60px,  -90px -80px, 480px -60px; }
}

/* Lift the desk-glow into a stronger floor bounce — feels like the
   monitor is sitting on a real surface with light spilling onto it. */
.desk-glow {
  width: 1100px !important;
  height: 220px !important;
  background:
    radial-gradient(ellipse at 50% 100%,
      rgba(255,235,200,0.05) 0%,
      rgba(255,255,255,0.04) 20%,
      transparent 70%) !important;
}

/* ----- MONITOR CHROME (v1 refinements, retained) ----- */

.chin-label {
  font-size: 0.58rem;
  letter-spacing: 1.8px;
  color: rgba(35,25,5,0.55);
  text-shadow: 0 1px 0 rgba(255,255,255,0.18);
}

.brand-name {
  font-size: 0.78rem;
  letter-spacing: 7px;
  color: rgba(30,22,5,0.5);
  text-shadow: 0 1px 0 rgba(255,255,255,0.22);
}
.brand-model {
  font-size: 0.56rem;
  letter-spacing: 3.5px;
  color: rgba(30,22,5,0.32);
  margin-top: 3px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.16);
}

#powerLed.on {
  box-shadow:
    0 0 6px var(--g),
    0 0 14px rgba(57,255,20,0.6),
    0 0 26px rgba(57,255,20,0.25);
}

.monitor-body { position: relative; }
.monitor-body::before {
  content: '';
  position: absolute;
  left: 18px; right: 18px; top: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent, rgba(255,255,255,0.42) 12%, rgba(255,255,255,0.55) 50%,
    rgba(255,255,255,0.42) 88%, transparent);
  pointer-events: none;
  border-radius: 22px 22px 0 0;
  z-index: 5;
}

.monitor-wrap { position: relative; }
.monitor-wrap::after {
  content: '';
  position: absolute;
  left: 50%; bottom: -22px;
  width: 700px; height: 36px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 50% 50% at 50% 50%,
    rgba(0,0,0,0.7), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
  z-index: -1;
}

/* ----- MODEM SCREEN — Telix vibe ----- */

.telix-menubar {
  flex-shrink: 0;
  background: var(--a-red);
  color: var(--a-yellow);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 3px 12px;
  display: flex;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid #550000;
}
.telix-menubar .tm-key {
  color: var(--a-white);
  font-weight: 700;
  margin-right: 4px;
}
.telix-menubar .tm-sp { flex: 1; }
.telix-menubar .tm-version { color: rgba(255,255,255,0.5); font-size: 0.72rem; letter-spacing: 0.2em; }

.telix-scope {
  position: absolute;
  top: 38px; right: 18px;
  width: 132px; height: 56px;
  background: #000;
  border: 1px solid rgba(200,216,255,0.5);
  box-shadow: inset 0 0 16px rgba(200,216,255,0.08);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  color: #c8d8ff;
  z-index: 3;
}
.telix-scope-label {
  position: absolute; top: 2px; left: 6px;
  color: rgba(200,216,255,0.85); letter-spacing: 0.18em;
  text-transform: uppercase;
}
.telix-scope-state {
  position: absolute; top: 2px; right: 6px;
  color: rgba(255,221,0,0.85); letter-spacing: 0.12em;
}
.telix-scope-svg {
  position: absolute; left: 6px; right: 6px; top: 16px; bottom: 4px;
  width: calc(100% - 12px);
  height: calc(100% - 20px);
}
.telix-scope-line {
  fill: none;
  stroke: #c8d8ff;
  stroke-width: 1.2;
  filter: drop-shadow(0 0 2px rgba(200,216,255,0.55));
}

#modemText {
  padding-top: 1.2rem !important;
  padding-bottom: 2.4rem !important;
}

#telixStatus {
  position: absolute !important;
  left: 0; right: 0; bottom: 0;
  z-index: 4;
}

.telix-speaker {
  position: absolute;
  top: 38px; left: 18px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: rgba(255,80,80,0.85);
  text-transform: uppercase;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.25s;
}
.telix-speaker::before {
  content: '●';
  display: inline-block;
  margin-right: 6px;
  animation: speaker-pulse 0.55s ease-in-out infinite;
}
.telix-speaker.audio-active { opacity: 1; }
@keyframes speaker-pulse {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 1; }
}

/* ----- BBS TITLE BAR — scanline chrome + uptime ----- */

#bbsTitleBar {
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255,176,0,0.04) 0px,
      rgba(255,176,0,0.04) 1px,
      transparent 1px,
      transparent 3px),
    linear-gradient(180deg, #14140e 0%, #0a0a0c 100%) !important;
}

.hdr-uptime {
  color: #00ff66;
  font-size: 0.76em;
  letter-spacing: 0.12em;
  font-family: 'IBM Plex Mono', monospace;
  text-transform: uppercase;
}
.hdr-uptime::before { content: '◉ '; color: #00ff66; }
.hdr-baud {
  color: rgba(0,229,255,0.7);
  font-size: 0.72em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#bbsStatus {
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255,176,0,0.03) 0px,
      rgba(255,176,0,0.03) 1px,
      transparent 1px,
      transparent 3px),
    #0a0a0c !important;
}

/* ----- BBS CARDS — bolder hierarchy ----- */

.cp-card::before,
.cp-proj-card::before {
  color: rgba(255,176,0,0.45) !important;
  font-size: 11px !important;
  letter-spacing: 3px !important;
  background: linear-gradient(180deg, #000820, #050510) !important;
  padding: 0 6px !important;
  top: -10px !important;
}
.cp-card-cyan::before  { color: rgba(0,229,255,0.5)  !important; }
.cp-card-green::before { color: rgba(0,255,102,0.5)  !important; }
.cp-card-red::before   { color: rgba(255,51,102,0.5) !important; }

.cp-title.cp-amber  { text-shadow: 0 0 6px rgba(255,176,0,0.35); }
.cp-title.cp-cyan   { text-shadow: 0 0 6px rgba(0,229,255,0.35); }
.cp-title.cp-green  { text-shadow: 0 0 6px rgba(0,255,102,0.35); }
.cp-title.cp-red    { text-shadow: 0 0 6px rgba(255,51,102,0.35); }

.cp-section-head {
  position: relative;
  padding-left: 14px;
}
.cp-section-head::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 2px;
  background: currentColor;
  opacity: 0.55;
}

/* ----- H.E.N. — sprite bloom + sharper bubble ----- */

#henCanvas {
  filter:
    drop-shadow(0 0 3px rgba(255,225,140,0.55))
    drop-shadow(0 0 10px rgba(255,180,60,0.22));
  transition: width 0.2s, height 0.2s, bottom 0.2s, left 0.3s, filter 0.3s;
}
#henCanvas.hen-corner {
  filter:
    drop-shadow(0 0 2px rgba(255,225,140,0.5))
    drop-shadow(0 0 6px rgba(255,180,60,0.2));
}

#henSpeech {
  background:
    linear-gradient(180deg, rgba(18,18,24,0.97) 0%, rgba(10,10,14,0.97) 100%) !important;
  border: 1px solid rgba(255,176,0,0.35) !important;
  border-left: 3px solid #ffb000 !important;
  border-radius: 4px !important;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.6),
    0 0 0 1px rgba(255,176,0,0.08) inset,
    0 0 24px rgba(255,176,0,0.12) !important;
}
#henSpeech::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 10px 10px 0;
  border-color: transparent #ffb000 transparent transparent;
  opacity: 0.85;
}
#henSpeech::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 18px;
  width: 10px; height: 10px;
  background: inherit;
  border-left: 1px solid rgba(255,176,0,0.35);
  border-bottom: 1px solid rgba(255,176,0,0.35);
  transform: rotate(-45deg);
}

.hen-q-text { color: #f6f7fa !important; font-size: 0.94rem !important; line-height: 1.55 !important; }

.hen-ans-btn {
  border: 1px solid rgba(255,176,0,0.18) !important;
  color: rgba(255,231,180,0.9) !important;
  font-size: 0.86rem !important;
  letter-spacing: 0.02em !important;
  border-radius: 3px !important;
  background: rgba(255,176,0,0.04) !important;
}
.hen-ans-btn:hover {
  background: rgba(255,176,0,0.14) !important;
  color: #fff !important;
  border-color: rgba(255,176,0,0.65) !important;
  box-shadow: 0 0 12px rgba(255,176,0,0.18);
}

/* ----- TIGHTER TYPOGRAPHY ----- */

.cp-section-head .cp-muted {
  font-size: 0.7em !important;
  color: rgba(157,168,188,0.85) !important;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cp-diag-val { font-variant-numeric: tabular-nums; }

/* ============================================================
   END refinements v2
   ============================================================ */
.cp-glitch { animation: cp-glitch 0.18s linear; }
