/* =========================================================
   TIMEWASTER PRO HANDHELD
   Game 01: ISLAND TIME

   All selectors are prefixed with twp- so the handheld can be
   embedded inside an existing website with minimal style conflicts.
   ========================================================= */

.timewaster-pro,
.timewaster-pro * {
  box-sizing: border-box;
}

.timewaster-pro {
  --twp-shell: #c8c3aa;
  --twp-shell-light: #ddd8c2;
  --twp-shell-dark: #9e9a86;
  --twp-bezel: #464a48;
  --twp-bezel-dark: #252a28;
  --twp-ink: #31382e;
  --twp-screen: #aeb980;
  --twp-screen-dark: #26341f;
  --twp-button: #2b2d31;
  --twp-button-edge: #17181b;
  --twp-action: #8c315a;
  --twp-action-dark: #5f1e3c;
  --twp-blue: #33496f;

  position: relative;
  width: min(100%, 620px);
  min-width: 0;
  margin: 0 auto;
  padding: clamp(12px, 3vw, 24px) clamp(12px, 3.4vw, 26px) clamp(18px, 4vw, 32px);
  overflow: hidden;

  color: var(--twp-ink);
  background:
    linear-gradient(135deg, rgba(255,255,255,.28), transparent 22%),
    linear-gradient(180deg, var(--twp-shell-light), var(--twp-shell));
  border: 2px solid #8d8977;
  border-radius: 22px 22px 48px 22px;
  box-shadow:
    0 16px 38px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.6),
    inset 0 -2px 0 rgba(86,82,69,.18);

  font-family: "Courier New", Courier, monospace;
  image-rendering: pixelated;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.twp-brand-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 10px;
}

.twp-system-name {
  color: var(--twp-blue);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(14px, 3vw, 20px);
  font-style: italic;
  font-weight: 900;
  letter-spacing: -.04em;
}

.twp-system-subtitle {
  margin-top: 1px;
  color: #68695e;
  font-size: clamp(6px, 1.4vw, 9px);
  font-weight: 700;
  letter-spacing: .12em;
}

.twp-power {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-bottom: 2px;
  color: #69695d;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .08em;
  white-space: nowrap;
}

.twp-power-light {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #d14343;
  border: 1px solid #7c2929;
  border-radius: 50%;
  box-shadow: 0 0 7px rgba(209,67,67,.55);
}

.twp-screen-bezel {
  width: 100%;
  padding: clamp(13px, 2.8vw, 20px) clamp(13px, 3.8vw, 25px) clamp(16px, 3.6vw, 24px);
  background:
    linear-gradient(145deg, rgba(255,255,255,.06), transparent 24%),
    linear-gradient(180deg, #505553, #363b39);
  border: 2px solid var(--twp-bezel-dark);
  border-radius: 16px 16px 32px 16px;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.035),
    inset 0 -4px 8px rgba(0,0,0,.2);
}

.twp-screen-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 3px 8px;
  color: #bdbeb8;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(6px, 1.25vw, 8px);
  font-weight: 700;
  letter-spacing: .07em;
  white-space: nowrap;
}

.twp-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  min-width: 0;
  background: var(--twp-screen);
  border: clamp(5px, 1.6vw, 9px) solid #171c1a;
  border-radius: 4px;
  outline: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  box-shadow:
    0 0 0 2px #696e68,
    inset 0 0 14px rgba(19,29,20,.18);
  cursor: pointer;
}

.twp-canvas:focus-visible {
  box-shadow:
    0 0 0 3px #8c315a,
    inset 0 0 14px rgba(19,29,20,.18);
}

.twp-game-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 8px 8px 4px;
  color: var(--twp-blue);
  font-family: Arial, Helvetica, sans-serif;
  transform: skew(-6deg);
}

.twp-game-label span {
  font-size: clamp(13px, 2.8vw, 18px);
  font-weight: 900;
  letter-spacing: -.025em;
}

.twp-game-label small {
  color: #707064;
  font-size: clamp(6px, 1.25vw, 8px);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.twp-controls {
  display: grid;
  grid-template-columns: minmax(112px, 1fr) auto minmax(112px, 1fr);
  align-items: center;
  gap: clamp(12px, 4vw, 32px);
  min-width: 0;
  margin-top: clamp(11px, 2.6vw, 20px);
  padding: 0 clamp(3px, 2vw, 12px);
}

.twp-dpad {
  position: relative;
  justify-self: start;
  width: clamp(118px, 26vw, 150px);
  aspect-ratio: 1;
  filter: drop-shadow(0 5px 2px rgba(54,52,45,.25));
}

.twp-key,
.twp-action,
.twp-pill {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

.twp-key {
  position: absolute;
  display: grid;
  place-items: center;
  width: 34%;
  height: 34%;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  color: #151619;
  background:
    linear-gradient(145deg, #3d3e42, var(--twp-button));
  border: 1px solid var(--twp-button-edge);
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,.12),
    inset -2px -2px 2px rgba(0,0,0,.35);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(12px, 3vw, 18px);
  font-weight: 900;
  line-height: 1;
}

.twp-up {
  top: 0;
  left: 33%;
  border-radius: 6px 6px 0 0;
}

.twp-left {
  top: 33%;
  left: 0;
  border-radius: 6px 0 0 6px;
}

.twp-right {
  top: 33%;
  right: 0;
  border-radius: 0 6px 6px 0;
}

.twp-down {
  bottom: 0;
  left: 33%;
  border-radius: 0 0 6px 6px;
}

.twp-dpad-center {
  position: absolute;
  top: 33%;
  left: 33%;
  width: 34%;
  height: 34%;
  background: var(--twp-button);
  border: 1px solid var(--twp-button-edge);
  box-shadow:
    inset 0 0 0 7px rgba(0,0,0,.08),
    inset 1px 1px 0 rgba(255,255,255,.08);
}

.twp-dpad-center::after {
  content: "";
  position: absolute;
  inset: 28%;
  border: 1px solid #1b1c20;
  border-radius: 50%;
}

.twp-system-buttons {
  align-self: end;
  display: flex;
  gap: 10px;
  transform: translateY(10px);
}

.twp-pill {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 54px;
  min-height: 44px;
  padding: 0 2px;
  color: #626157;
  background: transparent;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .08em;
}

.twp-pill span {
  display: block;
  width: clamp(40px, 8vw, 52px);
  height: clamp(9px, 2vw, 12px);
  background: linear-gradient(180deg, #6f706b, #4b4c48);
  border: 1px solid #444541;
  border-radius: 999px;
  box-shadow:
    0 3px 1px rgba(77,74,65,.24),
    inset 0 1px 1px rgba(255,255,255,.14);
}

.twp-action-cluster {
  justify-self: end;
  position: relative;
  width: clamp(128px, 28vw, 166px);
  height: clamp(98px, 21vw, 124px);
  transform: rotate(-18deg);
}

.twp-action {
  position: absolute;
  display: grid;
  place-items: center;
  width: clamp(55px, 12vw, 70px);
  height: clamp(55px, 12vw, 70px);
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  color: #e3c3d1;
  background:
    radial-gradient(circle at 36% 28%, #a84d76, var(--twp-action) 58%, var(--twp-action-dark));
  border: 2px solid #672443;
  border-radius: 50%;
  box-shadow:
    0 6px 1px rgba(80,75,67,.28),
    inset 2px 2px 3px rgba(255,255,255,.18),
    inset -2px -3px 4px rgba(68,10,37,.32);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(18px, 4vw, 24px);
  font-weight: 900;
}

.twp-action span {
  display: block;
  transform: rotate(18deg);
}

.twp-b {
  left: 0;
  bottom: 0;
}

.twp-a {
  right: 0;
  top: 0;
}

.twp-key:active,
.twp-key.twp-pressed {
  transform: translateY(2px);
  filter: brightness(.86);
  box-shadow: inset 2px 3px 4px rgba(0,0,0,.42);
}

.twp-action:active,
.twp-action.twp-pressed {
  transform: translateY(3px);
  box-shadow:
    0 2px 1px rgba(80,75,67,.28),
    inset 2px 3px 5px rgba(68,10,37,.42);
}

.twp-pill:active span,
.twp-pill.twp-pressed span {
  transform: translateY(2px);
  filter: brightness(.85);
  box-shadow: inset 0 2px 2px rgba(0,0,0,.35);
}

.twp-key:focus-visible,
.twp-action:focus-visible,
.twp-pill:focus-visible {
  outline: 3px solid rgba(51,73,111,.58);
  outline-offset: 3px;
}

.twp-bottom-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  margin-top: 8px;
  padding: 0 10px 0 8px;
}

.twp-control-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  max-width: 72%;
  color: #78766a;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(6px, 1.35vw, 8px);
  font-weight: 700;
  letter-spacing: .05em;
}

.twp-speaker {
  display: flex;
  gap: 5px;
  transform: rotate(-20deg);
  padding: 4px;
}

.twp-speaker i {
  display: block;
  width: 5px;
  height: 32px;
  background: #817e6e;
  border-radius: 999px;
  box-shadow: inset 1px 0 1px rgba(58,55,48,.25);
}

.twp-demo-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.5vw, 22px);
  margin: 0;
  padding:
    max(12px, env(safe-area-inset-top))
    max(10px, env(safe-area-inset-right))
    max(22px, env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 50% 15%, #334e40, #17231d 72%);
}

@media (min-width: 700px) {
  .twp-demo-page {
    padding: 28px;
  }
}

@media (max-width: 520px) {
  .timewaster-pro {
    width: 100%;
    padding: 10px 9px 16px;
    border-radius: 15px 15px 34px 15px;
  }

  .twp-brand-row {
    margin-bottom: 7px;
  }

  .twp-screen-bezel {
    padding: 11px 10px 14px;
    border-radius: 11px 11px 23px 11px;
  }

  .twp-screen-labels {
    margin-bottom: 6px;
  }

  .twp-controls {
    grid-template-columns: minmax(104px, 1fr) minmax(82px, auto) minmax(104px, 1fr);
    gap: 6px;
    padding-inline: 0;
  }

  .twp-system-buttons {
    gap: 2px;
    transform: translateY(8px);
  }

  .twp-pill {
    min-width: 42px;
    font-size: 6px;
  }

  .twp-action-cluster {
    width: 112px;
    height: 92px;
  }

  .twp-bottom-row {
    margin-top: 4px;
    padding-inline: 4px;
  }

  .twp-control-hint {
    max-width: 76%;
    gap: 2px 7px;
  }

  .twp-speaker {
    gap: 3px;
  }

  .twp-speaker i {
    width: 4px;
    height: 25px;
  }
}

@media (max-width: 370px) {
  .twp-controls {
    grid-template-columns: 102px minmax(68px, auto) 102px;
  }

  .twp-dpad {
    width: 104px;
  }

  .twp-action-cluster {
    width: 102px;
    height: 84px;
  }

  .twp-action {
    width: 50px;
    height: 50px;
  }

  .twp-system-buttons {
    flex-direction: column;
    gap: 0;
    transform: none;
  }

  .twp-pill {
    min-height: 34px;
  }

  .twp-pill span {
    width: 38px;
    height: 9px;
  }

  .twp-game-label small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .twp-key,
  .twp-action,
  .twp-pill span {
    transition: none;
  }
}


/* =========================================================
   MID-FLORIDA REAL ESTATE PAGE CHROME
   ========================================================= */

.twp-website-game-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.5vw, 22px);
}

.twp-site-nav {
  width: min(100%, 720px);
  margin: 0 auto;
}

.twp-real-estate-return {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  width: 100%;
  min-height: 64px;
  padding: 11px 18px;
  color: #fffdf6;
  text-decoration: none;
  text-align: left;
  background:
    linear-gradient(180deg, #174256, #102f3f);
  border: 2px solid #d6b76c;
  border-radius: 11px;
  box-shadow:
    0 6px 16px rgba(0,0,0,.2),
    inset 0 1px 0 rgba(255,255,255,.12);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.1;
  transition:
    transform .12s ease,
    filter .12s ease;
}

.twp-real-estate-return strong {
  display: block;
  font-size: clamp(17px, 3.8vw, 24px);
  font-weight: 800;
  letter-spacing: -.015em;
}

.twp-real-estate-return small {
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,.76);
  font-size: clamp(10px, 2.1vw, 12px);
  font-weight: 600;
  letter-spacing: .04em;
}

.twp-return-arrow {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #102f3f;
  background: #d6b76c;
  border-radius: 50%;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

@media (hover: hover) and (pointer: fine) {
  .twp-real-estate-return:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
  }
}

.twp-real-estate-return:active {
  transform: translateY(1px);
}

.twp-real-estate-return:focus-visible {
  outline: 3px solid #f3d78c;
  outline-offset: 3px;
}

.twp-mfre-footer {
  width: min(100%, 920px);
  margin: 2px auto 0;
  padding: clamp(22px, 5vw, 38px) clamp(16px, 4vw, 30px);
  color: rgba(255,255,255,.82);
  background: #102f3f;
  border-top: 2px solid rgba(214,183,108,.78);
  border-radius: 12px 12px 0 0;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(11px, 2.2vw, 13px);
  line-height: 1.55;
}

.twp-mfre-footer p {
  max-width: 790px;
  margin: 0 auto 9px;
}

.twp-mfre-footer p:last-child {
  margin-bottom: 0;
}

.twp-mfre-footer a {
  color: #f0d38b;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.twp-developer-credit {
  padding-top: 6px;
  color: rgba(255,255,255,.66);
  font-size: .9em;
}

/* =========================================================
   HANDHELD AUDIO CONTROL
   ========================================================= */

.twp-audio-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.twp-sound-toggle {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  padding: 5px 6px;
  color: #67665c;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(6px, 1.25vw, 8px);
  font-weight: 800;
  letter-spacing: .05em;
  cursor: pointer;
  touch-action: manipulation;
}

.twp-sound-toggle:active {
  transform: translateY(1px);
}

.twp-sound-toggle:focus-visible {
  outline: 3px solid rgba(51,73,111,.58);
  outline-offset: 2px;
}

.twp-sound-toggle[aria-pressed="false"] {
  opacity: .58;
}

.twp-sound-icon {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  color: #d6d3b9;
  background: #777468;
  border-radius: 50%;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.2),
    0 2px 1px rgba(55,52,46,.18);
  font-size: 13px;
  line-height: 1;
}

@media (max-width: 520px) {
  .twp-site-nav {
    width: 100%;
  }

  .twp-real-estate-return {
    min-height: 58px;
    padding: 9px 12px;
    border-radius: 9px;
  }

  .twp-return-arrow {
    width: 38px;
    height: 38px;
    font-size: 23px;
  }

  .twp-bottom-row {
    align-items: center;
  }

  .twp-audio-area {
    gap: 3px;
  }

  .twp-sound-label {
    display: none;
  }

  .twp-mfre-footer {
    width: calc(100% + 20px);
    margin-left: -10px;
    margin-right: -10px;
    border-radius: 0;
  }
}


/* =========================================================
   MFRE LIVE-SITE COLOR MATCH + MOBILE FULL-BLEED OVERRIDES
   ========================================================= */

.twp-demo-page {
  background:
    radial-gradient(circle at 50% 4%, rgba(122,32,43,.28), transparent 26%),
    linear-gradient(180deg, #31080d 0%, #210609 38%, #210609 100%);
}

.twp-website-game-wrap {
  background: transparent;
}

.twp-mfre-header {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: clamp(6px, 1.8vw, 14px) 18px clamp(2px, 1vw, 8px);
  text-align: center;
}

.twp-mfre-logo-link {
  display: inline-block;
  max-width: 100%;
  border-radius: 6px;
}

.twp-mfre-logo-link:focus-visible {
  outline: 3px solid #dfc27f;
  outline-offset: 5px;
}

.twp-mfre-logo {
  display: block;
  width: min(100%, 410px);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.twp-site-nav--bottom .twp-real-estate-return {
  color: #f7f3eb;
  background:
    linear-gradient(180deg, #4a1018, #31080d);
  border-color: #c6a15b;
  box-shadow:
    0 7px 18px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.06);
}

.twp-site-nav--bottom .twp-return-arrow {
  color: #210609;
  background: #c6a15b;
}

.twp-site-nav--bottom .twp-real-estate-return small {
  color: #d7cfd0;
}

@media (hover: hover) and (pointer: fine) {
  .twp-site-nav--bottom .twp-real-estate-return:hover {
    background:
      linear-gradient(180deg, #651822, #3d0c12);
    border-color: #dfc27f;
  }
}

.twp-mfre-footer {
  width: min(100%, 920px);
  color: rgba(247,243,235,.72);
  background:
    linear-gradient(180deg, #0c0c0d, #0a0809);
  border-top: 1px solid rgba(198,161,91,.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}

.twp-mfre-footer a {
  color: #c6a15b;
}

.twp-mfre-footer a:hover {
  color: #dfc27f;
}

.twp-developer-credit {
  color: rgba(174,180,187,.68);
}

@media (max-width: 520px) {
  .twp-demo-page {
    padding-left: 0;
    padding-right: 0;
    gap: 12px;
  }

  .twp-mfre-header {
    width: 100%;
    padding: 10px 22px 4px;
  }

  .twp-mfre-logo {
    width: min(100%, 340px);
  }

  /* Important: break the handheld out of any parent/site gutters
     so the playable console uses the full phone viewport width. */
  .timewaster-pro {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: 9px;
    padding-right: 9px;
    border-left: 0;
    border-right: 0;
    border-radius: 0 0 30px 0;
  }

  .twp-website-game-wrap {
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }

  .twp-site-nav--bottom {
    width: calc(100% - 20px);
    margin-left: 10px;
    margin-right: 10px;
  }

  .twp-mfre-footer {
    width: 100%;
    margin: 0;
    border-radius: 0;
  }
}

@media (max-width: 360px) {
  .twp-mfre-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .timewaster-pro {
    padding-left: 6px;
    padding-right: 6px;
  }
}


/* =========================================================
   VERIFIED MFRE INTEGRATION FIX
   This final override intentionally wins over earlier rules.
   ========================================================= */

html,
body {
  margin: 0;
  padding: 0;
  background: #210609;
}

.twp-demo-page,
.twp-website-game-wrap {
  width: 100%;
  min-width: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(104, 22, 33, .42), transparent 31%),
    linear-gradient(180deg, #31080d 0%, #210609 36%, #210609 100%);
}

.twp-website-game-wrap {
  position: relative;
  padding: 14px 10px 0;
}

.twp-mfre-header {
  display: block;
  width: min(100%, 680px);
  margin: 0 auto;
  padding: 4px 18px 8px;
}

.twp-mfre-logo-link {
  display: block;
  width: min(100%, 430px);
  margin: 0 auto;
}

.twp-mfre-logo {
  display: block;
  width: 100%;
  max-width: 430px;
  height: auto;
  margin: 0 auto;
}

.twp-mfre-footer {
  background: #0b090a;
  color: #b8b0b1;
  border-top: 1px solid #6e5830;
}

.twp-mfre-footer a {
  color: #cda54d;
}

.twp-mfre-footer a:hover {
  color: #e3c57d;
}

.twp-site-nav--bottom .twp-real-estate-return {
  background: linear-gradient(180deg, #481019, #2d080d);
  border-color: #cda54d;
}

.twp-site-nav--bottom .twp-return-arrow {
  background: #cda54d;
  color: #210609;
}

/* When the embed is placed inside a normal site content container,
   make the MFRE-colored game section itself full bleed. */
@media (max-width: 520px) {
  .twp-website-game-wrap {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: 0;
    padding-right: 0;
    overflow-x: clip;
  }

  .twp-mfre-header {
    width: 100%;
    padding: 8px 24px 4px;
  }

  .twp-mfre-logo-link,
  .twp-mfre-logo {
    width: 100%;
    max-width: 350px;
  }

  .timewaster-pro {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-left: 0;
    border-right: 0;
  }

  .twp-site-nav--bottom {
    width: calc(100% - 20px);
    margin-left: 10px;
    margin-right: 10px;
  }

  .twp-mfre-footer {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    border-radius: 0;
  }
}


/* =========================================================
   LARGE MOBILE HANDHELD — FULL-WIDTH PHONE LAYOUT
   Final override: intentionally wider than classic Game Boy.
   ========================================================= */

@media (max-width: 600px) {
  .twp-demo-page {
    width: 100%;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .twp-website-game-wrap {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow-x: clip;
  }

  .timewaster-pro {
    width: calc(100vw - 8px) !important;
    max-width: calc(100vw - 8px) !important;
    min-width: 0 !important;
    margin: 0 4px !important;
    padding: 8px 6px 14px !important;
    border-left: 1px solid #8d8977 !important;
    border-right: 1px solid #8d8977 !important;
    border-radius: 12px 12px 24px 12px !important;
  }

  .twp-brand-row {
    margin: 0 5px 6px !important;
  }

  .twp-system-name {
    font-size: 15px !important;
  }

  .twp-system-subtitle {
    font-size: 6px !important;
  }

  .twp-screen-bezel {
    width: 100% !important;
    padding: 7px 6px 9px !important;
    border-radius: 8px 8px 15px 8px !important;
  }

  .twp-screen-labels {
    margin: 0 2px 4px !important;
    font-size: 5.5px !important;
  }

  .twp-canvas {
    width: 100% !important;
    max-width: none !important;
    border-width: 4px !important;
    border-radius: 2px !important;
  }

  .twp-game-label {
    margin: 5px 7px 0 !important;
  }

  .twp-game-label span {
    font-size: 14px !important;
  }

  .twp-controls {
    grid-template-columns: 128px minmax(58px, 1fr) 128px !important;
    gap: 4px !important;
    width: 100% !important;
    margin-top: 7px !important;
    padding: 0 2px !important;
  }

  .twp-dpad {
    width: 122px !important;
    max-width: 122px !important;
  }

  .twp-key {
    min-width: 41px !important;
    min-height: 41px !important;
  }

  .twp-action-cluster {
    width: 122px !important;
    height: 94px !important;
  }

  .twp-action {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    min-height: 54px !important;
  }

  .twp-system-buttons {
    gap: 2px !important;
    transform: translateY(5px) !important;
  }

  .twp-pill {
    min-width: 42px !important;
    min-height: 38px !important;
    font-size: 6px !important;
  }

  .twp-pill span {
    width: 38px !important;
    height: 8px !important;
  }

  .twp-bottom-row {
    margin-top: 2px !important;
    padding: 0 4px !important;
  }

  .twp-control-hint {
    max-width: 72% !important;
    font-size: 5.5px !important;
  }

  .twp-speaker {
    gap: 2px !important;
    padding: 2px !important;
  }

  .twp-speaker i {
    width: 3px !important;
    height: 22px !important;
  }

  .twp-mfre-header {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .twp-site-nav--bottom {
    width: calc(100% - 12px) !important;
    margin-left: 6px !important;
    margin-right: 6px !important;
  }
}

@media (max-width: 390px) {
  .timewaster-pro {
    width: calc(100vw - 6px) !important;
    max-width: calc(100vw - 6px) !important;
    margin-left: 3px !important;
    margin-right: 3px !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
  }

  .twp-controls {
    grid-template-columns: 108px minmax(50px, 1fr) 108px !important;
  }

  .twp-dpad {
    width: 106px !important;
  }

  .twp-action-cluster {
    width: 106px !important;
    height: 86px !important;
  }

  .twp-action {
    width: 49px !important;
    height: 49px !important;
    min-width: 49px !important;
    min-height: 49px !important;
  }

  .twp-screen-bezel {
    padding-left: 4px !important;
    padding-right: 4px !important;
  }

  .twp-mfre-header {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}


/* =========================================================
   EDGE-TO-EDGE MOBILE CONSOLE — FINAL OVERRIDE
   Uses viewport math so parent website containers cannot shrink it.
   ========================================================= */

@media (max-width: 700px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .twp-demo-page {
    width: 100% !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: visible !important;
  }

  .twp-website-game-wrap {
    box-sizing: border-box !important;
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: visible !important;
  }

  /*
    The handheld is intentionally 100vw on phones.
    The previous build still relied partly on its parent width.
    This one does not.
  */
  .timewaster-pro {
    box-sizing: border-box !important;
    width: 100vw !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: 0 !important;
    padding: 5px 3px 11px !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-top-width: 1px !important;
    border-bottom-width: 1px !important;
    border-radius: 0 0 18px 0 !important;
    box-shadow:
      0 10px 24px rgba(0,0,0,.20),
      inset 0 1px 0 rgba(255,255,255,.55) !important;
  }

  .twp-brand-row {
    margin: 0 4px 4px !important;
  }

  .twp-system-name {
    font-size: 14px !important;
  }

  .twp-system-subtitle {
    font-size: 5.5px !important;
  }

  .twp-power {
    font-size: 6px !important;
  }

  /* Make the playable LCD area consume almost the entire phone width. */
  .twp-screen-bezel {
    width: 100% !important;
    max-width: none !important;
    padding: 5px 3px 6px !important;
    border-left-width: 1px !important;
    border-right-width: 1px !important;
    border-radius: 5px 5px 10px 5px !important;
  }

  .twp-screen-labels {
    margin: 0 2px 3px !important;
    font-size: 5px !important;
  }

  .twp-canvas {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    border-width: 3px !important;
    border-radius: 1px !important;
  }

  .twp-game-label {
    margin: 4px 5px 0 !important;
  }

  .twp-game-label span {
    font-size: 13px !important;
  }

  .twp-game-label small {
    font-size: 5.5px !important;
  }

  /* Wider, flatter control deck instead of strict Game Boy proportions. */
  .twp-controls {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: 116px minmax(64px, 1fr) 116px !important;
    align-items: center !important;
    gap: 3px !important;
    margin-top: 4px !important;
    padding: 0 5px !important;
  }

  .twp-dpad {
    width: 112px !important;
    max-width: 112px !important;
  }

  .twp-key {
    min-width: 40px !important;
    min-height: 40px !important;
  }

  .twp-action-cluster {
    width: 112px !important;
    height: 84px !important;
  }

  .twp-action {
    width: 51px !important;
    height: 51px !important;
    min-width: 51px !important;
    min-height: 51px !important;
  }

  .twp-system-buttons {
    justify-content: center !important;
    gap: 0 !important;
    transform: translateY(3px) !important;
  }

  .twp-pill {
    min-width: 41px !important;
    min-height: 36px !important;
    font-size: 5.5px !important;
  }

  .twp-pill span {
    width: 36px !important;
    height: 8px !important;
  }

  .twp-bottom-row {
    margin-top: 0 !important;
    padding: 0 4px !important;
  }

  .twp-control-hint {
    max-width: 72% !important;
    font-size: 5px !important;
  }

  .twp-speaker {
    gap: 2px !important;
    padding: 1px !important;
  }

  .twp-speaker i {
    width: 3px !important;
    height: 19px !important;
  }

  .twp-mfre-header {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    padding: 8px 18px 4px !important;
  }

  .twp-mfre-logo-link {
    width: min(100%, 420px) !important;
    max-width: 420px !important;
  }

  .twp-mfre-logo {
    width: 100% !important;
    max-width: 420px !important;
  }

  .twp-site-nav--bottom {
    width: calc(100% - 8px) !important;
    margin-left: 4px !important;
    margin-right: 4px !important;
  }

  .twp-mfre-footer {
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: 0 !important;
  }
}

@media (max-width: 380px) {
  .timewaster-pro {
    padding-left: 2px !important;
    padding-right: 2px !important;
  }

  .twp-screen-bezel {
    padding-left: 2px !important;
    padding-right: 2px !important;
  }

  .twp-controls {
    grid-template-columns: 104px minmax(52px, 1fr) 104px !important;
    padding-left: 3px !important;
    padding-right: 3px !important;
  }

  .twp-dpad {
    width: 102px !important;
  }

  .twp-action-cluster {
    width: 102px !important;
    height: 80px !important;
  }

  .twp-action {
    width: 47px !important;
    height: 47px !important;
    min-width: 47px !important;
    min-height: 47px !important;
  }
}

/* =========================================================
   MULTI-GAME LIBRARY REFINEMENTS
   ========================================================= */

.twp-current-game-title,
.twp-current-game-subtitle,
.twp-screen-game-number {
  transition: opacity .12s ease;
}

@media (max-width: 700px) {
  .twp-game-label {
    display: flex !important;
    min-width: 0;
    overflow: hidden;
  }

  .twp-current-game-title {
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
  }

  .twp-current-game-subtitle {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}


/* =========================================================
   LARGE READABLE MOBILE — FINAL OVERRIDE
   Edge-to-edge shell, maximum LCD width, compact controls.
   ========================================================= */

.twp-return-safe-zone {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 30px 12px 14px;
  background: #210609;
}

.twp-return-safe-zone .twp-site-nav--bottom {
  width: min(100%, 620px);
  margin: 0 auto;
}

@media (max-width: 700px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: clip !important;
    background: #210609;
  }

  .twp-demo-page {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: visible !important;
  }

  /* Standard full-bleed breakout from any normal site content column. */
  .twp-website-game-wrap {
    position: relative !important;
    left: 50% !important;
    width: 100vw !important;
    max-width: none !important;
    margin-left: -50vw !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: visible !important;
    background: #210609 !important;
  }

  /*
    The console now uses the ENTIRE phone width.
    No classic-Game-Boy side margins are preserved.
  */
  .timewaster-pro {
    position: relative !important;
    left: auto !important;
    box-sizing: border-box !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 3px 1px 8px !important;
    overflow: hidden !important;

    border-left: 0 !important;
    border-right: 0 !important;
    border-top: 1px solid #8d8977 !important;
    border-bottom: 1px solid #8d8977 !important;
    border-radius: 0 0 12px 0 !important;

    box-shadow:
      0 7px 18px rgba(0,0,0,.18),
      inset 0 1px 0 rgba(255,255,255,.5) !important;
  }

  .twp-brand-row {
    min-height: 18px !important;
    margin: 0 4px 2px !important;
    align-items: center !important;
  }

  .twp-system-name {
    font-size: 13px !important;
    line-height: 1 !important;
  }

  .twp-system-subtitle {
    margin-top: 0 !important;
    font-size: 5px !important;
    line-height: 1 !important;
  }

  .twp-power {
    font-size: 5.5px !important;
    padding-bottom: 0 !important;
  }

  .twp-power-light {
    width: 6px !important;
    height: 6px !important;
  }

  /* Almost every available horizontal pixel goes to the game. */
  .twp-screen-bezel {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 2px 1px 3px !important;
    border: 1px solid var(--twp-bezel-dark) !important;
    border-radius: 3px 3px 6px 3px !important;
  }

  .twp-screen-labels {
    min-height: 8px !important;
    margin: 0 2px 1px !important;
    font-size: 4.5px !important;
    line-height: 1 !important;
  }

  .twp-canvas {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    border: 2px solid #252a28 !important;
    border-radius: 0 !important;
  }

  .twp-game-label {
    min-height: 18px !important;
    margin: 2px 4px 0 !important;
    gap: 6px !important;
  }

  .twp-game-label span {
    font-size: 12px !important;
    line-height: 1 !important;
  }

  .twp-game-label small {
    font-size: 5px !important;
    line-height: 1 !important;
  }

  /* Shorter/flatter controls keep the LCD visually dominant. */
  .twp-controls {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: 106px minmax(62px, 1fr) 106px !important;
    align-items: center !important;
    gap: 2px !important;
    margin-top: 2px !important;
    padding: 0 4px !important;
  }

  .twp-dpad {
    width: 102px !important;
    max-width: 102px !important;
  }

  .twp-key {
    min-width: 37px !important;
    min-height: 37px !important;
  }

  .twp-action-cluster {
    width: 102px !important;
    height: 76px !important;
  }

  .twp-action {
    width: 47px !important;
    height: 47px !important;
    min-width: 47px !important;
    min-height: 47px !important;
  }

  .twp-system-buttons {
    gap: 0 !important;
    transform: translateY(1px) !important;
  }

  .twp-pill {
    min-width: 40px !important;
    min-height: 34px !important;
    padding: 2px !important;
    font-size: 5.5px !important;
  }

  .twp-pill span {
    width: 35px !important;
    height: 7px !important;
  }

  .twp-bottom-row {
    min-height: 21px !important;
    margin-top: 0 !important;
    padding: 0 4px !important;
  }

  .twp-control-hint {
    max-width: 70% !important;
    font-size: 4.5px !important;
    line-height: 1.1 !important;
  }

  .twp-sound-toggle {
    min-height: 30px !important;
    padding: 3px 6px !important;
  }

  .twp-speaker {
    gap: 1px !important;
    padding: 1px !important;
  }

  .twp-speaker i {
    width: 2px !important;
    height: 16px !important;
  }

  .twp-mfre-header {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    padding: 6px 18px 3px !important;
  }

  .twp-mfre-logo-link,
  .twp-mfre-logo {
    width: min(100%, 390px) !important;
    max-width: 390px !important;
  }

  .twp-mfre-footer {
    position: relative !important;
    left: 50% !important;
    width: 100vw !important;
    max-width: none !important;
    margin-left: -50vw !important;
    margin-right: 0 !important;
    border-radius: 0 !important;
  }

  /*
    Exit button is intentionally isolated BELOW the footer.
    This creates a dead/safe area between game controls and leaving the arcade.
  */
  .twp-return-safe-zone {
    position: relative !important;
    left: 50% !important;
    width: 100vw !important;
    max-width: none !important;
    margin-left: -50vw !important;
    margin-right: 0 !important;
    padding: 30px 8px max(14px, env(safe-area-inset-bottom)) !important;
    background: #210609 !important;
  }

  .twp-return-safe-zone .twp-site-nav--bottom {
    width: 100% !important;
    max-width: 520px !important;
    margin: 0 auto !important;
  }
}

@media (max-width: 380px) {
  .timewaster-pro {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .twp-screen-bezel {
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
  }

  .twp-canvas {
    border-left-width: 1px !important;
    border-right-width: 1px !important;
  }

  .twp-controls {
    grid-template-columns: 98px minmax(54px, 1fr) 98px !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
  }

  .twp-dpad {
    width: 96px !important;
  }

  .twp-action-cluster {
    width: 96px !important;
    height: 73px !important;
  }

  .twp-action {
    width: 45px !important;
    height: 45px !important;
    min-width: 45px !important;
    min-height: 45px !important;
  }
}


/* =========================================================
   DESKTOP/TABLET WIDTH EXPANSION
   The handheld should use far more of the available width.
   ========================================================= */

@media (min-width: 701px) {
  .twp-demo-page {
    padding-left: 18px !important;
    padding-right: 18px !important;
    gap: 14px !important;
  }

  .twp-mfre-header {
    width: min(100%, 980px) !important;
    max-width: 980px !important;
    padding-top: 10px !important;
    padding-bottom: 4px !important;
  }

  .twp-mfre-logo {
    width: min(100%, 450px) !important;
    max-width: 450px !important;
  }

  /*
    Main fix:
    let the handheld consume most of the column/page width
    instead of stopping around the old ~620px shell.
  */
  .timewaster-pro {
    width: min(94vw, 820px) !important;
    max-width: 820px !important;
    margin: 0 auto !important;
    padding: 14px 16px 22px !important;
    border-radius: 24px 24px 54px 20px !important;
  }

  .twp-brand-row {
    margin: 0 4px 8px !important;
  }

  .twp-screen-bezel {
    padding: 10px 12px 14px !important;
  }

  .twp-screen-labels {
    margin-bottom: 6px !important;
  }

  .twp-game-label {
    margin-top: 6px !important;
  }

  .twp-controls {
    margin-top: 8px !important;
    gap: clamp(8px, 2vw, 22px) !important;
    padding: 0 4px !important;
  }

  .twp-return-safe-zone {
    width: min(100%, 980px) !important;
    max-width: 980px !important;
    padding-top: 18px !important;
  }

  .twp-return-safe-zone .twp-site-nav--bottom {
    width: min(100%, 760px) !important;
    max-width: 760px !important;
  }

  .twp-mfre-footer {
    width: min(100%, 980px) !important;
    max-width: 980px !important;
  }
}


/* =========================================================
   MAXIMUM MOBILE FILL — FINAL OVERRIDE
   Uses nearly all available phone width and enlarges controls.
   ========================================================= */

@media (max-width: 900px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: clip !important;
    background: #210609 !important;
  }

  .twp-demo-page {
    width: 100% !important;
    max-width: none !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 6px !important;
    overflow: visible !important;
  }

  .twp-website-game-wrap {
    position: relative !important;
    left: 50% !important;
    width: 100vw !important;
    max-width: none !important;
    margin-left: -50vw !important;
    margin-right: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #210609 !important;
  }

  /* Keep branding visible but stop it from consuming much vertical space. */
  .twp-mfre-header {
    box-sizing: border-box !important;
    width: 100vw !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 5px 10px 2px !important;
  }

  .twp-mfre-logo-link {
    display: block !important;
    width: min(78vw, 360px) !important;
    max-width: 360px !important;
    margin: 0 auto !important;
  }

  .twp-mfre-logo {
    display: block !important;
    width: 100% !important;
    max-width: 360px !important;
    height: auto !important;
    margin: 0 auto !important;
  }

  /*
    True edge-to-edge handheld.
    No side margins and almost no shell padding.
  */
  .timewaster-pro {
    position: relative !important;
    left: 50% !important;
    box-sizing: border-box !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    margin-left: -50vw !important;
    margin-right: 0 !important;
    padding: 3px 1px 10px !important;
    overflow: hidden !important;

    border-left: 0 !important;
    border-right: 0 !important;
    border-top: 1px solid #8d8977 !important;
    border-bottom: 1px solid #8d8977 !important;
    border-radius: 0 0 14px 0 !important;

    box-shadow:
      0 7px 18px rgba(0,0,0,.18),
      inset 0 1px 0 rgba(255,255,255,.5) !important;
  }

  .twp-brand-row {
    min-height: 20px !important;
    margin: 0 5px 3px !important;
    align-items: center !important;
  }

  .twp-system-name {
    font-size: 14px !important;
    line-height: 1 !important;
  }

  .twp-system-subtitle {
    margin-top: 1px !important;
    font-size: 5.5px !important;
    line-height: 1 !important;
  }

  .twp-power {
    font-size: 6px !important;
  }

  .twp-power-light {
    width: 7px !important;
    height: 7px !important;
  }

  /* Maximum readable LCD area. */
  .twp-screen-bezel {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 2px 1px 4px !important;
    border: 1px solid var(--twp-bezel-dark) !important;
    border-radius: 3px 3px 7px 3px !important;
  }

  .twp-screen-labels {
    min-height: 9px !important;
    margin: 0 3px 1px !important;
    font-size: 5px !important;
    line-height: 1 !important;
  }

  .twp-canvas {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    border: 2px solid #252a28 !important;
    border-radius: 0 !important;
  }

  .twp-game-label {
    min-height: 20px !important;
    margin: 3px 5px 0 !important;
    gap: 7px !important;
  }

  .twp-game-label span {
    font-size: 13px !important;
  }

  .twp-game-label small {
    font-size: 5.5px !important;
  }

  /*
    Slightly larger controls while still keeping the screen dominant.
  */
  .twp-controls {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: 120px minmax(70px, 1fr) 120px !important;
    align-items: center !important;
    gap: 3px !important;
    margin-top: 4px !important;
    padding: 0 4px !important;
  }

  .twp-dpad {
    width: 116px !important;
    max-width: 116px !important;
  }

  .twp-key {
    min-width: 43px !important;
    min-height: 43px !important;
  }

  .twp-action-cluster {
    width: 116px !important;
    height: 88px !important;
  }

  .twp-action {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    min-height: 54px !important;
    font-size: 16px !important;
  }

  .twp-system-buttons {
    gap: 2px !important;
    transform: translateY(2px) !important;
  }

  .twp-pill {
    min-width: 44px !important;
    min-height: 38px !important;
    padding: 2px !important;
    font-size: 6px !important;
  }

  .twp-pill span {
    width: 39px !important;
    height: 8px !important;
  }

  .twp-bottom-row {
    min-height: 26px !important;
    margin-top: 1px !important;
    padding: 0 5px !important;
  }

  .twp-control-hint {
    max-width: 68% !important;
    font-size: 5px !important;
    line-height: 1.15 !important;
  }

  .twp-sound-toggle {
    min-height: 34px !important;
    padding: 4px 7px !important;
  }

  .twp-speaker {
    gap: 2px !important;
    padding: 1px !important;
  }

  .twp-speaker i {
    width: 2px !important;
    height: 19px !important;
  }

  /* Footer stays full-width and the exit remains safely separated. */
  .twp-mfre-footer {
    position: relative !important;
    left: 50% !important;
    width: 100vw !important;
    max-width: none !important;
    margin-left: -50vw !important;
    margin-right: 0 !important;
    border-radius: 0 !important;
  }

  .twp-return-safe-zone {
    position: relative !important;
    left: 50% !important;
    width: 100vw !important;
    max-width: none !important;
    margin-left: -50vw !important;
    margin-right: 0 !important;
    padding: 34px 8px max(16px, env(safe-area-inset-bottom)) !important;
    background: #210609 !important;
  }

  .twp-return-safe-zone .twp-site-nav--bottom {
    width: calc(100% - 8px) !important;
    max-width: 620px !important;
    margin: 0 auto !important;
  }

  .twp-return-safe-zone .twp-real-estate-return {
    min-height: 62px !important;
  }
}

@media (max-width: 430px) {
  .twp-mfre-logo-link {
    width: min(82vw, 340px) !important;
  }

  .timewaster-pro {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .twp-screen-bezel {
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
  }

  .twp-canvas {
    border-left-width: 1px !important;
    border-right-width: 1px !important;
  }

  .twp-controls {
    grid-template-columns: 112px minmax(58px, 1fr) 112px !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
  }

  .twp-dpad {
    width: 108px !important;
  }

  .twp-action-cluster {
    width: 108px !important;
    height: 84px !important;
  }

  .twp-action {
    width: 51px !important;
    height: 51px !important;
    min-width: 51px !important;
    min-height: 51px !important;
  }
}

@media (max-width: 360px) {
  .twp-controls {
    grid-template-columns: 104px minmax(50px, 1fr) 104px !important;
  }

  .twp-dpad {
    width: 101px !important;
  }

  .twp-action-cluster {
    width: 101px !important;
    height: 80px !important;
  }

  .twp-action {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
  }
}


/* =========================================================
   IPHONE / LARGE-MOBILE CONSOLE SCALE
   Target: console should feel like the dominant object on screen.
   ========================================================= */

@media (max-width: 900px) {
  .twp-demo-page {
    gap: 4px !important;
  }

  .twp-mfre-header {
    padding: 5px 8px 3px !important;
  }

  .twp-mfre-logo-link {
    width: min(78vw, 360px) !important;
    max-width: 360px !important;
  }

  /*
    Nearly full phone width with only a tiny visual gutter.
    6px total = about 3px per side.
  */
  .timewaster-pro {
    left: 50% !important;
    width: calc(100vw - 6px) !important;
    max-width: calc(100vw - 6px) !important;
    margin-left: calc(-50vw + 3px) !important;
    margin-right: 0 !important;
    padding: 5px 3px 16px !important;
    border-left: 1px solid #8d8977 !important;
    border-right: 1px solid #8d8977 !important;
    border-radius: 7px 7px 20px 7px !important;
  }

  .twp-brand-row {
    min-height: 24px !important;
    margin: 0 7px 5px !important;
  }

  .twp-system-name {
    font-size: 15px !important;
  }

  .twp-system-subtitle {
    font-size: 6px !important;
  }

  .twp-power {
    font-size: 6px !important;
  }

  /* Keep the LCD essentially full-width. */
  .twp-screen-bezel {
    width: 100% !important;
    padding: 5px 4px 7px !important;
    border-width: 2px !important;
    border-radius: 7px 7px 13px 7px !important;
  }

  .twp-screen-labels {
    margin: 0 4px 3px !important;
    font-size: 5.5px !important;
  }

  .twp-canvas {
    width: 100% !important;
    border-width: 3px !important;
  }

  .twp-game-label {
    min-height: 25px !important;
    margin: 6px 8px 2px !important;
    gap: 8px !important;
  }

  .twp-game-label span {
    font-size: 15px !important;
  }

  .twp-game-label small {
    font-size: 6px !important;
  }

  /*
    Bigger control deck based on viewport width.
    This matches the screenshot much more closely:
    large D-pad, large A/B, generous finger targets.
  */
  .twp-controls {
    grid-template-columns:
      minmax(132px, 34vw)
      minmax(70px, 1fr)
      minmax(132px, 34vw) !important;
    gap: 4px !important;
    margin-top: 10px !important;
    padding: 0 7px !important;
  }

  .twp-dpad {
    width: min(34vw, 150px) !important;
    max-width: 150px !important;
  }

  .twp-key {
    min-width: 48px !important;
    min-height: 48px !important;
    font-size: 15px !important;
  }

  .twp-action-cluster {
    width: min(34vw, 150px) !important;
    height: min(27vw, 118px) !important;
    min-height: 96px !important;
  }

  .twp-action {
    width: min(15vw, 66px) !important;
    height: min(15vw, 66px) !important;
    min-width: 56px !important;
    min-height: 56px !important;
    font-size: 19px !important;
  }

  .twp-system-buttons {
    gap: 6px !important;
    transform: translateY(8px) !important;
  }

  .twp-pill {
    min-width: 48px !important;
    min-height: 42px !important;
    font-size: 6px !important;
  }

  .twp-pill span {
    width: 43px !important;
    height: 9px !important;
  }

  .twp-bottom-row {
    min-height: 38px !important;
    margin-top: 5px !important;
    padding: 0 8px !important;
  }

  .twp-control-hint {
    max-width: 69% !important;
    font-size: 5.5px !important;
    line-height: 1.2 !important;
  }

  .twp-sound-toggle {
    min-height: 38px !important;
    padding: 5px 8px !important;
  }

  .twp-speaker {
    gap: 3px !important;
  }

  .twp-speaker i {
    width: 3px !important;
    height: 25px !important;
  }
}

/* iPhone Pro Max / large-phone sweet spot */
@media (min-width: 410px) and (max-width: 500px) {
  .timewaster-pro {
    width: calc(100vw - 4px) !important;
    max-width: calc(100vw - 4px) !important;
    margin-left: calc(-50vw + 2px) !important;
    padding-bottom: 18px !important;
  }

  .twp-dpad {
    width: min(35vw, 154px) !important;
  }

  .twp-action-cluster {
    width: min(35vw, 154px) !important;
    height: min(28vw, 123px) !important;
  }

  .twp-action {
    width: min(15.5vw, 68px) !important;
    height: min(15.5vw, 68px) !important;
  }
}

/* Very small phones still stay usable without controls colliding. */
@media (max-width: 380px) {
  .timewaster-pro {
    width: calc(100vw - 4px) !important;
    max-width: calc(100vw - 4px) !important;
    margin-left: calc(-50vw + 2px) !important;
  }

  .twp-controls {
    grid-template-columns: 112px minmax(52px, 1fr) 112px !important;
    padding-left: 3px !important;
    padding-right: 3px !important;
  }

  .twp-dpad {
    width: 108px !important;
  }

  .twp-action-cluster {
    width: 108px !important;
    height: 88px !important;
  }

  .twp-action {
    width: 51px !important;
    height: 51px !important;
    min-width: 51px !important;
    min-height: 51px !important;
  }
}


/* =========================================================
   GIANT MOBILE CONSOLE — FINAL OVERRIDE
   Handheld dominates the phone viewport.
   ========================================================= */

@media (max-width: 900px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: clip !important;
  }

  .twp-demo-page {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 2px !important;
  }

  .twp-website-game-wrap {
    position: relative !important;
    left: 50% !important;
    width: 100vw !important;
    width: 100dvw !important;
    max-width: none !important;
    margin-left: -50vw !important;
    margin-left: -50dvw !important;
    margin-right: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  /* Keep site branding, but make it secondary to the console. */
  .twp-mfre-header {
    width: 100vw !important;
    width: 100dvw !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 3px 8px 1px !important;
  }

  .twp-mfre-logo-link {
    width: min(68vw, 310px) !important;
    width: min(68dvw, 310px) !important;
    max-width: 310px !important;
  }

  .twp-mfre-logo {
    width: 100% !important;
    max-width: 310px !important;
  }

  /*
    Absolutely edge-to-edge.
    No decorative page gutter at all.
  */
  .timewaster-pro {
    position: relative !important;
    left: 50% !important;
    width: 100vw !important;
    width: 100dvw !important;
    max-width: 100vw !important;
    max-width: 100dvw !important;
    min-width: 0 !important;
    margin-left: -50vw !important;
    margin-left: -50dvw !important;
    margin-right: 0 !important;
    padding: 4px 0 22px !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-top: 1px solid #8d8977 !important;
    border-bottom: 1px solid #8d8977 !important;
    border-radius: 0 0 18px 0 !important;
    overflow: hidden !important;
  }

  .twp-brand-row {
    min-height: 26px !important;
    margin: 0 7px 5px !important;
  }

  .twp-system-name {
    font-size: 16px !important;
  }

  .twp-system-subtitle {
    font-size: 6.5px !important;
  }

  .twp-power {
    font-size: 6.5px !important;
  }

  .twp-power-light {
    width: 8px !important;
    height: 8px !important;
  }

  /* Screen occupies essentially every available horizontal pixel. */
  .twp-screen-bezel {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 4px 1px 7px !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-top-width: 2px !important;
    border-bottom-width: 2px !important;
    border-radius: 0 0 10px 0 !important;
  }

  .twp-screen-labels {
    min-height: 11px !important;
    margin: 0 6px 3px !important;
    font-size: 6px !important;
  }

  .twp-canvas {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    border-left: 2px solid #252a28 !important;
    border-right: 2px solid #252a28 !important;
    border-top: 3px solid #252a28 !important;
    border-bottom: 3px solid #252a28 !important;
  }

  .twp-game-label {
    min-height: 30px !important;
    margin: 7px 9px 3px !important;
  }

  .twp-game-label span {
    font-size: 17px !important;
  }

  .twp-game-label small {
    font-size: 6.5px !important;
  }

  /*
    GIANT controls:
    left and right zones each consume ~39% of the phone.
  */
  .twp-controls {
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: 39vw 18vw 39vw !important;
    grid-template-columns: 39dvw 18dvw 39dvw !important;
    gap: 2vw !important;
    gap: 2dvw !important;
    align-items: center !important;
    margin-top: 12px !important;
    padding: 0 1vw !important;
    padding: 0 1dvw !important;
  }

  .twp-dpad {
    width: min(39vw, 178px) !important;
    width: min(39dvw, 178px) !important;
    max-width: 178px !important;
    justify-self: start !important;
  }

  .twp-key {
    min-width: 54px !important;
    min-height: 54px !important;
    font-size: 18px !important;
  }

  .twp-action-cluster {
    width: min(39vw, 178px) !important;
    width: min(39dvw, 178px) !important;
    height: min(34vw, 154px) !important;
    height: min(34dvw, 154px) !important;
    min-height: 126px !important;
    justify-self: end !important;
  }

  .twp-action {
    width: min(18vw, 80px) !important;
    width: min(18dvw, 80px) !important;
    height: min(18vw, 80px) !important;
    height: min(18dvw, 80px) !important;
    min-width: 66px !important;
    min-height: 66px !important;
    font-size: 24px !important;
  }

  .twp-system-buttons {
    gap: 9px !important;
    transform: translateY(16px) !important;
  }

  .twp-pill {
    min-width: 54px !important;
    min-height: 46px !important;
    padding: 3px !important;
    font-size: 6.5px !important;
  }

  .twp-pill span {
    width: 48px !important;
    height: 10px !important;
  }

  .twp-bottom-row {
    min-height: 48px !important;
    margin-top: 8px !important;
    padding: 0 10px !important;
  }

  .twp-control-hint {
    max-width: 66% !important;
    font-size: 6px !important;
    line-height: 1.3 !important;
  }

  .twp-sound-toggle {
    min-height: 42px !important;
    padding: 6px 10px !important;
  }

  .twp-speaker {
    gap: 4px !important;
  }

  .twp-speaker i {
    width: 4px !important;
    height: 30px !important;
  }
}

/* Large phones: push the controls even larger. */
@media (min-width: 410px) and (max-width: 520px) {
  .twp-controls {
    grid-template-columns: 40vw 16vw 40vw !important;
    grid-template-columns: 40dvw 16dvw 40dvw !important;
    gap: 2vw !important;
    gap: 2dvw !important;
  }

  .twp-dpad {
    width: min(40vw, 184px) !important;
    width: min(40dvw, 184px) !important;
  }

  .twp-action-cluster {
    width: min(40vw, 184px) !important;
    width: min(40dvw, 184px) !important;
    height: min(35vw, 160px) !important;
    height: min(35dvw, 160px) !important;
  }

  .twp-action {
    width: min(18.5vw, 82px) !important;
    width: min(18.5dvw, 82px) !important;
    height: min(18.5vw, 82px) !important;
    height: min(18.5dvw, 82px) !important;
  }
}

/* Prevent collisions on very small phones while still staying huge. */
@media (max-width: 380px) {
  .twp-controls {
    grid-template-columns: 36vw 24vw 36vw !important;
    grid-template-columns: 36dvw 24dvw 36dvw !important;
    gap: 2vw !important;
    gap: 2dvw !important;
  }

  .twp-dpad {
    width: 36vw !important;
    width: 36dvw !important;
  }

  .twp-action-cluster {
    width: 36vw !important;
    width: 36dvw !important;
    height: 33vw !important;
    height: 33dvw !important;
    min-height: 112px !important;
  }

  .twp-action {
    width: 17vw !important;
    width: 17dvw !important;
    height: 17vw !important;
    height: 17dvw !important;
    min-width: 58px !important;
    min-height: 58px !important;
  }
}


/* =========================================================
   FOUR-GAME OVERSIZE CENTERED HANDHELD — FINAL OVERRIDE
   ========================================================= */

.twp-demo-page,
.twp-website-game-wrap {
  text-align: center;
}

.twp-mfre-header,
.twp-mfre-logo-link,
.twp-mfre-logo,
.timewaster-pro,
.twp-mfre-footer,
.twp-return-safe-zone,
.twp-return-safe-zone .twp-site-nav--bottom {
  margin-left: auto !important;
  margin-right: auto !important;
}

.twp-mfre-header {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.twp-mfre-logo-link {
  display: block !important;
  text-align: center !important;
}

.twp-mfre-logo {
  display: block !important;
  margin: 0 auto !important;
}

.twp-return-safe-zone {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

.twp-return-safe-zone .twp-site-nav--bottom {
  display: flex !important;
  justify-content: center !important;
}

.twp-return-safe-zone .twp-real-estate-return {
  width: 100% !important;
  justify-content: center !important;
}

/* Desktop gets a very large centered console too. */
@media (min-width: 901px) {
  .twp-demo-page {
    align-items: center !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .twp-mfre-header {
    width: min(100%, 1180px) !important;
  }

  .twp-mfre-logo {
    width: min(100%, 500px) !important;
    max-width: 500px !important;
  }

  .timewaster-pro {
    position: relative !important;
    left: auto !important;
    transform: none !important;
    width: min(96vw, 1120px) !important;
    max-width: 1120px !important;
    margin: 0 auto !important;
    padding: 20px 24px 34px !important;
  }

  .twp-screen-bezel {
    padding: 16px 18px 20px !important;
  }

  .twp-controls {
    grid-template-columns: minmax(190px, 1fr) 190px minmax(190px, 1fr) !important;
    gap: 36px !important;
    margin-top: 24px !important;
  }

  .twp-dpad {
    width: 190px !important;
    max-width: 190px !important;
  }

  /* Roughly 30% larger than the previous giant build. */
  .twp-action-cluster {
    width: 230px !important;
    height: 185px !important;
  }

  .twp-action {
    width: 104px !important;
    height: 104px !important;
    min-width: 104px !important;
    min-height: 104px !important;
    font-size: 30px !important;
  }

  .twp-pill {
    min-width: 76px !important;
    min-height: 62px !important;
    font-size: 9px !important;
  }

  .twp-pill span {
    width: 66px !important;
    height: 13px !important;
  }

  .twp-system-buttons {
    gap: 16px !important;
  }

  .twp-mfre-footer,
  .twp-return-safe-zone {
    width: min(96vw, 1120px) !important;
    max-width: 1120px !important;
  }

  .twp-return-safe-zone .twp-site-nav--bottom {
    width: min(100%, 760px) !important;
  }
}

/*
  Phone strategy:
  make the console 112% of the viewport and center it.
  The decorative shell crops slightly, while the LCD and controls
  become materially larger than any normal 100vw layout.
*/
@media (max-width: 900px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    background: #210609 !important;
  }

  .twp-demo-page {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 3px !important;
    overflow: hidden !important;
    align-items: center !important;
  }

  .twp-website-game-wrap {
    position: relative !important;
    left: auto !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    text-align: center !important;
  }

  .twp-mfre-header {
    position: relative !important;
    left: auto !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto !important;
    padding: 4px 8px 2px !important;
  }

  .twp-mfre-logo-link {
    width: min(76vw, 360px) !important;
    width: min(76dvw, 360px) !important;
    max-width: 360px !important;
  }

  .twp-mfre-logo {
    width: 100% !important;
    max-width: 360px !important;
  }

  .timewaster-pro {
    position: relative !important;
    left: 50% !important;
    transform: translateX(-50%) !important;

    width: 112vw !important;
    width: 112dvw !important;
    max-width: none !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 5px 3px 28px !important;

    border-left: 0 !important;
    border-right: 0 !important;
    border-top: 1px solid #8d8977 !important;
    border-bottom: 1px solid #8d8977 !important;
    border-radius: 0 0 22px 0 !important;
    overflow: hidden !important;
  }

  .twp-brand-row {
    min-height: 30px !important;
    margin: 0 9px 6px !important;
  }

  .twp-system-name {
    font-size: 18px !important;
  }

  .twp-system-subtitle {
    font-size: 7px !important;
  }

  .twp-power {
    font-size: 7px !important;
  }

  .twp-screen-bezel {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 5px 2px 8px !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-radius: 0 0 12px 0 !important;
  }

  .twp-screen-labels {
    min-height: 12px !important;
    margin: 0 8px 3px !important;
    font-size: 6.5px !important;
  }

  .twp-canvas {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    border: 3px solid #252a28 !important;
  }

  .twp-game-label {
    min-height: 32px !important;
    margin: 8px 11px 4px !important;
  }

  .twp-game-label span {
    font-size: 18px !important;
  }

  .twp-game-label small {
    font-size: 7px !important;
  }

  .twp-controls {
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: 39% 20% 39% !important;
    gap: 1% !important;
    margin-top: 16px !important;
    padding: 0 2% !important;
  }

  .twp-dpad {
    width: min(39vw, 190px) !important;
    width: min(39dvw, 190px) !important;
    max-width: 190px !important;
  }

  .twp-key {
    min-width: 58px !important;
    min-height: 58px !important;
    font-size: 19px !important;
  }

  /* A/B are ~30% larger than the already-large 80px target. */
  .twp-action-cluster {
    width: min(42vw, 220px) !important;
    width: min(42dvw, 220px) !important;
    height: min(38vw, 195px) !important;
    height: min(38dvw, 195px) !important;
    min-height: 145px !important;
    justify-self: end !important;
  }

  .twp-action {
    width: min(23vw, 104px) !important;
    width: min(23dvw, 104px) !important;
    height: min(23vw, 104px) !important;
    height: min(23dvw, 104px) !important;
    min-width: 78px !important;
    min-height: 78px !important;
    font-size: 28px !important;
  }

  /* START + RESET are also ~30% larger. */
  .twp-system-buttons {
    gap: 10px !important;
    transform: translateY(20px) !important;
  }

  .twp-pill {
    min-width: 70px !important;
    min-height: 60px !important;
    padding: 5px !important;
    font-size: 8px !important;
  }

  .twp-pill span {
    width: 60px !important;
    height: 12px !important;
  }

  .twp-bottom-row {
    min-height: 58px !important;
    margin-top: 12px !important;
    padding: 0 13px !important;
  }

  .twp-control-hint {
    max-width: 64% !important;
    font-size: 6.5px !important;
    line-height: 1.3 !important;
  }

  .twp-sound-toggle {
    min-height: 46px !important;
    padding: 7px 11px !important;
  }

  .twp-speaker {
    gap: 4px !important;
  }

  .twp-speaker i {
    width: 4px !important;
    height: 34px !important;
  }

  .twp-mfre-footer {
    position: relative !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto !important;
    border-radius: 0 !important;
  }

  .twp-return-safe-zone {
    position: relative !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto !important;
    padding: 38px 12px max(18px, env(safe-area-inset-bottom)) !important;
    background: #210609 !important;
  }

  .twp-return-safe-zone .twp-site-nav--bottom {
    width: min(94%, 620px) !important;
    max-width: 620px !important;
    margin: 0 auto !important;
  }

  .twp-return-safe-zone .twp-real-estate-return {
    width: 100% !important;
    min-height: 66px !important;
  }
}

/* Desktop-only keyboard note in the lower-right corner. */
.twp-desktop-legend {
  display: none;
}

@media (min-width: 901px) {
  .twp-desktop-legend {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 20;

    display: grid;
    grid-template-columns: auto auto;
    gap: 4px 9px;

    min-width: 210px;
    padding: 11px 13px;

    color: rgba(247,243,235,.78);
    background: rgba(12,12,13,.88);
    border: 1px solid rgba(198,161,91,.55);
    border-radius: 8px;
    box-shadow: 0 7px 20px rgba(0,0,0,.22);

    font: 700 10px/1.3 "Courier New", Courier, monospace;
    text-align: left;
    pointer-events: none;
  }

  .twp-desktop-legend strong {
    grid-column: 1 / -1;
    margin-bottom: 3px;
    color: #dfc27f;
    font-size: 10px;
    letter-spacing: .08em;
  }

  .twp-desktop-legend b {
    color: #f7f3eb;
  }
}


/* =========================================================
   ULTRA-HUGE BUTTONS + LONGER SCREEN + LARGER DEVICE TEXT
   Final override.
   ========================================================= */

/* Center all main brand/layout elements hard. */
.twp-demo-page,
.twp-website-game-wrap {
  text-align: center !important;
}

.twp-mfre-header,
.twp-mfre-logo-link,
.twp-mfre-logo,
.timewaster-pro,
.twp-mfre-footer,
.twp-return-safe-zone,
.twp-return-safe-zone .twp-site-nav--bottom {
  margin-left: auto !important;
  margin-right: auto !important;
}

.twp-mfre-header {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.twp-mfre-logo-link,
.twp-mfre-logo {
  display: block !important;
}

/* Make every line of device text larger. */
.twp-system-name {
  font-size: 20px !important;
}

.twp-system-subtitle {
  font-size: 8px !important;
}

.twp-power {
  font-size: 8px !important;
}

.twp-screen-labels {
  font-size: 7px !important;
}

.twp-game-label span {
  font-size: 20px !important;
}

.twp-game-label small {
  font-size: 8px !important;
}

.twp-control-hint {
  font-size: 7px !important;
  line-height: 1.35 !important;
}

.twp-action span {
  font-size: 1.35em !important;
}

.twp-pill {
  font-size: 10px !important;
  letter-spacing: 0.06em !important;
}

.twp-pill span {
  width: 68px !important;
  height: 14px !important;
}

/* Desktop: huge centered console */
@media (min-width: 901px) {
  .twp-demo-page {
    align-items: center !important;
  }

  .twp-mfre-header {
    width: min(100%, 1280px) !important;
    padding-top: 8px !important;
    padding-bottom: 4px !important;
  }

  .twp-mfre-logo {
    width: min(100%, 560px) !important;
    max-width: 560px !important;
  }

  .timewaster-pro {
    width: min(98vw, 1220px) !important;
    max-width: 1220px !important;
    padding: 22px 26px 42px !important;
    border-radius: 28px 28px 70px 24px !important;
  }

  .twp-brand-row {
    min-height: 34px !important;
    margin: 0 10px 10px !important;
  }

  .twp-screen-bezel {
    padding: 18px 20px 24px !important;
    border-radius: 18px 18px 28px 18px !important;
  }

  .twp-canvas {
    width: 100% !important;
    max-width: none !important;
    border-width: 4px !important;
  }

  .twp-game-label {
    min-height: 38px !important;
    margin: 12px 14px 8px !important;
  }

  .twp-controls {
    grid-template-columns: minmax(220px, 1fr) 220px minmax(220px, 1fr) !important;
    gap: 40px !important;
    margin-top: 28px !important;
  }

  .twp-dpad {
    width: 220px !important;
    max-width: 220px !important;
  }

  .twp-key {
    min-width: 66px !important;
    min-height: 66px !important;
    font-size: 22px !important;
  }

  /* A/B about 30% larger again */
  .twp-action-cluster {
    width: 290px !important;
    height: 230px !important;
  }

  .twp-action {
    width: 132px !important;
    height: 132px !important;
    min-width: 132px !important;
    min-height: 132px !important;
    font-size: 38px !important;
  }

  .twp-system-buttons {
    gap: 18px !important;
    transform: translateY(20px) !important;
  }

  .twp-pill {
    min-width: 96px !important;
    min-height: 78px !important;
    padding: 6px !important;
    font-size: 11px !important;
  }

  .twp-pill span {
    width: 82px !important;
    height: 16px !important;
  }

  .twp-bottom-row {
    min-height: 68px !important;
    margin-top: 16px !important;
    padding: 0 14px !important;
  }

  .twp-sound-toggle {
    min-height: 50px !important;
    padding: 8px 12px !important;
  }

  .twp-mfre-footer,
  .twp-return-safe-zone {
    width: min(98vw, 1220px) !important;
    max-width: 1220px !important;
  }

  .twp-return-safe-zone .twp-site-nav--bottom {
    width: min(100%, 820px) !important;
  }

  .twp-return-safe-zone .twp-real-estate-return {
    min-height: 68px !important;
    font-size: 18px !important;
  }
}

/* Mobile/tablet: make the whole handheld much larger than the viewport */
@media (max-width: 900px) {
  html,
  body {
    overflow-x: hidden !important;
  }

  .twp-demo-page {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 3px !important;
    overflow: hidden !important;
    align-items: center !important;
  }

  .twp-website-game-wrap {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    text-align: center !important;
  }

  .twp-mfre-header {
    width: 100% !important;
    max-width: none !important;
    padding: 4px 8px 2px !important;
  }

  .twp-mfre-logo-link {
    width: min(82vw, 390px) !important;
    width: min(82dvw, 390px) !important;
    max-width: 390px !important;
  }

  .twp-mfre-logo {
    width: 100% !important;
    max-width: 390px !important;
  }

  /*
    Bigger than before:
    122% width, centered, so the device itself feels much bigger.
    The shell edges may crop slightly, which is intentional.
  */
  .timewaster-pro {
    position: relative !important;
    left: 50% !important;
    transform: translateX(-50%) !important;

    width: 122vw !important;
    width: 122dvw !important;
    max-width: none !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 6px 4px 34px !important;

    border-left: 0 !important;
    border-right: 0 !important;
    border-top: 1px solid #8d8977 !important;
    border-bottom: 1px solid #8d8977 !important;
    border-radius: 0 0 28px 0 !important;
    overflow: hidden !important;
  }

  .twp-brand-row {
    min-height: 34px !important;
    margin: 0 10px 7px !important;
  }

  .twp-system-name {
    font-size: 22px !important;
  }

  .twp-system-subtitle {
    font-size: 9px !important;
  }

  .twp-power {
    font-size: 9px !important;
  }

  .twp-screen-bezel {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 6px 2px 10px !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-radius: 0 0 16px 0 !important;
  }

  .twp-screen-labels {
    min-height: 14px !important;
    margin: 0 9px 4px !important;
    font-size: 8px !important;
  }

  /*
    Taller/longer screen look.
    The actual canvas is also taller in the HTML now (384x320).
  */
  .twp-canvas {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    border: 4px solid #252a28 !important;
  }

  .twp-game-label {
    min-height: 36px !important;
    margin: 10px 12px 6px !important;
    gap: 10px !important;
  }

  .twp-game-label span {
    font-size: 22px !important;
  }

  .twp-game-label small {
    font-size: 9px !important;
  }

  .twp-controls {
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: 39% 20% 39% !important;
    gap: 1% !important;
    margin-top: 18px !important;
    padding: 0 2% !important;
  }

  .twp-dpad {
    width: min(42vw, 220px) !important;
    width: min(42dvw, 220px) !important;
    max-width: 220px !important;
  }

  .twp-key {
    min-width: 68px !important;
    min-height: 68px !important;
    font-size: 22px !important;
  }

  /*
    A/B ~30% larger than the prior oversize build.
  */
  .twp-action-cluster {
    width: min(48vw, 260px) !important;
    width: min(48dvw, 260px) !important;
    height: min(42vw, 220px) !important;
    height: min(42dvw, 220px) !important;
    min-height: 170px !important;
    justify-self: end !important;
  }

  .twp-action {
    width: min(27vw, 130px) !important;
    width: min(27dvw, 130px) !important;
    height: min(27vw, 130px) !important;
    height: min(27dvw, 130px) !important;
    min-width: 96px !important;
    min-height: 96px !important;
    font-size: 34px !important;
  }

  /*
    START/RESET about 30% larger too.
  */
  .twp-system-buttons {
    gap: 12px !important;
    transform: translateY(24px) !important;
  }

  .twp-pill {
    min-width: 86px !important;
    min-height: 74px !important;
    padding: 6px !important;
    font-size: 10px !important;
  }

  .twp-pill span {
    width: 74px !important;
    height: 15px !important;
  }

  .twp-bottom-row {
    min-height: 72px !important;
    margin-top: 14px !important;
    padding: 0 14px !important;
  }

  .twp-control-hint {
    max-width: 65% !important;
    font-size: 8px !important;
    line-height: 1.35 !important;
  }

  .twp-sound-toggle {
    min-height: 52px !important;
    padding: 8px 12px !important;
  }

  .twp-speaker i {
    width: 4px !important;
    height: 36px !important;
  }

  .twp-mfre-footer {
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto !important;
  }

  .twp-return-safe-zone {
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto !important;
    padding: 40px 12px max(18px, env(safe-area-inset-bottom)) !important;
    background: #210609 !important;
  }

  .twp-return-safe-zone .twp-site-nav--bottom {
    width: min(94%, 700px) !important;
    max-width: 700px !important;
    margin: 0 auto !important;
  }

  .twp-return-safe-zone .twp-real-estate-return {
    width: 100% !important;
    min-height: 72px !important;
    font-size: 18px !important;
  }
}

/* Very small phones still need the giant controls but with less collision risk. */
@media (max-width: 380px) {
  .timewaster-pro {
    width: 118vw !important;
    width: 118dvw !important;
  }

  .twp-controls {
    grid-template-columns: 37% 24% 37% !important;
  }

  .twp-action-cluster {
    width: 44vw !important;
    width: 44dvw !important;
    height: 39vw !important;
    height: 39dvw !important;
    min-height: 150px !important;
  }

  .twp-action {
    width: 24vw !important;
    width: 24dvw !important;
    height: 24vw !important;
    height: 24dvw !important;
    min-width: 88px !important;
    min-height: 88px !important;
  }

  .twp-pill {
    min-width: 78px !important;
    min-height: 68px !important;
  }
}


/* =========================================================
   D-PAD +50%, START/RESET +100%, START/RESET TEXT +200%,
   SCREEN +20% TALLER
   Final override.
   ========================================================= */

/* Make the D-pad buttons themselves around 50% larger by
   increasing each arm from ~34% to ~51% of the D-pad area. */
.twp-key {
  width: 51% !important;
  height: 51% !important;
}

.twp-up {
  left: 24.5% !important;
}

.twp-left {
  top: 24.5% !important;
}

.twp-right {
  top: 24.5% !important;
}

.twp-down {
  left: 24.5% !important;
}

.twp-dpad-center {
  top: 24.5% !important;
  left: 24.5% !important;
  width: 51% !important;
  height: 51% !important;
}

/* Stack RESET and START vertically so they can become much bigger
   without crushing the neighboring controls. */
.twp-system-buttons {
  flex-direction: column !important;
  align-items: center !important;
  align-self: center !important;
  justify-content: center !important;
  transform: translateY(0) !important;
}

/* Desktop / large screens */
@media (min-width: 901px) {
  .timewaster-pro {
    width: min(98vw, 1260px) !important;
    max-width: 1260px !important;
  }

  .twp-screen-bezel {
    padding-bottom: 28px !important;
  }

  .twp-controls {
    grid-template-columns: minmax(250px, 1fr) 260px minmax(230px, 1fr) !important;
    gap: 34px !important;
  }

  .twp-dpad {
    width: 250px !important;
    max-width: 250px !important;
  }

  .twp-key {
    min-width: 74px !important;
    min-height: 74px !important;
    font-size: 24px !important;
  }

  /* START/RESET about 100% larger than the previous 96x78 feel. */
  .twp-pill {
    min-width: 180px !important;
    min-height: 130px !important;
    padding: 10px 8px !important;
    gap: 10px !important;
    font-size: 30px !important; /* ~200% bigger than early small label sizes */
    line-height: 1 !important;
  }

  .twp-pill span {
    width: 120px !important;
    height: 24px !important;
  }

  .twp-system-buttons {
    gap: 18px !important;
  }

  /* Make the screen feel longer visually. */
  .twp-canvas {
    border-width: 4px !important;
  }
}

/* Mobile / tablet */
@media (max-width: 900px) {
  /*
    Give the oversized handheld even more room so the larger
    D-pad and larger Start/Reset buttons can breathe.
  */
  .timewaster-pro {
    width: 126vw !important;
    width: 126dvw !important;
    padding-bottom: 38px !important;
  }

  .twp-screen-bezel {
    padding-bottom: 12px !important;
  }

  /*
    More middle-column room because Start/Reset are now giant.
  */
  .twp-controls {
    grid-template-columns: 35% 30% 33% !important;
    gap: 1% !important;
    margin-top: 20px !important;
    padding: 0 1.5% !important;
  }

  .twp-dpad {
    width: min(48vw, 250px) !important;
    width: min(48dvw, 250px) !important;
    max-width: 250px !important;
  }

  .twp-key {
    min-width: 74px !important;
    min-height: 74px !important;
    font-size: 24px !important;
  }

  /* Start/Reset 100% bigger and text 200% bigger. */
  .twp-pill {
    min-width: 150px !important;
    min-height: 120px !important;
    padding: 10px 8px !important;
    gap: 10px !important;
    font-size: 26px !important;
    line-height: 1 !important;
    letter-spacing: 0.04em !important;
  }

  .twp-pill span {
    width: 108px !important;
    height: 22px !important;
  }

  .twp-system-buttons {
    gap: 16px !important;
  }

  /* Keep the longer screen feeling prominent. */
  .twp-canvas {
    border-width: 4px !important;
  }

  .twp-game-label {
    margin-top: 12px !important;
  }
}

/* Small phones: still giant, but slightly narrower to reduce collisions */
@media (max-width: 380px) {
  .timewaster-pro {
    width: 122vw !important;
    width: 122dvw !important;
  }

  .twp-controls {
    grid-template-columns: 34% 32% 32% !important;
  }

  .twp-dpad {
    width: min(46vw, 228px) !important;
    width: min(46dvw, 228px) !important;
  }

  .twp-pill {
    min-width: 138px !important;
    min-height: 112px !important;
    font-size: 22px !important;
  }

  .twp-pill span {
    width: 98px !important;
    height: 20px !important;
  }
}


/* =========================================================
   HD-2D DISPLAY TREATMENT
   Pixel-art canvas stays crisp; shell gets deeper LCD lighting.
   ========================================================= */

.twp-screen-bezel {
  background:
    radial-gradient(circle at 52% 10%, rgba(255,255,255,.11), transparent 36%),
    linear-gradient(145deg, #5f6765, #303735 72%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -5px 12px rgba(0,0,0,.28),
    0 7px 16px rgba(0,0,0,.18) !important;
}

.twp-canvas {
  image-rendering: pixelated !important;
  background: #17201c !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.05),
    0 5px 12px rgba(0,0,0,.24),
    inset 0 0 18px rgba(235,240,199,.06) !important;
}

.twp-game-label {
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
}


/* =========================================================
   384x384 REBUILD — FINAL SHELL + CONTROL OVERRIDE
   ========================================================= */

/* ---------- MUCH LARGER SHELL TEXT ---------- */
.twp-system-name {
  font-size: clamp(26px, 4.8vw, 40px) !important;
  line-height: 1 !important;
  letter-spacing: .03em !important;
}

.twp-system-subtitle {
  font-size: clamp(13px, 2.2vw, 20px) !important;
  line-height: 1.1 !important;
}

.twp-power {
  font-size: clamp(12px, 2vw, 18px) !important;
  gap: 7px !important;
}

.twp-power-light {
  width: 12px !important;
  height: 12px !important;
}

.twp-screen-labels {
  min-height: 24px !important;
  font-size: clamp(12px, 2vw, 18px) !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
}

.twp-game-label {
  min-height: 56px !important;
  margin-top: 14px !important;
  gap: 12px !important;
}

.twp-game-label span {
  font-size: clamp(26px, 4.5vw, 38px) !important;
  line-height: 1 !important;
}

.twp-game-label small {
  font-size: clamp(13px, 2.2vw, 20px) !important;
  line-height: 1.1 !important;
}

.twp-control-hint {
  font-size: clamp(11px, 1.9vw, 17px) !important;
  line-height: 1.4 !important;
  font-weight: 900 !important;
  gap: 5px !important;
}

.twp-sound-toggle {
  font-size: clamp(12px, 2vw, 18px) !important;
  font-weight: 900 !important;
}

.twp-sound-icon {
  font-size: 1.45em !important;
}

.twp-desktop-legend {
  font-size: 13px !important;
}

.twp-desktop-legend strong {
  font-size: 14px !important;
}

/* ---------- PROPER D-PAD CROSS ---------- */
/*
  The previous version enlarged each arm independently to 51%,
  which caused the pieces to overlap.  This version restores a
  proper 3x3 cross and enlarges the entire D-pad instead.
*/
.twp-dpad {
  aspect-ratio: 1 / 1 !important;
}

.twp-key {
  width: 34% !important;
  height: 34% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  font-size: clamp(22px, 5vw, 40px) !important;
  border-width: 2px !important;
}

.twp-up {
  top: 0 !important;
  left: 33% !important;
}

.twp-left {
  top: 33% !important;
  left: 0 !important;
}

.twp-right {
  top: 33% !important;
  right: 0 !important;
}

.twp-down {
  bottom: 0 !important;
  left: 33% !important;
}

.twp-dpad-center {
  top: 33% !important;
  left: 33% !important;
  width: 34% !important;
  height: 34% !important;
}

/* ---------- DESKTOP ---------- */
@media (min-width: 901px) {
  .timewaster-pro {
    width: min(98vw, 1320px) !important;
    max-width: 1320px !important;
    padding: 26px 30px 48px !important;
  }

  .twp-brand-row {
    min-height: 58px !important;
    margin-bottom: 14px !important;
  }

  .twp-screen-bezel {
    padding: 22px 24px 28px !important;
  }

  .twp-controls {
    grid-template-columns: minmax(390px, 1fr) 240px minmax(280px, 1fr) !important;
    gap: 30px !important;
    margin-top: 34px !important;
    align-items: center !important;
  }

  /* 50% larger than the prior ~250px D-pad. */
  .twp-dpad {
    width: 375px !important;
    max-width: 375px !important;
  }

  .twp-system-buttons {
    gap: 22px !important;
  }

  .twp-pill {
    min-width: 190px !important;
    min-height: 132px !important;
    font-size: 30px !important;
  }

  .twp-pill span {
    width: 128px !important;
    height: 24px !important;
  }

  .twp-action-cluster {
    width: 300px !important;
    height: 240px !important;
  }

  .twp-action {
    width: 136px !important;
    height: 136px !important;
    min-width: 136px !important;
    min-height: 136px !important;
    font-size: 40px !important;
  }

  .twp-bottom-row {
    min-height: 92px !important;
    margin-top: 22px !important;
  }
}

/* ---------- MOBILE / TABLET ---------- */
@media (max-width: 900px) {
  .timewaster-pro {
    width: 132vw !important;
    width: 132dvw !important;
    max-width: none !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    padding: 8px 5px 44px !important;
  }

  .twp-brand-row {
    min-height: 56px !important;
    margin: 0 12px 10px !important;
  }

  .twp-system-name {
    font-size: 31px !important;
  }

  .twp-system-subtitle {
    font-size: 15px !important;
  }

  .twp-power {
    font-size: 14px !important;
  }

  .twp-screen-labels {
    font-size: 13px !important;
    min-height: 25px !important;
  }

  .twp-screen-bezel {
    padding: 8px 2px 14px !important;
  }

  .twp-game-label {
    min-height: 60px !important;
    margin: 16px 14px 8px !important;
  }

  .twp-game-label span {
    font-size: 31px !important;
  }

  .twp-game-label small {
    font-size: 15px !important;
  }

  /*
    Wider left column gives the corrected giant D-pad enough room.
  */
  .twp-controls {
    grid-template-columns: 46% 27% 25% !important;
    gap: 1% !important;
    margin-top: 24px !important;
    padding: 0 1.5% !important;
    align-items: center !important;
  }

  /* About 50% larger than the prior 250px max target. */
  .twp-dpad {
    width: min(69vw, 375px) !important;
    width: min(69dvw, 375px) !important;
    max-width: 375px !important;
  }

  .twp-system-buttons {
    gap: 18px !important;
  }

  .twp-pill {
    min-width: 158px !important;
    min-height: 122px !important;
    font-size: 27px !important;
  }

  .twp-pill span {
    width: 112px !important;
    height: 23px !important;
  }

  .twp-action-cluster {
    width: min(46vw, 270px) !important;
    width: min(46dvw, 270px) !important;
    height: min(40vw, 230px) !important;
    height: min(40dvw, 230px) !important;
  }

  .twp-action {
    width: min(27vw, 132px) !important;
    width: min(27dvw, 132px) !important;
    height: min(27vw, 132px) !important;
    height: min(27dvw, 132px) !important;
    min-width: 100px !important;
    min-height: 100px !important;
    font-size: 36px !important;
  }

  .twp-bottom-row {
    min-height: 100px !important;
    margin-top: 20px !important;
    padding: 0 18px !important;
  }

  .twp-control-hint {
    font-size: 13px !important;
    max-width: 67% !important;
  }

  .twp-sound-toggle {
    font-size: 14px !important;
    min-height: 58px !important;
  }
}

@media (max-width: 380px) {
  .timewaster-pro {
    width: 128vw !important;
    width: 128dvw !important;
  }

  .twp-controls {
    grid-template-columns: 44% 29% 25% !important;
  }

  .twp-dpad {
    width: min(66vw, 330px) !important;
    width: min(66dvw, 330px) !important;
  }

  .twp-pill {
    min-width: 144px !important;
    min-height: 112px !important;
    font-size: 24px !important;
  }

  .twp-system-name {
    font-size: 27px !important;
  }

  .twp-game-label span {
    font-size: 27px !important;
  }
}


/* =========================================================
   BOTTOM START / RESET LAYOUT
   Main deck is now D-pad + A/B only.
   ========================================================= */

/* Main physical control deck becomes a two-column layout. */
.twp-controls {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  align-items: center !important;
}

/* D-pad stays left. */
.twp-dpad {
  justify-self: start !important;
}

/* A/B can now come back toward the center instead of being
   pushed to the far edge by the old middle system-button column. */
.twp-action-cluster {
  justify-self: start !important;
}

/* Bottom system row */
.twp-system-buttons--bottom {
  width: 100% !important;
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  transform: none !important;
  box-sizing: border-box !important;
}

/* Keep the old class from inheriting legacy vertical rules. */
.twp-system-buttons:not(.twp-system-buttons--bottom) {
  display: none !important;
}

@media (min-width: 901px) {
  .twp-controls {
    grid-template-columns: minmax(430px, 1.12fr) minmax(330px, .88fr) !important;
    gap: 34px !important;
    padding-left: 34px !important;
    padding-right: 34px !important;
  }

  .twp-action-cluster {
    margin-left: 54px !important;
  }

  .twp-system-buttons--bottom {
    gap: 34px !important;
    margin: 20px auto 6px !important;
    min-height: 150px !important;
  }

  .twp-pill {
    min-width: 190px !important;
    min-height: 132px !important;
  }
}

@media (max-width: 900px) {
  .twp-controls {
    grid-template-columns: 54% 46% !important;
    gap: 0 !important;
    padding: 0 3% !important;
  }

  /* Shift A/B inward so it sits closer to the D-pad and
     feels more like a classic handheld control layout. */
  .twp-action-cluster {
    justify-self: start !important;
    margin-left: -5% !important;
  }

  .twp-system-buttons--bottom {
    gap: 20px !important;
    margin: 18px auto 4px !important;
    min-height: 132px !important;
    padding: 0 6% !important;
  }

  .twp-pill {
    min-width: 158px !important;
    min-height: 122px !important;
  }

  /* Bottom information sits beneath Reset/Start now. */
  .twp-bottom-row {
    margin-top: 8px !important;
  }
}

@media (max-width: 380px) {
  .twp-controls {
    grid-template-columns: 55% 45% !important;
    padding: 0 2% !important;
  }

  .twp-action-cluster {
    margin-left: -8% !important;
  }

  .twp-system-buttons--bottom {
    gap: 14px !important;
    padding: 0 4% !important;
  }

  .twp-pill {
    min-width: 144px !important;
    min-height: 112px !important;
  }
}


/* =========================================================
   POLISH / CENTERING / READABILITY — FINAL OVERRIDE
   ========================================================= */

/*
  Remove the accumulated left/translate centering rules.
  The page/embed container now centers the oversized shell using flex,
  which crops equal amounts from both sides on narrow phones.
*/
html,
body {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
}

.twp-demo-page,
.twp-website-game-wrap {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  overflow-x: hidden !important;
}

.timewaster-pro {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  flex: 0 0 auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.twp-mfre-header,
.twp-mfre-footer,
.twp-return-safe-zone {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Slight shell refinement so the centered silhouette reads cleanly. */
.timewaster-pro {
  background:
    linear-gradient(135deg, rgba(255,255,255,.31), transparent 22%),
    linear-gradient(180deg, #ded9c2 0%, #cbc5ac 58%, #bbb59e 100%) !important;
  box-shadow:
    0 18px 42px rgba(0,0,0,.25),
    inset 0 1px 0 rgba(255,255,255,.68),
    inset 0 -3px 0 rgba(80,76,65,.16) !important;
}

/* Improve readability around the shell without making it busier. */
.twp-system-name,
.twp-game-label span {
  text-shadow: 0 1px 0 rgba(255,255,255,.50) !important;
}

.twp-system-subtitle,
.twp-power,
.twp-screen-labels,
.twp-game-label small,
.twp-control-hint {
  text-shadow: 0 1px 0 rgba(255,255,255,.36) !important;
}

.twp-control-hint span {
  display: inline-block !important;
  padding: 2px 4px !important;
}

/* LCD gets a clear inner frame; pixel art stays crisp. */
.twp-canvas {
  image-rendering: pixelated !important;
  image-rendering: crisp-edges !important;
  box-shadow:
    0 0 0 2px rgba(17,22,19,.30),
    0 6px 14px rgba(0,0,0,.24),
    inset 0 0 20px rgba(235,240,199,.05) !important;
}

/* Keep bottom system controls perfectly centered on the shell. */
.twp-system-buttons--bottom {
  align-self: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Desktop: centered and contained. */
@media (min-width: 901px) {
  .timewaster-pro {
    width: min(96vw, 1320px) !important;
    max-width: 1320px !important;
  }

  .twp-mfre-header,
  .twp-mfre-footer,
  .twp-return-safe-zone {
    width: min(96vw, 1320px) !important;
    max-width: 1320px !important;
  }
}

/* Mobile: still intentionally oversized, but centered by the flex parent. */
@media (max-width: 900px) {
  .timewaster-pro {
    width: 132vw !important;
    width: 132dvw !important;
    max-width: none !important;
  }

  .twp-mfre-header,
  .twp-mfre-footer,
  .twp-return-safe-zone {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 380px) {
  .timewaster-pro {
    width: 128vw !important;
    width: 128dvw !important;
  }
}


/* =========================================================
   CLASSIC GAME BOY LCD + MORE REALISTIC D-PAD
   ========================================================= */

/* Make the screen bezel/readout feel more like classic handheld green LCD. */
.twp-screen-bezel {
  background:
    radial-gradient(circle at 50% 18%, rgba(222,235,177,.12), transparent 34%),
    linear-gradient(145deg, #61675f, #353b36 72%) !important;
}

.twp-canvas {
  background: #91a067 !important;
}

/* Softer, more realistic molded-plastic D-pad. */
.twp-dpad {
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.22));
}

.twp-key {
  border-radius: 11px !important;
  border: 1px solid #1a1b1a !important;
  background:
    linear-gradient(180deg, #5d5f5b 0%, #434440 44%, #2d2e2c 100%) !important;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.16),
    inset 0 -4px 0 rgba(0,0,0,.28),
    0 3px 6px rgba(0,0,0,.18) !important;
  color: #d9ddd7 !important;
  text-shadow: 0 1px 0 rgba(0,0,0,.45) !important;
}

.twp-up {
  border-radius: 14px 14px 8px 8px !important;
}

.twp-down {
  border-radius: 8px 8px 14px 14px !important;
}

.twp-left {
  border-radius: 14px 8px 8px 14px !important;
}

.twp-right {
  border-radius: 8px 14px 14px 8px !important;
}

.twp-key::before {
  content: "" !important;
  position: absolute !important;
  left: 16% !important;
  top: 12% !important;
  width: 68% !important;
  height: 26% !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.08) !important;
  pointer-events: none !important;
}

.twp-dpad-center {
  border-radius: 10px !important;
  border: 1px solid #181918 !important;
  background:
    radial-gradient(circle at 50% 35%, #565854 0%, #3b3c38 55%, #282926 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    inset 0 -3px 0 rgba(0,0,0,.26) !important;
}

.twp-dpad-center::after {
  width: 38% !important;
  height: 38% !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.08) !important;
}

/* Pressed state still tactile but less harsh. */
.twp-key:active,
.twp-key.twp-pressed {
  transform: translateY(1px) scale(.985) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -2px 0 rgba(0,0,0,.32),
    0 2px 4px rgba(0,0,0,.16) !important;
}

.twp-dpad .twp-key:focus-visible {
  outline: 2px solid rgba(230, 240, 180, .9) !important;
  outline-offset: 2px !important;
}


/* =========================================================
   DESKTOP VIEWPORT FIT
   Mobile sizing is intentionally left unchanged.
   ========================================================= */
@media (min-width: 901px) {
  /*
    Start from a sensible desktop design width. JavaScript then applies
    one uniform zoom value only when viewport height/width require it.
  */
  .timewaster-pro {
    width: min(94vw, 1100px) !important;
    max-width: 1100px !important;
    flex-shrink: 0 !important;
  }

  .twp-demo-page,
  .twp-website-game-wrap {
    overflow-x: hidden !important;
  }
}
