:root {
  color-scheme: light;
  --bike-ink: #292c2a;
  --bike-accent-ink: #3b5140;
  --bike-muted: #626963;
  --bike-line: #d9dcd6;
  --bike-soft: #e9ece6;
  --comp-line: var(--bike-line);
  --comp-muted: var(--bike-muted);
  --comp-accent: var(--bike-accent-ink);
  color: var(--bike-ink);
  background: #f3f3f1;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
}
* { box-sizing: border-box }
html { scroll-padding-top: 16px }
body { margin: 0 }
[hidden] { display: none !important }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .2em }
button, input, select, textarea { font: inherit; color: inherit }
button { cursor: pointer }
button:disabled { cursor: default; opacity: .55 }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--bike-accent-ink);
  outline-offset: 2px;
}
::selection { color: #213326; background: #dae6d6 }
svg { display: block }
img { max-width: 100% }
h1, h2, h3, h4 { line-height: 1.2; overflow-wrap: anywhere }
p { overflow-wrap: anywhere }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap }
.skip { position: absolute; left: 16px; top: -100px; z-index: 5; padding: 12px; background: #fff }
.skip:focus { top: 16px }
.app-shell { width: min(100%, 900px); margin-inline: auto; padding-inline: 24px }
.staff-topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 12px; padding-block: 10px; border-bottom: 1px solid var(--bike-line) }
.staff-brand { font-weight: 700; padding-block: 8px; text-decoration: none }
.staff-account-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px }
main { padding: 16px 0 calc(48px + env(safe-area-inset-bottom)); outline: 0 }
.comp-heading h1 { margin: 0; font-size: 27px; letter-spacing: -.03em }
.muted { color: var(--bike-muted); line-height: 1.55 }
.eyebrow { font-size: 11px; letter-spacing: .05em; font-weight: 650; color: var(--bike-muted) }
.panel { background: #fff; border: 1px solid var(--bike-line); border-radius: 16px }
.button, .text-button, .icon-button { display: inline-flex; align-items: center; justify-content: center; font-weight: 650 }
.button {
  max-width: 100%; min-height: 44px; padding: 10px 14px; gap: 8px;
  border: 1px solid transparent; border-radius: 11px; background: var(--bike-accent-ink); color: #fff;
  text-decoration: none; font-size: 14px; text-align: center; overflow-wrap: anywhere;
}
.button:hover { background: #2c4130 }
.button.secondary { border-color: var(--bike-line); color: var(--bike-ink); background: #fff }
.button.secondary:hover { background: var(--bike-soft) }
.button.danger { border-color: #efc9c0; background: #fff0ed; color: #9b3024 }
.button.full { width: 100% }
.button svg, .text-button svg { width: 17px; height: 17px; flex-shrink: 0 }
.text-button { min-height: 44px; gap: 7px; padding: 4px 6px; border: 0; color: var(--bike-accent-ink); background: transparent; font-size: 13px }
.text-button:hover { text-decoration: underline }
.icon-button { flex: 0 0 44px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--bike-soft) }
.icon-button svg { width: 19px; height: 19px }
.field { display: grid; gap: 6px; margin-bottom: 15px }
.field label { font-size: 13px; font-weight: 600 }
.field input, .field select, .field textarea, .comp-copy-input {
  width: 100%; min-width: 0; min-height: 44px; padding: 9px 12px; border: 1px solid var(--bike-line);
  border-radius: 10px; background: #fff; color: var(--bike-ink); font-size: 16px;
}
.field input::placeholder, .field textarea::placeholder { color: var(--bike-muted) }
.field textarea { resize: vertical }
dialog {
  width: min(calc(100% - 32px), 520px); max-height: 90dvh; overscroll-behavior: contain;
  padding: 0 22px 22px; border: 1px solid var(--bike-line); border-radius: 18px; background: #fff; color: inherit;
}
dialog::backdrop { background: #17251e66 }
.sheet-header {
  position: sticky; top: 0; z-index: 2; background: #fff; display: flex; align-items: start; justify-content: space-between;
  gap: 14px; padding-block: 16px; margin-bottom: 8px; border-bottom: 1px solid var(--bike-line);
}
.sheet-header h2 { margin: 0; font-size: 23px }
.sheet-header .eyebrow:not(:empty) { display: block; margin-bottom: 5px }
.sheet-grip { display: none }
#toast {
  position: fixed; bottom: calc(16px + env(safe-area-inset-bottom)); left: 50%; width: max-content; max-width: calc(100% - 32px);
  padding: 11px 16px; background: var(--bike-accent-ink); color: #fff; border-radius: 10px; font-size: 13px;
  transform: translateX(-50%); opacity: 0; pointer-events: none; transition: opacity .18s ease-out;
}
#toast.show { opacity: 1 }
.entry-gate { min-height: 100dvh; display: grid; place-items: center; padding: 24px }
.entry-card {
  width: min(100%, 410px); background: #fff; border: 1px solid var(--bike-line); border-radius: 16px;
  padding: 28px 24px; display: grid; gap: 14px; text-align: center;
}
.entry-card h1 { font-size: 27px; letter-spacing: -.03em; margin: 2px 0 0 }
.entry-card p { color: var(--bike-muted); margin: 0 }
.entry-mark { margin: 0 auto 3px }
.entry-button { width: 100% }
#telegram-entry-routes { display: grid; gap: 5px }
#marshal-entry-info { padding: 11px 12px; border-radius: 10px; background: var(--bike-soft); overflow-wrap: anywhere }
#marshal-entry-info strong, #marshal-entry-info span { display: block }
#marshal-entry-info strong { color: var(--bike-ink) }
.comp-form-error, .comp-error { background: #fff0ed; color: #9b3024; border: 1px solid #efc9c0; line-height: 1.5 }
@media (max-width: 700px) {
  .app-shell { padding-inline: 16px }
  dialog {
    inset: auto 0 0; width: 100%; max-width: none; max-height: calc(100dvh - 16px); margin: 0;
    border-radius: 18px 18px 0 0; padding: 0 16px calc(16px + env(safe-area-inset-bottom));
  }
  .sheet-grip { display: block; width: 32px; height: 4px; border-radius: 3px; margin: 9px auto 0; background: var(--bike-line) }
  html[data-input-focus] dialog[open] {
    bottom: var(--input-viewport-inset, 0px);
    max-height: calc(var(--input-viewport-height, 100dvh) - 12px);
  }
  html[data-input-focus] main { padding-bottom: max(48px, var(--input-scroll-space, 0px)) }
}
@media (prefers-reduced-motion: reduce) {
  #toast { transition: none }
}
