/* MOST LIKELY — cozy visuals, mechanical heart */

:root {
  --cream: #f6efe3;
  --paper: #fffaf0;
  --wood: #b98a5e;
  --wood-dark: #8a6242;
  --ink: #3d3229;
  --accent: #e07a4f;
  --accent-2: #7aa974;
  --belt: #5c5350;
  --night: #201d2b;
  --night-2: #2b2740;
  --glow: #ffd98a;
  --mono: "SF Mono", "Cascadia Code", Consolas, monospace;
}

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

html, body {
  height: 100%;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  overflow: hidden;
}

button { font-family: inherit; cursor: pointer; }

.mono { font-family: var(--mono); }
.hidden { display: none !important; }

/* ---------- HUD ---------- */
#hud {
  position: fixed;
  top: 10px; right: 14px;
  z-index: 50;
  display: flex; gap: 10px; align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(32, 29, 43, 0.42);
  border-radius: 999px;
  padding: 6px 12px;
}
#btn-mute {
  background: none; border: none; font-size: 20px; line-height: 1;
}

/* ---------- screens ---------- */
.screen {
  position: fixed; inset: 0;
  display: none;
  overflow: hidden;
}
.screen.active { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.screen.dark { background: var(--night); color: #eee6da; }
.screen.dark ~ #hud { color: #eee; }
.screen.black { background: #000; color: #d8d2c6; }

/* ---------- title ---------- */
#screen-title { background:
  radial-gradient(circle at 30% 20%, #fdf6e5 0%, var(--cream) 60%); }
.title-wrap { text-align: center; }
.title-wrap h1 {
  font-size: clamp(48px, 9vw, 96px);
  letter-spacing: 0.12em;
  color: var(--ink);
  text-shadow: 3px 3px 0 rgba(224, 122, 79, 0.25);
}
.subtitle { margin: 14px 0 40px; font-size: 18px; opacity: 0.75; }
.tiny { margin-top: 26px; font-size: 12px; opacity: 0.5; }

.big-btn {
  font-size: 20px;
  letter-spacing: 0.1em;
  padding: 14px 44px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 0 rgba(138, 98, 66, 0.55);
  transition: transform 0.08s, box-shadow 0.08s;
}
.big-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(138, 98, 66, 0.55); }

/* ---------- opening / closing grid ---------- */
.grid-caption {
  position: absolute;
  top: 16%;
  left: 0; right: 0;
  text-align: center;
  z-index: 6;
  font-family: var(--mono);
  font-size: 15px;
  color: #cfc4ae;
  min-height: 20px;
  transition: opacity 0.7s;
}
.grid-caption { transition: opacity 0.7s, color 2.5s; }
.grid-caption.over-room { color: var(--ink); }
.grid-caption.gone { opacity: 0; }
.typing::after {
  content: '▌';
  margin-left: 2px;
  animation: cursorblink 0.8s steps(1) infinite;
}
@keyframes cursorblink {
  0%, 60% { opacity: 1; }
  61%, 100% { opacity: 0; }
}
.grid-rooms {
  display: grid;
  grid-template-columns: repeat(12, 44px);
  grid-auto-rows: 34px;
  gap: 10px;
  transition: transform 4.6s cubic-bezier(0.55, 0.05, 0.8, 0.9);
}
.phase-title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 7;
  font-family: var(--mono);
  font-size: clamp(22px, 4vw, 36px);
  letter-spacing: 0.28em;
  color: var(--ink);
  opacity: 0;
  transition: opacity 1s;
}
.phase-title.show { opacity: 1; }
.room {
  border-radius: 5px;
  background: #17141f;
  box-shadow: inset 0 0 0 2px #2c2838;
  transition: background 0.5s, box-shadow 0.5s;
}
.room.lit {
  background: linear-gradient(180deg, #ffe9b3, #f4b96a);
  box-shadow: 0 0 12px rgba(255, 217, 138, 0.35);
}
.room.you { outline: 3px solid var(--accent-2); outline-offset: 3px; }

/* ---------- Era 1 ---------- */
#screen-era1 {
  background: linear-gradient(180deg, #efe3cf 0%, var(--cream) 40%);
  justify-content: flex-start;
  padding-top: 46px;
}
.era1-top {
  width: min(760px, 94vw);
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 10px;
}
.round-label { font-family: var(--mono); font-size: 13px; letter-spacing: 0.15em; opacity: 0.7; white-space: nowrap; }
.timerbar {
  flex: 1; height: 10px;
  background: rgba(61, 50, 41, 0.12);
  border-radius: 999px; overflow: hidden;
}
.timerbar.small { width: 130px; flex: none; height: 8px; background: rgba(255,255,255,0.15); }
.era1-top-spacer { flex: 1; }
.clock {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #ff4b3e;
  background: #4a4744;
  border-radius: 8px;
  padding: 4px 14px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.35);
  text-shadow: 0 0 6px rgba(255, 75, 62, 0.6);
}
.skip-btn {
  font-size: 20px;
  line-height: 1;
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  background: #4a4744;
  color: #f0ede8;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.25);
  transition: transform 0.08s, box-shadow 0.08s, opacity 0.2s;
}
.skip-btn:active { transform: translateY(2px); }
.skip-btn:disabled {
  opacity: 0.35;
  cursor: default;
  box-shadow: none;
  transform: none;
}
.box-slot {
  display: inline-block;
  width: 74px;
  height: 18px;
  border-radius: 5px;
  background: rgba(61, 50, 41, 0.08);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
}
.timer-fill {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--accent-2), #a7c66d);
  border-radius: 999px;
}

#belt-wrap {
  width: min(760px, 94vw);
  display: flex; align-items: stretch;
  height: 86px;
  margin-bottom: 18px;
}
#hatch {
  width: 64px;
  display: flex; align-items: center; justify-content: center;
  background: var(--wood-dark);
  color: #2e2019;
  font-size: 34px;
  border-radius: 12px 0 0 12px;
  box-shadow: inset -6px 0 10px rgba(0,0,0,0.25);
}
#belt {
  flex: 1;
  position: relative;
  background: repeating-linear-gradient(90deg,
    var(--belt) 0 34px, #6a605c 34px 38px);
  border-top: 6px solid var(--wood);
  border-bottom: 6px solid var(--wood);
  overflow: visible;
  animation: beltroll 1.1s linear infinite;
}
#belt.paused { animation-play-state: paused; }
@keyframes beltroll {
  from { background-position-x: 0; }
  to { background-position-x: 38px; }
}
#belt-surface { position: absolute; inset: 0; }
#belt-end {
  width: 26px;
  background: linear-gradient(90deg, rgba(0,0,0,0.18), transparent);
  border-radius: 0 12px 12px 0;
}

.belt-obj {
  position: absolute;
  top: 8px; left: -60px;
  font-size: 44px;
  line-height: 1;
  cursor: grab;
  user-select: none;
  touch-action: none;
  filter: drop-shadow(0 4px 3px rgba(0,0,0,0.3));
}
.belt-obj.dragging {
  cursor: grabbing;
  z-index: 40;
  pointer-events: none;
  filter: drop-shadow(0 10px 8px rgba(0,0,0,0.35));
}
/* word tags: the snippet's own words riding the belt as paper tickets */
.belt-obj.word {
  top: 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--ink);
  background: var(--paper);
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid rgba(138, 98, 66, 0.5);
  box-shadow: 0 3px 6px rgba(0,0,0,0.28);
  transform: rotate(-2deg);
}

#boxes {
  width: min(760px, 94vw);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 106px;
  align-content: start;
  gap: 12px;
  padding-bottom: 16px;
}
.box {
  background: rgba(255, 250, 240, 0.65);
  border: 2px solid rgba(138, 98, 66, 0.35);
  border-radius: 12px;
  padding: 7px 10px;
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: transform 0.1s, border-color 0.2s, background 0.3s;
}
.box.dim { opacity: 0.35; filter: grayscale(0.6); }
.box-head { display: flex; align-items: center; gap: 7px; }
.box-emoji { font-size: 21px; }
.box-word { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; opacity: 0.8; }
.box-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.chip {
  display: inline-flex; align-items: center; gap: 1px;
  font-size: 18px; line-height: 1;
}
.chip-w {
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(138, 98, 66, 0.4);
  border-radius: 4px;
  padding: 3px 5px;
}
.chip-count {
  font-family: var(--mono);
  font-size: 9px; font-weight: 700;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 5px;
  padding: 1px 3px;
  transform: translateY(-4px);
}
.chip.ghost { opacity: 0.5; }
.chip.ghost .chip-e { filter: saturate(0.75); }
.chip.pop { animation: chippop 0.3s ease-out; }
.chip.bump .chip-e { animation: chipbump 0.3s ease-out; }
@keyframes chippop {
  0% { transform: scale(0.2); }
  70% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
@keyframes chipbump {
  0% { transform: scale(1); }
  40% { transform: scale(1.4); }
  100% { transform: scale(1); }
}
.box.glow { border-color: var(--accent-2); background: rgba(167, 198, 109, 0.22); }

#toast {
  position: fixed;
  bottom: 26px; left: 50%;
  transform: translate(-50%, 80px);
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 999px;
  opacity: 0;
  transition: all 0.35s;
  z-index: 60;
  pointer-events: none;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- popup ---------- */
.modal {
  position: fixed; inset: 0;
  background: rgba(40, 30, 22, 0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 45;
}
.popup-card {
  position: relative;
  width: min(560px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-radius: 6px;
  padding: 34px 30px 26px;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
  transform: rotate(-0.6deg);
}
/* only the image flexes to fit whatever room is left — the title, text,
   source, and SORT button always keep their natural size so the button
   never gets pushed below the fold on a shorter screen */
.popup-card > * { flex: 0 0 auto; }
.popup-tape {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%) rotate(2deg);
  width: 90px; height: 24px;
  background: rgba(224, 122, 79, 0.4);
}
.popup-card h2 {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.28em;
  opacity: 0.6;
  margin-bottom: 16px;
}
.popup-image {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  min-width: 0;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(138, 98, 66, 0.3), 0 6px 16px rgba(0,0,0,0.2);
  margin-bottom: 18px;
  background: var(--cream);
}
#popup-text { margin-bottom: 10px; font-size: 17px; line-height: 1.5; }
#popup-text p { margin: 3px 0; }
#popup-source {
  font-family: var(--mono);
  font-size: 12px;
  font-style: italic;
  opacity: 0.55;
  margin-bottom: 22px;
}

/* ---------- QC ---------- */
#screen-qc { background: linear-gradient(180deg, #7d5a3d, var(--wood-dark)); }
.qc-desk { display: flex; align-items: flex-end; gap: 34px; }
.qc-window {
  width: 150px; height: 190px;
  background: linear-gradient(180deg, #3a3f52, #262a3a);
  border: 8px solid #55402c;
  border-radius: 10px;
  position: relative;
  display: flex; align-items: flex-end; justify-content: center;
  overflow: visible;
}
.qc-super { font-size: 74px; filter: brightness(0.25); }
.qc-verdict {
  position: absolute;
  top: -26px; right: -18px;
  font-size: 40px;
  opacity: 0;
  transform: scale(0.3);
}
.qc-verdict.show { animation: verdictpop 1.2s ease-out; }
@keyframes verdictpop {
  0% { opacity: 0; transform: scale(0.3); }
  15% { opacity: 1; transform: scale(1.2); }
  30% { transform: scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: scale(0.9); }
}
.qc-board {
  width: min(430px, 84vw);
  background: var(--paper);
  border-radius: 10px;
  padding: 22px 26px 28px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  position: relative;
  text-align: center;
}
.qc-title {
  font-family: var(--mono);
  letter-spacing: 0.3em;
  font-size: 13px;
  opacity: 0.65;
}
.qc-lights { display: flex; justify-content: center; gap: 8px; margin: 10px 0 16px; }
.qc-light {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: rgba(61,50,41,0.15);
}
.qc-light.on { background: var(--accent-2); box-shadow: 0 0 8px rgba(122, 169, 116, 0.8); }
.qc-fields { display: flex; gap: 16px; justify-content: center; margin-bottom: 20px; }
.qc-field {
  width: 120px; height: 84px;
  border: 3px dashed rgba(138, 98, 66, 0.5);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px;
  color: rgba(61, 50, 41, 0.55);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.qc-field:hover { background: rgba(224, 122, 79, 0.12); transform: scale(1.03); }
.qc-slip {
  display: inline-block;
  background: #fff;
  border: 1px solid rgba(61,50,41,0.2);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
  padding: 10px 18px;
  font-size: 16px;
  transform: rotate(-1deg);
  transition: transform 0.35s, opacity 0.35s;
  min-height: 20px;
}
.qc-slip.slip-in { animation: slipin 0.35s ease-out; }
@keyframes slipin {
  from { opacity: 0; transform: translateY(14px) rotate(-4deg); }
  to { opacity: 1; transform: translateY(0) rotate(-1deg); }
}
.qc-slip.fly-q { transform: translate(-95px, -95px) scale(0.4) rotate(-8deg); opacity: 0; }
.qc-slip.fly-a { transform: translate(95px, -95px) scale(0.4) rotate(8deg); opacity: 0; }

.stamp-zone { text-align: center; }
.stamp {
  font-family: var(--mono);
  font-size: clamp(20px, 4vw, 34px);
  letter-spacing: 0.15em;
  color: var(--accent-2);
  border: 5px solid var(--accent-2);
  border-radius: 8px;
  padding: 14px 26px;
  margin: 16px;
  transform: scale(3) rotate(-8deg);
  opacity: 0;
  display: inline-block;
}
.stamp.hit { animation: stamphit 0.4s ease-in forwards; }
.stamp-red { color: #c0574f; border-color: #c0574f; }
@keyframes stamphit {
  0% { transform: scale(3) rotate(-8deg); opacity: 0; }
  60% { transform: scale(0.92) rotate(-4deg); opacity: 1; }
  100% { transform: scale(1) rotate(-5deg); opacity: 1; }
}

/* ---------- Era 2 ---------- */
#screen-era2 { background: radial-gradient(circle at 50% 30%, var(--night-2), var(--night) 75%); }
.era2-backdrop {
  position: absolute; inset: 0;
  pointer-events: none;
}
.dusty-belt {
  position: absolute;
  top: 40px; left: 50%;
  transform: translateX(-50%);
  width: min(700px, 90vw);
  height: 40px;
  background: repeating-linear-gradient(90deg, #35313d 0 34px, #3d3947 34px 38px);
  border-top: 5px solid #4a4050;
  border-bottom: 5px solid #4a4050;
  opacity: 0.5;
  border-radius: 6px;
}
.dusty-belt::after {
  content: "no new data";
  position: absolute;
  right: 10px; top: -24px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(238, 230, 218, 0.25);
}
.boards {
  position: absolute;
  left: -8px; top: -12px;
  font-size: 30px;
  color: #6b5a45;
  letter-spacing: -12px;
  text-shadow: 1px 2px 2px rgba(0,0,0,0.5);
}

.era2-desk {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 20px;
  z-index: 2;
}
.chat-window {
  width: min(520px, 92vw);
  height: min(560px, 82vh);
  background: #17151f;
  border-radius: 16px;
  border: 1px solid rgba(255, 217, 138, 0.15);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(255, 217, 138, 0.06);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: rgba(238, 230, 218, 0.55);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
#chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-line;
  animation: bubblein 0.25s ease-out;
}
@keyframes bubblein {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.bubble.them {
  align-self: flex-start;
  background: #2b2837;
  color: #eee6da;
  border-bottom-left-radius: 4px;
}
.bubble.me {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.bubble.big div:last-child { font-size: 22px; margin-top: 6px; letter-spacing: 0.05em; }
.bubble.typing { display: flex; gap: 4px; padding: 14px 16px; }
.typing-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(238, 230, 218, 0.6);
  animation: typingBounce 1.1s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.6; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.chat-input {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 78px;
}
.chat-input-row { display: flex; align-items: center; gap: 10px; }
/* the draft reply: template text with tappable blanks */
.era2-draft {
  display: flex; flex-wrap: wrap; align-items: baseline;
  column-gap: 3px; row-gap: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: #eee6da;
  background: #211e2c;
  border-radius: 10px;
  padding: 10px 12px;
}
.era2-draft.hidden { display: none; }
.draft-text { white-space: pre-wrap; }
.blank {
  min-width: 58px;
  text-align: center;
  font: inherit;
  font-weight: 700;
  color: var(--glow, #ffd98a);
  background: transparent;
  border: none;
  border-bottom: 2px dashed rgba(238, 230, 218, 0.45);
  border-radius: 0;
  padding: 0 6px 1px;
  cursor: pointer;
}
.blank.active {
  border-bottom-color: var(--glow, #ffd98a);
  background: rgba(255, 217, 138, 0.08);
  border-radius: 6px 6px 0 0;
}
.blank.filled { border-bottom-style: solid; }
#era2-options { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  display: flex; flex-direction: column; align-items: center;
  gap: 1px;
  background: #2b2837;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 7px 12px;
  transition: border-color 0.12s, transform 0.1s;
}
.opt-word {
  font-size: 14px;
  font-weight: 600;
  color: #eee6da;
  letter-spacing: 0.02em;
  padding: 8px 14px;
}
.opt:hover { transform: translateY(-2px); }
.opt.sel { border-color: var(--glow); background: #3a3450; }
.opt-dots { color: rgba(238,230,218,0.7); }
.send-btn {
  background: var(--accent-2);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  letter-spacing: 0.12em;
  padding: 12px 18px;
}
.send-btn:disabled { opacity: 0.35; cursor: default; }

.newspaper {
  font-size: 52px;
  cursor: pointer;
  animation: papernudge 2.4s ease-in-out infinite;
  filter: drop-shadow(0 6px 6px rgba(0,0,0,0.5));
}
@keyframes papernudge {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(5deg) translateY(-4px); }
}
.np-card {
  width: min(430px, 90vw);
  background: #f1e9d6;
  color: var(--ink);
  padding: 26px 30px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.np-masthead {
  font-family: Georgia, serif;
  font-size: 15px;
  letter-spacing: 0.3em;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
  margin-bottom: 14px;
}
.np-headline { font-family: Georgia, serif; font-size: 30px; font-weight: 700; margin-bottom: 12px; }
.np-body { font-size: 15px; line-height: 1.5; margin-bottom: 20px; }
.np-seq { font-size: 26px; display: inline-block; margin-top: 8px; }

.glitch-overlay {
  position: absolute; inset: 0;
  z-index: 30;
  background: repeating-linear-gradient(0deg,
    rgba(0,0,0,0.85) 0 3px, rgba(80,70,110,0.6) 3px 5px, rgba(0,0,0,0.9) 5px 9px);
  animation: glitch 0.12s steps(2) infinite;
}
@keyframes glitch {
  from { transform: translateY(0); }
  to { transform: translateY(-4px); }
}

/* ---------- deprecation ---------- */
.deprecated {
  font-family: var(--mono);
  font-size: clamp(16px, 2.6vw, 24px);
  line-height: 2.1;
  text-align: center;
  opacity: 0;
  transition: opacity 1.6s;
}
.deprecated.show { opacity: 1; }

/* ---------- end screen ---------- */
.end-card {
  width: min(560px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  background: #17151f;
  border: 1px solid rgba(255, 217, 138, 0.14);
  border-radius: 16px;
  padding: 30px 34px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.end-head {
  display: flex; justify-content: space-between;
  font-size: 13px;
  letter-spacing: 0.15em;
  color: rgba(238,230,218,0.6);
  margin-bottom: 22px;
}
.end-status { color: #c0574f; }
.end-accuracy { display: flex; gap: 16px; margin-bottom: 24px; }
.acc {
  flex: 1;
  background: #211e2c;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.acc-num { font-family: var(--mono); font-size: 38px; color: var(--glow); }
.acc-label { font-size: 12px; letter-spacing: 0.14em; opacity: 0.6; margin-top: 4px; }
#end-reveals { margin-bottom: 26px; }
.reveal {
  font-size: 15px;
  line-height: 1.55;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(238,230,218,0.12);
}
.reveal:last-child { border-bottom: none; }
.reveal strong { color: var(--glow); }
.reveal em { color: #e8a787; font-style: normal; }
.reveal-closing {
  text-align: center;
  font-size: 16px;
  font-style: italic;
  line-height: 1.6;
  color: #eee6da;
  padding-top: 20px;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 217, 138, 0.25);
  border-bottom: none;
}
#screen-end .big-btn { display: block; margin: 0 auto; }
