:root {
  --bg: oklch(95.6% 0.023 294.1);
  --surface: oklch(100% 0 89.9);
  --fg: oklch(32.8% 0.014 285.6);
  --muted: oklch(67.7% 0.030 297.0);
  --border: oklch(89.5% 0.037 295.8);
  --accent: oklch(61.2% 0.219 295.3);
  --accent-end: oklch(69.2% 0.199 20.2);
  --canvas-shell: #dad4f2;
  --text-main: #3c3c44;
  --text-strong: #33343c;
  --text-tab: #3d3d43;
  --text-history: #393942;
  --muted-soft: #9d99ad;
  --muted-card: #9f9bb1;
  --muted-deep: #8d899c;
  --muted-launcher: #766f8c;
  --nav-idle: #b7a5f4;
  --icon-soft: #b6a4f3;
  --bank-soft: #b69ff4;
  --count-text: #55525f;
  --divider-soft: #d4c8f4;
  --divider-dash: #d7cdef;
  --pill-border: #d2c4ef;
  --pill-text: #b4a2e6;
  --input-text: #777383;
  --qr-ink: #3f4149;
  --cta-start: #9800f6;
  --cta-mid: #c120ca;
  --cta-menu-start: #9300f6;
  --cta-end: #ff5b62;
  --scan-line: #e25c61;
  --dark-field: oklch(25.7% 0.006 214.4);
  --ticket-head: oklch(37.8% 0.019 277.3);
  --success: oklch(78% 0.161 148.5);
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --shadow-card: 0 22px 48px rgba(117, 92, 170, .13);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--canvas-shell);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.phone {
  position: relative;
  width: min(100vw, 393px);
  height: 852px;
  min-height: 852px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 24px 60px rgba(61, 51, 94, .22);
}

.appbar {
  position: relative;
  z-index: 20;
  height: 60px;
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 18px;
}

.appbar h1 {
  margin: 0;
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.appbar--center h1 {
  position: absolute;
  left: 56px;
  right: 56px;
  text-align: center;
}

.appbar__spacer {
  flex: 1;
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--accent);
  display: grid;
  place-items: center;
  border-radius: 22px;
  cursor: pointer;
}

.icon-button svg {
  width: 24px;
  height: 24px;
}

.screen-body {
  position: absolute;
  inset: 60px 0 0;
  overflow: hidden;
  background: var(--bg);
}

.screen-body--menu {
  inset: 0;
}

.screen-body--scan {
  background: var(--dark-field);
}

.screen-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 18px 16px 142px;
}

.screen-scroll::-webkit-scrollbar {
  display: none;
}

.soft-landscape {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 70px;
  height: 332px;
  overflow: hidden;
  pointer-events: none;
  opacity: .88;
}

.soft-landscape::before,
.soft-landscape::after {
  content: "";
  position: absolute;
  bottom: -50px;
  background: oklch(88% 0.055 294 / .58);
}

.soft-landscape::before {
  left: 21px;
  width: 214px;
  height: 306px;
  border-radius: 92px 108px 55px 44px / 114px 143px 65px 54px;
  transform: rotate(1deg);
  box-shadow:
    210px 64px 0 22px oklch(94% 0.027 294 / .8),
    295px 103px 0 14px oklch(90% 0.042 294 / .35);
}

.soft-landscape::after {
  right: -17px;
  width: 165px;
  height: 227px;
  border-radius: 65px 88px 44px 82px / 94px 74px 48px 72px;
  opacity: .45;
}

.leaf {
  position: absolute;
  z-index: 1;
  width: 19px;
  height: 8px;
  border-radius: 100% 0 100% 0;
  background: oklch(82% 0.072 294 / .45);
  transform: rotate(42deg);
}

.leaf.one { left: 70px; bottom: 202px; }
.leaf.two { left: 211px; bottom: 160px; width: 15px; transform: rotate(-24deg); }
.leaf.three { right: 82px; bottom: 129px; width: 14px; opacity: .55; }

.empty-state {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 126px 34px 0;
}

.empty-state--payment {
  padding-top: 166px;
}

.ticket-mark {
  width: 54px;
  height: 44px;
  margin-bottom: 34px;
}

.bank-mark {
  width: 70px;
  height: 70px;
  margin-bottom: 46px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 25px 45px rgba(122, 100, 178, .18);
  color: var(--bank-soft);
}

.bank-mark svg {
  width: 40px;
  height: 40px;
}

.empty-state h2 {
  margin: 0 0 17px;
  color: var(--text-main);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.empty-state p {
  margin: 0;
  color: var(--muted-soft);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.42;
  max-width: 290px;
}

.quickpay-card {
  position: absolute;
  z-index: 5;
  left: 16px;
  right: 16px;
  bottom: 142px;
  min-height: 112px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .96);
  padding: 18px 15px 15px;
  box-shadow: var(--shadow-card);
}

.quickpay-card h3 {
  margin: 0 0 9px;
  color: var(--text-main);
  font-size: 15.5px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.quickpay-card p {
  width: 238px;
  margin: 0 0 14px;
  color: var(--muted-card);
  font-size: 13.2px;
  line-height: 1.36;
}

.quickpay-card a {
  color: var(--accent);
  font-size: 13.8px;
  font-weight: 400;
}

.quickpay-card__bank {
  position: absolute;
  right: 20px;
  bottom: 19px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  display: grid;
  place-items: center;
}

.quickpay-card__bank svg {
  width: 16px;
  height: 16px;
}

.primary-cta,
.secondary-cta {
  border: 0;
  min-height: 52px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-align: center;
  font-size: 13.2px;
  font-weight: 500;
  letter-spacing: .045em;
  text-transform: uppercase;
  transition: transform .16s ease, opacity .16s ease, box-shadow .16s ease;
  touch-action: manipulation;
}

.primary-cta {
  position: absolute;
  z-index: 9;
  left: 16px;
  right: 16px;
  bottom: 78px;
  color: #fff;
  background: linear-gradient(93deg, var(--cta-start) 0%, var(--cta-mid) 45%, var(--cta-end) 100%);
  box-shadow: 0 18px 28px rgba(150, 0, 245, .17);
}

.primary-cta.is-pressing,
.secondary-cta.is-pressing,
.history-card.is-pressing,
.menu-row.is-pressing {
  transform: scale(.985);
}

.cta-row {
  position: absolute;
  z-index: 9;
  left: 16px;
  right: 16px;
  bottom: 78px;
  display: grid;
  grid-template-columns: .92fr 1fr;
  gap: 10px;
}

.cta-row .primary-cta,
.cta-row .secondary-cta {
  position: static;
  width: 100%;
}

.secondary-cta {
  background: #fff;
  color: var(--text-main);
  box-shadow: 0 15px 25px rgba(113, 94, 160, .11);
}

.tabbar {
  position: absolute;
  z-index: 12;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  border-radius: 14px 14px 0 0;
  background: rgba(255, 255, 255, .98);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  box-shadow: 0 -11px 28px rgba(112, 96, 157, .09);
}

.tabbar a {
  min-height: 64px;
  padding-top: 9px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 2px;
  color: var(--nav-idle);
  font-size: 12px;
  font-weight: 400;
}

.tabbar svg {
  width: 23px;
  height: 23px;
}

.tabbar a.active {
  color: var(--text-tab);
}

.tabbar a.active svg {
  color: var(--accent);
}

.history-group {
  position: relative;
  z-index: 3;
  margin-bottom: 24px;
}

.history-date {
  margin: 0 0 11px;
  color: var(--muted-soft);
  font-size: 13.5px;
}

.history-card {
  min-height: 82px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .9);
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  margin-bottom: 13px;
  box-shadow: 0 12px 34px rgba(122, 100, 178, .08);
  transition: transform .16s ease;
}

.history-card svg {
  color: var(--icon-soft);
  width: 28px;
  height: 28px;
}

.history-title {
  display: block;
  font-size: 16px;
  line-height: 1.1;
  color: var(--text-history);
}

.history-time {
  display: block;
  color: var(--muted-deep);
  font-size: 14px;
  line-height: 1.28;
}

.history-count {
  color: var(--count-text);
  font-size: 16px;
}

.profile-card {
  height: 158px;
  border-radius: 0 0 24px 24px;
  background: linear-gradient(94deg, var(--cta-menu-start) 0%, var(--cta-mid) 50%, var(--cta-end) 100%);
  color: #fff;
  padding: 50px 16px 18px;
  position: relative;
}

.profile-email {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .01em;
}

.region-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 0 14px;
  border: 1.4px solid rgba(255, 255, 255, .88);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
}

.region-pill svg {
  width: 20px;
  height: 20px;
}

.profile-info {
  position: absolute;
  right: 18px;
  bottom: 27px;
  width: 23px;
  height: 23px;
  color: rgba(255, 255, 255, .9);
}

.menu-list {
  padding: 30px 0 0;
}

.menu-row {
  min-height: 64px;
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  padding: 0 18px;
  color: var(--text-main);
  font-size: 17px;
  transition: transform .16s ease;
}

.menu-row svg {
  color: var(--accent);
  width: 26px;
  height: 26px;
}

.scan-field {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, .03), transparent 27%),
    var(--dark-field);
}

.scan-line {
  position: absolute;
  left: 47px;
  right: 45px;
  top: 47.3%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--scan-line) 10%, var(--scan-line) 90%, transparent);
  box-shadow: 0 0 13px rgba(226, 92, 97, .18);
}

.scan-help {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 92px;
  color: #fff;
  text-align: center;
  font-size: 15.5px;
  line-height: 1.25;
  font-weight: 500;
}

.scan-cta {
  bottom: 28px;
}

.scrim {
  position: absolute;
  z-index: 30;
  inset: 0;
  background: rgba(30, 30, 34, .55);
}

.code-modal {
  position: absolute;
  z-index: 31;
  left: 28px;
  right: 28px;
  top: 302px;
  min-height: 218px;
  border-radius: 24px;
  background: #fff;
  padding: 24px 16px 16px;
  box-shadow: 0 24px 60px rgba(36, 30, 52, .22);
}

.code-modal h2 {
  margin: 0 0 10px;
  font-size: 21px;
  font-weight: 400;
  line-height: 1.1;
}

.code-modal p {
  margin: 0 0 22px;
  color: var(--muted-soft);
  font-size: 14px;
}

.code-field {
  position: relative;
  margin-bottom: 18px;
}

.code-field label {
  position: absolute;
  z-index: 2;
  left: 14px;
  top: -11px;
  padding: 0 6px;
  background: #fff;
  color: var(--accent);
  font-size: 13px;
}

.code-field input {
  width: 100%;
  height: 54px;
  border: 2px solid var(--accent);
  border-radius: 9px;
  outline: 0;
  padding: 0 17px;
  color: var(--input-text);
  font-size: 17px;
  caret-color: var(--accent);
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 52px;
  align-items: center;
  gap: 10px;
}

.modal-link {
  min-height: 52px;
  border: 0;
  background: transparent;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.modal-link svg {
  width: 21px;
  height: 21px;
}

.modal-ok {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  letter-spacing: .03em;
}

.modal-ok:disabled {
  opacity: .42;
  cursor: default;
}

.active-stack {
  position: relative;
  z-index: 3;
  padding: 18px 16px 148px;
}

.ticket-panel {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(112, 97, 164, .1);
}

.ticket-panel__head {
  height: 60px;
  background: var(--ticket-head);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  font-size: 21px;
  font-weight: 400;
}

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

.ticket-panel__time svg {
  width: 22px;
  height: 22px;
}

.timer-body {
  height: 108px;
  background: rgba(255, 255, 255, .58);
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  text-align: center;
}

.timer-sep {
  height: 64px;
  background: var(--divider-soft);
}

.timer-value {
  display: block;
  color: var(--text-strong);
  font-size: 44px;
  font-weight: 400;
  line-height: .96;
  letter-spacing: -0.03em;
}

.timer-label {
  color: color-mix(in oklch, var(--text-strong) 90%, var(--fg));
  font-size: 14px;
}

.ride-panel {
  margin-top: 2px;
  min-height: 218px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .87);
  overflow: hidden;
  text-align: center;
  box-shadow: 0 16px 36px rgba(112, 97, 164, .1);
}

.ride-top {
  min-height: 98px;
  padding: 24px 16px 15px;
}

.ride-fare {
  color: var(--text-main);
  font-size: 21px;
  line-height: 1.05;
}

.ride-pill {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 9px;
  border: 1px solid var(--pill-border);
  border-radius: 14px;
  color: var(--pill-text);
  font-size: 12.5px;
  vertical-align: 4px;
  margin-left: 8px;
}

.ride-company {
  margin-top: 18px;
  color: var(--muted-soft);
  font-size: 16px;
}

.ride-divider {
  border: 0;
  border-top: 1.5px dashed var(--divider-dash);
  margin: 0;
}

.ride-route {
  min-height: 118px;
  padding: 27px 16px 20px;
  color: var(--text-strong);
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -.02em;
}

.ride-route small {
  display: block;
  margin-top: 18px;
  font-size: 32px;
}

.present-wrap {
  position: relative;
  z-index: 3;
  padding: 24px 16px 0;
}

.present-timer {
  height: 120px;
  border-radius: 22px 22px 0 0;
  background: rgba(255, 255, 255, .62);
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  text-align: center;
}

.present-card {
  min-height: 372px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  margin-top: -1px;
  text-align: center;
  padding: 23px 16px 25px;
  box-shadow: 0 20px 42px rgba(112, 97, 164, .11);
}

.present-card h2 {
  margin: 0 0 22px;
  font-size: 23px;
  font-weight: 400;
  letter-spacing: -.02em;
}

.qr-code {
  width: 156px;
  height: 156px;
  margin: 0 auto 24px;
  color: var(--qr-ink);
  display: grid;
  place-items: center;
}

.qr-code svg {
  display: block;
  width: 100%;
  height: 100%;
}

.present-card p {
  margin: 0 0 10px;
  color: var(--text-main);
  font-size: 16px;
}

.check-code {
  color: var(--accent);
  font-size: 48px;
  font-weight: 400;
  letter-spacing: .04em;
}

.launcher {
  padding: 34px 20px 44px;
}

.launcher h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 31px;
  line-height: 1.06;
  letter-spacing: -.02em;
}

.launcher p {
  margin: 0 0 24px;
  color: var(--muted-launcher);
  font-size: 16px;
  line-height: 1.45;
}

.launcher-grid {
  display: grid;
  gap: 12px;
}

.launcher-card {
  min-height: 78px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .88);
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  box-shadow: 0 14px 34px rgba(112, 97, 164, .08);
}

.launcher-card svg {
  width: 32px;
  height: 32px;
  color: var(--accent);
}

.launcher-card strong {
  display: block;
  font-size: 17px;
  font-weight: 500;
}

.launcher-card span {
  color: color-mix(in oklch, var(--muted-soft) 90%, var(--fg));
  font-size: 13px;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 106px;
  z-index: 50;
  transform: translateX(-50%) translateY(14px);
  opacity: 0;
  pointer-events: none;
  min-width: 230px;
  min-height: 44px;
  border-radius: 22px;
  background: rgba(42, 39, 52, .92);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
  transition: opacity .18s ease, transform .18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 430px) {
  body {
    background: var(--bg);
  }

  .phone {
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    box-shadow: none;
  }
}

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