:root {
  --page-bg: #111111;
  --screen-bg: #ffffff;
  --screen-soft: #faf9fc;
  --sidebar-bg: #fbfbfd;
  --line: #eceaf1;
  --ink: #18161b;
  --muted: #8c8798;
  --accent: #9a89c9;
  --accent-deep: #8b79bd;
  --accent-soft: #f2eefb;
  --shadow: 0 28px 70px rgba(12, 12, 18, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family:
    "SF Pro Display",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 28%),
    linear-gradient(180deg, #161616 0%, #070707 100%);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  background: none;
  padding: 0;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.page-shell {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 18px;
}

.phone-frame {
  width: min(430px, 100%);
  height: min(920px, calc(100vh - 36px));
  padding: 8px;
  border-radius: 38px;
  background: linear-gradient(180deg, #2f2f35 0%, #131316 100%);
  box-shadow: var(--shadow);
}

.phone-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 32px;
  background: var(--screen-bg);
}

.app-header {
  flex: 0 0 auto;
  padding: 12px 0 0;
  background:
    linear-gradient(180deg, rgba(247, 247, 250, 0.98), rgba(255, 255, 255, 0.98)),
    #fff;
  border-bottom: 1px solid var(--line);
}

.status-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: start;
  padding: 0 16px 12px;
}

.status-left {
  display: grid;
  gap: 2px;
}

.status-left strong {
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.status-left span,
.status-center span,
.status-right span,
.panel-kicker,
.product-sales,
.order-note,
.simple-panel p,
.profile-grid span {
  color: var(--muted);
}

.status-left span,
.status-center span,
.status-right span {
  font-size: 12px;
}

.status-center {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.dynamic-island {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 182px;
  height: 54px;
  border-radius: 999px;
  background: #000;
  color: #fff;
}

.island-wifi {
  width: 20px;
  height: 14px;
  border: 3px solid transparent;
  border-top-color: #fff;
  border-radius: 50%;
  position: relative;
}

.island-wifi::before,
.island-wifi::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 2px solid transparent;
  border-top-color: #fff;
  border-radius: 50%;
}

.island-wifi::before {
  top: -8px;
  width: 16px;
  height: 10px;
}

.island-wifi::after {
  top: -14px;
  width: 24px;
  height: 16px;
}

.status-right {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
}

.battery {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  background: #43c35f;
  color: #fff;
  font-weight: 700;
}

.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px 10px;
}

.mode-tabs {
  display: flex;
  align-items: center;
  gap: 28px;
}

.mode-tab {
  position: relative;
  padding: 12px 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: #706a79;
}

.mode-tab.active {
  color: var(--ink);
}

.mode-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-chip,
.tool-icon-btn,
.product-action,
.action-pill,
.cart-pill,
.panel-btn,
.category-button,
.manage-link,
.option-chip,
.sheet-confirm,
.text-action {
  cursor: pointer;
}

.tool-chip,
.tool-icon-btn {
  height: 48px;
  border-radius: 17px;
  border: 1px solid #f2f0f6;
  background: #fafafd;
  box-shadow: 0 8px 18px rgba(40, 36, 58, 0.04);
}

.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  color: #585362;
}

.tool-chip-outline {
  border-color: var(--accent);
  background: #fff;
}

.tool-icon {
  width: 16px;
  height: 16px;
}

.tool-icon-btn {
  display: grid;
  place-items: center;
  width: 48px;
}

.tool-icon-btn svg,
.manage-link svg,
.bottom-nav svg,
.cart-pill svg {
  width: 24px;
  height: 24px;
}

.tool-icon-btn.ghost {
  background: var(--accent-soft);
  border-color: transparent;
}

.close-sheet-btn {
  font-size: 28px;
  line-height: 1;
  color: #6c6478;
}

.screen-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: var(--screen-bg);
}

.app-view {
  position: absolute;
  inset: 0 0 72px;
  display: none;
}

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

.view-kitchen.active {
  display: grid;
  grid-template-columns: 94px 1fr;
}

.category-rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: 10px 0 12px;
  background: linear-gradient(180deg, #fcfcfe 0%, #faf9fc 100%);
  border-right: 1px solid var(--line);
}

.category-list {
  display: grid;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.category-button {
  position: relative;
  width: 100%;
  min-height: 94px;
  padding: 0 12px;
  text-align: center;
  color: #5c5765;
  font-size: 17px;
  font-weight: 600;
}

.category-button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 44px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: transparent;
}

.category-button.active {
  background: #fff;
  color: var(--ink);
}

.category-button.active::before {
  background: var(--accent);
}

.manage-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: auto 10px 0;
  min-height: 42px;
  border-radius: 14px;
  color: #8f899b;
  font-size: 12px;
}

.manage-link svg {
  width: 16px;
  height: 16px;
}

.catalog-pane {
  min-width: 0;
  background: #fff;
}

.catalog-scroll,
.view-secondary {
  height: 100%;
  overflow-y: auto;
}

.catalog-scroll {
  padding: 12px 16px 188px;
}

.catalog-head h1,
.simple-panel h2,
.sheet-head h3 {
  margin: 0;
}

.catalog-head {
  padding: 0 0 6px;
}

.catalog-head h1 {
  font-size: 26px;
  line-height: 1.2;
}

.product-list,
.orders-list {
  display: grid;
}

.product-list {
  gap: 22px;
  padding: 8px 0 24px;
}

.product-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.product-thumb {
  width: 116px;
  height: 116px;
  border-radius: 24px;
  object-fit: cover;
  background: linear-gradient(135deg, #fff4f8 0%, #f4f2fd 100%);
}

.product-main {
  min-width: 0;
}

.product-name {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.18;
  font-weight: 800;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.stars {
  color: #ffc93c;
  letter-spacing: 0.14em;
  font-size: 15px;
}

.product-rating strong {
  font-size: 18px;
  font-weight: 500;
}

.product-sales {
  margin: 0;
  font-size: 13px;
}

.product-side {
  display: grid;
  align-self: center;
}

.product-action {
  min-width: 94px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #a695d6 0%, #8d7bbe 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 12px 20px rgba(141, 123, 190, 0.2);
}

.product-action.plus {
  width: 48px;
  min-width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
}

.product-card.picked {
  animation: pulse 0.7s ease;
}

.view-secondary {
  padding: 14px 16px 24px;
  background: var(--screen-soft);
}

.simple-panel {
  padding: 18px;
  border-radius: 26px;
  background: #fff;
  border: 1px solid var(--line);
}

.simple-panel h2 {
  font-size: 24px;
  line-height: 1.2;
}

.simple-panel p {
  margin: 10px 0 0;
  line-height: 1.6;
  font-size: 14px;
}

.panel-kicker {
  margin: 0 0 8px;
  font-size: 12px;
}

.panel-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.text-action {
  color: var(--accent-deep);
  font-weight: 700;
}

.edit-actions,
.discover-cards,
.profile-grid,
.spec-groups {
  display: grid;
  gap: 12px;
}

.edit-actions {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 18px;
}

.panel-btn {
  min-height: 48px;
  border-radius: 16px;
  background: linear-gradient(180deg, #a695d6 0%, #8d7bbe 100%);
  color: #fff;
  font-weight: 700;
}

.panel-btn.subtle {
  background: #f4f1fb;
  color: var(--accent-deep);
}

.discover-card {
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, #f7f4ff 0%, #fff 100%);
}

.discover-card.warm {
  background: linear-gradient(135deg, #fff6ef 0%, #fff 100%);
}

.discover-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.discover-card p {
  margin: 0;
  font-size: 14px;
}

.profile-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 18px;
}

.profile-grid div {
  padding: 16px 12px;
  border-radius: 20px;
  background: var(--accent-soft);
  text-align: center;
}

.profile-grid span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
}

.profile-grid strong {
  font-size: 24px;
}

.orders-list {
  gap: 12px;
}

.order-card {
  padding: 16px;
  border-radius: 18px;
  background: #faf9fc;
}

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

.order-time,
.order-items {
  margin: 0;
  line-height: 1.5;
  font-size: 14px;
}

.order-note {
  margin: 8px 0 0;
  font-size: 13px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 140px;
  text-align: center;
  color: var(--muted);
}

.floating-bar {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 74px;
  display: grid;
  grid-template-columns: 66px 1fr 1.1fr 1fr;
  gap: 10px;
  padding: 10px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #f1eff4;
  box-shadow: 0 16px 34px rgba(18, 17, 25, 0.1);
  backdrop-filter: blur(14px);
}

.cart-pill,
.action-pill {
  min-height: 58px;
  border-radius: 22px;
}

.cart-pill {
  position: relative;
  display: grid;
  place-items: center;
  color: var(--accent-deep);
  background: #fff;
}

.cart-count {
  position: absolute;
  top: 8px;
  right: 10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent-deep);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

.action-pill {
  background: #f7f6fa;
  color: #6d6778;
  font-size: 16px;
  border: 1px solid transparent;
}

.action-pill.outline {
  background: #fff;
  color: var(--accent-deep);
  border-color: var(--accent);
}

.action-pill.disabled {
  background: #f1f0f3;
  color: #c4c1cb;
}

.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 10px 10px 16px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.nav-item {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: #6a6472;
}

.nav-item svg {
  width: 28px;
  height: 28px;
}

.nav-item span {
  font-size: 14px;
}

.nav-item.active {
  color: #16141a;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 16, 0.34);
  backdrop-filter: blur(4px);
  z-index: 20;
}

.spec-sheet {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 21;
  width: min(410px, calc(100vw - 20px));
  max-height: 72vh;
  padding: 18px;
  overflow-y: auto;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 15, 20, 0.24);
  transform: translateX(-50%);
}

.hidden {
  display: none;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.spec-groups {
  gap: 14px;
}

.spec-group {
  padding: 14px;
  border-radius: 18px;
  background: var(--accent-soft);
}

.spec-group h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

.option-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.option-chip {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  background: #fff;
  color: #686273;
  border: 1px solid transparent;
}

.option-chip.active {
  border-color: var(--accent);
  color: var(--accent-deep);
  background: #fcfbff;
}

.sheet-confirm {
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #a695d6 0%, #8d7bbe 100%);
  color: #fff;
  font-weight: 700;
}

@keyframes pulse {
  0% {
    transform: translateY(0);
  }

  35% {
    transform: translateY(-4px);
  }

  100% {
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  .page-shell {
    padding: 0;
  }

  .phone-frame {
    width: 100%;
    height: 100vh;
    padding: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  .phone-screen {
    border-radius: 0;
  }
}
