/* Meu Armário — estilos.
 * Tokens em :root; o tema escuro só redefine tokens. Nenhuma cor fixa fora
 * daqui (as bolinhas de cor das peças vêm do catálogo, são dado, não tema). */

:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-2: #f2ede5;
  --surface-3: #e9e2d7;
  --line: #e4ddd2;
  --ink: #1f1c19;
  --ink-2: #6b6359;
  --ink-3: #8f877c;
  --accent: #7d6240;
  --accent-ink: #ffffff;
  --accent-soft: #efe6d8;
  --danger: #a8352b;
  --ok: #3f6b4e;
  --shadow: 0 1px 2px rgb(31 28 25 / 0.04), 0 8px 24px rgb(31 28 25 / 0.06);
  --shadow-lg: 0 20px 60px rgb(31 28 25 / 0.18);
  --veil: rgb(31 28 25 / 0.38);

  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --pill: 999px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='claro']) {
    --bg: #12100e;
    --surface: #1b1916;
    --surface-2: #24211d;
    --surface-3: #2e2a25;
    --line: #34302a;
    --ink: #f3efe9;
    --ink-2: #b0a79b;
    --ink-3: #8a8277;
    --accent: #d2b48a;
    --accent-ink: #1a1612;
    --accent-soft: #2d271f;
    --danger: #e0786c;
    --ok: #8cc49e;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
    --shadow-lg: 0 20px 60px rgb(0 0 0 / 0.5);
    --veil: rgb(0 0 0 / 0.55);
    color-scheme: dark;
  }
}
:root[data-theme='escuro'] {
  --bg: #12100e;
  --surface: #1b1916;
  --surface-2: #24211d;
  --surface-3: #2e2a25;
  --line: #34302a;
  --ink: #f3efe9;
  --ink-2: #b0a79b;
  --ink-3: #8a8277;
  --accent: #d2b48a;
  --accent-ink: #1a1612;
  --accent-soft: #2d271f;
  --danger: #e0786c;
  --ok: #8cc49e;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
  --shadow-lg: 0 20px 60px rgb(0 0 0 / 0.5);
  --veil: rgb(0 0 0 / 0.55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- estrutura ---------------------------------------------------------- */

#app {
  max-width: 720px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(var(--safe-t) + 8px) 16px calc(var(--nav-h) + var(--safe-b) + 28px);
}
.view { animation: entrar 0.35s var(--ease); }
@keyframes entrar { from { opacity: 0; transform: translateY(6px); } }

.topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  margin-bottom: 8px;
}
.topo h1, .titulo {
  font: 600 32px/1.1 var(--font-display);
  letter-spacing: -0.01em;
  margin: 0;
}
.topo .acoes { display: flex; gap: 8px; }
.sub { color: var(--ink-2); font-size: 14px; margin: 2px 0 0; }
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  margin: 0 0 8px;
}
h2.secao {
  font: 600 22px/1.2 var(--font-display);
  margin: 28px 0 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
h2.secao a, .link {
  font: 600 13px var(--font);
  color: var(--accent);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
}

/* ---- navegação inferior ------------------------------------------------- */

.nav {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(18px);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
}
.nav ul {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  max-width: 720px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.nav a {
  height: var(--nav-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  text-decoration: none;
  transition: color 0.2s;
}
.nav a svg { width: 23px; height: 23px; }
.nav a[aria-current='page'] { color: var(--ink); }
.nav a[aria-current='page'] svg { stroke-width: 1.9; }

/* ---- botões ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--pill);
  border: 1px solid transparent;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.15s var(--ease), opacity 0.2s, background 0.2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn svg { width: 19px; height: 19px; }
.btn.sec { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.suave { background: var(--surface-2); color: var(--ink); }
.btn.acento { background: var(--accent); color: var(--accent-ink); }
.btn.perigo { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn.bloco { width: 100%; }
.btn.peq { min-height: 38px; padding: 0 16px; font-size: 13.5px; }

.ico {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  position: relative;
  transition: transform 0.15s var(--ease);
  flex: none;
}
.ico:active { transform: scale(0.93); }
.ico svg { width: 21px; height: 21px; }
.ico.solido { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ico.limpo { border-color: transparent; background: transparent; }
.ico .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.ico.ativo { color: var(--danger); }
.ico.ativo svg { fill: currentColor; }

.barra-fixa {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--nav-h) + var(--safe-b));
  z-index: 15;
  padding: 12px 16px;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.barra-fixa > div { max-width: 688px; margin: 0 auto; display: flex; gap: 10px; }
.barra-fixa .btn { flex: 1; }

/* ---- chips -------------------------------------------------------------- */

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 2px 16px 4px;
  scroll-padding: 16px;
}
.chips::-webkit-scrollbar { display: none; }
.chips.quebra { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 15px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.chip small { color: var(--ink-3); font-weight: 600; font-size: 12px; }
.chip[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip[aria-pressed='true'] small { color: inherit; opacity: 0.7; }

.cor-bola {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgb(0 0 0 / 0.12);
  flex: none;
}
.cor-bola.multi { background: conic-gradient(#d9783a, #e2bf3c, #3f7a52, #3d6fb0, #6a4c93, #b3261e, #d9783a); }

/* ---- grelha de peças ---------------------------------------------------- */

.grelha {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 12px;
}
@media (min-width: 560px) { .grelha { grid-template-columns: repeat(3, 1fr); } }
.cartao {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  width: 100%;
}
.cartao .foto {
  aspect-ratio: 3 / 4;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface-2);
  position: relative;
}
.cartao .foto img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.cartao:active .foto img { transform: scale(0.98); }
.cartao .nome {
  margin: 8px 2px 0;
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cartao .meta { margin: 0 2px; font-size: 12px; color: var(--ink-3); }
.cartao .fav {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  color: var(--danger);
}
.cartao .fav svg { width: 15px; height: 15px; fill: currentColor; }
.cartao .marca-sel {
  position: absolute;
  inset: 0;
  border-radius: var(--r);
  border: 2.5px solid var(--ink);
  display: grid;
  align-content: start;
  justify-content: end;
  padding: 8px;
  pointer-events: none;
}
.cartao .marca-sel span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
}
.cartao .marca-sel svg { width: 15px; height: 15px; }
.sem-foto {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  font: 500 italic 15px var(--font-display);
  padding: 8px;
  text-align: center;
}
.sem-foto svg { width: 28px; height: 28px; opacity: 0.6; }

.rolo {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 38%;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 0 16px 4px;
  scroll-snap-type: x mandatory;
  scroll-padding: 16px;
}
.rolo::-webkit-scrollbar { display: none; }
.rolo > * { scroll-snap-align: start; }
@media (min-width: 560px) { .rolo { grid-auto-columns: 24%; } }
.rolo.looks { grid-auto-columns: 62%; }
@media (min-width: 560px) { .rolo.looks { grid-auto-columns: 40%; } }

/* ---- composição de look ------------------------------------------------- */

.comp {
  aspect-ratio: 4 / 5;
  background: var(--surface-2);
  border-radius: var(--r);
  padding: 8px;
  display: grid;
  gap: 6px;
  overflow: hidden;
}
.comp.duas { grid-template-columns: 1.35fr 1fr; }
.comp .col { display: grid; gap: 6px; min-height: 0; }
.comp .tile {
  border-radius: calc(var(--r) - 6px);
  overflow: hidden;
  background: var(--surface);
  min-height: 0;
  position: relative;
}
.comp .tile img { width: 100%; height: 100%; object-fit: cover; }
.comp .tile .sem-foto { font-size: 12px; }
.comp.vazia { place-items: center; color: var(--ink-3); text-align: center; font: italic 500 17px var(--font-display); padding: 24px; }
.comp.grande { border-radius: var(--r-lg); padding: 10px; gap: 8px; }
.comp.grande .col { gap: 8px; }
.comp.grande .tile { border-radius: calc(var(--r-lg) - 10px); }

.look-card { display: block; text-decoration: none; color: inherit; }
.look-card .linha { display: flex; justify-content: space-between; align-items: center; margin: 8px 2px 0; gap: 8px; }
.look-card .nome { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.look-card .meta { font-size: 12px; color: var(--ink-3); margin: 0 2px; }
.look-card .heart { color: var(--danger); flex: none; }
.look-card .heart svg { width: 16px; height: 16px; fill: currentColor; }
.grelha.looks { grid-template-columns: repeat(2, 1fr); }

.estrelas { display: inline-flex; gap: 2px; color: var(--accent); }
.estrelas button { background: none; border: 0; padding: 4px; color: inherit; }
.estrelas svg { width: 22px; height: 22px; }
.estrelas .on svg { fill: currentColor; }
.estrelas.peq svg { width: 12px; height: 12px; }
.estrelas.peq { gap: 0; }

/* ---- cartões genéricos -------------------------------------------------- */

.painel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}
.painel + .painel { margin-top: 12px; }
.painel.suave { background: var(--surface-2); border-color: transparent; box-shadow: none; }
.painel h3 { font: 600 21px/1.2 var(--font-display); margin: 0 0 6px; }
.painel p { margin: 0; color: var(--ink-2); }

.numeros {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.numeros a {
  padding: 16px 8px;
  text-align: center;
  text-decoration: none;
  color: inherit;
}
.numeros a + a { border-left: 1px solid var(--line); }
.numeros strong { display: block; font: 600 30px/1 var(--font-display); }
.numeros span { font-size: 12px; color: var(--ink-2); }

.ia-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--accent-soft);
  border-radius: var(--r-lg);
  padding: 18px;
}
.ia-card .sim {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--accent);
  flex: none;
}
.ia-card .sim svg { width: 20px; height: 20px; }
.ia-card strong { display: block; font: 600 19px/1.2 var(--font-display); margin-bottom: 3px; }
.ia-card p { margin: 0; font-size: 13.5px; color: var(--ink-2); }

.lista { list-style: none; margin: 0; padding: 0; }
.lista li { border-bottom: 1px solid var(--line); }
.lista li:last-child { border-bottom: 0; }
.lista .item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 2px;
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  text-decoration: none;
  color: inherit;
  font-size: 15px;
}
.lista .item span:last-child { color: var(--ink-2); text-align: right; }
.lista .item svg { width: 18px; height: 18px; color: var(--ink-3); }
.lista .item.perigo { color: var(--danger); }

.vazio {
  text-align: center;
  padding: 48px 20px;
}
.vazio .simbolo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  color: var(--ink-2);
}
.vazio .simbolo svg { width: 32px; height: 32px; }
.vazio h3 { font: 600 26px/1.15 var(--font-display); margin: 0 0 8px; }
.vazio p { color: var(--ink-2); margin: 0 auto 22px; max-width: 34ch; }

.passos { counter-reset: p; list-style: none; padding: 0; margin: 18px 0 0; text-align: left; }
.passos li { counter-increment: p; display: flex; gap: 12px; padding: 8px 0; color: var(--ink-2); font-size: 14px; }
.passos li::before {
  content: counter(p);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 700;
  font-size: 12px;
  display: grid;
  place-items: center;
  flex: none;
}

/* ---- formulários -------------------------------------------------------- */

.campo { display: block; margin-bottom: 18px; }
.campo > span, .rotulo {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.campo .dica { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; text-transform: none; letter-spacing: 0; font-weight: 400; }
.entrada, .campo input, .campo select, .campo textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 16px; /* < 16px faz o iOS dar zoom ao focar */
  transition: border-color 0.2s;
  appearance: none;
}
.campo textarea { min-height: 96px; resize: vertical; }
.entrada:focus, .campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--ink); }
.duas-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prefixo { position: relative; }
.prefixo b { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 500; }
.prefixo input { padding-left: 34px; }
.alternar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  font-size: 15px;
}
.alternar input { appearance: none; width: 48px; height: 28px; border-radius: 14px; background: var(--surface-3); position: relative; transition: background 0.2s; flex: none; margin: 0; }
.alternar input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); transition: transform 0.25s var(--ease); }
.alternar input:checked { background: var(--ink); }
.alternar input:checked::after { transform: translateX(20px); }
.segmento {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: var(--surface-2);
  border-radius: var(--pill);
  padding: 4px;
  gap: 4px;
}
.segmento button {
  min-height: 38px;
  border: 0;
  border-radius: var(--pill);
  background: transparent;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink-2);
}
.segmento button[aria-pressed='true'] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.busca { position: relative; margin-bottom: 12px; }
.busca svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); }
.busca input { padding-left: 44px; border-radius: var(--pill); }

/* ---- detalhe ------------------------------------------------------------ */

.hero-foto {
  margin: 0 -16px;
  background: var(--surface-2);
  aspect-ratio: 4 / 5;
  max-height: 68vh;
  position: relative;
  overflow: hidden;
}
@media (min-width: 560px) { .hero-foto { margin: 0; border-radius: var(--r-lg); } }
.hero-foto img { width: 100%; height: 100%; object-fit: contain; }
.hero-topo {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
}
.hero-topo .ico { background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(8px); border-color: transparent; }
.cabecalho-detalhe { padding: 20px 0 4px; }
.cabecalho-detalhe h1 { font: 600 30px/1.1 var(--font-display); margin: 0 0 4px; }
.linha-acoes { display: flex; gap: 10px; margin: 16px 0 6px; }
.linha-acoes .btn { flex: 1; }
.ficha { display: grid; grid-template-columns: auto 1fr; gap: 12px 18px; margin: 0; font-size: 14.5px; }
.ficha dt { color: var(--ink-3); }
.ficha dd { margin: 0; text-align: right; }
.metricas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.metricas div { background: var(--surface-2); border-radius: var(--r); padding: 14px 12px; }
.metricas strong { display: block; font: 600 24px/1.1 var(--font-display); }
.metricas span { font-size: 12px; color: var(--ink-2); }

/* ---- adicionar peça ----------------------------------------------------- */

.escolha-foto { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0 20px; }
.escolha-foto label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  aspect-ratio: 1;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s var(--ease);
}
.escolha-foto label:active { transform: scale(0.97); }
.escolha-foto label.principal { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.escolha-foto svg { width: 30px; height: 30px; }
.escolha-foto small { font-weight: 400; font-size: 12px; opacity: 0.7; }
.escolha-foto input { display: none; }
.previa {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 1;
  max-height: 46vh;
  margin: 0 auto 20px;
  position: relative;
}
.previa img { width: 100%; height: 100%; object-fit: contain; }
.previa .trocar { position: absolute; right: 12px; bottom: 12px; }
.fila-info { font-size: 13px; color: var(--ink-2); margin: 0 0 12px; display: flex; justify-content: space-between; }
.aviso-auto {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--accent-soft);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  margin: -6px 0 18px;
}
.aviso-auto svg { width: 16px; height: 16px; color: var(--accent); flex: none; }

/* ---- calendário --------------------------------------------------------- */

.mes-nav { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 14px; }
.mes-nav strong { font: 600 22px var(--font-display); font-variant-numeric: lining-nums; }
.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal .dow { font-size: 11px; font-weight: 700; color: var(--ink-3); text-align: center; padding-bottom: 4px; letter-spacing: 0.06em; }
.cal .dia {
  aspect-ratio: 0.72;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--surface);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  overflow: hidden;
  position: relative;
}
.cal .dia.fora { opacity: 0.35; }
.cal .dia.hoje { border-color: var(--ink); }
.cal .dia .mini { flex: 1; border-radius: 8px; overflow: hidden; background: var(--surface-2); min-height: 0; }
.cal .dia .mini img { width: 100%; height: 100%; object-fit: cover; }
.cal .dia .ponto { position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cal .dia .ponto.usado { background: var(--ok); }
.cal .dia .comp-txt { font-size: 9.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legenda { display: flex; gap: 16px; font-size: 12px; color: var(--ink-2); margin: 12px 0 0; }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.legenda i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.legenda i.usado { background: var(--ok); }

.semana { display: grid; gap: 10px; }
.semana .linha-dia {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px;
  text-align: left;
  width: 100%;
}
.semana .linha-dia.hoje { border-color: var(--ink); }
.semana .data { text-align: center; }
.semana .data b { display: block; font: 600 26px/1 var(--font-display); }
.semana .data small { font-size: 11px; text-transform: uppercase; color: var(--ink-3); font-weight: 700; letter-spacing: 0.08em; }
.semana .resumo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.semana .thumbs { display: flex; gap: 4px; }
.semana .thumbs > * { width: 40px; height: 52px; border-radius: 8px; overflow: hidden; background: var(--surface-2); flex: none; }
.semana .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.semana .txt { min-width: 0; font-size: 13.5px; }
.semana .txt b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.semana .txt span { color: var(--ink-3); font-size: 12.5px; }

.escolher-look { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.escolher-look button { background: none; border: 0; padding: 0; text-align: left; position: relative; }
.escolher-look .comp { border: 2px solid transparent; }
.escolher-look button[aria-pressed='true'] .comp { border-color: var(--ink); }
.escolher-look small { display: block; font-size: 11.5px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }

/* ---- construtor de look ------------------------------------------------- */

.construtor-previa { max-width: 340px; margin: 0 auto 18px; }
.seletor { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 560px) { .seletor { grid-template-columns: repeat(4, 1fr); } }
.seletor .cartao .nome { font-size: 12px; }

/* ---- folha (bottom sheet) ----------------------------------------------- */

.veu {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--veil);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: veu 0.25s ease;
}
@keyframes veu { from { opacity: 0; } }
.folha {
  width: 100%;
  max-width: 720px;
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 10px 20px calc(24px + var(--safe-b));
  box-shadow: var(--shadow-lg);
  animation: subir 0.38s var(--ease);
}
@keyframes subir { from { transform: translateY(100%); } }
.veu.saindo { animation: veu 0.2s ease reverse forwards; }
.veu.saindo .folha { animation: subir 0.22s ease-in reverse forwards; }
.folha .pega { width: 40px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 0 auto 14px; }
.folha .cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.folha .cab h2 { font: 600 24px/1.2 var(--font-display); margin: 0; }
.folha .rodape { display: flex; gap: 10px; margin-top: 22px; }
.folha .rodape .btn { flex: 1; }

/* ---- avisos ------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
  transform: translateX(-50%);
  z-index: 80;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: var(--pill);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toast 0.35s var(--ease);
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.erro { background: var(--danger); color: #fff; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 10px); } }

.erro-box {
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
  color: var(--danger);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 16px;
}

.esqueleto {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: brilho 1.4s infinite linear;
  border-radius: var(--r);
}
@keyframes brilho { to { background-position: -200% 0; } }

.girar { animation: girar 0.8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

/* ---- entrada (login) ---------------------------------------------------- */

.entrada-tela {
  min-height: calc(100dvh - 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 400px;
  margin: 0 auto;
  padding-bottom: 40px;
}
.marca {
  font: 600 44px/1 var(--font-display);
  letter-spacing: -0.015em;
  margin: 0 0 6px;
}
.marca sup { font: 700 11px var(--font); letter-spacing: 0.16em; vertical-align: super; margin-left: 4px; color: var(--accent); }
.entrada-tela .sub { margin-bottom: 32px; font-size: 15px; }

.avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font: 600 34px var(--font-display);
  color: var(--ink-2);
  border: 0;
  padding: 0;
  position: relative;
  flex: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar .lapis { position: absolute; right: 2px; bottom: 2px; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; }
.avatar .lapis svg { width: 14px; height: 14px; }
.perfil-topo { display: flex; gap: 18px; align-items: center; margin: 8px 0 24px; }
.perfil-topo h1 { font: 600 28px/1.1 var(--font-display); margin: 0; }

.em-breve li .item span:last-child {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.alternar input[type='radio'] { width: 24px; height: 24px; border-radius: 50%; background: transparent; border: 1.5px solid var(--ink-3); }
.alternar input[type='radio']::after { top: 50%; left: 50%; width: 12px; height: 12px; transform: translate(-50%, -50%) scale(0); background: var(--ink); box-shadow: none; }
.alternar input[type='radio']:checked { background: transparent; border-color: var(--ink); }
.alternar input[type='radio']:checked::after { transform: translate(-50%, -50%) scale(1); }

/* Os algarismos do Cormorant são de estilo antigo: o "1" parece um "I". */
.numeros strong, .metricas strong, .semana .data b, .titulo, .topo h1 { font-variant-numeric: lining-nums; }
.cor-bola { border-color: color-mix(in srgb, var(--ink) 22%, transparent); }
/* No telemóvel a prévia não pode empurrar a grelha de peças para fora do ecrã. */
.construtor-previa { max-width: min(340px, 58vw); }

/* ---- fase 2: IA ----------------------------------------------------------- */

a.ia-card { text-decoration: none; color: inherit; align-items: center; }
.ia-card .seta { margin-left: auto; color: var(--ink-3); }
.ia-card .seta svg { width: 18px; height: 18px; }
.tempo {
  display: inline-block;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--surface-2);
  border-radius: var(--pill);
  padding: 4px 12px;
}

.etiquetas { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.etq {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: var(--pill);
  background: var(--accent-soft);
  color: var(--ink);
}
.etq.livre { background: var(--surface-2); font-style: italic; }
.chip.sugerida { border-color: var(--accent); }
.chip.sugerida svg { width: 14px; height: 14px; color: var(--accent); }
.chip[aria-pressed='true'].sugerida svg { color: inherit; }

.no-look .item { align-items: center; }
.linha-peca { display: flex; gap: 12px; align-items: center; min-width: 0; text-align: left; }
.linha-peca b { font-weight: 600; font-size: 14px; display: block; }
.linha-peca small { font-size: 12px; }
.mini-foto { width: 44px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--surface-2); flex: none; }
.mini-foto img { width: 100%; height: 100%; object-fit: cover; }

/* conversa do stylist */
.conversa { display: flex; flex-direction: column; gap: 10px; }
.bolha { max-width: 86%; padding: 11px 15px; border-radius: 18px; font-size: 14.5px; white-space: pre-line; }
.bolha.eu { align-self: flex-end; background: var(--ink); color: var(--bg); border-bottom-right-radius: 6px; }
.bolha.ia { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.a-pensar { display: flex; gap: 5px; padding: 15px 18px; }
.a-pensar span { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: pulsar 1.2s infinite ease-in-out; }
.a-pensar span:nth-child(2) { animation-delay: 0.15s; }
.a-pensar span:nth-child(3) { animation-delay: 0.3s; }
@keyframes pulsar { 0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1); } }
.sugestao { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; box-shadow: var(--shadow); }
.estilos-sug { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 13px; }
.estilos-sug li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.estilos-sug .etiquetas { margin: 0; }
.barra-fixa form > div, form.barra-fixa > div { align-items: center; }

/* avatar */
.refs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ref { aspect-ratio: 3 / 4; border-radius: var(--r); overflow: hidden; background: var(--surface-2); position: relative; }
.ref img { width: 100%; height: 100%; object-fit: cover; }
.ref .ico { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; }
.ref .ico svg { width: 15px; height: 15px; }
.ref.nova { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1.5px dashed var(--line); background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ref.nova svg { width: 24px; height: 24px; }
.avatar-base { max-width: 320px; margin: 0 auto; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); aspect-ratio: 3 / 4; }
.avatar-base img { width: 100%; height: 100%; object-fit: cover; }
.poses { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
@media (min-width: 560px) { .poses { grid-template-columns: repeat(5, 1fr); } }
.pose { background: none; border: 0; padding: 0; text-align: center; }
.pose > img, .pose > span { display: grid; place-items: center; aspect-ratio: 3 / 4; width: 100%; border-radius: 12px; overflow: hidden; background: var(--surface-2); object-fit: cover; }
.pose .vazia { color: var(--ink-3); font-size: 22px; border: 1.5px dashed var(--line); background: transparent; }
.pose .falhou { color: var(--danger); font-weight: 700; font-size: 20px; background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.pose small { display: block; font-size: 10.5px; margin-top: 4px; color: var(--ink-2); line-height: 1.25; }
.poses-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-height: 46vh; overflow-y: auto; }
.poses-mini button { background: none; border: 2px solid transparent; border-radius: 12px; padding: 0; overflow: hidden; text-align: center; }
.poses-mini button[aria-pressed='true'] { border-color: var(--ink); }
.poses-mini img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--surface-2); }
.poses-mini small { display: block; font-size: 10.5px; padding: 3px 2px 5px; color: var(--ink-2); }
.prova-grande { border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); max-width: 420px; margin: 0 auto; }
.prova-grande img { width: 100%; }
.rolo.provas { grid-auto-columns: 34%; }
.prova { text-decoration: none; color: inherit; }
.prova img { aspect-ratio: 3 / 4; width: 100%; object-fit: cover; border-radius: var(--r); background: var(--surface-2); }
.prova small { font-size: 11.5px; color: var(--ink-2); }
.comparar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.comparar figure { margin: 0; }
.comparar img { width: 100%; border-radius: var(--r); background: var(--surface-2); }
.comparar figcaption { font-size: 12.5px; text-align: center; margin-top: 6px; font-weight: 600; }
.folha .rodape { flex-wrap: wrap; }
h2.secao .sub { font: 500 13px var(--font); margin: 0; }
.candidato { background: none; border: 2px solid transparent; border-radius: var(--r); padding: 0; overflow: hidden; text-align: center; }
.candidato img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--surface-2); }
.candidato span { display: block; padding: 8px; font-size: 13px; font-weight: 600; }
.candidato:active, .candidato:focus-visible { border-color: var(--ink); }
.refs { grid-template-columns: repeat(4, 1fr); }
.ref.nova span { text-align: center; padding: 0 4px; font-size: 12px; }
