.roulette-page{--wheel-ink:#344332;--wheel-coral:#b4513e;margin:0;min-height:100svh;height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr);background:var(--tools-bg);color:var(--tools-text);font-family:ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}
.roulette-page *,.roulette-page *::before,.roulette-page *::after{box-sizing:border-box}
.roulette-page [hidden],.roulette-page dialog:not([open]){display:none!important}
.roulette-page :is(h1,h2,p){margin:0}
.roulette-page button,.roulette-page input,.roulette-page textarea{font:inherit}
.roulette-page button{cursor:pointer}.roulette-page button:disabled{cursor:default}
.roulette-page :is(button,a,input,textarea):focus-visible{outline:3px solid #759559;outline-offset:4px}
.roulette-page .top{width:100%;max-width:none;min-height:66px;margin:0;padding:9px max(24px,env(safe-area-inset-right)) 9px max(24px,env(safe-area-inset-left));padding-top:max(9px,env(safe-area-inset-top));border:0;display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:nowrap}
.roulette-page .top h1{font-size:21px;font-weight:600;letter-spacing:-.045em;line-height:1.2}
.roulette-page .top nav{display:flex;width:auto;min-width:0;align-items:center;justify-content:flex-end;gap:3px;flex-wrap:wrap}
.roulette-page .top nav .tools-theme-control{margin-left:0}
.roulette-page .icon-button,.roulette-page .tools-theme-control,.roulette-page .tools-install-control{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;min-height:44px;flex:none;margin:0;padding:10px;border:0;border-radius:50%;background:transparent;color:var(--tools-text);text-decoration:none;transition:background .18s,transform .18s}
.roulette-page .icon-button svg,.roulette-page .tools-theme-control svg,.roulette-page .tools-install-control svg,.remove-button svg,.spin-button svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:none}
.roulette-page .icon-button:hover,.roulette-page .tools-theme-control:hover,.roulette-page .tools-install-control:hover{background:var(--tools-raised)}
.roulette-page .icon-button:active{transform:scale(.93)}.roulette-page .icon-button:disabled{opacity:.4}
.roulette-main{width:100%;height:100%;min-width:0;min-height:0;margin:0;display:grid;grid-template-rows:auto minmax(180px,1fr) auto auto auto;gap:8px;align-items:center;justify-items:center;padding:9px max(28px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(28px,env(safe-area-inset-left));overflow-y:auto;background:radial-gradient(ellipse at 50% 40%,#e6eac685,transparent 66%)}
.stage-question{max-width:min(900px,100%);min-width:0;text-align:center;font:400 clamp(23px,3.3vw,38px)/1.15 Georgia,serif;letter-spacing:-.035em;overflow-wrap:anywhere}
.wheel-stage{width:100%;height:100%;min-width:0;min-height:180px;position:relative;isolation:isolate;display:grid;place-items:center;container-type:size}
.wheel-frame{position:relative;width:min(82vw,calc(100dvh - 300px),620px);aspect-ratio:1;border-radius:50%;background:#f8f6ee;border:1px solid #c1c9b2;box-shadow:0 8px 0 #ccd1bd80,0 20px 60px #3d47261c}
@supports(width:1cqh){.wheel-frame{width:min(calc(100cqw - 42px),calc(100cqh - 36px),650px)}}
.wheel-frame::before{content:"";position:absolute;inset:-11px;border:1px dashed #9eae8f70;border-radius:50%;z-index:-1}
.wheel{display:block;width:100%;height:100%;overflow:visible;transform-origin:50% 50%;will-change:transform}
.wheel text{font-family:ui-sans-serif,system-ui,sans-serif;fill:var(--wheel-ink);font-weight:650;pointer-events:none}.wheel .slice{stroke:#f8f6ee;stroke-width:2}
.wheel-pointer{position:absolute;top:-12px;left:50%;transform:translateX(-50%);color:var(--wheel-coral);width:34px;height:43px;z-index:3;filter:drop-shadow(0 3px 1px #572e3422);transform-origin:50% 12px}.wheel-pointer svg{width:100%;height:100%;display:block}
.wheel-stage[data-spinning="true"] .wheel-pointer{animation:pointer-tick .18s ease-in-out infinite alternate}
.wheel-hub{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;flex-direction:column;width:74px;height:74px;border:4px solid #ffffff70;border-radius:50%;color:#526b3f;background:#fbfaf3;box-shadow:0 3px 10px #32432325;z-index:2;transition:box-shadow .2s}
.wheel-hub span{font:33px/1 Georgia,serif}.wheel-hub small{font:8px/1.6 ui-monospace,monospace;letter-spacing:.15em;margin-top:3px}.wheel-hub:hover:not(:disabled){box-shadow:0 2px 17px #32432355}
.wheel-result{width:min(720px,100%);min-height:58px;text-align:center;overflow-wrap:anywhere}.result-caption{font:10px/1.6 ui-monospace,monospace;letter-spacing:.06em;color:var(--tools-muted)}
.wheel-result h2{margin:3px 0 0;font:500 clamp(25px,3.8vw,43px)/1.13 Georgia,serif;letter-spacing:-.035em;color:var(--tools-text)}
.result-note{font-size:11px;line-height:1.6;color:var(--tools-muted);margin-top:5px!important}.wheel-result :empty{display:none}
.wheel-result[data-winner="true"] h2{color:#52723e;animation:result-in .45s ease-out}
.spin-controls{display:flex;align-items:center;justify-content:center;gap:12px;width:min(340px,100%);min-width:0}
.spin-button{display:flex;align-items:center;justify-content:center;gap:10px;min-width:0;flex:1;min-height:52px;padding:12px 22px;border:1px solid #a9c275;border-radius:999px;background:#d3e798;color:#29371d;font-size:15px!important;font-weight:650!important;line-height:1.4;box-shadow:0 3px 0 #adc17d;transition:background .15s,transform .15s}
.spin-button:hover:not(:disabled){background:#e0efb4;transform:translateY(-1px)}.spin-button:active:not(:disabled){transform:translateY(2px);box-shadow:0 1px 0 #adc17d}.spin-button:disabled,.remove-button:disabled{opacity:.45}
.remove-button{display:inline-flex;align-items:center;justify-content:center;min-height:48px;min-width:48px;flex:none;padding:12px;border:0;border-radius:50%;background:transparent;color:var(--tools-muted)}.remove-button:hover:not(:disabled){background:var(--tools-raised);color:var(--tools-text)}
.stage-status{max-width:min(650px,100%);font-size:11px;line-height:1.5;color:var(--tools-muted);text-align:center;overflow-wrap:anywhere}.stage-status:empty{display:none}.stage-status[data-error="true"]{color:#9f3829}
.roulette-dialog{width:min(560px,calc(100% - 32px));max-height:calc(100dvh - 32px);margin:auto;padding:26px;border:1px solid var(--tools-border);border-radius:24px;background:var(--tools-surface);color:var(--tools-text);box-shadow:0 24px 90px #15201a33;overflow-y:auto;overscroll-behavior:contain;animation:panel-in .2s ease-out}
.roulette-dialog::backdrop{background:#15201a66;backdrop-filter:blur(8px)}
.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:24px}.dialog-heading h2{font:400 30px/1.15 Georgia,serif;letter-spacing:-.04em}.dialog-heading .icon-button{margin-right:-7px}
.count-badge{display:inline-block;padding:5px 8px;border-radius:7px;background:var(--tools-raised);color:var(--tools-muted);font:10px/1.5 ui-monospace,monospace;white-space:nowrap}
.field-label{display:block;font-size:12px;font-weight:600;margin:0 0 9px}
.question-input{display:block;width:100%;min-width:0;min-height:46px;font-size:16px!important;line-height:1.5;color:var(--tools-text);background:var(--tools-bg);border:1px solid var(--tools-border);border-radius:10px;padding:10px 12px;margin-bottom:23px}
.field-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.field-heading .field-label{margin:0}
#options{display:block;width:100%;min-width:0;min-height:182px;max-height:420px;resize:vertical;background:var(--tools-bg);color:var(--tools-text);border:1px solid var(--tools-border);border-radius:12px;padding:13px 16px;font:16px/1.8 ui-sans-serif,system-ui,sans-serif}
#options[aria-invalid="true"]{border-color:#b4513e}
.editor-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px}.editor-bottom p{font-size:10px;line-height:1.6;color:var(--tools-muted);margin:9px 0;overflow-wrap:anywhere}
.text-button{min-height:44px;padding:8px 0;border:0;background:transparent;color:var(--tools-muted);font-size:12px!important;line-height:1.5;text-underline-offset:4px;flex:none}.text-button:hover:not(:disabled){text-decoration:underline;color:var(--tools-text)}.text-button:disabled{opacity:.4}
.options-error{font-size:12px;line-height:1.6;color:#9f3829;margin:5px 0 13px!important;overflow-wrap:anywhere}
.preset-list{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 0}.preset-list button{min-height:44px;padding:8px 13px;border:1px solid var(--tools-border);border-radius:999px;background:transparent;color:var(--tools-text);font-size:12px!important;line-height:1.5}.preset-list button:hover:not(:disabled){background:var(--tools-raised)}
.save-controls{padding-top:20px;margin-top:23px;border-top:1px solid var(--tools-border)}.save-controls .question-input{margin-bottom:8px}.save-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.save-button{min-height:44px;padding:10px 16px;border:1px solid var(--tools-border);border-radius:10px;background:var(--tools-raised);color:var(--tools-text);font-size:12px!important}.save-button:hover:not(:disabled){border-color:#759559}.save-button:disabled{opacity:.45}
.memory-status{font-size:11px;line-height:1.6;color:var(--tools-muted);margin:10px 0 0!important;overflow-wrap:anywhere}.memory-status:empty{display:none}.memory-status[data-error="true"]{color:#9f3829}
.local-note{display:flex;align-items:center;gap:9px;padding:18px 0 0;margin-top:17px;border-top:1px solid var(--tools-border);color:var(--tools-muted)}.local-note svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;flex:none}.local-note p{font-size:10px;line-height:1.6;margin:0;flex:1}.local-note .text-button{font-size:10px!important}
.memory-heading,.history-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.empty-note,.history-hint{font-size:12px;line-height:1.7;color:var(--tools-muted);margin:18px 0!important}.history-heading .history-hint{flex:1;min-width:150px}
.saved-list,.history-list{list-style:none;padding:0;margin:18px 0 0;display:grid;grid-template-columns:minmax(0,1fr);gap:0;min-width:0}
.saved-list li,.history-list li{min-width:0;border:0;border-top:1px solid var(--tools-border);border-radius:0;background:transparent;padding:18px 0}
.saved-list li[data-active="true"] strong::after{content:" · abierta";font-size:11px;font-weight:400;color:var(--tools-muted)}
.saved-list strong,.history-list strong{display:block;font-size:16px;font-weight:600;line-height:1.5;overflow-wrap:anywhere}.saved-list small,.history-list small,.history-list time{display:block;font-size:11px;line-height:1.6;color:var(--tools-muted);margin-top:6px;overflow-wrap:anywhere}.history-list small{margin:0 0 4px}
.memory-card-actions{display:flex;align-items:center;flex-wrap:wrap;gap:24px;margin-top:8px}.memory-card-actions button{background:transparent;border:0;min-height:44px;padding:6px 0;font-size:12px!important;color:var(--tools-muted)}.memory-card-actions button:first-child{color:var(--tools-text);font-weight:600}.memory-card-actions button:hover:not(:disabled){text-decoration:underline;text-underline-offset:4px}.memory-card-actions button:disabled{opacity:.4}
.confetti{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:4}.confetti i{position:absolute;left:50%;top:45%;width:7px;height:12px;border-radius:2px;animation:confetti-flight 1.3s cubic-bezier(.2,.7,.3,1) both;transform:translate(-50%,-50%);opacity:0}
html[data-theme="dark"] .roulette-main{background:radial-gradient(ellipse at 50% 40%,#52634726,transparent 68%)}html[data-theme="dark"] .wheel-result[data-winner="true"] h2{color:#c2dba7}html[data-theme="dark"] .wheel-frame{background:#ebe9de;box-shadow:0 8px 0 #45503d,0 20px 60px #0004}html[data-theme="dark"] .options-error,html[data-theme="dark"] .memory-status[data-error="true"],html[data-theme="dark"] .stage-status[data-error="true"]{color:#ffb2a4}
@keyframes pointer-tick{to{transform:translateX(-50%) rotate(-9deg)}}
@keyframes result-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@keyframes panel-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@keyframes confetti-flight{0%{opacity:0;transform:translate(-50%,-50%) scale(.4)}12%{opacity:1}80%{opacity:1}100%{opacity:0;transform:translate(var(--x),var(--y)) rotate(var(--r)) scale(.8)}}
@media(max-width:600px){.roulette-page .top{min-height:60px;padding:7px max(12px,env(safe-area-inset-right)) 7px max(12px,env(safe-area-inset-left));padding-top:max(7px,env(safe-area-inset-top));gap:0}.roulette-page .top h1{position:absolute;width:1px;height:1px;padding:0;clip-path:inset(50%);overflow:hidden;white-space:nowrap}.roulette-page .top nav{width:100%;justify-content:center;gap:0}.roulette-main{padding:8px max(14px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));gap:6px}.stage-question{font-size:26px}.wheel-result h2{font-size:30px}.wheel-result{min-height:52px}.spin-controls{width:min(310px,100%)}.spin-button{min-height:50px}.roulette-dialog{width:calc(100% - 16px);max-height:calc(100dvh - 16px - env(safe-area-inset-top));padding:22px 20px max(22px,env(safe-area-inset-bottom));margin:auto auto 8px}.dialog-heading h2{font-size:28px}}
@media(max-width:360px){.roulette-page .top{padding-left:max(6px,env(safe-area-inset-left));padding-right:max(6px,env(safe-area-inset-right))}.roulette-main{padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}.stage-question{font-size:23px}.wheel-hub{width:64px;height:64px}.wheel-hub span{font-size:29px}.roulette-dialog{padding-inline:17px}.local-note{flex-wrap:wrap}.local-note .text-button{margin-left:auto}}
@media(max-height:500px) and (min-width:620px){.roulette-page .top{min-height:54px;padding-top:max(5px,env(safe-area-inset-top));padding-bottom:5px}.roulette-main{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto auto;gap:8px 28px;padding-top:6px;padding-bottom:max(10px,env(safe-area-inset-bottom))}.wheel-stage{grid-column:1;grid-row:1/5;min-height:160px}.stage-question{grid-column:2;grid-row:1;font-size:25px}.wheel-result{grid-column:2;grid-row:2;align-self:center;min-height:0}.wheel-result h2{font-size:31px}.spin-controls{grid-column:2;grid-row:3}.stage-status{grid-column:2;grid-row:4}.wheel-frame{width:min(40vw,calc(100dvh - 115px),340px)}@supports(width:1cqh){.wheel-frame{width:min(calc(100cqw - 36px),calc(100cqh - 32px),650px)}}}
@media(prefers-reduced-motion:reduce){.roulette-page *,.roulette-page *::before,.roulette-page *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.confetti{display:none}}
