/* Planu — design system */
:root {
  /* preto neutro: sem o tom azulado que o fundo tinha antes, no espírito de
     interfaces escuras sóbrias. As superfícies sobem junto para manter a
     hierarquia fundo < card < destaque. */
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --surface-2: #242424;
  --border: rgba(255, 255, 255, 0.10);
  --text: #ffffff;
  --text-2: #9b9bad;
  --accent: #e5ff77;
  --accent-text: #1a1a1a;
  --danger: #ff6b6b;
  --radius: 16px;
  --radius-lg: 24px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

[data-theme="light"] {
  --bg: #f7f7fa;
  --surface: #ffffff;
  --surface-2: #f0f0f5;
  --border: rgba(0, 0, 0, 0.08);
  --text: #14141e;
  --text-2: #5a5a6e;
  --accent: #d8f259;
  --accent-text: #1a1a1a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }

main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 32px 20px 64px; }
main.wide { max-width: 1280px; }
main.narrow { max-width: 560px; }

/* ---------- header: logo + navegação à esquerda, ações à direita ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  /* 3 colunas de laterais iguais: a nav fica centrada no header
     independentemente da largura da logo e do grupo de ações */
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 20px;
  padding: 13px 26px; min-height: 68px;
  /* medida única do logo: o header fixo herda a mesma, sem encolher ao rolar */
  --logo-h: 32px;
  --logo-w: 78px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
/* o fio só aparece depois que a página rola, para não cortar o hero */
.header.scrolled { border-bottom-color: var(--border); }
/* ao fixar, muda só o fio: o logo mantém exatamente a mesma medida */
.header.scrolled .logo { width: var(--logo-w); height: var(--logo-h); }
/* a home tem fundo próprio; o header acompanha o tema como nas demais páginas */
.home-page .header { background: color-mix(in srgb, var(--bg) 88%, transparent); }
/* o logo oficial entra por mask para herdar a cor do tema (claro/escuro);
   o texto segue no HTML para leitores de tela */
.logo {
  display: block; width: var(--logo-w); height: var(--logo-h); flex-shrink: 0;
  font-size: 0; color: var(--text); background: currentColor;
  -webkit-mask: url('/img/planu-logo.svg') no-repeat center / contain;
  mask: url('/img/planu-logo.svg') no-repeat center / contain;
  transition: opacity 0.15s;
}
.logo:hover { opacity: 0.75; }
.btn-pill {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 16px; font-size: 14px; font-weight: 700; padding: 8px 24px;
  font-family: inherit; cursor: pointer; transition: 0.15s; border: 2px solid transparent;
}
.btn-pill.lime { background: #e5ff77; color: #1a1a1a; border-color: #1a1a1a; }
.btn-pill.dark { background: #030712; color: #fff; border-color: #fff; }
.btn-pill.lime:hover { filter: brightness(1.06); }
.header nav { display: flex; align-items: center; justify-content: center; gap: 2px; flex-wrap: wrap; justify-self: center; }
.nav-link {
  position: relative; padding: 9px 14px; font-size: 14px; font-weight: 500;
  color: var(--text-2); border-radius: 10px; transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); }
.nav-link.active { color: var(--text); }
/* marcador da página atual, na cor da marca */
.nav-link.active::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 3px;
  height: 2px; border-radius: 2px; background: var(--accent);
}
/* empurra tudo o que vem depois para a direita */
/* justify-self cobre o grid do desktop; margin-left cobre o flex do mobile */
.header-actions { display: flex; gap: 10px; align-items: center; justify-self: end; margin-left: auto; flex-shrink: 0; }
.header-actions .theme-toggle { margin-left: 2px; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 10px 20px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600;
  transition: 0.15s;
}
.btn:hover { border-color: var(--text-2); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 14px; font-size: 13px; }
.btn.danger { color: var(--danger); }
.btn.full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.following { background: var(--surface-2); border-color: var(--accent); color: var(--accent); }

.theme-toggle { background: none; border: none; font-size: 18px; color: var(--text-2); padding: 6px; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 72px 20px 56px; }
.hero h1 { font-size: clamp(40px, 8vw, 76px); font-weight: 800; letter-spacing: -3px; line-height: 1.02; }
.hero p { margin: 18px auto 28px; color: var(--text-2); font-size: 18px; max-width: 560px; }
.hero p strong { color: var(--text); }

/* ---------- seções ---------- */
.section { padding: 56px 0; border-top: 1px solid var(--border); }
.section h2 { font-size: clamp(28px, 5vw, 44px); font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; margin-bottom: 12px; }
.section .sub { color: var(--text-2); font-size: 16px; max-width: 620px; margin-bottom: 32px; }

/* ---------- cards de plan ---------- */
.plan-list { display: flex; flex-direction: column; gap: 8px; }
.plan-card {
  display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; transition: 0.15s;
}
.plan-card:hover { border-color: var(--text-2); transform: translateY(-1px); }
.plan-card-cover { width: 100%; height: 48px; object-fit: cover; display: block; }
.plan-card-body { display: flex; gap: 18px; align-items: center; padding: 18px 20px; }
.plan-card-body .plan-info { flex: 1; min-width: 0; }
.plan-date {
  display: flex; flex-direction: column; align-items: center; min-width: 64px;
  background: var(--surface-2); border-radius: var(--radius); padding: 10px 8px;
}
.plan-date .dow { font-size: 11px; text-transform: uppercase; color: var(--text-2); font-weight: 600; }
.plan-date .day { font-size: 26px; font-weight: 800; line-height: 1.1; }
.plan-date .mon { font-size: 11px; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.plan-info { flex: 1; min-width: 0; }
.plan-info .countdown { font-size: 12px; color: var(--text-2); }
.plan-info h3 { font-size: 17px; font-weight: 700; margin: 2px 0; }
.plan-info .meta { font-size: 13px; color: var(--text-2); display: flex; gap: 10px; flex-wrap: wrap; }
.plan-card .actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px;
  background: var(--surface-2); color: var(--text-2);
}
.badge.accent { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.verified { color: var(--accent); font-size: 14px; }

/* ---------- card de evento estilo Voxel (compartilhado com a home;
   home.css sobrescreve com as cores fixas do dark) ---------- */
.vx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.vx-card {
  width: 100%; background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  display: flex; flex-direction: column;
}
.vx-cover { width: 100%; height: 48px; object-fit: cover; display: block; }
.vx-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.vx-date { font-size: 12px; font-weight: 500; color: var(--text); }
.vx-date b { font-weight: 700; }
.vx-title { font-size: 16px; font-weight: 600; color: var(--text); }
.vx-title a:hover { text-decoration: underline; }
.vx-loc { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.vx-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 6px; }
.vx-cal { font-size: 12px; color: var(--text-2); text-decoration: underline; display: flex; align-items: center; gap: 6px; }
.vx-attend {
  background: transparent; color: var(--text); border: 1px solid var(--border); border-radius: 4px;
  padding: 6px 10px; font-size: 12px; font-weight: 500; font-family: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.vx-attend:hover, .vx-attend.on { border-color: var(--accent); color: var(--accent); }

/* ---------- calendários ---------- */
.cal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.cal-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px; transition: 0.15s;
}
.cal-card:hover { border-color: var(--text-2); }
.avatar {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface-2); display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; color: var(--accent); overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 88px; height: 88px; font-size: 36px; }
.cal-card .info { flex: 1; min-width: 0; }
.cal-card .info .name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-card .info .cat { font-size: 12px; color: var(--text-2); }

/* ---------- filtros ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; align-items: center; }
.chip {
  padding: 8px 16px; border-radius: 99px; font-size: 13px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2); transition: 0.15s;
}
.chip:hover { color: var(--text); }
.chip.active { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.filters input[type="date"], .filters select {
  padding: 8px 12px; border-radius: 99px; font-size: 13px; font-family: inherit;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
}

/* ---------- formulários ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-2); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  font-size: 14px; font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--accent);
}
.form-group textarea { min-height: 90px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { color: var(--danger); font-size: 13px; margin: 8px 0; min-height: 18px; }
.form-ok { color: var(--accent); font-size: 13px; margin: 8px 0; }

/* ---------- página do plan (réplica do planu.app / Voxel) ---------- */
.plan-layout {
  display: grid; grid-template-columns: 1fr 300px; gap: 56px;
  max-width: 960px; margin: 0 auto; padding: 32px 20px 64px; align-items: start;
}
.plan-main { border: 1px solid #1f2937; border-radius: 12px; overflow: hidden; background: var(--bg); }
.plan-cover {
  position: relative; height: 233px; background: #000 center/cover no-repeat;
  display: flex; align-items: flex-end; padding: 32px;
}
.plan-date-badge {
  width: 160px; padding: 20px 8px; text-align: center;
  background: rgba(0, 0, 0, 0.6); border: 1px solid #313135; border-radius: 8px; color: #fff;
}
.plan-date-badge .dow { font-size: 16px; font-weight: 900; display: block; }
.plan-date-badge .day { font-size: 32px; font-weight: 900; display: block; line-height: 1.2; }
.plan-date-badge .mon { font-size: 16px; display: block; }
.plan-block { padding: 32px; border-top: 1px solid #16181f; }
.plan-block h1 { font-size: 36px; font-weight: 900; line-height: 1.15; margin-bottom: 20px; }
.plan-block h2 { font-size: 21px; font-weight: 700; margin-bottom: 14px; }
.plan-block p { color: var(--text-2); line-height: 1.7; font-size: 15px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid #111827; border-radius: 100px; padding: 12px 20px;
  font-size: 14px; color: var(--text); background: transparent; font-family: inherit; cursor: default;
}
[data-theme="light"] .pill, [data-theme="light"] .pill-link { border-color: #d5d5de; }
.pill-row { display: flex; gap: 12px; flex-wrap: wrap; }
.plan-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pill-attend {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: #fff; color: #030712; border: 1px solid #030712;
  border-radius: 100px; padding: 16px 24px; font-size: 14px; font-weight: 500; font-family: inherit;
}
.pill-attend.on { background: var(--accent); }
.pill-link {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid #111827; border-radius: 100px; padding: 16px 24px;
  font-size: 14px; color: var(--text); text-decoration: underline;
}
.plan-actions .spacer { flex: 1; }
.icon-circle {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid #4b5563;
  background: transparent; color: var(--text); font-size: 16px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-circle:hover { border-color: var(--text); }

.plan-sidebar { position: sticky; top: 90px; border: 1px solid #313135; border-radius: 16px; overflow: hidden; }
.plan-map {
  display: block; height: 190px; background: #e8e6e1;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.plan-map .pin {
  width: 44px; height: 44px; border-radius: 50%; background: #030712; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.plan-sidebar-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.btn-map {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background: #030712; color: #fff; border: 1px solid #ccc; border-radius: 100px;
  padding: 12px 24px; font-size: 14px; font-weight: 600; width: 100%; max-width: 220px;
}
.plan-sidebar-body .venue { align-self: flex-start; color: #9ca3af; font-size: 14px; margin-top: 6px; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.photo-grid img { border-radius: 8px; aspect-ratio: 1; object-fit: cover; width: 100%; }

.mural-post { border: 1px solid #1f2937; border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.mural-post .author { font-weight: 700; font-size: 13px; }
.mural-post .when { font-size: 11px; color: var(--text-2); margin-left: 8px; }
.mural-post p { margin-top: 4px; font-size: 14px; color: var(--text); }
.mural-form { display: flex; gap: 10px; margin-bottom: 18px; }
.mural-form input {
  flex: 1; padding: 14px 20px; border-radius: 100px;
  background: transparent; border: 1px solid #1f2937; color: var(--text); font-family: inherit; font-size: 14px;
}
.mural-form input:focus { outline: none; border-color: var(--accent); }
.mural-form button {
  border: 1px solid #111827; border-radius: 100px; padding: 12px 24px;
  background: transparent; color: var(--text); font-size: 14px; font-weight: 500; font-family: inherit; cursor: pointer;
}
.mural-form button:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 860px) {
  .plan-layout { grid-template-columns: 1fr; gap: 24px; }
  .plan-sidebar { position: static; }
  .plan-block { padding: 22px; }
  .plan-block h1 { font-size: 28px; }
}

/* ---------- perfil de calendário ---------- */
.cal-cover-hero {
  width: 100%; height: 240px; object-fit: cover; display: block;
  border-radius: var(--radius-lg); margin-bottom: -40px;
}
.cal-hero { display: flex; gap: 20px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.cal-cover-hero + .cal-hero .avatar.lg { border: 4px solid var(--bg); margin-left: 24px; }
.cal-hero .info { flex: 1; min-width: 220px; }
.cal-hero h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 800; letter-spacing: -1px; }
.cal-hero .meta { color: var(--text-2); font-size: 14px; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.cal-bio { color: var(--text-2); margin: 12px 0 28px; max-width: 640px; line-height: 1.6; }

/* ---------- pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 32px; }
.price-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--accent); }
.price-card .tier { font-size: 13px; color: var(--text-2); font-weight: 600; }
.price-card h3 { font-size: 24px; font-weight: 800; margin: 4px 0 16px; }
.price-card ul { list-style: none; flex: 1; margin-bottom: 20px; }
.price-card li { padding: 7px 0; font-size: 14px; color: var(--text-2); display: flex; gap: 8px; align-items: center; }
.price-card li.yes { color: var(--text); }
.price-card li .mark { font-weight: 700; }
.price-card li.yes .mark { color: var(--accent); }
.price-card .price { font-size: 34px; font-weight: 800; margin-bottom: 4px; }
.price-card .per { font-size: 13px; color: var(--text-2); margin-bottom: 18px; }

/* ---------- features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; }
.feature-card .emoji { font-size: 28px; margin-bottom: 10px; }
.feature-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.feature-card p { font-size: 13px; color: var(--text-2); line-height: 1.5; }

.cat-cloud { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- painel ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.stat-card .num { font-size: 32px; font-weight: 800; color: var(--accent); }
.stat-card .lbl { font-size: 13px; color: var(--text-2); margin-top: 2px; }

.panel-section { margin-bottom: 36px; }
.panel-section > h2 { font-size: 22px; font-weight: 800; margin-bottom: 16px; letter-spacing: -0.5px; }
.panel-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }

.table-list { width: 100%; border-collapse: collapse; }
.table-list th { text-align: left; font-size: 12px; text-transform: uppercase; color: var(--text-2); padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table-list td { padding: 12px; border-bottom: 1px solid var(--border); font-size: 14px; }

/* ---------- misc ---------- */
.empty { text-align: center; color: var(--text-2); padding: 48px 20px; }
.empty .emoji { font-size: 40px; margin-bottom: 12px; }

/* rodapé branco com links empilhados e o wordmark gigante cortado na base */
.footer {
  position: relative; overflow: hidden;
  background: #fff; padding: 48px 32px 0;
  color: #797a88; font-size: 14px;
}
.footer nav { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.footer a:hover { color: #1a1a1a; }
.footer .tagline { color: #030712; font-weight: 600; }

/* A janela tem metade da proporção do logo (89/18 contra 89/36), então o SVG
   em largura total fica com o dobro da altura dela e é cortado ao meio. */
.footer-logo {
  margin: 28px -32px 0;
  aspect-ratio: 443 / 90;   /* metade da altura do logo (443x180) = corte ao meio */
  overflow: hidden;
  pointer-events: none;
}
.footer-logo svg { display: block; width: 100%; height: auto; }
.footer-logo.fallback { background: url('/img/planu-logo.svg') no-repeat center top / 100% auto; }

.footer-logo path {
  fill: #101828;
  opacity: 0;
  transform: translateY(30px);
  --d: calc(var(--i, 0) * 90ms);
}

/* entrada: cada letra sobe de baixo da linha de corte, em cascata p-l-a-n-u,
   e depois entra em flutuação contínua com uma onda de cor atravessando */
.footer-logo.in path {
  animation:
    logo-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) var(--d) forwards,
    logo-float 4.5s ease-in-out calc(var(--i, 0) * 220ms + 0.95s) infinite,
    logo-wave 6s ease-in-out calc(var(--i, 0) * 320ms + 1.2s) infinite;
}

@keyframes logo-rise {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.7px); }
}
@keyframes logo-wave {
  0%, 62%, 100% { fill: #101828; }
  31% { fill: #8345d8; }
}

@media (max-width: 640px) {
  .footer { padding: 40px 24px 0; }
  .footer-logo { margin: 20px -24px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .footer-logo path { opacity: 1; transform: none; }
  .footer-logo.in path { animation: none; }
}

/* ---------- seletor de imagem + biblioteca ---------- */
.img-picker { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.img-picker-preview {
  width: 132px; height: 74px; flex-shrink: 0; cursor: pointer;
  border: 1px dashed var(--border); border-radius: 10px;
  background: var(--surface-2) center/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-2); text-align: center; padding: 6px;
}
.img-picker-preview:hover { border-color: var(--accent); }
.img-picker-preview.has-image { border-style: solid; }
.img-picker-preview.has-image .ph { display: none; }
.img-picker-actions { display: flex; flex-direction: column; gap: 8px; }

.lib-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.lib-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px; max-height: 46vh; overflow-y: auto;
}
.lib-grid img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; cursor: pointer;
  border-radius: 8px; border: 2px solid transparent; transition: 0.15s;
}
.lib-grid img:hover { border-color: var(--accent); transform: scale(1.03); }
.lib-empty { grid-column: 1 / -1; text-align: center; color: var(--text-2); padding: 28px 12px; font-size: 14px; }

/* ---------- modal (vira bottom sheet no mobile) ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: backdrop-in 0.2s ease both;
}
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  animation: modal-in 0.22s cubic-bezier(0.32, 0.72, 0, 1) both;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal h2 { font-size: 20px; font-weight: 800; margin-bottom: 18px; }
.modal-handle { display: none; }

body.modal-open { overflow: hidden; }
.hidden { display: none !important; }

@media (max-width: 640px) {
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal {
    max-width: none; max-height: 92vh;
    border-radius: 24px 24px 0 0; border-bottom: none;
    padding: 6px 20px calc(28px + env(safe-area-inset-bottom));
    animation: sheet-in 0.3s cubic-bezier(0.32, 0.72, 0, 1) both;
    overscroll-behavior: contain;
  }
  @keyframes sheet-in { from { transform: translateY(100%); } to { transform: translateY(0); } }

  /* pega-mão para arrastar a folha para baixo */
  .modal-handle {
    display: block; width: 40px; height: 4px; border-radius: 99px;
    background: var(--text-2); opacity: 0.4; margin: 8px auto 16px;
  }
  .modal h2 { font-size: 18px; position: sticky; top: 0; background: var(--surface); padding-bottom: 8px; }
  .modal form > div:last-child { display: flex; gap: 10px; }
  .modal form > div:last-child .btn { flex: 1; justify-content: center; padding: 14px 20px; }
}

@media (max-width: 640px) {
  .header nav { display: none; }
  /* sem isto o botão de tema vazava a largura da tela e o site rolava de lado */
  .header { display: flex; gap: 8px; padding: 12px 14px; }
  .header-actions { gap: 7px; }
  .btn-pill { padding: 8px 13px; font-size: 13px; }
  .header { --logo-h: 27px; --logo-w: 66px; }
  /* no celular o CTA fica só com o ícone: o texto inteiro estourava a tela */
  .cta-label { display: none; }
  .header-actions .btn-pill.lime { padding: 9px 12px; }
  /* o card virou coluna (capa em cima); quem precisa quebrar é o corpo,
     senão data, texto e botão disputam a mesma linha e o título quebra letra a letra */
  .plan-card-body { flex-wrap: wrap; gap: 14px; padding: 16px; }
  .plan-card-body .plan-info { flex: 1 1 auto; }
  .plan-card .actions { flex-direction: row; width: 100%; justify-content: flex-end; }
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- loja dentro do plan (ingressos e produtos) ---------- */
.store-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.sale-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 99px;
  background: var(--surface-2); color: var(--text-2);
}
.sale-badge.aberta { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); }
.sale-badge.agora { background: rgba(253, 93, 149, 0.18); color: #fd5d95; }
.sale-badge.agora::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fd5d95;
  animation: pulso 1.4s ease-in-out infinite;
}
@keyframes pulso { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.store-group + .store-group { margin-top: 22px; }
.store-group h3 {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-2); margin-bottom: 10px;
}
.store-list { display: flex; flex-direction: column; gap: 10px; }
.store-item {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
}
.store-item.esgotado { opacity: 0.55; }
.store-item img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.store-item .ico {
  width: 56px; height: 56px; border-radius: 8px; flex-shrink: 0; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.store-item .info { flex: 1; min-width: 0; }
.store-item .nome { font-size: 15px; font-weight: 700; }
.store-item .desc { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.store-item .estoque { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.store-item .preco { font-size: 17px; font-weight: 800; white-space: nowrap; }
.store-item .compra { display: flex; align-items: center; gap: 8px; }
.qty {
  width: 58px; padding: 8px 10px; border-radius: 8px; text-align: center;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-family: inherit;
}
.store-empty { color: var(--text-2); font-size: 14px; }

.order-ok {
  border: 1px solid var(--accent); border-radius: 12px; padding: 14px 16px;
  background: color-mix(in srgb, var(--accent) 10%, transparent); margin-bottom: 12px; font-size: 14px;
}
.order-ok b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 1px; }

/* comprovantes em /compras */
.ticket {
  display: flex; gap: 16px; align-items: center;
  border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px;
  background: var(--surface);
}
.ticket .code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 20px; font-weight: 800;
  letter-spacing: 2px; color: var(--accent); border: 1px dashed var(--border);
  border-radius: 10px; padding: 12px 14px; text-align: center; flex-shrink: 0;
}
.ticket .det { flex: 1; min-width: 0; }
.ticket .det .ev { font-size: 15px; font-weight: 700; }
.ticket .det .meta { font-size: 13px; color: var(--text-2); margin-top: 3px; }

@media (max-width: 640px) {
  .store-item { flex-wrap: wrap; }
  .store-item .compra { width: 100%; justify-content: flex-end; }
  .ticket { flex-direction: column; align-items: flex-start; }
}

/* ---------- ícones flat + pastilha 3D ----------
   O ícone é chapado (fill sólido, duotone). A profundidade vem da pastilha:
   face com luz no topo, parede lateral feita de sombras sólidas empilhadas
   e uma leve inclinação que se endireita no hover. */
.svg-ico {
  width: 1em; height: 1em; display: inline-block;
  vertical-align: -0.14em; fill: currentColor; flex-shrink: 0;
}

.ico3d {
  --face: #e5ff77;
  --side: #a9bf44;
  --ink: #12140a;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 16px; flex-shrink: 0;
  background: linear-gradient(155deg, color-mix(in srgb, var(--face) 75%, #fff), var(--face) 62%);
  color: var(--ink);
  box-shadow:
    0 2px 0 var(--side), 0 4px 0 var(--side), 0 6px 0 var(--side),
    0 12px 20px -8px rgba(0, 0, 0, 0.75);
  transform: rotate(-4deg);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}
.ico3d .svg-ico { width: 56%; height: 56%; }

/* brilho sutil na quina superior, reforçando a face */
.ico3d::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.55), transparent 42%);
  pointer-events: none;
}

.ico3d:hover {
  transform: rotate(0deg) translateY(-5px);
  box-shadow:
    0 2px 0 var(--side), 0 4px 0 var(--side), 0 6px 0 var(--side),
    0 8px 0 var(--side), 0 10px 0 var(--side),
    0 22px 30px -10px rgba(0, 0, 0, 0.8);
}

.ico3d.sm { width: 40px; height: 40px; border-radius: 12px; }
.ico3d.sm { box-shadow: 0 2px 0 var(--side), 0 4px 0 var(--side), 0 9px 14px -6px rgba(0,0,0,.7); }
.ico3d.xs { width: 30px; height: 30px; border-radius: 9px; transform: rotate(-3deg); }
.ico3d.xs { box-shadow: 0 2px 0 var(--side), 0 3px 0 var(--side), 0 7px 10px -5px rgba(0,0,0,.65); }

.ico3d.lime   { --face: #e5ff77; --side: #a9bf44; --ink: #12140a; }
.ico3d.purple { --face: #bd88f9; --side: #7a4ac0; --ink: #1d0b33; }
.ico3d.pink   { --face: #fd5d95; --side: #c02f66; --ink: #3b0518; }
.ico3d.blue   { --face: #67b4f0; --side: #2e79b4; --ink: #05233a; }
.ico3d.gold   { --face: #ffd65e; --side: #c79a1f; --ink: #2e2203; }

@media (prefers-reduced-motion: reduce) {
  .ico3d, .ico3d:hover { transition: none; transform: none; }
}

/* ---------- botões principais: uma só linguagem ----------
   Mesma gramática das pastilhas de ícone — face chapada apoiada numa parede
   sólida. O hover levanta a peça, o clique afunda contra a parede: a resposta
   é física, de apertar um botão de verdade, que combina com um app de "fazer
   plano" (confirmar presença, comprar, criar). */
.btn-lime, .btn-dark, .btn-gold, .btn-final, .btn-pill,
.btn.primary, .pill-attend, .btn-map, .btn-cta {
  --face: var(--accent);
  --side: #a9bf44;
  --ink: var(--accent-text);
  --edge: transparent;
  --wall: 4px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: inherit; font-weight: 700; cursor: pointer; text-align: center;
  border-radius: 16px;
  border: 2px solid var(--edge);
  background: var(--face);
  color: var(--ink);
  box-shadow: 0 var(--wall) 0 var(--side);
  transform: translateY(0);
  transition: transform 0.13s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.13s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.18s ease;
}

.btn-lime:hover, .btn-dark:hover, .btn-gold:hover, .btn-final:hover, .btn-pill:hover,
.btn.primary:hover, .pill-attend:hover, .btn-map:hover, .btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 calc(var(--wall) + 2px) 0 var(--side);
  filter: brightness(1.04);
}

/* o clique encosta a peça na parede */
.btn-lime:active, .btn-dark:active, .btn-gold:active, .btn-final:active, .btn-pill:active,
.btn.primary:active, .pill-attend:active, .btn-map:active, .btn-cta:active {
  transform: translateY(var(--wall));
  box-shadow: 0 0 0 var(--side);
  filter: brightness(0.98);
}

.btn-lime:focus-visible, .btn-dark:focus-visible, .btn-gold:focus-visible,
.btn-final:focus-visible, .btn-pill:focus-visible, .btn.primary:focus-visible,
.pill-attend:focus-visible, .btn-map:focus-visible, .btn-cta:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--face) 65%, #fff);
  outline-offset: 3px;
}

/* o ícone acompanha o movimento — o app "em movimento" da marca */
.btn-lime .svg-ico, .btn-dark .svg-ico, .btn-gold .svg-ico, .btn-final .svg-ico,
.btn-pill .svg-ico, .btn.primary .svg-ico, .pill-attend .svg-ico, .btn-map .svg-ico, .btn-cta .svg-ico {
  /* um pouco maior que o texto: em 14px o desenho do ícone perdia legibilidade */
  width: 1.2em; height: 1.2em;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-lime:hover .svg-ico, .btn-dark:hover .svg-ico, .btn-gold:hover .svg-ico,
.btn-final:hover .svg-ico, .btn-pill:hover .svg-ico, .btn.primary:hover .svg-ico,
.pill-attend:hover .svg-ico, .btn-map:hover .svg-ico, .btn-cta:hover .svg-ico { transform: translateY(-2px); }

/* desabilitado não levanta nem afunda */
.btn-lime:disabled, .btn-dark:disabled, .btn-gold:disabled, .btn-final:disabled,
.btn-pill:disabled, .btn.primary:disabled, .pill-attend:disabled,
.btn-map:disabled, .btn-cta:disabled {
  opacity: 0.5; cursor: not-allowed; transform: none; filter: none;
  box-shadow: 0 var(--wall) 0 var(--side);
}

/* cores de cada variante */
.btn-pill.lime { --face: #e5ff77; --side: #a9bf44; --ink: #12140a; --edge: #1a1a1a; }
.btn-pill.dark { --face: #030712; --side: #000; --ink: #fff; --edge: #fff; }
.btn-pill { padding: 9px 22px; font-size: 14px; }

.btn.primary { --side: color-mix(in srgb, var(--accent) 58%, #000); }
.btn.primary.small { --wall: 3px; }

.pill-attend { --face: #fff; --side: #b6bac4; --ink: #030712; --edge: #030712; padding: 14px 24px; font-size: 14px; }
.pill-attend.on { --face: var(--accent); --side: #a9bf44; --ink: var(--accent-text); --edge: transparent; }

.btn-map, .btn-cta { --face: #030712; --side: #000; --ink: #fff; --edge: #3a3f4b; padding: 12px 22px; font-size: 14px; }
[data-theme="light"] .btn-map, .btn-cta { --face: #1a1f2b; --side: #0a0d14; }

@media (prefers-reduced-motion: reduce) {
  .btn-lime, .btn-dark, .btn-gold, .btn-final, .btn-pill,
  .btn.primary, .pill-attend, .btn-map, .btn-cta { transition: none; }
  .btn-lime:hover, .btn-dark:hover, .btn-gold:hover, .btn-final:hover, .btn-pill:hover,
  .btn.primary:hover, .pill-attend:hover, .btn-map:hover, .btn-cta:hover { transform: none; }
}

/* ações secundárias acompanham a geometria dos botões (retângulo arredondado);
   as pílulas ficam reservadas aos chips informativos (horário, categoria) */
.pill-link { border-radius: 16px; }
.pill-link:hover { border-color: var(--text-2); }

/* ---------- seletor de idiomas (mesmo desenho do Uruguapo, no tema do Planu) ---------- */
.lang-switch { position: relative; flex-shrink: 0; }
.lang-switch > button {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px; border-radius: 99px; border: 1px solid transparent;
  background: transparent; color: var(--text-2);
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: 0.15s;
}
.lang-switch > button:hover { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.lang-switch .flag { width: 20px; height: 14px; border-radius: 2px; display: block; }
.lang-switch .chevron { width: 12px; height: 12px; opacity: 0.7; transition: transform 0.18s; }
.lang-switch.open .chevron { transform: rotate(180deg); }

.lang-switch ul {
  position: absolute; top: 100%; right: 0; margin-top: 8px; z-index: 60;
  width: 182px; list-style: none; padding: 6px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 18px 36px -12px rgba(0, 0, 0, 0.6);
}
.lang-switch ul li button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: none; border-radius: 9px; background: transparent;
  color: var(--text-2); font-family: inherit; font-size: 14px; text-align: left; cursor: pointer;
  transition: 0.12s;
}
.lang-switch ul li button:hover { background: var(--surface-2); color: var(--text); }
.lang-switch ul li button[aria-selected="true"] { color: var(--text); font-weight: 700; }
.lang-switch ul li button .nome { flex: 1; }
.lang-switch ul li button .marca { color: var(--accent); font-size: 12px; }

@media (max-width: 640px) {
  .lang-switch > button { padding: 6px 7px; gap: 4px; }
  .lang-switch > button .sigla { display: none; }
}

/* ---------- borda animada nos cards de plan (hover) ----------
   Os cards têm overflow:hidden por causa da capa, o que recortaria um
   pseudo-elemento. Então a borda vem do próprio background: a parte interna é
   pintada até o padding-box e o anel até o border-box, com um gradiente cônico
   girando — uma luz que dá a volta no card. */
@property --borda-ang {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.vx-card, .plan-card { --borda-ang: 0deg; }

.vx-card:hover, .plan-card:hover {
  border-color: transparent;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    conic-gradient(from var(--borda-ang),
      transparent 0deg,
      transparent 180deg,
      color-mix(in srgb, var(--accent) 25%, transparent) 262deg,
      var(--accent) 322deg,
      color-mix(in srgb, var(--accent) 25%, transparent) 350deg,
      transparent 360deg) border-box;
  animation: borda-correndo 2.4s linear infinite;
}
.vx-card:hover { transform: translateY(-2px); }

@keyframes borda-correndo { to { --borda-ang: 360deg; } }

/* sem giro para quem pediu menos movimento: fica só o realce estático */
@media (prefers-reduced-motion: reduce) {
  .vx-card:hover, .plan-card:hover {
    animation: none; background: var(--bg); border-color: var(--accent);
  }
  .vx-card:hover { transform: none; }
}
