.mobile-game-app {
  display: none;
}

body.mobile-game-view {
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  color: #f7fbff;
  background:
    radial-gradient(circle at 50% -10%, rgba(55, 216, 178, 0.2), transparent 38%),
    linear-gradient(180deg, #062b3d 0%, #031723 100%);
}

@supports (width: 100dvw) {
  body.mobile-game-view {
    width: 100dvw;
    max-width: 100dvw;
  }
}

body.mobile-game-view .mobile-game-app {
  display: block;
  min-height: 100dvh;
}

body.mobile-game-view .confrontation-intro-backdrop {
  z-index: 720;
  pointer-events: auto;
}

body.mobile-game-view .confrontation-start-button {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  touch-action: manipulation;
}

.mobile-game-shell {
  --mobile-player-color: #5ee1b8;
  --mobile-opponent-color: #f2a37f;
  display: grid;
  align-content: start;
  gap: 6px;
  width: min(100%, 100dvw);
  max-width: 100dvw;
  min-height: calc(100dvh + 150px);
  padding:
    max(10px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    max(214px, calc(env(safe-area-inset-bottom) + 204px))
    max(12px, env(safe-area-inset-left));
  overflow-x: clip;
  overflow-anchor: none;
}

.mobile-game-shell,
.mobile-game-shell * {
  box-sizing: border-box;
}

.mobile-game-shell > *,
.mobile-game-shell section,
.mobile-game-shell article,
.mobile-game-shell nav,
.mobile-game-shell div {
  min-width: 0;
  max-width: 100%;
}

body.mobile-game-view .mobile-game-shell button:not(.mobile-card-explanation-backdrop) {
  min-width: 44px;
  min-height: 44px;
  touch-action: manipulation;
}

body.mobile-game-view .mobile-game-shell :focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.mobile-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.mobile-skip-link {
  position: fixed;
  z-index: 600;
  top: max(6px, env(safe-area-inset-top));
  left: max(6px, env(safe-area-inset-left));
  padding: 10px 12px;
  border-radius: 8px;
  color: #062637;
  background: #fff;
  font-weight: 900;
  transform: translateY(-150%);
}

.mobile-skip-link:focus {
  transform: none;
}

.mobile-game-header,
.mobile-hand-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-game-header {
  height: 28px;
}

.mobile-game-header span,
.mobile-hand-section > header span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-mode-context {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 6px;
  height: 54px;
}

.mobile-mode-context > div {
  display: grid;
  min-width: 0;
  border-radius: 10px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.07);
}

.mobile-mode-context span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mobile-mode-context strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.68rem;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mobile-mode-context button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid rgba(223, 243, 118, 0.35);
  border-radius: 10px;
  padding: 5px 8px;
  color: #dff376;
  background: rgba(223, 243, 118, 0.08);
  font-size: 0.62rem;
  font-weight: 900;
}

.mobile-match-menu-button {
  display: grid;
  place-content: center;
  gap: 4px;
  padding: 0;
}

.mobile-match-menu-button span {
  display: block;
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: currentColor;
}

.mobile-connection {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  height: 34px;
  border: 1px solid rgba(116, 230, 192, 0.25);
  border-radius: 10px;
  padding: 6px 8px;
  background: rgba(5, 36, 51, 0.8);
  font-size: 0.62rem;
}

.mobile-connection span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.66);
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
}

.mobile-connection i {
  color: #8ce0bf;
  font-size: 0.55rem;
  font-style: normal;
}

.mobile-connection--spectator {
  border-color: rgba(242, 163, 127, 0.36);
}

.mobile-spectator-notice {
  margin: 0;
  border: 1px solid rgba(242, 163, 127, 0.35);
  border-radius: 12px;
  padding: 10px;
  color: #ffd1bc;
  background: rgba(242, 163, 127, 0.09);
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
}

.mobile-game-header strong {
  color: #88e4c3;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.mobile-set-scores {
  display: grid;
  grid-auto-columns: minmax(38px, 1fr);
  grid-auto-flow: column;
  gap: 6px;
  height: 50px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-set-score {
  display: grid;
  grid-template-columns: 1fr 3px 1fr;
  align-items: center;
  height: 50px;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  text-align: center;
}

.mobile-set-score i {
  width: 3px;
  height: 18px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-set-score--player {
  background: var(--mobile-player-color);
}

.mobile-set-score--opponent {
  background: var(--mobile-opponent-color);
}

.mobile-set-score--player span,
.mobile-set-score--opponent span {
  color: #082738;
  font-weight: 950;
}

.mobile-set-score--pending {
  opacity: 0.45;
}

.mobile-player-pair {
  display: grid;
  gap: 6px;
}

.mobile-player {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  height: 52px;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 6px 9px;
  background: rgba(4, 28, 42, 0.74);
}

.mobile-player--player {
  border-left: 4px solid var(--mobile-player-color);
}

.mobile-player--opponent {
  border-left: 4px solid var(--mobile-opponent-color);
}

.mobile-bonus-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(223, 243, 118, 0.32);
  border-radius: 50%;
  padding: 0;
  color: #dff376;
  background: rgba(223, 243, 118, 0.08);
  font-size: 0.7rem;
  font-weight: 900;
}

.mobile-bonus-button span,
.mobile-bonus-button b {
  font-size: 0.68rem;
}

.mobile-player--active {
  border-color: rgba(94, 225, 184, 0.5);
}

.mobile-player--active.mobile-player--player {
  border-left-color: var(--mobile-player-color);
}

.mobile-player--active.mobile-player--opponent {
  border-left-color: var(--mobile-opponent-color);
}

.mobile-player-avatar {
  position: relative;
  width: 40px;
  height: 40px;
}

.mobile-player-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.mobile-server {
  position: absolute;
  right: -2px;
  bottom: -1px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 2px solid #08283a;
  border-radius: 50%;
  color: #d9f269;
  background: #14715d;
  font-size: 0.56rem;
}

.mobile-player-copy {
  display: grid;
  min-width: 0;
  min-height: 44px;
  border: 0;
  padding: 4px 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.mobile-player-copy strong,
.mobile-player-copy span {
  overflow: hidden;
  overflow-wrap: anywhere;
  line-height: 1.15;
}

.mobile-star-card {
  display: grid;
  grid-template-columns: minmax(92px, 36%) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border: 2px solid #57aee8;
  border-radius: 16px;
  padding: 12px;
  background: rgba(87, 174, 232, 0.12);
}

.mobile-star-card--rose {
  border-color: #e778a4;
  background: rgba(231, 120, 164, 0.13);
}

.mobile-star-card img {
  width: 100%;
  max-height: 260px;
  border-radius: 10px;
  object-fit: cover;
}

.mobile-star-card div {
  display: grid;
  gap: 7px;
}

.mobile-star-card span {
  color: #8ed2ff;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mobile-star-card--rose span {
  color: #ffadd0;
}

.mobile-star-card strong,
.mobile-star-card p {
  margin: 0;
}

.mobile-player-copy span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.7rem;
}

.mobile-player-stats {
  display: flex;
  gap: 11px;
  margin: 0;
}

.mobile-player-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-player-stats div {
  position: relative;
  display: grid;
  justify-items: center;
}

.mobile-player-stats dt {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.57rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mobile-player-stats dd {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 900;
}

.mobile-player-stat--critical dt {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.mobile-player-stat--critical dd {
  display: grid;
  place-items: center;
  min-width: 32px;
  min-height: 32px;
  border-radius: 999px;
  color: #fff;
  background: #a83445;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.mobile-power {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  padding: 9px 14px;
  color: #082738;
  background: linear-gradient(125deg, #b4f4db, #e1f47a);
}

.mobile-power div {
  position: relative;
  display: grid;
  justify-items: center;
}

.mobile-power span {
  font-size: 0.62rem;
  font-weight: 850;
  text-transform: uppercase;
}

.mobile-power strong {
  font-size: clamp(2rem, 12vw, 3.25rem);
  line-height: 0.95;
}

.mobile-power i {
  width: 34px;
  height: 42px;
  color: inherit;
  background: currentColor;
  mask: url("assets/icons/power-flash.svg") center / contain no-repeat;
  -webkit-mask: url("assets/icons/power-flash.svg") center / contain no-repeat;
  filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.3));
  transform: scale(2);
}

.mobile-power--winner-player {
  background: var(--mobile-player-color);
  box-shadow: inset 0 0 0 4px var(--mobile-player-color);
}

.mobile-power--winner-opponent {
  background: var(--mobile-opponent-color);
  box-shadow: inset 0 0 0 4px var(--mobile-opponent-color);
}

.mobile-power p {
  grid-column: 1 / -1;
  margin: 0;
  overflow: hidden;
  font-size: 0.68rem;
  font-weight: 750;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-scene {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 142px;
}

.mobile-scene--resolving {
  border-radius: 18px;
  background: radial-gradient(circle, rgba(102, 232, 192, 0.12), transparent 68%);
}

.mobile-active-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: min(270px, 86vw);
}

.mobile-played-star-power {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: min(330px, 100%);
  border: 1px solid rgba(88, 221, 160, 0.5);
  border-radius: 14px;
  padding: 12px;
  color: #fff;
  background: linear-gradient(135deg, rgba(14, 113, 75, 0.92), rgba(5, 48, 57, 0.96));
  box-shadow: 0 12px 28px rgba(1, 20, 27, 0.34);
}

.mobile-played-star-power img {
  width: 82px;
  aspect-ratio: 731 / 1039;
  border-radius: 8px;
  object-fit: cover;
}

.mobile-played-star-power div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mobile-played-star-power span {
  color: #82edb7;
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mobile-played-star-power p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.7rem;
  line-height: 1.4;
}

.mobile-played-star-power .mobile-opponent-continue {
  grid-column: 1 / -1;
}

.mobile-active-card img {
  width: 82px;
  border-radius: 7px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.38);
}

.mobile-active-card div {
  display: grid;
  gap: 4px;
}

.mobile-active-card span,
.mobile-active-card small {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.68rem;
}

.mobile-active-card--empty {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  min-height: 56px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 18px;
}

.mobile-resolution-messages {
  display: grid;
  gap: 4px;
  width: min(330px, 100%);
  text-align: center;
}

.mobile-resolution-messages p {
  margin: 0;
  color: #b8efd9;
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1.35;
}

.mobile-scene--opponent-reveal {
  align-content: stretch;
  min-height: 286px;
  border-color: rgba(234, 142, 106, 0.42);
  background:
    radial-gradient(circle at 16% 30%, rgba(234, 142, 106, 0.18), transparent 42%),
    rgba(2, 22, 34, 0.76);
}

.mobile-opponent-reveal {
  display: grid;
  grid-template-columns: minmax(82px, 0.38fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.mobile-opponent-card-visual {
  min-width: 82px;
  min-height: 116px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9px;
  padding: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.32);
}

.mobile-opponent-card-visual img {
  display: block;
  width: 100%;
  max-height: 158px;
  object-fit: cover;
}

.mobile-opponent-card-details {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.mobile-opponent-card-details > span {
  color: #f4aa8e;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-opponent-card-details > strong {
  color: #fff;
  font-size: 1rem;
  line-height: 1.1;
}

.mobile-opponent-card-details dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
}

.mobile-opponent-card-details dl div {
  display: grid;
  gap: 1px;
  border-radius: 7px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
}

.mobile-opponent-card-details dt {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.54rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mobile-opponent-card-details dd {
  margin: 0;
  color: #dff376;
  font-size: 0.75rem;
  font-weight: 950;
}

.mobile-opponent-card-details p {
  display: grid;
  gap: 1px;
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.64rem;
  line-height: 1.3;
}

.mobile-opponent-card-details p strong {
  color: #fff;
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mobile-opponent-continue {
  grid-column: 1 / -1;
  min-height: 48px;
  border-radius: 12px;
  color: #062637;
  background: #dff376;
  font-size: 0.88rem;
  font-weight: 950;
}

.mobile-hand-section--disabled {
  opacity: 0.46;
}

.mobile-hand-section--disabled .mobile-card-hand {
  filter: grayscale(0.8);
  pointer-events: none;
}

.mobile-value-delta {
  position: absolute;
  z-index: 4;
  top: -8px;
  right: -9px;
  border-radius: 999px;
  padding: 2px 5px;
  color: #062637;
  background: #dff376;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.25);
  font-size: 0.7rem;
  font-weight: 950;
  pointer-events: none;
  animation: mobile-value-delta 700ms ease-out both;
}

.mobile-value-delta--loss {
  color: #fff;
  background: #a83445;
}

.mobile-last-card {
  display: grid;
  gap: 5px;
}

.mobile-last-card-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.mobile-history-inline {
  align-self: end;
  height: 64px;
  min-height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 12px;
  padding: 0 12px;
  color: #f7fbff;
  background: rgba(3, 31, 45, 0.94);
  font-size: 0.66rem;
  font-weight: 900;
}

.mobile-assistance-option button {
  min-width: 86px;
  border: 1px solid rgba(140, 224, 191, 0.42);
  border-radius: 999px;
  padding: 8px 13px;
  color: #062637;
  background: #8ce0bf;
  font-weight: 950;
}

.mobile-assistance-option button[aria-pressed="true"] {
  color: #fff;
  background: #197d68;
}

.mobile-last-card > header strong {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.mobile-last-card-button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 5px 8px;
  color: #f7fbff;
  background: rgba(255, 255, 255, 0.06);
  text-align: left;
}

.mobile-last-card-button img {
  width: 34px;
  max-height: 46px;
  border-radius: 3px;
  object-fit: cover;
}

.mobile-last-card-button span {
  display: grid;
}

.mobile-last-card-button small,
.mobile-last-card-empty {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.65rem;
}

.mobile-last-card-empty {
  min-height: 44px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  padding: 13px;
  text-align: center;
}

.mobile-resolution-flyer {
  position: fixed;
  z-index: 400;
  border-radius: 8px;
  object-fit: cover;
  pointer-events: none;
  will-change: transform, opacity;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
}

.mobile-resolution-locked {
  cursor: progress;
}

.mobile-resolution-locked button {
  pointer-events: none;
}

.mobile-last-card-zoom,
.mobile-opponent-card-zoom,
.mobile-card-detail {
  position: fixed;
  inset: 0;
  z-index: 420;
  display: grid;
  place-items: center;
  padding: max(54px, env(safe-area-inset-top)) 22px max(22px, env(safe-area-inset-bottom));
  background: rgba(0, 10, 17, 0.9);
}

.mobile-last-card-zoom > button,
.mobile-opponent-card-zoom > button,
.mobile-card-detail > button {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 1.5rem;
}

.mobile-last-card-zoom img,
.mobile-opponent-card-zoom img,
.mobile-card-detail > img {
  width: min(78vw, 310px);
  max-height: calc(100dvh - 90px);
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.mobile-card-detail {
  grid-template-columns: minmax(0, 310px);
  align-content: center;
  gap: 14px;
  overflow-y: auto;
}

.mobile-card-detail > section {
  display: grid;
  gap: 8px;
  width: min(78vw, 310px);
  border-radius: 14px;
  padding: 14px;
  color: #fff;
  background: #073046;
}

.mobile-card-detail h2,
.mobile-card-detail p {
  margin: 0;
}

.mobile-card-detail > section > span {
  color: #8ce0bf;
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mobile-card-detail dl {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin: 0;
}

.mobile-card-detail dl div {
  display: grid;
  gap: 2px;
  border-radius: 8px;
  padding: 6px 3px;
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
}

.mobile-card-detail dt {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.5rem;
  text-transform: uppercase;
}

.mobile-card-detail dd {
  margin: 0;
  color: #dff376;
  font-size: 0.78rem;
  font-weight: 950;
}

.mobile-card-detail p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  line-height: 1.4;
}

.mobile-utility-nav {
  position: fixed;
  z-index: 360;
  right: max(10px, env(safe-area-inset-right));
  bottom: max(8px, env(safe-area-inset-bottom));
  left: max(10px, env(safe-area-inset-left));
  display: flex;
  justify-content: flex-start;
  pointer-events: none;
}

.mobile-utility-nav button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 96px;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 999px;
  padding: 0 14px;
  color: #f7fbff;
  background: rgba(3, 31, 45, 0.94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
  font-size: 0.68rem;
  font-weight: 900;
  pointer-events: auto;
}

.mobile-sheet-backdrop,
.mobile-return-confirm {
  position: fixed;
  z-index: 430;
  inset: 0;
  display: grid;
  align-items: end;
  padding:
    max(48px, env(safe-area-inset-top))
    env(safe-area-inset-right)
    0
    env(safe-area-inset-left);
  background: rgba(0, 10, 17, 0.72);
}

.mobile-bottom-sheet {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: 100%;
  max-height: min(82dvh, 720px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 22px 22px 0 0;
  padding: 7px 12px max(14px, env(safe-area-inset-bottom));
  overflow: hidden;
  color: #fff;
  background: #062b3d;
  box-shadow: 0 -22px 60px rgba(0, 0, 0, 0.42);
  animation: mobile-sheet-enter 180ms ease-out both;
}

.mobile-sheet-content,
.mobile-history-list,
.mobile-competition-matches {
  contain: layout paint;
}

.mobile-history-entry,
.mobile-competition-matches li {
  content-visibility: auto;
  contain-intrinsic-size: auto 96px;
}

.mobile-sheet-grabber {
  justify-self: center;
  width: 46px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
}

.mobile-bottom-sheet > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-bottom-sheet h2 {
  margin: 0;
  font-size: 1.05rem;
}

.mobile-bottom-sheet > header button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 1.35rem;
}

.mobile-sheet-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 0;
}

.mobile-sheet-empty {
  margin: 0;
  border: 1px dashed rgba(255, 255, 255, 0.17);
  border-radius: 12px;
  padding: 20px;
  color: rgba(255, 255, 255, 0.62);
  text-align: center;
}

.mobile-bonus-list,
.mobile-history-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-bonus-groups,
.mobile-bonus-group {
  display: grid;
  gap: 10px;
}

.mobile-bonus-group + .mobile-bonus-group {
  margin-top: 8px;
}

.mobile-bonus-group > h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  color: #dff376;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mobile-bonus-group > h3 span {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: rgba(223, 243, 118, 0.12);
}

.mobile-bonus-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  border: 1px solid rgba(140, 224, 191, 0.16);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.mobile-bonus-item--permanent {
  border-color: rgba(68, 214, 137, 0.42);
  background: rgba(20, 126, 79, 0.32);
}

.mobile-bonus-item.mobile-bonus-item--permanent > span {
  color: #68e6aa;
  background: rgba(20, 126, 79, 0.72);
}

.mobile-bonus-group--permanent > h3,
.mobile-bonus-item--permanent small {
  color: #68e6aa;
}

.mobile-bonus-item--constraint {
  border-color: rgba(251, 146, 60, 0.52);
  background: rgba(194, 82, 20, 0.25);
}

.mobile-bonus-item.mobile-bonus-item--constraint > span {
  color: #ffad66;
  background: rgba(194, 82, 20, 0.72);
}

.mobile-bonus-item--constraint.mobile-bonus-item--star-blue {
  border-color: rgba(87, 174, 232, 0.68);
  background: rgba(38, 120, 177, 0.28);
}

.mobile-bonus-item--constraint.mobile-bonus-item--star-rose {
  border-color: rgba(231, 120, 164, 0.7);
  background: rgba(178, 55, 108, 0.27);
}

.mobile-bonus-item--star-blue > span {
  color: #062b3d;
  background: #57aee8;
}

.mobile-bonus-item--star-rose > span {
  color: #401225;
  background: #e778a4;
}

.mobile-bonus-star-icon {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.mobile-bonus-group--constraint > h3,
.mobile-bonus-item--constraint small {
  color: #ffad66;
}

.mobile-bonus-item > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #8ce0bf;
  background: rgba(30, 116, 98, 0.56);
  font-weight: 950;
}

.mobile-bonus-item div {
  display: grid;
  gap: 2px;
}

.mobile-bonus-item small {
  color: #8ce0bf;
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mobile-bonus-item p {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.68rem;
  line-height: 1.4;
}

.mobile-history-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 8px;
  border-left: 5px solid rgba(140, 224, 191, 0.62);
  border-radius: 0 10px 10px 0;
  padding: 9px 9px 9px 10px;
  background: rgba(255, 255, 255, 0.05);
}

.mobile-history-entry--side-player {
  border-left-color: var(--mobile-player-color);
}

.mobile-history-entry--side-opponent {
  border-left-color: var(--mobile-opponent-color);
}

.mobile-history-entry--side-information {
  border-left-color: #a9b8c5;
}

.mobile-history-entry--side-player > div span {
  color: var(--mobile-player-color);
  background: color-mix(in srgb, var(--mobile-player-color) 14%, transparent);
}

.mobile-history-entry--side-opponent > div span {
  color: var(--mobile-opponent-color);
  background: color-mix(in srgb, var(--mobile-opponent-color) 14%, transparent);
}

.mobile-history-entry--side-information > div span {
  color: #d7e1e9;
  background: rgba(215, 225, 233, 0.1);
}

.mobile-history-entry > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.mobile-history-entry > div span,
.mobile-history-entry > div small {
  border-radius: 999px;
  padding: 2px 6px;
  color: #8ce0bf;
  background: rgba(140, 224, 191, 0.1);
  font-size: 0.54rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mobile-history-entry > div small {
  color: #dff376;
}

.mobile-history-entry > button {
  grid-column: 2;
  grid-row: 1 / 3;
  width: 48px;
  min-height: 56px;
  border-radius: 7px;
  padding: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-history-entry > button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-history-entry > p {
  grid-column: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.68rem;
  line-height: 1.4;
}

.mobile-history-entry--side-player .mobile-history-player-name {
  color: var(--mobile-player-color);
}

.mobile-history-entry--side-opponent .mobile-history-player-name {
  color: var(--mobile-opponent-color);
}

.mobile-history-player-name {
  font-weight: 950;
}

body.mobile-game-view .boost-choice-backdrop,
body.mobile-game-view .effect-choice-backdrop,
body.mobile-game-view .coach-choice-backdrop,
body.mobile-game-view .remove-choice-backdrop {
  z-index: 850;
  display: flex;
  align-items: center;
  padding:
    max(14px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
  background: rgba(2, 13, 20, 0.86);
  backdrop-filter: blur(5px);
}

body.mobile-game-view .boost-choice-backdrop .modal,
body.mobile-game-view .effect-choice-backdrop .modal,
body.mobile-game-view .coach-choice-backdrop .modal,
body.mobile-game-view .remove-choice-backdrop .modal {
  width: 100%;
  max-height: min(88dvh, 720px);
  overflow-y: auto;
  border: 1px solid rgba(94, 225, 184, 0.36);
  border-radius: 18px;
  padding: 16px;
  color: #fff;
  background: #082b3b;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58);
}

body.mobile-game-view .boost-choice-backdrop .modal h2,
body.mobile-game-view .effect-choice-backdrop .modal h2,
body.mobile-game-view .coach-choice-backdrop .modal h2,
body.mobile-game-view .remove-choice-backdrop .modal h2 {
  margin-right: 48px;
  color: #fff;
  font-size: 1.2rem;
}

body.mobile-game-view .boost-choice-backdrop .modal > p,
body.mobile-game-view .effect-choice-backdrop .modal > p,
body.mobile-game-view .coach-choice-backdrop .modal > p,
body.mobile-game-view .remove-choice-backdrop .modal > p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.45;
}

body.mobile-game-view .choice-grid {
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 4px 2px 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
}

body.mobile-game-view .choice-card {
  flex: 0 0 clamp(112px, 34vw, 142px);
  scroll-snap-align: start;
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

body.mobile-game-view .choice-card span {
  color: rgba(255, 255, 255, 0.72);
}

.mobile-history-entry > ul {
  grid-column: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-history-entry > ul li {
  border-radius: 999px;
  padding: 3px 7px;
  color: #062b3d;
  background: #dff376;
  font-size: 0.6rem;
  font-weight: 950;
}

.mobile-return-confirm {
  align-items: center;
  padding: 20px;
}

.mobile-return-confirm > section {
  display: grid;
  gap: 10px;
  width: min(100%, 380px);
  justify-self: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 20px;
  color: #fff;
  background: #073046;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.mobile-return-confirm span {
  color: #f4aa8e;
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mobile-return-confirm h2,
.mobile-return-confirm p {
  margin: 0;
}

.mobile-return-confirm p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

.mobile-return-confirm > section > div {
  display: grid;
  gap: 8px;
}

.mobile-return-confirm button {
  min-height: 48px;
  border-radius: 11px;
  font-weight: 900;
}

.mobile-return-confirm [data-mobile-cancel-return] {
  color: #062637;
  background: #dff376;
}

.mobile-return-confirm [data-mobile-confirm-return] {
  color: #fff;
  background: #b94f5a;
}

@keyframes mobile-sheet-enter {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mobile-value-delta {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.9);
  }
  18%, 72% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-9px) scale(1);
  }
}

.mobile-hand-section {
  position: fixed;
  z-index: 320;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 5px;
  padding:
    8px max(10px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));
  min-width: 0;
  background: linear-gradient(180deg, rgba(3, 23, 35, 0), #031723 16%, #031723 100%);
  isolation: isolate;
}

.mobile-card-hand {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 12px 28vw 8px 4px;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  isolation: isolate;
}

.mobile-turn-actions--selection + .mobile-card-hand {
  padding-top: 20px;
}

.mobile-card-hand::-webkit-scrollbar {
  display: none;
}

.mobile-hand-card {
  position: relative;
  flex: 0 0 108px;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  scroll-snap-align: start;
  transition: transform 180ms ease-out, filter 180ms ease-out;
}

.mobile-hand-card img {
  display: block;
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.mobile-hand-card > span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  left: 4px;
  border-radius: 5px;
  padding: 3px;
  color: #071e2c;
  background: #e1f47a;
  font-size: 0.55rem;
  font-weight: 900;
  text-align: center;
}

.mobile-hand-card--locked img {
  filter: grayscale(1);
  opacity: 0.52;
}

.mobile-hand-card--selected {
  z-index: 2;
  filter: drop-shadow(0 9px 14px rgba(105, 238, 197, 0.28));
  transform: translateY(-6px) scale(1.035);
}

.mobile-hand-card--selected img {
  outline: 3px solid #74e6c0;
  outline-offset: 2px;
}

.mobile-hand-card > i {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  font-style: normal;
}

.mobile-selection-preview {
  position: relative;
  z-index: 20;
  display: grid;
  gap: 5px;
  border: 1px solid rgba(116, 230, 192, 0.34);
  border-radius: 12px;
  padding: 7px;
  background: rgba(5, 36, 51, 0.94);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  animation: mobile-selection-arrive 160ms ease-out;
}

.mobile-selection-preview dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.mobile-selection-preview dl div {
  display: grid;
  justify-items: center;
  min-width: 0;
  border-radius: 10px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.07);
  text-align: center;
}

.mobile-selection-preview dt {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.56rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mobile-selection-preview dd {
  margin: 0;
  color: #a9efd7;
  font-size: 1rem;
  font-weight: 950;
}

.mobile-selection-detail {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.mobile-selection-detail strong {
  color: #a9efd7;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mobile-selection-detail p,
.mobile-selection-detail ul {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.7rem;
  line-height: 1.35;
}

.mobile-effect-canceled {
  color: var(--mobile-opponent-color) !important;
  font-weight: 950;
}

.mobile-selection-detail ul {
  padding-left: 17px;
}

.mobile-play-modes,
.mobile-boost-sacrifices {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.mobile-play-modes legend,
.mobile-boost-sacrifices legend {
  margin-bottom: 4px;
  color: #a9efd7;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mobile-play-modes button {
  display: grid;
  gap: 2px;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 11px;
  padding: 7px 10px;
  color: #f7fbff;
  background: rgba(255, 255, 255, 0.07);
  text-align: left;
}

.mobile-play-modes button[aria-pressed="true"],
.mobile-boost-sacrifices button[aria-pressed="true"] {
  border-color: var(--mobile-player-color);
  background: rgba(94, 225, 184, 0.16);
}

.mobile-play-modes span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.64rem;
}

.mobile-boost-sacrifices {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(116px, 42vw);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.mobile-boost-sacrifices legend {
  position: sticky;
  left: 0;
  grid-column: auto;
  align-self: center;
  width: 88px;
  padding-right: 5px;
  background: #062633;
}

.mobile-boost-sacrifices::-webkit-scrollbar {
  display: none;
}

.mobile-boost-sacrifices button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 5px;
  color: #f7fbff;
  background: rgba(255, 255, 255, 0.07);
  text-align: left;
}

.mobile-boost-sacrifices img {
  width: 34px;
  height: 42px;
  border-radius: 4px;
  object-fit: cover;
}

.mobile-turn-actions {
  position: sticky;
  bottom: 0;
  z-index: 30;
  display: flex;
  align-items: stretch;
  gap: 5px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  isolation: isolate;
  pointer-events: auto;
}

.mobile-turn-actions::-webkit-scrollbar {
  display: none;
}

.mobile-turn-actions button {
  flex: 1 1 0;
  min-width: 52px;
  max-width: 25%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  padding: 4px 6px;
  color: #f7fbff;
  background: rgba(255, 255, 255, 0.09);
  font-weight: 850;
  font-size: 0.66rem;
  white-space: nowrap;
}

.mobile-match-result {
  display: grid;
  gap: 7px;
  border: 2px solid var(--mobile-player-color);
  border-radius: 16px;
  padding: 12px;
  background: rgba(5, 36, 51, 0.97);
  text-align: center;
}

.mobile-match-finale {
  position: fixed;
  z-index: 690;
  inset: 0;
  display: grid;
  align-content: center;
  gap: 18px;
  min-height: 100dvh;
  padding:
    max(18px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
  overflow-y: auto;
  color: #f7fbff;
  background:
    radial-gradient(circle at 50% 18%, rgba(94, 225, 184, 0.18), transparent 34%),
    linear-gradient(180deg, #062b3d, #031723);
  text-align: center;
}

.mobile-match-finale > header {
  display: grid;
  gap: 3px;
}

.mobile-match-finale > header span {
  color: #dff376;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mobile-match-finale > header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.mobile-match-finale-players {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-match-finale-player {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.mobile-match-finale-player > strong {
  overflow: hidden;
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-match-finale-portrait {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 2px solid var(--mobile-opponent-color);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.mobile-match-finale-player--player .mobile-match-finale-portrait {
  border-color: var(--mobile-player-color);
}

.mobile-match-finale-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: opacity 360ms ease-out;
}

.mobile-match-finale-outcome {
  opacity: 0;
}

.mobile-match-finale--resolved .mobile-match-finale-lobby {
  opacity: 0;
}

.mobile-match-finale--resolved .mobile-match-finale-outcome {
  opacity: 1;
}

.mobile-match-finale-sets {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-match-finale-set {
  display: grid;
  grid-template-columns: 1fr 2px 1fr;
  align-items: center;
  width: min(86px, 22vw);
  min-height: 46px;
  border-radius: 12px;
  color: #082738;
  font-size: 1rem;
  font-weight: 950;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
}

.mobile-match-finale-set--player {
  background: var(--mobile-player-color);
}

.mobile-match-finale-set--opponent {
  background: var(--mobile-opponent-color);
}

.mobile-match-finale-set--visible {
  opacity: 1;
  transform: none;
  transition: opacity 220ms ease-out, transform 220ms ease-out;
}

.mobile-match-finale-set i {
  width: 2px;
  height: 20px;
  background: rgba(8, 39, 56, 0.22);
}

.mobile-match-finale > nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  animation: mobile-match-finale-fade 300ms ease-out both;
}

.mobile-match-finale > nav button {
  min-width: min(210px, 100%);
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 9px 14px;
  color: #082738;
  background: var(--mobile-player-color);
  font-weight: 950;
}

@keyframes mobile-match-finale-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

body.mobile-game-view .event-confirm-backdrop {
  z-index: 730;
}

.mobile-match-result--opponent {
  border-color: var(--mobile-opponent-color);
}

.mobile-match-result > span {
  color: #dff376;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-match-result h2,
.mobile-match-result p {
  margin: 0;
}

.mobile-match-result > strong {
  font-size: 1.35rem;
}

.mobile-match-result > p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.7rem;
  line-height: 1.35;
}

.mobile-match-result > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 9px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.07);
}

.mobile-match-result nav {
  display: grid;
  gap: 7px;
}

.mobile-match-result button,
.mobile-tutorial button {
  min-height: 48px;
  border-radius: 11px;
  color: #062637;
  background: linear-gradient(125deg, #7be7c3, #dff376);
  font-weight: 950;
}

.mobile-tutorial {
  position: sticky;
  bottom: max(68px, calc(env(safe-area-inset-bottom) + 62px));
  z-index: 70;
  display: grid;
  gap: 8px;
  border: 2px solid #dff376;
  border-radius: 16px;
  padding: 11px;
  background: rgba(3, 24, 35, 0.98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

.mobile-tutorial header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-tutorial header img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.mobile-tutorial header div {
  display: grid;
}

.mobile-tutorial header span,
.mobile-tutorial figcaption {
  color: #dff376;
  font-size: 0.58rem;
  font-weight: 850;
}

.mobile-tutorial h2,
.mobile-tutorial p,
.mobile-tutorial figure {
  margin: 0;
}

.mobile-tutorial > p {
  font-size: 0.72rem;
  line-height: 1.4;
}

.mobile-tutorial figure {
  display: flex;
  align-items: center;
  gap: 9px;
}

.mobile-tutorial figure img {
  width: 58px;
  height: 82px;
  border-radius: 6px;
  object-fit: cover;
}

.mobile-tutorial-action {
  border-radius: 9px;
  padding: 7px;
  color: #062637;
  background: #dff376;
  font-weight: 900;
}

.mobile-tutorial-error {
  color: #ffab93;
}

.mobile-competition-summary {
  display: grid;
  gap: 4px;
  border-radius: 12px;
  padding: 10px;
  background: rgba(94, 225, 184, 0.09);
}

.mobile-competition-summary span {
  color: #8ce0bf;
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mobile-competition-summary p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.68rem;
}

.mobile-competition-matches {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.mobile-competition-matches li {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.mobile-competition-matches li.current {
  border-color: var(--mobile-player-color);
}

.mobile-competition-matches header,
.mobile-competition-matches p {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
}

.mobile-competition-matches header span,
.mobile-competition-matches small {
  color: #8ce0bf;
  font-size: 0.6rem;
}

.mobile-competition-matches p {
  font-size: 0.7rem;
}

.mobile-card-explanation section button {
  min-height: 48px;
  border-radius: 11px;
  padding: 8px 12px;
  font-weight: 900;
}

.mobile-cancel-card {
  color: #f7fbff;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-play-card {
  color: #062637;
  background: linear-gradient(125deg, #7be7c3, #dff376);
}

.mobile-card-explanation {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  align-items: end;
}

.mobile-card-explanation-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100%;
  background: rgba(0, 11, 18, 0.74);
}

.mobile-card-explanation section {
  position: relative;
  display: grid;
  gap: 9px;
  border-radius: 20px 20px 0 0;
  padding: 20px 16px max(16px, env(safe-area-inset-bottom));
  color: #f7fbff;
  background: #082c3e;
  box-shadow: 0 -18px 44px rgba(0, 0, 0, 0.38);
}

.mobile-card-explanation section > span {
  color: #efb1b1;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-card-explanation section p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.45;
}

.mobile-card-explanation section button {
  color: #062637;
  background: #9cebd0;
}

@keyframes mobile-selection-arrive {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.mobile-empty-hand,
.mobile-game-fallback {
  color: rgba(255, 255, 255, 0.66);
  text-align: center;
}

.mobile-portrait-lock {
  display: none;
}

@media (orientation: landscape) and (max-height: 600px) {
  body.mobile-game-view .mobile-game-shell > :not(.mobile-portrait-lock) {
    display: none;
  }

  .mobile-portrait-lock {
    display: grid;
    place-content: center;
    gap: 8px;
    min-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding:
      max(24px, env(safe-area-inset-top))
      max(24px, env(safe-area-inset-right))
      max(24px, env(safe-area-inset-bottom))
      max(24px, env(safe-area-inset-left));
    text-align: center;
  }

  .mobile-portrait-lock span {
    color: rgba(255, 255, 255, 0.64);
  }
}

@media (max-width: 430px) {
  .mobile-game-shell {
    font-size: max(1rem, 100%);
  }

  .mobile-player-copy strong,
  .mobile-player-copy span,
  .mobile-mode-context strong,
  .mobile-connection span,
  .mobile-power p {
    white-space: normal;
    overflow-wrap: anywhere;
  }

}

@media (max-width: 430px) and (min-resolution: 1dppx) {
  .mobile-selection-detail p,
  .mobile-selection-detail li,
  .mobile-match-result > p,
  .mobile-tutorial > p,
  .mobile-opponent-card-details p {
    font-size: max(0.7rem, 11px);
  }
}

@media (max-height: 720px) and (orientation: portrait) {
  .mobile-game-shell {
    gap: 6px;
  }

  .mobile-scene {
    min-height: 112px;
  }

  .mobile-last-card {
    gap: 3px;
  }

  .mobile-active-card img {
    width: 68px;
  }

  .mobile-hand-card {
    flex-basis: 94px;
  }

  .mobile-power p {
    display: none;
  }

  .mobile-scene--opponent-reveal {
    min-height: 262px;
  }

  .mobile-opponent-card-visual img {
    max-height: 136px;
  }
}

@media (max-width: 340px) {
  .mobile-opponent-reveal {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 8px;
  }

  .mobile-opponent-card-visual {
    min-width: 74px;
  }

  .mobile-opponent-card-details dl {
    gap: 3px;
  }

  .mobile-opponent-card-details dl div {
    padding: 4px 2px;
  }
}

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

  .mobile-value-delta {
    opacity: 1;
    transform: none;
  }
}

@supports (-webkit-touch-callout: none) {
  body.mobile-game-view .mobile-game-shell img,
  body.mobile-game-view .mobile-card,
  body.mobile-game-view [data-mobile-card],
  body.mobile-game-view [data-image-zoom] {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }

  .mobile-hand-section {
    align-content: end;
    height: clamp(310px, 46dvh, 380px);
    background: transparent;
    pointer-events: none;
  }

  .mobile-hand-section::before {
    position: absolute;
    z-index: 0;
    right: 0;
    bottom: 0;
    left: 0;
    height: 224px;
    background: linear-gradient(180deg, rgba(3, 23, 35, 0), #031723 18%, #031723 100%);
    content: "";
    pointer-events: none;
  }

  .mobile-hand-section > * {
    pointer-events: auto;
  }
}

.mobile-mode-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1ch;
  flex: 1 1 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.mobile-mode-action--cancel {
  flex: 0 0 10%;
  min-width: 44px !important;
  max-width: 10%;
  width: 10%;
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.1);
  font-size: 1.25rem;
}

.mobile-mode-action--normal,
.mobile-mode-action--effect {
  border-color: color-mix(in srgb, var(--mobile-player-color) 72%, white) !important;
  color: #062637 !important;
  background: var(--mobile-player-color) !important;
}

.mobile-mode-action--normal {
  max-width: 50% !important;
}

.mobile-mode-action--effect,
.mobile-mode-action--placement,
.mobile-mode-action--boost {
  max-width: 25% !important;
}

.mobile-action-warning {
  flex: 0 0 2em;
  width: 2em;
  height: 2em;
  color: currentColor;
}

.mobile-undo-turn {
  border-color: rgba(255, 180, 154, 0.7) !important;
  background: linear-gradient(135deg, #825142, #653b31) !important;
}

.mobile-end-turn {
  border-color: color-mix(in srgb, var(--mobile-player-color) 72%, white) !important;
  color: #062637 !important;
  background: var(--mobile-player-color) !important;
}

.mobile-end-turn--risk {
  border-color: rgba(255, 142, 122, 0.85) !important;
  color: #fff !important;
  background: linear-gradient(135deg, #a94d3c, #813528) !important;
}

.mobile-turn-actions > .mobile-pass-button:only-child {
  flex: 0 0 25%;
  width: 25%;
}

.mobile-mode-action--boost,
.mobile-mode-action--placement {
  border-color: rgba(255, 206, 92, 0.72) !important;
  color: #fff !important;
  background: linear-gradient(135deg, #b78823, #8f6817) !important;
}

.mobile-mode-action--risk {
  border-color: rgba(255, 142, 122, 0.85) !important;
  color: #fff !important;
  background: linear-gradient(135deg, #a94d3c, #813528) !important;
}

.mobile-opponent-reveal--automatic {
  grid-template-columns: minmax(82px, 118px) minmax(0, 1fr);
  align-items: center;
  min-height: 218px;
}

.mobile-opponent-reveal--automatic > dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.mobile-opponent-reveal--automatic > dl div {
  display: grid;
  justify-items: center;
  border-radius: 10px;
  padding: 8px 4px;
  background: rgba(255, 255, 255, 0.07);
}

.mobile-opponent-reveal--automatic dt {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.58rem;
  text-transform: uppercase;
}

.mobile-opponent-reveal--automatic dd {
  margin: 0;
  color: #ffd1bc;
  font-size: 1.05rem;
  font-weight: 950;
}

.mobile-return-confirm [data-mobile-confirm-pass] {
  color: #fff;
  background: #b94f5a;
}

.mobile-return-confirm [data-mobile-cancel-pass] {
  color: #062637;
  background: #dff376;
}

.mobile-pass-button--player {
  border-color: rgba(111, 226, 174, 0.75) !important;
  background: linear-gradient(135deg, #197d68, #126452) !important;
}

.mobile-pass-button--opponent {
  border-color: rgba(255, 142, 122, 0.85) !important;
  background: linear-gradient(135deg, #a94d3c, #813528) !important;
}

.mobile-undo-turn {
  border-color: rgba(255, 206, 92, 0.55) !important;
  background: rgba(183, 136, 35, 0.22) !important;
  color: #ffe5a4 !important;
}

.mobile-last-card-button--boost {
  border-color: rgba(255, 206, 92, 0.72);
  background:
    linear-gradient(135deg, rgba(183, 136, 35, 0.32), rgba(93, 57, 136, 0.26)),
    rgba(10, 18, 29, 0.92);
}

.mobile-last-card-boost {
  align-self: center;
  justify-self: end;
  border-radius: 999px;
  padding: 4px 7px;
  background: #f0c451;
  color: #251c08;
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.06em;
}

.mobile-scene .mobile-match-result {
  width: 100%;
  min-height: 100%;
  align-content: center;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.mobile-scene .mobile-match-result > span {
  color: #f5f7fb;
  font-size: 0.82rem;
  letter-spacing: normal;
  text-transform: none;
}

.mobile-scene .mobile-match-result > strong {
  color: #fff;
  font-size: clamp(1.2rem, 6vw, 1.6rem);
}

.mobile-match-menu-list {
  display: grid;
  gap: 8px;
}

.mobile-match-menu-list button {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  padding: 10px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  text-align: left;
  font-weight: 850;
}

.mobile-match-menu-list .mobile-menu-forfeit {
  border-color: rgba(217, 75, 75, .42);
  color: #fff;
  background: #b83232;
}

.mobile-match-admin-tools {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .18);
}

.mobile-match-admin-tools h3 {
  margin: 0 0 2px;
  color: #8ce0bf;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.mobile-match-admin-tools button[aria-pressed="true"] {
  color: #fff;
  border-color: #f3bfd8;
  background: #8a2d58;
}

.mobile-league-standing {
  margin-bottom: 16px;
}

.mobile-league-standing h3 {
  margin: 0 0 8px;
}

.mobile-league-standing [role="row"] {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 30px 30px 38px;
  align-items: center;
  min-height: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.mobile-league-standing [role="row"] > :nth-child(2) {
  text-align: left;
}

.mobile-standing-head {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.7rem;
  font-weight: 850;
}

.mobile-assistance-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  min-height: 56px;
}

.mobile-assistance-option strong,
.mobile-assistance-option small {
  display: block;
}

.mobile-assistance-option small,
.mobile-assistance-note {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.62);
}

.mobile-assistance-option input {
  width: 44px;
  height: 28px;
  accent-color: #3fb091;
}

.mobile-player-bonus-section {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.mobile-player-bonus-section h3 {
  margin: 0;
  font-size: 0.85rem;
}
