:root {
  --red: #b71928;
  --red-deep: #7f0f1d;
  --red-bright: #dc332e;
  --gold: #efc56c;
  --gold-soft: #f6df9c;
  --canvas: #fff8ee;
  --paper: #fffdf8;
  --ink: #171717;
  --muted: #5f5c59;
  --teal: #154f56;
  --line: rgba(127, 15, 29, 0.14);
  --shadow: 0 12px 28px rgba(77, 7, 17, 0.2);
  --page-width: 560px;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button {
  border: 0;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(12, 89, 98, 0.42);
  outline-offset: 3px;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(70, 3, 15, 0.2), transparent 26%),
    linear-gradient(126deg, rgba(255, 190, 90, 0.08) 0 19%, transparent 19% 61%, rgba(255, 218, 140, 0.09) 61% 76%, transparent 76%),
    linear-gradient(155deg, #93121f 0%, #c61e2d 44%, #e74b36 100%);
}

.app-shell::before {
  position: absolute;
  inset: 0 0 auto;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  content: "";
  opacity: 0.9;
  background-image:
    url("./assets/decor/warm-map-motif.svg?v=2"),
    repeating-linear-gradient(135deg, rgba(246, 223, 156, 0.08) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(45deg, transparent 0 34px, rgba(246, 223, 156, 0.05) 34px 35px, transparent 35px 68px);
  background-repeat: repeat-y, repeat, repeat;
  background-position: center top, 0 0, 0 0;
  background-size: clamp(430px, 100vw, 560px) auto, 24px 24px, 68px 68px;
}

.app-shell.is-home::before {
  opacity: 1;
  background-image:
    linear-gradient(180deg, rgba(88, 5, 17, 0.08), rgba(101, 6, 20, 0.04)),
    url("./assets/decor/warm-map-chinese-bg-v2.webp?v=1");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: min(100vw, 560px) 100%;
}

.app-shell.is-home::after {
  opacity: 0.2;
}

.app-shell::after {
  position: absolute;
  right: -14%;
  bottom: -20px;
  left: -14%;
  z-index: 0;
  height: 210px;
  pointer-events: none;
  content: "";
  opacity: 0.56;
  background:
    linear-gradient(166deg, transparent 0 44%, rgba(246, 223, 156, 0.26) 44% 45%, transparent 45% 58%, rgba(246, 223, 156, 0.16) 58% 59%, transparent 59%),
    linear-gradient(174deg, transparent 0 55%, rgba(102, 8, 23, 0.22) 55% 100%);
}

.page-content {
  position: relative;
  z-index: 1;
  width: min(100%, var(--page-width));
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: calc(22px + env(safe-area-inset-top)) 14px calc(30px + env(safe-area-inset-bottom));
}

.page-heading {
  margin: 14px 0 18px;
  padding: 10px 14px;
  color: var(--ink);
  font-size: 25px;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-align: left;
  text-shadow: none;
  background: rgba(255, 248, 238, 0.96);
  border: 1px solid rgba(239, 197, 108, 0.72);
  border-radius: 8px;
  box-shadow: 0 7px 18px rgba(72, 7, 17, 0.13);
}

.home-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 5px 0 20px;
  text-align: center;
}

.home-heading-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  color: var(--red);
  stroke-width: 2;
}

.menu-board {
  padding: 22px 10px 24px;
  background: rgba(255, 253, 248, 0.985);
  border: 1px solid rgba(239, 197, 108, 0.62);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 4px;
}

.menu-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  min-height: 104px;
  padding: 4px 2px;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  background: transparent;
  transition: color 160ms ease, transform 160ms ease;
}

.menu-entry:active {
  color: var(--red-deep);
  transform: scale(0.97);
}

.menu-icon {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
  overflow: hidden;
  color: var(--red);
  background: #fff2db;
  border: 1px solid rgba(239, 197, 108, 0.72);
  border-radius: 50%;
}

.menu-icon-image {
  display: block;
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.menu-icon-fallback {
  display: none;
  place-items: center;
}

.menu-icon-fallback svg {
  width: 32px;
  height: 32px;
}

.menu-icon.has-image-error .menu-icon-image {
  display: none;
}

.menu-icon.has-image-error .menu-icon-fallback {
  display: grid;
}

.menu-label {
  max-width: 8em;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.36;
}

.notice {
  position: relative;
  margin: 26px 0 0;
  padding: 19px 13px 14px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.58;
  text-align: center;
  text-shadow: 0 1px 2px rgba(61, 3, 13, 0.5);
  background: linear-gradient(135deg, rgba(77, 4, 17, 0.67), rgba(137, 11, 29, 0.48));
  border: 1px solid rgba(246, 223, 156, 0.7);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(79, 5, 17, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.notice-mark {
  position: absolute;
  top: -15px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--red-deep);
  background: #fff5df;
  border: 2px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(72, 5, 16, 0.24);
  transform: translateX(-50%);
}

.notice-mark svg {
  width: 19px;
  height: 19px;
  stroke-width: 2.2;
}

.content-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -4px 0 0;
  padding: 7px 11px 7px 8px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
  background: rgba(255, 248, 238, 0.94);
  border: 1px solid rgba(239, 197, 108, 0.7);
  border-radius: 6px;
}

.content-back:active {
  background: #ffffff;
}

.content-back svg {
  width: 23px;
  height: 23px;
  margin-right: 2px;
}

.service-list {
  display: grid;
  gap: 12px;
}

.service-card {
  min-width: 0;
  padding: 16px 14px 14px;
  background: var(--paper);
  border: 1px solid rgba(239, 197, 108, 0.62);
  border-radius: 8px;
  box-shadow: 0 7px 20px rgba(105, 64, 22, 0.11);
}

.service-title {
  margin: 0 0 13px;
  color: var(--red-deep);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.service-detail {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  margin: 0 0 10px;
  color: #354346;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.55;
}

.service-detail svg {
  width: 23px;
  height: 23px;
  margin-top: 1px;
  color: var(--teal);
}

.service-detail-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.service-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 13px;
}

.service-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 48px;
  padding: 8px 9px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border-radius: 6px;
  transition: filter 160ms ease, transform 160ms ease;
}

.service-action-icon {
  width: 19px;
  height: 19px;
  margin-right: 5px;
  stroke-width: 2.2;
}

.service-action:active {
  filter: brightness(0.96);
  transform: scale(0.98);
}

.service-action--navigate {
  background: linear-gradient(135deg, #8f1020 0%, #c5222b 100%);
}

.service-action--call {
  background: linear-gradient(135deg, #d62d2d 0%, #f06a3d 100%);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 250px;
  padding: 32px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.985);
  border: 1px solid rgba(239, 197, 108, 0.62);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.empty-state-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 15px;
  color: var(--red-deep);
  background: #fff0db;
  border-radius: 50%;
}

.empty-state-icon svg {
  width: 34px;
  height: 34px;
}

.empty-state-title {
  margin: 0 0 7px;
  color: #343b3d;
  font-size: 19px;
  font-weight: 800;
}

.empty-state-copy {
  max-width: 20em;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

body.is-ready .menu-entry,
body.is-ready .service-card {
  animation: reveal 260ms ease both;
}

body.is-ready .menu-entry:nth-child(3n + 2) {
  animation-delay: 30ms;
}

body.is-ready .menu-entry:nth-child(3n) {
  animation-delay: 60ms;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 700px) {
  .page-content {
    padding-top: 34px;
    padding-right: 20px;
    padding-left: 20px;
  }

  .menu-board {
    padding: 28px 18px 30px;
  }

  .menu-grid {
    gap: 28px 8px;
  }

  .menu-icon {
    width: 70px;
    height: 70px;
  }

  .menu-icon-image {
    width: 66px;
    height: 66px;
  }

  .menu-label {
    font-size: 15px;
  }
}

@media (max-width: 359px) {
  .page-content {
    padding-right: 10px;
    padding-left: 10px;
  }

  .page-heading {
    font-size: 23px;
  }

  .menu-board {
    padding-right: 7px;
    padding-left: 7px;
  }

  .menu-grid {
    column-gap: 0;
  }

  .menu-icon {
    width: 60px;
    height: 60px;
  }

  .menu-icon-image {
    width: 56px;
    height: 56px;
  }

  .menu-label {
    font-size: 13px;
  }

  .service-action {
    font-size: 15px;
  }
}

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