:root {
  --accent: #ff0000;
  --ink: #111111;
  --muted: #708090;
  --line: #e6e8ea;
  --bg: #f5f6f7;
  --card: #ffffff;
  --black: #000000;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Jost", "Segoe UI", sans-serif;
  background: #d7d8dc;
  color: var(--ink);
}

.stage {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
  gap: 14px;
}

.stage-note {
  margin: 0;
  max-width: 390px;
  text-align: center;
  color: #5c6168;
  font-size: 13px;
}

.phone {
  width: 390px;
  height: 780px;
  background: #fff;
  border: 10px solid #16141c;
  border-radius: 36px;
  box-shadow: 0 24px 60px rgba(30, 20, 50, 0.28);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 22px;
  background: #16141c;
  border-radius: 0 0 16px 16px;
  z-index: 3;
}

.brand {
  min-height: 64px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 26px 18px 8px;
  background: #000;
  color: #fff;
}
.brand .wordmark { font-size: 20px; font-weight: 800; letter-spacing: 0.06em; }
.brand .wordmark span, h1 .v { color: var(--accent); }
.brand #clock { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }

body.cabinet {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
body.cabinet .stage { flex: 1; min-height: 0; width: 100%; }

.sitenav {
  display: flex;
  justify-content: center;
  gap: 8px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}
.sitenav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
}
.sitenav a.on { background: #111; color: #fff; }

.who { margin-bottom: 12px; }
.who label, .field label { display: block; font-size: 12px; color: var(--muted); margin: 0 0 4px; }
.task {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px 12px;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.task-kind { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 0.02em; }
.task-title { margin: 3px 0 6px; font-size: 15px; font-weight: 600; }
.task-who { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.status-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.status-row > .status-btn,
.status-row > .status-tip { min-width: 0; }
.status-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 6px 4px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.status-btn.on { background: #111; color: #fff; border-color: #111; }
.status-btn.on.done { background: #3d8c5a; border-color: #3d8c5a; color: #fff; }
.docbox { margin-top: 8px; background: #f6f7f8; border-radius: 10px; padding: 8px; }
.docbox p { margin: 0 0 8px; font-size: 12px; color: #333; }
.docbox input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.doc-link { font-size: 12px; margin-top: 6px; }
.addbox { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 12px 0; }
.field { margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }

body.board-page {
  background: #f3f4f6;
  height: auto;
  min-height: 100%;
}
body.board-page #app {
  background: transparent;
  overflow: visible;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 72px;
}
.board-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.shops {
  position: sticky;
  top: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px 8px;
}
.shops h2 { margin: 0 0 8px; font-size: 16px; text-transform: none; letter-spacing: 0; }
.shops h3 { margin: 12px 0 6px; font-size: 14px; }
.shops p { margin: 0 0 8px; font-size: 13px; color: #333; }
.shops ul { margin: 0; padding-left: 18px; }
.shops li { font-size: 13px; margin: 3px 0; }
.mech-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 14px; }
.mech-card.on { border: 1px solid #111; border-radius: 12px; background: #fff; }
.mech-card.on .mech-row { border-color: transparent; }
.mech-panel { padding: 0 14px 12px; }
.mech-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.mech-row.on { border-color: #111; }
.mech-row span { color: var(--muted); font-size: 13px; }
.mech-actions { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.mech-actions .go { width: auto; margin-top: 0; padding: 12px 18px; }
.mech-actions .task-delete { margin-top: 0; }
.mech-qr {
  width: 260px;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.mech-svg svg { display: block; width: 220px; height: 220px; }
.mech-code { letter-spacing: 0.08em; }
.task.pool { border-color: #f0c7c7; }
.stamps { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.status-tip {
  display: flex;
  cursor: help;
}
.status-tip .status-btn { width: 100%; min-width: 0; }
.status-tip .status-btn:disabled { pointer-events: none; }
.status-btn:disabled { opacity: 0.4; cursor: default; }
.status-btn[data-status="done"]:disabled {
  opacity: 1;
  color: #111;
  background: #fff;
  border: 1px dashed #111;
  font-weight: 600;
}
.status-btn.on.done,
.status-btn.on.done:disabled {
  opacity: 1;
  color: #fff;
  background: #3d8c5a;
  border: 1px solid #3d8c5a;
  font-weight: 600;
}
.ios-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  position: relative;
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}
.task > .ios-switch { margin: 16px 0 0; }
.switch-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.task-note { display: block; margin-top: 12px; }
.task > .task-note { margin: 14px 0 0; }
.task-note span { display: block; margin: 0 0 4px; font-size: 12px; color: var(--muted); }
.task-note i { font-style: normal; margin-left: 6px; }
.task-note textarea {
  width: 100%;
  min-height: 54px;
  box-sizing: border-box;
  font: inherit;
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  resize: vertical;
}
.ios-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}
.ios-ui {
  position: relative;
  flex: 0 0 auto;
  width: 51px;
  height: 31px;
  border-radius: 31px;
  background: #e9e9eb;
  transition: background .2s ease;
}
.ios-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .06);
  transition: transform .2s ease;
}
.ios-switch input:checked + .ios-ui { background: #111; }
.ios-switch input:checked + .ios-ui::after { transform: translateX(20px); }
.ios-switch input:focus-visible + .ios-ui { outline: 2px solid #111; outline-offset: 2px; }
.ios-switch input:disabled + .ios-ui { opacity: .4; }
.ios-switch:has(input:disabled) { cursor: default; }
.crew .ios-switch { margin-top: 0; }
@media (prefers-reduced-motion: reduce) {
  .ios-ui, .ios-ui::after { transition: none; }
}
.done-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 14px;
}
.done-switch input { width: auto; }
.crew { width: 100%; border-collapse: collapse; }
.crew th, .crew td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 14px;
}
.crew th { color: var(--muted); font-size: 12px; font-weight: 600; }
.crew select { font: inherit; font-size: 14px; padding: 6px 8px; }
.crew .off { color: var(--muted); }
.crew .row-note { color: var(--muted); font-size: 13px; }
.board-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 22px;
}
.board-head h1 { margin: 0; font-size: 40px; }
.board-head .lead { margin: 6px 0 0; max-width: 460px; }
.board-head .who { min-width: 280px; margin: 0; }
.watch {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin: 0 0 14px;
}
.watch .field { min-width: 280px; margin: 0; }
.watch-all {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 15px;
}
.watch-all input { width: auto; }
.daystrip { display: flex; align-items: stretch; gap: 8px; }
.cal-stage { position: relative; }
.cal-fold { display: flex; justify-content: center; margin: 0 0 16px; }
.cal-toggle {
  width: 64px;
  height: 28px;
  border: 1px solid var(--line);
  border-top: 0;
  background: #fff;
  border-radius: 0 0 12px 12px;
  font: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.monthcal {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  margin: 0;
}
.month-head {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.month-head strong { text-align: center; font-size: 18px; font-weight: 600; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.month-grid .dow { text-align: center; color: var(--muted); font-size: 12px; padding-bottom: 2px; }
.mday {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  min-height: 52px;
  padding: 6px 0 4px;
  font: inherit;
  text-align: center;
  cursor: pointer;
  color: var(--ink);
}
.mday b { display: block; font-size: 16px; }
.mday.out { color: #b0b6bc; }
.mday.on { background: #111; color: #fff; border-color: #111; }
.mday.today:not(.on) { box-shadow: inset 0 0 0 2px var(--accent); }
.mday .mark {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin: 4px auto 0;
  background: transparent;
}
.mday.busy .mark { background: #2f9e44; }
.mday.on .mark { background: #ff4d4d; }
.typefilter { max-width: 360px; margin: 0 0 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 14px; }
.filters .typefilter { margin: 0; min-width: 240px; }
.task-delete, .task-restore {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9a3412;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.task.deleted { opacity: 0.72; }
.typefilter label { display: block; }
.daycards { display: flex; gap: 8px; overflow: auto; flex: 1; padding-bottom: 4px; }
.daynav, .daycard {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  font: inherit;
  cursor: pointer;
}
.daynav { width: 42px; font-size: 22px; }
.daycard { min-width: 68px; padding: 8px 6px 10px; text-align: center; color: var(--ink); }
.daycard b { display: block; font-size: 18px; }
.daycard span { font-size: 12px; color: var(--muted); }
.daycard.on { background: #111; color: #fff; border-color: #111; }
.daycard.on span { color: #c5cdd2; }
.daycard.today:not(.on) { box-shadow: inset 0 0 0 2px var(--accent); }
.daycard .mark {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin: 6px auto 0;
  background: transparent;
}
.daycard.busy .mark { background: #2f9e44; }
.daycard.on .mark { background: #ff4d4d; }
.taskgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 14px; }
.board .task { margin: 0; background: #fff; }
.board .status-btn { font-size: 13px; padding: 8px 6px; }
.board-add {
  display: block;
  background: #fff;
  margin: 0 0 8px;
  padding: 14px;
}
.board-add .field { margin: 0; }
.board-add textarea, .board .docbox textarea {
  width: 100%;
  min-height: 110px;
  font: inherit;
  font-size: 16px;
  line-height: 1.45;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  resize: vertical;
  background: #fff;
}
.add-row {
  display: grid;
  grid-template-columns: 1.2fr 1.6fr 170px auto;
  gap: 10px;
  align-items: end;
  margin-top: 10px;
}
.add-row.self { grid-template-columns: 1.6fr 170px auto; }
.board-add .go, .board .docbox .go { width: auto; margin-top: 0; padding: 12px 18px; }
body.board-page input, body.board-page select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  padding: 8px 10px;
}
body.board-page label { margin: 0 0 4px; }
@media (max-width: 860px) {
  .board-layout { display: block; }
  .shops { position: static; margin-bottom: 16px; }
  .board-head, .add-row, .add-row.self { display: block; }
  .board-head .who { margin-top: 12px; }
  .add-row .field { margin-bottom: 8px; }
}

#app {
  flex: 1;
  overflow: auto;
  background: #fff;
}

.screen { padding: 12px 18px 28px; min-height: 100%; }

h1 { font-size: 32px; margin: 8px 0 4px; letter-spacing: -0.03em; font-weight: 700; text-transform: uppercase; }
h1 .v { color: var(--accent); }
.lead { color: var(--muted); margin: 0 0 22px; font-size: 15px; }

.choice {
  display: block;
  width: 100%;
  border: 0;
  background: #fff;
  border-radius: 10px;
  padding: 18px 16px;
  margin-bottom: 12px;
  text-align: left;
  border: 1px solid #eceff1;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}
.choice strong { display: block; font-size: 18px; text-transform: uppercase; letter-spacing: 0.02em; }
.choice span { color: var(--muted); font-size: 13px; }
.choice.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.choice.primary span { color: #ffe0e0; }

.back {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  font-size: 14px;
}

label { display: block; font-size: 13px; color: var(--muted); margin: 16px 0 6px; }

input, select {
  width: 100%;
  border: 0;
  border-bottom: 2px solid var(--accent);
  background: transparent;
  font-size: 18px;
  padding: 8px 2px;
  outline: none;
  font-family: inherit;
}

button.go {
  margin-top: 18px;
  width: 100%;
  border: 0;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.samples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
  border: 0;
  background: #f3f4f5;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
}

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 12px 14px;
  margin: 10px 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.car-title { font-weight: 750; }
.car-meta, .muted { color: var(--muted); font-size: 12px; }

.order {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 8px 0 0;
  margin-top: 8px;
  cursor: pointer;
}
.order-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.order-open { color: var(--accent); font-size: 12px; margin-top: 4px; font-weight: 600; }
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  background: #ffe0e0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}
.money { font-weight: 750; }

.pager { margin-top: 14px; border-radius: 16px; overflow: hidden; background: #f3f4f5; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08); }
.pager-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--black);
  color: #fff;
  padding: 6px;
}
.pager-today .pager-nav { background: var(--accent); }
.pager-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.pager-btn:disabled { opacity: 0.35; cursor: default; }
.pager-title { flex: 1; text-align: center; }
.pager-title strong { display: block; font-size: 16px; }
.pager-title span { display: block; color: #ffe0e0; font-size: 12px; font-weight: 600; }
.dots { display: flex; justify-content: center; gap: 5px; margin: 10px 0 4px; }
.dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: #d5d8dc;
  cursor: pointer;
}
.dot.idle { background: #bdb8c8; }
.dot.busy { background: #2f9e44; }
.dot.on { width: 18px; }
.dot.today { box-shadow: 0 0 0 2px var(--accent); }
.day {
  margin: 16px 0 8px;
  border-radius: 16px;
  overflow: hidden;
  background: #f3f4f5;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}
.day-head, .day-empty {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 750;
}
.day-head {
  width: 100%;
  border: 0;
  background: var(--black);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  padding: 11px 12px;
  cursor: pointer;
}
.day-today .day-head { background: var(--accent); }
.fold-label { color: #ffe0e0; font-size: 12px; font-weight: 600; }
.day-empty {
  background: #fff;
  border: 1px dashed #cfc6e2;
  border-radius: 12px;
  padding: 8px 10px;
  color: var(--muted);
  font-weight: 650;
}
.day:has(.day-empty) {
  background: transparent;
  box-shadow: none;
  margin: 8px 0;
}
.jobs { display: flex; flex-direction: column; gap: 8px; padding: 8px; }
.day.folded .jobs { display: none; }
.job {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  border: 0;
  cursor: pointer;
  background: #fff;
  border-radius: 12px;
  padding: 8px 10px 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.job-line { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.job-car { font-weight: 750; font-size: 14px; margin: 2px 0 6px; }
.lane {
  position: relative;
  height: 8px;
  border-radius: 99px;
  background: #eceff1;
}
.lane .bar {
  position: absolute;
  top: 0;
  height: 8px;
  border-radius: 99px;
  min-width: 6px;
}
.detail-block { margin-top: 14px; }
.detail-block h2 { font-size: 15px; margin: 0 0 6px; }
.line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.line span:first-child { flex: 1; }
.line b { white-space: nowrap; }
.note { white-space: pre-wrap; margin-top: 4px; }
.error { color: #9b2140; font-size: 14px; }
.empty { color: var(--muted); font-size: 14px; padding: 12px 0; }
.login-wrap {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px 22px;
}
.login-card h1 { margin: 0 0 6px; font-size: 32px; }
.login-card .lead { margin: 0 0 16px; }
.login-card .go { margin-top: 8px; }
.suggest-field { position: relative; }
.suggest {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  max-height: 360px;
  overflow: auto;
}
.suggest button {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 0;
  background: #fff;
  font: inherit;
  font-size: 14px;
  padding: 8px 10px;
  cursor: pointer;
}
.suggest button.on, .suggest button:hover { background: #f3f4f6; }
.suggest .login-tag { color: var(--muted); font-size: 13px; }
.who-name { font-size: 16px; font-weight: 600; }
.logout {
  margin-left: 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
}
.summary { display: flex; gap: 8px; margin-top: 8px; }
.summary div { flex: 1; background: #f3f4f5; border-radius: 12px; padding: 8px; font-size: 12px; }
.summary strong { display: block; font-size: 16px; }
.scan-video {
  display: none;
  width: 100%;
  margin-top: 12px;
  border-radius: 12px;
  background: #111;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.scan-video.on { display: block; }
.scan-file {
  display: inline-block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}
.scan-file input { display: none; }
.login-split { margin: 22px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
button.go.quiet {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
html.mech-app,
html.mech-app body { background: #f3f4f5; }
html.mech-app .sitenav,
html.mech-app .notch,
html.mech-app .stage-note { display: none; }
html.mech-app .brand {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: max(12px, env(safe-area-inset-top)) 18px 12px;
}
html.mech-app .stage {
  display: block;
  padding: 0;
  gap: 0;
  min-height: 100dvh;
}
html.mech-app .phone {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  height: auto;
  min-height: 100dvh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}
html.mech-app .screen {
  padding-top: 12px;
  padding-bottom: 16px;
}
html.mech-app #mech-view { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
html.mech-app .tabbar {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(480px, 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: #111;
  padding: 8px 8px max(8px, env(safe-area-inset-bottom));
}
html.mech-app .tabbar button {
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  background: #2a2a2a;
  color: #f2f2f2;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 1px 0 #000;
  cursor: pointer;
}
html.mech-app .tabbar button.on {
  background: #fff;
  color: #111;
}
