:root {
  --vh: 1vh;
  --ink: #151820;
  --muted: #707682;
  --terminal-bg: #070a0f;
  --terminal-panel: #0b1018;
  --terminal-green: #80ffb4;
  --terminal-dim: #6a7584;
  --terminal-yellow: #ffd166;
  --terminal-white: #eef5ff;
  --terminal-red: #ff8fa3;
  --cream: #fff8ef;
  --paper: #fffaf2;
  --line: rgba(33, 38, 50, 0.12);
  --gold: #f7b955;
  --teal: #66d9c2;
  --rose: #e7677c;
  --blue: #5d87ff;
  --shadow: 0 22px 70px rgba(31, 27, 20, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--terminal-bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.app-shell,
.app-shell *,
.wechat-gate,
.wechat-gate * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.app-shell img,
.app-shell canvas {
  -webkit-user-drag: none;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

a {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.wechat-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: calc(var(--vh) * 100);
  padding: calc(70px + env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, #eef6ff 0%, #ffffff 48%, #f8fbff 100%);
  color: #172033;
}

.wechat-dots {
  position: absolute;
  right: 18px;
  top: calc(13px + env(safe-area-inset-top));
  min-width: 58px;
  min-height: 40px;
  padding-top: 2px;
  border-radius: 999px;
  color: #1769d9;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(23, 105, 217, 0.14);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 25px;
  font-weight: 800;
  text-align: center;
}

.wechat-arrow {
  position: absolute;
  right: 48px;
  top: calc(62px + env(safe-area-inset-top));
  width: 94px;
  height: 72px;
  border-top: 4px solid #1769d9;
  border-right: 4px solid #1769d9;
  border-radius: 0 54px 0 0;
  transform: rotate(-10deg);
}

.wechat-arrow::before,
.wechat-arrow::after {
  content: "";
  position: absolute;
  right: -7px;
  top: -8px;
  width: 20px;
  height: 4px;
  border-radius: 999px;
  background: #1769d9;
  transform-origin: right center;
}

.wechat-arrow::before {
  transform: rotate(44deg);
}

.wechat-arrow::after {
  transform: rotate(-44deg);
}

.wechat-card {
  width: min(100%, 390px);
  padding: 34px 22px 24px;
  border: 1px solid rgba(23, 105, 217, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(23, 47, 86, 0.13);
  text-align: center;
}

.safari-icon {
  position: relative;
  width: 82px;
  height: 82px;
  margin: 0 auto 18px;
  border: 5px solid #ffffff;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #e7f6ff 0 8%, transparent 9%),
    conic-gradient(from 45deg, #e7364c 0 7%, #ffffff 7% 9%, #1b8dff 9% 57%, #ffffff 57% 59%, #e7364c 59% 100%);
  box-shadow:
    0 12px 28px rgba(23, 105, 217, 0.22),
    inset 0 0 0 2px rgba(255, 255, 255, 0.72);
}

.safari-icon::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
}

.safari-icon::after {
  content: "Safari";
  position: absolute;
  left: 50%;
  top: 96px;
  color: #1769d9;
  font-size: 12px;
  font-weight: 800;
  transform: translateX(-50%);
}

.safari-needle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 52px;
  transform: translate(-50%, -50%) rotate(38deg);
  transform-origin: center;
}

.safari-needle::before,
.safari-needle::after {
  content: "";
  position: absolute;
  left: 0;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
}

.safari-needle::before {
  top: 0;
  border-bottom: 30px solid #ffffff;
}

.safari-needle::after {
  bottom: 0;
  border-top: 30px solid #e7364c;
}

.wechat-card h1 {
  margin: 30px 0 18px;
  color: #172033;
  font-size: 27px;
  line-height: 1.22;
  letter-spacing: 0;
}

.wechat-card p {
  margin: 8px 0;
  color: #4f5f77;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.55;
}

.wechat-card em {
  display: block;
  margin-top: 22px;
  color: #8b98aa;
  font-size: 12px;
  font-style: normal;
  line-height: 1.55;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  min-height: calc(var(--vh) * 100);
  overflow: hidden;
  background: var(--terminal-bg);
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  min-height: 100vh;
  min-height: calc(var(--vh) * 100);
  padding: calc(20px + env(safe-area-inset-top)) 18px calc(22px + env(safe-area-inset-bottom));
}

.screen.is-active {
  display: flex;
}

.terminal-screen {
  align-items: stretch;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(128, 255, 180, 0.06), transparent 38%),
    var(--terminal-bg);
}

.terminal-window {
  display: flex;
  flex-direction: column;
  width: min(100%, 760px);
  min-height: calc(var(--vh) * 100 - 44px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  margin: auto;
  overflow: hidden;
  border: 1px solid rgba(128, 255, 180, 0.16);
  border-radius: 8px;
  background: var(--terminal-panel);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.45);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--terminal-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.terminal-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff6b6b;
}

.terminal-bar span:nth-child(2) {
  background: #ffd166;
}

.terminal-bar span:nth-child(3) {
  background: #80ffb4;
}

.terminal-bar strong {
  margin-left: 6px;
  font-weight: 500;
}

.terminal-body {
  flex: 1 1 auto;
  min-height: 420px;
  max-height: calc(var(--vh) * 100 - 120px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  padding: 18px 16px 4px;
  overflow: hidden;
  color: var(--terminal-green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.75;
}

.terminal-line {
  margin: 0 0 6px;
  overflow-wrap: anywhere;
}

.terminal-line.is-dim {
  color: var(--terminal-dim);
}

.terminal-line.is-alert {
  color: var(--terminal-yellow);
}

.terminal-line.is-error {
  color: var(--terminal-red);
}

.terminal-line.is-question {
  color: var(--terminal-white);
}

.terminal-choices {
  display: none;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 0 16px 8px;
  color: var(--terminal-green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
}

.terminal-choices.is-visible {
  display: grid;
}

.terminal-choice {
  min-height: 30px;
  padding: 0;
  border: 0;
  color: var(--terminal-green);
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
}

.terminal-choice:active,
.terminal-choice:focus {
  color: var(--terminal-white);
  outline: none;
}

.terminal-choice.is-wrong {
  color: var(--terminal-dim);
  text-decoration: line-through;
}

.terminal-choice:disabled {
  opacity: 0.55;
}

.terminal-launch {
  display: block;
  width: auto;
  min-height: 28px;
  margin: 4px 16px 0;
  padding: 0;
  border: 0;
  color: var(--terminal-yellow);
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.26s ease, transform 0.26s ease;
}

.terminal-launch::before {
  content: ">> ";
  color: var(--terminal-green);
}

.terminal-launch.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.terminal-cursor {
  flex: 0 0 auto;
  padding: 8px 16px 18px;
  color: var(--terminal-green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  animation: blink 0.9s steps(2, start) infinite;
}

.terminal-screen.is-complete {
  animation: terminalExit 0.58s ease forwards;
}

.lobby-screen {
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(255, 248, 239, 0.98), rgba(247, 252, 250, 0.98)),
    var(--cream);
}

.soft-glow {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 215, 133, 0.16), transparent 42%),
    linear-gradient(300deg, rgba(102, 217, 194, 0.14), transparent 45%);
}

.eyebrow {
  margin: 0 0 10px;
  color: #e05f78;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow.cool {
  color: #247a6c;
}

.lobby-card {
  position: relative;
  width: min(100%, 500px);
  padding: 28px 22px;
  border: 1px solid rgba(30, 22, 30, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

.lobby-card h2,
.meeting-header h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0;
}

.lobby-copy {
  margin: 14px 0 18px;
  color: var(--muted);
  line-height: 1.65;
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 18px 0 20px;
}

.status-grid div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 244, 232, 0.76);
}

.status-grid span {
  color: var(--muted);
}

.status-grid strong {
  color: var(--ink);
}

.primary-action {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  color: #15201c;
  background: linear-gradient(180deg, #ffd987, #f0ad42);
  box-shadow: 0 12px 26px rgba(183, 117, 34, 0.2);
  font-weight: 800;
}

.primary-action:active {
  transform: translateY(1px);
}

.level-screen {
  align-items: flex-start;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at 16% 10%, rgba(59, 190, 210, 0.34), transparent 31%),
    radial-gradient(circle at 86% 12%, rgba(255, 209, 102, 0.18), transparent 28%),
    linear-gradient(180deg, #07111c 0%, #0c2630 48%, #102a2f 100%);
}

.level-screen::before,
.level-screen::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.level-screen::before {
  opacity: 0.6;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(98, 225, 226, 0.08) 8.5% 9%, transparent 9.5% 19%),
    linear-gradient(0deg, transparent 0 12%, rgba(255, 255, 255, 0.05) 12.4% 12.8%, transparent 13.2% 24%);
  background-size: 180px 120px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 12%, #000 76%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 12%, #000 76%, transparent);
}

.level-screen::after {
  background:
    radial-gradient(ellipse at 50% 115%, rgba(4, 8, 14, 0.74) 0 42%, transparent 43%),
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.28) 100%);
}

.effect-canvas {
  position: fixed;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.meeting-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-areas:
    "header"
    "self"
    "answers"
    "speech";
  gap: 12px;
  width: min(100%, 980px);
  padding-bottom: 18px;
}

.meeting-header {
  position: relative;
  grid-area: header;
  display: block;
  min-height: 128px;
  padding: 80px 12px 14px;
  border: 2px solid rgba(145, 242, 236, 0.25);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(13, 36, 47, 0.78), rgba(6, 15, 25, 0.9)),
    radial-gradient(circle at 24% 0%, rgba(255, 213, 73, 0.26), transparent 28%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 22px 58px rgba(0, 0, 0, 0.28);
}

.meeting-header::before {
  content: "DISCUSSION";
  position: absolute;
  left: 50%;
  top: 8px;
  color: #fff6db;
  font-family: Impact, "Arial Black", "PingFang SC", sans-serif;
  font-size: clamp(26px, 8vw, 42px);
  line-height: 1;
  letter-spacing: 0;
  text-shadow:
    0 3px 0 #0b1018,
    0 0 18px rgba(255, 234, 163, 0.35);
  transform: translateX(-50%);
  z-index: 0;
}

.meeting-header::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 58px;
  height: 13px;
  border: 2px solid rgba(8, 11, 18, 0.82);
  border-radius: 999px;
  background:
    linear-gradient(90deg, #ffd238 0 67%, #efe6da 67% 78%, rgba(239, 230, 218, 0.38) 78% 100%);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
  z-index: 0;
}

.meeting-header > div {
  position: relative;
  z-index: 1;
}

.meeting-header .eyebrow {
  display: none;
  margin-bottom: 5px;
  color: #8af8ef;
  text-shadow: 0 0 12px rgba(138, 248, 239, 0.34);
}

.meeting-header h2 {
  color: #eefcff;
  font-size: 17px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.36);
}

.meeting-status {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  flex: 0 0 auto;
  min-width: 82px;
  min-height: 34px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  color: #2a1b09;
  background: linear-gradient(180deg, #fff0a8, #f6bd38);
  box-shadow:
    0 4px 0 rgba(82, 48, 10, 0.72),
    0 12px 24px rgba(0, 0, 0, 0.25);
  font-family: Impact, "Arial Black", "PingFang SC", sans-serif;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.identity-card,
.speech-board,
.answer-board {
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(164, 255, 246, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(14, 33, 43, 0.9), rgba(7, 17, 28, 0.94));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 18px 42px rgba(0, 0, 0, 0.26);
}

.identity-card::before,
.speech-board::before,
.answer-board::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 32%),
    radial-gradient(circle at 100% 0%, rgba(255, 210, 56, 0.08), transparent 30%);
  pointer-events: none;
}

.self-identity {
  grid-area: self;
  display: grid;
  grid-template-columns: 66px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 94px;
  padding: 12px;
}

.self-identity img {
  position: relative;
  z-index: 1;
  width: 66px;
  height: 66px;
  border: 3px solid #ffd23d;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 210, 61, 0.2), transparent),
    #101722;
  object-fit: cover;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.28);
}

.self-identity div {
  position: relative;
  z-index: 1;
}

.self-identity span,
.self-identity em {
  display: block;
  color: #91dfe0;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.self-identity strong {
  display: block;
  margin: 4px 0;
  color: #fff7df;
  font-family: Impact, "Arial Black", "PingFang SC", sans-serif;
  font-size: 25px;
  line-height: 1.05;
  letter-spacing: 0;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.42);
}

.speech-board {
  grid-area: speech;
  padding: 14px;
}

.answer-board {
  grid-area: answers;
  padding: 14px;
}

.section-title {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-title span {
  color: #fff7df;
  font-family: Impact, "Arial Black", "PingFang SC", sans-serif;
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.42);
}

.section-title strong {
  min-width: 54px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 210, 61, 0.4);
  border-radius: 8px;
  color: #fff0a8;
  background: rgba(255, 210, 61, 0.08);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.speech-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.speech-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  align-items: start;
  min-height: 76px;
}

.speech-avatar,
.role-icon {
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.24), transparent 34%),
    #10212c;
  object-fit: contain;
  padding: 0;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.32);
}

.speech-bubble {
  position: relative;
  min-width: 0;
  padding: 9px 11px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: linear-gradient(180deg, #f6ffff, #dff7f7);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.2);
}

.speech-bubble::before {
  content: "";
  position: absolute;
  top: 15px;
  left: -8px;
  width: 12px;
  height: 12px;
  border-left: 2px solid rgba(255, 255, 255, 0.78);
  border-bottom: 2px solid rgba(255, 255, 255, 0.78);
  background: #eafcfc;
  transform: rotate(45deg);
}

.speech-name {
  display: block;
  margin-bottom: 5px;
  color: #063b44;
  font-family: Impact, "Arial Black", "PingFang SC", sans-serif;
  font-size: 15px;
  line-height: 1;
  font-weight: 900;
}

.speech-text {
  margin: 0;
  color: #183240;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.player-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.player-card {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  min-height: 118px;
  padding: 10px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(5, 8, 13, 0.64), rgba(5, 8, 13, 0.1)),
    linear-gradient(135deg, #2a5f84, #0f2434 54%, #0d151f);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 8px 0 rgba(0, 0, 0, 0.25);
}

.player-card:nth-child(2) {
  background:
    linear-gradient(90deg, rgba(5, 8, 13, 0.64), rgba(5, 8, 13, 0.1)),
    linear-gradient(135deg, #543d8d, #193945 58%, #121822);
}

.player-card:nth-child(3) {
  background:
    linear-gradient(90deg, rgba(5, 8, 13, 0.64), rgba(5, 8, 13, 0.1)),
    linear-gradient(135deg, #6a3c38, #24404c 58%, #111923);
}

.player-card:nth-child(4) {
  background:
    linear-gradient(90deg, rgba(5, 8, 13, 0.64), rgba(5, 8, 13, 0.1)),
    linear-gradient(135deg, #6f5b2d, #26414a 58%, #111923);
}

.player-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24px;
  background: rgba(255, 255, 255, 0.92);
}

.player-card::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

.player-card.is-correct {
  border-color: #9cea50;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 0 3px rgba(156, 234, 80, 0.18),
    0 8px 0 rgba(0, 0, 0, 0.25);
}

.player-card.is-correct::after {
  content: "✓";
  display: grid;
  place-items: center;
  color: #9cea50;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 64px;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.5);
  background: rgba(10, 25, 12, 0.16);
}

.player-card.is-wrong {
  border-color: #ff4b3f;
  filter: saturate(0.82);
}

.player-card.is-wrong::after {
  content: "X";
  display: grid;
  place-items: center;
  color: #e92024;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 76px;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.5);
  background: rgba(55, 0, 0, 0.14);
}

.player-main {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.player-name {
  position: absolute;
  left: -64px;
  right: 0;
  bottom: -2px;
  z-index: 1;
  display: block;
  min-height: 22px;
  padding: 4px 8px 2px 66px;
  color: #20242e;
  font-family: Impact, "Arial Black", "PingFang SC", sans-serif;
  font-size: 15px;
  line-height: 1;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding-bottom: 26px;
}

.role-option {
  min-height: 32px;
  padding: 0 7px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #eafcff;
  background: rgba(8, 14, 22, 0.54);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  white-space: normal;
}

.role-option.is-selected {
  border-color: #ffd23d;
  color: #221507;
  background: linear-gradient(180deg, #fff0a8, #f8be32);
  box-shadow:
    0 0 0 2px rgba(255, 210, 61, 0.22),
    inset 0 -2px 0 rgba(120, 70, 10, 0.22);
}

.role-option:disabled {
  opacity: 0.76;
}

.submit-action {
  position: relative;
  z-index: 1;
  margin-top: 12px;
}

.guard-overlay,
.reward-panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(22px + env(safe-area-inset-top)) 18px calc(22px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 210, 61, 0.1), transparent 30%),
    rgba(3, 5, 10, 0.82);
  backdrop-filter: blur(5px);
}

.system-toast {
  position: fixed;
  left: 50%;
  top: calc(18px + env(safe-area-inset-top));
  z-index: 20;
  width: min(calc(100% - 28px), 420px);
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid rgba(128, 255, 180, 0.34);
  border-radius: 8px;
  color: var(--terminal-green);
  background: rgba(8, 11, 18, 0.9);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
  transform: translateX(-50%);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.system-toast.is-leaving {
  opacity: 0;
  transform: translate(-50%, -8px);
}

.guard-overlay[hidden],
.reward-panel[hidden] {
  display: none;
}

.guard-stage,
.reward-card {
  position: relative;
  color: #fff7df;
  text-align: center;
}

.guard-stage {
  display: grid;
  justify-items: center;
  width: min(100%, 420px);
  min-height: min(640px, calc(var(--vh) * 100 - 48px));
  padding: 18px 12px 20px;
  animation: guardStageIn 0.42s ease-out both;
}

.guard-stage::before,
.guard-stage::after {
  content: "";
  position: absolute;
  inset: 8% -12%;
  pointer-events: none;
}

.guard-stage::before {
  opacity: 0.9;
  background:
    repeating-conic-gradient(from 0deg, rgba(255, 214, 73, 0.22) 0deg 8deg, transparent 8deg 18deg),
    radial-gradient(circle, rgba(255, 234, 163, 0.35), rgba(255, 210, 61, 0.06) 32%, transparent 62%);
  filter: blur(0.2px);
  animation: guardRaysSpin 8s linear infinite;
}

.guard-stage::after {
  opacity: 0.42;
  background:
    radial-gradient(circle at 50% 38%, transparent 0 28%, rgba(255, 255, 255, 0.24) 29%, transparent 31%),
    radial-gradient(circle at 50% 38%, transparent 0 40%, rgba(255, 210, 61, 0.22) 41%, transparent 43%);
  transform: scale(0.7);
  animation: guardShockwave 1.55s 0.48s ease-out both;
}

.guard-rift {
  position: absolute;
  left: 50%;
  top: 44%;
  z-index: 0;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 249, 213, 0.5) 0 8%, rgba(255, 210, 61, 0.28) 9% 22%, rgba(102, 217, 194, 0.16) 23% 42%, transparent 60%);
  filter: blur(1px);
  transform: translate(-50%, -50%) scale(0);
  animation: guardRiftOpen 0.9s 0.18s cubic-bezier(.16, 1, .3, 1) both;
}

.guard-id {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin-top: 6px;
  padding: 0 14px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  color: #271806;
  background: linear-gradient(180deg, #fff0a8, #f5b93c);
  box-shadow:
    0 5px 0 rgba(75, 40, 9, 0.74),
    0 0 28px rgba(255, 210, 61, 0.24);
  font-family: Impact, "Arial Black", "PingFang SC", sans-serif;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0;
  opacity: 0;
  transform: translateY(-18px) scale(0.85);
  animation: guardNameDrop 0.48s 0.62s cubic-bezier(.2, 1.45, .36, 1) forwards;
}

.guard-figure {
  position: relative;
  z-index: 1;
  width: min(82vw, 300px);
  height: min(86vw, 330px);
  margin: 8px auto -4px;
}

.guard-aura,
.guard-rays {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.guard-aura {
  width: 92%;
  height: 82%;
  background:
    radial-gradient(circle, rgba(255, 239, 184, 0.38) 0 14%, rgba(255, 210, 61, 0.18) 15% 38%, transparent 62%);
  filter: blur(4px);
  opacity: 0;
  animation: guardAuraPulse 1.3s 0.45s ease-out forwards, guardAuraIdle 2.2s 1.75s ease-in-out infinite;
}

.guard-rays {
  width: 108%;
  height: 96%;
  opacity: 0;
  background:
    conic-gradient(from 12deg, transparent 0 8deg, rgba(255, 240, 168, 0.78) 9deg 12deg, transparent 13deg 28deg);
  filter: drop-shadow(0 0 12px rgba(255, 210, 61, 0.46));
  animation: guardRaysPop 0.56s 0.55s ease-out forwards, guardRaysSpinCentered 9s 1.1s linear infinite;
}

.guard-goose {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 2;
  width: min(74vw, 260px);
  height: auto;
  transform: translate(-50%, 90px) scale(0.18) rotate(-12deg);
  transform-origin: 50% 76%;
  opacity: 0;
  filter:
    drop-shadow(0 28px 18px rgba(0, 0, 0, 0.46))
    drop-shadow(0 0 18px rgba(255, 232, 128, 0.36));
  animation: guardHeroEntrance 0.98s 0.36s cubic-bezier(.16, 1.34, .3, 1) forwards;
}

.guard-badge {
  position: absolute;
  right: 13%;
  bottom: 12%;
  z-index: 3;
  width: 74px;
  height: 72px;
  object-fit: contain;
  opacity: 0;
  transform: scale(0) rotate(-28deg);
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.42));
  animation: guardBadgeSlam 0.42s 1.18s cubic-bezier(.2, 1.6, .36, 1) forwards;
}

.guard-message {
  position: relative;
  z-index: 2;
  width: min(100%, 390px);
  margin: -2px auto 16px;
  color: #fff8d8;
  font-family: Impact, "Arial Black", "PingFang SC", sans-serif;
  font-size: clamp(34px, 11vw, 56px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: 0;
  text-shadow:
    0 5px 0 #3a1706,
    0 9px 0 rgba(0, 0, 0, 0.55),
    0 0 24px rgba(255, 210, 61, 0.58);
  -webkit-text-stroke: 1px rgba(69, 24, 5, 0.74);
  transform: scale(0.18) rotate(-4deg);
  opacity: 0;
  animation: guardTextBoom 0.66s 1.02s cubic-bezier(.17, 1.65, .34, 1) forwards;
}

.summon-button {
  position: relative;
  z-index: 3;
  width: min(100%, 330px);
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  color: #211407;
  background:
    linear-gradient(180deg, #fff5b7, #f6bd38 58%, #d9821f);
  box-shadow:
    0 7px 0 #70380e,
    0 18px 38px rgba(0, 0, 0, 0.38),
    0 0 22px rgba(255, 210, 61, 0.34);
  font-family: Impact, "Arial Black", "PingFang SC", sans-serif;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: 0;
  opacity: 0;
  transform: translateY(22px) scale(0.94);
  animation: guardButtonRise 0.42s 1.62s ease-out forwards;
}

.summon-button:disabled {
  opacity: 0.88;
}

.summon-button:active {
  transform: translateY(7px) scale(0.98);
  box-shadow:
    0 2px 0 #70380e,
    0 12px 28px rgba(0, 0, 0, 0.36),
    0 0 22px rgba(255, 210, 61, 0.34);
}

.guard-overlay.is-summoned .guard-stage {
  animation: guardScreenShake 0.55s linear both;
}

.guard-overlay.is-summoned .guard-rift {
  animation: guardRiftBlast 0.85s ease-out both;
}

.guard-overlay.is-summoned .guard-message {
  color: #baffef;
  text-shadow:
    0 5px 0 #07352f,
    0 9px 0 rgba(0, 0, 0, 0.55),
    0 0 28px rgba(128, 255, 180, 0.78);
  -webkit-text-stroke-color: rgba(5, 47, 42, 0.78);
  animation: guardTextFinal 0.52s cubic-bezier(.17, 1.65, .34, 1) both;
}

.guard-overlay.is-summoned .guard-goose {
  animation: guardHeroPower 0.72s ease-out both;
}

.guard-overlay.is-summoned .guard-badge {
  animation: guardBadgePulse 0.72s ease-out both;
}

.guard-overlay.is-summoned .summon-button {
  animation: guardButtonPress 0.28s ease-out both;
}

.reward-card {
  width: min(100%, 360px);
  padding: 22px 18px 18px;
  border: 1px solid rgba(255, 217, 135, 0.46);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffaf2, #fff0e9);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.44);
  color: var(--ink);
}

.reward-card span {
  display: block;
  color: #247a6c;
  font-size: 13px;
  font-weight: 800;
}

.reward-card p {
  margin: 14px 0 8px;
  color: var(--muted);
}

.reward-card strong {
  display: block;
  margin-bottom: 18px;
  padding: 14px 12px;
  border: 1px dashed rgba(183, 117, 34, 0.38);
  border-radius: 8px;
  color: #a95116;
  background: #fff7da;
  font-size: 26px;
  letter-spacing: 0;
}

.reward-card em {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.5;
}

.reward-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.reward-link.is-claimed {
  opacity: 0.62;
}

.reward-next-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
  border: 0;
  background: linear-gradient(180deg, #dfffd3, #7ccf62);
  color: #123014;
}

.reward-next-button:disabled {
  opacity: 0.54;
}

@keyframes blink {
  0%, 45% {
    opacity: 1;
  }
  46%, 100% {
    opacity: 0;
  }
}

@keyframes terminalExit {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.015);
  }
}

@keyframes guardStageIn {
  from {
    opacity: 0;
    transform: scale(1.08);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes guardRiftOpen {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.05) rotate(-18deg);
  }
  52% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08) rotate(8deg);
  }
  100% {
    opacity: 0.86;
    transform: translate(-50%, -50%) scale(0.88) rotate(0deg);
  }
}

@keyframes guardRiftBlast {
  0% {
    opacity: 0.88;
    transform: translate(-50%, -50%) scale(0.86);
  }
  65% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.42);
  }
  100% {
    opacity: 0.2;
    transform: translate(-50%, -50%) scale(2.1);
  }
}

@keyframes guardNameDrop {
  0% {
    opacity: 0;
    transform: translateY(-18px) scale(0.85);
  }
  72% {
    opacity: 1;
    transform: translateY(3px) scale(1.08);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes guardAuraPulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
  }
  72% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
  100% {
    opacity: 0.92;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes guardAuraIdle {
  0%, 100% {
    transform: translate(-50%, -50%) scale(0.98);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.08);
  }
}

@keyframes guardRaysPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
  }
  100% {
    opacity: 0.86;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes guardRaysSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes guardRaysSpinCentered {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes guardShockwave {
  0% {
    opacity: 0.78;
    transform: scale(0.3);
  }
  100% {
    opacity: 0;
    transform: scale(1.26);
  }
}

@keyframes guardHeroEntrance {
  0% {
    opacity: 0;
    filter:
      blur(8px)
      drop-shadow(0 28px 18px rgba(0, 0, 0, 0.46))
      drop-shadow(0 0 18px rgba(255, 232, 128, 0.36));
    transform: translate(-50%, 90px) scale(0.18) rotate(-12deg);
  }
  58% {
    opacity: 1;
    transform: translate(-50%, -18px) scale(1.12) rotate(5deg);
  }
  78% {
    transform: translate(-50%, 5px) scale(0.96) rotate(-2deg);
  }
  100% {
    opacity: 1;
    filter:
      blur(0)
      drop-shadow(0 28px 18px rgba(0, 0, 0, 0.46))
      drop-shadow(0 0 18px rgba(255, 232, 128, 0.36));
    transform: translate(-50%, 0) scale(1) rotate(0deg);
  }
}

@keyframes guardHeroPower {
  0% {
    transform: translate(-50%, 0) scale(1);
  }
  40% {
    transform: translate(-50%, -18px) scale(1.08) rotate(-2deg);
    filter:
      drop-shadow(0 28px 18px rgba(0, 0, 0, 0.46))
      drop-shadow(0 0 34px rgba(128, 255, 180, 0.76));
  }
  100% {
    transform: translate(-50%, 0) scale(1.02);
  }
}

@keyframes guardBadgeSlam {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-28deg);
  }
  70% {
    opacity: 1;
    transform: scale(1.22) rotate(8deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes guardBadgePulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  45% {
    transform: scale(1.28) rotate(10deg);
    filter:
      drop-shadow(0 10px 10px rgba(0, 0, 0, 0.42))
      drop-shadow(0 0 24px rgba(255, 210, 61, 0.82));
  }
}

@keyframes guardTextBoom {
  0% {
    opacity: 0;
    transform: scale(0.18) rotate(-4deg);
  }
  58% {
    opacity: 1;
    transform: scale(1.16) rotate(2deg);
  }
  76% {
    transform: scale(0.94) rotate(-1deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes guardTextFinal {
  0% {
    opacity: 0.4;
    transform: scale(0.72) rotate(3deg);
  }
  64% {
    opacity: 1;
    transform: scale(1.22) rotate(-2deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes guardButtonRise {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes guardButtonPress {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0.58;
    transform: translateY(7px) scale(0.98);
  }
}

@keyframes guardScreenShake {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  15% {
    transform: translate(-7px, 4px) scale(1.01);
  }
  30% {
    transform: translate(6px, -3px) scale(1.01);
  }
  45% {
    transform: translate(-4px, -2px) scale(1.012);
  }
  60% {
    transform: translate(4px, 3px) scale(1.006);
  }
  75% {
    transform: translate(-2px, 2px) scale(1.004);
  }
}

@media (min-width: 720px) {
  .screen {
    padding: calc(30px + env(safe-area-inset-top)) 28px calc(30px + env(safe-area-inset-bottom));
  }

  .terminal-body {
    font-size: 14px;
  }

  .terminal-choices,
  .terminal-choice,
  .terminal-launch,
  .terminal-cursor {
    font-size: 14px;
  }

  .lobby-card {
    padding: 34px 32px;
  }

  .status-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .status-grid div {
    display: block;
  }

  .status-grid strong,
  .status-grid span {
    display: block;
  }

  .status-grid strong {
    margin-top: 6px;
  }

  .meeting-shell {
    grid-template-columns: minmax(0, 1.18fr) minmax(310px, 0.82fr);
    grid-template-areas:
      "header header"
      "self speech"
      "answers speech";
    gap: 14px;
  }

  .meeting-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    min-height: 112px;
    padding: 50px 18px 16px;
  }

  .meeting-header .eyebrow {
    display: block;
  }

  .meeting-header h2 {
    font-size: 23px;
  }

  .meeting-status {
    position: relative;
    right: auto;
    bottom: auto;
    width: auto;
    margin-top: 0;
  }

  .speech-board,
  .answer-board {
    padding: 16px;
  }

  .speech-board {
    align-self: stretch;
  }

  .player-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .role-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guard-stage {
    width: min(100%, 520px);
  }

  .guard-figure {
    width: 330px;
    height: 360px;
  }

  .guard-goose {
    width: 292px;
  }

  .guard-message {
    width: 500px;
    font-size: 62px;
  }
}

@media (max-width: 360px) {
  .screen {
    padding-left: 12px;
    padding-right: 12px;
  }

  .lobby-card h2,
  .meeting-header h2 {
    font-size: 23px;
  }

  .role-options {
    grid-template-columns: 1fr;
  }
}

.level-screen {
  align-items: stretch;
  justify-content: center;
  padding: calc(12px + env(safe-area-inset-top)) 8px calc(12px + env(safe-area-inset-bottom));
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), transparent 12%, transparent 84%, rgba(0, 0, 0, 0.86)),
    linear-gradient(180deg, rgba(4, 7, 12, 0.18), rgba(0, 0, 0, 0.58)),
    url("./assets/western-town.svg") center / cover no-repeat,
    #05070c;
}

.level-screen::before {
  opacity: 0.38;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 209, 102, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(8, 14, 22, 0.1), rgba(0, 0, 0, 0.62));
  -webkit-mask-image: none;
  mask-image: none;
}

.level-screen::after {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.62), transparent 18%, transparent 80%, rgba(0, 0, 0, 0.7)),
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.38) 100%);
}

.western-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "header"
    "cards"
    "footer";
  gap: 10px;
  width: min(100%, 520px);
  min-height: calc(var(--vh) * 100 - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  padding: 4px 54px 6px 4px;
}

.western-header {
  position: relative;
  grid-area: header;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "title title"
    "meter timer";
  align-items: center;
  column-gap: 10px;
  row-gap: 9px;
  padding: 3px 2px 0;
  color: #fffaf0;
  text-align: center;
}

.western-header .phase-stars:first-child {
  position: absolute;
  left: 8%;
  top: 25px;
}

.western-header .phase-stars:nth-child(3) {
  position: absolute;
  right: 14%;
  top: 25px;
}

.phase-stars {
  color: #ffd56a;
  font-size: 20px;
  text-shadow: 0 0 12px rgba(255, 213, 106, 0.58);
}

.western-header h2 {
  grid-area: title;
  margin: 0;
  color: #fbfbfb;
  font-family: Impact, "Arial Black", "PingFang SC", sans-serif;
  font-size: clamp(38px, 11vw, 66px);
  line-height: 0.98;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow:
    0 4px 0 #171717,
    0 7px 0 rgba(0, 0, 0, 0.62),
    0 0 18px rgba(255, 255, 255, 0.18);
  -webkit-text-stroke: 1px #101010;
}

.round-meter {
  grid-area: meter;
  height: 25px;
  padding: 4px;
  border: 4px solid #050505;
  border-radius: 999px;
  background: linear-gradient(180deg, #313131, #1d1d1d);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.18),
    0 7px 18px rgba(0, 0, 0, 0.5);
}

.round-meter span {
  display: block;
  width: 68%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(180deg, #ffeb57, #f6b91f);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.38),
    0 0 12px rgba(255, 199, 30, 0.42);
}

.western-header .meeting-status {
  grid-area: timer;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 82px;
  min-height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  color: #f7f7f7;
  background: transparent;
  box-shadow: none;
  font-family: Impact, "Arial Black", "PingFang SC", sans-serif;
  font-size: clamp(26px, 8vw, 45px);
  line-height: 1;
  text-align: right;
  text-shadow:
    0 3px 0 #121212,
    0 0 12px rgba(255, 255, 255, 0.22);
}

.western-header .meeting-status::before {
  content: "⏱";
  margin-right: 6px;
  color: #ffd36a;
  font-size: 0.74em;
}

.western-tools {
  position: absolute;
  right: 0;
  top: 142px;
  z-index: 3;
  display: grid;
  gap: 13px;
  width: 46px;
  color: #fff;
  text-align: center;
}

.western-tools span {
  display: grid;
  justify-items: center;
  gap: 2px;
  color: #fff;
  font-family: Impact, "Arial Black", "PingFang SC", sans-serif;
  font-size: 27px;
  line-height: 1;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.82);
  opacity: 0.94;
}

.western-tools em {
  color: #fff;
  font-size: 13px;
  font-style: normal;
  letter-spacing: 0;
}

.western-cards {
  grid-area: cards;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: center;
  gap: 8px;
  min-height: 0;
}

.western-shell .player-card {
  all: unset;
  position: relative;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: 52% 48%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 0.58;
  overflow: visible;
  border: 3px solid rgba(255, 255, 255, 0.5);
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(116, 80, 36, 0.9), rgba(31, 20, 18, 0.88));
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.48),
    0 8px 12px rgba(0, 0, 0, 0.42);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.western-shell .player-card:nth-child(1) {
  grid-column: 1;
}

.western-shell .player-card:nth-child(4) {
  grid-column: 1 / span 1;
  transform: translateX(48%);
}

.western-shell .player-card:nth-child(5) {
  grid-column: 2 / span 1;
  transform: translateX(48%);
}

.western-shell .player-card.tone-gold {
  border-color: #ffdf35;
  background:
    linear-gradient(180deg, rgba(255, 207, 76, 0.28), transparent 38%),
    linear-gradient(135deg, rgba(158, 95, 35, 0.92), rgba(50, 26, 17, 0.9));
}

.western-shell .player-card.tone-blue {
  background:
    linear-gradient(180deg, rgba(85, 127, 226, 0.28), transparent 38%),
    linear-gradient(135deg, rgba(43, 74, 130, 0.92), rgba(17, 24, 47, 0.92));
}

.western-shell .player-card.tone-teal {
  background:
    linear-gradient(180deg, rgba(45, 198, 185, 0.28), transparent 38%),
    linear-gradient(135deg, rgba(24, 119, 112, 0.92), rgba(16, 42, 43, 0.92));
}

.western-shell .player-card.tone-orange {
  background:
    linear-gradient(180deg, rgba(244, 126, 45, 0.28), transparent 38%),
    linear-gradient(135deg, rgba(156, 74, 28, 0.94), rgba(45, 22, 14, 0.92));
}

.western-shell .player-card.tone-green {
  background:
    linear-gradient(180deg, rgba(105, 188, 79, 0.28), transparent 38%),
    linear-gradient(135deg, rgba(61, 121, 53, 0.92), rgba(20, 45, 21, 0.92));
}

.western-shell .player-card.is-current,
.western-shell .player-card.is-selected,
.western-shell .player-card.is-correct {
  border-color: #ffe23f;
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.5),
    0 0 0 2px rgba(255, 248, 167, 0.62),
    0 0 24px rgba(255, 213, 44, 0.86),
    0 10px 16px rgba(0, 0, 0, 0.45);
}

.western-shell .player-card.is-wrong {
  border-color: #ff654f;
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.5),
    0 0 18px rgba(255, 57, 43, 0.62);
  animation: wrongCardShake 0.34s ease-out both;
}

.western-shell .player-card::before,
.western-shell .player-card::after {
  display: none;
}

.player-order {
  position: absolute;
  left: 7px;
  top: 7px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 3px solid #090909;
  border-radius: 50%;
  color: #171000;
  background: linear-gradient(180deg, #fff058, #e8b823);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 20px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.player-crown {
  position: absolute;
  right: 4px;
  top: -15px;
  z-index: 4;
  color: #ffdf35;
  font-size: 34px;
  line-height: 1;
  text-shadow:
    0 3px 0 #251300,
    0 0 12px rgba(255, 223, 53, 0.7);
  transform: rotate(11deg);
  opacity: 0;
}

.western-shell .player-card.is-current .player-crown,
.western-shell .player-card.is-selected .player-crown {
  opacity: 1;
}

.player-portrait {
  position: relative;
  display: grid;
  place-items: end center;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

.western-shell .role-icon {
  width: 118%;
  height: 118%;
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
  object-position: center bottom;
  transform: translateY(11%);
  filter: drop-shadow(0 8px 5px rgba(0, 0, 0, 0.38));
}

.player-copy {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 5px;
  min-height: 0;
  padding: 0 8px 8px;
}

.western-shell .player-name {
  position: static;
  display: block;
  min-height: 27px;
  margin: -13px 0 0;
  padding: 5px 7px 3px;
  border: 2px solid #070707;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(180deg, #4661b3, #20275b);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.2),
    0 4px 0 rgba(0, 0, 0, 0.52);
  font-family: Impact, "Arial Black", "PingFang SC", sans-serif;
  font-size: clamp(12px, 3.4vw, 18px);
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.tone-gold .player-name {
  color: #171000;
  background: linear-gradient(180deg, #ffe449, #efb827);
}

.tone-teal .player-name {
  background: linear-gradient(180deg, #36bdb5, #0b7274);
}

.tone-orange .player-name {
  background: linear-gradient(180deg, #de7a28, #8a3b16);
}

.tone-green .player-name {
  background: linear-gradient(180deg, #68ad50, #2a6826);
}

.player-speech {
  min-height: 0;
  margin: 0;
  padding: 7px 7px;
  border-radius: 8px;
  color: #121212;
  background: linear-gradient(180deg, #fffdf0, #f1eadc);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
  font-size: clamp(10px, 2.7vw, 14px);
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  overflow: hidden;
}

.player-role-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 3px 5px;
  border-radius: 999px;
  color: #1a1302;
  background: linear-gradient(180deg, #ffef80, #e2b326);
  font-size: clamp(9px, 2.5vw, 12px);
  font-style: normal;
  font-weight: 900;
}

.guess-footer {
  grid-area: footer;
  display: grid;
  gap: 8px;
  padding: 2px 4px 0;
}

.guess-hint {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: #fffaf0;
  text-align: center;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.74);
}

.guess-hint::before,
.guess-hint::after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 213, 106, 0.9));
}

.guess-hint::after {
  background: linear-gradient(90deg, rgba(255, 213, 106, 0.9), transparent);
}

.guess-hint span {
  color: #ffd56a;
}

.guess-hint strong {
  font-size: clamp(15px, 4.5vw, 22px);
  letter-spacing: 0;
  white-space: nowrap;
}

.answer-progress {
  min-height: 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.guess-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 70px;
  border: 5px solid #191006;
  border-radius: 24px;
  color: #161006;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), transparent 30%),
    linear-gradient(180deg, #fff06e, #f3b12b);
  box-shadow:
    inset 0 0 0 3px rgba(255, 243, 142, 0.5),
    0 8px 0 #5a310b,
    0 16px 24px rgba(0, 0, 0, 0.46);
  font-family: Impact, "Arial Black", "PingFang SC", sans-serif;
  font-size: clamp(34px, 11vw, 56px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.guess-action span {
  font-size: 0.92em;
}

.guess-action:active {
  transform: translateY(5px);
  box-shadow:
    inset 0 0 0 3px rgba(255, 243, 142, 0.5),
    0 3px 0 #5a310b,
    0 10px 18px rgba(0, 0, 0, 0.42);
}

.guard-overlay,
.reward-panel {
  z-index: 40;
  background:
    radial-gradient(circle at 50% 62%, rgba(255, 188, 44, 0.16), transparent 32%),
    rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(3px) brightness(0.72);
}

.guard-stage {
  width: min(100%, 540px);
  min-height: min(760px, calc(var(--vh) * 100 - 34px));
  padding: 20px 4px 18px;
}

.guard-rift {
  top: 52%;
  width: min(94vw, 470px);
  height: min(94vw, 470px);
  background:
    repeating-conic-gradient(from -8deg, rgba(255, 197, 44, 0.7) 0 4deg, transparent 4deg 13deg),
    radial-gradient(circle, rgba(255, 246, 180, 0.72) 0 10%, rgba(255, 178, 36, 0.38) 11% 30%, transparent 62%);
  filter: blur(0.5px) drop-shadow(0 0 22px rgba(255, 187, 41, 0.72));
}

.guard-stage::before {
  inset: 16% -20%;
  background:
    repeating-conic-gradient(from 0deg, rgba(255, 214, 73, 0.2) 0deg 7deg, transparent 7deg 18deg),
    radial-gradient(circle, rgba(255, 234, 163, 0.38), rgba(255, 210, 61, 0.08) 32%, transparent 62%);
}

.guard-id {
  margin-top: 34px;
  font-size: 18px;
}

.guard-figure {
  width: min(88vw, 360px);
  height: min(92vw, 390px);
  margin: -2px auto -36px;
}

.guard-goose {
  width: min(82vw, 350px);
  filter:
    drop-shadow(0 28px 18px rgba(0, 0, 0, 0.52))
    drop-shadow(0 0 22px rgba(255, 213, 73, 0.88));
}

.guard-badge {
  right: 4%;
  bottom: 4%;
  width: min(18vw, 92px);
  height: auto;
}

.guard-message {
  width: min(100vw, 560px);
  margin-top: -12px;
  color: #fff7db;
  font-size: clamp(46px, 15vw, 86px);
  line-height: 0.9;
  transform: scale(0.18) rotate(-7deg);
  text-shadow:
    0 5px 0 #3b1704,
    0 10px 0 rgba(0, 0, 0, 0.74),
    0 0 22px rgba(255, 227, 118, 0.68);
}

.guard-message::before {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -18%;
  z-index: -1;
  height: 52%;
  background:
    linear-gradient(170deg, transparent 0 8%, rgba(54, 23, 4, 0.98) 9% 66%, transparent 67%),
    linear-gradient(8deg, transparent 0 14%, rgba(255, 118, 20, 0.62) 15% 26%, transparent 27%);
  transform: skewX(-13deg) rotate(-3deg);
  filter: drop-shadow(0 0 14px rgba(255, 139, 29, 0.7));
}

.summon-button {
  width: min(100%, 360px);
  margin-top: 8px;
  border-radius: 18px;
}

@keyframes wrongCardShake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  50% {
    transform: translateX(5px);
  }
  75% {
    transform: translateX(-3px);
  }
}

@media (min-width: 720px) {
  .level-screen {
    align-items: center;
  }

  .western-shell {
    width: min(100%, 740px);
    min-height: min(1000px, calc(var(--vh) * 100 - 40px));
    padding-right: 78px;
  }

  .western-tools {
    right: 6px;
    top: 160px;
    width: 62px;
    gap: 16px;
  }

  .western-tools span {
    font-size: 42px;
  }

  .western-tools em {
    font-size: 18px;
  }

  .western-cards {
    gap: 14px;
  }

  .player-order {
    width: 44px;
    height: 44px;
    font-size: 30px;
  }

  .player-crown {
    font-size: 48px;
  }

  .player-copy {
    padding: 0 12px 12px;
    gap: 8px;
  }

  .player-speech {
    padding: 12px;
  }

  .guess-action {
    min-height: 88px;
  }
}

@media (max-width: 380px) {
  .western-shell {
    padding-right: 48px;
  }

  .western-cards {
    gap: 7px;
  }

  .western-tools {
    width: 42px;
    gap: 10px;
  }

  .western-tools span {
    font-size: 23px;
  }

  .western-tools em {
    font-size: 12px;
  }

  .guess-action {
    min-height: 62px;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.level-screen {
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: auto;
  background: #020407;
}

.level-screen::before,
.level-screen::after,
.effect-canvas {
  display: none;
}

.replica-shell {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100vh;
  min-height: calc(var(--vh) * 100);
  padding: 0;
}

.replica-frame {
  position: relative;
  width: min(100vw, calc(var(--vh) * 100 * 941 / 1672));
  max-width: 941px;
  aspect-ratio: 941 / 1672;
  overflow: hidden;
  background: #030405;
  box-shadow: 0 0 42px rgba(0, 0, 0, 0.72);
}

.replica-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.replica-hit {
  position: absolute;
  z-index: 4;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: transparent;
  -webkit-tap-highlight-color: transparent;
}

.replica-hit:focus-visible {
  outline: 3px solid rgba(255, 223, 53, 0.9);
  outline-offset: 2px;
}

.hit-self {
  left: 3.7%;
  top: 15.3%;
  width: 27.4%;
  height: 35.2%;
}

.hit-twintail {
  left: 32.3%;
  top: 15.3%;
  width: 27.4%;
  height: 35.2%;
}

.hit-drama {
  left: 60.6%;
  top: 15.3%;
  width: 27.4%;
  height: 35.2%;
}

.hit-adult {
  left: 15.8%;
  top: 51.8%;
  width: 28.3%;
  height: 31.8%;
}

.hit-fabric {
  left: 46.5%;
  top: 51.8%;
  width: 27.8%;
  height: 31.8%;
}

.hit-guess {
  left: 20.1%;
  top: 89.5%;
  width: 61.1%;
  height: 7.5%;
  border-radius: 999px;
}

.replica-selected {
  position: absolute;
  z-index: 3;
  border: 4px solid #ffdf35;
  border-radius: 14px;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.5),
    0 0 24px rgba(255, 215, 52, 0.95),
    inset 0 0 22px rgba(255, 215, 52, 0.12);
  pointer-events: none;
}

.replica-selected.target-self {
  left: 3.7%;
  top: 15.3%;
  width: 27.4%;
  height: 35.2%;
}

.replica-selected.target-twintail {
  left: 32.3%;
  top: 15.3%;
  width: 27.4%;
  height: 35.2%;
}

.replica-selected.target-drama {
  left: 60.6%;
  top: 15.3%;
  width: 27.4%;
  height: 35.2%;
}

.replica-selected.target-adult {
  left: 15.8%;
  top: 51.8%;
  width: 28.3%;
  height: 31.8%;
}

.replica-selected.target-fabric {
  left: 46.5%;
  top: 51.8%;
  width: 27.8%;
  height: 31.8%;
}

.role-pick-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.role-pill {
  position: absolute;
  z-index: 6;
  display: grid;
  place-items: center;
  min-height: 3.4%;
  padding: 0 10px;
  border: 2px solid rgba(255, 225, 83, 0.9);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 237, 127, 0.98), rgba(242, 158, 35, 0.98));
  color: #1d1304;
  font-size: clamp(11px, 1.55vw, 15px);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  box-shadow:
    0 4px 0 rgba(62, 35, 0, 0.8),
    0 0 18px rgba(255, 209, 53, 0.65);
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.role-pill:not(.is-filled) {
  background: linear-gradient(180deg, rgba(245, 250, 255, 0.95), rgba(191, 205, 222, 0.94));
  border-color: rgba(255, 255, 255, 0.78);
  color: #253248;
  box-shadow:
    0 4px 0 rgba(20, 28, 46, 0.72),
    0 0 14px rgba(255, 255, 255, 0.35);
}

.role-pill.is-active {
  transform: translateY(-2px);
  box-shadow:
    0 6px 0 rgba(62, 35, 0, 0.85),
    0 0 26px rgba(255, 238, 122, 0.9);
}

.role-pill.is-wrong {
  background: linear-gradient(180deg, rgba(255, 128, 128, 0.98), rgba(184, 34, 51, 0.98));
  border-color: rgba(255, 224, 224, 0.92);
  color: #fff9f7;
  text-shadow: 0 2px 0 rgba(78, 0, 10, 0.7);
}

.role-pill.is-correct {
  background: linear-gradient(180deg, rgba(137, 255, 178, 0.98), rgba(25, 152, 76, 0.98));
  border-color: rgba(226, 255, 227, 0.9);
  color: #fafff8;
  text-shadow: 0 2px 0 rgba(0, 58, 18, 0.65);
}

.role-pill.target-twintail {
  left: 36.4%;
  top: 45.1%;
  width: 19.2%;
}

.role-pill.target-drama {
  left: 64.6%;
  top: 45.1%;
  width: 19.8%;
}

.role-pill.target-adult {
  left: 20.4%;
  top: 80.6%;
  width: 19.8%;
}

.role-pill.target-fabric {
  left: 51.1%;
  top: 80.6%;
  width: 19.2%;
}

.official-role-sheet {
  position: fixed;
  inset: 0;
  z-index: 32;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 20px;
  background: linear-gradient(180deg, rgba(2, 4, 7, 0.1), rgba(2, 4, 7, 0.72));
}

.official-role-sheet[hidden] {
  display: none;
}

.role-sheet-card {
  width: min(92vw, 820px);
  padding: 18px;
  border: 2px solid rgba(255, 215, 64, 0.78);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(20, 25, 36, 0.96), rgba(6, 9, 18, 0.96));
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 34px rgba(255, 193, 53, 0.32);
  color: #fffaf0;
  animation: roleSheetIn 0.22s ease-out both;
}

.role-sheet-card > span {
  display: block;
  color: #ffe591;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.role-sheet-card > strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(20px, 5vw, 34px);
  line-height: 1.05;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.75);
}

.role-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.role-option-button {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 11px 12px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  color: #f7fbff;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.role-option-button strong {
  font-size: clamp(15px, 3.7vw, 20px);
  line-height: 1.1;
}

.role-option-button span {
  color: rgba(239, 247, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.role-option-button.is-selected {
  border-color: rgba(255, 221, 76, 0.92);
  background: linear-gradient(180deg, rgba(255, 214, 58, 0.95), rgba(214, 123, 20, 0.95));
  color: #221300;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    0 0 18px rgba(255, 205, 62, 0.5);
}

.role-option-button.is-selected span {
  color: rgba(43, 24, 0, 0.74);
}

.role-sheet-close {
  width: 100%;
  min-height: 44px;
  margin-top: 13px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(248, 252, 255, 0.82);
  font-size: 14px;
  font-weight: 900;
}

.replica-frame.is-wrong-guess {
  animation: replicaShake 0.32s ease-out both;
}

.replica-frame.is-correct-guess .replica-selected {
  animation: replicaGoldPulse 0.7s ease-out both;
}

.replica-guard-overlay {
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 0;
  background: #020407;
  backdrop-filter: none;
}

.replica-guard-overlay.is-choice-only {
  background: rgba(2, 4, 7, 0.7);
  backdrop-filter: blur(3px);
}

.replica-guard-overlay[hidden] {
  display: none;
}

.guard-replica-image {
  width: min(100vw, calc(var(--vh) * 100 * 941 / 1672));
  max-width: 941px;
  aspect-ratio: 941 / 1672;
  height: auto;
  object-fit: contain;
  box-shadow: 0 0 42px rgba(0, 0, 0, 0.72);
  animation: replicaGuardIn 0.28s ease-out both;
}

.replica-guard-overlay.is-choice-only .guard-replica-image {
  display: none;
}

.guard-choice-panel {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 45;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: min(86vw, 720px);
  transform: translateX(-50%);
  padding: 12px;
  border: 2px solid rgba(255, 218, 81, 0.6);
  border-radius: 22px;
  background: rgba(4, 5, 9, 0.78);
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.6),
    0 0 34px rgba(255, 189, 43, 0.3);
  backdrop-filter: blur(10px);
  animation: guardChoiceIn 0.32s 0.28s ease-out both;
}

.replica-guard-overlay.is-choice-only .guard-choice-panel {
  animation-delay: 0s;
}

.replica-guard-overlay.is-summoned .guard-choice-panel {
  grid-template-columns: minmax(0, 1fr);
  width: min(62vw, 420px);
}

.guard-choice-panel[hidden] {
  display: none;
}

.guard-choice-button {
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  font-size: clamp(16px, 4vw, 24px);
  font-weight: 1000;
  letter-spacing: 0;
}

.guard-choice-button.is-secondary {
  background: linear-gradient(180deg, #eef3ff, #9fb0c9);
  color: #121d32;
}

.guard-choice-button.is-primary {
  background: linear-gradient(180deg, #ffe970, #ff9c22);
  color: #261300;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    0 0 22px rgba(255, 203, 57, 0.55);
}

@keyframes replicaShake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  50% {
    transform: translateX(5px);
  }
  75% {
    transform: translateX(-3px);
  }
}

@keyframes replicaGoldPulse {
  0% {
    opacity: 0.35;
    transform: scale(0.97);
  }
  60% {
    opacity: 1;
    transform: scale(1.015);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes roleSheetIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes replicaGuardIn {
  from {
    opacity: 0;
    transform: scale(1.04);
    filter: brightness(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes guardChoiceIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

.level-three-screen {
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  background: #142815;
  color: #f9e3b5;
}

.treasure-stage {
  position: relative;
  flex: 0 0 auto;
  width: calc(min(calc(var(--vh) * 100), 1672px) * 941 / 1672);
  height: min(calc(var(--vh) * 100), 1672px);
  aspect-ratio: 941 / 1672;
  overflow: hidden;
  background: #6e8e4e;
  touch-action: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.treasure-stage.is-link-stage {
  width: calc(min(calc(var(--vh) * 100), 1535px) * 1024 / 1535);
  height: min(calc(var(--vh) * 100), 1535px);
  aspect-ratio: 1024 / 1535;
}

.treasure-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #6e8e4e;
  pointer-events: auto;
}

.mvp-settlement-screen {
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  background: #efbfd2;
  transition: background-color 0.72s ease-out;
}

.mvp-settlement-screen.is-revealed {
  background: #dbe5f8;
}

.mvp-settlement-stage {
  position: relative;
  flex: 0 0 auto;
  width: 100vw;
  height: calc(var(--vh) * 100);
  aspect-ratio: auto;
  overflow: hidden;
  background: #dbe5f8;
  isolation: isolate;
}

.mvp-settlement-art,
.mvp-transition-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mvp-settlement-art {
  z-index: 0;
}

.mvp-transition-video {
  z-index: 1;
  opacity: 1;
  transition: opacity 0.18s ease-out;
}

.mvp-settlement-stage.is-revealed .mvp-transition-video {
  opacity: 0;
  pointer-events: none;
}

.mvp-music-button {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: 14px;
  z-index: 3;
  width: clamp(62px, 16%, 90px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  filter: drop-shadow(0 7px 12px rgba(38, 65, 112, 0.28));
  cursor: pointer;
  touch-action: manipulation;
  animation: mvpMusicEnter 0.34s cubic-bezier(.2, .8, .2, 1) both;
}

.mvp-music-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: mvpMusicSpin 4.8s linear infinite;
  animation-play-state: paused;
}

.mvp-music-button.is-playing img {
  animation-play-state: running;
}

.mvp-music-button:active {
  filter: drop-shadow(0 4px 8px rgba(38, 65, 112, 0.25)) brightness(0.94);
}

.mvp-music-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.94);
  outline-offset: 3px;
}

.mvp-settlement-stage.has-audio-error .mvp-music-button {
  filter: grayscale(0.36) drop-shadow(0 7px 12px rgba(38, 65, 112, 0.28));
}

@keyframes mvpMusicEnter {
  from {
    opacity: 0;
    transform: scale(0.72);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes mvpMusicSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mvp-transition-video {
    display: none;
  }

  .mvp-music-button,
  .mvp-music-button img,
  .mvp-music-button.is-playing img {
    animation: none;
  }
}
