.slot-standalone { margin: 0; background: #e9decf; }
#slot-preview { height: 100vh; height: 100dvh; }
.slot-handoff { position: absolute; inset: 0; }
.slot-root, .slot-root *, .slot-root *::before, .slot-root *::after { box-sizing: border-box; }
.slot-root [hidden] { display: none !important; }
.slot-root {
  --slot-script: "Kaiti SC", "STKaiti", "KaiTi", "Microsoft YaHei", serif;
  display: grid; grid-template-columns: minmax(0,1fr); width: 100%; height: 100%;
  min-height: 0; overflow: hidden; color: #433023; font: 16px/1.45 system-ui, sans-serif;
}
.slot-viewport {
  position: relative; min-width: 0; min-height: 0; overflow: hidden;
  background: radial-gradient(ellipse at center, #e6dbc9 5%, #f0e7db 100%);
}
.slot-stage {
  position: absolute; top: 50%; left: 50%; overflow: hidden; isolation: isolate;
  transform-origin: center; background-color: #eee2d2; background-position: center; background-size: cover;
  font-family: var(--slot-script); -webkit-user-select: none; user-select: none;
}
.slot-stage img { pointer-events: none; user-select: none; }
.slot-flags, .slot-title, .slot-hint, .slot-machine, .slot-hand,
.slot-coupon, .slot-stamp, .slot-next { position: absolute; }
.slot-flags { z-index: 13; filter: drop-shadow(1px 4px 2px #6652283b); }
.slot-title, .slot-hint { z-index: 10; margin: 0; white-space: pre-wrap; pointer-events: none; }
.slot-title { font: 700 51px/1.25 var(--slot-script); }
.slot-hint { font: 700 35px/1.35 var(--slot-script); color: #633c31; }
.slot-machine { z-index: 3; transform-origin: 0 0; filter: drop-shadow(10px 13px 14px #43271e4c); }
.slot-body, .slot-reel, .slot-rod, .slot-knob,
.slot-opening, .slot-lip, .slot-eject-image { position: absolute; display: block; }
.slot-body { inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: left top; }
.slot-reel {
  z-index: 1; overflow: hidden; background: #ecdeb5; border-radius: 10px;
  outline: 1px solid #38251b;
}
.slot-strip {
  position: absolute; top: 0; left: 0; width: 100%; will-change: transform;
  background: linear-gradient(90deg,#c1a775,#f4e5bf 17%,#f1e3bc 78%,#c5ae79);
}
.slot-cell {
  width: 100%; display: grid; place-items: center; line-height: 0;
}
.slot-symbol { display: block; aspect-ratio: 1; object-fit: contain; overflow: visible; }
.slot-reel-glaze {
  position: absolute; inset: 0; pointer-events:none;
  background: linear-gradient(0deg,#18110dec,#2b1c126b 11%,transparent 30% 69%,#2c1c1255 89%,#110b08e8),
    linear-gradient(90deg,#271b18a6,transparent 15% 87%,#251813a6);
}
.slot-reel[data-rolling] .slot-strip { filter: blur(.65px); }
.slot-reel[data-winning] { box-shadow: inset 0 0 21px #ffdeb669,0 0 9px #ffdc8d9a; }
.slot-reel[data-winning] .slot-reel-glaze { background-color: #ffc36328; }
.slot-rod { z-index: 2; transform-origin: 50% 100%; }
.slot-knob {
  z-index: 6; padding: 0; border: 0; background: transparent; appearance: none;
  cursor: grab; touch-action: none; border-radius: 50%;
}
.slot-knob img { display:block; width:100%; height:100%; object-fit:contain; }
.slot-knob[data-held] { cursor: grabbing; }
.slot-knob:disabled { cursor: default; }
.slot-knob:focus-visible { outline: 4px dashed #f7dfa8; outline-offset: 7px; }
.slot-opening { z-index: 4; overflow: hidden; pointer-events:none; }
.slot-lip { z-index: 5; }
.slot-eject-image { height:auto; filter: drop-shadow(1px 3px 3px #2c161b5e); }
.slot-hand {
  z-index: 12; width: 67px; height: auto; pointer-events: none;
  animation: slot-pull-guide 1.7s ease-in-out infinite;
  filter: drop-shadow(3px 6px 3px #55352e47);
}
@keyframes slot-pull-guide {
  0%,100% { transform: translateY(-3px) rotate(-11deg); }
  48% { transform: translateY(27px) rotate(-3deg); }
}
.slot-coupon { z-index: 6; height: auto; transform-origin: center; filter: drop-shadow(3px 7px 5px #4b352b56); }
.slot-stamp { z-index: 8; width: 252px; height:252px; transform-origin: center; pointer-events: none; }
.slot-stamp-ink {
  position: absolute; inset: 0; display: grid; align-content: center; justify-items: center;
  border: 8px double #a53e3e; border-radius: 50%; color: #a53e3e;
  text-align: center; white-space: pre-wrap; padding: 18px;
}
.slot-stamp-ink::before {
  content:"";position:absolute;inset:6px;border-radius:50%;border:1px solid #a53e3e69;
}
.slot-stamp-title, .slot-stamp-signer { margin: 0; }
.slot-stamp-title { font: 800 60px/1.06 "Microsoft YaHei", "PingFang SC", sans-serif; }
.slot-stamp-signer { font: 700 29px/1.27 var(--slot-script); letter-spacing:.04em; margin-top: 8px; }
.slot-next { z-index: 14; width: max-content; max-width: 520px; transform-origin: right center; }
.slot-next button {
  display:block; transform: rotate(-2.6deg); border:1px solid #a27b523d;
  border-radius:5px 3px 6px 4px; padding: 11px 19px; width: max-content; max-width: 520px;
  color:#593728;background:linear-gradient(164deg,#fff9e9,#f1e4cf);
  font:700 32px/1.25 var(--slot-script);white-space:pre-wrap; cursor:pointer;touch-action:manipulation;
  box-shadow: 2px 5px 8px #66443248; transition:transform .16s ease;
}
.slot-next button:hover:not(:disabled) { transform:rotate(-1deg) translateY(-3px); }
.slot-next button:active:not(:disabled) { transform:rotate(-1.5deg) translateY(1px) scale(.96); }
.slot-next button:disabled { cursor:default; }
.slot-next button:focus-visible { outline:3px dashed #a75e48; outline-offset:5px; }
.slot-machine[data-guides] .slot-reel { outline:3px dashed #ffe8a5; }
.slot-machine[data-guides] .slot-knob { outline:3px dashed #ffe8a5; }
.slot-machine[data-guides] .slot-opening { outline:3px dashed #ffe8a5; }
.slot-sr { position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap; }
.slot-root[data-debug] { grid-template-columns:minmax(0,1fr) minmax(300px,352px); }
.slot-debug {
  overflow:auto;min-width:0;min-height:0;padding:15px;background:#fbf4e8;
  border-left:1px solid #d7c4ae;font:14px/1.4 system-ui,sans-serif;
}
.slot-debug h2 { font-size:20px;margin:0 0 10px; }
.slot-debug details { border-top:1px solid #dfcfbd;padding:8px 0; }
.slot-debug details details { margin-top:5px; }
.slot-debug summary { cursor:pointer;font-weight:650; }
.slot-debug button,.slot-debug input:not([type="checkbox"]):not([type="file"]),.slot-debug textarea {
  color:inherit;background:#fffaf2;border:1px solid #c9b8a1;border-radius:4px;padding:4px 7px;font:inherit;
}
.slot-debug button { cursor:pointer;min-height:30px; }
.slot-debug button:hover { background:#f1e5d1; }
.slot-debug textarea,.slot-debug input[type="file"] { display:block;width:100%;margin-top:3px; }
.slot-debug textarea { resize:vertical; }
.slot-debug-row { display:flex;flex-wrap:wrap;align-items:center;gap:5px;margin:6px 0; }
.slot-debug-field { display:block;margin:7px 0; }
.slot-debug-number { display:grid;grid-template-columns:minmax(0,1fr) 88px;align-items:center;gap:7px;margin:5px 0; }
.slot-debug-note { margin:8px 0;color:#6b4d37;font-size:13px;overflow-wrap:anywhere; }
.slot-debug-note[data-error] { color:#9b322d; }
@media (max-width:680px) and (orientation:portrait) {
  .slot-root[data-debug] { grid-template-columns:1fr;grid-template-rows:minmax(175px,38%) minmax(0,1fr); }
  .slot-debug { border-left:none;border-top:1px solid #d7c4ae; }
}
@media (prefers-reduced-motion:reduce) {
  .slot-hand { animation:none; }
  .slot-next button { transition:none; }
}
