:root {
  --paper: #f5f7f5;
  --ink: #1d201f;
  --card: #ffffff;
  --muted: #68716d;
  --muted-2: #98a09b;
  --line: #e0e6e1;
  --line-strong: #cdd7d0;
  --soft: #eef8f3;
  --soft-ink: #23654f;
  --fill: #f9fbf9;
  --red: #e85f52;
  --purple: #4f64d8;
  --yellow: #f3b84b;
  --green: #2e9d78;
  --blue: #3d76d8;
  --shadow: 0 10px 28px rgba(32, 35, 34, 0.08);
  --shadow-sm: 0 4px 14px rgba(32, 35, 34, 0.08);
}

body {
  background: #eef3ef;
  background-image: none;
  color: var(--ink);
}

.pixel {
  font-family: inherit;
  letter-spacing: 0;
}

.phone {
  background: var(--paper);
}

@media (min-width: 460px) {
  .phone {
    width: 402px;
    height: min(832px, 100dvh - 24px);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(35, 51, 43, 0.13);
  }
}

.screen {
  padding: 18px 20px;
  gap: 14px;
}

.homeScreen,
.configScreen,
.modeScreen,
.screen[data-screen="game"] {
  justify-content: flex-start;
}

.screen.active {
  animation: fadeIn 0.18s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.badge,
.chip,
.btn,
.card,
.setupCard,
.field,
.hintCard,
.avatarSlot,
.gAv,
.locationStatus,
.voiceInsight,
.micBig,
.micBtn,
.mode,
.ctrlSide,
.navMini,
.winCard,
.soundGate {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.topbar {
  min-height: 38px;
}

.badge {
  padding: 7px 10px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  box-shadow: 0 6px 18px rgba(35, 51, 43, 0.05);
}

.badge.red,
.badge.purple,
.badge.yellow {
  background: #fff;
  color: var(--muted);
}

.dots,
.sub,
.hintRow,
.quickTagLabel {
  color: var(--muted);
}

.titleMark {
  color: var(--blue);
  font-size: 18px;
  font-weight: 850;
}

.lead {
  font-weight: 850;
  letter-spacing: 0;
  color: var(--ink);
}

.sub {
  font-weight: 600;
  line-height: 1.55;
}

.back {
  color: var(--ink);
  font-size: 14px;
  font-weight: 720;
  padding: 8px 0 8px 12px;
}

.coin {
  width: min(290px, 100%);
  min-height: 0;
  height: clamp(270px, 42dvh, 390px);
  margin: 8px auto 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(32, 35, 34, 0.1);
  align-content: center;
}

.coin::before {
  content: "READY";
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #f7f8f6;
  font-size: 10px;
  font-weight: 850;
}

.coin::after {
  content: "把纠结装进这一局";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #d7e8df;
  border-radius: 8px;
  background: var(--soft);
  color: var(--soft-ink);
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.coin .emoji {
  font-size: 58px;
  filter: none;
}

.slogan {
  border: 1px solid #d7e8df;
  border-radius: 8px;
  background: var(--soft);
  color: var(--soft-ink);
  font-weight: 850;
  padding: 10px 12px;
}

.chip {
  background: var(--fill);
  color: var(--ink);
  font-size: 12px;
  font-weight: 720;
}

.chip.on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.homeChips {
  gap: 7px;
}

.homeChips .chip {
  min-height: 40px;
}

.btn,
.btn.red,
.btn.alt,
.btn.ghost {
  border-color: transparent;
  background: var(--ink);
  color: #fff;
  border-radius: 13px;
  box-shadow: none;
  min-height: 50px;
}

.btn.alt {
  background: #2fa378;
}

.btn.ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.btn.big {
  padding: 14px;
}

.btn.huge {
  min-height: 60px;
  padding: 14px;
  border-radius: 10px;
  font-size: 18px;
}

.btn:active,
.mode:active,
.coin:active,
.locBtn:active {
  transform: translateY(1px);
  box-shadow: none;
}

.setupCard,
.card,
.profileCard {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(32, 35, 34, 0.05);
}

.avatarSlot,
.gAv,
.playerPill {
  background: #f2f5f2;
}

.avatarSlot {
  width: 78px;
  height: 78px;
}

.gAv {
  width: 44px;
  height: 44px;
}

.gAv.on {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.avatarGallery {
  scrollbar-width: none;
}

.avatarGallery::-webkit-scrollbar {
  display: none;
}

.field {
  background: #f8faf8;
  color: var(--ink);
  font-weight: 650;
  min-height: 44px;
}

.field:focus {
  background: #fff;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(46, 157, 120, 0.14);
}

.hintCard {
  background: var(--soft);
  border-color: #d7e8df;
  color: var(--soft-ink);
  font-weight: 800;
}

.locationStatus,
.locationStatus[data-state="loading"],
.locationStatus[data-state="error"],
.voiceInsight,
.voiceInsight[data-state="loading"] {
  background: #fff;
  color: var(--ink);
}

.locationStatus {
  min-height: 46px;
  max-height: none;
  padding: 9px 12px;
  border-radius: 12px;
  box-shadow: none;
  font-size: 11px;
  line-height: 1.25;
}

.locationStatus[data-state="gps"] {
  background: var(--soft);
  border-color: #b9dfd1;
  color: var(--soft-ink);
}

.locationStatus::before {
  content: "";
  display: none;
}

.micBig,
.micBtn {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.voiceHold {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inputActionsTop {
  display: none;
}

.voiceHold .micBig {
  min-height: 58px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #f6f8f6;
  color: var(--ink);
  box-shadow: inset 0 -1px 0 rgba(35, 51, 43, 0.04), 0 6px 18px rgba(35, 51, 43, 0.05);
  font-size: 17px;
  font-weight: 850;
  letter-spacing: 0;
  transition: transform 0.08s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.voiceHold.holding .micBig {
  background: #dfe5e1;
  box-shadow: inset 0 2px 8px rgba(35, 51, 43, 0.12);
  transform: scale(0.985);
}

.voiceHoldStatus {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 720;
  text-align: center;
}

.voiceProgress {
  height: 5px;
  border-radius: 999px;
  background: #edf1ee;
  overflow: hidden;
}

.voiceProgress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #2fa378;
  transition: width 0.08s linear;
}

.voiceHold.holding .voiceHoldStatus {
  color: var(--soft-ink);
}

.quickTags {
  gap: 8px;
  padding-top: 2px;
}

.quickTagRow {
  gap: 7px;
}

.quickTagRow .chip {
  padding: 7px 5px;
  border-color: #dfe5df;
}

.gameHero {
  flex: none;
  gap: 12px;
  padding-top: 2px;
}

.gameHero > .lead {
  margin-top: 2px;
  text-align: left !important;
  font-size: 28px !important;
  line-height: 1.08 !important;
  letter-spacing: 0;
}

.voiceBox {
  flex: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 38px rgba(35, 51, 43, 0.07);
  padding: 10px;
  gap: 10px;
}

textarea.field.bigInput {
  height: clamp(118px, 18dvh, 156px);
  min-height: clamp(118px, 18dvh, 156px);
  border-radius: 14px;
  background: var(--fill);
  border-color: var(--line);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 680;
}

.voiceBox.hasInsight textarea.field.bigInput {
  height: clamp(74px, 10dvh, 96px);
  min-height: clamp(74px, 10dvh, 96px);
}

.screen[data-screen="game"] > .btn {
  margin-top: auto;
  min-height: 58px;
  border-radius: 15px;
  font-size: 17px;
}

.screen[data-screen="game"] .topbar {
  margin-bottom: 4px;
}

.screen[data-screen="game"] .playerPill {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  box-shadow: 0 8px 24px rgba(35, 51, 43, 0.12);
}

.screen[data-screen="game"] .quickTagLabel {
  width: 34px;
  color: var(--muted);
  font-size: 12px;
}

.screen[data-screen="game"] .quickTagRow {
  display: grid;
  grid-template-columns: 34px repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.screen[data-screen="game"] .quickTagRow:last-child {
  grid-template-columns: 34px repeat(3, minmax(0, 1fr));
}

.screen[data-screen="game"] .quickTagRow .chip {
  min-height: 38px;
  border-radius: 12px;
  background: #fff;
  border-color: var(--line);
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(35, 51, 43, 0.03);
}

.screen[data-screen="game"] .quickTagRow .chip.on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.modeScreen {
  gap: 14px;
}

.modeList {
  gap: 12px;
}

.mode {
  background: #fff;
  color: var(--ink);
  padding: 16px 14px;
  border-left-width: 0;
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(35, 51, 43, 0.07);
}

.mode.boss,
.mode.ai,
.mode.myst {
  background: #fff;
  color: var(--ink);
}

.mode.boss {
  border-color: rgba(232, 95, 82, 0.28);
}

.mode.ai {
  border-color: rgba(61, 118, 216, 0.28);
}

.mode.myst {
  border-color: rgba(243, 184, 75, 0.36);
}

.mode .ic {
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--fill);
  font-size: 25px;
}

.mode.boss .ic {
  background: #fff5f4;
  border-color: rgba(232, 95, 82, 0.22);
}

.mode.ai .ic {
  background: #f3f6ff;
  border-color: rgba(61, 118, 216, 0.22);
}

.mode.myst .ic {
  background: #fff8e8;
  border-color: rgba(243, 184, 75, 0.28);
}

.mode .nm {
  font-size: 18px;
  line-height: 1.15;
  margin-bottom: 5px;
}

.mode .ds,
.mode.boss .ds,
.mode.ai .ds,
.mode.myst .ds,
.mode .tagline,
.mode.boss .tagline,
.mode.ai .tagline,
.mode.myst .tagline {
  color: var(--muted);
}

.mode .ds {
  font-size: 13px;
}

.mode .tagline {
  font-size: 11px;
}

.mode.sel {
  box-shadow: 0 0 0 3px rgba(61, 118, 216, 0.12);
}

.mode.sel::before {
  border-color: rgba(61, 118, 216, 0.18);
}

.mode.sel::after {
  background: var(--blue);
  color: #fff;
  border-radius: 999px;
}

.skipZone {
  margin-top: auto;
  padding: 18px 0 8px;
}

.skipSmash {
  width: min(230px, 74vw);
  height: 58px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line), 0 10px 28px rgba(35, 51, 43, 0.05);
  font-size: 19px;
  text-shadow: none;
}

.skipSmash::before,
.skipSmash::after {
  display: none;
}

.skipSmash .label {
  transform: none;
}

.counter {
  color: var(--muted);
}

.pip {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d7ddd8;
  border: 0;
}

.pip.spent {
  background: #202322;
  opacity: 0.22;
}

.pip.on {
  background: var(--blue);
}

.roundSlogan {
  border-radius: 8px;
  border: 1px solid #d7e8df;
  background: #edf8f2;
  color: #265a47;
  box-shadow: none;
}

.deckWrap {
  padding: 6px 0 0;
}

.deck {
  filter: none;
}

.gcard {
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(32, 35, 34, 0.12);
}

.gcard .art:not(.photo) {
  background: #f2f5f2 !important;
}

.gcard .art.photo {
  background-color: #f2f5f2;
  filter: none;
  text-shadow: none;
}

.gcard .info {
  background: #fff !important;
  color: var(--ink) !important;
}

.gcard h2,
.gcard h3,
.gameSlogan {
  color: var(--ink) !important;
}

.gcard .cnum,
.gcard p,
.gcard .reason {
  color: var(--muted) !important;
}

.meta,
.miniMeta {
  background: #f3f6f3 !important;
  color: var(--muted) !important;
  border: 1px solid var(--line);
}

.deckControls {
  gap: 10px;
  margin: 2px -8px -10px;
}

.ctrlSide {
  width: 88px;
  height: 52px;
  border: 0;
}

.ctrlSide .big,
.pipeBtn .plabel {
  font-family: inherit;
  letter-spacing: 0;
  font-weight: 850;
}

.ctrlSide.no {
  background: #f4eeee;
  color: #9a4038;
}

.ctrlSide.pick {
  background: #edf8f4;
  color: #1e614c;
}

.pipeBtn {
  width: 112px;
  height: 52px;
  border-radius: 10px;
  background: #f7f8f6;
  box-shadow: inset 0 0 0 1px var(--line);
  justify-content: center;
}

.pipeBtn .rim {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}

.pipeBtn .body {
  display: none;
}

.pipeBtn .plabel {
  font-size: 13px;
  color: var(--muted);
  text-shadow: none;
}

.win {
  background: rgba(32, 35, 34, 0.35);
  backdrop-filter: blur(12px);
}

.winCard {
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(32, 35, 34, 0.22);
}

.winCard .face {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f2f5f2;
}

.winCard .cg {
  color: var(--green);
  text-shadow: none;
}

.tag {
  color: var(--muted);
}

.soundGate {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.soundGate.loading {
  background: #fff;
}

.toast {
  border-radius: 999px;
  background: rgba(32, 35, 34, 0.9);
  color: #fff;
}

.conf {
  border-radius: 999px;
}

@media (max-height: 760px) {
  .screen {
    gap: 9px;
    padding: 14px;
  }

  .coin {
    min-height: 130px;
  }

  .inputActionsTop .micBig {
    min-height: 66px;
  }

  .configScreen {
    gap: 8px;
  }

  .configScreen .sub,
  .configScreen .hintRow {
    font-size: 11.5px;
    line-height: 1.35;
  }

  .configScreen .setupCard,
  .configScreen .profileCard {
    padding: 10px;
  }

  .configScreen .avatarRow {
    gap: 9px;
  }

  .configScreen .avatarSlot {
    width: 70px;
    height: 70px;
  }

  .configScreen .gAv {
    width: 40px;
    height: 40px;
  }

  .configScreen .field {
    min-height: 40px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .configScreen .pRow {
    gap: 8px;
  }

  .configScreen .btn.huge {
    min-height: 56px;
    padding: 12px;
  }

  .skipZone {
    padding-bottom: 12px;
  }
}
