:root {
  color-scheme: dark;
  --bg: #0e0f12;
  --surface: #17191e;
  --surface-2: #22252c;
  --line: #2a2e36;
  --text: #f4f5f7;
  --muted: #9198a4;
  --accent: #c8f53b;
  --accent-ink: #141a05;
  --accent-soft: rgba(200, 245, 59, 0.12);
  --danger: #ff5c5c;
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
a { color: inherit; text-decoration: none; touch-action: manipulation; }
svg { display: block; flex: none; }
h1, h2, h3, p { margin: 0; }

.vh { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.pad { padding: 0 16px; margin-bottom: 14px; }
.hint { color: var(--muted); padding: 0 20px; margin-bottom: 16px; font-size: 15px; }

#view { padding-bottom: 32px; }
body.has-tabbar #view { padding-bottom: calc(96px + var(--sb)); }
body.has-actionbar #view { padding-bottom: calc(108px + var(--sb)); }

/* ---------- Cabeceras ---------- */
.topbar, .navbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(14, 15, 18, 0.84);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
}
.topbar { padding: calc(var(--st) + 12px) 0 12px; margin-bottom: 4px; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; }
.title-row + .search { margin-top: 12px; }
.large { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.navbar {
  display: grid; grid-template-columns: 48px 1fr 48px; align-items: center;
  padding: calc(var(--st) + 6px) 8px 6px; margin-bottom: 8px;
}
.nav-back { width: 44px; height: 44px; display: grid; place-items: center; color: var(--accent); }
.nav-title { text-align: center; font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-right { display: flex; justify-content: flex-end; }

.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text); flex: none; }
.icon-btn.accent { background: var(--accent); color: var(--accent-ink); }

/* ---------- Barra de pestañas ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: none; justify-content: space-around;
  padding: 6px 8px calc(6px + var(--sb));
  background: rgba(20, 22, 27, 0.9);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--line);
}
body.has-tabbar .tabbar { display: flex; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0; font-size: 11px; font-weight: 600; color: var(--muted); }
.tab.on { color: var(--accent); }

.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 14px 16px calc(12px + var(--sb));
  background: linear-gradient(to top, var(--bg) 72%, rgba(14, 15, 18, 0));
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 20px; border-radius: 14px;
  font-weight: 700; font-size: 17px;
  background: var(--surface-2); color: var(--text);
  transition: transform 0.08s, opacity 0.08s;
}
.btn:active { transform: scale(0.98); opacity: 0.88; }
.btn:disabled { opacity: 0.5; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: var(--surface); border: 1px solid var(--line); }
.btn.danger { background: rgba(255, 92, 92, 0.12); color: var(--danger); }
.btn.danger.solid { background: var(--danger); color: #fff; }
.btn.block { width: 100%; }
.btn.sm { height: 40px; font-size: 15px; padding: 0 14px; border-radius: 12px; }
.link { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-weight: 600; font-size: 15px; }

/* ---------- Búsqueda y chips ---------- */
.search {
  display: flex; align-items: center; gap: 8px;
  margin: 0 16px; padding: 0 12px; height: 42px;
  background: var(--surface-2); border-radius: 12px; color: var(--muted);
}
.search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; font-size: 16px; color: var(--text); -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--muted); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; padding: 0; }
.chip {
  flex: none; padding: 7px 14px; border-radius: 999px; white-space: nowrap;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; font-weight: 500;
}
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }

/* ---------- Lista de máquinas ---------- */
.group-title { display: flex; align-items: baseline; gap: 8px; margin: 18px 20px 10px; font-size: 14px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.group-title span { opacity: 0.6; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 16px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.card:active { opacity: 0.85; }
.card-img { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 10px 12px 12px; }
.card-name { font-weight: 650; font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-last { margin-top: 5px; font-size: 14px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.card-when { font-size: 12px; color: var(--muted); margin-top: 2px; }

.ph { display: grid; place-items: center; width: 100%; height: 100%; font-weight: 800; font-size: 34px; letter-spacing: 0.02em; }
.ph.big { font-size: 72px; }
.mini { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; flex: none; overflow: hidden; }
.ph.mini { font-size: 16px; }

.empty { text-align: center; padding: 40px 28px; color: var(--muted); }
.empty h2 { color: var(--text); font-size: 22px; margin: 16px 0 8px; }
.empty p { margin-bottom: 24px; }
.empty-ic { width: 84px; height: 84px; margin: 0 auto; border-radius: 26px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.empty.small { padding: 28px 24px; }

.banner {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 4px 16px 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--accent-soft); border: 1px solid rgba(200, 245, 59, 0.28); font-size: 14px;
}
.banner .share { display: inline-block; vertical-align: -3px; color: var(--accent); }
.banner p { flex: 1; }
.banner .x { color: var(--muted); }

/* ---------- Detalle de máquina ---------- */
.hero { margin: 0 16px; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-2); }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m-head { padding: 16px 20px 4px; }
.m-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.tag { display: inline-block; margin-top: 8px; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; }
.note-box { margin: 12px 16px 0; padding: 12px 14px; border-radius: 14px; background: var(--surface); border-left: 3px solid var(--accent); white-space: pre-wrap; font-size: 15px; }
.note-k { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.note-box.compact { margin: 0 16px 12px; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px; }
.stat { min-width: 0; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .v small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.stat .s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.section-title { font-size: 20px; font-weight: 800; margin: 24px 20px 10px; }
.chart { margin: 0 16px; padding: 8px 4px 0; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.chart svg { width: 100%; height: auto; }
.chart text { font-size: 11px; fill: var(--muted); font-family: inherit; }
.chart .ch-max { fill: var(--accent); font-weight: 700; font-size: 12px; }
.chart .ch-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .ch-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.chart .ch-dot.top { fill: var(--accent); }
.chart .ch-stop { stop-color: var(--accent); }

.log-item { display: block; margin: 0 16px 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.log-item:active { opacity: 0.85; }
.log-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.log-date { font-weight: 700; }
.log-date span { color: var(--muted); font-weight: 500; font-size: 14px; }
.log-meta { color: var(--muted); font-size: 13px; }
.log-note { margin-top: 8px; color: var(--muted); font-size: 14px; white-space: pre-wrap; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pill { padding: 4px 9px; border-radius: 8px; background: var(--surface-2); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pill.top { color: var(--accent); }

/* ---------- Formularios ---------- */
.field { display: block; margin: 0 16px 18px; }
.label { display: block; margin: 0 4px 8px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.input {
  display: block; width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  font-size: 16px; outline: none; -webkit-appearance: none; appearance: none;
}
.input:focus { border-color: var(--accent); }
.input::placeholder { color: #6b717c; }
textarea.input { resize: vertical; line-height: 1.4; }
input[type="date"].input { text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }

.photo-pick {
  position: relative; display: grid; place-items: center; overflow: hidden;
  margin: 0 16px 12px; aspect-ratio: 4 / 3; border-radius: 22px;
  background: var(--surface); border: 2px dashed var(--line); color: var(--muted); text-align: center; cursor: pointer;
}
.photo-pick.has { border-style: solid; }
.photo-pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-pick .pp-ic { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 20px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.photo-pick b { display: block; color: var(--text); font-size: 17px; }
.photo-pick.busy::after { content: "Procesando foto…"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.6); color: #fff; font-weight: 700; }
.photo-actions { display: flex; gap: 10px; margin: 0 16px 20px; }
.photo-actions > * { flex: 1; }

/* ---------- Registro de series ---------- */
.log-machine { display: flex; align-items: center; gap: 12px; margin: 0 16px 12px; }
.lm-name { font-weight: 800; font-size: 19px; line-height: 1.2; }
.prev { margin: 0 16px 14px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px dashed var(--line); }
.prev-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 14px; font-weight: 600; }
.prev .pills { margin-top: 6px; }

.set { margin: 0 16px 10px; padding: 10px 12px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.set-head { display: flex; justify-content: space-between; align-items: center; min-height: 28px; margin-bottom: 8px; }
.set-n { font-weight: 800; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.set-del { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.set-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stepper { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; align-items: center; height: 64px; border-radius: 14px; background: var(--surface-2); }
.stepper button { height: 100%; font-size: 26px; font-weight: 500; color: var(--accent); }
.stepper button:active { background: rgba(255, 255, 255, 0.06); border-radius: 14px; }
.stepper .val { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.stepper input { width: 100%; padding: 0; background: none; border: 0; outline: 0; text-align: center; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stepper input::placeholder { color: #565c66; }
.stepper .u { margin-top: -2px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; }

/* ---------- Historial ---------- */
.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 16px 20px; }
.day { margin-bottom: 20px; }
.day-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 0 20px; margin-bottom: 8px; font-weight: 800; }
.day-head .muted { font-weight: 500; font-size: 13px; }
.h-item { display: flex; align-items: center; gap: 12px; margin: 0 16px 8px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.h-item:active { opacity: 0.85; }
.h-body { flex: 1; min-width: 0; }
.h-name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-sets { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.h-item > svg { color: var(--muted); }

/* ---------- Ajustes ---------- */
.group-label { margin: 0 20px 8px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.group { margin: 0 16px 8px; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.group-foot { margin: 0 20px 24px; font-size: 13px; color: var(--muted); }
.group + .group-label { margin-top: 24px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; }
.row:last-child { border-bottom: 0; }
.row > span { display: flex; align-items: center; gap: 10px; }
.row > svg { color: var(--muted); }
.row.danger-text { color: var(--danger); }
div.row { cursor: default; }
.seg { display: flex; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.seg button { min-width: 48px; height: 32px; padding: 0 10px; border-radius: 8px; font-weight: 700; font-size: 15px; color: var(--muted); }
.seg button.on { background: var(--bg); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); }
.foot { text-align: center; color: var(--muted); font-size: 13px; margin: 24px 0; }

/* ---------- Ventanas, visor y avisos ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0.55); animation: fade 0.15s ease-out; }
.sheet { width: 100%; max-width: 520px; padding: 22px 18px calc(18px + var(--sb)); border-radius: 24px 24px 0 0; background: var(--surface); animation: up 0.22s ease-out; }
.sheet h3 { font-size: 20px; margin-bottom: 6px; }
.sheet p { color: var(--muted); margin-bottom: 18px; }
.sheet-actions { display: grid; gap: 10px; }
.sheet-actions .btn { width: 100%; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0.4; } }

.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: #000; animation: fade 0.15s; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox .icon-btn { position: absolute; top: calc(var(--st) + 12px); right: 16px; background: rgba(255, 255, 255, 0.16); }

#toast {
  position: fixed; left: 50%; bottom: calc(110px + var(--sb)); z-index: 200;
  max-width: calc(100% - 32px); padding: 11px 18px; border-radius: 999px;
  background: #f4f5f7; color: #111; font-weight: 700; font-size: 15px; text-align: center;
  opacity: 0; transform: translate(-50%, 16px); transition: opacity 0.2s, transform 0.2s; pointer-events: none;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

.boot-error { padding: 80px 24px; text-align: center; color: var(--muted); }
.boot-error h2 { color: var(--text); margin-bottom: 8px; }

/* ---------- Cuentas (entrar / registrarse) ---------- */
.auth { max-width: 440px; margin: 0 auto; padding: calc(var(--st) + 40px) 20px 40px; text-align: center; }
.auth-logo { width: 84px; height: 84px; border-radius: 22px; margin: 0 auto 16px; display: block; }
.auth h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; }
.auth > p { margin: 0 auto 24px; max-width: 340px; }
.auth form { text-align: left; }
.auth .field { margin: 0 0 14px; }
.auth .banner { margin: 24px 0 0; text-align: left; }
.auth-seg { margin: 0 0 18px; }
.auth-seg button { flex: 1; height: 36px; }
.auth-error { min-height: 20px; margin: -4px 4px 10px; color: var(--danger); font-size: 14px; font-weight: 600; }
.btn.google { background: #fff; color: #1f1f1f; margin-bottom: 4px; }
.or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.link.center, .hint.center { display: flex; justify-content: center; margin: 16px auto 0; text-align: center; }

/* ---------- Gimnasio ---------- */
.sub { color: var(--muted); font-size: 15px; padding: 2px 16px 0; }
.sub + .search { margin-top: 12px; }
.stack { display: grid; gap: 10px; max-width: 320px; margin: 0 auto; }
.card-have { display: flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--accent); }
.code-box { margin: 12px 0 4px; padding: 16px; border-radius: 16px; background: var(--bg); border: 1px dashed var(--accent); text-align: center; font-size: 34px; font-weight: 800; letter-spacing: 0.2em; color: var(--accent); font-variant-numeric: tabular-nums; user-select: all; -webkit-user-select: all; }
.members { list-style: none; margin: 0 0 18px; padding: 0; max-height: 30vh; overflow: auto; }
.members li { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.members li:last-child { border-bottom: 0; }
.sheet .label { display: block; }
.lock { text-transform: none; letter-spacing: 0; font-weight: 600; opacity: 0.8; }
.small-hint { font-size: 13px; margin-top: -6px; }

/* ---------- Ranking del gimnasio ---------- */
.gym-seg { margin: 12px 16px 0; }
.gym-seg button, .rk-seg button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; }
.gym-seg + .search { margin-top: 10px; }
.rk-seg { margin: 0 16px 10px; }
.rk { margin: 0 16px; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.rk-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.rk-row:last-child { border-bottom: 0; }
.rk-row.me { background: var(--accent-soft); }
.rk-row.me .rk-who b { color: var(--accent); }
.rk-pos { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.rk-pos.p1, .medal.m1 { background: #f5c84b; color: #2a2000; }
.rk-pos.p2, .medal.m2 { background: #cfd6e0; color: #1d232b; }
.rk-pos.p3, .medal.m3 { background: #d99a62; color: #2a1606; }
.rk-ic { width: 28px; flex: none; display: grid; place-items: center; color: #f5c84b; }
.rk-who { flex: 1; min-width: 0; }
.rk-who b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-who small, .rk-mark small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-mark { flex: none; max-width: 52%; text-align: right; }
.rk-mark b { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rk-mark .up { color: var(--accent); }
.rk-mark .flame { color: #ff8a3d; }
.rk-note { margin: 10px 20px 0; font-size: 15px; color: var(--muted); }
.rk-note b { color: var(--text); }
.rk-foot { margin: 6px 20px 0; font-size: 12px; color: var(--muted); opacity: 0.8; }
.rk-empty { margin: 0 16px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px dashed var(--line); color: var(--muted); font-size: 15px; }
.rk-empty .link { display: flex; margin-top: 10px; text-align: left; }
.rk-cta { display: flex; align-items: center; gap: 12px; width: calc(100% - 32px); margin: 0 16px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: left; }
.rk-cta:active { opacity: 0.85; }
.rk-cta-ic { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--accent-soft); color: var(--accent); }
.rk-cta-txt { flex: 1; min-width: 0; font-size: 14px; color: var(--muted); }
.rk-cta-txt b { display: block; color: var(--text); font-size: 16px; }
.rk-cta > svg { color: var(--muted); }
.medal { position: absolute; top: 8px; left: 8px; display: flex; align-items: center; gap: 3px; padding: 3px 8px 3px 6px; border-radius: 999px; font-size: 12px; font-weight: 800; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
.perm { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.perm li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--text); }
.perm li svg { color: var(--accent); margin-top: 1px; }
.pick-list { max-height: 45vh; overflow: auto; margin: 0 0 14px; }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 2px; border-bottom: 1px solid var(--line); text-align: left; }
.pick:last-child { border-bottom: 0; }
.pick img, .pick .ph { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex: none; font-size: 15px; }
.pick span { min-width: 0; }
.pick b { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick small { display: block; color: var(--muted); font-size: 13px; }

/* ---------- Ajustes (cuenta y nube) ---------- */
.row-val { display: flex; align-items: center; gap: 4px; min-width: 0; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sync-status { font-size: 15px; }
.sync-status.warn { color: #ffb347; }
