/* Shared phone targets. Higher specificity than the bundled rules. */
html .gx .gx-check {
  width: 48px;
  height: 48px;
}
html .gx .gx-set,
html .gx .gx-setheads {
  grid-template-columns: 46px minmax(0, 1fr) minmax(0, 1fr) 56px;
}
html .gx .gx-set .gx-input {
  min-height: 48px;
  font-size: 16px;
}
html .gx .gx-tabbar button {
  min-height: 48px;
  font-size: 10px;
  padding: 4px 0;
  min-width: 0;
}
html .gx .gx-tabbar {
  padding-bottom: env(safe-area-inset-bottom);
}
html .gx .gx-btn {
  min-height: 44px;
}
html .gx details.gx-install {
  display: block;
  padding: 0;
  margin-bottom: 12px;
}
html .gx details.gx-install summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
}
html .gx details.gx-install div {
  padding: 0 12px 12px;
  font-size: 14px;
  line-height: 1.4;
}

#ui-choose[hidden] {
  display: none;
}
#ui-choose:not([hidden]) {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  background: #101418;
  border-bottom: 1px solid #2b3541;
}
#ui-choose a {
  color: #e7ebf0;
  font: 600 13px/1 system-ui, sans-serif;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #3a4654;
  border-radius: 6px;
}

/* Option A: the same dark gym screen, one gold accent. */
html[data-ui="a"] .gx {
  --ai: #b7aa86;
  --aiDim: #5c5340;
  --signal: #f2b705;
  --signalDim: #8a6a04;
}
html[data-ui="a"] .gx-tag.ai,
html[data-ui="a"] .gx-btn.ai,
html[data-ui="a"] .gx-mealslot,
html[data-ui="a"] .gx-aiinlbl {
  color: var(--muted);
  border-color: var(--line2);
}
html[data-ui="a"] .gx-btn.ai {
  color: var(--text);
}
html[data-ui="a"] .gx-h2 {
  font-size: 30px;
}
html[data-ui="a"] .gx-gauge {
  padding: 12px 14px 10px;
}
html[data-ui="a"] .gx-gaugenum {
  font-size: 34px;
}
html[data-ui="a"] .gx-bar {
  height: 10px;
}
html[data-ui="a"] .gx-msg.me {
  background: var(--signal);
  color: #1a1401;
}

/* Option B: calmer neutral field, one cyan accent, logger first. */
html[data-ui="b"],
html[data-ui="b"] body {
  background: #121416;
}
html[data-ui="b"] .gx {
  --ink: #121416;
  --panel: #1b2126;
  --panel2: #232b31;
  --line: #313b43;
  --line2: #44515b;
  --text: #e7eeef;
  --muted: #a9b7bd;
  --dim: #7e8e96;
  --signal: #8fd0c6;
  --signalDim: #3f6d66;
  --ai: #8fd0c6;
  --aiDim: #3f6d66;
  --go: #8fd0c6;
  background: var(--ink);
  color: var(--text);
}
html[data-ui="b"] .gx-btn.pri,
html[data-ui="b"] .gx-msg.me,
html[data-ui="b"] .gx-day.sel {
  background: var(--signal);
  border-color: var(--signal);
  color: #10211f;
}
html[data-ui="b"] .gx-check.on {
  background: var(--signal);
  border-color: var(--signal);
  color: #10211f;
}
html[data-ui="b"] .gx-tabbar button.on,
html[data-ui="b"] .gx-navbtn.on {
  color: var(--signal);
}
html[data-ui="b"] .gx-barfill,
html[data-ui="b"] .gx-stickybar i,
html[data-ui="b"] .gx-daybar {
  background: var(--signal);
}
html[data-ui="b"] .gx-h2 {
  font-size: 28px;
}
html[data-ui="b"] .gx-panel:has(.gx-gauge) {
  display: flex;
  flex-direction: column;
}
html[data-ui="b"] .gx-panel:has(.gx-gauge) .gx-pbody {
  order: 1;
}
html[data-ui="b"] .gx-panel:has(.gx-gauge) .gx-phead {
  order: 2;
}
html[data-ui="b"] .gx-panel:has(.gx-gauge) .gx-gauge {
  order: 3;
  padding: 10px 12px;
  background: transparent;
}
html[data-ui="b"] .gx-gaugenum {
  font-size: 26px;
}
html[data-ui="b"] .gx-bar,
html[data-ui="b"] .gx-ticks {
  display: none;
}
html[data-ui="b"] .gx-exname {
  font-size: 22px;
}
html[data-ui="b"] .gx-tag.ai {
  color: var(--muted);
  border-color: var(--line);
}
.gx-geargrid { display: flex; flex-wrap: wrap; gap: 8px; }
.gx-geartog { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; }
.gx-clock { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 13px 12px; }
.gx-exline, .gx-exmeta { white-space: normal; }
.gx-swap { padding: 8px 0; border-top: 1px solid var(--line); }
.gx-swap strong { display: block; font-size: 13px; }

#ironlog-gate {
  --ink: #121416;
  --panel: #1b2126;
  --panel2: #232b31;
  --line: #313b43;
  --line2: #44515b;
  --text: #e7eeef;
  --muted: #a9b7bd;
  --dim: #7e8e96;
  --signal: #8fd0c6;
  --stop: #e05b49;
  --disp: "Avenir Next Condensed", "HelveticaNeue-CondensedBold", "Arial Narrow", system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  position: fixed;
  inset: 0;
  z-index: 40;
  overflow: auto;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  padding:
    max(24px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(28px, calc(16px + env(safe-area-inset-bottom)))
    max(16px, env(safe-area-inset-left));
  -webkit-font-smoothing: antialiased;
}
#ironlog-gate .torre-auth {
  max-width: 28rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100%;
}
#ironlog-gate .torre-word {
  margin: 8px 0 0;
  font-family: var(--disp);
  font-size: 56px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 0.9;
}
#ironlog-gate .torre-word span { color: var(--signal); }
#ironlog-gate .torre-tag {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.35;
}
#ironlog-gate .torre-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}
#ironlog-gate form,
#ironlog-gate .torre-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#ironlog-gate h2 {
  margin: 0;
  font-family: var(--disp);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 0.98;
}
#ironlog-gate label {
  display: block;
  margin: 0;
}
#ironlog-gate .gx-label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
#ironlog-gate input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  font-family: var(--body);
  font-size: 16px;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--text);
}
#ironlog-gate input:focus { outline: none; border-color: var(--signal); }
#ironlog-gate-error:empty { display: none; }
#ironlog-gate-error { margin: 0; color: #f0b4a8; font-size: 15px; }
#ironlog-gate .gx-btn {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 15px;
  border-radius: 6px;
  border: 1px solid var(--line2);
  background: var(--panel2);
  color: var(--text);
  font-family: var(--disp);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
#ironlog-gate .gx-btn.pri { background: var(--signal); border-color: var(--signal); color: #10211f; }
#ironlog-gate .gx-btn.link {
  width: auto;
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--signal);
  letter-spacing: 0.04em;
  text-transform: none;
  font-family: var(--body);
  font-size: 16px;
  font-weight: 600;
}
#ironlog-gate .torre-links { display: flex; justify-content: space-between; gap: 12px; }
#ironlog-gate .apple-btn {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #000;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.022em;
}
#ironlog-gate .apple-btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
#ironlog-gate .google-btn {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: 4px;
  border: 1px solid #8e918f;
  background: #131314;
  color: #e3e3e3;
  font-family: Roboto, Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
#ironlog-gate .google-btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
#ironlog-gate .torre-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
#ironlog-gate .torre-or::before,
#ironlog-gate .torre-or::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}
#ironlog-gate [data-for] { display: none; }
#ironlog-gate [hidden],
#ironlog-gate .gx-btn[hidden] { display: none !important; }
#ironlog-gate[data-mode="signin"] [data-for~="signin"],
#ironlog-gate[data-mode="create"] [data-for~="create"],
#ironlog-gate[data-mode="forgot"] [data-for~="forgot"],
#ironlog-gate[data-mode="sent"] [data-for~="sent"] { display: flex; }
#ironlog-gate[data-mode="signin"] label[data-for~="signin"],
#ironlog-gate[data-mode="create"] label[data-for~="create"],
#ironlog-gate[data-mode="forgot"] label[data-for~="forgot"] { display: block; }
#ironlog-gate label[hidden] { display: none; }
#ironlog-gate[hidden],
#ironlog-authbar[hidden] { display: none; }
#ironlog-authbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: max(8px, env(safe-area-inset-top)) 12px 8px;
  background: #1b2126;
  color: #e7eeef;
  border-bottom: 1px solid #313b43;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
}
#ironlog-authbar p { margin: 0; font-size: 14px; line-height: 1.35; color: #a9b7bd; }
#ironlog-authbar button {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #8fd0c6;
  background: #8fd0c6;
  color: #10211f;
  white-space: nowrap;
  font-family: "Avenir Next Condensed", "Arial Narrow", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
#root[hidden] { display: none; }

.il-stack { display: flex; flex-direction: column; gap: 14px; }
.il-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.il-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.il-input, .il-sheet select, .il-sheet textarea {
  min-height: 48px;
  font-size: 16px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--text);
  width: 100%;
  box-sizing: border-box;
}
.il-targets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.il-targets div { background: var(--panel2); border-radius: 10px; padding: 10px 12px; }
.il-targets strong { display: block; font-size: 22px; }
.il-targets span, .il-formula, .il-count { color: var(--muted); font-size: 13px; }
.il-formula { margin: 0; line-height: 1.4; }
.il-btn, .il-sheet button {
  min-height: 44px;
  font-size: 16px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--text);
}
.il-btn.sm { min-height: 36px; font-size: 14px; }
.il-btn.pri, .il-sheet button.pri { background: var(--signal); color: #10211f; border-color: var(--signal); }
.il-gear details { border-top: 1px solid var(--line); padding: 8px 0; }
.il-gear summary { min-height: 44px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: 16px; }
.il-groupbar, .il-actions, .il-composer { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.il-items { display: flex; flex-wrap: wrap; gap: 8px; }
.il-starters { display: flex; flex-direction: column; gap: 8px; }
.il-starters .il-btn, .il-empty { text-align: left; white-space: normal; }
.il-empty { text-align: left; }
.il-context { text-align: left; margin: 0 0 12px; padding-left: 18px; }
.il-thread { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.il-me, .il-them { margin: 0; padding: 10px 12px; border-radius: 10px; max-width: 92%; }
.il-me { align-self: flex-end; background: var(--signal); color: #10211f; }
.il-them { align-self: flex-start; background: var(--panel2); }
.il-composer { padding: 12px; border-top: 1px solid var(--line); }
.il-composer .il-input { flex: 1; }
html[data-ui="b"] .il-progress { gap: 12px; }
html[data-ui="b"] .il-progress .gx-stats3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
html[data-ui="b"] .il-progress .gx-stat {
  min-width: 0;
  margin: 0;
  padding: 12px 8px;
  text-align: center;
  background: #1b2126;
  border: 1px solid #313b43;
  border-radius: 14px;
}
html[data-ui="b"] .il-progress .gx-statnum {
  font-size: 22px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-ui="b"] .il-progress .gx-statlbl {
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #a9b7bd;
  line-height: 1.2;
}
html[data-ui="b"] .il-bars {
  height: 168px;
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 12px 10px 8px;
  background: #121416;
  border: 1px solid #313b43;
  border-radius: 12px;
  overflow: hidden;
}
html[data-ui="b"] .il-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
html[data-ui="b"] .il-track {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
html[data-ui="b"] .il-track .il-bar {
  width: 70%;
  max-width: 28px;
  min-height: 4px;
  background: #8fd0c6;
  border-radius: 6px 6px 0 0;
}
html[data-ui="b"] .il-col > span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #a9b7bd;
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
html[data-ui="b"] .il-sess {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #313b43;
}
html[data-ui="b"] .il-sess:first-child { border-top: 0; padding-top: 0; }
html[data-ui="b"] .il-sess strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
html[data-ui="b"] .il-sess em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  color: #a9b7bd;
  font-size: 13px;
}
html[data-ui="b"] .il-sess-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 8px;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: #e7eeef;
}
.il-error { color: #f0b4a8; }
.il-kicker { letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; color: var(--signal); }
.il-banner { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); font-size: 16px; }
.il-modal {
  --signal: #8fd0c6;
  --text: #e7eeef;
  --muted: #a9b7bd;
  --panel: #1b2126;
  --panel2: #232b31;
  --line: #313b43;
  position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center;
}
.il-sheet { width: min(520px, 100%); max-height: 92dvh; overflow: auto; background: var(--panel, #1b2126); color: var(--text, #e7eeef); border-radius: 16px 16px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.il-sheet h2 { margin: 0; font-size: 28px; }
.il-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.il-check { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--line, #313b43); border-radius: 999px; }
@media (max-width: 820px) {
  .il-grid { grid-template-columns: 1fr; }
}

.il-cta { width: 100%; margin: 0 0 12px; }
.il-rest {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 13px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #1b2126;
  border: 1px solid #8fd0c6;
}
.il-rest strong { font-size: 22px; letter-spacing: 0.02em; color: #8fd0c6; flex: 1; }
.il-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.il-badge {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #313b43;
  color: #7e8e96;
  font-size: 14px;
}
.il-badge.on { color: #10211f; background: #8fd0c6; border-color: #8fd0c6; }
.il-celebrate {
  width: 100%;
  text-align: left;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: #8fd0c6;
  color: #10211f;
  font-size: 16px;
  padding: 12px 14px;
}
html[data-ui="b"] .gx-panel { border-radius: 14px; }
html[data-ui="b"] .gx-btn, html[data-ui="b"] .il-btn { transition: transform .12s ease, background .12s ease; }
@media (prefers-reduced-motion: reduce) {
  html[data-ui="b"] .gx-btn, html[data-ui="b"] .il-btn, .il-page { transition: none; animation: none; }
}
.il-page { animation: il-in .18s ease; }
@keyframes il-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.il-hello { margin: 0; font-size: 28px; font-weight: 700; }
.il-phrase { margin: 0; color: var(--muted, #a9b7bd); }
.il-card, .il-gymline {
  width: 100%;
  text-align: left;
  background: #1b2126;
  color: #e7eeef;
  border: 1px solid #313b43;
  border-radius: 14px;
  padding: 14px;
  min-height: 44px;
}
.il-card h3, .il-gymline { margin: 0; font-size: 18px; }
.il-card p { margin: 4px 0 0; color: #a9b7bd; }
.il-drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: #121416;
  color: #e7eeef;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
}
.il-toast {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 65;
  background: #1b2126;
  color: #e7eeef;
  border: 1px solid #8fd0c6;
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.il-toast h2 { margin: 0; font-size: 22px; }
.il-session {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 14px;
  background: #1b2126;
  border: 1px solid #8fd0c6;
}
.il-session strong { font-size: 32px; letter-spacing: 0.03em; color: #8fd0c6; }
.il-composer.gx-panel { flex-direction: column; align-items: stretch; border-top: 0; }
.il-composer h4 { margin: 0; }
.il-back { align-self: flex-start; }
.il-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.il-weekday {
  min-height: 64px;
  border-radius: 12px;
  border: 1px solid #313b43;
  background: #1b2126;
  color: #e7eeef;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 2px;
}
.il-weekday span { font-size: 13px; font-weight: 700; }
.il-weekday small { font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; color: #a9b7bd; }
.il-weekday.rest { background: #121416; color: #a9b7bd; }
.il-weekday.train { border-color: #8fd0c6; }
.il-weekday.train small { color: #8fd0c6; }
@media (max-width: 420px) {
  .il-weekday span { font-size: 11px; }
}
