/* Zar At: atış ayarları, zar masası, olasılık ve geçmiş. Yalnız bu sayfada yüklenir. */

[data-tool="zar-at"] {
  --dz-line: #e6e9f0;
  --dz-line-2: #dde1ea;
  --dz-soft: #f3f5f9;
  --dz-soft-2: #f8f9fc;
  --dz-shadow: 0 1px 2px #1b234008, 0 22px 44px -32px #1b23404d;
  --dz-cta: linear-gradient(135deg, #ea5c00 0%, #d45000 50%, #b84200 100%);
}
[data-tool="zar-at"] [hidden] { display: none !important; }
.panel--tool:has(> [data-tool="zar-at"]) { padding: 0; border: 0; background: transparent; box-shadow: none; }
[data-tool="zar-at"] > .tool__actions--utility { display: none !important; }
[data-tool="zar-at"] .icon { width: 16px; height: 16px; flex: none; }
html.dz-lock { overflow: hidden; }

/* ---------- yerleşim ---------- */
.dz-app { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "input" "result"; gap: 16px; align-items: start; }
.dz-input { grid-area: input; }
.dz-stage { grid-area: stage; }
.dz-result { grid-area: result; }
@media (min-width: 900px) {
  .dz-app { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); grid-template-areas: "input stage" "result result"; }
}
@media (min-width: 1180px) {
  .dz-app { grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr) minmax(0, .95fr); grid-template-areas: "input stage result"; align-items: stretch; }
  .dz-input, .dz-stage, .dz-result { display: flex; flex-direction: column; }
}
/* Açılışta pencerenin kalan yüksekliğini doldurur; içerik uzarsa kartlar doğal olarak uzar. */
@media (min-width: 1180px) and (min-height: 600px) {
  .dz-app { min-height: clamp(500px, calc(100vh - var(--dz-top, 130px) - 18px), 760px); }
  @supports (height: 100dvh) { .dz-app { min-height: clamp(500px, calc(100dvh - var(--dz-top, 130px) - 18px), 760px); } }
}

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

/* ---------- ortak ---------- */
.dz-label { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px; padding: 0; color: var(--heading); font-size: 13px; font-weight: 700; }
.dz-label--sm { margin-bottom: 5px; color: var(--ink-2); font-size: 12px; font-weight: 650; }
.dz-opt { color: var(--ink-muted); font-size: 11.5px; font-weight: 500; }
.dz-hint { display: flex; align-items: flex-start; gap: 7px; margin: 0; color: var(--ink-muted); font-size: 11.5px; line-height: 1.5; }
.dz-hint .icon { width: 14px; height: 14px; margin-top: 1px; color: var(--brand-700); }
.dz-input .field { margin: 0; }
.dz-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-700); font-size: 12px; font-weight: 800; white-space: nowrap; }
.dz-mono { font-family: var(--font-mono); letter-spacing: .02em; }

.dz-mini { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: #edf0f5; }
.dz-mini label { position: relative; margin: 0; }
.dz-mini input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.dz-mini span { display: inline-flex; align-items: center; min-height: 32px; padding: 0 11px; border-radius: 8px; color: var(--ink-2); font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.dz-mini input:checked + span { background: #fff; color: var(--heading); box-shadow: 0 1px 2px #1b23401f; }
.dz-mini input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }

/* ---------- ayarlar ---------- */
.dz-input { gap: 14px; }
.dz-input:not(:has(> .dz-seg)) { display: grid; }
@media (max-width: 1179px) { .dz-input { display: grid; } }

.dz-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 4px; border: 0; border-radius: 14px; background: #edf0f5; }
.dz-seg__item { position: relative; margin: 0; }
.dz-seg__item input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.dz-seg__item span { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 8px; border-radius: 11px; color: var(--ink-2); font-size: 13.5px; font-weight: 700; transition: background .18s var(--fed), color .18s var(--fed), box-shadow .18s var(--fed); }
.dz-seg__item .icon { width: 17px; height: 17px; }
.dz-seg__item:hover span { color: var(--heading); }
.dz-seg__item input:checked + span { background: #fff; color: var(--brand-700); box-shadow: 0 1px 2px #1b23401f, 0 6px 14px -8px #1b234040; }
.dz-seg__item input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }

.dz-block { display: grid; gap: 14px; }
.dz-types { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: -6px; }
.dz-type { position: relative; margin: 0; }
.dz-type--4 { --c: #16a34a; } .dz-type--6 { --c: #ff6b00; } .dz-type--8 { --c: #2563eb; } .dz-type--10 { --c: #7c3aed; }
.dz-type--12 { --c: #0891b2; } .dz-type--20 { --c: #e11d48; } .dz-type--100 { --c: #475569; }
.dz-type input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.dz-type span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 6px; border: 1px solid var(--dz-line-2); border-radius: 12px; background: var(--dz-soft-2); color: var(--heading); font-size: 13.5px; font-weight: 750; font-variant-numeric: tabular-nums; transition: border-color .18s var(--fed), background .18s var(--fed), box-shadow .18s var(--fed); }
.dz-type span i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); transform: rotate(45deg); }
.dz-type:hover span { border-color: #c9cfdb; background: #fff; }
.dz-type input:checked + span { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, #fff); color: color-mix(in srgb, var(--c) 78%, #111827); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 16%, transparent); }
.dz-type input:focus-visible + span { outline: 2px solid var(--heading); outline-offset: 2px; }

.dz-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dz-stepper { display: flex; height: 46px; overflow: hidden; border: 1px solid var(--dz-line-2); border-radius: 14px; background: var(--dz-soft-2); }
.dz-stepper:focus-within { border-color: #ff6b0080; box-shadow: 0 0 0 4px #ff6b001a; background: #fff; }
.dz-stepper button { flex: none; width: 40px; border: 0; background: transparent; color: var(--ink-2); font-size: 20px; font-weight: 600; cursor: pointer; }
.dz-stepper button:hover { background: #edf0f5; color: var(--ink); }
.tool__form .dz-stepper .input { height: 100%; min-height: 0; min-width: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 17px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.dz-input .input:not(.dz-stepper .input) { height: 46px; min-height: 46px; border-radius: 14px; }

.dz-info { padding: 12px 14px; border-radius: 14px; background: #eefaf2; }
.dz-info strong { color: #166534; font-size: 13.5px; }
.dz-info p { margin: 3px 0 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.55; }
.dz-names { display: grid; gap: 8px; }
.dz-names > .dz-label { margin: 0; }
.dz-names ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.dz-names__nums { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dz-names__nums li { display: grid; justify-items: center; gap: 1px; padding: 6px 2px; border-radius: 10px; background: var(--dz-soft-2); box-shadow: inset 0 0 0 1px var(--dz-line); color: var(--ink-2); font-size: 11.5px; font-weight: 600; }
.dz-names__nums b { color: var(--heading); font-size: 15px; font-weight: 800; }
.dz-names__pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dz-names__pairs li { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 4px 10px; border-radius: 10px; background: #eefaf2; color: #14532d; font-size: 12.5px; font-weight: 700; }
.dz-names__pairs b { min-width: 28px; color: #15803d; font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dz-opt-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.dz-opt-row > .dz-label { margin: 0; }

.dz-switch { display: inline-flex; align-items: center; gap: 10px; min-height: 32px; color: var(--heading); font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; }
.dz-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dz-switch__ui { position: relative; flex: none; width: 36px; height: 21px; border-radius: 999px; background: #cfd5df; transition: background .2s var(--fed); }
.dz-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 #1b234040; transition: transform .22s var(--fed); }
.dz-switch input:checked + .dz-switch__ui { background: var(--brand); }
.dz-switch input:checked + .dz-switch__ui::after { transform: translateX(15px); }
.dz-switch input:focus-visible + .dz-switch__ui { outline: 2px solid var(--brand); outline-offset: 2px; }

.dz-prefs { display: flex; flex-wrap: wrap; gap: 4px 18px; padding-top: 12px; border-top: 1px solid var(--dz-line); }
@media (min-width: 1180px) { .dz-input > .dz-prefs { margin-top: auto; } }
.dz-privacy { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ink-muted); font-size: 11.5px; }
.dz-privacy .icon { width: 14px; height: 14px; color: var(--ok); }

/* ---------- masa ---------- */
.dz-stage { display: flex; flex-direction: column; gap: 12px; }
.dz-stage__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dz-stage__title { margin: 0; color: var(--heading); font-family: var(--font-display); font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.dz-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--dz-line-2); border-radius: 11px; background: #fff; color: var(--heading); cursor: pointer; }
.dz-icon:hover { border-color: #c9cfdb; color: var(--brand-700); }
.dz-icon .icon { width: 18px; height: 18px; }
.dz-icon .dz-min, .dz-icon[aria-pressed="true"] .dz-max { display: none; }
.dz-icon[aria-pressed="true"] .dz-min { display: inline-flex; }
.dz-icon:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.dz-table {
  position: relative; display: grid; flex: 1 1 auto; place-items: center; min-height: 270px; padding: 34px 18px 28px; overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(60% 55% at 50% 45%, #ffffff 0%, #ffffff00 100%),
    radial-gradient(#1b234012 1px, transparent 1.2px) 0 0 / 14px 14px,
    linear-gradient(160deg, #f4f7ff 0%, #eaf0fc 100%);
  box-shadow: inset 0 0 0 1px #dfe6f5, inset 0 10px 30px -18px #1b234033;
  transition: background .3s var(--fed);
}
.dz-app[data-dz-mode="tavla"] .dz-table {
  background:
    radial-gradient(60% 55% at 50% 45%, #ffffff 0%, #ffffff00 100%),
    radial-gradient(#14532d14 1px, transparent 1.2px) 0 0 / 14px 14px,
    linear-gradient(160deg, #f0fbf4 0%, #dff5e8 100%);
  box-shadow: inset 0 0 0 1px #cdebd9, inset 0 10px 30px -18px #14532d33;
}
.dz-app[data-dz-mode="d20"] .dz-table {
  background:
    radial-gradient(60% 55% at 50% 45%, #ffffff 0%, #ffffff00 100%),
    radial-gradient(#4c1d9514 1px, transparent 1.2px) 0 0 / 14px 14px,
    linear-gradient(160deg, #fbf5ff 0%, #f1e8ff 100%);
  box-shadow: inset 0 0 0 1px #e6d9fb, inset 0 10px 30px -18px #4c1d9533;
}

.dz-dice { --size: 80px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: calc(var(--size) * .42) calc(var(--size) * .36); max-width: 100%; }
.dz-die { position: relative; flex: none; width: var(--size); height: var(--size); border-radius: 18%; -webkit-tap-highlight-color: transparent; }
.dz-app[data-dz-mode="serbest"] .dz-die { cursor: pointer; }
.dz-die:focus-visible { outline: 3px solid var(--heading); outline-offset: 6px; }
.dz-die::before {
  content: ''; position: absolute; left: 6%; right: 6%; bottom: -16%; height: 18%; border-radius: 50%;
  background: radial-gradient(closest-side, #1b23403d, #1b234000); pointer-events: none;
}
.dz-die.is-toss { animation: dz-toss .78s cubic-bezier(.25, .8, .3, 1) both; }
@keyframes dz-toss {
  0% { opacity: 0; transform: translate(var(--dx), -70px) rotate(var(--rz)) scale(.8); }
  45% { opacity: 1; transform: translate(calc(var(--dx) * .2), 8px) rotate(calc(var(--rz) * -.3)) scale(1.02); }
  70% { transform: translate(0, -5px) rotate(0deg); }
  100% { transform: none; }
}

/* 3B altı yüzlü zar */
.dz-die--6 { --face: radial-gradient(circle at 28% 22%, #ffb37a 0%, #ff7a1a 42%, #f26300 100%); --pip: #fff; --core: #c24d00; --edge: #b84200; perspective: calc(var(--size) * 6); }
.dz-die--tavla { --face: radial-gradient(circle at 28% 22%, #ffffff 0%, #f8fafc 50%, #e8edf4 100%); --pip: #1b2340; --core: #c3cad6; --edge: #9aa4b5; }
.dz-cube { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(-18deg) rotateY(-22deg); }
.dz-face, .dz-core { position: absolute; inset: 0; }
.dz-face {
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 13%;
  border-radius: 17%; background: var(--face);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--edge) 35%, transparent), inset 0 -6px 10px -6px color-mix(in srgb, var(--edge) 60%, transparent);
  backface-visibility: hidden;
}
.dz-core { inset: 3%; background: var(--core); border-radius: 8%; transform: rotateX(90deg); }
.dz-cube::before, .dz-cube::after { content: ''; position: absolute; inset: 3%; border-radius: 8%; background: var(--core); }
.dz-cube::after { transform: rotateY(90deg); }
.dz-face--on { transform: translateZ(calc(var(--size) / 2)); }
.dz-face--arka { transform: rotateY(180deg) translateZ(calc(var(--size) / 2)); }
.dz-face--sag { transform: rotateY(90deg) translateZ(calc(var(--size) / 2)); }
.dz-face--sol { transform: rotateY(-90deg) translateZ(calc(var(--size) / 2)); }
.dz-face--ust { transform: rotateX(90deg) translateZ(calc(var(--size) / 2)); }
.dz-face--alt { transform: rotateX(-90deg) translateZ(calc(var(--size) / 2)); }
.dz-face i { place-self: center; width: 72%; height: 72%; border-radius: 50%; }
.dz-face i.on { background: var(--pip); box-shadow: inset 0 2px 2px #0000002e, 0 1px 0 #ffffff59; }
.dz-die--tavla .dz-face i.on { box-shadow: inset 0 2px 3px #000000b3; }

/* Çok yüzlü zarlar: şekil ve rakam */
.dz-die--poly { --c: #c44700; filter: drop-shadow(0 6px 8px #1b234033); }
.dz-die--poly::before { bottom: -18%; }
.dz-shape {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 22%, color-mix(in srgb, var(--c) 45%, #fff) 0%, var(--c) 52%, color-mix(in srgb, var(--c) 78%, #000) 100%);
}
.dz-shape::before { content: ''; position: absolute; inset: 0; background: #ffffff26; }
.dz-num { position: relative; color: #fff; font-family: var(--font-display); font-size: calc(var(--size) * .36); font-weight: 800; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px #0000004d; }
.dz-tag { position: absolute; left: 50%; bottom: calc(var(--size) * -.36); transform: translateX(-50%); color: var(--ink-muted); font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.dz-die--s4 .dz-shape { clip-path: polygon(50% 3%, 98% 92%, 2% 92%); }
.dz-die--s4 .dz-shape::before { clip-path: polygon(50% 3%, 50% 92%, 2% 92%); }
.dz-die--s4 .dz-num { margin-top: 30%; font-size: calc(var(--size) * .3); }
.dz-die--s8 .dz-shape { clip-path: polygon(50% 2%, 98% 50%, 50% 98%, 2% 50%); }
.dz-die--s8 .dz-shape::before { clip-path: polygon(50% 2%, 98% 50%, 2% 50%); }
.dz-die--s10 .dz-shape { clip-path: polygon(50% 2%, 98% 42%, 50% 98%, 2% 42%); }
.dz-die--s10 .dz-shape::before { clip-path: polygon(50% 2%, 98% 42%, 50% 62%, 2% 42%); }
.dz-die--s12 .dz-shape { clip-path: polygon(50% 3%, 97% 37%, 79% 95%, 21% 95%, 3% 37%); }
.dz-die--s12 .dz-shape::before { clip-path: polygon(50% 22%, 77% 42%, 67% 76%, 33% 76%, 23% 42%); }
.dz-die--s20 .dz-shape { clip-path: polygon(50% 2%, 95% 26%, 95% 74%, 50% 98%, 5% 74%, 5% 26%); }
.dz-die--s20 .dz-shape::before { clip-path: polygon(50% 16%, 86% 72%, 14% 72%); }
.dz-die--s100 .dz-shape, .dz-die--sx .dz-shape { border-radius: 50%; }
.dz-die--s100 .dz-shape::before, .dz-die--sx .dz-shape::before { clip-path: circle(34% at 50% 50%); }
.dz-die--s100 .dz-num, .dz-die--sx .dz-num { font-size: calc(var(--size) * .3); }
.dz-die.is-rolling .dz-shape { animation: dz-wobble .32s ease-in-out infinite; }
@keyframes dz-wobble { 0%, 100% { transform: rotate(0) scale(1); } 30% { transform: rotate(-24deg) scale(.9); } 65% { transform: rotate(18deg) scale(1.04); } }

/* Kilit, avantaj seçimi */
.dz-die.is-locked::after {
  content: ''; position: absolute; top: -9px; right: -9px; z-index: 2; width: 24px; height: 24px; border-radius: 50%;
  background: var(--heading) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / 13px no-repeat;
  box-shadow: 0 0 0 2px #fff, 0 4px 10px -2px #1b234066;
}
.dz-die.is-locked { outline: 2px dashed #1b2340a6; outline-offset: 8px; }
.dz-die.is-dim { opacity: .38; transform: scale(.86); filter: grayscale(.5); transition: opacity .3s var(--fed), transform .3s var(--fed); }
.dz-die.is-chosen { transform: scale(1.06); }
.dz-die--poly.is-chosen { filter: drop-shadow(0 0 10px color-mix(in srgb, var(--c) 60%, transparent)) drop-shadow(0 6px 8px #1b234033); }

.dz-call {
  position: absolute; top: 12px; left: 50%; z-index: 3; max-width: calc(100% - 24px); padding: 6px 14px; transform: translateX(-50%);
  border-radius: 999px; background: var(--heading); color: #fff; font-size: 13.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 10px 24px -12px #1b2340b3;
}
.dz-app[data-dz-mode="tavla"] .dz-call { background: #15803d; box-shadow: 0 10px 24px -12px #15803db3; }
.dz-app[data-dz-mode="d20"] .dz-call { background: #6d28d9; box-shadow: 0 10px 24px -12px #6d28d9b3; }
.dz-call.is-pop { animation: dz-pop .42s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes dz-pop { from { opacity: 0; transform: translate(-50%, -8px) scale(.85); } }

.dz-total { display: grid; justify-items: center; gap: 2px; text-align: center; }
.dz-total__k { color: var(--ink-muted); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.dz-total__v { color: var(--heading); font-family: var(--font-display); font-size: clamp(38px, 4vw, 48px); font-weight: 800; line-height: 1.02; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.dz-total__d { max-width: 100%; color: var(--ink-2); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dz-app.is-busy .dz-total__v { opacity: .35; }

.dz-cta {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 58px; padding: 0 22px;
  border: 0; border-radius: 999px; background: var(--dz-cta); box-shadow: 0 16px 30px -14px #e25a00c7, inset 0 1px 0 #ffffff40;
  color: #fff; font: inherit; font-size: 17px; font-weight: 800; cursor: pointer;
  transition: transform .18s var(--fed), box-shadow .18s var(--fed), filter .18s var(--fed), opacity .18s var(--fed);
}
.dz-cta .icon { width: 22px; height: 22px; }
.dz-cta:hover:not(:disabled) { transform: translateY(-1px); filter: saturate(1.1); }
.dz-cta:active:not(:disabled) { transform: translateY(1px); }
.dz-cta:focus-visible { outline: 3px solid var(--heading); outline-offset: 3px; }
.dz-cta:disabled { cursor: not-allowed; opacity: .6; }
.dz-app.is-busy .dz-cta:disabled { cursor: progress; opacity: .85; }
.dz-kbd { padding: 2px 7px; border-radius: 6px; background: #ffffff2e; box-shadow: inset 0 0 0 1px #ffffff4d; color: #fff; font-family: var(--font-body); font-size: 11px; font-weight: 700; }
@media (pointer: coarse) { .dz-kbd { display: none; } }

/* Masa modu (tam ekran) */
.dz-stage.is-full { position: fixed; inset: 0; z-index: 90; max-width: none; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); border: 0; border-radius: 0; }
.dz-stage.is-full .dz-dice { transform: scale(1.45); }
.dz-stage.is-full .dz-total__v { font-size: clamp(48px, 7vw, 76px); }
.dz-stage.is-full .dz-cta { max-width: 520px; margin: 0 auto; }

/* ---------- sonuç ---------- */
.dz-result { display: flex; flex-direction: column; gap: 14px; }
.dz-result__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dz-result__title { margin: 0; color: var(--heading); font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.dz-sec { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0 0 8px; color: var(--heading); font-size: 13px; font-weight: 750; }

.dz-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dz-stat { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--dz-soft-2); box-shadow: inset 0 0 0 1px var(--dz-line); }
.dz-stat:first-child { background: #fff4ea; box-shadow: inset 0 0 0 1px #ffdcc2; }
.dz-stat span { color: var(--ink-muted); font-size: 11.5px; font-weight: 650; line-height: 1.3; }
.dz-stat strong { color: var(--heading); font-size: 19px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dz-stat:first-child strong { color: var(--brand-700); }

.dz-chart__plot svg { display: block; width: 100%; height: auto; }
.dz-chart__plot rect { fill: #ffd6b8; transition: fill .2s var(--fed); }
.dz-chart__plot rect.is-now { fill: var(--brand); }
.dz-chart__plot .dz-dot circle { fill: var(--heading); stroke: #fff; stroke-width: 1.5; }
.dz-chart__plot .dz-dot line { stroke: var(--heading); stroke-width: 1.5; stroke-opacity: .45; }
.dz-chart__plot text { fill: #7a8396; font-family: var(--font-body); font-size: 9.5px; font-weight: 600; }
.dz-chart__none { margin: 0; padding: 18px 12px; border-radius: 12px; background: var(--dz-soft-2); color: var(--ink-muted); font-size: 12.5px; text-align: center; }

/* Son atışlar kendi alanında kayar; liste uzadıkça kart ve sayfa büyümez. */
.dz-hist { display: flex; flex-direction: column; min-height: 0; }
.dz-hist__list {
  display: grid; align-content: start; gap: 4px; max-height: 292px; margin: 0; padding: 0 4px 0 0; overflow-y: auto; overscroll-behavior: contain; list-style: none;
  scrollbar-width: thin; scrollbar-color: #cfd5df transparent;
}
.dz-hist__list.is-more { -webkit-mask-image: linear-gradient(#000 calc(100% - 26px), #0000); mask-image: linear-gradient(#000 calc(100% - 26px), #0000); }
.dz-hist__list::-webkit-scrollbar { width: 6px; }
.dz-hist__list::-webkit-scrollbar-thumb { border-radius: 6px; background: #cfd5df; }
@media (min-width: 1180px) {
  .dz-result > .dz-hist { flex: 1 1 0; min-height: 120px; }
  .dz-hist__list { flex: 1 1 0; min-height: 0; max-height: none; }
}
.dz-hist__list li { display: grid; grid-template-columns: auto minmax(0, auto) minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 32px; padding: 4px 10px; border-radius: 10px; background: var(--dz-soft-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.dz-hist__list li.is-new { background: #fff4ea; box-shadow: inset 0 0 0 1px #ffdcc2; animation: dz-row .3s var(--fed) both; }
@keyframes dz-row { from { opacity: 0; transform: translateY(-4px); } }
.dz-hist__list time { color: var(--ink-muted); font-size: 11px; font-weight: 600; }
.dz-hist__ad { color: var(--heading); font-weight: 750; white-space: nowrap; }
.dz-hist__z { overflow: hidden; color: var(--ink-2); white-space: nowrap; text-overflow: ellipsis; }
.dz-hist__list b { color: var(--heading); font-size: 14px; font-weight: 800; }
.dz-hist__empty { margin: 0; padding: 14px 12px; border-radius: 12px; background: var(--dz-soft-2); color: var(--ink-muted); font-size: 12.5px; text-align: center; }

.dz-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 1180px) { .dz-result > .dz-actions { margin-top: auto; } }
.dz-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(--dz-line-2); border-radius: 12px; background: #fff; color: var(--heading); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.dz-act span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dz-act:hover:not(:disabled) { background: var(--dz-soft-2); border-color: #c9cfdb; }
.dz-act:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.dz-act:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- dar ekranlar ---------- */
@media (max-width: 899px) {
  .dz-pane { padding: 14px; border-radius: 18px; }
  .dz-table { min-height: 230px; }
}
@media (max-width: 420px) {
  .dz-types { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .dz-type span { min-height: 38px; font-size: 12.5px; gap: 4px; }
  .dz-type span i { width: 8px; height: 8px; }
  .dz-seg__item span { font-size: 13px; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .dz-die.is-toss, .dz-die.is-rolling .dz-shape, .dz-call.is-pop, .dz-hist__list li.is-new { animation: none !important; }
}
