:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --fill: rgba(118, 118, 128, 0.12);
  --fill-2: rgba(118, 118, 128, 0.2);
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #a1a1a6;
  --line: rgba(60, 60, 67, 0.14);
  --accent: #0071e3;
  --accent-text: #ffffff;
  --gold: #a8843f;
  --ok: #248a3d;
  --bad: #d70015;
  --bar: rgba(245, 245, 247, 0.8);
  --seg: #e3e3e8;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --r: 18px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1c1c1e;
    --fill: rgba(118, 118, 128, 0.24);
    --fill-2: rgba(118, 118, 128, 0.34);
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #6e6e73;
    --line: rgba(84, 84, 88, 0.5);
    --accent: #2997ff;
    --gold: #d4b26f;
    --ok: #30d158;
    --bad: #ff453a;
    --bar: rgba(22, 22, 23, 0.78);
    --seg: #1c1c1e;
    --shadow: none;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); height: 100%; overflow: hidden; overscroll-behavior: none; }
/* Só este contêiner rola. Com o body parado, a tab bar fixa não "solta" no iOS ao voltar para o app instalado. */
#scroller { position: fixed; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }
body {
  font: 17px/1.42 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; }
a { text-decoration: none; color: inherit; }
.back, .link { color: var(--accent); }
[hidden] { display: none !important; }

#app { max-width: 720px; margin: 0 auto; padding: calc(var(--safe-t) + 12px) 16px calc(var(--safe-b) + 104px); }

/* ---------- Tipografia ---------- */
.large-title { font-size: 34px; line-height: 1.12; font-weight: 700; letter-spacing: -0.025em; margin: 18px 0 4px; }
.subtitle { color: var(--text-2); font-size: 15px; margin: 0 0 20px; }
.section-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); margin: 28px 4px 8px; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 12px; }
.spread { justify-content: space-between; }
.wrap { flex-wrap: wrap; }

/* ---------- Header ---------- */
.header { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.header .large-title { margin-bottom: 0; }
.back { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-size: 17px; padding: 8px 0; min-height: 44px; }
.back svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.4; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px; border-radius: 14px;
  background: var(--accent); color: var(--accent-text); font-weight: 600; font-size: 17px;
  transition: transform 0.2s var(--ease), opacity 0.2s;
}
.btn:active { transform: scale(0.97); opacity: 0.85; }
.btn:disabled { opacity: 0.4; }
.btn.block { width: 100%; }
.btn.secondary { background: var(--fill); color: var(--accent); }
.btn.danger { background: transparent; color: var(--bad); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 15px; border-radius: 999px; }
.btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.link { color: var(--accent); font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- Cards ---------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 12px; }
.list { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 56px; position: relative; width: 100%; text-align: left; }
.list-item + .list-item::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 0.5px solid var(--line); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 500; }
.list-item .meta { color: var(--text-2); font-size: 14px; }
.chev { width: 14px; height: 14px; stroke: var(--text-3); fill: none; stroke-width: 2.5; flex: none; }

/* ---------- Formulário ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--text-2); margin: 0 4px 6px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px;
  background: var(--card); border: 0.5px solid var(--line); outline: none; font-size: 17px;
  -webkit-appearance: none; appearance: none;
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 6px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chip {
  flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 15px;
  background: var(--fill); color: var(--text); display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.2s, color 0.2s;
}
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.chip .n { opacity: 0.55; font-size: 13px; }

/* ---------- Login ---------- */
.login { min-height: 82dvh; display: flex; flex-direction: column; justify-content: center; max-width: 360px; margin: 0 auto; }
.login .logo { width: 72px; height: 72px; border-radius: 18px; margin-bottom: 18px; }

/* ---------- Guarda-roupa ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.tile { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--shadow); text-align: left; }
.tile img { width: 100%; height: 100%; object-fit: contain; }
.tile .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px;
  font-size: 11px; line-height: 1.25; color: #fff; font-weight: 500;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile .badge { position: absolute; top: 6px; right: 6px; font-size: 11px; padding: 2px 7px; border-radius: 999px; background: rgba(0,0,0,0.6); color: #fff; }
.tile .badge.err { background: var(--bad); }
.tile.pending img { opacity: 0.5; }

.upload-progress { display: flex; align-items: center; gap: 14px; }
.bar { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; flex: 1; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.4s var(--ease); }

.empty { text-align: center; padding: 48px 16px; color: var(--text-2); }
.empty svg { width: 48px; height: 48px; stroke: var(--text-3); fill: none; stroke-width: 1.5; margin-bottom: 10px; }
.empty h3 { color: var(--text); margin: 0 0 6px; font-size: 20px; }

/* ---------- Perfil ---------- */
.avatar { width: 120px; height: 160px; border-radius: 18px; object-fit: cover; background: var(--fill); display: grid; place-items: center; color: var(--text-2); font-size: 13px; text-align: center; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 62px; font-size: 11px; color: var(--text-2); text-align: center; line-height: 1.2; }
.swatch i { width: 44px; height: 44px; border-radius: 50%; border: 0.5px solid var(--line); }
.swatch.avoid i { position: relative; }
.swatch.avoid i::after { content: ""; position: absolute; inset: 50% -3px auto; border-top: 2px solid var(--bad); transform: rotate(-45deg); }
.tips { margin: 8px 0 0; padding-left: 20px; }
.tips li { margin-bottom: 6px; }

/* ---------- Viagem ---------- */
.leg { display: grid; grid-template-columns: 1fr; gap: 8px; position: relative; }
.leg + .leg { margin-top: 14px; padding-top: 14px; border-top: 0.5px solid var(--line); }
.leg .dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.leg .rm { position: absolute; top: 14px; right: 0; color: var(--bad); font-size: 14px; }
.leg:first-child .rm { top: 0; }

.legs-summary { display: flex; flex-direction: column; gap: 10px; }
.leg-card { display: flex; gap: 14px; align-items: flex-start; }
.leg-card .temp { flex: none; width: 64px; text-align: center; padding: 8px 0; border-radius: 12px; background: var(--fill); }
.leg-card .temp b { display: block; font-size: 20px; letter-spacing: -0.02em; }
.leg-card .temp span { font-size: 11px; color: var(--text-2); }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--seg); box-shadow: 0 0 0 8px var(--bg); border-radius: 10px; padding: 2px; margin: 20px 0 14px; position: sticky; top: calc(var(--safe-t) + 6px); z-index: 5; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.segmented button { min-height: 34px; border-radius: 8px; font-size: 14px; font-weight: 500; transition: background 0.2s var(--ease); }
.segmented button[aria-pressed="true"] { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }

.check-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; position: relative; width: 100%; text-align: left; min-height: 64px; }
.check-item + .check-item::before { content: ""; position: absolute; top: 0; left: 76px; right: 0; border-top: 0.5px solid var(--line); }
.check-item img { width: 48px; height: 48px; border-radius: 10px; object-fit: contain; background: #fff; flex: none; }
.check-item .grow { flex: 1; min-width: 0; }
.check-item .why { color: var(--text-2); font-size: 13px; }
.check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--text-3); flex: none; display: grid; place-items: center; transition: all 0.2s var(--ease); }
.check svg { width: 14px; height: 14px; stroke: #fff; fill: none; stroke-width: 3; opacity: 0; }
.check-item.done .check { background: var(--ok); border-color: var(--ok); }
.check-item.done .check svg { opacity: 1; }
.check-item.done .title { color: var(--text-2); text-decoration: line-through; }

.looks { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .looks { grid-template-columns: 1fr 1fr; } }
.look { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.collage { display: grid; gap: 2px; background: var(--line); aspect-ratio: 1 / 1; }
.collage img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.collage.n1 { grid-template-columns: 1fr; }
.collage.n2 { grid-template-columns: 1fr 1fr; }
.collage.n3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.collage.n3 img:first-child { grid-row: span 2; }
.collage.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.collage.n5, .collage.n6 { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.collage.n5 img:first-child { grid-row: span 2; }
.look .body { padding: 14px 16px 16px; }
.look .name { font-weight: 600; font-size: 17px; }
.look .tag { display: inline-block; font-size: 12px; color: var(--text-2); background: var(--fill); border-radius: 999px; padding: 2px 9px; margin: 6px 6px 0 0; }
.look .tip { color: var(--text-2); font-size: 14px; margin-top: 8px; }

/* ---------- Loading ---------- */
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--fill-2); border-top-color: var(--accent); animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.overlay { position: fixed; inset: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); display: grid; place-items: center; padding: 32px; text-align: center; animation: fade 0.3s var(--ease); }
.overlay .spinner { width: 40px; height: 40px; border-width: 3px; margin: 0 auto 18px; }
.overlay h3 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.02em; }
.overlay p { margin: 0; color: var(--text-2); max-width: 300px; }
@keyframes fade { from { opacity: 0; } }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 6px 12px calc(var(--safe-b) + 6px);
  background: var(--bar); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--line);
}
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 50px; justify-content: center; color: var(--text-3); font-size: 11px; font-weight: 500; }
.tabbar svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.tabbar button[aria-current="true"] { color: var(--accent); }

/* ---------- Sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.35); animation: fade 0.25s var(--ease); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 92dvh; overflow-y: auto;
  background: var(--bg); border-radius: 20px 20px 0 0; padding: 8px 16px calc(var(--safe-b) + 20px);
  max-width: 720px; margin: 0 auto; animation: up 0.42s var(--ease);
}
.sheet .grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--fill-2); margin: 0 auto 10px; }
.sheet .hero { width: 100%; max-height: 44dvh; object-fit: contain; border-radius: 16px; background: #fff; }
@keyframes up { from { transform: translateY(100%); } }

.toast { display: flex; align-items: center; gap: 14px; position: fixed; left: 50%; bottom: calc(var(--safe-b) + 88px); transform: translateX(-50%); z-index: 60; background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-size: 15px; max-width: calc(100% - 32px); box-shadow: 0 8px 30px rgba(0,0,0,0.2); animation: fade 0.25s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.legs-summary .card + .card { margin-top: 0; }

/* ---------- v4: looks, checklist, mala editável ---------- */
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn.icon-only { padding: 0; width: 40px; }
.btn.amber { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold); }
button.list-item, a.list-item { color: inherit; font: inherit; background: none; }
.danger-text .title { color: var(--bad); }
.sheet-title { font-size: 22px; letter-spacing: -0.02em; margin: 4px 2px 14px; }
.toolbar { margin: 0 4px 10px; }
.toolbar .link { margin-left: 14px; }

.tag { display: inline-block; font-size: 12px; color: var(--text-2); background: var(--fill); border-radius: 999px; padding: 2px 9px; margin: 6px 6px 0 0; font-weight: 500; vertical-align: middle; }
.tag.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.tag.live { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.folder { width: 40px; height: 40px; border-radius: 10px; background: var(--fill); display: grid; place-items: center; flex: none; }
.folder svg { width: 22px; height: 22px; stroke: var(--text-2); fill: none; stroke-width: 1.8; }
.leg-chip { flex: none; display: inline-flex; gap: 6px; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-size: 14px; color: var(--text-2); }
.leg-chip b { color: var(--text); font-weight: 600; }

.tile.off img { opacity: 0.35; }
.badge.fav { background: rgba(255,255,255,0.9); padding: 3px; display: grid; }
.badge.fav svg { width: 14px; height: 14px; fill: #ff375f; stroke: none; }
.picker { margin-top: 4px; }
.tile .pick { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,0.25); display: grid; place-items: center; }
.tile .pick svg { width: 13px; height: 13px; stroke: #fff; fill: none; stroke-width: 3; opacity: 0; }
.tile.picked { outline: 3px solid var(--accent); outline-offset: -3px; }
.tile.picked .pick { background: var(--accent); border-color: var(--accent); }
.tile.picked .pick svg { opacity: 1; }

.fav-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); }
.fav-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--text-2); stroke-width: 2; }
.fav-btn[aria-pressed="true"] svg { fill: #ff375f; stroke: #ff375f; }
.src { display: block; color: var(--accent); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); border-radius: 12px; padding: 12px 14px; border: 0.5px solid var(--line); }
.switch { appearance: none; -webkit-appearance: none; width: 51px; height: 31px; border-radius: 999px; background: var(--fill-2); position: relative; flex: none; transition: background 0.25s var(--ease); cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.2); transition: transform 0.25s var(--ease); }
.switch:checked { background: var(--ok); }
.switch:checked::after { transform: translateX(20px); }
.radio { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }

.rm-btn, .pin-btn, .icon-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--text-3); }
.rm-btn svg, .pin-btn svg, .icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.icon-btn svg { fill: currentColor; stroke: none; }
.rm-btn[data-rm] { color: #fff; background: var(--bad); width: 28px; height: 28px; }
.pin-btn.on { color: var(--gold); }
.pin-btn.on svg { fill: currentColor; }
.check-item.item { min-height: 52px; }
.check-item.item + .check-item.item::before { left: 54px; }
.add-item { display: flex; gap: 8px; margin-bottom: 12px; }
.add-item .input { flex: 1; }
.add-item .btn { width: 50px; padding: 0; }

.look-media { background: var(--line); }
.look-img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.look .why-text { margin-top: 10px; font-size: 15px; }
.look .tip { color: var(--text-2); font-size: 14px; margin-top: 8px; }
.look .pieces { color: var(--text-3); font-size: 13px; margin-top: 8px; }
.look .comment { font-size: 14px; font-style: italic; margin-top: 8px; color: var(--text-2); }
.look-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 0.5px solid var(--line); }
.look-actions .btn.small { margin-left: auto; }
.stars { display: inline-flex; }
.stars button { width: 32px; height: 36px; display: grid; place-items: center; color: var(--fill-2); }
.stars svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.stars button.on { color: #ffb800; }
.chip.on { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); font-weight: 600; }
.tag.ia { margin: 0 0 0 4px; font-size: 11px; padding: 1px 7px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* ---------- v5: arrastar para remover, avaliar looks ---------- */
.toast button { color: var(--accent); font-weight: 600; filter: brightness(1.25); white-space: nowrap; }
[data-swipe] { touch-action: pan-y; --dx: 0px; }
[data-swipe].swiping { background: linear-gradient(90deg, var(--card) calc(100% + var(--dx)), var(--bad) 0); }
[data-swipe].swiping > * { transform: translateX(var(--dx)); }
[data-swipe].swiping::after { content: attr(data-swipe); position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: #fff; font-weight: 600; font-size: 15px; }
[data-swipe].back > *, [data-swipe].gone > * { transition: transform 0.22s var(--ease); }
[data-swipe].back { transition: background 0.22s; }
.hint { font-size: 12px; color: var(--text-3); text-align: center; margin: 10px 0 0; }
.btn.yes { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.btn.no { background: var(--fill); color: var(--text-2); }
.look-actions .btn.yes { margin-left: auto; }
.review-cta { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin-bottom: 12px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.review-cta .title { font-weight: 600; }
.review-cta .meta { color: var(--text-2); font-size: 14px; }
.discarded .mini { display: flex; flex: none; }
.discarded .mini img { width: 34px; height: 44px; object-fit: contain; background: #fff; border-radius: 6px; margin-right: -10px; box-shadow: 0 0 0 1.5px var(--card); }
.discarded .grow { margin-left: 12px; }
.discarded .title { color: var(--text-2); }

.deck { position: fixed; inset: 0; z-index: 30; background: var(--bg); display: flex; flex-direction: column;
  padding: calc(var(--safe-t) + 6px) 16px calc(var(--safe-b) + 12px); animation: up 0.35s var(--ease); max-width: 720px; margin: 0 auto; }
.deck-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 44px; }
.deck-head .link { justify-self: end; }
.deck-stage { flex: 1; min-height: 0; position: relative; display: flex; }
.deck-card { flex: 1; min-height: 0; overflow-y: auto; background: var(--card); border-radius: 22px; box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  touch-action: pan-y; user-select: none; -webkit-user-select: none; position: relative; --yes: 0; --no: 0; }
.deck-media .collage { aspect-ratio: 4 / 3.4; }
.deck-media img { pointer-events: none; }
.deck-card .body { padding: 14px 18px 18px; }
.deck-card .name { font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.stamp { position: absolute; top: 22px; padding: 4px 12px; border: 3px solid; border-radius: 10px; font-weight: 800; font-size: 26px; letter-spacing: 0.04em; pointer-events: none; }
.stamp.yes { left: 18px; color: var(--ok); transform: rotate(-12deg); opacity: var(--yes); }
.stamp.no { right: 18px; color: var(--bad); transform: rotate(12deg); opacity: var(--no); }
.deck-btns { display: flex; justify-content: center; gap: 36px; padding-top: 14px; }
.round { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: var(--card); box-shadow: 0 6px 20px rgba(0,0,0,0.12); transition: transform 0.15s var(--ease); }
.round:active { transform: scale(0.9); }
.round svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.6; }
.round.no { color: var(--bad); }
.round.yes { color: var(--ok); }
.round.yes svg { fill: currentColor; stroke: none; }
.deck-reasons { padding-top: 10px; }
.deck-reasons .chips { margin-top: 6px; }
.deck .hint { margin-top: 8px; }
.deck-end { flex: 1; display: flex; flex-direction: column; justify-content: center; text-align: center; max-width: 420px; margin: 0 auto; width: 100%; }
.deck-end .big { font-size: 56px; color: var(--ok); line-height: 1; }
.deck-end h2 { margin: 12px 0 6px; letter-spacing: -0.02em; }
.deck-end p { margin: 0 0 24px; }
.tile .badge.rule { left: 6px; right: auto; background: color-mix(in srgb, var(--gold) 88%, #000); }
.field.rules textarea { min-height: 84px; border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.photos { display: flex; gap: 14px; }
.photos > div { text-align: center; }
.photos .small { margin-top: 6px; }
/* ---------- v5.1: carrossel de opções ---------- */
.carousel .deck-head b { font-size: 16px; }
.track { flex: 1; min-height: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 4px -16px 0; overscroll-behavior-x: contain; }
.track::-webkit-scrollbar { display: none; }
.opt { flex: 0 0 100%; min-width: 0; scroll-snap-align: center; scroll-snap-stop: always; padding: 0 16px; display: flex; flex-direction: column; }
.opt-scroll { flex: 1; min-height: 0; overflow-y: auto; background: var(--card); border-radius: 22px 22px 0 0; }
.opt-scroll > * { flex-shrink: 0; }
.opt .deck-media .collage { aspect-ratio: 4 / 3; }
.opt .body { padding: 14px 18px 8px; }
.opt .name { font-weight: 700; font-size: 21px; letter-spacing: -0.02em; }
.opt-actions { flex: none; display: flex; gap: 10px; padding: 12px 16px 14px; background: var(--card); border-radius: 0 0 22px 22px; align-items: center; border-top: 0.5px solid var(--line); }
.opt-actions .btn { flex: 1; min-height: 48px; }
.opt-actions .btn.yes.on { background: var(--ok); color: #fff; }
.opt-actions .opt-state { flex: 1; color: var(--text-2); font-size: 14px; }
.opt-reasons { padding: 4px 18px 16px; }
.opt.is-saved .opt-scroll { box-shadow: inset 0 0 0 3px var(--ok); }
.opt.is-out .deck-media, .opt.is-out .body { opacity: 0.4; }
.dots { display: flex; justify-content: center; gap: 8px; padding: 10px 0 8px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--fill-2); cursor: pointer; transition: transform 0.2s var(--ease); }
.dots i.cur { background: var(--text); transform: scale(1.25); }
.dots i.saved { background: var(--ok); }
.more { display: flex; gap: 8px; margin-bottom: 10px; }
.more .input { flex: 1; min-height: 46px; font-size: 15px; }
.more .btn { min-height: 46px; padding: 0 14px; font-size: 15px; white-space: nowrap; }

/* Looks por peça */
.combo { flex: none; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 0; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.combo.zero { background: var(--fill); color: var(--text-2); font-weight: 500; }
.piece-filter { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.piece-filter img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex: none; }
.piece-filter .meta { color: var(--text-2); font-size: 13px; }
.piece-filter .title { font-weight: 600; }
.piece-link { display: inline; text-align: left; border: 0; background: none; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; cursor: pointer; }
.piece-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.piece-tile { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; min-width: 0; }
.piece-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--card); }
.piece-tile .t { font-size: 13px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.piece-tile .n { font-size: 12px; color: var(--text-3); }
.piece-filter .icon-btn { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--fill); color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.piece-filter .icon-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; }
.piece-filter.in-sheet { margin: 0 4px 14px; }
