:root {
  --blue: #1858a8;
  --cyan: #5888c8;
  --white: #ffffff;
  --blue-deep: #124a90;
  --ink: #1858a8;
  --muted: rgba(24, 88, 168, 0.62);
  --night: #0e3a72;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: Outfit, system-ui, sans-serif;
  background: var(--white);
  color: var(--blue);
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1000px 640px at 50% -8%, rgba(88, 136, 200, 0.22), transparent 58%),
    radial-gradient(800px 500px at 80% 100%, rgba(24, 88, 168), 0.1), transparent 52%),
    linear-gradient(180deg, #f4f8ff 0%, var(--white) 46%, #eaf6ff 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}

.glow-gold {
  width: 280px;
  height: 280px;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -40%);
  background: rgba(88, 136, 200, 0.28);
}

.glow-wine {
  width: 420px;
  height: 220px;
  left: 50%;
  bottom: -40px;
  transform: translateX(-50%);
  background: rgba(24, 88, 168), 0.16);
}

.vine {
  position: absolute;
  height: min(92vh, 720px);
  color: rgba(88, 136, 200, 0.35);
}

.vine-left {
  left: -28px;
  top: 40px;
}

.vine-right {
  right: -36px;
  top: 80px;
  transform: scaleX(-1);
}

.stage {
  position: relative;
  z-index: 1;
  max-width: none;
  margin: 0 auto;
  padding: 18px 12px 168px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100svh;
}

.brand {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 16px;
  padding: 0 20px;
  margin-bottom: 10px;
  text-align: center;
  user-select: none;
  cursor: default;
}

.brand h1 {
  font-family: Outfit, system-ui, sans-serif;
  margin: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.brand-lead,
.brand-main {
  line-height: 1;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: 0.06em;
}

.brand-lead {
  color: var(--cyan);
}

.brand-main {
  background: linear-gradient(115deg, #124a90 0%, #1858a8 48%, #5888c8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-campaign,
.site-footer-slogan {
  display: block;
  height: clamp(64px, 9vw, 108px);
  width: auto;
  max-width: min(36vw, 380px);
  object-fit: contain;
}

.brand-campaign {
  justify-self: start;
}

.site-footer-slogan {
  justify-self: end;
}

.wheel-scene {
  position: relative;
  width: min(98vw, calc(100svh - 320px), 920px);
  margin: 2px 0 12px;
}

@media (min-width: 1200px) and (min-height: 700px) {
  body[data-page="kiosk"] .stage {
    padding: 8px 12px 120px;
  }

  body[data-page="kiosk"] .brand {
    margin-bottom: 4px;
  }

  body[data-page="kiosk"] .wheel-scene {
    width: min(90vw, calc(100svh - 210px), 1200px);
    margin: 0;
  }

  body[data-page="kiosk"] .pointer {
    width: clamp(58px, 6.4%, 82px);
  }
}

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 24px 16px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.96) 34%);
}

.site-footer-lockup {
  width: min(92vw, 680px);
  height: auto;
}

.pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(0deg);
  transform-origin: 50% 18%;
  z-index: 4;
  width: 58px;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45));
  will-change: transform;
}

.pointer svg {
  display: block;
  width: 100%;
}

.pointer path {
  fill: var(--blue);
}

.pointer circle {
  fill: var(--cyan);
}

.pointer.is-ticking {
  animation: pointer-flap 4.6s linear both;
}

.wheel-frame {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
}

.ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.ring-outer {
  inset: -10px;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 0 8px var(--white), 0 18px 40px rgba(24, 88, 168), 0.18);
}

.ring-inner {
  inset: 18px;
  border: 1px solid rgba(24, 88, 168), 0.18);
}

.wheel {
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
  transition: none;
}

.wheel.spinning {
  transition: transform 4.6s cubic-bezier(0.12, 0.7, 0.08, 1);
}

.seal {
  position: absolute;
  inset: 26%;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  z-index: 5;
  overflow: hidden;
  background: #ffffff;
  color: var(--blue);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  box-shadow:
    0 0 0 6px var(--white),
    0 0 0 8px var(--cyan),
    0 10px 24px rgba(24, 88, 168, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.seal:hover:not(:disabled) {
  transform: scale(1.04);
}

.seal:active:not(:disabled) {
  transform: scale(0.97);
}

.seal:disabled {
  cursor: default;
}

.seal-glow {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88, 136, 200, 0.45), transparent 68%);
  animation: pulse 2.4s ease-in-out infinite;
  pointer-events: none;
}

.seal:disabled .seal-glow {
  animation: none;
  opacity: 0.25;
}

.seal-logo {
  position: relative;
  z-index: 1;
  width: 124%;
  max-width: none;
  height: auto;
  margin-top: -4%;
  pointer-events: none;
  user-select: none;
}

.seal-mark {
  display: none;
}

.seal-hint {
  position: absolute;
  bottom: 8%;
  z-index: 2;
  margin: 0;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--blue);
  font-size: clamp(17px, 2.8vw, 24px);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1;
}

.seal-hint.is-pulse {
  animation: flash-cevir-pill 1.2s ease-in-out infinite;
}

.seal:disabled .seal-hint.is-pulse {
  animation: none;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(16, 58, 112, 0.42);
  display: grid;
  place-items: end center;
  padding: 24px 24px 140px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.overlay[hidden] {
  display: none !important;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.overlay.show .query-card,
.overlay.show .gift-card {
  pointer-events: auto;
}

#spinBtn.is-on-top {
  position: fixed;
  inset: auto;
  z-index: 60;
}

body:has(#overlay.show) #spinBtn {
  visibility: hidden;
  pointer-events: none;
}

.overlay#queryOverlay {
  z-index: 65;
}

.overlay#queryOverlay .query-card {
  position: relative;
  z-index: 1;
  box-shadow: 0 22px 50px rgba(16, 58, 112, 0.28);
}

.overlay#overlay {
  place-items: center;
  padding: 32px;
  z-index: 70;
}

.overlay#overlay.show {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.28), rgba(16, 58, 112, 0.55) 62%);
}

.gift-card {
  position: relative;
  overflow: hidden;
  width: min(92vw, 760px);
  background: var(--white);
  color: var(--blue);
  padding: 52px 44px 40px;
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 28px;
  outline: 3px solid var(--cyan);
  outline-offset: 6px;
  transform: translateY(16px) scale(0.96);
  transition: transform 0.45s ease;
}

.overlay.show .gift-card {
  transform: none;
  animation: gift-pop 0.55s cubic-bezier(0.18, 0.9, 0.32, 1.15);
}

.gift-ornaments {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.gift-sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.sky-burst {
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(120vw, 1100px);
  height: min(120vw, 1100px);
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 255, 255, 0.16) 0 6deg,
    transparent 6deg 14deg
  );
  border-radius: 50%;
  animation: gift-spin-center 18s linear infinite;
  opacity: 0.55;
}

.sky-star,
.sky-dot,
.sky-ribbon {
  position: absolute;
  pointer-events: none;
}

.sky-star {
  width: 18px;
  height: 18px;
  background: #ffffff;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: sparkle 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.7));
}

.sky-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #7ec8ff;
  animation: float-dot 3.2s ease-in-out infinite;
}

.sky-ribbon {
  width: 10px;
  height: 42px;
  border-radius: 4px;
  background: linear-gradient(180deg, #1858a8, #7ec8ff);
  animation: ribbon-fall 4.4s linear infinite;
}

.sky-star.s1 { top: 8%; left: 10%; animation-delay: 0s; }
.sky-star.s2 { top: 14%; right: 12%; width: 22px; height: 22px; animation-delay: 0.3s; background: #7ec8ff; }
.sky-star.s3 { top: 28%; left: 6%; animation-delay: 0.6s; }
.sky-star.s4 { top: 24%; right: 7%; animation-delay: 0.15s; background: #1858a8; }
.sky-star.s5 { bottom: 18%; left: 12%; width: 16px; height: 16px; animation-delay: 0.45s; }
.sky-star.s6 { bottom: 14%; right: 14%; animation-delay: 0.75s; }
.sky-star.s7 { top: 42%; left: 4%; width: 14px; height: 14px; animation-delay: 0.2s; background: #ffffff; }
.sky-star.s8 { top: 48%; right: 5%; animation-delay: 0.9s; }

.sky-dot.d1 { top: 10%; left: 22%; animation-delay: 0.1s; }
.sky-dot.d2 { top: 18%; right: 24%; background: #ffffff; animation-delay: 0.4s; }
.sky-dot.d3 { bottom: 22%; left: 20%; background: #1858a8; animation-delay: 0.7s; }
.sky-dot.d4 { bottom: 16%; right: 22%; animation-delay: 0.25s; }
.sky-dot.d5 { top: 36%; left: 16%; width: 8px; height: 8px; animation-delay: 0.55s; }
.sky-dot.d6 { top: 40%; right: 18%; background: #ffffff; animation-delay: 0.85s; }

.sky-ribbon.r1 { top: -20px; left: 18%; animation-delay: 0s; }
.sky-ribbon.r2 { top: -30px; left: 72%; width: 8px; height: 36px; background: linear-gradient(180deg, #7ec8ff, #ffffff); animation-delay: 1.1s; }
.sky-ribbon.r3 { top: -24px; left: 38%; animation-delay: 2s; }
.sky-ribbon.r4 { top: -28px; left: 86%; width: 7px; animation-delay: 0.6s; }

.gift-ray {
  position: absolute;
  left: 50%;
  top: 18%;
  width: 280px;
  height: 280px;
  transform: translate(-50%, -20%);
  background: repeating-conic-gradient(
    from 0deg,
    rgba(88, 136, 200, 0.2) 0 8deg,
    transparent 8deg 16deg
  );
  border-radius: 50%;
  animation: gift-spin 12s linear infinite;
  opacity: 0.85;
}

.gift-ray-2 {
  top: 62%;
  width: 200px;
  height: 200px;
  opacity: 0.45;
  animation-duration: 16s;
  animation-direction: reverse;
}

.spark {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--cyan);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: sparkle 1.4s ease-in-out infinite;
}

.spark-1 { top: 22px; left: 28px; animation-delay: 0s; }
.spark-2 { top: 18px; right: 36px; width: 14px; height: 14px; animation-delay: 0.2s; background: var(--blue); }
.spark-3 { top: 86px; left: 18px; animation-delay: 0.4s; }
.spark-4 { top: 90px; right: 22px; width: 8px; height: 8px; animation-delay: 0.6s; background: #7ec8ff; }
.spark-5 { bottom: 92px; left: 32px; animation-delay: 0.15s; background: var(--blue); }
.spark-6 { bottom: 96px; right: 30px; width: 12px; height: 12px; animation-delay: 0.5s; }
.spark-7 { top: 46px; left: 48%; width: 16px; height: 16px; animation-delay: 0.35s; background: #1858a8; }
.spark-8 { bottom: 48px; left: 46%; animation-delay: 0.8s; }
.spark-9 { top: 58%; left: 16px; width: 11px; height: 11px; animation-delay: 0.25s; }
.spark-10 { top: 58%; right: 16px; animation-delay: 0.65s; background: #7ec8ff; }
.spark-11 { top: 12px; left: 42%; width: 9px; height: 9px; animation-delay: 0.95s; }
.spark-12 { bottom: 18px; right: 42%; width: 13px; height: 13px; animation-delay: 0.1s; background: var(--blue); }

.gift-kicker {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--cyan);
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
}

.gift-prize {
  position: relative;
  z-index: 1;
  margin: 22px 0 14px;
  padding: 28px 24px;
  border-radius: 20px;
  background: #ffffff;
  border: 3px solid var(--blue);
}

.gift-card h2 {
  font-family: Outfit, system-ui, sans-serif;
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
  color: var(--blue);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  animation: none;
  text-wrap: balance;
}

.gift-sub {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--cyan);
}

.gift-sub:empty {
  display: none;
}

.gift-note {
  margin: 4px 0 18px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: rgba(24, 88, 168), 0.58);
}

.gift-facts {
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 14px 0 8px;
  text-align: center;
}

.gift-facts div {
  padding: 10px 12px;
}

.gift-facts dd {
  font-size: 22px;
}

.gift-facts div:has(#giftPoints) {
  padding: 18px 16px 16px;
  border-radius: 24px;
  background: linear-gradient(155deg, #124a90 0%, #1858a8 48%, #3d7ed0 100%);
  box-shadow: 0 16px 34px rgba(18, 74, 144, 0.28);
}

.gift-facts div:has(#giftPoints) dt {
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 0.18em;
}

#giftPoints {
  margin-top: 2px;
  font-size: clamp(56px, 9vw, 96px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: #fff;
}

.gift-facts:has(#giftNameRow[hidden]) {
  grid-template-columns: 1fr;
}

.gift-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-primary,
.btn-ghost {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 13px 16px;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  letter-spacing: 0.04em;
}

.btn-ghost {
  background: transparent;
  color: var(--blue);
  letter-spacing: 0.02em;
}

.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  overflow: hidden;
}

.confetti i {
  position: absolute;
  top: -16px;
  width: 8px;
  height: 14px;
  border-radius: 1px;
  animation: fall linear forwards;
}

.confetti i.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.confetti i.star {
  width: 12px;
  height: 12px;
  border-radius: 0;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

@keyframes gift-pop {
  0% { transform: scale(0.86) translateY(18px); }
  70% { transform: scale(1.04); }
  100% { transform: none; }
}

@keyframes gift-spin {
  to { transform: translate(-50%, -20%) rotate(360deg); }
}

@keyframes gift-spin-center {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes float-dot {
  0%, 100% { transform: translateY(0) scale(0.85); opacity: 0.45; }
  50% { transform: translateY(-14px) scale(1.15); opacity: 1; }
}

@keyframes ribbon-fall {
  0% { transform: translateY(0) rotate(-12deg); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translateY(110vh) rotate(28deg); opacity: 0.2; }
}

@keyframes sparkle {
  0%, 100% { transform: scale(0.7) rotate(0deg); opacity: 0.35; }
  50% { transform: scale(1.25) rotate(20deg); opacity: 1; }
}

@keyframes title-shine {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes flash-cevir-pill {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(24, 88, 168, 0.28);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 0 7px rgba(24, 88, 168, 0.12);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.92);
  }
  50% {
    opacity: 0.9;
    transform: scale(1);
  }
}

@keyframes pointer-flap {
  0% { transform: translateX(-50%) rotate(0deg); }
  2% { transform: translateX(-50%) rotate(22deg); }
  4% { transform: translateX(-50%) rotate(-7deg); }
  6% { transform: translateX(-50%) rotate(20deg); }
  8% { transform: translateX(-50%) rotate(-6deg); }
  10% { transform: translateX(-50%) rotate(20deg); }
  12% { transform: translateX(-50%) rotate(-6deg); }
  14% { transform: translateX(-50%) rotate(19deg); }
  16% { transform: translateX(-50%) rotate(-5deg); }
  18% { transform: translateX(-50%) rotate(18deg); }
  21% { transform: translateX(-50%) rotate(-5deg); }
  24% { transform: translateX(-50%) rotate(17deg); }
  27% { transform: translateX(-50%) rotate(-4deg); }
  31% { transform: translateX(-50%) rotate(16deg); }
  35% { transform: translateX(-50%) rotate(-4deg); }
  40% { transform: translateX(-50%) rotate(14deg); }
  45% { transform: translateX(-50%) rotate(-3deg); }
  51% { transform: translateX(-50%) rotate(12deg); }
  58% { transform: translateX(-50%) rotate(-3deg); }
  66% { transform: translateX(-50%) rotate(10deg); }
  75% { transform: translateX(-50%) rotate(-2deg); }
  85% { transform: translateX(-50%) rotate(7deg); }
  93% { transform: translateX(-50%) rotate(-1deg); }
  100% { transform: translateX(-50%) rotate(0deg); }
}

@keyframes fall {
  to {
    transform: translateY(110vh) rotate(280deg);
    opacity: 0.15;
  }
}

@media (max-width: 640px) {
  .vine {
    opacity: 0.55;
  }
}

@media (prefers-reduced-motion: reduce) {
  .seal-hint.is-pulse,
  .seal-glow,
  .gift-ray,
  .gift-ray-2,
  .sky-burst,
  .sky-star,
  .sky-dot,
  .sky-ribbon,
  .spark,
  .gift-card h2,
  .overlay.show .gift-card,
  .pointer.is-ticking {
    animation: none;
  }
}

.settings-toggle {
  display: none;
}

.query-card {
  width: min(100%, 420px);
  background: var(--white);
  color: var(--blue);
  padding: 32px 26px 24px;
  text-align: center;
  border: 1px solid rgba(88, 136, 200, 0.55);
  border-radius: 24px;
}

.query-card h2 {
  font-size: 28px;
  letter-spacing: -0.03em;
  margin: 8px 0 18px;
}

.query-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  text-align: left;
  margin-bottom: 8px;
}

.query-card input,
.settings-card input {
  width: 100%;
  border: 1px solid rgba(24, 88, 168, 0.28);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 16px;
  color: var(--blue);
  background: #f7fbff;
}

.query-facts {
  display: grid;
  gap: 12px;
  margin: 8px 0 16px;
  text-align: left;
}

.query-facts div {
  background: #f7fbff;
  border-radius: 14px;
  padding: 12px 14px;
}

.query-facts dt {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 600;
}

.query-facts dd {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

#resultName {
  font-size: 20px;
}

.access-status,
.settings-status {
  min-height: 1.4em;
  margin-top: 10px;
  font-size: 13px;
  color: var(--blue);
}

.access-status.is-error,
.settings-status.is-error {
  color: #d62828;
}

.access-status.is-ok {
  color: #1f8a4c;
}

.settings-card {
  width: min(100%, 520px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  color: var(--blue);
  padding: 28px 24px 22px;
  border: 1px solid rgba(88, 136, 200, 0.55);
  border-radius: 24px;
}

.settings-tabs {
  display: flex;
  gap: 8px;
  margin: 10px 0 14px;
}

.settings-tabs button {
  flex: 1;
  border: 0;
  background: rgba(24, 88, 168, 0.08);
  color: var(--blue);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.settings-tabs button.is-active {
  background: var(--blue);
  color: var(--white);
}

#settingsForm,
#reportPane {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

#settingsForm[hidden],
#reportPane[hidden] {
  display: none;
}

.settings-card h2 {
  font-size: 24px;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.settings-lead {
  font-size: 13px;
  color: rgba(24, 88, 168, 0.8);
  margin-bottom: 18px;
}

.settings-card label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.settings-card label input {
  margin-top: 6px;
}

.cost-criteria {
  margin: 4px 0 14px;
  padding: 10px 12px 12px;
  border: 1px solid rgba(24, 88, 168, 0.18);
  border-radius: 16px;
  background: #f7fbff;
}

.cost-criteria legend {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--cyan);
  padding: 0 6px;
}

.cost-criteria .prize-hint {
  margin: 0 0 10px;
}

.cost-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.cost-grid label {
  margin-bottom: 0;
}

.overlay#settingsOverlay {
  z-index: 30;
}

.prize-editor {
  margin: 8px 0 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

#prizeList {
  overflow-y: auto;
  flex: 1;
  min-height: 120px;
  padding-right: 8px;
  scrollbar-gutter: stable;
}

.prize-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
}

.prize-head .btn-ghost {
  padding: 0;
  font-size: 13px;
}

.prize-hint {
  margin: 6px 0 10px;
  font-size: 12px;
  color: rgba(24, 88, 168, 0.75);
}

.prize-cols,
.prize-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.prize-cols {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(24, 88, 168, 0.7);
}

.prize-cols span:first-child,
.prize-row .prize-name {
  flex: 1;
  min-width: 0;
}

.prize-cols span:nth-child(2),
.prize-row .prize-slices {
  flex: 0 0 58px;
  width: 58px;
}

.prize-cols span:nth-child(3),
.prize-row .prize-stock {
  flex: 0 0 64px;
  width: 64px;
}

.prize-cols span:last-child,
.prize-row .prize-remove {
  flex: 0 0 32px;
  width: 32px;
}

.prize-row {
  margin-bottom: 8px;
}

.prize-row input.prize-name {
  flex: 1;
}

.prize-row input.prize-slices,
.prize-row input.prize-stock {
  flex: 0 0 58px;
  width: 58px;
  text-align: center;
}

.prize-row input.prize-stock {
  flex: 0 0 64px;
  width: 64px;
}

.prize-row .prize-remove {
  border: 0;
  background: transparent;
  color: #d62828;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.settings-status,
.settings-card .gift-actions {
  flex-shrink: 0;
}

.report-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.report-totals {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.report-toolbar .btn-ghost {
  padding: 0;
  font-size: 13px;
  flex-shrink: 0;
}

.report-cols,
.report-row,
.report-entry {
  display: grid;
  gap: 8px;
  align-items: center;
}

.report-cols,
.report-row {
  grid-template-columns: 1fr 48px 48px 48px;
}

.report-cols {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(24, 88, 168, 0.7);
}

.report-row,
.report-entry {
  padding: 7px 0;
  border-bottom: 1px solid rgba(24, 88, 168, 0.1);
  font-size: 13px;
}

.report-row span:not(:first-child),
.report-entry span:last-child {
  text-align: right;
}

#reportSummary,
#reportList {
  overflow-y: auto;
  min-height: 0;
}

#reportSummary {
  flex: 0 1 auto;
  max-height: 28vh;
}

#reportList {
  flex: 1;
}

.report-sub {
  margin: 16px 0 8px;
  font-size: 13px;
  font-weight: 700;
}

.report-entry {
  grid-template-columns: 118px 1fr auto;
  font-variant-numeric: tabular-nums;
}

.report-empty {
  padding: 18px 0;
  font-size: 13px;
  color: rgba(24, 88, 168, 0.7);
}

.login-page,
.admin-page,
.puan-page {
  overflow: auto;
}

.puan-card h2 {
  font-size: 32px;
  letter-spacing: -0.04em;
  margin: 10px 0 8px;
}

.puan-card .query-label {
  text-align: left;
}

.puan-page .login-shell {
  align-items: flex-start;
}

.login-card.puan-card {
  width: min(100%, 760px);
}

.puan-block {
  margin-top: 18px;
  text-align: left;
}

.puan-block h3,
.puan-log-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1858a8;
}

.puan-facts,
.puan-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
}

.puan-facts div,
.puan-split div {
  padding: 12px 14px;
  border-radius: 16px;
  background: #f4f8fd;
  border: 1px solid rgba(24, 88, 168, 0.12);
}

.puan-facts dt,
.puan-split span,
.puan-score span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.puan-facts dt {
  color: rgba(24, 88, 168, 0.62);
}

.puan-facts dd {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  word-break: break-word;
}

.puan-split {
  margin-top: 10px;
}

.puan-split .is-earned {
  background: #e8f7ee;
  border-color: rgba(26, 122, 69, 0.18);
  color: #146b3a;
}

.puan-split .is-spent {
  background: #fff3e8;
  border-color: rgba(196, 92, 18, 0.2);
  color: #a34d10;
}

.puan-split strong {
  display: block;
  margin-top: 4px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.puan-log-title {
  margin-top: 16px;
}

.puan-log {
  max-height: 360px;
  overflow: auto;
  border: 1px solid rgba(24, 88, 168, 0.12);
  border-radius: 16px;
  background: #fff;
}

.puan-row,
.puan-head {
  display: grid;
  grid-template-columns: 96px 58px 72px 72px minmax(120px, 1fr);
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  font-size: 13px;
}

.puan-head {
  position: sticky;
  top: 0;
  background: #f4f8fd;
  color: rgba(24, 88, 168, 0.7);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.puan-row {
  border-top: 1px solid rgba(24, 88, 168, 0.08);
}

.puan-row .puan-points {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.puan-row.is-giris .puan-points {
  color: #146b3a;
}

.puan-row.is-cikis .puan-points {
  color: #a34d10;
}

.puan-note {
  white-space: normal;
}

.puan-empty {
  padding: 16px 12px;
  color: rgba(24, 88, 168, 0.7);
  font-size: 14px;
}

@media (max-width: 640px) {
  .puan-facts,
  .puan-split {
    grid-template-columns: 1fr;
  }

  .puan-head {
    display: none;
  }

  .puan-row {
    grid-template-columns: 1fr auto;
  }

  .puan-note {
    grid-column: 1 / -1;
    white-space: normal;
  }
}

.puan-score {
  padding: 18px 16px 16px;
  border-radius: 24px;
  background: linear-gradient(155deg, #124a90 0%, #1858a8 48%, #3d7ed0 100%);
  box-shadow: 0 16px 34px rgba(18, 74, 144, 0.28);
  color: #fff;
}

.puan-score span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.puan-score strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(56px, 12vw, 84px);
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.login-shell,
.admin-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 32px 20px 48px;
}

.login-shell {
  align-items: center;
}

.login-card {
  width: min(100%, 420px);
}

.login-card .gift-actions {
  margin-top: 8px;
}

.login-card .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.admin-page {
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(88, 136, 200, 0.18), transparent 60%),
    #eef3f9;
}

.admin-page .atmosphere {
  display: none;
}

.admin-top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(24, 88, 168, 0.1);
  backdrop-filter: blur(16px);
}

.admin-brand {
  min-width: 0;
}

.admin-top .gift-kicker {
  padding: 4px 10px;
  font-size: 11px;
  letter-spacing: 0.16em;
  background: rgba(24, 88, 168, 0.1);
  color: var(--blue);
}

.admin-top h1 {
  margin-top: 6px;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.04em;
  line-height: 1;
  user-select: none;
}

.admin-page .admin-fold {
  padding: 0;
}

.admin-page .admin-head,
.admin-page .admin-fold summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 14px 12px 16px;
  background: linear-gradient(180deg, #f8fbff 0%, #e8f0fa 100%);
  border: 1px solid rgba(24, 88, 168, 0.1);
  border-radius: 14px;
  box-shadow: inset 4px 0 0 var(--blue);
  color: var(--blue);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.admin-page .admin-head h2,
.admin-page .admin-head h3,
.admin-page .admin-fold summary {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.admin-page .admin-fold summary {
  cursor: pointer;
  list-style: none;
}

.admin-page .admin-fold details[open] summary {
  margin-bottom: 14px;
}

.admin-page .admin-fold details:not([open]) summary {
  margin-bottom: 0;
}

.admin-page .admin-fold summary::-webkit-details-marker {
  display: none;
}

.admin-page .admin-fold summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.admin-page .admin-fold details[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.admin-page .cost-criteria legend {
  display: none;
}

.admin-top-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-top-actions .btn-ghost,
.admin-page .admin-actions .btn-ghost,
.admin-page .admin-account .btn-ghost,
.admin-page .prize-head .btn-ghost,
.admin-page .report-toolbar .btn-ghost {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid rgba(24, 88, 168, 0.18);
  background: #fff;
  border-radius: 999px;
}

.admin-page .admin-shell {
  align-items: stretch;
  justify-content: flex-start;
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.admin-page .admin-card {
  width: 100%;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.admin-page .settings-tabs {
  margin: 0 0 14px;
  padding: 4px;
  gap: 4px;
  background: #fff;
  border: 1px solid rgba(24, 88, 168, 0.1);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(18, 74, 144, 0.05);
}

.admin-page .settings-tabs button {
  padding: 12px 14px;
  border-radius: 12px;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
}

.admin-page .settings-tabs button.is-active {
  background: var(--blue);
  box-shadow: 0 8px 16px rgba(24, 88, 168, 0.22);
}

.admin-page .settings-lead {
  margin: 0 4px 16px;
  font-size: 14px;
}

.admin-page .admin-block {
  margin: 0 0 14px;
  padding: 18px 18px 16px;
  background: #fff;
  border: 1px solid rgba(24, 88, 168, 0.1);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(18, 74, 144, 0.05);
}

.admin-page .admin-fold.admin-block {
  padding: 8px;
}

.admin-page .admin-fold .admin-fields {
  padding: 0 8px 8px;
}

.admin-page .admin-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.admin-page .admin-span {
  grid-column: 1 / -1;
}

.admin-page .settings-card label {
  margin-bottom: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(24, 88, 168, 0.72);
}

.admin-page .settings-card input {
  margin-top: 8px;
  background: #f8fbff;
  border-color: rgba(24, 88, 168, 0.16);
  border-radius: 14px;
  padding: 13px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.admin-page .settings-card input:focus {
  outline: none;
  background: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(24, 88, 168, 0.12);
}

.admin-page .cost-criteria {
  margin: 0 0 14px;
  padding: 18px;
  background: #fff;
  border-color: rgba(24, 88, 168, 0.1);
  box-shadow: 0 10px 30px rgba(18, 74, 144, 0.05);
}

.admin-page .cost-criteria legend {
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 16px;
  color: var(--blue);
}

.admin-page .cost-grid {
  gap: 12px;
}

.admin-page .cost-grid label {
  padding: 12px 12px 10px;
  border-radius: 16px;
  border: 1px solid transparent;
}

.admin-page .cost-grid input {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
}

.admin-page .cost-grid label:nth-child(1) {
  background: #e7f1ff;
  border-color: #b7d2f6;
  color: #1858a8;
}

.admin-page .cost-grid label:nth-child(1) input {
  background: #fff;
  border-color: #8eb6ea;
  color: #124a90;
}

.admin-page .cost-grid label:nth-child(2) {
  background: #e5f8f3;
  border-color: #a6e4d4;
  color: #0c7a64;
}

.admin-page .cost-grid label:nth-child(2) input {
  background: #fff;
  border-color: #7dcfbb;
  color: #0a6b58;
}

.admin-page .cost-grid label:nth-child(3) {
  background: #fff3e6;
  border-color: #f3cfa3;
  color: #b86a12;
}

.admin-page .cost-grid label:nth-child(3) input {
  background: #fff;
  border-color: #efc08a;
  color: #9a5810;
}

.admin-page .cost-grid label:nth-child(1) input:focus {
  border-color: #1858a8;
  box-shadow: 0 0 0 4px rgba(24, 88, 168, 0.16);
}

.admin-page .cost-grid label:nth-child(2) input:focus {
  border-color: #0c7a64;
  box-shadow: 0 0 0 4px rgba(12, 122, 100, 0.16);
}

.admin-page .cost-grid label:nth-child(3) input:focus {
  border-color: #b86a12;
  box-shadow: 0 0 0 4px rgba(184, 106, 18, 0.16);
}

.admin-page .prize-editor {
  margin: 0 0 14px;
}

.admin-page .prize-head h2 {
  margin: 0;
}

.admin-page .prize-head .btn-ghost {
  color: var(--blue);
  font-weight: 700;
}

.admin-page .prize-cols {
  padding: 0 8px;
}

.admin-page .prize-row {
  margin-bottom: 8px;
  padding: 8px;
  background: #f7faff;
  border: 1px solid rgba(24, 88, 168, 0.08);
  border-radius: 14px;
}

.admin-page .prize-row .prize-remove {
  height: 42px;
  border-radius: 12px;
  background: rgba(214, 40, 40, 0.08);
}

.admin-page .admin-actions {
  flex-direction: row;
  gap: 10px;
}

.admin-page .admin-actions .btn-primary,
.admin-page .admin-actions .btn-ghost {
  flex: 1;
}

.admin-page .admin-account {
  margin-top: 0;
  padding-top: 18px;
  border-top: 0;
}

.admin-page .admin-account .btn-ghost {
  margin-top: 12px;
}

.admin-page .report-toolbar {
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.admin-page .report-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  flex: 1;
  margin: 0;
}

.admin-page .report-stats.is-empty {
  display: block;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid rgba(24, 88, 168, 0.1);
  border-radius: 18px;
  font-weight: 600;
}

.admin-page .report-stat {
  padding: 16px 18px;
  background: #fff;
  border: 1px solid rgba(24, 88, 168, 0.1);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(18, 74, 144, 0.05);
}

.admin-page .report-stat strong {
  display: block;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.admin-page .report-stat span {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-page .report-stat.is-gift {
  background: #e7f1ff;
  border-color: #b7d2f6;
}

.admin-page .report-stat.is-gift strong,
.admin-page .report-stat.is-gift span {
  color: #124a90;
}

.admin-page .report-stat.is-retry {
  background: #e5f8f3;
  border-color: #a6e4d4;
}

.admin-page .report-stat.is-retry strong,
.admin-page .report-stat.is-retry span {
  color: #0a6b58;
}

.admin-page .report-stat.is-people {
  background: #fff3e6;
  border-color: #f3cfa3;
}

.admin-page .report-stat.is-people strong,
.admin-page .report-stat.is-people span {
  color: #9a5810;
}

.admin-page .report-exports {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.admin-page .report-toolbar .btn-ghost {
  align-self: center;
  height: fit-content;
}

.admin-page .report-panel {
  margin-top: 14px;
  padding: 6px 8px 10px;
  background: #fff;
  border: 1px solid rgba(24, 88, 168, 0.1);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(18, 74, 144, 0.05);
}

.admin-page .report-panel .report-sub {
  margin: 2px 2px 8px;
}

.admin-page .report-cols,
.admin-page .report-log-cols {
  display: grid;
  gap: 12px;
  align-items: center;
  margin: 0;
  padding: 10px 14px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(24, 88, 168, 0.62);
}

.admin-page .report-cols,
.admin-page .report-row {
  grid-template-columns: minmax(0, 1.6fr) 72px 72px 72px;
}

.admin-page .report-log {
  overflow-x: auto;
}

.admin-page .report-log-cols,
.admin-page .report-entry {
  grid-template-columns: 142px 148px 84px 68px 68px 68px minmax(120px, 1fr);
  min-width: 820px;
}

.admin-page .report-row,
.admin-page .report-entry {
  margin: 0;
  padding: 13px 14px;
  background: transparent;
  border: 0;
  border-radius: 12px;
  font-size: 15px;
}

.admin-page .report-row:nth-child(odd),
.admin-page .report-entry:nth-child(odd) {
  background: #f5f8fc;
}

.admin-page .report-name {
  font-weight: 700;
}

.admin-page .report-num {
  text-align: center;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.admin-page .report-when,
.admin-page .report-tckn,
.admin-page .report-spin,
.admin-page .report-points {
  font-variant-numeric: tabular-nums;
}

.admin-page .report-spin,
.admin-page .report-points {
  text-align: center;
  font-weight: 700;
}

.admin-page .report-tckn {
  letter-spacing: 0.03em;
  font-weight: 700;
}

.admin-page .report-gift {
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(24, 88, 168, 0.1);
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.admin-page .report-entry .report-when,
.admin-page .report-entry .report-tckn,
.admin-page .report-entry .report-gift {
  text-align: left;
}

.admin-page .report-log-cols span:nth-child(n + 3):nth-child(-n + 6) {
  text-align: center;
}

.admin-page #reportSummary,
.admin-page #reportList {
  overflow: visible;
  max-height: none;
  flex: none;
}

@media (max-width: 720px) {
  .admin-top {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
  }

  .admin-page .admin-shell {
    width: min(100% - 24px, 980px);
  }

  .admin-page .admin-fields,
  .admin-page .admin-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .admin-page .admin-span {
    grid-column: auto;
  }

  .admin-page .report-toolbar,
  .admin-page .report-stats {
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .admin-page .report-log-cols {
    display: none;
  }

  .admin-page .report-cols,
  .admin-page .report-row {
    grid-template-columns: minmax(0, 1fr) 48px 48px 48px;
    gap: 6px;
    font-size: 13px;
  }

  .admin-page .report-entry {
    grid-template-columns: 1fr;
    gap: 6px;
    min-width: 0;
  }

  .admin-page .report-entry span[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(24, 88, 168, 0.55);
  }
}
