/* ===== Base ===== */
:root {
  --accent: #FF7A1A;
  --accent-press: #E8660A;
  --accent-soft: #FFF1E6;
  --accent-text: #B4500A;
  --text: #2B2F36;
  --muted: #6B7280;
  --bg: #FFFFFF;
  --surface: #F4F5F7;
  --border: #ECEEF1;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 14px rgba(16, 24, 40, .07);
  --topbar-h: 56px;
  --exnav-h: 80px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

/* A rolagem é da própria página (viewport). Só o html recebe overflow-x / overscroll:
   se o body também tiver overflow, ele vira um contêiner de rolagem próprio e, com
   overscroll-behavior, engole o gesto do dedo e a página não rola no celular. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  overscroll-behavior-y: contain; /* sem "puxar para atualizar"; a rolagem continua livre */
  touch-action: manipulation;     /* sem zoom com toque duplo, pinça continua funcionando */
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
a, button { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ===== Ícones (SVG da pasta icons/, já com a cor; <img> funciona até abrindo pelo arquivo) ===== */
.ico {
  display: block;
  flex: none;
  width: 24px;
  height: 24px;
  pointer-events: none;
}

/* ===== Barra do topo ===== */
.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  height: calc(var(--topbar-h) + var(--safe-t));
  padding: var(--safe-t) calc(4px + var(--safe-r)) 0 calc(4px + var(--safe-l));
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-title {
  flex: 1;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: var(--text);
  transition: background-color .12s, transform .12s;
}
.icon-btn:active { background: var(--accent-soft); transform: scale(.92); }

/* ===== Área das telas ===== */
.view {
  max-width: 720px;
  margin: 0 auto;
  padding:
    calc(24px + var(--safe-t))
    calc(var(--gutter) + var(--safe-r))
    calc(28px + var(--safe-b))
    calc(var(--gutter) + var(--safe-l));
}
.has-topbar .view { padding-top: calc(var(--topbar-h) + var(--safe-t) + 14px); }
/* --dock-h é a altura real da barra de baixo (timer + botões), medida pelo app.js */
.view { padding-bottom: calc(max(var(--dock-h, 0px), var(--safe-b)) + 28px); }

.anim-fwd, .anim-next  { animation: in-right .2s cubic-bezier(.2, .7, .3, 1); }
.anim-back, .anim-prev { animation: in-left .2s cubic-bezier(.2, .7, .3, 1); }
.anim-fade             { animation: in-fade .18s ease-out; }
@keyframes in-right { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes in-left  { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes in-fade  { from { opacity: 0; } to { opacity: 1; } }

/* ===== Início ===== */
.home-head { margin: 4px 2px 20px; }
.home-head h1 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.home-head h1::after {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  margin-top: 8px;
  border-radius: 4px;
  background: var(--accent);
}
.home-head p { margin: 10px 0 0; color: var(--muted); font-size: 15px; }

/* card principal (Pegue seu treino / Continuar meu treino) */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 196px;
  padding: 22px 22px 20px;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(140deg, #FF8E3C 0%, var(--accent) 45%, #F0640C 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 122, 26, .32);
  transition: transform .12s, box-shadow .12s;
}
.hero:active { transform: scale(.98); box-shadow: 0 4px 12px rgba(255, 122, 26, .28); }
.hero-art {
  position: absolute;
  right: -34px;
  bottom: -22px;
  width: 190px;
  height: 190px;
  opacity: .16;
  transform: rotate(-24deg);
  pointer-events: none;
}
.hero-kicker {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hero-title { position: relative; margin-top: 6px; font-size: 28px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.hero-text { position: relative; max-width: 88%; font-size: 16px; font-weight: 500; line-height: 1.35; }
.hero-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: auto;
  min-height: 44px;
  padding: 0 12px 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  font-size: 16px;
  font-weight: 700;
}
.hero-cta .ico { width: 20px; height: 20px; }

/* card secundário (Biblioteca) */
.tile {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  margin-top: 14px;
  padding: 14px 12px 14px 14px;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
  transition: transform .12s, background-color .12s;
}
.tile:active { transform: scale(.98); background: var(--surface); }
.tile-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--accent-soft);
}
.tile-icon img { width: 32px; height: 32px; }
.tile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tile-title { font-size: 17px; font-weight: 700; }
.tile-sub { font-size: 14px; color: var(--muted); }
.tile .ico-chevron { width: 20px; height: 20px; }

/* cabeçalho das telas internas */
.page-head { margin: 4px 2px 18px; }
.page-head h2 { margin: 0; font-size: 24px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; overflow-wrap: anywhere; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.page-head .page-step { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-text); }

/* assistente: objetivo e dias */
.choices { display: grid; gap: 12px; }
.choice, .day-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 96px;
  padding: 16px 12px 16px 16px;
  border-radius: 20px;
  background: var(--bg);
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  text-align: left;
  transition: transform .12s, border-color .15s, background-color .12s;
}
.choice:active, .day-btn:active { transform: scale(.98); border-color: var(--accent); background: #FFF8F2; }
.choice-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: var(--accent-soft);
}
.choice-icon img { width: 36px; height: 36px; }
.choice-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.choice-title { font-size: 19px; font-weight: 800; }
.choice-sub { font-size: 14px; color: var(--muted); }
.day-num {
  display: grid;
  place-items: center;
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: var(--accent);
  color: #fff;
  font-size: 30px;
  font-weight: 800;
}
.choice .ico-chevron, .day-btn .ico-chevron { width: 20px; height: 20px; }

/* Meu treino */
.days { display: grid; gap: 12px; margin-bottom: 22px; }
.day-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  padding: 14px 12px 14px 14px;
  border-radius: 20px;
  background: var(--bg);
  box-shadow: var(--shadow);
  transition: transform .12s, background-color .12s;
}
.day-card:active { transform: scale(.98); background: var(--surface); }
.day-letter {
  display: grid;
  place-items: center;
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: var(--accent);
  color: #fff;
  font-size: 30px;
  font-weight: 800;
}
.day-card.is-done .day-letter { background: var(--accent-soft); color: var(--accent-text); }
.day-info { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.day-title { font-size: 17px; font-weight: 750; line-height: 1.25; overflow-wrap: anywhere; }
.day-sub { font-size: 14px; color: var(--muted); }
.day-progress { font-size: 13px; font-weight: 600; color: var(--accent-text); }
.seal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
}
.seal::before { content: ""; width: 12px; height: 12px; background: url(../icons/check.svg) center / contain no-repeat; }
.day-card .ico-chevron { width: 20px; height: 20px; }
.link-muted {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-muted:active { color: var(--text); }
.foot-tip { margin: 8px 0 0; text-align: center; color: var(--muted); font-size: 13px; }

/* treino do dia: progresso e checks */
.progress { margin: 0 2px 16px; }
.progress-top { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.progress-top span:last-child { color: var(--accent-text); }
.progress-bar { height: 10px; border-radius: 10px; background: var(--surface); overflow: hidden; }
.progress-bar span { display: block; height: 100%; border-radius: 10px; background: var(--accent); transition: width .35s cubic-bezier(.2, .7, .3, 1); }
.done-banner {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  animation: pop .4s cubic-bezier(.3, 1.6, .5, 1);
}
.row-wrap { position: relative; }
.row-check { padding-right: 72px; }
.row-wrap .row { transition: opacity .25s, transform .12s, background-color .12s; }
.row-wrap.is-done .row { opacity: .5; }
.check {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  transform: translateY(-50%);
}
.check-circle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2.5px solid #C9CED6;
  border-radius: 50%;
  background: var(--bg);
  transition: background-color .18s, border-color .18s, transform .12s;
}
.check-circle img { width: 20px; height: 20px; opacity: 0; transform: scale(.4); transition: opacity .18s, transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.check:active .check-circle { transform: scale(.88); }
.row-wrap.is-done .check-circle { background: var(--accent); border-color: var(--accent); }
.row-wrap.is-done .check-circle img { opacity: 1; transform: none; }
.chip-strong { background: var(--accent); color: #fff; }
.ex-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* estado vazio */
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 8px 0; text-align: center; }
.empty h2 { margin: 0; font-size: 24px; font-weight: 800; }
.empty p { margin: 0 0 14px; max-width: 32ch; color: var(--muted); }

/* confirmação (folha de baixo) e aviso */
.sheet-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(17, 20, 26, .42);
  animation: in-fade .15s ease-out;
}
.sheet {
  width: 100%;
  max-width: 560px;
  padding: 22px calc(18px + var(--safe-r)) calc(18px + var(--safe-b)) calc(18px + var(--safe-l));
  border-radius: 24px 24px 0 0;
  background: var(--bg);
  animation: in-up .22s cubic-bezier(.2, .7, .3, 1);
}
.sheet h3 { margin: 0 0 6px; font-size: 20px; font-weight: 800; }
.sheet p { margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  top: calc(var(--safe-t) + var(--topbar-h) + 12px);
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 16px;
  background: var(--text);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .22);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition: opacity .2s, transform .2s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* tela "Em breve" */
.soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 36px 8px 0;
  text-align: center;
}
.soon-badge {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin-bottom: 6px;
  border-radius: 28px;
  background: var(--accent-soft);
}
.soon-badge img { width: 54px; height: 54px; }
.soon h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.soon p { margin: 0 0 14px; max-width: 32ch; color: var(--muted); font-size: 16px; }
.btn-block { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 420px; min-height: 54px; font-size: 16px; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.card {
  display: flex;
  flex-direction: column;
  min-height: 48px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
  transition: transform .12s, box-shadow .12s;
}
.card:active { transform: scale(.97); box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }
.card-img {
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.card-title { font-size: 16px; font-weight: 700; }
.card-sub { font-size: 13px; font-weight: 600; color: var(--accent-text); }

/* ===== Lista do grupo ===== */
.list-head { margin: 2px 4px 12px; font-size: 14px; color: var(--muted); }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 8px 10px 8px 8px;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
  transition: transform .12s, background-color .12s;
}
.row:active { transform: scale(.98); background: var(--surface); }
.row-img {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  object-fit: cover;
}
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.row-title { font-size: 16px; font-weight: 650; line-height: 1.25; }
.row .ico-chevron { width: 20px; height: 20px; }

.chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 12.5px;
  font-weight: 600;
}

/* ===== Exercício ===== */
.ex { touch-action: pan-y; }
.ex-media {
  position: relative;
  margin: -14px calc(-1 * (var(--gutter) + var(--safe-r))) 0 calc(-1 * (var(--gutter) + var(--safe-l)));
  aspect-ratio: 1 / 1;
  background: var(--bg);
  overflow: hidden;
}
/* a miniatura (já em cache) aparece na hora; o GIF cobre quando terminar de baixar */
.ex-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .2s; }
.ex-gif { position: relative; width: 100%; height: 100%; object-fit: contain; transition: opacity .2s; }
.ex-media.is-loading .ex-gif,
.ex-media.is-error .ex-gif { opacity: 0; }
.ex-media.is-loading .ex-thumb { opacity: .45; }
.ex-media .spinner { position: absolute; top: 50%; left: 50%; margin: -18px 0 0 -18px; opacity: 0; transition: opacity .15s; }
.ex-media.is-loading .spinner { opacity: 1; }
.ex-media.is-error::after {
  content: "GIF indisponível sem internet";
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(43, 47, 54, .85);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.ex-info { padding: 18px 4px 0; }
.ex-pos { margin: 0 0 4px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-text); }
.ex-title { margin: 0 0 10px; font-size: 24px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.ex-info .chip { font-size: 14px; padding: 5px 12px; }
.ex-hint { margin: 18px 0 0; font-size: 13px; color: var(--muted); }

/* ===== Barra de baixo: timer + Feito/Descanso + Anterior/Próximo ===== */
.dock {
  position: fixed;
  z-index: 20;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 calc(var(--gutter) + var(--safe-r)) var(--safe-b) calc(var(--gutter) + var(--safe-l));
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(16, 24, 40, .05);
}
.exnav { padding: 10px 0; }
.exnav-inner, .exnav-tools, .timer { max-width: 688px; margin: 0 auto; }
.exnav-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.exnav-tools { display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; margin-bottom: 10px; }
.tool-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 10px;
  border-radius: 16px;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  transition: transform .12s, background-color .15s, border-color .15s, color .15s;
}
.tool-btn .ico { width: 22px; height: 22px; }
.tool-btn:active { transform: scale(.96); background: var(--surface); }
.tool-btn-done { border-color: var(--accent); color: var(--accent-text); }
.tool-btn-done .ico-check { display: none; }
.tool-btn-done.is-done { background: var(--accent); color: #fff; }
.tool-btn-done.is-done .ico-check { display: block; }
.tool-btn-done.is-done:active { background: var(--accent-press); }
.pop { animation: pop .32s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { 0% { transform: scale(.92); } 60% { transform: scale(1.04); } 100% { transform: none; } }

.timer {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 0 2px;
  animation: in-up .2s ease-out;
}
.timer[hidden] { display: none; }
.timer-main { display: grid; gap: 2px; min-width: 112px; }
.timer-label { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-text); }
.timer-time { font-size: 40px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.timer-bar { display: block; height: 4px; margin-top: 6px; border-radius: 4px; background: var(--accent-soft); overflow: hidden; }
.timer-bar span { display: block; height: 100%; background: var(--accent); transition: width .25s linear; }
.timer-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.timer-btn {
  min-width: 52px;
  min-height: 48px;
  padding: 0 10px;
  border-radius: 14px;
  background: var(--surface);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: transform .12s, background-color .12s;
}
.timer-btn:active { transform: scale(.94); background: #E7E9ED; }
.timer-btn-stop { background: var(--text); color: #fff; }
.timer-btn-stop:active { background: #000; }
.timer.is-finished .timer-time { color: var(--accent); animation: blink .9s ease-in-out infinite; }
.timer.is-finished .timer-btn-stop { background: var(--accent); }
.dock:has(.exnav:not([hidden])) .timer { border-bottom: 1px solid var(--border); padding-bottom: 12px; }
@keyframes blink { 50% { opacity: .35; } }
@keyframes in-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 58px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  transition: transform .12s, background-color .12s, opacity .12s;
}
.nav-btn:active { transform: scale(.96); background: #E7E9ED; }
.nav-btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(255, 122, 26, .32); }
.nav-btn-primary:active { background: var(--accent-press); }
.nav-btn:disabled { opacity: .38; box-shadow: none; transform: none; cursor: default; }

/* ===== Carregando / erro ===== */
.spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 122, 26, .2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.state {
  display: grid;
  place-items: center;
  gap: 16px;
  min-height: 60vh;
  text-align: center;
  color: var(--muted);
}
.btn {
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.btn:active { background: var(--accent-press); transform: scale(.97); }

/* ===== Telas maiores (computador / tablet) ===== */
@media (min-width: 600px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .ex-media { margin: 0 auto; max-width: min(560px, max(300px, calc(100vh - 330px))); border-radius: var(--radius); box-shadow: var(--shadow); }
  .ex-info { max-width: min(560px, max(300px, calc(100vh - 330px))); margin: 0 auto; }
}

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