/* Layout: app de podcast em coluna única (título grande, lista de episódios, mini player e barra de abas); player, menus e fila abrem por cima. Visual de sistema, branco e roxo. */
:root {
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', sans-serif;
  --frame: #E4E4EA;
  --bg: #FFFFFF;
  --group: #F2F2F7;
  --ink: #111113;
  --muted: #6C6C74;
  --line: #E1E1E6;
  --accent: #9B2FD1;
  --on-accent: #FFFFFF;
  --soft: #F1E6F8;
  --danger: #D70015;
  --scrim: rgba(0, 0, 0, .4);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --frame: #000000; --bg: #000000; --group: #1C1C1E; --ink: #F5F5F7; --muted: #9A9AA3; --line: #2C2C2E;
    --accent: #BF5AF2; --on-accent: #000000; --soft: #2A1B35; --danger: #FF6961; --scrim: rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --frame: #000000; --bg: #000000; --group: #1C1C1E; --ink: #F5F5F7; --muted: #9A9AA3; --line: #2C2C2E;
  --accent: #BF5AF2; --on-accent: #000000; --soft: #2A1B35; --danger: #FF6961; --scrim: rgba(0, 0, 0, .6);
  color-scheme: dark;
}
html, body { height: 100%; }
body { margin: 0; background: var(--frame); color: var(--ink); font: 16px/1.4 var(--font); -webkit-text-size-adjust: 100%; }
* { box-sizing: border-box; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.app { position: relative; height: 100%; max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; background: var(--bg); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 640px) { .app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
main { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-bottom: 180px; }
.view { display: flex; flex-direction: column; gap: 22px; padding-top: 10px; }
.lt { font: 800 34px/1.1 var(--font); letter-spacing: -.02em; margin: 6px 0 0; }
h2 { font: 700 21px/1.2 var(--font); letter-spacing: -.01em; margin: 0; }
.brand { display: flex; align-items: center; gap: 8px; font: 700 15px/1 var(--font); letter-spacing: -.005em; margin-top: 4px; }
.brand .logo { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); display: grid; place-items: center; color: #fff; }
.sh { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.lk { background: none; border: 0; color: var(--accent); font-weight: 600; font-size: 15px; cursor: pointer; padding: 8px 0; min-height: 40px; }
.empty { background: var(--group); border-radius: 14px; padding: 20px 16px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 12px; align-items: center; }

.art { aspect-ratio: 1; width: 100%; border-radius: 10px; background-color: #5a2a8a; background-image: linear-gradient(150deg, hsl(var(--h, 275) 55% 46%), hsl(calc(var(--h, 275) + 40) 60% 26%)); background-size: cover; background-position: center; display: grid; place-items: center; color: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06) inset; }
.art svg { width: 46%; height: 46%; }

.btn { background: var(--accent); color: var(--on-accent); border: 0; border-radius: 12px; padding: 0 18px; font: 600 16px var(--font); min-height: 46px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.soft { background: var(--soft); color: var(--accent); }
.ib { background: transparent; border: 0; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: inherit; flex: none; }
.ib.acc { color: var(--accent); }

.list { display: flex; flex-direction: column; }
.ep { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ep.wa { grid-template-columns: 64px minmax(0, 1fr); }
.eart { background: none; border: 0; padding: 0; width: 64px; align-self: start; cursor: pointer; }
.eb { min-width: 0; }
.ed { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }
.et { font-weight: 600; font-size: 17px; line-height: 1.25; margin-top: 2px; overflow-wrap: anywhere; }
.edesc { color: var(--muted); font-size: 14px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.eact { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--group); color: var(--accent); border: 0; border-radius: 999px; padding: 0 16px 0 12px; min-height: 40px; font: 600 14px var(--font); cursor: pointer; font-variant-numeric: tabular-nums; }
.pill.on { background: var(--accent); color: var(--on-accent); }
.dim .et, .dim .edesc { opacity: .6; }

.hs { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.hs .c { flex: 0 0 150px; min-width: 0; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; }
.cbtn { background: none; border: 0; padding: 0; position: relative; cursor: pointer; display: block; width: 100%; }
.cbtn .ov { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; }
.c .t2 { font-weight: 600; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bar { height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }

.qrow { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.qrow .main { background: none; border: 0; text-align: left; padding: 0; cursor: pointer; min-width: 0; }
.qrow .qt { font-weight: 600; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.qrow .on { color: var(--accent); }

.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; }
.tile { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tile .n { font-weight: 600; font-size: 15px; line-height: 1.25; }
.srow { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.srow .main { background: none; border: 0; text-align: left; padding: 0; cursor: pointer; min-width: 0; }
.srow .n { font-weight: 600; }

.topbar { display: flex; align-items: center; margin-left: -10px; position: sticky; top: 0; z-index: 3; background: var(--bg); }
.hero { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.hero .art { width: min(60%, 200px); border-radius: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.hero h1 { font: 800 24px/1.15 var(--font); margin: 6px 0 0; letter-spacing: -.01em; text-wrap: balance; }
.hero .au { color: var(--accent); font-weight: 600; }
.hero .btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.desc { color: var(--ink); font-size: 15px; }
.desc.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

.search { position: sticky; top: 0; z-index: 3; background: var(--bg); padding-block: 6px; }
input[type=search], input[type=text], textarea, select, input[type=file] { font: 400 16px var(--font); color: var(--ink); background: var(--group); border: 1px solid transparent; border-radius: 12px; padding: 10px 14px; min-height: 46px; width: 100%; }
input[type=search] { border-radius: 12px; }
textarea { resize: vertical; min-height: 96px; line-height: 1.45; }
label { font-size: 13px; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
form.panel { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
form.panel h2 { font-size: 19px; }

.dock { position: absolute; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); bottom: 8px; z-index: 5; display: flex; flex-direction: column; gap: 8px; }
.glass { background: color-mix(in srgb, var(--bg) 74%, transparent); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(0, 0, 0, .12); }
.mini { display: flex; align-items: center; gap: 10px; border-radius: 30px; padding: 8px 10px 8px 8px; position: relative; overflow: hidden; cursor: pointer; }
.tabrow { display: flex; align-items: center; gap: 10px; }
.searchbtn { width: 60px; height: 60px; border-radius: 50%; flex: none; display: grid; place-items: center; cursor: pointer; color: var(--ink); padding: 0; }
.searchbtn.on { color: var(--accent); }
.shl { display: flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; margin-bottom: 12px; cursor: pointer; color: var(--ink); }
.shl h2 { font-size: 24px; }
.shl svg { color: var(--muted); }
.hs.big { gap: 12px; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
.fc { flex: 0 0 min(88%, 340px); scroll-snap-align: start; border-radius: 26px; padding: 20px; display: flex; flex-direction: column; background: hsl(var(--h) 28% 24%); color: #fff; min-width: 0; }
.fcart { width: 64%; align-self: center; background: none; border: 0; padding: 0; cursor: pointer; }
.fcart .art { border-radius: 12px; box-shadow: 0 8px 22px rgba(0, 0, 0, .35); }
.fm { margin-top: 16px; font-size: 14px; color: rgba(255, 255, 255, .7); }
.ft { font: 700 20px/1.2 var(--font); margin-top: 4px; overflow-wrap: anywhere; }
.fd { margin-top: 6px; font-size: 15px; color: rgba(255, 255, 255, .75); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fa { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 14px; }
.fpill { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .18); color: #fff; border: 0; border-radius: 999px; min-height: 44px; padding: 0 18px 0 14px; font: 600 16px var(--font); cursor: pointer; font-variant-numeric: tabular-nums; }
.fa .ib { color: rgba(255, 255, 255, .85); }
.ctile { flex: 0 0 min(46%, 210px); scroll-snap-align: start; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 8px; min-width: 0; color: var(--ink); }
.ctile .art { border-radius: 16px; }
.ctile .n { font-weight: 600; font-size: 15px; line-height: 1.25; }
.mini .artbox { width: 44px; flex: none; }
.mini .mt { min-width: 0; flex: 1; }
.mini .mt b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .mt span { font-size: 12px; color: var(--muted); }
.mini .mbar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--accent); }

.tabs { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(5, 1fr); border-radius: 999px; padding: 5px; gap: 2px; }
.tabs button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; font-weight: 500; color: var(--muted); padding: 6px 1px; min-height: 50px; border-radius: 999px; cursor: pointer; min-width: 0; }
.tabs button[aria-selected="true"] { color: var(--accent); font-weight: 700; background: color-mix(in srgb, var(--accent) 14%, transparent); }

.overlay { position: fixed; inset: 0; z-index: 20; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.player { background: var(--bg); display: flex; flex-direction: column; align-items: center; }
.player > * { width: 100%; max-width: 440px; }
.ptop { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; flex: none; }
.pmain { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 22px; overflow-y: auto; padding-block: 8px; }
.pmain .artbox { width: min(100%, 340px, 42vh); margin-inline: auto; }
.pmain .artbox .art { border-radius: 16px; box-shadow: 0 14px 34px rgba(0, 0, 0, .25); }
.ptitle { font: 700 22px/1.2 var(--font); letter-spacing: -.01em; text-wrap: balance; }
.psub { color: var(--accent); font-size: 16px; margin-top: 4px; }
.scrubwrap { flex: none; margin-top: 8px; }
input[type=range] { width: 100%; accent-color: var(--accent); height: 28px; margin: 0; }
.times { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: -4px; }
.ctrls { display: flex; align-items: center; justify-content: center; gap: 28px; flex: none; margin-block: 8px; }
.ctrls .big { width: 72px; height: 72px; }
.pbot { display: flex; align-items: center; justify-content: space-between; flex: none; margin-bottom: 14px; }
.pbot .tx { background: none; border: 0; min-height: 44px; min-width: 56px; border-radius: 10px; font: 700 15px var(--font); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-variant-numeric: tabular-nums; }
.pbot .tx.on { color: var(--accent); }
.pqueue { display: flex; flex-direction: column; }
.pqueue h2 { margin-bottom: 4px; }

.sheetwrap { background: var(--scrim); display: flex; align-items: flex-end; justify-content: center; padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)); z-index: 35; }
.sheetbox { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 8px; max-height: 100%; overflow-y: auto; }
.sgroup { background: var(--bg); border-radius: 14px; overflow: hidden; }
.sheetwrap .stitle { padding: 12px 16px; font-size: 13px; color: var(--muted); text-align: center; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.sbtn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 14px 16px; min-height: 52px; font: 400 18px var(--font); color: var(--accent); text-align: left; cursor: pointer; }
.sgroup .sbtn:last-child { border-bottom: 0; }
.sbtn.danger { color: var(--danger); }
.sbtn.cancel { background: var(--bg); border-radius: 14px; border: 0; font-weight: 600; justify-content: center; }

.toast { position: fixed; left: 50%; bottom: calc(168px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 40; max-width: calc(100% - 32px); text-align: center; }

/* Abertura: tela uva com o logo no centro */
.splash { position: fixed; inset: 0; z-index: 60; background: radial-gradient(120% 90% at 50% 30%, #7A2DB8 0%, #52187F 45%, #2E0A4D 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; color: #fff; transition: opacity .5s ease; cursor: pointer; }
.splash.out { opacity: 0; pointer-events: none; }
.splash .mark { width: 108px; height: 108px; border-radius: 29px; background: #fff; display: flex; align-items: center; justify-content: center; gap: 7px; box-shadow: 0 18px 50px rgba(20, 0, 40, .45); animation: sp-pop .7s cubic-bezier(.2, .8, .2, 1) both; }
.splash .mark i { display: block; width: 9px; border-radius: 5px; background: #6A1FA6; animation: sp-eq 1.1s ease-in-out infinite; }
.splash .mark i:nth-child(1) { height: 24px; animation-delay: -.2s; }
.splash .mark i:nth-child(2) { height: 42px; animation-delay: -.5s; }
.splash .mark i:nth-child(3) { height: 58px; animation-delay: -.8s; }
.splash .mark i:nth-child(4) { height: 36px; animation-delay: -.35s; }
.splash .mark i:nth-child(5) { height: 22px; animation-delay: -.65s; }
.splash .word { font: 400 40px/1 var(--font); letter-spacing: -.025em; animation: sp-rise .7s .15s both; }
.splash .word b { font-weight: 800; }
@keyframes sp-pop { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: none; } }
@keyframes sp-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sp-eq { 0%, 100% { transform: scaleY(.5); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .splash, .splash * { animation: none !important; transition: none; } }

/* ---------- conta, entrada e envio (versão com servidor) ---------- */
:root { color-scheme: light; }
input[type=email], input[type=password] { font: 400 16px var(--font); color: var(--ink); background: var(--group); border: 1px solid transparent; border-radius: 12px; padding: 10px 14px; min-height: 46px; width: 100%; }
.homehead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); font: 700 16px var(--font); display: grid; place-items: center; cursor: pointer; flex: none; margin-top: 4px; }
.avatar.guest { background: var(--group); color: var(--muted); border: 1px solid var(--line); }
.authbox { padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.authhead { display: flex; flex-direction: column; gap: 12px; }
.authhead h2 { font-size: 22px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--group); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { background: none; border: 0; border-radius: 8px; min-height: 40px; font: 600 14px var(--font); color: var(--muted); cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.authform { display: flex; flex-direction: column; gap: 12px; }
.msg { min-height: 20px; font-size: 14px; margin: 0; overflow-wrap: anywhere; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--accent); }
.minerow { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.minerow .n { font-weight: 600; overflow-wrap: anywhere; }
.minerow .acts { display: flex; flex-direction: column; align-items: flex-end; }
.minerow .lk { min-height: 34px; padding: 4px 0; font-size: 14px; }
.lk.danger { color: var(--danger); }
.setup { padding: 28px 0; display: flex; flex-direction: column; gap: 12px; }
.setup code { background: var(--group); padding: 2px 6px; border-radius: 6px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: default; }
.prem { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); margin-left: 6px; }
[hidden] { display: none !important; }

/* tela de acesso cheia, logo depois da abertura */
.authbrand { display: none; }
#auth.welcome { background: radial-gradient(120% 90% at 50% 30%, #7A2DB8 0%, #52187F 45%, #2E0A4D 100%); align-items: center; overflow-y: auto; z-index: 50; padding-top: max(24px, env(safe-area-inset-top, 0px)); }
#auth.welcome .sheetbox { width: 100%; max-width: 420px; margin: auto; display: flex; flex-direction: column; gap: 22px; }
#auth.welcome .cancel { display: none; }
#auth.welcome .authbrand { display: flex; flex-direction: column; align-items: center; gap: 14px; color: #fff; }
#auth.welcome .authbrand .mark { width: 76px; height: 76px; border-radius: 21px; background: #fff; display: flex; align-items: center; justify-content: center; gap: 5px; box-shadow: 0 14px 40px rgba(20, 0, 40, .45); }
#auth.welcome .authbrand .mark i { display: block; width: 6px; border-radius: 4px; background: #6A1FA6; }
#auth.welcome .authbrand .mark i:nth-child(1) { height: 17px; } #auth.welcome .authbrand .mark i:nth-child(2) { height: 30px; } #auth.welcome .authbrand .mark i:nth-child(3) { height: 41px; } #auth.welcome .authbrand .mark i:nth-child(4) { height: 26px; } #auth.welcome .authbrand .mark i:nth-child(5) { height: 16px; }
#auth.welcome .authbrand .word { font: 400 30px/1 var(--font); letter-spacing: -.025em; }
#auth.welcome .authbrand .word b { font-weight: 800; }
#auth.welcome .sgroup { border-radius: 20px; }

.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar { overflow: hidden; }
