@font-face{font-family:Jua;src:url("jua.woff2") format("woff2");font-display:swap}
@font-face{font-family:Gaegu;src:url("gaegu-title.woff2") format("woff2");font-display:swap;font-weight:700}
:root{font-family:"Malgun Gothic","Apple SD Gothic Neo",system-ui,sans-serif;color:#352645;background:#fff8f0;--purple:#6840a6;--muted:#655572}
*{box-sizing:border-box}
body{margin:0;min-height:100dvh;background:radial-gradient(ellipse at 3% 90%,#ffeadb,transparent 43%),radial-gradient(ellipse at 100% 10%,#e4f5e6,transparent 45%),#fff8f0}
[hidden]{display:none!important}
button,input{font:inherit}
button{cursor:pointer;color:inherit;border:0;font-weight:800;touch-action:manipulation}
button:focus-visible,input:focus-visible{outline:3px solid #844ec5;outline-offset:4px}
button:disabled{opacity:.55;cursor:default}
.top{display:flex;justify-content:space-between;align-items:center;gap:10px;width:min(1240px,100%);margin:auto;padding:13px clamp(16px,4vw,48px)}
.brand{font-family:Jua,system-ui,sans-serif;font-size:1.33rem;white-space:nowrap;display:flex;align-items:center;gap:9px}
.brand span{display:grid;place-items:center;color:#8d4392;background:#f5e2f0;width:34px;height:34px;border-radius:13px;font-size:21px}
nav{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
nav button,.secondary{border:1px solid #e7dcec;background:#fffdf9;border-radius:30px;padding:9px 15px;min-height:44px}
main{width:min(1150px,calc(100% - 32px));margin:0 auto;padding:0 0 18px}
.panel{border:2px solid #fff;border-radius:36px;background:#fffdf8;box-shadow:0 15px 35px #51375a12;text-align:center;padding:clamp(18px,3vw,40px);min-height:min(600px,calc(100dvh - 96px));display:grid;place-content:center;justify-items:center;gap:10px}
h1,h2,p{margin:0}
h1,h2,.primary{font-family:Jua,"Malgun Gothic",system-ui,sans-serif;font-weight:400}
h1{font-size:clamp(40px,5.1vw,80px);line-height:1.08;letter-spacing:-.035em}
h1 em{font-style:normal;color:var(--purple)}
h2{font-size:clamp(27px,4vw,49px);letter-spacing:-.027em}
p{color:var(--muted);line-height:1.5}
.primary{margin-top:8px;background:linear-gradient(155deg,#8051bd,var(--purple) 67%);color:white;min-width:200px;min-height:66px;border-radius:24px;font-size:clamp(24px,2.8vw,35px);padding:12px 26px;box-shadow:inset 0 1px #ffffff70,0 5px #4c317c,0 9px 16px #69469d38}
.primary:active{transform:translateY(3px);box-shadow:0 2px #483276}
.friends{position:relative;width:340px;height:185px;max-width:85vw;display:flex;justify-content:center;align-items:end;gap:47px;padding:0 12px 20px}
.mascot{position:relative;width:113px;height:108px;flex:none;isolation:isolate;--fur:#f98589;--edge:#d95967;--inner:#ffb8b8;--shine:#ffbbb8}
.bunny{transform:rotate(-8deg)}
.bear{--fur:#83cda1;--edge:#4e9e77;--inner:#b0e5b8;--shine:#bee9bd;transform:rotate(8deg)}
.face{position:absolute;inset:0;background:radial-gradient(ellipse at 25% 18%,var(--shine),transparent 59%),var(--fur);border:3px solid var(--edge);border-radius:49% 49% 43% 43%;z-index:1}
.ear,.arm,.foot{position:absolute;background:var(--fur);border:3px solid var(--edge)}
.ear{top:-43px;width:30px;height:63px;border-radius:55%;box-shadow:inset 0 0 0 6px var(--fur);background:var(--inner)}
.ear.left{left:20px;transform:rotate(-12deg)}.ear.right{right:20px;transform:rotate(12deg)}
.bear .ear{top:-13px;width:43px;height:43px}.bear .ear.left{left:0}.bear .ear.right{right:0}
.eye{position:absolute;background:radial-gradient(circle at 65% 23%,white 0 1.4px,transparent 1.8px),#463249;width:9px;height:13px;border-radius:50%;top:37px}
.eye.left{left:31px}.eye.right{right:31px}
.cheek{position:absolute;background:#fcd0c9;width:17px;height:10px;border-radius:50%;top:55px}
.cheek.left{left:14px}.cheek.right{right:14px}
.smile{position:absolute;width:17px;height:11px;border:3px solid #684455;border-top:0;border-radius:0 0 20px 20px;top:51px;left:calc(50% - 8px)}
.arm{left:-20px;top:50px;width:29px;height:20px;border-radius:85%;transform:rotate(33deg)}
.bear .arm{left:auto;right:-20px;transform:rotate(-33deg)}
.foot{bottom:-6px;width:31px;height:17px;border-radius:50%}.foot.left{left:12px}.foot.right{right:12px}
.friend-heart,.spark{position:absolute}.friend-heart{top:44px;color:#d96387;font-size:34px;transform:rotate(-11deg)}.spark{color:#bb7942;font-size:27px}.one{left:14px;top:31px}.two{right:12px;top:53px}
.name-form{width:min(440px,82vw);display:grid;gap:9px;justify-items:center;margin-top:8px}
.name-form label{font-weight:800;color:var(--muted)}
input{width:100%;text-align:center;border:2px solid #d9cbe8;border-radius:20px;background:white;padding:9px 12px;font-size:clamp(25px,4vw,38px);font-weight:900;color:var(--purple)}
.mic{width:106px;height:106px;background:#f4e8ff;border:3px solid #e6d3fc;border-radius:50%;display:grid;place-items:center;color:var(--purple);margin:7px}
.mic svg{width:49px;height:49px}.mic[aria-pressed=true]{background:#fadde8;border-color:#d96387;animation:pulse 1.3s infinite}
body:has(.writing){display:flex;flex-direction:column;height:100dvh}
body:has(.writing) .top{flex:none}
main:has(.writing){flex:1;min-height:0;padding-bottom:8px}
.writing{min-height:360px;display:grid;place-content:stretch;grid-template-rows:auto minmax(240px,1fr) auto;gap:9px;padding:12px clamp(12px,3vw,36px);height:100%}
.write-head,.write-footer{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;width:100%}
.write-head h2{font-size:clamp(19px,2.7vw,31px)}
.tiles{display:flex;justify-content:center;gap:5px;flex-wrap:wrap}
.tile{display:grid;place-content:center;background:#f6f0fa;border-radius:12px;min-width:37px;min-height:37px;padding:0 5px;font-size:24px;font-weight:900}
.tile.current{background:#eadefb;outline:2px solid #8755bd}.tile.done{background:#d9f1e5;color:#28634f}
.board{display:block;width:100%;height:100%;min-height:0;min-width:0;background:radial-gradient(circle,#e8e0ee 0 .65px,transparent 1px) center/24px 24px,#fff;border:2px solid #e3d7ec;border-radius:24px;touch-action:none;user-select:none}
.write-footer{min-height:50px}.write-footer .primary{min-height:48px;margin:0;font-size:20px;padding:6px 18px}
.board .start-dot{animation:pulse 1.3s infinite;transform-box:fill-box;transform-origin:center}
.stroke-guide{stroke:#e8e2ec}
.stroke-guide.current{stroke:#bda3dd}
.stroke-count{border-radius:15px;background:#efe4f8;color:#552d7b;padding:5px 11px;font-weight:800;font-size:16px;white-space:nowrap}
.celebrate{position:relative;overflow:hidden}.celebrate>*{z-index:1}
.confetti{position:absolute;inset:0;overflow:hidden;pointer-events:none}.confetti span{position:absolute;animation:float-in 1.2s both;font-size:clamp(23px,4vw,45px);color:#bd6e98}
.cards{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;margin:6px 0}
.card{background:#fde4ed;border-radius:19px;padding:12px 20px;font-size:clamp(26px,4.5vw,47px);font-weight:900;overflow-wrap:anywhere;max-width:100%}
.card:last-child{background:#daf0e4}
.duo{width:130px;height:85px;display:grid;place-items:center;position:relative}
.duo .friends{position:absolute;max-width:none;transform:scale(.46);margin:0}
.status{min-height:1.5em}
.panel:not(.writing){animation:scene-in .26s ease-out both}
.friends{isolation:isolate}
.friends::before{content:"";position:absolute;z-index:-1;bottom:12px;width:83%;height:24px;background:#e6d1f3;border-radius:50%;filter:blur(8px);opacity:.45}
.mascot{animation:bob 3.3s ease-in-out infinite;transform-origin:center bottom}
.bunny{--tilt:-8deg;--bounce:-8px}
.bear{--tilt:8deg;--bounce:-5px;animation-delay:-1.35s}
.mascot .arm{animation:wave 2.7s ease-in-out infinite;transform-origin:right center}
.bear .arm{--wave-start:-33deg;--wave-end:-53deg;transform-origin:left center;animation-delay:-1s}
.eye{animation:blink 5.4s infinite}
.bear .eye{animation-delay:-2s}
.face::after{content:"";position:absolute;top:12px;left:17px;width:23px;height:10px;border-radius:50%;transform:rotate(-22deg);background:#ffffffa0}
.bunny::after,.bear::after{position:absolute;z-index:2;right:-5px;top:-4px;line-height:1;text-shadow:0 1px #fff}
.bunny::after{content:"✿";color:#fff5d7;font-size:25px;text-shadow:1px 2px #b24f60}
.bear::after{content:"✦";color:#fff0ad;font-size:22px;top:1px;right:5px;text-shadow:1px 2px #427d65}
.friend-heart{animation:heart-float 3s ease-in-out infinite}
body[data-speaker=bunny] .bunny .smile,body[data-speaker=bear] .bear .smile{animation:talk .32s ease-in-out infinite alternate;background:#84495d}
body[data-speaker=bunny] .bunny .face,body[data-speaker=bear] .bear .face{box-shadow:0 0 0 4px #f4d495}
.name-head{display:flex;gap:10px;align-items:center;justify-content:center}
.mini{width:77px;height:43px;display:grid;place-items:center;position:relative;flex:none}
.mini .friends{position:absolute;max-width:none;transform:scale(.235);margin:0}
.write-head .mini{width:60px;height:38px}
.write-head .mini .friends{transform:scale(.184)}
.ink-spark{fill:#e3a742;stroke:#fff;stroke-width:3;pointer-events:none;animation:ink-pop .45s ease-out both;transform-box:fill-box;transform-origin:center}
.tile.done{animation:tile-pop .32s ease-out}
.celebrate .friends .mascot{animation:bob 1.6s ease-in-out infinite;--bounce:-12px}
.celebrate .friends .bear{animation-delay:-.4s}
.welcome{padding:clamp(16px,3vw,40px);grid-template-columns:1fr 1.05fr;place-content:stretch;place-items:center;gap:clamp(12px,3vw,38px);text-align:left}
.hero-copy{padding:clamp(8px,2vw,28px);justify-self:start}
.hero-copy h1{font-family:Gaegu,Jua,sans-serif;font-weight:700;font-size:clamp(33px,5.9vw,66px);line-height:1.03;letter-spacing:-.065em}
.hero-copy h1 em{background:linear-gradient(transparent 76%,#f3ddf8 76%,#f3ddf8 91%,transparent 91%);padding:0 .08em;margin-left:-.08em}
.hero-copy p{font-size:clamp(16px,2vw,23px);margin:clamp(11px,2vw,24px) 0}
.hero-art{position:relative;display:grid;place-items:center;align-self:stretch;min-height:290px;width:100%;overflow:hidden;border:2px solid #fffcf1;border-radius:30px;isolation:isolate;background:radial-gradient(ellipse 80% 40% at 91% 94%,#afdcb6 0 69%,transparent 70%),radial-gradient(ellipse 94% 52% at 9% 121%,#c7e6b4 0 88%,transparent 89%),linear-gradient(160deg,#ffefd4,#fde9ef 55%,#e8e1f8)}
.hero-art::before,.hero-art::after{content:"";position:absolute;z-index:-1;border-radius:50%;background:#fff8ed;opacity:.8}
.hero-art::before{width:108px;height:25px;top:19%;left:12%;box-shadow:28px -10px 0 3px #fff8ed}
.hero-art::after{width:69px;height:18px;right:12%;top:25%;box-shadow:-18px -8px 0 2px #fff8ed}
.hero-art .friends{max-width:none;transform:scale(1.2) translateY(8px)}
.hero-art .friends::before{background:#6b9970;bottom:5px;height:18px;width:76%;opacity:.28}
.hero-art .friend-heart{color:#d74f71}
.meadow-flower{position:absolute;line-height:1;font-size:35px;color:#fff4d5;text-shadow:1px 2px #78a986}
.meadow-flower.left{bottom:10%;left:8%;transform:rotate(-20deg)}
.meadow-flower.right{bottom:15%;right:10%;transform:rotate(22deg);color:#ffe5ee;font-size:27px}
.name-panel{background:radial-gradient(ellipse at 50% 24%,#fbecfc,transparent 57%),#fffdf8}
.name-panel .mic{background:linear-gradient(145deg,#fff2f9,#edd9ff);box-shadow:0 4px #d9bfeb,0 8px 22px #a66dc120}
.name-panel .mic[aria-pressed=true]{background:#ffe0e4}
.celebrate,.swap-panel{background:radial-gradient(ellipse at 15% 96%,#fde0e2,transparent 47%),radial-gradient(ellipse at 88% 8%,#dff2df,transparent 44%),#fffdf8}
.confetti span:nth-child(3n){color:#4c896c}
.confetti span:nth-child(3n+1){color:#bd7752}
@keyframes scene-in{from{opacity:.4;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes bob{0%,100%{transform:rotate(var(--tilt))}50%{transform:translateY(var(--bounce)) rotate(calc(var(--tilt) / 2))}}
@keyframes wave{0%,64%,100%{transform:rotate(var(--wave-start,33deg))}77%,90%{transform:rotate(var(--wave-end,56deg))}}
@keyframes blink{0%,47%,51%,100%{transform:scaleY(1)}49%{transform:scaleY(.14)}}
@keyframes talk{from{transform:scale(.9,.49)}to{transform:scale(1.04,1.16)}}
@keyframes heart-float{0%,100%{transform:rotate(-11deg)}50%{transform:translateY(-7px) rotate(-2deg)}}
@keyframes ink-pop{from{opacity:0;transform:scale(.45)}35%{opacity:1}to{opacity:0;transform:translateY(-52px) scale(1.12)}}
@keyframes tile-pop{50%{transform:scale(1.14)}}
@keyframes pulse{50%{opacity:.57;transform:scale(1.15)}}
@keyframes float-in{from{opacity:0;transform:translateY(22px) scale(.5)}to{opacity:.82;transform:none}}
@media(max-width:540px){.top{padding:9px 10px}.brand{display:none}nav{width:100%;justify-content:center}nav button{padding:7px 10px}.friends{transform:scale(.86);margin:-14px 0}.panel{border-radius:25px}}
@media(max-height:530px) and (orientation:landscape){.panel:not(.writing){padding:12px;gap:5px}.friends{height:110px;transform:scale(.66);margin:3px 0 -13px}.mic{width:68px;height:68px;margin:0}.mic svg{width:32px;height:32px}.primary{min-height:48px}.top{padding-top:5px;padding-bottom:5px}}
@media(max-width:860px){.hero-art .friends{transform:scale(.92)}}
@media(max-width:660px) and (orientation:portrait){
  .welcome{grid-template-columns:1fr;grid-template-rows:auto 1fr;place-content:center;text-align:center}
  .hero-copy{order:2;justify-self:center}
  .hero-copy h1{font-size:clamp(33px,11vw,56px)}
  .hero-art{min-height:220px}
  .hero-art .friends{transform:scale(.84)}
}
@media(max-height:530px) and (orientation:landscape){
  .hero-art{min-height:215px}
  .hero-art .friends{height:185px;transform:scale(.78);margin:0}
  .name-head{gap:7px}
  main:has(.writing){padding-bottom:0}
  .writing{min-height:310px;grid-template-rows:auto minmax(185px,1fr) auto;gap:6px;padding-block:7px}
  .write-footer{min-height:42px}
  .write-footer .primary{min-height:41px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;scroll-behavior:auto!important}}
