/* Dewy's Runway: soft pastel candy, puffy buttons */
:root { --pink: #ffb8d8; --pink2: #ff8fb8; --mint: #9fe2b8; --sky: #a8dcff; --lilac: #d8c0ff; --lemon: #ffe58a; --ink: #4a3350; --ink2: #8a6a90; --cream: #fff6fa; --card: #ffffff; color-scheme: light; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: "Fredoka", "Huninn", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif; color: var(--ink); background: var(--cream); background-image: radial-gradient(#ffd8ea 2px, transparent 2px); background-size: 26px 26px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.view { display: none; max-width: 1100px; margin: 0 auto; padding: 10px 14px 30px; } .view.on { display: block; }
.top { display: flex; align-items: center; gap: 10px; padding: 4px 0 10px; padding-top: max(4px, env(safe-area-inset-top)); }
.sp { flex: 1; } .dim { color: var(--ink2); } .center { text-align: center; }
.ttl { font-size: 20px; }
.coins { background: #fff; border: 3px solid var(--ink); border-radius: 20px; padding: 3px 12px; box-shadow: 0 3px 0 var(--ink); white-space: nowrap; }
.ic { width: 44px; height: 44px; border-radius: 16px; border: 3px solid var(--ink); background: #fff; font-size: 20px; box-shadow: 0 3px 0 var(--ink); flex: none; }
.pill { border: 3px solid var(--ink); background: #fff; border-radius: 20px; padding: 5px 14px; box-shadow: 0 3px 0 var(--ink); font-weight: 600; }
.big { border: 3px solid var(--ink); background: var(--lemon); border-radius: 20px; padding: 12px 20px; font-size: 19px; font-weight: 700; box-shadow: 0 5px 0 var(--ink); }
.big.pink { background: var(--pink); } .big.mint { background: var(--mint); } .big.sky { background: var(--sky); } .big.lilac { background: var(--lilac); } .big.ghost { background: #fff; }
.big:active, .pill:active, .ic:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.dollbox svg { display: block; width: 100%; height: auto; border-radius: 22px; }

/* ---------------- home */
.hero { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 24px; align-items: center; }
.hero .dollbox { border: 4px solid var(--ink); border-radius: 26px; overflow: hidden; box-shadow: 0 8px 0 var(--ink); background: #fff; }
.htext h1 { font-size: 44px; margin: 0; } .htext p { font-size: 19px; color: var(--ink2); }
.menu { display: grid; gap: 12px; max-width: 380px; }

/* ---------------- dressing room */
.themebar { display: flex; flex-direction: column; background: #fff; border: 3px solid var(--ink); border-radius: 16px; padding: 3px 14px; box-shadow: 0 3px 0 var(--ink); } .themebar small { color: var(--ink2); font-size: 12px; } .themebar b { font-size: 19px; }
.timer { font-size: 22px; background: var(--mint); border: 3px solid var(--ink); border-radius: 16px; padding: 3px 12px; font-variant-numeric: tabular-nums; } .timer.low { background: #ff9a9a; animation: blink .5s infinite alternate; } @keyframes blink { to { transform: scale(1.06); } }
.room { display: grid; grid-template-columns: minmax(240px, 400px) 1fr; gap: 16px; align-items: start; }
.stagebox { position: sticky; top: 8px; }
.dollbox.big { border: 4px solid var(--ink); border-radius: 26px; overflow: hidden; box-shadow: 0 6px 0 var(--ink); }
.under { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; justify-content: center; } .under select { border: 3px solid var(--ink); border-radius: 14px; padding: 4px 8px; background: #fff; }
.done { width: 100%; font-size: 22px; background: var(--pink); }
.wardrobe { background: var(--card); border: 4px solid var(--ink); border-radius: 22px; padding: 10px; box-shadow: 0 6px 0 var(--ink); min-width: 0; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; }
.tabs button { flex: none; display: flex; flex-direction: column; align-items: center; gap: 1px; border: 3px solid transparent; background: #fff2f8; border-radius: 16px; padding: 4px 8px; font-size: 22px; min-width: 64px; }
.tabs button small { font-size: 11px; white-space: nowrap; } .tabs button.on { border-color: var(--ink); background: var(--pink); }
.colors { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 2px; border-bottom: 2px dashed #f2d2e2; margin-bottom: 8px; min-height: 44px; }
.slots { display: flex; gap: 6px; align-items: center; } .slots button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; background: var(--c); box-shadow: 0 0 0 2px var(--ink2); } .slots button.on { box-shadow: 0 0 0 3px var(--ink); transform: scale(1.12); }
.slots input { width: 34px; height: 34px; border: 0; padding: 0; background: none; }
.sw { display: flex; flex-wrap: wrap; gap: 4px; } .sw button { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(0,0,0,.15); background: var(--c); } .sw button.on { box-shadow: 0 0 0 3px var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 64vh; overflow-y: auto; padding: 2px; }
.it { position: relative; border: 3px solid #f2d2e2; background: #fff9fc; border-radius: 18px; padding: 4px; display: flex; flex-direction: column; align-items: center; }
.it svg { width: 100%; aspect-ratio: 1; height: auto; } .it small { font-size: 12px; line-height: 1.1; text-align: center; }
.it.on { border-color: var(--ink); background: #ffe8f2; box-shadow: 0 3px 0 var(--ink); } .it.lock svg { filter: grayscale(.9) opacity(.5); } .it em { position: absolute; top: 4px; right: 4px; font-style: normal; font-size: 11px; background: #fff; border-radius: 10px; padding: 0 5px; border: 2px solid var(--ink2); }
.it.none { justify-content: center; font-size: 30px; }
.faceopts h4 { margin: 8px 0 4px; } .opts { display: flex; flex-wrap: wrap; gap: 6px; } .opts button { width: 84px; border: 3px solid #f2d2e2; border-radius: 14px; background: #fff; padding: 2px; } .opts button.on { border-color: var(--ink); background: #ffe8f2; } .opts svg { width: 100%; height: auto; display: block; }
.faceopts .sw button { width: 32px; height: 32px; }

/* ---------------- runway */
.rw { position: relative; height: calc(100dvh - 20px); min-height: 560px; border: 4px solid var(--ink); border-radius: 26px; overflow: hidden; }
.rwbg { position: absolute; inset: 0; } .rwbg svg { width: 100%; height: 100%; }
.rw .top { position: relative; z-index: 3; padding: 10px; }
.spot { position: absolute; left: 50%; top: 0; width: 70%; height: 100%; transform: translateX(-50%); background: radial-gradient(ellipse at 50% 85%, rgba(255,250,220,.45), transparent 60%); }
.walker { position: absolute; left: 50%; bottom: 4%; width: min(46vh, 70vw); transform: translateX(-50%); animation: walkin 1.6s cubic-bezier(.2,.9,.3,1.1) both; z-index: 2; }
.walker svg { width: 100%; height: auto; } .walker.pose svg { animation: bounce .5s; }
@keyframes walkin { 0% { transform: translateX(80vw) translateY(0); } 25% { transform: translateX(40vw) translateY(-10px); } 50% { transform: translateX(10vw) translateY(0); } 75% { transform: translateX(-55%) translateY(-8px); } 100% { transform: translateX(-50%); } }
@keyframes bounce { 50% { transform: translateY(-14px) scale(1.03); } }
.spk { position: absolute; font-style: normal; font-size: 28px; animation: spk 1.2s ease-out forwards; } @keyframes spk { from { opacity: 0; transform: scale(.2); } 40% { opacity: 1; transform: scale(1.2); } to { opacity: 0; transform: translateY(-40px) scale(.8); } }
.nameplate { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); background: #fff; border: 3px solid var(--ink); border-radius: 20px; padding: 4px 18px; font-size: 22px; font-weight: 700; z-index: 3; box-shadow: 0 4px 0 var(--ink); }
.panel { position: absolute; left: 50%; top: 70px; transform: translate(-50%, -30px); opacity: 0; transition: .35s; z-index: 4; background: rgba(255,255,255,.95); border: 3px solid var(--ink); border-radius: 22px; padding: 10px 14px; width: min(520px, 92vw); box-shadow: 0 5px 0 var(--ink); }
.panel.up { transform: translate(-50%, 0); opacity: 1; }
.judges { display: flex; justify-content: space-around; text-align: center; } .judges div { display: flex; flex-direction: column; } .jav { font-size: 34px; } .judges b { color: #ffb21c; font-size: 18px; letter-spacing: 1px; } .judges small { font-weight: 700; }
.bars { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-top: 8px; } .bars span { position: relative; height: 22px; background: #f6e6f0; border-radius: 11px; overflow: hidden; } .bars i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--pink), var(--pink2)); border-radius: 11px; } .bars em { position: relative; font-style: normal; font-size: 13px; padding-left: 8px; line-height: 22px; font-weight: 600; }
.stars { display: flex; justify-content: center; gap: 6px; } .stars button { font-size: 34px; border: 0; background: none; filter: grayscale(1) opacity(.5); } .stars button.on { filter: none; transform: scale(1.15); }

/* ---------------- results */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin: 10px 0; }
.pod { width: 30%; max-width: 230px; display: flex; flex-direction: column; align-items: center; } .pod b { font-size: 18px; } .pod small { font-weight: 700; color: var(--ink2); }
.pod .step { width: 100%; text-align: center; font-size: 34px; font-weight: 700; border: 3px solid var(--ink); border-radius: 14px 14px 0 0; background: var(--lemon); }
.pod.p1 .step { height: 110px; background: #ffd84a; } .pod.p2 .step { height: 76px; background: #e8eef8; } .pod.p3 .step { height: 56px; background: #f2c08a; }
.pod.me b { color: #d83a7a; } .pod .dollbox svg { border-radius: 0; }
.rank { max-width: 460px; margin: 8px auto; padding: 0; list-style: none; } .rank li { display: flex; gap: 10px; background: #fff; border: 2px solid #f2d2e2; border-radius: 14px; padding: 6px 12px; margin: 4px 0; } .rank li span { margin-left: auto; font-weight: 700; } .rank li.me { border-color: var(--ink); background: #ffe8f2; }
.earn { text-align: center; font-size: 20px; font-weight: 700; }
.acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------------- shop, boxes, lookbook, online */
.boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.bx { border: 4px solid var(--ink); border-radius: 22px; background: var(--c); padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 5px 0 var(--ink); color: #fff; text-shadow: 0 2px 0 var(--ink); }
.bxart { font-size: 64px; } .bx b { font-size: 19px; } .bx em { font-style: normal; background: #fff; color: var(--ink); text-shadow: none; border-radius: 12px; padding: 2px 10px; border: 2px solid var(--ink); margin-top: 4px; }
.shopgrid { max-height: none; } .it.owned { opacity: .6; }
.unbox { text-align: center; padding: 10px; } .bxbig { font-size: 120px; display: inline-block; } .shake { animation: shake .25s infinite; } @keyframes shake { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } } .pop { animation: popx .45s forwards; } @keyframes popx { to { transform: scale(1.8); opacity: 0; } }
.rv { width: 200px; margin: 0 auto; background: #fff6fa; border-radius: 22px; border: 3px solid var(--ink); } .rv svg { width: 100%; height: auto; display: block; }
.looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; } .lk .dollbox { border: 3px solid var(--ink); border-radius: 20px; overflow: hidden; } .lk .row { display: flex; gap: 6px; justify-content: center; margin-top: 6px; }
.card { background: #fff; border: 4px solid var(--ink); border-radius: 24px; padding: 16px; max-width: 520px; margin: 10px auto; box-shadow: 0 6px 0 var(--ink); }
.card label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; } .card input { border: 3px solid var(--ink); border-radius: 14px; padding: 8px 10px; font-size: 18px; }
.card .row { display: flex; gap: 8px; margin-top: 12px; } .card .row input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 4px; text-align: center; } .card .row .big { flex: 1; }
.code { letter-spacing: 4px; color: #d83a7a; } .plist { list-style: none; padding: 0; font-size: 19px; } .card .dollbox { max-width: 240px; margin: 0 auto; }
dialog { border: 4px solid var(--ink); border-radius: 26px; padding: 18px; width: min(460px, calc(100vw - 24px)); background: var(--cream); color: var(--ink); box-shadow: 0 8px 0 var(--ink); } dialog::backdrop { background: rgba(74, 51, 80, .45); }
.x { position: absolute; right: 10px; top: 6px; border: 0; background: none; font-size: 30px; color: var(--ink2); }
.intro { text-align: center; } .intro h2 { font-size: 30px; margin: 4px 0; } .intro .mini svg { width: 160px; height: 200px; border-radius: 18px; border: 3px solid var(--ink); }
.toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 20px; z-index: 99; }
.conf { position: fixed; top: -10px; width: 10px; height: 16px; border-radius: 3px; z-index: 98; animation: fall 3s linear forwards; } @keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

@media (max-width: 760px) {
  .hero, .room { grid-template-columns: 1fr; } .htext h1 { font-size: 32px; } .hero .dollbox { max-width: 320px; margin: 0 auto; } .menu { max-width: none; }
  .stagebox { position: static; } .room .dollbox.big { max-width: 300px; margin: 0 auto; } .grid { max-height: none; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .walker { width: min(42vh, 82vw); }
}
