*{box-sizing:border-box;-webkit-tap-highlight-color:transparent} [hidden]{display:none!important}
:root{color-scheme:dark;font-family:system-ui,-apple-system,Segoe UI,sans-serif;color:#edf5ed;background:#10282b}
body{margin:0;min-height:100dvh;background:radial-gradient(ellipse at 50% 35%,#284448 0,transparent 65%),#10282b}
.wrap{max-width:760px;margin:auto;padding:24px 22px max(24px,env(safe-area-inset-bottom))}header{display:flex;justify-content:space-between;align-items:center;gap:10px}.back{color:#d2e2dc;text-decoration:none;font-size:14px;padding:10px 0}.solo,.eyebrow{font-size:10px;letter-spacing:2px;color:#a9bdb6;font-weight:700}.solo{letter-spacing:1px}.heading{text-align:center;margin:30px 0 23px}h1{font-size:clamp(34px,7vw,51px);letter-spacing:-2px;margin:7px 0;font-weight:800}h1 span{color:#edc867}.heading p{font-size:14px;color:#a9bdb6;margin:9px 0}.stats{display:flex;justify-content:center;border:1px solid #ffffff15;background:#061c204a;border-radius:18px;padding:16px 8px}.stats div{flex:1;text-align:center;border-right:1px solid #ffffff17}.stats div:last-child{border:0}.stats span{display:block;font-size:9px;letter-spacing:1.5px;color:#a9bdb6}.stats strong{display:block;font-size:25px;margin-top:5px;font-weight:600}#status{min-height:42px;text-align:center;color:#cfddd7;font-size:13px;line-height:1.5;margin:20px 0 8px}.board{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:30px 15px;max-width:600px;margin:0 auto;padding:18px 5px 28px}.bottle-button{position:relative;display:flex;flex-direction:column;align-items:center;background:none;border:0;padding:8px 3px;color:inherit;cursor:pointer;min-width:0;touch-action:manipulation;transition:transform .24s cubic-bezier(.2,.8,.2,1)}.bottle-button.selected{transform:translateY(-12px)}.bottle-button.selected .glass{border-color:#f3d47d;box-shadow:0 0 0 4px #edc86725,0 10px 22px #0005}.neck{width:24%;max-width:23px;height:15px;border:2px solid #b9d6d66b;border-radius:6px 6px 2px 2px;background:linear-gradient(90deg,#ffffff15,#ffffff03 65%,#ffffff25);z-index:1;position:relative;margin-bottom:-2px}.neck:before{content:'';position:absolute;inset:-5px -4px auto;height:7px;border:2px solid #b9d6d67d;border-radius:50%;background:#294245}.glass{position:relative;width:100%;max-width:58px;height:158px;border:2px solid #b9d6d66b;border-top-width:1px;border-radius:19px 19px 16px 16px;overflow:hidden;background:#ffffff05;box-shadow:inset 0 0 10px #ffffff0a,0 9px 14px #0003;transition:border-color .2s}.glass:after{content:'';position:absolute;inset:0;border-radius:inherit;background:linear-gradient(90deg,#ffffff02 2%,#ffffff36 12%,#ffffff09 24%,transparent 45%,#0002 78%,#ffffff28 94%);pointer-events:none}.liquid{position:absolute;left:0;right:0;bottom:0;height:94%;display:flex;flex-direction:column-reverse;justify-content:flex-start}.layer{height:25%;flex-shrink:0;background:var(--color);display:flex;justify-content:center;align-items:center;color:#14252b;font-size:18px;font-weight:900;border-top:1px solid #ffffff15}.layer:last-child{border-radius:50% 50% 0 0 / 6px 6px 0 0;box-shadow:inset 0 3px 0 #ffffff26}.mark{opacity:0}.show-symbols .mark{opacity:.8}.bottle-label{font-size:10px;color:#9cb5af;margin-top:11px;letter-spacing:1px}.finished .bottle-label{color:#edc867}.finished .neck{background:#b99b48}.receiving .glass{animation:settle .38s ease-out}.invalid{animation:shake .25s}.controls{display:flex;gap:9px;justify-content:center}button{font:inherit}.controls button,.dialog-actions button,.primary{border:1px solid #ffffff20;border-radius:13px;color:#e0ebe6;background:#ffffff08;padding:12px 14px;font-size:12px;font-weight:600;cursor:pointer;min-height:44px}.controls button{flex:1;max-width:180px}.controls span{display:block;font-size:23px;line-height:1;margin-bottom:7px}button:disabled{opacity:.35;cursor:default}button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible{outline:3px solid #edc867;outline-offset:5px}.primary{background:#edc867;color:#172c2d;border-color:#edc867;font-size:14px;padding:14px 24px}.symbols{display:flex;justify-content:center;gap:8px;align-items:center;font-size:12px;color:#b5c7bf;margin:23px 0;min-height:32px}input{accent-color:#edc867}details{border-top:1px solid #ffffff15;padding:18px 0;color:#a9bdb6;font-size:13px;line-height:1.7}summary{cursor:pointer;color:#d4e1d9}footer{text-align:center;font-size:10px;letter-spacing:1px;color:#7e9a92;padding-top:12px}.victory{text-align:center;background:#edc8670d;border:1px solid #edc86755;border-radius:18px;padding:24px;margin-bottom:24px}.victory>span{font-size:30px;color:#edc867}.victory h2{margin:5px}.victory p{font-size:14px;color:#b5c7bf}dialog{max-width:calc(100% - 32px);width:420px;border:1px solid #78918b;border-radius:20px;background:#173337;color:#edf5ed;padding:25px}dialog::backdrop{background:#051517bb}.dialog-actions{display:flex;gap:10px}dialog p{color:#b5c7bf;font-size:14px}@keyframes settle{40%{transform:translateY(2px) scaleX(1.025)}75%{transform:translateY(-1px)}}@keyframes shake{25%,75%{transform:translateX(-4px)}50%{transform:translateX(4px)}}@media(max-width:480px){.wrap{padding:14px 16px 24px}.heading{margin:20px 0}.board{grid-template-columns:repeat(4,minmax(0,1fr));gap:22px 14px;max-width:360px}.board.small{grid-template-columns:repeat(3,minmax(0,1fr));max-width:290px}.glass{height:137px;max-width:48px}.solo{font-size:8px}.controls button{padding:11px 6px}.stats span{font-size:8px;letter-spacing:1px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

/* A cópia animada deixa a grade estável e mantém o gargalo alinhado ao fluxo. */
.bottle-button:disabled{opacity:1}.pour-source{visibility:hidden}.pour-ghost{position:absolute!important;z-index:50;pointer-events:none;transition:none!important;margin:0;will-change:transform;filter:drop-shadow(0 12px 9px #0004)}
.pour-ghost .bottle-label{visibility:hidden}.pour-ghost .glass{border-color:#c9e4dfaa}.pour-ghost .layer,.pour-target .layer{min-height:0;overflow:hidden;border-top:0}
.pour-stream{position:absolute;z-index:51;width:6px;border-radius:4px;pointer-events:none;opacity:0;background-image:linear-gradient(90deg,#fff4,transparent 55%,#0002);box-shadow:0 0 5px #ffffff20;transform-origin:top}
.pour-ripple{position:absolute;left:24%;width:52%;height:7px;border:1px solid #ffffff85;border-radius:50%;background:var(--pour-color);z-index:2;pointer-events:none;opacity:0;animation:ripple .3s ease-out infinite}
.pour-target .glass{border-color:#d7ece6a0;box-shadow:0 0 16px #c0eee415}.just-completed .glass{animation:complete-glow .7s ease-out}.just-completed .bottle-label{animation:complete-label .5s ease-out}
@keyframes ripple{from{transform:scaleX(.55);filter:brightness(1.2)}to{transform:scaleX(1.3);filter:brightness(1)}}
@keyframes complete-glow{40%{box-shadow:0 0 0 5px #edc86730,0 0 25px #edc86755;border-color:#edc867}100%{box-shadow:0 9px 14px #0003}}
@keyframes complete-label{50%{transform:translateY(-3px) scale(1.1)}}
@media(prefers-reduced-motion:reduce){.pour-ripple,.just-completed .glass,.just-completed .bottle-label{animation:none!important}}

/* Interface compacta: instruções e opções ficam na ajuda. */
.sr-only,#status.sr-only{position:absolute!important;width:1px;height:1px;min-height:0;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.wrap{max-width:680px;padding-top:12px}header{gap:12px}header h1{font-size:20px;letter-spacing:-.6px;margin:0;text-align:center}.icon-button,.header-space{width:44px;flex:none}.icon-button{display:grid;place-items:center;height:44px;font-size:24px;padding:0;border-radius:12px}.stats{max-width:370px;margin:12px auto 0;padding:9px 4px;border-radius:14px}.stats div{display:flex;align-items:center;justify-content:center;gap:8px}.stats strong{font-size:19px;margin:0}.stats span{font-size:10px}.board{padding-top:50px;padding-bottom:14px}.bottle-label{height:12px;margin-top:8px;font-size:13px}.controls{max-width:300px;margin:0 auto;gap:12px}.controls button{min-height:48px;padding:10px}.controls span{margin:0;font-size:27px}.help{border:0;padding:12px 0 0}.help summary{display:grid;place-items:center;width:44px;height:44px;margin:auto;border:1px solid #ffffff20;border-radius:50%;font-size:18px;list-style:none}.help summary::-webkit-details-marker{display:none}.help-content{max-width:430px;margin:14px auto 0;padding:4px 16px;border-radius:14px;background:#ffffff06}.help .symbols{justify-content:flex-start;margin:12px 0}.victory{padding:15px;margin:0 auto 18px;max-width:370px}.victory h2{font-size:20px;margin-bottom:12px}@media(max-width:480px){.wrap{padding-top:8px}header h1{font-size:19px}.stats span{font-size:10px}.board{padding-top:48px;gap:16px 14px}.controls button{padding:10px}}

/* Destinos válidos ficam evidentes sem acrescentar texto à partida. */
.can-receive .glass{border-color:#8ad8bc;box-shadow:0 0 0 2px #8ad8bc32,0 0 17px #8ad8bc18}
.can-receive .bottle-label:empty:after{content:'↓';color:#a3e6cb;font-size:16px}
.bottle-button{user-select:none;-webkit-user-select:none}.controls button{touch-action:manipulation}
@media(max-width:480px){.controls{position:sticky;bottom:max(10px,env(safe-area-inset-bottom));z-index:10;padding:6px;border-radius:18px;background:#10282bf2;box-shadow:0 4px 20px #0004}.controls button{min-height:50px}.bottle-button{padding-left:0;padding-right:0}}

/* Agrupa os frascos sem reduzir a área de toque. */
.board{max-width:390px;column-gap:8px}
@media(max-width:480px){.board{max-width:266px;column-gap:6px}.board.small{max-width:202px}}

/* Controles acima do tabuleiro, em todas as telas. */
.controls{position:relative;bottom:auto;margin:14px auto 0;z-index:10}

/* Uma única barra e tabuleiro limitado à área visível. */
html,body{height:100%;overflow:hidden}body{min-height:0;height:100dvh}.wrap{height:100%;max-width:680px;padding:8px 12px max(6px,env(safe-area-inset-bottom));display:flex;flex-direction:column;position:relative;overflow:hidden}header{flex:none;min-height:44px}header h1{font-size:18px}.toolbar{display:flex;align-items:center;gap:6px;flex:none;width:100%;max-width:440px;margin:6px auto 0;padding:4px;border:1px solid #ffffff18;border-radius:14px;background:#061c204a}.stats{flex:1;min-width:0;margin:0;padding:0;background:none;border:0;gap:2px}.stats div{gap:4px;min-width:0}.stats strong{font-size:15px;white-space:nowrap}.stats span{font-size:9px;letter-spacing:0}.controls{position:static;flex:none;margin:0;gap:2px;padding:0;background:none;box-shadow:none;max-width:none}.controls button{flex:none;width:40px;min-height:40px;padding:5px;border-radius:10px}.controls span{font-size:24px}.board,.board.small{flex:1;min-height:0;width:100%;max-width:290px;margin:0 auto;padding:34px 5px 6px;gap:8px 6px;align-items:center}.bottle-button{height:100%;max-height:200px;justify-content:center;padding:8px 0}.glass{height:var(--bottle-height,100px);flex-shrink:0;max-width:48px}.neck{flex-shrink:0}.bottle-label{flex-shrink:0}.help{position:absolute;top:8px;right:12px;padding:0;z-index:60}.help summary{width:40px;height:40px}.help-content{position:fixed;top:62px;right:12px;left:12px;max-width:430px;max-height:calc(100dvh - 80px);overflow:auto;margin:0 auto;padding:12px 18px;background:#173337;border:1px solid #78918b;box-shadow:0 10px 40px #0009;border-radius:16px}.victory{position:absolute;z-index:55;top:50%;left:50%;transform:translate(-50%,-50%);width:260px;margin:0;background:#173337;box-shadow:0 0 0 100vmax #051517b3}.pour-ghost{justify-content:center}
@media(min-width:481px){.board,.board.small{max-width:390px}.glass{max-width:58px}}
@media(max-height:439px) and (min-width:481px){.wrap{max-width:760px;padding-top:2px}header{min-height:36px;height:36px}.toolbar{margin-top:0}.board,.board.small{max-width:600px;padding-top:26px}}

/* Alcance do polegar direito: ações no canto inferior e tabuleiro próximo. */
header{order:0}.board,.board.small{order:1;align-content:end;flex:1}.toolbar{order:2;max-width:440px;margin:6px 0 0 auto;gap:4px;padding:4px;position:relative;z-index:20;flex-shrink:0}.controls{gap:3px}.controls button{width:46px;min-height:48px}.controls #extra{order:0}.controls #restart{order:1}.controls #undo{order:2}.stats{gap:0}.stats div{gap:3px}.stats strong{font-size:14px}.stats span{font-size:9px}.wrap{padding-bottom:max(10px,env(safe-area-inset-bottom))}.help{top:auto;bottom:74px;right:12px}.help summary{width:44px;height:44px;background:#173337}.help-content{top:auto;bottom:126px;max-height:calc(100dvh - 150px)}
@media(max-width:480px){.board,.board.small{margin-left:auto;margin-right:0;padding-bottom:52px;max-width:290px}.board.small{max-width:250px}.toolbar{width:100%}.controls button{width:44px}.stats strong{font-size:13px}}
@media(max-height:439px) and (min-width:481px){.toolbar{margin-top:4px}.help{bottom:72px}.board,.board.small{padding-bottom:6px;max-width:calc(100% - 50px);margin-right:50px}.help-content{bottom:122px}}

/* O lugar do frasco em movimento continua disponível para enfileirar. */
.pour-source{visibility:visible;opacity:.3}.bottle-button[data-queued]:after{content:attr(data-queued);position:absolute;right:0;top:4px;min-width:20px;height:20px;display:grid;place-items:center;border-radius:50%;background:#edc867;color:#10282b;font-size:12px;font-weight:800;z-index:3}

/* O alcance do polegar é destinado aos frascos; a barra fica no topo. */
.toolbar{order:1;margin:6px auto 0;position:relative}.board,.board.small{order:2;flex:1;align-content:end;align-items:end;margin:0 0 0 auto;padding-bottom:8px}.controls #undo,.controls #restart,.controls #extra{order:initial}.help{top:8px;bottom:auto;right:12px}.help-content{top:62px;bottom:auto;max-height:calc(100dvh - 80px)}
@media(max-width:480px){.board,.board.small{max-width:250px;padding-bottom:max(8px,env(safe-area-inset-bottom));margin-right:0}.board:not(.small){max-width:266px}}
@media(max-height:439px) and (min-width:481px){.toolbar{margin:0 auto}.board,.board.small{max-width:600px;margin-right:0;padding-bottom:6px}.help{top:4px;bottom:auto}}
