/* Kura Çekme: giriş, sahne ve sonuçtan oluşan tek ekran uygulama.
   Renkler sitenin --brand ailesinden gelir; çark paletleri tool.js içindedir. */

[data-tool="kura-cekme"] {
  --kc-line: #ece8e3;
  --kc-line-2: #e3ded8;
  --kc-soft: #f5f3f0;
  --kc-soft-2: #faf9f7;
  --kc-radius: 20px;
  --kc-shadow: 0 1px 2px #16110c08, 0 22px 44px -32px #16110c4d;
  --kc-cta: linear-gradient(135deg, #ff8124 0%, #ff6b00 48%, #e65300 100%);
  --kc-cta-shadow: 0 16px 30px -14px #ff6b00c7, inset 0 1px 0 #ffffff59;
  --kc-row: 52px;
}

[data-tool="kura-cekme"] [hidden] { display: none !important; }

/* Şablonun ortak panel kabuğu ve alt eylem çubuğu bu araçta kullanılmaz; eylemler sonuç kartındadır. */
.panel--tool:has(> [data-tool="kura-cekme"]) { padding: 0; border: 0; background: transparent; box-shadow: none; }
[data-tool="kura-cekme"] > .tool__actions--utility { display: none !important; }

/* ---------- yerleşim ---------- */

.kc-app {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "input" "stage" "result";
  gap: 16px;
  align-items: start;
}
.kc-input { grid-area: input; }
.kc-stage { grid-area: stage; }
.kc-result { grid-area: result; }

@media (min-width: 900px) {
  .kc-app {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "input stage" "input result";
  }
}
@media (min-width: 1180px) {
  /* Üç sütun aynı boyda: en uzun sütun boyu belirler, metin kutusu ve sahne boşluğu doldurur. */
  .kc-app {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr) minmax(0, 1fr);
    grid-template-areas: "input stage result";
    align-items: stretch;
  }
  .kc-input > .kc-block:not([hidden]) { display: flex; flex: 1 1 auto; flex-direction: column; }
  .kc-input > .kc-block[data-mode="isim"] > .kc-drop { display: flex; flex: 1 1 auto; flex-direction: column; }
  .kc-input .kc-names { flex: 1 1 auto; height: 128px; min-height: 128px; }
  .kc-stage .kc-stage__body { flex: 1 1 auto; }
  .kc-result__body { flex: 1 1 auto; }
}

/* Ekrana oturma: geniş ekranda araç, açılışta başlığın altındaki pencere yüksekliğini doldurur.
   --kc-top aracın sayfa başından uzaklığıdır, tool.js ölçer. Bu bir alt sınırdır: içerik uzarsa
   (çok kazanan, geçmiş) kartlar kendi içinde kaymaz, doğal olarak uzar ve sayfa kayar. */
@media (min-width: 1180px) and (min-height: 600px) {
  .kc-app { min-height: clamp(500px, calc(100vh - var(--kc-top, 130px) - 18px), 800px); }
  @supports (height: 100dvh) {
    .kc-app { min-height: clamp(500px, calc(100dvh - var(--kc-top, 130px) - 18px), 800px); }
  }
  .kc-input .kc-names { height: 96px; min-height: 96px; }
  .kc-wlist { max-height: 420px; }
  .kc-stage .kc-stage__body { min-height: 300px; padding: 18px 0 2px; container-type: size; }
  .kc-wheelbox { width: min(400px, 100cqw, calc(100cqh - 22px)); }
  .kc-slot { width: min(360px, 100cqw); --kc-row: clamp(40px, calc((100cqh - 24px) / 5), 52px); }
}

.kc-pane {
  position: relative;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--kc-line);
  border-radius: var(--kc-radius);
  background: #fff;
  box-shadow: var(--kc-shadow);
}

[data-tool="kura-cekme"] .icon { width: 16px; height: 16px; flex: none; }

/* ---------- ortak küçük parçalar ---------- */

.kc-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.005em;
}
.kc-label .icon { width: 15px; height: 15px; color: var(--brand-700); }
.kc-opt { color: var(--ink-muted); font-size: 11.5px; font-weight: 500; }
.kc-hint { margin: 6px 0 0; color: var(--ink-muted); font-size: 12px; line-height: 1.5; }
.kc-hint code { padding: 1px 5px; border-radius: 5px; background: var(--kc-soft); font-size: 11.5px; }
.kc-hint--info { color: #9a4a10; font-weight: 600; }
.kc-hint:empty { display: none; }

.kc-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-700);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- giriş paneli ---------- */

.kc-input { display: flex; flex-direction: column; }
.kc-input .field { margin: 0; }
.kc-input .field__error { margin-top: 6px; }

.kc-seg {
  display: flex;
  gap: 4px;
  margin: 0 0 14px;
  padding: 4px;
  border: 0;
  border-radius: 14px;
  background: var(--kc-soft);
}
.kc-seg__item { position: relative; flex: 1 1 0; margin: 0; }
.kc-seg__item input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.kc-seg__item span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 10px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 700;
  transition: background .2s var(--fed), color .2s var(--fed), box-shadow .2s var(--fed);
}
.kc-seg__item .icon { width: 17px; height: 17px; }
.kc-seg__item:hover span { color: var(--ink); }
.kc-seg__item input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 2px #16110c14, 0 4px 12px -6px #16110c33; }
.kc-seg__item input:checked + span .icon { color: var(--brand); }
.kc-seg__item input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.kc-seg__item input:disabled { cursor: not-allowed; }

.kc-list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kc-list-head .kc-label { margin: 0; }
.kc-list-head__end { display: inline-flex; align-items: center; gap: 8px; }
.kc-undo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--brand-700);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.kc-undo .icon { width: 14px; height: 14px; }
.kc-undo:hover { text-decoration: underline; text-underline-offset: .18em; }
.kc-undo:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.kc-listbar { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.kc-chipbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--kc-line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background .18s var(--fed), border-color .18s var(--fed), color .18s var(--fed);
}
.kc-chipbtn::-webkit-details-marker { display: none; }
.kc-chipbtn:hover { border-color: #cfc8c0; background: var(--kc-soft-2); color: var(--ink); }
.kc-chipbtn:focus-within, .kc-chipbtn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.kc-chipbtn .icon { width: 15px; height: 15px; }
.kc-chipbtn .kc-caret { width: 13px; height: 13px; margin-left: -2px; transition: transform .2s var(--fed); }

.kc-menu { position: relative; }
.kc-menu[open] > summary { border-color: var(--brand); color: var(--ink); background: var(--brand-soft-2); }
.kc-menu[open] > summary .kc-caret { transform: rotate(180deg); }
.kc-menu__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  display: grid;
  min-width: 228px;
  padding: 6px;
  border: 1px solid var(--kc-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 48px -20px #16110c55, 0 2px 6px #16110c0f;
  animation: kc-menu-in .16s var(--fed);
}
.kc-menu__panel button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
}
.kc-menu__panel button .icon { color: var(--ink-muted); }
.kc-menu__panel button:hover, .kc-menu__panel button:focus-visible { background: var(--kc-soft); outline: none; }
.kc-menu__panel button.is-danger { color: var(--err); }
.kc-menu__panel button.is-danger .icon { color: var(--err); }
@keyframes kc-menu-in { from { opacity: 0; transform: translateY(-4px); } }

.kc-drop { position: relative; }
.kc-names {
  height: 150px;
  min-height: 110px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
}
.kc-drop__hint {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 2px dashed var(--brand);
  border-radius: 14px;
  background: #fff3e8eb;
  color: var(--brand-700);
  font-size: 14px;
  font-weight: 700;
  pointer-events: none;
}
.kc-drop__hint .icon { width: 28px; height: 28px; }
.kc-drop.is-over .kc-drop__hint { display: grid; }

/* Anahtar: kutu yerine kayan düğme */
.kc-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  user-select: none;
}
.kc-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.kc-switch__ui {
  position: relative;
  flex: none;
  width: 36px;
  height: 21px;
  border-radius: 999px;
  background: #d8d2cb;
  transition: background .2s var(--fed);
}
.kc-switch__ui::after {
  content: '';
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px #16110c40;
  transition: transform .22s var(--fed);
}
.kc-switch input:checked + .kc-switch__ui { background: var(--brand); }
.kc-switch input:checked + .kc-switch__ui::after { transform: translateX(15px); }
.kc-switch input:focus-visible + .kc-switch__ui { outline: 2px solid var(--brand); outline-offset: 2px; }

.kc-row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-bottom: 12px; }
.kc-block[data-mode="sayi"] > .field { margin-bottom: 4px; }

/* Kazanan / yedek adımlayıcı */
.kc-counts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 12px; }
.kc-stepper__box {
  display: flex;
  align-items: stretch;
  height: 46px;
  overflow: hidden;
  border: 1px solid var(--kc-line-2);
  border-radius: 14px;
  background: var(--kc-soft-2);
  transition: border-color .2s var(--fed), box-shadow .2s var(--fed);
}
.kc-stepper__box:focus-within { border-color: #ff6b0080; box-shadow: 0 0 0 4px #ff6b001a; background: #fff; }
.kc-stepper__box button {
  flex: none;
  width: 42px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background .15s var(--fed), color .15s var(--fed);
}
.kc-stepper__box button:hover { background: #f0ece7; color: var(--ink); }
.kc-stepper__box button:active { background: #e8e3dd; }
.kc-stepper__box button:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.tool__form .kc-stepper__box .input {
  height: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 17px;
  font-weight: 800;
  text-align: center;
}
.kc-stepper__box .input:focus { box-shadow: none; }
.kc-stepper:has([aria-invalid="true"]) .kc-stepper__box { border-color: var(--err); }

/* Gelişmiş ayarlar */
.kc-more {
  margin-top: 12px;
  border: 1px solid var(--kc-line);
  border-radius: 14px;
  background: var(--kc-soft-2);
}
.kc-more > summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 8px 12px;
  list-style: none;
  cursor: pointer;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.kc-more > summary::-webkit-details-marker { display: none; }
.kc-more > summary .icon { width: 17px; height: 17px; color: var(--brand-700); }
.kc-more__t { white-space: nowrap; }
.kc-more > summary small {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.kc-more.has-values > summary small { color: var(--brand-700); font-weight: 650; }
.kc-more > summary .kc-caret { width: 15px; height: 15px; color: var(--ink-muted); transition: transform .2s var(--fed); }
.kc-more[open] > summary .kc-caret { transform: rotate(180deg); }
.kc-more > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 12px; }
.kc-more__body { display: grid; align-content: start; gap: 12px; }
.kc-input:has(.kc-more[open]) > :not(.kc-more) { display: none !important; }
.kc-more[open] { margin: 0; border: 0; background: transparent; }
.kc-more[open] > summary { display: none; }
.kc-more[open] > .kc-more__body { padding: 0; animation: kc-sheet .22s var(--fed); }
@keyframes kc-sheet { from { opacity: 0; transform: translateY(8px); } }
.kc-more__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--kc-line);
}
.kc-more__head strong { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 15px; font-weight: 800; }
.kc-more__head strong .icon { width: 18px; height: 18px; color: var(--brand-700); }
.kc-more__head .kc-pill { min-height: 34px; }
.kc-more__body .kc-switch { margin-top: 0; }
.kc-more__body .kc-hint { margin-top: -6px; }
.kc-small { height: auto; min-height: 66px; border-radius: 12px; font-size: 13.5px; }

.kc-opt-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.kc-opt-row > .kc-label { margin: 0; }
.kc-mini-seg, .kc-anim {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: #efece8;
}
.kc-mini-seg label, .kc-anim label { position: relative; margin: 0; }
.kc-mini-seg input, .kc-anim input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.kc-mini-seg span, .kc-anim span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  transition: background .18s var(--fed), color .18s var(--fed);
}
.kc-mini-seg input:checked + span, .kc-anim input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 2px #16110c1f; }
.kc-mini-seg input:focus-visible + span, .kc-anim input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }

.kc-swatches { display: inline-flex; gap: 8px; }
.kc-swatches label { position: relative; margin: 0; }
.kc-swatches input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.kc-sw { display: block; width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1px #16110c1a; transition: transform .15s var(--fed); }
.kc-sw--canli { background: conic-gradient(#ff6b00 0 12.5%, #7c3aed 0 25%, #facc15 0 37.5%, #2563eb 0 50%, #e11d48 0 62.5%, #0f766e 0 75%, #f472b6 0 87.5%, #15803d 0); }
.kc-sw--turuncu { background: conic-gradient(#c44700 0 16.6%, #3f3a34 0 33.3%, #ff6b00 0 50%, #574f47 0 66.6%, #ff9a4d 0 83.3%, #16110c 0); }
.kc-sw--pastel { background: conic-gradient(#ffd6b8 0 16.6%, #dcd0ff 0 33.3%, #fff1a8 0 50%, #c9e4ff 0 66.6%, #ffc8dd 0 83.3%, #c7f0e3 0); }
.kc-swatches input:checked + .kc-sw { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand); transform: scale(1.04); }
.kc-swatches input:focus-visible + .kc-sw { outline: 2px solid var(--brand-700); outline-offset: 4px; }

/* Ana eylem: renkli gölgeli hap düğme */
.kc-cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  margin-top: 14px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--kc-cta);
  box-shadow: var(--kc-cta-shadow);
  color: #fff;
  font: inherit;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: transform .18s var(--fed), box-shadow .18s var(--fed), filter .18s var(--fed);
}
.kc-cta .icon { width: 21px; height: 21px; }
.kc-cta:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 20px 34px -14px #ff6b00e6, inset 0 1px 0 #ffffff59; filter: saturate(1.08); }
.kc-cta:active:not(:disabled) { transform: translateY(1px) scale(.995); }
.kc-cta:focus-visible { outline: 3px solid #16110c; outline-offset: 3px; }
.kc-cta:disabled { cursor: progress; filter: grayscale(.25); opacity: .75; }
.kc-kbd {
  position: absolute;
  right: 16px;
  padding: 3px 7px;
  border-radius: 7px;
  background: #ffffff2e;
  color: #ffffffd9;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .02em;
}
@media (hover: none), (max-width: 1279px) { .kc-kbd { display: none; } }

.kc-privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 0;
  color: var(--ink-muted);
  font-size: 11.5px;
  text-align: center;
}
.kc-privacy .icon { width: 14px; height: 14px; color: var(--ok); }

/* ---------- sahne ---------- */

.kc-stage {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  padding: 14px 14px 12px;
  background:
    radial-gradient(120% 70% at 50% 0%, #fff4ea 0%, #ffffff00 60%),
    radial-gradient(80% 60% at 100% 100%, #f3eeff 0%, #ffffff00 60%),
    #fff;
}

.kc-stage__head { display: grid; gap: 8px; }
.kc-title {
  width: 100%;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  transition: background .18s var(--fed), border-color .18s var(--fed);
}
.kc-title::placeholder { color: #b0a89f; font-weight: 700; }
.kc-title:hover { background: #ffffffb3; border-color: var(--kc-line); }
.kc-title:focus { outline: none; background: #fff; border-color: #ff6b0080; box-shadow: 0 0 0 4px #ff6b001a; }

.kc-tools { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.kc-tools .kc-anim { margin-right: auto; background: #f3f0ec; }

.kc-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--kc-line-2);
  border-radius: 11px;
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .18s var(--fed), color .18s var(--fed), border-color .18s var(--fed), transform .12s var(--fed);
}
.kc-icon .icon { width: 18px; height: 18px; }
.kc-icon:hover:not(:disabled) { background: var(--kc-soft-2); color: var(--ink); border-color: #cfc8c0; }
.kc-icon:active:not(:disabled) { transform: scale(.94); }
.kc-icon:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.kc-icon:disabled { cursor: default; opacity: .45; }
.kc-icon--sm { width: 32px; height: 32px; border-radius: 9px; }
.kc-icon--sm .icon { width: 16px; height: 16px; }
.kc-icon.is-done { border-color: var(--ok); color: var(--ok); }
.kc-icon .kc-on, .kc-icon .kc-max { display: inline-flex; }
.kc-icon .kc-off, .kc-icon .kc-min { display: none; }
.kc-icon[aria-pressed="false"] .kc-on { display: none; }
.kc-icon[aria-pressed="false"] .kc-off { display: inline-flex; }
.kc-app.is-present .kc-icon .kc-max { display: none; }
.kc-app.is-present .kc-icon .kc-min { display: inline-flex; }
.kc-icon[data-kc-sound][aria-pressed="true"], .kc-icon[data-kc-confetti][aria-pressed="true"] { color: var(--brand-700); }
.kc-icon[data-kc-sound][aria-pressed="false"], .kc-icon[data-kc-confetti][aria-pressed="false"] { color: #b9b1a8; background: var(--kc-soft); }

.kc-stage__body {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 330px;
  padding: 16px 0 4px;
}

/* Çark */
.kc-wheelbox {
  position: relative;
  width: min(340px, 100%);
  aspect-ratio: 1;
  filter: drop-shadow(0 22px 26px #16110c33);
}
.kc-wheelspin { width: 100%; height: 100%; transform: rotate(0deg); will-change: transform; }
.kc-wheelspin:empty { border-radius: 50%; background: var(--kc-soft); }
.kc-wheel { display: block; width: 100%; height: 100%; }
.kc-wheel__ring { fill: #16110c; }
.kc-bulb { fill: #ffe2c7; }
.kc-app.is-spinning .kc-bulb:nth-of-type(odd) { animation: kc-bulb .32s steps(1) infinite; }
.kc-app.is-spinning .kc-bulb:nth-of-type(even) { animation: kc-bulb .32s steps(1) infinite reverse; }
@keyframes kc-bulb { 0% { fill: #ffb070; } 50% { fill: #fff6ec; } }
.kc-slice { stroke: #ffffff8c; stroke-width: 1.2; transition: fill .4s var(--fed), opacity .4s var(--fed); }
.kc-slice.is-won { fill: #ddd8d2; }
.kc-wheel__edge { fill: none; stroke: #ffffff59; stroke-width: 2; }
.kc-label { font-family: var(--font-body); font-weight: 750; letter-spacing: -.01em; pointer-events: none; }

.kc-pointer {
  position: absolute;
  top: -14px;
  left: 50%;
  z-index: 3;
  width: 36px;
  height: 47px;
  transform: translateX(-50%);
  transform-origin: 50% 32%;
  filter: drop-shadow(0 4px 5px #16110c59);
}
.kc-pointer path { fill: #16110c; }
.kc-pointer circle { fill: var(--brand); }
.kc-pointer.is-tick { animation: kc-tick .14s ease-out; }
@keyframes kc-tick { 0% { transform: translateX(-50%) rotate(-16deg); } 100% { transform: translateX(-50%) rotate(0deg); } }

.kc-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #ffffff 0%, #f4f1ed 100%);
  box-shadow: 0 0 0 5px #16110c, 0 0 0 7px #ffffffb3, 0 10px 24px -6px #16110c80;
  color: #16110c;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .08em;
  cursor: pointer;
  transition: transform .14s var(--fed), color .18s var(--fed);
}
.kc-hub::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px solid #ff6b0080;
  opacity: 0;
  animation: kc-pulse 2.4s var(--fed) infinite;
  pointer-events: none;
}
.kc-app.is-busy .kc-hub::after { animation: none; }
@keyframes kc-pulse { 0% { transform: scale(.8); opacity: .9; } 70%, 100% { transform: scale(1.18); opacity: 0; } }
.kc-hub:hover:not(:disabled) { color: var(--brand-700); transform: translate(-50%, -50%) scale(1.05); }
.kc-hub:active:not(:disabled) { transform: translate(-50%, -50%) scale(.96); }
.kc-hub:focus-visible { outline: 3px solid var(--brand); outline-offset: 8px; }
.kc-hub:disabled { cursor: progress; }

/* Slot makinesi */
.kc-slot { width: min(360px, 100%); }
.kc-slot__window {
  position: relative;
  height: calc(var(--kc-row) * 5);
  overflow: hidden;
  border: 1px solid var(--kc-line-2);
  border-radius: 22px;
  background: #fff;
  box-shadow: inset 0 10px 18px -12px #16110c33, inset 0 -10px 18px -12px #16110c33, 0 20px 40px -26px #16110c66;
}
.kc-slot__window::before, .kc-slot__window::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  height: calc(var(--kc-row) * 1.6);
  pointer-events: none;
}
.kc-slot__window::before { top: 0; background: linear-gradient(#fff, #ffffff00); }
.kc-slot__window::after { bottom: 0; background: linear-gradient(#ffffff00, #fff); }
.kc-slot__track { will-change: transform; }
.kc-slot__item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--kc-row);
  padding: 0 18px;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.02em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.kc-slot__item.is-hit { color: var(--brand-700); }
.kc-slot__mark {
  position: absolute;
  top: 50%;
  left: 10px;
  right: 10px;
  z-index: 1;
  height: var(--kc-row);
  transform: translateY(-50%);
  border: 2px solid var(--brand);
  border-radius: 14px;
  background: #ff6b000d;
  box-shadow: 0 0 0 4px #ff6b001f;
  pointer-events: none;
}

/* Geri sayım */
.kc-count3 {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #ffffffb8;
  backdrop-filter: blur(3px);
}
.kc-count3 span {
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 128px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 10px 30px #ff6b0055;
}
.kc-count3.is-pop span { animation: kc-pop .7s var(--fed); }
@keyframes kc-pop { 0% { transform: scale(1.7); opacity: 0; } 35% { opacity: 1; } 100% { transform: scale(1); opacity: 1; } }

/* Kazanan açıklama kartı */
.kc-reveal {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  display: grid;
  justify-items: center;
  gap: 6px;
  width: max-content;
  min-width: min(260px, 86%);
  max-width: 92%;
  padding: 20px 26px 22px;
  overflow: hidden;
  transform: translate(-50%, -50%);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 34px 60px -22px #16110c80, 0 0 0 1px #16110c0f;
  text-align: center;
  cursor: pointer;
}
.kc-reveal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #ff6b00, #ffb000, #7c3aed);
}
.kc-reveal.is-in { animation: kc-reveal .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes kc-reveal { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.kc-reveal__lbl { color: var(--brand-700); font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.kc-reveal__name {
  max-width: 100%;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.kc-reveal.is-multi .kc-reveal__name { display: grid; gap: 6px; justify-items: start; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.3; letter-spacing: -.015em; text-align: left; }
.kc-reveal__row { display: flex; align-items: center; gap: 10px; }
.kc-reveal__row b {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8a33, #c44700);
  color: #fff;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
}
.kc-reveal__prize {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-700);
  font-size: 13px;
  font-weight: 700;
}

.kc-confetti { position: absolute; inset: 0; z-index: 7; width: 100%; height: 100%; pointer-events: none; }

.kc-stage__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; }
.kc-stage__note { flex: 1 1 160px; margin: 0; color: var(--ink-muted); font-size: 12px; line-height: 1.45; }
.kc-stage__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.kc-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--kc-line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s var(--fed), transform .12s var(--fed);
}
.kc-pill:hover { background: var(--kc-soft-2); }
.kc-pill:active { transform: scale(.97); }
.kc-pill:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.kc-pill--brand { border-color: transparent; background: var(--kc-cta); box-shadow: 0 10px 20px -10px #ff6b00b3; color: #fff; }
.kc-pill--brand:hover { background: var(--kc-cta); filter: saturate(1.1); }

/* ---------- sonuç ---------- */

.kc-result { display: flex; flex-direction: column; }
.kc-result__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.kc-result__title { margin: 0; color: var(--ink); font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.kc-result__meta { margin: 2px 0 0; color: var(--ink-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.kc-status {
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--kc-soft);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 750;
  white-space: nowrap;
}
.kc-status[data-state="busy"] { background: #fff4d6; color: #8a5a00; }
.kc-status[data-state="done"] { background: #e3f6ec; color: #17734b; }
.kc-status[data-state="stale"] { background: #eeebe7; color: #69645e; }
.kc-status[data-state="error"] { background: #fde8e5; color: #a73529; }

.kc-result__body { margin-top: 12px; }

.kc-sec { margin: 14px 0 8px; color: var(--ink-muted); font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.kc-sec:first-child { margin-top: 0; }

.kc-wlist {
  display: grid;
  gap: 7px;
  max-height: 318px;
  margin: 0;
  padding: 0 2px 0 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}
.kc-w {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  min-height: 52px;
  padding: 8px 12px 8px 9px;
  border: 1px solid #f0ece7;
  border-radius: 14px;
  background: var(--kc-soft-2);
  animation: kc-row-in .35s var(--fed) both;
}
.kc-wlist:not(.kc-wlist--yedek):not(.kc-wlist--ghost) .kc-w:first-child:not(.is-hidden) {
  border-color: #ffd9bd;
  background: linear-gradient(90deg, #fff1e4, #fff8f2);
}
@keyframes kc-row-in { from { opacity: 0; transform: translateY(6px); } }
.kc-w__rank {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8a33, #c44700);
  box-shadow: 0 6px 12px -6px #c44700;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.kc-w__body { display: grid; min-width: 0; }
.kc-w__name { color: var(--ink); font-size: 15.5px; font-weight: 800; line-height: 1.3; letter-spacing: -.015em; overflow-wrap: anywhere; }
.kc-w__prize { margin-top: 1px; color: var(--brand-700); font-size: 12px; font-weight: 700; line-height: 1.3; }
.kc-w__line { grid-column: 3; color: var(--ink-muted); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kc-w__line + .kc-w__line { grid-row: 2; }

.kc-w.is-hidden { animation: none; background: #fff; border-style: dashed; }
.kc-w.is-hidden .kc-w__rank { background: #ebe7e2; box-shadow: none; color: var(--ink-muted); }
.kc-w.is-hidden .kc-w__name::before {
  content: '';
  display: block;
  width: 62%;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #efebe6 0%, #f8f6f3 50%, #efebe6 100%);
  background-size: 200% 100%;
  animation: kc-shimmer 1.4s linear infinite;
}
@keyframes kc-shimmer { to { background-position: -200% 0; } }

.kc-wlist--yedek .kc-w { min-height: 44px; background: #fff; }
.kc-wlist--yedek .kc-w__rank { width: 26px; height: 26px; background: #ebe7e2; box-shadow: none; color: var(--ink-2); font-size: 12px; }
.kc-wlist--yedek .kc-w__name { font-size: 14px; font-weight: 700; }

.kc-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.kc-pillstat {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--kc-soft);
  color: var(--ink-2);
  font-size: 12px;
}
.kc-pillstat strong { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }

.kc-empty__title { margin: 0 0 10px; color: var(--ink-2); font-size: 13.5px; font-weight: 650; }
.kc-more-count { margin: 8px 0 0; color: var(--ink-muted); font-size: 12px; }
.kc-steps { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; counter-reset: kc-step; list-style: none; }
.kc-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-2);
  font-size: 12.5px;
  counter-increment: kc-step;
}
.kc-steps li::before {
  content: counter(kc-step);
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-700);
  font-size: 11.5px;
  font-weight: 800;
}

.kc-verify {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px dashed var(--kc-line-2);
  border-radius: 14px;
  background: var(--kc-soft-2);
}
.kc-verify__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.kc-verify__row > .icon { width: 22px; height: 22px; color: var(--brand-700); }
.kc-verify__lbl { display: block; color: var(--ink-2); font-size: 11.5px; font-weight: 700; }
.kc-verify__val.is-empty { color: var(--ink-muted); font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
.kc-verify__val { display: block; color: var(--ink); font-family: var(--font-mono); font-size: 13px; font-weight: 700; letter-spacing: .03em; overflow-wrap: anywhere; }
.kc-verify__note { margin: 6px 0 0; color: var(--ink-muted); font-size: 11.5px; line-height: 1.45; }

.kc-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.kc-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 40px;
  padding: 0 8px;
  border: 1px solid var(--kc-line-2);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.15;
  cursor: pointer;
  transition: background .18s var(--fed), border-color .18s var(--fed), transform .12s var(--fed);
}
.kc-act span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-act:hover:not(:disabled) { background: var(--kc-soft-2); border-color: #cfc8c0; }
.kc-act:active:not(:disabled) { transform: scale(.97); }
.kc-act:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.kc-act:disabled { cursor: not-allowed; opacity: .45; }
.kc-act--brand { border-color: transparent; background: var(--kc-cta); box-shadow: 0 10px 20px -12px #ff6b00cc; color: #fff; }
.kc-act--brand:hover:not(:disabled) { background: var(--kc-cta); filter: saturate(1.1); }

.kc-history { margin-top: 12px; border-top: 1px solid var(--kc-line); }
.kc-history > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  list-style: none;
  cursor: pointer;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.kc-history > summary::-webkit-details-marker { display: none; }
.kc-history > summary .icon { color: var(--ink-muted); }
.kc-history > summary .kc-caret { margin-left: auto; transition: transform .2s var(--fed); }
.kc-history[open] > summary .kc-caret { transform: rotate(180deg); }
.kc-history > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
.kc-history__list { display: grid; gap: 6px; max-height: 220px; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.kc-history__list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: var(--kc-soft-2); }
.kc-history__list time { color: var(--ink-muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.kc-history__body { display: grid; min-width: 0; }
.kc-history__body strong { overflow: hidden; color: var(--ink); font-size: 12.5px; white-space: nowrap; text-overflow: ellipsis; }
.kc-history__body span { overflow: hidden; color: var(--ink-2); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }

/* ---------- sunum modu (tam ekran) ---------- */

html.kc-present-lock { overflow: hidden; }
.kc-app.is-present {
  position: fixed;
  inset: 0;
  z-index: 200;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
  grid-template-areas: "stage result";
  gap: 20px;
  padding: 24px;
  overflow: auto;
  background: radial-gradient(90% 70% at 30% 0%, #fff2e4 0%, #ffffff00 60%), radial-gradient(70% 60% at 100% 100%, #f1ebff 0%, #ffffff00 60%), #fff;
}
.kc-app.is-present:fullscreen { width: 100vw; height: 100vh; }
.kc-app.is-present .kc-input { display: none; }
.kc-app.is-present .kc-stage { align-self: stretch; min-height: calc(100vh - 48px); padding: 20px; }
.kc-app.is-present .kc-stage__body { flex: 1 1 auto; min-height: 0; }
.kc-app.is-present .kc-wheelbox { width: min(calc(100vh - 300px), 100%); }
.kc-app.is-present .kc-slot { width: min(560px, 100%); --kc-row: 76px; }
.kc-app.is-present .kc-slot__item { font-size: 32px; }
.kc-app.is-present .kc-title { font-size: clamp(24px, 2.6vw, 38px); }
.kc-app.is-present .kc-hub { width: 110px; height: 110px; font-size: 17px; }
.kc-app.is-present .kc-reveal { padding: 28px 40px 30px; }
.kc-app.is-present .kc-reveal__lbl { font-size: 15px; }
.kc-app.is-present .kc-reveal__name { font-size: clamp(40px, 5vw, 76px); }
.kc-app.is-present .kc-reveal.is-multi .kc-reveal__name { font-size: clamp(22px, 2.4vw, 34px); gap: 10px; }
.kc-app.is-present .kc-reveal__row b { width: 34px; height: 34px; font-size: 16px; }
.kc-app.is-present .kc-reveal__prize { font-size: 17px; }
.kc-app.is-present .kc-result { align-self: stretch; max-height: calc(100vh - 48px); overflow: auto; }
.kc-app.is-present .kc-wlist { max-height: none; }
.kc-app.is-present .kc-w__name { font-size: 20px; }
.kc-app.is-present .kc-stage__note { font-size: 13px; }
@media (max-width: 899px) {
  .kc-app.is-present { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "result"; padding: 12px; }
  .kc-app.is-present .kc-stage { min-height: auto; }
  .kc-app.is-present .kc-wheelbox { width: min(86vw, 60vh); }
  .kc-app.is-present .kc-result { max-height: none; }
}

/* ---------- yazdırma: yalnız sonuç tutanağı ---------- */

.kc-printout { display: none; }
@media print {
  body.kc-printing { padding: 0 !important; background: #fff !important; }
  body.kc-printing > *:not(.kc-printout) { display: none !important; }
  body.kc-printing .kc-printout { display: block; color: #000; font-family: var(--font-body); }
  .kc-printout h1 { margin: 4px 0 6px; font-size: 26px; }
  .kc-printout h2 { margin: 22px 0 8px; font-size: 16px; }
  .kc-printout table { width: 100%; border-collapse: collapse; font-size: 13px; }
  .kc-printout td { padding: 7px 6px; border-bottom: 1px solid #ccc; vertical-align: top; }
  .kc-printout td:first-child { width: 70px; font-weight: 700; }
  .kc-printout__eyebrow { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
  .kc-printout__meta { margin: 2px 0; font-size: 12px; color: #333; }
  .kc-printout__fp { margin-top: 18px; font-family: var(--font-mono); font-size: 10.5px; word-break: break-all; }
  .kc-printout__sign { margin-top: 48px; font-size: 13px; }
}

/* ---------- dar ekranlar ---------- */

@media (min-width: 900px) and (max-width: 1179px) {
  .kc-names { height: 150px; }
}

@media (max-width: 899px) {
  .kc-pane { padding: 14px; border-radius: 18px; }
  .kc-stage__body { min-height: 300px; }
  .kc-wheelbox { width: min(320px, 100%); }
  .kc-wlist { max-height: none; }
}

@media (max-width: 420px) {
  .kc-names { height: 170px; }
  .kc-tools .kc-anim span { padding: 0 8px; }
  .kc-icon { width: 34px; height: 34px; }
  .kc-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kc-act--brand { grid-column: 1 / -1; }
  .kc-hub { width: 70px; height: 70px; font-size: 12px; }
  .kc-reveal { padding: 16px 18px 18px; }
}

/* Hareket azaltma: dönüş, nabız ve giriş animasyonları kapanır; sonuç beklemeden görünür. */
@media (prefers-reduced-motion: reduce) {
  .kc-hub::after, .kc-bulb, .kc-reveal.is-in, .kc-w, .kc-count3.is-pop span, .kc-pointer.is-tick, .kc-menu__panel { animation: none !important; }
  .kc-w.is-hidden .kc-w__name::before { animation: none; }
}
