@font-face {
  font-family: "Widock";
  src: url("./assets/WidockTrialBold.otf") format("opentype");
  font-weight: 700 900;
  font-display: block;
}

@font-face {
  font-family: "Consolas Local";
  src: url("./assets/Consolas-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "Consolas Local";
  src: url("./assets/Consolas-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "Montserrat Local";
  src: url("./assets/Montserrat-Bold.ttf") format("truetype");
  font-weight: 700 900;
  font-style: normal;
  font-display: block;
}

:root {
  --bg: #020202;
  --text: #f8f8f4;
  --muted: #a9a9a2;
  --line: rgba(248, 248, 244, 0.26);
  --line-hot: rgba(255, 54, 54, 0.86);
  --panel: rgba(8, 8, 8, 0.78);
  --red: #ff3636;
  --green: #47e58b;
  --font-main: "Consolas Local", Consolas, "Courier New", monospace;
  --font-logo: Widock, "Widock TRIAL", Impact, "Arial Black", sans-serif;
  --font-number: "Montserrat Local", Montserrat, Arial, sans-serif;
  --ticker-x-gap: clamp(0.42rem, 1.65vw, 0.72rem);
  --ticker-y-gap: clamp(0.03rem, 0.18vw, 0.08rem);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
}

body {
  position: relative;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,0.055), transparent 18rem),
    linear-gradient(180deg, #000 0%, #030303 60%, #000 100%);
  font-family: var(--font-main);
  font-weight: 700;
  text-transform: uppercase;
  transition: opacity 160ms ease;
}

.is-loading-state body {
  opacity: 0;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

.ticker-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-template-rows: repeat(8, 1fr);
  gap: var(--ticker-y-gap);
  min-height: 100svh;
  overflow: hidden;
  opacity: 0.04;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
}

.ticker-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 100%;
  overflow: hidden;
}

.ticker-track {
  display: flex;
  width: max-content;
  transform: translate3d(var(--ticker-start, -8rem), 0, 0);
  animation: ticker-left-track var(--ticker-duration, 86s) linear infinite;
  will-change: transform;
}

.ticker-segment {
  display: flex;
  flex: 0 0 auto;
  gap: var(--ticker-x-gap);
  padding-right: var(--ticker-x-gap);
}

.ticker-segment img {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: clamp(4.6rem, 22vw, 8.4rem);
  user-select: none;
  -webkit-user-drag: none;
}

.ticker-row.right {
  --ticker-duration: 103s;
  --ticker-start: -23rem;
}

.ticker-row.right .ticker-track {
  animation-name: ticker-right-track;
}

.ticker-row.slow {
  --ticker-duration: 124s;
}

.ticker-row.fast {
  --ticker-duration: 73s;
}

.ticker-row.mid {
  --ticker-duration: 94s;
}

.ticker-row:nth-child(1) { --ticker-start: -4rem; }
.ticker-row:nth-child(2) { --ticker-start: -31rem; }
.ticker-row:nth-child(3) { --ticker-start: -17rem; }
.ticker-row:nth-child(4) { --ticker-start: -42rem; }
.ticker-row:nth-child(5) { --ticker-start: -9rem; }
.ticker-row:nth-child(6) { --ticker-start: -35rem; }
.ticker-row:nth-child(7) { --ticker-start: -24rem; }
.ticker-row:nth-child(8) { --ticker-start: -12rem; }

@keyframes ticker-left-track {
  from { transform: translate3d(var(--ticker-start), 0, 0); }
  to { transform: translate3d(calc(var(--ticker-start) - 50%), 0, 0); }
}

@keyframes ticker-right-track {
  from { transform: translate3d(calc(var(--ticker-start) - 50%), 0, 0); }
  to { transform: translate3d(var(--ticker-start), 0, 0); }
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  min-height: 100svh;
  margin: 0 auto;
  padding:
    max(2.45rem, calc(env(safe-area-inset-top) + 1.35rem))
    clamp(1.15rem, 4.4vw, 1.55rem)
    max(1.2rem, env(safe-area-inset-bottom));
}

body.is-telegram .app-shell {
  padding-top: max(2.65rem, calc(env(safe-area-inset-top) + 0.35rem));
}

body.is-telegram .ticker-bg {
  position: fixed;
  inset: 0;
  height: 100lvh;
  min-height: 100svh;
}

.app-header {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  min-height: 2.25rem;
  margin-bottom: 0.85rem;
}

.brand {
  display: block;
  width: clamp(7.1rem, 30vw, 8.2rem);
  height: auto;
  object-fit: contain;
}

.spot-tagline {
  max-width: 7.8rem;
  margin: 0;
  text-align: right;
  color: var(--text);
  font-size: clamp(0.56rem, 2.25vw, 0.74rem);
  line-height: 1.12;
  letter-spacing: 0;
  white-space: normal;
}

.spot-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.48rem;
  font-size: 0.82rem;
}

.spot-label strong {
  color: var(--red);
  font-size: 0.7rem;
}

.spot-card {
  margin-top: 0.78rem;
}

.spot-frame {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px),
    rgba(8,8,8,0.82);
  background-size: 22px 22px;
  color: var(--text);
  text-decoration: none;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.58), 0 26px 60px rgba(0,0,0,0.5);
  animation: spot-pulse 3.8s ease-in-out infinite;
}

.spot-frame.under-attack {
  border-color: var(--line-hot);
  animation: attack-pulse 2.2s ease-in-out infinite;
}

@keyframes spot-pulse {
  0%, 100% {
    box-shadow: inset 0 0 60px rgba(0,0,0,0.58), 0 26px 60px rgba(0,0,0,0.5), 0 0 0 rgba(255,255,255,0);
  }
  50% {
    box-shadow: inset 0 0 60px rgba(0,0,0,0.58), 0 26px 60px rgba(0,0,0,0.5), 0 0 28px rgba(255,255,255,0.12);
  }
}

@keyframes attack-pulse {
  0%, 100% { box-shadow: 0 0 24px rgba(255,54,54,0.12), inset 0 0 60px rgba(0,0,0,0.68); }
  50% { box-shadow: 0 0 48px rgba(255,54,54,0.28), inset 0 0 60px rgba(0,0,0,0.68); }
}

.empty-spot {
  position: absolute;
  inset: 0;
  display: grid;
  justify-items: center;
  place-content: center;
  gap: 1rem;
  padding: 1.35rem;
  text-align: center;
}

.empty-spot h1 {
  display: grid;
  justify-items: center;
  align-items: center;
  gap: 0;
  margin: 0;
  font-family: var(--font-logo);
  font-size: clamp(2.05rem, 10.6vw, 4rem);
  line-height: 0.9;
  text-align: center;
}

.empty-spot h1 span {
  display: block;
  white-space: nowrap;
}

.empty-spot button,
.primary-action {
  display: grid;
  min-height: 3.35rem;
  place-items: center;
  border: 1px solid var(--text);
  border-radius: 8px;
  background: var(--text);
  color: #050505;
  padding: 0.92rem 1rem;
  line-height: 1;
  text-align: center;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.empty-spot button,
.action-stack > .primary-action {
  position: relative;
  overflow: hidden;
  animation: claim-pulse 2.4s ease-in-out infinite;
}

.empty-spot button::after,
.action-stack > .primary-action::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -70%;
  width: 55%;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.72), transparent);
  animation: claim-sheen 3.6s ease-in-out infinite;
}

.empty-spot button > *,
.action-stack > .primary-action > * {
  position: relative;
  z-index: 1;
}

.empty-spot button {
  width: min(9.4rem, 42vw);
  min-width: 8.4rem;
  min-height: 3.08rem;
  padding-inline: 0.95rem;
}

.empty-spot button:active,
.primary-action:active {
  transform: scale(0.98);
}

@keyframes claim-pulse {
  0%, 100% {
    box-shadow: 0 0 0 rgba(255, 255, 255, 0);
  }
  50% {
    box-shadow: 0 0 26px rgba(255, 255, 255, 0.16);
  }
}

@keyframes claim-sheen {
  0%, 42% {
    left: -70%;
  }
  62%, 100% {
    left: 120%;
  }
}

.spot-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spot-frame.under-attack .spot-image {
  filter: blur(12px) brightness(0.42);
  transform: scale(1.04);
}

.battle-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.78rem;
  overflow: hidden;
  padding: 1rem;
  text-align: center;
  color: var(--red);
  background:
    radial-gradient(circle at 50% 46%, rgba(255,54,54,0.18), transparent 42%),
    linear-gradient(90deg, rgba(255,54,54,0.08), transparent 20%, transparent 80%, rgba(255,54,54,0.08)),
    repeating-linear-gradient(90deg, transparent 0 24px, rgba(255,54,54,0.22) 25px 26px),
    repeating-linear-gradient(0deg, transparent 0 24px, rgba(255,54,54,0.18) 25px 26px),
    rgba(0,0,0,0.42);
}

.battle-layer::before,
.battle-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.battle-layer::before {
  border: 1px solid rgba(255,54,54,0.62);
  box-shadow: inset 0 0 48px rgba(255,54,54,0.18), 0 0 42px rgba(255,54,54,0.22);
}

.battle-layer::after {
  background: linear-gradient(180deg, transparent, rgba(255,54,54,0.1), transparent);
  opacity: 0.54;
  transform: translateY(-40%);
  animation: battle-scan 4.8s ease-in-out infinite;
}

@keyframes battle-scan {
  0%, 100% { transform: translateY(-42%); }
  50% { transform: translateY(42%); }
}

.battle-layer h2,
.battle-versus,
.battle-timer {
  position: relative;
  z-index: 1;
}

.battle-layer h2 {
  margin: 0;
  font-family: var(--font-logo);
  font-size: clamp(1.7rem, 8vw, 3.2rem);
  line-height: 0.95;
  text-shadow: 0 0 22px rgba(255,54,54,0.42);
}

.battle-versus {
  display: grid;
  gap: 0.3rem;
  width: 100%;
  padding: 0.28rem 0;
}

.battle-versus strong {
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-logo);
  font-size: clamp(1rem, 4.5vw, 1.85rem);
  overflow-wrap: anywhere;
  white-space: normal;
}

.battle-versus span {
  font-family: var(--font-logo);
  font-size: 1.6rem;
  color: var(--red);
  text-shadow: 0 0 18px rgba(255,54,54,0.44);
}

.battle-timer {
  display: inline-grid;
  place-items: center;
  width: clamp(12.8rem, 58vw, 17.4rem);
  min-width: clamp(12.8rem, 58vw, 17.4rem);
  border: 1px solid rgba(255,54,54,0.3);
  border-radius: 8px;
  background: rgba(0,0,0,0.28);
  padding: 0.22rem 0.8rem;
  font-size: clamp(2rem, 10vw, 3.4rem);
  color: var(--red);
  text-shadow: 0 0 20px rgba(255,54,54,0.36);
}

.stats-carousel {
  display: grid;
  gap: 0.48rem;
  margin: 0.64rem 0 0.86rem;
  overflow: hidden;
  touch-action: pan-y;
}

.stats-track {
  display: flex;
  width: 100%;
  transform: translate3d(calc(var(--stat-visual-index, 1) * -100%), 0, 0);
  transition: transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.stats-track.no-transition {
  transition: none;
}

.stat {
  flex: 0 0 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-content: center;
  gap: 0.34rem;
  min-height: 5.35rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(248,248,244,0.05), rgba(248,248,244,0.015)),
    var(--panel);
  padding: 0.64rem 0.78rem;
}

.stat span {
  color: var(--muted);
  font-size: clamp(0.62rem, 2.45vw, 0.78rem);
  line-height: 1;
}

.stat strong {
  display: block;
  min-width: 0;
  max-width: 100%;
  color: var(--text);
  font-size: clamp(1.35rem, 6.2vw, 2rem);
  line-height: 0.98;
  overflow-wrap: normal;
  white-space: normal;
}

.stat small {
  display: block;
  color: var(--muted);
  font-size: clamp(0.66rem, 2.55vw, 0.82rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

[data-current-price],
[data-takeovers] {
  font-size: clamp(1.55rem, 7.4vw, 2.25rem);
  white-space: nowrap;
}

[data-owner] {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: clamp(1.18rem, 5.7vw, 1.88rem);
  text-transform: none;
}

.stats-dots {
  display: flex;
  justify-content: center;
  gap: 0.38rem;
  min-height: 0.7rem;
}

.stats-dots button {
  width: 0.38rem;
  height: 0.38rem;
  border: 0;
  border-radius: 999px;
  background: rgba(248,248,244,0.26);
  padding: 0;
  transition: width 220ms ease, background 220ms ease, opacity 220ms ease;
}

.stats-dots button[aria-current="true"] {
  width: 1.05rem;
  background: var(--text);
}

[data-current-price],
[data-next-price],
[data-takeovers],
[data-total-volume],
[data-checkout-price],
.battle-timer {
  font-family: var(--font-number);
  font-weight: 900;
}

.action-stack {
  display: grid;
  gap: 0.52rem;
  margin: 0.78rem 0 0;
}

.primary-action {
  display: grid;
  align-items: center;
  justify-items: center;
  place-items: center;
  width: 100%;
  min-height: 3.65rem;
  padding: 0.18rem 0.98rem 0;
  text-align: center;
  line-height: 1;
}

.primary-action:disabled {
  cursor: default;
}

.primary-action.is-owned,
.primary-action.is-battle {
  border-color: rgba(248, 248, 244, 0.38);
  background: rgba(8, 8, 8, 0.28);
  color: rgba(248, 248, 244, 0.54);
  box-shadow: none;
  animation: none;
}

.primary-action.is-battle:not(:disabled) {
  border-color: rgba(255, 54, 54, 0.64);
  background: rgba(255, 54, 54, 0.06);
  color: var(--red);
  animation: battle-button-pulse 2.8s ease-in-out infinite;
}

@keyframes battle-button-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255,54,54,0); }
  50% { box-shadow: 0 0 22px rgba(255,54,54,0.16); }
}

.primary-action.is-owned::after,
.primary-action.is-battle::after {
  display: none;
}

.battle-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.52rem;
}

.battle-actions button,
.mini-nav button,
.reset-button,
.sheet-head button,
.modal-close,
.terms-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8,8,8,0.7);
  color: var(--text);
  padding: 0.8rem;
  line-height: 1;
  text-align: center;
}

.battle-actions button {
  position: relative;
  overflow: hidden;
  display: grid;
  min-height: 3.25rem;
  place-items: center;
  padding: 0.12rem 0.6rem 0;
}

.battle-actions button:first-child {
  border-color: rgba(71,229,139,0.68);
  background: rgba(71,229,139,0.12);
  color: var(--green);
  animation: defend-pulse 2.8s ease-in-out infinite;
}

.battle-actions button:last-child {
  border-color: rgba(248,248,244,0.28);
  background: rgba(248,248,244,0.08);
  color: var(--muted);
  animation: let-go-pulse 3.2s ease-in-out infinite;
}

.battle-actions button::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -70%;
  width: 55%;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.34), transparent);
  animation: action-sheen 3.9s ease-in-out infinite;
}

@keyframes defend-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(71,229,139,0); }
  50% { box-shadow: 0 0 22px rgba(71,229,139,0.16); }
}

@keyframes let-go-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(248,248,244,0); }
  50% { box-shadow: 0 0 18px rgba(248,248,244,0.1); }
}

@keyframes action-sheen {
  0%, 48% { left: -70%; }
  68%, 100% { left: 120%; }
}

.mini-nav {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.52rem;
  margin-top: 0.92rem;
}

.mini-nav button {
  display: grid;
  place-items: center;
  min-height: 3.25rem;
  padding: 0.12rem 0.4rem 0;
  color: var(--muted);
  font-size: clamp(0.78rem, 3.25vw, 0.92rem);
  line-height: 1;
  text-align: center;
}

.mini-nav button:active,
.mini-nav button:hover {
  border-color: rgba(248,248,244,0.54);
  color: var(--text);
}

.history-list {
  display: grid;
  gap: 0.72rem;
}

.history-empty,
.history-item {
  display: grid;
  gap: 0.58rem;
  border: 1px solid rgba(248,248,244,0.16);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(248,248,244,0.045), rgba(248,248,244,0.015));
  padding: 0.78rem;
}

.history-empty span,
.history-top,
.history-bottom {
  color: var(--muted);
  font-size: 0.68rem;
}

.history-empty strong,
.history-item strong {
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.32;
  overflow-wrap: anywhere;
  text-transform: none;
}

.history-top,
.history-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.history-badge {
  border: 1px solid rgba(248,248,244,0.18);
  border-radius: 999px;
  padding: 0.18rem 0.46rem;
  color: var(--text);
}

.history-attack .history-badge {
  border-color: rgba(255,54,54,0.46);
  color: var(--red);
}

.history-defense .history-badge,
.history-takeover .history-badge {
  border-color: rgba(71,229,139,0.52);
  color: var(--green);
}

.history-actors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.32rem 0.42rem;
  padding: 0.1rem 0 0.05rem;
}

.history-actors b {
  min-width: 0;
  color: var(--text);
  font-family: var(--font-number);
  font-weight: 900;
  font-size: 0.84rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
  text-transform: none;
}

.history-actors span {
  border: 1px solid rgba(248,248,244,0.18);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1;
  padding: 0.16rem 0.38rem;
}

.history-attack .history-actors span {
  border-color: rgba(255,54,54,0.34);
  color: var(--red);
}

.history-defense .history-actors span,
.history-takeover .history-actors span {
  border-color: rgba(71,229,139,0.34);
  color: var(--green);
}

.history-bottom b {
  color: var(--text);
  font-family: var(--font-number);
}

.reset-button {
  width: 100%;
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity 220ms ease;
}

.modal-backdrop.is-visible {
  opacity: 1;
}

.modal {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 81;
  width: min(calc(100vw - 2rem), 31rem);
  max-height: min(76svh, 38rem);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3,3,3,0.94);
  box-shadow: 0 30px 90px rgba(0,0,0,0.72);
  padding: 1.35rem;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 220ms ease, transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.modal h2 {
  margin: 0 2.2rem 1.1rem 0;
  font-size: clamp(1.65rem, 8vw, 2.55rem);
  line-height: 1;
}

.modal-close {
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  padding: 0;
}

.modal-close,
.sheet-head button {
  position: relative;
  display: grid;
  width: 2.12rem;
  height: 2.12rem;
  place-items: center;
  padding: 0;
  color: transparent;
  font-size: 0;
  line-height: 1;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.modal-close {
  position: absolute;
}

.modal-close::before,
.modal-close::after,
.sheet-head button::before,
.sheet-head button::after {
  content: "";
  position: absolute;
  width: 0.98rem;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.modal-close::before,
.sheet-head button::before {
  transform: rotate(45deg);
}

.modal-close::after,
.sheet-head button::after {
  transform: rotate(-45deg);
}

.modal-close:hover,
.sheet-head button:hover {
  border-color: rgba(248,248,244,0.56);
  background: rgba(248,248,244,0.08);
  transform: scale(1.03);
}

.manifest-copy {
  display: grid;
  gap: 0.95rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
  text-transform: none;
}

.manifest-copy p {
  margin: 0;
}

.sheet[hidden] {
  display: none;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  opacity: 0;
  transition:
    opacity 300ms ease,
    background-color 300ms ease,
    backdrop-filter 300ms ease,
    -webkit-backdrop-filter 300ms ease;
}

.sheet.is-visible .sheet-backdrop {
  background: rgba(0,0,0,0.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 1;
}

.sheet-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.78rem;
  width: min(calc(100vw - 2rem), 31rem);
  max-height: min(84svh, 40rem);
  margin: 0 auto;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3,3,3,0.96);
  box-shadow: 0 30px 90px rgba(0,0,0,0.72);
  padding: 1.2rem;
  opacity: 0;
  transform: scale(0.92);
  transition:
    opacity 300ms ease,
    transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.sheet.is-visible .sheet-card {
  opacity: 1;
  transform: scale(1);
}

.sheet-head,
.checkout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sheet-head h2 {
  margin: 0;
  font-size: 1.45rem;
}

.checkout-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem;
}

.attack-notice {
  display: grid;
  gap: 0.42rem;
  border: 1px solid rgba(255,54,54,0.48);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255,54,54,0.12), rgba(255,54,54,0.035)),
    rgba(8,8,8,0.72);
  padding: 0.78rem 0.85rem;
  box-shadow: inset 0 0 24px rgba(255,54,54,0.08);
}

.attack-notice strong {
  color: var(--red);
  font-size: 0.82rem;
}

.attack-notice span {
  color: var(--text);
  font-size: 0.72rem;
  line-height: 1.35;
  text-transform: none;
}

label {
  display: grid;
  gap: 0.38rem;
}

label span {
  font-size: 0.78rem;
}

label small {
  color: var(--muted);
  font-size: 0.66rem;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 0.82rem;
}

label.field-error span,
label.field-error small {
  color: var(--red);
}

label.field-error input {
  border-color: var(--line-hot);
  box-shadow: 0 0 0 1px rgba(255,54,54,0.24), 0 0 20px rgba(255,54,54,0.12);
  animation: field-error-pulse 1.05s ease-in-out 2;
}

@keyframes field-error-pulse {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(255,54,54,0.22), 0 0 18px rgba(255,54,54,0.08);
  }
  50% {
    box-shadow: 0 0 0 2px rgba(255,54,54,0.48), 0 0 30px rgba(255,54,54,0.22);
  }
}

input.is-readonly {
  color: var(--muted);
  cursor: default;
}

.wallet-connect {
  border: 1px solid rgba(248,248,244,0.28);
  border-radius: 8px;
  background: rgba(248,248,244,0.06);
  color: var(--text);
  padding: 0.78rem 1rem;
  text-align: center;
}

.wallet-connect.is-connected {
  border-color: rgba(71,229,139,0.58);
  background: rgba(71,229,139,0.1);
  color: var(--success);
}

.wallet-status {
  margin: -0.18rem 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: none;
}

.wallet-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.15rem;
}

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

.wallet-gate-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(10px);
}

.wallet-gate-card {
  position: relative;
  width: min(100%, 21rem);
  border: 1px solid rgba(248,248,244,0.38);
  border-radius: 8px;
  background: #050505;
  box-shadow: 0 1.5rem 4rem rgba(0,0,0,0.62);
  color: var(--text);
  display: grid;
  gap: 0.85rem;
  padding: 1.35rem;
  text-align: center;
}

.wallet-gate-kicker,
.wallet-gate-copy,
.wallet-gate-note {
  margin: 0;
}

.wallet-gate-kicker {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.wallet-gate-card h2 {
  margin: 0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 1.25rem;
}

.wallet-gate-copy,
.wallet-gate-note {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
  text-transform: none;
}

.wallet-gate-note.is-error {
  color: var(--danger);
}

.wallet-gate-action {
  width: 100%;
  border: 1px solid #f8f8f4;
  border-radius: 8px;
  background: #f8f8f4;
  color: #050505;
  padding: 0.86rem 1rem;
  font-family: Consolas, "Courier New", monospace;
  font-weight: 700;
}

.wallet-gate-action:disabled {
  opacity: 0.6;
}

.sheet-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: none;
}

.terms-link {
  justify-self: start;
  padding: 0.35rem 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  text-decoration: underline;
  text-underline-offset: 0.18rem;
}

@media (min-width: 700px) {
  .spot-frame {
    min-height: 0;
  }
}

@media (max-width: 560px) and (min-height: 820px) {
  .spot-frame {
    min-height: 0;
  }
}
