:root {
  color-scheme: dark;
  --bg: #070a12;
  --panel: #101522;
  --panel-2: #151c2d;
  --ink: #f7f7f2;
  --muted: #9ba6b8;
  --line: rgba(255, 255, 255, 0.11);
  --green: #00e59b;
  --mint: #a8ffd9;
  --amber: #ffcc66;
  --red: #ff647c;
  --blue: #6ca8ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --header-h: 71px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: rgba(0, 229, 155, 0.38) rgba(255, 255, 255, 0.05);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 78% 10%, rgba(0, 229, 155, 0.14), transparent 25rem),
    radial-gradient(circle at 20% 34%, rgba(108, 168, 255, 0.08), transparent 18rem),
    linear-gradient(180deg, #070a12 0%, #0c101b 42%, #070a12 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}

::-webkit-scrollbar-thumb {
  border: 3px solid rgba(7, 10, 18, 0.9);
  border-radius: 999px;
  background: rgba(0, 229, 155, 0.42);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 229, 155, 0.64);
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 10, 18, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
}

.logo-soft {
  display: block;
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 8px 18px rgba(0, 229, 155, 0.22));
}

.brand-name {
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0;
}

.top-nav {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 16px;
}

.top-nav a {
  position: relative;
  text-decoration: none;
  line-height: 1;
}

.top-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: var(--green);
  transition: transform 0.18s ease;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  color: var(--ink);
}

.top-nav a:hover::after,
.top-nav a:focus-visible::after {
  transform: scaleX(1);
}

.top-nav .x-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
  font-weight: 900;
  font-size: 16px;
  padding: 0;
}

.top-nav .x-link::after {
  display: none;
}

.top-nav .x-link:hover,
.top-nav .x-link:focus-visible {
  border-color: rgba(0, 229, 155, 0.54);
  color: var(--mint);
  background: rgba(0, 229, 155, 0.09);
}

.wallet-button,
.primary-button,
.secondary-button,
.ghost-button,
.lang-button {
  min-height: 42px;
  border: 1px solid transparent;
  padding: 0 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 750;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.wallet-button,
.primary-button {
  background: var(--green);
  color: #06100c;
}

.wallet-button:hover,
.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 229, 155, 0.24);
}

.secondary-button:hover,
.ghost-button:hover,
.lang-button:hover {
  border-color: rgba(0, 229, 155, 0.44);
  color: var(--mint);
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.secondary-button {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.ghost-button {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

.lang-button {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  min-width: 54px;
  padding-inline: 12px;
}

.wallet-menu-wrap {
  position: relative;
}

.wallet-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  width: 210px;
  border: 1px solid var(--line);
  background: #101522;
  padding: 10px;
  box-shadow: var(--shadow);
}

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

.wallet-menu p {
  margin: 0 0 8px;
  border-bottom: 1px solid var(--line);
  padding: 4px 4px 10px;
  color: var(--muted);
  font-size: 13px;
  word-break: break-all;
}

.wallet-menu button {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.wallet-menu button:hover {
  border-color: rgba(0, 229, 155, 0.44);
  color: var(--mint);
}

.status-banner {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 70;
  width: min(920px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(255, 204, 102, 0.42);
  background:
    linear-gradient(90deg, rgba(255, 204, 102, 0.18), rgba(0, 229, 155, 0.12)),
    rgba(13, 18, 29, 0.96);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.38);
  padding: 14px 16px;
  transform: translate(-50%, -50%);
}

.status-banner[hidden] {
  display: none;
}

.status-banner strong {
  display: block;
  color: var(--amber);
  font-size: 13px;
  text-transform: uppercase;
}

.status-banner span {
  color: var(--text);
  font-weight: 850;
  word-break: break-word;
}

.status-banner button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
}

.wallet-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #06100c;
}

main {
  width: min(1180px, calc(100% - clamp(32px, 8vw, 88px)));
  margin: 0 auto;
  padding: 0 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(260px, 0.72fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
  min-height: calc(100vh - var(--header-h));
  padding: clamp(38px, 7vw, 78px) 0 clamp(30px, 4vw, 44px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(42px, 7.2vw, 86px);
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.05;
}

h3 {
  font-size: 20px;
}

.hero-text {
  max-width: 640px;
  color: #b9c5d6;
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.78;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.phone-prize,
.hero-product-card {
  display: grid;
  justify-items: center;
  gap: 18px;
  min-width: 0;
}

.phone-shell {
  position: relative;
  width: min(318px, 78vw);
  aspect-ratio: 0.55;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 46px;
  background:
    linear-gradient(180deg, rgba(7, 10, 18, 0.04), rgba(7, 10, 18, 0.48)),
    linear-gradient(150deg, #dfe7ef, #535966 48%, #161b28 49%, #0b0f18);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: var(--shadow);
}

.phone-camera {
  position: absolute;
  top: 26px;
  left: 28px;
  width: 82px;
  height: 82px;
  border-radius: 24px;
  background: rgba(7, 10, 18, 0.82);
  display: none;
}

.phone-screen {
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  border-radius: 32px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.76) 74%);
  background-color: rgba(7, 10, 18, 0.14);
}

.phone-screen span {
  color: var(--mint);
  font-size: 13px;
  font-weight: 900;
}

.phone-screen strong {
  font-size: 38px;
}

.phone-screen small {
  color: var(--muted);
  font-size: 14px;
}

.prize-stats {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.prize-stats div,
.metrics-grid div,
.proof-box,
.admin-card,
.draw-panel,
.result-panel,
.my-tickets,
.ticket-board,
.admin,
.product-shop,
.rules,
.site-footer,
.product-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    rgba(16, 21, 34, 0.82);
}

.prize-stats div,
.metrics-grid div {
  padding: 14px;
}

.prize-stats span,
.metrics-grid strong {
  display: block;
  font-size: 22px;
}

small {
  color: var(--muted);
}

.ticker-rail {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 18px 0;
  mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}

.avatar-row {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: glide 38s linear infinite;
}

.avatar-row + .avatar-row {
  margin-top: 12px;
}

.avatar-row.reverse {
  animation-direction: reverse;
}

.avatar-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 174px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    background 0.18s ease;
}

.avatar-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 229, 155, 0.34);
  background: rgba(0, 229, 155, 0.07);
}

.mini-avatar,
.kol-avatar {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, var(--green), var(--blue));
  color: #071018;
  font-weight: 900;
}

.mini-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
}

.avatar-chip span {
  display: block;
  font-size: 14px;
  font-weight: 800;
}

.avatar-chip small {
  font-size: 12px;
}

@keyframes glide {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.workspace,
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  gap: 22px;
  padding: 34px 0 20px;
}

.draw-panel,
.result-panel,
.ticket-board,
.my-tickets,
.admin,
.product-shop,
.rules,
.site-footer {
  padding: clamp(18px, 3vw, 28px);
}

.rules,
.product-shop,
.ticket-board,
.my-tickets,
.admin,
.draw-panel,
.result-panel {
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.draw-panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(0, 229, 155, 0.22);
  background:
    linear-gradient(135deg, rgba(0, 229, 155, 0.1), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    rgba(16, 21, 34, 0.92);
}

.draw-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--green), rgba(108, 168, 255, 0.8), transparent);
}

.result-panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 204, 102, 0.28);
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 204, 102, 0.16), transparent 12rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    rgba(16, 21, 34, 0.92);
}

.result-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--amber), transparent);
}

.result-panel .eyebrow {
  color: var(--amber);
}

.closed-detail .draw-panel > *:not(.closed-overlay):not(.back-link),
.closed-detail .result-panel,
.closed-section {
  filter: grayscale(1);
  opacity: 0.42;
  pointer-events: none;
}

.closed-overlay {
  position: absolute;
  inset: 64px 28px auto 28px;
  z-index: 5;
  display: grid;
  gap: 8px;
  justify-items: center;
  border: 1px solid rgba(0, 229, 155, 0.5);
  background: rgba(7, 10, 18, 0.88);
  padding: 22px;
  text-align: center;
  box-shadow: var(--shadow);
}

.closed-overlay[hidden] {
  display: none !important;
}

.closed-overlay strong {
  color: var(--mint);
  font-size: 30px;
}

.closed-overlay span {
  color: var(--muted);
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.panel-head,
.section-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.draw-panel .panel-head h2,
.result-panel h2 {
  font-size: clamp(28px, 3.6vw, 44px);
}

.back-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid rgba(0, 229, 155, 0.32);
  background: rgba(0, 229, 155, 0.08);
  color: var(--mint);
  padding: 0 12px;
  margin-bottom: 18px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 850;
}

.back-link:hover {
  border-color: rgba(0, 229, 155, 0.56);
  color: var(--mint);
}

.status-pill {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid rgba(0, 229, 155, 0.35);
  background: rgba(0, 229, 155, 0.12);
  color: var(--mint);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.status-pill.dark {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.kol-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  border: 1px solid rgba(0, 229, 155, 0.18);
  background: rgba(0, 229, 155, 0.055);
  padding: 14px;
}

.kol-avatar {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  font-size: 24px;
  overflow: hidden;
}

.kol-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.kol-card a {
  display: block;
  color: var(--muted);
  text-decoration: none;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.metrics-grid div {
  min-height: 92px;
  border-color: rgba(255, 255, 255, 0.13);
  background:
    linear-gradient(135deg, rgba(0, 229, 155, 0.08), transparent 56%),
    rgba(255, 255, 255, 0.045);
}

.progress-shell {
  height: 14px;
  margin: 22px 0;
  overflow: hidden;
  border: 1px solid rgba(0, 229, 155, 0.18);
  background: rgba(255, 255, 255, 0.045);
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--amber));
  transition: width 0.35s ease;
}

.buy-row {
  display: grid;
  grid-template-columns: minmax(160px, 220px) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(7, 10, 18, 0.32);
  padding: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input,
select {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  padding: 0 12px;
}

input:hover,
select:hover {
  border-color: rgba(0, 229, 155, 0.36);
}

input:focus,
select:focus {
  border-color: rgba(0, 229, 155, 0.72);
  outline: 2px solid rgba(0, 229, 155, 0.18);
  outline-offset: 0;
}

.notice,
.fine-print,
.product-intro,
.payout-note {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.product-intro {
  max-width: 760px;
  font-size: 16px;
}

.payout-note {
  border: 1px solid rgba(0, 229, 155, 0.24);
  border-left: 3px solid var(--green);
  background: rgba(0, 229, 155, 0.07);
  padding: 12px 12px 12px 14px;
  color: var(--mint);
}

.clock-number {
  display: grid;
  min-height: 122px;
  place-items: center;
  margin: 20px 0;
  border: 1px solid rgba(255, 204, 102, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 204, 102, 0.12), transparent),
    rgba(7, 10, 18, 0.36);
  font-variant-numeric: tabular-nums;
  font-size: clamp(52px, 8vw, 88px);
  font-weight: 950;
  line-height: 1;
  color: var(--amber);
}

.proof-box {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding: 14px;
  background: rgba(7, 10, 18, 0.34);
}

.proof-box span {
  color: var(--muted);
  font-size: 13px;
}

.proof-box a {
  overflow-wrap: anywhere;
  color: var(--mint);
}

.full {
  width: 100%;
}

.ticket-board,
.my-tickets,
.admin,
.product-shop,
.rules,
.site-footer {
  margin-top: 18px;
}

.ticket-board {
  border-color: rgba(108, 168, 255, 0.22);
  background:
    radial-gradient(circle at 0% 0%, rgba(108, 168, 255, 0.12), transparent 18rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    rgba(16, 21, 34, 0.9);
}

.my-tickets {
  border-color: rgba(0, 229, 155, 0.18);
}

.site-footer {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.site-footer strong {
  display: block;
  margin-bottom: 6px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-weight: 750;
}

.footer-links a {
  text-decoration: none;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  counter-reset: rules;
}

.rules-grid article {
  position: relative;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(0, 229, 155, 0.075), transparent 38%),
    rgba(255, 255, 255, 0.04);
  padding: 18px;
  min-height: 174px;
}

.rules-grid strong {
  display: block;
  margin-bottom: 10px;
  color: var(--mint);
  line-height: 1.35;
}

.rules-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
}

.product-card {
  overflow: hidden;
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    background 0.18s ease;
}

.product-card.active {
  border-color: rgba(0, 229, 155, 0.56);
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 229, 155, 0.34);
}

.product-hit {
  display: grid;
  width: 100%;
  min-height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.product-hit:focus-visible {
  outline-offset: -4px;
}

.product-art {
  position: relative;
  display: grid;
  min-height: 230px;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(0, 229, 155, 0.18), transparent 9rem),
    linear-gradient(145deg, #101522, #070a12);
}

.product-art img {
  position: relative;
  z-index: 1;
  width: 148px;
  height: 148px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.36);
}

.product-art-fallback {
  position: absolute;
  display: grid;
  width: 148px;
  height: 148px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  color: #071018;
  font-size: 42px;
  font-weight: 900;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.36);
}

.product-art-label {
  position: absolute;
  left: 16px;
  bottom: 16px;
  border: 1px solid rgba(0, 229, 155, 0.48);
  background: rgba(0, 229, 155, 0.12);
  color: var(--mint);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 850;
}

.product-card-body {
  padding: 16px;
}

.product-title-row {
  display: flex;
  gap: 10px;
  align-items: start;
  justify-content: space-between;
}

.product-card h3 {
  margin-bottom: 10px;
  line-height: 1.2;
}

.product-card p {
  color: var(--muted);
  line-height: 1.55;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 13px;
}

.product-meta span {
  border: 1px solid var(--line);
  padding: 5px 8px;
}

.progress-shell.compact {
  height: 8px;
  margin: 0;
}

.board-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  border-radius: 50%;
}

.legend-dot.free {
  background: rgba(255, 255, 255, 0.18);
}

.legend-dot.mine {
  background: var(--green);
}

.legend-dot.sold {
  background: var(--blue);
}

.legend-dot.win {
  background: var(--amber);
}

.ticket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 7px;
  max-height: 460px;
  overflow: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.ticket-cell {
  display: flex;
  min-width: 48px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.052);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  padding: 0;
  text-align: center;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}

.ticket-cell:hover {
  border-color: rgba(0, 229, 155, 0.36);
  color: var(--ink);
}

.ticket-cell.sold {
  background: rgba(108, 168, 255, 0.2);
  color: #d7e6ff;
}

.ticket-cell.mine {
  background: rgba(0, 229, 155, 0.24);
  color: var(--mint);
  border-color: rgba(0, 229, 155, 0.62);
}

.ticket-cell.win {
  background: rgba(255, 204, 102, 0.28);
  color: #ffe7ad;
  border-color: rgba(255, 204, 102, 0.74);
}

.ticket-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.ticket-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  justify-content: flex-end;
}

.ticket-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.filter-chip {
  min-height: 38px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  padding: 0 12px;
  cursor: pointer;
  font-weight: 850;
}

.filter-chip:hover {
  border-color: rgba(0, 229, 155, 0.4);
  color: var(--mint);
}

.filter-chip.active {
  border-color: rgba(0, 229, 155, 0.66);
  background: rgba(0, 229, 155, 0.16);
  color: var(--mint);
}

.ticket-item {
  border: 1px solid var(--line);
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.ticket-button:hover {
  border-color: rgba(0, 229, 155, 0.4);
  background: rgba(0, 229, 155, 0.07);
}

.ticket-button {
  display: block;
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.ticket-item strong {
  display: block;
  color: var(--mint);
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-wide {
  grid-column: 1 / -1;
}

.admin-gate {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  padding: 22px;
}

.admin-gate h3 {
  margin-bottom: 10px;
}

.admin-gate p {
  max-width: 780px;
  color: var(--muted);
  line-height: 1.7;
}

.admin-auth-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.admin-auth-flow small {
  color: var(--muted);
}

.admin-card {
  display: grid;
  gap: 13px;
  padding: 18px;
}

.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-product-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.admin-product-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
}

.admin-row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-row-actions .ghost-button {
  min-height: 36px;
  padding-inline: 12px;
}

.admin-product-row img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
}

.admin-product-row strong,
.admin-product-row span {
  display: block;
}

.admin-product-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  color: var(--muted);
  text-align: left;
  white-space: nowrap;
}

.admin-table a {
  color: var(--mint);
}

.admin-table th {
  color: var(--ink);
  font-size: 12px;
  text-transform: uppercase;
}

.admin-table td strong {
  color: var(--mint);
  font-variant-numeric: tabular-nums;
}

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

.modal[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  width: min(440px, 100%);
  border: 1px solid var(--line);
  background: #101522;
  padding: 26px;
  box-shadow: var(--shadow);
}

.wallet-card {
  width: min(390px, 100%);
  border: 0;
  border-radius: 28px;
  background: #f7f9f8;
  color: #161b20;
  padding: 26px;
}

.wallet-card .eyebrow {
  color: #00a978;
}

.wallet-card h2 {
  color: #161b20;
  text-align: center;
}

.wallet-copy {
  margin: 0 0 16px;
  color: #5d6874;
  text-align: center;
}

.wallet-card .icon-button {
  border: 0;
  color: #9aa4ad;
}

.wallet-options {
  display: grid;
  gap: 8px;
  margin: 18px 0 14px;
  max-height: 392px;
  overflow-y: auto;
  padding-right: 2px;
  overscroll-behavior: contain;
}

.wallet-option {
  display: grid;
  grid-template-columns: 34px 1fr auto 14px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #161b20;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.wallet-option:hover {
  background: rgba(0, 0, 0, 0.045);
}

.wallet-option small {
  border-radius: 999px;
  background: #d9f7e9;
  color: #23a875;
  padding: 4px 7px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.wallet-option b {
  color: #8d98a3;
  font-size: 24px;
  line-height: 1;
}

.wallet-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.wallet-icon.wc {
  background: #e9ecef;
  color: #606b76;
}

.wallet-icon.fox {
  background: linear-gradient(135deg, #ff8a00, #e94d20);
}

.wallet-icon.binance {
  background: #0b0e11;
  color: #f3ba2f;
}

.wallet-icon.okx {
  background: #050505;
}

.wallet-icon.phantom {
  background: linear-gradient(135deg, #8b72ff, #d8ceff);
}

.wallet-icon.keplr {
  background: linear-gradient(135deg, #18bfff, #116dff);
}

.wallet-icon.backpack {
  background: linear-gradient(135deg, #ff6a73, #d7193f);
}

.wallet-icon.coinbase {
  background: #0052ff;
}

.wallet-icon.trust {
  background: linear-gradient(135deg, #2f7cf6, #102a63);
}

.wallet-icon.rainbow {
  background: linear-gradient(135deg, #ff8a00, #f9e54d 38%, #32d583 68%, #7c5cff);
}

.wallet-icon.rabby {
  background: linear-gradient(135deg, #6c7cff, #a8ff78);
  color: #101522;
}

.wallet-message {
  min-height: 18px;
  margin: 8px 0 12px;
  color: #5d6874;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.icon-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 24px;
}

@media (max-width: 1120px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 46px;
  }

  .hero-copy {
    max-width: 820px;
  }

  .hero-product-card {
    justify-self: center;
    width: 100%;
  }

  .phone-shell {
    width: min(300px, 72vw);
  }
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .top-nav {
    display: none;
  }

  .workspace,
  .detail-layout,
  .rules-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

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

  .ticket-grid {
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  }
}

@media (max-width: 560px) {
  main {
    width: min(100% - 24px, 1180px);
  }

  .site-header {
    padding-inline: 12px;
  }

  .brand-name {
    display: none;
  }

  .brand-mark {
    width: 30px;
  }

  .wallet-button {
    padding-inline: 12px;
  }

  h1 {
    font-size: 40px;
    line-height: 1.05;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-text {
    font-size: 16px;
  }

  .phone-shell {
    width: min(260px, 82vw);
    border-radius: 36px;
    padding: 12px;
  }

  .phone-screen {
    border-radius: 26px;
    padding: 22px;
  }

  .phone-screen strong {
    font-size: 31px;
  }

  .buy-row,
  .metrics-grid,
  .prize-stats {
    grid-template-columns: 1fr;
  }

  .buy-row {
    padding: 12px;
  }

  .clock-number {
    min-height: 96px;
  }

  .panel-head,
  .section-head,
  .site-footer {
    display: grid;
  }

  .rules-grid article {
    min-height: auto;
  }

  .ticket-grid {
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    max-height: 360px;
  }
}
