/* v9 visual polish. Layout changes only; the existing 3D canvas and draw flow stay intact. */
:root{--red:#b9233d;--ink:#273036;--line:#e9ded2;--cream:#fbf6ee;--gold:#d8ad63}
html{scroll-behavior:smooth}body{background:#f6efe6;background-image:radial-gradient(circle at 10% 4%,#ffdfd4 0,transparent 30%),radial-gradient(circle at 92% 30%,#f6e9ce 0,transparent 28%);color:var(--ink)}
button{transition:background .18s ease,transform .18s ease,box-shadow .18s ease;background:var(--red)}button:not(:disabled):hover{background:#981b33;transform:translateY(-1px);box-shadow:0 5px 14px #98233a30}button:not(:disabled):active{transform:translateY(0)}input,select{border-color:#d9cec3;color:var(--ink)}input:focus,select:focus{border-color:var(--red)}
header{background:#fffdf9ef;border-bottom:1px solid #eadbc9;backdrop-filter:blur(14px)}.header-inner{min-height:74px}.brand{gap:12px}.brand-icon{background:#b9233d;border-radius:13px;box-shadow:0 5px 14px #b9233d30,inset 0 -3px 0 #80172a}.brand b{color:#26343a;letter-spacing:.03em}.brand small{color:#a8404a}.header-actions nav a{border-color:#e9dccc;background:#fffaf3;color:#4d4040}.header-actions nav a:hover{background:#fff1e9;border-color:#c88484}.header-actions>button{min-height:43px}.header-actions #soundToggle{background:#faf1e9;color:#70434a;border:1px solid #ead4c7}.header-actions #soundToggle:hover{background:#fbe5db}
#ticker{background:#a82038;border-bottom:0;box-shadow:inset 0 -3px 0 #821329;padding:10px 16px;font-size:12px;scrollbar-width:thin}main{max-width:1320px;grid-template-columns:minmax(0,1fr) minmax(310px,355px);gap:24px;padding-top:28px}.hero,aside section{background:#fffdf9;border-color:#eadfd1;border-radius:22px;box-shadow:0 14px 40px #573d2612}.hero{border-top:5px solid #b9233d;padding:31px clamp(16px,3vw,36px);background:radial-gradient(circle at 50% 32%,#ffefd8 0,#fffdf9 42%)}.eyebrow{color:#a52039;border-color:#efc5b6;background:#fff2ea}.hero h1{color:#292f37;letter-spacing:.045em;line-height:1.18}.intro{font-size:14px;color:#615b59;line-height:1.8}
.machine-stage{margin-bottom:12px}.machine-stage:before{background:radial-gradient(circle,#f9c85d36,transparent 68%)}#machine3d{filter:drop-shadow(0 26px 26px #482b2d55)}#machineStatus{box-shadow:0 6px 20px #5e352a24}
#login,#player{background:#fffaf4;border:1px solid #e9d9c6;box-shadow:0 7px 22px #66472b12;padding:16px;border-radius:16px;gap:12px}#login label{font-size:12px;color:#62544d}#login input{background:#fff;min-height:45px}#login button,#player button{min-height:46px;padding-inline:18px}#player{grid-template-columns:minmax(0,1fr) auto 92px auto}.draw-remaining{padding:8px 11px;border-radius:10px;background:#fff0e7;color:#9b2037}#count{min-height:45px}
aside section{padding:20px}.section-title span{color:#a3263c}.section-title h2{color:#2e3337;font-size:22px}.prize-card{grid-template-columns:56px minmax(0,1fr);gap:9px 12px;padding:12px;background:#fffaf4;border-color:#efe0d1}.prize-card.grand{background:linear-gradient(120deg,#fff3fa,#fffaf3)}.prize-card.first{background:linear-gradient(120deg,#fffae9,#fffdf6)}.prize-card.second{background:linear-gradient(120deg,#f4f7fb,#fffdf9)}.prize-art{background:#f5e9dc}.prize-card h3{font-size:14px}.prize-card small{font-size:10px}.prize-card p{font-size:12px}.odds{grid-column:2;display:flex;align-items:baseline;gap:8px;text-align:left;white-space:normal}.odds b{font-size:13px;color:#98243d}.odds span{font-size:11px}.winner{gap:11px}.statistics{background:#fffaf4!important}.statistics b{color:#a62d44;font-size:25px}.statistics small{font-size:12px}
#myRecords{background:#fffaf5;border-color:#ead9c9;padding:20px;border-radius:16px}#myRecords h2{font-size:20px}#mySummary{background:#fcece5;color:#983047}#myHistory article{line-height:1.55}.result{background:#fffaf4;border-color:#ead9c9}.result b{color:#9b3046}.fortune-line{color:#87562e}.spotlight .fortune-line{color:#78501e}
dialog{width:min(980px,calc(100vw - 28px));max-height:min(90vh,900px);padding:27px;border:1px solid #e6d7c6;border-radius:20px;background:#fffdf9;overscroll-behavior:contain}dialog h2{margin-top:0}#adminLogin{padding:24px 8px;text-align:center}#adminLogin input{max-width:100%;margin:5px}.tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:7px;margin:16px 0;padding-bottom:9px;border-bottom:1px solid #eaded2;scrollbar-width:thin}.tabs button{flex:none;border:1px solid #e9d9ca;background:#f8f1e8;color:#60474a;padding:9px 13px}.tabs button:hover{background:#f4e5d8}.tabs button.active{background:#a8233b;color:#fff;border-color:#a8233b}.tabs button.active:hover{background:#8c1c32}#panel{min-width:0}#panel>h3{margin:22px 0 12px}#panel .row{background:#fffaf4;border-color:#ebdfd0;padding:12px}#panel .row span{min-width:0}#panel .row>span:last-child{display:flex;flex-wrap:wrap;gap:5px}#panel .row>span:last-child button{margin:0}#panel .prize-admin-item{background:#fff9f1;border-color:#eaddcc;padding:10px}.admin-prize-form{background:#fffdf9}.event-preview{background:#fff7eb;border-color:#ebcc9f}.receipt{background:#fff8ea}.report-grid>div{background:#f9eee2}.report-grid b{color:#9b233a}.form-hint{line-height:1.65}
@media(max-width:960px){main{grid-template-columns:1fr;max-width:760px}.header-actions nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:7px 8px calc(7px + env(safe-area-inset-bottom))}.header-actions nav a{min-width:0;max-width:none;padding:8px 3px;font-size:11px;line-height:1.25;display:grid;place-items:center}body{padding-bottom:calc(65px + env(safe-area-inset-bottom))}aside{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:16px}aside section+section{margin-top:0}aside .statistics{grid-column:1/-1}}
@media(max-width:650px){header{padding:0 12px}.header-inner{min-height:65px}.header-actions{gap:5px}.brand{gap:8px}.brand-icon{width:36px;height:36px;font-size:21px}.brand b{font-size:17px}.brand small{font-size:8px}.header-actions #soundToggle{font-size:11px;padding:8px 7px;min-height:38px}#adminBtn{width:38px;height:38px;min-height:38px;font-size:18px}main{padding:14px 10px 82px;gap:15px}.hero{padding:21px 12px 24px;border-radius:17px}.hero h1{font-size:clamp(31px,8.5vw,46px)}.machine-stage{height:clamp(295px,85vw,375px);margin:0 auto 10px}#machine3d{inset:-6px -45px -2px}#login{grid-template-columns:1fr;gap:10px;padding:13px}#login label,#login button{width:100%}#player{grid-template-columns:minmax(0,1fr) auto;padding:12px}#player .player-name{min-width:0}#player select,#player button{min-width:0;width:100%}aside{display:block}aside section+section{margin-top:14px}aside section{padding:16px}.prize-card{grid-template-columns:50px minmax(0,1fr)}.prize-art{width:50px;height:50px}.odds{grid-column:2}dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 24px);padding:18px 12px;border-radius:16px}.tabs{margin:12px 0}.tabs button{padding:9px 11px;font-size:12px}.row{align-items:stretch}.row>input{flex:1 1 125px}.row>span{flex:1 1 100%}.row>button{flex:1 1 auto}.event-form label{min-width:0}.report-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:380px){.brand small{display:none}.header-actions #soundToggle{font-size:10px}.machine-stage{height:290px}#machine3d{inset:0 -40px}.header-actions nav a{font-size:10px}}
@media(prefers-reduced-motion:reduce){button{transition:none}html{scroll-behavior:auto}}
