:root {
  color-scheme: light;
  --ink: #15332f;
  --forest: #103f3b;
  --forest-deep: #092d2a;
  --cream: #f5eddd;
  --paper: #fffdf7;
  --butter: #f4c768;
  --orange: #ed7448;
  --mint: #c8e8dc;
  --muted: #6f827d;
  --line: rgba(21, 51, 47, 0.12);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--forest-deep);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  color: white;
  background:
    radial-gradient(circle at 17% 4%, rgba(81, 151, 132, 0.38), transparent 31%),
    radial-gradient(circle at 86% 91%, rgba(244, 199, 104, 0.14), transparent 27%),
    var(--forest-deep);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.screen {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  min-height: 100dvh;
  padding: clamp(22px, 2.4vw, 44px) clamp(26px, 3.2vw, 62px) clamp(16px, 1.7vw, 30px);
  overflow: hidden;
  isolation: isolate;
}

.screen::before,
.screen::after {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.screen::before {
  top: -26vw;
  left: 41%;
  width: 58vw;
  height: 58vw;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 0 0 8vw rgba(255, 255, 255, 0.018),
    0 0 0 16vw rgba(255, 255, 255, 0.012);
}

.screen::after {
  right: -12vw;
  bottom: -18vw;
  width: 38vw;
  height: 38vw;
  background: rgba(244, 199, 104, 0.055);
  filter: blur(2px);
}

.topbar,
.topbar-right,
.brand,
.brand-copy,
.topbar-message,
.step-strip,
.step-strip > div,
.menu-heading,
.trust-row,
.pay-kicker,
.channel-row,
.channel,
.vehicle-line,
footer {
  display: flex;
  align-items: center;
}

.topbar {
  min-height: 62px;
  justify-content: space-between;
}

.brand {
  gap: 14px;
  color: white;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px 18px 18px 5px;
  color: var(--forest-deep);
  background: var(--butter);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 2px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.brand-copy {
  align-items: flex-start;
  flex-direction: column;
}

.brand-copy strong {
  font-size: 23px;
  letter-spacing: 5px;
}

.brand-copy small {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.52);
  font: 700 9px/1.2 ui-monospace, monospace;
  letter-spacing: 1.8px;
}

.topbar-message {
  gap: 10px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  letter-spacing: 2px;
}

.topbar-message span {
  width: 26px;
  height: 1px;
  background: var(--butter);
}

.topbar-right {
  gap: clamp(12px, 1.5vw, 24px);
}

#clock {
  color: white;
  font: 700 clamp(20px, 1.7vw, 28px)/1 ui-monospace, monospace;
  letter-spacing: -1px;
}

.status-badge,
.business-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status-badge {
  padding: 8px 13px;
  color: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.status-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--butter);
  box-shadow: 0 0 0 4px rgba(244, 199, 104, 0.12);
}

.status-badge--online i {
  background: #55d6a9;
  box-shadow: 0 0 0 4px rgba(85, 214, 169, 0.12);
}

.status-badge--offline i {
  background: #ff826d;
  box-shadow: 0 0 0 4px rgba(255, 130, 109, 0.12);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 8px 14px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  cursor: pointer;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(430px, 0.72fr);
  gap: clamp(24px, 3vw, 54px);
  min-height: 0;
  padding: clamp(22px, 3vh, 36px) 0 clamp(18px, 2.4vh, 28px);
}

.story-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

.story-copy {
  position: relative;
  padding-left: clamp(12px, 1.8vw, 32px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 clamp(12px, 1.8vh, 20px);
  color: var(--butter);
  font: 800 clamp(10px, 0.8vw, 13px)/1 ui-monospace, monospace;
  letter-spacing: 3.2px;
}

.eyebrow span {
  width: 32px;
  height: 2px;
  background: var(--butter);
}

h1 {
  margin: 0;
  font-size: clamp(50px, 4.8vw, 86px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.055em;
}

h1 em {
  color: var(--butter);
  font-style: normal;
}

.intro {
  max-width: 720px;
  margin: clamp(16px, 2vh, 24px) 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: clamp(13px, 1vw, 17px);
  line-height: 1.75;
}

.step-strip {
  gap: clamp(13px, 1.5vw, 24px);
  max-width: 790px;
  margin-top: clamp(20px, 2.6vh, 30px);
}

.step-strip > div {
  gap: 10px;
  white-space: nowrap;
}

.step-strip b {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: var(--butter);
  font: 800 10px/1 ui-monospace, monospace;
}

.step-strip span {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

.step-strip strong {
  font-size: 13px;
}

.step-strip small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
}

.step-strip > i {
  flex: 1;
  max-width: 54px;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}

.menu-board {
  align-self: end;
  margin-top: clamp(24px, 3.4vh, 40px);
  padding: clamp(22px, 2vw, 34px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px 30px 30px 8px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.65), transparent 46%),
    var(--cream);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.2);
}

.menu-heading {
  justify-content: space-between;
  margin-bottom: 15px;
}

.menu-heading span {
  color: var(--orange);
  font: 800 9px/1 ui-monospace, monospace;
  letter-spacing: 2.7px;
}

.menu-heading h2 {
  margin: 5px 0 0;
  font-size: clamp(21px, 1.7vw, 29px);
  line-height: 1;
}

.menu-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

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

.product-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  min-height: 64px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.product-index {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 12px;
  color: var(--forest);
  background: rgba(16, 63, 59, 0.1);
  font: 900 10px/1 ui-monospace, monospace;
}

.product-card--featured .product-index {
  color: var(--forest-deep);
  background: var(--butter);
}

.product-card div {
  min-width: 0;
}

.product-card strong,
.product-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card strong {
  color: var(--ink);
  font-size: clamp(13px, 1vw, 16px);
}

.product-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.product-card b {
  color: var(--orange);
  font-size: clamp(17px, 1.25vw, 22px);
  white-space: nowrap;
}

.trust-row {
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 10px;
}

.trust-row span::before {
  margin-right: 6px;
  color: var(--forest);
  content: "●";
  font-size: 7px;
}

.pay-panel {
  position: relative;
  display: flex;
  align-self: center;
  flex-direction: column;
  width: min(100%, 520px);
  max-height: 100%;
  justify-self: end;
  padding: clamp(24px, 2.2vw, 38px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 34px 34px 34px 10px;
  color: var(--ink);
  background:
    radial-gradient(circle at 100% 0, rgba(244, 199, 104, 0.24), transparent 28%),
    var(--paper);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.3);
}

.pay-panel::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 38%;
  height: 7px;
  border-radius: 0 0 8px 0;
  background: var(--butter);
  content: "";
}

.pay-kicker {
  justify-content: space-between;
}

.pay-kicker > span {
  color: var(--orange);
  font: 900 9px/1 ui-monospace, monospace;
  letter-spacing: 3px;
}

.pay-kicker b {
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--forest);
  background: rgba(16, 63, 59, 0.08);
  font-size: 10px;
  letter-spacing: 1px;
}

.pay-heading {
  margin-top: clamp(12px, 1.5vh, 18px);
  text-align: center;
}

.pay-heading h2 {
  margin: 0;
  font-size: clamp(30px, 2.5vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.pay-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.qr-stage {
  display: grid;
  place-items: center;
  margin: clamp(14px, 1.8vh, 20px) 0;
}

.qr-shell {
  position: relative;
  display: grid;
  width: min(30vh, 17vw, 300px);
  min-width: 208px;
  aspect-ratio: 1;
  place-items: center;
  padding: 15px;
  border: 1px solid rgba(16, 63, 59, 0.11);
  background: white;
  box-shadow: 0 16px 38px rgba(16, 63, 59, 0.08);
}

#qrImage {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.25s ease;
}

#qrImage.ready {
  opacity: 1;
}

.qr-corner {
  position: absolute;
  width: 25px;
  height: 25px;
  border-color: var(--orange);
  border-style: solid;
}

.qr-corner--tl {
  top: -3px;
  left: -3px;
  border-width: 3px 0 0 3px;
}

.qr-corner--tr {
  top: -3px;
  right: -3px;
  border-width: 3px 3px 0 0;
}

.qr-corner--bl {
  bottom: -3px;
  left: -3px;
  border-width: 0 0 3px 3px;
}

.qr-corner--br {
  right: -3px;
  bottom: -3px;
  border-width: 0 3px 3px 0;
}

.qr-loading {
  position: absolute;
  display: flex;
  gap: 6px;
}

.qr-loading span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--forest);
  animation: bounce 1s infinite alternate;
}

.qr-loading span:nth-child(2) {
  animation-delay: 0.16s;
}

.qr-loading span:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes bounce {
  to {
    opacity: 0.2;
    transform: translateY(-8px);
  }
}

.channel-row {
  gap: 10px;
}

.channel {
  flex: 1;
  gap: 9px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(16, 63, 59, 0.025);
}

.channel > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.channel--wechat > span {
  background: #07c160;
}

.channel--alipay > span {
  background: #1677ff;
}

.channel div {
  min-width: 0;
}

.channel strong,
.channel small {
  display: block;
  white-space: nowrap;
}

.channel strong {
  font-size: 12px;
}

.channel small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
}

.pay-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

.vehicle-line {
  justify-content: space-between;
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.vehicle-line > div {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

.vehicle-line small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 2px;
}

.vehicle-line strong {
  margin-top: 4px;
  font: 900 14px/1 ui-monospace, monospace;
}

.business-badge {
  padding: 7px 12px;
  color: #197253;
  background: #e3f6ed;
}

.business-badge--closed {
  color: #ad493d;
  background: #fff0ed;
}

footer {
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  font: 700 9px/1.2 ui-monospace, monospace;
  letter-spacing: 1.8px;
}

footer a {
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
}

footer a:hover {
  color: var(--butter);
}

.error-banner {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  max-width: 360px;
  padding: 14px 18px;
  border: 1px solid #f2c7be;
  border-radius: 16px;
  color: var(--ink);
  background: #fff6f2;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
}

.error-banner strong,
.error-banner span {
  display: block;
}

.error-banner strong {
  color: #a23c30;
  font-size: 13px;
}

.error-banner span {
  margin-top: 4px;
  color: #95675e;
  font-size: 11px;
}

@media (max-width: 1320px) {
  .hero {
    grid-template-columns: minmax(0, 1.25fr) minmax(390px, 0.75fr);
    gap: 24px;
  }

  .step-strip {
    gap: 10px;
  }

  .step-strip small {
    display: none;
  }

  .menu-board {
    padding: 20px 24px;
  }

  .pay-panel {
    padding: 24px 28px;
  }
}

@media (max-height: 790px) and (orientation: landscape) {
  .screen {
    padding-top: 18px;
    padding-bottom: 14px;
  }

  .topbar {
    min-height: 50px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 15px 15px 15px 4px;
    font-size: 14px;
  }

  .hero {
    padding: 16px 0;
  }

  h1 {
    font-size: clamp(44px, 4.4vw, 66px);
  }

  .intro {
    margin-top: 12px;
  }

  .step-strip {
    margin-top: 14px;
  }

  .menu-board {
    margin-top: 18px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .product-card {
    min-height: 52px;
    padding: 6px 0;
  }

  .trust-row {
    margin-top: 10px;
  }

  .pay-panel {
    padding-top: 22px;
    padding-bottom: 20px;
  }

  .pay-heading {
    margin-top: 8px;
  }

  .qr-stage {
    margin: 10px 0;
  }

  .qr-shell {
    width: min(29vh, 16vw, 230px);
    min-width: 180px;
  }

  .vehicle-line {
    margin-top: 10px;
    padding-top: 10px;
  }
}

@media (max-width: 800px), (orientation: portrait) and (max-width: 1100px) {
  html,
  body {
    overflow: auto;
  }

  .screen {
    min-height: 100dvh;
    padding: 18px;
  }

  .topbar-message,
  .status-badge,
  #fullscreenButton {
    display: none;
  }

  .brand-copy small {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 22px;
    align-items: start;
  }

  .pay-panel {
    order: 1;
    width: 100%;
    justify-self: stretch;
  }

  .story-panel {
    order: 2;
  }

  h1 {
    font-size: clamp(44px, 12vw, 66px);
  }

  .step-strip,
  .intro {
    display: none;
  }

  .qr-shell {
    width: min(56vw, 260px);
  }

  .catalog {
    grid-template-columns: 1fr;
  }

  .trust-row {
    gap: 12px;
  }

  footer {
    gap: 10px;
    flex-wrap: wrap;
  }
}
