/* ---------- Reset and base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 16px;
}

a {
  color: var(--info);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

ul {
  list-style: none;
  padding: 0;
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 16px;
  border-radius: var(--radius-control);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus-visible {
  top: 12px;
}

.icon {
  flex: none;
  display: block;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 8px 24px;
  background: var(--gold-bar);
  border-bottom: 1px solid var(--gold-line);
}

.topbar--slim {
  min-height: 56px;
  grid-template-columns: 1fr auto;
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar__title {
  grid-column: 2;
  font-size: 26px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__right {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.topbar--slim .topbar__right {
  grid-column: 2;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--field-line);
  border-radius: var(--radius-control);
  background: var(--paper);
  font-size: var(--text-note);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ---------- Status pill ---------- */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: var(--text-note);
  font-weight: 600;
  white-space: nowrap;
}

.status-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.status-pill[data-state="synced"] {
  background: var(--ok-surface);
  color: var(--ok);
}

.status-pill[data-state="offline"] {
  background: var(--warn-surface);
  color: var(--warn);
}

.status-pill[data-state="syncing"] {
  background: var(--info-surface);
  color: var(--info);
}

.status-pill[data-state="review"] {
  background: var(--danger-surface);
  color: var(--danger);
}

.status-pill[data-state="syncing"] .status-pill__dot {
  animation: pulse 1.1s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

/* ---------- Page scaffolding ---------- */

.main {
  min-height: calc(100vh - 68px - var(--footer-size));
}

body.body--slim .main {
  min-height: calc(100vh - 56px - var(--footer-size));
}

.footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: var(--footer-size);
  padding: 0 24px;
  border-top: 1px solid var(--hairline);
  background: var(--paper);
}

.footer__credit {
  font-size: var(--text-note);
  color: var(--ink-2);
}

.footer__credit a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer__credit a:hover {
  text-decoration-thickness: 2px;
}

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.page--narrow {
  max-width: 760px;
}

.page__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.page__sub {
  color: var(--ink-2);
  font-size: var(--text-note);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.stack--tight {
  gap: 16px;
}

.split {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.btn--primary {
  background: var(--gold);
  border-color: var(--gold);
}

.btn--primary:hover {
  box-shadow: inset 0 0 0 2px var(--field-line);
}

.btn--soft {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
}

.btn--soft:hover {
  box-shadow: inset 0 0 0 2px var(--field-line);
}

.btn--quiet {
  background: transparent;
  border-color: transparent;
}

.btn--quiet:hover {
  background: var(--hairline-soft);
}

.btn--danger {
  background: var(--paper);
  border-color: var(--danger);
  color: var(--danger);
}

.btn--danger:hover {
  background: var(--danger-surface);
}

.btn--block {
  width: 100%;
}

.btn--small {
  min-height: 44px;
  padding: 0 14px;
  font-size: var(--text-note);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: none;
}

.btn[disabled],
.btn[aria-disabled="true"],
.btn[aria-busy="true"] {
  background: var(--hairline-soft);
  border-color: var(--hairline);
  color: var(--ink-3);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn[aria-busy="true"] {
  cursor: progress;
}

.btn[aria-busy="true"]::after {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.linklike {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--info);
  font-family: var(--font-body);
  font-size: var(--text-note);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.linklike:hover {
  text-decoration-thickness: 2px;
}

.linklike--danger {
  color: var(--danger);
}

/* ---------- Forms ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field__label {
  font-size: var(--text-note);
  font-weight: 600;
  color: var(--ink);
}

.field__req {
  color: var(--danger);
  margin-left: 2px;
}

.field__help {
  font-size: var(--text-note);
  color: var(--ink-2);
}

.field__error {
  font-size: var(--text-note);
  font-weight: 600;
  color: var(--danger);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--field-line);
  border-radius: var(--radius-control);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.4;
}

.textarea {
  min-height: 96px;
  resize: vertical;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23111111' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 14px center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  padding-right: 40px;
}

.input::placeholder,
.textarea::placeholder {
  color: #6b7280;
  opacity: 1;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--ink);
}

.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.field--invalid .input,
.field--invalid .select,
.field--invalid .textarea,
.input[aria-invalid="true"] {
  border-color: var(--danger);
}

.field--invalid .field__label {
  color: var(--danger);
}

.checkbox {
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--ink);
  cursor: pointer;
  flex: none;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.check__label {
  font-size: var(--text-body);
  font-weight: 500;
  cursor: pointer;
}

.check--invalid .check__label {
  color: var(--danger);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
}

.form-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid .span-2 {
  grid-column: span 2;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Cards, sections, tiles ---------- */

.card {
  background: var(--paper);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-card);
  padding: 24px;
}

.card--quiet {
  border-color: var(--hairline);
}

.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.card__note {
  font-size: var(--text-note);
  color: var(--ink-2);
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.section {
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}

.section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.section--stacked {
  margin-top: 40px;
}

.section__head {
  margin-bottom: 16px;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 16px;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  aspect-ratio: 1;
  padding: 16px;
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius-card);
  background: var(--gold-soft);
  color: var(--ink);
  font-size: var(--text-body);
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.tile:hover {
  background: var(--gold-head);
  border-color: var(--field-line);
}

.tile:active {
  background: var(--gold);
}

.tile[aria-disabled="true"] {
  flex-direction: column;
  background: var(--hairline-soft);
  border-color: var(--hairline);
  color: var(--ink-3);
  cursor: not-allowed;
}

.tile__note {
  font-size: var(--text-note);
  font-weight: 500;
  color: var(--ink-3);
}

.tile--role {
  width: 150px;
  height: 150px;
  aspect-ratio: auto;
}

/* ---------- Tags ---------- */

.tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--hairline-soft);
  color: var(--ink-2);
  font-size: var(--text-note);
  font-weight: 600;
  white-space: nowrap;
}

.tag--ok {
  background: var(--ok-surface);
  color: var(--ok);
}

.tag--warn {
  background: var(--warn-surface);
  color: var(--warn);
}

.tag--danger {
  background: var(--danger-surface);
  color: var(--danger);
}

.tag--info {
  background: var(--info-surface);
  color: var(--info);
}

/* ---------- Tables ---------- */

.table-wrap {
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-card);
  overflow: auto;
  background: var(--paper);
}

.table-wrap--quiet {
  border-color: var(--hairline);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-body);
}

.table caption {
  text-align: left;
  padding: 16px;
  font-size: var(--text-note);
  color: var(--ink-2);
  border-bottom: 1px solid var(--hairline);
}

.table th {
  background: var(--gold-head);
  color: var(--ink);
  font-size: var(--text-note);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  white-space: nowrap;
  border-bottom: 1px solid var(--gold-line);
}

.table td {
  padding: 14px 16px;
  border-top: 1px solid var(--hairline-soft);
  vertical-align: middle;
}

.table tbody tr:first-child td {
  border-top: 0;
}

.table tbody tr:hover td {
  background: var(--shell);
}

.table tbody tr.is-selected td,
.table tbody tr.is-selected:hover td {
  background: var(--selected);
  color: var(--paper);
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table .actions {
  text-align: right;
  white-space: nowrap;
}

.table .actions form {
  display: inline;
}

.table .actions .btn,
.table .actions .linklike {
  margin-left: 4px;
}

.table td.cell-empty {
  padding: 0;
}

/* ---------- List toolbars ---------- */

.listbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.listbar__search {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  flex: 0 1 640px;
}

.field--grow {
  flex: 1 1 240px;
  min-width: 180px;
}

.table__sub {
  display: block;
  margin-top: 2px;
  font-size: var(--text-note);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.readout {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-control);
  background: var(--shell);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.readout[data-loss="true"] {
  color: var(--danger);
  font-weight: 600;
}

.hint {
  margin-top: 12px;
  font-size: var(--text-note);
  color: var(--ink-2);
}

.product-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.product-summary__name {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
}

.product-summary__price {
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------- Navigation progress ---------- */

.nav-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 90;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: 0 50%;
  opacity: 0;
  pointer-events: none;
}

html[data-navigating="true"] .nav-progress {
  opacity: 1;
  transform: scaleX(0.72);
  transition: transform 2.4s cubic-bezier(0.2, 0.55, 0.2, 1);
}

/* ---------- Messages ---------- */

.messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--paper);
  font-size: var(--text-body);
  font-weight: 500;
}

.message--success {
  background: var(--ok-surface);
  border-color: var(--ok);
  color: var(--ok);
}

.message--error {
  background: var(--danger-surface);
  border-color: var(--danger);
  color: var(--danger);
}

.message--info {
  background: var(--info-surface);
  border-color: var(--info);
  color: var(--info);
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--danger);
  border-radius: var(--radius-control);
  background: var(--danger-surface);
  color: var(--danger);
  font-size: var(--text-body);
  font-weight: 500;
}

/* ---------- Empty states ---------- */

.empty {
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.empty__title {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
}

.empty__note {
  color: var(--ink-2);
  font-size: var(--text-note);
  max-width: 42ch;
}

.empty .btn {
  margin-top: 12px;
}

/* ---------- Start screen ---------- */

.start {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 56px - var(--footer-size));
  padding: clamp(24px, 4vw, 56px);
  background: var(--gold);
}

.start__card {
  width: min(560px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 3vw, 28px);
  background: var(--paper);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-modal);
  padding: clamp(28px, 4vw, 44px);
}

.start__brand {
  text-align: center;
}

.start .wordmark__name {
  font-size: clamp(32px, 4.6vw, 44px);
}

.start .wordmark__suffix {
  font-size: 18px;
}

.start__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
}

.start__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.start__tiles {
  display: grid;
  grid-template-columns: repeat(2, 150px);
  gap: 16px;
  justify-content: center;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 16px;
}

.wordmark__logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex: none;
}

.wordmark__stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.wordmark__name {
  font-family: var(--font-title);
  font-size: clamp(38px, 4.4vw, 62px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.wordmark__suffix {
  font-family: var(--font-title);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 700;
  letter-spacing: 0.18em;
}

.wordmark--sm {
  gap: 12px;
}

.wordmark--sm .wordmark__name {
  font-size: 26px;
}

/* ---------- Login ---------- */

.auth {
  display: flex;
  justify-content: center;
  padding: 48px 24px 64px;
}

.auth__inner {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.auth__card {
  width: 100%;
  border-radius: var(--radius-modal);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.auth__title {
  font-size: 24px;
  text-align: center;
}

.auth__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth__note {
  font-size: var(--text-note);
  color: var(--ink-2);
  text-align: center;
  max-width: 36ch;
}

.auth__back {
  font-size: var(--text-body);
  font-weight: 600;
}

/* ---------- Home ---------- */

.home {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: calc(100vh - 68px - var(--footer-size));
}

.home__side {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 40px 28px;
  background: var(--gold-bar);
  border-right: 1px solid var(--gold-line);
}

.home__shop {
  font-size: 26px;
  overflow-wrap: anywhere;
}

.home__device {
  font-size: var(--text-note);
  font-weight: 500;
  color: var(--ink-2);
  margin-top: -16px;
  overflow-wrap: anywhere;
}

.home__mode {
  font-size: var(--text-note);
  font-weight: 600;
  color: var(--ink-2);
}

.home__clock {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--field-line);
  border-radius: var(--radius-control);
  background: var(--paper);
  width: fit-content;
}

.home__time {
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.home__date {
  font-size: var(--text-note);
  color: var(--ink-2);
}

.home__links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.home__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.home__link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

.home__who {
  margin-top: auto;
  font-size: var(--text-note);
  color: var(--ink-2);
}

.home__main {
  padding: 40px clamp(24px, 3vw, 48px) 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home__center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home__tiles {
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  gap: 16px;
}

.home__tiles .tile {
  flex: 0 0 clamp(140px, 40vw, 190px);
  width: clamp(140px, 40vw, 190px);
}

/* ---------- Settings ---------- */

.settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}

.settings__form {
  padding: 32px;
}

.settings__sections {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.actionbar {
  position: sticky;
  bottom: 0;
  z-index: 25;
  padding: 12px 24px;
  background: var(--gold-bar);
  border-top: 1px solid var(--gold-line);
}

.actionbar__inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  max-width: 1240px;
  margin: 0 auto;
}

.actionbar--narrow .actionbar__inner {
  max-width: 760px;
}

.actionbar__inner .btn--primary {
  min-width: 200px;
}

.page--actionbar {
  padding-bottom: 112px;
}

.logo-field {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.logo-field__preview {
  width: 88px;
  height: 88px;
  border: 1px dashed var(--field-line);
  border-radius: var(--radius-control);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--shell);
  color: var(--ink-2);
  font-size: var(--text-note);
  flex: none;
}

.logo-field__preview--image {
  border-style: solid;
  border-color: var(--hairline);
  background: var(--paper);
}

.logo-field__preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.logo-field__controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 200px;
}

.file-input {
  font-size: var(--text-body);
  max-width: 100%;
}

.file-input::file-selector-button {
  min-height: 44px;
  margin-right: 12px;
  padding: 0 16px;
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius-control);
  background: var(--gold-soft);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 600;
  cursor: pointer;
}

.file-input::file-selector-button:hover {
  box-shadow: inset 0 0 0 2px var(--field-line);
}

.history {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 24px;
}

.history__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.history__list {
  display: flex;
  flex-direction: column;
}

.history__row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 0;
  border-top: 1px solid var(--hairline-soft);
}

.history__row:first-child {
  border-top: 0;
  padding-top: 0;
}

.history__what {
  font-size: var(--text-note);
  font-weight: 600;
}

.history__value {
  font-size: var(--text-body);
  overflow-wrap: anywhere;
}

.history__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-note);
  color: var(--ink-2);
}

.history__row form {
  margin-top: 4px;
}

.history__all {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
  font-size: var(--text-note);
}

/* ---------- Activity ---------- */

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 16px;
  align-items: end;
  padding: 20px 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  margin-bottom: 24px;
}

.filters__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  font-size: var(--text-note);
  color: var(--ink-2);
}

.pager__pages {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- Error pages ---------- */

.errorpage {
  max-width: 560px;
  margin: 0 auto;
  padding: 96px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.errorpage h1 {
  font-size: var(--text-title);
}

.errorpage p {
  color: var(--ink-2);
}

/* ---------- Small screens ---------- */

@media (max-width: 1100px) {
  .settings {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .home {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .home__side {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "shop clock"
      "device clock"
      "links who";
    align-items: center;
    gap: 2px 16px;
    padding: 20px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--gold-line);
  }

  .home__shop {
    grid-area: shop;
    font-size: 22px;
  }

  .home__device {
    grid-area: device;
    margin-top: 0;
  }

  .home__clock {
    grid-area: clock;
    padding: 8px 12px;
  }

  .home__time {
    font-size: 20px;
  }

  .home__links {
    grid-area: links;
  }

  .home__who {
    grid-area: who;
    margin-top: 0;
    justify-self: end;
    text-align: right;
  }

  .home__main {
    padding: 24px 24px 48px;
  }

  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters__actions {
    grid-column: 1 / -1;
  }

  .topbar {
    grid-template-columns: auto 1fr auto;
  }

  .topbar__title {
    text-align: right;
  }
}

@media (max-width: 640px) {
  .topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
  }

  .topbar__left {
    order: 1;
    flex: 0 0 auto;
  }

  .topbar__title {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    font-size: 19px;
  }

  .topbar__right {
    order: 3;
    flex: 0 0 auto;
    margin-left: auto;
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .topbar--slim .topbar__left {
    display: none;
  }

  .role-badge {
    display: none;
  }

  .page {
    padding: 24px 16px 48px;
  }

  .tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .form-grid,
  .form-grid--three {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-grid .span-2 {
    grid-column: span 1;
  }

  .filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .filters__actions {
    grid-column: auto;
  }

  .listbar {
    flex-direction: column;
    align-items: stretch;
  }

  .listbar__search {
    flex: 1 1 auto;
  }

  .listbar > .btn {
    width: 100%;
  }

  .settings__form {
    padding: 20px;
  }

  .actionbar {
    padding: 12px 16px;
  }

  .actionbar__inner .btn {
    width: 100%;
    min-width: 0;
  }

  .wordmark__name {
    font-size: 34px;
  }

  .start__tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 12px;
  }

  .tile--role {
    width: 100%;
    height: 140px;
  }

  .auth {
    padding: 24px 16px 48px;
  }

  .auth__card {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .topbar,
  .messages,
  .home__side,
  .actionbar,
  .footer,
  .history,
  .no-print {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .card,
  .table-wrap {
    border-color: #999;
  }
}

/* ---------- The till ---------- */
.till { display: grid; grid-template-columns: minmax(0, 1fr) 420px; min-height: calc(100vh - 68px - var(--footer-size)); }
.till__shop { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.till__search { display: flex; align-items: flex-end; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 16px; border: 1px solid var(--field-line); border-radius: 999px; background: var(--paper); color: var(--ink); font: 600 14px Inter, sans-serif; text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; }
.chip:hover { background: var(--gold-soft); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.quick__row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.quick__item { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 140px; padding: 10px 14px; border: 1px solid var(--gold-soft); border-radius: var(--radius-control); background: var(--gold-soft); color: var(--ink); font: 600 14px Inter, sans-serif; cursor: pointer; text-align: left; }
.quick__item:hover { border-color: var(--field-line); }
.quick__item:disabled { opacity: .6; cursor: not-allowed; }
.quick__item:disabled:hover { border-color: var(--gold-soft); }
.quick__price { font-weight: 500; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.product-grid[aria-busy="true"] { opacity: .55; }
.product-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--hairline); border-radius: var(--radius-card); background: var(--paper); text-align: left; font: 500 15px Inter, sans-serif; color: var(--ink); cursor: pointer; }
.product-card:hover { border-color: var(--field-line); background: var(--shell); }
.product-card.is-out { opacity: .6; cursor: not-allowed; }
.product-card__name { font-weight: 600; }
.product-card__meta { font-size: var(--text-note); color: var(--ink-2); }
.product-card__price { font-weight: 600; font-variant-numeric: tabular-nums; }
.product-card__image img { width: 100%; height: 88px; object-fit: cover; border-radius: 6px; }
.cart { display: flex; flex-direction: column; border-left: 1px solid var(--gold-line); background: var(--shell); position: sticky; top: 68px; height: calc(100vh - 68px - var(--footer-size)); }
.cart__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 20px 20px 12px; }
.cart__head h2 { font-size: 22px; }
.cart__count { font-size: var(--text-note); color: var(--ink-2); }
.cart__lines { flex: 1; overflow-y: auto; padding: 0 20px; display: flex; flex-direction: column; gap: 12px; }
.cart-line { padding: 12px 0; border-top: 1px solid var(--hairline); }
.cart-line__top { display: flex; justify-content: space-between; gap: 8px; }
.cart-line__name { font-weight: 600; }
.cart-line__remove { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink-2); padding: 0 4px; }
.cart-line__meta { font-size: var(--text-note); color: var(--ink-2); }
.cart-line__controls { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--field-line); border-radius: var(--radius-control); overflow: hidden; }
.stepper button { width: 36px; height: 36px; border: 0; background: var(--paper); font-size: 18px; cursor: pointer; }
.stepper input { width: 56px; height: 36px; border: 0; border-left: 1px solid var(--hairline); border-right: 1px solid var(--hairline); text-align: center; font: 600 15px Inter, sans-serif; }
.cart-line__discount input { width: 76px; height: 36px; border: 1px solid var(--field-line); border-radius: var(--radius-control); padding: 0 8px; font: 500 14px Inter, sans-serif; }
.cart-line__amount { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.cart__totals { padding: 16px 20px; border-top: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 6px; }
.cart__row { display: flex; justify-content: space-between; font-size: var(--text-note); color: var(--ink-2); }
.cart__row--total { font-size: 20px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.cart__pay { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.cart__actions { display: flex; flex-direction: column; gap: 8px; }
.cart__held { font-size: var(--text-note); }
.mobile-actions { display: flex; flex-direction: column; gap: 8px; }
.payment-wait { padding: 14px; border: 1px solid var(--gold-line); border-radius: var(--radius-control); background: var(--gold-bar); display: flex; flex-direction: column; gap: 6px; }
.payment-wait__title { font-weight: 700; }

/* Keep the cart's goods visible: compact rows, compact totals, one action row. */
.cart__head { padding: 14px 16px 6px; }
.cart__head h2 { font-size: 20px; }
.cart__lines { padding: 0 16px; gap: 0; }
.cart-line { padding: 6px 0; }
.cart-line:first-child { border-top: 0; }
.cart-line__top { align-items: center; }
.cart-line__remove { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; font-size: 18px; }
.cart-line__meta:empty { display: none; }
.cart-line__controls { margin-top: 2px; gap: 6px; }
.stepper button { width: 32px; height: 30px; font-size: 16px; }
.stepper input { width: 46px; height: 30px; font-size: 14px; }
.cart-line__discount input { width: 62px; height: 30px; font-size: 13px; }
.cart-line__amount { font-size: 15px; }
.cart__totals { padding: 7px 16px 8px; gap: 2px; }
.cart__row--total { font-size: 22px; }
.cart__pay { padding: 0 16px 12px; gap: 8px; }
.cart__pay .form-grid { gap: 8px 10px; }
.cart__pay .input, .cart__pay .select { min-height: 42px; }
.cart__extra { border-top: 1px solid var(--hairline); padding-top: 6px; }
.cart__extra summary,
.cart__manual summary { display: flex; align-items: center; gap: 8px; min-height: 30px; cursor: pointer; font-size: var(--text-note); font-weight: 600; }
.cart__extra-value { margin-left: auto; font-weight: 700; color: var(--warn); font-variant-numeric: tabular-nums; }
.cart__extra[open] summary,
.cart__manual[open] summary { margin-bottom: 6px; }
.cart__manual { border-top: 1px solid var(--hairline); padding-top: 6px; }
.cart__manual .btn { margin-top: 8px; }
.cart__actions { flex-direction: row; align-items: stretch; }
.cart__actions .btn { white-space: nowrap; }
.cart__actions .btn--block { width: auto; }
.cart__actions .btn--primary { flex: 1; }
.cart__actions .btn--quiet { flex: 0 0 108px; }
.cart__close, .cart-dock, .cart-scrim { display: none; }
.empty--inline { padding: 24px 0; text-align: left; }
.receipt-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.receipt { width: 80mm; max-width: 100%; margin: 0 auto; padding: 10mm 6mm; background: #fff; color: #111; font: 400 12px/1.45 "Courier New", monospace; }
.receipt__head { text-align: center; margin-bottom: 8px; }
.receipt__shop { font: 700 15px/1.3 "Courier New", monospace; text-transform: uppercase; }
.receipt__meta, .receipt__totals { display: flex; flex-direction: column; gap: 2px; border-top: 1px dashed #111; border-bottom: 1px dashed #111; padding: 6px 0; margin: 6px 0; }
.receipt__meta div, .receipt__totals div { display: flex; justify-content: space-between; gap: 8px; }
.receipt__meta dt, .receipt__totals dt { margin: 0; }
.receipt__meta dd, .receipt__totals dd { margin: 0; text-align: right; }
.receipt__lines { width: 100%; border-collapse: collapse; }
.receipt__lines td { padding: 3px 0; vertical-align: top; }
.receipt__item { display: block; font-weight: 700; }
.receipt__qty { display: block; }
.receipt__amount { text-align: right; white-space: nowrap; }
.receipt__grand { font-weight: 700; font-size: 14px; border-top: 1px dashed #111; padding-top: 4px; margin-top: 2px; }
.receipt__footer { text-align: center; margin-top: 10px; }
.receipt__void { text-align: center; font-weight: 700; border: 1px solid #111; padding: 4px; margin-top: 8px; }
@media print {
  .topbar, .footer, .receipt-actions, .skip-link, .nav-progress { display: none !important; }
  .page { padding: 0; max-width: none; }
  .receipt { width: 80mm; padding: 0; }
}
@media (max-width: 900px) {
  .till { grid-template-columns: minmax(0, 1fr); padding-bottom: 84px; }
  .cart {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    height: min(88vh, 720px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border-left: 0;
    border-top: 1px solid var(--gold-line);
    border-radius: var(--radius-modal) var(--radius-modal) 0 0;
    box-shadow: var(--shadow-modal);
    transform: translateY(105%);
    visibility: hidden;
    transition: transform 0.2s ease, visibility 0.2s ease;
  }
  .cart.is-open { transform: none; visibility: visible; }
  .cart__head { position: sticky; top: 0; z-index: 2; background: var(--shell); align-items: center; gap: 8px; padding: 14px 16px 8px; }
  .cart__head h2 { margin-right: auto; }
  .cart__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: var(--radius-control);
    background: var(--paper);
    color: var(--ink);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
  }
  .cart__close:hover { background: var(--gold-soft); }
  .cart__lines { flex: 0 0 auto; max-height: none; overflow: visible; }
  .cart-dock {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-top: 1px solid var(--gold-line);
    background: var(--paper);
  }
  .cart-dock__figures { display: flex; flex-direction: column; gap: 2px; margin-right: auto; }
  .cart-dock__figures strong { font-size: 20px; font-variant-numeric: tabular-nums; }
  .cart-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: var(--ink);
    opacity: 0.35;
  }
  .cart-scrim[hidden] { display: none; }
  body.cart-open { overflow: hidden; }
}
[hidden] { display: none !important; }
.cart__lines { min-height: 0; }
.cart__pay { flex: none; }

/* ---------- Reports ---------- */
.report-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.report-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 8px 0 24px; }
.report-head__period { font: 700 30px/1.15 "Playfair Display", Georgia, serif; }
.report-date { display: flex; align-items: flex-end; gap: 8px; }
.report-date .field { min-width: 170px; }
.report-steps { display: flex; gap: 8px; }
.report-metrics { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.metric { display: flex; flex-direction: column; gap: 6px; min-height: 116px; padding: 20px; border: 1px solid var(--hairline); border-radius: var(--radius-card); background: var(--paper); }
.metric--lead { grid-row: span 2; justify-content: center; background: var(--gold-bar); border-color: var(--gold-line); }
.metric__label { font-size: var(--text-note); font-weight: 600; color: var(--ink-2); }
.metric__value { font: 700 28px/1.15 "Playfair Display", Georgia, serif; font-variant-numeric: tabular-nums; }
.metric--lead .metric__value { font-size: 42px; }
.metric__note { font-size: var(--text-note); color: var(--ink-2); }
.report-blocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.report-blocks .card { margin: 0; }
.report-print-head { display: none; }

/* ---------- Barcode labels ---------- */
.pick { width: 64px; text-align: center; }
.field--copies { width: 160px; }
.label-sheet { display: grid; grid-template-columns: repeat(4, 50mm); gap: 2mm; justify-content: center; max-width: 100%; padding: 4mm; background: var(--paper); overflow: auto; }
.label { display: flex; flex-direction: column; justify-content: space-between; width: 50mm; height: 25mm; padding: 1.5mm 2mm; overflow: hidden; border: 1px dashed var(--hairline); background: var(--paper); color: var(--ink); }
.label__name { font: 600 8pt/1.1 Inter, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label__price { font: 700 8pt Inter, sans-serif; }
.label__bars { height: 9mm; color: var(--ink); }
.label__bars svg { display: block; width: 100%; height: 100%; }
.label__code { font: 400 6.5pt/1 "Courier New", monospace; text-align: center; letter-spacing: .04em; }

/* ---------- Download page ---------- */
.download__title { font: 700 34px/1.15 "Playfair Display", Georgia, serif; }
.download__lead { max-width: 56ch; color: var(--ink-2); }
.download__list { display: flex; flex-direction: column; gap: 8px; padding-left: 20px; list-style: disc; }
.download__list li { color: var(--ink-2); }

/* ---------- Sync and backup ---------- */
.sync-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pair-code { font: 700 38px/1.1 "Playfair Display", Georgia, serif; letter-spacing: .16em; font-variant-numeric: tabular-nums; }
.conflict { padding: 16px 0; border-top: 1px solid var(--hairline); }
.conflict:first-of-type { border-top: 0; }
.conflict__reason { font-weight: 600; }
.conflict__versions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 8px 0 12px; }
.conflict__version { padding: 12px; border-radius: var(--radius-control); background: var(--shell); }
.conflict__version p { font-size: var(--text-note); }
.backup-restore { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.backup-restore .field { flex: 1 1 320px; }

@media (max-width: 900px) {
  .report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric--lead { grid-row: span 1; grid-column: span 2; }
  .report-blocks { grid-template-columns: minmax(0, 1fr); }
  .label-sheet { grid-template-columns: repeat(2, 50mm); }
  .sync-grid, .conflict__versions { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .report-print-head { display: block; margin-bottom: 12px; }
  .report-print-head__shop { font: 700 16px "Playfair Display", Georgia, serif; }
  .report-head__period { font-size: 24px; }
  .report-metrics { grid-template-columns: 1.5fr 1fr 1fr; }
  .metric--lead { grid-row: span 2; grid-column: auto; }
  .report-blocks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric, .report-blocks .card { break-inside: avoid; }
  .label-sheet { display: grid; grid-template-columns: repeat(4, 50mm); gap: 2mm; padding: 0; overflow: visible; }
  .label { border: 0; }
}

/* ---------- Plan ---------- */

.plan-price {
  margin: 8px 0 4px;
  font-family: var(--font-title);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
}

.plan-price span {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 400;
  color: var(--ink-2);
}

.plan-key {
  display: inline-block;
  padding: 6px 10px;
  border: 1px dashed var(--field-line);
  border-radius: var(--radius-control);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: var(--text-note);
  letter-spacing: 0.08em;
}

/* ---------- Verification extras ---------- */

.auth__extra {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
}

.auth__extra summary {
  cursor: pointer;
  font-weight: 600;
}

.auth__extra[open] summary {
  margin-bottom: 12px;
}

/* ---------- Licence banner ---------- */

.licence-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 16px;
  padding: 10px 24px;
  background: var(--warn-surface);
  border-bottom: 1px solid var(--hairline);
  font-size: var(--text-note);
  color: var(--ink-2);
  text-align: center;
}

.licence-banner--danger {
  background: var(--danger-surface);
}

.licence-banner a {
  color: var(--ink);
  font-weight: 600;
}

.inline-form {
  display: inline;
}

.plan-key {
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* ---------- Barcode scanner ---------- */

.scan {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 17, 17, 0.55);
}

.scan[hidden] {
  display: none;
}

.scan__box {
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 24px;
  background: var(--paper);
  border-radius: var(--radius-modal);
  box-shadow: var(--shadow-modal);
}

.scan__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.scan__head h2 {
  font-size: 20px;
}

.scan__video {
  display: block;
  width: 100%;
  max-height: 58vh;
  object-fit: cover;
  border-radius: var(--radius-control);
  background: var(--ink);
}

.scan__status {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: var(--text-note);
}

.scan-field {
  display: grid;
  gap: 8px;
}

body.scan-open {
  overflow: hidden;
}

.footer__version {
  color: var(--ink-3);
  margin-left: 4px;
}
