:root {
  --paper: #E0DFCA;
  --info-bg: #D5D3BC;
  --muted: #66665d;
  --line: #9d9c8e;
  --brown: #6d501f;
  --orange: #fb971f;
  --ink: #000;
  --white: #fff;
  --bottom: 72px;
  --tabbar-lift: 20px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  overscroll-behavior: none;
  user-select: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.app {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  isolation: isolate;
  touch-action: none;
}

.view {
  position: absolute;
  inset: 0 0 calc(var(--bottom) + var(--tabbar-lift));
  display: none;
  overflow: hidden;
  padding: calc(32px + env(safe-area-inset-top)) 24px 26px;
}

.view.is-active {
  display: block;
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  min-height: 112px;
}

.notify {
  height: 32px;
  min-width: 136px;
  padding: 0 12px 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 999px;
  background: var(--white);
  font-size: 16px;
  font-weight: 500;
}

.notify svg,
.small-icon svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
  flex: 0 0 auto;
}

.small-icon svg {
  width: 18px;
  height: 18px;
}

.reserve-card {
  position: relative;
  width: 100%;
  min-height: 514px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  overflow: visible;
  outline: none;
  perspective: 1100px;
}

.reserve-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(251, 151, 31, .35);
}

.card-inner {
  position: absolute;
  inset: 0;
  transform: rotateY(var(--card-rotation, 0deg));
  transform-origin: center center;
  transform-style: preserve-3d;
  transition: transform .52s cubic-bezier(.2, .7, .2, 1);
  will-change: transform;
}

.card-face {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.card-front {
  background: var(--info-bg);
}

.card-back {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 58px 24px 24px;
  background: #f7f7f7;
  transform: rotateY(180deg);
}

.qr-title {
  margin: 0 0 30px;
  color: #000;
  font-size: 16px;
  line-height: 1.1;
  font-weight: 430;
  text-align: center;
}

.qr-window {
  position: relative;
  width: min(315px, 100%);
  aspect-ratio: 1;
  overflow: hidden;
  background: #fff;
}

.qr-window img {
  position: absolute;
  left: 0;
  top: 0;
  width: 413px;
  height: auto;
  max-width: none;
  image-rendering: pixelated;
  transform: translate(-49px, -321px);
  transform-origin: 0 0;
}

.card-top h1 {
  position: absolute;
  left: 16px;
  top: 25px;
  margin: 0;
  font-size: 22px;
  line-height: 1;
  font-weight: 600;
}

.trident {
  position: absolute;
  right: 15px;
  top: 23px;
  width: 32px;
  height: auto;
  display: block;
}

.identity {
  position: absolute;
  left: 16px;
  top: 71px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.portrait {
  position: relative;
  width: min(156px, 43vw);
  height: 208px;
  border-radius: 7px;
  overflow: hidden;
  background: #f9f9f9;
  flex: 0 0 auto;
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.details {
  width: 160px;
}

.label {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.12;
  font-weight: 500;
}

.label.gap {
  margin-top: 19px;
}

.label-birth {
  white-space: nowrap;
}

.value {
  margin: 7px 0 0;
  color: #000;
  font-size: 19px;
  line-height: 1.08;
  font-weight: 500;
}

.value.multi {
  margin-top: 7px;
}

.ticker {
  position: absolute;
  left: 0;
  top: 340px;
  width: 100%;
  height: 24px;
  overflow: hidden;
  background: var(--brown);
  color: var(--white);
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 18s linear infinite;
}

.ticker-track span {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1;
  font-weight: 600;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.person {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
}

.person-label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.15;
  font-weight: 500;
}

.person-name {
  margin: 0;
  color: #000;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 470;
}

.plus {
  position: absolute;
  right: -1px;
  bottom: 0;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--orange);
  padding: 0;
}

.plus::before,
.plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 4px;
  border-radius: 1px;
  background: #000;
  transform: translate(-50%, -50%);
}

.plus::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.page-head h2 {
  margin: 0;
  font-size: 31px;
  line-height: 1;
  font-weight: 650;
}

.small-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--white);
}

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

.tile,
.list-row {
  border: 1px solid rgba(0, 0, 0, .1);
  background: rgba(255, 255, 255, .52);
  text-align: left;
}

.tile {
  min-height: 112px;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 17px;
  font-weight: 600;
}

.tile-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #000;
  color: #fff;
  font-size: 17px;
  font-weight: 650;
}

.list {
  display: grid;
  gap: 10px;
}

.list-row {
  min-height: 72px;
  width: 100%;
  border-radius: 8px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.list-row span {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.list-row strong {
  font-size: 18px;
  line-height: 1.05;
  font-weight: 600;
}

.list-row small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.15;
  font-weight: 500;
}

.list-row b {
  font-size: 31px;
  line-height: 1;
  font-weight: 400;
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--tabbar-lift);
  width: 100vw;
  height: var(--bottom);
  background: var(--white);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
  padding-top: 10px;
  padding-bottom: 0;
  z-index: 3;
}

.tabbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: var(--tabbar-lift);
  background: var(--white);
}

.tab {
  min-width: 0;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
}

.tab svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab.is-active {
  color: #000;
}

.tab:not(.is-active) {
  color: #000;
  font-weight: 500;
}

.tab:not(.is-active) svg {
  stroke-width: 2.35;
}

.tab .icon-fill {
  fill: currentColor;
  stroke: none;
}

.tab .icon-cut {
  fill: none;
  stroke: #fff;
  stroke-width: 2.6;
  stroke-linecap: square;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 8;
  background: rgba(0, 0, 0, .24);
}

.sheet {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 9;
  border-radius: 18px;
  background: #f7f7f4;
  padding: 9px 14px 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .24);
}

.grabber {
  width: 39px;
  height: 4px;
  margin: 0 auto 13px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .22);
}

.sheet h3 {
  margin: 0 0 13px;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 650;
}

.sheet p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 450;
}

.sheet-actions {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.sheet-action,
.sheet-close {
  min-height: 48px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: #fff;
  font-size: 17px;
  font-weight: 600;
}

.sheet-action.primary {
  background: var(--orange);
}

.sheet-close {
  margin-top: 9px;
}

.toast {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: calc(var(--bottom) + var(--tabbar-lift) + 18px);
  z-index: 10;
  min-height: 44px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .86);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .18s ease, transform .18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 431px) {
  body {
    background: var(--paper);
  }

  .app {
    min-height: 100dvh;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .05);
  }
}

@media (max-width: 374px) {
  .identity {
    gap: 12px;
  }

  .details {
    width: 132px;
  }

  .label,
  .person-label {
    font-size: 16px;
  }

  .value {
    font-size: 18px;
  }
}
