:root {
  --bg: #07090d;
  --card: #0d1016;
  --muted: #12161e;
  --line: rgba(255, 255, 255, 0.1);
  --text: #e8ecf3;
  --dim: #98a3b3;
  --action: #4493f8;
  --rose: #f85149;
  --green: #3fb950;
  --amber: #d29922;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tab: 50px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  background: #05070a;
  color: var(--text);
  font: 13px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.phone {
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  border-inline: 0.5px solid var(--line);
}

.chrome-top {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: var(--safe-top) 12px 0;
  border-bottom: 0.5px solid var(--line);
  background: var(--card);
}

.chrome-top .inner-row { display: contents; }

.mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0.5px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
}

.product {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  flex: 1;
}

.mock-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dim);
}

.switcher {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  padding: 10px 16px;
  background: var(--bg);
}

.switcher a {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0.5px solid var(--line);
  border-radius: 8px;
  color: var(--dim);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.switcher a[aria-current="page"] {
  border-color: var(--action);
  color: var(--action);
}

.scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px calc(var(--tab) + var(--safe-bottom) + 16px);
}

.chrome-tabs {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(430px, 100%);
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: calc(var(--tab) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  border-top: 0.5px solid var(--line);
  background: color-mix(in oklab, var(--card) 92%, transparent);
}

.chrome-tabs span {
  margin: 18px auto 0;
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: #3a424f;
}

.stack { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 8px; }

h1 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.caption { font-size: 11px; color: var(--dim); }
.micro { font-size: 12px; color: var(--dim); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.prose { font-size: 13px; line-height: 1.5; }
.muted { color: var(--dim); }
.accent { color: var(--action); }
.neg { color: var(--rose); }
.strong { font-weight: 600; }

.card, .cut, .story, .compact, .proof, .assess, .gate, .touch {
  width: 100%;
  text-align: left;
  background: transparent;
  color: inherit;
  border: 0.5px solid var(--line);
  border-radius: 8px;
}

.cut, .story, .compact, .gate, .touch, .back, .film, .chip {
  min-height: 44px;
  cursor: pointer;
  font: inherit;
}

.cut, .story, .proof, .assess { padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; }
.compact { padding: 8px 12px; display: flex; align-items: center; gap: 8px; }
.touch {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
  color: var(--dim);
}
.touch.accent {
  border-color: var(--action);
  color: var(--action);
}
.touch:disabled { opacity: 0.4; }
.back {
  border: 0;
  background: none;
  color: var(--action);
  font-weight: 600;
  font-size: 15px;
  padding: 0;
}
.count {
  display: inline-flex;
  min-width: 19px;
  height: 19px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--muted);
  font: 11px ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--dim);
}
.filmstrip { display: flex; gap: 6px; overflow-x: auto; }
.chip, .film {
  min-width: 44px;
  padding: 0 12px;
  border: 0.5px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--dim);
  font: 12px ui-monospace, SFMono-Regular, Menlo, monospace;
}
.chip.on, .film.on { border-color: var(--action); color: var(--action); }
.pill {
  display: inline-block;
  font: 10px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  border: 0.5px solid transparent;
}
.pill.PASS { color: var(--green); background: rgba(63, 185, 80, 0.12); }
.pill.FAIL { color: var(--rose); background: rgba(248, 81, 73, 0.12); }
.assess.warn { border-color: var(--rose); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.grid { display: grid; grid-template-columns: 1fr; gap: 6px; }
.split { display: flex; gap: 16px; }
.split > * { flex: 1; }
.sticky {
  position: sticky;
  bottom: calc(var(--tab) + var(--safe-bottom));
  z-index: 3;
  background: var(--card);
  border-top: 0.5px solid var(--line);
  padding: 8px 0;
  margin: 8px -16px 0;
  padding-inline: 16px;
}
.note {
  padding: 8px 12px;
  border: 0.5px solid var(--line);
  border-radius: 8px;
  color: var(--amber);
}
.overlay {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  border: 0.5px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.trunc { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
