/* Rabiscou Criar: playful neo-brutalist look of the Rabiscou brand (yellow, black outlines, offset shadows). */
@font-face { font-family: "Bricolage"; src: url(/fonts/bricolage-800.woff2) format("woff2"); font-weight: 800; font-display: swap; }
:root {
  --y: #FFD400; --y2: #FFE45C; --ink: #111; --pink: #FF4FA3; --cyan: #00D1D1; --violet: #7B5CFF; --paper: #FFFDF5; --green: #19C37D; --red: #FF4D4D; --muted: #4a4a4a;
  --b: 3px solid var(--ink); --sh: 4px 4px 0 var(--ink); --sh2: 2px 2px 0 var(--ink); --r: 18px;
  --display: "Bricolage", system-ui, -apple-system, "Segoe UI", sans-serif; --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.45 var(--body); color: var(--ink); background: var(--y); -webkit-tap-highlight-color: transparent; }
body.zig { background-color: var(--y); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='22'%3E%3Cpath d='M0 16 L10 6 L20 16 L30 6 L40 16' fill='none' stroke='%23E8C000' stroke-width='3'/%3E%3C/svg%3E"); background-size: 40px 22px; }
body.center { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, .display { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.02; margin: 0; }
[hidden] { display: none !important; }
.card { background: #fff; border: var(--b); border-radius: var(--r); box-shadow: var(--sh); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border: var(--b); border-radius: 999px; background: #fff; box-shadow: var(--sh); font-weight: 800; font-size: 16px; text-decoration: none; transition: transform .08s, box-shadow .08s; user-select: none; -webkit-user-select: none; white-space: nowrap; }
.btn:active, .btn.down { transform: translate(2px, 2px); box-shadow: var(--sh2); }
.btn:disabled { opacity: .55; cursor: default; transform: none; box-shadow: var(--sh); }
.btn.pink { background: var(--pink); color: #fff; }
.btn.ink { background: var(--ink); color: #fff; box-shadow: 4px 4px 0 var(--pink); }
.btn.cyan { background: var(--cyan); }
.btn.yellow { background: var(--y); }
.btn.big { min-height: 58px; font-size: 19px; padding: 0 26px; }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 14px; box-shadow: var(--sh2); border-width: 2.5px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 2.5px solid var(--ink); border-radius: 999px; padding: 4px 12px; font-weight: 800; background: #fff; box-shadow: var(--sh2); font-size: 14px; }
.small { font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ top bar */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--y); border-bottom: var(--b); }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.logo img { width: 34px; height: 34px; }
.logo small { font-family: var(--body); font-size: 12px; font-weight: 800; background: var(--ink); color: var(--y); border-radius: 6px; padding: 1px 6px; letter-spacing: 0; }
.top .sp { flex: 1; }
.credits { border: 2.5px solid var(--ink); border-radius: 999px; background: #fff; box-shadow: var(--sh2); font-weight: 800; padding: 6px 12px; display: inline-flex; gap: 6px; align-items: center; min-height: 38px; }
.credits b { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ home */
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.hero { padding: 34px 0 18px; text-align: center; }
.hero h1 { font-size: clamp(40px, 11vw, 78px); text-transform: uppercase; color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--ink); line-height: 1; letter-spacing: .005em; word-spacing: .12em; }
.hero h1 em { font-style: normal; color: var(--pink); }
.hero .sub { font-size: clamp(17px, 4.4vw, 21px); font-weight: 650; max-width: 640px; margin: 16px auto 22px; }
.prompt { max-width: 720px; margin: 0 auto; padding: 14px; text-align: left; }
.prompt textarea { width: 100%; min-height: 108px; resize: none; border: 0; outline: 0; font-size: 18px; line-height: 1.35; background: transparent; padding: 4px 4px 8px; }
.prompt textarea::placeholder { color: #8a8a8a; }
.prompt .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; border-top: 2px dashed #ddd; padding-top: 12px; }
.prompt .cost { font-size: 13px; font-weight: 700; color: var(--muted); }
.prompt .btn { margin-left: auto; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: 760px; margin: 16px auto 0; }
.chip { border: 2.5px solid var(--ink); background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 15px; box-shadow: var(--sh2); }
.chip:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.section { padding: 26px 0; }
.section h2 { font-size: clamp(26px, 6.5vw, 38px); text-transform: uppercase; margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.gcard { display: block; text-decoration: none; background: #fff; border: var(--b); border-radius: 16px; box-shadow: var(--sh); overflow: hidden; }
.gcard .th { aspect-ratio: 1200/630; background: var(--ink) center/cover no-repeat; display: grid; place-items: center; font-size: 44px; border-bottom: var(--b); }
.gcard .gt { padding: 8px 10px 10px; }
.gcard .gt b { display: block; font-size: 15px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gcard .gt span { font-size: 12px; color: var(--muted); }
.gcard.busy .th { background: repeating-linear-gradient(45deg, #222, #222 10px, #2c2c2c 10px, #2c2c2c 20px); color: #fff; font-size: 14px; font-weight: 800; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; counter-reset: s; }
.steps li { background: #fff; border: var(--b); border-radius: 16px; box-shadow: var(--sh); padding: 16px; font-weight: 600; }
.steps li b { display: block; font-family: var(--display); font-size: 21px; margin-bottom: 4px; }
.steps li i { font-style: normal; font-size: 30px; display: block; margin-bottom: 6px; }
.faq details { background: #fff; border: var(--b); border-radius: 14px; box-shadow: var(--sh2); padding: 12px 14px; margin-bottom: 10px; }
.faq summary { font-weight: 800; cursor: pointer; }
.faq p { margin: 8px 0 0; }
footer.foot { padding: 26px 16px 40px; text-align: center; font-size: 14px; font-weight: 700; }
footer.foot a { margin: 0 8px; }

/* ------------------------------------------------------------------ sheets, toasts */
.scrim { position: fixed; inset: 0; background: rgba(17,17,17,.45); z-index: 60; opacity: 0; transition: opacity .2s; }
.scrim.on { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 88vh; overflow: auto; background: var(--paper); border-top: var(--b); border-radius: 22px 22px 0 0; padding: 18px 16px calc(22px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .24s cubic-bezier(.2,.8,.2,1); }
.sheet.on { transform: none; }
@media (min-width: 720px) { .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 520px; border: var(--b); border-radius: 22px; box-shadow: 8px 8px 0 var(--ink); transform: translate(-50%, -40%) scale(.96); opacity: 0; pointer-events: none; transition: transform .2s, opacity .2s; } .sheet.on { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; } }
.sheet h3 { font-size: 26px; margin: 0 0 6px; text-transform: uppercase; }
.sheet .x { position: absolute; right: 12px; top: 12px; width: 38px; height: 38px; border: 2.5px solid var(--ink); border-radius: 50%; background: #fff; font-weight: 900; box-shadow: var(--sh2); }
.packs { display: grid; gap: 12px; margin: 14px 0; }
.pack { display: flex; align-items: center; gap: 12px; padding: 14px; background: #fff; border: var(--b); border-radius: 16px; box-shadow: var(--sh); text-align: left; width: 100%; }
.pack .n { font-family: var(--display); font-size: 28px; min-width: 76px; }
.pack .n small { display: block; font-family: var(--body); font-size: 12px; font-weight: 700; }
.pack .d { flex: 1; font-size: 13px; color: var(--muted); font-weight: 600; }
.pack .v { font-weight: 900; font-size: 18px; background: var(--y); border: 2.5px solid var(--ink); border-radius: 999px; padding: 4px 12px; }
.pack.popular { background: #FFF2F8; }
.pack .tag { position: absolute; transform: translate(-6px, -30px); background: var(--pink); color: #fff; font-size: 11px; font-weight: 900; border: 2px solid var(--ink); border-radius: 999px; padding: 1px 8px; }
.pix { text-align: center; }
.pix img { width: 220px; height: 220px; image-rendering: pixelated; border: var(--b); border-radius: 12px; background: #fff; }
.pix .code { display: block; width: 100%; font: 12px/1.3 ui-monospace, monospace; word-break: break-all; background: #fff; border: 2px dashed #bbb; border-radius: 10px; padding: 8px; margin: 10px 0; max-height: 72px; overflow: auto; text-align: left; }
.pix .state { font-weight: 800; margin-top: 10px; }
.toast { position: fixed; left: 12px; right: 12px; margin: 0 auto; width: fit-content; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateY(160%); z-index: 80; max-width: 520px; background: var(--ink); color: #fff; border-radius: 16px; padding: 12px 14px; font-weight: 700; box-shadow: 4px 4px 0 var(--pink); display: flex; gap: 10px; align-items: center; transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.toast.on { transform: none; }
.toast button { background: var(--y); border: 2px solid #fff; border-radius: 999px; font-weight: 800; padding: 4px 10px; color: var(--ink); }
.nf { max-width: 420px; padding: 28px 22px; text-align: center; }
.nf .big { font-size: 56px; }
.nf h1 { font-size: 34px; margin: 6px 0; }
.legal { max-width: 760px; margin: 0 auto; padding: 22px 18px 60px; background: var(--paper); min-height: 100vh; border-left: var(--b); border-right: var(--b); }
.legal h1 { font-size: 36px; margin: 12px 0 8px; }
.legal h2 { font-size: 22px; margin: 22px 0 6px; }
.legal .back { font-weight: 800; text-decoration: none; }
.err { color: #b0003a; font-weight: 700; }
.spin { width: 18px; height: 18px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sp .7s linear infinite; display: inline-block; }
@keyframes sp { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
