:root {
  --ink: #14212b;
  --muted: #6d7881;
  --line: #dce3e7;
  --soft: #f4f7f7;
  --paper: #fff;
  --accent: #e45f43;
  --accent-dark: #bb4832;
  --teal: #2e7c78;
  --shadow: 0 18px 45px rgba(20, 33, 43, .08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #eef2f1;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
a { color: inherit; text-decoration: none; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 50; padding: 10px 14px; color: #fff; background: #203c42; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.button { border: 1px solid transparent; border-radius: 7px; min-height: 40px; padding: 0 16px; font-weight: 700; transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease; touch-action: manipulation; }
.button:active, .draw-button:active { transform: translateY(1px); }
.button:focus-visible, .draw-button:focus-visible, .tab:focus-visible, .icon-button:focus-visible, .text-action:focus-visible { outline: 3px solid #287b77; outline-offset: 2px; }
.button-primary { color: #fff; background: var(--accent-dark); border-color: var(--accent-dark); }
.button-primary:hover { background: #a83f2b; border-color: #a83f2b; }
.button-secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.button-secondary:hover, .button-quiet:hover { border-color: #a8b4ba; background: #f7f9f9; }
.button-quiet { background: transparent; border-color: transparent; color: var(--muted); }
.button-small { min-height: 32px; padding: 0 10px; font-size: 13px; }
.button-wide { width: 100%; }
.admin-body { min-height: 100vh; background: #eef2f1; }
.admin-shell { max-width: 1280px; margin: 0 auto; padding: 0 28px 60px; }
.topbar { height: 76px; display: flex; justify-content: space-between; align-items: center; }
.brand { display: inline-flex; gap: 10px; align-items: center; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: .02em; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: var(--accent); border-radius: 10px 10px 10px 3px; font-size: 19px; font-weight: 800; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.quiet { color: var(--muted); font-size: 13px; }
.login-view { min-height: calc(100vh - 76px); display: grid; place-items: start center; padding-top: 100px; }
.login-form { width: min(100%, 390px); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 34px; box-shadow: var(--shadow); }
.login-form h1, .section-heading h1 { margin: 5px 0 24px; font-size: 27px; letter-spacing: -.02em; }
.eyebrow { color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin: 0; }
label { display: grid; gap: 7px; color: #43525b; font-size: 13px; font-weight: 650; margin: 16px 0; }
input, textarea, select { width: 100%; border: 1px solid #cfd9dd; border-radius: 6px; color: var(--ink); background: #fff; padding: 10px 11px; outline: 0; }
input:focus, textarea:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(46,124,120,.13); }
.form-error { min-height: 19px; color: #c64331; font-size: 13px; margin: 8px 0; }
.summary-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.summary-strip div { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 15px 18px; }
.summary-strip span, .summary-strip strong { display: block; }
.summary-strip span { color: var(--muted); font-size: 12px; }
.summary-strip strong { font-size: 25px; margin-top: 5px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tab { border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); padding: 12px 18px; font-weight: 700; }
.tab.active { color: var(--ink); border-bottom-color: var(--accent); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 26px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-heading h1 { margin-bottom: 0; }
.wheel-list { display: grid; gap: 14px; }
.wheel-row { display: flex; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.wheel-row-main { min-width: 0; flex: 1; }
.wheel-title-line { display: flex; gap: 10px; align-items: center; }
.wheel-title-line h2 { margin: 0; font-size: 18px; }
.wheel-title-line h2 { min-width: 0; overflow-wrap: anywhere; }
.wheel-row p { color: var(--muted); margin: 7px 0 12px; font-size: 13px; }
.wheel-meta { display: flex; gap: 18px; color: var(--muted); font-size: 12px; }
.status-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 20px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.tag-green { color: #25705d; background: #e1f3ed; }
.tag-blue { color: #42658a; background: #e5edf7; }
.tag-orange { color: #9a641b; background: #fff0d5; }
.tag-gray { color: #68747b; background: #edf0f1; }
.wheel-prize-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 22px; max-width: 650px; margin-top: 16px; }
.prize-line { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.prize-line strong { margin-left: auto; font-size: 12px; }
.color-swatch { width: 12px; height: 12px; border-radius: 50%; background: var(--swatch); flex: none; }
.row-actions { display: flex; gap: 6px; align-items: flex-start; }
.empty-state, .error-state { display: grid; gap: 8px; place-items: center; color: var(--muted); text-align: center; padding: 70px 20px; }
.empty-state strong, .error-state strong { color: var(--ink); font-size: 17px; }
.batch-form { display: flex; gap: 12px; align-items: end; padding: 15px; background: var(--soft); border-radius: 8px; }
.batch-form label { flex: 0 0 210px; margin: 0; }
.batch-form label.grow { flex: 1; }
.batch-form .button { flex: none; }
.batch-result { margin: 18px 0; border: 1px solid #c7dfd8; background: #f0faf6; border-radius: 8px; padding: 14px; }
.result-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.result-heading strong, .result-heading span { display: block; }
.result-heading strong { color: #246f5e; }
.result-heading .quiet { margin-top: 3px; }
.batch-result textarea { min-height: 170px; margin-top: 12px; resize: vertical; background: #fff; }
.filters { display: flex; gap: 8px; align-items: center; margin: 18px 0 12px; }
.filters select { width: auto; min-width: 115px; }
.filters input { max-width: 280px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 790px; }
th, td { padding: 13px 10px; border-bottom: 1px solid #e8edef; text-align: left; vertical-align: middle; }
th { color: var(--muted); background: #f7f9f9; font-size: 12px; font-weight: 750; }
td small, td strong, .token-cell { display: block; }
td small { color: var(--muted); margin-top: 4px; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.token-cell { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.text-action { border: 0; padding: 0; margin: 6px 12px 0 0; color: var(--teal); background: transparent; font-size: 12px; }
.text-action.danger { color: #c34b3a; }
.table-empty { padding: 42px; color: var(--muted); text-align: center; }
.pagination { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; padding-top: 15px; }
.pagination div { display: flex; gap: 10px; align-items: center; }
.wheel-dialog { width: min(720px, calc(100% - 30px)); border: 0; border-radius: 12px; padding: 0; box-shadow: 0 24px 80px rgba(20,33,43,.24); }
.wheel-dialog::backdrop { background: rgba(20,33,43,.42); }
.wheel-dialog form { padding: 26px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; margin-bottom: 12px; }
.dialog-heading h2 { margin: 4px 0 0; font-size: 21px; }
.icon-button { width: 32px; height: 32px; border: 0; border-radius: 50%; color: var(--muted); background: transparent; font-size: 25px; line-height: 1; }
.icon-button:hover { background: #eff3f3; }
.prize-editor-heading { display: flex; justify-content: space-between; align-items: center; margin: 22px 0 9px; }
.probability-valid { color: #25705d; font-size: 13px; font-weight: 750; }
.probability-invalid { color: #c34b3a; font-size: 13px; font-weight: 750; }
.prize-editor { display: grid; gap: 8px; }
.prize-editor-row { position: relative; padding: 12px 40px 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: #fafcfc; }
.prize-inputs { display: grid; grid-template-columns: 1.2fr 1.5fr 110px 42px; gap: 8px; }
.prize-inputs input { min-width: 0; }
.probability-input { position: relative; display: block; margin: 0; }
.probability-input input { padding-right: 24px; }
.probability-input span { position: absolute; right: 9px; top: 11px; color: var(--muted); font-size: 12px; }
.color-input { display: block; margin: 0; }
.color-input input { height: 39px; padding: 4px; }
.check-line { display: flex; grid-template-columns: none; gap: 6px; align-items: center; margin: 8px 0 0; font-size: 12px; }
.check-line input { width: auto; }
.remove-prize { position: absolute; right: 6px; top: 9px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 20; padding: 11px 16px; border-radius: 7px; color: #fff; background: #1e3038; box-shadow: var(--shadow); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: transform .2s ease, opacity .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.buyer-body { min-height: 100vh; color: #192b32; background: #f3f1ec; }
.buyer-shell { width: min(1080px, calc(100% - 34px)); margin: 0 auto; padding: 25px 0 38px; }
.buyer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 55px; }
.secure-label { color: var(--muted); font-size: 12px; }
.buyer-content { min-height: 500px; }
.hero-copy { max-width: 650px; }
.hero-copy h1 { margin: 9px 0 10px; color: #203c42; font-size: clamp(32px, 5vw, 58px); line-height: 1.08; letter-spacing: -.04em; }
.hero-description { max-width: 550px; color: #687672; line-height: 1.75; margin: 0; }
.draw-layout { display: grid; grid-template-columns: minmax(360px, 1fr) minmax(310px, .8fr); gap: 62px; align-items: center; margin-top: 40px; }
.wheel-stage { display: grid; justify-items: center; position: relative; }
.wheel-visual { position: relative; width: min(390px, 82vw); aspect-ratio: 1; border: 11px solid #fff; border-radius: 50%; box-shadow: 0 16px 30px rgba(48,67,63,.16); transform: rotate(0deg); transition: transform 1.4s cubic-bezier(.16,.8,.18,1); }
.wheel-visual.spinning { transform: rotate(1500deg); }
.wheel-center { position: absolute; inset: 50% auto auto 50%; z-index: 2; display: grid; place-items: center; width: 74px; height: 74px; transform: translate(-50%, -50%); border: 7px solid #fff; border-radius: 50%; color: #fff; background: var(--accent); font-size: 18px; font-weight: 800; line-height: 1.05; text-align: center; box-shadow: 0 6px 15px rgba(20,33,43,.15); }
.wheel-pointer { position: absolute; top: -7px; z-index: 3; width: 0; height: 0; border-left: 15px solid transparent; border-right: 15px solid transparent; border-top: 28px solid #203c42; filter: drop-shadow(0 4px 3px rgba(20,33,43,.18)); }
.draw-button { margin-top: 28px; min-width: 180px; min-height: 52px; border: 0; border-radius: 8px; color: #fff; background: var(--accent-dark); font-weight: 800; box-shadow: 0 8px 18px rgba(228,95,67,.25); }
.draw-button:hover { background: #a83f2b; }
.draw-hint { max-width: 300px; color: #82908b; font-size: 12px; line-height: 1.6; text-align: center; }
.probability-panel { border-top: 2px solid #203c42; }
.panel-label { padding: 13px 0 11px; font-size: 13px; font-weight: 800; }
.prize-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid #d8ded8; }
.prize-list li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid #d8ded8; }
.prize-list li span:nth-child(2) { min-width: 0; }
.prize-list li strong, .prize-list li small { display: block; }
.prize-list li strong { font-size: 14px; }
.prize-list li small { overflow: hidden; color: #7a8781; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; margin-top: 3px; }
.prize-list li b { font-size: 13px; }
.public-notice { color: #70807a; font-size: 12px; line-height: 1.6; padding-top: 14px; }
.result-banner { display: grid; grid-template-columns: auto 1fr; gap: 2px 15px; margin-top: 46px; padding: 20px 22px; border-left: 4px solid var(--accent); background: #fff9f0; }
.result-banner strong { font-size: 22px; }
.result-banner p, .result-banner small { grid-column: 2; margin: 0; color: #6f7c76; }
.result-label { color: var(--accent-dark); font-size: 12px; font-weight: 800; }
.result-muted { border-left-color: #9ba6a0; background: #f4f6f3; }
.buyer-code { grid-column: 2; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 15px; padding-top: 15px; border-top: 1px solid #eadfcf; }
.buyer-code > span { grid-column: 1 / -1; color: #7f704f; font-size: 11px; font-weight: 750; }
.buyer-code code { min-width: 0; padding: 12px 13px; overflow: hidden; border: 1px dashed #d6b470; border-radius: 7px; color: #5d481e; background: #fff; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; user-select: all; }
.buyer-code .button { min-height: 42px; white-space: nowrap; }
.result-claim { grid-column: 2; justify-self: start; margin-top: 15px; }
.result-modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 18px; background: rgb(20 33 43 / .48); opacity: 0; transition: opacity .2s ease; }
.result-modal.show { opacity: 1; }
.result-modal-card { position: relative; width: min(440px, 100%); padding: 32px; border: 1px solid rgb(255 255 255 / .7); border-radius: 16px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 80px rgb(20 33 43 / .3); transform: translateY(12px) scale(.98); transition: transform .24s ease; }
.result-modal.show .result-modal-card { transform: translateY(0) scale(1); }
.result-modal-card h2 { margin: 8px 0 10px; font-size: 30px; }
.modal-copy { margin: 0 0 24px; color: var(--muted); line-height: 1.6; }
.modal-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; color: var(--muted); background: transparent; font-size: 24px; cursor: pointer; }
.modal-code { display: grid; gap: 10px; }
.modal-code code { display: block; padding: 14px; overflow: auto; border: 1px dashed #d6b470; border-radius: 8px; color: #5d481e; background: #fff; font-family: ui-monospace, monospace; user-select: all; }
.claim-form { display: grid; gap: 12px; }
.claim-form label { display: grid; gap: 7px; color: var(--ink); font-size: 13px; font-weight: 700; }
.claim-success { margin: 0; color: #28795d; font-weight: 750; }
.rules { margin-top: 36px; border-top: 1px solid #d8ded8; padding-top: 17px; color: #718078; font-size: 12px; line-height: 1.7; }
.rules summary { color: #425550; cursor: pointer; font-weight: 700; }
.buyer-footer { display: flex; justify-content: space-between; gap: 15px; color: #718078; font-size: 11px; margin-top: 55px; }
.loading-line { color: var(--muted); padding: 80px 0; }
.entry-shell { width: min(560px, calc(100% - 34px)); min-height: 100vh; margin: 0 auto; display: flex; flex-direction: column; }
.entry-shell, .buyer-shell { padding-bottom: max(38px, env(safe-area-inset-bottom)); }
.entry-shell .buyer-header { margin-bottom: 0; height: 86px; }
.entry-content { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 35px 0 100px; }
.entry-content h1 { margin: 9px 0; color: #203c42; font-size: 42px; letter-spacing: -.03em; }
.entry-content > p:not(.eyebrow):not(.form-error) { color: #687672; margin: 0 0 28px; }
.entry-content form { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.entry-content input { min-height: 48px; font-size: 16px; }
.entry-content .button { min-height: 48px; }
.entry-shell .buyer-footer { margin-top: 0; padding-bottom: 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (max-width: 760px) {
  .admin-shell { padding: 0 15px 35px; }
  .topbar { height: 67px; }
  .summary-strip { grid-template-columns: repeat(2, 1fr); }
  .panel { padding: 18px 14px; }
  .section-heading { align-items: flex-start; }
  .wheel-row { display: block; }
  .row-actions { margin-top: 18px; }
  .wheel-prize-list { grid-template-columns: 1fr; }
  .batch-form { display: grid; }
  .batch-form label, .batch-form label.grow { width: 100%; }
  .filters { flex-wrap: wrap; }
  .filters input { max-width: none; flex: 1 1 100%; }
  .prize-inputs { grid-template-columns: 1fr 1fr; }
  .prize-inputs input:first-child { grid-column: span 2; }
  .color-input { grid-column: 2; grid-row: 2; }
  .login-view { padding-top: 45px; }
  .login-form { padding: 27px 22px; }
  .buyer-shell { width: min(100% - 28px, 610px); padding-top: 18px; }
  .buyer-header { margin-bottom: 42px; }
  .secure-label { display: none; }
  .draw-layout { grid-template-columns: 1fr; gap: 44px; margin-top: 34px; }
  .wheel-visual { width: min(360px, 84vw); }
  .probability-panel { width: 100%; }
  .buyer-footer { display: block; line-height: 1.8; }
  .entry-content { justify-content: flex-start; padding-top: 25vh; }
  .entry-content h1 { font-size: 35px; }
  .entry-content form { grid-template-columns: 1fr; }
  .buyer-code { grid-template-columns: 1fr; }
  .buyer-code .button { width: 100%; }
}

@media (hover: none) {
  button, a { -webkit-tap-highlight-color: rgba(32,60,66,.18); touch-action: manipulation; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .wheel-visual, .result-modal, .result-modal-card { transition: none; }
}

@media (prefers-color-scheme: dark) {
  :root { --ink: #edf2f1; --muted: #a5b2b1; --line: #36454a; --soft: #202d31; --paper: #182328; --teal: #78c4bc; --shadow: 0 18px 45px rgba(0, 0, 0, .25); color-scheme: dark; background: #10191d; }
  .admin-body, .buyer-body { background: #10191d; }
  .brand small, .quiet, .wheel-row p, .wheel-meta, .entry-content > p:not(.eyebrow):not(.form-error), .hero-description, .public-notice, .draw-hint, .buyer-footer, .rules { color: #a5b2b1; }
  .login-form, .panel, .summary-strip div, .wheel-dialog, .button-secondary, input, textarea, select { color: var(--ink); background: var(--paper); }
  .panel, .login-form, .wheel-row, .prize-editor-row, .summary-strip div { border-color: var(--line); }
  .batch-form, .prize-editor-row { background: #1d2a2f; }
  th { color: #a5b2b1; background: #202d31; }
  td { border-color: #2d3b40; }
  .tab { color: #a5b2b1; }
  .tab.active { color: var(--ink); }
  .buyer-shell .brand strong, .hero-copy h1, .entry-content h1 { color: #edf2f1; }
  .probability-panel { border-color: #c2d5d1; }
  .prize-list, .prize-list li, .rules { border-color: #3a4a4d; }
  .result-banner { background: #2c2921; }
  .result-muted { background: #20292b; }
  .wheel-visual { border-color: #26353a; }
  .wheel-center { border-color: #26353a; }
  .wheel-pointer { border-top-color: #dbe7e4; }
  .public-notice, .result-banner p, .result-banner small { color: #a5b2b1; }
}

.buyer-body { min-height: 100dvh; background: #f4f6f4; }
.buyer-shell { width: min(760px, calc(100% - 32px)); padding-top: 20px; }
.buyer-header { margin-bottom: 30px; }
.secure-label { display: none; }
.hero-copy { max-width: none; }
.hero-copy h1 { margin: 7px 0 0; color: #202b26; font-size: 30px; line-height: 1.2; }
.hero-description { margin-top: 8px; font-size: 14px; }
.draw-layout { grid-template-columns: minmax(0, 1fr) minmax(280px, .85fr); gap: 36px; margin-top: 24px; }
.wheel-visual { width: min(350px, 80vw); border: 7px solid #fff; box-shadow: 0 8px 22px rgb(24 45 35 / .1); transition-duration: 3.2s; }
.wheel-center { width: 66px; height: 66px; border: 5px solid #fff; background: #237a57; box-shadow: none; font-size: 16px; }
.wheel-pointer { border-top-color: #28352e; filter: none; }
.draw-button { width: min(100%, 340px); min-height: 56px; margin-top: 22px; border-radius: 10px; background: #237a57; box-shadow: none; font-size: 17px; }
.draw-button:hover { background: #196443; }
.draw-hint { min-height: 20px; margin: 8px 0 0; color: #64716a; }
.probability-panel { align-self: start; border-top-width: 1px; border-color: #c9d1cb; }
.panel-label { padding-top: 10px; }
.prize-list { border-color: #dce2dd; }
.prize-list li { min-height: 46px; border-color: #e1e6e2; }
.public-notice { padding-top: 11px; }
.result-banner { margin-top: 26px; padding: 17px; border-left-width: 3px; background: #fff; }
.result-banner strong { font-size: 19px; }
.rules { margin-top: 24px; }
.sound-toggle { min-width: 78px; min-height: 40px; padding: 0 12px; border: 1px solid #d6ddd7; border-radius: 8px; color: #47554c; background: #fff; font-size: 13px; }
.sound-toggle[aria-pressed="false"] { color: #707b74; background: #eef1ee; }
.result-modal { padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
.result-modal-card { width: min(420px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 26px 22px; border-radius: 12px; box-shadow: 0 14px 45px rgb(24 39 31 / .2); }
.result-modal-card { overscroll-behavior: contain; }
.result-modal-card h2 { padding-right: 26px; font-size: 25px; }
.modal-code code { border-color: #d2ddd4; color: #26352c; background: #f4f7f4; overflow-wrap: anywhere; }
.buyer-code code { border-color: #d2ddd4; color: #26352c; background: #f4f7f4; }

@media (max-width: 760px) {
  .buyer-shell { width: min(100% - 28px, 520px); padding-top: 16px; }
  .buyer-header { margin-bottom: 23px; }
  .hero-copy h1 { font-size: 27px; }
  .draw-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 21px; }
  .wheel-visual { width: min(330px, 78vw); }
  .draw-button { width: min(100%, 360px); }
  .probability-panel { width: 100%; }
  .result-banner { margin-top: 22px; }
  .buyer-footer { margin-top: 30px; }
  .sound-toggle { min-height: 44px; }
}

/* Admin v2: calm, dense ecommerce operations workspace */
.admin-body {
  --admin-ink: #17201d;
  --admin-muted: #66716d;
  --admin-line: #dfe5e2;
  --admin-soft: #f3f6f4;
  --admin-paper: #fff;
  --admin-accent: #2f7d65;
  --admin-accent-dark: #24624f;
  min-height: 100dvh;
  color-scheme: light;
  color: var(--admin-ink);
  background: #f2f5f3;
}
.admin-body h1, .admin-body h2, .admin-body h3 { text-wrap: balance; }
.admin-body button, .admin-body a { touch-action: manipulation; }
.admin-body .eyebrow { color: var(--admin-accent); letter-spacing: .12em; }
.admin-body .brand-mark { width: 38px; height: 38px; border-radius: 11px 11px 11px 4px; background: #e3a634; color: #17201d; }
.admin-body .button { min-height: 40px; border-radius: 8px; font-weight: 700; }
.admin-body .button-primary { color: #fff; background: var(--admin-accent); border-color: var(--admin-accent); }
.admin-body .button-primary:hover { background: var(--admin-accent-dark); border-color: var(--admin-accent-dark); }
.admin-body .button-secondary { color: var(--admin-ink); background: #fff; border-color: #cfd8d4; }
.admin-body .button-secondary:hover { background: #f4f7f5; border-color: #aebdb6; }
.admin-body input, .admin-body textarea, .admin-body select { color: var(--admin-ink); background: #fff; border-color: #ccd6d1; border-radius: 8px; }
.admin-body input:focus-visible, .admin-body textarea:focus-visible, .admin-body select:focus-visible { border-color: var(--admin-accent); box-shadow: 0 0 0 3px rgb(47 125 101 / .13); }
.admin-body .button:focus-visible, .admin-body a:focus-visible, .admin-body input:focus-visible, .admin-body textarea:focus-visible, .admin-body select:focus-visible, .admin-body .icon-button:focus-visible, .admin-body .text-action:focus-visible { outline: 3px solid #74b9a3; outline-offset: 2px; }

.admin-body .login-view { min-height: 100dvh; padding: 48px 24px 30px; place-items: center; background: radial-gradient(circle at 70% 10%, rgb(47 125 101 / .10), transparent 32%), #eef3f0; }
.login-brand { position: absolute; top: 32px; left: 40px; display: flex; align-items: center; gap: 11px; }
.login-brand strong, .login-brand small { display: block; }
.login-brand strong { font-size: 16px; }
.login-brand small { margin-top: 2px; color: var(--admin-muted); font-size: 11px; }
.admin-body .login-form { width: min(100%, 430px); padding: 38px; border: 1px solid var(--admin-line); border-radius: 16px; box-shadow: 0 24px 70px rgb(28 47 39 / .10); }
.admin-body .login-form h1 { margin: 8px 0 8px; font-size: 30px; letter-spacing: -.035em; }
.login-intro { margin: 0 0 28px; color: var(--admin-muted); font-size: 14px; line-height: 1.65; }
.admin-body .login-form label { margin: 18px 0; color: #394640; }
.admin-body .login-form input { min-height: 46px; }
.admin-body .login-form .button { min-height: 48px; margin-top: 4px; }
.login-footnote { position: absolute; bottom: 25px; color: #7b8782; font-size: 12px; }

.admin-app { min-height: 100dvh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 26px 18px 20px; color: #e9f0ed; background: #17221f; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 0 8px 26px; border-bottom: 1px solid rgb(255 255 255 / .09); }
.sidebar-brand strong, .sidebar-brand small { display: block; }
.sidebar-brand strong { color: #fff; font-size: 15px; }
.sidebar-brand small { margin-top: 3px; color: #91a19b; font-size: 11px; }
.side-nav { display: grid; gap: 5px; margin-top: 24px; }
.side-nav a { display: flex; align-items: center; gap: 12px; min-height: 45px; padding: 0 13px; border-radius: 8px; color: #aab8b3; font-size: 14px; font-weight: 650; transition: color .18s ease, background-color .18s ease; }
.side-nav a span { display: grid; place-items: center; width: 20px; color: #7f928b; font-size: 17px; }
.side-nav a:hover { color: #fff; background: rgb(255 255 255 / .06); }
.side-nav a.active { color: #fff; background: #2f7d65; }
.side-nav a.active span { color: #fff; }
.sidebar-footer { display: grid; gap: 9px; margin-top: auto; padding: 18px 8px 0; border-top: 1px solid rgb(255 255 255 / .09); color: #aab8b3; font-size: 12px; }
.button-sidebar { color: #d7e0dc; background: transparent; border-color: rgb(255 255 255 / .14); }
.button-sidebar:hover { color: #fff; background: rgb(255 255 255 / .07); }

.workspace { min-width: 0; padding: 34px clamp(24px, 4vw, 58px) 70px; overflow-x: hidden; }
.workspace-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 25px; max-width: 1480px; margin: 0 auto 28px; }
.workspace-header h1 { margin: 5px 0 6px; font-size: clamp(27px, 3vw, 38px); line-height: 1.15; letter-spacing: -.04em; }
.workspace-header p:last-child { margin: 0; color: var(--admin-muted); font-size: 14px; }
.header-actions { display: flex; align-items: center; gap: 12px; padding-top: 7px; }
.live-dot { display: inline-flex; align-items: center; gap: 7px; color: #53615b; font-size: 12px; white-space: nowrap; }
.live-dot i { width: 8px; height: 8px; border-radius: 50%; background: #43a174; box-shadow: 0 0 0 4px rgb(67 161 116 / .12); }
.admin-panel { max-width: 1480px; margin: 0 auto; }

.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.summary-grid article { min-width: 0; padding: 21px 22px 19px; border: 1px solid var(--admin-line); border-radius: 12px; background: var(--admin-paper); box-shadow: 0 8px 24px rgb(34 54 45 / .035); }
.summary-grid article > span, .summary-grid article > strong, .summary-grid article > small { display: block; }
.summary-grid article > span { color: var(--admin-muted); font-size: 12px; font-weight: 650; }
.summary-grid article > strong { margin: 9px 0 8px; font-size: 32px; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.summary-grid article > small { color: #81908a; font-size: 12px; }
.summary-grid article > small b { color: var(--admin-ink); font-weight: 750; }
.summary-grid .metric-alert { border-top: 3px solid #d69a32; padding-top: 19px; }
.overview-grid { display: grid; grid-template-columns: 1.18fr .82fr; gap: 16px; margin-top: 18px; }
.overview-block { padding: 25px; border: 1px solid var(--admin-line); border-radius: 12px; background: #fff; }
.block-heading, .section-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.block-heading h2, .section-toolbar h2 { margin: 0 0 5px; font-size: 18px; }
.block-heading p, .section-toolbar p { margin: 0; color: var(--admin-muted); font-size: 13px; line-height: 1.55; }
.block-heading > a { color: var(--admin-accent); font-size: 12px; font-weight: 750; }
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.quick-actions a { min-width: 0; padding: 18px; border: 1px solid var(--admin-line); border-radius: 10px; transition: transform .18s ease, border-color .18s ease, background-color .18s ease; }
.quick-actions a:hover { transform: translateY(-2px); border-color: #abc5ba; background: #f6faf8; }
.quick-actions a > span { display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 18px; border-radius: 8px; color: #fff; background: var(--admin-accent); font-size: 18px; }
.quick-actions strong, .quick-actions small { display: block; overflow-wrap: anywhere; }
.quick-actions strong { font-size: 14px; }
.quick-actions small { margin-top: 5px; color: var(--admin-muted); font-size: 11px; line-height: 1.5; }
.stock-alert-list { display: grid; margin-top: 13px; }
.stock-alert-list a { display: flex; justify-content: space-between; align-items: center; gap: 15px; min-width: 0; padding: 13px 0; border-bottom: 1px solid #edf0ee; }
.stock-alert-list a:last-child { border-bottom: 0; }
.stock-alert-list span { min-width: 0; }
.stock-alert-list strong, .stock-alert-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stock-alert-list strong { font-size: 13px; }
.stock-alert-list small { margin-top: 3px; color: var(--admin-muted); font-size: 11px; }
.stock-alert-list b { min-width: 35px; text-align: right; font-size: 18px; font-variant-numeric: tabular-nums; }
.stock-low { color: #bd603d !important; }
.empty-inline { padding: 38px 0; color: var(--admin-muted); text-align: center; font-size: 13px; }

.section-toolbar { align-items: center; margin-bottom: 20px; padding: 20px 22px; border: 1px solid var(--admin-line); border-radius: 12px; background: #fff; }
.section-toolbar select { width: auto; min-width: 150px; }
.wheel-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.wheel-card { min-width: 0; padding: 22px; border: 1px solid var(--admin-line); border-radius: 12px; background: #fff; }
.wheel-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.wheel-card-head > div:first-child { min-width: 0; }
.title-line { display: flex; align-items: center; gap: 9px; min-width: 0; }
.title-line h3 { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: 18px; }
.wheel-card-head p { margin: 7px 0 0; color: var(--admin-muted); font-size: 12px; line-height: 1.55; }
.wheel-stats { display: flex; gap: 26px; margin: 18px 0 14px; padding: 13px 0; border-top: 1px solid #edf0ee; border-bottom: 1px solid #edf0ee; color: var(--admin-muted); font-size: 12px; }
.wheel-stats b { color: var(--admin-ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.wheel-prize-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 22px; max-width: none; margin: 0; }
.admin-body .prize-line { min-width: 0; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.admin-body .prize-line > span:nth-child(2) { min-width: 0; }
.admin-body .prize-line strong, .admin-body .prize-line small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-body .prize-line strong { font-size: 12px; font-weight: 700; }
.admin-body .prize-line small { margin-top: 2px; color: var(--admin-muted); font-size: 10px; }
.admin-body .prize-line b { font-size: 11px; font-variant-numeric: tabular-nums; }
.admin-body .row-actions { flex: none; }
.admin-body .empty-state { grid-column: 1 / -1; min-height: 360px; padding: 60px 20px; border: 1px dashed #cbd6d1; border-radius: 12px; background: #fff; }
.admin-body .empty-state p { margin: 0 0 12px; color: var(--admin-muted); font-size: 13px; }
.empty-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; color: var(--admin-accent); background: #e9f4ef; font-size: 24px; }

.admin-body .batch-form { padding: 18px; border: 1px solid var(--admin-line); border-radius: 12px; background: #fff; }
.admin-body .batch-result { border-radius: 10px; }
.admin-body .filters { padding: 14px; border: 1px solid var(--admin-line); border-radius: 10px; background: #fff; }
.admin-body .table-wrap { border: 1px solid var(--admin-line); border-radius: 12px; background: #fff; }
.admin-body table { min-width: 850px; }
.admin-body th { color: #65716c; background: #f5f7f6; font-size: 11px; letter-spacing: .02em; }
.admin-body th, .admin-body td { padding: 14px 15px; border-bottom-color: #e9eeeb; }
.admin-body tbody tr:last-child td { border-bottom: 0; }
.admin-body tbody tr:hover td { background: #fafcfb; }
.admin-body td { font-variant-numeric: tabular-nums; }
.admin-body td small { color: var(--admin-muted); }
.admin-body .pagination { padding: 14px 3px 0; }
.admin-body .text-action { color: var(--admin-accent); font-weight: 650; }
.admin-body .status-tag { border-radius: 6px; }
.inventory-table .stock-number { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.credential-value { display: block; max-width: 270px; padding: 7px 9px; overflow: hidden; border-radius: 6px; color: #235d4c; background: #edf7f2; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }

.admin-dialog { width: min(820px, calc(100% - 28px)); max-height: calc(100dvh - 40px); overflow: auto; overscroll-behavior: contain; border: 0; border-radius: 14px; padding: 0; color: var(--admin-ink); background: #fff; box-shadow: 0 30px 90px rgb(20 37 30 / .28); }
.admin-dialog::backdrop { background: rgb(12 23 19 / .55); backdrop-filter: blur(2px); }
.admin-dialog form { padding: 28px; }
.admin-dialog.small-dialog { width: min(510px, calc(100% - 28px)); }
.admin-dialog .dialog-heading { margin-bottom: 20px; }
.admin-dialog .dialog-heading h2 { margin: 5px 0 0; font-size: 23px; }
.admin-dialog .icon-button { color: #6d7873; }
.admin-dialog .icon-button:hover { background: #eef3f0; }
.form-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 13px; }
.form-grid label { margin: 0; }
.admin-dialog label { color: #43504a; }
.prize-editor-heading { align-items: flex-end; margin-top: 28px; }
.prize-editor-heading strong, .prize-editor-heading small { display: block; }
.prize-editor-heading small { margin-top: 4px; color: var(--admin-muted); font-size: 11px; font-weight: 500; }
.admin-body .prize-editor { gap: 10px; }
.admin-body .prize-editor-row { padding: 14px 43px 14px 14px; border-color: var(--admin-line); border-radius: 10px; background: #f8faf9; }
.admin-body .prize-inputs { grid-template-columns: 1.35fr 110px 150px; gap: 9px; }
.admin-body .prize-inputs label, .admin-body .prize-mode label { margin: 0; color: #6c7872; font-size: 10px; font-weight: 700; }
.admin-body .prize-inputs input, .admin-body .prize-mode select { margin-top: 5px; }
.admin-body .probability-input { margin-top: 5px; }
.admin-body .probability-input input { margin-top: 0; }
.admin-body .color-input { height: 40px; padding: 4px; }
.prize-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; margin-top: 9px; }
.admin-body .prize-mode { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.admin-body .check-line { min-height: 40px; margin: 0; padding-top: 15px; color: #52605a; font-size: 11px; }
.admin-body .check-line input { margin: 0; }
.admin-body .remove-prize { top: 12px; right: 6px; }
.admin-body .probability-valid { color: #25705d; }
.admin-body .probability-invalid { color: #b7553d; }
.field-hint { margin: -8px 0 0; color: var(--admin-muted); font-size: 11px; }
.admin-body .toast { z-index: 100; border-radius: 8px; background: #16231f; }

@media (max-width: 1080px) {
  .admin-app { grid-template-columns: 205px minmax(0, 1fr); }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .overview-grid, .wheel-list { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: repeat(3, 1fr); }
  .admin-body .prize-inputs { grid-template-columns: 1fr 1fr; }
  .admin-body .prize-inputs label:nth-child(1), .admin-body .prize-inputs label:nth-child(2) { grid-column: span 1; }
}
@media (max-width: 760px) {
  .login-brand { top: 22px; left: 22px; }
  .admin-body .login-view { padding: 95px 16px 50px; align-items: start; }
  .admin-body .login-form { padding: 28px 22px; }
  .login-footnote { display: none; }
  .admin-app { display: block; padding-bottom: 70px; }
  .sidebar { position: fixed; top: auto; bottom: 0; z-index: 40; width: 100%; height: 66px; padding: 7px 8px max(7px, env(safe-area-inset-bottom)); border-top: 1px solid rgb(255 255 255 / .1); }
  .sidebar-brand, .sidebar-footer { display: none; }
  .side-nav { grid-template-columns: repeat(5, 1fr); gap: 3px; margin: 0; }
  .side-nav a { display: grid; justify-items: center; align-content: center; gap: 1px; min-height: 52px; padding: 2px; font-size: 9px; }
  .side-nav a span { height: 25px; font-size: 17px; }
  .workspace { padding: 24px 14px 40px; }
  .workspace-header { display: block; margin-bottom: 20px; }
  .workspace-header h1 { font-size: 28px; }
  .header-actions { margin-top: 17px; }
  .live-dot { display: none; }
  .summary-grid { gap: 9px; }
  .summary-grid article { padding: 16px; }
  .summary-grid article > strong { font-size: 27px; }
  .overview-block, .section-toolbar, .wheel-card { padding: 18px; }
  .quick-actions { grid-template-columns: 1fr; }
  .quick-actions a { display: grid; grid-template-columns: 35px 1fr; column-gap: 12px; }
  .quick-actions a > span { grid-row: span 2; margin: 0; }
  .quick-actions small { margin-top: 2px; }
  .section-toolbar, .wheel-card-head { align-items: flex-start; }
  .section-toolbar { display: grid; }
  .section-toolbar .button, .section-toolbar select { width: 100%; }
  .wheel-prize-list { grid-template-columns: 1fr; }
  .admin-body .batch-form { display: grid; }
  .admin-body .batch-form label, .admin-body .batch-form label.grow { width: 100%; }
  .admin-body .filters { flex-wrap: wrap; }
  .admin-body .filters input { flex: 1 1 100%; max-width: none; }
  .form-grid, .prize-mode { grid-template-columns: 1fr; }
  .admin-body .prize-inputs { grid-template-columns: 1fr 1fr; }
  .admin-body .prize-inputs label:nth-child(1), .admin-body .prize-inputs label:nth-child(2) { grid-column: span 2; }
  .admin-body .check-line { padding-top: 0; }
  .admin-dialog form { padding: 22px 17px; }
}

/* Buyer draw machine, designed around a narrow mobile viewport. */
.buyer-body {
  --machine-shell: #5947d8;
  --machine-shell-dark: #392d9c;
  --machine-cyan: #6ce5e4;
  --machine-gold: #ffd16b;
  --machine-hot: #ff765e;
  min-height: 100dvh;
  color-scheme: dark;
  color: #f8f8ff;
  background: #171829;
  background-image: radial-gradient(ellipse at 50% 0%, #303055 0, #171829 55%);
}
.buyer-shell { width: min(560px, calc(100% - 28px)); padding: 14px 0 max(28px, env(safe-area-inset-bottom)); }
.buyer-header { margin: 0 2px 18px; }
.buyer-shell .brand { gap: 9px; }
.buyer-shell .brand strong { color: #fff; font-size: 15px; }
.buyer-shell .brand small { color: #b6b8d3; }
.buyer-shell .brand-mark { width: 35px; height: 35px; color: #271d75; background: var(--machine-cyan); border-radius: 11px 11px 11px 4px; }
.sound-toggle { min-height: 40px; padding: 0 12px; border: 1px solid #565879; border-radius: 8px; color: #ecedff; background: #292a45; font-size: 12px; font-weight: 700; }
.sound-toggle[aria-pressed="false"] { color: #c1c3d9; background: #202137; }
.hero-copy { padding: 0 8px; text-align: center; }
.hero-copy .eyebrow { color: var(--machine-cyan); font-size: 10px; letter-spacing: .14em; }
.hero-copy h1 { margin: 5px 0 0; color: #fff; font-size: 26px; font-weight: 850; line-height: 1.2; text-wrap: balance; }
.hero-description { max-width: 34em; margin: 6px auto 0; color: #c5c6dc; font-size: 12px; line-height: 1.55; }
.machine {
  position: relative;
  isolation: isolate;
  margin: 18px 0 0;
  padding: 11px;
  overflow: hidden;
  border: 2px solid #9185ff;
  border-radius: 27px 27px 16px 16px;
  background: linear-gradient(145deg, #7666f3 0%, var(--machine-shell) 48%, var(--machine-shell-dark) 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .42), 0 16px 36px rgb(7 8 26 / .38);
}
.machine::before { position: absolute; z-index: -1; inset: 6px; border: 1px solid rgb(255 255 255 / .2); border-radius: 21px 21px 11px 11px; content: ""; pointer-events: none; }
.machine-top { display: flex; justify-content: space-between; gap: 8px; padding: 5px 7px 10px; color: #dad8ff; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.machine-top span:last-child { color: #f8df97; letter-spacing: 0; }
.machine-window {
  padding: 12px 10px 13px;
  border: 2px solid #7af1ed;
  border-radius: 19px;
  color: #24355f;
  background: linear-gradient(160deg, #79dff4 0%, #c9fbf4 48%, #7dd5f3 100%);
  box-shadow: inset 0 0 0 4px rgb(255 255 255 / .3), inset 0 7px 16px rgb(38 91 132 / .15);
}
.display-title { width: fit-content; margin: 0 auto 9px; padding: 4px 16px; border: 1px solid rgb(255 255 255 / .68); border-radius: 999px; color: #fff; background: #478cbb; font-size: 11px; font-weight: 800; }
.wheel-holder { position: relative; display: grid; place-items: center; padding-top: 7px; }
.wheel-visual {
  --label-radius: clamp(62px, 22vw, 83px);
  position: relative;
  width: min(100%, 330px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 7px solid #e9fcff;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #5679dc, 0 8px 18px rgb(29 55 92 / .3);
  transition: transform 5.2s cubic-bezier(.12,.74,.11,1);
  transform: rotate(0deg);
  transform-origin: center;
}
.wheel-visual::before { position: absolute; z-index: 1; inset: 0; border: 1px solid rgb(255 255 255 / .45); border-radius: 50%; content: ""; pointer-events: none; }
.wheel-visual.spinning { filter: saturate(1.12); }
.wheel-labels { position: absolute; inset: 0; }
.wheel-prize-label {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 44%;
  min-height: 27px;
  place-items: center;
  margin: -13px 0 0 -22%;
  padding: 3px 5px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / .46);
  border-radius: 6px;
  color: #fff;
  background: color-mix(in srgb, var(--slice-color) 78%, #24235e);
  box-shadow: 0 2px 5px rgb(32 27 84 / .22);
  font-size: clamp(9px, 2.7vw, 12px);
  font-weight: 850;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  transform: rotate(var(--angle)) translateY(calc(-1 * var(--label-radius))) rotate(calc(-1 * var(--angle)));
  white-space: nowrap;
}
.wheel-center {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  width: 58px;
  aspect-ratio: 1;
  place-items: center;
  border: 4px solid #ecfbff;
  border-radius: 50%;
  color: #fff;
  background: #6154df;
  box-shadow: 0 3px 9px rgb(35 30 91 / .35);
  font-size: 9px;
  font-weight: 900;
  transform: translate(-50%, -50%);
}
.wheel-pointer {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 50%;
  width: 28px;
  height: 34px;
  border: 3px solid #fff8dc;
  border-radius: 8px 8px 12px 12px;
  background: var(--machine-hot);
  box-shadow: 0 3px 0 #ca4c4c, 0 3px 8px rgb(29 39 73 / .35);
  clip-path: polygon(0 0,100% 0,100% 45%,50% 100%,0 45%);
  transform: translateX(-50%);
}
.machine-deck { display: grid; justify-items: center; padding: 10px 5px 2px; }
.attempt-count { margin: 0 0 8px; color: #e8e6ff; font-size: 11px; }
.attempt-count strong { color: #fff4a9; font-size: 16px; font-variant-numeric: tabular-nums; }
.draw-button {
  display: grid;
  width: min(100%, 350px);
  min-height: 62px;
  place-content: center;
  gap: 2px;
  border: 3px solid #ffcf94;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(180deg, #ff8a69, #ee4e64);
  box-shadow: 0 5px 0 #a92c5d, 0 8px 0 #7262e4, inset 0 2px 0 rgb(255 255 255 / .35);
  font-size: 19px;
  font-weight: 900;
  text-shadow: 0 1px 1px rgb(115 33 57 / .35);
  transition: transform .12s ease, filter .15s ease, box-shadow .12s ease;
}
.draw-button small { color: #ffe4d2; font-size: 10px; font-weight: 650; text-shadow: none; }
.draw-button:hover:not(:disabled) { filter: brightness(1.08); }
.draw-button:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 #a92c5d, 0 4px 0 #7262e4; }
.draw-button:disabled { border-color: #a8abc3; color: #d3d4e1; background: #74758f; box-shadow: 0 5px 0 #4a4b67; text-shadow: none; }
.draw-button:disabled small { color: #e3e3ec; }
.draw-hint { margin: 8px 0 0; color: #d5d2ff; font-size: 11px; text-align: center; }
.probability-panel { margin: 17px 2px 0; padding: 0; border: 0; }
.probability-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 2px 9px; border-bottom: 1px solid #555774; }
.probability-heading h2 { margin: 0; color: #fff; font-size: 15px; font-weight: 800; }
.probability-heading > span { color: var(--machine-cyan); font-size: 10px; }
.prize-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 10px 0 0; border: 0; }
.prize-list li { min-height: 47px; grid-template-columns: 11px minmax(0, 1fr) auto; gap: 7px; padding: 6px 8px; border: 1px solid #484a68; border-radius: 8px; background: #22233b; }
.prize-list li strong { overflow: hidden; color: #f6f5ff; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.prize-list li b { color: #fff0a8; font-size: 11px; font-variant-numeric: tabular-nums; }
.prize-list .color-swatch { width: 10px; height: 10px; border: 1px solid rgb(255 255 255 / .6); border-radius: 3px; }
.public-notice { padding-top: 8px; color: #b9bad2; font-size: 10px; }
.result-banner { margin-top: 15px; padding: 13px; border: 1px solid #625dc2; border-left: 3px solid var(--machine-gold); border-radius: 9px; color: #fff; background: #25243f; }
.result-banner strong { color: #fff2ad; }
.result-label { color: var(--machine-cyan); }
.result-banner p, .result-banner small { color: #cccee3; }
.buyer-code { border-color: #575477; }
.buyer-code > span { color: #e9db9b; }
.buyer-code code, .modal-code code { border-color: #8175dc; color: #fff7c8; background: #22233b; }
.result-claim { color: #fff; background: #5144bd; border-color: #8b80ed; }
.rules { margin: 16px 2px 0; padding: 12px 13px; border: 1px solid #454762; border-radius: 9px; color: #c8c9dc; background: #202137; font-size: 11px; }
.rules summary { color: #fff; }
.rules p { margin: 10px 0 0; }
.buyer-footer { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 15px; color: #a9aac1; font-size: 10px; text-align: center; }
.buyer-footer > span:empty { display: none; }
.result-modal { padding: max(16px, env(safe-area-inset-top)) 15px max(16px, env(safe-area-inset-bottom)); background: rgb(12 13 31 / .72); backdrop-filter: blur(4px); }
.result-modal-card { width: min(420px, 100%); border: 1px solid #887cf3; border-radius: 18px; color: #fff; background: linear-gradient(155deg, #373469, #22233b 72%); box-shadow: 0 18px 48px rgb(8 8 24 / .55), inset 0 1px 0 rgb(255 255 255 / .14); }
.result-modal-card .eyebrow { color: var(--machine-cyan); }
.result-modal-card h2 { color: #fff3aa; }
.modal-copy { color: #d0d0e4; }
.modal-close { color: #fff; }
.claim-form label { color: #f6f5ff; }
.claim-form input { border-color: #75719e; color: #fff; background: #1c1d34; }
.buyer-body :focus-visible { outline: 3px solid var(--machine-gold); outline-offset: 3px; }
.buyer-body button { touch-action: manipulation; }
@media (max-width: 390px) {
  .machine { padding: 9px; border-radius: 23px 23px 14px 14px; }
  .machine-window { padding: 10px 7px; }
  .wheel-visual { width: min(100%, 304px); }
  .wheel-prize-label { width: 48%; margin-left: -24%; }
  .prize-list { gap: 6px; }
}
@media (min-width: 760px) {
  .buyer-shell { padding-top: 28px; }
  .machine { margin-top: 23px; padding: 15px; }
  .machine-window { padding: 15px; }
  .probability-panel { margin-top: 23px; }
  .prize-list li { min-height: 52px; padding-inline: 11px; }
  .prize-list li strong { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .buyer-body .wheel-visual, .buyer-body .draw-button { transition: none; }
  .buyer-body .wheel-visual { transform: rotate(var(--final-angle, 0deg)); }
}
@media (prefers-color-scheme: light) {
  .buyer-body { color-scheme: dark; }
}

