/* SmartBook Music Prompt Master — design system */
:root {
  --bg: #070b1a;
  --bg-2: #0d1430;
  --panel: #111a3a;
  --panel-2: #172350;
  --line: rgba(242, 193, 78, .28);
  --line-soft: rgba(255, 255, 255, .08);
  --text: #eef1ff;
  --muted: #a9b2d6;
  --gold: #f2c14e;
  --gold-2: #d4932a;
  --cyan: #38e1ff;
  --violet: #9b5cff;
  --green: #2bd576;
  --red: #ff5c7a;
  --amber: #ffb547;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Montserrat", "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg);
  background-image:
    radial-gradient(1200px 500px at 10% -10%, rgba(155, 92, 255, .22), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(56, 225, 255, .14), transparent 60%),
    radial-gradient(800px 400px at 50% 110%, rgba(242, 193, 78, .10), transparent 60%);
  background-attachment: fixed; line-height: 1.55; min-height: 100vh;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.gold { color: var(--gold); }
.grad-text { background: linear-gradient(90deg, #fff3c4, var(--gold), var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(7, 11, 26, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); }
.site-header .bar { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-display); font-weight: 800; letter-spacing: .02em; line-height: 1; }
.brand:hover { text-decoration: none; }
.brand img { width: auto; height: 54px; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); }
@media (max-width: 640px) { .brand img { height: 40px; } }
.hero-art { display: flex; justify-content: center; align-items: center; }
.hero-emblem { width: 100%; max-width: 560px; height: auto; filter: drop-shadow(0 10px 40px rgba(242,193,78,.25)); }
.lp-emblem { display: block; width: 300px; max-width: 80%; height: auto; margin: 0 0 14px; }
.auth-logo { display: block; width: 240px; max-width: 80%; height: auto; margin: 0 auto 12px; }
.brand small { display: block; font-size: .62rem; letter-spacing: .25em; color: var(--gold); font-weight: 700; }
.brand span b { color: var(--gold); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: 8px; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: .92rem; }
.nav a:hover, .nav a.on { color: var(--text); background: rgba(255, 255, 255, .06); text-decoration: none; }
.header-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.search { display: flex; align-items: center; background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 999px; padding: 2px 4px 2px 14px; }
.search input { background: none; border: 0; color: var(--text); width: 180px; padding: 8px 0; }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--cyan); }
.btn.menu-btn { display: none; }
@media (max-width: 920px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 68px; background: var(--bg-2); padding: 12px 16px; border-bottom: 1px solid var(--line-soft); flex-direction: column; }
  .nav.open { display: flex; }
  .btn.menu-btn { display: inline-flex; }
  .search { display: none; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; text-decoration: none !important; transition: transform .15s ease, box-shadow .15s ease, background .15s; font-family: var(--font); line-height: 1.1; }
.btn:active { transform: translateY(1px); }
.btn-gold { background: linear-gradient(180deg, #ffd977, var(--gold) 45%, var(--gold-2)); color: #1a1200; box-shadow: 0 6px 20px rgba(242, 193, 78, .35); }
.btn-gold:hover { box-shadow: 0 8px 28px rgba(242, 193, 78, .55); }
.btn-outline { background: rgba(56, 225, 255, .06); border-color: rgba(56, 225, 255, .5); color: var(--text); }
.btn-outline:hover { background: rgba(56, 225, 255, .14); }
.btn-ghost { background: rgba(255, 255, 255, .06); color: var(--text); border-color: var(--line-soft); }
.btn-green { background: linear-gradient(180deg, #4ff09a, var(--green)); color: #00210e; }
.btn-danger { background: rgba(255, 92, 122, .12); color: #ffd0d9; border-color: rgba(255, 92, 122, .5); }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-lg { padding: 16px 28px; font-size: 1.08rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Panels / cards */
.panel { background: linear-gradient(180deg, rgba(23, 35, 80, .75), rgba(13, 20, 48, .85)); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.panel-gold { border-color: var(--line); }
.section { padding: 40px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.grid { display: grid; gap: 18px; }
.grid-books { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.book-card { display: flex; flex-direction: column; background: linear-gradient(180deg, rgba(23, 35, 80, .9), rgba(10, 15, 36, .95)); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s; }
.book-card:hover { transform: translateY(-3px); border-color: var(--line); }
.book-card .cover { aspect-ratio: 3 / 4; background: var(--bg-2); position: relative; overflow: hidden; }
.book-card .cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.book-card .body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.book-card h3 { margin: 0; font-size: 1.02rem; }
.book-card h3 a { color: var(--text); }
.book-card .price { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--gold); }
.book-card .actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: .9rem; margin-right: 6px; font-weight: 500; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; background: rgba(255, 255, 255, .08); color: var(--text); }
.tag-gold { background: rgba(242, 193, 78, .15); color: var(--gold); border: 1px solid var(--line); }
.tag-green { background: rgba(43, 213, 118, .15); color: #8ff5bb; border: 1px solid rgba(43, 213, 118, .5); }
.tag-red { background: rgba(255, 92, 122, .15); color: #ffb3c1; }
.tag-amber { background: rgba(255, 181, 71, .15); color: var(--amber); }
.tag-cyan { background: rgba(56, 225, 255, .12); color: var(--cyan); }
.cover .tag { position: absolute; top: 10px; left: 10px; }

/* Hero */
.hero { padding: 48px 0 28px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; }
.hero p.lead { font-size: 1.12rem; color: var(--muted); max-width: 560px; }
.hero .covers { display: flex; justify-content: center; gap: -20px; }
.hero .covers img { width: 42%; max-width: 220px; border-radius: 10px; box-shadow: 0 20px 50px rgba(0, 0, 0, .6), 0 0 40px rgba(242, 193, 78, .2); }
.hero .covers img:nth-child(2) { transform: translateY(18px) rotate(3deg); margin-left: -30px; }
.hero .covers img:first-child { transform: rotate(-3deg); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { order: -1; } .hero-emblem { max-width: 340px; } }
.eq { display: flex; gap: 4px; align-items: end; height: 28px; margin-bottom: 14px; }
.eq i { width: 5px; border-radius: 3px; background: linear-gradient(180deg, var(--cyan), var(--violet)); animation: eq 1.2s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .2s } .eq i:nth-child(3) { animation-delay: .4s } .eq i:nth-child(4) { animation-delay: .1s } .eq i:nth-child(5) { animation-delay: .3s }
@keyframes eq { 0%, 100% { height: 30% } 50% { height: 100% } }
@media (prefers-reduced-motion: reduce) { .eq i { animation: none; height: 60%; } * { transition: none !important; } }

.banner { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.banner img { width: 100%; max-height: 360px; object-fit: cover; }
.banner .txt { position: absolute; inset: auto 0 0 0; padding: 20px; background: linear-gradient(0deg, rgba(0, 0, 0, .8), transparent); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-soft); color: var(--text); background: rgba(255, 255, 255, .04); font-weight: 600; font-size: .9rem; }
.chip.on, .chip:hover { border-color: var(--gold); color: var(--gold); text-decoration: none; }

/* SmartBook page */
.product { display: grid; grid-template-columns: 380px 1fr; gap: 36px; align-items: start; }
.product .cover-big { border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px rgba(0, 0, 0, .6), 0 0 60px rgba(155, 92, 255, .25); border: 1px solid var(--line); }
.buybox { margin: 18px 0; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(242, 193, 78, .05); }
.buybox .price { font-size: 2rem; font-family: var(--font-display); font-weight: 800; color: var(--gold); }
.list-check { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.list-check li { padding-left: 28px; position: relative; }
.list-check li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 800; }
@media (max-width: 860px) { .product { grid-template-columns: 1fr; } .product .cover-big { max-width: 320px; margin: auto; } }

details.faq { border: 1px solid var(--line-soft); border-radius: 12px; padding: 14px 16px; background: rgba(255, 255, 255, .03); }
details.faq + details.faq { margin-top: 10px; }
details.faq summary { cursor: pointer; font-weight: 700; }
details.faq[open] summary { color: var(--gold); margin-bottom: 8px; }

/* Forms */
.form { display: grid; gap: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.field .help { color: var(--muted); font-size: .8rem; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=tel], input[type=url], input[type=datetime-local], select, textarea {
  width: 100%; background: #0a1028; color: var(--text); border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; padding: 11px 12px; font: inherit; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(56, 225, 255, .18); }
input[disabled] { opacity: .6; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--gold); }
.auth-box { max-width: 440px; margin: 40px auto; }
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; border: 1px solid; font-size: .95rem; }
.alert-ok { background: rgba(43, 213, 118, .1); border-color: rgba(43, 213, 118, .5); color: #c9ffe0; }
.alert-erro { background: rgba(255, 92, 122, .1); border-color: rgba(255, 92, 122, .5); color: #ffd6de; }
.alert-info { background: rgba(56, 225, 255, .08); border-color: rgba(56, 225, 255, .4); color: #d6f7ff; }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line-soft); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; background: rgba(255, 255, 255, .03); white-space: nowrap; }
tr:hover td { background: rgba(255, 255, 255, .02); }
td.num, th.num { text-align: right; white-space: nowrap; }

/* Footer */
.site-footer { margin-top: 60px; border-top: 1px solid var(--line-soft); padding: 32px 0 100px; background: rgba(0, 0, 0, .25); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.footer-grid a { color: var(--muted); display: block; padding: 3px 0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

.empty { text-align: center; padding: 40px 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.steps { display: flex; gap: 10px; flex-wrap: wrap; }
.spinner { width: 42px; height: 42px; border: 4px solid rgba(255, 255, 255, .15); border-top-color: var(--gold); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg) } }
.status-card { max-width: 560px; margin: 40px auto; text-align: center; }
.status-icon { font-size: 3rem; line-height: 1; margin-bottom: 10px; }

/* PWA app */
.app-shell { max-width: 760px; margin: 0 auto; padding: 0 16px 110px; }
.app-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: rgba(9, 13, 32, .96); border-top: 1px solid var(--line); display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom); }
.tabbar nav { display: grid; grid-template-columns: repeat(4, 1fr); width: min(760px, 100%); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; color: var(--muted); font-size: .76rem; font-weight: 600; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.on { color: var(--gold); }
.tabbar a:hover { text-decoration: none; color: var(--text); }
.lib-card { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(23, 35, 80, .9), rgba(10, 15, 36, .95)); box-shadow: 0 0 30px rgba(242, 193, 78, .08); }
.lib-card + .lib-card { margin-top: 14px; }
.lib-card img { border-radius: 8px; aspect-ratio: 3/4; object-fit: cover; width: 100%; }
.lib-card h3 { margin: 0 0 6px; font-size: 1.15rem; }
.lib-card .actions { display: grid; gap: 8px; margin-top: 10px; }
@media (max-width: 420px) { .lib-card { grid-template-columns: 96px 1fr; } }
.confirm-banner { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--radius); border: 1px solid rgba(43, 213, 118, .6); background: rgba(43, 213, 118, .08); margin: 16px 0; }
.confirm-banner .ico { font-size: 2rem; color: var(--green); }
.progress { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--gold)); }
.prompt-block { position: relative; padding: 14px 14px 14px 14px; border-radius: 12px; background: #0a1028; border: 1px solid var(--line-soft); white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88rem; }
.prompt-block + .prompt-block { margin-top: 10px; }
.prompt-block .copy { position: absolute; top: 8px; right: 8px; }
.prompt-block .txt { padding-right: 80px; }
.install-hint { display: none; }
.install-hint.show { display: flex; }

/* Reader */
.reader { position: fixed; inset: 0; display: flex; flex-direction: column; background: #050814; }
.reader-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: rgba(13, 20, 48, .98); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.reader-bar .title { font-weight: 700; flex: 1; min-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-canvas { flex: 1; overflow: auto; display: flex; justify-content: center; padding: 16px; }
.reader-canvas canvas { box-shadow: 0 10px 40px rgba(0, 0, 0, .7); background: #fff; max-width: none; height: auto; }
.reader-bar input { width: 64px; padding: 6px; text-align: center; }

/* Admin */
.admin { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side { background: rgba(5, 8, 20, .9); border-right: 1px solid var(--line-soft); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; color: var(--muted); border-radius: 10px; font-weight: 600; font-size: .92rem; }
.admin-side a:hover, .admin-side a.on { background: rgba(242, 193, 78, .1); color: var(--gold); text-decoration: none; }
.admin-side .grp { color: rgba(255, 255, 255, .35); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; margin: 16px 12px 6px; }
.admin-main { padding: 24px; min-width: 0; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-head h1 { font-size: 1.6rem; margin: 0; }
.kpi { padding: 16px; border-radius: 14px; border: 1px solid var(--line-soft); background: linear-gradient(180deg, rgba(23, 35, 80, .8), rgba(13, 20, 48, .9)); }
.kpi .v { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; }
.kpi .l { color: var(--muted); font-size: .82rem; }
.bars { display: flex; align-items: end; gap: 3px; height: 160px; padding-top: 10px; }
.bars div { flex: 1; background: linear-gradient(180deg, var(--gold), var(--violet)); border-radius: 4px 4px 0 0; min-height: 2px; opacity: .9; }
.bars div.zero { background: rgba(255, 255, 255, .08); }
.admin-toggle { display: none; }
@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .admin-side { position: fixed; z-index: 60; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .admin-side.open { transform: none; }
  .admin-toggle { display: inline-flex; }
  .admin-main { padding: 16px; }
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.pill-ok { color: #8ff5bb; } .pill-warn { color: var(--amber); } .pill-bad { color: #ffb3c1; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; word-break: break-all; }
pre.json { max-height: 220px; overflow: auto; background: #050814; padding: 10px; border-radius: 8px; font-size: .78rem; white-space: pre-wrap; word-break: break-all; }
.video { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 70; max-width: 560px; margin: auto; display: none; }
.cookie.show { display: block; }
.cta-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.center .cta-stack, .cta-center .cta-stack { align-items: center; }
.btn-wa { background: #1fae54; color: #fff; border-color: #25d366; }
.btn-wa:hover { background: #25c25f; box-shadow: 0 6px 20px rgba(37, 211, 102, .35); }
.wa-float { position: fixed; right: 16px; bottom: 16px; z-index: 45; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.wa-float:hover { transform: scale(1.05); }
.wa-float svg { width: 30px; height: 30px; }
