:root{--stone:#8a8071;--stone-d:#574f44;--beige:#efe3c8;--beige-d:#d8c49b;--blue:#6f9bb0;--blue-d:#3f6a80;--accent:#c8793c;--ink:#3b342b}
*{box-sizing:border-box}
body{margin:0;font-family:ui-rounded,"Nunito","Segoe UI",system-ui,sans-serif;background:linear-gradient(160deg,var(--beige),#e9eef0 70%);color:var(--ink);min-height:100vh}
header{text-align:center;padding:28px 16px 8px}
header img{width:92px;height:92px;animation:wobble 4s ease-in-out infinite}
@keyframes wobble{50%{transform:rotate(-6deg) translateY(-3px)}}
@media (prefers-reduced-motion:reduce){header img{animation:none}}
h1{margin:6px 0 0;font-size:2rem;color:var(--stone-d)}
header p{margin:4px 0 0;color:var(--stone)}
main{max-width:760px;margin:16px auto 40px;padding:0 16px}
.card{background:#fffaf0;border:2px solid var(--beige-d);border-radius:22px;padding:20px;box-shadow:0 6px 0 var(--beige-d)}
.row{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:end}
@media(max-width:600px){.row{grid-template-columns:1fr}.swap{justify-self:center}}
label{display:block;font-weight:700;font-size:.85rem;color:var(--stone-d);margin-bottom:4px}
input,select{width:100%;padding:10px 12px;border:2px solid var(--beige-d);border-radius:12px;background:#fff;font:inherit;color:var(--ink)}
input:focus,select:focus,button:focus-visible{outline:3px solid var(--blue);outline-offset:1px}
.pick{display:flex;flex-direction:column;gap:6px}
.swap{border:0;background:var(--blue);color:#fff;font-size:1.4rem;border-radius:50%;width:46px;height:46px;cursor:pointer;box-shadow:0 3px 0 var(--blue-d)}
.swap:active{transform:translateY(2px);box-shadow:none}
.clicks{margin-top:16px}
.result{margin-top:20px;text-align:center;background:#e3edf3;border-radius:18px;padding:18px}
.big{font-size:3rem;font-weight:800;color:var(--blue-d);line-height:1}
.sub{color:var(--stone-d);margin-top:6px}
.warn{color:#a4553a;font-weight:700}
.note{font-size:.8rem;color:var(--stone);margin-top:6px}
table{width:100%;border-collapse:collapse;margin-top:12px;font-size:.9rem}
th,td{padding:6px 8px;text-align:left;border-bottom:1px solid var(--beige-d)}
th{color:var(--stone-d)}
h2{color:var(--stone-d);font-size:1.1rem;margin:24px 0 0}
footer{text-align:center;color:var(--stone);font-size:.8rem;padding:0 16px 30px}
/* retro pass */
body{font-family:"Trebuchet MS","Gill Sans",system-ui,sans-serif;background:var(--beige) repeating-linear-gradient(90deg,transparent 0 22px,rgba(138,128,113,.07) 22px 23px)}
h1{font-family:Georgia,"Palatino Linotype",serif;font-style:italic;letter-spacing:.02em;text-shadow:3px 3px 0 var(--beige-d)}
header::after{content:"";display:block;height:8px;max-width:260px;margin:14px auto 0;background:linear-gradient(var(--accent) 0 33%,var(--beige-d) 33% 66%,var(--blue) 66%)}
.card{background:#f8efd9;border:3px solid var(--stone-d);border-radius:10px;box-shadow:6px 6px 0 var(--stone-d)}
input,select{border:2px solid var(--stone-d);border-radius:6px;background:#fffaf0}
.swap{border-radius:6px;background:var(--accent);box-shadow:3px 3px 0 var(--stone-d)}
.swap:active{transform:translate(3px,3px)}
.result{background:var(--blue);border:3px dashed var(--stone-d);border-radius:8px;color:#fffaf0}
.big{font-family:"Courier New",monospace;color:#fffaf0;text-shadow:3px 3px 0 var(--blue-d)}
.sub{color:#fffaf0}.warn{color:#ffe3b0;background:var(--stone-d);padding:1px 6px}
h2,th{font-family:"Courier New",monospace;text-transform:uppercase;letter-spacing:.08em}
