:root {
  --bg: #f3f3f3;
  --surface: #ffffff;
  --ink: #1f1f1f;
  --muted: #666666;
  --line: #cfcfcf;
  --line-dark: #8a8a8a;
  --soft: #eeeeee;
  --focus: #dadada;
  --radius: 10px;
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.35;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 24px 12px;
}

a { color: inherit; text-decoration: none; }

button,
input,
select {
  font: inherit;
}

.workspace {
  width: min(100%, 640px);
}

.launcher {
  display: grid;
  gap: 16px;
}

.launcher-header,
.launcher-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.launcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.launcher-card {
  min-height: 112px;
  display: grid;
  gap: 8px;
}

.launcher-card strong,
.launcher-header h1 {
  margin: 0;
}

.launcher-card span,
.launcher-header p {
  color: var(--muted);
  margin: 0;
}

.phone {
  width: min(100%, 375px);
  min-height: 760px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--line-dark);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.topbar,
.drillbar {
  min-height: 56px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drillbar {
  justify-content: space-between;
}

.drill-title {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.back {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.brand {
  font-weight: 700;
  letter-spacing: 0;
}

.pill,
.chip,
.tab,
.badge,
.nav-item,
.control,
.button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
}

.pill.small,
.badge {
  min-height: 30px;
  padding: 4px 9px;
  font-size: 12px;
}

.is-active,
.is-selected {
  background: var(--focus);
  border-color: var(--line-dark);
}

.is-disabled,
button:disabled {
  color: #999999;
  background: #f8f8f8;
  cursor: not-allowed;
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.body {
  flex: 1;
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 18px;
  overflow: auto;
}

.body.compact { gap: 12px; }

.bottom-nav,
.sticky-cta {
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  background: var(--surface);
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.nav-item {
  min-width: 0;
  min-height: 48px;
  border-radius: 8px;
  flex-direction: column;
  font-size: 12px;
}

.icon {
  width: 18px;
  height: 18px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  display: inline-block;
}

.icon.round { border-radius: 999px; }
.icon.trip { border-radius: 3px 3px 6px 6px; }
.icon.user { border-radius: 50% 50% 45% 45%; }

h1,
h2,
h3,
p {
  margin: 0;
}

h1 { font-size: 26px; line-height: 1.15; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }

.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

.section {
  display: grid;
  gap: 10px;
}

.search {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: #fafafa;
}

.field,
.textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--surface);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.row.wrap,
.chips,
.tabs,
.filters,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 112px;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tile,
.card,
.callout,
.empty {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
}

.tile {
  min-height: 126px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.shortcut {
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 10px;
}

.placeholder-img {
  min-height: 58px;
  border: 1px dashed var(--line-dark);
  border-radius: 8px;
  background: #f6f6f6;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.radio-list {
  display: grid;
  gap: 10px;
}

.radio-row,
.check-row {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.radio-mark,
.check-mark {
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--line-dark);
  border-radius: 999px;
  flex: 0 0 auto;
}

.check-mark { border-radius: 4px; }
.radio-row.is-selected .radio-mark,
.check-row.is-selected .check-mark { background: var(--line-dark); box-shadow: inset 0 0 0 5px var(--surface); }

.button {
  width: 100%;
  border-radius: var(--radius);
  cursor: pointer;
}

.button.secondary {
  background: #f7f7f7;
}

.button.inline {
  width: auto;
}

.stepper {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
}

.stepper button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.state-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.state-switch button,
.filters button,
.tabs button,
.chip {
  cursor: pointer;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}

.skeleton {
  height: 14px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, #e6e6e6 0 12px, #f2f2f2 12px 24px);
}

.skeleton.block {
  height: 150px;
  border-radius: var(--radius);
}

.hide { display: none !important; }

.status-card {
  min-height: 88px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: #f5f5f5;
  text-align: center;
}

.list {
  display: grid;
  gap: 8px;
}

.list-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.bars {
  display: grid;
  gap: 8px;
}

.bar {
  height: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--line-dark);
}

.avatar {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.error {
  color: #444444;
  border: 1px dashed var(--line-dark);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: #f7f7f7;
}

@media (max-width: 420px) {
  body { padding: 0; }
  .phone {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    border-inline: 0;
  }
  .shortcut-grid { grid-template-columns: repeat(2, 1fr); }
}
