:root {
  color-scheme: dark;
  --bg: #100908;
  --surface: rgba(34, 21, 18, .86);
  --surface-2: #2a1915;
  --surface-3: #3b241d;
  --line: rgba(255, 239, 216, .11);
  --text: #fff8ee;
  --muted: #b9a99d;
  --cream: #f4d9a9;
  --orange: #ff8a3d;
  --gold: #ffc15a;
  --green: #6ad89a;
  --red: #ff6c69;
  --shadow: 0 28px 80px rgba(0, 0, 0, .34);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(circle at 50% -20%, #42261e 0, var(--bg) 45%); overflow-x: hidden; }
button, input, select { font: inherit; }
button { color: inherit; }
button, select, .file-button { -webkit-tap-highlight-color: transparent; }

.ambient { position: fixed; z-index: -1; border-radius: 50%; filter: blur(100px); opacity: .18; pointer-events: none; }
.ambient-one { width: 420px; height: 420px; background: #e85f2c; top: 8%; left: -180px; }
.ambient-two { width: 520px; height: 520px; background: #b46b25; right: -260px; bottom: -180px; }
.app-shell { width: min(2100px, 100%); min-height: 100vh; margin: auto; padding: 0 34px 112px; }
.topbar { height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0; background: none; border: 0; text-align: left; cursor: pointer; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: #241109; font-weight: 950; letter-spacing: -.07em; background: linear-gradient(145deg, var(--cream), var(--orange)); box-shadow: 0 8px 28px rgba(255, 138, 61, .25); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: -.02em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.server-pill { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 13px; background: rgba(255,255,255,.025); }
.pulse, .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(106,216,154,.1); }

main { padding-top: 46px; }
.view { display: none; animation: view-in .35s ease both; }
.view.active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }
.wheel-heading, .section-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 10px; color: var(--orange); font-size: 12.5px; font-weight: 850; letter-spacing: .16em; }
h1 { margin: 0; font-size: clamp(34px, 4.2vw, 64px); line-height: .98; letter-spacing: -.055em; }
.lead { max-width: 680px; margin: 16px 0 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.count-control { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; }
.segmented { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.035); }
.count-button { width: 43px; height: 38px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; font-weight: 800; color: var(--muted); }
.count-button.active { color: #29150c; background: var(--cream); box-shadow: 0 6px 18px rgba(0,0,0,.22); }

.case-frame { overflow: hidden; position: relative; border: 1px solid rgba(255, 215, 165, .16); border-radius: 28px; background: linear-gradient(145deg, rgba(56,34,28,.96), rgba(23,14,12,.97)); box-shadow: var(--shadow); }
.case-frame::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.028) 50%, transparent 65%); }
.case-topline { display: flex; align-items: center; justify-content: space-between; padding: 15px 22px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11.5px; font-weight: 800; letter-spacing: .12em; }
.case-topline > div:first-child { display: flex; align-items: center; gap: 10px; color: var(--cream); }
.reels { min-height: 360px; padding: 24px; display: grid; align-content: center; gap: 14px; }
.empty-wheel { display: grid; justify-items: center; gap: 10px; text-align: center; color: var(--muted); }
.empty-wheel strong { color: var(--text); font-size: 18px; }
.empty-wheel small { font-size: 13px; }
.empty-orbit { width: 94px; height: 94px; display: grid; place-items: center; margin-bottom: 8px; border: 1px dashed rgba(255,193,90,.38); border-radius: 50%; animation: orbit 10s linear infinite; }
.empty-orbit span { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 21px; color: var(--cream); font-size: 30px; background: var(--surface-3); transform: rotate(0); }
@keyframes orbit { to { transform: rotate(360deg); } }
.reel { overflow: hidden; position: relative; height: 148px; border: 1px solid var(--line); border-radius: 21px; background: rgba(5,3,3,.5); }
.reel::before, .reel::after { content: ""; position: absolute; top: 0; bottom: 0; z-index: 3; width: 17%; pointer-events: none; }
.reel::before { left: 0; background: linear-gradient(90deg, #130c0a 10%, transparent); }
.reel::after { right: 0; background: linear-gradient(-90deg, #130c0a 10%, transparent); }
.reel-marker { position: absolute; z-index: 4; left: 50%; top: 0; bottom: 0; width: 2px; background: linear-gradient(transparent, var(--gold) 18%, var(--gold) 82%, transparent); box-shadow: 0 0 22px var(--orange); }
.reel-marker::before, .reel-marker::after { content: ""; position: absolute; left: -6px; border: 7px solid transparent; }
.reel-marker::before { top: 0; border-top-color: var(--gold); }
.reel-marker::after { bottom: 0; border-bottom-color: var(--gold); }
.reel-track { height: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; transform: translateX(0); will-change: transform; }
.reel.spinning .reel-track { transition: transform 4.4s cubic-bezier(.08,.72,.08,1); }
.reel-card { flex: 0 0 164px; height: 124px; padding: 10px; display: flex; gap: 10px; align-items: center; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; background: linear-gradient(145deg, #3a241e, #241613); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.reel-card .product-art { flex: 0 0 62px; height: 84px; }
.reel-card .mini-copy { min-width: 0; }
.mini-copy b, .mini-copy small { display: block; }
.mini-copy b { margin-top: 5px; font-size: 14px; line-height: 1.15; }
.mini-copy small { color: var(--muted); font-size: 10.5px; text-transform: uppercase; }

.result-card { display: grid; grid-template-columns: 116px 1fr auto; align-items: center; gap: 18px; padding: 15px 18px; border: 1px solid rgba(255,193,90,.23); border-radius: 22px; background: linear-gradient(125deg, rgba(92,52,36,.75), rgba(34,20,17,.92)); animation: result-pop .48s cubic-bezier(.2,.9,.2,1.15) both; cursor: pointer; }
.result-card.selected { outline: 2px solid var(--gold); box-shadow: 0 0 0 5px rgba(255,193,90,.08); }
.result-card.confirmed { border-color: rgba(106,216,154,.35); opacity: .76; cursor: default; }
@keyframes result-pop { from { opacity: 0; transform: scale(.96) translateY(10px); } }
.product-art { position: relative; overflow: hidden; display: grid; place-items: center; border-radius: 18px; background: radial-gradient(circle at 30% 20%, #77513a, #321f19 70%); }
.product-art.has-image { overflow: visible; border-color: transparent; background: transparent; box-shadow: none; }
.product-art img { width: 100%; height: 100%; padding: 0; object-fit: contain; transform: translate(var(--image-shift-x, 0), var(--image-shift-y, 0)) scale(var(--image-scale, 1)); transform-origin: center; }
.product-art .art-letters { color: var(--cream); font-size: 23px; font-weight: 950; letter-spacing: -.08em; text-shadow: 0 2px 10px #000; }
.result-card .product-art { width: 116px; height: 116px; }
.result-copy { min-width: 0; }
.result-copy .brand-line { color: var(--orange); font-size: 12px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.result-copy h3 { margin: 7px 0 8px; font-size: clamp(21px, 2.4vw, 32px); letter-spacing: -.04em; }
.result-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; background: rgba(255,255,255,.025); }
.result-actions { display: flex; flex-direction: column; gap: 8px; min-width: 124px; }
.eat-button { padding: 12px 15px; border: 0; border-radius: 13px; color: #0f271a; background: var(--green); font-weight: 850; cursor: pointer; }
.eat-button:disabled { cursor: default; opacity: .7; }
.select-hint { color: var(--muted); font-size: 11px; text-align: center; }
.case-footer { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 20px; border-top: 1px solid var(--line); }
.spin-button { min-width: 250px; display: flex; align-items: center; justify-content: center; gap: 13px; padding: 13px 26px; border: 0; border-radius: 17px; color: #2b150b; background: linear-gradient(135deg, var(--cream), var(--orange)); box-shadow: 0 12px 30px rgba(255,138,61,.2); cursor: pointer; }
.spin-button:hover { transform: translateY(-1px); }
.spin-button:disabled { filter: grayscale(.8); cursor: wait; transform: none; }
.spin-button strong, .spin-button small { display: block; text-align: left; }
.spin-button strong { font-size: 16px; }
.spin-button small { margin-top: 2px; font-size: 11px; opacity: .72; }
.spin-icon { font-size: 25px; }
.spin-button.loading .spin-icon { animation: spin .65s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.primary-compact, .secondary-button, .danger-button, .icon-button { border-radius: 13px; cursor: pointer; font-weight: 750; }
.primary-compact { padding: 11px 16px; border: 0; color: #2b150b; background: var(--cream); }
.secondary-button { padding: 10px 15px; border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.secondary-button:disabled { opacity: .4; cursor: default; }
.danger-button { padding: 10px 15px; border: 1px solid rgba(255,108,105,.25); color: var(--red); background: rgba(255,108,105,.07); }
.chance-strip { display: flex; align-items: center; gap: 18px; margin-top: 18px; color: var(--muted); font-size: 12.5px; }
.chance-preview { min-width: 0; display: flex; gap: 8px; overflow: hidden; }
.chance-chip { white-space: nowrap; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--cream); background: rgba(255,255,255,.025); }

.section-heading h1 { font-size: clamp(38px, 4vw, 58px); }
.toolbar { display: flex; align-items: end; gap: 12px; margin-bottom: 16px; }
.search-box { flex: 1; min-height: 48px; display: flex; align-items: center; gap: 9px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.035); }
.search-box input { width: 100%; padding: 13px 0; border: 0; outline: 0; color: var(--text); background: transparent; }
.search-box input::placeholder { color: #76675f; }
.control-field { min-width: 200px; display: grid; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.control-field select { width: 100%; height: 48px; }
select { min-width: 180px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: var(--surface-2); }
.inventory-summary { display: flex; gap: 10px; margin-bottom: 18px; }
.summary-chip { padding: 8px 11px; border-radius: 10px; color: var(--muted); font-size: 12.5px; background: rgba(255,255,255,.035); }
.summary-chip b { color: var(--text); }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.product-card { min-width: 0; display: grid; grid-template-columns: 86px 1fr; gap: 13px; padding: 13px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); cursor: pointer; transition: .2s ease; }
.product-card > div { min-width: 0; }
.product-card:hover { transform: translateY(-2px); border-color: rgba(255,193,90,.25); }
.product-card .product-art { width: 86px; height: 102px; }
.product-card h3 { overflow: hidden; margin: 5px 0 8px; font-size: 16px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.product-card .subline { color: var(--muted); font-size: 12px; line-height: 1.25; overflow-wrap: anywhere; }
.product-card .stock-line { display: flex; align-items: end; justify-content: space-between; gap: 8px; margin-top: 13px; }
.stock-line strong { font-size: 19px; }
.stock-line small { color: var(--muted); font-size: 11.5px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.status-dot.urgent { background: var(--gold); }
.status-dot.empty, .status-dot.expired { background: var(--red); }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 16px; }
.metric { padding: 20px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); }
.metric small { color: var(--muted); font-size: 12.5px; }
.metric strong { display: block; margin-top: 10px; font-size: 30px; letter-spacing: -.04em; }
.stats-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; }
.panel { padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel h2, .setting-card h2 { margin: 0; font-size: 16px; }
.panel-heading span { color: var(--muted); font-size: 12px; }
.frequency-list, .history-list { display: grid; gap: 8px; }
.frequency-row { display: grid; grid-template-columns: minmax(120px,1fr) 2fr 56px; align-items: center; gap: 12px; font-size: 12.5px; }
.frequency-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 7px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.05); }
.bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange), var(--cream)); }
.history-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 9px; border-radius: 12px; background: rgba(255,255,255,.025); }
.history-symbol { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-3); }
.history-row strong, .history-row small { display: block; }
.history-row strong { font-size: 12.5px; }
.history-row small { color: var(--muted); font-size: 11px; }
.history-row time { color: var(--muted); font-size: 10.5px; }

.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.setting-card { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 16px; padding: 22px; border: 1px solid var(--line); border-radius: 21px; background: var(--surface); }
.setting-actions { display: flex; flex-direction: column; gap: 8px; min-width: 174px; }
.setting-actions .secondary-button, .setting-actions .file-button { width: 100%; text-align: center; }
.setting-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; color: var(--cream); font-size: 22px; background: var(--surface-3); }
.setting-card p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.formula-card { grid-template-columns: 54px 1fr; }
code { color: var(--cream); }
.file-button input { display: none; }

.bottom-nav { position: fixed; z-index: 20; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 4px; padding: 6px; border: 1px solid rgba(255,255,255,.12); border-radius: 20px; background: rgba(28,17,14,.88); box-shadow: 0 16px 55px rgba(0,0,0,.48); backdrop-filter: blur(20px); }
.nav-button { min-width: 105px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 14px; border: 0; border-radius: 14px; color: var(--muted); background: transparent; cursor: pointer; }
.nav-button b { font-size: 12px; }
.nav-button.active { color: #27140c; background: var(--cream); }
.modal { width: min(650px, calc(100% - 28px)); padding: 0; border: 1px solid var(--line); border-radius: 24px; color: var(--text); background: #211411; box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(4,2,2,.72); backdrop-filter: blur(8px); }
.modal form { padding: 24px; }
.modal-heading { display: flex; align-items: start; justify-content: space-between; margin-bottom: 20px; }
.modal-heading h2 { margin: 0; font-size: 28px; letter-spacing: -.04em; }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--line); color: var(--muted); background: rgba(255,255,255,.04); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid label { color: var(--muted); font-size: 12.5px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid input { width: 100%; margin-top: 7px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; outline: 0; color: var(--text); background: rgba(255,255,255,.04); }
.form-grid input:focus { border-color: rgba(255,193,90,.45); }
.image-upload { padding: 13px; border: 1px dashed rgba(255,255,255,.14); border-radius: 14px; cursor: pointer; }
.image-upload input { display: none; }
.image-upload span { display: block; margin-top: 7px; color: var(--cream); }
.product-visual-editor { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 18px; padding: 16px; border: 1px solid rgba(255,193,90,.18); border-radius: 20px; background: linear-gradient(135deg, rgba(92,52,36,.38), rgba(255,255,255,.025)); transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.product-visual-editor.drag-over { border-color: rgba(255,193,90,.78); background: linear-gradient(135deg, rgba(128,73,45,.58), rgba(255,193,90,.08)); box-shadow: 0 0 0 4px rgba(255,193,90,.1), 0 18px 45px rgba(0,0,0,.24); }
.product-preview-art { width: 150px; height: 150px; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 16px 35px rgba(0,0,0,.22); }
.product-preview-art.has-image { border-color: transparent; box-shadow: none; }
.product-preview-copy { min-width: 0; }
.product-preview-copy small, .product-preview-copy strong, .product-preview-copy span { display: block; }
.product-preview-copy small { color: var(--orange); font-size: 11.5px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.product-preview-copy strong { margin: 8px 0 18px; font-size: 25px; line-height: 1.05; letter-spacing: -.04em; }
.product-preview-copy span { margin-top: 9px; color: var(--muted); font-size: 11.5px; }
.image-change-button { display: inline-flex; width: auto; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--cream); background: rgba(255,255,255,.045); cursor: pointer; font-weight: 750; }
.image-change-button input { display: none; }
.batch-panel { display: grid; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.035); }
.batch-panel-heading { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.batch-panel-heading small, .batch-list small { color: var(--muted); }
.batch-list { display: grid; gap: 7px; }
.batch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; border-radius: 10px; background: rgba(0,0,0,.16); color: var(--cream); }
.batch-row { flex-wrap: wrap; }
.batch-row label { flex: 1 1 100px; min-width: 0; font-size: 11px; }
.batch-row input { width: 100%; min-width: 0; }
.batch-save-button { padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--cream); background: var(--surface-2); cursor: pointer; }
.batch-delete-button { margin-left: auto; padding: 5px 9px; border: 1px solid rgba(255,108,105,.35); border-radius: 8px; color: var(--red); background: rgba(255,108,105,.08); cursor: pointer; font-size: 11px; }
.batch-add-grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.batch-add-grid .secondary-button { height: 42px; white-space: nowrap; }
.modal-actions { display: flex; align-items: center; gap: 9px; margin-top: 22px; }
.spacer { flex: 1; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(100%, 400px); padding: 30px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.login-card h1 { margin: 22px 0 12px; font-size: 30px; }
.login-card p, .login-card small { color: var(--muted); line-height: 1.5; }
.login-card label { display: block; margin: 24px 0 8px; }
.login-card input { width: 100%; padding: 14px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface-2); font-size: 24px; letter-spacing: .35em; }
.login-card .spin-button { width: 100%; min-width: 0; }
.login-card #login-message { min-height: 48px; }
.hidden { display: none !important; }
.toast-stack { position: fixed; z-index: 50; top: 20px; right: 20px; display: grid; gap: 8px; }
.toast { max-width: 330px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 13px; background: #332019; box-shadow: var(--shadow); animation: toast-in .3s ease both; font-size: 13px; }
.toast.error { border-color: rgba(255,108,105,.35); }
@keyframes toast-in { from { opacity: 0; transform: translateX(15px); } }
.confetti { position: fixed; z-index: 40; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 8px; height: 14px; border-radius: 3px; animation: fall 1.8s ease-in forwards; }
@keyframes fall { to { transform: translate3d(var(--drift), 105vh, 0) rotate(760deg); opacity: .1; } }

@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (min-width: 1800px) {
  .app-shell { padding-inline: 54px; }
  .topbar { height: 100px; }
  main { padding-top: 58px; }
  h1 { font-size: clamp(60px, 4vw, 82px); }
  .lead { max-width: 780px; font-size: 17px; }
  .case-frame { border-radius: 32px; }
  .reels { min-height: 450px; padding: 30px; gap: 17px; }
  .reel { height: 166px; }
  .reel-card { flex-basis: 190px; height: 140px; }
  .reel-card .product-art { flex-basis: 72px; height: 98px; }
  .result-card { grid-template-columns: 138px 1fr auto; min-height: 146px; padding: 18px 22px; }
  .result-card .product-art { width: 138px; height: 132px; }
  .product-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
  .product-card { grid-template-columns: 98px 1fr; padding: 16px; }
  .product-card .product-art { width: 98px; height: 116px; }
  .bottom-nav { transform: translateX(-50%) scale(1.08); transform-origin: bottom center; }
}

@media (max-width: 760px) {
  .app-shell { padding: 0 14px 102px; }
  .topbar { height: 70px; }
  .server-pill span:last-child { display: none; }
  .server-pill { padding: 10px; }
  main { padding-top: 28px; }
  .wheel-heading, .section-heading { align-items: start; flex-direction: column; gap: 20px; }
  .wheel-heading h1 { font-size: 42px; }
  .lead { margin-top: 12px; font-size: 15px; }
  .count-control { width: 100%; justify-content: space-between; }
  .segmented { flex: 1; }
  .count-button { flex: 1; }
  .batch-add-grid { grid-template-columns: 1fr 1fr; }
  .batch-add-grid .secondary-button { grid-column: 1 / -1; width: 100%; }
  .case-frame { border-radius: 22px; }
  .case-topline { padding: 13px 15px; }
  .reels { min-height: 330px; padding: 12px; }
  .reel { height: 132px; }
  .reel-card { flex-basis: 142px; height: 108px; }
  .reel-card .product-art { flex-basis: 52px; height: 72px; }
  .result-card { grid-template-columns: 76px 1fr; gap: 12px; padding: 12px; }
  .result-card .product-art { width: 76px; height: 86px; }
  .result-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .case-footer { flex-direction: column; }
  .spin-button, .case-footer .secondary-button { width: 100%; }
  .chance-strip { align-items: start; flex-direction: column; gap: 8px; }
  .chance-preview { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .control-field { width: 100%; }
  select { height: 46px; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card { grid-template-columns: 78px 1fr; }
  .product-card .product-art { width: 78px; height: 92px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-layout { grid-template-columns: 1fr; }
  .frequency-row { grid-template-columns: minmax(95px,1fr) 1fr 46px; }
  .setting-card { grid-template-columns: 46px 1fr; padding: 17px; }
  .setting-card .primary-compact, .setting-card > .secondary-button, .setting-actions { grid-column: 1 / -1; width: 100%; text-align: center; }
  .setting-icon { width: 46px; height: 46px; }
  .bottom-nav { bottom: 10px; width: calc(100% - 20px); justify-content: space-around; border-radius: 18px; }
  .nav-button { min-width: 0; flex: 1; flex-direction: column; gap: 2px; padding: 8px 4px; }
  .nav-button span { font-size: 17px; }
  .nav-button b { font-size: 10.5px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .product-visual-editor { grid-template-columns: 94px 1fr; gap: 13px; padding: 12px; }
  .product-preview-art { width: 94px; height: 108px; }
  .product-preview-copy strong { margin: 6px 0 12px; font-size: 19px; }
  .modal form { padding: 18px; }
  .modal-actions { flex-wrap: wrap; }
  .toast-stack { left: 14px; right: 14px; top: 14px; }
  .toast { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .reel.spinning .reel-track { transition-duration: .01ms !important; }
}
