:root {
  --bg: #000000;
  --bg-soft: #0a0a0a;
  --primary: #607d8b;
  --primary-light: #7a939c;
  --accent: #a1694d;
  --accent-light: #b8836a;
  --text: #f5f0eb;
  --text-secondary: #c8d0d4;
  --text-muted: #7a8f98;
  --border: rgba(96, 125, 139, 0.28);
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-hover: rgba(96, 125, 139, 0.14);
  --ad-height: 58px;
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-pill: 50px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--text);
  user-select: none;
}

/* Kiosk hep Chrome dokunmatik ekranda çalışır: manipulation, çift-dokunuş
   yakınlaştırma beklemesini kapatır → dokunuş anında click üretir */
button,
[data-action] {
  touch-action: manipulation;
}

#kiosk-root {
  width: 100vw;
  height: 100vh;
  max-width: 1920px;
  max-height: 1080px;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

/* Arka plan videosu — object-fit: cover ile tam ekran, ortadan kırpma */
.bg-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--bg);
  opacity: 0;
  transition: opacity 0.6s ease;
}

.bg-video-wrap.is-ready {
  opacity: 1;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
}

.bg-video-overlay {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0.55;
  pointer-events: none;
}

canvas#particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

canvas#particles.is-disabled {
  display: none;
}

/* Tüm etkileşimli alan — logo, sorular, öneri (içerik kadar genişlik/yükseklik) */
.kiosk-panel {
  position: absolute;
  left: 50%;
  top: calc((100% - var(--ad-height)) / 2);
  transform: translate(-50%, -50%);
  z-index: 2;
  width: fit-content;
  max-width: min(1080px, calc(100vw - 48px));
  max-height: calc(100% - var(--ad-height) - 32px);
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  contain: layout style paint;
}

.screen {
  position: relative;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 48px 32px;
  width: 100%;
}

.screen.hidden {
  display: none;
}

.screen.visible {
  display: flex;
}

#screen-attract.screen.visible {
  min-width: min(580px, calc(100vw - 96px));
}

#screen-q.screen.visible {
  min-width: min(820px, calc(100vw - 96px));
}

/* ATTRACT */
.logo-wrap {
  margin-bottom: 28px;
}

.logo-wrap img {
  width: min(520px, 72vw);
  height: auto;
  display: block;
}

.attract-title {
  font-size: clamp(32px, 3.2vw, 48px);
  font-weight: 700;
  text-align: center;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 12px;
}

/* Attract sahne geçişleri: metin yumuşakça söner, yenisi belirir */
.attract-title,
.attract-sub {
  transition: opacity 0.26s ease, transform 0.26s ease;
}

.attract-title.scene-fading,
.attract-sub.scene-fading {
  opacity: 0;
  transform: translateY(6px);
}

/* TR/EN dil düğmesi — attract alt satırında ana CTA'nın sağında */
.attract-actions {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: clamp(10px, 1.4vw, 16px);
  width: 100%;
  max-width: min(760px, calc(100vw - 96px));
}

.attract-main-cta {
  flex: 1 1 auto;
  min-width: 0;
  padding-left: clamp(20px, 3vw, 40px);
  padding-right: clamp(20px, 3vw, 40px);
}

.attract-side-btn {
  flex: 0 0 auto;
  min-width: 74px;
  min-height: 56px;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: inherit;
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s;
  white-space: nowrap;
}

.attract-side-btn:active {
  transform: scale(0.97);
}

.attract-spin-btn {
  background: linear-gradient(135deg, #5e7d8c, #7898a8);
  border-color: rgba(96, 125, 139, 0.45);
  box-shadow: 0 8px 20px rgba(96, 125, 139, 0.28);
}

.attract-spin-btn[hidden] {
  display: none;
}

.lang-toggle {
  position: static;
  color: var(--text-muted);
  letter-spacing: 1.5px;
}

.lang-toggle:active {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
}

.attract-title span {
  color: var(--accent);
}

.attract-sub {
  font-size: clamp(16px, 1.4vw, 20px);
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 16px;
  font-weight: 400;
}

.menu-status {
  min-height: 20px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 24px;
}

.menu-status[data-state='loading'] {
  color: var(--primary-light);
}

.menu-status[data-state='error'] {
  color: var(--accent-light);
}

.touch-cta:disabled {
  cursor: not-allowed;
}

.touch-cta {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--text);
  font-weight: 600;
  font-size: clamp(18px, 1.5vw, 22px);
  padding: clamp(14px, 2.4vh, 20px) 52px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 24px rgba(161, 105, 77, 0.35);
  transition: transform 0.15s;
  min-height: 56px;
  min-width: 220px;
}

.touch-cta:active {
  transform: scale(0.97);
}

/* QUESTIONS */
.q-header {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
  width: 100%;
  max-width: 720px;
}

.q-back-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  min-height: 48px;
  min-width: 48px;
  transition: all 0.15s ease;
}

.q-back-btn:hover {
  border-color: var(--border);
  color: var(--text-secondary);
}

.q-back-btn.hidden {
  visibility: hidden;
  pointer-events: none;
}

.q-step-badge {
  background: rgba(96, 125, 139, 0.15);
  border: 1px solid var(--border);
  color: var(--primary-light);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

.q-progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.q-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 4px;
  transition: width 0.4s ease;
}

.q-title {
  font-size: clamp(28px, 2.8vw, 40px);
  font-weight: 600;
  text-align: center;
  margin-bottom: 32px;
  line-height: 1.25;
  max-width: 640px;
}

.q-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  max-width: 720px;
}

.q-option {
  background: var(--card-bg);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 24px 20px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  text-align: center;
  color: inherit;
  font: inherit;
  min-height: 120px;
}

.q-option:active,
.q-option.selected {
  background: var(--card-hover);
  border-color: var(--primary);
}

.q-option-icon {
  font-size: 32px;
  margin-bottom: 10px;
  display: block;
}

.q-option-label {
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: 500;
  color: var(--text-secondary);
}

.q-option-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* RESULT */
.result-alt {
  margin-top: clamp(8px, 1.7vh, 18px);
  padding-top: clamp(8px, 1.5vh, 16px);
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.result-alt.hidden {
  display: none;
}

.result-alt-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--primary-light);
  text-transform: uppercase;
}

.result-alt-name {
  font-size: clamp(15px, 1.3vw, 19px);
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 4px;
}

.result-alt-price {
  font-size: 13px;
  color: var(--text-muted);
}

.result-alt-price:empty {
  display: none;
}

.result-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: 100%;
  max-width: 980px;
  align-items: stretch;
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
}

.loyalty-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(14px, 2.2vh, 24px) 24px clamp(14px, 2.6vh, 28px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.1vh, 12px);
  min-height: 0;
}

.loyalty-cta {
  width: 100%;
  max-width: 320px;
  margin-top: 4px;
  min-width: 0;
}

.loyalty-title {
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 600;
  color: var(--text);
}

.loyalty-copy {
  font-size: clamp(13px, 1.1vw, 15px);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 360px;
}

.loyalty-copy strong {
  color: var(--accent-light);
  font-weight: 600;
}

.qr-box--compact {
  padding: clamp(10px, 1.5vh, 16px);
  margin-bottom: 0;
}

.qr-box--compact .qr-img {
  width: clamp(104px, 19vh, 150px);
  height: clamp(104px, 19vh, 150px);
}

.loyalty-qr-row {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 14px;
  min-height: 0;
}

/* "Telefona gönder" QR kutusu */
.share-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  max-width: 190px;
}

/* display: flex, hidden özniteliğini ezmesin (SHARE_CARD kapalıyken gizli kalmalı) */
.share-box[hidden] {
  display: none;
}

.share-qr {
  width: clamp(84px, 15vh, 118px);
  height: clamp(84px, 15vh, 118px);
  padding: 8px;
  background: #f5f0eb;
  border-radius: 12px;
}

.share-qr svg {
  display: block;
  width: 100%;
  height: 100%;
}

.share-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.share-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.share-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.result-glow {
  position: absolute;
  top: 32%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(96, 125, 139, 0.14) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* Dikey ölçüler vh-esnek: kısa ekranlarda (ör. Possify 2162B) kart,
   promo bandıyla çakışmadan panel içine sığar. */
.result-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(14px, 3vh, 32px) 28px;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 2;
  min-height: 0;
}

/* Kahve kişiliği rozeti */
.result-persona {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(8px, 1.5vh, 16px);
  padding: clamp(5px, 0.9vh, 9px) 20px;
  background: rgba(96, 125, 139, 0.16);
  border: 1px solid rgba(96, 125, 139, 0.4);
  border-radius: var(--radius-pill);
}

.result-persona-label {
  font-size: 10.5px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.result-persona-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.result-label {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--primary-light);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.result-drink {
  font-size: clamp(24px, 4.2vh, 42px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.result-price {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 12px;
}

.result-desc {
  font-size: clamp(13px, 1.2vw, 17px);
  color: var(--text-muted);
  margin-bottom: clamp(8px, 1.9vh, 20px);
  line-height: 1.5;
}

.result-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin: clamp(8px, 1.7vh, 18px) 0;
}

.result-sweet-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.result-sweet {
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 500;
  color: var(--text-secondary);
}

.result-sweet-price {
  font-size: 15px;
  color: var(--accent-light);
  margin-top: 4px;
}

.result-media {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: clamp(40px, 7vh, 76px);
  margin-bottom: clamp(6px, 1.3vh, 14px);
}

.result-emoji {
  font-size: clamp(40px, 5.5vh, 56px);
  display: block;
}

.result-emoji.hidden {
  display: none;
}

/* Şeffaf arka planlı ürün fotoğrafı (assets/urunler/web) */
.result-image {
  width: auto;
  height: clamp(96px, 18vh, 190px);
  max-width: 240px;
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.55));
  display: block;
}

.result-image.hidden {
  display: none;
}

/* Boy seçimli ürünlerde S/M/L fiyat rozetleri */
.result-sizes {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: clamp(6px, 1.1vh, 12px);
}

.result-sizes.hidden {
  display: none;
}

.result-size {
  font-size: clamp(14px, 1.2vw, 17px);
  font-weight: 600;
  color: var(--accent-light);
  background: rgba(161, 105, 77, 0.12);
  border: 1px solid rgba(161, 105, 77, 0.35);
  border-radius: var(--radius-pill);
  padding: clamp(4px, 0.6vh, 6px) 14px;
}

.result-price:empty {
  display: none;
}

/* Kısa ekranlar (ör. Possify 2162B efektif ~768-800px): sonuç kartı sıkışık düzen.
   Uzun içecek adı/açıklama kombinasyonlarında bile kart kendi sınırında kalır. */
@media (max-height: 820px) {
  .result-persona-name {
    font-size: 14px;
  }

  .result-image {
    height: 15vh;
  }

  .result-emoji {
    font-size: 4.5vh;
  }

  .result-label {
    margin-bottom: 6px;
  }

  .result-drink {
    font-size: clamp(22px, 3.2vh, 28px);
    margin-bottom: 6px;
  }

  /* Açıklama en fazla 2 satır — kalanı üç noktayla kısalır */
  .result-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .result-sweet {
    font-size: 15px;
  }

  .result-sweet-price {
    font-size: 13px;
    margin-top: 2px;
  }

  .result-alt-name {
    font-size: 14px;
    margin-top: 2px;
  }

  .loyalty-title {
    font-size: 16px;
  }

  .loyalty-copy {
    font-size: 12px;
    line-height: 1.45;
  }

  .share-box {
    padding: 10px;
    gap: 6px;
  }

  .share-title {
    font-size: 12px;
  }

  .share-sub {
    font-size: 10.5px;
  }
}

/* Sonuç ekranı buton satırı: çark + yeniden dene yan yana */
.loyalty-cta-row {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 380px;
  margin-top: 4px;
}

.loyalty-cta-row .loyalty-cta {
  flex: 1;
  margin-top: 0;
  max-width: none;
  padding-left: 18px;
  padding-right: 18px;
  font-size: clamp(15px, 1.2vw, 19px);
  white-space: nowrap;
}

.loyalty-cta-row .spin-cta {
  background: linear-gradient(135deg, #5e7d8c, #7898a8);
  box-shadow: 0 8px 24px rgba(96, 125, 139, 0.35);
}

.loyalty-cta-row .spin-cta[hidden] {
  display: none;
}

/* SPIN-TO-WIN ekranı */
body.spin-screen-active .ad-strip {
  display: none;
}

body.spin-screen-active .kiosk-panel {
  top: 50%;
  max-height: calc(100% - 32px);
  overflow: hidden;
}

#screen-spin.visible {
  overflow: hidden;
  max-height: 100%;
  padding: clamp(24px, 3vh, 40px) clamp(28px, 4vw, 48px) clamp(20px, 2.5vh, 32px);
}

.spin-title {
  font-size: clamp(30px, 4.2vh, 46px);
  font-weight: 700;
  margin-bottom: clamp(4px, 0.8vh, 10px);
  position: relative;
  z-index: 2;
}

.spin-sub {
  font-size: clamp(14px, 1.9vh, 18px);
  color: var(--text-secondary);
  margin-bottom: clamp(14px, 2.6vh, 30px);
  position: relative;
  z-index: 2;
}

.spin-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 4vw, 64px);
  width: 100%;
  max-width: 960px;
  position: relative;
  z-index: 2;
  min-height: 0;
  flex: 0 1 auto;
}

.spin-wheel-wrap {
  position: relative;
  width: clamp(280px, 52vh, 460px);
  height: clamp(280px, 52vh, 460px);
  flex: 0 0 auto;
}

.spin-wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow:
    0 0 0 6px rgba(184, 131, 106, 0.35),
    0 18px 48px rgba(0, 0, 0, 0.5);
  will-change: transform;
}

.spin-wheel svg {
  display: block;
  width: 100%;
  height: 100%;
}

.spin-pointer {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 26px solid var(--accent-light, #d3a184);
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5));
  z-index: 3;
}

.spin-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 1.8vh, 18px);
  max-width: 320px;
  min-width: 0;
  flex: 0 1 320px;
}

.spin-action-stack {
  width: 100%;
  display: grid;
  grid-template-areas: 'main';
  align-items: start;
  justify-items: stretch;
  min-height: clamp(118px, 13vh, 150px);
}

.spin-action-stack > .spin-btn,
.spin-action-stack > .spin-result {
  grid-area: main;
  width: 100%;
}

.spin-qr-wrap {
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spin-qr-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

.spin-qr-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14px;
}

.spin-sub.hidden,
#spin-qr-box.hidden {
  display: none;
}

.spin-qr.hidden {
  display: none;
}

.spin-greeting {
  font-size: clamp(28px, 4vh, 42px);
  font-weight: 800;
  color: var(--text);
  text-align: center;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.spin-greeting.hidden {
  display: none;
}

.spin-status {
  font-size: clamp(14px, 2vh, 18px);
  color: var(--accent-light);
  text-align: center;
  min-height: 1.5em;
  line-height: 1.35;
}

.spin-status.hidden {
  display: none;
}

.spin-status[data-state='error'],
.spin-status[data-state='expired'] {
  color: #e8a87c;
}

.spin-refresh-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  padding: 8px 20px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  min-height: 44px;
}

.spin-refresh-btn.hidden {
  display: none;
}

.spin-refresh-btn:active {
  transform: scale(0.97);
}

.spin-btn {
  width: 100%;
  padding-left: 24px;
  padding-right: 24px;
  white-space: nowrap;
}

.spin-btn.hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.spin-result {
  width: 100%;
  background: rgba(184, 131, 106, 0.14);
  border: 1px solid rgba(184, 131, 106, 0.45);
  border-radius: var(--radius-md);
  padding: clamp(14px, 2.2vh, 22px) 18px;
  text-align: center;
  animation: spin-result-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.spin-result[hidden] {
  display: block !important;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  animation: none;
}

.spin-result:not([hidden]) {
  visibility: visible;
  opacity: 1;
}

@keyframes spin-result-pop {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.spin-result-label {
  font-size: clamp(20px, 3vh, 28px);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.25;
}

.spin-result-hint {
  font-size: clamp(14px, 2vh, 17px);
  color: var(--accent-light);
  line-height: 1.4;
}

.spin-result-hint[data-outcome='lose'] {
  color: var(--text-muted);
}

.spin-home-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
  padding: 10px 26px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  min-height: 48px;
}

.spin-home-btn:active {
  transform: scale(0.97);
}

/* Gece karartma katmanı (js/screen-care.js) — dokunuşları engellemez,
   herhangi bir dokunuş karartmayı 60 sn kaldırır */
#night-dim {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 2.5s ease;
  z-index: 90;
}

#night-dim.night-dim-active {
  opacity: var(--night-opacity, 0.88);
}

/* Konfeti "ödül anı" (js/confetti.js) — tek seferlik, ~2.5 sn sonra silinir */
.confetti-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 60;
}

.confetti-piece {
  position: absolute;
  top: -16px;
  display: block;
  opacity: 0.95;
  animation-name: confetti-fall;
  animation-timing-function: cubic-bezier(0.25, 0.4, 0.45, 1);
  animation-fill-mode: forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.95;
  }
  80% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(105vh) rotate(var(--confetti-rot, 420deg));
    opacity: 0;
  }
}

/* Kısa ekranlar (ör. Possify 2162B): çark ve butonlar sıkışır */
@media (max-height: 820px) {
  .loyalty-cta-row .loyalty-cta {
    font-size: 15px;
    padding: 12px 14px;
    min-height: 48px;
  }

  .spin-wheel-wrap {
    width: clamp(230px, 44vh, 380px);
    height: clamp(230px, 44vh, 380px);
  }

  .spin-side .qr-box--compact .qr-img {
    width: clamp(90px, 15vh, 120px);
    height: clamp(90px, 15vh, 120px);
  }
}

.action-row {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  width: 100%;
  max-width: 560px;
}

.btn-primary,
.btn-ghost {
  flex: 1;
  font-size: clamp(15px, 1.2vw, 17px);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: transform 0.15s;
  min-height: 54px;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--text);
  font-weight: 600;
}

.btn-primary:active,
.btn-ghost:active {
  transform: scale(0.97);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-ghost:hover {
  border-color: var(--border);
  color: var(--text-secondary);
}

/* QR */
.qr-title {
  font-size: clamp(28px, 2.8vw, 38px);
  font-weight: 600;
  text-align: center;
  margin-bottom: 10px;
  line-height: 1.2;
}

.qr-sub {
  font-size: clamp(14px, 1.2vw, 17px);
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 28px;
  max-width: 520px;
  line-height: 1.5;
}

.qr-box {
  background: #f5f0eb;
  border-radius: var(--radius-md);
  padding: 24px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.qr-img {
  width: 180px;
  height: 180px;
  display: block;
  object-fit: contain;
}

.qr-brand {
  color: var(--bg);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
}

/* AD STRIP */
.ad-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--ad-height);
  background: rgba(10, 10, 10, 0.92);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  overflow: hidden;
  z-index: 10;
}

.ad-label {
  flex-shrink: 0;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--text-muted);
  padding: 0 14px;
  white-space: nowrap;
  text-transform: uppercase;
  background: rgba(10, 10, 10, 0.92);
  z-index: 2;
  position: relative;
}

.ad-scroll-viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 20px);
  mask-image: linear-gradient(to right, transparent 0, #000 20px);
}

.ad-inner {
  display: flex;
  gap: 44px;
  animation: ad-scroll 22s linear infinite;
  align-items: center;
  width: max-content;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .ad-inner {
    animation: none;
  }

  .touch-cta:active,
  .btn-ghost:active {
    transform: none;
  }
}

@keyframes ad-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.ad-item {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.ad-item-icon {
  font-size: 20px;
}

.ad-item-text {
  font-size: 13px;
  color: var(--text-muted);
}

.ad-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-light);
  margin-right: 4px;
}

#screen-result.screen.visible {
  min-width: min(980px, calc(100vw - 96px));
  max-height: calc(100vh - var(--ad-height) - 64px);
  padding: clamp(12px, 2.2vh, 24px) 40px clamp(10px, 1.8vh, 20px);
  justify-content: center;
  overflow: hidden;
}

.screen-tag {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: clamp(8px, 1.7vh, 18px);
  text-transform: uppercase;
}

@media (min-width: 1600px) {
  .screen {
    padding: 48px 64px 32px;
  }
}

@media (max-width: 900px) {
  .result-layout {
    grid-template-columns: 1fr;
    max-width: 560px;
  }
}

@media (max-width: 720px) {
  .q-options {
    grid-template-columns: 1fr;
  }

  .action-row {
    flex-direction: column;
  }
}

/* Personel kiosk çıkışı */
#staff-exit-hotspot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9000;
  opacity: 0;
  touch-action: manipulation;
}

body.staff-exit-open #staff-exit-hotspot {
  pointer-events: none;
}

.staff-exit-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.staff-exit-modal.hidden {
  display: none;
}

.staff-exit-dialog {
  width: min(420px, 100%);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

.staff-exit-shake {
  animation: staff-exit-shake 0.4s ease;
}

@keyframes staff-exit-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-8px);
  }
  75% {
    transform: translateX(8px);
  }
}

.staff-exit-title {
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
}

.staff-exit-sub {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 18px;
}

.staff-exit-pin-display {
  font-size: 32px;
  letter-spacing: 10px;
  text-align: center;
  color: var(--accent-light);
  margin-bottom: 12px;
  min-height: 42px;
}

.staff-exit-error {
  min-height: 20px;
  font-size: 13px;
  color: #e07a7a;
  text-align: center;
  margin-bottom: 8px;
}

.staff-exit-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.staff-exit-keypad button {
  min-height: 56px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.staff-exit-keypad button:active {
  transform: scale(0.97);
  background: var(--card-hover);
}

.staff-exit-instructions {
  text-align: center;
}

.staff-exit-instructions.hidden {
  display: none;
}

.staff-exit-dismiss {
  margin-top: 8px;
  min-width: 180px;
}

