/* Circuitex — estilos. Amarelo como cor principal, tema claro e escuro. */

:root {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --surface-2: #fbf8ef;
  --text: #1b1a17;
  --muted: #6b675e;
  --line: #e6e1d3;
  --brand: #ffc20e;
  --brand-strong: #e5a800;
  --brand-ink: #1b1a17;
  --brand-soft: #fff3c4;
  --header-bg: #ffc20e;
  --header-ink: #1b1a17;
  --shadow: 0 1px 2px rgba(30, 25, 10, .06), 0 6px 20px rgba(30, 25, 10, .06);
  --radius: 14px;
  --car-body: #fdfcf8;
  --car-line: #2b2a27;
  --car-glass: #3a3a3a;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #121212;
  --surface: #1c1c1c;
  --surface-2: #242424;
  --text: #f2efe6;
  --muted: #a39e92;
  --line: #2f2f2f;
  --brand: #ffc93c;
  --brand-strong: #ffd666;
  --brand-ink: #161616;
  --brand-soft: #3a3216;
  --header-bg: #181818;
  --header-ink: #f2efe6;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  --car-body: #2a2a2a;
  --car-line: #ffc93c;
  --car-glass: #101010;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
button:disabled { cursor: not-allowed; opacity: .45; }
input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }

.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.flip { transform: rotate(180deg); }

/* ---------- Cabeçalho */
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: 60px; display: flex; align-items: center; gap: 8px;
  padding: 0 16px; padding-top: env(safe-area-inset-top);
  background: var(--header-bg); color: var(--header-ink);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
:root[data-theme="dark"] .topbar { border-bottom: 2px solid var(--brand); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; margin-right: 12px; }
.logo-mark { width: 34px; height: 34px; }
.logo-bg { fill: #1b1a17; }
.logo-trace { fill: none; stroke: #ffc20e; stroke-width: 2.6; stroke-linecap: round; }
.logo-node { fill: #ffc20e; }
.wordmark { font-weight: 800; letter-spacing: .14em; font-size: 18px; }
.nav-a {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px;
  border-radius: 10px; font-weight: 600; text-decoration: none; color: inherit;
}
.nav-a:hover:not(:disabled) { background: rgba(0, 0, 0, .08); }
:root[data-theme="dark"] .nav-a:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
.nav-a.on { background: rgba(0, 0, 0, .1); }
:root[data-theme="dark"] .nav-a.on { background: rgba(255, 201, 60, .14); color: var(--brand); }
.top-sp { flex: 1; }
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px; flex: none;
}
.icon-btn:hover:not(:disabled) { background: color-mix(in srgb, var(--text) 8%, transparent); }

#app { padding: 20px; max-width: 1440px; margin: 0 auto; }
.home > *, .select > *, .vehicle > *, .stage, .paper-scroll { min-width: 0; }

/* ---------- Botões e campos */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 18px; border-radius: 12px; font-weight: 600;
  background: var(--surface); border: 1.5px solid var(--line); box-shadow: var(--shadow);
  transition: border-color .15s, transform .1s;
}
.btn:hover { border-color: var(--brand); }
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; justify-content: flex-start; margin-top: 10px; }
.btn-block .ico { color: var(--brand-strong); }
:root[data-theme="dark"] .btn-block .ico { color: var(--brand); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn-icon { width: 48px; padding: 0; flex: none; }
.btn-sm { height: 36px; padding: 0 12px; font-size: 14px; box-shadow: none; }
.link { display: inline-flex; align-items: center; gap: 4px; margin: 12px auto 0; color: var(--brand-strong); font-weight: 600; }
:root[data-theme="dark"] .link { color: var(--brand); }

.vin, .search { display: flex; gap: 8px; }
.vin input, .search input, .modal-search input {
  flex: 1; min-width: 0; height: 48px; padding: 0 14px; border-radius: 12px;
  background: var(--surface); border: 1.5px solid var(--line); outline: none;
}
.vin input:focus, .search input:focus { border-color: var(--brand); }
.vin input { text-transform: uppercase; letter-spacing: .06em; }
.vin input::placeholder { text-transform: none; letter-spacing: 0; }

.h-title { font-size: 20px; font-weight: 700; margin: 4px 0 14px; position: relative; padding-bottom: 8px; }
.h-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 44px; height: 4px; border-radius: 4px; background: var(--brand); }
.h-title:not(:first-child) { margin-top: 30px; }

/* ---------- Início */
.home { display: grid; grid-template-columns: minmax(300px, 460px) 1fr; gap: 24px; align-items: start; }
.home-main { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.recent { list-style: none; margin: 0; padding: 0; }
.recent li + li { border-top: 1px solid var(--line); }
.recent button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 6px; text-align: left; border-radius: 10px; }
.recent button:hover { background: var(--surface-2); }
.recent b { display: block; font-size: 15px; }
.recent small { color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); font-size: 14px; }
.home .link { display: flex; }

.hero {
  position: relative; overflow: hidden; border-radius: var(--radius); min-height: 540px;
  background: #1b1a17; color: #f6f1e2; box-shadow: var(--shadow);
}
.hero-grid {
  position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(rgba(255, 194, 14, .09) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 194, 14, .09) 1px, transparent 1px);
  background-size: 28px 28px;
}
.hero-in { position: relative; padding: 40px; display: flex; flex-direction: column; gap: 18px; height: 100%; }
.hero h1 { font-size: clamp(26px, 3vw, 38px); font-weight: 800; letter-spacing: -.01em; }
.hero p { margin: 0; color: #cfc8b4; max-width: 560px; }
.badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; background: #ffc20e; color: #1b1a17; font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 99px; }
.badge .ico { width: 16px; height: 16px; }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.hero-stats b { display: block; font-size: 30px; color: #ffc20e; font-weight: 800; }
.hero-stats span { font-size: 13px; color: #cfc8b4; }
.hero-sample { margin-top: auto; background: #fff; border-radius: 12px; padding: 10px; max-width: 460px; }
.hero-sample svg { width: 100%; height: auto; display: block; }

/* ---------- Painéis */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0 18px 18px; }
.panel-h { display: flex; align-items: center; gap: 8px; min-height: 58px; margin: 0 -18px 16px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.panel-h h2 { font-size: 18px; font-weight: 700; flex: 1; }
.panel-h-accent { background: var(--brand); color: var(--brand-ink); border-radius: var(--radius) var(--radius) 0 0; border-bottom: 0; }
.count { font-size: 13px; color: var(--muted); }

/* ---------- Seleção */
.select { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 20px; align-items: start; }
.panel-grow { min-height: 520px; }
.cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cat {
  display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 120px;
  padding: 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); text-align: left;
  font-size: 13px; font-weight: 600; transition: border-color .15s, background .15s;
}
.cat:hover { border-color: var(--brand); }
.cat.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1.5px var(--brand); }
.field-l { display: block; margin: 20px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.field {
  width: 100%; height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600;
}
.field:hover:not(:disabled) { border-color: var(--brand); }
.field small { color: var(--muted); font-weight: 500; }
.ph { color: var(--muted); font-weight: 500; }
.placeholder { display: grid; place-items: center; text-align: center; color: var(--muted); padding: 80px 20px; gap: 10px; }
.placeholder .ico { width: 44px; height: 44px; stroke-width: 1.5; color: var(--brand-strong); }

.models { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.model { position: relative; }
.model-card {
  width: 100%; display: flex; flex-direction: column; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--surface-2); transition: border-color .15s, transform .15s;
}
.model-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.model-card .car { padding: 18px 14px 6px; }
.model-name { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; font-weight: 700; background: var(--surface); border-top: 1px solid var(--line); }
.model.open .model-card { border-color: var(--brand); border-radius: 12px 12px 0 0; }
.model.open .model-name { background: var(--brand); color: var(--brand-ink); }
.model.open .model-name .ico { transform: rotate(180deg); }
.engines { list-style: none; margin: 0; padding: 0 4px; max-height: 0; opacity: 0; overflow: hidden; border: 1.5px solid transparent; border-top: 0; border-radius: 0 0 12px 12px; background: var(--surface);
  transition: max-height .35s cubic-bezier(.2,.8,.2,1), opacity .25s, padding .25s, border-color .25s; }
.model.open .engines { max-height: 480px; opacity: 1; padding: 4px; border-color: var(--brand); }
.engines button { width: 100%; text-align: left; padding: 10px; border-radius: 8px; font-size: 14px; }
.engines button:hover { background: var(--brand-soft); }

/* ---------- Silhuetas */
.car { width: 100%; height: auto; display: block; }
.car-body { fill: var(--car-body); stroke: var(--car-line); stroke-width: 2; stroke-linejoin: round; }
.car-glass { fill: var(--car-glass); }
.car-line { stroke: var(--car-line); stroke-width: 2; fill: none; }
.car-stripe { stroke: var(--brand); stroke-width: 3; }
.car-tire { fill: #1f1f1f; }
.car-hub { fill: #cfcac0; stroke: #1f1f1f; stroke-width: 2; }
.car-shadow { fill: rgba(0, 0, 0, .12); }
.car-bolt { fill: var(--brand); stroke: #1b1a17; stroke-width: 1.5; }
.car-sm { width: 76px; flex: none; }
.car-cat { width: 100%; max-width: 140px; align-self: center; }
.car-xl { max-width: 560px; margin: 0 auto; }

/* ---------- Veículo */
.vehicle { display: grid; grid-template-columns: minmax(300px, 440px) 1fr; gap: 24px; align-items: start; }
.manuals .search { margin-bottom: 14px; }
.chips-l { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.chips-l .ico { width: 16px; height: 16px; color: var(--brand-strong); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: thin; }
.chip { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px; border: 1.5px solid var(--brand); font-size: 13px; font-weight: 700; white-space: nowrap; }
.chip-btn:hover { background: var(--brand); color: var(--brand-ink); }
.acc-g { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.acc-g + .acc-g { margin-top: 8px; }
.acc-h { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; font-weight: 700; text-align: left; }
.acc-h span:nth-child(2) { flex: 1; }
.acc-ic { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); }
.acc-chev { transition: transform .2s; color: var(--muted); }
.acc-g.open .acc-chev { transform: rotate(180deg); }
.acc-b { list-style: none; margin: 0; padding: 0 6px; max-height: 0; overflow: hidden; transition: max-height .35s cubic-bezier(.2,.8,.2,1), padding .3s; }
.acc-g.open .acc-b { max-height: 640px; padding: 0 6px 6px; }
.acc-b button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 10px; border-radius: 9px; text-align: left; }
.acc-b button:hover { background: var(--surface-2); }
.acc-b button span { flex: 1; }
.acc-b .ico { color: var(--muted); }
.acc-b em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); padding: 2px 8px; border-radius: 99px; }
.results h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 6px 0 8px; }
.res { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 10px; text-align: left; border: 1px solid var(--line); margin-bottom: 6px; }
.res:hover { border-color: var(--brand); background: var(--brand-soft); }
.res b { min-width: 64px; }
.res span { flex: 1; font-size: 14px; }
.vehicle-show { display: flex; flex-direction: column; justify-content: center; gap: 20px; min-height: 480px; }
.vcard { border: 1.5px solid var(--brand); border-radius: var(--radius); background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.vcard-t { padding: 12px 16px; font-weight: 800; background: var(--brand-soft); border-bottom: 1px solid var(--line); }
.vcard-e { padding: 12px 16px 4px; font-weight: 600; }
.vcard-c { padding: 0 16px 12px; color: var(--muted); font-size: 13px; }

/* ---------- Visualizador */
#app:has(.viewer) { padding: 0; max-width: none; }
.viewer { display: flex; flex-direction: column; height: calc(100dvh - 60px); }
.loading { padding: 40px; color: var(--muted); }
.tabs { display: flex; align-items: stretch; gap: 8px; min-height: 52px; background: var(--surface); border-bottom: 1px solid var(--line); }
.tab-exit { display: flex; align-items: center; gap: 6px; padding: 0 16px; background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.tab-list { display: flex; align-items: center; gap: 6px; flex: 1; overflow-x: auto; padding: 6px 0; scrollbar-width: none; }
.tab { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); flex: none; }
.tab > button:first-child { padding: 8px 4px 8px 14px; font-weight: 600; font-size: 14px; }
.tab.on { border-color: var(--brand); box-shadow: inset 0 -3px 0 var(--brand); background: var(--surface); }
.tab-x { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; margin-right: 4px; }
.tab-x .ico { width: 16px; height: 16px; }
.tab-x:hover { background: var(--brand-soft); }
.tab-add { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); flex: none; }
.tab-veh { display: flex; flex-direction: column; justify-content: center; padding: 0 16px; font-size: 13px; font-weight: 700; text-align: right; background: var(--brand-soft); max-width: 340px; }
.tab-veh small { font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.viewer-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 60px 1fr 330px; }
.viewer-body.ix-closed { grid-template-columns: 60px 1fr 0; }
.viewer-body.ix-closed .index { display: none; }
.rail { display: flex; flex-direction: column; gap: 10px; align-items: center; padding: 14px 0; background: var(--surface); border-right: 1px solid var(--line); }
.rail button { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.rail button.on, .rail button:hover { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.toolbar { display: flex; align-items: center; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.zoom-v { min-width: 48px; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); }
.tb-sp { flex: 1; }
.paper-scroll { flex: 1; overflow: auto; padding: 24px; cursor: grab; }
.paper-scroll.dragging { cursor: grabbing; user-select: none; }
.paper {
  --z: 1;
  width: calc(min(1100px, 100%) * var(--z)); margin: 0 auto; background: #fff; color: #1b1a17;
  border-radius: 6px; box-shadow: 0 2px 4px rgba(0, 0, 0, .08), 0 12px 32px rgba(0, 0, 0, .12);
  padding: 22px 26px 16px; transition: width .15s;
}
.paper-h { display: flex; align-items: center; justify-content: space-between; background: #1b1a17; color: #fff; margin: -22px -26px 16px; padding: 8px 16px; border-radius: 6px 6px 0 0; border-bottom: 4px solid #ffc20e; }
.paper-brand { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .1em; }
.paper-brand .logo-mark { width: 22px; height: 22px; }
.paper-part { font-size: 12px; font-weight: 700; background: #ffc20e; color: #1b1a17; padding: 2px 8px; border-radius: 4px; }
/* Modo edição (só editor no Circuitex Dev) */
.ed-pen { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: 6px; border-radius: 7px; background: #1b1a17; color: #ffc20e; vertical-align: middle; cursor: pointer; flex: none; }
.ed-pen .ico { width: 14px; height: 14px; }
.ed-pen:hover { background: #ffc20e; color: #1b1a17; }
.model { position: relative; }
.model > .ed-pen { position: absolute; top: 8px; right: 8px; z-index: 2; margin: 0; }
.model-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 160px; border: 2px dashed var(--brand); border-radius: 12px; color: var(--brand-strong); font-weight: 700; }
.model-add:hover { background: var(--brand-soft); }
.ix-new { color: var(--brand-strong); font-weight: 700; border: 1.5px dashed var(--brand); margin-top: 8px; }
.ed-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -6px 0 14px; padding: 8px; border: 1.5px dashed #e5a800; border-radius: 10px; background: #fffaf0; }
.ed-bar .btn { color: #1b1a17; background: #fff; }
.ed-bar .btn-primary { background: #ffc20e; }
.ed-origin { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 4px 10px; border-radius: 99px; background: #eee8d8; color: #57534e; margin-right: auto; }
.or-modelo { background: #dcfce7; color: #166534; }
.or-motor { background: #dbeafe; color: #1e40af; }
.or-marca, .or-cat { background: #fff3c4; color: #92400e; }
.ed-card { width: min(640px, 100%); }
.ed-form { display: flex; flex-direction: column; gap: 12px; padding: 16px; overflow: auto; }
.ed-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); flex: 1; }
.ed-form input, .ed-form select { height: 42px; padding: 0 10px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); font: 500 14px var(--font); color: var(--text); }
.ed-form input:focus, .ed-form select:focus { outline: none; border-color: var(--brand); }
.ed-row { display: flex; gap: 10px; flex-wrap: wrap; }
.ed-sub { font-size: 13px; font-weight: 800; margin-top: 6px; }
.ed-vrow { display: grid; grid-template-columns: 1.6fr 1.2fr 80px 80px 36px; gap: 6px; }
.ed-vrow input, .ed-vrow select { height: 38px; font-size: 13px; }
.ed-note { margin: 0; font-size: 14px; color: var(--muted); }
.ed-actions { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.ed-err { color: #b91c1c; font-size: 13px; font-weight: 600; margin-right: auto; }
.ed-danger { color: #b91c1c; align-self: flex-start; box-shadow: none; }
@media (max-width: 640px) { .ed-vrow { grid-template-columns: 1fr 1fr; } }

.paper-part.draft { background: #fee2e2; color: #991b1b; margin-left: auto; margin-right: 8px; }
.preview-bar { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 12px; background: #1b1a17; color: #ffc20e; font-size: 12px; font-weight: 700; }
.preview-bar .ico { width: 16px; height: 16px; }
body.is-preview .viewer { height: calc(100dvh - 60px - 30px); }
.paper-title h3 { font-size: 18px; text-transform: uppercase; letter-spacing: .02em; }
.paper-title p { margin: 2px 0 14px; color: #6b675e; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.paper-f { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 18px; padding-top: 10px; border-top: 1px solid #e6e1d3; font-size: 11px; color: #8a857a; }
.paper-f span { font-weight: 600; }
.pager { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px; border-top: 1px solid var(--line); background: var(--surface); }
.pager input { width: 56px; height: 38px; text-align: center; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); font-weight: 700; }
.pager span { color: var(--muted); font-weight: 600; }

.index { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-left: 1px solid var(--line); }
.index-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.index-h > .ico { color: var(--brand-ink); background: var(--brand); border-radius: 8px; padding: 6px; width: 32px; height: 32px; }
.index-h h4 { flex: 1; font-size: 16px; text-transform: uppercase; letter-spacing: .08em; }
.ix-close { display: none; }
.ix { list-style: none; margin: 0; padding: 6px 8px 20px; overflow: auto; flex: 1; }
.ix ul { list-style: none; margin: 0; padding: 0 0 4px 22px; display: none; }
.ix-g.open > ul { display: block; }
.ix-h, .ix-i { display: flex; align-items: center; gap: 6px; width: 100%; padding: 10px 8px; border-radius: 8px; text-align: left; font-size: 14px; }
.ix-h { font-weight: 700; }
.ix-top { padding-left: 34px; font-weight: 500; }
.ix-h span, .ix-i span { flex: 1; }
.ix em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--brand-strong); }
:root[data-theme="dark"] .ix em { color: var(--brand); }
.ix-chev { width: 16px; height: 16px; transition: transform .2s; color: var(--muted); }
.ix-g.open .ix-chev { transform: rotate(90deg); }
.ix-h:hover, .ix-i:hover { background: var(--surface-2); }
.ix-i.on { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); font-weight: 700; }

/* ---------- Conteúdo das páginas (papel sempre claro) */
.paper-body { font-size: 13px; }
.sx-wrap { overflow-x: auto; }
.paper-body svg.sx, .sx-wrap svg { width: 100%; height: auto; display: block; }
.sx-bg { fill: #fff; }
.sx-s { stroke: #222; stroke-width: 1.6; fill: none; }
.sx-paper { fill: #fff; }
.sx-paper-np { fill: #fff; stroke: none; }
.sx-fill { fill: #222; }
.sx-fill-soft { fill: #e8e3d4; }
.sx-thin { stroke-width: 1; }
.sx-bold { stroke-width: 2.8; }
.sx-t { font: 500 11px var(--font); fill: #222; }
.sx-muted { fill: #6b675e; }
.sx-sym { font: 700 13px var(--font); fill: #222; }
.sx-rail { font: 800 12px var(--font); fill: #222; }
.sx-tag rect { fill: #ffc20e; stroke: #1b1a17; stroke-width: 1; }
.sx-tag-t { font: 700 10px var(--font); fill: #1b1a17; }
.sx-w { stroke-width: 3; stroke-linecap: round; fill: none; }
.sx-w-outline { stroke: #2a2a2a; stroke-width: 5; stroke-linecap: round; }
.sx-w-stripe { stroke-dasharray: 5 5; }
.sx-w-hit { stroke: transparent; stroke-width: 16; cursor: pointer; }
.sx-wire:hover .sx-w-outline { stroke: #ffb000; stroke-width: 8; }
svg.dim .sx-wire:not(.hl) { opacity: .2; }
.sx-wire.hl .sx-w-outline { stroke: #ffb000; stroke-width: 9; }
.sx-dot { fill: #222; }
.sx-pin { fill: #ffc20e; stroke: #222; stroke-width: 1.2; }
.sx-pin-t { font: 700 10px var(--font); fill: #1b1a17; }
.sx-module { fill: #fff3c4; stroke: #222; stroke-width: 1.6; }
.sx-module-t { font: 800 13px var(--font); fill: #1b1a17; }
.sx-box-t { font-weight: 700; }
.sx-pinlbl { font: 600 9px var(--font); fill: #555; }
.sx-ref { font-style: italic; font-size: 10px; }

/* Diagrama de central (central à esquerda) */
.ecu-bar-a { fill: #b9b7b1; stroke: #5c5a55; stroke-width: 1; }
.ecu-bar-b { fill: #e6e4de; stroke: #8a877f; stroke-width: 1; }
.ecu-bar-t { font: 800 13px var(--font); fill: #1b1a17; text-anchor: middle; }
.ecu-fn { font: 600 8.5px var(--font); fill: #3b3a36; text-anchor: end; }
.ecu-pin { cursor: help; }
.ecu-pin-pos { fill: #e25555; stroke: #8f1d1d; stroke-width: 1; }
.ecu-pin-neg { fill: #b8743a; stroke: #6b3e14; stroke-width: 1; }
.ecu-pin-sig { fill: #8fd8ea; stroke: #2f7f95; stroke-width: 1; }
.ecu-pin-t { font: 800 10px var(--font); text-anchor: middle; fill: #10343e; }
.ecu-pin-t-pos, .ecu-pin-t-neg { fill: #fff; }
.ecu-cbox { fill: #fff; stroke: #55534e; stroke-width: 1; }
.ecu-cbox-t { font: 700 8.5px var(--font); fill: #1b1a17; text-anchor: middle; }
.ecu-w { fill: none; stroke: #1d1d1d; stroke-width: 1.6; stroke-linejoin: round; }
.sx-wire:hover .ecu-w { stroke: #e5a800; stroke-width: 3; }
.sx-wire.hl .ecu-w { stroke: #e5a800; stroke-width: 3.2; }
.ecu-cpin { fill: #fff; stroke: #1b1a17; stroke-width: 1.1; }
.ecu-nc { fill: #eee8d8; stroke-dasharray: 2 2; }
.ecu-cpin-t { font: 800 9.5px var(--font); fill: #1b1a17; text-anchor: middle; }
.ecu-conn { fill: url(#cx-dark); stroke: #1f1f1f; stroke-width: 1; }
.ecu-gnd-g path { fill: none; stroke: #1d1d1d; stroke-width: 1.6; stroke-linecap: round; }
.ecu-gnd-t { font: 600 8.5px var(--font); fill: #3b3a36; text-anchor: end; }
.ecu-fuse-leg { fill: url(#cx-metal); stroke: #555; stroke-width: .6; }
.ecu-label-b { fill: #dcf0fc; stroke: #5aaee0; stroke-width: 1.2; }
.ecu-label { font: 700 11.5px var(--font); fill: #11384f; }
.ecu-src-t { font: 600 9px var(--font); fill: #3b3a36; }
.ecu-arrow { fill: none; stroke: #1d1d1d; stroke-width: 1.6; }
.ecu-fuse-b { stroke: rgba(0, 0, 0, .55); stroke-width: 1; }
.ecu-fuse-tag { fill: #dcf0fc; stroke: #5aaee0; stroke-width: 1; }
.ecu-fuse-t { font: 800 8.5px var(--font); fill: #11384f; text-anchor: middle; }
.ecu-gnd { fill: #1d1d1d; }
.ecu-gnd-l { stroke: #1d1d1d; stroke-width: 2; }
.ecu-zone { stroke: rgba(0, 0, 0, .12); stroke-width: 1; }
.ecu-zone-ref { fill: none; }
.ecu-zone-t { font: 800 10px var(--font); fill: #3b3a36; }
.ecu-change-box { fill: none; stroke: #e5a800; stroke-width: 2; stroke-dasharray: 6 4; }
.ecu-flag { font: 800 9px var(--font); fill: #b45309; text-transform: uppercase; letter-spacing: .06em; }
.ecu-empty { font: 600 13px var(--font); fill: #8a857a; }
.ecu-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e6e1d3; font-size: 11px; color: #555; }
.ecu-leg-i { display: inline-flex; align-items: center; gap: 6px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.photo-pins { margin: 0; }
.pp-frame { position: relative; border: 1px solid #e6e1d3; border-radius: 8px; overflow: hidden; background: #f4f1e8; }
.pp-frame img { display: block; width: 100%; height: auto; }
.pm { position: absolute; transform: translate(-50%, -50%); min-width: 22px; height: 22px; padding: 0 4px; border-radius: 11px; background: #fff; border: 1.5px solid #1b1a17; font: 800 10px/19px var(--font); text-align: center; color: #1b1a17; cursor: help; }
.pm-used { background: #ffc20e; }
.photo-pins figcaption { font-size: 12px; font-weight: 700; margin-top: 6px; color: #6b675e; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed #e6e1d3; font-size: 11px; color: #555; }
.legend-i { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; background: var(--sw); border: 1px solid #2a2a2a; vertical-align: -2px; margin-right: 6px; }
.sw-lg { width: 40px; height: 16px; }

.tbl { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 13px; }
.tbl th { text-align: left; background: #1b1a17; color: #fff; padding: 8px 10px; font-weight: 700; font-size: 12px; }
.tbl td { padding: 7px 10px; border-bottom: 1px solid #eee8d8; }
.tbl tr:nth-child(even) td { background: #fbf8ef; }
.tbl .row-hi td { background: #fff3c4 !important; }
.hint { display: flex; align-items: center; gap: 8px; color: #6b675e; font-size: 12px; margin: 12px 0 0; }
.hint .ico { width: 16px; height: 16px; color: #e5a800; }
.center { display: flex; justify-content: center; }
.notes { margin: 14px 0 0; padding-left: 18px; }
.notes li { margin: 4px 0; }
.scope-meta { display: flex; gap: 8px; margin-bottom: 10px; }
.scope-meta .chip { border-color: #e5a800; color: #1b1a17; }

.conn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.conn { width: 100%; height: auto; }
.conn-title { font: 700 11px var(--font); fill: #1b1a17; text-anchor: middle; }
.conn-shell { fill: #3a3a3a; stroke: #1b1a17; stroke-width: 2; }
.conn-key { fill: #3a3a3a; }
.pin rect { fill: #5a5a5a; stroke: #2a2a2a; }
.pin text { font: 600 8px var(--font); fill: #cfcac0; text-anchor: middle; }
.pin-used rect { fill: #ffc20e; stroke: #1b1a17; cursor: help; }
.pin-used text { fill: #1b1a17; font-weight: 800; }
.obd { max-width: 520px; }
.obd .pin text { font-size: 11px; }

.fusebox { width: 100%; max-width: 560px; height: auto; }
.fb-shell { fill: #2e2e2e; }
.fb-fuse { stroke: #1b1a17; stroke-width: 1.5; }
.fb-id { font: 800 11px var(--font); text-anchor: middle; fill: #1b1a17; paint-order: stroke; stroke: rgba(255, 255, 255, .7); stroke-width: 3px; }
.fb-a { font: 700 10px var(--font); text-anchor: middle; fill: #1b1a17; paint-order: stroke; stroke: rgba(255, 255, 255, .7); stroke-width: 3px; }
.fb-relay { fill: #4a4a4a; stroke: #ffc20e; stroke-width: 1.5; }
.fb-relay + .fb-id { fill: #ffc20e; stroke: none; }

.scope { width: 100%; max-width: 760px; height: auto; border-radius: 8px; }
.sc-bg { fill: #10140f; }
.sc-grid { stroke: #2b3a2a; stroke-width: 1; }
.sc-axis { stroke: #3e5a3c; stroke-dasharray: 3 3; }
.sc-zero { stroke: #ffc20e; stroke-width: 1; stroke-dasharray: 6 4; opacity: .7; }
.sc-t { font: 600 11px var(--font); fill: #ffc20e; }
.sc-trace { fill: none; stroke: #ffd23f; stroke-width: 2; stroke-linejoin: round; filter: drop-shadow(0 0 3px rgba(255, 210, 63, .6)); }
.sc-trace-1 { stroke: #4fd1ff; filter: drop-shadow(0 0 3px rgba(79, 209, 255, .6)); }
.sc-lbl-1 { fill: #4fd1ff; }

.loc { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.loc-text h4 { font-size: 15px; margin-bottom: 6px; }
.loc-text p { margin: 0 0 8px; }
.topview { width: 100%; height: auto; }
.tv-body { fill: #f4f1e8; stroke: #1b1a17; stroke-width: 2; }
.tv-bay { fill: #e9e4d6; stroke: #b9b3a3; stroke-dasharray: 4 3; }
.tv-line { stroke: #b9b3a3; }
.tv-glass { fill: #c9d3dc; stroke: #1b1a17; }
.tv-seat { fill: #ddd6c4; }
.tv-wheel { fill: none; stroke: #1b1a17; stroke-width: 2; }
.tv-t { font: 600 9px var(--font); fill: #8a857a; text-anchor: middle; }
.spot-ring { fill: rgba(255, 194, 14, .35); stroke: #e5a800; stroke-width: 1.5; }
.spot-dot { fill: #1b1a17; }
.spot-t { font: 800 10px var(--font); fill: #1b1a17; paint-order: stroke; stroke: #fff; stroke-width: 3px; }

.net { width: 100%; min-width: 760px; height: auto; }
.net-h { stroke: #f07c12; stroke-width: 3; }
.net-l { stroke: #7a4a1d; stroke-width: 3; }
.net-dot { fill: #1b1a17; }
.net-node { fill: #fff3c4; stroke: #1b1a17; stroke-width: 1.5; }
.net-name { font: 700 11px var(--font); text-anchor: middle; fill: #1b1a17; }
.net-t { font: 800 11px var(--font); fill: #1b1a17; }
.net-term { font: 700 10px var(--font); text-anchor: middle; fill: #d62828; }

.file-page img { width: 100%; height: auto; display: block; }
.file-page object { width: 100%; height: 80vh; border: 0; }

.warn { display: flex; gap: 14px; background: #fff3c4; border: 1.5px solid #e5a800; border-radius: 10px; padding: 16px; }
.warn > .ico { color: #b45309; width: 28px; height: 28px; }
.warn p { margin: 0 0 8px; }

.sym-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sym { display: flex; align-items: center; gap: 8px; border: 1px solid #eee8d8; border-radius: 10px; padding: 6px 10px; }
.sym svg { width: 64px; height: 52px; flex: none; }
.sym span { font-weight: 600; font-size: 12px; }

/* ---------- Modal, toast, dica */
.modal { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; background: rgba(15, 12, 5, .45); padding: 16px; backdrop-filter: blur(2px); }
.modal.open { display: grid; }
.modal-card { width: min(480px, 100%); max-height: min(640px, 86dvh); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.modal-h { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 16px; background: var(--brand); color: var(--brand-ink); }
.modal-h h3 { flex: 1; font-size: 17px; }
.modal-h .icon-btn:hover { background: rgba(0, 0, 0, .1); }
.modal-search { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--muted); }
.modal-search input { height: 40px; }
.modal-list { list-style: none; margin: 0; padding: 0; overflow: auto; }
.modal-list li:nth-child(even) button { background: var(--surface-2); }
.modal-list button { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 14px 16px; text-align: left; font-weight: 500; }
.modal-list button:hover { background: var(--brand-soft) !important; }
.modal-list small { color: var(--muted); font-size: 12px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 60; background: #1b1a17; color: #fff; border-left: 4px solid var(--brand); padding: 12px 18px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.tip { position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none; background: #1b1a17; color: #fff; padding: 8px 10px; border-radius: 8px; font-size: 12px; max-width: 280px; opacity: 0; transition: opacity .1s; border-top: 3px solid var(--brand); }
.tip.show { opacity: 1; }
.tip small { color: #cfc8b4; }

/* ---------- Responsivo (celular e tablet) */
@media (max-width: 1100px) {
  .viewer-body { grid-template-columns: 56px 1fr 290px; }
}
@media (max-width: 900px) {
  .home, .select, .vehicle { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: 0; }
  .vehicle-show { order: -1; min-height: 0; flex-direction: row; align-items: center; }
  .vehicle-show .car-xl { width: 40%; }
  .vehicle-show .vcard { flex: 1; }
  .viewer-body, .viewer-body.ix-closed { grid-template-columns: 1fr; position: relative; }
  .rail { display: none; }
  .index { position: absolute; inset: 0 0 0 auto; width: min(340px, 88%); z-index: 20; box-shadow: -10px 0 30px rgba(0, 0, 0, .25); }
  .ix-close { display: grid; }
  .tab-veh { display: none; }
  .paper-scroll { padding: 12px; }
  .paper { padding: 16px 14px 12px; }
  .paper-h { margin: -16px -14px 12px; }
  .loc { grid-template-columns: 1fr; }
  .topview { max-width: 200px; margin: 0 auto; }
}
@media (max-width: 640px) {
  #app { padding: 12px; }
  .topbar { padding: 0 10px; gap: 2px; }
  .nav-a span, .wordmark { display: none; }
  .brand { margin-right: 4px; }
  .home-main { padding: 18px; }
  .hero-in { padding: 24px; }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .models { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .model-name { font-size: 13px; }
  .conn-row { grid-template-columns: 1fr; }
  .vehicle-show .car-xl { display: none; }
  .tab-exit span { display: none; }
  .toolbar .btn span { display: none; }
  .paper-scroll { padding: 8px 6px; }
  .paper { padding: 12px 10px 10px; border-radius: 4px; }
  .paper-h { margin: -12px -10px 10px; border-radius: 4px 4px 0 0; }
  .paper-title h3 { font-size: 15px; }
  .zoom-hint { display: flex; }
}
.zoom-hint { display: none; align-items: center; justify-content: center; gap: 6px; font-size: 11px; color: var(--muted); padding: 4px 0 0; }
.zoom-hint .ico { width: 14px; height: 14px; }
.paper-scroll { touch-action: pan-x pan-y; }
@media (min-width: 641px) and (max-width: 900px) { .wordmark { display: inline; } }

/* ---------- Animações */
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes revBody { 0%, 100% { transform: none; } 25% { transform: translateY(-2px) rotate(-1.2deg); } 60% { transform: translateY(.5px); } }
@keyframes driveOff { 0% { transform: none; opacity: 1; } 18% { transform: translateX(-5%); } 100% { transform: translateX(130%); opacity: 0; } }
@keyframes driveIn { 0% { transform: translateX(-70%); opacity: 0; } 70% { transform: translateX(3%); opacity: 1; } 100% { transform: none; } }
@keyframes fromRight { from { opacity: 0; transform: translateX(48px); } }
@keyframes fromLeft { from { opacity: 0; transform: translateX(-48px); } }
@keyframes drawer { from { transform: translateX(100%); } }

.page-in { animation: pageIn .38s cubic-bezier(.2,.8,.2,1) both; }
.page-in .models > *, .page-in .cats > *, .page-in .recent li, .page-in .acc-g, .page-in .home-main > *, .page-in .hero-in > *, .page-in .comp-card, .page-in .row-card {
  animation: rise .45s cubic-bezier(.2,.8,.2,1) backwards; }
.page-in :is(.models, .cats, .recent, .home-main, .hero-in, .acc) > :nth-child(2) { animation-delay: .05s; }
.page-in :is(.models, .cats, .recent, .home-main, .hero-in, .acc) > :nth-child(3) { animation-delay: .1s; }
.page-in :is(.models, .cats, .recent, .home-main, .hero-in, .acc) > :nth-child(4) { animation-delay: .15s; }
.page-in :is(.models, .cats, .recent, .home-main, .hero-in, .acc) > :nth-child(5) { animation-delay: .2s; }
.page-in :is(.models, .cats, .recent, .home-main, .hero-in, .acc) > :nth-child(6) { animation-delay: .25s; }
.page-in :is(.models, .cats, .recent, .home-main, .hero-in, .acc) > :nth-child(7) { animation-delay: .3s; }
.page-in :is(.models, .cats, .recent, .home-main, .hero-in, .acc) > :nth-child(n+8) { animation-delay: .35s; }

/* Carro: rodas giram ao tocar, sai andando ao escolher o motor, entra andando na tela do veículo */
.car-wheel { transform-box: fill-box; transform-origin: center; }
.car-chassis { transform-box: fill-box; transform-origin: 50% 100%; }
.car-spoke { stroke: #1f1f1f; stroke-width: 1.4; }
.car.rev .car-wheel { animation: spin .55s cubic-bezier(.3,.6,.4,1); }
.car.rev .car-chassis { animation: revBody .45s ease; }
.car.drive-off { animation: driveOff .45s cubic-bezier(.5,0,.75,0) forwards; }
.car.drive-off .car-wheel { animation: spin .22s linear infinite; }
.page-in .car-xl { animation: driveIn .85s cubic-bezier(.2,.8,.2,1) both; }
.page-in .car-xl .car-wheel { animation: spin .42s linear 2; }
.page-in .vcard { animation: rise .5s .35s cubic-bezier(.2,.8,.2,1) backwards; }
.model.open .engines li { animation: rise .3s cubic-bezier(.2,.8,.2,1) backwards; }
.model.open .engines li:nth-child(2) { animation-delay: .05s; }
.model.open .engines li:nth-child(3) { animation-delay: .1s; }
.model.open .engines li:nth-child(n+4) { animation-delay: .15s; }
.engines button.picked { background: var(--brand); color: var(--brand-ink); font-weight: 700; }

/* Toque: botões afundam levemente */
.btn, .cat, .model-card, .recent button, .acc-b button, .acc-h, .res, .chip-btn, .tab-add, .icon-btn, .field, .modal-list button, .rail button, .ix-i, .ix-h {
  transition: transform .14s ease, background-color .2s, border-color .2s, box-shadow .2s, color .2s; }
.btn:active, .cat:active, .model-card:active, .recent button:active, .acc-b button:active, .res:active, .chip-btn:active, .tab-add:active, .icon-btn:active, .field:active, .modal-list button:active, .rail button:active { transform: scale(.97); }
.cat:hover .car, .model-card:hover .car { transform: translateY(-2px); }
.cat .car, .model-card .car { transition: transform .25s ease; }
.acc-chev, .ix-chev, .model-name .ico { transition: transform .3s cubic-bezier(.2,.8,.2,1); }

/* Janelas, páginas do manual e índice */
.modal.open { animation: fadeIn .2s ease; }
.modal.open .modal-card { animation: pop .3s cubic-bezier(.2,.8,.2,1); }
.modal.open .modal-list li { animation: rise .3s cubic-bezier(.2,.8,.2,1) backwards; }
.modal.open .modal-list li:nth-child(2) { animation-delay: .02s; }
.modal.open .modal-list li:nth-child(3) { animation-delay: .04s; }
.modal.open .modal-list li:nth-child(4) { animation-delay: .06s; }
.modal.open .modal-list li:nth-child(n+5) { animation-delay: .08s; }
.paper.from-right { animation: fromRight .32s cubic-bezier(.2,.8,.2,1); }
.paper.from-left { animation: fromLeft .32s cubic-bezier(.2,.8,.2,1); }
.sx-wire .ecu-w, .sx-wire .sx-w-outline { transition: stroke .15s, stroke-width .15s; }
@media (max-width: 900px) { .index { animation: drawer .3s cubic-bezier(.2,.8,.2,1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@page { size: A4 portrait; margin: 10mm; }
@media print {
  .topbar, .tabs, .rail, .toolbar, .pager, .index, .toast, .tip, .modal { display: none !important; }
  html, body { background: #fff !important; }
  #app, .paper-scroll { padding: 0 !important; overflow: visible !important; max-width: none; }
  .viewer { height: auto; }
  .viewer-body { display: block; }
  .paper { width: 100% !important; box-shadow: none; border-radius: 0; padding: 0; }
  .paper-h { margin: 0 0 4mm; border-radius: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .paper-body, .paper-body * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* Cada desenho cabe numa folha A4 */
  .sx-wrap { overflow: visible; }
  .paper-body svg.sx, .sx-wrap svg { width: auto !important; max-width: 100%; max-height: 235mm; min-width: 0 !important; margin: 0 auto; }
  .photos, .tbl { break-inside: avoid; }
}
