/* RESIDENT FABLE — PS1 survival horror
   UI skin rules: dot-matrix font, hard 2px shadows (no glow), beveled
   panels, ordered-dither textures, steps() blinking (PS1 didn't ease). */

@font-face {
  font-family: 'DotGothic16';
  src: url('fonts/DotGothic16-latin.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

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

:root {
  --px-font: 'DotGothic16', 'Courier New', monospace;
  --ui-text: #c8ccb4;
  --ui-dim: #6e7460;
  --ui-gold: #d8b96a;
  --ui-blood: #8c1414;
  --bevel-light: #6a705a;
  --bevel-dark: #1c2016;
}

html, body {
  width: 100%; height: 100%;
  background: #000;
  overflow: hidden;
  font-family: var(--px-font);
  user-select: none;
  cursor: default;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

#frame {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: #000;
}

#game {
  position: absolute;
  width: 100%; height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.hidden { display: none !important; }

/* hard ordered-dither texture (2px checkerboard) */
.dither {
  background-image: repeating-conic-gradient(rgba(0,0,0,0.28) 0% 25%, transparent 0% 50%);
  background-size: 2px 2px;
}

/* pixel-art arrows built from box-shadow grids — no vector glyphs */
.px {
  display: inline-block;
  width: 3px; height: 3px;
  background: transparent;
}
.px-down {
  box-shadow:
    0 0, 3px 0, 6px 0, 9px 0, 12px 0, 15px 0, 18px 0,
    3px 3px, 6px 3px, 9px 3px, 12px 3px, 15px 3px,
    6px 6px, 9px 6px, 12px 6px,
    9px 9px;
}
.px-up {
  box-shadow:
    9px 0,
    6px 3px, 9px 3px, 12px 3px,
    3px 6px, 6px 6px, 9px 6px, 12px 6px, 15px 6px,
    0 9px, 3px 9px, 6px 9px, 9px 9px, 12px 9px, 15px 9px, 18px 9px;
}
.px-right {
  box-shadow:
    0 0,
    0 3px, 3px 3px,
    0 6px, 3px 6px, 6px 6px,
    0 9px, 3px 9px, 6px 9px, 9px 9px,
    0 12px, 3px 12px, 6px 12px,
    0 15px, 3px 15px,
    0 18px;
}

/* hard blink — PS1 cursors snapped, never faded */
@keyframes hardblink { 0%, 54% { opacity: 1; } 55%, 100% { opacity: 0.18; } }
@keyframes hardbob { 0%, 49% { transform: translateY(0); } 50%, 100% { transform: translateY(3px); } }

/* cinematic bars */
.bar {
  position: absolute; left: 0; width: 100%; height: 0;
  background: #000; z-index: 5;
  transition: height 0.8s ease;
}
#bar-top { top: 0; }
#bar-bottom { bottom: 0; }
.bars-on #bar-top, .bars-on #bar-bottom { height: 9%; }

/* fade overlay */
#fade {
  position: absolute; inset: 0; z-index: 40;
  background: #000; opacity: 1;
  pointer-events: none;
  transition: opacity 1s ease;
}
#fade.red { background: #2a0000; }

/* ------------ message box ------------- */
#msgbox {
  position: absolute;
  left: 7%; right: 7%; bottom: 6%;
  z-index: 20;
  background: rgba(5, 7, 5, 0.86);
  border: 2px solid #565c48;
  outline: 2px solid #000;
  box-shadow: inset 0 0 0 2px #000;
  padding: 16px 24px 20px;
  min-height: 66px;
}
#msgtext {
  color: var(--ui-text);
  font-size: 16px;
  letter-spacing: 0.04em;
  line-height: 1.7;
  text-shadow: 2px 2px 0 #000;
}
#msgtext .key { color: var(--ui-gold); }
#msgmore {
  position: absolute; right: 16px; bottom: 8px;
  color: #9aa48c;
  animation: hardbob 0.7s steps(1) infinite;
}

/* ------------ confirm ------------- */
#confirm {
  position: absolute; left: 50%; top: 58%;
  transform: translateX(-50%);
  z-index: 25;
  background: rgba(5, 7, 5, 0.92);
  border: 2px solid #565c48;
  outline: 2px solid #000;
  padding: 16px 36px;
  text-align: center;
}
#confirm-text {
  color: var(--ui-text); font-size: 16px; letter-spacing: 0.04em;
  margin-bottom: 14px;
  text-shadow: 2px 2px 0 #000;
}
.confirm-opts span {
  display: inline-block;
  color: var(--ui-dim);
  font-size: 16px;
  margin: 0 16px;
  padding: 3px 14px;
  letter-spacing: 0.1em;
  text-shadow: 2px 2px 0 #000;
}
.confirm-opts span.sel {
  color: #f0e8c8;
  background: #5a1410;
  box-shadow: 0 0 0 2px #2a0806;
  animation: hardblink 0.8s steps(1) infinite;
}

/* ------------ interact prompt: shows the actual button/key ------------- */
#prompt {
  position: absolute; left: 50%; bottom: 13%;
  transform: translateX(-50%);
  z-index: 8;
  animation: hardbob 0.8s steps(1) infinite;
}
.btn-chip {
  display: inline-block;
  font-family: var(--px-font);
  font-size: 16px;
  line-height: 1;
  padding: 5px 8px 6px;
  background: rgba(5, 7, 5, 0.85);
  border: 2px solid;
  text-shadow: 2px 2px 0 #000;
}
.btn-chip.pad { border-radius: 50%; padding: 6px 9px 7px; }
.btn-chip.kb { border-radius: 0; }

/* ------------ inventory ------------- */
#inventory {
  position: absolute; inset: 0; z-index: 30;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.32) 0 2px, transparent 2px 4px),
    radial-gradient(ellipse at center, rgba(18, 24, 18, 0.93), rgba(3, 5, 3, 0.97));
  display: flex; align-items: center; justify-content: center;
}
.inv-frame {
  display: flex; gap: 36px;
  padding: 30px 40px;
  background:
    repeating-conic-gradient(rgba(0,0,0,0.22) 0% 25%, transparent 0% 50%),
    #1a2018;
  background-size: 2px 2px, auto;
  border: 3px solid;
  border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light);
  outline: 3px solid #000;
}
.inv-left { width: 200px; }
.inv-name {
  color: #b9c0a8; font-size: 16px; letter-spacing: 0.14em;
  text-shadow: 2px 2px 0 #000;
  border-bottom: 2px solid #3a4030;
  padding-bottom: 8px; margin-bottom: 10px;
}
#ecg {
  display: block;
  background: #040704;
  border: 2px solid;
  border-color: var(--bevel-dark) var(--bevel-light) var(--bevel-light) var(--bevel-dark);
  image-rendering: pixelated;
}
#condition {
  margin-top: 10px; font-size: 16px; letter-spacing: 0.3em; text-align: center;
  text-shadow: 2px 2px 0 #000;
}
.cond-fine    { color: #58b858; }
.cond-caution { color: #d8a93f; }
.cond-danger  { color: #c83a2a; animation: hardblink 0.8s steps(1) infinite; }

.inv-equip { margin-top: 22px; }
.inv-equip-label {
  color: var(--ui-dim); font-size: 13px; letter-spacing: 0.2em; margin-bottom: 6px;
  text-shadow: 2px 2px 0 #000;
}

#slots {
  display: grid;
  grid-template-columns: repeat(2, 96px);
  grid-auto-rows: 96px;
  gap: 8px;
}
.slot {
  position: relative;
  width: 96px; height: 96px;
  background:
    repeating-conic-gradient(rgba(0,0,0,0.25) 0% 25%, transparent 0% 50%),
    #11160f;
  background-size: 2px 2px, auto;
  border: 3px solid;
  border-color: var(--bevel-dark) #3c4232 #3c4232 var(--bevel-dark);
}
.equip-slot { width: 96px; height: 96px; }
.slot.sel {
  border-color: var(--ui-gold) #8a6c24 #8a6c24 var(--ui-gold);
  animation: hardblink 0.9s steps(1) infinite;
}
.slot.combining { border-color: #c83a2a #6a1410 #6a1410 #c83a2a; }
.slot canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  image-rendering: pixelated;
}
.slot .count {
  position: absolute; right: 5px; bottom: 3px;
  color: #e0e4cc; font-size: 16px; font-family: var(--px-font);
  text-shadow: 2px 2px 0 #000;
}
#item-name {
  margin-top: 14px; height: 26px;
  color: #e0d8b4; font-size: 16px; letter-spacing: 0.1em; text-align: center;
  text-shadow: 2px 2px 0 #000;
}
#item-menu {
  position: absolute;
  background: rgba(5, 7, 5, 0.95);
  border: 2px solid #565c48;
  outline: 2px solid #000;
  z-index: 5;
  min-width: 132px;
}
#item-menu div {
  color: var(--ui-dim); font-size: 16px; letter-spacing: 0.16em;
  padding: 7px 16px;
  text-shadow: 2px 2px 0 #000;
}
#item-menu div.sel { color: #f0e8c8; background: #5a1410; }
.inv-right { position: relative; }

/* ------------ title screen ------------- */
#title {
  position: absolute; inset: 0; z-index: 50;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.25) 0 2px, transparent 2px 4px),
    radial-gradient(ellipse at 50% 35%, #0e0e0e, #000 75%);
  display: flex; align-items: center; justify-content: center;
}
#title-card { text-align: center; max-width: 94%; }
#title-sub1 {
  color: #50504a; font-size: 0.82em; letter-spacing: 0.5em; margin-bottom: 1.6em;
  text-shadow: 2px 2px 0 #000;
}
#title-main { line-height: 0; }
#title-main canvas {
  image-rendering: pixelated;
  animation: titleflicker 7s steps(1) infinite;
  max-width: 88%; height: auto;   /* cap to the frame so it never overflows on phones */
}
@keyframes titleflicker {
  0%, 91%, 94%, 100% { opacity: 1; }
  92%, 93% { opacity: 0.7; }
}
#title-sub2 {
  color: #6e6e62; font-size: 1em; letter-spacing: 0.5em; margin-top: 1em;
  text-shadow: 2px 2px 0 #000;
}
#title-menu { margin-top: 3em; }
.tm-item {
  position: relative;
  display: inline-block;
  color: #58584e; font-size: 1em; letter-spacing: 0.3em;
  margin: 0.5em 0; padding: 0.7em 1.8em;   /* generous tap target for touch */
  text-shadow: 2px 2px 0 #000;
  cursor: pointer;
}
#title-menu { display: flex; flex-direction: column; align-items: center; }
.tm-item.sel { color: #e8dfb8; }
.tm-item.sel::before {
  content: '';
  position: absolute; left: 0; top: 7px;
  width: 3px; height: 3px;
  color: var(--ui-blood);
  box-shadow:
    0 0,
    0 3px, 3px 3px,
    0 6px, 3px 6px, 6px 6px,
    0 9px, 3px 9px,
    0 12px;
  animation: hardblink 0.7s steps(1) infinite;
}
.tm-item.disabled { color: #2c2c28; }
#title-hint {
  margin-top: 3.2em; color: #3c3c36; font-size: 0.82em; letter-spacing: 0.08em;
  line-height: 2;
}
.pad-hint { color: #34342f; }
.pad-hint.dim { color: #2a2a26; font-size: 0.82em; }

/* ------------ cinematic text (intro/death/win) ------------- */
#cine {
  position: absolute; inset: 0; z-index: 45;
  background: #000;
  display: flex; align-items: center; justify-content: center;
}
#cine-text {
  color: #9b9a8a; font-size: 19px; letter-spacing: 0.08em;
  text-align: center; line-height: 2.1;
  max-width: 72%;
  text-shadow: 2px 2px 0 #000;
}
#cine-text .big {
  display: block;
  font-size: 48px; letter-spacing: 0.14em;
  color: var(--ui-blood);
  text-shadow: 3px 3px 0 #000, 0 0 24px rgba(140, 10, 10, 0.4);
  margin-bottom: 20px;
}
#cine-text .small { font-size: 13px; color: #55554c; }

/* ------------ controller indicator ------------- */
#pad-status {
  position: absolute; left: 10px; bottom: 8px; z-index: 60;
  color: #4a5a3e; font-size: 13px; letter-spacing: 0.04em;
  font-family: var(--px-font);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  text-shadow: 2px 2px 0 #000;
}
#pad-status.on { opacity: 0.85; }

/* ------------ pause menu ------------- */
#pausemenu {
  position: absolute; inset: 0; z-index: 35;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.3) 0 2px, transparent 2px 4px),
    rgba(0, 0, 0, 0.72);
  display: flex; align-items: center; justify-content: center;
}
#pm-card {
  min-width: 320px;
  padding: 26px 40px 22px;
  text-align: center;
  background:
    repeating-conic-gradient(rgba(0,0,0,0.22) 0% 25%, transparent 0% 50%),
    #14181a;
  background-size: 2px 2px, auto;
  border: 3px solid;
  border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light);
  outline: 3px solid #000;
}
#pm-title {
  color: #8c1414; font-size: 18px; letter-spacing: 0.45em;
  text-shadow: 2px 2px 0 #000;
  margin-bottom: 20px;
}
#pm-list div {
  color: var(--ui-dim); font-size: 16px; letter-spacing: 0.18em;
  padding: 7px 14px; margin: 2px 0;
  text-shadow: 2px 2px 0 #000;
}
#pm-list div.sel { color: #f0e8c8; background: #5a1410; }
#pm-list div.debug { color: #4a6a4a; font-size: 14px; }
#pm-list div.debug.sel { color: #a8e8a8; background: #1d3a1d; }
#pm-hint { margin-top: 18px; color: #3c3c36; font-size: 12px; letter-spacing: 0.15em; }

/* ------------ character select ------------- */
#charselect {
  position: absolute; inset: 0; z-index: 55;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.3) 0 2px, transparent 2px 4px),
    radial-gradient(ellipse at 50% 40%, #101216, #000 80%);
  display: flex; align-items: center; justify-content: center;
}
#cs-card { text-align: center; }
#cs-title {
  color: #8c1414; font-size: 24px; letter-spacing: 0.4em;
  text-shadow: 3px 3px 0 #000;
  margin-bottom: 36px;
}
#cs-grid {
  display: grid;
  grid-template-columns: repeat(3, 132px);
  gap: 18px;
  justify-content: center;
}
.cs-tile {
  padding: 10px 10px 8px;
  background:
    repeating-conic-gradient(rgba(0,0,0,0.22) 0% 25%, transparent 0% 50%),
    #14181a;
  background-size: 2px 2px, auto;
  border: 3px solid;
  border-color: var(--bevel-dark) #3c4232 #3c4232 var(--bevel-dark);
}
.cs-tile.sel {
  border-color: var(--ui-gold) #8a6c24 #8a6c24 var(--ui-gold);
  animation: hardblink 0.9s steps(1) infinite;
}
.cs-port {
  width: 96px; height: 96px;
  image-rendering: pixelated;
  display: block;
  margin: 0 auto;
}
.cs-name {
  margin-top: 8px;
  color: #c8ccb4; font-size: 14px; letter-spacing: 0.2em;
  text-shadow: 2px 2px 0 #000;
}
.cs-tile.sel .cs-name { color: #f0e8c8; }
#cs-tag {
  margin-top: 26px; height: 22px;
  color: #6e7460; font-size: 14px; letter-spacing: 0.08em;
  text-shadow: 2px 2px 0 #000;
}
#cs-hint { margin-top: 18px; color: #3c3c36; font-size: 12px; letter-spacing: 0.15em; }

/* ------------ controller setup wizard ------------- */
#padwizard {
  position: absolute; inset: 0; z-index: 70;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.3) 0 2px, transparent 2px 4px),
    rgba(0, 0, 0, 0.92);
  display: flex; align-items: center; justify-content: center;
}
#pw-card { text-align: center; max-width: 80%; }
#pw-title {
  color: #6e6e62; font-size: 14px; letter-spacing: 0.5em; margin-bottom: 32px;
  text-shadow: 2px 2px 0 #000;
}
#pw-step {
  color: #e8dfb8; font-size: 26px; letter-spacing: 0.14em;
  text-shadow: 3px 3px 0 #000;
  min-height: 40px;
}
#pw-hint {
  color: #58584e; font-size: 14px; letter-spacing: 0.1em; margin-top: 14px;
  text-shadow: 2px 2px 0 #000;
}
#pw-live {
  color: #4a5a3e; font-family: var(--px-font); font-size: 13px;
  margin-top: 22px; min-height: 18px;
  text-shadow: 2px 2px 0 #000;
}
#pw-progress { color: #44443c; font-size: 13px; letter-spacing: 0.3em; margin-top: 26px; }
#pw-cancel { color: #33332e; font-size: 12px; letter-spacing: 0.2em; margin-top: 36px; }

/* ================================================================
   404 ERROR STREET — Episode 1 additions
   MS Paint palette (hard primaries, no gradients on the new chrome)
   on top of the PS1 UI kit above.
   ================================================================ */

:root {
  --msp-green: #00a800;
  --msp-yellow: #ffe94a;
  --msp-blue: #2058d8;
  --msp-pink: #ff4aa8;
}

/* ------------ A24-style title cards ------------- */
#titlecard {
  position: absolute; inset: 0; z-index: 30;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.9em;
  text-align: center;
  pointer-events: none;
  /* dither scanlines over whatever the background class sets */
  background-image: repeating-linear-gradient(
    0deg, rgba(0,0,0,0.14) 0 1px, transparent 1px 3px
  );
}
#titlecard-text {
  font-size: 2.9em; letter-spacing: 0.32em;
  padding-left: 0.32em; /* recenter the tracking */
  line-height: 1.25;
  color: #f0eeda;
  text-shadow: 3px 3px 0 #000;
  max-width: 90%;
}
#titlecard-sub {
  font-size: 0.94em; letter-spacing: 0.42em;
  padding-left: 0.42em;
  color: #f0eeda; opacity: 0.85;
  text-shadow: 2px 2px 0 #000;
  max-width: 90%;
}
/* background variants — set as classes on #titlecard */
#titlecard.tc-clear { background-color: rgba(0, 0, 0, 0.36); }
#titlecard.tc-black { background-color: #0c0c10; }
#titlecard.tc-oxblood { background-color: #5a2c24; }
#titlecard.tc-oxblood #titlecard-text { color: #f0d8c0; }
#titlecard.tc-caution { background-color: #d8b422; }
#titlecard.tc-caution #titlecard-text,
#titlecard.tc-caution #titlecard-sub { color: #16160e; text-shadow: 3px 3px 0 #f0e8a0; }
#titlecard.tc-mint { background-color: #9ab8a4; }
#titlecard.tc-mint #titlecard-text,
#titlecard.tc-mint #titlecard-sub { color: #1a2a1e; text-shadow: 3px 3px 0 #c8dcc8; }
#titlecard.tc-pink { background-color: #e8a8b8; }
#titlecard.tc-pink #titlecard-text,
#titlecard.tc-pink #titlecard-sub { color: #4a2030; text-shadow: 3px 3px 0 #f4ccd6; }
#titlecard.tc-sky { background-color: #8ac0e0; }
#titlecard.tc-sky #titlecard-text,
#titlecard.tc-sky #titlecard-sub { color: #16283a; text-shadow: 3px 3px 0 #b8daf0; }

/* ------------ comic speech bubble ------------- */
/* anchored by its bottom-center to a point just above the speaker's head;
   the player projects that point to screen space every frame */
#bubble {
  position: absolute; z-index: 24;
  transform: translate(-50%, -100%);
  /* width from the text itself, capped by the frame — NOT by distance to the
     container edge. Without this, moving `left` re-wraps the text every frame. */
  width: max-content;
  max-width: 46%;
  background: #f8f5e8;
  border: 3px solid #16140e;
  border-radius: 0.9em;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.55);
  padding: 0.45em 0.8em 0.5em;
  text-align: center;
  pointer-events: none;
}
#bubble::after {           /* the tail, pointing down at the speaker */
  content: '';
  position: absolute;
  left: 50%; bottom: -0.85em;
  transform: translateX(-50%);
  border-left: 0.55em solid transparent;
  border-right: 0.55em solid transparent;
  border-top: 0.9em solid #16140e;
}
#bubble::before {          /* inner tail fill so it reads as one shape */
  content: '';
  position: absolute;
  left: 50%; bottom: -0.42em;
  transform: translateX(-50%);
  border-left: 0.34em solid transparent;
  border-right: 0.34em solid transparent;
  border-top: 0.62em solid #f8f5e8;
  z-index: 1;
}
#bubble-name {
  display: inline-block;
  font-size: 0.72em; letter-spacing: 0.2em;
  color: #6a6252;
  text-shadow: 1px 1px 0 #16140e;   /* keeps pastel name colors legible on cream */
  margin-bottom: 0.15em;
}
#bubble-text {
  font-size: 1em; letter-spacing: 0.02em; line-height: 1.45;
  color: #1a180f;
}

/* ------------ cinematic subtitles ------------- */
#subs {
  position: absolute; left: 8%; right: 8%; bottom: 11%;
  z-index: 22; text-align: center;
  pointer-events: none;
}
#subs-name {
  display: inline-block;
  font-size: 0.9em; letter-spacing: 0.22em;
  padding: 0.14em 0.75em 0.2em;
  background: rgba(0, 0, 0, 0.78);
  text-shadow: 2px 2px 0 #000;
  margin-bottom: 0.28em;
}
#subs-text {
  display: inline;
  color: #f0eeda; font-size: 1.08em; letter-spacing: 0.03em; line-height: 1.7;
  text-shadow: 2px 2px 0 #000, -2px 2px 0 #000, 2px -2px 0 #000, -2px -2px 0 #000;
  /* readability box against the bright bedroom — hugs each wrapped line */
  background: rgba(0, 0, 0, 0.5);
  padding: 0.12em 0.5em 0.18em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
#skiphint {
  position: absolute; right: 0.9em; top: 0.7em; z-index: 22;
  color: #4c4c44; font-size: 0.75em; letter-spacing: 0.12em;
  text-shadow: 2px 2px 0 #000;
}

/* ------------ dialogue choices ------------- */
#choices {
  position: absolute; left: 50%; bottom: 20%;
  transform: translateX(-50%);
  z-index: 26; min-width: 340px;
  background: rgba(5, 7, 5, 0.94);
  border: 2px solid #565c48;
  outline: 2px solid #000;
  padding: 12px 18px 14px;
}
#choices-title {
  color: var(--ui-dim); font-size: 13px; letter-spacing: 0.2em;
  margin-bottom: 8px; text-shadow: 2px 2px 0 #000;
}
#choices-list div {
  color: var(--ui-text); font-size: 16px; letter-spacing: 0.05em;
  padding: 5px 12px; margin: 2px 0;
  text-shadow: 2px 2px 0 #000;
}
#choices-list div.sel { color: #101408; background: var(--msp-yellow); text-shadow: none; }

/* ------------ RPG objective + counters ------------- */
#objective {
  position: absolute; left: 12px; top: 10px; z-index: 8;
  max-width: 46%;
  color: var(--msp-yellow); font-size: 14px; letter-spacing: 0.06em; line-height: 1.5;
  text-shadow: 2px 2px 0 #000;
}
#objective::before { content: '\2605 '; color: var(--msp-pink); }
#roocount {
  position: absolute; right: 14px; top: 10px; z-index: 8;
  color: #f0eeda; font-size: 16px; letter-spacing: 0.1em;
  text-shadow: 2px 2px 0 #000;
}
#suspicion {
  position: absolute; left: 50%; top: 8%;
  transform: translateX(-50%);
  z-index: 8; width: 42%;
  text-align: center;
}
#suspicion-label {
  color: #e05050; font-size: 13px; letter-spacing: 0.4em;
  text-shadow: 2px 2px 0 #000; margin-bottom: 4px;
}
#suspicion-bar {
  height: 12px;
  background: #14100e;
  border: 2px solid #565c48; outline: 2px solid #000;
}
#suspicion-fill {
  height: 100%; width: 0%;
  background: repeating-linear-gradient(90deg, #c83a2a 0 6px, #8c1414 6px 12px);
}

/* ------------ Bumharp rhythm ------------- */
#rhythm {
  position: absolute; inset: 0; z-index: 28;
  background: rgba(0, 0, 0, 0.55);
}
#rhythm-title {
  position: absolute; left: 50%; top: 7%;
  transform: translateX(-50%);
  color: var(--msp-pink); font-size: 20px; letter-spacing: 0.3em;
  text-shadow: 3px 3px 0 #000;
}
#rhythm-lane {
  position: absolute; left: 12%; right: 12%; top: 46%;
  height: 56px;
  border-top: 2px solid #565c48; border-bottom: 2px solid #565c48;
  background: rgba(5, 7, 5, 0.6);
  overflow: hidden;
}
#rhythm-hitzone {
  position: absolute; left: 18%; top: 44%;
  width: 60px; height: 76px;
  border: 3px solid var(--msp-yellow); outline: 2px solid #000;
  animation: hardblink 1s steps(1) infinite;
}
.rhythm-note {
  position: absolute; top: 6px;
  width: 44px; height: 44px;
  font-size: 26px; line-height: 44px; text-align: center;
  color: #101408; background: var(--msp-green);
  border: 2px solid #000;
  text-shadow: none;
}
.rhythm-note.hit { background: var(--msp-yellow); }
.rhythm-note.miss { background: #6a2a22; color: #d0c8b0; }
#rhythm-score {
  position: absolute; left: 50%; bottom: 16%;
  transform: translateX(-50%);
  color: #f0eeda; font-size: 16px; letter-spacing: 0.16em;
  text-shadow: 2px 2px 0 #000;
}

/* ------------ Yahoo! browser (Humphrey's laptop) ------------- */
#browser {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 28;
  width: 62%; max-width: 560px;
  background: #c0c0c0;
  border: 3px solid;
  border-color: #f0f0f0 #404040 #404040 #f0f0f0;
  outline: 2px solid #000;
  font-family: var(--px-font);
}
#browser-chrome {
  display: flex; justify-content: space-between; align-items: center;
  background: #000080;
  color: #fff; font-size: 13px;
  padding: 4px 8px;
}
#browser-x { color: #fff; background: #c0c0c0; color: #000; padding: 0 6px; border: 1px solid #404040; }
#browser-body {
  background: #fff;
  min-height: 200px;
  padding: 14px 18px;
  color: #000; font-size: 14px; line-height: 1.7;
}
#browser-body .yahoo-logo {
  color: #7b0099; font-size: 24px; letter-spacing: 0.02em; margin-bottom: 8px;
}
#browser-body .blink { animation: hardblink 1s steps(1) infinite; }
#browser-body .blink404 {
  color: #cc0000; font-size: 30px; letter-spacing: 0.1em;
  animation: hardblink 0.7s steps(1) infinite;
}
#browser-body a, #browser-body .link {
  color: #0000ee; text-decoration: underline;
  display: block; padding: 3px 4px;
}
#browser-body .link.sel { background: #000080; color: #fff; }
#browser-body .visited { color: #551a8b; }
#browser-body .small { font-size: 11px; color: #666; }

/* title recolor: MS Paint over the PS1 chrome */
#title-sub1 { color: #3a6a3a; }
#title-sub2 { color: var(--msp-green); }
.tm-item.sel::before { color: var(--msp-green); }
