/* عجلة الحظ — أثر · minimal corporate (Athr brand: Teal #14A599, Charcoal #231F1F, Mint #E3F4F2, White · Cairo) */
@font-face {
  font-family: "Cairo"; font-style: normal; font-weight: 400 1000; font-display: swap;
  src: url("assets/fonts/cairo.woff2") format("woff2");
}

:root {
  --teal: #14A599; --teal-hi: #2BC0B3; --teal-dk: #0F7F76; --mint: #E3F4F2;
  --bg: #231F1F; --bg-2: #1C1919; --s1: #2A2525; --s2: #302B2B; --s3: #3A3434;
  --fg: #FFFFFF; --fg-2: rgba(255, 255, 255, .72); --fg-3: rgba(255, 255, 255, .48);
  --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .16);
  --danger: #FF8A7A; --warn: #E9C46A;
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px;
  --ease-out: cubic-bezier(.22, 1, .36, 1); --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --fs-body: clamp(15px, 2.1vmin, 28px);
  --fs-h2: clamp(22px, 3.8vmin, 50px);
  --ctl-h: clamp(54px, 7.2vmin, 90px);
  --gap: clamp(12px, 2vmin, 28px);
  --ws: min(80dvh, 50vw);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden; background: var(--bg); color: var(--fg);
  font-family: "Cairo", "Segoe UI", Tahoma, system-ui, sans-serif; font-size: var(--fs-body); line-height: 1.6; font-weight: 400;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  overscroll-behavior: none; -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
img { -webkit-user-drag: none; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- backdrop: flat charcoal, one quiet light behind the wheel */
.bg { position: fixed; inset: 0; z-index: 0; background: var(--bg); }
.bg-img { position: absolute; inset: 0; background: radial-gradient(60vmax 50vmax at var(--glow-x, 28%) 52%, #2B2626 0%, var(--bg) 60%); }
.bg-glow { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, .18)); }
@media (orientation: portrait) { :root { --glow-x: 50%; } .bg-img { background: radial-gradient(70vmax 46vmax at 50% 36%, #2B2626 0%, var(--bg) 62%); } }

/* ---------------------------------------------------------------- top bar */
.top { position: fixed; z-index: 5; inset-inline: 0; top: 0; display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + clamp(16px, 3.2vmin, 48px)) clamp(16px, 4vmin, 72px) 0; pointer-events: none; }
.brand { pointer-events: auto; background: none; border: 0; padding: 0; -webkit-touch-callout: none; }
.brand img { display: block; height: clamp(80px, 9.5vmin, 120px); width: auto; } /* brand minimum: 80 px */
.brand:focus-visible { outline: 2px solid var(--teal); outline-offset: 8px; border-radius: 6px; }
.net { pointer-events: none; font-size: clamp(11px, 1.4vmin, 15px); color: var(--fg-3); display: flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line-2); opacity: 0; transition: opacity .3s; }
.net.show { opacity: 1; }
.net::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--fg-3); }
.net.ok::before { background: var(--teal); } .net.off::before { background: var(--warn); }
@media (orientation: portrait) {
  .top { justify-content: center; }
  .brand img { height: clamp(80px, 8vh, 120px); }
  .net { position: absolute; inset-inline-start: 16px; top: calc(env(safe-area-inset-top) + 14px); }
}

/* ---------------------------------------------------------------- layout */
.stage { position: fixed; inset: 0; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center;
  padding: clamp(96px, 15vmin, 180px) clamp(16px, 5vmin, 96px) clamp(16px, 4.4vmin, 64px); gap: clamp(16px, 4vmin, 80px); }
.wheel-zone { display: grid; place-items: center; min-width: 0; }
.panel { min-width: 0; display: grid; align-content: center; justify-items: stretch; }
@media (orientation: portrait) {
  :root { --ws: min(88vw, 50dvh); }
  .stage { grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: center; align-items: start; padding-top: clamp(110px, 14vh, 200px); gap: clamp(16px, 3.4vmin, 56px); }
  .wheel-zone { grid-row: 1; }
  .panel { grid-row: 2; text-align: center; align-content: start; }
  body.s-form .wheel-zone { display: none; }
  body.s-form .stage { grid-template-rows: auto; align-content: start; }
}

/* ---------------------------------------------------------------- panel views */
.view { display: none; flex-direction: column; align-items: flex-start; text-align: start; gap: var(--gap); width: 100%; max-width: 820px; }
@media (orientation: portrait) { .view { align-items: center; text-align: center; margin-inline: auto; } }
body.s-attract .v-attract, body.s-form .v-form, body.s-ready .v-ready, body.s-spinning .v-spinning, body.s-result .v-spinning { display: flex; animation: viewIn .5s var(--ease-out) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.v-form { text-align: start !important; align-items: stretch !important; }

.eyebrow { margin: 0; color: var(--fg-3); font-weight: 700; font-size: clamp(12px, 1.8vmin, 22px); letter-spacing: 0; }
.title { margin: 0; font-weight: 900; line-height: 1.25; text-wrap: balance; color: var(--fg); font-size: clamp(30px, 6.6vmin, 88px); }
.title.hero { font-size: clamp(54px, 13vmin, 176px); line-height: 1.15; }
.title.sm { font-size: clamp(26px, 5vmin, 68px); font-weight: 800; }
.sub { margin: 0; color: var(--fg-2); font-size: clamp(17px, 3vmin, 40px); font-weight: 700; }
.sub.lined { display: flex; align-items: center; gap: .7em; color: var(--teal); }
.sub.lined::before, .sub.lined::after { content: ""; width: clamp(28px, 6vmin, 90px); height: 1px; background: var(--line-2); }
.hint { margin: 0; color: var(--fg-3); font-size: clamp(13px, 1.8vmin, 22px); }
.h2 { margin: 0; font-size: var(--fs-h2); font-weight: 800; line-height: 1.3; }
.muted { color: var(--fg-2); margin: 0; }
.small { font-size: .82em; }
.fine { margin: 0; color: var(--fg-3); font-size: clamp(12px, 1.6vmin, 19px); }
.card { padding: clamp(22px, 4.2vmin, 60px); border-radius: var(--r-xl); }
.glass { background: var(--s1); border: 1px solid var(--line); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .7); }

.qr-box { display: flex; align-items: center; gap: clamp(14px, 2.2vmin, 28px); margin-top: clamp(8px, 2.4vmin, 36px); padding-top: clamp(14px, 2.4vmin, 32px); border-top: 1px solid var(--line); }
.qr-box img { width: clamp(88px, 13vmin, 170px); height: auto; border-radius: 8px; background: #fff; padding: 6px; }
.qr-box strong { display: block; color: var(--fg); font-weight: 900; font-size: clamp(18px, 3vmin, 38px); line-height: 1.3; }
.qr-box span { display: block; color: var(--fg-3); font-size: clamp(13px, 1.8vmin, 22px); }
@media (orientation: portrait) { .qr-box { text-align: start; } }

/* ---------------------------------------------------------------- controls */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: var(--ctl-h); padding: 0 1.5em; border-radius: var(--r-md);
  border: 1px solid transparent; font-weight: 700; font-size: clamp(17px, 2.5vmin, 32px); white-space: nowrap; transition: transform .12s var(--ease-out), background-color .2s, border-color .2s, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 2px solid var(--teal-hi); outline-offset: 3px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-primary { color: #fff; background: var(--teal); }
.btn-primary:hover { background: var(--teal-hi); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--fg); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .3); }
.btn-danger { background: transparent; border-color: rgba(255, 138, 122, .45); color: #ffc9c1; font-size: 15px; min-height: 48px; }
.btn-xl { min-height: clamp(64px, 9.6vmin, 120px); font-size: clamp(22px, 3.8vmin, 50px); padding: 0 1.9em; border-radius: var(--r-lg); }
.btn-xl svg { width: .9em; height: .9em; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.grow { flex: 1; }
.row { display: flex; gap: clamp(10px, 1.6vmin, 20px); width: 100%; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.dots { display: none; gap: 6px; }
.dots i { width: .32em; height: .32em; border-radius: 50%; background: currentColor; animation: dot 1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; transform: scale(.7); } 40% { opacity: 1; transform: none; } }
.btn.loading .lbl { display: none; } .btn.loading .dots { display: inline-flex; }

.field { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.label { font-weight: 700; color: var(--fg-2); font-size: clamp(14px, 1.9vmin, 24px); }
.field input, .field select, .search { width: 100%; min-height: var(--ctl-h); padding: 0 .85em; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line-2); outline: none;
  font-size: clamp(18px, 2.7vmin, 34px); font-weight: 400; transition: border-color .15s, box-shadow .15s; -webkit-user-select: text; user-select: text; }
.field input::placeholder { color: rgba(255, 255, 255, .28); }
.field input:focus, .field select:focus, .search:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(20, 165, 153, .22); }
.field input[dir="ltr"] { text-align: left; letter-spacing: .05em; font-variant-numeric: tabular-nums; }
.field.bad input { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255, 138, 122, .14); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(5px); } 75% { transform: translateX(-5px); } }
.err { min-height: 1.2em; color: var(--danger); font-size: clamp(13px, 1.7vmin, 21px); }
.err.center { text-align: center; }
.swipe-hint svg { width: clamp(70px, 11vmin, 150px); fill: none; stroke: var(--teal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.swipe-hint { animation: swipe 2s var(--ease-out) infinite; }
@keyframes swipe { 0% { transform: translateX(26px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateX(-26px); opacity: 0; } }

/* ---------------------------------------------------------------- wheel */
.wheel { position: relative; width: var(--ws); height: var(--ws); --d: var(--ws); touch-action: none; }
.wheel-shadow { position: absolute; left: 10%; right: 10%; bottom: -5%; height: 12%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0)); }
.rim { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.disk, .gloss { position: absolute; left: 7%; top: 7%; width: 86%; height: 86%; border-radius: 50%; }
.disk { will-change: transform; }
.gloss { pointer-events: none; background: radial-gradient(closest-side, rgba(0, 0, 0, 0) 86%, rgba(0, 0, 0, .22) 100%); }
.bulbs { display: none; }
.hub { position: absolute; left: 50%; top: 50%; width: 24%; height: 24%; transform: translate(-50%, -50%); border-radius: 50%; border: 0; padding: 0;
  background: var(--bg); display: grid; place-items: center; transition: transform .14s var(--ease-out);
  box-shadow: 0 calc(var(--d) * .01) calc(var(--d) * .03) rgba(0, 0, 0, .45); }
.hub-logo { width: 58%; height: auto; }
.hub:active { transform: translate(-50%, -50%) scale(.96); }
.hub:focus-visible { outline: 2px solid var(--teal); outline-offset: 6px; }
.hub::before { content: ""; position: absolute; inset: -9%; border-radius: 50%; border: 1px solid var(--teal); opacity: 0; pointer-events: none; }
body.s-ready .hub::before { animation: hubPulse 2s var(--ease-out) infinite; }
@keyframes hubPulse { 0% { opacity: .8; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.22); } }
.pointer-wrap { position: absolute; left: 50%; top: -1.2%; width: 6.4%; margin-left: -3.2%; z-index: 3; pointer-events: none; }
.pointer { display: block; width: 100%; height: auto; transform-origin: 50% 10%; filter: drop-shadow(0 calc(var(--d) * .006) calc(var(--d) * .008) rgba(0, 0, 0, .45)); overflow: visible; }
.win-glow { position: absolute; left: 7%; top: 7%; width: 86%; height: 86%; overflow: visible; pointer-events: none; opacity: 0; transition: opacity .4s var(--ease-out); }
.win-glow.on { opacity: 1; }
.win-glow .wg-fill { fill: rgba(255, 255, 255, .07); }
.win-glow .wg-blur { display: none; }
.win-glow .wg-line { fill: none; stroke: #FFFFFF; stroke-width: .012; stroke-linejoin: round; }

/* ---------------------------------------------------------------- result */
.result { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(20, 17, 17, .78); animation: fadeIn .3s var(--ease-out) both; }
.result-card { position: relative; width: min(92vw, calc(62vmin + 120px)); max-height: calc(100dvh - 32px); overflow: hidden; text-align: center; border-radius: var(--r-xl);
  padding: clamp(26px, 5vmin, 72px) clamp(22px, 4.6vmin, 64px) clamp(28px, 5vmin, 64px); display: flex; flex-direction: column; align-items: center; gap: clamp(8px, 1.6vmin, 20px);
  background: var(--s1); border: 1px solid var(--line); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .8); animation: popIn .5s var(--ease-out) both; }
.result-card::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; background: var(--teal); }
.res-burst { display: none; }
.res-emblem { width: clamp(76px, 13vmin, 150px); aspect-ratio: 1; display: grid; place-items: center; }
.res-icon { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.res-title { margin: 0; font-size: clamp(32px, 7vmin, 92px); font-weight: 900; line-height: 1.25; color: var(--fg); }
.eyebrow#resEyebrow { color: var(--teal); }
.res-code { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: clamp(12px, 2vmin, 24px) clamp(26px, 5vmin, 68px); border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line-2); }
.res-code strong { font-size: clamp(34px, 7vmin, 96px); line-height: 1.2; letter-spacing: .14em; font-weight: 800; color: var(--fg); font-variant-numeric: tabular-nums; margin-inline-start: .14em; font-family: "Cairo", ui-monospace, monospace; }
.res-note { margin: 0; color: var(--fg-2); }
.res-note:empty { display: none; }
#doneBtn { min-width: 52%; margin-top: clamp(4px, 1vmin, 12px); }
#doneBtn .check { width: 1.05em; height: 1.05em; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.res-timer { position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--line); }
.res-timer i { display: block; height: 100%; background: var(--teal); transform-origin: right; }
@keyframes popIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } }

.confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 30; pointer-events: none; visibility: hidden; }
.toast { position: fixed; z-index: 40; left: 50%; bottom: calc(env(safe-area-inset-bottom) + clamp(16px, 4vmin, 48px)); transform: translate(-50%, 24px); max-width: min(92vw, 900px);
  padding: clamp(12px, 1.8vmin, 20px) clamp(18px, 3vmin, 34px); border-radius: var(--r-md); background: var(--s2); border: 1px solid var(--line-2); box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
  font-size: clamp(15px, 2.2vmin, 28px); text-align: center; opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s var(--ease-out); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.warn { border-color: rgba(233, 196, 106, .5); }

/* ---------------------------------------------------------------- on-screen keyboard */
.osk { position: fixed; z-index: 15; bottom: 0; inset-inline-start: 0; width: 54%; padding: clamp(10px, 1.4vmin, 18px) clamp(10px, 1.6vmin, 22px) calc(env(safe-area-inset-bottom) + clamp(10px, 1.6vmin, 22px));
  background: var(--bg-2); border-top: 1px solid var(--line); box-shadow: 0 -20px 50px rgba(0, 0, 0, .35); animation: sheetIn .3s var(--ease-out) both; }
@media (orientation: portrait) { .osk { width: 100%; } }
@keyframes sheetIn { from { transform: translateY(100%); } }
.osk-row { display: flex; gap: clamp(5px, .8vmin, 10px); justify-content: center; margin-bottom: clamp(5px, .8vmin, 10px); }
.osk-key { flex: 1 1 0; min-width: 0; height: clamp(54px, 7.2vmin, 90px); border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--s1);
  font-size: clamp(20px, 2.9vmin, 34px); font-weight: 700; transition: transform .08s, background-color .12s; }
.osk-key:active { transform: scale(.97); background: var(--s3); }
.osk-key.wide { flex-grow: 2.2; } .osk-key.xwide { flex-grow: 5; }
.osk-key.act { background: var(--teal); border-color: transparent; color: #fff; }
.osk.num { width: min(560px, 54%); }
@media (orientation: portrait) { .osk.num { width: 100%; } }
.osk.num .osk-key { height: clamp(62px, 8.2vmin, 100px); font-size: clamp(26px, 3.8vmin, 46px); }
body.osk-open .stage { padding-bottom: 46vh; }
@media (orientation: landscape) { body.osk-open.s-form .panel { align-content: start; } body.osk-open .stage { padding-bottom: clamp(16px, 4vmin, 56px); } }

/* ---------------------------------------------------------------- PIN */
.pin { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(20, 17, 17, .82); padding: 16px; }
.pin-card { width: min(400px, 94vw); border-radius: var(--r-xl); padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pin-dots { display: flex; gap: 14px; direction: ltr; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-2); transition: background .12s; }
.pin-dots i.on { background: var(--teal); border-color: var(--teal); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.pin-pad button { height: 64px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg-2); font-size: 26px; font-weight: 700; }
.pin-pad button:active { background: var(--s3); }

/* ---------------------------------------------------------------- admin */
.admin { position: fixed; inset: 0; z-index: 45; background: var(--bg); overflow: auto; -webkit-user-select: text; user-select: text; font-size: 16px; touch-action: auto; }
.admin-shell { max-width: 1280px; margin: 0 auto; padding: 20px clamp(12px, 3vw, 32px) 60px; }
.admin-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; position: sticky; top: 0; z-index: 2; padding: 14px 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.admin-top .h2 { font-size: 22px; flex: 1 1 auto; font-weight: 900; }
.admin .btn { font-size: 15px; min-height: 44px; padding: 0 18px; border-radius: var(--r-sm); }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-md); border: 1px solid var(--line); }
.tabs button { border: 0; background: none; padding: 8px 16px; border-radius: var(--r-sm); font-weight: 700; color: var(--fg-2); }
.tabs button.on { background: var(--teal); color: #fff; }
.tabs b { font-weight: 700; opacity: .8; }
.admin-status { font-size: 14px; color: var(--fg-3); margin: 12px 0 16px; }
.admin-status.off { color: var(--warn); }
.prize-head, .entries-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.prize-head .row { width: auto; }
.prize-list { display: grid; gap: 10px; }
.prize { display: grid; grid-template-columns: 64px minmax(160px, 2fr) repeat(3, minmax(90px, 1fr)) auto; gap: 12px; align-items: end; padding: 14px; border-radius: var(--r-md); background: var(--s1); border: 1px solid var(--line); }
.prize.off { opacity: .55; }
.prize .field { gap: 4px; }
.prize .label { font-size: 13px; }
.prize .field input, .prize .field select, .admin .field input, .admin .field select { min-height: 44px; font-size: 15px; border-radius: var(--r-sm); }
.prize-icon { width: 64px; height: 64px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg-2) center / 56% no-repeat; position: relative; }
.prize-icon::after { content: "✎"; position: absolute; inset-inline-end: -6px; bottom: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--teal); color: #fff; font-size: 12px; display: grid; place-items: center; }
.prize-extra { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; font-size: 14px; color: var(--fg-2); }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.swatches button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); padding: 0; }
.swatches button.on { outline: 2px solid #fff; outline-offset: 2px; }
.swatches input[type="color"] { width: 32px; height: 28px; border: 0; background: none; padding: 0; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line-2); }
.chip.pct { color: var(--teal); font-weight: 700; border-color: rgba(20, 165, 153, .4); }
.chip.out { color: var(--warn); border-color: rgba(233, 196, 106, .45); }
.prize-actions { display: flex; gap: 8px; }
.icon-btn { width: 44px; height: 44px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: transparent; display: grid; place-items: center; font-size: 17px; }
.icon-btn.del { color: var(--danger); }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; padding: 10px; border-radius: var(--r-md); background: var(--bg-2); grid-column: 1 / -1; }
.icon-grid button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: var(--r-sm); border: 1px solid var(--line); background: transparent; font-size: 12px; color: var(--fg-2); }
.icon-grid button.on { border-color: var(--teal); background: rgba(20, 165, 153, .12); }
.icon-grid img, .icon-grid .none { width: 40px; height: 40px; object-fit: contain; }
.icon-grid .none { display: grid; place-items: center; border-radius: 8px; border: 1px dashed var(--line-2); }
label.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-radius: var(--r-md); background: var(--s1); border: 1px solid var(--line); font-weight: 700; }
input[type="checkbox"] { appearance: none; width: 48px; height: 28px; border-radius: 99px; background: var(--s3); position: relative; transition: background .2s; flex: none; cursor: pointer; }
input[type="checkbox"]::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease-out); }
input[type="checkbox"]:checked { background: var(--teal); }
input[type="checkbox"]:checked::after { transform: translateX(-20px); }
[dir="ltr"] input[type="checkbox"]:checked::after { transform: translateX(20px); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: end; max-width: 980px; }
.danger { margin-top: 36px; padding: 18px; border-radius: var(--r-md); border: 1px solid rgba(255, 138, 122, .28); max-width: 980px; }
.danger h3 { margin: 0 0 4px; color: #ffc9c1; font-weight: 800; }
.danger .row { margin-top: 12px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.search { max-width: 520px; min-height: 46px !important; font-size: 15px !important; }
.table-wrap { overflow: auto; border-radius: var(--r-md); border: 1px solid var(--line); }
table.entries { width: 100%; border-collapse: collapse; font-size: 15px; }
.entries th, .entries td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); white-space: nowrap; }
.entries th { position: sticky; top: 0; background: var(--s1); color: var(--fg-2); font-weight: 700; }
.entries td.mono { direction: ltr; text-align: right; font-variant-numeric: tabular-nums; }
.entries tr.dup td { background: rgba(233, 196, 106, .05); }
.entries .tag { font-size: 12px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line-2); margin-inline-start: 6px; }
.empty { color: var(--fg-3); text-align: center; padding: 40px; }

@media (max-width: 760px) {
  .prize { grid-template-columns: 64px 1fr 1fr; }
  .prize > .field.name { grid-column: 2 / -1; }
  .prize-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .admin-top .h2 { font-size: 19px; }
}

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