:root {
  --tunnel: #1b2320;
  --panel: #27312d;
  --panel-raised: #323e39;
  --rule: #46544d;
  --chalk: #ede9dc;
  --fog: #a9b2a5;
  --signal: #f0b429;
  --signal-ink: #1b2320;

  --line-1: #f0b429;
  --line-2: #53bfae;
  --line-3: #ec7f63;
  --line-4: #7aa7e8;

  --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-sign: "DIN Alternate", Bahnschrift, "Roboto Condensed", var(--font-body);

  --topbar-height: 48px;
  --bottom-height: 60px;
  --search-height: 60px;
  --app-width: 480px;
  --gutter: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --chamfer: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--tunnel);
}

body {
  margin: 0;
  background: var(--tunnel);
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

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

h1,
h2,
h3,
p,
ol {
  margin: 0;
  padding: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--chalk);
  outline-offset: 2px;
}

.app {
  position: relative;
  width: 100%;
  max-width: var(--app-width);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--tunnel);
}

/* 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  height: var(--topbar-height);
  background: var(--tunnel);
  border-bottom: 1px solid var(--rule);
}

.topbar__title {
  overflow: hidden;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__back {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  background: none;
  border: 0;
}

.topbar__back svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 底部 Tab 与固定操作栏共用定位 */
.tabbar,
.actionbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 20;
  width: 100%;
  max-width: var(--app-width);
  transform: translateX(-50%);
  background: var(--panel);
  border-top: 1px solid var(--rule);
  padding-bottom: var(--safe-bottom);
}

.tabbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.tabbar[hidden] {
  display: none;
}

.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: var(--bottom-height);
  color: var(--fog);
  font-size: 12px;
}

.tab svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.tab.is-active {
  color: var(--signal);
  font-weight: 600;
}

.tab.is-active::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 28%;
  right: 28%;
  height: 3px;
  background: var(--signal);
}

.view {
  padding-bottom: calc(var(--bottom-height) + var(--safe-bottom) + 16px);
}

.view--plain {
  padding-bottom: calc(var(--safe-bottom) + 24px);
}

.load-state {
  padding: 48px var(--gutter);
  color: var(--fog);
  text-align: center;
}

/* 价格与按钮 */
.price {
  font-family: var(--font-sign);
  font-size: 18px;
  font-weight: 700;
  color: var(--chalk);
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  background: var(--signal);
  border: 0;
  clip-path: var(--chamfer);
  color: var(--signal-ink);
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.btn:active {
  background: #d99f1f;
}

.btn:focus-visible {
  outline-offset: -5px;
  outline-color: var(--signal-ink);
}

.btn--block {
  width: 100%;
}

.btn--small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  --chamfer: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
}

.btn--ghost {
  background: var(--panel-raised);
  color: var(--chalk);
}

.btn--ghost:active {
  background: var(--rule);
}

.btn--ghost:focus-visible {
  outline-color: var(--chalk);
}

/* Logo 是纯黑底，图片框也用纯黑，留白处才不会露出色差。 */
.hero__image,
.strip__item,
.card__image,
.row__image,
.detail__image,
.order-item__image {
  background: #000;
}

/* 首页 */
.hero__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
}

.board {
  padding: 10px var(--gutter);
  background: var(--panel);
  border-bottom: 1px solid var(--rule);
  color: var(--signal);
  font-size: 14px;
}

.strip {
  display: flex;
  gap: 8px;
  padding: 16px var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.strip::-webkit-scrollbar {
  display: none;
}

.strip__item {
  flex: none;
  width: 132px;
  height: 88px;
  object-fit: contain;
  scroll-snap-align: start;
}

.line-section {
  padding: 8px var(--gutter) 16px;
}

.plaque {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 700;
}

.plaque::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background: var(--tunnel);
  border: 3px solid var(--line);
  border-radius: 50%;
}

.plaque::after {
  content: "";
  flex: 1;
  height: 3px;
  background: var(--line);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
}

.card__image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.card__name {
  display: -webkit-box;
  overflow: hidden;
  min-height: 42px;
  margin: 8px 10px 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 21px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 2px 4px 4px 10px;
}

.add {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
}

.add::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--signal);
  clip-path: var(--chamfer);
  --chamfer: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
  color: var(--signal-ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

/* 分类页 */
.search {
  position: sticky;
  top: var(--topbar-height);
  z-index: 10;
  height: var(--search-height);
  padding: 8px var(--gutter);
  background: var(--tunnel);
}

.search__input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

.search__input::placeholder,
.field__input::placeholder {
  color: var(--fog);
}

.split {
  display: flex;
  align-items: flex-start;
}

.rail {
  position: sticky;
  top: calc(var(--topbar-height) + var(--search-height));
  flex: none;
  width: 96px;
  max-height: calc(100vh - var(--topbar-height) - var(--search-height) - var(--bottom-height) - var(--safe-bottom));
  overflow-y: auto;
  scrollbar-width: none;
}

.station {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding: 8px 6px 8px 34px;
  background: none;
  border: 0;
  color: var(--fog);
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
}

.station::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 17px;
  width: 4px;
  background: var(--line);
}

.station:first-child::before {
  top: 50%;
}

.station:last-child::before {
  bottom: 50%;
}

.station::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 11px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  background: var(--tunnel);
  border: 3px solid var(--line);
  border-radius: 50%;
}

.station.is-active {
  color: var(--chalk);
  font-weight: 700;
}

.station.is-active::after {
  background: var(--signal);
  border-color: var(--chalk);
}

.list {
  flex: 1;
  min-width: 0;
  padding: 0 var(--gutter) 8px 8px;
}

.row {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.row:first-child {
  padding-top: 4px;
}

.row__main {
  display: flex;
  gap: 10px;
}

.row__image {
  flex: none;
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.row__name {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.row__summary {
  margin-top: 2px;
  color: var(--fog);
  font-size: 13px;
}

.row__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 48px 8px;
  color: var(--fog);
  font-size: 14px;
  text-align: center;
  overflow-wrap: anywhere;
}

.empty--page {
  padding: 96px var(--gutter);
}

/* 详情页 */
.detail__image {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: contain;
}

.detail__body {
  padding: 16px var(--gutter) 24px;
}

.detail__name {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.detail__price {
  display: block;
  margin-top: 6px;
  color: var(--signal);
  font-size: 28px;
}

.detail__section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.detail__heading {
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 700;
}

.detail__text {
  color: var(--chalk);
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-line;
}

.actionbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--bottom-height);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  padding-top: 8px;
  padding-bottom: calc(var(--safe-bottom) + 8px);
}

.actionbar__label {
  color: var(--fog);
  font-size: 13px;
}

.actionbar .price {
  margin-left: 6px;
  color: var(--signal);
  font-size: 24px;
}

/* 下单页 */
.order-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px var(--gutter);
  background: var(--panel);
}

.order-item__image {
  flex: none;
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.order-item__name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.form {
  display: grid;
  gap: 16px;
  padding: 16px var(--gutter) 8px;
}

.field {
  display: block;
  min-width: 0;
}

.field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
}

.field__input {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

.field__input:focus {
  border-color: var(--chalk);
}

.field__input[aria-invalid="true"] {
  border-color: var(--line-3);
}

.field__error {
  display: block;
  margin-top: 6px;
  color: var(--line-3);
  font-size: 13px;
}

.field__error[hidden] {
  display: none;
}

textarea.field__input {
  min-height: 84px;
  resize: vertical;
}

.field__select {
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--fog) 50%), linear-gradient(135deg, var(--fog) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 13px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

.quantity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quantity__hint {
  color: var(--fog);
  font-size: 13px;
}

.stepper {
  display: flex;
  align-items: center;
  flex: none;
}

.stepper__button {
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--panel-raised);
  border: 0;
  font-size: 22px;
  line-height: 1;
}

.stepper__button:disabled {
  background: var(--panel);
  color: var(--rule);
}

.stepper__value {
  min-width: 56px;
  font-family: var(--font-sign);
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

.notes {
  padding: 8px var(--gutter) 16px;
  color: var(--fog);
  font-size: 13px;
}

/* 完成页 */
.done {
  padding: 20px var(--gutter) 0;
}

.done__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
}

.route {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 20px;
  list-style: none;
}

.route__stop {
  position: relative;
  padding-top: 26px;
  color: var(--fog);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.route__stop::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--rule);
}

.route__stop:first-child::before {
  left: 50%;
}

.route__stop:last-child::before {
  right: 50%;
}

.route__stop::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 50%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  background: var(--tunnel);
  border: 3px solid var(--rule);
  border-radius: 50%;
}

.route__stop.is-current {
  color: var(--chalk);
  font-weight: 700;
}

.route__stop.is-current::after {
  background: var(--signal);
  border-color: var(--chalk);
}

.ticket {
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--panel);
}

.ticket__number {
  display: block;
  font-family: var(--font-sign);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.ticket__label {
  color: var(--fog);
  font-size: 13px;
}

.ticket__summary {
  margin: 12px 0 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--rule);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  -webkit-user-select: text;
  user-select: text;
}

.copy-status {
  min-height: 21px;
  margin-top: 8px;
  color: var(--signal);
  font-size: 14px;
  text-align: center;
}

.done__home {
  margin-top: 12px;
}

.contact {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  margin-top: 12px;
  padding: 14px 16px;
  background: var(--panel);
}

.contact__title {
  font-size: 13px;
  color: var(--fog);
}

.contact__id {
  margin-top: 2px;
  font-size: 17px;
  font-weight: 700;
  overflow-wrap: anywhere;
  -webkit-user-select: text;
  user-select: text;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
