/* ================================================================
   3615 JULION — a 2001 home page with a Minitel-style terminal
   ================================================================ */
:root {
  --navy: #07072e;
  --ink: #f4f4ff;
  --link: #8fd0ff;
  --link-v: #d7a8ff;
  --gold: #ffd400;
  /* videotex palette */
  --r: #ff4a4a; --g: #43ff6a; --y: #fff24a; --b: #5a7bff; --m: #ff5cff; --c: #4af6ff; --w: #f2f2f2;
  --beige: #d8ccb0; --beige-d: #b9aa88; --brown: #3a2e25; --brown-d: #231b15;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 13px/1.45 Verdana, Tahoma, Geneva, sans-serif;
  background-color: var(--navy);
  background-image:
    radial-gradient(1.2px 1.2px at 12px 18px, #fff 99%, transparent),
    radial-gradient(1px 1px at 47px 66px, #fffbd0 99%, transparent),
    radial-gradient(1.5px 1.5px at 83px 31px, #cfe6ff 99%, transparent),
    radial-gradient(1px 1px at 104px 95px, #fff 99%, transparent),
    radial-gradient(1px 1px at 22px 112px, #ffd6f7 99%, transparent);
  background-size: 120px 120px;
  overflow-x: hidden;
}
a { color: var(--link); }
a:visited { color: var(--link-v); }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.tiny { font-size: 10px; opacity: .8; margin: 4px 0 0; }
.small { font-size: 12px; }
.center { text-align: center; }

/* ---------------- header ---------------- */
.top { text-align: center; padding: 18px 16px 8px; }
.wordart {
  margin: 0 0 10px;
  font: italic 900 clamp(26px, 5vw, 50px)/1.05 Impact, "Arial Black", sans-serif;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #ff3e3e, #ffb13e, #fff23e, #4cff6a, #4ad8ff, #7a6bff, #ff5cff);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(3px 3px 0 #1a0050) drop-shadow(1px 1px 0 #fff);
  transform: skewX(-6deg);
}
.ticker {
  display: block; max-width: 1100px; margin: 0 auto;
  background: #000; color: var(--gold);
  border: 2px inset #888; padding: 3px 0;
  font: bold 14px "Courier New", monospace;
}
.top-buttons { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.bevel-btn, .flag-btn {
  background: #c0c0c0; color: #000; cursor: pointer;
  border: 2px outset #fff; padding: 4px 10px; font: 12px Tahoma, Verdana, sans-serif;
  display: inline-flex; align-items: center; gap: 6px;
}
.bevel-btn:active, .flag-btn:active { border-style: inset; }

/* waving flag (shows the language you'll switch TO) */
.flag { width: 26px; height: 17px; display: inline-flex; border: 1px solid #333; animation: wave 1.6s ease-in-out infinite; transform-origin: left center; }
.flag i { flex: 1; }
.flag-fr i:nth-child(1) { background: #0039a6; } .flag-fr i:nth-child(2) { background: #fff; } .flag-fr i:nth-child(3) { background: #e1000f; }
.flag-us { background: repeating-linear-gradient(#b22234 0 2.6px, #fff 2.6px 5.2px); position: relative; }
.flag-us i { display: none; }
.flag-us::before { content: ""; position: absolute; left: 0; top: 0; width: 45%; height: 55%; background: #3c3b6e radial-gradient(#fff .6px, transparent 1px) 0 0 / 3px 3px; }
@keyframes wave { 0%, 100% { transform: skewY(0) scaleX(1); } 50% { transform: skewY(-5deg) scaleX(.94); } }

/* ---------------- layout ---------------- */
.layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 210px;
  gap: 18px;
  max-width: 1180px; margin: 0 auto; padding: 16px;
  align-items: start;
}
.col { display: flex; flex-direction: column; gap: 14px; }
.box {
  background: rgba(0, 0, 30, .82);
  border: 3px ridge #8fb8ff;
  padding: 10px;
}
.box-title {
  margin: 0 0 8px; text-align: center;
  font: bold 16px "Comic Sans MS", "Comic Neue", "Chalkboard SE", cursive;
  color: var(--gold); text-shadow: 2px 2px 0 #b0006a;
}
.blink-slow { animation: blink 1.6s steps(1) infinite; }
.new { color: #ff3e3e; animation: blink 0.8s steps(1) infinite; font-size: 12px; }
@keyframes blink { 50% { opacity: 0; } }

.polaroid {
  background: #fff; color: #222; padding: 7px 7px 4px; cursor: zoom-in;
  box-shadow: 3px 4px 0 rgba(0,0,0,.5);
  font: 14px "Comic Sans MS", "Chalkboard SE", cursive; text-align: center;
}
.polaroid img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.tilt-l { transform: rotate(-3deg); margin: 4px 6px 10px; }

.counter { display: flex; justify-content: center; gap: 2px; }
.counter span {
  background: linear-gradient(#222, #000 50%, #222 50%, #111);
  color: #fff; font: bold 18px "Courier New", monospace;
  width: 20px; text-align: center; border: 1px solid #555; padding: 2px 0;
}
.counter.hit span { color: var(--r); animation: blink .5s steps(1) 6; }
.box:has(.counter) .tiny { text-align: center; }

.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.thumb { padding: 0; border: 2px outset #ccc; background: #000; cursor: zoom-in; }
.thumb img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.box:has(.thumbs) .tiny { text-align: center; }

.webring { display: flex; justify-content: space-between; align-items: center; font: bold 11px "Comic Sans MS", cursive; color: var(--c); text-align: center; gap: 4px; }
.webring > span:first-child, .webring > span:last-child { font-size: 20px; color: var(--gold); }

.messenger { padding: 0; background: #eef3ff; color: #102060; border-color: #6f8fd8; font: 11px Tahoma, Verdana, sans-serif; }
.msn-head { background: linear-gradient(#5d8be8, #2551b8); color: #fff; font-weight: bold; padding: 4px 8px; }
.msn-row { padding: 5px 8px; display: flex; align-items: center; gap: 6px; }
.msn-row.now { font-style: italic; color: #444; border-top: 1px dotted #9ab; border-bottom: 1px dotted #9ab; min-height: 34px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.busy { background: #e33; box-shadow: 0 0 0 1px #900; }
.dot.online { background: #3c3; box-shadow: 0 0 0 1px #070; }
.vinyl {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle, #e44 0 3px, #111 3.5px, #333 5px, #111 6px, #2a2a2a 8px, #111 9px);
  animation: spin 1.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.links { list-style: none; padding: 0; margin: 0; }
.links li::before { content: "★ "; color: var(--gold); }
.links li { margin: 4px 0; }

.mini-card {
  width: 100%; border: 0; padding: 6px; cursor: pointer;
  background: linear-gradient(135deg, #b8151f, #1d2c78);
  transform: rotate(2deg); transition: transform .2s;
}
.mini-card:hover { transform: rotate(-2deg) scale(1.03); }
.mini-card img { border: 4px solid #fff; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.mini-card span { display: block; font: italic 900 14px Impact, sans-serif; color: var(--gold); margin-top: 4px; letter-spacing: 1px; }

.badges { display: grid; grid-template-columns: repeat(2, 88px); gap: 6px; justify-content: center; }
.b88 {
  width: 88px; height: 31px; display: flex; align-items: center; justify-content: center; text-align: center;
  font: bold 9px/1.05 Verdana, sans-serif; border: 1px solid #fff; outline: 1px solid #000;
}
.b-cat { background: #000; color: var(--y); }
.b-y2k { background: linear-gradient(#5af, #036); color: #fff; }
.b-fr { background: linear-gradient(90deg, #0039a6 33%, #fff 33% 66%, #e1000f 66%); color: #000; text-shadow: 0 0 2px #fff, 0 0 2px #fff; }
.b-56k { background: #ffd400; color: #000; }
.b-np { background: #fff; color: #00f; }
.b-no { background: #800; color: #fff; }

/* ---------------- footer ---------------- */
.foot { text-align: center; padding: 10px 16px 70px; font-size: 11px; opacity: .9; }
.foot p { margin: 4px 0; }
.construction {
  max-width: 520px; margin: 0 auto 10px; padding: 6px;
  background: repeating-linear-gradient(45deg, #111 0 14px, var(--gold) 14px 28px);
  border: 2px solid #000;
}
.construction span { background: var(--gold); color: #000; font: bold 14px "Arial Black", sans-serif; padding: 2px 10px; }

/* ================================================================
   THE JULITEL
   ================================================================ */
.middle { min-width: 0; }
.julitel { width: 100%; max-width: 640px; margin: 0 auto; filter: drop-shadow(0 18px 24px rgba(0,0,0,.6)); }
.case {
  background: linear-gradient(170deg, #e7dcc2, var(--beige) 40%, var(--beige-d));
  border-radius: 34px 34px 14px 14px;
  padding: 22px 22px 10px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.7), inset 0 -4px 0 rgba(0,0,0,.15);
}
.bezel {
  background: linear-gradient(160deg, #4a3b2f, var(--brown) 50%, var(--brown-d));
  border-radius: 26px; padding: 18px;
  box-shadow: inset 0 3px 8px rgba(0,0,0,.7), 0 1px 0 rgba(255,255,255,.4);
}
.screen {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  background: radial-gradient(ellipse at center, #121418 0%, #07080a 70%, #000 100%);
  border-radius: 22px / 26px;
  box-shadow: inset 0 0 40px rgba(0,0,0,.9), inset 0 0 4px rgba(0,0,0,1);
  outline: none; cursor: default;
}
.screen:focus-visible { box-shadow: inset 0 0 40px rgba(0,0,0,.9), 0 0 0 3px var(--y); }
.screen-inner {
  position: absolute; inset: 4.5% 5%;
  container-type: size;
  --cw: calc(100cqw / 40);
  --ch: calc(100cqh / 24);
  font-family: VT323, "Courier New", monospace;
  color: var(--w);
  text-shadow: 0 0 calc(var(--ch) * .25) currentColor;
  overflow: hidden;
}
.scanlines, .glare { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; }
.scanlines { background: repeating-linear-gradient(transparent 0 2px, rgba(0,0,0,.28) 2px 3px); mix-blend-mode: multiply; }
.glare { background: radial-gradient(ellipse at 28% 18%, rgba(255,255,255,.10), transparent 45%), radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,.45)); }

/* rows: a 40 x 24 grid */
.mt-row {
  height: var(--ch); line-height: var(--ch);
  font-size: calc(var(--ch) * 1.2);
  /* VT323 is narrow: stretch glyphs a bit and space them so 40 columns fill the screen */
  --sx: 1.35;
  width: calc(100% / var(--sx));
  transform: scaleX(var(--sx)); transform-origin: 0 0;
  letter-spacing: calc(var(--cw) / var(--sx) - 0.4em);
  white-space: pre; overflow: visible; position: relative;
}
.mt-row.center { text-align: center; }
.mt-row .right { float: right; }
.dh-row { height: calc(var(--ch) * 2); padding-top: var(--ch); }
.dh { display: inline-block; transform: scaleY(2); transform-origin: 50% 100%; }
.dh.dw { transform: scale(2, 2); }
.status-row { border-bottom: 1px solid rgba(255,255,255,.05); }
.right-only { text-align: right; }
.input-row, .foot-row { position: absolute; left: 0; bottom: 0; }
.field { color: var(--w); background: rgba(255,255,255,.08); }

.c-r { color: var(--r); } .c-g { color: var(--g); } .c-y { color: var(--y); } .c-b { color: var(--b); }
.c-m { color: var(--m); } .c-c { color: var(--c); } .c-w { color: var(--w); }
.inv { color: #000 !important; text-shadow: none; background: var(--w); }
.inv.c-r { background: var(--r); } .inv.c-g { background: var(--g); } .inv.c-y { background: var(--y); }
.inv.c-m { background: var(--m); } .inv.c-c { background: var(--c); } .inv.c-b { background: var(--b); }
.blink { animation: blink 1s steps(1) infinite; }
.blink-cur::after { content: "█"; animation: blink 1s steps(1) infinite; margin-left: .1em; font-size: .5em; }
.hazard { color: var(--y); }
.mt-row.rule::after { content: ""; position: absolute; left: 0; right: 0; top: 45%; border-top: calc(var(--ch) * .22) solid currentColor; box-shadow: 0 0 4px currentColor; }

.mt-link { cursor: pointer; color: inherit; text-decoration: none; display: inline-block; }
.mt-link:hover { background: rgba(255,255,255,.12); }
.mt-link:visited { color: inherit; }
.menu-row { padding-left: calc(var(--cw) * 6); }
.menu-row + .menu-row { margin-top: 0; }

.mt-photo { height: calc(var(--ch) * var(--rows)); display: flex; align-items: center; }
.mt-photo.center { justify-content: center; }
.mt-photo canvas { image-rendering: pixelated; image-rendering: crisp-edges; display: block; }
.mt-photo canvas[data-hd] { cursor: zoom-in; }
.mt-split { display: flex; height: calc(var(--ch) * var(--rows)); gap: var(--cw); }
.mt-split .mt-photo { flex: none; align-items: flex-start; }
.mt-col { flex: 1; min-width: 0; }

/* 1200-baud paint */
.paint { visibility: hidden; animation: paint 1ms steps(1) forwards; }
.mt-photo.paint canvas, .mt-split.paint canvas { clip-path: inset(0 0 100% 0); animation: scan .9s steps(18) forwards; animation-delay: inherit; }
@keyframes paint { to { visibility: visible; } }
@keyframes scan { to { clip-path: inset(0 0 0 0); } }

.mt-off { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: calc(var(--ch) * 1.1); color: #555; text-shadow: none; }
.mt-connecting { position: absolute; inset: 0; display: flex; flex-direction: column; gap: var(--ch); align-items: center; justify-content: center; font-size: calc(var(--ch) * 1.5); }
.modem-bar { width: 60%; height: var(--ch); border: 1px solid var(--g); }
.modem-bar i { display: block; height: 100%; background: var(--g); transition: width .15s steps(1); }

.crt-on .screen-inner { animation: crt-on .45s ease-out; }
.crt-off .screen-inner { animation: crt-off .35s ease-in forwards; }
@keyframes crt-on { 0% { transform: scale(1, .005); filter: brightness(4); } 50% { transform: scale(1, .005); filter: brightness(4); } 100% { transform: scale(1, 1); filter: none; } }
@keyframes crt-off { 0% { transform: scale(1, 1); } 60% { transform: scale(1, .005); filter: brightness(4); } 100% { transform: scale(0, .005); } }

.case-bottom { display: flex; align-items: center; gap: 10px; padding: 10px 6px 2px; }
.brand { font: italic 900 18px "Arial Black", sans-serif; color: var(--brown); letter-spacing: 2px; text-shadow: 0 1px 0 rgba(255,255,255,.6); }
.led { width: 9px; height: 9px; border-radius: 50%; background: #4a2a1a; margin-left: auto; box-shadow: inset 0 1px 2px #000; }
.led.on { background: #ff8a1a; box-shadow: 0 0 6px #ff8a1a; }
.led.online { background: #4dff5a; box-shadow: 0 0 8px #4dff5a; }
.power {
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  background: linear-gradient(#c9bc9c, #9f9172); border: 1px solid #6e6249; color: var(--brown); font-size: 16px; line-height: 1;
  box-shadow: 0 2px 0 #6e6249;
}
.power:active { transform: translateY(2px); box-shadow: none; }

.keyboard {
  margin: -4px 22px 0;
  background: linear-gradient(#3b3129, #2a221c);
  border-radius: 0 0 22px 22px;
  padding: 16px 18px 18px;
  display: grid; grid-template-columns: auto 1fr; gap: 18px;
  box-shadow: inset 0 6px 10px rgba(0,0,0,.5);
}
.keypad { display: grid; grid-template-columns: repeat(3, 38px); gap: 6px; }
.keypad button, .fk {
  cursor: pointer; border: 0; border-radius: 4px;
  background: linear-gradient(#f0e8d4, #cfc2a2); color: #2a221c;
  box-shadow: 0 3px 0 #8e8068, 0 4px 3px rgba(0,0,0,.4);
  font: bold 14px Verdana, sans-serif; height: 30px;
}
.keypad button:active, .fk:active, .fk.pressed { transform: translateY(3px); box-shadow: 0 0 0 #8e8068; }
.fkeys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 8px; align-content: start; }
.fk { font: bold 10px/1.1 Verdana, sans-serif; text-transform: uppercase; height: 30px; padding: 0 4px; }
.fk.conn { background: linear-gradient(#e9e9e9, #b8b8b8); box-shadow: 0 3px 0 #777, 0 4px 3px rgba(0,0,0,.4); grid-row: span 2; height: auto; }
.fk.envoi { background: linear-gradient(#7fe08a, #3fae4f); box-shadow: 0 3px 0 #22702e, 0 4px 3px rgba(0,0,0,.4); color: #06260b; grid-column: span 2; }
.dialing .fk.envoi { animation: envoi-glow 1.1s ease-in-out infinite; }
@keyframes envoi-glow { 50% { box-shadow: 0 3px 0 #22702e, 0 0 14px 4px rgba(90, 255, 120, .75); filter: brightness(1.15); } }
.hint { text-align: center; font-size: 11px; opacity: .75; margin: 16px auto 0; max-width: 560px; }

/* ================================================================
   WINDOWS (pop-ups, viewer, card)
   ================================================================ */
.win {
  position: fixed; background: #c0c0c0; color: #000;
  border: 2px outset #fff; box-shadow: 2px 2px 0 #000, 6px 8px 18px rgba(0,0,0,.5);
  font: 12px Tahoma, Verdana, sans-serif;
  animation: pop .18s steps(3);
}
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.win-title {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  background: linear-gradient(90deg, #000080, #1084d0); color: #fff; font-weight: bold;
  padding: 2px 3px 2px 6px; cursor: move; user-select: none; touch-action: none;
}
.win-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-ctrls { display: flex; gap: 2px; flex: none; }
.win-ctrls button {
  width: 18px; height: 16px; padding: 0; line-height: 12px; font: bold 11px Tahoma, sans-serif;
  background: #c0c0c0; color: #000; border: 2px outset #fff; cursor: default;
}
.win-ctrls .win-x { cursor: pointer; }
.win-ctrls button:active { border-style: inset; }
.win-body { padding: 10px; }
.win h3 { margin: 0 0 6px; font: 900 18px/1.15 Impact, "Arial Black", sans-serif; }
.win p { margin: 0 0 8px; }
.ad-btn {
  display: block; width: 100%; margin-top: 6px; padding: 8px; cursor: pointer;
  font: bold 14px "Arial Black", Verdana, sans-serif; color: #fff;
  background: linear-gradient(#ff5a1f, #c40000); border: 3px outset #ff9a7a;
  animation: blink 1s steps(1) infinite;
}
.ad-btn:hover { animation: none; }
.ad-red .win-body { background: #fffb8a; }
.ad-red h3 { color: #d00; animation: blink .9s steps(1) infinite; }
.ad-gold .win-body { background: radial-gradient(circle, #fff7b0, #ffcf3f); text-align: center; }
.rainbow { background: linear-gradient(90deg, #f00, #f80, #dd0, #0b0, #08f, #a0f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ad-msn .win-title { background: linear-gradient(90deg, #2551b8, #5d8be8); }
.ad-msn .win-body { background: #fff; }
.ad-msn .msn-msg { background: #eef3ff; padding: 6px; border: 1px solid #9ab; }
.ad-msn .ad-btn { background: linear-gradient(#5d8be8, #2551b8); border-color: #9bc; animation: none; }
.ad-blue .win-body { background: linear-gradient(#e9f2ff, #b9d4ff); }
.ad-blue h3 { color: #002a8a; }
.ad-ram .win-body { background: #fff; }
.ad-ram h3 { color: #090; text-align: center; }
.progress { height: 18px; border: 2px inset #fff; background: #fff; margin: 6px 0; padding: 2px; }
.progress i { display: block; height: 100%; width: 3%; background: repeating-linear-gradient(90deg, #000080 0 10px, transparent 10px 12px); transition: width 1.6s steps(12); }

.viewer .win-body { background: #808080; padding: 6px; }
.viewer img { margin: 0 auto; max-height: 68vh; border: 2px inset #fff; }
.viewer p { color: #fff; margin: 6px 0 0; text-align: center; font-style: italic; }

/* baseball card */
.card-win .win-body { background: #2b6e2b repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 20px, transparent 20px 40px); }
.bcard { perspective: 1200px; cursor: pointer; aspect-ratio: 2.5 / 3.5; outline: none; }
.bcard-inner { position: relative; width: 100%; height: 100%; transition: transform .6s; transform-style: preserve-3d; }
.bcard.flipped .bcard-inner { transform: rotateY(180deg); }
.bcard-front, .bcard-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 8px; overflow: hidden; }
.bcard-front {
  background: #fff; padding: 10px; display: flex; flex-direction: column;
  border: 3px solid #ddd; box-shadow: inset 0 0 0 5px #b8151f;
}
.bcard-team { background: #b8151f; color: #fff; text-align: center; font: italic 900 15px "Arial Black", sans-serif; padding: 3px; letter-spacing: 1px; }
.bcard-photo { flex: 1; min-height: 0; border: 3px solid #1d2c78; border-top: 0; }
.bcard-photo img { width: 100%; height: 100%; object-fit: cover; }
.bcard-name { background: #1d2c78; color: #fff; font: 900 19px Impact, sans-serif; text-align: center; padding: 3px; letter-spacing: 2px; }
.bcard-pos { background: var(--gold); color: #1d2c78; font: bold 10px Verdana, sans-serif; text-align: center; padding: 2px; }
.bcard-rookie {
  position: absolute; right: 4px; bottom: 50px; width: 58px; height: 58px; border-radius: 50%;
  background: var(--gold); color: #b8151f; border: 3px solid #b8151f;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font: 900 11px/1 "Arial Black", sans-serif; transform: rotate(-14deg);
  box-shadow: 2px 2px 0 rgba(0,0,0,.4);
}
.bcard-back {
  transform: rotateY(180deg);
  background: #d9c49a; color: #3a2a12; padding: 10px; border: 3px solid #ece0c4;
  font: 11px "Courier New", monospace;
}
.bcard-back-head { background: #3a2a12; color: #d9c49a; font: bold 12px Verdana, sans-serif; padding: 4px 6px; margin-bottom: 6px; }
.bcard-back table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.bcard-back td { border-bottom: 1px dashed #8a7550; padding: 3px 2px; }
.bcard-back td:last-child { text-align: right; font-weight: bold; }
.bcard-back p { font-size: 11px; line-height: 1.35; margin: 0; }

/* ---------------- the cat ---------------- */
#cat {
  position: fixed; left: 0; top: 0; z-index: 9000;
  image-rendering: pixelated; cursor: pointer;
  will-change: transform;
}
.cat-bubble {
  position: fixed; left: 0; top: 0; z-index: 9001; pointer-events: none;
  background: #ffffe1; color: #000; border: 1px solid #000; border-radius: 6px;
  font: 12px Tahoma, Verdana, sans-serif; padding: 4px 8px; white-space: nowrap;
  box-shadow: 2px 2px 0 rgba(0,0,0,.4);
}
.cat-bubble[hidden] { display: none; }

/* ================================================================
   GAMES
   ================================================================ */
.games-box { display: flex; flex-direction: column; gap: 6px; }
.game-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; cursor: pointer;
  background: #c0c0c0; color: #000; border: 2px outset #fff; padding: 4px 8px;
  font: bold 12px Tahoma, Verdana, sans-serif; text-align: left;
}
.game-btn:active { border-style: inset; }
.game-btn .sprite { image-rendering: pixelated; flex: none; }
.laser-dot { width: 12px; height: 12px; margin: 0 6px; border-radius: 50%; background: #f22; box-shadow: 0 0 6px 2px rgba(255,0,0,.7); flex: none; }
.game-win:focus { outline: none; }
.game-win .win-body { background: #000; padding: 6px; }
.game-bar { display: flex; justify-content: space-between; font: 20px VT323, monospace; color: #9bbc0f; padding: 0 2px 4px; }
.game-bar b { color: #fff; font-weight: normal; }
.game canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; touch-action: none; }
.game-help { color: #bbb; font-size: 11px; margin: 6px 2px 0; }
.dpad { display: none; grid-template-columns: repeat(3, 48px); grid-template-rows: repeat(2, 40px); gap: 4px; justify-content: center; margin-top: 8px; }
.dpad button { background: #c0c0c0; border: 2px outset #fff; font-size: 16px; cursor: pointer; touch-action: none; }
.dpad button:active { border-style: inset; }
.dpad [data-d="up"] { grid-column: 2; }
.dpad [data-d="left"] { grid-column: 1; grid-row: 2; }
.dpad [data-d="down"] { grid-column: 2; grid-row: 2; }
.dpad [data-d="right"] { grid-column: 3; grid-row: 2; }
@media (hover: none) { .dpad { display: grid; } }

/* ================================================================
   SMALL SCREENS
   ================================================================ */
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr 1fr; }
  .middle { grid-column: 1 / -1; order: -1; }
}
@media (max-width: 600px) {
  .layout { grid-template-columns: 1fr; padding: 12px 16px; }
  .case { padding: 14px 12px 8px; border-radius: 24px 24px 10px 10px; }
  .bezel { padding: 10px; border-radius: 18px; }
  .keyboard { margin: -4px 10px 0; padding: 12px; gap: 10px; grid-template-columns: 1fr; }
  .keypad { grid-template-columns: repeat(6, 1fr); }
  .keypad button:nth-child(n+7) { display: none; }
  .fk { font-size: 9px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
