/* =========================================================
   ARCHIVE — biblioteca de inspirações com menu lateral
   ========================================================= */
body.app { --side: 248px; padding-left: var(--side); transition: padding-left .5s var(--ease); }
body.app.is-rail { --side: 76px; }

/* ---------- menu lateral ---------- */
.side {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--side); z-index: 40;
  display: flex; flex-direction: column; background: var(--hdr-bg); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-right: 1px solid var(--line); transition: width .5s var(--ease), transform .5s var(--ease);
}
.side__top { display: flex; align-items: center; gap: 10px; padding: 18px 16px 14px 18px; min-height: 66px; }
.side__top .hdr__brand { flex: none; display: flex; align-items: center; height: 30px; }
.side__top .mark--hdr { width: 64px; }
.side__pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--grey);
  font-size: 11px; font-weight: 600; color: var(--ink); white-space: nowrap; margin-left: auto;
}
.side__pill i { width: 7px; height: 7px; border-radius: 50%; background: #2fb36b; box-shadow: 0 0 0 3px rgba(47,179,107,.18); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(47,179,107,0); } }
.side__rail { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--mid); flex: none; transition: background .2s, color .2s; }
.side__rail:hover { background: var(--grey); color: var(--ink); }
.side svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.side__nav { flex: 1; overflow-y: auto; padding: 4px 10px 20px; scrollbar-width: none; }
.side__nav::-webkit-scrollbar { display: none; }
.side__h { font-size: 12px; font-weight: 600; color: var(--mid); padding: 20px 10px 8px; white-space: nowrap; }
.side__a {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border-radius: 10px;
  font-size: 14px; font-weight: 500; color: var(--ink); text-align: left; white-space: nowrap; transition: background .2s, color .2s;
}
.side__a:hover { background: var(--grey); }
.side__a.is-on { color: var(--red); background: color-mix(in srgb, var(--red) 9%, transparent); }
.side__a.is-on svg { stroke: var(--red); }
.side__l { flex: 1; overflow: hidden; text-overflow: ellipsis; transition: opacity .3s; }
.side__n, .side__ext { font-style: normal; font-size: 11px; font-weight: 600; color: var(--mid); padding: 2px 7px; border-radius: 999px; background: var(--grey); transition: opacity .3s; }
.side__ext { background: none; }
.side__n b { font-weight: 600; }
.side__th { width: 19px; height: 19px; border-radius: 5px; overflow: hidden; background: var(--grey); flex: none; }
.side__th img { width: 100%; height: 100%; object-fit: cover; }
.side__foot { padding: 14px 18px 18px; border-top: 1px solid var(--line); }
.side__prefs { display: flex; }
.side__prefs .prefs { width: 100%; justify-content: space-between; }
.side__prefs .prefs__pop { left: 0; right: auto; top: auto; bottom: calc(100% + 12px); }

/* trilho (menu recolhido, só ícones) */
body.is-rail .side__l, body.is-rail .side__n, body.is-rail .side__ext, body.is-rail .side__pill, body.is-rail .side__h { opacity: 0; pointer-events: none; }
body.is-rail .side__h { height: 18px; padding: 0; overflow: hidden; }
body.is-rail .side__top { flex-direction: column; gap: 14px; padding: 18px 0 8px; }
body.is-rail .side__top .mark--hdr { width: 44px; }
body.is-rail .side__pill { display: none; }
body.is-rail .side__a { justify-content: center; padding: 10px 0; }
body.is-rail .side__a .side__l, body.is-rail .side__a .side__n, body.is-rail .side__a .side__ext { position: absolute; }
body.is-rail .side__a.is-on { background: var(--surface); box-shadow: 0 6px 18px -8px rgba(0,0,0,.25); }
body.is-rail .side__foot { padding: 14px 8px; }
body.is-rail .side__prefs .prefs { flex-direction: column; gap: 12px; }
body.is-rail .side__prefs .prefs__lang { transform: scale(.85); }

/* ---------- área principal ---------- */
.app__main { min-height: 100vh; padding: 0 var(--pad) 80px; }
.ab__top { display: flex; align-items: flex-end; gap: 20px; padding: 28px 0 18px; }
.ab__menu { display: none; width: 40px; height: 40px; border-radius: 12px; place-items: center; background: var(--grey); }
.ab__menu svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.ab__titles { flex: 1; min-width: 0; }
.ab__title { font-size: clamp(40px, 5vw, 84px); line-height: .9; letter-spacing: -.06em; color: var(--red); font-weight: 700; }
.ab__title sup { font-size: 12px; color: var(--ink); letter-spacing: 0; vertical-align: top; margin-left: 6px; font-weight: 600; }
.ab__hint { font-size: 13px; font-weight: 500; color: var(--mid); margin-top: 10px; }
.ab__search {
  display: flex; align-items: center; gap: 10px; width: min(360px, 40vw); height: 46px; padding: 0 12px 0 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s;
}
.ab__search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 8%, transparent); }
.ab__search svg { width: 18px; height: 18px; fill: none; stroke: var(--mid); stroke-width: 1.8; stroke-linecap: round; flex: none; }
.ab__search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 14px; color: var(--ink); }
.ab__search input::placeholder { color: var(--mid); }
.ab__search kbd { font: 600 11px/1 "JetBrains Mono", monospace; color: var(--mid); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; }

.ab__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; margin-bottom: 8px; position: sticky; top: 0; z-index: 20; }
.ab__bar::before { content: ""; position: absolute; inset: 0 calc(var(--pad) * -1); background: var(--hdr-bg); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid transparent; z-index: -1; transition: border-color .3s; }
.ab__bar.is-stuck::before { border-bottom-color: var(--line); }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--grey); gap: 2px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink); transition: background .25s, box-shadow .25s; }
.seg button i { font-style: normal; font-weight: 500; color: var(--mid); font-size: 13px; }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 2px 8px -2px rgba(0,0,0,.18); }
.seg--icons button { padding: 0 11px; }
.seg--icons svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }

/* ---------- cards (masonry) ---------- */
.igrid { columns: var(--col, 250px); column-gap: 14px; }
.ic {
  position: relative; display: block; break-inside: avoid; margin: 0 0 14px; padding: 6px 6px 14px; border-radius: 6px;
  background: var(--surface); border: 1px solid var(--line); cursor: pointer;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s;
  animation: icIn .7s var(--ease) both;
}
@keyframes icIn { from { opacity: 0; transform: translateY(18px); } }
.ic:hover { transform: translateY(-4px); box-shadow: 0 26px 40px -26px rgba(0,0,0,.35); border-color: transparent; }
.ic__img { border-radius: 3px; overflow: hidden; background: var(--grey); }
.ic__img img { width: 100%; height: auto; display: block; transition: transform 1s var(--ease); }
.ic:hover .ic__img img { transform: scale(1.04); }
.ic__t { font-size: 14px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; margin: 12px 6px 4px; }
.ic__m { display: flex; justify-content: space-between; gap: 10px; margin: 0 6px; font-size: 12px; color: var(--mid); }
.ic__k { display: inline-block; margin: 12px 6px 0; font: 600 10px/1 "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .06em; color: var(--red); }
.ic__e { margin: 6px 6px 12px; font-size: 13px; line-height: 1.45; color: var(--ink); opacity: .78; }
.ic--note { background: var(--note); padding: 16px 14px 18px; }
.ic--note .ic__t { font-family: var(--serif); font-weight: 500; font-size: 32px; line-height: .98; letter-spacing: -.04em; margin-top: 14px; }
.ic--quote { background: var(--red); color: var(--on-red, #fff); border-color: transparent; padding: 16px 14px 18px; }
.ic--quote .ic__t { font-size: 24px; line-height: 1.02; letter-spacing: -.04em; margin-top: 14px; }
.ic--quote .ic__k, .ic--quote .ic__m, .ic--quote .ic__e { color: inherit; opacity: .8; }
.ic__save {
  position: absolute; right: 14px; top: 14px; z-index: 2; width: 32px; height: 32px; border-radius: 5px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--ink);
  opacity: 0; transform: translateY(-4px) scale(.9); transition: opacity .25s, transform .35s var(--ease), color .2s;
}
.ic__save svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.ic:hover .ic__save, .ic:focus-within .ic__save, .ic__save[aria-pressed="true"], li:hover > .ic__save { opacity: 1; transform: none; }
.ic__save[aria-pressed="true"] { color: var(--red); }
.ic__save[aria-pressed="true"] svg { fill: currentColor; }
.ic__save.is-pop { animation: pop .45s var(--ease); }
@keyframes pop { 40% { transform: scale(1.3); } }
.ic--quote .ic__save { background: rgba(255,255,255,.18); color: inherit; }

/* ---------- lista ---------- */
.ilist { border-top: 1px solid var(--line); }
.ilist li { position: relative; border-bottom: 1px solid var(--line); }
.ilist li > button[data-id] { display: grid; grid-template-columns: 34px 52px 1.6fr 1fr 1fr 60px; gap: 16px; align-items: center; width: 100%; padding: 10px 52px 10px 0; text-align: left; font-size: 14px; transition: background .2s; }
.ilist li > button[data-id]:hover { background: var(--grey); }
.il__n, .il__d, .il__c, .il__p { color: var(--mid); font-size: 13px; }
.il__n { font-family: "JetBrains Mono", monospace; font-size: 11px; padding-left: 8px; }
.il__th { width: 52px; height: 40px; border-radius: 3px; overflow: hidden; background: var(--grey); display: grid; place-items: center; }
.il__th img { width: 100%; height: 100%; object-fit: cover; }
.il__th svg { width: 18px; height: 18px; fill: none; stroke: var(--mid); stroke-width: 1.6; }
.il__t { font-weight: 600; }
.ilist .ic__save { top: 50%; right: 8px; transform: translateY(-50%); opacity: 0; }
.ilist li:hover .ic__save, .ilist .ic__save[aria-pressed="true"] { opacity: 1; transform: translateY(-50%); }

/* ---------- mural ---------- */
body.is-board .app__main { padding-bottom: 0; }
body.is-board .board { height: calc(100svh - 190px); margin: 0 calc(var(--pad) * -1); border-top: 1px solid var(--line); }
.bc-wrap { position: absolute; transform: rotate(var(--r, 0deg)); transition: transform .5s var(--ease); }
.bc-wrap:hover { transform: rotate(0deg) scale(1.03); z-index: 5; }
.bc-wrap .ic { margin: 0; animation: none; box-shadow: 0 24px 40px -28px rgba(0,0,0,.35); }
.bc-wrap .ic:hover { transform: none; }

.ab__empty { padding: 80px 0; text-align: center; color: var(--mid); display: grid; justify-items: center; gap: 16px; }

.reader__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.reader__top .ic__save { position: static; opacity: 1; transform: none; background: var(--grey); }

.side__scrim { display: none; }

/* ---------- celular: menu vira gaveta ---------- */
@media (max-width: 860px) {
  body.app, body.app.is-rail { padding-left: 0; --side: 280px; }
  .side { transform: translateX(-102%); box-shadow: 0 0 60px rgba(0,0,0,.2); background: var(--bg); }
  body.side-open .side { transform: none; }
  body.is-rail .side__l, body.is-rail .side__n, body.is-rail .side__ext, body.is-rail .side__h { opacity: 1; }
  .side__rail { display: none; }
  .side__scrim { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: opacity .4s; }
  body.side-open .side__scrim { opacity: 1; pointer-events: auto; }
  .ab__menu { display: grid; flex: none; }
  .ab__top { flex-wrap: wrap; align-items: center; padding-top: 18px; }
  .ab__search { width: 100%; order: 3; }
  .ab__search kbd { display: none; }
  .igrid { columns: 2 150px; column-gap: 10px; }
  .ic { border-radius: 5px; margin-bottom: 10px; }
  .ic--note .ic__t { font-size: 24px; }
  .ilist li > button[data-id] { grid-template-columns: 44px 1fr 50px; }
  .il__n, .il__c, .il__p { display: none; }
}

/* leitor: outras imagens do mesmo projeto */
.reader__more { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); }
.reader__more .lbl sup { font-size: 10px; }
.reader__mgrid { columns: 3 160px; column-gap: 10px; margin-top: 14px; }
.reader__mgrid button { display: block; width: 100%; margin: 0 0 10px; break-inside: avoid; text-align: left; border-radius: 3px; overflow: hidden; background: var(--grey); position: relative; }
.reader__mgrid img { display: block; width: 100%; height: auto; transition: transform .8s var(--ease), opacity .3s; margin: 0 !important; }
.reader__mgrid span { position: absolute; left: 8px; right: 8px; bottom: 8px; font-size: 11px; font-weight: 600; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.6); opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s; }
.reader__mgrid button:hover img { transform: scale(1.04); }
.reader__mgrid button:hover span { opacity: 1; transform: none; }

/* idioma + tema no topo do Archive */
.ab__prefs { flex: none; display: flex; align-items: center; height: 46px; padding: 0 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.ab__prefs .prefs__pop { right: -14px; top: calc(100% + 14px); }
@media (max-width: 860px) { .ab__prefs { order: 2; margin-left: auto; height: 40px; } }

/* leitor: outros projetos */
.reader__others { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); }
.reader__ogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.reader__ogrid button { text-align: left; }
.reader__ogrid button { display: block; width: 100%; }
.reader__ogrid .ro__img { display: block; aspect-ratio: 4/3; border-radius: 3px; overflow: hidden; background: var(--grey); }
.reader__ogrid img { display: block; width: 100% !important; height: 100% !important; max-width: none; object-fit: cover; margin: 0 !important; transition: transform .8s var(--ease); }
.reader__ogrid button:hover img { transform: scale(1.05); }
.reader__ogrid b { display: block; font-size: 13px; font-weight: 600; margin-top: 8px; }
.reader__ogrid i { font-style: normal; font-size: 12px; color: var(--mid); }
.reader__others + .reader__nav { margin-top: 36px; }

/* mural só de imagens */
body.is-board .board { background-image: none !important; }
.bc-img { padding: 0; border: 0; border-radius: 3px; overflow: hidden; background: var(--grey); box-shadow: 0 30px 50px -30px rgba(0,0,0,.45); }
.bc-img img { display: block; width: 100%; height: auto; pointer-events: none; }
.bc-pic:hover { transform: rotate(0deg) scale(1.04); }

/* vídeos no Archive (reels em loop) */
.ic__img video { width: 100%; height: auto; display: block; object-fit: cover; transition: transform 1s var(--ease); }
.ic:hover .ic__img video { transform: scale(1.04); }
.bc-img video { display: block; width: 100%; height: auto; pointer-events: none; }

/* zoom do grid (− / +) */
.ab__tools { display: flex; gap: 8px; align-items: center; }
.seg button:disabled { opacity: .3; pointer-events: none; }
.ab__zoom[hidden] { display: none; }
/* zoom da imagem no leitor */
.rzoom { position: relative; overflow: hidden; margin: 10px 0 30px; background: var(--grey); touch-action: none; }
.rzoom > img { display: block; width: 100%; height: auto; margin: 0 !important; transform-origin: center; transition: transform .45s var(--ease); will-change: transform; user-select: none; -webkit-user-drag: none; }
.rzoom.is-zoomed { cursor: grab; }
.rzoom.is-drag { cursor: grabbing; }
.rzoom.is-drag > img { transition: none; }
.rzoom__ctl { position: absolute; right: 12px; bottom: 12px; display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 6px 24px -10px rgba(0,0,0,.35); }
.rzoom__ctl button { width: 34px; height: 34px; border-radius: 50%; font-size: 18px; font-weight: 600; line-height: 1; color: var(--ink); transition: background .2s; }
.rzoom__ctl button:hover { background: var(--grey); }
.rzoom__ctl button:disabled { opacity: .3; pointer-events: none; }

/* ---------- galeria ---------- */
body.is-gal .app__main { padding-bottom: 0; }
.agal { display: grid; grid-template-rows: 1fr auto auto; height: calc(100svh - 190px); min-height: 460px; margin: 0 calc(var(--pad) * -1); border-top: 1px solid var(--line); }
.agal__stage { position: relative; display: grid; place-items: center; overflow: hidden; perspective: 1400px; padding: clamp(16px, 3vw, 40px) 70px; }
.agal__frame { width: 100%; height: 100%; display: grid; place-items: center; opacity: 0; transform: translateY(14px) scale(.985); transition: opacity .5s var(--ease), transform .8s var(--ease); }
.agal__frame.is-in { opacity: 1; transform: none; }
.agal__card { position: relative; max-width: 100%; max-height: 100%; height: 100%; display: grid; place-items: center; transform-style: preserve-3d; will-change: transform; }
.agal__card img, .agal__card video { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; box-shadow: 0 30px 80px -40px rgba(0,0,0,.55); user-select: none; -webkit-user-drag: none; }
.agal__glare { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light; }
.agal__stage.is-zoom { cursor: grab; }
.agal__stage.is-zoom:active { cursor: grabbing; }
.agal__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 600 16px/1 var(--sans); cursor: pointer; transition: background .3s, color .3s, transform .4s var(--ease); }
.agal__nav:hover { background: var(--ink); color: var(--bg); }
.agal__nav--p { left: 16px; } .agal__nav--n { right: 16px; }
.agal__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px var(--pad); border-top: 1px solid var(--line); }
.agal__info { display: flex; align-items: baseline; gap: 12px; min-width: 0; font-size: 13px; }
.agal__info b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agal__info em { font-style: normal; color: var(--mid); white-space: nowrap; }
.agal__n { font: 600 11px/1 "JetBrains Mono", monospace; color: var(--mid); }
.agal__ctl { display: flex; gap: 6px; flex-shrink: 0; }
.agal__ctl button { font: 600 12px/1 var(--sans); color: var(--ink); background: none; border: 1px solid var(--line); border-radius: 99px; padding: 8px 12px; cursor: pointer; transition: background .3s, color .3s; }
.agal__ctl button:hover:not(:disabled), .agal__ctl button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.agal__ctl button:disabled { opacity: .35; cursor: default; }
.agal__thumbs { display: flex; gap: 6px; overflow-x: auto; padding: 0 var(--pad) 14px; scrollbar-width: none; }
.agal__thumbs::-webkit-scrollbar { display: none; }
.agal__thumbs button { flex: 0 0 auto; height: 54px; padding: 0; border: 0; background: var(--grey); cursor: pointer; opacity: .45; transition: opacity .3s, outline-color .3s; outline: 1px solid transparent; outline-offset: 2px; }
.agal__thumbs button img { height: 100%; width: auto; display: block; }
.agal__thumbs button:hover { opacity: .85; }
.agal__thumbs button.is-on { opacity: 1; outline-color: var(--ink); }
/* só a arte: some todo o resto */
body.is-only .side, body.is-only .ab__top, body.is-only .ab__bar, body.is-only .agal__thumbs, body.is-only .agal__nav { display: none !important; }
body.app.is-only { padding-left: 0; }
body.is-only .app__main { padding-top: 0 !important; }
body.is-only .agal { height: 100svh; border-top: 0; margin: 0 calc(var(--pad) * -1); }
body.is-only .agal__bar { border-top: 0; opacity: .5; transition: opacity .3s; }
body.is-only .agal__bar:hover { opacity: 1; }
@media (max-width: 700px) { .agal__nav { display: none; } .agal__stage { padding: 12px; } .agal__info em { display: none; } }

/* setas e zoom centralizados */
.agal__nav { display: grid; place-items: center; padding: 0; line-height: 0; }
.rzoom__ctl button { display: grid; place-items: center; padding: 0; line-height: 0; font-family: var(--sans); }
.panel__home { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; font: inherit; }
.panel__home:hover { color: var(--red); }
#zOut, #zIn, #zReset, [data-gz] { display: inline-grid; place-items: center; padding: 0; line-height: 0; }

/* lista: cabeçalho ordenável */
.ilist li.il__head { display: grid; grid-template-columns: 34px 52px 1.6fr 1fr 1fr 60px; gap: 16px; align-items: center; padding: 10px 52px 10px 0; position: sticky; top: 0; z-index: 3; background: var(--bg); }
.il__head > span { font: 600 10px/1 "JetBrains Mono", monospace; color: var(--mid); }
.il__h { display: inline-flex; align-items: center; gap: 6px; font: 600 10px/1 "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .05em; color: var(--mid); text-align: left; padding: 4px 0; transition: color .2s; justify-self: start; }
.il__h:hover, .il__h.is-on { color: var(--ink); }
.il__h svg { width: 8px; height: 10px; flex: none; }
.il__h svg path { fill: currentColor; opacity: .3; transition: opacity .2s; }
.il__h[aria-sort="ascending"] .u, .il__h[aria-sort="descending"] .d { opacity: 1; }
.il__h[aria-sort="ascending"] .d, .il__h[aria-sort="descending"] .u { opacity: .15; }
/* filtro de cor */
.ab__colors { display: inline-flex; align-items: center; gap: 5px; padding: 0 12px 0 4px; margin-right: 6px; border-right: 1px solid var(--line); }
.ab__colors button[data-col] { width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); transition: transform .25s var(--ease), box-shadow .25s; }
.ab__colors button[data-col]:hover { transform: scale(1.18); }
.ab__colors button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--ink); transform: scale(1.1); }
.ab__colors.is-on button[data-col]:not([aria-pressed="true"]):not(.ab__colx) { opacity: .45; }
.ab__colx { display: none; width: 18px !important; height: 18px !important; background: none !important; box-shadow: none !important; place-items: center; color: var(--mid); }
.ab__colors.is-on .ab__colx { display: grid; }
.ab__colx svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
@media (max-width: 900px) { .ilist li.il__head { grid-template-columns: 44px 1fr 50px; } .il__head > span:nth-child(2), .il__head .il__c, .il__head .il__p { display: none; } .ab__colors { order: 3; width: 100%; border: 0; padding: 8px 0 0; } }

/* =========================================================
   ARCHIVE.APP — barra de menus, player, coleções, comparar,
   linha do tempo, espaço 3D, notas de processo, atalhos
   ========================================================= */
body.app.has-mbar { --mb: 32px; padding-top: var(--mb); }
.has-mbar .side { top: var(--mb); }
.has-mbar .ab__bar { top: var(--mb); }
.mbar { position: fixed; inset: 0 0 auto 0; height: var(--mb, 32px); z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 12px 0 14px;
  background: color-mix(in srgb, var(--bg) 72%, transparent); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); border-bottom: 1px solid var(--line); font-size: 12.5px; font-weight: 500; letter-spacing: -.01em; user-select: none; }
.mbar__l, .mbar__r { display: flex; align-items: center; gap: 2px; height: 100%; min-width: 0; }
.mbar__app { display: grid; place-items: center; height: 100%; padding: 0 8px 0 2px; }
.mbar__app img { height: 12px; width: auto; }
.mbar__name { font-weight: 700; padding: 0 10px 0 2px; }
.mbar__m { position: relative; height: 100%; display: flex; align-items: center; }
.mbar__m > button { padding: 3px 9px; border-radius: 5px; transition: background .15s; }
.mbar__m > button:hover, .mbar__m.is-open > button { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.mbar__dd { position: absolute; top: calc(100% + 2px); left: 0; min-width: 230px; padding: 5px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 22px 50px -20px rgba(0,0,0,.45);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .2s var(--ease), visibility 0s .2s; }
.mbar__m.is-open .mbar__dd { opacity: 1; visibility: visible; transform: none; transition: opacity .15s, transform .2s var(--ease); }
.mbar__dd button { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; padding: 7px 10px; border-radius: 6px; text-align: left; font-size: 13px; }
.mbar__dd button:hover { background: var(--red); color: var(--on-red, #fff); }
.mbar__dd kbd { font: 500 11px/1 "JetBrains Mono", monospace; opacity: .55; }
.mbar__clk { font: 600 11.5px/1 "JetBrains Mono", monospace; padding-left: 12px; white-space: nowrap; opacity: .75; }

/* player */
.pl { position: relative; display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 6px 0 3px; border-radius: 7px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.pl svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pl__cv { width: 19px; height: 19px; border-radius: 4px; overflow: hidden; flex: none; display: block; }
.pl__cv img, .pl__lc img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl__cv i, .pl__lc i { display: block; width: 100%; height: 100%; background: conic-gradient(from 0deg, hsl(var(--h) 85% 55%), hsl(calc(var(--h) + 60) 80% 30%), #0c0c0c, hsl(var(--h) 85% 55%)); }
.pl.is-on .pl__cv i { animation: plSpin 4s linear infinite; }
@keyframes plSpin { to { transform: rotate(360deg) scale(1.4); } }
.pl__tx { width: 150px; overflow: hidden; white-space: nowrap; cursor: pointer; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 88%, transparent); font-size: 12px; }
.pl__mq { display: inline-block; padding-left: 8px; }
.pl.is-on .pl__mq { animation: plMq 11s linear infinite; }
@keyframes plMq { 0%, 12% { transform: translateX(0); } 100% { transform: translateX(-60%); } }
.pl__mq b { font-weight: 700; }
.pl__eq { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 10px; width: 9px; }
.pl__eq i { width: 2px; height: 30%; background: var(--red); border-radius: 1px; }
.pl.is-on .pl__eq i { animation: fxEq .5s ease-in-out infinite alternate; }
.pl.is-on .pl__eq i:nth-child(2) { animation-delay: -.2s; } .pl.is-on .pl__eq i:nth-child(3) { animation-delay: -.35s; }
.pl__b { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 5px; }
.pl__b:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.pl__pp svg { width: 12px; height: 12px; }
.pl__v { display: flex; align-items: center; gap: 4px; padding-left: 4px; }
.pl__v input { -webkit-appearance: none; appearance: none; width: 64px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--ink) calc(var(--v, .6) * 100%), color-mix(in srgb, var(--ink) 18%, transparent) 0); cursor: pointer; }
.pl__v input::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.pl__v input::-moz-range-thumb { width: 10px; height: 10px; border: 0; border-radius: 50%; background: var(--ink); }
.pl__list { position: absolute; right: 0; top: calc(100% + 8px); width: 280px; padding: 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 22px 50px -20px rgba(0,0,0,.45);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .2s, transform .25s var(--ease), visibility 0s .25s; }
.pl.is-list .pl__list { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .25s var(--ease); }
.pl__list .lbl { padding: 4px 6px 8px; }
.pl__list button { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 10px; width: 100%; padding: 6px; border-radius: 8px; text-align: left; align-items: center; }
.pl__list button:hover { background: var(--grey); }
.pl__list button.is-cur b { color: var(--red); }
.pl__lc { grid-row: 1 / 3; width: 34px; height: 34px; border-radius: 6px; overflow: hidden; }
.pl__list b { font-size: 13px; font-weight: 600; } .pl__list i { font-style: normal; font-size: 11px; color: var(--mid); }
.pl__note { font-size: 11px; color: var(--mid); padding: 8px 6px 2px; line-height: 1.4; }
@media (max-width: 900px) { .pl__tx, .pl__v, .pl__eq, .mbar__m:not(:first-of-type) { display: none; } }
@media (max-width: 600px) { .mbar__clk { display: none; } }

/* extra: aleatório / atalhos */
#arExtra svg { width: 18px; height: 18px; }
#arRandom.is-roll svg { animation: roll .6s var(--ease); }
@keyframes roll { to { transform: rotate(360deg); } }

/* notas de processo */
.ic__notes { position: absolute; left: 14px; top: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px 5px 6px; border-radius: 999px; background: var(--red); color: #fff; font: 700 11px/1 var(--sans); }
.ic__notes svg { width: 13px; height: 13px; fill: currentColor; }
.pin { position: absolute; z-index: 3; transform: translate(-50%, -50%); }
.pin__d { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50% 50% 50% 4px; background: var(--red); color: #fff; font: 700 12px/1 var(--sans); box-shadow: 0 0 0 3px rgba(255,255,255,.85), 0 10px 22px -8px rgba(0,0,0,.5); transition: transform .35s var(--ease); animation: pinIn .6s var(--ease) both; }
.pin:nth-of-type(2) .pin__d { animation-delay: .12s; } .pin:nth-of-type(3) .pin__d { animation-delay: .24s; }
@keyframes pinIn { from { transform: scale(0) rotate(-40deg); } }
.pin:hover .pin__d, .pin.is-open .pin__d, .pin.is-hi .pin__d { transform: scale(1.15); }
.pin__b { position: absolute; left: calc(100% + 10px); top: 50%; width: max-content; max-width: 260px; padding: 10px 14px; border-radius: 4px 14px 14px 14px; background: var(--surface); color: var(--ink); text-align: left; box-shadow: 0 18px 40px -16px rgba(0,0,0,.45); border: 1px solid var(--line);
  opacity: 0; visibility: hidden; transform: translate(-6px, -20%) scale(.96); transform-origin: left top; transition: opacity .2s, transform .3s var(--ease), visibility 0s .3s; pointer-events: none; }
.pin.is-l .pin__b { left: auto; right: calc(100% + 10px); border-radius: 14px 4px 14px 14px; transform-origin: right top; transform: translate(6px, -20%) scale(.96); }
.pin.is-u .pin__b { top: auto; bottom: 50%; }
.pin:hover .pin__b, .pin.is-open .pin__b, .pin.is-hi .pin__b { opacity: 1; visibility: visible; transform: translate(0, -20%); transition: opacity .2s, transform .3s var(--ease); }
.pin__b b { display: block; font-size: 11px; font-weight: 700; margin-bottom: 3px; color: var(--red); }
.pin__b em { display: block; font-style: normal; font-size: 13px; line-height: 1.4; font-weight: 500; }
.rzoom.is-zoomed .pin { opacity: 0; pointer-events: none; }
.rnotes { margin: -10px 0 34px; display: grid; gap: 10px; }
.rnotes .lbl { margin-bottom: 4px; }
.rnote { display: flex; gap: 10px; align-items: flex-start; }
.rnote__av { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); font: 700 12px/1 var(--sans); }
.rnote__bub { position: relative; padding: 10px 14px; border-radius: 4px 16px 16px 16px; background: var(--grey); max-width: 560px; transition: background .2s; }
.rnote:hover .rnote__bub { background: color-mix(in srgb, var(--red) 14%, var(--grey)); }
.rnote__bub p { font-size: 14px; line-height: 1.45; margin: 0 !important; }
.rnote__bub p:first-child { display: flex; gap: 8px; align-items: baseline; font-size: 12px; margin-bottom: 2px !important; }
.rnote__bub i { font-style: normal; color: var(--mid); font-size: 11px; }
.reader__cmp { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; margin-right: 8px; padding: 7px 12px; border-radius: 999px; background: var(--grey); font-size: 12px; font-weight: 600; }
.reader__cmp svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.reader__cmp:hover { background: var(--ink); color: var(--bg); }

/* comparar */
.ctray { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 85; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 8px; border-radius: 999px; background: var(--ink); color: var(--bg); box-shadow: 0 20px 50px -18px rgba(0,0,0,.5); font-size: 13px; font-weight: 600; animation: icIn .4s var(--ease) both; }
.ctray[hidden] { display: none; }
.ctray__th { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; }
.ctray__th img { width: 100%; height: 100%; object-fit: cover; }
.ctray .chip { background: color-mix(in srgb, var(--bg) 15%, transparent); color: inherit; border-color: transparent; }
.cmp { position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column; background: var(--bg); opacity: 0; transition: opacity .35s; }
.cmp.is-in { opacity: 1; }
.cmp[hidden] { display: none; }
.cmp__bar { display: flex; align-items: center; gap: 14px; padding: 14px var(--pad); border-bottom: 1px solid var(--line); }
.cmp__t { flex: 1; display: flex; gap: 10px; align-items: baseline; min-width: 0; font-size: 14px; }
.cmp__t b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp__t i { font-style: normal; color: var(--red); font-weight: 700; font-size: 12px; }
.cmp__stage { flex: 1; min-height: 0; padding: 24px var(--pad); display: grid; }
.cmp__stage.is-side { grid-template-columns: 1fr 1fr; gap: 16px; }
.cmp__stage figure { position: relative; margin: 0; min-height: 0; display: grid; grid-template-rows: 1fr auto; gap: 10px; }
.cmp__stage figure img { width: 100%; height: 100%; object-fit: contain; min-height: 0; background: var(--grey); border-radius: 4px; }
.cmp__stage figcaption { font-size: 13px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.cmp__stage figcaption span, .cmp__la, .cmp__lb { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--bg); font: 700 11px/1 var(--sans); }
.cmp__sl { position: relative; min-height: 0; height: 100%; cursor: ew-resize; touch-action: none; user-select: none; background: var(--grey); border-radius: 4px; overflow: hidden; }
.cmp__sl img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.cmp__a { clip-path: inset(0 calc(100% - var(--p)) 0 0); }
.cmp__h { position: absolute; top: 0; bottom: 0; left: var(--p); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.cmp__h i { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 42px; height: 42px; border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center; font: 700 14px/1 var(--sans); font-style: normal; box-shadow: 0 10px 26px -8px rgba(0,0,0,.45); }
.cmp__la { position: absolute; left: 14px; top: 14px; } .cmp__lb { position: absolute; right: 14px; top: 14px; }
@media (max-width: 700px) { .cmp__stage.is-side { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; } .cmp__t { display: none; } }

/* guia de atalhos */
.kguide { position: fixed; inset: 0; z-index: 96; display: grid; place-items: center; background: rgba(0,0,0,.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fadeIn .25s both; }
.kguide[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } }
.kguide__box { width: min(520px, 92vw); padding: 20px 22px 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); animation: icIn .4s var(--ease) both; }
.kguide__h { display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.kguide dl { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; margin: 0; }
.kguide dl div { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.kguide dt { margin: 0; min-width: 44px; } .kguide dd { margin: 0; font-size: 13px; }
.kguide kbd { display: inline-block; min-width: 26px; padding: 4px 7px; border-radius: 6px; border: 1px solid var(--line); border-bottom-width: 2px; background: var(--bg); font: 600 11px/1 "JetBrains Mono", monospace; text-align: center; }

/* linha do tempo */
.atl { overflow-x: auto; margin: 0 calc(var(--pad) * -1); padding: 6px var(--pad) 30px; cursor: grab; scrollbar-width: thin; }
.atl.is-drag { cursor: grabbing; } .atl.is-drag button { pointer-events: none; }
.atl__in { display: flex; gap: 0; width: max-content; min-height: 60vh; }
.atl__y { width: clamp(220px, 20vw, 300px); padding: 0 14px; border-left: 1px solid var(--line); }
.atl__y header { position: sticky; top: 0; display: flex; align-items: baseline; gap: 8px; padding: 6px 0 18px; }
.atl__y header b { font-size: clamp(40px, 4.4vw, 72px); font-weight: 700; letter-spacing: -.06em; line-height: .9; }
.atl__y header i { font-style: normal; font: 600 11px/1 "JetBrains Mono", monospace; color: var(--mid); }
.atl__y:nth-child(odd) header b { color: var(--red); }
.atl__c { display: grid; gap: 10px; }
.atl__c button { display: block; text-align: left; }
.atl__c img { width: 100%; height: auto; object-fit: cover; border-radius: 3px; background: var(--grey); transition: transform .5s var(--ease), filter .3s; }
.atl__c button:hover img { transform: scale(1.03); }
.atl__c span { display: block; font-size: 11.5px; font-weight: 600; margin-top: 5px; color: var(--mid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atl__c button:hover span { color: var(--ink); }

/* espaço 3D */
body.is-space .app__main { padding-bottom: 0; }
.asp__stage { position: relative; height: calc(100vh - var(--mb, 0px) - 70px); min-height: 460px; overflow: hidden; perspective: 900px; perspective-origin: 50% 50%; margin: 0 calc(var(--pad) * -1);
  background: radial-gradient(120% 80% at 50% 50%, color-mix(in srgb, var(--ink) 4%, var(--bg)), var(--bg)); cursor: grab; touch-action: none; }
.asp__stage.is-drag { cursor: grabbing; }
.asp__world { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.asp__c { position: absolute; left: 0; top: 0; display: block; padding: 0; transition: opacity .2s; }
.asp__c img { display: block; width: 100%; height: auto; border-radius: 3px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.55); transition: transform .4s var(--ease); }
.asp__c:hover img { transform: scale(1.06); }
.asp__c span { position: absolute; left: 0; top: calc(100% + 8px); display: flex; gap: 8px; font-size: 13px; white-space: nowrap; opacity: 0; transition: opacity .25s; }
.asp__c span i { font-style: normal; color: var(--mid); }
.asp__c:hover span { opacity: 1; }
.asp__hud { position: absolute; left: var(--pad); right: var(--pad); bottom: 20px; display: flex; align-items: flex-end; gap: 20px; pointer-events: none; }
.asp__yr { font-size: clamp(56px, 8vw, 130px); font-weight: 700; letter-spacing: -.07em; line-height: .8; color: var(--red); }
.asp__hint { font-size: 12px; font-weight: 600; color: var(--mid); padding-bottom: 6px; }
.asp__bar { flex: 1; height: 2px; background: var(--line); margin-bottom: 11px; overflow: hidden; }
.asp__bar i { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }
body.is-only .mbar { display: none; }

/* menos "cara de app": cantos retos e sombras secas nos componentes novos */
.mbar__dd, .pl__list, .kguide__box, .ctray, .cmp__stage figure img, .cmp__sl, .pl, .reader__cmp { border-radius: 3px; }
.mbar__dd button, .pl__list button, .mbar__m > button, .pl__b { border-radius: 2px; }
.mbar__dd, .pl__list, .kguide__box { box-shadow: 0 12px 30px -18px rgba(0,0,0,.35); }
.kguide kbd { border-radius: 2px; }
.ctray { border-radius: 3px; }
.ctray__th { border-radius: 2px; }

/* dicas dos botões + estado de hover */
.atip { position: fixed; left: 0; top: 0; z-index: 200; max-width: 240px; padding: 9px 12px 10px; border-radius: 8px; background: var(--ink); color: var(--bg); pointer-events: none;
  font-size: 12px; line-height: 1.35; opacity: 0; transition: opacity .18s; box-shadow: 0 12px 30px -12px rgba(0,0,0,.4); }
.atip.is-on { opacity: 1; }
.atip b { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.atip span { display: block; margin-top: 3px; opacity: .7; }
.atip kbd { font: 600 10px/1 "JetBrains Mono", monospace; padding: 3px 5px; border-radius: 4px; border: 1px solid currentColor; opacity: .6; margin-left: auto; }
.seg button:hover:not([aria-pressed="true"]):not([aria-selected="true"]) { background: color-mix(in srgb, var(--ink) 9%, transparent); }
.seg--icons button svg { transition: transform .3s var(--ease); }
.seg--icons button:hover svg { transform: translateY(-1px) scale(1.08); }
.ab__colors button[data-col]:hover { box-shadow: inset 0 0 0 1px rgba(0,0,0,.14), 0 0 0 2px var(--bg), 0 0 0 3.5px color-mix(in srgb, var(--ink) 35%, transparent); }
