:root {
  --ink: #06243f;
  --orange: #ff5a1f;
  --cream: #fff4df;
  --paper: #fffdf7;
  --sea: #bcecf4;
  --green: #39a96b;
  --red: #e04444;
  --muted: #637381;
  --safe-top: max(env(safe-area-inset-top, 0px), 32px);
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), 34px);
}

.support-inbox {
  border-color: var(--orange);
  overflow: hidden;
  padding: 0;
  box-shadow: 5px 5px 0 var(--ink);
}

.support-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: white;
  background: var(--ink);
}

.support-chat-header > span:last-child {
  display: grid;
  gap: 2px;
}

.support-chat-header .position-status {
  color: rgba(255, 255, 255, 0.72);
}

.support-chat-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 3px solid white;
  border-radius: 50%;
  color: var(--ink);
  background: var(--orange);
  font-size: 11px;
  font-weight: 900;
}

.support-chat-messages {
  display: flex;
  min-height: 160px;
  max-height: 380px;
  flex-direction: column;
  gap: 9px;
  overflow-y: auto;
  padding: 16px 12px;
  background: #fff8ed;
  overscroll-behavior: contain;
}

.support-inbox-message {
  display: flex;
  width: fit-content;
  max-width: 84%;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  padding: 9px 11px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: white;
  font-size: 13px;
  line-height: 1.35;
}

.support-inbox-message.support-sender-admin {
  align-self: flex-start;
  border-color: var(--orange);
  background: #fff0df;
}

.support-inbox-message.support-sender-rider {
  align-self: flex-end;
  color: white;
  background: var(--ink);
}

.support-inbox-message b {
  font-size: 11px;
}

.support-inbox-message small {
  color: var(--muted);
  font-size: 10px;
}

.support-inbox-message.support-sender-rider small {
  color: rgba(255, 255, 255, 0.68);
}

.support-inbox-reply {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 9px;
  padding: 11px;
  border-top: 3px solid var(--ink);
  background: white;
}

.support-inbox-reply .textarea {
  min-height: 48px;
  max-height: 110px;
  margin: 0;
  resize: vertical;
}

.support-chat-send {
  min-height: 48px;
  padding-inline: 16px;
}

.support-inbox-reply[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
  font-synthesis: none;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Arial, Helvetica, sans-serif;
}

button {
  font: inherit;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  display: grid;
  grid-template-columns: auto minmax(320px, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 76px);
}

a {
  color: inherit;
  text-decoration: none;
}

.phone {
  width: 375px;
  height: 790px;
  padding: 13px;
  border-radius: 46px;
  background: #111;
  box-shadow: 24px 24px 0 rgba(6, 36, 63, 0.22), 0 20px 60px rgba(0, 0, 0, 0.3);
}

.screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border: 4px solid #222;
  border-radius: 36px;
  background: var(--cream);
}

.status {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--paper);
  font-size: 12px;
  font-weight: 900;
}

.app {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--cream);
}

.app.demo-pending .tabbar {
  display: none;
}

.app.demo-mode .demo-hidden,
.qr-placement-toggle[hidden],
.qr-placement-panel[hidden] {
  display: none !important;
}

.app.dnf-mode .top,
.app.dnf-mode .tabbar {
  display: none;
}

.app.dnf-mode .content {
  padding-top: calc(18px + var(--safe-top));
}

.app.finished-mode .tabbar {
  display: none;
}

.top {
  position: relative;
  min-height: calc(104px + var(--safe-top));
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + var(--safe-top)) 18px 12px;
  border-bottom: 4px solid var(--ink);
  background: linear-gradient(
    to bottom,
    var(--ink) 0,
    var(--ink) var(--safe-top),
    var(--paper) var(--safe-top),
    var(--paper) 100%
  );
}

.top-copy {
  max-width: calc(100% - 112px);
}

.app-logo {
  width: 98px;
  height: 68px;
  padding: 5px;
  object-fit: contain;
  object-position: center;
  border: 3px solid var(--ink);
  border-radius: 15px;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(2deg);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  color: white;
  background: var(--ink);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1;
  vertical-align: top;
}

.top-copy .badge {
  height: 36px;
  padding-top: 0;
  padding-bottom: 0;
}

#timeLimitDebugBadge {
  min-width: 118px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
}

#timeLimitDebugBadge:active {
  transform: translate(1px, 1px);
}

.server-status {
  margin-left: 6px;
  background: var(--muted);
}

.server-status.is-online {
  background: var(--green);
}

.server-status.is-offline,
.server-status.is-error {
  background: var(--red);
}

.server-status.is-checking {
  background: var(--orange);
}

h1 {
  margin: 13px 0 8px;
  font-size: 38px;
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: -2px;
}

h2 {
  margin: 8px 0;
  font-size: 32px;
  line-height: 1;
  font-weight: 900;
}

h3 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
}

p {
  margin: 10px 0 0;
  font-weight: 800;
  line-height: 1.38;
}

.sub {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.content {
  flex: 1;
  overflow: auto;
  padding: 15px;
  padding-bottom: 18px;
}

.card {
  margin-bottom: 14px;
  padding: 16px;
  border: 4px solid var(--ink);
  border-radius: 22px;
  background: white;
  box-shadow: 6px 6px 0 var(--ink);
}

.card b {
  display: block;
  font-weight: 900;
}

.howto-card > p {
  margin: 8px 0 12px;
}

.howto-slides {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.howto-slide {
  flex: 0 0 82%;
  min-height: 150px;
  padding: 14px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: #fff8ef;
  box-shadow: 4px 4px 0 var(--ink);
  scroll-snap-align: start;
}

.howto-slide span {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 9px;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 50%;
  color: white;
  background: var(--orange);
  font-weight: 900;
}

.howto-slide p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.progress-card {
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.progress-card.is-time-dnf {
  border-color: #8f1414 !important;
  background: var(--red) !important;
  box-shadow: 6px 6px 0 #8f1414 !important;
}

.progress-card.is-time-dnf > b {
  color: white;
}

.progress-card.is-time-dnf .progress {
  border-color: #8f1414;
  background: #ffb092;
}

.progress-card.is-time-dnf .bar {
  background: #c51f1f;
}

.app.time-alert-mode #progressCard.card.progress-card {
  border-color: #8f1414 !important;
  background: var(--red) !important;
  box-shadow: 6px 6px 0 #8f1414 !important;
}

.progress {
  position: relative;
  height: 16px;
  overflow: visible;
  margin-top: 10px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: white;
}

.bar {
  width: 37.5%;
  height: 100%;
  border-radius: 999px;
  background: var(--orange);
  transition: width 260ms ease;
}

.progress-rider {
  position: absolute;
  left: 0%;
  top: 50%;
  z-index: 2;
  font-size: 22px;
  line-height: 1;
  transform: translate(-42%, -68%) scaleX(-1);
  filter: drop-shadow(1px 1px 0 white) drop-shadow(-1px 0 0 var(--ink));
  transition: left 260ms ease;
  pointer-events: none;
}

.progress-speed {
  position: absolute;
  left: 0%;
  top: 20px;
  z-index: 2;
  min-width: 58px;
  padding: 3px 7px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  transform: translateX(-50%);
  transition: left 260ms ease;
  pointer-events: none;
  white-space: nowrap;
}

.progress-card.is-time-dnf .progress-speed,
.app.time-alert-mode #progressCard .progress-speed {
  border-color: #8f1414;
  color: white;
  background: #8f1414;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 34px;
}

.stat {
  padding: 10px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--cream);
  font-weight: 900;
}

.stat b {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.pace-forecast {
  margin-top: 12px;
  padding: 12px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fff7e8;
  box-shadow: 5px 5px 0 var(--ink);
}

.pace-forecast b,
.pace-forecast span {
  display: block;
}

.pace-forecast b {
  color: var(--orange);
  font-size: 17px;
  text-transform: uppercase;
}

.pace-forecast span {
  margin-top: 3px;
  font-weight: 900;
  line-height: 1.25;
}

.pace-forecast.is-warning {
  background: #ffd7c8;
  border-color: var(--red);
}

.pace-forecast.is-warning b {
  color: var(--red);
}

.pace-forecast.is-time-dnf {
  background: #8f1414;
  border-color: #5e0808;
  color: white;
}

.pace-forecast.is-time-dnf b {
  color: white;
}

.permission-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.permission-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: var(--cream);
  font-weight: 900;
}

.permission-list b {
  min-width: 88px;
  padding: 5px 8px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  text-align: center;
  font-size: 12px;
  text-transform: uppercase;
}

.permission-list b.is-ok {
  color: #113d25;
  background: #baf2c8;
}

.permission-list b.is-missing {
  color: white;
  background: #8f1414;
}

.permission-list b.is-unknown {
  color: var(--ink);
  background: #ffe1a8;
}

.sync-card {
  border-color: var(--orange);
  background: #fff0df;
  box-shadow: 6px 6px 0 var(--orange);
}

.sync-card b {
  text-transform: uppercase;
}

.sync-card p {
  margin: 6px 0 0;
  font-weight: 900;
  line-height: 1.35;
}

.qr-placement-toggle {
  margin-top: 12px;
}

.qr-placement-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.qr-placement-head {
  display: grid;
  gap: 3px;
}

.qr-placement-head b {
  text-transform: uppercase;
}

.qr-placement-head small {
  color: var(--muted);
  font-weight: 850;
}

.qr-placement-list {
  display: grid;
  gap: 12px;
}

.qr-placement-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fff8ef;
}

.qr-placement-preview {
  display: block;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.qr-placement-item img,
.qr-placement-placeholder {
  width: 96px;
  aspect-ratio: 4 / 3;
  border: 3px solid var(--ink);
  border-radius: 12px;
  object-fit: cover;
  background: var(--cream);
}

.qr-placement-placeholder {
  display: grid;
  place-items: center;
  padding: 8px;
  font-size: 11px;
  font-weight: 950;
  text-align: center;
}

.qr-placement-item b {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.qr-placement-item p {
  margin: 0;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.3;
}

.qr-placement-item small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.qr-placement-modal {
  z-index: 45;
}

.qr-placement-modal-card {
  width: min(100%, 390px);
  max-height: calc(100% - 32px);
  overflow-y: auto;
}

.qr-placement-modal-card p {
  margin-top: 6px;
}

.qr-placement-modal-media {
  margin: 14px 0 10px;
}

.qr-placement-modal-media img,
.qr-placement-modal-media .qr-placement-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 56vh;
  border: 4px solid var(--ink);
  border-radius: 18px;
  object-fit: cover;
  background: #fff8ef;
}

.qr-placement-modal-media .qr-placement-placeholder {
  display: grid;
  place-items: center;
  padding: 20px;
}

.qr-placement-map-button {
  margin-top: 12px;
}

.qr-placement-modal-card .buttons {
  margin-top: 16px;
}

.time-limit-card {
  border-color: #8f1414;
  background: #ffe1dc;
  box-shadow: 8px 8px 0 #8f1414;
}

.time-limit-card h3 {
  margin: 10px 0;
  font-size: 28px;
  line-height: 1;
}

.duplicate-scan-card {
  border-color: var(--red);
  background: #ffe1dc;
  box-shadow: 8px 8px 0 var(--red);
}

.duplicate-scan-card h3 {
  margin: 10px 0;
  color: #5e0808;
  font-size: 28px;
  line-height: 1;
}

.duplicate-scan-card p {
  color: #5e0808;
  font-weight: 900;
}

.time-limit-snooze-hint {
  display: block;
  margin: 12px 0 14px;
  color: #5e0808;
  font-weight: 900;
  line-height: 1.25;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  font-weight: 900;
}

.check-row input {
  width: 22px;
  height: 22px;
  accent-color: #8f1414;
}

.btn,
.tab {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.btn {
  display: block;
  padding: 14px;
  border: 4px solid var(--ink);
  border-radius: 18px;
  color: white;
  background: var(--orange);
  box-shadow: 5px 5px 0 var(--ink);
  font-weight: 900;
  text-align: center;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.btn:active {
  transform: translate(4px, 4px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn.secondary {
  color: var(--ink);
  background: white;
}

.btn.sos {
  background: var(--red);
}

.btn.quiet {
  padding: 10px 12px;
  border-width: 3px;
  color: var(--ink);
  background: #ffd7c8;
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 13px;
}

.btn.full {
  width: 100%;
  margin-top: 14px;
}

.start-card {
  border-width: 5px;
  background: var(--paper);
}

.route-alert-card {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 14px;
  border: 4px solid var(--ink);
  border-radius: 18px;
  background: #fff4df;
  box-shadow: 4px 4px 0 var(--ink);
}

.route-alert-card.is-hidden {
  display: none;
}

.route-alert-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.route-alert-list {
  display: grid;
  gap: 8px;
}

.route-alert-item {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: white;
}

.route-alert-item.warning {
  border-color: var(--orange);
  background: #fff0df;
}

.route-alert-item.critical {
  border-color: #8f1414;
  background: #ffd7c8;
}

.route-alert-item p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.route-alert-item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.onboarding-card {
  background: var(--paper);
}

.onboarding-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.onboarding-list li {
  padding: 10px 11px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: #fff8ef;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.35;
}

.onboarding-confirm {
  margin-top: 12px;
  border-color: var(--orange);
  background: #fff0df;
}

.dnf-status-card {
  border-width: 5px;
  background: #ffd7c8;
}

.dnf-warning-card {
  border-width: 5px;
  background: #ffd7c8;
}

.finish-card {
  position: relative;
  overflow: hidden;
  border-width: 5px;
  background: linear-gradient(135deg, var(--paper), #ffe0d2);
}

.finish-card::before,
.finish-card::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  border: 12px solid var(--orange);
  border-radius: 50%;
  opacity: .18;
}

.finish-card::before {
  right: -42px;
  top: -42px;
}

.finish-card::after {
  left: -52px;
  bottom: -56px;
}

.finish-burst {
  position: relative;
  display: inline-block;
  margin-top: 16px;
  padding: 12px 16px;
  border: 4px solid var(--ink);
  border-radius: 18px;
  color: white;
  background: var(--orange);
  box-shadow: 5px 5px 0 var(--ink);
  font-family: Arial Black, Arial, Helvetica, sans-serif;
  font-size: 24px;
  font-weight: 900;
  transform: rotate(-2deg);
  animation: finishPop .9s ease-in-out infinite alternate;
}

.upload-card {
  background: var(--paper);
}

@keyframes finishPop {
  to {
    transform: rotate(2deg) scale(1.03);
  }
}

.hold-dnf {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  isolation: isolate;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  --hold-progress: 0%;
}

.hold-dnf span {
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.hold-dnf::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  width: var(--hold-progress);
  background: linear-gradient(90deg, #ff5a1f, #8b0000);
  transition: width 80ms linear;
}

.hold-dnf.is-holding {
  color: white;
}

.hold-dnf.is-complete {
  background: #8b0000;
  color: white;
}

.start-demo-button {
  animation: startPulse 1700ms ease-in-out infinite;
}

@keyframes startPulse {
  0%, 100% {
    transform: translate(0, 0);
    box-shadow: 5px 5px 0 var(--ink);
  }

  50% {
    transform: translate(2px, 2px);
    box-shadow: 8px 8px 0 var(--ink), 0 0 0 5px rgba(255, 90, 31, .18);
  }
}

.field-label {
  display: block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 900;
}

.field {
  width: 100%;
  margin-top: 7px;
  padding: 12px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 900;
}

.help-contact-preview {
  padding: 10px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: var(--cream);
}

.info {
  max-width: 540px;
}

.info-logo {
  display: block;
  width: min(290px, 82%);
  height: 190px;
  padding: 12px;
  margin-bottom: 22px;
  object-fit: contain;
  object-position: center;
  border: 5px solid var(--ink);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 9px 9px 0 var(--ink);
  transform: rotate(-2deg);
}

.info h1 {
  margin: 18px 0;
  font-size: clamp(44px, 5.5vw, 72px);
  line-height: .9;
}

.info p {
  max-width: 620px;
  font-size: 21px;
}

.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.feature-list span {
  padding: 9px 13px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: white;
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 900;
}

.small-note {
  color: var(--muted);
  font-size: 17px !important;
}

.back-link {
  display: inline-flex;
  margin-top: 22px;
}

.buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.buttons.is-single {
  grid-template-columns: 1fr;
}

.account-buttons {
  margin-top: 14px;
}

.login-open-button {
  margin-top: 14px;
}

.home-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.home-actions .btn {
  margin-top: 0;
}

.scan-primary {
  grid-column: 1 / -1;
  background: var(--red);
}

.home-gpx {
  grid-column: 1 / -1;
}

.motivation-button {
  min-height: 48px;
}

.is-hidden,
.home-gpx.is-hidden {
  display: none;
}

.cp {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 2px dashed rgba(6, 36, 63, 0.25);
}

.cp:last-child {
  border-bottom: 0;
}

.dot {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: white;
  font-weight: 900;
}

.done .dot {
  color: white;
  background: var(--green);
}

.current .dot {
  color: white;
  background: var(--orange);
}

.cp.skipped .dot {
  color: white;
  background: var(--red);
}

.cp small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.tabbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  padding: 10px 10px var(--safe-bottom);
  border-top: 4px solid var(--ink);
  background: var(--ink);
}

.textarea {
  min-height: 110px;
  resize: vertical;
}

.file-field {
  padding: 10px;
  background: #fff8ef;
}

.photo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.photo-actions .btn {
  margin-top: 0;
}

.visually-hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.route-report-status {
  display: block;
  margin-top: 10px;
}

.profile-detail-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 6px;
}

.profile-detail-list > div {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 2px solid rgba(6, 36, 63, 0.16);
}

.profile-detail-list b {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-detail-list span {
  font-weight: 900;
  overflow-wrap: anywhere;
}

.achievement-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.achievement-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fff8ef;
  box-shadow: 3px 3px 0 var(--ink);
}

.achievement-item.is-locked {
  opacity: 0.64;
  background: #f3efe6;
  box-shadow: none;
}

.achievement-sticker {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 14px;
  color: white;
  background: var(--orange);
  font-size: 18px;
  font-weight: 1000;
  transform: rotate(-2deg);
}

.achievement-item.is-locked .achievement-sticker {
  color: var(--ink);
  background: #ddd6ca;
}

.achievement-item b {
  margin-bottom: 3px;
}

.achievement-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.achievement-date,
.achievement-empty {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.achievement-empty {
  padding: 12px;
  border: 3px dashed rgba(6, 36, 63, 0.35);
  border-radius: 16px;
  background: #fff8ef;
}

.settings-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0 2px;
  padding: 12px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: var(--cream);
  box-shadow: 3px 3px 0 var(--ink);
}

.settings-toggle input {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  margin-top: 2px;
  accent-color: var(--orange);
}

.settings-toggle b,
.settings-toggle small {
  display: block;
}

.settings-toggle small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 900;
  line-height: 1.25;
}

.tab {
  min-width: 0;
  min-height: 44px;
  padding: 9px 2px 8px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.38);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.tab:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
}

.tab.active {
  color: white;
  background: var(--orange);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.page {
  display: none;
}

.page.active {
  display: block;
}

body.preview-embed {
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--cream);
}

body.preview-embed .app {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: none;
}

body.preview-embed .top {
  min-height: 92px;
  padding: 14px 14px 10px;
  background: var(--paper);
}

body.preview-embed .top-copy {
  max-width: calc(100% - 94px);
}

body.preview-embed .app-logo {
  width: 84px;
  height: 58px;
}

body.preview-embed .content {
  padding: 12px;
}

body.preview-embed .card {
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 20px;
  box-shadow: 5px 5px 0 var(--ink);
}

body.preview-embed .tab {
  padding: 8px 2px 7px;
}

body.preview-embed .tabbar {
  gap: 6px;
  padding: 8px;
}

.qrbox {
  position: relative;
  height: 260px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 14px;
  border: 5px solid var(--ink);
  border-radius: 28px;
  background:
    linear-gradient(90deg, transparent 46%, rgba(6, 36, 63, 0.15) 46% 54%, transparent 54%),
    linear-gradient(transparent 46%, rgba(6, 36, 63, 0.15) 46% 54%, transparent 54%),
    white;
  font-size: 58px;
}

.scan-hint {
  margin-top: 12px;
  padding: 10px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--cream);
}

.scan-next {
  margin-top: 12px;
  padding: 12px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: white;
  box-shadow: 3px 3px 0 var(--ink);
}

.scan-next b {
  margin-bottom: 4px;
  color: var(--orange);
  font-size: 18px;
  text-transform: uppercase;
}

.scan-next span {
  display: block;
  font-weight: 900;
  line-height: 1.25;
}

.scan-hint b {
  margin-bottom: 3px;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.scan-hint span {
  display: block;
  font-weight: 900;
  line-height: 1.25;
}

.scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--orange);
  animation: scan 2s infinite;
}

@keyframes scan {
  0% { top: 15px; }
  50% { top: 238px; }
  100% { top: 15px; }
}

.map {
  position: relative;
  height: 305px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 4px solid var(--ink);
  border-radius: 24px;
  background: linear-gradient(var(--sea) 0 20%, var(--paper) 20%);
}

.route-map {
  position: absolute;
  inset: 36px 18px 18px;
  width: calc(100% - 36px);
  height: calc(100% - 54px);
}

.route-shadow,
.route-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-shadow {
  stroke: var(--ink);
  stroke-width: 13;
}

.route-line {
  stroke: var(--orange);
  stroke-width: 6;
}

.route-cp line {
  stroke: var(--ink);
  stroke-width: 2;
}

.route-cp circle {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 4;
}

.route-cp .cp-tag rect {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 3;
}

.route-cp .cp-tag text {
  fill: var(--ink);
  font-family: Arial Black, Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 900;
  text-anchor: middle;
}

.route-cp.done circle,
.route-cp.active circle {
  fill: var(--orange);
}

.route-cp.skipped circle {
  fill: #ffd7c8;
}

.route-cp.active .cp-tag rect {
  fill: var(--orange);
}

.route-cp.skipped .cp-tag rect {
  fill: #ffd7c8;
  stroke: var(--red);
}

.route-cp.active .cp-tag text {
  fill: white;
}

.route-cp.skipped .cp-tag text {
  fill: var(--red);
}

.rider {
  position: absolute;
  left: 49.3%;
  top: 75.2%;
  z-index: 3;
  width: 46px;
  height: 31px;
  transform: translate(-50%, -86%);
  filter: drop-shadow(2px 2px 0 white) drop-shadow(-1px 0 0 var(--ink));
  transition: left 260ms cubic-bezier(.2,.8,.2,1), top 260ms cubic-bezier(.2,.8,.2,1);
  animation: rider-bob .48s ease-in-out infinite;
}

.rider svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.rider .speed-lines,
.rider .bike-frame,
.rider .rider-body,
.rider .helmet-stripe {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rider .speed-lines {
  stroke: #9bd4e2;
  stroke-width: 2.5;
  opacity: .9;
}

.rider .wheel {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 5;
  transform-box: fill-box;
  transform-origin: center;
  animation: wheel-spin .42s linear infinite;
}

.rider .bike-frame {
  stroke: var(--ink);
  stroke-width: 5;
}

.rider .rider-body {
  fill: none;
  stroke: var(--orange);
  stroke-width: 7;
}

.rider .leg-a,
.rider .leg-b {
  animation: pedal-kick .42s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: top center;
}

.rider .leg-b {
  animation-direction: alternate-reverse;
}

.rider .helmet {
  fill: var(--orange);
  stroke: var(--ink);
  stroke-width: 5;
}

.rider .helmet-stripe {
  stroke: var(--paper);
  stroke-width: 3;
}

@keyframes rider-bob {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -2px; }
}

@keyframes wheel-spin {
  to { transform: rotate(360deg); }
}

@keyframes pedal-kick {
  to { transform: rotate(12deg); }
}

.map-label {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  font-weight: 900;
}

.map-label.sea {
  top: 10px;
}

.map-label.berlin {
  bottom: 12px;
}

.position-status {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 900;
}

.quiet-card {
  background: #fff8ef;
}

.modal {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(6, 36, 63, 0.72);
}

.modal.show {
  display: flex;
}

.modal .card {
  margin: 0;
  transform: rotate(-1deg);
}

.incoming-message-modal {
  z-index: 40;
}

.incoming-message-card {
  border-color: var(--orange);
  box-shadow: 8px 8px 0 var(--ink);
}

.incoming-message-card p {
  white-space: pre-wrap;
}

.result[hidden],
.modal[hidden] {
  display: none;
}

.result {
  margin-top: 18px;
}

.scan-nice-toast {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 35;
  display: grid;
  place-items: center;
  min-width: 154px;
  padding: 18px 24px;
  border: 5px solid var(--ink);
  border-radius: 24px;
  color: white;
  background: var(--orange);
  box-shadow: 8px 8px 0 var(--ink);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 1px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.75) rotate(-4deg);
}

.scan-nice-toast.show {
  animation: nice-pop 900ms cubic-bezier(.18, 1.45, .35, 1) both;
}

@keyframes nice-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.55) rotate(-8deg);
  }

  18% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08) rotate(-3deg);
  }

  68% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(-4deg);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -58%) scale(0.92) rotate(2deg);
  }
}

@media (max-width: 850px) {
  .wrap {
    grid-template-columns: 1fr;
    place-items: center;
  }

  .info {
    order: -1;
    max-width: 620px;
  }

  .phone {
    width: 360px;
    height: 760px;
  }
}

@media (max-width: 600px) {
  body {
    display: block;
    padding: 0;
    background: var(--cream);
  }

  .wrap {
    max-width: none;
    min-height: 100vh;
  }

  .phone {
    width: 100%;
    height: 100vh;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .screen {
    border: 0;
    border-radius: 0;
  }

  .status {
    display: none;
  }

  .app {
    height: 100vh;
  }
}

.live-track-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.live-track-head span{padding:5px 9px;border:2px solid var(--navy);border-radius:999px;font-size:11px;font-weight:900}.live-track-card.is-active .live-track-head span{background:#1e7655;color:#fff}.live-track-card.is-paused .live-track-head span{background:#ffd66b}.live-background-option{display:flex;gap:9px;align-items:flex-start;margin:14px 0;font-weight:800;font-size:14px}.live-background-option input{width:19px;height:19px;accent-color:var(--orange)}.live-track-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}.live-track-actions .full{grid-column:1/-1}.live-track-end{color:#9e261f}.live-track-card .position-status{display:block;margin-top:11px}

.live-background-option {
  align-items: center;
}

.live-background-option input {
  flex: 0 0 19px;
  margin: 0;
}

.live-background-hint {
  display: block;
  margin: -5px 0 14px 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.live-track-actions [hidden] {
  display: none !important;
}

.live-background-settings[hidden] {
  display: none !important;
}

.live-track-card.is-ended .live-track-head span {
  background: var(--navy);
  color: white;
}

.time-limit-snooze-hint {
  display: grid;
  grid-template-columns: 12px 1fr;
  align-items: start;
  margin: 12px 0 0;
}
