:root {
  color-scheme: dark;
  --bg: #080c10;
  --panel: #121920;
  --panel-strong: #172028;
  --line: rgba(255, 255, 255, 0.1);
  --line-bright: rgba(255, 255, 255, 0.18);
  --text: #f6f8fa;
  --muted: #a8b0b8;
  --soft: #737f89;
  --red: #ef1f2d;
  --red-deep: #9f131c;
  --gold: #ffc928;
  --green: #42d879;
  --blue: #2f70ff;
  --coffee: #7f5b44;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  overflow: hidden;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell {
  width: 100vw;
  height: 100vh;
  min-width: 980px;
  min-height: 620px;
  display: grid;
  grid-template-columns: clamp(288px, 18vw, 340px) minmax(520px, 1fr) minmax(410px, 29vw);
  background:
    radial-gradient(circle at 70% 15%, rgba(51, 89, 105, 0.18), transparent 36%),
    linear-gradient(135deg, #081016 0%, #06090d 44%, #0c1116 100%);
}

.side-panel {
  padding: clamp(22px, 2.6vw, 38px) clamp(22px, 2.1vw, 32px);
  background: linear-gradient(180deg, rgba(20, 29, 36, 0.98), rgba(12, 18, 24, 0.96));
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vh, 24px);
}

.brand-block h1 {
  margin: 0;
  font-size: clamp(24px, 1.9vw, 32px);
  line-height: 1.15;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-line {
  display: block;
  width: 70px;
  height: 4px;
  margin-top: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), #ff6b42);
}

.owner-card {
  padding: 14px 0 4px;
  border-bottom: 1px solid var(--line);
}

.avatar {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: block;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #131b23;
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.greeting {
  margin: 0;
  font-size: clamp(20px, 1.5vw, 26px);
  font-weight: 800;
}

.muted,
.owner-card .muted {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

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

.info-row,
.store-row {
  min-height: 66px;
  width: 100%;
  padding: 10px 0;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  background: transparent;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.info-row strong,
.store-row strong {
  display: block;
  font-size: clamp(16px, 1.2vw, 21px);
  line-height: 1.35;
}

.info-row small,
.store-row small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
  font-size: clamp(13px, 0.92vw, 16px);
  line-height: 1.35;
}

.line-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #eef2f5;
}

.line-icon svg {
  font-size: 28px;
}

.line-icon.green {
  color: var(--green);
}

.weather-mark {
  position: relative;
  width: 42px;
  height: 42px;
  display: block;
}

.sun {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  position: absolute;
  left: 15px;
  top: 4px;
  box-shadow: 0 0 18px rgba(255, 201, 40, 0.55);
}

.cloud {
  position: absolute;
  left: 2px;
  top: 20px;
  width: 38px;
  height: 17px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #9ed8ff);
}

.cloud::before {
  content: "";
  position: absolute;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  left: 8px;
  top: -12px;
  background: #ffffff;
}

.today-tip {
  margin-top: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.tip-label {
  color: var(--gold);
  font-size: 14px;
  font-weight: 800;
}

.today-tip p {
  margin: 10px 0 0;
  color: #d9dee3;
  line-height: 1.45;
  font-size: clamp(14px, 1vw, 17px);
}

.content-area {
  padding: clamp(28px, 4vw, 56px) clamp(28px, 4.3vw, 70px) 126px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: clamp(28px, 5vh, 46px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.topbar h2 {
  margin: 0;
  font-size: clamp(30px, 2.8vw, 48px);
  letter-spacing: 0;
}

.status-pill,
.tile-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  border-radius: 999px;
  font-weight: 800;
}

.status-pill {
  min-height: 46px;
  padding: 0 18px;
  font-size: 16px;
  background: rgba(66, 216, 121, 0.12);
  color: #72ee9f;
  border: 1px solid rgba(66, 216, 121, 0.24);
}

.status-pill span,
.tile-badge.connected span,
.mcp-log span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px rgba(66, 216, 121, 0.8);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: clamp(18px, 2.4vw, 32px);
}

.service-tile {
  position: relative;
  min-height: clamp(340px, 45vh, 520px);
  border-radius: 8px;
  padding: clamp(24px, 2.8vw, 42px);
  overflow: hidden;
  text-align: center;
  border: 1px solid var(--line-bright);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 180ms ease, border-color 180ms ease, filter 180ms ease;
}

.service-tile:hover,
.service-tile:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.32);
  outline: none;
}

.service-tile.mcd {
  background:
    linear-gradient(180deg, rgba(255, 74, 74, 0.1), rgba(80, 0, 0, 0.18)),
    linear-gradient(135deg, #df202b 0%, #b31422 52%, #761018 100%);
}

.service-tile.luckin {
  background:
    radial-gradient(circle at 70% 16%, rgba(63, 91, 255, 0.14), transparent 32%),
    linear-gradient(135deg, rgba(54, 43, 37, 0.92), rgba(22, 22, 25, 0.96));
}

.tile-badge {
  position: absolute;
  top: 24px;
  left: 24px;
  min-height: 42px;
  padding: 0 16px;
  font-size: 15px;
  background: rgba(8, 12, 16, 0.36);
}

.tile-badge.pending {
  color: #dbdde0;
  background: rgba(255, 255, 255, 0.1);
}

.service-logo {
  width: clamp(118px, 12vw, 190px);
  height: clamp(118px, 12vw, 190px);
  display: grid;
  place-items: center;
  margin-bottom: clamp(18px, 3vh, 30px);
}

.mcd-logo {
  color: var(--gold);
  font-size: clamp(112px, 10vw, 180px);
  font-weight: 900;
  line-height: 1;
  font-family: Arial Black, Impact, sans-serif;
}

.coffee-logo {
  color: #f4f6ff;
}

.coffee-logo svg {
  width: 138px;
  height: 138px;
  stroke-width: 3.3;
}

.service-tile strong {
  display: block;
  font-size: clamp(34px, 3.2vw, 54px);
  line-height: 1.15;
}

.service-tile small {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(18px, 1.6vw, 25px);
}

.tile-action {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 82px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 10, 0.22);
  font-size: clamp(18px, 1.4vw, 24px);
  font-weight: 800;
}

.tile-action.disabled {
  color: rgba(255, 255, 255, 0.76);
}

.round-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.quick-strip {
  position: fixed;
  left: clamp(288px, 18vw, 340px);
  right: 0;
  bottom: 0;
  height: 106px;
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr)) minmax(270px, 0.9fr);
  border-top: 1px solid var(--line);
  background: rgba(17, 25, 31, 0.92);
  backdrop-filter: blur(18px);
  z-index: 3;
}

.quick-strip::after {
  content: "MCP 已连接";
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cfd6dc;
  font-size: clamp(20px, 1.8vw, 30px);
  border-left: 1px solid var(--line);
}

.quick-strip button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: transparent;
  color: #cfd6dc;
  font-size: clamp(20px, 1.8vw, 30px);
  border-right: 1px solid var(--line);
}

.quick-strip svg {
  font-size: 36px;
}

.order-panel {
  margin: clamp(28px, 4vh, 48px) clamp(22px, 2vw, 38px) 126px 0;
  padding: clamp(20px, 2vw, 30px);
  align-self: stretch;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(24, 33, 41, 0.98), rgba(15, 21, 27, 0.98));
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.mini-logo {
  width: 66px;
  height: 66px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e21d2d, #a80f19);
  color: var(--gold);
  font-family: Arial Black, Impact, sans-serif;
  font-size: 52px;
  font-weight: 900;
  line-height: 1;
}

.panel-head h2 {
  margin: 0 0 6px;
  font-size: clamp(28px, 2.2vw, 38px);
}

.panel-head p {
  margin: 0;
  color: var(--muted);
}

.order-steps {
  padding: 14px 0;
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.store-choices {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 138px;
  overflow: auto;
  padding: 10px 0 4px;
  scrollbar-width: thin;
}

.store-choices button {
  min-height: 54px;
  border-radius: 8px;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 10px;
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.store-choices button.active {
  border-color: rgba(66, 216, 121, 0.58);
  background: rgba(66, 216, 121, 0.1);
}

.store-choices strong {
  font-size: 14px;
  line-height: 1.25;
}

.store-choices small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-choices em {
  color: var(--green);
  font-style: normal;
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
}

.store-row {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  border-bottom: 0;
  padding: 12px 6px;
  border-radius: 8px;
}

.store-row:hover,
.store-row:focus-visible {
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.store-row em {
  color: #65e78f;
  font-style: normal;
  font-weight: 800;
  font-size: clamp(14px, 1vw, 17px);
}

.section-title {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title h3 {
  margin: 0;
  font-size: clamp(20px, 1.4vw, 25px);
}

.section-title button {
  min-width: 70px;
  min-height: 44px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

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

.menu-item {
  min-height: 142px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  grid-template-rows: 52px 34px auto;
  gap: 7px;
  text-align: left;
  position: relative;
}

.menu-item.selected {
  border-color: var(--red);
  box-shadow: inset 0 0 0 1px var(--red);
}

.food-art {
  height: 52px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.12));
  overflow: hidden;
}

.food-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.food-art:has(img)::before {
  display: none;
}

.food-art.combo::before,
.food-art.burger::before,
.food-art.nugget::before {
  content: "";
  width: 58px;
  height: 34px;
  border-radius: 42px 42px 14px 14px;
  background: linear-gradient(#f7b55c 0 38%, #4f2718 39% 50%, #f6ce4b 51% 60%, #5ab05e 61% 70%, #d98741 71%);
  box-shadow: 46px 5px 0 -10px #d92a2c, 54px -6px 0 -17px #ffc928;
}

.food-art.fries::before {
  content: "";
  width: 38px;
  height: 46px;
  border-radius: 8px 8px 14px 14px;
  background:
    repeating-linear-gradient(90deg, #ffd94c 0 7px, #f6b52f 7px 10px),
    linear-gradient(#e42630, #bb1420);
  box-shadow: 34px 14px 0 -8px #6d3720;
}

.food-art.nugget::before {
  width: 68px;
  height: 28px;
  border-radius: 30px;
  background: radial-gradient(circle at 20% 45%, #f5bc57 0 14px, transparent 15px), radial-gradient(circle at 50% 45%, #e5a244 0 13px, transparent 14px), radial-gradient(circle at 76% 45%, #f0b256 0 13px, transparent 14px);
  box-shadow: none;
}

.menu-item strong {
  min-height: 38px;
  color: #e8edf1;
  font-size: clamp(13px, 0.9vw, 16px);
  line-height: 1.25;
}

.menu-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
}

.menu-price span {
  color: #ff473f;
  font-size: clamp(18px, 1.2vw, 22px);
  font-weight: 900;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qty-control button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.qty-control output {
  min-width: 16px;
  text-align: center;
  font-weight: 800;
}

.cart-summary {
  min-height: 64px;
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 14px;
}

.cart-summary > div {
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.cart-summary small {
  display: block;
  color: var(--muted);
  margin-bottom: 4px;
}

.cart-summary strong {
  font-size: 22px;
}

.primary-action {
  min-height: 66px;
  margin-top: 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff2635, #df1d2b);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: #fff;
  font-size: clamp(24px, 1.8vw, 31px);
  font-weight: 900;
  box-shadow: 0 14px 36px rgba(239, 31, 45, 0.3);
}

.primary-action svg {
  font-size: 28px;
}

.primary-action.loading {
  filter: saturate(0.82);
}

.mcp-log {
  min-height: 34px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cdd5db;
  font-size: 15px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 128px;
  transform: translate(-50%, 18px);
  min-width: 280px;
  max-width: 560px;
  padding: 16px 22px;
  border-radius: 8px;
  background: rgba(21, 29, 36, 0.96);
  border: 1px solid var(--line-bright);
  color: #eef2f5;
  font-weight: 800;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 10;
  box-shadow: var(--shadow);
}

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

@media (max-width: 1180px) {
  body {
    overflow: auto;
  }

  .app-shell {
    min-width: 0;
    min-height: 100vh;
    height: auto;
    grid-template-columns: 1fr;
  }

  .side-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .content-area {
    padding-bottom: 30px;
  }

  .order-panel {
    margin: 0 28px 130px;
  }

  .quick-strip {
    left: 0;
    grid-template-columns: repeat(3, 1fr);
  }

  .quick-strip::after {
    display: none;
  }
}

@media (max-width: 760px) {
  .app-shell {
    min-height: 100vh;
  }

  .service-grid,
  .menu-list {
    grid-template-columns: 1fr;
  }

  .service-tile {
    min-height: 300px;
  }

  .quick-strip {
    height: 84px;
  }

  .quick-strip button {
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
  }
}
