/* Janela estilo Mac clássico. Medidas tiradas da referência (docs/referencias). */
:root {
  --mono: "Courier New", Courier, monospace;
  --sans: Inter, system-ui, -apple-system, sans-serif;
  --chrome: #d4d0c8;
  --content: #e0ddd8;
  --ink: #2a2a2a;
  --ink-2: #555;
  --line: #bbb;
  --blue-1: #5a7fcc;
  --blue-2: #3a5faf;
  --blue-3: #2a4a8a;
  --red-1: #c94040;
  --red-2: #b03030;
}

* { box-sizing: border-box; }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: #1d1b19;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

/* ---------- Página e fundo ---------- */
.page {
  min-height: 100vh;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
/* Fundo pixelado como o da referência: quadro de 320 × 240 com poucas cores,
   esticado na tela (desenhado em app.js). */
.fundo {
  position: fixed; inset: 0; z-index: -1;
  width: 100vw; height: 100vh;
  object-fit: cover;
  background: #2a2724;
}

.reopen {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: 0; cursor: pointer; color: #fff;
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 1px;
  text-shadow: 0 1px 3px #000;
}
.reopen img { width: 96px; filter: drop-shadow(0 4px 12px #000a); }
.reopen[hidden] { display: none; }

/* ---------- Janela ---------- */
.win {
  width: 1280px; max-width: 100%;
  height: 820px; max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  background: var(--chrome);
  border: 1px solid #777;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 32px 80px #0009, 0 0 0 .5px #00000059;
  transition: width .25s, height .25s, border-radius .25s;
}
.win[hidden] { display: none; }
.win.is-max {
  position: fixed; inset: 0; z-index: 99;
  width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh;
  border-radius: 0;
}
.win.is-min { height: auto; }
.win.is-min > :not(.titlebar) { display: none; }

.titlebar {
  height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 14px;
  background: linear-gradient(#ece8e2, #c8c4be);
  border-bottom: 1px solid #999;
}
.controls { width: 40%; display: flex; gap: 8px; align-items: center; }
.dot {
  width: 13px; height: 13px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 1px solid #0003;
  box-shadow: inset 0 1px 1px #fff8;
}
.dot--close { background: radial-gradient(circle at 50% 35%, #ff8a80, #e0443a); }
.dot--min { background: radial-gradient(circle at 50% 35%, #ffe08a, #e0a91f); }
.dot--max { background: radial-gradient(circle at 50% 35%, #a3e58f, #3fae32); }
.dot:hover { filter: brightness(.9); }

.wintitle {
  margin: 0; white-space: nowrap;
  font-family: var(--mono); font-size: 14px; font-weight: 700; letter-spacing: 2px; color: #222;
}
.search { width: 40%; display: flex; justify-content: flex-end; }
.search input {
  width: 170px; height: 26px; padding: 0 12px;
  border: 1px solid #aaa; border-radius: 10px; background: #fff;
  font: 13px var(--sans); color: var(--ink); outline: none;
  box-shadow: inset 0 1px 2px #0002;
}
.search input:focus { border-color: var(--blue-2); box-shadow: 0 0 0 2px #5a7fcc55; }

/* ---------- Abas ---------- */
.toolbar {
  height: 38px; flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px;
  border-bottom: 1px solid #aaa;
  background: linear-gradient(#dcd8d2, #ccc8c2);
}
.home, .tab {
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .5px;
  color: #333; text-decoration: none; white-space: nowrap;
}
.home {
  padding: 4px 10px;
  border: 1px solid #999; border-radius: 4px;
  background: linear-gradient(#f4f1ec, #d8d4ce);
  box-shadow: 0 1px 2px #0002;
}
.tabs-wrap {
  margin: 0 auto;
  display: flex; align-items: stretch; min-width: 0;
  border: 1px solid #999; border-radius: 6px; overflow: hidden;
  background: linear-gradient(#e8e4de, #d0ccc6);
  box-shadow: 0 1px 3px #00000026;
}
.tabs { display: flex; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center;
  padding: 6px 14px;
  border-right: 1px solid #aaa;
  transition: background .1s;
}
.tab:last-child { border-right: 0; }
.tab:hover { background: #ffffff4d; }
.tab.is-on { color: #fff; font-weight: 700; background: linear-gradient(var(--blue-1), var(--blue-2)); }
.tabs-arrow { display: none; }

/* ---------- Corpo ---------- */
.main { flex: 1; min-height: 0; display: flex; }

.sidebar {
  width: 210px; flex-shrink: 0;
  padding: 8px 0 12px;
  display: flex; flex-direction: column;
  overflow: hidden auto;
  background: linear-gradient(#dcdbd5, #c8c7c1);
  border-right: 1px solid #aaa;
}
.side-label {
  padding: 4px 12px 6px;
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--ink-2);
}
.side-label--gap { margin-top: 8px; }
.feed { list-style: none; margin: 0; padding: 2px 0; }
.feed-item {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 10px; cursor: pointer; user-select: none;
  font-size: 13px;
}
.feed-item:hover { background: #ffffff38; }
.feed-item input { margin: 0; width: 14px; height: 14px; accent-color: var(--blue-2); cursor: pointer; }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.feed-name { flex: 1; }
.feed-toggle { display: none; }

.destaque {
  display: block; margin: 0 8px; border: 1px solid #999; border-radius: 4px; overflow: hidden;
  text-decoration: none; background: #111; box-shadow: 0 2px 6px #0003;
}
.destaque img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.destaque span {
  display: block; padding: 6px 8px;
  font: 700 11px var(--mono); color: #fff; background: #111;
}

.promo {
  margin: 8px 8px 0; border: 1px solid var(--blue-3); border-radius: 6px; overflow: hidden;
  background: linear-gradient(160deg, #4a6fbf, #2f4f95);
  box-shadow: 0 2px 6px #0003;
}
.promo-bar {
  display: flex; align-items: center; gap: 6px; padding: 5px 8px;
  background: linear-gradient(var(--blue-2), var(--blue-3));
  border-bottom: 1px solid #ffffff26;
  font: 700 10px var(--mono); letter-spacing: 1px; text-transform: uppercase; color: #ffffffe6;
}
.promo-body { padding: 8px 9px 10px; color: #fff; }
.promo-title { margin: 0 0 4px; font: 700 12px/1.35 var(--mono); }
.promo-text { margin: 0 0 8px; font-size: 11px; font-style: italic; opacity: .85; }
.promo ul { list-style: none; margin: 0 0 8px; padding: 0; font-size: 11px; }
.promo li::before { content: "✓ "; }
.promo-cta {
  display: block; text-align: center; padding: 5px;
  border: 1px solid #999; border-radius: 4px;
  background: linear-gradient(#f4f1ec, #d8d4ce);
  font: 700 11px var(--mono); color: #222; text-decoration: none;
}
.promo-cta:hover { background: #fff; }

.content {
  flex: 1; min-width: 0;
  overflow: hidden auto;
  background: var(--content);
  padding-bottom: 8px;
  scroll-behavior: smooth;
}
[data-feed][hidden] { display: none !important; }

/* Seção larga (faixa de apps) */
.section {
  margin: 8px; padding: 10px 0;
  border: 1px solid var(--line); border-radius: 7px; overflow: hidden;
  background: linear-gradient(#eae8e4, #dedad4);
  box-shadow: inset 0 1px 2px #ffffffb3, 0 1px 4px #0000001f;
}
.section-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 12px; margin-bottom: 10px;
}
.section-title { margin: 0; font: 700 14px var(--mono); color: var(--ink); }
.switch {
  display: flex; height: 26px;
  border: 1px solid #aaa; border-radius: 5px; overflow: hidden;
  box-shadow: 0 1px 2px #0001;
}
.switch-tab {
  display: inline-flex; align-items: center; padding: 0 12px;
  border: 0; border-left: 1px solid var(--line); cursor: pointer;
  background: linear-gradient(#eeebe5, #dedad4);
  font: 12px var(--mono); color: #444;
}
.switch-tab:first-child { border-left: 0; }
.switch-tab:hover:not(.is-on) { background: linear-gradient(#f8f4ee, #e8e4de); }
.switch-tab.is-on { color: #fff; font-weight: 700; background: linear-gradient(var(--blue-1), var(--blue-2)); }

/* Faixas com rolagem lateral */
.strip { position: relative; }
.strip-track {
  display: flex; gap: 8px; padding: 0 12px 2px; scroll-padding: 0 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  scroll-behavior: smooth;
}
.strip-track::-webkit-scrollbar { display: none; }
.strip-arrow {
  position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 1px solid #999; font-size: 9px; color: #333;
  background: linear-gradient(#f4f1ec, #cfcbc5);
  box-shadow: 0 1px 3px #0003;
  transition: opacity .15s;
}
.strip-arrow--prev { left: 6px; }
.strip-arrow--next { right: 6px; }
.strip-arrow:disabled { opacity: 0; pointer-events: none; }

.app-card {
  flex: 0 0 168px; scroll-snap-align: start;
  display: block; text-decoration: none;
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  background: linear-gradient(#f8f6f2, #eeeae4);
  box-shadow: 0 2px 4px #0000001a;
  transition: box-shadow .15s, transform .15s;
}
.strip-track > .app-card:first-child { margin-left: 0; }
.app-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px #0000002e; }
.app-thumb { height: 66px; background: #222; border-bottom: 1px solid #ccc; position: relative; }
.app-thumb img { width: 100%; height: 100%; object-fit: cover; }
.app-selo {
  position: absolute; top: 5px; left: 5px;
  padding: 1px 5px; border-radius: 3px;
  font: 700 9px var(--mono); letter-spacing: .5px; text-transform: uppercase; color: #fff;
  background: #000a;
}
.app-info { padding: 5px 8px 7px; text-align: center; }
.app-name { font: 700 12px var(--mono); color: #222; }
.app-cat { font-size: 10px; text-transform: uppercase; color: #444; letter-spacing: .3px; }
.app-open { font: 700 10px var(--mono); color: var(--blue-1); letter-spacing: .5px; }
.app-card:hover .app-open { color: var(--blue-2); }
.strip-vazio { padding: 26px 16px; font: 12px var(--mono); color: var(--ink-2); }

/* Três colunas */
.three { display: flex; gap: 8px; margin: 8px; }
.card {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 7px; overflow: hidden;
  background: linear-gradient(160deg, #f5f3ef 0%, #eae7e0 100%);
  box-shadow: 0 3px 8px #0000001f;
}
.card--red { background: linear-gradient(160deg, var(--red-1) 0%, var(--red-2) 100%); border-color: #882020; }
.card-bar {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 6px 10px;
  background: linear-gradient(#dedad4, #ccc9c2);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 1px #fff9;
}
.card-bar--red { background: linear-gradient(#b83030, #983030); border-color: #882020; box-shadow: inset 0 1px #fff3; }
.card-label {
  display: flex; align-items: center; gap: 6px;
  font: 700 11px var(--mono); letter-spacing: .8px; text-transform: uppercase; color: #333;
}
.card-label--light { color: #fff; }
.ico {
  display: inline-grid; place-items: center; width: 18px; height: 18px;
  border: 1px solid #aaa; border-radius: 3px; font-style: normal; font-size: 11px;
  background: linear-gradient(#e8e4de, #ccc8c2);
}
.ico--plain { border: 0; background: none; width: auto; }
.badge {
  padding: 0 6px; border-radius: 3px; background: #0000000f;
  font: 10px var(--mono); color: #666; white-space: nowrap;
}
.card-body { padding: 10px 12px 12px; flex: 1; }

.thead {
  display: flex; justify-content: space-between; padding-bottom: 4px; margin-bottom: 4px;
  border-bottom: 1px solid #ccc;
  font: 700 10px var(--mono); letter-spacing: 1px; text-transform: uppercase; color: #666;
}
.thead--red { color: #ffffffb3; border-color: #ffffff40; }
.thead--red span:nth-child(1) { flex: 1; }
.thead--red span:nth-child(2) { width: 90px; text-align: right; }
.thead--red span:nth-child(3) { width: 60px; text-align: right; }
.row {
  display: flex; align-items: center; gap: 8px; min-height: 29px;
  border-bottom: 1px dotted #ccc;
}
.row:last-child { border-bottom: 0; }
.row-n { width: 12px; font: 11px var(--mono); color: #888; }
.row-name { flex: 1; font-size: 13px; font-weight: 500; text-decoration: none; color: #222; }
.row-name:hover { text-decoration: underline; }
.row-val { font: 700 12px var(--mono); color: var(--blue-1); }
.row-val--breve { color: #b07a1a; }
.row-val--dev { color: #888; }
.footnote { margin: 10px 0 0; padding-top: 8px; border-top: 1px dashed #bbb; font-size: 11px; font-style: italic; color: #666; }
.footnote a { font-weight: 700; color: #222; }
.footnote--red { color: #ffffffb3; border-color: #ffffff40; }

.trail { display: block; padding: 6px 0 7px; text-decoration: none; }
.trail-track { position: relative; height: 26px; }
.trail-track::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 6px; transform: translateY(-50%);
  border-radius: 4px; background: #d6d2cb; box-shadow: inset 0 1px 2px #0003;
}
.trail-fill {
  position: absolute; left: 0; top: 50%; height: 6px; transform: translateY(-50%);
  border-radius: 4px; background: linear-gradient(var(--blue-1), var(--blue-2));
}
.trail-knob {
  position: absolute; top: 50%; width: 26px; height: 26px; transform: translate(-50%, -50%);
  border-radius: 50%; border: 1px solid #999; overflow: hidden; background: #fff;
  box-shadow: 0 2px 4px #0004;
}
.trail-knob img { width: 100%; height: 100%; object-fit: cover; }
.trail-info { display: flex; justify-content: space-between; align-items: baseline; margin-top: 2px; }
.trail-name { font-size: 12.5px; font-weight: 600; color: #222; }
.trail-pct { font: 700 11px var(--mono); color: var(--blue-1); }
.trail:hover .trail-name { text-decoration: underline; }

.srow {
  display: flex; align-items: center; min-height: 33px;
  border-bottom: 1px solid #ffffff26; color: #fff;
}
.srow:last-child { border-bottom: 0; }
.srow-name { flex: 1; font-size: 13px; font-weight: 600; color: #fff; text-decoration: none; }
.srow-name:hover { text-decoration: underline; }
.srow-fase { width: 90px; text-align: right; font: 700 12px var(--mono); }
.srow-acesso { width: 60px; text-align: right; font: 12px var(--mono); color: #ffffffb3; }

/* Linha de mídia */
.media-row { display: flex; gap: 8px; margin: 8px; }
.mcard {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 7px; overflow: hidden;
  background: linear-gradient(160deg, #f5f3ef 0%, #eae7e0 100%);
  box-shadow: 0 3px 8px #0000001f;
}
.strip--media { padding: 8px; }
.strip--media .strip-track { gap: 6px; padding: 0; scroll-padding: 0; }
.gal-item { flex: 0 0 auto; height: 179px; scroll-snap-align: start; border-radius: 3px; overflow: hidden; }
.gal-item img { height: 100%; width: auto; aspect-ratio: 2 / 1; object-fit: cover; }
.video-vazio {
  margin: 8px; height: 179px; border-radius: 3px; background: #0d0d0d;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: #ffffffa0; text-align: center; padding: 0 20px;
}
.video-vazio p { margin: 0; font-size: 11px; }
.play {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid #ffffff55; color: #fff; font-size: 14px; padding-left: 3px;
}
.marca {
  margin: 8px; height: 179px; border-radius: 3px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, #3a3a3a, #111);
}
.marca img { width: 70%; }

/* Painel catálogo (lista + leitor) */
.panel {
  margin: 8px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden;
  background: linear-gradient(160deg, #f5f3ef 0%, #eae7e0 100%);
  box-shadow: 0 3px 8px #0000001f;
}
.mail { display: flex; min-height: 300px; }
.mail-list { width: 44%; border-right: 1px solid var(--line); background: #fbfaf8; }
.mail-head, .mail-item {
  display: grid; grid-template-columns: 22px 110px 1fr 92px; align-items: center; gap: 4px;
  padding: 0 10px;
}
.mail-head {
  height: 24px; border-bottom: 1px solid #ccc;
  background: linear-gradient(#f2f0ec, #e2dfd9);
  font: 700 11px var(--mono); color: #333;
}
.mail-item {
  min-height: 30px; border-bottom: 1px solid #eee; cursor: pointer;
  font-size: 12.5px; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left;
}
.mail-item:nth-child(even) { background: #f3f1ed; }
.mail-item:hover { background: #e7ecf7; }
.mail-item.is-on { background: linear-gradient(var(--blue-1), var(--blue-2)); color: #fff; }
.mail-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue-1); }
.mail-item.is-on .mail-dot { background: #fff; }
.mail-cat { font-weight: 600; }
.mail-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.mail-fase { font-size: 11.5px; white-space: nowrap; }
.mail-read { flex: 1; min-width: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.read-top { display: flex; gap: 10px; align-items: center; }
.read-av {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--blue-2); color: #fff; font: 700 13px var(--sans);
}
.read-who { flex: 1; min-width: 0; }
.read-who b { font-size: 13px; }
.read-tag {
  margin-left: 6px; padding: 0 5px; border-radius: 3px; border: 1px solid #aaa;
  font: 700 9px var(--mono); text-transform: uppercase; color: #555;
}
.read-sub { font-size: 11px; color: #777; }
.read-title { margin: 0; font: 700 15px var(--mono); }
.read-meta { font-size: 11px; color: #666; }
.read-meta span { margin-left: 4px; padding: 0 6px; border-radius: 3px; background: #e2dfd9; color: #333; }
.read-img { border-radius: 4px; overflow: hidden; border: 1px solid #ccc; aspect-ratio: 2 / 1; background: #222; }
.read-img img { width: 100%; height: 100%; object-fit: cover; }
.read-desc { margin: 0; font-size: 13px; color: #333; }
.read-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 4px;
  border: 1px solid #999; text-decoration: none; cursor: pointer;
  font: 700 12px var(--mono); color: #222;
  background: linear-gradient(#f4f1ec, #d8d4ce);
  box-shadow: 0 1px 2px #0002;
}
.btn--blue { color: #fff; border-color: var(--blue-3); background: linear-gradient(var(--blue-1), var(--blue-2)); }
.btn:hover { filter: brightness(1.05); }

/* Avaliação */
.vote-body { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.pill {
  flex-shrink: 0; padding: 3px 12px; border-radius: 999px; border: 1px solid #999;
  background: linear-gradient(#f4f1ec, #d8d4ce);
  font: 700 11px var(--mono); letter-spacing: .5px; text-transform: uppercase; color: #333;
}
.vote-n { font: 700 12px var(--mono); color: var(--blue-1); }
.vote-n:last-of-type { color: #c94040; }
#voto { flex: 1; min-width: 0; accent-color: #e0623a; }

/* Barra de status */
.statusbar {
  height: 30px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 12px;
  border-top: 1px solid #999;
  background: linear-gradient(#dcd8d2, #c8c4be);
}
.redes { display: flex; gap: 12px; }
.redes a { display: grid; place-items: center; width: 18px; height: 18px; color: #444; }
.redes a:hover { color: #000; }
.redes svg { width: 15px; height: 15px; }
.status-text { font-size: 11px; color: #444; text-align: center; }
.status-logo { width: 22px; filter: invert(.75); }

:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 2px; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .page { padding: 12px; }
  .win { height: calc(100vh - 24px); max-height: none; }
  .three { flex-wrap: wrap; }
  .three > .card { flex: 1 1 calc(50% - 8px); }
  .three > .card--red { flex-basis: 100%; }
  .media-row { flex-wrap: wrap; }
  .media-row > .mcard:first-child { flex-basis: 100%; }
}

/* ---------- Celular ---------- */
@media (max-width: 760px) {
  body { background: var(--chrome); }
  .fundo { display: none; }
  .page { padding: 0; display: block; background: var(--chrome); min-height: 100dvh; }
  .win {
    width: 100%; height: auto; min-height: 100dvh; max-height: none;
    border: 0; border-radius: 0; box-shadow: none; overflow: visible;
  }
  .win.is-max { position: static; }
  .controls { display: none; }
  .titlebar {
    position: sticky; top: 0; z-index: 20;
    height: 48px; padding: 0 12px; padding-top: env(safe-area-inset-top);
    height: calc(48px + env(safe-area-inset-top));
  }
  .wintitle { font-size: 13px; letter-spacing: 1.5px; }
  .search { width: auto; }
  .search input { width: 128px; font-size: 16px; height: 30px; border-radius: 15px; padding: 0 10px; }
  .toolbar { height: 46px; padding: 0 10px; position: sticky; top: calc(48px + env(safe-area-inset-top)); z-index: 19; }
  .home { padding: 6px 10px; }
  .tabs-wrap { flex: 1; margin: 0; }
  .tab { padding: 8px 18px; min-width: 110px; justify-content: center; }
  .tabs-arrow {
    display: grid; place-items: center; flex-shrink: 0; width: 26px; padding: 0;
    border: 0; cursor: pointer; font-size: 9px; color: #333; background: transparent;
  }
  .tabs-arrow--prev { border-right: 1px solid #aaa; }
  .tabs-arrow--next { border-left: 1px solid #aaa; }

  .main { display: block; }
  .sidebar {
    width: auto; padding: 8px 0; overflow: visible;
    border-right: 0; border-bottom: 1px solid #aaa;
    background: linear-gradient(#d8d6d0, #cdcbc5);
  }
  .sidebar > :not(.feed) { display: none; }
  .feed { display: flex; gap: 8px; padding: 2px 10px; overflow-x: auto; scrollbar-width: none; }
  .feed::-webkit-scrollbar { display: none; }
  .feed-item {
    flex-shrink: 0; gap: 8px; padding: 6px 8px 6px 10px; border-radius: 6px;
    background: #ebe9e4; border: 1px solid #c4c2bc; font-size: 14px; font-weight: 500;
    white-space: nowrap; position: relative;
  }
  .feed-item input { position: absolute; opacity: 0; pointer-events: none; }
  .feed-toggle {
    display: block; position: relative; width: 36px; height: 20px; border-radius: 10px;
    background: #b8b6b0; box-shadow: inset 0 1px 2px #0003; transition: background .15s;
  }
  .feed-toggle::after {
    content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 2px #0004; transition: transform .15s;
  }
  .feed-item input:checked ~ .feed-toggle { background: var(--blue-1); }
  .feed-item input:checked ~ .feed-toggle::after { transform: translateX(16px); }
  .feed-item:has(input:focus-visible) { outline: 2px solid var(--blue-2); }

  .content { overflow: visible; padding-bottom: calc(46px + env(safe-area-inset-bottom)); }
  .section-head { flex-direction: column; align-items: flex-start; }
  .three, .media-row { flex-direction: column; }
  .app-card { flex-basis: calc(50% - 4px); }
  .app-thumb { height: 72px; }
  .gal-item { height: 150px; }
  .video-vazio, .marca { height: 150px; }

  .mail { flex-direction: column; }
  .mail-list { width: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .mail-head, .mail-item { grid-template-columns: 18px 96px 1fr 84px; }
  .vote-body { flex-wrap: wrap; justify-content: space-between; }
  #voto { order: 5; flex-basis: 100%; }

  .statusbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    height: calc(40px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  }
  .redes svg { width: 18px; height: 18px; }
  .status-text { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
