/* ============ Quiz (criar.html) ============ */
.quiz-body { min-height: 100dvh; display: flex; flex-direction: column; }
.qbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.qbar-in { max-width: 760px; margin: 0 auto; padding: 14px 20px 12px; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 12px; }
.qbar .logo { justify-self: center; font-size: 1.2rem; }
.qback { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem; color: var(--ink-2); transition: transform 160ms var(--ease-out), opacity 150ms ease; }
.qback:active { transform: scale(.94); }
.qback[hidden] { display: grid !important; visibility: hidden; }
.qsteps { max-width: 760px; margin: 0 auto; padding: 0 20px 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.qseg { display: grid; gap: 7px; }
.qseg small { font-size: .74rem; font-weight: 600; color: var(--ink-3); transition: color 200ms ease; }
.qseg.on small { color: var(--ink); }
.qseg .qtrack { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; display: block; }
.qseg .qtrack i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform 400ms var(--ease-out); }
@media (max-width: 520px) { .qseg small { font-size: .68rem; } }

.qmain { flex: 1; display: flex; justify-content: center; padding: 28px 20px 140px; }
.stage { width: 100%; max-width: 680px; position: relative; }
.step { display: grid; gap: 26px; }
.step.enter { animation: stepIn 320ms var(--ease-out) both; }
.step.enter.back { animation-name: stepInBack; }
.step.leave { animation: stepOut 160ms ease-out both; }
.step.leave.back { animation-name: stepOutBack; }
@keyframes stepIn { from { opacity: 0; transform: translateX(28px); filter: blur(3px); } }
@keyframes stepInBack { from { opacity: 0; transform: translateX(-28px); filter: blur(3px); } }
@keyframes stepOut { to { opacity: 0; transform: translateX(-20px); filter: blur(3px); } }
@keyframes stepOutBack { to { opacity: 0; transform: translateX(20px); filter: blur(3px); } }

.qhead { display: grid; gap: 10px; }
.qkicker { font-size: .82rem; font-weight: 600; color: var(--accent); }
.qhead h1 { font-size: clamp(2.2rem, 6vw, 3.3rem); line-height: 1.06; }
.qhead h1 .nm { font-style: italic; color: var(--accent); font-weight: 500; }
.qhead p { color: var(--ink-2); font-size: 1.04rem; }

/* name input */
.name-wrap { display: grid; gap: 18px; }
.name-label { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.name-input {
  width: 100%; border: 0; background: transparent; padding: 6px 0 12px;
  font-family: var(--font-display); font-size: clamp(2.4rem, 8vw, 3.8rem); font-weight: 500; font-style: italic; color: var(--ink);
  border-bottom: 2px solid var(--line-2); outline: none; transition: border-color 200ms ease;
}
.name-input::placeholder { color: var(--ink-3); opacity: .55; }
.name-input:focus { border-color: var(--accent); }
.name-preview { display: flex; align-items: center; gap: 16px; padding: 14px 18px 14px 14px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); width: fit-content; max-width: 100%; }
.name-preview .disc { width: 58px; height: 58px; flex: none; border-radius: 50%; background: radial-gradient(circle, var(--surface) 0 5%, var(--accent) 5.5% 32%, var(--vinyl) 32.5%), repeating-radial-gradient(circle, var(--vinyl) 0 1.5px, var(--vinyl-2) 1.5px 2.6px); animation: spin 4s linear infinite; }
.name-preview small { display: block; font-size: .78rem; color: var(--ink-2); }
.name-preview b { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.45rem; line-height: 1.1; word-break: break-word; }

/* option cards */
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.opts.two { grid-template-columns: 1fr 1fr; }
.opt {
  position: relative; display: grid; gap: 10px; justify-items: start; align-content: start; text-align: left;
  padding: 18px 16px 16px; min-height: 112px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1.5px transparent;
  transition: transform 160ms var(--ease-out), box-shadow 200ms ease, background-color 200ms ease;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.opt .emo { font-size: 2.1rem; line-height: 1; display: inline-block; transition: transform 300ms var(--spring); }
.opt .lbl { font-weight: 600; font-size: 1.02rem; line-height: 1.25; }
.opt .sub { font-size: .84rem; color: var(--ink-2); line-height: 1.35; margin-top: -4px; }
.opt .check { position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; color: #fff; background: var(--accent); opacity: 0; transform: scale(.6); transition: opacity 150ms ease, transform 250ms var(--spring); }
.opt[aria-checked="true"] { background: var(--accent-soft); box-shadow: var(--shadow-sm), inset 0 0 0 2px var(--accent); }
.opt[aria-checked="true"] .check { opacity: 1; transform: scale(1); }
.opt[aria-checked="true"] .emo { transform: scale(1.12) rotate(-6deg); }
.opt:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) {
  .opt:hover { transform: translateY(-3px); box-shadow: var(--shadow), inset 0 0 0 1.5px var(--line-2); }
  .opt:hover .emo { transform: scale(1.14) rotate(-6deg); }
  .opt[aria-checked="true"]:hover { box-shadow: var(--shadow), inset 0 0 0 2px var(--accent); }
  .opt:active { transform: scale(.96); }
}
.opt.big { min-height: 168px; padding: 24px 22px; }
.opt.big .emo { font-size: 2.8rem; }
.opt.big .lbl { font-size: 1.2rem; }
@media (max-width: 520px) {
  .opts { grid-template-columns: 1fr 1fr; gap: 10px; }
  .opt:not(.big) { grid-template-columns: auto 1fr; align-items: center; justify-items: start; gap: 4px 10px; min-height: 64px; padding: 12px 12px; }
  .opt:not(.big) .emo { font-size: 1.6rem; grid-row: span 2; }
  .opt:not(.big) .lbl { font-size: .95rem; }
  .opt:not(.big) .sub { margin-top: 0; font-size: .78rem; grid-column: 2; }
  .opt:not(.big) .check { top: 6px; right: 6px; width: 20px; height: 20px; font-size: .72rem; }
  .opt-wrap .opt { padding-right: 52px; }
  .prev { top: 50%; bottom: auto; translate: 0 -50%; }
}

/* genre preview button */
.opt-wrap { position: relative; }
.opt-wrap .opt { width: 100%; height: 100%; padding-right: 56px; }
.prev { position: absolute; right: 10px; bottom: 10px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--ink); font-size: 1rem; box-shadow: inset 0 0 0 1.5px var(--line-2); transition: transform 160ms var(--ease-out), background-color 150ms ease, color 150ms ease; }
.prev:active { transform: scale(.92); }
.prev .wave { display: none; height: 14px; color: #fff; }
.prev.is-playing { background: var(--accent); color: #fff; box-shadow: none; }
.prev.is-playing i { display: none; }
.prev.is-playing .wave { display: inline-flex; }

/* letter textarea */
.letter {
  position: relative; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm);
  padding: 22px 22px 16px; transition: box-shadow 200ms ease;
}
.letter:focus-within { box-shadow: var(--shadow), inset 0 0 0 1.5px var(--accent); }
.letter label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.letter textarea {
  width: 100%; min-height: 168px; resize: vertical; border: 0; outline: none; background: transparent;
  font-family: var(--font-display); font-size: 1.32rem; line-height: 32px; color: var(--ink);
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--line) 31px 32px);
  background-attachment: local; padding: 0;
}
.letter textarea::placeholder { color: var(--ink-3); font-style: italic; }
.letter-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.notes { display: inline-flex; gap: 2px; font-size: 1.15rem; color: var(--line-2); }
.notes i { transition: color 200ms ease, transform 300ms var(--spring); }
.notes i.on { color: var(--accent); transform: translateY(-2px); }
.meter-msg { font-size: .88rem; font-weight: 500; color: var(--ink-2); }
.meter-msg.good { color: var(--ok); }
.count { font-size: .8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips-label { font-size: .82rem; font-weight: 600; color: var(--ink-2); margin-bottom: -14px; }
.chip-btn { padding: 9px 14px; border-radius: var(--pill); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-2); font-size: .9rem; font-weight: 500; transition: transform 160ms var(--ease-out), background-color 150ms ease, box-shadow 150ms ease; display: inline-flex; align-items: center; gap: 6px; }
.chip-btn i { font-size: .9rem; color: var(--accent); }
.chip-btn:active { transform: scale(.95); }
.chip-btn.used { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
@media (hover: hover) and (pointer: fine) { .chip-btn:hover { box-shadow: inset 0 0 0 1.5px var(--ink); } }

/* bottom action bar */
.qfoot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 62%, transparent); }
.qfoot-in { max-width: 680px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.qfoot .btn { flex: 1; }
.qfoot .hint { font-size: .8rem; color: var(--ink-3); white-space: nowrap; }
.qfoot .hint kbd { font-family: var(--font-body); font-size: .74rem; padding: 2px 6px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--line-2); }
@media (max-width: 640px), (hover: none) { .qfoot .hint { display: none; } }
.qfoot.hide { transform: translateY(110%); transition: transform 250ms var(--ease-out); }
.qfoot { transition: transform 250ms var(--ease-out); }
.skip { color: var(--ink-2); font-weight: 600; padding: 0 18px; min-height: 54px; border-radius: var(--pill); }
.skip:active { transform: scale(.97); }

/* composing */
.composing { display: grid; justify-items: center; text-align: center; gap: 28px; padding-top: 6vh; }
.composing .big-disc { width: min(260px, 64vw); aspect-ratio: 1; border-radius: 50%; position: relative; background: radial-gradient(circle, var(--bg) 0 3%, var(--accent) 3.5% 30%, var(--vinyl) 30.5%), repeating-radial-gradient(circle, var(--vinyl) 0 2px, var(--vinyl-2) 2px 3.2px); box-shadow: var(--shadow-lg); animation: spin 2.4s linear infinite; }
.composing .big-disc span { position: absolute; inset: 33%; display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.05rem; line-height: 1.1; padding: 4px; word-break: break-word; }
.composing h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
.compose-lines { display: grid; gap: 10px; text-align: left; }
.compose-lines div { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-weight: 500; transition: color 250ms ease; }
.compose-lines div i { font-size: 1.15rem; }
.compose-lines div.done { color: var(--ink); }
.compose-lines div.done i { color: var(--ok); }

/* plans */
.plans { display: grid; gap: 14px; }
.plan {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; text-align: left; width: 100%;
  padding: 22px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1.5px transparent;
  transition: transform 160ms var(--ease-out), box-shadow 200ms ease;
}
.plan:active { transform: scale(.98); }
.plan[aria-checked="true"] { box-shadow: var(--shadow), inset 0 0 0 2px var(--accent); }
.plan .pname { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; line-height: 1.05; }
.plan .peta { font-size: .9rem; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.plan .pprice { grid-row: 1 / span 2; grid-column: 2; align-self: center; text-align: right; font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; line-height: 1; }
.plan .pprice small { display: block; font-family: var(--font-body); font-size: .74rem; font-weight: 500; color: var(--ink-3); margin-top: 4px; }
.plan ul { grid-column: 1 / -1; margin: 10px 0 0; padding: 14px 0 0; list-style: none; border-top: 1px solid var(--line); display: grid; gap: 7px; font-size: .93rem; }
.plan li { display: flex; gap: 8px; align-items: center; }
.plan li i { color: var(--accent); font-size: 1rem; flex: none; }
.plan .badge { position: absolute; top: -11px; left: 22px; padding: 3px 12px; border-radius: var(--pill); background: var(--accent); color: #fff; font-size: .72rem; font-weight: 600; letter-spacing: .04em; }
.plan .radio { position: absolute; top: 22px; right: 22px; display: none; }
.guar-line { display: flex; align-items: center; gap: 10px; justify-content: center; font-size: .9rem; color: var(--ink-2); }
.guar-line i { color: var(--ok); font-size: 1.2rem; }
@media (hover: hover) and (pointer: fine) { .plan:hover { box-shadow: var(--shadow), inset 0 0 0 1.5px var(--line-2); } .plan[aria-checked="true"]:hover { box-shadow: var(--shadow), inset 0 0 0 2px var(--accent); } }

.err { color: var(--accent); font-size: .88rem; font-weight: 500; min-height: 1.2em; }

@media (prefers-reduced-motion: reduce) {
  .step.enter, .step.leave { animation: fade 150ms ease both !important; }
  @keyframes fade { from { opacity: 0; } }
  .opt:active, .opt:hover, .plan:active { transform: none; }
  .composing .big-disc, .name-preview .disc { animation: none; }
}

/* outro estilo (texto livre que vira o "style" do Suno) */
.other-box { display: grid; gap: 12px; padding: 20px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 2px var(--accent); animation: otherIn 280ms var(--ease-out) both; }
.other-box[hidden] { display: none; }
@keyframes otherIn { from { opacity: 0; transform: translateY(-6px); } }
.other-box label { font-size: .88rem; font-weight: 600; }
.other-input { width: 100%; min-height: 54px; padding: 0 16px; border-radius: 12px; border: 0; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line-2); font-size: 1.05rem; outline: none; transition: box-shadow 150ms ease; }
.other-input:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.other-help { font-size: .84rem; color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .other-box { animation: none; } }
