@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Prata&display=swap');

:root{font-family:Manrope,Arial,sans-serif;color:#46101d;background:#f8f4ee;font-synthesis:none}
*{box-sizing:border-box}
body{margin:0;min-width:320px}
button,input{font:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed}
button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #b52b3f;outline-offset:3px}
.brand{font-family:Prata,Georgia,serif;font-size:clamp(25px,3vw,39px);letter-spacing:-.07em;text-decoration:none;color:#51101d;white-space:nowrap}
.brand span{margin-left:.14em}
h1,h2,p{margin-top:0}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.wheel-page{min-height:100vh;min-height:100dvh;max-width:760px;margin:auto;padding:clamp(32px,5vh,60px) 24px 36px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.wheel-description{max-width:520px;margin:32px 0 22px;font-size:clamp(16px,2vw,21px);line-height:1.5;color:#583641}
.spin-button{border:0;background:#a31329;color:#fff;min-width:min(100%,320px);min-height:64px;border-radius:999px;padding:0 28px;display:inline-flex;align-items:center;justify-content:space-between;gap:28px;box-shadow:0 15px 30px #8d112526;font-size:18px;font-weight:700;transition:transform .2s,background .2s,box-shadow .2s}
.spin-button:hover:not(:disabled){transform:translateY(-3px);background:#7c0c1d;box-shadow:0 19px 35px #8d112536}
.spin-button:disabled{background:#987b7d;box-shadow:none}
.spin-button svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.availability{min-height:2.5em;max-width:450px;margin:17px 0 0;color:#785e63;font-size:13px;line-height:1.5}
.wheel-stage{position:relative;width:min(100%,min(61vh,590px));aspect-ratio:1;flex:none;display:grid;place-items:center}
.wheel-outer{position:relative;width:95%;aspect-ratio:1;border-radius:50%;padding:11px;background:linear-gradient(135deg,#f6d7a4,#9c622c 27%,#f7dbab 50%,#8c5428 77%,#edc684);box-shadow:0 18px 40px #3f10201d,inset 0 0 0 2px #fbe6c3;z-index:1}
.wheel-outer:after{content:"";position:absolute;inset:17px;border:1px solid #fff9;border-radius:50%;pointer-events:none;z-index:3}
.wheel{position:relative;width:100%;height:100%;border-radius:50%;overflow:hidden;border:4px solid #6c1225;box-shadow:inset 0 0 0 5px #fff7;transform:rotate(0deg);transition:transform 5.7s cubic-bezier(.13,.65,.11,1)}
.wedge-label{position:absolute;left:50%;top:50%;height:25%;width:27%;transform:translate(-50%,-50%) rotate(var(--angle)) translateY(-100%);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:#51101d;text-align:center;font-size:clamp(11px,1.1vw,17px);font-weight:800;line-height:1.15;text-shadow:0 1px 1px #fff6}
.wedge-text{display:flex;flex-direction:column;align-items:center;transform:rotate(calc(-1 * var(--angle)))}
.wedge-label.on-dark{color:#fff;text-shadow:none}
.wheel-center{position:absolute;z-index:4;left:50%;top:50%;transform:translate(-50%,-50%);width:23%;aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:50%;border:5px double #a67639;background:radial-gradient(circle at 30% 20%,#ffedc9,#d3a568 67%,#aa703b);box-shadow:0 5px 20px #2b051955;font-family:Prata,Georgia,serif;font-size:clamp(15px,1.65vw,25px);line-height:1.08;letter-spacing:-.06em}
.wheel-pointer{position:absolute;top:-1%;left:50%;transform:translateX(-50%);z-index:5;width:0;height:0;border-left:20px solid transparent;border-right:20px solid transparent;border-top:45px solid #641022;filter:drop-shadow(0 3px 2px #41102777)}
.wheel-pointer:before{content:"";position:absolute;width:11px;height:11px;border-radius:50%;background:#ecc792;top:-38px;left:-5.5px}
.wheel-shadow{position:absolute;bottom:-3%;left:20%;right:20%;height:11%;border-radius:50%;background:#7c32412b;filter:blur(25px)}
.empty-wheel{position:absolute;inset:0;display:grid;place-items:center;font-size:19px;font-weight:800;text-align:center}
.result-dialog{width:min(92vw,510px);border:1px solid #c9a9a2;padding:0;border-radius:22px;background:#faf5ef;color:#46101d;box-shadow:0 24px 80px #290b1b66;text-align:center}
.result-dialog::backdrop{background:#200813aa;backdrop-filter:blur(5px)}
.result-inner{padding:48px 40px 38px}
.result-symbol{display:block;font-size:42px;color:#a31329;margin-bottom:14px}
.result-dialog h2{font-family:Prata,Georgia,serif;font-size:42px;font-weight:400;letter-spacing:-.05em;margin-bottom:20px}
.result-prize{font-size:25px;font-weight:800;color:#a31329;margin-bottom:20px}
.result-instruction{color:#64474e;font-size:15px;line-height:1.6}
.result-code{font-weight:800;font-size:15px;margin:25px 0}
.dialog-close{background:#a31329;color:white;border:0;padding:14px 32px;border-radius:30px;font-weight:800}

.admin-page{background:#f7f3ee}
.admin-shell{max-width:1200px;margin:auto;padding:0 30px 70px}
.admin-header{height:98px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #dac8c1;color:#7c6067;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.admin-header .brand{font-size:27px;letter-spacing:-.07em;text-transform:none}
.login-panel{max-width:560px;margin:100px auto;background:white;border:1px solid #e3d7d1;padding:46px;border-radius:18px}
.login-panel h1,.dashboard h1{font-family:Prata,Georgia,serif;font-size:42px;letter-spacing:-.04em;font-weight:400;margin-bottom:15px}
.login-panel p{color:#765d63;line-height:1.5}
.login-panel label{display:block;margin:27px 0 8px;font-size:13px;font-weight:800}
.login-row{display:flex;gap:10px}
.login-row input{min-width:0;flex:1;border:1px solid #bca8aa;border-radius:8px;background:white;padding:12px 14px}
.login-row button,.mode-controls button{border:1px solid #a31329;border-radius:8px;background:#a31329;color:white;padding:12px 18px;font-weight:800}
.form-error{min-height:20px;margin:10px 0 0;color:#a31329!important;font-size:13px}
.dashboard{padding-top:50px}
.dashboard-top{display:flex;justify-content:space-between;align-items:start;gap:20px}
.dashboard-top p{color:#775f66}
.text-button{background:none;border:0;text-decoration:underline;color:#681426;font-size:14px}
.admin-stats{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;margin:30px 0}
.admin-stats>div{border-top:2px solid #75182a;padding-top:15px;display:flex;justify-content:space-between;align-items:baseline}
.admin-stats span{color:#785e63;font-size:14px}
.admin-stats strong{font-family:Prata,Georgia,serif;font-size:44px;font-weight:400}
.mode-section{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:25px 0;border-top:1px solid #d5c4bd;border-bottom:1px solid #d5c4bd}
.dashboard h2{font-family:Prata,Georgia,serif;font-size:25px;font-weight:400;margin:0 0 10px}
.mode-section p{font-size:13px;color:#7d666b;margin:0}
.mode-controls{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.mode-controls button{background:transparent;color:#601527;border-color:#bca7a7;font-size:12px;padding:10px 12px}
.mode-controls button.selected{background:#681426;border-color:#681426;color:white}
.admin-columns{display:grid;grid-template-columns:1fr 1.3fr;gap:48px;padding-top:38px}
.admin-columns>section{min-width:0}
.inventory-list,.spins-list{border-top:1px solid #dac8c1;margin-top:18px}
.inventory-row,.spin-row{display:flex;justify-content:space-between;align-items:center;gap:20px;min-height:55px;border-bottom:1px solid #e4d8d3;font-size:14px}
.inventory-row strong{white-space:nowrap}
.issued-heading{display:flex;align-items:baseline;justify-content:space-between;gap:15px}
.issued-heading span{color:#92797c;font-size:11px}
.spin-row{display:grid;grid-template-columns:60px 1fr auto;gap:14px}
.spin-row time{font-size:12px;color:#8c7779;white-space:nowrap}
.empty-list{color:#8c7779;padding:22px 0}

@media(max-width:1050px){.admin-columns{gap:25px}}
@media(max-width:760px){.wheel-stage{width:min(100%,min(53vh,480px))}.wedge-label{font-size:clamp(10px,2.5vw,15px)}.wheel-center{font-size:clamp(13px,3vw,20px)}.admin-columns{grid-template-columns:1fr}.mode-section{align-items:stretch;flex-direction:column}.mode-controls{justify-content:flex-start}}
@media(max-width:480px){.wheel-page{padding:28px 20px 24px;justify-content:center}.wheel-stage{width:min(100%,min(48vh,390px))}.wheel-outer{padding:7px}.wheel-outer:after{inset:11px}.wheel{border-width:3px}.wheel-pointer{border-left-width:13px;border-right-width:13px;border-top-width:30px}.wheel-pointer:before{top:-25px}.wheel-center{border-width:3px}.wedge-label{font-size:10px;width:30%;height:25%}.wheel-description{margin:24px 0 20px;font-size:16px}.spin-button{min-height:60px}.admin-shell{padding:0 20px 50px}.admin-header{height:76px}.admin-header .brand{font-size:21px}.admin-header>span{font-size:10px}.login-panel{padding:28px;margin:50px auto}.login-row{flex-direction:column}.dashboard{padding-top:30px}.admin-stats strong{font-size:36px}.spin-row{grid-template-columns:48px 1fr;gap:5px}.spin-row time{grid-column:2}.result-inner{padding:36px 25px}}
@media(prefers-reduced-motion:reduce){.wheel,.spin-button{transition:none!important}}
