@font-face { font-family: "Instrument Serif"; src: url("assets/InstrumentSerif-Italic.ttf") format("truetype"); font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("assets/InstrumentSerif-Regular.ttf") format("truetype"); font-style: normal; font-display: swap; }
/* ==========================================================================
   Velkyn 07 · camada comum de refino (base: Velkyn Hub)
   Carregada por ÚLTIMO em cada app (Cofre, Edda, Notas). Não muda estrutura,
   dados nem funções: só superfícies, luz, foco e movimento.
   Tema claro: classe .light (no html ou no body) ou data-theme="marfim".
   ========================================================================== */
:root {
  --v7-bronze: #DBB581;
  --v7-bronze-claro: #F0D3A6;
  --v7-gelo: #B1D7DD;
  --v7-luz: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 0 0 1px rgba(255, 255, 255, .012);
  --v7-luz-botao: inset 0 1px 0 rgba(255, 255, 255, .07);
  --v7-luz-primario: inset 0 1px 0 rgba(255, 255, 255, .42), inset 0 -1px 0 rgba(0, 0, 0, .12), 0 12px 28px -14px rgba(219, 181, 129, .75);
  --v7-holofote: rgba(219, 181, 129, .11);
  --v7-sombra: 0 24px 60px -26px rgba(0, 0, 0, .7), 0 2px 8px rgba(0, 0, 0, .22);
  --v7-foco: 0 0 0 4px rgba(219, 181, 129, .16);
  --v7-mola: cubic-bezier(.16, 1.18, .3, 1);
  --v7-suave: cubic-bezier(.2, .8, .2, 1);
  --v7-grao: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
:is(html.light, body.light, [data-theme="marfim"]) {
  --v7-bronze: #91663A;
  --v7-bronze-claro: #B58653;
  --v7-gelo: #2F6F7A;
  --v7-luz: inset 0 1px 0 rgba(255, 255, 255, .85), 0 1px 2px rgba(35, 50, 58, .05);
  --v7-luz-botao: inset 0 1px 0 rgba(255, 255, 255, .8);
  --v7-luz-primario: inset 0 1px 0 rgba(255, 255, 255, .35), 0 12px 26px -14px rgba(145, 102, 58, .6);
  --v7-holofote: rgba(145, 102, 58, .08);
  --v7-sombra: 0 24px 60px -28px rgba(35, 50, 58, .36), 0 2px 8px rgba(35, 50, 58, .07);
  --v7-foco: 0 0 0 4px rgba(145, 102, 58, .16);
}

/* Grão quase invisível sobre o carvão (só no escuro) */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 2147483000; pointer-events: none;
  background: var(--v7-grao) 0 0 / 160px repeat;
}
:is(html.light, body.light, [data-theme="marfim"]) body::after, body.light::after { background: none; }

/* Títulos mais firmes, rótulos editoriais espaçados */
h1, h2 { letter-spacing: -.026em; }
.eyebrow { letter-spacing: .2em; }

/* Botão principal: volume sutil e reflexo; secundários com aresta de luz */
button.primary, .primary { box-shadow: var(--v7-luz-primario); transition: transform 160ms var(--v7-suave), box-shadow 280ms var(--v7-suave), filter 280ms var(--v7-suave); }
button.primary:hover, .primary:hover { filter: brightness(1.05); }
button:active { transform: scale(.97); }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--v7-gelo); outline-offset: 3px; }

/* Navegação lateral: ícone desliza e o ativo ganha brilho */
.nav-item { transition: background 280ms var(--v7-suave), color 280ms var(--v7-suave), transform 160ms var(--v7-suave); }
.nav-item svg, .nav-item .icon { transition: transform 280ms var(--v7-mola), filter 280ms var(--v7-suave); }
.nav-item:hover svg, .nav-item:hover .icon { transform: translateX(2px); }
:is(.nav-item.selected, .nav-item.active, .nav-item[aria-current="page"]) :is(svg, .icon) { filter: drop-shadow(0 0 6px rgba(219, 181, 129, .55)); }
/* Edda: a navegação já é fixa (trilho no desktop, painel inferior no celular); não sobrescrever a posição. */

/* Cartões: aresta de luz, elevação ao passar e holofote que segue o cursor */
:is(.note-card, .playlist-card, .account-card, .settings-group, .setting-row, .gen-panel, .queue-item, .hub-banner, .hero) { box-shadow: var(--v7-luz); }
:is(.note-card, .playlist-card, .account-card:not(.selected)) { position: relative; isolation: isolate; transition: transform 280ms var(--v7-suave), box-shadow 280ms var(--v7-suave), border-color 280ms var(--v7-suave); }
:is(.note-card, .playlist-card, .account-card:not(.selected)):hover { transform: translateY(-2px); box-shadow: var(--v7-luz), var(--v7-sombra); }
:is(.note-card, .playlist-card, .account-card:not(.selected))::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; z-index: -1;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), var(--v7-holofote), transparent 62%);
  transition: opacity 280ms var(--v7-suave);
}
:is(.note-card, .playlist-card, .account-card:not(.selected)):hover::after { opacity: 1; }

/* Campos: foco com halo bronze */
:is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), textarea, select):focus-visible {
  outline: none; box-shadow: var(--v7-foco); border-color: color-mix(in srgb, var(--v7-bronze) 60%, transparent);
}

/* Chips e filtros respondem com mola */
:is(.chip, .filter-chip, .gen-chip, .pill) { transition: background 280ms var(--v7-suave), color 280ms var(--v7-suave), border-color 280ms var(--v7-suave), transform 160ms var(--v7-mola); }
:is(.chip, .filter-chip, .gen-chip):active { transform: scale(.96); }

/* Diálogos: entram com escala suave e fundo desfocado (no celular cada app mantém o painel inferior) */
dialog[open] { animation: v7-dialogo 520ms var(--v7-mola); }
dialog::backdrop { backdrop-filter: blur(8px); }
@keyframes v7-dialogo { from { opacity: 0; transform: translateY(12px) scale(.97); } }

/* Aviso flutuante em vidro */
#toast, .toast { backdrop-filter: blur(18px); box-shadow: var(--v7-sombra); }

/* Rolagem discreta */
* { scrollbar-width: thin; scrollbar-color: rgba(127, 140, 145, .35) transparent; }

@media (prefers-reduced-motion: reduce) {
  dialog[open] { animation: none; }
  :is(.note-card, .playlist-card, .account-card)::after { display: none; }
  :is(.note-card, .playlist-card, .account-card):hover { transform: none; }
}

/* ===== Edda · extras do refino 07 ===== */
button.primary { position: relative; overflow: hidden; }
button.primary::after { content: ""; position: absolute; inset: 0; transform: translateX(-120%); pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .38) 50%, transparent 70%); }
button.primary:hover::after { transform: translateX(120%); transition: transform 760ms cubic-bezier(.2, .8, .2, 1); }
.player { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 -18px 40px -30px rgba(0, 0, 0, .8); backdrop-filter: blur(20px) saturate(1.1); }
:is(html.light, body.light) .player { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 -18px 40px -32px rgba(35, 50, 58, .3); }
.queue-item { transition: background 280ms cubic-bezier(.2, .8, .2, 1), transform 160ms cubic-bezier(.2, .8, .2, 1); }
.queue-item:hover { transform: translateX(2px); }
@media (prefers-reduced-motion: reduce) { button.primary::after { display: none; } .queue-item:hover { transform: none; } }

/* ===== Marca no estilo do Hub: emblema em anel e nome com acento editorial ===== */
.brand.v7-marca { display: flex; align-items: center; gap: 13px; }
.v7-emblema { width: 46px; height: 46px; border-radius: 50%; flex: none; position: relative;
  background: url("assets/emblema-escuro.png") center / 82% no-repeat, radial-gradient(circle, rgba(219, 181, 129, .16), transparent 70%);
  border: 1px solid rgba(219, 181, 129, .3); }
.v7-emblema::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px dashed rgba(219, 181, 129, .4); animation: v7-gira 50s linear infinite; }
:is(html.light, body.light) .v7-emblema { background-image: url("assets/emblema-claro.png"), radial-gradient(circle, rgba(145, 102, 58, .12), transparent 70%); border-color: rgba(145, 102, 58, .3); }
:is(html.light, body.light) .v7-emblema::after { border-color: rgba(145, 102, 58, .35); }
@keyframes v7-gira { to { transform: rotate(360deg); } }
.brand.v7-marca .wordmark { font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; font-size: 21px; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; text-transform: none; }
.brand.v7-marca .wordmark em { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; font-size: 25px; letter-spacing: 0; color: var(--v7-bronze); }
.brand.v7-marca .motto { font-size: 11.5px; font-weight: 650; letter-spacing: .24em; color: var(--v7-bronze); margin-top: 3px; }
@media (prefers-reduced-motion: reduce) { .v7-emblema::after { animation: none; } }

/* A marca já nomeia o app: a linha de edição sai, mantendo o respiro. */
.sidebar .nav-edition { display: none; }
.sidebar .nav-heading { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid rgba(127, 140, 145, .16); }
