/* iOS 26 Skeuomorphic Interaction Design System */
:root {
  --ios-bg:
    radial-gradient(circle at 12% 6%, rgba(59, 130, 246, 0.16), rgba(59, 130, 246, 0) 34%),
    radial-gradient(circle at 86% 12%, rgba(16, 185, 129, 0.14), rgba(16, 185, 129, 0) 30%),
    linear-gradient(180deg, #eef4fb 0%, #f6f9fc 44%, #f8fafc 100%);
  --ios-card-bg: rgba(255, 255, 255, 0.72);
  --ios-card-border: rgba(255, 255, 255, 0.88);
  --ios-blur: blur(18px) saturate(170%);
  --ios-radius-lg: 22px;
  --ios-radius-md: 16px;

  /* Skeuomorphic spring curves */
  --spring-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --spring-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --spring-snappy: cubic-bezier(0.18, 0.89, 0.32, 1.28);
  --spring-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Skeuomorphic shadow layers */
  --shadow-rest: 0 2px 8px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 4px 12px rgba(15, 23, 42, 0.06), 0 16px 40px rgba(15, 23, 42, 0.10);
  --shadow-press: 0 1px 3px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lift: 0 8px 16px rgba(15, 23, 42, 0.08), 0 24px 48px rgba(15, 23, 42, 0.12);
  --ios26-statusbar-height: 0px;
  --ios26-header-offset: calc(var(--ios26-statusbar-height, 0px) + 6px);
}

/* === GPU Acceleration Base === */
body,
body.page-body {
  background: var(--ios-bg);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
  opacity: 1;
  transform: none !important;
  filter: none !important;
  transform-origin: initial;
  transition: background-color 280ms var(--spring-smooth);
}

body.ios26-page-ready,
body.page-body.ios26-page-ready {
  opacity: 1;
}

body.ios26-page-transitioning,
body.page-body.ios26-page-transitioning {
  opacity: 1;
  transform: none !important;
  filter: none !important;
}

body::before,
body.page-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 18% 70%, rgba(248, 113, 113, 0.1), rgba(248, 113, 113, 0) 34%);
  z-index: -1;
}

/* === Status Bar === */
.ios26-status-bar {
  position: sticky;
  top: 0;
  z-index: 160;
  margin: 6px 10px 0;
  padding: calc(4px + env(safe-area-inset-top)) 12px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(14px) saturate(170%);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-rest);
  transform: translateZ(0);
  will-change: transform, background-color;
  transition:
    background-color 280ms var(--spring-smooth),
    box-shadow 280ms var(--spring-smooth);
}

body.scrolled .ios26-status-bar {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-hover);
}

/* === Headers === */
.top-bar,
.order-page-header,
.msg-page-header,
.discover-header,
.sub-header,
.up-tabs {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: var(--ios-blur);
  -webkit-backdrop-filter: var(--ios-blur);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-rest);
  border-radius: 16px;
  margin: 8px 10px 0;
  transform: translateZ(0);
  will-change: transform, box-shadow, background-color;
  transition:
    background-color 280ms var(--spring-smooth),
    box-shadow 280ms var(--spring-smooth),
    border-color 280ms var(--spring-smooth);
}

.top-bar,
.order-page-header,
.msg-page-header,
.discover-header,
.sub-header,
.up-tabs {
  top: var(--ios26-header-offset) !important;
}

.up-tabs {
  margin: 8px 10px 0;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

body.scrolled .top-bar,
body.scrolled .order-page-header,
body.scrolled .msg-page-header,
body.scrolled .discover-header,
body.scrolled .sub-header,
body.scrolled .up-tabs {
  background: rgba(255, 255, 255, 0.88) !important;
  border-color: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-hover);
}

/* === Card Base — Skeuomorphic === */
.service-grid,
.section-header,
.menu-layout,
.profile-orders-card,
.profile-service-card,
.profile-menu-card,
.sub-card,
.form-card,
.address-card {
  background: var(--ios-card-bg) !important;
  backdrop-filter: var(--ios-blur);
  -webkit-backdrop-filter: var(--ios-blur);
  border: 1px solid var(--ios-card-border);
  box-shadow: var(--shadow-rest);
  transform: translateZ(0);
  will-change: transform, box-shadow;
  transition:
    transform 320ms var(--spring-bounce),
    box-shadow 320ms var(--spring-smooth);
}

.service-grid,
.section-header,
.menu-layout,
.profile-orders-card,
.profile-service-card,
.profile-menu-card,
.order-card,
.msg-notice-card,
.msg-item,
.discover-section,
.moment-card {
  border-radius: var(--ios-radius-md) !important;
}

/* === Dish Card — Fix cramped spacing === */
.dish-card {
  margin: 8px 10px !important;
  border-bottom: none !important;
  border-radius: var(--ios-radius-md) !important;
  background: var(--ios-card-bg) !important;
  backdrop-filter: var(--ios-blur) !important;
  -webkit-backdrop-filter: var(--ios-blur) !important;
  border: 1px solid var(--ios-card-border) !important;
  box-shadow: var(--shadow-rest) !important;
  transform: translateZ(0) !important;
  will-change: transform, box-shadow !important;
  transition:
    transform 320ms var(--spring-bounce),
    box-shadow 320ms var(--spring-smooth) !important;
}

/* === Interactive Cards — 3D Skeuomorphic Press === */
.order-card,
.msg-item,
.profile-menu-item,
.discover-restaurant-card,
.record-item,
.item,
.modal-content {
  background: var(--ios-card-bg) !important;
  backdrop-filter: var(--ios-blur);
  -webkit-backdrop-filter: var(--ios-blur);
  border: 1px solid var(--ios-card-border);
  box-shadow: var(--shadow-rest);
  transform: translateZ(0) perspective(800px) rotateX(0deg);
  will-change: transform, box-shadow;
  transition:
    transform 360ms var(--spring-bounce),
    box-shadow 360ms var(--spring-smooth),
    filter 200ms ease;
}

/* Hover: card lifts up, shadow deepens */
.dish-card:hover,
.order-card:hover,
.msg-item:hover,
.profile-menu-item:hover,
.discover-restaurant-card:hover,
.moment-card:hover,
.record-item:hover {
  box-shadow: var(--shadow-hover);
  transform: translateZ(0) perspective(800px) rotateX(0deg) translateY(-2px);
}

/* Press: card pushes down into surface, shadow flattens */
.dish-card.ios26-pressing,
.order-card.ios26-pressing,
.msg-item.ios26-pressing,
.discover-restaurant-card.ios26-pressing,
.moment-card.ios26-pressing,
.record-item.ios26-pressing {
  transform: translateZ(0) perspective(800px) rotateX(1.2deg) scale(0.975) translateY(1px);
  box-shadow: var(--shadow-press);
  filter: brightness(0.97);
}

/* === Category Sidebar & Dish Panel === */
.category-sidebar,
.dish-panel {
  background: rgba(255, 255, 255, 0.56) !important;
  backdrop-filter: blur(14px) saturate(170%);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  box-shadow: var(--shadow-rest);
  transform: translateZ(0);
}

/* === Login Status Bar === */
.login-status-bar {
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: var(--ios-blur);
  -webkit-backdrop-filter: var(--ios-blur);
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 14px;
  margin: 8px 10px 4px;
  box-shadow: var(--shadow-rest);
  transform: translateZ(0);
}

/* === Fix message page header text color === */
.msg-page-header {
  position: sticky;
  padding: 14px 16px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 249, 252, 0.86)) !important;
}

.msg-page-header .msg-page-title {
  color: #132238 !important;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.msg-page-header .msg-edit-btn {
  color: #d85a24 !important;
  font-weight: 700;
}

/* === Fix discover & order page header text color === */
.discover-header .discover-title,
.order-page-header .order-page-title {
  color: #1A1A1A !important;
}

/* === Fix notice card text color === */
.msg-notice-card,
.msg-notice-card .msg-notice-title,
.msg-notice-card .msg-notice-sub {
  color: #fff !important;
}

.msg-notice-card {
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 28%),
    linear-gradient(135deg, #f97316 0%, #fb7185 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow:
    0 16px 40px rgba(249, 115, 22, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}

.msg-notice-card .msg-notice-icon {
  background: rgba(255, 255, 255, 0.16) !important;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.msg-notice-card .msg-notice-title {
  color: #fff !important;
  font-size: 15px;
  font-weight: 800;
}

.msg-notice-card .msg-notice-sub {
  color: rgba(255, 247, 243, 0.96) !important;
}

.msg-notice-card .msg-notice-badge {
  color: #FF6B35 !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.24);
}

.msg-list {
  background: rgba(255, 255, 255, 0.46) !important;
}

.msg-section-title {
  color: rgba(71, 85, 105, 0.9) !important;
  font-weight: 700;
}

/* === Profile featured journey entry === */
.profile-journey-entry {
  margin: 0 12px 12px;
  padding: 16px 16px 14px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 10% 18%, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(246, 251, 255, 0.74));
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-rest);
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.profile-journey-entry::after {
  content: "";
  position: absolute;
  inset: auto -20% -58% 30%;
  height: 120px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18), rgba(59, 130, 246, 0));
  pointer-events: none;
}

.profile-journey-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(232, 241, 255, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 12px 26px rgba(59, 130, 246, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-journey-icon svg {
  width: 26px;
  height: 26px;
  stroke: #2563eb;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-journey-content {
  flex: 1;
  min-width: 0;
}

.profile-journey-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(37, 99, 235, 0.75);
  margin-bottom: 4px;
}

.profile-journey-title {
  font-size: 18px;
  font-weight: 800;
  color: #132238;
  margin-bottom: 4px;
}

.profile-journey-sub {
  font-size: 13px;
  color: rgba(71, 85, 105, 0.94);
}

.profile-journey-meta {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  min-width: 72px;
  position: relative;
  z-index: 1;
}

.profile-journey-pill {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #1d4ed8;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.88);
}

.profile-journey-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  color: #1d4ed8;
  font-size: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

/* === Success sheet === */
.ios26-success-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.ios26-success-sheet {
  width: min(360px, 92vw);
  padding: 28px 24px 22px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0) 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 248, 255, 0.84));
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow:
    0 28px 80px rgba(15, 23, 42, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  position: relative;
  overflow: hidden;
  text-align: center;
  animation: ios26SuccessIn 360ms var(--spring-soft);
}

.ios26-success-sheet::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -50px;
  top: -70px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18), rgba(59, 130, 246, 0));
  pointer-events: none;
}

.ios26-success-sheet::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  left: -56px;
  bottom: -92px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.16), rgba(249, 115, 22, 0));
  pointer-events: none;
}

.ios26-success-glyph {
  width: 96px;
  height: 96px;
  margin: 0 auto 18px;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(221, 239, 255, 0.84));
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 18px 38px rgba(59, 130, 246, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.ios26-success-glyph svg {
  width: 56px;
  height: 56px;
  stroke: #2563eb;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ios26-success-title {
  position: relative;
  z-index: 1;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #132238;
  margin-bottom: 8px;
}

.ios26-success-copy {
  position: relative;
  z-index: 1;
  font-size: 14px;
  line-height: 1.65;
  color: #5b667a;
  margin-bottom: 18px;
}

.ios26-success-meta {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.ios26-success-meta-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.78);
}

.ios26-success-meta-label {
  font-size: 12px;
  color: #64748b;
}

.ios26-success-meta-value {
  font-size: 13px;
  font-weight: 700;
  color: #132238;
}

.ios26-success-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
}

.ios26-success-btn {
  flex: 1;
  height: 50px;
  border: none;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.ios26-success-btn.primary {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #fff;
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.ios26-success-btn.secondary {
  background: rgba(255, 255, 255, 0.72);
  color: #334155;
  border: 1px solid rgba(255, 255, 255, 0.82);
}

@keyframes ios26SuccessIn {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/* === Home dish layout refresh === */
#dish-list .dish-card {
  padding: 12px !important;
  gap: 14px;
  align-items: stretch;
  position: relative;
  background:
    radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0) 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(247, 250, 255, 0.8)) !important;
}

#dish-list .dish-card::after {
  content: "";
  position: absolute;
  inset: auto -18px -60px auto;
  width: 130px;
  height: 130px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.12), rgba(249, 115, 22, 0));
  pointer-events: none;
}

#dish-list .dish-img {
  width: 104px;
  height: 104px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,0.92), rgba(238, 244, 255, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.94),
    0 14px 30px rgba(148, 163, 184, 0.14);
}

#dish-list .dish-info {
  padding: 0;
  gap: 10px;
}

#dish-list .dish-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

#dish-list .dish-copy {
  flex: 1;
  min-width: 0;
}

#dish-list .dish-name {
  font-size: 16px;
  font-weight: 800;
  color: #122033;
  margin-bottom: 6px;
}

#dish-list .dish-caption {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#dish-list .dish-category-chip,
#dish-list .dish-status-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

#dish-list .dish-category-chip {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
}

#dish-list .dish-status-chip {
  color: #f97316;
  background: rgba(249, 115, 22, 0.1);
}

#dish-list .dish-desc {
  white-space: normal;
  -webkit-line-clamp: 2;
}

#dish-list .dish-meta {
  gap: 10px;
  margin-bottom: 0;
}

#dish-list .dish-rating,
#dish-list .dish-sales {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

#dish-list .dish-bottom {
  margin-top: auto;
  padding-top: 2px;
}

#dish-list .qty-ctrl {
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.84);
}

/* === Detail pages hide status bar === */
.detail-page .ios26-status-bar,
body.page-detail .ios26-status-bar,
.page-detail .ios26-status-bar {
  display: none !important;
}

/* === Banner === */
.banner-section {
  border-radius: var(--ios-radius-lg);
  box-shadow: var(--shadow-rest);
  border: 1px solid rgba(255, 255, 255, 0.7);
  transform: translateZ(0);
  transition: box-shadow 400ms var(--spring-smooth);
}

/* === Order Content === */
.order-content,
.msg-list {
  padding: 12px 10px 100px;
}

/* === Tabs & Filters === */
.order-tabs,
.moments-filter {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-rest);
  transform: translateZ(0);
}

.order-tab-btn,
.moments-filter-btn {
  border-radius: 12px;
  transition: transform 280ms var(--spring-bounce), box-shadow 280ms var(--spring-smooth);
  will-change: transform;
}

.order-tab-btn:active,
.moments-filter-btn:active {
  transform: scale(0.94);
}

/* === Tab Bar — Floating Glass === */
.tab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: rgba(255, 255, 255, 0.62) !important;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06), 0 -12px 32px rgba(15, 23, 42, 0.04);
  height: calc(var(--tab-height) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  transform: none !important;
  will-change: auto;
  transition:
    box-shadow 320ms var(--spring-smooth),
    background-color 320ms var(--spring-smooth);
  z-index: 320;
}

body.scrolled .tab-bar {
  background: rgba(255, 255, 255, 0.74) !important;
  box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.10), 0 -16px 40px rgba(15, 23, 42, 0.06);
}

/* === Tab Items — Spring Magnetic === */
.tab {
  color: #6b7280;
  transform: translateZ(0);
  will-change: transform;
  transition:
    transform 360ms var(--spring-bounce),
    color 200ms ease,
    opacity 200ms ease;
  gap: 4px;
}

.tab.active {
  color: #ff6b35 !important;
  transform: translateY(-3px) scale(1.02);
}

.tab .tab-label {
  opacity: 0.9;
  transition: transform 360ms var(--spring-bounce), opacity 200ms ease, letter-spacing 200ms ease;
}

.tab.active .tab-label {
  font-weight: 700;
  opacity: 1;
  transform: translateY(-1px);
  letter-spacing: 0.1px;
}

.tab .tab-icon {
  transition: transform 360ms var(--spring-bounce), filter 200ms ease, opacity 200ms ease;
  opacity: 0.84;
}

.tab.active .tab-icon {
  transform: translateY(-1px) scale(1.08);
  opacity: 1;
}

/* === Tab Icon — Pill Button === */
.tab .ios26-tab-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #67707d;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  transform: translateZ(0);
  will-change: transform, box-shadow, color, background-color;
  transition:
    transform 400ms var(--spring-bounce),
    box-shadow 320ms var(--spring-smooth),
    color 200ms ease,
    background-color 320ms var(--spring-smooth),
    border-color 320ms ease;
}

.tab .ios26-tab-icon svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.tab.active .ios26-tab-icon {
  color: #fff;
  background: linear-gradient(145deg, #ff6b35 0%, #ff9157 100%);
  border-color: rgba(255, 148, 105, 0.9);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.30), 0 8px 20px rgba(255, 107, 53, 0.15);
  transform: translateY(-3px) scale(1.08);
}

/* Tab icon press */
.tab:active .ios26-tab-icon {
  transform: scale(0.88) translateY(0px);
  transition-duration: 120ms;
}

/* === Buttons — Physical Press === */
.btn-sub-primary,
.exchange-btn,
.modal-confirm,
.btn-checkout {
  border-radius: 14px !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.20), 0 8px 20px rgba(37, 99, 235, 0.12);
  transform: translateZ(0);
  will-change: transform, box-shadow;
  transition:
    transform 300ms var(--spring-bounce),
    box-shadow 300ms var(--spring-smooth),
    filter 150ms ease;
}

.btn-sub-primary:active,
.exchange-btn:active,
.modal-confirm:active,
.btn-checkout:active {
  transform: translateY(2px) scale(0.97);
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.15);
  filter: brightness(0.95);
  transition-duration: 100ms;
}

/* === Form Inputs === */
.form-input,
.form-textarea,
.form-select,
input[type="text"],
input[type="tel"],
input[type="password"],
textarea {
  border-radius: 12px;
  box-shadow: var(--shadow-rest), inset 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: box-shadow 280ms var(--spring-smooth), border-color 200ms ease;
  transform: translateZ(0);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
textarea:focus {
  box-shadow: var(--shadow-hover), 0 0 0 3px rgba(37, 99, 235, 0.08);
}

/* === Profile Hero === */
.profile-hero {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 38%),
    linear-gradient(135deg, #0f172a 0%, #1d4ed8 48%, #06b6d4 100%);
  border-radius: 0 0 26px 26px;
  margin: 0 0 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
  transform: translateZ(0);
}

/* === Footer Bars === */
.sub-footer-btn,
.bottom-bar {
  background: rgba(255, 255, 255, 0.64) !important;
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
  transform: translateZ(0);
}

/* === Spring Entry Animation === */
@keyframes iosSpringUp {
  0% {
    opacity: 0;
    transform: translate3d(0, 20px, 0) scale(0.96);
  }
  50% {
    opacity: 1;
    transform: translate3d(0, -4px, 0) scale(1.01);
  }
  75% {
    transform: translate3d(0, 1px, 0) scale(0.998);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.service-grid,
.section-header,
.menu-layout,
.order-card,
.dish-card,
.msg-item,
.msg-notice-card,
.discover-section,
.discover-restaurant-card,
.moment-card,
.profile-orders-card,
.profile-service-card,
.profile-menu-card,
.sub-card,
.form-card,
.address-card,
.record-item,
.item {
  opacity: 0;
  animation: iosSpringUp 580ms var(--spring-bounce) forwards;
  will-change: transform, opacity;
}

.service-grid,
.section-header,
.menu-layout {
  animation-delay: 40ms;
}

.order-card,
.dish-card,
.msg-item,
.msg-notice-card,
.discover-restaurant-card,
.moment-card,
.record-item,
.item {
  animation-delay: 80ms;
}

/* 禁用dish-card的入场动画，避免初始重叠 */
.dish-card {
  opacity: 1 !important;
  animation: none !important;
}

/* 首页菜品卡片布局兜底，避免不同主题样式叠加后发生上下挤压/重叠 */
#dish-list {
  display: flex;
  flex-direction: column;
  padding: 8px 0 120px;
}

#dish-list .dish-card {
  flex: 0 0 auto;
  align-items: stretch;
  min-height: 116px;
  margin: 0 10px !important;
}

#dish-list .dish-card + .dish-card {
  margin-top: 12px !important;
}

#dish-list .dish-info {
  min-height: 88px;
}

.profile-orders-card,
.profile-service-card,
.profile-menu-card,
.sub-card,
.form-card,
.address-card {
  animation-delay: 120ms;
}

/* Staggered delays */
.order-card:nth-of-type(2),
.dish-card:nth-of-type(2),
.msg-item:nth-of-type(2),
.discover-restaurant-card:nth-of-type(2),
.moment-card:nth-of-type(2),
.record-item:nth-of-type(2),
.item:nth-of-type(2) {
  animation-delay: 150ms;
}

.order-card:nth-of-type(3),
.dish-card:nth-of-type(3),
.msg-item:nth-of-type(3),
.discover-restaurant-card:nth-of-type(3),
.moment-card:nth-of-type(3),
.record-item:nth-of-type(3),
.item:nth-of-type(3) {
  animation-delay: 200ms;
}

.order-card:nth-of-type(4),
.dish-card:nth-of-type(4),
.msg-item:nth-of-type(4),
.discover-restaurant-card:nth-of-type(4),
.moment-card:nth-of-type(4),
.record-item:nth-of-type(4),
.item:nth-of-type(4) {
  animation-delay: 250ms;
}

/* === Ripple Effect Container === */
.ios26-ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,0,0,0.08) 0%, transparent 70%);
  pointer-events: none;
  transform: scale(0);
  animation: rippleExpand 500ms ease-out forwards;
}

@keyframes rippleExpand {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* === Safe Area Bottom === */
.bottom-bar,
.sub-footer-btn,
.btn-checkout,
.floating-action,
.fixed-action {
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}

/* === Responsive === */
@media (max-width: 768px) {
  .top-bar,
  .order-page-header,
  .msg-page-header,
  .discover-header {
    margin: 6px 8px 0;
  }
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
