:root{--bg:#f7f6ef;--ink:#282d22;--muted:#6b6e61;--line:#dedfd4;--bubble:#fffefa;--accent:#d9ed8c;--button:#2e3825;--button-text:#f9fbee;--shadow:rgba(52,49,27,.13);--focus:#7c9a33;font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif;color-scheme:light}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--bg:#1b211c;--ink:#f0f2e7;--muted:#a6afa0;--line:#394237;--bubble:#283027;--button:#d9ed8c;--button-text:#26301d;--shadow:rgba(0,0,0,.3);--focus:#d9ed8c;color-scheme:dark}}
:root[data-theme=dark]{--bg:#1b211c;--ink:#f0f2e7;--muted:#a6afa0;--line:#394237;--bubble:#283027;--button:#d9ed8c;--button-text:#26301d;--shadow:rgba(0,0,0,.3);--focus:#d9ed8c;color-scheme:dark}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);transition:background .35s,color .35s;min-width:280px}
button{font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
:focus{outline:none}
:is(button,a):focus-visible{outline:2px solid var(--focus);outline-offset:3px}
.potato-button:focus-visible{outline:none}
.potato-button:focus-visible:before{content:"";position:absolute;inset:16% 12% 4%;border-radius:50%;background:var(--accent);opacity:.6;z-index:-1}
button:disabled{cursor:default}
.page{max-width:1500px;margin:auto;min-height:100svh;display:flex;flex-direction:column;padding:30px 48px 24px}
header{display:flex;align-items:center;justify-content:space-between;gap:20px}
.wordmark{font-size:19px;font-weight:750;letter-spacing:-.7px;display:flex;align-items:baseline;gap:3px}
.wordmark span{font-size:14px;color:var(--muted);font-weight:400;letter-spacing:0}
.theme{width:46px;height:46px;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;background:transparent;color:var(--ink)}
.theme svg{width:20px;height:20px}
main{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:55px 0 38px}
h1{font-family:Georgia,"Times New Roman",serif;font-size:clamp(40px,5vw,68px);font-weight:400;letter-spacing:-2.7px;line-height:1.09;margin:0 0 17px;text-wrap:balance}
h1 em{font-weight:400}
.intro{font-size:17px;color:var(--muted);line-height:1.6;margin:0;text-wrap:balance}
.stage{display:flex;align-items:center;justify-content:center;width:100%;max-width:860px;margin:48px 0 18px;gap:8px;min-height:290px}
.character{position:relative;flex:0 0 310px;height:300px;display:grid;place-items:center}
.potato-button{display:block;width:300px;height:300px;border:0;padding:0;background:transparent;position:relative;z-index:1;transform-origin:50% 85%;animation:sway 5s ease-in-out infinite}
.potato-button img{width:100%;height:100%;object-fit:contain;display:block;filter:drop-shadow(0 14px 10px var(--shadow));user-select:none;-webkit-user-drag:none}
.potato-button:hover{animation:wiggle .6s ease-in-out infinite}
.potato-button.talking{animation:talk .35s ease-in-out infinite}
.potato-button.bounce{animation:hop .65s ease-in-out}
.potato-button.spin{animation:spin .9s cubic-bezier(.5,-.4,.5,1.4)}
.speech{position:relative;flex:1;text-align:left;background:var(--bubble);border:1px solid var(--line);border-radius:24px;padding:31px 35px;max-width:460px;min-height:219px;display:flex;flex-direction:column;justify-content:center}
.speech:before{content:"";position:absolute;width:18px;height:18px;left:-10px;top:55%;background:var(--bubble);border-left:1px solid var(--line);border-bottom:1px solid var(--line);transform:rotate(45deg)}
.joke-label{color:var(--muted);font-size:13px;letter-spacing:.8px;margin:0 0 15px}
.setup{font-size:23px;line-height:1.35;letter-spacing:-.5px;margin:0;max-width:360px}
.punch{font-family:Georgia,serif;font-style:italic;font-size:26px;line-height:1.25;color:var(--ink);margin:14px 0 0;min-height:34px;transition:opacity .25s,transform .25s}
.punch.hidden{opacity:0;transform:translateY(5px)}
.actions{display:flex;flex-direction:column;align-items:center;gap:14px;margin-top:8px}
.next{display:flex;gap:13px;align-items:center;justify-content:center;border:0;border-radius:100px;background:var(--button);color:var(--button-text);min-height:54px;min-width:185px;padding:15px 27px;font-size:16px;font-weight:600;transition:transform .2s,opacity .2s}
.next:hover{transform:translateY(-2px)}
.next:active{transform:translateY(1px)}
.next:disabled{opacity:.65}
.next svg{width:18px;height:18px}
.aside{font-size:13px;color:var(--muted);margin:0}
.aside kbd{font:inherit;border:1px solid var(--line);border-radius:5px;padding:0 5px}
.foot{display:flex;justify-content:space-between;gap:20px;align-items:center;color:var(--muted);font-size:13px;line-height:1.5;border-top:1px solid var(--line);padding-top:21px}
.foot p{margin:0}
.foot span{font-family:Georgia,serif;font-style:italic;font-size:15px}
.toast{position:absolute;bottom:4px;left:50%;transform:translateX(-50%);font-size:14px;color:var(--muted);opacity:0;transition:opacity .2s;white-space:nowrap}
.toast.show{opacity:1}
.lost h1{margin-top:10px}
.lost .potato-button{animation:lost 3s ease-in-out infinite}
.home{display:inline-flex;text-decoration:none;margin-top:28px}
@keyframes sway{0%,100%{transform:rotate(-2deg) translateY(0)}50%{transform:rotate(2deg) translateY(-7px)}}
@keyframes talk{0%,100%{transform:rotate(-2deg) translateY(0)}50%{transform:rotate(2deg) translateY(-4px)}}
@keyframes wiggle{0%,100%{transform:rotate(-4deg)}50%{transform:rotate(4deg)}}
@keyframes hop{0%,100%{transform:translateY(0) rotate(0)}40%{transform:translateY(-30px) rotate(-8deg)}70%{transform:translateY(0) scale(1.04,.96)}}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes lost{0%,100%{transform:rotate(-10deg) translateX(-12px)}50%{transform:rotate(10deg) translateX(12px)}}
@media(min-width:1500px){main{padding-top:65px;padding-bottom:65px}}
@media(max-width:650px){.page{padding:20px 16px}header .wordmark{font-size:17px}main{padding:42px 0 35px}h1{font-size:43px;letter-spacing:-1.8px}.intro{font-size:16px;max-width:290px}.stage{flex-direction:column-reverse;gap:8px;margin:29px 0 0;min-height:0}.speech{flex:auto;width:100%;max-width:360px;min-height:181px;padding:24px 26px;border-radius:21px}.speech:before{left:50%;top:auto;bottom:-10px;transform:rotate(-45deg)}.setup{font-size:21px}.punch{font-size:25px}.joke-label{margin-bottom:12px}.character{flex:0 0 218px;height:218px;width:245px}.potato-button{width:240px;height:240px;margin-top:-12px}.toast{bottom:-3px}.actions{margin-top:9px}.aside .keys{display:none}.foot{font-size:12px;align-items:flex-start}.foot p{max-width:170px}.foot span{font-size:14px;text-align:right;max-width:110px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
