* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; background: #1a0a05; overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; }
body { display: flex; align-items: center; justify-content: center; font-family: var(--f-body); color: #fff; }
#stage { position: relative; overflow: hidden; box-shadow: 0 0 80px rgba(255, 110, 30, .25); }
#game { display: block; }
#ui { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform-origin: 0 0; pointer-events: none; }
#ui .screen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: auto; }
#ui .screen.cine { pointer-events: none; }
#ui .screen.cine .skip { pointer-events: auto; position: absolute; right: 24px; top: 8px; }
.hidden { display: none !important; }

/* ------------------------------------------------ chunky toy buttons */
.btn {
  position: relative; font: 900 24px var(--f-display); letter-spacing: 1px;
  color: #fff; text-shadow: 0 3px 0 #7a2c00, 0 0 2px #7a2c00;
  background: linear-gradient(#ffa24a, #ff7b1c 55%, #e0600c);
  border: 4px solid #2a1206; border-radius: 14px; padding: 14px 34px 12px; margin: 7px;
  box-shadow: 0 6px 0 #8a3500, 0 8px 14px rgba(0,0,0,.45), inset 0 3px 0 rgba(255,255,255,.4);
  cursor: pointer; transition: transform .08s, filter .08s; min-width: 260px;
}
.btn::before { /* studs */
  content: ""; position: absolute; left: 18px; right: 18px; top: -11px; height: 10px;
  background: radial-gradient(circle at 50% 70%, #ffb46a 0 5px, #c2500c 5.5px 6.5px, transparent 7px) 0 0 / 28px 10px repeat-x;
}
.btn:hover { transform: translateY(-2px) scale(1.03); filter: brightness(1.08); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #8a3500, inset 0 3px 0 rgba(255,255,255,.4); }
.btn.big { font-size: 32px; padding: 18px 44px 16px; background: linear-gradient(#c8ff5a, #a4e22c 55%, #7fbf14); text-shadow: 0 3px 0 #3f6a06; box-shadow: 0 6px 0 #4f7f0a, 0 8px 14px rgba(0,0,0,.45), inset 0 3px 0 rgba(255,255,255,.5); }
.btn.big::before { background: radial-gradient(circle at 50% 70%, #d6ff7a 0 5px, #5f9a12 5.5px 6.5px, transparent 7px) 0 0 / 28px 10px repeat-x; }
.btn.small { font-size: 17px; padding: 10px 20px 9px; min-width: 150px; }
.btn.small::before { display: none; }
.row { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 8px; flex-wrap: wrap; }

/* ------------------------------------------------ title menu */
.menu { justify-content: flex-start !important; padding-top: 34px; }
.title-wrap { text-align: center; animation: drop .7s cubic-bezier(.2, 1.6, .4, 1) both; }
.title { font: 900 120px/0.9 var(--f-display); letter-spacing: 4px; transform: rotate(-3deg); }
.title span { display: block; -webkit-text-stroke: 8px #2a1206; paint-order: stroke fill; text-shadow: 0 10px 0 #2a1206, 0 14px 24px rgba(0,0,0,.5); }
.title .t1 { color: #ff7b1c; font-size: 96px; }
.title .t2 { color: #a4e22c; }
.tagline { margin-top: 16px; font: 900 22px var(--f-display); letter-spacing: 6px; color: #fff; -webkit-text-stroke: 4px #2a1206; paint-order: stroke fill; }
.menu-buttons { margin-top: 22px; display: flex; flex-direction: column; align-items: center; animation: rise .6s .25s both; }
.commander { position: absolute; left: 20px; bottom: 16px; font-size: 16px; color: #ffe0c0; text-shadow: 0 2px 0 #2a1206; }
.commander b { color: #d6ff7a; }
.hint { position: absolute; right: 20px; bottom: 16px; font-size: 14px; color: #ffe0c0; text-shadow: 0 2px 0 #2a1206; }
@keyframes drop { from { transform: translateY(-260px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(80px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ------------------------------------------------ panels */
.h { font: 900 52px var(--f-display); color: #ffab5e; -webkit-text-stroke: 6px #2a1206; paint-order: stroke fill; margin-bottom: 14px; text-shadow: 0 6px 0 #2a1206; }
.box { background: rgba(45, 20, 10, .9); border: 5px solid #ffab5e; border-radius: 26px; padding: 30px 44px; display: flex; flex-direction: column; align-items: center; box-shadow: 0 0 0 5px #2a1206, 0 20px 50px rgba(0,0,0,.6); animation: pop .35s cubic-bezier(.2, 1.5, .4, 1) both; max-width: 900px; }
.box.wide { min-width: 720px; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.overlay { background: rgba(20, 8, 4, .35); }

.mcards { display: flex; gap: 26px; margin: 10px 0 20px; }
.mcard { width: 300px; height: 330px; border: 5px solid #2a1206; border-radius: 22px; cursor: pointer; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 22px; position: relative; overflow: hidden; box-shadow: 0 8px 0 #2a1206, 0 12px 20px rgba(0,0,0,.5); transition: transform .12s; font-family: inherit; }
.mcard:hover:not(.locked) { transform: translateY(-6px) rotate(-1deg); }
.mcard.desert { background: linear-gradient(#ffbf80 0 38%, #e88a4f 38%, #c95f2f); }
.mcard.canyon { background: linear-gradient(#ffd3a0 0 18%, #b4532f 18% 50%, #e48450 50%, #c75c30); }
.mcard.cave { background: radial-gradient(circle at 50% 40%, #7ee7ff55, transparent 40%), linear-gradient(#2c1838, #4d2446 55%, #8a4a3c); }
.mcard.locked { filter: grayscale(.85) brightness(.6); cursor: not-allowed; }
.mcode { font: 900 20px var(--f-display); color: #ffd21f; -webkit-text-stroke: 3px #2a1206; paint-order: stroke fill; }
.mname { font: 900 30px/1.05 var(--f-display); -webkit-text-stroke: 5px #2a1206; paint-order: stroke fill; text-align: center; margin: 6px 0; }
.mdiff { font: bold 15px sans-serif; background: #2a1206; padding: 4px 12px; border-radius: 20px; }
.mstars { margin-top: 12px; font-size: 34px; color: rgba(0,0,0,.35); -webkit-text-stroke: 2px #2a1206; }
.mstars .on { color: #ffd21f; }

/* briefing */
.brief { width: 1120px; background: rgba(45, 20, 10, .93); border: 5px solid #ffab5e; border-radius: 26px; box-shadow: 0 0 0 5px #2a1206, 0 20px 50px rgba(0,0,0,.6); padding: 24px 32px; animation: pop .35s both; }
.brief-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.brief-head .code { font: 900 22px var(--f-display); color: #ffd21f; }
.brief-head .name { font: 900 44px var(--f-display); color: #a4e22c; -webkit-text-stroke: 5px #2a1206; paint-order: stroke fill; flex: 1; }
.diff { font: 900 16px sans-serif; padding: 6px 14px; border-radius: 20px; border: 3px solid #2a1206; }
.d-easy { background: #a4e22c; color: #2a1206; } .d-medium { background: #ffd21f; color: #2a1206; } .d-hard { background: #ff4a2a; }
.brief-body { display: flex; gap: 28px; }
.brief-text { flex: 1.4; font-size: 21px; line-height: 1.45; }
.brief-text p { margin-bottom: 12px; }
.from { font: bold 13px var(--f-body); color: #ffab5e; letter-spacing: 2px; margin-bottom: 10px; }
.joke { margin-top: 10px; font-size: 16px; color: #ffe0b0; background: rgba(0,0,0,.3); border-radius: 12px; padding: 10px 14px; font-style: italic; }
.brief-side { flex: 1; background: rgba(0,0,0,.28); border-radius: 18px; padding: 16px 20px; }
.brief-side h3 { font: 900 18px var(--f-display); color: #ffab5e; margin: 4px 0 8px; }
.brief-side ul { list-style: none; margin-bottom: 14px; }
.brief-side li { font-size: 18px; padding: 4px 0 4px 30px; position: relative; }
.brief-side li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 14px; height: 18px; background: #6bff3a; clip-path: polygon(50% 0, 100% 28%, 100% 72%, 50% 100%, 0 72%, 0 28%); box-shadow: 0 0 8px #6bff3a; }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: 15px; }
kbd { display: inline-block; background: #fff4e0; color: #2a1206; border: 2px solid #2a1206; border-bottom-width: 4px; border-radius: 6px; padding: 1px 7px; font: bold 13px var(--f-body); margin-right: 3px; }

/* results */
.stamp { font: 900 58px var(--f-display); color: #a4e22c; -webkit-text-stroke: 7px #2a1206; paint-order: stroke fill; transform: rotate(-3deg); animation: stamp .5s cubic-bezier(.2, 1.8, .4, 1) both; text-shadow: 0 6px 0 #2a1206; }
.stamp.red { color: #ff5a3a; }
@keyframes stamp { from { transform: scale(3) rotate(-8deg); opacity: 0; } to { transform: rotate(-3deg); opacity: 1; } }
.bigstars { font-size: 72px; margin: 6px 0 0; -webkit-text-stroke: 4px #2a1206; color: rgba(0,0,0,.35); }
.bigstars span { display: inline-block; animation: pop .4s both; }
.bigstars .on { color: #ffd21f; text-shadow: 0 0 20px #ffd21f88; }
.rank { font: 900 22px var(--f-display); color: #ffd21f; margin-bottom: 10px; }
.stats { display: flex; gap: 14px; margin: 10px 0; }
.stats div { background: rgba(0,0,0,.35); border-radius: 14px; padding: 10px 16px; text-align: center; font-size: 14px; color: #ffcc99; min-width: 120px; }
.stats b { display: block; font: 900 30px var(--f-display); color: #fff; }
.endtext { font-size: 20px; text-align: center; max-width: 640px; margin: 10px 0; color: #ffe8c8; }
.small-note { font-size: 14px; color: #ffcc99; margin: 10px 0; text-align: center; }

/* settings */
.slider { display: flex; align-items: center; gap: 16px; width: 600px; margin: 8px 0; font: 900 18px var(--f-display); }
.slider span { width: 240px; color: #ffab5e; }
.slider input { flex: 1; accent-color: #a4e22c; height: 26px; }
.slider em { width: 44px; text-align: right; font-style: normal; }
.opt { display: flex; align-items: center; gap: 16px; width: 600px; margin: 10px 0; font: 900 18px var(--f-display); }
.opt > span { width: 240px; color: #ffab5e; }
.seg { display: flex; gap: 6px; }
.segb { font: 900 15px var(--f-display); padding: 9px 16px; border-radius: 12px; border: 3px solid #2a1206; background: #6a3a22; color: #ffcc99; cursor: pointer; }
.segb.on { background: #a4e22c; color: #2a1206; }
.credits p { font-size: 17px; line-height: 1.45; margin: 6px 0; text-align: center; max-width: 760px; color: #ffe8c8; }

/* christmas */
.xmas-screen { justify-content: flex-start !important; padding-top: 14px; pointer-events: auto; }
.xmas { display: flex; flex-direction: column; align-items: center; text-align: center; }
.x1, .x2, .x3 { font-family: var(--f-display); -webkit-text-stroke: 7px #2a1206; paint-order: stroke fill; text-shadow: 0 6px 0 #2a1206; opacity: 0; animation: rise .8s both; }
.x1 { font-size: 40px; color: #ff9a3a; animation-delay: .3s; }
.x2 { font-size: 34px; color: #a4e22c; animation-delay: 1.4s; }
.x3 { font-size: 58px; color: #ff4a4a; animation: rise .8s 2.6s both, glow 1.6s 3.4s infinite alternate; }
@keyframes glow { to { text-shadow: 0 6px 0 #2a1206, 0 0 30px #ffd21f; } }
.xmsg { margin-top: 6px; font-size: 17px; color: #fff3e0; text-shadow: 0 2px 0 #2a1206, 0 0 6px #2a1206; max-width: 640px; opacity: 0; animation: rise .8s 3.4s both; background: rgba(30,10,40,.45); border-radius: 16px; padding: 10px 18px; }
.xmsg .from { margin-top: 6px; font: bold 16px var(--f-body); letter-spacing: 0; color: #d6ff7a; }
.xmas .row { position: absolute; bottom: 6px; left: 0; right: 0; opacity: 0; animation: rise .6s 4.2s both; }

/* touch */
#touch { position: absolute; inset: 0; pointer-events: none; }
#touch > * { pointer-events: auto; position: absolute; }
#t-stick { left: 3%; bottom: 20%; width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,.12); border: 3px solid rgba(255,255,255,.35); }
#t-knob { position: absolute; left: 45px; top: 45px; width: 60px; height: 60px; border-radius: 50%; background: rgba(255,171,94,.85); border: 3px solid #2a1206; transition: transform .03s; }
.tbtn { font: 900 18px var(--f-display); color: #fff; border: 4px solid #2a1206; border-radius: 50%; background: rgba(255,123,28,.8); width: 100px; height: 100px; }
.tbtn.on { filter: brightness(1.3); transform: scale(.94); }
#t-fire { right: 3%; bottom: 22%; width: 120px; height: 120px; }
#t-boost { right: 15%; bottom: 10%; background: rgba(164,226,44,.8); }
#t-repair { right: 3%; bottom: 52%; width: 84px; height: 84px; font-size: 13px; background: rgba(120,220,255,.7); }
#t-special { right: 12%; bottom: 52%; width: 84px; height: 84px; font-size: 12px; background: rgba(255,210,31,.75); color: #2a1206; }
#t-pause { right: 2%; top: 16%; width: 54px; height: 54px; font-size: 16px; background: rgba(0,0,0,.5); }

#rotate { display: none; position: fixed; inset: 0; background: #1a0a05; color: #ffab5e; font: 900 22px var(--f-display); align-items: center; justify-content: center; text-align: center; padding: 30px; z-index: 10; }
@media (orientation: portrait) and (max-width: 700px) { #rotate { display: flex; } }

.starkey { display: flex; gap: 10px; margin-bottom: 6px; font-size: 14px; }
.starkey span { padding: 4px 10px; border-radius: 12px; background: rgba(0,0,0,.35); color: #9a7a6a; }
.starkey span.on { color: #ffd21f; }
.brief-side li.bonus { color: #ffd21f; font-size: 15px; }
.brief-side li.bonus::before { display: none; }

/* ==========================================================================
   CONSOLE LOOK — brushed steel, rivets, green/black hazard stripes,
   black LCD screens with green phosphor text. (Overrides the toy styles above.)
   ========================================================================== */
:root {
  --steel: linear-gradient(#e4e7ea, #b3b9be 45%, #8c9399 55%, #c3c8cc);
  --lcd: #0b1008; --phos: #7dff4a; --haz-a: #86c23a; --haz-b: #1c2a0b;
  --hazard: repeating-linear-gradient(-45deg, var(--haz-a) 0 22px, var(--haz-b) 22px 44px);
}
#stage { box-shadow: 0 0 80px rgba(110, 200, 40, .18); }
html, body { background: #0b0f08; }

/* buttons: dark gunmetal pills with green lettering, set in a steel bezel */
.btn {
  font: 900 22px var(--f-display); letter-spacing: 1px; color: var(--phos);
  text-shadow: 0 0 10px rgba(125,255,74,.55), 0 2px 0 #000;
  background: linear-gradient(#3a4146, #22272b 50%, #15191c 51%, #262c30);
  border: 3px solid #0b0d0e; border-radius: 40px; padding: 12px 34px 11px; margin: 6px;
  box-shadow: 0 0 0 4px #aab1b6, 0 0 0 6px #4c5358, 0 6px 12px rgba(0,0,0,.55), inset 0 2px 0 rgba(255,255,255,.18);
  min-width: 240px;
}
.btn::before { display: none; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.25); color: #c9ff9e; }
.btn:active { transform: translateY(2px); box-shadow: 0 0 0 4px #aab1b6, 0 0 0 6px #4c5358, inset 0 2px 6px rgba(0,0,0,.6); }
.btn.big { font-size: 26px; padding: 15px 40px 14px; background: linear-gradient(#3f4a2e, #24301a 50%, #18220f 51%, #2a3a1a); text-shadow: 0 0 14px rgba(125,255,74,.8), 0 2px 0 #000; box-shadow: 0 0 0 4px #aab1b6, 0 0 0 6px #4c5358, 0 0 24px rgba(125,255,74,.25), 0 6px 12px rgba(0,0,0,.55), inset 0 2px 0 rgba(255,255,255,.18); }
.btn.small { font-size: 15px; padding: 9px 20px 8px; min-width: 140px; }
.row.tight { margin-top: 4px; gap: 10px; }

/* full-screen steel backdrop with a hazard band (like a hangar bulkhead) */
.screen.steel {
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.12), transparent 40%),
    linear-gradient(transparent 216px, #0e1408 216px, #0e1408 223px, transparent 223px, transparent 497px, #0e1408 497px, #0e1408 504px, transparent 504px),
    var(--hazard) 0 223px / 100% 274px no-repeat,
    repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 2px, transparent 2px 7px),
    linear-gradient(#9da4a9, #737a80);
}
.screen.steel::before, .screen.steel::after { /* riveted plates on the bulkhead */
  content: ""; position: absolute; width: 90px; height: 120px; top: 40px; border-radius: 6px;
  background: radial-gradient(circle, #f2f4f5 0 3px, #6a7278 3.5px, transparent 4.5px) 0 0 / 30px 30px, linear-gradient(#c6cbcf, #8f969b);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.35); opacity: .7; left: 30px;
}
.screen.steel::after { left: auto; right: 30px; top: auto; bottom: 40px; }

/* panels: steel frame around a dark phosphor screen */
.box, .brief {
  background: radial-gradient(circle at 50% 30%, #1f3a12, #0b1408 75%);
  border: none; border-radius: 22px; padding: 28px 40px;
  box-shadow: 0 0 0 5px #20262a, 0 0 0 17px #b6bcc1, 0 0 0 19px #5f676d, 0 0 0 21px #20262a, 0 24px 50px rgba(0,0,0,.6), inset 0 0 40px rgba(0,0,0,.6);
}
.h { color: #dfe4e8; font-style: italic; -webkit-text-stroke: 6px #14181b; text-shadow: 0 5px 0 #0c0f10, 0 0 22px rgba(125,255,74,.25); }
.stamp { color: #dfe4e8; font-style: italic; -webkit-text-stroke: 7px #14181b; text-shadow: 0 6px 0 #0c0f10, 0 0 26px rgba(125,255,74,.45); margin-bottom: 12px; }
.stamp.red { color: #ff5a3a; text-shadow: 0 6px 0 #0c0f10, 0 0 26px rgba(255,60,40,.5); }

/* title console */
.menu { justify-content: center !important; padding-top: 0; }
.console {
  position: relative; width: 900px; padding: 16px 22px 18px; border-radius: 26px;
  background: var(--steel);
  box-shadow: 0 0 0 4px #2a3035, inset 0 2px 0 rgba(255,255,255,.7), inset 0 -3px 0 rgba(0,0,0,.35), 0 26px 60px rgba(0,0,0,.55);
  animation: drop .7s cubic-bezier(.2, 1.4, .4, 1) both;
}
.console::before { /* rivets */
  content: ""; position: absolute; inset: 9px; border-radius: 20px; pointer-events: none;
  background: radial-gradient(circle, #fff 0 2.5px, #6a7278 3px, transparent 4px) 0 0 / 100% 100% no-repeat,
    radial-gradient(circle at 0 0, #fff 0 2.5px, #6a7278 3px, transparent 4px), radial-gradient(circle at 100% 0, #fff 0 2.5px, #6a7278 3px, transparent 4px),
    radial-gradient(circle at 0 100%, #fff 0 2.5px, #6a7278 3px, transparent 4px), radial-gradient(circle at 100% 100%, #fff 0 2.5px, #6a7278 3px, transparent 4px);
}
.c-top { display: flex; align-items: center; justify-content: center; gap: 22px; margin-bottom: 10px; }
.c-top .vent { width: 70px; height: 16px; background: repeating-linear-gradient(-60deg, #3a4146 0 5px, transparent 5px 11px); }
.c-slot { width: 330px; height: 22px; border-radius: 12px; background: linear-gradient(#1a1e21, #3a4247); box-shadow: inset 0 2px 4px #000, 0 1px 0 rgba(255,255,255,.6); position: relative; }
.c-slot b { position: absolute; right: 4px; top: 3px; width: 50px; height: 16px; border-radius: 8px; background: linear-gradient(#3f4a2e, #18220f); box-shadow: inset 0 0 6px rgba(125,255,74,.5); }
.c-screen {
  position: relative; border-radius: 16px; padding: 26px 20px 22px; text-align: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 55%, rgba(80,190,40,.55), rgba(10,30,8,.78) 62%, rgba(4,10,3,.92));
  box-shadow: 0 0 0 6px #0f1306, 0 0 0 10px var(--haz-a), inset 0 0 50px rgba(0,0,0,.8);
}
.c-screen::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(transparent 0 3px, rgba(0,0,0,.18) 3px 4px); pointer-events: none; }
.title { transform: rotate(-2deg) skewX(-10deg); }
.title span { -webkit-text-stroke: 9px #111518; text-shadow: 0 8px 0 #0c0f10, 0 0 30px rgba(125,255,74,.35); }
.title .t1 { color: #ff8a2a; font-size: 84px; }
.title .t2 { color: #d8dde1; font-size: 126px; }
.tagline { color: var(--phos); -webkit-text-stroke: 3px #0b1408; font-size: 18px; letter-spacing: 7px; margin-top: 10px; }
.c-bottom { display: flex; align-items: center; gap: 18px; margin-top: 16px; }
.c-knobs { display: flex; align-items: center; gap: 12px; padding-left: 6px; }
.c-knobs i { display: block; width: 50px; height: 50px; border-radius: 50%; }
.c-knobs .sw { background: radial-gradient(circle, #4a5257 0 9px, #22282c 10px 22px, #8d959b 23px); box-shadow: 0 3px 6px rgba(0,0,0,.5); }
.c-knobs .red { border-radius: 8px; width: 46px; height: 52px; background: linear-gradient(#ff5a4a, #c0150c 60%, #7a0a05); box-shadow: 0 0 0 4px #22282c, 0 4px 8px rgba(0,0,0,.5), inset 0 3px 0 rgba(255,255,255,.4); }
.c-knobs .knob { background: radial-gradient(circle at 40% 35%, #ffffff, #b9c0c5 35%, #6f777d 70%, #3a4146); box-shadow: 0 0 0 4px #2a3035, 0 5px 8px rgba(0,0,0,.5); }
.menu-buttons { margin-top: 0; flex: 1; align-items: stretch; animation: none; }
.c-grille { height: 18px; margin: 0 12px 8px; border-radius: 9px; background: repeating-linear-gradient(90deg, #2a3035 0 4px, #59626a 4px 6px); box-shadow: inset 0 2px 4px #000; }
.commander, .hint { color: #e6f5dc; text-shadow: 0 2px 0 #000; }
.commander b { color: var(--phos); }

/* mission select cards: framed monitors */
.mcard { border: none; border-radius: 16px; box-shadow: 0 0 0 5px #20262a, 0 0 0 13px #b6bcc1, 0 0 0 15px #20262a, 0 12px 20px rgba(0,0,0,.5); }
.mcode { color: var(--phos); -webkit-text-stroke: 3px #0b1408; font-style: italic; }
.mname { font-style: italic; -webkit-text-stroke: 5px #111518; }
.mdiff { background: #111518; color: var(--phos); }

/* briefing */
.brief-head .code { color: var(--phos); font-style: italic; }
.brief-head .name { color: #dfe4e8; font-style: italic; -webkit-text-stroke: 5px #111518; }
.from { color: var(--phos); }
.brief-text { color: #e8f3e0; }
.joke { background: rgba(0,0,0,.35); color: #c9f5b0; border-left: 4px solid var(--phos); }
.brief-side { background: rgba(0,0,0,.4); box-shadow: inset 0 0 0 2px rgba(125,255,74,.25); }
.brief-side h3 { color: var(--phos); font-style: italic; }
kbd { background: linear-gradient(#e7eaec, #aab1b6); color: #111518; border-color: #111518; }

/* results board: orange-to-yellow panel in a steel frame */
.board {
  position: relative; width: 860px; padding: 18px 18px 64px; border-radius: 18px;
  background: var(--steel);
  box-shadow: 0 0 0 4px #2a3035, inset 0 2px 0 rgba(255,255,255,.7), 0 26px 60px rgba(0,0,0,.55);
  animation: pop .4s cubic-bezier(.2, 1.4, .4, 1) both;
}
.board-in {
  display: flex; gap: 14px; padding: 18px; border-radius: 10px;
  background: linear-gradient(#ff8a12, #ffb21e 55%, #ffe23a);
  box-shadow: 0 0 0 4px #4a3008, inset 0 0 24px rgba(120,50,0,.35);
}
.board.red .board-in { background: linear-gradient(#d8361e, #f0702a 55%, #ffb23a); }
.board-in.single .bcol { flex: 1; }
.bcol { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.bcol:first-child { flex: 1.35; }
.bh { font: 900 20px var(--f-display); color: var(--phos); text-align: center; padding: 7px 0 6px; border-radius: 9px;
  background: linear-gradient(#3a4146, #15191c); box-shadow: 0 0 0 2px #0b0d0e, inset 0 1px 0 rgba(255,255,255,.2); text-shadow: 0 0 10px rgba(125,255,74,.6); }
.brow { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 9px 14px; border-radius: 8px;
  background: rgba(255,255,255,.16); box-shadow: inset 0 0 0 2px rgba(150,70,0,.25); font: 900 17px var(--f-display); color: #4a2604; }
.brow b { font-size: 19px; color: #3a1c02; min-width: 60px; text-align: left; }
.brow.total { margin-top: 4px; border-top: 3px dotted rgba(90,40,0,.5); font-size: 22px; background: rgba(255,255,255,.28); }
.brow.total b { font-size: 26px; }
.brow.stars { font-size: 46px; padding: 2px 0; -webkit-text-stroke: 3px #4a2604; color: rgba(0,0,0,.2); }
.brow.stars span { display: inline-block; animation: pop .4s both; }
.brow.stars .on { color: #fff6b0; text-shadow: 0 0 16px #fff; }
.brow.rankrow { font-size: 16px; }
.brow.keys { gap: 8px; padding: 6px; font: bold 12px var(--f-body); }
.brow.keys span { color: rgba(74,38,4,.45); } .brow.keys span.on { color: #3a1c02; }
.brow.note { font: bold 13px/1.35 var(--f-body); text-align: center; flex-direction: column; color: #4a2604; }
.board-btns { position: absolute; right: 16px; bottom: 10px; display: flex; align-items: center; gap: 4px; }
.board-btns .btn { margin: 4px 6px; }
.board-btns .btn.big { min-width: 200px; font-size: 20px; padding: 10px 26px 9px; }
.board-btns .btn.small { min-width: 110px; }

/* settings / credits text on dark screens */
.slider span, .opt > span { color: var(--phos); font-style: italic; }
.segb { background: #22282c; color: #9aa2a8; border-color: #0b0d0e; }
.segb.on { background: var(--phos); color: #0b1408; }
.credits p { color: #e1f0d6; }
.small-note { color: #b9e0a0; }

/* steel shutter used for screen transitions */
#shutter { position: absolute; inset: 0; pointer-events: none; z-index: 5; display: flex; flex-direction: column; overflow: hidden; }
#shutter i {
  flex: 1; display: block; transform: translateY(-640%);
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.04) 0 2px, transparent 2px 9px), linear-gradient(#8c9399, #b9bfc4 30%, #7b8288 85%, #3f464c);
  border-bottom: 3px solid #1d2226; box-shadow: inset 0 2px 0 rgba(255,255,255,.4), 0 4px 8px rgba(0,0,0,.4);
  transition: transform .26s cubic-bezier(.6, 0, .9, .6);
}
#shutter i::before, #shutter i::after { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; margin-top: 8px; background: radial-gradient(circle at 35% 35%, #fff, #6a7278); }
#shutter i { position: relative; }
#shutter i::before { left: 12px; } #shutter i::after { right: 12px; }
#shutter.closed { pointer-events: auto; }
#shutter.closed i { transform: none; }
#shutter i:nth-child(1) { transition-delay: .15s; } #shutter i:nth-child(2) { transition-delay: .12s; } #shutter i:nth-child(3) { transition-delay: .09s; }
#shutter i:nth-child(4) { transition-delay: .06s; } #shutter i:nth-child(5) { transition-delay: .03s; } #shutter i:nth-child(6) { transition-delay: 0s; }
#shutter:not(.closed) i { transition-timing-function: cubic-bezier(.3, .4, .4, 1); }
#shutter:not(.closed) i:nth-child(1) { transition-delay: 0s; } #shutter:not(.closed) i:nth-child(6) { transition-delay: .15s; }
#shutter:not(.closed) i:nth-child(2) { transition-delay: .03s; } #shutter:not(.closed) i:nth-child(5) { transition-delay: .12s; }
#shutter:not(.closed) i:nth-child(3) { transition-delay: .06s; } #shutter:not(.closed) i:nth-child(4) { transition-delay: .09s; }

/* ---------------------------------------------------------------- CAVE WINDOW
   The page is the cave; the game is a riveted steel viewport set into it. */
html, body {
  background: #120804 url(img/cave.jpg) center / cover no-repeat fixed;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0) 45%, rgba(0,0,0,.55) 100%);
}
#stage {
  border-radius: 6px;
  box-shadow:
    0 0 0 3px #0c0d0b,
    0 0 0 9px #59605a,
    0 0 0 10px #8b938b,
    0 0 0 14px #2a2e2a,
    0 0 0 16px #0a0a08,
    0 0 30px 18px rgba(255, 140, 40, .16),
    0 30px 90px 20px rgba(0, 0, 0, .85);
}
#stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 50;
  border-radius: 6px;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.65), inset 0 0 26px rgba(0,0,0,.5);
}
@media (max-width: 700px), (max-height: 520px) {
  #stage, #stage::after { border-radius: 0; box-shadow: none; }
}

/* ---------------------------------------------------------------- ONE CONSOLE
   Menus, briefings and overlays use the same parts as the in-game HUD:
   hazard rails (drawn on the canvas), chamfered brushed-steel plates with
   rivets, recessed black LCD screens and green phosphor lettering. */
:root {
  --ink: #11160c; --label: #8d9a86;
  --plate: linear-gradient(#d9dde0, #a9afb4 45%, #6e757b);
  --brushed: repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 1px, transparent 1px 4px, rgba(0,0,0,.05) 4px 5px, transparent 5px 11px);
  --lcd-glow: linear-gradient(rgba(120,255,80,.10), rgba(0,0,0,0) 55%); --lcd-fill: linear-gradient(#0b1008, #0b1008);
  --scan: repeating-linear-gradient(transparent 0 3px, rgba(0,0,0,.22) 3px 4px);
  --rv: #fff 0 1.5px, #7d858c 3.5px, rgba(0,0,0,.45) 4px, transparent 5px;
  --rivets: radial-gradient(circle at 9px 9px, var(--rv)), radial-gradient(circle at calc(100% - 9px) 9px, var(--rv)),
            radial-gradient(circle at 9px calc(100% - 9px), var(--rv)), radial-gradient(circle at calc(100% - 9px) calc(100% - 9px), var(--rv));
  --chamfer: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
}
.screen.steel { background: none; }
.screen.steel::before, .screen.steel::after { display: none; }
.overlay { background: rgba(8, 12, 6, .3); }
.screen.overlay, .screen.panel-screen { filter: drop-shadow(0 18px 26px rgba(0,0,0,.6)); }

/* panel = steel plate + LCD screen */
.box, .brief, .xmsg {
  border: 16px solid transparent; border-radius: 0; clip-path: var(--chamfer);
  background: var(--scan) padding-box, var(--lcd-glow) padding-box, var(--lcd-fill) padding-box,
              var(--rivets) border-box, var(--brushed) border-box, var(--plate) border-box;
  box-shadow: inset 0 0 0 3px #2a3220, inset 0 0 40px rgba(0,0,0,.7);
}
.box { padding: 24px 40px 26px; }
.brief { padding: 20px 28px; }
.box .h { font: 900 46px var(--f-display); color: var(--phos); -webkit-text-stroke: 0; text-shadow: 0 0 16px rgba(125,255,74,.6); margin-bottom: 12px; }
.brief-head .name { color: var(--phos); -webkit-text-stroke: 0; text-shadow: 0 0 14px rgba(125,255,74,.55); }
.brief-head .code, .brief-side h3, .slider span, .opt > span { color: #e9ecee; }
.from { color: var(--label); font: bold 13px var(--f-body); letter-spacing: 1px; }
.brief-side { background: rgba(0,0,0,.35); box-shadow: inset 0 0 0 2px #2a3220; border-radius: 8px; }
.joke { border-radius: 6px; }
.diff { border-color: var(--ink); font-style: italic; font-family: var(--f-display); }
.credits p b { color: var(--phos); }

/* mission cards are monitor feeds */
.mcard::after { content: ""; position: absolute; inset: 0; background: var(--scan); pointer-events: none; }
.mcard > * { position: relative; z-index: 1; }
.mstars { -webkit-text-stroke: 2px var(--ink); }

/* text on the backdrop: same outline as the in-game banners */
.h, .stamp, .mname { -webkit-text-stroke-color: var(--ink); }
.commander, .hint { bottom: 34px; left: 26px; }
.hint { left: auto; right: 26px; }
#ui .screen.cine .skip { top: 42px; right: 26px; }

/* christmas */
.xmas-screen { padding-top: 40px; }
.x1, .x2, .x3 { -webkit-text-stroke-color: var(--ink); text-shadow: 0 6px 0 var(--ink); }
@keyframes glow { to { text-shadow: 0 6px 0 var(--ink), 0 0 30px #ffd21f; } }
.xmsg { color: #e8f3e0; text-shadow: none; padding: 12px 22px; border-radius: 0; background-color: transparent; }
.xmsg .from { color: var(--phos); }
.xmas .row { bottom: 30px; }

/* touch controls: gunmetal buttons with phosphor lettering */
.tbtn { font-style: italic; color: var(--phos); text-shadow: 0 0 8px rgba(125,255,74,.6);
  background: linear-gradient(#3a4146, #22272b 50%, #15191c 51%, #262c30); border: 3px solid #0b0d0e;
  box-shadow: 0 0 0 4px #aab1b6, 0 0 0 6px #4c5358, 0 6px 12px rgba(0,0,0,.5); opacity: .88; }
#t-boost { background: linear-gradient(#3f4a2e, #24301a 50%, #18220f 51%, #2a3a1a); }
#t-repair, #t-special { background: linear-gradient(#3a4146, #15191c); color: #e9ecee; }
#t-pause { background: linear-gradient(#3a4146, #15191c); }
#t-stick { background: rgba(11,16,8,.45); border: 4px solid #aab1b6; box-shadow: 0 0 0 2px #4c5358; }
#t-knob { background: radial-gradient(circle at 40% 35%, #fff, #b9c0c5 35%, #6f777d 70%, #3a4146); border: 3px solid #20262a; }

#rotate { background: var(--scan), #0b1008; color: var(--phos); font-style: italic; text-shadow: 0 0 12px rgba(125,255,74,.6);
  border-top: 26px solid; border-bottom: 26px solid; border-image: repeating-linear-gradient(-45deg, #86c23a 0 22px, #1c2a0b 22px 44px) 26; }
.board { border-radius: 0; clip-path: var(--chamfer); background: var(--rivets), var(--brushed), var(--plate); }

/* results boards: a console LCD like every other panel */
.board-in, .board.red .board-in {
  background: var(--scan), var(--lcd-glow), var(--lcd-fill);
  box-shadow: inset 0 0 0 3px #2a3220, inset 0 0 40px rgba(0,0,0,.7);
}
.board.red .board-in { background: var(--scan), linear-gradient(rgba(255,70,40,.16), rgba(0,0,0,0) 60%), var(--lcd-fill); }
.brow { background: rgba(125,255,74,.06); box-shadow: inset 0 0 0 1px rgba(125,255,74,.2); color: #b9e0a0; font-style: italic; }
.brow b { color: var(--phos); text-shadow: 0 0 10px rgba(125,255,74,.55); }
.brow.total { border-top: 2px dashed rgba(125,255,74,.35); background: rgba(125,255,74,.12); }
.brow.stars { -webkit-text-stroke: 2px #2a3220; color: rgba(125,255,74,.12); }
.brow.stars .on { color: #ffd21f; -webkit-text-stroke-color: #4a3a08; text-shadow: 0 0 16px rgba(255,210,31,.7); }
.brow.rankrow { color: #e9ecee; }
.brow.keys span { color: rgba(185,224,160,.35); } .brow.keys span.on { color: var(--phos); }
.brow.note { color: #c9f5b0; font-style: normal; }
.board.red .bh { color: #ff5a3a; text-shadow: 0 0 10px rgba(255,60,40,.6); }
.board.red .brow { background: rgba(255,90,58,.06); box-shadow: inset 0 0 0 1px rgba(255,90,58,.25); }

/* ---------------------------------------------------------------- 2009 LOADER
   The cold open pretends to be a 2009 web game: glossy Web 2.0 play button. */
#ui .screen.prologue-ui { justify-content: flex-start; }
.play2009 {
  margin-top: 486px; padding: 16px 54px; cursor: pointer;
  font: bold 28px Arial, Helvetica, sans-serif; color: #fff; letter-spacing: 1px;
  text-shadow: 0 -1px 0 rgba(0,0,0,.45);
  border: 2px solid #2e6b00; border-radius: 30px;
  background: linear-gradient(#b6f05a 0%, #8ad62a 48%, #6bbf10 52%, #58a808 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 4px 14px rgba(0,0,0,.6), 0 0 0 4px rgba(255,255,255,.08);
  animation: pulse2009 1.1s ease-in-out infinite alternate;
}
.play2009:hover { filter: brightness(1.1); }
.play2009:active { transform: translateY(2px); }
@keyframes pulse2009 { to { box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 4px 14px rgba(0,0,0,.6), 0 0 24px 6px rgba(160,240,80,.45); } }

/* ---------------------------------------------------------------- 2009 LETTERING
   Every bit of text reads like a 2009 web game: rounded bold display type with
   glossy gradient fills, thick outlines and hard drop shadows; Verdana for the
   small print. */
:root { --f-display: "Arial Rounded MT Bold", "Arial Black", sans-serif; --f-body: Verdana, Tahoma, Geneva, sans-serif; }
body, .brief-text, .credits p, .endtext, .small-note, .xmsg, .commander, .hint { font-family: var(--f-body); }
* { font-style: normal !important; }
.brief-text { font-size: 16px; line-height: 1.5; }
.brief-side li { font-size: 14px; }
.controls, .joke { font-size: 13px; }
.credits p { font-size: 14px; }
.commander, .hint { font-size: 12px; }
kbd { font: bold 11px var(--f-body); }

/* glossy outlined headings */
.title span, .h, .stamp, .mname, .brief-head .name, .x1, .x2, .x3 {
  font-family: var(--f-display); letter-spacing: .5px;
  color: transparent; -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke-color: #111; paint-order: stroke fill;
  text-shadow: none; filter: drop-shadow(0 4px 0 rgba(0,0,0,.65));
}
.title .t1 { background-image: linear-gradient(#ffe2a8, #ffb04a 45%, #ff7b1c 55%, #d85408); -webkit-text-stroke-width: 9px; }
.title .t2 { background-image: linear-gradient(#ffffff, #f1f4f6 45%, #c9d2d8 55%, #8e9aa3); -webkit-text-stroke-width: 10px; }
.h, .mname { background-image: linear-gradient(#ffffff, #f4f6f7 45%, #cdd5db 55%, #9aa6ae); }
.box .h, .brief-head .name { background-image: linear-gradient(#f2ffd6, #b8ff7a 45%, #7dff4a 55%, #3fae14); -webkit-text-stroke: 5px #0b1408; filter: drop-shadow(0 3px 0 #000) drop-shadow(0 0 10px rgba(125,255,74,.35)); }
.stamp { background-image: linear-gradient(#ffffff, #f4f6f7 45%, #cdd5db 55%, #9aa6ae); }
.stamp.red { background-image: linear-gradient(#ffd2c4, #ff7a56 45%, #ff3a1a 55%, #b81a04); }
.x1 { background-image: linear-gradient(#ffe0b0, #ff9a3a 55%, #d8640e); }
.x2 { background-image: linear-gradient(#efffc8, #a4e22c 55%, #5f9a12); }
.x3 { background-image: linear-gradient(#ffd0d0, #ff5050 55%, #c01818); animation: rise .8s 2.6s both; }
.tagline, .mcode, .bh, .slider span, .opt > span, .brief-head .code, .brief-side h3, .rank, .from { font-family: var(--f-display); letter-spacing: 1px; }
.tagline { -webkit-text-stroke: 0; text-shadow: 0 2px 0 #0b1408, 0 0 10px rgba(125,255,74,.5); }

/* buttons: glossy pills with outlined lettering */
.btn, .segb, .tbtn, .diff, .mdiff {
  font-family: var(--f-display); letter-spacing: .5px;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 3px 0 rgba(0,0,0,.6);
}
.btn::after {
  content: ""; position: absolute; left: 10px; right: 10px; top: 3px; height: 45%; border-radius: 40px 40px 14px 14px;
  background: linear-gradient(rgba(255,255,255,.32), rgba(255,255,255,.04)); pointer-events: none;
}
.segb.on, .diff.d-easy, .diff.d-medium, .mdiff { text-shadow: 0 1px 0 rgba(255,255,255,.4); }
.play2009 { font-family: var(--f-display); text-shadow: -1px -1px 0 #2e6b00, 1px -1px 0 #2e6b00, -1px 1px 0 #2e6b00, 1px 1px 0 #2e6b00, 0 3px 0 rgba(0,0,0,.45); }
.brow { font-family: var(--f-display); }
.brow.note, .brow.keys { font-family: var(--f-body); }
#rotate { font-family: var(--f-display); }
/* gradient-clipped text doesn't paint inside the chamfered (clip-path) panels,
   so panel headings use a solid fill with a light top edge instead */
.box .h, .brief-head .name {
  background: none; color: #a8ff6a; -webkit-text-fill-color: #a8ff6a;
  -webkit-text-stroke: 5px #0b1408; filter: none;
  text-shadow: 0 -2px 0 rgba(255,255,255,.35), 0 4px 0 #000, 0 0 14px rgba(125,255,74,.4);
}
/* same for the animated finale lines and the results stamp (gradient text drops out while they animate) */
.stamp, .x1, .x2, .x3 { background: none; filter: none; -webkit-text-stroke-color: #111; }
.stamp { color: #f4f6f7; -webkit-text-fill-color: #f4f6f7; text-shadow: 0 -2px 0 rgba(255,255,255,.5), 0 5px 0 #000, 0 0 22px rgba(125,255,74,.45); }
.stamp.red { color: #ff6a46; -webkit-text-fill-color: #ff6a46; text-shadow: 0 -2px 0 rgba(255,255,255,.4), 0 5px 0 #000, 0 0 22px rgba(255,60,40,.5); }
.x1 { color: #ffa646; -webkit-text-fill-color: #ffa646; text-shadow: 0 -2px 0 rgba(255,255,255,.45), 0 5px 0 #000; }
.x2 { color: #b4f03c; -webkit-text-fill-color: #b4f03c; text-shadow: 0 -2px 0 rgba(255,255,255,.45), 0 5px 0 #000; }
.x3 { color: #ff5a5a; -webkit-text-fill-color: #ff5a5a; text-shadow: 0 -2px 0 rgba(255,255,255,.45), 0 5px 0 #000, 0 0 20px rgba(255,80,80,.6); }

/* ---------------------------------------------------------------- LOADING (between missions) */
.loading .loadbox { width: 640px; text-align: center; padding: 30px 40px 26px; }
.loadbox .lcode { font: bold 14px var(--f-display); letter-spacing: 3px; color: #b9e0a0; }
.loadbox .h { font-size: 44px; margin: 4px 0 18px; }
.lbar { display: flex; gap: 3px; justify-content: center; padding: 10px 12px 8px; background: rgba(0,0,0,.45); border-radius: 8px; box-shadow: inset 0 3px 6px rgba(0,0,0,.6); }
.lb { position: relative; display: block; width: 40px; height: 22px; border-radius: 3px; opacity: 0; transform: translateY(-40px) scale(.8);
  border: 2px solid rgba(15,10,5,.8); box-shadow: inset 0 3px 0 rgba(255,255,255,.35), inset 0 -4px 0 rgba(0,0,0,.25); }
.lb::before, .lb::after { content: ""; position: absolute; top: -7px; width: 12px; height: 6px; border-radius: 3px 3px 0 0; background: inherit; border: 2px solid rgba(15,10,5,.8); border-bottom: 0; }
.lb::before { left: 5px; } .lb::after { right: 5px; }
.lb.c0 { background: #a4e22c; } .lb.c1 { background: #ff7b1c; } .lb.c2 { background: #ffd21f; }
.lb.on { animation: brickdrop .32s cubic-bezier(.3, 1.6, .5, 1) forwards; }
@keyframes brickdrop { to { opacity: 1; transform: none; } }
.ltxt { margin: 12px 0 18px; font: bold 15px var(--f-display); color: #a8ff6a; letter-spacing: 1px; text-shadow: 0 0 8px rgba(125,255,74,.5); }
.tipcard { display: inline-block; max-width: 520px; padding: 12px 18px; border-radius: 10px; background: linear-gradient(#fff6c8, #ffe27a); color: #3a2604;
  font: bold 15px var(--f-body); border: 3px solid #2a1a04; box-shadow: 0 5px 0 #2a1a04; transform: rotate(-1.5deg); }
.tipcard b { display: inline-block; margin-right: 10px; padding: 2px 8px; border-radius: 6px; background: #ff7b1c; color: #fff; font-family: var(--f-display); text-shadow: 0 1px 0 #7a2a00; }

/* starburst badge: "NEW!", "FREE!", "BONUS!" */
.burst { display: inline-flex; align-items: center; justify-content: center; width: 62px; height: 62px; font: bold 13px var(--f-display); color: #fff; text-shadow: 0 1px 0 #8a0000, 0 0 2px #8a0000;
  background: radial-gradient(#ff6a3a, #e8200a 70%); transform: rotate(-12deg); animation: burstspin 6s linear infinite;
  clip-path: polygon(50% 0%, 58% 14%, 73% 6%, 74% 22%, 90% 19%, 84% 34%, 99% 40%, 87% 50%, 99% 60%, 84% 66%, 90% 81%, 74% 78%, 73% 94%, 58% 86%, 50% 100%, 42% 86%, 27% 94%, 26% 78%, 10% 81%, 16% 66%, 1% 60%, 13% 50%, 1% 40%, 16% 34%, 10% 19%, 26% 22%, 27% 6%, 42% 14%); }
.burst.small { width: 46px; height: 46px; font-size: 10px; }
.burst.gold { background: radial-gradient(#fff07a, #ffb400 70%); color: #6a3a00; text-shadow: 0 1px 0 #fff8; }
@keyframes burstspin { 0% { transform: rotate(-12deg) scale(1); } 50% { transform: rotate(-4deg) scale(1.08); } 100% { transform: rotate(-12deg) scale(1); } }

/* ================================================================ WEB 2.0 GLOSS */
.title { -webkit-box-reflect: below -18px linear-gradient(transparent 62%, rgba(255,255,255,.28)); }
.c-screen { position: relative; }
.m-new { position: absolute; right: 26px; top: 18px; z-index: 3; }
.mcard { overflow: visible; }
.mcard .burst { position: absolute; right: -14px; top: -14px; z-index: 2; }
/* wet-look pills: a hard white shine across the top half */
.btn { border-radius: 999px; overflow: hidden; }
.btn::after { left: 6px; right: 6px; top: 2px; height: 48%; border-radius: 999px 999px 40% 40% / 999px 999px 12px 12px;
  background: linear-gradient(rgba(255,255,255,.42), rgba(255,255,255,.14)); }
.btn.big { box-shadow: 0 0 0 4px #aab1b6, 0 0 0 6px #4c5358, 0 6px 12px rgba(0,0,0,.55), inset 0 -6px 10px rgba(125,255,74,.18); }

/* ---- save code */
.savecode { margin-top: 10px; padding: 8px 10px; border: 2px dashed #ffd21f; border-radius: 8px; font: bold 13px var(--f-display); color: #ffe27a; text-align: center; }
.savecode b { display: inline-block; margin-left: 8px; padding: 2px 10px; background: #000; border-radius: 4px; font-size: 20px; letter-spacing: 3px; color: #ffd21f; }
.savecode span { display: block; margin-top: 4px; font: 11px Verdana; color: #e9e2b8; }
.codein { display: block; width: 100%; margin: 10px 0; text-align: center; font-size: 26px; }
.codemsg { min-height: 20px; font: bold 14px var(--f-display); } .codemsg.bad { color: #ff7a5a; } .codemsg.ok { color: #a8ff6a; }

/* keep the logo's reflection short so it never runs into the tagline */
.title { -webkit-box-reflect: below -14px linear-gradient(transparent 80%, rgba(255,255,255,.22)); }
.title-wrap .tagline { position: relative; z-index: 2; margin-top: 30px; }

/* ---------------------------------------------------------------- Flash CS4 filters
   Default Drop Shadow (black, 45 degrees, distance 4, blur 4) and Bevel (white
   highlight top-left, black shadow bottom-right) on panels, cards and buttons. */
.box, .brief, .board, .tipcard, .stamp, .xmsg { filter: drop-shadow(4px 4px 2px rgba(0,0,0,.8)); }
.mcard { filter: drop-shadow(4px 4px 2px rgba(0,0,0,.8)); }
.mcard.locked { filter: drop-shadow(4px 4px 2px rgba(0,0,0,.8)) grayscale(.85) brightness(.6); }
.btn { position: relative; filter: drop-shadow(3px 3px 2px rgba(0,0,0,.75)); }
.btn:hover { filter: drop-shadow(3px 3px 2px rgba(0,0,0,.75)) brightness(1.2); }
.btn::before, .btn.big::before, .btn.small::before {
  display: block; content: ""; position: absolute; inset: 0; width: auto; height: auto; margin: 0; transform: none;
  background: none; border-radius: inherit; pointer-events: none; z-index: 1;
  box-shadow: inset 3px 3px 2px rgba(255,255,255,.55), inset -3px -3px 2px rgba(0,0,0,.45);
}
.tipcard { box-shadow: 0 5px 0 #2a1a04, inset 3px 3px 2px rgba(255,255,255,.7), inset -3px -3px 2px rgba(120,70,0,.35); }
.btn, .bh, .loadbox .lcode { text-shadow: 3px 3px 2px rgba(0,0,0,.7); }

/* ---------------------------------------------------------------- pixel font for small text */
@font-face { font-family: "Brickpix"; src: url(fonts/brickpix.ttf) format("truetype"); font-display: block; }
:root { --f-pix: "Brickpix", Verdana, sans-serif; }
.commander, .hint, .controls, .joke, .stats div, .small-note, .starkey, .brief-side li, .credits p,
.tipcard, .ltxt, .codemsg, .savecode span, .brow.note, .brow.keys, .from {
  font-family: var(--f-pix); font-weight: normal; font-style: normal; letter-spacing: 0; -webkit-font-smoothing: none;
}
.tipcard, .ltxt, .joke, .brief-side li, .controls, .credits p, .small-note, .stats div { font-size: 20px; line-height: 1.35; }
.commander, .hint, .starkey, .codemsg, .from { font-size: 20px; }
.brow.note, .brow.keys, .savecode span { font-size: 16px; line-height: 1.4; }
.tipcard b { font-family: var(--f-pix); font-weight: normal; }
#wipe { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 6; pointer-events: none; image-rendering: pixelated; }

/* ---------------------------------------------------------------- plug-in right-click menu */
.fp-menu, .fp-menu ul { position: fixed; z-index: 1000; margin: 0; padding: 2px; list-style: none; min-width: 170px;
  background: #fff; border: 1px solid #979797; box-shadow: 2px 2px 3px rgba(0,0,0,.35);
  font: 11px Tahoma, Verdana, sans-serif; color: #000; user-select: none; }
.fp-menu li { position: relative; padding: 3px 20px 3px 22px; white-space: nowrap; cursor: default; }
.fp-menu li:hover:not(.off) { background: #316ac5; color: #fff; }
.fp-menu li.off { color: #a0a0a0; }
.fp-menu li.on::before { content: "\2713"; position: absolute; left: 7px; }
.fp-menu li.sub::after { content: "\25B8"; position: absolute; right: 7px; }
.fp-menu li b { color: #000; }
.fp-menu hr { border: 0; border-top: 1px solid #c5c5c5; margin: 3px 1px; }
.fp-menu ul { display: none; position: absolute; left: 100%; top: -3px; min-width: 110px; }
.fp-menu li.sub:hover > ul { display: block; }
.fp-menu li.sub:hover ul li { color: #000; background: #fff; }
.fp-menu li.sub:hover ul li:hover { background: #316ac5; color: #fff; }
.fp-about { position: fixed; z-index: 1001; left: 50%; top: 40%; transform: translate(-50%, -50%); width: 300px;
  background: #ece9d8; border: 1px solid #0a246a; box-shadow: 3px 3px 6px rgba(0,0,0,.4); font: 11px Tahoma, Verdana, sans-serif; color: #000; }
.fp-about .fp-title { background: linear-gradient(#0a5fd8, #0842a8); color: #fff; font-weight: bold; padding: 4px 6px; }
.fp-about .fp-body { padding: 14px 14px 8px; line-height: 1.5; }
.fp-about .fp-ok { text-align: right; padding: 0 12px 12px; }
.fp-about button { font: 11px Tahoma, sans-serif; min-width: 72px; padding: 3px 8px; background: #f4f3ee; border: 1px solid #003c74; border-radius: 3px; }

/* ---------------------------------------------------------------- custom cursor */
html.fp-cursor #stage, html.fp-cursor #stage * { cursor: none !important; }
#cursor { position: fixed; left: 0; top: 0; z-index: 999; pointer-events: none; will-change: transform; }
#cursor.hide { display: none; }
#cursor svg { position: absolute; display: none; filter: drop-shadow(2px 2px 1px rgba(0,0,0,.5)); }
#cursor.hand .glove { display: block; left: -8px; top: -2px; }
#cursor.aim .cross { display: block; left: -16px; top: -16px; }
#cursor.hand.down .glove { transform: scale(.88); transform-origin: 8px 2px; }

/* ================================================================ 2009 audit pass */
/* Gradient-clipped headings drop to black on some screens (e.g. MISSION SELECT and the
   mission names), so every heading gets a solid fill, a light top edge and Flash's hard
   drop shadow instead. */
.h, .mname {
  background: none !important; -webkit-background-clip: border-box; background-clip: border-box;
  color: #f4f6f7; -webkit-text-fill-color: #f4f6f7; -webkit-text-stroke-color: #14181b; filter: none;
  text-shadow: 0 -2px 0 rgba(255,255,255,.55), 4px 4px 0 #000, 5px 5px 4px rgba(0,0,0,.6);
}
.mcard .mname { -webkit-text-stroke-width: 6px; }
.mcard.locked .mname { color: #c9d0d5; -webkit-text-fill-color: #c9d0d5; }
.box .h, .brief-head .name { text-shadow: 0 -2px 0 rgba(255,255,255,.35), 4px 4px 0 #000, 0 0 14px rgba(125,255,74,.4); }

/* settings sliders: a chunky inset groove with a glossy bead, like a Flash UI component */
.slider input[type=range] { -webkit-appearance: none; appearance: none; height: 30px; background: transparent; cursor: pointer; }
.slider input[type=range]::-webkit-slider-runnable-track {
  height: 14px; border-radius: 7px; border: 2px solid #050705;
  background: linear-gradient(#050805, #1b2418);
  box-shadow: inset 0 2px 3px rgba(0,0,0,.8), 0 1px 0 rgba(255,255,255,.18);
}
.slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; margin-top: -9px; border-radius: 50%; border: 2px solid #1d3a06;
  background: radial-gradient(circle at 38% 30%, #ffffff 0 14%, #d6ff9a 22%, #7dff4a 55%, #3c8a12 100%);
  box-shadow: 3px 3px 2px rgba(0,0,0,.7), inset -2px -3px 3px rgba(0,0,0,.25);
}
.slider input[type=range]::-moz-range-track { height: 14px; border-radius: 7px; border: 2px solid #050705; background: #0b100a; }
.slider input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #1d3a06; background: radial-gradient(circle at 38% 30%, #fff 0 14%, #7dff4a 55%, #3c8a12); }
.slider em { font: 900 20px var(--f-display); color: var(--phos); background: #050805; border: 2px solid #000; border-radius: 6px; padding: 2px 6px; box-shadow: inset 0 2px 3px rgba(0,0,0,.8); text-shadow: 0 0 6px rgba(125,255,74,.6); }

/* option buttons: glossy beveled pills instead of flat chips */
.segb {
  position: relative; overflow: hidden; border-radius: 999px; border: 2px solid #050607; padding: 8px 18px;
  background: linear-gradient(#4a5358, #22282c 52%, #15191c 53%, #2a3135);
  color: #c9d0d5; box-shadow: 0 0 0 3px #8e979d, 3px 3px 2px 3px rgba(0,0,0,.55), inset 2px 2px 1px rgba(255,255,255,.3), inset -2px -2px 1px rgba(0,0,0,.45);
}
.segb.on {
  background: linear-gradient(#e8ffc0, #a8ff6a 50%, #6ad42a 51%, #8ef050); color: #0b1408;
  box-shadow: 0 0 0 3px #8e979d, 3px 3px 2px 3px rgba(0,0,0,.55), 0 0 14px 3px rgba(125,255,74,.45), inset 2px 2px 1px rgba(255,255,255,.7), inset -2px -2px 1px rgba(0,60,0,.4);
}
.seg { gap: 14px; }

/* save-code entry: an inset LCD readout */
.codein {
  font: 26px var(--f-pix); letter-spacing: 4px; color: var(--phos); background: #050805; caret-color: var(--phos);
  border: 2px solid #000; border-radius: 6px; padding: 8px 10px; text-transform: uppercase;
  box-shadow: inset 3px 3px 4px rgba(0,0,0,.9), 0 0 0 3px #8e979d, 0 1px 0 4px rgba(255,255,255,.15); text-shadow: 0 0 8px rgba(125,255,74,.6); outline: none;
}
.codein::placeholder { color: rgba(125,255,74,.3); }

/* mission cards: Flash bevel on the card face */
.mcard::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  box-shadow: inset 4px 4px 3px rgba(255,255,255,.35), inset -4px -4px 3px rgba(0,0,0,.4); }

/* ---------------------------------------------------------------- TOUCH CONTROLS
   Placed and sized in game units (--s = screen px per game px, set in main.js), so they keep the
   same spots on every screen, with a floor so small phones still get thumb-sized targets.
   Each control is centred on its point (left/top) with translate(-50%, -50%). */
#touch { --u: calc(var(--s, 1) * 1px); z-index: 40; }
#t-zone { left: 0; top: calc(110 * var(--u)); width: 58%; bottom: 0; }
#t-stick { left: calc(170 * var(--u)); top: calc(520 * var(--u)); bottom: auto; width: max(calc(220 * var(--u)), 96px); height: max(calc(220 * var(--u)), 96px);
  transform: translate(-50%, -50%); pointer-events: none !important; opacity: .5; transition: opacity .15s; }
#t-stick.live { opacity: 1; }
#t-knob { left: 25%; top: 25%; width: 50%; height: 50%; box-sizing: border-box; }
#touch .tbtn { right: auto; bottom: auto; transform: translate(-50%, -50%); padding: 0; line-height: 1; box-sizing: border-box; border-width: 3px;
  font-size: max(calc(24 * var(--u)), 11px); }
#touch .tbtn.on { transform: translate(-50%, -50%) scale(.94); }
#t-fire    { left: calc(1180 * var(--u)); top: calc(470 * var(--u)); width: max(calc(170 * var(--u)), 74px); height: max(calc(170 * var(--u)), 74px); font-size: max(calc(30 * var(--u)), 13px) !important; }
#t-boost   { left: calc(960 * var(--u)); top: calc(560 * var(--u)); width: max(calc(130 * var(--u)), 58px); height: max(calc(130 * var(--u)), 58px); }
#t-repair  { left: calc(1030 * var(--u)); top: calc(420 * var(--u)); width: max(calc(110 * var(--u)), 50px); height: max(calc(110 * var(--u)), 50px); font-size: max(calc(19 * var(--u)), 9px) !important; }
#t-special { left: calc(1200 * var(--u)); top: calc(318 * var(--u)); width: max(calc(110 * var(--u)), 50px); height: max(calc(110 * var(--u)), 50px); font-size: max(calc(19 * var(--u)), 9px) !important; }
#t-pause   { left: calc(1220 * var(--u)); top: calc(160 * var(--u)); width: max(calc(76 * var(--u)), 40px); height: max(calc(76 * var(--u)), 40px); }

/* ---------------------------------------------------------------- PHONES
   Small screens drop the cave backdrop (the game fills the screen there anyway) and its
   fixed-position background, which scrolls badly on mobile browsers. */
@media (max-width: 900px) and (max-height: 520px), (max-width: 700px) {
  html, body { background: #0b0805; }
  body::before { display: none; }
}
