/* ==========================================================================
   小小火箭 · Apple Cupertino Edition (独立横条流设计系统)
   设计语言：Apple Store (apple.com/store) + macOS Sequoia 毛玻璃横条卡片流
   与传统后台表格存在本质视觉区别：采用顶部灵动分类坞 + 独立悬浮圆角横条舱 (Floating Spec Strips)
   ========================================================================== */

:root,
[data-apple-theme="light"] {
  --ap-bg: #F5F5F7;
  --ap-surface: #FFFFFF;
  --ap-surface-glass: rgba(255, 255, 255, 0.80);
  --ap-surface-subtle: #F9F9FB;
  --ap-text-main: #1D1D1F;
  --ap-text-sec: #6E6E73;
  --ap-text-muted: #86868B;
  --ap-blue: #0071E3;
  --ap-blue-hover: #0077ED;
  --ap-blue-tint: rgba(0, 113, 227, 0.08);
  --ap-green: #28CD41;
  --ap-green-tint: rgba(40, 205, 65, 0.12);
  --ap-amber: #FF9500;
  --ap-amber-tint: rgba(255, 149, 0, 0.12);
  --ap-border: rgba(0, 0, 0, 0.065);
  --ap-border-strong: rgba(0, 0, 0, 0.12);
  --ap-shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.03);
  --ap-shadow-card: 0 4px 20px rgba(0, 0, 0, 0.045);
  --ap-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.085);
  --ap-radius-xl: 22px;
  --ap-radius-lg: 16px;
  --ap-radius-pill: 980px;
  --ap-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --ap-transition: all 0.28s cubic-bezier(0.25, 1, 0.5, 1);
}

[data-apple-theme="dark"] {
  --ap-bg: #000000;
  --ap-surface: #1C1C1E;
  --ap-surface-glass: rgba(28, 28, 30, 0.82);
  --ap-surface-subtle: #2C2C2E;
  --ap-text-main: #F5F5F7;
  --ap-text-sec: #A1A1A6;
  --ap-text-muted: #86868B;
  --ap-blue: #2997FF;
  --ap-blue-hover: #40A9FF;
  --ap-blue-tint: rgba(41, 151, 255, 0.15);
  --ap-border: rgba(255, 255, 255, 0.10);
  --ap-border-strong: rgba(255, 255, 255, 0.18);
  --ap-shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);
  --ap-shadow-card: 0 6px 24px rgba(0, 0, 0, 0.5);
  --ap-shadow-hover: 0 14px 36px rgba(0, 113, 227, 0.25);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  font-family: var(--ap-font);
  background-color: var(--ap-bg);
  color: var(--ap-text-main);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ==================== 1. Apple Global Frosted Header ==================== */
.ap-navbar {
  position: sticky;
  top: 0;
  z-index: 300;
  background: var(--ap-surface-glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--ap-border);
}

.ap-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ap-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  user-select: none;
}

.ap-brand-squircle {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, #1D1D1F 0%, #3A3A3C 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

[data-apple-theme="dark"] .ap-brand-squircle {
  background: linear-gradient(145deg, #0071E3 0%, #2997FF 100%);
}

.ap-brand-text {
  display: flex;
  flex-direction: column;
}

.ap-brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ap-text-main);
  line-height: 1.15;
}

.ap-brand-sub {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ap-text-muted);
  letter-spacing: 0.5px;
}

.ap-vn-flag {
  width: 38px;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  display: flex;
}

/* Segmented Pill Nav */
.ap-seg-nav {
  display: flex;
  align-items: center;
  background: var(--ap-surface-subtle);
  padding: 4px;
  border-radius: var(--ap-radius-pill);
  border: 1px solid var(--ap-border);
  gap: 2px;
}

.ap-seg-btn {
  border: none;
  background: transparent;
  color: var(--ap-text-sec);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 15px;
  border-radius: var(--ap-radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--ap-transition);
  white-space: nowrap;
}

.ap-seg-btn:hover {
  color: var(--ap-text-main);
}

.ap-seg-btn.active {
  background: var(--ap-surface);
  color: var(--ap-text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ap-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ap-tool-pill {
  height: 34px;
  padding: 0 12px;
  border-radius: var(--ap-radius-pill);
  border: 1px solid var(--ap-border);
  background: var(--ap-surface);
  color: var(--ap-text-main);
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--ap-transition);
}

.ap-tool-pill:hover {
  border-color: var(--ap-blue);
  color: var(--ap-blue);
}

.ap-icon-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--ap-border);
  background: var(--ap-surface);
  color: var(--ap-text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  cursor: pointer;
  position: relative;
  transition: var(--ap-transition);
}

.ap-icon-circle:hover {
  border-color: var(--ap-blue);
  color: var(--ap-blue);
}

.ap-bag-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--ap-blue);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Language Dropdown */
.ap-lang-wrap {
  position: relative;
}

.ap-lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 150px;
  background: var(--ap-surface);
  border: 1px solid var(--ap-border-strong);
  border-radius: 14px;
  padding: 6px;
  box-shadow: var(--ap-shadow-hover);
  display: none;
  flex-direction: column;
  gap: 3px;
  z-index: 1000;
}

.ap-lang-menu.open {
  display: flex;
}

.ap-lang-opt {
  border: none;
  background: transparent;
  color: var(--ap-text-main);
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: left;
}

.ap-lang-opt:hover {
  background: var(--ap-surface-subtle);
}

.ap-lang-opt.active {
  background: var(--ap-blue-tint);
  color: var(--ap-blue);
}

/* ==================== 2. Main Container & Apple Store Chapter Header ==================== */
.ap-main {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 24px 64px 24px;
  flex: 1;
}

/* Apple Store Top Title + Spotlight Search Bar */
.ap-store-top-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 22px;
}

.ap-headline {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ap-text-main);
}

.ap-headline span {
  color: var(--ap-text-muted);
  font-weight: 600;
}

.ap-spotlight-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ap-surface);
  border: 1px solid var(--ap-border-strong);
  border-radius: var(--ap-radius-pill);
  padding: 5px 6px 5px 16px;
  width: 380px;
  max-width: 100%;
  box-shadow: var(--ap-shadow-sm);
  transition: var(--ap-transition);
}

.ap-spotlight-wrap:focus-within {
  border-color: var(--ap-blue);
  box-shadow: 0 0 0 4px var(--ap-blue-tint);
}

.ap-spotlight-wrap i {
  color: var(--ap-text-muted);
  font-size: 14px;
}

.ap-spotlight-input {
  border: none;
  background: transparent;
  outline: none;
  color: var(--ap-text-main);
  font-size: 13.5px;
  flex: 1;
  min-width: 0;
}

.ap-spotlight-btn {
  background: var(--ap-text-main);
  color: var(--ap-surface);
  border: none;
  padding: 8px 16px;
  border-radius: var(--ap-radius-pill);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--ap-transition);
}

.ap-spotlight-btn:hover {
  opacity: 0.88;
}

/* ==================== 3. Apple Chapter Dock (横向灵动分类胶囊流) ====================
   默认支持全部分类自动换行完整展示 (flex-wrap: wrap)，同时配备单行左右滑动箭头与切换开关
   ========================================================================== */
.ap-dock-wrapper {
  background: var(--ap-surface);
  border: 1px solid var(--ap-border);
  border-radius: 22px;
  padding: 14px 18px;
  margin-bottom: 24px;
  box-shadow: var(--ap-shadow-sm);
}

.ap-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 2px;
}

.ap-dock-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ap-text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ap-dock-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ap-dock-ctrl-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: var(--ap-radius-pill);
  border: 1px solid var(--ap-border-strong);
  background: var(--ap-surface-subtle);
  color: var(--ap-text-sec);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: var(--ap-transition);
}

.ap-dock-ctrl-btn:hover {
  border-color: var(--ap-blue);
  color: var(--ap-blue);
}

.ap-chapter-dock {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  scroll-behavior: smooth;
}

.ap-chapter-dock.single-row-mode {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.ap-chapter-pill {
  border: 1px solid transparent;
  background: var(--ap-surface-subtle);
  color: var(--ap-text-sec);
  padding: 9px 15px;
  border-radius: var(--ap-radius-pill);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: var(--ap-transition);
}

.ap-chapter-pill:hover {
  background: var(--ap-blue-tint);
  color: var(--ap-blue);
}

.ap-chapter-pill.active {
  background: var(--ap-text-main);
  color: var(--ap-surface);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.ap-chapter-pill.active i {
  color: var(--ap-surface) !important;
}

.ap-chapter-count {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 99px;
  background: rgba(128, 128, 128, 0.16);
}

.ap-chapter-pill.active .ap-chapter-count {
  background: rgba(128, 128, 128, 0.32);
  color: var(--ap-surface);
}

/* ==================== 4. Apple Sculpted Horizontal Row List (独立悬浮横条流) ====================
   本质区别点 2：不再是连在一起的灰线表格，而是每一行都是独立悬浮的 Apple Spec Strip 圆角横舱
   ========================================================================== */
.ap-section-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0 6px;
}

.ap-sec-cat-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ap-sec-count-badge {
  font-size: 13px;
  font-weight: 600;
  color: var(--ap-text-muted);
}

.ap-rows-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ap-row-strip {
  background: var(--ap-surface);
  border: 1px solid var(--ap-border);
  border-radius: 20px;
  padding: 18px 24px;
  box-shadow: var(--ap-shadow-card);
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) 150px 140px 130px;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  transition: var(--ap-transition);
  position: relative;
}

.ap-row-strip:hover {
  transform: scale(1.005) translateY(-1px);
  box-shadow: var(--ap-shadow-hover);
  border-color: rgba(0, 113, 227, 0.35);
}

/* Column 1: Squircle App Icon + Title + Spec Pills */
.ap-row-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.ap-squircle-icon {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: var(--ap-surface-subtle);
  border: 1px solid var(--ap-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 4px 10px rgba(0, 0, 0, 0.04);
}

.ap-row-info {
  min-width: 0;
  flex: 1;
}

.ap-row-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.ap-row-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ap-text-main);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ap-spec-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.ap-pill {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--ap-radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ap-pill-blue {
  background: var(--ap-blue-tint);
  color: var(--ap-blue);
}

.ap-pill-green {
  background: var(--ap-green-tint);
  color: #15803D;
}

[data-apple-theme="dark"] .ap-pill-green {
  color: #4ADE80;
}

.ap-pill-amber {
  background: var(--ap-amber-tint);
  color: #B45309;
}

[data-apple-theme="dark"] .ap-pill-amber {
  color: #FBBF24;
}

.ap-pill-gray {
  background: var(--ap-surface-subtle);
  color: var(--ap-text-sec);
  border: 1px solid var(--ap-border);
}

/* Column 2: Stock Health Indicator */
.ap-row-stock {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.ap-stock-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ap-text-sec);
}

.ap-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ap-green);
  box-shadow: 0 0 0 3px var(--ap-green-tint);
}

.ap-status-dot.tight {
  background: var(--ap-amber);
  box-shadow: 0 0 0 3px var(--ap-amber-tint);
}

.ap-stock-bar-bg {
  width: 90px;
  height: 4px;
  border-radius: 99px;
  background: var(--ap-surface-subtle);
  overflow: hidden;
}

.ap-stock-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--ap-green);
}

.ap-stock-bar-fill.tight {
  background: var(--ap-amber);
}

/* Column 3: Apple Store Pricing */
.ap-row-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.ap-price-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--ap-text-main);
  letter-spacing: -0.02em;
}

.ap-price-sub {
  font-size: 11px;
  color: var(--ap-text-muted);
  margin-top: 2px;
}

/* Column 4: Apple Buy Pill Button */
.ap-row-action {
  display: flex;
  justify-content: flex-end;
}

.ap-buy-btn {
  background: var(--ap-blue);
  color: #FFFFFF;
  border: none;
  padding: 9px 20px;
  border-radius: var(--ap-radius-pill);
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--ap-transition);
}

.ap-buy-btn:hover {
  background: var(--ap-blue-hover);
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.35);
}

.ap-buy-btn.preorder-btn {
  background: var(--ap-text-main);
  color: var(--ap-surface);
}

.ap-buy-btn.preorder-btn:hover {
  opacity: 0.86;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

/* SKU & Pay Method Selector Pills in Apple Sheet */
.ap-sku-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.ap-sku-pill {
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--ap-border-strong);
  background: var(--ap-surface-subtle);
  color: var(--ap-text-main);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--ap-transition);
}

.ap-sku-pill.active {
  border-color: var(--ap-blue);
  background: var(--ap-blue-tint);
  color: var(--ap-blue);
  font-weight: 700;
}

/* ==================== 5. Sub-views (Orders, 2FA, Tutorials, Auth & /me) ==================== */
.ap-card-panel {
  background: var(--ap-surface);
  border: 1px solid var(--ap-border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--ap-shadow-card);
}

.ap-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ap-blue);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.ap-input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid var(--ap-border-strong);
  background: var(--ap-surface-subtle);
  color: var(--ap-text-main);
  font-size: 14px;
  outline: none;
  transition: var(--ap-transition);
}

.ap-input:focus {
  background: var(--ap-surface);
  border-color: var(--ap-blue);
  box-shadow: 0 0 0 4px var(--ap-blue-tint);
}

.ap-totp-box {
  font-family: "SF Mono", Consolas, monospace;
  font-size: 46px;
  font-weight: 800;
  letter-spacing: 8px;
  color: var(--ap-blue);
  background: var(--ap-blue-tint);
  border-radius: 20px;
  padding: 22px;
  text-align: center;
  margin: 20px 0;
  cursor: pointer;
}

/* Apple Auth 2-Tab Login Switcher & Bottom Secondary Register Action */
.ap-auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: var(--ap-surface-subtle);
  border: 1px solid var(--ap-border-strong);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 18px;
  gap: 6px;
}

.ap-auth-tab {
  border: none;
  background: transparent;
  color: var(--ap-text-sec);
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--ap-transition);
}

.ap-auth-tab.active {
  background: var(--ap-surface);
  color: var(--ap-text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.ap-auth-primary-btn {
  width: 100%;
  justify-content: center;
  padding: 14px 20px;
  font-size: 15.5px;
  font-weight: 700;
  margin-top: 8px;
  box-shadow: 0 6px 20px rgba(0, 113, 227, 0.28);
}

.ap-auth-bottom-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--ap-border);
  font-size: 12.5px;
  color: var(--ap-text-muted);
}

.ap-auth-register-link {
  border: none;
  background: transparent;
  color: var(--ap-blue);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
  transition: var(--ap-transition);
}

.ap-auth-register-link:hover {
  text-decoration: underline;
  background: var(--ap-blue-tint);
}

.ap-send-code-btn {
  background: var(--ap-surface-subtle);
  border: 1px solid var(--ap-border-strong);
  color: var(--ap-blue);
  font-size: 13px;
  font-weight: 700;
  padding: 0 16px;
  border-radius: 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--ap-transition);
}

.ap-send-code-btn:hover:not(:disabled) {
  border-color: var(--ap-blue);
  background: var(--ap-blue-tint);
}

.ap-send-code-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ap-pwd-eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--ap-text-muted);
  font-size: 15px;
  cursor: pointer;
}

.ap-pwd-rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--ap-surface-subtle);
  border: 1px solid var(--ap-border);
}

.ap-rule-item {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ap-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--ap-transition);
}

.ap-rule-item.passed {
  color: var(--ap-green);
}

.ap-img-captcha-box {
  width: 114px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #EDE9FE 0%, #E0E7FF 50%, #FCE7F3 100%);
  border: 1px solid var(--ap-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
}

.ap-code-banner {
  background: var(--ap-blue-tint);
  border: 1px solid rgba(0, 113, 227, 0.35);
  color: var(--ap-text-main);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

/* ==================== 6. Modals (Apple Sheet Dialog) ==================== */
.ap-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ap-modal-backdrop.active {
  display: flex;
}

.ap-sheet-dialog {
  background: var(--ap-surface);
  border: 1px solid var(--ap-border);
  border-radius: 26px;
  max-width: 580px;
  width: 100%;
  padding: 30px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  max-height: 90vh;
  overflow-y: auto;
}

.ap-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--ap-surface-subtle);
  color: var(--ap-text-sec);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ap-close-btn:hover {
  background: var(--ap-border-strong);
  color: var(--ap-text-main);
}

/* ==================== 7. Footer & Toast ==================== */
.ap-footer {
  border-top: 1px solid var(--ap-border);
  padding: 24px;
  font-size: 12.5px;
  color: var(--ap-text-muted);
  background: var(--ap-surface);
}

.ap-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.ap-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1D1D1F;
  color: #FFFFFF;
  padding: 12px 24px;
  border-radius: var(--ap-radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  z-index: 3000;
  opacity: 0;
  transition: var(--ap-transition);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.ap-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==================== 8. Responsive Breakpoints (Tablet & Mobile) ==================== */
@media (max-width: 900px) {
  .ap-row-strip {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 16px 18px;
  }
  .ap-row-stock {
    display: none;
  }
  .ap-row-price {
    align-items: flex-end;
  }
  .ap-row-action {
    grid-column: 1 / -1;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--ap-border);
  }
}

@media (max-width: 640px) {
  .ap-nav-inner {
    flex-wrap: wrap;
    padding: 10px 14px;
  }
  .ap-seg-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    justify-content: space-between;
  }
  .ap-main {
    padding: 18px 14px 48px 14px;
  }
  .ap-headline {
    font-size: 24px;
  }
  .ap-spotlight-wrap {
    width: 100%;
  }
  .ap-row-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}
