:root{--scratch-ink:#21162b;--scratch-muted:#746979;--scratch-purple:#321850;--scratch-gold:#eabf68;--scratch-cream:#fffaf0}
.scratch-body{background:#100b18}
.scratch-page{position:relative;isolation:isolate;overflow:hidden;min-height:calc(100vh - 74px);padding:48px 20px 70px;color:#fff;background:radial-gradient(ellipse at 50% 12%,#44205c 0,#241231 42%,#100b18 80%)}
.scratch-page:before,.scratch-page:after{position:absolute;z-index:-1;content:"";pointer-events:none;border-radius:50%;filter:blur(1px)}
.scratch-page:before{width:290px;height:290px;top:80px;left:-170px;background:radial-gradient(circle,#ffb3472b,transparent 70%)}
.scratch-page:after{width:420px;height:420px;right:-230px;bottom:50px;background:radial-gradient(circle,#9d55cd26,transparent 70%)}
.scratch-page-inner{width:min(1060px,100%);margin:0 auto;text-align:center}
.scratch-top-label{display:inline-flex;align-items:center;gap:12px;color:#f6d588;font-size:10px;font-weight:800;letter-spacing:.22em}
.scratch-page h1{margin:13px 0 5px;color:#fff2d0;font-family:Manrope,Georgia,serif;font-size:clamp(38px,7vw,76px);line-height:1;letter-spacing:-.055em;text-shadow:0 5px 30px #efb84342}
.scratch-subtitle{max-width:620px;margin:14px auto 22px;color:#d4c7dc;font-size:15px;line-height:1.65}
.scratch-mystery-banner{display:inline-flex;align-items:center;justify-content:center;margin:0 auto 24px;padding:10px 18px;border:1px solid #eac87366;border-radius:999px;background:#ffd97812;color:#f5d88f;font-size:10px;font-weight:800;letter-spacing:.13em}
.scratch-game-panel{max-width:780px;margin:0 auto;padding:26px 30px 24px;border:1px solid #f3d27b5c;border-radius:24px;background:linear-gradient(145deg,#291a35f2,#1a1222f5);box-shadow:0 24px 80px #0008,0 0 55px #d99d3330,inset 0 1px #fff2;}
.scratch-section-heading{color:#fff1d0;font-family:Manrope,Georgia,serif;font-size:23px;font-weight:800}
.scratch-section-description{margin:7px 0 18px;color:#c9bdd0;font-size:13px}
.scratch-password-area{max-width:500px;margin:0 auto 23px}
.scratch-password-row{display:flex;gap:9px}
.scratch-password-row input{flex:1;min-width:0;height:48px;padding:0 15px;border:1px solid #ffffff28;border-radius:12px;outline:none;background:#110d18;color:#fff;font:inherit}
.scratch-password-row input:focus{border-color:#eac873;box-shadow:0 0 0 3px #eac87320}
.scratch-password-row input::placeholder{color:#91859a}
.scratch-unlock-button{padding:0 18px;border:0;border-radius:12px;background:linear-gradient(135deg,#ffdf8a,#dca83e);color:#29182c;font-size:11px;font-weight:900;letter-spacing:.06em;cursor:pointer;box-shadow:0 7px 24px #e6b84a30;transition:transform .18s,filter .18s}
.scratch-unlock-button:hover{transform:translateY(-1px);filter:brightness(1.05)}
.scratch-unlock-button:disabled{cursor:wait;opacity:.62;transform:none}
.scratch-message{min-height:20px;margin-top:8px;color:#e8d7af;font-size:12px;text-align:left}
.scratch-message.error{color:#ffaaa5}.scratch-message.success{color:#98e5ba}
.scratch-status-bar{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:0 auto 13px;padding:0 2px;color:#e8ddeb;text-align:left}
.scratch-status-text{font-size:13px;font-weight:700}.scratch-credit{padding:7px 11px;border:1px solid #e9c97040;border-radius:999px;background:#f5d57b12;color:#f7da91;font-size:10px;font-weight:900;letter-spacing:.06em;white-space:nowrap}
.scratch-grid{display:grid;grid-template-columns:repeat(var(--scratch-columns,3),minmax(0,1fr));gap:12px}
.scratch-tile{position:relative;min-width:0;aspect-ratio:1.24;overflow:hidden;border:1px solid #edc86d80;border-radius:15px;background:linear-gradient(145deg,#30203b,#20162a);box-shadow:0 7px 18px #0004,inset 0 1px #fff2;touch-action:none;user-select:none}
.scratch-tile:before{position:absolute;inset:4px;border:1px solid #ffe7a21d;border-radius:11px;content:"";pointer-events:none;z-index:1}
.scratch-tile.is-locked{filter:saturate(.72);opacity:.74}
.scratch-tile.is-scratchable{cursor:crosshair;box-shadow:0 0 0 2px #edc86d35,0 8px 24px #0005,0 0 22px #edc86d19}
.scratch-tile.is-scratchable:hover{transform:translateY(-1px)}
.scratch-prize-reveal{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:12px;background:radial-gradient(circle at 50% 10%,#fff9,transparent 52%),linear-gradient(145deg,var(--tile-color,#ffe1a1),#fff8e8);color:#271831;text-align:center;animation:scratch-reveal-in .38s cubic-bezier(.2,.9,.2,1) both}
.scratch-prize-reveal .prize-icon{font-size:clamp(27px,5vw,45px);line-height:1;filter:drop-shadow(0 3px 4px #43231730)}
.scratch-prize-reveal strong{max-width:100%;font-family:Manrope,Georgia,serif;font-size:clamp(12px,2vw,17px);line-height:1.2;overflow-wrap:anywhere}
.scratch-prize-reveal small{font-size:9px;font-weight:900;letter-spacing:.15em;text-transform:uppercase;opacity:.7}
.scratch-tile canvas{position:absolute;inset:0;width:100%;height:100%;z-index:2;touch-action:none;cursor:crosshair}
.scratch-tile.is-open{border-color:#ffdf8a;box-shadow:0 0 24px #e8bd5940}
.scratch-tile.is-open:after{position:absolute;inset:0;border:2px solid #ffe49b99;border-radius:14px;content:"";pointer-events:none;z-index:3}
.scratch-hint{margin:17px 0 0;color:#b9aebf;font-size:12px;line-height:1.7}
.scratch-footer{margin:20px 0 0;color:#8b7b91;font-size:9px;font-weight:800;letter-spacing:.22em}
.scratch-paused-card{max-width:520px;margin:22px auto 0;padding:35px 24px;border:1px solid #e5c16b55;border-radius:22px;background:#21162c;box-shadow:0 18px 55px #0006}
.scratch-paused-card>span{font-size:40px}.scratch-paused-card h2{margin:12px 0 6px;color:#fff0ce;font-family:Manrope,Georgia,serif}.scratch-paused-card p{color:#c3b7ca}.scratch-paused-card a{display:inline-flex;margin-top:10px;padding:11px 16px;border-radius:999px;background:#f1cf78;color:#28192e;font-size:12px;font-weight:800}
.scratch-confetti{position:fixed;inset:0;width:100%;height:100%;z-index:8;pointer-events:none}
@keyframes scratch-reveal-in{from{opacity:0;transform:scale(.88)}to{opacity:1;transform:scale(1)}}
.scratch-nav-link{color:#76501a!important;font-weight:800!important}

/* Admin controls */
.scratch-admin{display:grid;gap:22px}
.scratch-admin-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 24px;border:1px solid #e8d6a8;border-radius:20px;background:linear-gradient(115deg,#fff9e9,#fff 62%)}
.scratch-admin-hero-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}
.scratch-admin-hero h2{margin:5px 0;color:#26172f;font-family:Manrope,Georgia,serif;font-size:25px}.scratch-admin-hero p{margin:0;color:#716678;font-size:13px}
.scratch-admin-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.scratch-admin-stats article{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:15px 17px;border:1px solid #e9e4ec;border-radius:14px;background:#fff}.scratch-admin-stats article span{color:#756b7b;font-size:12px}.scratch-admin-stats article strong{color:#3c264a;font-size:14px}.scratch-admin-stats article strong.live{color:#167548}.scratch-admin-stats article strong.paused{color:#8c5d18}
.scratch-settings-panel{padding:21px}.scratch-settings-panel .panel-head{align-items:center}.scratch-settings-fields{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:16px}.scratch-settings-fields label,.scratch-prize-form label,.scratch-add-prize>label{display:grid;gap:7px;color:#44394c;font-size:12px;font-weight:700}.scratch-settings-fields small,.scratch-prize-form label small{display:block;color:#8b818e;font-size:10px;font-weight:500}.scratch-settings-fields input,.scratch-prize-form input:not([type=checkbox]),.scratch-add-prize input:not([type=hidden]){width:100%;min-width:0;min-height:40px;padding:9px 11px;border:1px solid #e4dfe7;border-radius:9px;background:#fff;color:#302538;font:inherit;font-size:13px}.scratch-settings-fields input[type=checkbox]{width:auto}
.scratch-password-field{display:grid;gap:7px}.scratch-password-field>label{display:block}.scratch-admin-actions{display:flex;justify-content:flex-end;margin-top:14px}
.scratch-section-head{display:flex;align-items:end;justify-content:space-between;gap:16px}.scratch-section-head h3{margin:3px 0;color:#2b1e33;font:800 20px Manrope,Georgia,serif}.scratch-section-head p{margin:4px 0 0;color:#746979;font-size:12px}.scratch-rule-badge{padding:8px 11px;border:1px solid #cbe8d7;border-radius:999px;background:#f1fbf5;color:#28734d;font-size:10px;font-weight:800;white-space:nowrap}
.scratch-prize-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.scratch-prize-card{padding:17px!important;border-top:3px solid var(--prize-color,#eabf68)!important}.scratch-prize-card.prize-exhausted{opacity:.72}.scratch-prize-top{display:flex;align-items:center;gap:11px;margin-bottom:14px}.scratch-prize-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:13px;background:color-mix(in srgb,var(--prize-color) 32%,white);font-size:25px}.scratch-prize-top>div{display:grid;gap:3px;flex:1}.scratch-prize-top small{color:#736a78;font-size:11px}.scratch-prize-top strong{color:#33263a;font-size:12px}.scratch-prize-form{display:grid;gap:11px}.scratch-prize-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.scratch-prize-fields:has(label:nth-child(3)){grid-template-columns:repeat(3,minmax(0,1fr))}.scratch-prize-form input[type=color],.scratch-add-prize input[type=color]{height:40px;padding:3px!important}.scratch-prize-flags{display:flex;align-items:center;justify-content:space-between;color:#6d6372;font-size:11px}.scratch-prize-flags label{display:flex;align-items:center;gap:7px}.scratch-prize-flags input{accent-color:#7651a0}.scratch-prize-flags span{font-variant-numeric:tabular-nums}.scratch-delete-form{display:flex;justify-content:flex-end;margin-top:9px}.scratch-delete-form button{border:0;background:transparent;color:#ae4b51;font-size:11px;font-weight:700;cursor:pointer}
.scratch-add-prize{display:grid;grid-template-columns:1.1fr 1.3fr 1fr .7fr .8fr .7fr auto;align-items:end;gap:12px;padding:18px!important}.scratch-add-prize>div{display:grid;gap:3px}.scratch-add-prize>div>span{color:#b38933;font-size:20px}.scratch-add-prize>div strong{color:#382844;font-size:13px}.scratch-add-prize>div small{color:#817687;font-size:10px}.scratch-history-panel{padding:20px!important}.scratch-history-panel .panel-head small{max-width:340px;color:#807587;line-height:1.5;text-align:right}
@media(max-width:850px){.scratch-add-prize{grid-template-columns:repeat(3,minmax(0,1fr))}.scratch-add-prize>div{grid-column:1/-1}.scratch-admin-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.scratch-page{padding:36px 13px 48px}.scratch-game-panel{padding:21px 13px 20px;border-radius:18px}.scratch-grid{gap:8px}.scratch-tile{border-radius:11px}.scratch-password-row{flex-direction:column}.scratch-password-row input,.scratch-unlock-button{height:46px}.scratch-unlock-button{width:100%}.scratch-status-bar{align-items:flex-start}.scratch-admin-hero{align-items:flex-start;flex-direction:column}.scratch-admin-hero-actions{justify-content:flex-start}.scratch-settings-fields,.scratch-prize-grid{grid-template-columns:1fr}.scratch-admin-stats{gap:8px}.scratch-admin-stats article{align-items:flex-start;flex-direction:column;gap:5px;padding:12px}.scratch-section-head{align-items:flex-start;flex-direction:column}.scratch-add-prize{grid-template-columns:repeat(2,minmax(0,1fr))}.scratch-add-prize>div{grid-column:1/-1}.scratch-add-prize button{grid-column:1/-1}.scratch-history-panel .panel-head{align-items:flex-start;flex-direction:column}.scratch-history-panel .panel-head small{text-align:left}.scratch-prize-fields:has(label:nth-child(3)){grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.scratch-prize-reveal{animation:none}.scratch-tile.is-scratchable:hover{transform:none}}
