:root {
  color-scheme: light;
  --ink: #57323d;
  --muted: #966976;
  --rose: #f77796;
  --rose-deep: #cf4969;
  --rose-soft: #ffc8d2;
  --violet: #d7cdfd;
  --blue: #99d7ec;
  --orange: #ffc77f;
  --mint: #bfe6dc;
  --cream: #fff4ee;
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --shadow: 0 18px 42px rgba(150, 83, 96, 0.18);
  --focus: 0 0 0 3px rgba(207, 73, 105, 0.26);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
}

body.private-mode {
  background:
    linear-gradient(rgba(42, 5, 31, 0.1), rgba(42, 5, 31, 0.1)),
    url("./assets/ui/game-bg-private.webp") center / cover no-repeat;
}

body {
  min-height: 100svh;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 247, 242, 0.08), rgba(255, 247, 242, 0.08)),
    url("./assets/ui/game-bg-default.webp") center / cover no-repeat;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html {
  background:
    linear-gradient(rgba(255, 247, 242, 0.08), rgba(255, 247, 242, 0.08)),
    url("./assets/ui/game-bg-default.webp") center / cover no-repeat;
}

html:has(body.private-mode) {
  background:
    linear-gradient(rgba(42, 5, 31, 0.1), rgba(42, 5, 31, 0.1)),
    url("./assets/ui/game-bg-private.webp") center / cover no-repeat;
}

button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.app {
  display: grid;
  width: 100vw;
  min-height: 100svh;
  height: 100svh;
  padding: 0;
}

.phone-frame {
  position: relative;
  display: grid;
  width: 100vw;
  max-width: none;
  height: 100svh;
  min-height: 100svh;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  overflow: hidden;
  padding:
    max(14px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(rgba(255, 247, 242, 0.08), rgba(255, 247, 242, 0.08)),
    url("./assets/ui/game-bg-default.webp") center / cover no-repeat;
  box-shadow: none;
}

.private-mode .phone-frame {
  background:
    linear-gradient(rgba(42, 5, 31, 0.1), rgba(42, 5, 31, 0.1)),
    url("./assets/ui/game-bg-private.webp") center / cover no-repeat;
  color: #fff4fa;
}

.private-mode .ambient-layer {
  opacity: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 28px 28px;
}

.ambient-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0;
  pointer-events: none;
}

.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 72px;
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(4, auto);
  align-items: center;
  justify-content: end;
  gap: 6px;
}

.icon-button,
.pill-button {
  display: inline-grid;
  place-items: center;
  height: 38px;
  min-height: 38px;
  color: #57323d;
  border: 2px solid #3f2b2f;
  background: linear-gradient(180deg, #9ac8ff, #70a5e7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 5px 0 rgba(79, 55, 61, 0.8);
  transition: transform 180ms ease, background 180ms ease;
}

.icon-button {
  width: 38px;
  min-width: 38px;
  border-radius: 12px;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.icon-button.active {
  color: #fff;
  background: linear-gradient(180deg, #ff8fa7, #f66d8d);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 5px 0 rgba(112, 47, 68, 0.82);
}

.private-mode .icon-button {
  color: #fff1f8;
  border-color: rgba(45, 5, 31, 0.78);
  background: linear-gradient(180deg, #ff5aa2, #b80d62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 5px 0 rgba(45, 5, 31, 0.72);
}

.private-mode .icon-button.active {
  background: linear-gradient(180deg, #fff0fa, #ff7fc1);
  color: #7f073f;
}

.pill-button {
  min-width: 58px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.comic-link {
  min-width: 38px;
}

body.app-embed .comic-link {
  display: none;
}

.icon-button:active,
.pill-button:active,
.primary-button:active,
.secondary-button:active,
.roll-button:active {
  transform: scale(0.97);
}

.player-rail {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: 9px;
}

.player-card {
  display: flex;
  min-height: 74px;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 10px;
  border: 2px solid rgba(90, 54, 65, 0.22);
  border-radius: 22px;
  background: rgba(255, 226, 232, 0.74);
  box-shadow: 0 8px 0 rgba(130, 78, 92, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.52);
  text-align: center;
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.player-card:nth-child(2) {
  border-color: rgba(126, 116, 197, 0.18);
  background: rgba(223, 221, 255, 0.62);
  box-shadow: 0 12px 28px rgba(112, 87, 142, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.private-mode .player-card {
  border-color: rgba(255, 175, 220, 0.46);
  background: rgba(92, 8, 55, 0.58);
  box-shadow: 0 8px 0 rgba(45, 5, 31, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.private-mode .player-card:nth-child(2) {
  border-color: rgba(220, 160, 255, 0.46);
  background: rgba(61, 15, 98, 0.56);
  box-shadow: 0 8px 0 rgba(45, 5, 31, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.private-mode .player-card.active {
  box-shadow: 0 0 0 3px rgba(255, 111, 181, 0.4), 0 8px 0 rgba(45, 5, 31, 0.52);
}

.player-card.active {
  box-shadow: 0 0 0 3px rgba(247, 119, 150, 0.24), 0 8px 0 rgba(130, 78, 92, 0.22);
}

.player-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(247, 119, 150, 0.26), 0 8px 0 rgba(130, 78, 92, 0.22);
}

.avatar {
  display: grid;
  width: 50px;
  height: 50px;
  padding: 3px;
  margin: 0;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(145deg, #fff, #f6c7d0);
  box-shadow: inset 0 -6px 14px rgba(192, 95, 112, 0.1), 0 4px 10px rgba(99, 57, 67, 0.16);
}

.avatar.alt {
  background: linear-gradient(145deg, #fff, #d7d1ff);
}

.avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.plane-count {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 78px;
  min-height: 34px;
  gap: 5px;
  padding: 0 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.48);
  color: #a85869;
  font-size: 11px;
  font-weight: 900;
}

.private-mode .plane-count {
  background: rgba(255, 235, 248, 0.2);
  color: #ffe4f4;
}

.plane-count.alt {
  color: #7162b5;
}

.player-card__meta {
  display: block;
  line-height: 1.2;
}

.board-shell {
  position: relative;
  z-index: 3;
  min-height: 0;
  padding: 8px 2px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.board {
  position: relative;
  z-index: 2;
  display: grid;
  width: auto;
  height: min(100%, 560px);
  max-width: 100%;
  aspect-ratio: 7 / 10;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(10, 1fr);
  gap: 8px;
}

.board::before {
  position: absolute;
  inset: 22% 14% 18%;
  z-index: 0;
  border-radius: 28px;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.02));
  content: "";
  pointer-events: none;
}

.private-mode .board::before {
  background: radial-gradient(circle at 50% 50%, rgba(255, 92, 172, 0.24), rgba(58, 5, 47, 0.04));
}

.board-center {
  display: none;
}

.cell {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  border: 2px solid #3f2b2f;
  border-radius: 14px;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  text-shadow: 0 1px 0 rgba(56, 33, 40, 0.55);
  box-shadow: 0 5px 0 rgba(79, 55, 61, 0.75);
  transition: transform 220ms ease, filter 220ms ease;
}

.cell[data-tone="blue"] {
  background: linear-gradient(180deg, #8eb6ff, #6fa1ef);
}

.cell[data-tone="pink"] {
  background: linear-gradient(180deg, #ff9fb8, #ec7997);
}

.cell[data-tone="green"] {
  background: linear-gradient(180deg, #9ce4d1, #73c9b2);
}

.cell[data-tone="yellow"] {
  background: linear-gradient(180deg, #ffe28f, #f2c95e);
}

.cell[data-tone="plum"] {
  background: linear-gradient(180deg, #a75bff, #7130c4);
}

.cell[data-tone="hot"] {
  background: linear-gradient(180deg, #ff61ad, #d31571);
}

.cell[data-tone="wine"] {
  background: linear-gradient(180deg, #d94479, #8e0e43);
}

.cell[data-tone="violet"] {
  background: linear-gradient(180deg, #c553e7, #8422a8);
}

.private-mode .cell {
  border-color: rgba(45, 5, 31, 0.9);
  box-shadow: 0 5px 0 rgba(45, 5, 31, 0.82);
}

.cell.start {
  font-size: 18px;
}
.cell.finish {
  color: #ff4f6f;
  font-size: 25px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

.cell.current {
  filter: brightness(1.04);
}

.token {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  transform: translate(-50%, -50%);
}

.token.me {
  border: 0;
}

.token.you {
  border: 0;
}

.token-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  filter: drop-shadow(0 5px 8px rgba(94, 42, 56, 0.28));
}

.cell.same-cell .token.me {
  transform: translate(calc(-50% - 14px), -50%);
}

.cell.same-cell .token.you {
  transform: translate(calc(-50% + 14px), -50%);
}

.dice-panel {
  position: relative;
  z-index: 4;
  display: grid;
  width: 100%;
  justify-items: center;
  padding: 4px 0 2px;
  gap: 8px;
  text-align: center;
}

.dice-trigger {
  position: relative;
  display: grid;
  place-items: center;
  width: 128px;
  height: 108px;
  min-width: 128px;
  min-height: 108px;
  border-radius: 46% 54% 48% 52% / 58% 54% 46% 42%;
  background:
    radial-gradient(circle at 42% 26%, rgba(255, 255, 255, 0.72), transparent 36%),
    linear-gradient(145deg, rgba(255, 246, 230, 0.42), rgba(199, 98, 133, 0.24));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    inset 0 -10px 18px rgba(101, 45, 65, 0.08);
}

.dice-trigger::after {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 118px;
  height: 28px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(71, 24, 43, 0.34), rgba(71, 24, 43, 0.11) 58%, rgba(71, 24, 43, 0.02) 78%);
  content: "";
  transform: translateX(-50%);
  pointer-events: none;
}

.dice-trigger::before {
  position: absolute;
  inset: 10px 16px auto;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0));
  content: "";
  pointer-events: none;
}

.dice {
  position: relative;
  z-index: 1;
  display: grid;
  width: 92px;
  height: 92px;
  margin: 0;
  padding: 16px;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 7px;
  border: 2px solid #3f2b2f;
  border-radius: 24px;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.86), transparent 26%),
    linear-gradient(145deg, #fff9dc, #f1d485);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 7px 0 rgba(63, 43, 47, 0.82),
    0 15px 24px rgba(61, 20, 38, 0.22);
  transform: rotate(12deg);
}

.dice span {
  border-radius: 999px;
  background: transparent;
}

.dice[data-value="1"] span:nth-child(5),
.dice[data-value="2"] span:nth-child(1),
.dice[data-value="2"] span:nth-child(9),
.dice[data-value="3"] span:nth-child(1),
.dice[data-value="3"] span:nth-child(5),
.dice[data-value="3"] span:nth-child(9),
.dice[data-value="4"] span:nth-child(1),
.dice[data-value="4"] span:nth-child(3),
.dice[data-value="4"] span:nth-child(7),
.dice[data-value="4"] span:nth-child(9),
.dice[data-value="5"] span:nth-child(1),
.dice[data-value="5"] span:nth-child(3),
.dice[data-value="5"] span:nth-child(5),
.dice[data-value="5"] span:nth-child(7),
.dice[data-value="5"] span:nth-child(9),
.dice[data-value="6"] span:nth-child(1),
.dice[data-value="6"] span:nth-child(3),
.dice[data-value="6"] span:nth-child(4),
.dice[data-value="6"] span:nth-child(6),
.dice[data-value="6"] span:nth-child(7),
.dice[data-value="6"] span:nth-child(9) {
  background: #9a6a55;
}

.dice.rolling {
  animation: dice-roll 450ms ease;
}

.primary-button {
  border-radius: 22px;
  background: linear-gradient(180deg, #ff8fa7, #f66d8d);
  color: #fff;
  box-shadow: 0 13px 26px rgba(220, 78, 111, 0.28);
  font-weight: 950;
}

.private-mode .primary-button {
  background: linear-gradient(180deg, #ff63ad, #c50f68);
  box-shadow: 0 13px 26px rgba(91, 7, 55, 0.32);
}

.private-mode .modal {
  background: linear-gradient(160deg, #fff0f9, #ff9ccc 54%, #8d0c4b);
  color: #2f071e;
}

.dice-trigger:disabled {
  cursor: wait;
  opacity: 0.68;
}

.password-gate {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.42), transparent 32%),
    linear-gradient(135deg, rgba(255, 243, 238, 0.96), rgba(233, 185, 195, 0.96));
  backdrop-filter: blur(8px);
  transition: opacity 220ms ease, visibility 220ms ease;
}

.password-gate[hidden] {
  display: none;
}

.password-gate.is-unlocked {
  opacity: 0;
  visibility: hidden;
}

.password-card {
  display: grid;
  width: min(360px, calc(100vw - 44px));
  justify-items: center;
  gap: 14px;
  padding: 26px 22px 24px;
  border: 2px solid rgba(63, 43, 47, 0.18);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 247, 222, 0.94), rgba(255, 201, 212, 0.94) 58%, rgba(243, 130, 157, 0.94));
  box-shadow: 0 24px 70px rgba(94, 37, 52, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.password-logo {
  display: block;
  width: min(230px, 72vw);
  height: auto;
  object-fit: contain;
}

.password-card h2 {
  margin: 0;
  color: #57323d;
  font-size: 24px;
  line-height: 1.15;
}

.password-input {
  width: 100%;
  height: 48px;
  border: 2px solid rgba(63, 43, 47, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: #57323d;
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  outline: none;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6);
}

.password-input:focus {
  border-color: rgba(247, 119, 150, 0.72);
  box-shadow: var(--focus);
}

.password-error {
  min-height: 18px;
  margin: -4px 0 0;
  color: #8a2f45;
  font-size: 13px;
  font-weight: 800;
}

.password-submit {
  min-width: 140px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(55, 24, 34, 0.28);
  backdrop-filter: blur(5px);
}

.modal-backdrop.show,
.modal-backdrop:not([hidden]) {
  display: flex;
}

.modal {
  width: min(520px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 30px;
  background: linear-gradient(160deg, #fff7de, #ffc9d4 58%, #f3829d);
  box-shadow: 0 32px 90px rgba(94, 37, 52, 0.32);
  color: #32141c;
  padding: 22px;
}

.eyebrow {
  color: rgba(50, 20, 28, 0.72);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
}

.modal h2 {
  margin: 8px 0 10px;
  font-size: clamp(24px, 3.2vw, 32px);
  line-height: 1.14;
  letter-spacing: 0;
}

#taskModal {
  background:
    radial-gradient(circle at 48% 42%, rgba(255, 255, 255, 0.3), transparent 34%),
    rgba(54, 22, 34, 0.3);
  backdrop-filter: blur(8px) saturate(1.08);
}

.task-card {
  position: relative;
  width: min(500px, calc(100vw - 34px));
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), transparent 32%),
    radial-gradient(circle at 86% 16%, rgba(255, 255, 255, 0.62), transparent 21%),
    linear-gradient(156deg, #fff6e0 0%, #ffd8df 48%, #f58ba8 100%);
  box-shadow:
    0 30px 86px rgba(95, 33, 51, 0.34),
    0 4px 0 rgba(126, 55, 75, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

.task-card::before {
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 22px;
  content: "";
}

.task-card::after {
  position: absolute;
  right: 22px;
  bottom: 18px;
  width: 44px;
  height: 40px;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 32%, rgba(255, 255, 255, 0.5), transparent 18%),
    linear-gradient(135deg, rgba(255, 105, 148, 0.2), rgba(129, 34, 70, 0.08));
  clip-path: path("M22 36 C18 30 5 24 5 13 C5 7 9 4 14 4 C18 4 21 7 22 10 C23 7 26 4 30 4 C35 4 39 7 39 13 C39 24 26 30 22 36 Z");
  content: "";
  opacity: 0.48;
}

.task-card__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.task-card__number {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: rgba(104, 45, 59, 0.64);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.task-card__number::after {
  display: block;
  width: 44px;
  height: 1px;
  border-radius: 999px;
  background: rgba(153, 76, 93, 0.32);
  content: "";
}

.task-card h2 {
  margin: 7px 0 0;
  color: #3c1722;
  font-size: clamp(24px, 5vw, 34px);
  line-height: 1.12;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.44);
}

.task-card__badge {
  flex: 0 0 auto;
  margin-top: 2px;
  border: 1px solid rgba(132, 58, 74, 0.08);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.34);
  color: rgba(86, 37, 49, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.task-card__body {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 20px;
  padding: 18px 18px 19px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.12)),
    rgba(255, 244, 237, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    0 12px 28px rgba(116, 46, 67, 0.08);
}

.modal-copy,
.task-text {
  margin: 0;
  line-height: 1.58;
}

.modal-copy {
  color: #6a2a37;
  font-size: 14px;
}

.task-text {
  color: #32141c;
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 900;
}

.task-card .task-text {
  color: #3a1520;
  font-size: clamp(18px, 4.25vw, 23px);
  line-height: 1.58;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.modal-actions,
.task-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.task-actions {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 46px;
  border-radius: 16px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 900;
}

.task-actions .primary-button {
  min-width: 148px;
  min-height: 50px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 42%),
    linear-gradient(180deg, #ff8aa6, #f25f88);
  box-shadow:
    0 14px 30px rgba(219, 75, 112, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  font-size: 16px;
}

.private-mode .task-card {
  border-color: rgba(255, 225, 244, 0.64);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.68), transparent 34%),
    radial-gradient(circle at 84% 14%, rgba(255, 214, 239, 0.52), transparent 22%),
    linear-gradient(156deg, #fff0f8 0%, #ffacd4 48%, #a70b58 100%);
  box-shadow:
    0 30px 88px rgba(76, 8, 50, 0.38),
    0 4px 0 rgba(94, 8, 55, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  color: #2d071c;
}

.private-mode .task-card h2,
.private-mode .task-card .task-text {
  color: #2d071c;
}

.private-mode .task-card__number {
  color: rgba(87, 8, 47, 0.62);
}

.private-mode .task-card__number::after {
  background: rgba(139, 16, 78, 0.34);
}

.private-mode .task-card__badge {
  background: rgba(255, 236, 247, 0.34);
  color: rgba(85, 7, 46, 0.78);
}

.private-mode .task-card__body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.12)),
    rgba(255, 226, 243, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 14px 30px rgba(91, 7, 55, 0.12);
}

.secondary-button {
  background: rgba(50, 20, 28, 0.12);
  color: #32141c;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.32);
  color: #6a2a37;
}

.info-modal {
  background: rgba(255, 246, 238, 0.96);
}

.info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.info-header h2 {
  margin: 0;
}

.close-button {
  position: relative;
  width: 44px;
  border-radius: 999px;
  background: rgba(50, 20, 28, 0.1);
}

.close-button::before,
.close-button::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #32141c;
  content: "";
}

.close-button::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.close-button::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.info-content {
  margin-top: 16px;
  color: #5e3440;
  font-size: 14px;
  line-height: 1.65;
}

.info-content h3 {
  margin: 16px 0 8px;
}

.info-content p {
  margin: 0 0 10px;
}

.info-content ul {
  margin: 0;
  padding-left: 1.2em;
}

.info-content li + li {
  margin-top: 6px;
}

@keyframes dice-roll {
  0% { transform: rotate(4deg) scale(1); }
  40% { transform: rotate(-10deg) scale(1.06); }
  70% { transform: rotate(12deg) scale(1.03); }
  100% { transform: rotate(4deg) scale(1); }
}

@media (max-height: 720px) {
  .app {
    padding: 0;
  }

  .phone-frame {
    width: 100vw;
    height: 100svh;
    min-height: 100svh;
    gap: 8px;
    padding:
      max(12px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  .modal {
    max-height: calc(100svh - 20px);
    padding: 11px 18px;
  }

  .dice-panel p {
    display: none;
  }

  .topbar {
    min-height: 58px;
  }

  .player-card {
    min-height: 66px;
    padding: 7px 8px;
  }

  .avatar {
    width: 42px;
    height: 42px;
  }

  .plane-count {
    min-width: 70px;
    min-height: 30px;
  }

  .board-shell {
    padding: 4px 0 0;
  }

  .board {
    height: min(100%, 500px);
    gap: 6px;
  }

  .cell {
    border-radius: 12px;
    font-size: 11px;
  }

  .token {
    width: 40px;
    height: 40px;
  }

  .dice-trigger {
    width: 112px;
    height: 94px;
    min-width: 112px;
    min-height: 94px;
  }

  .dice {
    width: 80px;
    height: 80px;
    padding: 13px;
    gap: 6px;
    border-radius: 22px;
  }

  .modal h2 {
    margin: 2px 0 5px;
    font-size: 22px;
  }

  .modal-copy {
    font-size: 13px;
  }

  .primary-button,
  .secondary-button,
  .ghost-button {
    min-height: 38px;
  }

  .modal-actions {
    margin-top: 6px;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
