:root {
  --bg: #000000;
  --card: #121215;
  --card2: #1c1c20;
  --line: #2c2c31;
  --text: #f2f2f7;
  --muted: #98989f;
  --accent: #0a6cff;
  --ok: #30d158;
  --warn: #ffd60a;
  --bad: #ff453a;
  --tap: 44px;
  --tap-lg: 52px;
  --wrap: 780px;

  --canvas: var(--bg);
  --surface: var(--card);
  --surface-2: var(--card2);
  --surface-3: #26262c;
  --separator: var(--line);
  --hairline: #34343a;
  --label: var(--text);
  --label-2: var(--muted);
  --label-3: #6a6a72;
  --on-accent: #ffffff;
  --accent-text: var(--accent);
  --ok-text: var(--ok);
  --warn-text: var(--warn);
  --bad-text: var(--bad);
  --scrim: rgba(0, 0, 0, 0.5);
  --material: color-mix(in srgb, var(--bg) 70%, transparent);
  --material-2: color-mix(in srgb, var(--card) 68%, transparent);
  --tint-strength: 16%;
  --e1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --e2: 0 10px 30px rgba(0, 0, 0, 0.42);
  --studio: #eef1f5;
  --studio-ink: #2f353f;

  --heat-0: var(--surface-3);
  --heat-1: color-mix(in srgb, var(--accent) 22%, var(--surface-3));
  --heat-2: color-mix(in srgb, var(--accent) 45%, var(--surface-3));
  --heat-3: color-mix(in srgb, var(--accent) 72%, var(--surface-3));
  --heat-4: var(--accent);

  --work: #ff5a5f;
  --work-soft: #ff9ea2;

  --gem-nada: var(--surface-3);
  --gem-bronce: #b06a2c;
  --gem-plata: #98a6b8;
  --gem-oro: #e0a81f;
  --gem-platino: #cfd9e6;
  --gem-diamante: #58b6ff;

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s8: 32px;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-full: 999px;

  --t-large: 34px;
  --t-title: 22px;
  --t-head: 17px;
  --t-body: 17px;
  --t-sub: 15px;
  --t-foot: 13px;
  --t-cap: 12px;

  --d-fast: 0.18s;
  --d-base: 0.28s;
  --d-slow: 0.42s;
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --navbar-h: 48px;
  --tabbar-h: 54px;
  --fab-rise: 18px;
  --fab-size: 56px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --canvas: #f2f2f7;
    --surface: #ffffff;
    --surface-2: #ececef;
    --surface-3: #e2e2e7;
    --separator: rgba(60, 60, 67, 0.28);
    --hairline: rgba(60, 60, 67, 0.2);
    --label: #1c1c1e;
    --label-2: #5c5c62;
    --label-3: #8a8a8f;
    --on-accent: #ffffff;
    --accent-text: #0b5ed7;
    --ok-text: #1b7a4b;
    --warn-text: #8a6200;
    --bad-text: #c0362f;
    --scrim: rgba(0, 0, 0, 0.3);
    --material: color-mix(in srgb, #f2f2f7 70%, transparent);
    --material-2: color-mix(in srgb, #ffffff 72%, transparent);
    --tint-strength: 12%;
    --e1: 0 1px 2px rgba(0, 0, 0, 0.07);
    --e2: 0 10px 30px rgba(0, 0, 0, 0.13);
    --gem-plata: #7f8c9e;
    --gem-platino: #8fa3bd;
    --gem-diamante: #2f8fe0;
    --work: #c0272f;
    --work-soft: #dd7f8a;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--canvas);
  color: var(--label);
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
}

body {
  font: var(--t-body)/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.01em;
  padding-bottom: calc(var(--tabbar-h) + var(--fab-rise) + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent;
}

button, a, label, summary, [role="tab"], [role="button"] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button, .seg, nav.tabs {
  -webkit-user-select: none;
  user-select: none;
}

img, svg { -webkit-touch-callout: none; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--s4);
}

header.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--material);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  padding: calc(var(--s2) + env(safe-area-inset-top)) 0 var(--s2);
  border-bottom: 0.5px solid transparent;
  transition: border-color var(--d-fast) var(--ease-out);
}

header.top .row { display: flex; align-items: center; gap: var(--s2); min-height: var(--navbar-h); }

header.top .nav-title {
  font-size: var(--t-head);
  font-weight: 600;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--d-base) var(--ease-out), transform var(--d-base) var(--ease-out);
}

header.top.collapsed { border-bottom-color: var(--hairline); }
header.top.collapsed .nav-title { opacity: 1; transform: none; }

.sentinel { height: 1px; margin-top: calc(var(--s1) * -1); }

.large-title {
  font-size: var(--t-large);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: var(--s3) 0 var(--s1);
}

h1 { font-size: var(--t-title); margin: 0; letter-spacing: -0.02em; }
h2 { font-size: var(--t-title); margin: var(--s6) 0 var(--s3); letter-spacing: -0.02em; font-weight: 700; }
h3 { font-size: var(--t-head); margin: 0 0 var(--s1); letter-spacing: -0.01em; font-weight: 600; }

.date { color: var(--label-2); font-size: var(--t-sub); }

.section-head {
  font-size: var(--t-foot);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--label-2);
  margin: var(--s6) 0 var(--s2);
  padding: 0 var(--s1);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  padding: 4px 10px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--label-2);
  font-size: var(--t-cap);
  font-weight: 500;
  white-space: nowrap;
}

.chip.ok { color: var(--ok-text); background: color-mix(in srgb, var(--ok) var(--tint-strength), var(--surface)); }
.chip.warn { color: var(--warn-text); background: color-mix(in srgb, var(--warn) var(--tint-strength), var(--surface)); }
.chip.bad { color: var(--bad-text); background: color-mix(in srgb, var(--bad) var(--tint-strength), var(--surface)); }
.chip.accent { color: var(--accent-text); background: color-mix(in srgb, var(--accent) var(--tint-strength), var(--surface)); }
.chip.solid { background: var(--accent); color: var(--on-accent); font-weight: 600; }

.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--s4);
  margin: var(--s3) 0;
  box-shadow: var(--e1);
}

.list {
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--e1);
  overflow: hidden;
  margin: var(--s3) 0;
}

.list-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  min-height: var(--tap);
  padding: var(--s3) var(--s4);
  background: none;
  border: 0;
  border-radius: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
}

.list-row + .list-row::before {
  content: "";
  position: absolute;
  left: var(--s4);
  right: 0;
  top: 0;
  height: 0.5px;
  background: var(--separator);
}

.list-row[aria-disabled="true"] { opacity: 0.5; }

button.list-row:active, a.list-row:active { background: var(--surface-2); transform: none; }

.list-row .chev { flex: 0 0 auto; width: 8px; height: 13px; color: var(--label-3); }
.chev svg { width: 100%; height: 100%; display: block; }

.muted { color: var(--label-2); }
.small { font-size: var(--t-sub); }
.tiny { font-size: var(--t-cap); }
.right { margin-left: auto; }
.row { display: flex; align-items: center; gap: var(--s2); }
.row.wrapped { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: var(--s2); }
.grow { flex: 1 1 auto; min-width: 0; }
.sep { height: 0.5px; background: var(--separator); margin: var(--s4) 0; border: 0; }
.num { font-variant-numeric: tabular-nums; }

button, .btn {
  min-height: var(--tap);
  padding: var(--s3) var(--s4);
  border-radius: var(--r-md);
  border: 0;
  background: var(--surface-2);
  color: var(--label);
  font: inherit;
  font-size: var(--t-sub);
  font-weight: 500;
  cursor: pointer;
  transition: transform var(--d-fast) var(--ease-out), opacity var(--d-fast) var(--ease-out);
}

button:active, .btn:active { transform: scale(0.97); opacity: 0.82; }
button[disabled] { opacity: 0.35; cursor: default; }
button[disabled]:active { transform: none; opacity: 0.35; }

button.primary {
  min-height: var(--tap-lg);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: var(--t-head);
}

button.ghost { background: transparent; color: var(--accent-text); }
button.danger { background: transparent; color: var(--bad-text); }
button.sm { min-height: var(--tap); padding: var(--s2) var(--s3); font-size: var(--t-foot); }

button.big {
  width: 100%;
  min-height: 56px;
  font-size: var(--t-head);
  font-weight: 600;
  border-radius: var(--r-lg);
}

input, select, textarea {
  min-height: var(--tap);
  width: 100%;
  padding: var(--s3);
  border-radius: var(--r-md);
  border: 0;
  background: var(--surface-2);
  color: var(--label);
  font: inherit;
  font-size: 16px;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: var(--s8);
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 54%, calc(100% - 12px) 54%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

input::placeholder, textarea::placeholder { color: var(--label-3); }

input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

label { display: block; font-size: var(--t-cap); color: var(--label-2); margin-bottom: var(--s1); font-weight: 500; }
.field { flex: 1 1 110px; min-width: 0; }

.days {
  display: flex;
  gap: var(--s2);
  overflow-x: auto;
  padding: var(--s1) 0 var(--s2);
  scrollbar-width: none;
}

.days::-webkit-scrollbar { display: none; }
.days button { min-width: 46px; min-height: var(--tap); padding: var(--s2) var(--s1); flex: 0 0 auto; font-size: var(--t-foot); }
.days button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }

.bar {
  height: 6px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  overflow: hidden;
}

.bar > i {
  display: block;
  height: 100%;
  border-radius: var(--r-full);
  background: var(--accent);
  transition: width var(--d-base) var(--ease-out);
}

.grid {
  display: grid;
  gap: var(--s3);
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

nav.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  background: var(--material-2);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 0.5px solid var(--hairline);
  padding-bottom: env(safe-area-inset-bottom);
}

nav.tabs a {
  flex: 1;
  min-height: var(--tabbar-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: var(--s1) var(--s1);
  color: var(--label-2);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  transition: color var(--d-fast) var(--ease-out);
}

nav.tabs a[aria-current="page"] { color: var(--accent-text); }
nav.tabs a svg { width: 25px; height: 25px; }
nav.tabs a .fill { opacity: 0; transition: opacity var(--d-fast) var(--ease-out); }
nav.tabs a[aria-current="page"] .fill { opacity: 1; }
nav.tabs a[aria-current="page"] .line { opacity: 0; }
nav.tabs a:active { opacity: 0.6; }

nav.tabs a.fab {
  flex: 0 0 var(--fab-size);
  align-self: flex-start;
  width: var(--fab-size);
  height: var(--fab-size);
  min-height: 0;
  margin: calc(var(--fab-rise) * -1) var(--s2) 0;
  padding: 0;
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: transform var(--d-fast) var(--ease-out);
}

nav.tabs a.fab svg { width: 28px; height: 28px; }
nav.tabs a.fab[aria-current="page"] { color: var(--on-accent); }
nav.tabs a.fab:active { transform: scale(0.93); opacity: 1; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.seg {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  padding: 2px;
  margin: var(--s3) 0;
  isolation: isolate;
}

.seg button {
  position: relative;
  z-index: 1;
  min-height: 38px;
  padding: 0 var(--s1);
  background: none;
  box-shadow: none;
  border-radius: 7px;
  font-size: var(--t-foot);
  font-weight: 500;
  color: var(--label);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seg button:active { transform: none; opacity: 0.6; }
.seg button[aria-selected="true"] { font-weight: 600; }

.seg-thumb {
  position: absolute;
  z-index: 0;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc((100% - 4px) / var(--n, 2));
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--e1);
  transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform var(--d-base) var(--ease-spring);
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: transparent;
  transition: background var(--d-base) var(--ease-out);
}

.sheet.in { background: var(--scrim); }
.sheet.closing { pointer-events: none; }

.sheet-card {
  width: 100%;
  max-width: var(--wrap);
  max-height: 88dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: var(--s2) var(--s4) calc(var(--s5) + env(safe-area-inset-bottom));
  box-shadow: var(--e2);
  transform: translate3d(0, 100%, 0);
  transition: transform var(--d-slow) var(--ease-spring);
  touch-action: pan-y;
  will-change: transform;
}

.sheet.in .sheet-card { transform: translate3d(0, 0, 0); }
.sheet-card.dragging { transition: none; }
.sheet-card:focus { outline: none; }

.grabber {
  width: 36px;
  height: 5px;
  border-radius: var(--r-full);
  background: var(--separator);
  margin: var(--s1) auto var(--s3);
  flex: 0 0 auto;
  cursor: grab;
}

.notice.warn { background: color-mix(in srgb, var(--warn) var(--tint-strength), var(--surface)); color: var(--warn-text); }
.notice.bad { background: color-mix(in srgb, var(--bad) var(--tint-strength), var(--surface)); color: var(--bad-text); }
.notice.ok { background: color-mix(in srgb, var(--ok) var(--tint-strength), var(--surface)); color: var(--ok-text); }

.stage {
  position: relative;
  background: var(--studio);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  max-height: 360px;
  box-shadow: inset 0 0 0 0.5px var(--hairline);
}

.stage img, .stage svg { width: 100%; height: 100%; object-fit: contain; display: block; }

input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  min-height: 0;
  height: 28px;
  padding: 0;
  background: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: var(--r-full);
  background: var(--surface-2);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--e1), 0 0 0 0.5px var(--hairline);
}

input[type="range"]::-moz-range-track { height: 4px; border-radius: var(--r-full); background: var(--surface-2); }
input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; border: 0; border-radius: 50%; background: #fff; box-shadow: var(--e1); }

table { width: 100%; border-collapse: collapse; font-size: var(--t-foot); }
th, td { text-align: left; padding: var(--s2) var(--s3); border-bottom: 0.5px solid var(--separator); overflow-wrap: anywhere; }
th { color: var(--label-2); font-weight: 600; font-size: var(--t-cap); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.metrics {
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--e1);
  overflow: hidden;
  margin: var(--s3) 0;
}

.mhead { display: none; }

.mrow {
  position: relative;
  display: grid;
  gap: var(--s1) var(--s3);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: var(--s3) var(--s4);
}

.mrow + .mrow::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--s4);
  right: 0;
  height: 0.5px;
  background: var(--separator);
}

.mname { grid-column: 1 / -1; font-size: var(--t-sub); font-weight: 600; }
.mcell { font-size: var(--t-foot); color: var(--label-2); font-variant-numeric: tabular-nums; }
.mcell::before { content: attr(data-k) " "; color: var(--label-2); }

@media (min-width: 700px) {
  .mhead { display: grid; }
  .mhead .mcell { color: var(--label-2); font-weight: 600; }
  .mrow { grid-template-columns: minmax(0, 1.7fr) repeat(6, minmax(0, 1fr)); align-items: center; }
  .mname { grid-column: auto; }
  .mcell { text-align: right; }
  .mcell::before { content: none; }
}

a { color: var(--accent-text); }

@property --p { syntax: "<number>"; inherits: false; initial-value: 1; }

.viewer-controls { display: flex; flex-direction: column; gap: var(--s2); }
.viewer-controls .seg { margin: var(--s2) 0 0; }

.transport { gap: var(--s3); margin-top: var(--s1); }

.icon-btn {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: var(--tap);
  min-height: var(--tap);
  padding: 0;
  border-radius: var(--r-full);
  background: var(--surface-2);
}

.icon-btn svg { width: 20px; height: 20px; display: block; }

.centred { text-align: center; }

.flush-top { margin-top: 0; }

.chip-toggle {
  min-height: 38px;
  padding: 0 var(--s4);
  border: 0;
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--label-2);
  font: inherit;
  font-size: var(--t-foot);
  font-weight: 500;
}

.chip-toggle[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }

.tilerow { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); margin: var(--s3) 0; }

.tile { background: var(--surface); border-radius: var(--r-md); padding: var(--s3); box-shadow: var(--e1); }
.tile b { display: block; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tile span { display: block; margin-top: 2px; font-size: var(--t-cap); color: var(--label-2); }

.full { width: 100%; }

.section-head { display: flex; align-items: baseline; gap: var(--s2); }

.empty { display: flex; flex-direction: column; align-items: center; gap: var(--s3); padding: var(--s8) var(--s4); text-align: center; }
.empty p { margin: 0; color: var(--label-2); font-size: var(--t-sub); }

.empty-ic {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--label-3);
}

.empty-ic svg { width: 26px; height: 26px; }

a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; background: var(--surface-2); color: var(--accent-text); font-weight: 600; }

.steps { display: flex; flex-direction: column; gap: var(--s3); }

.step { display: flex; gap: var(--s3); align-items: flex-start; }

.step b {
  flex: 0 0 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--t-foot);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.step p { margin: 2px 0 0; font-size: var(--t-sub); line-height: 1.4; }

.thumb {
  flex: 0 0 52px;
  width: 52px;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-sm);
  background: var(--studio);
  object-fit: contain;
}

.find { color: var(--label-2); font-size: var(--t-sub); margin: var(--s1) 0 0; }
.find b { color: var(--label); font-weight: 600; }

.exbar {
  position: sticky;
  top: var(--navbar-h);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) 0;
  background: var(--canvas);
}

.linkish {
  background: none;
  color: var(--accent-text);
  font-weight: 600;
  padding: 0 var(--s2);
  min-height: var(--tap);
}

.stage-pill {
  position: absolute;
  right: var(--s3);
  bottom: var(--s3);
  display: flex;
  align-items: center;
  gap: var(--s1);
  width: auto;
  min-height: 40px;
  padding: 0 var(--s4) 0 var(--s3);
  border-radius: var(--r-full);
  background: var(--material-2);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  color: var(--label);
  font-size: var(--t-foot);
  font-weight: 600;
  box-shadow: var(--e1);
}

.stage-pill .ic { display: block; width: 16px; height: 16px; }
.stage-pill svg { width: 100%; height: 100%; display: block; }

.exrail {
  display: flex;
  gap: var(--s3);
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  padding: var(--s3) var(--s4);
  margin: 0 calc(var(--s4) * -1);
}

.exrail::-webkit-scrollbar { display: none; }

.rail-item {
  position: relative;
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  min-height: 60px;
  padding: 0;
  border-radius: var(--r-full);
  background: var(--surface-2);
  scroll-snap-align: center;
  overflow: visible;
}

.rail-item .thumb {
  width: 54px;
  height: 54px;
  margin: 3px;
  border-radius: var(--r-full);
  object-fit: cover;
}

.rail-blank {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 3px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  color: var(--label-2);
  font-size: var(--t-foot);
  font-weight: 600;
}

.rail-dial {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from -90deg, var(--accent) calc(var(--p, 0) * 1turn), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(50% - 3px), #000 calc(50% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(50% - 3px), #000 calc(50% - 2px));
  transition: --p var(--d-base) linear;
}

.rail-item.is-now { box-shadow: 0 0 0 2px var(--accent); }
.rail-item.is-done .thumb, .rail-item.is-done .rail-blank { opacity: 0.4; }

.rail-tick {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: var(--r-full);
  background: var(--ok);
  color: var(--canvas);
}

.rail-tick svg { width: 13px; height: 13px; display: block; }

.rail-add {
  display: grid;
  place-items: center;
  color: var(--label-2);
  font-size: var(--t-title);
  background: none;
  border: 1.5px dashed var(--separator);
  text-decoration: none;
}

.exsheet {
  margin: 0 calc(var(--s4) * -1);
  padding: var(--s4) var(--s4) var(--s5);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--surface);
  box-shadow: var(--e2);
}

.sets-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0 6px;
  margin: var(--s3) 0 var(--s2);
}

.sets-table th {
  padding: 0 var(--s2) var(--s1);
  font-size: var(--t-cap);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--label-3);
  text-align: left;
}

.sets-table td {
  padding: var(--s1) var(--s2);
  font-size: var(--t-sub);
  font-variant-numeric: tabular-nums;
  background: var(--surface-2);
}

.sets-table td:first-child { border-radius: var(--r-md) 0 0 var(--r-md); }
.sets-table td:last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }
.sets-table .n { width: 44px; text-align: center; }
.sets-table .k, .sets-table .r { width: 74px; text-align: right; }
.sets-table .t { width: 52px; padding: 0; }
.sets-table th.t, .sets-table th.n { text-align: center; }
.sets-table th.k, .sets-table th.r { text-align: right; }
.sets-table .p { color: var(--label-2); font-size: var(--t-foot); }
.sets-table .pending { color: var(--label-3); }

.sets-table tr.is-active td { background: var(--accent); color: var(--on-accent); }
.sets-table tr.is-active .p { color: color-mix(in srgb, var(--on-accent) 75%, transparent); }
.sets-table tr.is-done td { background: var(--surface-2); color: var(--label-2); }

.sets-table input {
  width: 100%;
  min-height: 38px;
  padding: 0 var(--s2);
  border: 0;
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--on-accent) 18%, transparent);
  color: inherit;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.sets-table input::placeholder { color: color-mix(in srgb, var(--on-accent) 55%, transparent); }
.sets-table input::-webkit-inner-spin-button,
.sets-table input::-webkit-outer-spin-button { appearance: none; -webkit-appearance: none; margin: 0; }

.tick {
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  min-height: var(--tap);
  padding: 0;
  background: none;
  color: var(--label-3);
}

.tick span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r-full);
  border: 2px solid currentColor;
}

.tick svg { width: 15px; height: 15px; display: block; }
.tick[disabled] { opacity: 0.35; }
tr.is-done .tick { color: var(--ok); }
tr.is-active .tick { color: var(--on-accent); }
tr.is-active .tick span { background: var(--on-accent); color: var(--accent); }

.margins { gap: var(--s2); margin-bottom: var(--s3); }
.bad-text { color: var(--bad-text); }

.rest-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--tabbar-h) + var(--fab-rise) + env(safe-area-inset-bottom));
  z-index: 25;
  padding: var(--s2) var(--s4) var(--s3);
  background: var(--material-2);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-top: 0.5px solid var(--hairline);
}

.rest-bar .bar { margin-bottom: var(--s2); }
.rest-bar .row { gap: var(--s2); }

.rest-bar b {
  font-size: var(--t-head);
  font-variant-numeric: tabular-nums;
  color: var(--accent-text);
  min-width: 48px;
}

.tierrow {
  display: flex;
  gap: var(--s2);
  overflow-x: auto;
  scrollbar-width: none;
  padding: var(--s2) 0 var(--s3);
  margin: 0 calc(var(--s4) * -1);
  padding-left: var(--s4);
  padding-right: var(--s4);
}

.tierrow::-webkit-scrollbar { display: none; }

.tier {
  flex: 0 0 auto;
  width: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  opacity: 0.45;
  transition: opacity var(--d-base) var(--ease-out);
}

.tier.is-on { opacity: 1; }
.tier b { font-size: var(--t-foot); font-variant-numeric: tabular-nums; }
.tier span { font-size: 10px; color: var(--label-2); text-align: center; }

.gem { display: block; width: 32px; height: 32px; }
.gem svg { width: 100%; height: 100%; display: block; }
.gem.sm { width: 26px; height: 26px; }
.tier.is-on .gem { transform: scale(1.14); }
.gem-nada { color: var(--gem-nada); }
.gem-bronce { color: var(--gem-bronce); }
.gem-plata { color: var(--gem-plata); }
.gem-oro { color: var(--gem-oro); }
.gem-platino { color: var(--gem-platino); }
.gem-diamante { color: var(--gem-diamante); }

.body-map {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--s3) var(--s4) var(--s4);
  box-shadow: var(--e1);
}

.body-host {
  color: var(--label-3);
  display: flex;
  justify-content: center;
}

.body-host svg { width: 100%; max-width: 280px; height: auto; display: block; }
.body-host[data-view="front"] .view-back { display: none; }
.body-host[data-view="back"] .view-front { display: none; }

.region {
  fill: var(--heat-0);
  stroke: var(--canvas);
  stroke-width: 1;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill var(--d-base) var(--ease-out);
}

.region.h1 { fill: var(--heat-1); }
.region.h2 { fill: var(--heat-2); }
.region.h3 { fill: var(--heat-3); }
.region.h4 { fill: var(--heat-4); }
.region.is-sel { stroke: var(--label); stroke-width: 2.2; }
.region.work-0 { fill: var(--heat-0); }
.region.work-p { fill: var(--work); }
.region.work-s { fill: var(--work-soft); }

.worked {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin: var(--s3) 0;
  padding: var(--s3);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.worked-pair { display: flex; gap: var(--s2); flex: 0 0 auto; }

.mini-body {
  width: 64px;
  pointer-events: none;
  color: var(--label-3);
}

.mini-body svg { width: 64px; max-width: none; height: auto; display: block; }
.mini-body .region { cursor: default; stroke: var(--surface-2); stroke-width: 1.6; }

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: var(--s2);
  border-radius: var(--r-full);
  vertical-align: baseline;
}

.dot.work-p { background: var(--work); }
.dot.work-s { background: var(--work-soft); }
.top-gap-1 { margin-top: var(--s1); }

.pct {
  font-size: var(--t-sub);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--label-2);
}

.list-row[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) var(--tint-strength), var(--surface)); }
.list-row .bar { margin-top: var(--s1); }

@media (prefers-reduced-motion: reduce) {
  :root { --d-fast: 0.01ms; --d-base: 0.01ms; --d-slow: 0.01ms; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (min-width: 560px) {
  :root { --t-large: 40px; }
  .wrap { padding: 0 var(--s5); }
  .card { padding: var(--s5); }
}
