/* VOICE occasion: a kids' toy brand, bright and bouncy
   IDEA a toy-box workshop: chunky outlined buttons like printed plastic, a dark forge plate where the creature spins
   PICTURE the live 3D creature on the forge plate, large, changing as kids pick parts
   COLOUR cream ground, navy ink, forge orange lead, purple support, logo candy colours as accents
   TYPE Fredoka Bold display + system sans text
   LAYOUT laptop: plate left, builder right; phone: plate on top (sticky slim), builder below */
@font-face { font-family: "Fredoka"; src: url("../assets/fonts/Fredoka-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
:root { color-scheme: light; --bg: #FFF6EC; --card: #FFFFFF; --ink: #2A2740; --muted: #5E5A73; --line: #2A2740; --soft: #F1E6D8; --forge: #FF6A2B; --forge-d: #C9420F; --purple: #8E7CF0; --pink: #FF7EB6; --teal: #2EC4A6; --yellow: #FFC531; --blue: #3D7EF2; --plate: #262335; --ok: #1E9E6A; --bad: #B42318; --r: 18px; }
:root[data-theme=dark], :root[data-theme=light] { color-scheme: light; }
* { box-sizing: border-box; min-width: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow-x: clip; }
h1, h2, h3 { font-family: "Fredoka", "Arial Rounded MT Bold", system-ui, sans-serif; font-weight: 700; line-height: 1.05; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--forge-d); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(5vw, 16px, env(safe-area-inset-left, 0px)); padding-right: max(5vw, 16px, env(safe-area-inset-right, 0px)); }
.band { padding-block: clamp(28px, 4vw, 56px); }

/* header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-bottom: 3px solid var(--ink); }
body::before { content: ""; position: fixed; inset: 0 0 auto 0; height: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 21; }
.top .wrap { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; padding-block: 8px; }
.logo img { height: 48px; width: auto; display: block; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 700; padding: 8px 12px; border-radius: 999px; }
.nav a[aria-current=page] { background: var(--ink); color: #fff; }
.acct { border: 3px solid var(--ink); background: var(--yellow); border-radius: 999px; padding: 6px 14px; font-weight: 800; }
@media (max-width: 600px) { .logo img { height: 38px; } .nav a { padding: 6px 9px; font-size: 15px; } .nav { margin-left: 0; width: 100%; justify-content: space-between; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 3px solid var(--ink); border-radius: 16px; padding: 8px 20px; font-weight: 800; font-size: 17px; background: var(--forge); color: #fff; box-shadow: 0 4px 0 var(--ink); text-decoration: none; transition: transform .08s; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn.alt { background: #fff; color: var(--ink); }
.btn.purple { background: var(--purple); }
.btn.small { min-height: 40px; padding: 4px 14px; font-size: 15px; border-radius: 12px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.link { border: 0; background: none; color: var(--forge-d); font-weight: 700; padding: 4px 0; text-decoration: underline; }
.danger { color: var(--bad); }

/* home */
.hero { background: var(--purple); color: #fff; border-bottom: 3px solid var(--ink); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 28px; align-items: center; padding-block: clamp(28px, 5vw, 64px); }
.hero h1 { font-size: clamp(40px, 6vw, 68px); }
.hero p { font-size: 19px; margin: 14px 0 22px; max-width: 34ch; }
.hero .plate { height: clamp(300px, 38vw, 440px); }
.hero .soon { display: inline-block; margin-top: 16px; background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); border-radius: 999px; padding: 4px 14px; font-weight: 800; }
@media (max-width: 800px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }
.steps3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 760px) { .steps3 { grid-template-columns: minmax(0, 1fr); } }
.tile { background: var(--card); border: 3px solid var(--ink); border-radius: var(--r); padding: 20px; box-shadow: 0 5px 0 var(--ink); }
.tile .n { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--ink); font-family: "Fredoka", sans-serif; font-size: 22px; margin-bottom: 10px; }
.tile h3 { font-size: 26px; margin-bottom: 6px; }
.forgeband { background: var(--plate); color: #fff; border-block: 3px solid var(--ink); }
.forgeband .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.forgeband img { width: min(100%, 520px); background: #fff; border-radius: 22px; padding: 14px 22px; border: 3px solid var(--ink); }
.forgeband h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 10px; }
.forgeband p { color: #E4E1F0; font-size: 18px; max-width: 46ch; }
@media (max-width: 800px) { .forgeband .wrap { grid-template-columns: minmax(0, 1fr); } }
.sec-h { font-size: clamp(30px, 4vw, 44px); margin-bottom: 18px; }
.foot { background: var(--ink); color: #DDD9EA; padding-block: 28px; font-size: 15px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: space-between; align-items: center; }
.foot a { color: #fff; }

/* plate */
.plate { position: relative; background-color: var(--plate); background-image: radial-gradient(rgba(255, 197, 49, .18) 1.2px, transparent 1.6px), radial-gradient(ellipse at 50% 110%, rgba(255, 106, 43, .45), transparent 60%); background-size: 11px 11px, 100% 100%; border: 3px solid var(--ink); border-radius: 24px; overflow: hidden; box-shadow: 0 6px 0 var(--ink); }
.plate canvas.view { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.plate .hint { position: absolute; left: 12px; right: 12px; bottom: 10px; text-align: center; color: #CFCBE0; font-size: 14px; pointer-events: none; }
.plate .msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #CFCBE0; padding: 20px; }

/* studio */
.studio { display: grid; grid-template-columns: minmax(0, 430px) minmax(0, 1fr); gap: 22px; align-items: start; }
.studio .side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 12px; }
.studio .plate { height: 440px; }
.studio .namebig { font-family: "Fredoka", "Arial Rounded MT Bold", system-ui, sans-serif; line-height: 1.1; font-size: clamp(28px, 3vw, 38px); overflow-wrap: anywhere; }
.studio .kindline { color: var(--muted); font-weight: 700; }
@media (max-width: 860px) { .studio { grid-template-columns: minmax(0, 1fr); } .studio .side { position: sticky; top: 104px; z-index: 5; background: var(--bg); padding-bottom: 8px; } .studio .plate { height: 250px; } .studio .side .meta { display: none; } }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button { border: 3px solid var(--ink); background: #fff; border-radius: 999px; padding: 6px 16px; font-weight: 800; }
.tabs button[aria-selected=true] { background: var(--ink); color: #fff; }
.pane { background: var(--card); border: 3px solid var(--ink); border-radius: var(--r); padding: 18px; box-shadow: 0 5px 0 var(--ink); }
.pane h3 { font-size: 24px; margin: 18px 0 8px; }
.pane h3:first-child { margin-top: 0; }
.pane .sub { color: var(--muted); margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; border: 3px solid var(--ink); background: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 700; }
.chip[aria-pressed=true] { background: var(--forge); color: #fff; }
.colrow { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 12px; align-items: center; margin-bottom: 10px; }
@media (max-width: 520px) { .colrow { grid-template-columns: minmax(0, 1fr); } }
.sws { display: flex; flex-wrap: wrap; gap: 6px; }
.sw { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--ink); }
.sw[aria-pressed=true] { box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--ink); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-weight: 800; }
.input { width: 100%; min-height: 48px; border: 3px solid var(--ink); border-radius: 14px; padding: 8px 12px; background: #fff; font-size: 18px; }
.note { font-size: 14px; color: var(--muted); }
.navrow { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* power */
.powercard { background: var(--plate); color: #fff; border: 3px solid var(--ink); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 10px; background-image: radial-gradient(ellipse at 20% 0%, rgba(255, 106, 43, .4), transparent 60%); }
.powercard .pname { font-family: "Fredoka", sans-serif; font-size: clamp(30px, 4vw, 40px); color: var(--yellow); line-height: 1.05; }
.powercard .pdesc { font-size: 18px; }
.powercard .tag { align-self: flex-start; background: var(--pink); color: var(--ink); border-radius: 999px; padding: 2px 12px; font-weight: 800; font-size: 14px; }
.powercard .tag.action { background: var(--teal); }
.powercard.forging { animation: glow .7s ease-in-out infinite alternate; }
@keyframes glow { to { box-shadow: 0 0 28px 8px rgba(255, 106, 43, .7); } }
@media (prefers-reduced-motion: reduce) { .powercard.forging { animation: none; } }

/* bio card */
.bio { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; background: #FFF9F2; border: 3px solid var(--ink); border-radius: var(--r); padding: 16px; }
.bio img { width: 100%; aspect-ratio: 1; background: var(--plate); border-radius: 14px; border: 3px solid var(--ink); }
.bio dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 10px 0 0; }
.bio dt { font-weight: 800; }
.bio dd { margin: 0; }
@media (max-width: 560px) { .bio { grid-template-columns: minmax(0, 1fr); } .bio img { max-width: 220px; } }
.soonbox { margin-top: 14px; background: #FFF3C4; border: 3px dashed var(--ink); border-radius: 14px; padding: 12px 14px; }

/* my creatures */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.cc { background: var(--card); border: 3px solid var(--ink); border-radius: var(--r); padding: 12px; box-shadow: 0 5px 0 var(--ink); display: flex; flex-direction: column; gap: 8px; }
.cc img { width: 100%; aspect-ratio: 1; background: var(--plate); border-radius: 12px; }
.cc h3 { font-size: 22px; overflow-wrap: anywhere; }
.cc .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.empty { text-align: center; padding: 30px 16px; }

/* banners, modal, forms */
.banner { background: #FFF3C4; border-bottom: 3px solid var(--ink); }
.banner .wrap { padding-block: 8px; font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; z-index: 50; max-width: calc(100vw - 32px); }
.modal { position: fixed; inset: 0; background: rgba(38, 35, 53, .6); display: grid; place-items: center; padding: 16px; z-index: 40; }
.modal .box { background: var(--bg); border: 3px solid var(--ink); border-radius: 22px; padding: 22px; width: min(460px, 100%); max-height: calc(100svh - 32px); overflow: auto; box-shadow: 0 6px 0 var(--ink); }
.modal h2 { font-size: 30px; margin-bottom: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; }
.check input { width: 24px; height: 24px; flex: none; margin-top: 2px; }
.err { color: var(--bad); font-weight: 700; min-height: 1.4em; }
.prose { max-width: 72ch; }
.prose h2 { font-size: 34px; margin: 26px 0 10px; }
.prose h3 { font-size: 22px; margin: 20px 0 6px; }
.prose p, .prose ul { margin: 0 0 12px; }
.panel2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 860px) { .panel2 { grid-template-columns: minmax(0, 1fr); } }
