﻿*{box-sizing:border-box}html{background:#143c31;color:#fffefa;font-family:system-ui,-apple-system,sans-serif}body{margin:0}.app{height:100vh;height:100dvh;max-width:1100px;margin:auto;display:flex;flex-direction:column;gap:10px;padding:12px 16px 0}button,input{font:inherit}button{cursor:pointer;min-height:44px;border:1px solid #ffffff60;border-radius:10px;background:#ffffff10;color:#fffefa;padding:0 15px}button:focus-visible,input:focus-visible{outline:3px solid #ffe4a9;outline-offset:3px}header,.row{display:flex;align-items:center;justify-content:space-between;gap:12px}h1{font-size:1.15rem;margin:0}h1:first-letter{color:#e8cc94}.settings{background:#ffffff0c;border:1px solid #ffffff20;border-radius:16px;padding:8px 12px}.row{min-height:48px}.row input[type=checkbox]{width:44px;height:44px;accent-color:#e8cc94}.stepper{display:flex;gap:6px;align-items:center}.stepper button,.quick button{min-width:44px}.stepper input{width:64px;height:44px;border:1px solid #ffffff50;border-radius:10px;text-align:center;background:#0e3027;color:white;appearance:textfield}.quick{display:flex;justify-content:flex-end;gap:8px}.quick .selected{background:#e8cc94;color:#24372a;font-weight:bold}#error{color:#ffd1c7;margin:0}#error:not(:empty){margin-top:8px}.result{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;gap:8px}.cards{width:100%;flex:1;min-height:0;overflow-y:auto;display:flex;flex-wrap:wrap;align-content:center;justify-content:center;gap:10px;padding:8px}.card{flex:0 0 min(28%,170px);aspect-ratio:5/7;filter:drop-shadow(0 5px 8px #0004);color:#171717}.card.red{color:#c52232}.card svg{display:block;width:100%;height:100%}.cards[data-total="0"] .card,.cards[data-total="1"] .card{flex-basis:auto;width:min(70%,245px,calc((100dvh - 370px)*.714));min-width:110px}.cards[data-total="2"] .card,.cards[data-total="3"] .card,.cards[data-total="4"] .card{flex-basis:min(43%,200px)}.cards:not([data-total="0"]):not([data-total="1"]):not([data-total="2"]):not([data-total="3"]):not([data-total="4"]):not([data-total="5"]):not([data-total="6"]){align-content:flex-start}.back{background:#822936;border-radius:6%;padding:7px}.back div{height:100%;border:2px solid #fff3d6;border-radius:5%;display:grid;place-items:center;color:#fff3d6;font:4rem serif;background:repeating-linear-gradient(45deg,transparent 0 12px,#fff3d63b 13px 14px,transparent 15px 27px),repeating-linear-gradient(-45deg,transparent 0 12px,#fff3d63b 13px 14px,transparent 15px 27px)}#status{margin:0;text-align:center}footer{display:flex;flex-direction:column;align-items:center;gap:4px;padding-bottom:max(12px,env(safe-area-inset-bottom))}#draw{width:min(100%,440px);min-height:56px;background:#e8cc94;color:#24372a;border:0;border-radius:14px;font-size:1.15rem;font-weight:800}#draw:disabled{opacity:.7}#clear{border:0}.presenting .settings,.presenting h1,.presenting #clear{display:none}.presenting header{justify-content:flex-end}.presenting .cards[data-total="0"] .card,.presenting .cards[data-total="1"] .card{width:min(75%,420px,calc((100dvh - 180px)*.714))}.flipping .card{animation:flip .4s ease-out}@keyframes flip{from{transform:perspective(800px) rotateY(90deg);opacity:.3}to{transform:perspective(800px) rotateY(0);opacity:1}}@media(orientation:landscape){.cards[data-total="2"] .card,.cards[data-total="3"] .card,.cards[data-total="4"] .card{flex-basis:min(25%,180px)}.app{gap:4px}.settings{padding:2px 12px}.row{min-height:44px}}@media(max-height:650px){.cards{align-content:flex-start}.cards[data-total="0"] .card,.cards[data-total="1"] .card{width:140px}.presenting .cards[data-total="0"] .card,.presenting .cards[data-total="1"] .card{width:min(240px,40vh)}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;transition-duration:.001ms!important}}
