/* Roastie's Rec Room — paper edition.
   Matches the main roastie.co look: cream paper, hard ink borders, offset
   shadows, halftone dots, Arial Narrow display + Georgia body. The games
   inside the cabinets stay dark — a lit arcade screen in a daylight room.
   The old neon CRT skin is preserved at arcade.css.bak-neon. */

:root {
  --ink: #17130f;
  --paper: #f2e7cf;
  --paper-light: #fffaf0;
  --paper-dark: #d9c49d;
  --pink: #f45bab;
  --pink-dark: #cf347f;
  --orange: #f58b3a;
  --bean: #b87549;
  --green: #51b96b;
  --shadow: 9px 9px 0 var(--ink);
  --border: 3px solid var(--ink);
  --display: "Arial Narrow", "Franklin Gothic Medium", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; padding: 0; }

body {
  min-width: 320px;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(23, 19, 15, 0.12) 0.7px, transparent 0.7px);
  background-size: 8px 8px;
  font-family: var(--display);
  line-height: 1.4;
}

a { color: var(--pink-dark); }

button { font: inherit; color: inherit; }

button:focus-visible,
a:focus-visible {
  outline: 4px solid var(--orange);
  outline-offset: 3px;
}

/* ---------- marquee (arcade floor header) ---------- */

.marquee {
  padding: clamp(26px, 5vw, 54px) clamp(20px, 4vw, 58px) clamp(20px, 3vw, 34px);
  border-bottom: var(--border);
  background: var(--paper-light);
}

.sign {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: center;
  justify-content: space-between;
}

.sign h1 {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 0;
  font-size: clamp(2.1rem, 6vw, 4.6rem);
  font-weight: 950;
  letter-spacing: -0.06em;
  line-height: 0.9;
  text-transform: uppercase;
}

.sign .bean {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: clamp(52px, 7vw, 74px);
  height: clamp(52px, 7vw, 74px);
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 4px 4px 0 var(--ink);
}

.sign .bean img {
  width: 72%;
  height: 72%;
}

.sub {
  max-width: 640px;
  margin: 16px 0 0;
  font-family: var(--serif);
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  font-style: italic;
}

.ticker {
  display: inline-block;
  margin: 0;
  max-width: 420px;
  padding: 7px 12px 6px;
  border: 2px solid var(--ink);
  background: var(--orange);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transform: rotate(-1.5deg);
}

.ticker:empty { display: none; }

/* ---------- dev bar ---------- */

.devbar {
  padding: 10px clamp(20px, 4vw, 58px);
  border-bottom: 2px solid var(--ink);
  background: var(--paper-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.devbar a { color: var(--ink); }

.badge {
  display: inline-block;
  padding: 2px 7px 1px;
  border: 1.5px solid var(--ink);
  font-size: 0.6rem;
  font-weight: 950;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.badge.ready  { background: var(--green); }
.badge.polish { background: var(--orange); }
.badge.wip    { background: var(--pink-dark); color: white; }
.badge.parked { background: var(--paper-dark); }

/* ---------- filters ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 22px clamp(20px, 4vw, 58px) 4px;
}

.chip {
  padding: 8px 13px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: white;
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.chip:hover { background: var(--orange); }

.chip.on {
  background: var(--ink);
  color: white;
}

.lastplayed {
  margin: 14px clamp(20px, 4vw, 58px) 0;
  font-family: var(--serif);
  font-size: 0.9rem;
  font-style: italic;
}

.lastplayed a {
  font-family: var(--display);
  font-style: normal;
  font-weight: 900;
}

/* ---------- the floor ---------- */

.floor {
  padding: 22px clamp(20px, 4vw, 58px) clamp(48px, 7vw, 84px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: clamp(18px, 2.6vw, 30px);
}

.cab {
  position: relative;
  display: flex;
  flex-direction: column;
  border: var(--border);
  background: var(--paper-light);
  box-shadow: 7px 7px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.cab:hover {
  transform: translate(-2px, -2px);
  box-shadow: 10px 10px 0 var(--ink);
}

.cabtag {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: -7px;
  padding: 4px 8px 3px;
  border: 1.5px solid var(--ink);
  background: var(--orange);
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 0.56rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: rotate(3deg);
}

/* The one dark element on the page, on purpose: the cabinet's screen. */
.screen {
  display: grid;
  place-items: center;
  height: 128px;
  border-bottom: var(--border);
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 250, 240, 0.05) 0 1px,
      transparent 1px 3px
    ),
    radial-gradient(ellipse at 50% 42%, #35281f 0%, var(--ink) 78%);
  font-size: 52px;
  line-height: 1;
  text-decoration: none;
}

.cab:hover .screen { font-size: 58px; }

.body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  padding: 15px 16px 16px;
}

.body h3 {
  margin: 0;
  font-size: 1.32rem;
  font-weight: 950;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: uppercase;
}

.tagline {
  margin: 0;
  font-family: var(--serif);
  font-size: 0.87rem;
  line-height: 1.45;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin: 0;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #594f45;
  text-transform: uppercase;
}

.devrow { display: flex; gap: 6px; }

.cab details {
  font-size: 0.74rem;
}

.cab details summary {
  font-weight: 800;
  cursor: pointer;
}

.cab details ul {
  margin: 6px 0 0;
  padding-left: 18px;
  font-family: var(--serif);
}

.playbtn {
  display: block;
  margin-top: auto;
  padding: 11px 0 10px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: white;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-align: center;
  text-decoration: none;
}

.playbtn:hover { background: var(--pink-dark); }

.playerror {
  max-width: 520px;
  margin: 40px auto;
  padding: 22px 26px;
  border: var(--border);
  background: var(--orange);
  box-shadow: 6px 6px 0 var(--ink);
  font-weight: 900;
  text-align: center;
}

.playerror a { color: var(--ink); }

/* ---------- footer ---------- */

.footer {
  padding: 24px clamp(20px, 4vw, 58px);
  border-top: var(--border);
  background: var(--ink);
  color: var(--paper-light);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer a { color: var(--pink); }

.footer code {
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: none;
}

/* ---------- play page ---------- */

.playwrap {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

.playbar {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 8px clamp(12px, 2.5vw, 24px);
  border-bottom: var(--border);
  background: var(--paper-light);
}

.playbar .back {
  padding: 7px 11px 6px;
  border: 2px solid var(--ink);
  background: var(--pink);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
}

.playbar .back:hover { background: var(--orange); }

.gametitle {
  flex: 1;
  overflow: hidden;
  font-size: 1.02rem;
  font-weight: 950;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.actions button,
.actions .abtn {
  padding: 7px 11px 6px;
  border: 2px solid var(--ink);
  background: white;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
}

.actions button:hover,
.actions .abtn:hover {
  background: var(--ink);
  color: white;
}

#gameframe {
  flex: 1;
  width: 100%;
  border: 0;
  background: #000;
}

/* ---------- small screens ---------- */

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }

  .playbar { flex-wrap: wrap; }

  .gametitle { order: 3; flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .cab, .cab:hover {
    transition: none;
    transform: none;
  }
}
