.anomaly-body {
  background: #0d141b;
}

.anomaly-site {
  background: #f4f5f6;
}

.anomaly-topbar {
  position: relative;
  background: #ffffff;
}

.anomaly-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: clamp(44px, 7vw, 96px);
  align-items: end;
  padding: 86px clamp(24px, 7vw, 104px) 72px;
  background: #111820;
  color: #ffffff;
}

.anomaly-kicker,
.panel-label {
  margin: 0 0 20px;
  color: #ff5964;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.anomaly-title-block h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(68px, 8.2vw, 118px);
  line-height: 0.86;
  letter-spacing: -0.075em;
}

.anomaly-title-block h1 span {
  color: #eb2532;
}

.anomaly-title-block > p:last-child {
  max-width: 680px;
  margin: 38px 0 0;
  color: #b7c0c9;
  font-size: 18px;
  line-height: 1.82;
}

.anomaly-title-block strong {
  color: #ffffff;
}

.anomaly-status-card {
  padding: 34px;
  border: 1px solid #35404b;
  border-radius: 26px;
  background: #19232d;
}

.anomaly-status-card > span {
  color: #ff5964;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.anomaly-status-card > strong {
  display: block;
  margin: 18px 0 32px;
  color: #ffffff;
  font-size: 25px;
  line-height: 1.38;
}

.anomaly-status-card dl,
.result-scoreboard dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0;
}

.anomaly-status-card dl > div {
  padding-top: 14px;
  border-top: 1px solid #35404b;
}

.anomaly-status-card dt,
.result-scoreboard dt {
  margin-bottom: 3px;
  color: #88939f;
  font-size: 11px;
  font-weight: 700;
}

.anomaly-status-card dd,
.result-scoreboard dd {
  margin: 0;
  color: #ffffff;
  font-size: 14px;
  font-weight: 750;
}

.game-stage-wrap {
  padding: 72px clamp(20px, 6vw, 86px) 84px;
  background: #e8eaec;
}

.game-stage {
  max-width: 1120px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #d0d4d8;
  border-radius: 32px;
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(13, 20, 27, 0.12);
}

.game-panel {
  min-height: 680px;
  padding: clamp(28px, 5vw, 64px);
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: 28px 48px;
  align-items: center;
}

.intro-copy h2,
.result-copy h2,
.anomaly-info h2 {
  margin: 0;
  font-size: clamp(38px, 4.4vw, 58px);
  line-height: 1.08;
}

.intro-copy > p:last-child {
  margin: 24px 0 0;
  color: #66717f;
  font-size: 16px;
  line-height: 1.8;
}

.intro-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
}

.intro-actions p {
  margin: 0;
  color: #8a939e;
  font-size: 12px;
}

kbd {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  margin: 0 3px;
  padding: 0 6px;
  place-items: center;
  border: 1px solid #d0d4d8;
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #f7f8f9;
  color: #333d4b;
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
}

.anomaly-primary,
.anomaly-secondary,
.choice-button {
  border: 0;
  transition: transform 140ms ease, background-color 180ms ease, border-color 180ms ease;
}

.anomaly-primary:active,
.anomaly-secondary:active,
.choice-button:active {
  transform: scale(0.98);
}

.anomaly-primary {
  min-height: 54px;
  padding: 0 24px;
  border-radius: 15px;
  background: #e9222f;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
}

.anomaly-primary:hover {
  background: #cf1723;
}

.anomaly-secondary {
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid #d8dde2;
  border-radius: 14px;
  background: #ffffff;
  color: #333d4b;
  font-size: 14px;
  font-weight: 750;
}

.anomaly-secondary:hover {
  border-color: #aeb6bf;
  background: #f7f8f9;
}

.corridor-frame {
  position: relative;
  overflow: hidden;
  border: 8px solid #111820;
  border-radius: 22px;
  background: #111820;
  box-shadow: 0 20px 42px rgba(17, 24, 32, 0.2);
}

.corridor-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #d9d5ca;
  isolation: isolate;
}

.corridor-scene::before {
  position: absolute;
  inset: 0 0 58% 0;
  z-index: -4;
  background: #efede5;
  content: "";
}

.corridor-scene::after {
  position: absolute;
  inset: 58% 0 0 0;
  z-index: -4;
  background: #b9b4a8;
  clip-path: polygon(0 100%, 29% 0, 71% 0, 100% 100%);
  content: "";
}

.ceiling {
  position: absolute;
  inset: 0 0 66% 0;
  z-index: -3;
  background: #f7f5ed;
  clip-path: polygon(0 0, 100% 0, 70% 100%, 30% 100%);
}

.ceiling i {
  position: absolute;
  top: 8%;
  width: 11%;
  height: 13%;
  border: 1px solid #d9d7cf;
  background: #ffffff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.86);
}

.ceiling i:nth-child(1) { left: 17%; }
.ceiling i:nth-child(2) { left: 37%; }
.ceiling i:nth-child(3) { right: 37%; }
.ceiling i:nth-child(4) { right: 17%; }

.corridor-scene.light-alert .ceiling i:nth-child(3) {
  border-color: #ec2532;
  background: #ec2532;
  box-shadow: 0 0 24px rgba(236, 37, 50, 0.64);
}

.left-wall,
.right-wall {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: -1;
  width: 34%;
  background: #e4e1d7;
}

.left-wall {
  left: 0;
  clip-path: polygon(0 0, 100% 31%, 100% 70%, 0 100%);
}

.right-wall {
  right: 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 70%, 0 31%);
}

.left-wall::after,
.right-wall::after {
  position: absolute;
  inset: 0;
  border-top: 2px solid #c9c5bb;
  border-bottom: 2px solid #c9c5bb;
  content: "";
}

.clock {
  position: absolute;
  top: 37%;
  left: 10%;
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 5px solid #252c34;
  border-radius: 50%;
  background: #ffffff;
  color: #252c34;
  font-size: 12px;
  font-weight: 850;
  transform: rotate(-8deg) skewY(2deg);
}

.clock.is-anomaly {
  border-color: #e9222f;
  color: #e9222f;
}

.poster {
  position: absolute;
  top: 55%;
  left: 9%;
  display: flex;
  width: 70%;
  min-height: 23%;
  padding: 10px 12px;
  flex-direction: column;
  justify-content: center;
  border: 3px solid #ffffff;
  background: #df2330;
  color: #ffffff;
  box-shadow: 0 5px 12px rgba(17, 24, 32, 0.15);
  transform: rotate(-6deg) skewY(3deg);
}

.poster span,
.poster small {
  font-size: clamp(5px, 0.72vw, 9px);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.poster b {
  margin: 3px 0;
  font-size: clamp(10px, 1.3vw, 18px);
  line-height: 1.05;
}

.poster.is-anomaly {
  background: #111820;
}

.notice {
  position: absolute;
  top: 48%;
  right: 7%;
  display: flex;
  width: 72%;
  min-height: 18%;
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
  color: #252c34;
  box-shadow: 0 5px 12px rgba(17, 24, 32, 0.1);
  transform: rotate(6deg) skewY(-3deg);
}

.notice b {
  font-size: clamp(9px, 1.1vw, 15px);
}

.notice span {
  color: #76808b;
  font-size: clamp(6px, 0.75vw, 10px);
}

.corridor-end {
  position: absolute;
  top: 28%;
  left: 34%;
  width: 32%;
  height: 45%;
  border: 2px solid #bab6ad;
  background: #d4d0c6;
}

.door {
  position: absolute;
  bottom: 0;
  left: 27%;
  width: 46%;
  height: 68%;
  border: 4px solid #383f47;
  border-bottom: 0;
  background: #525b64;
  box-shadow: inset -12px 0 0 #404850;
}

.door b {
  position: absolute;
  top: 18%;
  left: 50%;
  color: #ffffff;
  font-size: clamp(13px, 2vw, 26px);
  transform: translateX(-50%);
}

.door.is-anomaly {
  border-color: #e9222f;
}

.exit-sign {
  position: absolute;
  top: 8%;
  left: 18%;
  z-index: 2;
  display: flex;
  width: 64%;
  min-height: 18%;
  align-items: center;
  justify-content: space-between;
  padding: 0 8%;
  background: #16784a;
  color: #ffffff;
  font-size: clamp(7px, 1vw, 13px);
  box-shadow: 0 0 14px rgba(22, 120, 74, 0.24);
}

.exit-sign i {
  font-size: 1.5em;
  font-style: normal;
  font-weight: 900;
}

.exit-sign.is-anomaly {
  background: #e9222f;
}

.floor-lines {
  position: absolute;
  inset: 58% 0 0 0;
  z-index: -2;
}

.floor-lines i {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: rgba(87, 85, 80, 0.26);
  transform-origin: bottom;
}

.floor-lines i:nth-child(1) { transform: rotate(20deg); }
.floor-lines i:nth-child(2) { transform: rotate(0deg); }
.floor-lines i:nth-child(3) { transform: rotate(-20deg); }

.walker {
  position: absolute;
  right: 24%;
  bottom: 19%;
  z-index: 3;
  width: 10%;
  height: 35%;
  filter: drop-shadow(0 8px 6px rgba(17, 24, 32, 0.18));
}

.walker .head {
  position: absolute;
  top: 0;
  left: 29%;
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #d4aa8f;
}

.walker .body {
  position: absolute;
  top: 24%;
  left: 15%;
  width: 70%;
  height: 56%;
  border-radius: 38% 38% 14% 14%;
  background: #273440;
}

.walker .body::before,
.walker .body::after {
  position: absolute;
  bottom: -35%;
  width: 24%;
  height: 48%;
  background: #273440;
  content: "";
}

.walker .body::before { left: 13%; }
.walker .body::after { right: 13%; }

.walker .bag {
  position: absolute;
  right: -6%;
  bottom: 18%;
  width: 38%;
  height: 30%;
  border: 3px solid #50392e;
  background: #8d664f;
}

.walker.duplicate {
  right: 12%;
  display: none;
  transform: scale(0.85);
  transform-origin: bottom;
}

.walker.duplicate.is-visible {
  display: block;
}

.play-panel {
  background: #111820;
}

.game-hud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 17px;
  color: #ffffff;
}

.game-hud > div {
  display: flex;
  flex-direction: column;
}

.game-hud > div:nth-child(2) {
  align-items: center;
}

.game-hud > div:last-child {
  align-items: flex-end;
}

.game-hud span {
  color: #8995a1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.game-hud strong {
  color: #ffffff;
  font-size: 20px;
}

.time-display strong {
  font-variant-numeric: tabular-nums;
}

.round-progress {
  height: 4px;
  margin-bottom: 18px;
  overflow: hidden;
  background: #2b3742;
}

.round-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: #ec2532;
  transform-origin: left;
}

.live-frame {
  border-color: #303c47;
}

.live-frame.is-entering .corridor-scene {
  animation: scene-enter 220ms ease-out both;
}

@keyframes scene-enter {
  from { opacity: 0.25; transform: scale(1.025); }
  to { opacity: 1; transform: scale(1); }
}

.scene-question {
  position: absolute;
  bottom: 18px;
  left: 50%;
  z-index: 7;
  margin: 0;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  background: rgba(17, 24, 32, 0.88);
  color: #ffffff;
  font-size: 13px;
  font-weight: 750;
  transform: translateX(-50%);
  backdrop-filter: blur(8px);
}

.scene-flash {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  background: #ffffff;
  transition: opacity 160ms ease;
}

.live-frame.is-flashing .scene-flash {
  opacity: 0.7;
}

.feedback-toast {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 8;
  max-width: calc(100% - 32px);
  padding: 10px 15px;
  border-radius: 10px;
  background: #ffffff;
  color: #111820;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  transform: translateX(-50%);
  box-shadow: 0 10px 24px rgba(17, 24, 32, 0.2);
}

.feedback-toast.is-wrong {
  background: #ec2532;
  color: #ffffff;
}

.choice-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.choice-button {
  position: relative;
  display: grid;
  min-height: 108px;
  padding: 20px 24px 20px 76px;
  align-content: center;
  border: 1px solid #34404b;
  border-radius: 18px;
  background: #1b2630;
  color: #ffffff;
  text-align: left;
}

.choice-button:hover {
  border-color: #64717d;
  background: #24313c;
}

.choice-button > span {
  position: absolute;
  top: 50%;
  left: 22px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #4a5865;
  border-radius: 10px;
  color: #ff6973;
  font-size: 13px;
  font-weight: 850;
  transform: translateY(-50%);
}

.choice-button strong {
  color: #ffffff;
  font-size: 19px;
}

.choice-button small {
  margin-top: 3px;
  color: #8e9aa5;
  font-size: 11px;
}

.choice-button[disabled] {
  cursor: default;
  opacity: 0.58;
}

.result-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 44px 70px;
  align-content: center;
  background: #ffffff;
}

.result-eyebrow {
  margin: 0 0 14px;
  color: #e9222f;
  font-size: 12px;
  font-weight: 800;
}

.result-copy > p:last-child {
  margin: 24px 0 0;
  color: #66717f;
  font-size: 16px;
  line-height: 1.75;
}

.result-scoreboard {
  padding: 38px;
  border-radius: 28px;
  background: #111820;
  color: #ffffff;
}

.result-main-score {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 34px;
}

.result-main-score strong {
  color: #ff3441;
  font-size: 104px;
  line-height: 0.8;
  letter-spacing: -0.08em;
}

.result-main-score span {
  color: #ffffff;
  font-size: 25px;
  font-weight: 800;
}

.result-scoreboard dl > div {
  padding-top: 13px;
  border-top: 1px solid #35404b;
}

.result-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.share-status,
.result-url {
  grid-column: 1 / -1;
  margin: -24px 0 0;
  color: #78838e;
  font-size: 12px;
  text-align: center;
}

.result-url {
  margin-top: -34px;
  color: #a0a8b1;
}

.anomaly-info {
  padding: 104px clamp(24px, 7vw, 104px) 112px;
  background: #ffffff;
}

.anomaly-info-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.55fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 48px;
}

.anomaly-info-heading .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -24px;
}

.anomaly-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.anomaly-info-grid article {
  min-height: 240px;
  padding: 30px;
  border: 1px solid #e2e5e8;
  border-radius: 24px;
  background: #f7f8f9;
}

.anomaly-info-grid article > span {
  display: grid;
  width: 38px;
  height: 38px;
  margin-bottom: 38px;
  place-items: center;
  border-radius: 50%;
  background: #ffecee;
  color: #e9222f;
  font-size: 10px;
  font-weight: 850;
}

.anomaly-info-grid h3 {
  margin: 0 0 12px;
  font-size: 23px;
  line-height: 1.3;
}

.anomaly-info-grid p {
  margin: 0;
  color: #66717f;
  font-size: 14px;
  line-height: 1.75;
}

.anomaly-note {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 64px;
  margin-top: 72px;
  padding: 58px;
  border-radius: 30px;
  background: #111820;
  color: #ffffff;
}

.anomaly-note h2 {
  color: #ffffff;
  font-size: clamp(32px, 3.2vw, 46px);
}

.anomaly-note-copy p {
  margin: 0;
  color: #b1bbc4;
  font-size: 16px;
  line-height: 1.9;
}

.anomaly-note-copy p + p {
  margin-top: 18px;
}

@media (max-width: 920px) {
  .anomaly-hero,
  .intro-panel,
  .result-panel,
  .anomaly-note {
    grid-template-columns: 1fr;
  }

  .anomaly-status-card {
    max-width: 620px;
  }

  .intro-panel {
    align-items: start;
  }

  .reference-frame {
    grid-row: 2;
  }

  .result-actions,
  .share-status,
  .result-url {
    grid-column: auto;
  }

  .result-actions {
    justify-content: flex-start;
  }

  .share-status,
  .result-url {
    margin-top: -24px;
    text-align: left;
  }

  .anomaly-info-heading {
    grid-template-columns: 1fr;
  }

  .anomaly-info-heading .eyebrow {
    grid-column: auto;
    margin-bottom: -24px;
  }
}

@media (max-width: 700px) {
  .anomaly-site,
  .anomaly-site main,
  .anomaly-hero > *,
  .game-stage,
  .game-panel {
    min-width: 0;
  }

  .anomaly-topbar {
    gap: 8px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .anomaly-topbar .brand {
    gap: 8px;
  }

  .anomaly-topbar .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .anomaly-topbar .brand-copy strong {
    font-size: 15px;
  }

  .anomaly-topbar .brand-copy small {
    font-size: 6px;
  }

  .anomaly-topbar .back-home {
    min-height: 40px;
    padding: 0 10px;
    font-size: 11px;
    white-space: nowrap;
  }

  .anomaly-hero {
    gap: 38px;
    padding: 54px 20px 52px;
  }

  .anomaly-kicker {
    max-width: 100%;
    font-size: 9px;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  .anomaly-title-block h1 {
    font-size: clamp(58px, 18.5vw, 76px);
  }

  .anomaly-title-block > p:last-child {
    margin-top: 28px;
    font-size: 16px;
  }

  .anomaly-status-card {
    width: 100%;
    padding: 26px;
  }

  .anomaly-status-card dl,
  .result-scoreboard dl {
    gap: 8px;
  }

  .anomaly-status-card > strong {
    font-size: 21px;
  }

  .game-stage-wrap {
    padding: 32px 12px 48px;
  }

  .game-stage {
    border-radius: 24px;
  }

  .game-panel {
    min-height: 620px;
    padding: 28px 18px;
  }

  .intro-copy h2,
  .result-copy h2 {
    font-size: 38px;
  }

  .intro-copy > p:last-child {
    font-size: 14px;
  }

  .intro-actions {
    flex-direction: column;
  }

  .corridor-frame {
    border-width: 5px;
    border-radius: 16px;
  }

  .clock {
    width: 38px;
    height: 38px;
    border-width: 3px;
    font-size: 7px;
  }

  .poster {
    padding: 6px;
    border-width: 2px;
  }

  .notice {
    padding: 5px;
  }

  .exit-sign {
    padding: 0 5%;
  }

  .door {
    border-width: 2px;
  }

  .walker .bag {
    border-width: 2px;
  }

  .game-hud {
    gap: 8px;
  }

  .game-hud strong {
    font-size: 16px;
  }

  .scene-question {
    bottom: 9px;
    width: max-content;
    max-width: 85%;
    padding: 6px 10px;
    font-size: 10px;
  }

  .feedback-toast {
    top: 9px;
    font-size: 11px;
  }

  .choice-buttons {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .choice-button {
    min-height: 82px;
    padding: 13px 16px 13px 64px;
    border-radius: 15px;
  }

  .choice-button > span {
    left: 16px;
    width: 34px;
    height: 34px;
  }

  .choice-button strong {
    font-size: 16px;
  }

  .result-panel {
    gap: 32px;
  }

  .result-scoreboard {
    padding: 28px 22px;
  }

  .result-main-score strong {
    font-size: 82px;
  }

  .result-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .result-actions .anomaly-primary {
    grid-column: 1 / -1;
  }

  .anomaly-info {
    padding: 72px 20px 78px;
  }

  .anomaly-info h2 {
    font-size: 39px;
  }

  .anomaly-info-grid {
    grid-template-columns: 1fr;
  }

  .anomaly-info-grid article {
    min-height: 0;
  }

  .anomaly-info-grid article > span {
    margin-bottom: 24px;
  }

  .anomaly-note {
    gap: 26px;
    margin-top: 48px;
    padding: 32px 24px;
    border-radius: 24px;
  }

  .anomaly-note-copy p {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-frame.is-entering .corridor-scene {
    animation: none;
  }

  .scene-flash,
  .anomaly-primary,
  .anomaly-secondary,
  .choice-button {
    transition: none;
  }
}
