:root {
  --ink: #06243f;
  --orange: #ff5a1f;
  --cream: #fff4df;
  --paper: #fffdf7;
  --sea: #bcecf4;
  --green: #39a96b;
  --red: #e04444;
  --muted: #637381;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 28px;
  color: var(--ink);
  background: linear-gradient(135deg, #fff4df, #f7ead2);
  font-family: Inter, Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  font: inherit;
}

.wrap {
  width: 100%;
  max-width: 1050px;
  display: grid;
  grid-template-columns: 380px minmax(300px, 520px);
  gap: 34px;
  align-items: center;
}

.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 {
  height: calc(100% - 34px);
  display: flex;
  flex-direction: column;
}

.top {
  position: relative;
  min-height: 104px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 12px;
  border-bottom: 4px solid var(--ink);
  background: var(--paper);
}

.top-copy {
  max-width: calc(100% - 112px);
}

.app-logo {
  width: 98px;
  height: 68px;
  object-fit: contain;
  object-position: center;
  border: 3px solid var(--ink);
  border-radius: 15px;
  background: white;
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(2deg);
}

.badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  color: white;
  background: var(--ink);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 1px;
}

h1 {
  margin: 13px 0 8px;
  font-size: 38px;
  line-height: 0.9;
  font-weight: 1000;
  letter-spacing: -2px;
}

h2 {
  margin: 8px 0;
  font-size: 32px;
  line-height: 1;
  font-weight: 1000;
}

h3 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1;
  font-weight: 1000;
}

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;
}

.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: 1000;
}

.progress {
  height: 16px;
  overflow: hidden;
  margin-top: 10px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: white;
}

.bar {
  width: 37.5%;
  height: 100%;
  background: var(--orange);
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.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;
}

.btn,
.tab {
  border: 0;
  cursor: pointer;
}

.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: 1000;
  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;
}

.buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.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: 1000;
}

.done .dot {
  color: white;
  background: var(--green);
}

.current .dot {
  color: white;
  background: var(--orange);
}

.cp small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.tabbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 4px solid var(--ink);
  background: var(--paper);
}

.tab {
  padding: 10px 4px;
  color: var(--ink);
  background: transparent;
  font-size: 11px;
  font-weight: 1000;
  text-align: center;
}

.tab.active {
  color: white;
  background: var(--orange);
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.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-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;
}

.rider {
  position: absolute;
  left: 49.3%;
  top: 75.2%;
  z-index: 3;
  font-size: 32px;
  transform: translate(-50%, -50%);
  filter: drop-shadow(2px 2px 0 white) drop-shadow(-1px 0 0 var(--ink));
  transition: left 180ms ease, top 180ms ease;
}

.map-label {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  font-weight: 1000;
}

.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;
}

.info h2 {
  margin: 0 0 14px;
  font-size: 44px;
  line-height: 0.92;
  font-weight: 1000;
  letter-spacing: -2px;
}

.info p {
  max-width: 520px;
  font-size: 20px;
  font-weight: 750;
}

.pill {
  display: inline-block;
  margin: 4px;
  padding: 8px 12px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: white;
  font-weight: 900;
}

.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);
}

.result[hidden],
.modal[hidden] {
  display: none;
}

@media (max-width: 850px) {
  .wrap {
    grid-template-columns: 1fr;
    place-items: center;
  }

  .info {
    max-width: 375px;
  }

  .phone {
    width: 360px;
    height: 760px;
  }
}

@media (max-width: 420px) {
  body {
    padding: 16px;
  }

  .phone {
    width: min(350px, 100%);
    height: 742px;
  }
}
