/* Sierra-style chrome around a 320x200 canvas, scaled with hard pixels. */
:root {
  --pink: #fc54a8;
  --cyan: #54fcfc;
  --ink: #000;
  --paper: #fcfcfc;
  --night: #1c1038;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--night); color: var(--paper); }
body { font: 16px/1.35 "Courier New", ui-monospace, monospace; }

#app { width: min(100vw, 960px); margin: 0 auto; padding: 8px; }

#topbar {
  display: flex; justify-content: space-between; gap: 12px;
  background: var(--paper); color: var(--ink);
  padding: 2px 8px; font-weight: bold;
}
#score.flash { background: var(--pink); color: var(--paper); }

#stage { position: relative; line-height: 0; }
#screen {
  width: 100%; aspect-ratio: 320 / 200; display: block;
  image-rendering: pixelated; image-rendering: crisp-edges;
  background: #000; cursor: crosshair; outline: none;
}

#hint { min-height: 1.4em; padding: 2px 8px; color: var(--cyan); background: #000; }
#preview-note { margin: 0 0 6px; padding: 4px 8px; background: #fcfc54; color: var(--ink); font-weight: bold; }
#message {
  min-height: 4.2em; padding: 6px 8px;
  background: var(--paper); color: var(--ink);
  border: 3px solid var(--pink);
}

#verbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 8px; }
#system { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
button, select, textarea, input {
  font: inherit; color: var(--ink); background: #a8a8a8;
  border: 3px solid; border-color: #fcfcfc #545454 #545454 #fcfcfc;
  padding: 6px 8px; border-radius: 0;
  min-height: 44px; /* comfortable for a thumb */
  touch-action: manipulation; /* no double-tap zoom delay */
}
#screen { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button, a.button { cursor: pointer; }
a.button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 6px 8px; text-decoration: none;
  font: inherit; color: var(--ink); background: #a8a8a8; border: 3px solid; border-color: #fcfcfc #545454 #545454 #fcfcfc;
}
button:active, button.active { border-color: #545454 #fcfcfc #fcfcfc #545454; background: var(--pink); color: var(--paper); }
button:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--cyan); }
#system { font-size: 14px; }
#system label { margin-left: auto; }

#inventory {
  position: absolute; left: 10%; right: 10%; top: 12%;
  background: var(--paper); color: var(--ink); border: 3px solid var(--pink);
  padding: 8px; line-height: 1.35; max-height: 76%; overflow: auto;
}
#inventory h3 { margin: 6px 0 4px; font-size: 14px; }
.inv-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  margin: 3px 0; text-align: left;
}
.inv-item canvas { width: 36px; height: 36px; image-rendering: pixelated; background: #1c1038; flex: none; }
.inv-item.held { background: var(--pink); color: var(--paper); }
.inv-item.souvenir { opacity: 0.6; cursor: default; }

.panel { margin-top: 12px; padding: 8px 12px; background: #000; border: 3px solid var(--cyan); }
.panel h2 { margin: 4px 0; color: var(--pink); font-size: 18px; }
.panel h3 { margin: 12px 0 4px; font-size: 15px; color: var(--cyan); }
#build textarea { width: 100%; margin: 6px 0; }
#build-why { margin: 8px 0; padding: 6px 8px; background: #fcfc54; color: var(--ink); font-weight: bold; }
#build-result ul { padding-left: 20px; margin: 6px 0; }
#build-result .blueprint { display: block; width: min(100%, 320px); margin: 8px 0 4px; border: 3px solid var(--cyan); image-rendering: pixelated; }
#build-result .ok { color: #a8fc54; }
#build-result .bad { color: #fcb0d4; }
#account { margin: 6px 0; font-size: 14px; }
#account input { width: 12em; }

/* Phones in portrait: two rows of big verb buttons, tighter chrome. */
@media (max-width: 600px) {
  body { font-size: 15px; }
  #app { padding: 4px; }
  #topbar { font-size: 13px; padding: 2px 4px; }
  #title .story { display: none; }
  #verbs { grid-template-columns: repeat(3, 1fr); }
  #verbs button { min-height: 48px; }
  #system { font-size: 13px; }
  #system label { margin-left: 0; }
  #inventory { left: 3%; right: 3%; top: 6%; max-height: 88%; }
  #message { min-height: 6.5em; }
}

#directory-list { list-style: none; padding: 0; margin: 6px 0; }
#directory-list li { display: flex; align-items: center; gap: 8px; margin: 6px 0; }

/* Rate / report strip in trial-wing rooms. */
#roombar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 6px 8px; background: #000; border-bottom: 2px solid var(--pink); font-size: 14px; }
#roombar .stars, #roombar .report { display: flex; align-items: center; gap: 4px; }
#roombar .stars button { min-width: 44px; color: #fcfc54; background: #5c1880; font-size: 20px; }
#roombar .avg { color: #fcfc54; }

/* ---- Career page: dark purple ground, neon pink and cyan, chunky edges ---- */
.career .note { color: var(--cyan); margin: 10px 2px; }
.career #account { margin: 8px 2px; }
.card { margin-top: 12px; padding: 10px 12px; background: #2c1850; border: 3px solid var(--pink); box-shadow: 6px 6px 0 #000; }
.card h2 { margin: 2px 0 8px; font-size: 18px; color: var(--pink); text-shadow: 2px 2px 0 #000; }
.meter { height: 22px; background: #000; border: 3px solid var(--cyan); }
.meter > div { height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--pink) 0 10px, #c82888 10px 12px); }
.meter.small { height: 14px; margin-top: 10px; border-color: var(--pink); }
.meter.small > div { background: var(--cyan); }
#levels, #badges { list-style: none; padding: 0; margin: 0; }
#levels li { padding: 8px; margin: 6px 0; border-left: 6px solid #5c1880; background: #1c1038; }
#levels li.done { border-left-color: var(--cyan); }
#levels li.here { border-left-color: var(--pink); outline: 2px solid var(--pink); }
#levels small, #badges small { color: #a8a8a8; }
.tag { margin-left: 8px; padding: 0 6px; background: var(--pink); color: #000; font-size: 12px; font-weight: bold; }
#badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
#badges li { display: flex; gap: 10px; align-items: flex-start; padding: 8px; background: #1c1038; border: 2px solid #5c1880; }
#badges li.earned { border-color: var(--cyan); }
#badges li.earned strong { color: var(--cyan); }
#badges li.locked { opacity: 0.55; }
#badges li.locked canvas { filter: grayscale(1); }
#badges canvas { width: 48px; height: 48px; flex: none; image-rendering: pixelated; background: #000; border: 2px solid var(--pink); }

/* The Build button is the game's invitation: it may shout a little. */
#btn-build {
  background: #fcfc54; font-weight: bold; padding: 6px 14px;
  border-color: #fcfcfc #a85400 #a85400 #fcfcfc;
  box-shadow: 0 0 0 2px var(--pink);
  animation: build-glow 1.6s ease-in-out infinite;
}
#btn-build::before { content: "\2692\FE0E  "; }
#btn-build:active { background: var(--pink); color: var(--paper); }
@keyframes build-glow {
  0%, 100% { box-shadow: 0 0 0 2px var(--pink); }
  50% { box-shadow: 0 0 0 2px var(--pink), 0 0 10px 3px var(--pink); }
}
@media (prefers-reduced-motion: reduce) { #btn-build { animation: none; } }

/* A class that sets display must not undo the hidden attribute. */
[hidden] { display: none !important; }

/* The elevator's button panel: one brass button per official room. */
#elevator-floors { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; }
#elevator-floors li { display: flex; align-items: center; gap: 12px; }
button.floor {
  flex: none; width: 48px; height: 48px; min-height: 48px; padding: 0; border-radius: 50%;
  background: #fcd454; border: 4px solid; border-color: #fcfcb0 #a85400 #a85400 #fcfcb0; font-weight: bold; font-size: 18px;
}
button.floor:active { background: var(--pink); color: var(--paper); border-color: #a85400 #fcfcb0 #fcfcb0 #a85400; }

/* The privacy page and the small link to it under the game. */
#legal { margin: 10px 2px 0; font-size: 13px; text-align: right; }
#legal a, .legal a:not(.button) { color: var(--cyan); }
.legal .card { margin-top: 12px; padding: 4px 14px 12px; background: #000; border: 3px solid var(--cyan); line-height: 1.45; }
.legal h2 { color: var(--pink); font-size: 20px; margin: 12px 0 6px; }
.legal h3 { color: var(--cyan); font-size: 16px; margin: 16px 0 4px; }
.legal p, .legal ul { margin: 6px 0; }
.legal ul { padding-left: 22px; }
