:root {
  color-scheme: dark;
  --text: #fff3df;
  --muted: #c9c0b8;
  --line: rgba(255, 255, 255, 0.18);
  --glass: rgba(21, 17, 27, 0.7);
  --gold: #f4c66d;
  --violet: #9b5cff;
  --cyan: #54d7e6;
  --pink: #e65d93;
  --green: #35d492;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(18, 12, 24, 0.9), rgba(255, 226, 188, 0.24) 52%, rgba(14, 13, 18, 0.9)),
    radial-gradient(circle at 68% 36%, rgba(255, 214, 143, 0.42), transparent 18rem),
    linear-gradient(135deg, #211733 0%, #f4cfae 48%, #6e6470 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.arena {
  width: min(1640px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 10px;
}

.scene {
  min-height: calc(100vh - 20px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(18, 15, 24, 0.34);
  box-shadow: inset 0 0 70px rgba(255, 255, 255, 0.1), 0 24px 70px rgba(0, 0, 0, 0.42);
}

.hud {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 20px 6px;
}

.brand span {
  display: block;
  color: var(--gold);
  font-size: 15px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.brand h1 {
  margin: 2px 0 0;
  font-size: clamp(30px, 4vw, 58px);
  line-height: 0.95;
  letter-spacing: 0;
  color: #ffe3a6;
  text-shadow: 0 4px 0 rgba(71, 42, 19, 0.75), 0 10px 24px rgba(0, 0, 0, 0.48);
}

.wallets {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.display-mode {
  display: flex;
  gap: 6px;
  margin-left: auto;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(21, 17, 27, 0.58);
}

.mode-btn {
  min-width: 82px;
  min-height: 34px;
  border: 1px solid transparent;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.mode-btn.active {
  color: #2b1707;
  background: linear-gradient(180deg, #ffe7a8, #cf8e33);
}

.wallet,
.square-btn,
.shop-panel,
.current-card,
.control-panel,
.initial-orb,
.guarantee,
.summary div,
.panel {
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(10px);
}

.wallet {
  min-width: 118px;
  padding: 7px 11px;
}

small,
.wallet small,
.control-panel small,
.current-card small {
  color: var(--muted);
  font-size: 12px;
}

.wallet strong {
  display: block;
  font-size: 23px;
}

.square-btn {
  width: 42px;
  color: white;
  font-size: 24px;
}

.layout {
  display: grid;
  grid-template-columns: 220px minmax(490px, 1fr) 380px;
  gap: 14px;
  align-items: stretch;
  padding: 8px 20px 18px;
}

.shop-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 560px;
  padding: 14px;
}

.shop-panel h2 {
  margin: 2px 0 0;
  font-size: 26px;
  letter-spacing: 0;
}

.car-token {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 18px;
  border: 1px solid rgba(244, 198, 109, 0.42);
  background: linear-gradient(135deg, rgba(244, 198, 109, 0.22), rgba(155, 92, 255, 0.18));
}

.car-token span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: #2b1707;
  font-size: 34px;
  font-weight: 900;
  background: radial-gradient(circle at 35% 28%, #fff5bf, #f4c66d 54%, #9a5f1b);
}

.car-token strong {
  margin-top: 10px;
  font-size: 24px;
}

.shop-btn,
.mail-btn,
.answer {
  min-height: 46px;
  border: 1px solid rgba(255, 231, 168, 0.55);
  color: #2b1707;
  font-weight: 900;
  background: linear-gradient(180deg, #ffe7a8, #cf8e33);
}

.mail-btn {
  color: white;
  border-color: rgba(84, 215, 230, 0.45);
  background: linear-gradient(135deg, rgba(84, 215, 230, 0.28), rgba(21, 17, 27, 0.86));
}

.shop-stats {
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.shop-stats strong {
  display: block;
  margin-top: 6px;
  font-size: 32px;
}

.machine {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 560px;
}

.wheel-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 450px;
}

.wheel-shell {
  position: relative;
  width: min(52vw, 510px);
  max-width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

#innerWheel {
  width: 72%;
  aspect-ratio: 1;
  transition: transform 1.05s cubic-bezier(0.12, 0.78, 0.1, 1);
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.42));
}

.outer-stars {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 22px solid rgba(34, 31, 38, 0.88);
  outline: 8px solid rgba(255, 221, 164, 0.68);
  background:
    conic-gradient(from 0deg, rgba(244, 198, 109, 0.36) 0deg 295.2deg, rgba(84, 215, 230, 0.38) 295.2deg 356.4deg, rgba(230, 93, 147, 0.54) 356.4deg 360deg);
  box-shadow: inset 0 0 34px rgba(0, 0, 0, 0.72), 0 0 0 11px rgba(62, 50, 52, 0.74);
  transition: transform 1.05s cubic-bezier(0.12, 0.78, 0.1, 1);
}

.outer-segment {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 92px;
  height: 58px;
  margin: -29px -46px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
  transform: rotate(var(--angle)) translateY(-224px) rotate(calc(-1 * var(--angle)));
}

.outer-segment small {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
}

.outer-segment.active {
  color: var(--gold);
  text-shadow: 0 0 16px rgba(255, 211, 111, 0.9);
}

.outer-pointer,
.needle {
  position: absolute;
  left: 50%;
  z-index: 4;
  width: 0;
  height: 0;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}

.outer-pointer {
  top: -4px;
  margin-left: -17px;
  border-left: 17px solid transparent;
  border-right: 17px solid transparent;
  border-top: 42px solid #ffe288;
}

.needle {
  top: 12%;
  margin-left: -13px;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 38px solid #ffffff;
}

.capsule-display {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 142px;
  height: 142px;
  border-radius: 50%;
  border: 4px solid rgba(255, 236, 180, 0.86);
  background: radial-gradient(circle at 50% 44%, rgba(255, 244, 194, 0.92), rgba(135, 73, 191, 0.7) 44%, rgba(55, 25, 87, 0.95));
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.36), 0 0 30px rgba(155, 92, 255, 0.45);
}

.capsule-display span {
  font-size: 48px;
  line-height: 1;
}

.capsule-display small {
  color: white;
  font-weight: 900;
}

.skip-row {
  position: absolute;
  right: 10px;
  bottom: 8px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
}

.checkbox input {
  position: absolute;
  opacity: 0;
}

.checkbox span {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.58);
  background: rgba(0, 0, 0, 0.45);
}

.checkbox input:checked + span {
  background: linear-gradient(135deg, var(--gold), var(--violet));
}

.platform {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 14px;
  align-items: end;
}

.current-card {
  min-height: 68px;
  padding: 12px;
}

.current-card strong {
  display: block;
  margin-top: 5px;
  font-size: 21px;
}

.star-meter {
  display: flex;
  gap: 4px;
  margin-top: 7px;
}

.star-meter span {
  color: rgba(255, 255, 255, 0.28);
  font-size: 22px;
}

.star-meter span.active {
  color: var(--gold);
  text-shadow: 0 0 12px rgba(255, 211, 111, 0.82);
}

.start-btn {
  height: 64px;
  border: 2px solid rgba(255, 217, 140, 0.72);
  color: #fff8de;
  background: linear-gradient(180deg, #b66bf4, #8237bb 48%, #63218c);
  box-shadow: 0 12px 28px rgba(93, 32, 140, 0.45), inset 0 0 20px rgba(255, 255, 255, 0.22);
}

.start-btn span {
  font-size: 25px;
  font-weight: 900;
}

.control-panel {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 560px;
  padding: 10px;
}

.initial-orb {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 9px;
}

.initial-orb strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.color-orb {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.64);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset -14px -18px 30px rgba(0, 0, 0, 0.28), inset 12px 12px 26px rgba(255, 255, 255, 0.42), 0 0 26px rgba(255, 255, 255, 0.16);
}

.color-orb span {
  color: white;
  font-size: 34px;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.48);
}

.color-orb.empty {
  border-style: dashed;
}

.action-grid {
  display: grid;
  gap: 8px;
}

.action-btn {
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: white;
  text-align: left;
  padding: 8px 11px;
  background: linear-gradient(135deg, rgba(66, 85, 108, 0.86), rgba(22, 21, 30, 0.86));
}

.action-btn.gold {
  background: linear-gradient(135deg, rgba(239, 185, 86, 0.88), rgba(92, 51, 118, 0.86));
}

.action-btn.claim {
  background: linear-gradient(135deg, rgba(68, 190, 145, 0.86), rgba(18, 74, 70, 0.86));
}

.action-btn:disabled,
.start-btn:disabled,
.shop-btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.action-btn span {
  display: block;
  font-size: 18px;
  font-weight: 900;
}

.guarantee {
  padding: 10px;
}

.row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

.track {
  height: 9px;
  margin-top: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--violet), var(--gold));
  transition: width 0.2s ease;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.summary div {
  min-height: 50px;
  padding: 8px;
}

.summary strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.tab {
  min-height: 34px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
}

.tab.active {
  color: #2b1a08;
  border-color: transparent;
  background: linear-gradient(180deg, #ffe7a8, #cf8e33);
  font-weight: 900;
}

.panel {
  display: none;
  min-height: 120px;
  max-height: 156px;
  overflow: auto;
  padding: 8px;
}

.panel.active {
  display: block;
}

.log-list {
  display: grid;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.log-list li,
.value-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.rule-list p {
  margin: 0 0 9px;
  color: var(--muted);
  line-height: 1.45;
}

.value-table {
  display: grid;
  gap: 6px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 30;
  min-width: 280px;
  max-width: min(680px, calc(100% - 32px));
  padding: 16px 24px;
  border: 1px solid rgba(255, 211, 111, 0.5);
  color: white;
  text-align: center;
  background: rgba(20, 15, 25, 0.94);
  font-size: clamp(20px, 5vw, 34px);
  font-weight: 900;
  opacity: 0;
  transform: translate(-50%, 14px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.landscape-hint {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  place-items: center;
  padding: 28px;
  text-align: center;
  background: rgba(12, 9, 16, 0.94);
  pointer-events: none;
}

.landscape-hint strong,
.landscape-hint span {
  display: block;
}

.landscape-hint strong {
  color: #ffe7a8;
  font-size: clamp(38px, 13vw, 72px);
  text-shadow: 0 0 22px rgba(244, 198, 109, 0.48);
}

.landscape-hint span {
  max-width: 520px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.58);
}

.modal.open {
  display: grid;
}

.modal-card {
  position: relative;
  width: min(380px, 100%);
  padding: 22px;
  border: 1px solid rgba(244, 198, 109, 0.54);
  background: rgba(21, 17, 27, 0.96);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
}

.modal-card h2 {
  margin: 0 0 16px;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  color: white;
  background: rgba(255, 255, 255, 0.08);
  font-size: 22px;
}

.field span,
.question {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
}

.field input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.question {
  margin: 18px 0 14px;
  color: #ffe7a8;
  font-size: clamp(30px, 8vw, 46px);
  font-weight: 900;
  line-height: 1.08;
  text-align: center;
  text-shadow: 0 0 18px rgba(244, 198, 109, 0.55), 0 3px 0 rgba(0, 0, 0, 0.45);
}

.answer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.answer.no {
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

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

  .shop-panel,
  .machine,
  .control-panel {
    min-height: auto;
  }

  .shop-panel {
    display: grid;
    grid-template-columns: 1fr 180px 120px 120px;
    align-items: center;
  }

  .shop-stats {
    margin-top: 0;
  }
}

@media (max-width: 700px) {
  body {
    background:
      linear-gradient(180deg, rgba(18, 12, 24, 0.92), rgba(255, 226, 188, 0.18) 46%, rgba(14, 13, 18, 0.92)),
      linear-gradient(135deg, #211733 0%, #7d6472 100%);
  }

  .arena {
    padding: 0;
  }

  .scene {
    min-height: 100vh;
    border: 0;
  }

  .hud,
  .layout {
    padding-left: 8px;
    padding-right: 8px;
  }

  .hud,
  .platform,
  .shop-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hud {
    gap: 8px;
    padding-top: 10px;
  }

  .brand span {
    font-size: 12px;
  }

  .brand h1 {
    font-size: clamp(24px, 8vw, 34px);
    line-height: 1;
  }

  .wallets {
    display: grid;
    grid-template-columns: 1fr 1fr 44px;
    width: 100%;
  }

  .wallet {
    min-width: 0;
    padding: 6px 8px;
  }

  .wallet strong {
    font-size: 19px;
  }

  .layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 12px;
  }

  .machine {
    order: 1;
  }

  .control-panel {
    order: 2;
  }

  .shop-panel {
    order: 3;
  }

  .wheel-zone {
    min-height: min(92vw, 390px);
  }

  .wheel-shell {
    width: min(90vw, 380px);
  }

  .outer-stars {
    border-width: 16px;
    outline-width: 6px;
    box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.72), 0 0 0 7px rgba(62, 50, 52, 0.74);
  }

  .outer-segment {
    width: 70px;
    height: 42px;
    margin: -21px -35px;
    font-size: 16px;
    transform: rotate(var(--angle)) translateY(calc(min(90vw, 380px) * -0.43)) rotate(calc(-1 * var(--angle)));
  }

  .outer-segment small {
    font-size: 9px;
  }

  .outer-pointer {
    top: -2px;
    margin-left: -13px;
    border-left-width: 13px;
    border-right-width: 13px;
    border-top-width: 32px;
  }

  .needle {
    border-left-width: 10px;
    border-right-width: 10px;
    border-top-width: 30px;
  }

  #innerWheel {
    width: 70%;
  }

  .capsule-display {
    width: min(28vw, 112px);
    height: min(28vw, 112px);
    border-width: 3px;
  }

  .capsule-display span {
    font-size: clamp(30px, 9vw, 40px);
  }

  .platform {
    gap: 8px;
  }

  .current-card {
    min-height: 62px;
  }

  .start-btn {
    height: 58px;
  }

  .control-panel {
    gap: 8px;
    padding: 8px;
  }

  .initial-orb {
    grid-template-columns: 64px 1fr;
    min-height: 72px;
  }

  .color-orb {
    width: 58px;
    height: 58px;
  }

  .color-orb span {
    font-size: 28px;
  }

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

  .action-btn {
    min-height: 52px;
  }

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

  .summary div {
    padding: 7px;
  }

  .summary strong {
    font-size: 17px;
  }

  .panel {
    min-height: 96px;
    max-height: 140px;
  }

  .shop-panel {
    gap: 8px;
    padding: 10px;
  }

  .car-token {
    min-height: 112px;
    grid-template-columns: 64px 1fr;
    text-align: left;
  }

  .car-token span {
    width: 56px;
    height: 56px;
    font-size: 24px;
    grid-row: span 2;
  }

  .car-token strong {
    margin-top: 0;
    font-size: 20px;
  }

  .shop-stats {
    margin-top: 0;
  }

  .modal-card {
    width: min(360px, 100%);
    padding: 18px;
  }

  .question {
    font-size: clamp(34px, 11vw, 48px);
  }

  .toast {
    bottom: 16px;
    min-width: 220px;
    padding: 14px 18px;
  }
}

body.phone-mode {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  touch-action: manipulation;
}

body.phone-mode .arena {
  width: var(--app-width, 1120px);
  min-height: 510px;
  height: 510px;
  position: absolute;
  top: var(--app-top, 10px);
  left: 50%;
  margin: 0;
  padding: 8px;
  transform: translateX(-50%);
  transform-origin: top center;
  zoom: var(--app-scale, 1);
}

body.phone-mode .scene {
  min-height: 494px;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

body.phone-mode .hud {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 5px 14px 0;
}

body.phone-mode .brand span {
  font-size: 15px;
}

body.phone-mode .brand h1 {
  font-size: 34px;
  line-height: 0.95;
}

body.phone-mode .display-mode {
  display: flex;
}

body.phone-mode .wallets {
  display: flex;
  width: auto;
}

body.phone-mode .wallet {
  min-width: 118px;
  padding: 5px 9px;
}

body.phone-mode .wallet strong {
  font-size: 20px;
}

body.phone-mode .layout {
  display: grid;
  grid-template-columns: 190px minmax(460px, 1fr) 350px;
  gap: 10px;
  align-items: stretch;
  padding: 2px 14px 8px;
}

body.phone-mode .shop-panel {
  order: initial;
  display: flex;
  grid-template-columns: none;
  min-height: 456px;
  gap: 8px;
  padding: 10px;
}

body.phone-mode .machine {
  order: initial;
  min-height: 456px;
}

body.phone-mode .control-panel {
  order: initial;
  min-height: 456px;
  gap: 7px;
  padding: 8px;
}

body.phone-mode .wheel-zone {
  min-height: 350px;
  transform: translateY(-18px);
}

body.phone-mode .wheel-shell {
  width: 424px;
}

body.phone-mode .outer-stars {
  border-width: 22px;
  outline-width: 8px;
  box-shadow: inset 0 0 34px rgba(0, 0, 0, 0.72), 0 0 0 11px rgba(62, 50, 52, 0.74);
}

body.phone-mode .outer-segment {
  width: 92px;
  height: 58px;
  margin: -29px -46px;
  font-size: 22px;
  transform: rotate(var(--angle)) translateY(-184px) rotate(calc(-1 * var(--angle)));
}

body.phone-mode .outer-segment small {
  font-size: 11px;
}

body.phone-mode .capsule-display {
  width: 112px;
  height: 112px;
}

body.phone-mode .capsule-display span {
  font-size: 36px;
}

body.phone-mode .platform {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 10px;
  transform: translateY(-34px);
}

body.phone-mode .current-card {
  min-height: 58px;
  padding: 9px;
}

body.phone-mode .start-btn {
  height: 58px;
}

body.phone-mode .star-meter {
  margin-top: 4px;
}

body.phone-mode .star-meter span {
  font-size: 20px;
}

body.phone-mode .initial-orb {
  grid-template-columns: 92px 1fr;
  min-height: 74px;
}

body.phone-mode .color-orb {
  width: 72px;
  height: 72px;
}

body.phone-mode .color-orb span {
  font-size: 34px;
}

body.phone-mode .car-token {
  display: grid;
  grid-template-columns: none;
  min-height: 142px;
  text-align: center;
}

body.phone-mode .car-token span {
  width: 68px;
  height: 68px;
  font-size: 28px;
  grid-row: auto;
}

body.phone-mode .car-token strong {
  margin-top: 6px;
  font-size: 21px;
}

body.phone-mode.phone-portrait .landscape-hint {
  display: grid;
}

body.phone-mode.modal-open .landscape-hint {
  display: none;
}

body.phone-mode .modal {
  position: fixed;
}

body.phone-mode .modal-card {
  width: min(420px, calc(100vw - 28px));
  max-height: calc(100vh - 24px);
  overflow: auto;
}
