:root {
  color-scheme: dark;
  --serif-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --body-copy: "Baskerville", "Times New Roman", serif;
  --bg: #120f1f;
  --bg-alt: #19142c;
  --panel: rgba(17, 12, 31, 0.9);
  --panel-strong: rgba(30, 20, 53, 0.96);
  --line: rgba(211, 192, 255, 0.15);
  --text: #f3efff;
  --muted: #b9afd5;
  --accent: #8dc7ff;
  --accent-2: #c27cff;
  --gold: #f7cf5d;
  --success: #96f0b5;
  --danger: #ff8c8c;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--body-copy);
  background:
    radial-gradient(circle at top, rgba(130, 92, 211, 0.25), transparent 30%),
    linear-gradient(180deg, #1f1835 0%, #0f0b18 100%);
  color: var(--text);
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background:
    radial-gradient(circle at 12% 18%, rgba(247, 207, 93, 0.12), transparent 22%),
    radial-gradient(circle at 86% 14%, rgba(141, 199, 255, 0.18), transparent 26%),
    radial-gradient(circle at 50% 100%, rgba(194, 124, 255, 0.18), transparent 30%);
}

body::after {
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.03), transparent 28%),
    linear-gradient(180deg, rgba(5, 3, 10, 0), rgba(5, 3, 10, 0.35));
}

body[data-zone="road-trip"]::before {
  background:
    radial-gradient(circle at 15% 12%, rgba(255, 224, 139, 0.16), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(120, 178, 232, 0.2), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(255, 124, 99, 0.12), transparent 26%);
}

body[data-zone="video-games"]::before {
  background:
    radial-gradient(circle at 18% 15%, rgba(54, 231, 197, 0.16), transparent 22%),
    radial-gradient(circle at 84% 16%, rgba(198, 87, 255, 0.16), transparent 26%),
    radial-gradient(circle at 50% 100%, rgba(54, 231, 197, 0.08), transparent 26%);
}

body[data-zone="grocery"]::before {
  background:
    radial-gradient(circle at 14% 14%, rgba(255, 239, 157, 0.14), transparent 22%),
    radial-gradient(circle at 84% 14%, rgba(161, 196, 132, 0.16), transparent 25%),
    radial-gradient(circle at 50% 100%, rgba(245, 201, 99, 0.08), transparent 28%);
}

body[data-zone="library"]::before {
  background:
    radial-gradient(circle at 14% 14%, rgba(215, 232, 181, 0.14), transparent 22%),
    radial-gradient(circle at 86% 16%, rgba(108, 72, 43, 0.16), transparent 25%),
    radial-gradient(circle at 50% 100%, rgba(127, 109, 177, 0.08), transparent 28%);
}

button {
  font: inherit;
}

.app-shell {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 32px;
}

.topbar,
.layout {
  display: grid;
  gap: 20px;
}

.topbar {
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
  margin-bottom: 20px;
}

.subhead {
  max-width: 58ch;
  margin-top: 10px;
  line-height: 1.55;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-family: var(--serif-display);
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
}

h2 {
  font-family: var(--serif-display);
  font-size: 1.6rem;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.subhead,
.counter-meta,
.zone-summary,
.travel-note,
.stat-label,
.shop-desc,
.shop-income,
.shop-count,
.shop-cost,
.sinner-sin,
.modal-body {
  color: var(--muted);
}

.counter-card,
.panel,
.scene-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 20%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.counter-card {
  padding: 18px 20px;
}

.counter-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.counter-value {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 8px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--success);
}

.de-icon {
  position: relative;
  width: 26px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 12px 12px 16px 16px;
  background: linear-gradient(180deg, #f5dc85, #c27cff);
  clip-path: polygon(54% 0, 100% 0, 67% 42%, 100% 42%, 38% 100%, 50% 58%, 16% 58%);
  filter: drop-shadow(0 0 10px rgba(194, 124, 255, 0.45));
}

.layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 420px);
  align-items: start;
}

.sidebar {
  display: grid;
  gap: 20px;
}

.panel,
.scene-panel {
  padding: 18px;
}

.scene-panel {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(247, 207, 93, 0.06), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 26%),
    var(--panel);
}

.zone-header,
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}

.travel-card {
  display: grid;
  gap: 8px;
  text-align: right;
  align-self: stretch;
  min-width: 180px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.travel-state {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.travel-state.is-active {
  background: rgba(150, 240, 181, 0.14);
  color: var(--success);
}

.zone-summary {
  max-width: 56ch;
  line-height: 1.45;
}

.zone-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.zone-item {
  display: grid;
  gap: 10px;
  min-height: 108px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.zone-item:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(247, 207, 93, 0.28);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.zone-item:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.zone-item.is-active {
  border-color: rgba(150, 240, 181, 0.46);
  background:
    linear-gradient(180deg, rgba(150, 240, 181, 0.12), rgba(150, 240, 181, 0.04)),
    rgba(150, 240, 181, 0.08);
  box-shadow: 0 12px 28px rgba(150, 240, 181, 0.08);
}

.zone-item.is-locked {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)),
    rgba(255, 255, 255, 0.02);
}

.zone-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.zone-item-name,
.zone-item-state {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.zone-item-state {
  color: var(--gold);
}

.zone-item-body {
  color: var(--muted);
  line-height: 1.45;
}

.scene {
  position: relative;
  min-height: 620px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  --scene-glow: rgba(255, 255, 255, 0.1);
  --scene-top: #7ca0ba;
  --scene-mid: #516d86;
  --scene-floor: #d2b995;
  --scene-floor-end: #bd9b73;
  --prop-main: rgba(122, 146, 171, 0.94);
  --prop-shadow: rgba(76, 95, 115, 0.96);
  --prop-radius: 18px;
  --sign-bg: #f1dba2;
  --sign-text: #493d1d;
  --scene-accent: rgba(255, 255, 255, 0.2);
  --scene-accent-2: rgba(247, 207, 93, 0.24);
  --set-piece-main: rgba(255, 255, 255, 0.18);
  --set-piece-shadow: rgba(0, 0, 0, 0.15);
  --floor-line: rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, var(--scene-glow), transparent 25%),
    linear-gradient(180deg, var(--scene-top) 0%, var(--scene-mid) 23%, #6f8192 24%, var(--scene-floor) 24%, var(--scene-floor-end) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.scene::before,
.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scene::before {
  background:
    radial-gradient(circle at 22% 18%, var(--scene-accent) 0, transparent 20%),
    radial-gradient(circle at 78% 16%, var(--scene-accent-2) 0, transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 32%);
  mix-blend-mode: screen;
}

.scene::after {
  background:
    linear-gradient(180deg, transparent 58%, rgba(0, 0, 0, 0.08) 100%),
    radial-gradient(circle at center, transparent 55%, rgba(0, 0, 0, 0.24) 100%);
}

.backdrop {
  position: absolute;
  inset: 0;
}

.scene .backdrop {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(10, 8, 16, 0.08)),
    var(--zone-background-image, none) center center / cover no-repeat;
}

.scene .scene-atmosphere,
.scene .locker-row,
.scene .locker-row-alt,
.scene .set-piece,
.scene .floor-trim,
.scene .silence-sign {
  display: none;
}

.scene-atmosphere,
.set-piece,
.floor-trim {
  position: absolute;
}

.scene-atmosphere {
  inset: 0;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.16), transparent 14%, transparent 32%, rgba(255, 255, 255, 0.08) 40%, transparent 52%),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 34%);
  opacity: 0.75;
}

.locker-row {
  position: absolute;
  top: 72px;
  left: 48px;
  right: 48px;
  height: 160px;
  background:
    repeating-linear-gradient(
      90deg,
      var(--prop-main) 0 74px,
      var(--prop-shadow) 74px 76px
    );
  border-radius: var(--prop-radius);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.locker-row::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: calc(var(--prop-radius) - 6px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 38%);
  opacity: 0.8;
}

.locker-row-alt {
  top: 248px;
}

.silence-sign {
  position: absolute;
  top: 36px;
  right: 50px;
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--sign-bg);
  color: var(--sign-text);
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.set-piece {
  bottom: 112px;
  width: 120px;
  height: 180px;
  border-radius: 28px 28px 12px 12px;
  background: linear-gradient(180deg, var(--set-piece-main), var(--set-piece-shadow));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  opacity: 0.9;
}

.set-piece::before,
.set-piece::after {
  content: "";
  position: absolute;
}

.set-piece::before {
  left: 16px;
  right: 16px;
  bottom: 28px;
  height: 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.14);
}

.set-piece::after {
  top: 18px;
  left: 20px;
  right: 20px;
  height: 66px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
}

.set-piece-left {
  left: 34px;
}

.set-piece-right {
  right: 34px;
}

.floor-trim {
  left: 0;
  right: 0;
  bottom: 132px;
  height: 14px;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 32px,
      var(--floor-line) 32px 48px,
      transparent 48px 96px
    );
  opacity: 0.55;
}

.scene[data-zone="road-trip"] {
  --scene-top: #b4d5f2;
  --scene-mid: #7390ab;
  --scene-floor: #6d6264;
  --scene-floor-end: #2a2736;
  --prop-main: rgba(46, 55, 73, 0.96);
  --prop-shadow: rgba(28, 34, 49, 0.98);
  --prop-radius: 32px;
  --sign-bg: #ffe08b;
  --sign-text: #4a3910;
  --scene-accent: rgba(255, 247, 208, 0.18);
  --scene-accent-2: rgba(255, 132, 100, 0.2);
  --set-piece-main: rgba(77, 54, 42, 0.84);
  --set-piece-shadow: rgba(27, 22, 26, 0.9);
  --floor-line: rgba(255, 226, 167, 0.22);
}

.scene[data-zone="road-trip"] .locker-row {
  top: 42px;
  left: 88px;
  right: 88px;
  height: 180px;
  background:
    linear-gradient(180deg, rgba(226, 242, 255, 0.9), rgba(156, 201, 232, 0.6) 45%, rgba(91, 122, 151, 0.9) 46%, rgba(91, 122, 151, 0.9) 100%);
}

.scene[data-zone="road-trip"] .locker-row-alt {
  top: auto;
  bottom: 0;
  left: 0;
  right: 0;
  height: 210px;
  border-radius: 40px 40px 0 0;
  background:
    linear-gradient(180deg, rgba(39, 37, 48, 0.9), rgba(17, 15, 22, 0.98));
}

.scene[data-zone="video-games"] {
  --scene-top: #241c48;
  --scene-mid: #131229;
  --scene-floor: #1a1832;
  --scene-floor-end: #090811;
  --prop-main: rgba(54, 231, 197, 0.18);
  --prop-shadow: rgba(198, 87, 255, 0.45);
  --sign-bg: rgba(54, 231, 197, 0.18);
  --sign-text: #c9fff2;
  --scene-accent: rgba(54, 231, 197, 0.18);
  --scene-accent-2: rgba(198, 87, 255, 0.18);
  --set-piece-main: rgba(54, 231, 197, 0.18);
  --set-piece-shadow: rgba(12, 16, 38, 0.88);
  --floor-line: rgba(54, 231, 197, 0.2);
}

.scene[data-zone="video-games"] .locker-row,
.scene[data-zone="video-games"] .locker-row-alt {
  height: 132px;
  background:
    linear-gradient(180deg, rgba(16, 18, 35, 0.96), rgba(9, 10, 20, 0.98)),
    repeating-linear-gradient(
      90deg,
      rgba(54, 231, 197, 0.4) 0 4px,
      transparent 4px 74px,
      rgba(198, 87, 255, 0.45) 74px 78px
    );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 26px rgba(54, 231, 197, 0.16);
}

.scene[data-zone="video-games"] .locker-row {
  top: 86px;
}

.scene[data-zone="video-games"] .locker-row-alt {
  top: 248px;
}

.scene[data-zone="grocery"] {
  --scene-top: #eff7ef;
  --scene-mid: #d3e6cf;
  --scene-floor: #e8dcc6;
  --scene-floor-end: #c9b495;
  --prop-main: rgba(233, 242, 225, 0.98);
  --prop-shadow: rgba(183, 198, 176, 0.95);
  --sign-bg: #ffef9d;
  --sign-text: #5c4a15;
  --scene-accent: rgba(255, 255, 255, 0.18);
  --scene-accent-2: rgba(245, 201, 99, 0.16);
  --set-piece-main: rgba(126, 166, 122, 0.44);
  --set-piece-shadow: rgba(84, 106, 71, 0.9);
  --floor-line: rgba(116, 142, 100, 0.18);
}

.scene[data-zone="grocery"] .locker-row,
.scene[data-zone="grocery"] .locker-row-alt {
  height: 170px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(245, 201, 99, 0.86) 0 26px,
      rgba(240, 238, 229, 0.96) 26px 66px,
      rgba(161, 196, 132, 0.86) 66px 102px,
      rgba(215, 112, 112, 0.84) 102px 132px
    );
}

.scene[data-zone="library"] {
  --scene-top: #c0c9b3;
  --scene-mid: #73816c;
  --scene-floor: #917456;
  --scene-floor-end: #593d28;
  --prop-main: rgba(108, 72, 43, 0.96);
  --prop-shadow: rgba(70, 43, 23, 0.98);
  --sign-bg: #d7e8b5;
  --sign-text: #304217;
  --scene-accent: rgba(215, 232, 181, 0.14);
  --scene-accent-2: rgba(127, 109, 177, 0.16);
  --set-piece-main: rgba(111, 84, 59, 0.7);
  --set-piece-shadow: rgba(63, 42, 29, 0.92);
  --floor-line: rgba(215, 232, 181, 0.14);
}

.scene[data-zone="library"] .locker-row,
.scene[data-zone="library"] .locker-row-alt {
  height: 188px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(92, 57, 31, 0.98) 0 24px,
      rgba(151, 111, 72, 0.94) 24px 32px,
      rgba(52, 92, 68, 0.88) 32px 64px,
      rgba(132, 56, 46, 0.84) 64px 92px
    );
}

.spawn-banner {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  padding: 10px 14px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(16, 11, 27, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.18);
  transform-origin: left center;
}

.spawn-banner.is-judgment {
  border-color: rgba(255, 140, 140, 0.28);
  color: #ffd7d7;
}

.spawn-banner.is-travel {
  border-color: rgba(141, 199, 255, 0.28);
  color: #d8efff;
}

.spawn-banner.is-unlock,
.spawn-banner.is-promotion {
  border-color: rgba(247, 207, 93, 0.3);
  color: #fff1be;
}

.spawn-banner.is-pulsing {
  animation: status-bump 420ms ease;
}

.sinner-grid {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 40px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: end;
}

.sinner-card {
  position: relative;
  width: 100%;
  min-height: 360px;
  padding: 28px 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 26px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(48, 31, 81, 0.96), rgba(18, 12, 33, 0.98));
  color: var(--text);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.sinner-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 58px rgba(0, 0, 0, 0.35);
  border-color: rgba(247, 207, 93, 0.18);
}

.sinner-card:active {
  transform: scale(0.98);
}

.sinner-card.is-golden {
  box-shadow: 0 0 0 2px rgba(247, 207, 93, 0.55), 0 20px 50px rgba(247, 207, 93, 0.24);
}

.halo {
  position: absolute;
  inset: -12px;
  border-radius: 32px;
  background: radial-gradient(circle, rgba(247, 207, 93, 0.3), transparent 65%);
  animation: pulse 1.2s ease-in-out infinite;
}

.sinner-info {
  display: block;
  text-align: left;
}

.sinner-name {
  display: block;
  margin-top: 180px;
  margin-bottom: 8px;
  font-size: 1.3rem;
  font-weight: 700;
}

.mortal {
  position: absolute;
  top: 24px;
  left: 50%;
  width: 130px;
  height: 150px;
  transform: translateX(-50%);
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.18));
  animation: sinner-idle 3.8s ease-in-out infinite;
}

.mortal-image {
  position: absolute;
  left: 50%;
  top: 18px;
  width: min(170px, 72%);
  max-height: 170px;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.22));
  animation: sinner-idle 3.8s ease-in-out infinite;
  pointer-events: none;
}

.head,
.body,
.arm,
.leg,
.phone,
.backpack,
.hoodie,
.tablet,
.headphones,
.keyboard,
.book-stack,
.glasses,
.cart-handle,
.receipt {
  position: absolute;
  display: block;
}

.head {
  top: 0;
  left: 40px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #f1d6b7;
  border: 2px solid rgba(0, 0, 0, 0.12);
}

.body {
  top: 44px;
  left: 33px;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: #5c7fc0;
}

.arm {
  top: 52px;
  width: 18px;
  height: 55px;
  border-radius: 999px;
  background: #f1d6b7;
}

.arm-left {
  left: 20px;
  transform: rotate(16deg);
}

.arm-right {
  right: 20px;
  transform: rotate(-20deg);
}

.leg {
  top: 100px;
  width: 22px;
  height: 50px;
  border-radius: 999px;
  background: #263353;
}

.leg-left {
  left: 42px;
}

.leg-right {
  right: 42px;
}

.phone {
  display: none;
  top: 84px;
  right: 10px;
  width: 18px;
  height: 28px;
  border-radius: 5px;
  background: #121212;
}

.backpack {
  display: none;
  top: 50px;
  left: 18px;
  width: 20px;
  height: 46px;
  border-radius: 12px;
  background: #9d4939;
}

.hoodie,
.tablet,
.headphones,
.keyboard,
.book-stack,
.glasses,
.cart-handle,
.receipt {
  display: none;
}

.hoodie {
  top: 42px;
  left: 26px;
  width: 78px;
  height: 74px;
  border-radius: 28px 28px 18px 18px;
  background: rgba(78, 94, 146, 0.42);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.tablet {
  top: 82px;
  right: 4px;
  width: 24px;
  height: 34px;
  border-radius: 7px;
  background: linear-gradient(180deg, #535e76, #1a1f2a);
  border: 2px solid rgba(255, 255, 255, 0.08);
  transform: rotate(-12deg);
}

.headphones {
  top: 10px;
  left: 26px;
  width: 78px;
  height: 42px;
  border: 8px solid #11141d;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
}

.keyboard {
  bottom: 8px;
  right: -4px;
  width: 52px;
  height: 20px;
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(54, 231, 197, 0.88) 0 4px,
      rgba(16, 18, 35, 0.94) 4px 7px
    );
  box-shadow: 0 0 10px rgba(54, 231, 197, 0.28);
  transform: skewX(-18deg);
}

.book-stack {
  bottom: 12px;
  left: 12px;
  width: 34px;
  height: 46px;
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      180deg,
      #d1c98a 0 10px,
      #6f8d59 10px 20px,
      #9d6b4b 20px 30px
    );
  box-shadow: 8px 8px 0 rgba(255, 255, 255, 0.08);
}

.cart-handle {
  top: 92px;
  right: -6px;
  width: 54px;
  height: 42px;
  border: 6px solid #7e8ca2;
  border-left: 0;
  border-bottom: 10px solid #7e8ca2;
  transform: skewX(-14deg);
}

.receipt {
  top: 84px;
  right: 8px;
  width: 14px;
  height: 38px;
  border-radius: 4px;
  background:
    linear-gradient(180deg, #fffdf5 0%, #f2efdf 100%);
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.05);
  transform: rotate(-8deg);
}

.glasses {
  top: 18px;
  left: 34px;
  width: 62px;
  height: 18px;
  border-top: 3px solid rgba(44, 34, 29, 0.88);
}

.glasses::before,
.glasses::after {
  content: "";
  position: absolute;
  top: 0;
  width: 20px;
  height: 16px;
  border: 3px solid rgba(44, 34, 29, 0.88);
  border-radius: 8px;
}

.glasses::before {
  left: 0;
}

.glasses::after {
  right: 0;
}

.mortal-student .phone,
.mortal-student .backpack,
.mortal-student .hoodie,
.mortal-sibling .tablet,
.mortal-shopper .cart-handle,
.mortal-shopper .receipt,
.mortal-gamer .headphones,
.mortal-gamer .keyboard,
.mortal-librarian .book-stack,
.mortal-librarian .glasses {
  display: block;
}

.mortal-sibling .body {
  background: #cf7d68;
}

.mortal-gamer .body {
  background: #4d4bb7;
}

.mortal-shopper .body {
  background: #5b9b66;
}

.mortal-librarian .body {
  background: #7f6db1;
}

.effects-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.floating-text {
  position: absolute;
  bottom: var(--effect-bottom, 180px);
  left: var(--effect-left, 50%);
  transform: translateX(-50%);
  color: var(--gold);
  font-weight: 700;
  font-size: 1.1rem;
  text-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
  animation: float-up 950ms ease-out forwards;
}

.floating-text.is-reduced {
  animation-duration: 620ms;
}

.lightning {
  position: absolute;
  left: var(--effect-left, 50%);
  top: var(--effect-top, 120px);
  width: 26px;
  height: 190px;
  transform: translateX(-50%) skewX(-18deg);
  background: linear-gradient(180deg, #cce6ff, #7cc5ff 45%, #d194ff 100%);
  clip-path: polygon(48% 0, 100% 0, 64% 44%, 100% 44%, 18% 100%, 42% 58%, 0 58%);
  filter: drop-shadow(0 0 16px rgba(141, 199, 255, 0.9));
  animation: flash-out 220ms ease-out forwards;
}

.poof {
  position: absolute;
  left: var(--effect-left, 50%);
  bottom: var(--effect-bottom, 200px);
  width: 140px;
  height: 80px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.9), rgba(165, 165, 165, 0.4) 45%, transparent 70%);
  animation: poof-out 360ms ease-out forwards;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.control-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.control-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.stat {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-label,
.shop-desc,
.shop-income,
.shop-count,
.shop-cost {
  display: block;
  font-size: 0.9rem;
}

.stat-value {
  display: block;
  margin-top: 8px;
  font-size: 1.05rem;
}

.promotion-copy {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.promotion-rank {
  font-size: 1.05rem;
  font-weight: 700;
}

.promotion-bonus,
.promotion-meta {
  color: var(--muted);
}

.progress-meter {
  height: 14px;
  margin-bottom: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--gold), var(--accent-2));
  box-shadow: 0 0 18px rgba(247, 207, 93, 0.28);
  transition: width 180ms ease;
}

body[data-animation="reduced"] .halo,
body[data-animation="reduced"] .mortal,
body[data-animation="reduced"] .spawn-banner.is-pulsing,
body[data-animation="reduced"] .progress-fill {
  animation-duration: 0.6s;
  transition-duration: 90ms;
}

body[data-animation="off"] .halo,
body[data-animation="off"] .effects-layer,
body[data-animation="off"] .spawn-banner.is-pulsing,
body[data-animation="off"] .mortal,
body[data-animation="off"] .progress-fill {
  animation: none !important;
  transition: none !important;
}

body[data-animation="off"] .effects-layer {
  display: none;
}

.promotion-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.secondary-button,
.primary-button {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}

.text-button {
  border: 0;
  padding: 12px 8px;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  justify-self: end;
}

.text-button:hover {
  color: #fff1be;
}

.secondary-button:hover,
.primary-button:hover,
.shop-item:hover {
  transform: translateY(-1px);
}

.secondary-button:disabled,
.primary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.secondary-button.is-active {
  background: rgba(150, 240, 181, 0.16);
  color: var(--success);
  box-shadow: inset 0 0 0 1px rgba(150, 240, 181, 0.22);
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #100a1b;
  font-weight: 700;
}

.primary-button.is-golden {
  background: linear-gradient(135deg, #ffe789, #f0b72f);
}

.shop-list {
  display: grid;
  gap: 12px;
}

.shop-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.shop-item:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(141, 199, 255, 0.34);
  background: rgba(255, 255, 255, 0.06);
}

.shop-item:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.shop-item.is-affordable {
  border-color: rgba(150, 240, 181, 0.4);
  background: linear-gradient(135deg, rgba(150, 240, 181, 0.12), rgba(255, 255, 255, 0.04));
  box-shadow: 0 10px 28px rgba(150, 240, 181, 0.12);
}

.shop-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(141, 199, 255, 0.4), rgba(194, 124, 255, 0.35));
  overflow: hidden;
}

.shop-icon::before {
  content: "";
  position: absolute;
}

.shop-icon::after {
  content: "";
  position: absolute;
  inset: auto -4px -10px auto;
  width: 24px;
  height: 24px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  transform: rotate(25deg);
}

.shop-icon[data-theme="gossip"]::before {
  left: 9px;
  top: 10px;
  width: 20px;
  height: 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 7px 7px 0 -4px rgba(255, 255, 255, 0.9);
}

.shop-icon[data-theme="imp"]::before {
  left: 12px;
  top: 8px;
  width: 16px;
  height: 20px;
  background: rgba(255, 255, 255, 0.92);
  clip-path: polygon(50% 0, 100% 35%, 78% 100%, 22% 100%, 0 35%);
}

.shop-icon[data-theme="noise"]::before {
  left: 9px;
  top: 10px;
  width: 22px;
  height: 20px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0 4px, transparent 4px 8px, rgba(255, 255, 255, 0.92) 8px 12px, transparent 12px 16px, rgba(255, 255, 255, 0.92) 16px 22px);
}

.shop-icon[data-theme="spam"]::before {
  left: 9px;
  top: 11px;
  width: 22px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 4px;
  box-sizing: border-box;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.shop-icon[data-theme="screen"]::before {
  left: 8px;
  top: 9px;
  width: 24px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 4px;
  box-sizing: border-box;
  box-shadow: 6px 14px 0 -6px rgba(255, 255, 255, 0.92);
}

.shop-icon[data-theme="spoiler"]::before {
  left: 10px;
  top: 8px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px dashed rgba(255, 255, 255, 0.92);
  box-sizing: border-box;
}

.shop-icon[data-theme="tinfoil"]::before {
  left: 10px;
  top: 8px;
  width: 22px;
  height: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(206, 222, 240, 0.72));
  clip-path: polygon(18% 0, 100% 12%, 82% 100%, 0 88%);
}

.shop-icon[data-theme="red-light"]::before {
  left: 14px;
  top: 7px;
  width: 12px;
  height: 24px;
  border-radius: 10px;
  background:
    radial-gradient(circle at center 6px, rgba(255, 255, 255, 0.92) 0 3px, transparent 4px),
    radial-gradient(circle at center 12px, rgba(255, 255, 255, 0.68) 0 3px, transparent 4px),
    radial-gradient(circle at center 18px, rgba(255, 255, 255, 0.68) 0 3px, transparent 4px),
    rgba(18, 16, 24, 0.3);
}

.shop-icon[data-theme="battery"]::before {
  left: 10px;
  top: 11px;
  width: 20px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 4px;
  box-sizing: border-box;
  box-shadow: 22px 3px 0 -3px rgba(255, 255, 255, 0.92);
}

.shop-icon[data-theme="entropy"]::before {
  left: 10px;
  top: 10px;
  width: 22px;
  height: 22px;
  background:
    radial-gradient(circle at center, transparent 0 4px, rgba(255, 255, 255, 0.92) 4px 6px, transparent 6px),
    linear-gradient(90deg, transparent 9px, rgba(255, 255, 255, 0.92) 9px 13px, transparent 13px),
    linear-gradient(transparent 9px, rgba(255, 255, 255, 0.92) 9px 13px, transparent 13px);
}

.shop-icon[data-theme="gossip"] {
  background: linear-gradient(135deg, rgba(255, 166, 210, 0.5), rgba(181, 117, 255, 0.45));
}

.shop-icon[data-theme="imp"] {
  background: linear-gradient(135deg, rgba(255, 177, 115, 0.52), rgba(255, 113, 106, 0.42));
}

.shop-icon[data-theme="noise"] {
  background: linear-gradient(135deg, rgba(126, 198, 255, 0.5), rgba(84, 126, 255, 0.45));
}

.shop-icon[data-theme="spam"] {
  background: linear-gradient(135deg, rgba(255, 233, 123, 0.52), rgba(255, 138, 95, 0.42));
}

.shop-icon[data-theme="screen"] {
  background: linear-gradient(135deg, rgba(86, 241, 218, 0.48), rgba(72, 141, 255, 0.42));
}

.shop-icon[data-theme="spoiler"] {
  background: linear-gradient(135deg, rgba(255, 144, 205, 0.48), rgba(154, 110, 255, 0.42));
}

.shop-icon[data-theme="tinfoil"] {
  background: linear-gradient(135deg, rgba(229, 236, 244, 0.5), rgba(119, 152, 188, 0.4));
}

.shop-icon[data-theme="red-light"] {
  background: linear-gradient(135deg, rgba(255, 112, 112, 0.52), rgba(255, 190, 101, 0.4));
}

.shop-icon[data-theme="battery"] {
  background: linear-gradient(135deg, rgba(154, 242, 135, 0.5), rgba(63, 177, 126, 0.42));
}

.shop-icon[data-theme="entropy"] {
  background: linear-gradient(135deg, rgba(213, 164, 255, 0.52), rgba(106, 86, 255, 0.45));
}

.shop-copy,
.shop-meta {
  display: grid;
  gap: 4px;
}

.shop-name {
  font-weight: 700;
}

.shop-meta {
  text-align: right;
}

.shop-state {
  justify-self: end;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shop-item.is-affordable .shop-state {
  background: rgba(150, 240, 181, 0.16);
  color: var(--success);
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(6, 3, 12, 0.72);
}

.modal-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(540px, calc(100% - 32px));
  transform: translate(-50%, -50%);
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 18%),
    var(--panel-strong);
  box-shadow: var(--shadow);
}

.modal-card-rules {
  width: min(760px, calc(100% - 32px));
  max-height: min(80vh, 760px);
  overflow-y: auto;
}

.rules-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.rules-copy {
  display: grid;
  gap: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.rules-copy strong {
  color: var(--text);
}

.modal-body {
  margin: 14px 0 22px;
  line-height: 1.55;
  font-size: 1.1rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.45;
    transform: scale(0.98);
  }

  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

@keyframes sinner-idle {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(-4px);
  }
}

@keyframes status-bump {
  0% {
    transform: scale(0.96);
    opacity: 0.55;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes float-up {
  from {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  to {
    opacity: 0;
    transform: translate(-50%, -84px);
  }
}

@keyframes flash-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes poof-out {
  from {
    opacity: 0.9;
    transform: translateX(-50%) scale(0.9);
  }

  to {
    opacity: 0;
    transform: translateX(-50%) scale(1.2);
  }
}

@media (max-width: 1080px) {
  .topbar,
  .layout {
    grid-template-columns: 1fr;
  }

  .counter-card {
    max-width: 420px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 20px, 100%);
    padding-top: 16px;
  }

  .sinner-grid {
    left: 14px;
    right: 14px;
    bottom: 18px;
    grid-template-columns: 1fr;
  }

  .scene {
    min-height: 980px;
  }

  .set-piece {
    width: 84px;
    height: 148px;
    bottom: 124px;
  }

  .locker-row {
    left: 24px;
    right: 24px;
    height: 120px;
  }

  .locker-row-alt {
    top: 208px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .promotion-meta {
    flex-direction: column;
  }

  .control-row {
    grid-template-columns: 1fr;
  }

  .shop-item {
    grid-template-columns: 42px 1fr;
  }

  .shop-meta {
    grid-column: 1 / -1;
    text-align: left;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }
}
