/* ==========================================================================
   Apple Design Language System (iOS / macOS)
   Typography: Plus Jakarta Sans
   Frosted Glass Materials, Sideload Switcher, App Store Cards & Sheet Modal
   ========================================================================== */

:root {
  /* Typography & Palette */
  --apple-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --apple-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace;

  /* Semantic System Labels */
  --apple-label-primary: #FFFFFF;
  --apple-label-secondary: rgba(235, 235, 245, 0.65);
  --apple-label-tertiary: rgba(235, 235, 245, 0.40);
  --apple-label-quaternary: rgba(235, 235, 245, 0.18);

  /* Apple System Colors */
  --apple-blue: #0A84FF;
  --apple-blue-hover: #0071E3;
  --apple-green: #30D158;
  --apple-bg: #060608;
  --apple-surface: rgba(22, 22, 28, 0.72);
  --apple-surface-elevated: rgba(28, 28, 36, 0.82);
  --apple-border: rgba(255, 255, 255, 0.08);
  --apple-border-highlight: rgba(255, 255, 255, 0.14);

  /* Radii & Physics */
  --radius-squircle: 22px;
  --radius-pill: 999px;
  --spring-duration: 0.28s;
  --spring-easing: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--apple-font);
  background-color: var(--apple-bg);
  color: var(--apple-label-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: 90px;
  /* Deep Space Apple Wallpaper with Diffused Refractive Lighting */
  background-image: 
    radial-gradient(circle 800px at 50% -100px, rgba(79, 70, 229, 0.16), transparent 80%),
    radial-gradient(circle 600px at 10% 400px, rgba(168, 85, 247, 0.10), transparent 70%),
    radial-gradient(circle 700px at 90% 700px, rgba(14, 165, 233, 0.08), transparent 70%);
  background-attachment: fixed;
}

/* Hero Section (Showcase Header)
   ========================================================================== */
header.hero-section {
  max-width: 860px;
  margin: 56px auto 32px;
  padding: 0 24px;
  text-align: center;
}

.hero-icon-container {
  display: inline-block;
  margin-bottom: 22px;
  position: relative;
}

.hero-icon {
  width: 104px;
  height: 104px;
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  object-fit: cover;
  display: block;
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--apple-blue);
  margin-bottom: 10px;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.hero-subtitle {
  color: var(--apple-label-secondary);
  font-size: 1.15rem;
  max-width: 580px;
  margin: 0 auto 32px;
  font-weight: 400;
  line-height: 1.45;
}

/* Unified Sideload Capsule & Interactive Switcher
   ========================================================================== */
.sideload-capsule-wrapper {
  max-width: 680px;
  margin: 0 auto 36px;
  padding: 0 16px;
}

.sideload-capsule {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: 26px;
  background: var(--apple-surface);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--apple-border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

/* Desktop 4-Way Sideload Client Segmented Switcher */
.segmented-switcher {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: rgba(12, 12, 16, 0.55);
  padding: 5px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.action-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--apple-label-secondary);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--spring-duration) var(--spring-easing);
  user-select: none;
  text-decoration: none;
}

.action-chip svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
  flex-shrink: 0;
}

.action-chip:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.06);
}

.action-chip:active {
  transform: scale(0.96);
}

.action-chip.active {
  color: #FFFFFF;
  background: var(--apple-blue);
  border-color: var(--apple-blue);
  box-shadow: 0 4px 14px rgba(10, 132, 255, 0.35);
}

/* Mobile Apple-Style Dropdown Switcher (Default: Hidden on Desktop)
   ========================================================================== */
.mobile-dropdown-wrapper {
  display: none;
  position: relative;
  width: 100%;
}

.apple-dropdown-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-radius: var(--radius-pill);
  background: rgba(14, 14, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--spring-duration) var(--spring-easing);
  user-select: none;
}

.apple-dropdown-btn:hover {
  background: rgba(20, 20, 26, 0.85);
  border-color: rgba(255, 255, 255, 0.16);
}

.apple-dropdown-btn:active {
  transform: scale(0.98);
}

.dropdown-selected-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dropdown-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}

.dropdown-label {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.dropdown-chevron {
  width: 16px;
  height: 16px;
  color: var(--apple-label-secondary);
  transition: transform var(--spring-duration) var(--spring-easing);
  flex-shrink: 0;
}

.mobile-dropdown-wrapper.open .dropdown-chevron {
  transform: rotate(180deg);
}

.mobile-dropdown-wrapper.open .apple-dropdown-btn {
  border-color: var(--apple-blue);
  background: rgba(20, 20, 26, 0.92);
}

/* Apple iOS Popover Menu */
.apple-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 150;
  background: rgba(28, 28, 36, 0.96);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65), 0 2px 8px rgba(0, 0, 0, 0.4);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-dropdown-wrapper.open .apple-menu-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.apple-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  user-select: none;
  width: 100%;
}

.apple-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.apple-menu-item:active {
  transform: scale(0.98);
}

.menu-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-item-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}

.menu-item-text {
  font-size: 0.94rem;
  color: var(--apple-label-primary);
}

.menu-item-check {
  width: 17px;
  height: 17px;
  color: var(--apple-blue);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.apple-menu-item.active {
  background: rgba(10, 132, 255, 0.12);
}

.apple-menu-item.active .menu-item-text {
  font-weight: 600;
  color: #FFFFFF;
}

.apple-menu-item.active .menu-item-check {
  opacity: 1;
}

/* Switcher Action Panel & Primary Install Button */
.switcher-action-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  padding: 2px 0;
}

.primary-install-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.96rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: -0.01em;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--spring-duration) var(--spring-easing);
}

.primary-install-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.primary-install-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.primary-install-btn:active {
  transform: scale(0.98);
}

.switcher-hint {
  font-size: 0.8rem;
  color: var(--apple-label-tertiary);
  text-align: center;
  line-height: 1.4;
}

/* Tap-to-Copy Source URL Pill */
.source-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 8px 18px;
  border-radius: var(--radius-pill);
  background: rgba(12, 12, 16, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.source-url-code {
  font-family: var(--apple-mono);
  font-size: 0.82rem;
  color: var(--apple-label-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: all;
}

.copy-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--spring-duration) var(--spring-easing);
  flex-shrink: 0;
}

.copy-pill-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.copy-pill-btn:active {
  transform: scale(0.95);
}

.copy-pill-btn.copied {
  background: var(--apple-green);
  border-color: var(--apple-green);
  color: #000000;
  font-weight: 700;
}

/* Main Container & Search
   ========================================================================== */
main.app-store-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.search-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.search-pill-wrapper {
  flex: 1;
  position: relative;
}

.search-pill {
  width: 100%;
  background: var(--apple-surface);
  border: 1px solid var(--apple-border);
  border-radius: var(--radius-pill);
  padding: 12px 18px 12px 42px;
  color: #FFFFFF;
  font-size: 0.95rem;
  font-family: var(--apple-font);
  outline: none;
  transition: var(--spring-duration) var(--spring-easing);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.search-pill:focus {
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.3);
  background: rgba(32, 32, 40, 0.9);
}

.search-glass-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--apple-label-tertiary);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.app-count-tag {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--apple-label-tertiary);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--apple-border);
  white-space: nowrap;
}

/* App Store Product Cards Grid
   ========================================================================== */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.app-card {
  background: var(--apple-surface);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  padding: 22px;
  border-radius: var(--radius-squircle);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border: 1px solid var(--apple-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform var(--spring-duration) var(--spring-easing),
              box-shadow var(--spring-duration) var(--spring-easing),
              border-color var(--spring-duration) var(--spring-easing);
}

.app-card:hover {
  transform: translateY(-4px) scale(1.012);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  border-color: var(--apple-border-highlight);
}

.app-card:active {
  transform: scale(0.98);
}

.app-card-top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.app-squircle-icon {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #1C1C22;
}

.app-card-meta {
  flex: 1;
  min-width: 0;
}

.app-title-h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #FFFFFF;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-dev-name {
  font-size: 0.85rem;
  color: var(--apple-label-secondary);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.capability-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--apple-label-secondary);
}

.chip--blue {
  background: rgba(10, 132, 255, 0.16);
  color: #70B4FF;
  border: 0.5px solid rgba(10, 132, 255, 0.3);
}

.app-card-desc {
  color: var(--apple-label-secondary);
  font-size: 0.88rem;
  line-height: 1.45;
  margin-bottom: 18px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.app-card-date {
  font-size: 0.78rem;
  color: var(--apple-label-tertiary);
}

/* Apple App Store "GET" Button */
.btn-get {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  height: 32px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--apple-blue);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--spring-duration) var(--spring-easing);
  z-index: 10;
}

.btn-get:hover {
  background: var(--apple-blue);
  color: #FFFFFF;
  border-color: var(--apple-blue);
  box-shadow: 0 4px 14px rgba(10, 132, 255, 0.35);
  transform: scale(1.04);
}

.btn-get:active {
  transform: scale(0.95);
}

/* Apple Settings Grouped Instructions Card
   ========================================================================== */
.grouped-instructions {
  background: var(--apple-surface);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  margin: 50px 0 30px;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid var(--apple-border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.instructions-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  text-align: center;
}

.instructions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.instruction-item {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all var(--spring-duration) var(--spring-easing);
}

.instruction-item.active-instruction {
  border-color: rgba(10, 132, 255, 0.45);
  background: rgba(10, 132, 255, 0.08);
}

.instruction-item h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #FFFFFF;
}

.instruction-item p {
  font-size: 0.84rem;
  color: var(--apple-label-secondary);
  line-height: 1.45;
}

/* App Detail Sheet (Slide-Up Modal)
   ========================================================================== */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sheet-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.sheet-modal {
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  background: rgba(24, 24, 32, 0.94);
  backdrop-filter: blur(36px) saturate(180%);
  -webkit-backdrop-filter: blur(36px) saturate(180%);
  border: 1px solid var(--apple-border-highlight);
  border-radius: 32px 32px 0 0;
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sheet-backdrop.active .sheet-modal {
  transform: translateY(0);
}

@media (min-width: 768px) {
  .sheet-backdrop {
    align-items: center;
    padding: 24px;
  }
  .sheet-modal {
    border-radius: 28px;
    max-height: 80vh;
    transform: scale(0.94) translateY(20px);
  }
  .sheet-backdrop.active .sheet-modal {
    transform: scale(1) translateY(0);
  }
}

.sheet-grabber {
  width: 38px;
  height: 5px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  margin: 12px auto 8px;
  flex-shrink: 0;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sheet-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sheet-app-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.sheet-app-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sheet-app-dev {
  font-size: 0.9rem;
  color: var(--apple-label-secondary);
}

.sheet-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.sheet-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.sheet-body {
  padding: 24px;
  overflow-y: auto;
  line-height: 1.6;
}

.sheet-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 20px 0 10px;
  color: #FFFFFF;
}

.sheet-section-title:first-child {
  margin-top: 0;
}

/* "What's New" Container & Truncation with Apple "more" Button
   ========================================================================== */
.sheet-release-notes-wrapper {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  padding: 18px 20px 24px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.sheet-release-notes-wrapper.is-truncated {
  max-height: 160px;
}

.sheet-release-notes-wrapper.is-truncated .sheet-release-notes {
  mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.sheet-notes-expand-btn {
  display: none;
  position: absolute;
  bottom: 10px;
  right: 14px;
  background: rgba(28, 28, 36, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--apple-blue);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.sheet-release-notes-wrapper.has-truncation .sheet-notes-expand-btn {
  display: block;
}

.sheet-notes-expand-btn:hover {
  background: var(--apple-blue);
  color: #FFFFFF;
  border-color: var(--apple-blue);
  transform: scale(1.04);
}

.sheet-notes-expand-btn:active {
  transform: scale(0.96);
}

/* Formatted Markdown in What's New */
.sheet-release-notes {
  font-size: 0.92rem;
  color: var(--apple-label-secondary);
  line-height: 1.6;
  word-break: break-word;
}

.sheet-release-notes h1,
.sheet-release-notes h2,
.sheet-release-notes h3,
.sheet-release-notes h4 {
  color: #FFFFFF;
  font-weight: 700;
  line-height: 1.35;
}

.sheet-release-notes h1 {
  font-size: 1.22rem;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sheet-release-notes h2 {
  font-size: 1.1rem;
  margin: 18px 0 10px;
}

.sheet-release-notes h3 {
  font-size: 1.02rem;
  color: #70B4FF;
  margin: 18px 0 8px;
}

.sheet-release-notes h4 {
  font-size: 0.88rem;
  color: var(--apple-label-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 14px 0 6px;
}

.sheet-release-notes ul,
.sheet-release-notes ol {
  padding-left: 20px;
  margin: 8px 0 14px;
}

.sheet-release-notes li {
  margin-bottom: 6px;
  color: var(--apple-label-secondary);
  line-height: 1.5;
}

.sheet-release-notes p {
  margin-bottom: 12px;
}

.sheet-release-notes p:last-child {
  margin-bottom: 0;
}

.sheet-release-notes strong {
  color: #FFFFFF;
  font-weight: 600;
}

.sheet-release-notes code {
  font-family: var(--apple-mono);
  font-size: 0.84em;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 6px;
  color: #FF9F0A;
}

.sheet-release-notes pre {
  background: rgba(0, 0, 0, 0.4);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
  margin: 12px 0;
}

.sheet-release-notes pre code {
  background: none;
  padding: 0;
  color: var(--apple-label-primary);
  font-size: 0.85rem;
}

.sheet-release-notes a {
  color: var(--apple-blue);
  text-decoration: none;
}

.sheet-release-notes a:hover {
  text-decoration: underline;
}

.sheet-release-notes blockquote {
  border-left: 3px solid var(--apple-blue);
  padding-left: 14px;
  margin: 12px 0;
  color: var(--apple-label-tertiary);
}

.sheet-info-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.sheet-info-card {
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sheet-info-label {
  font-size: 0.75rem;
  color: var(--apple-label-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.sheet-info-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #FFFFFF;
}

/* Apple App Privacy & Permissions (App Store Nutrition Label Style)
   ========================================================================== */
.apple-privacy-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.apple-privacy-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(10, 132, 255, 0.08);
  border: 1px solid rgba(10, 132, 255, 0.2);
}

.privacy-banner-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(10, 132, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--apple-blue);
  flex-shrink: 0;
}

.privacy-banner-icon svg {
  width: 20px;
  height: 20px;
}

.privacy-banner-meta {
  flex: 1;
}

.privacy-banner-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 2px;
}

.privacy-banner-sub {
  font-size: 0.82rem;
  color: var(--apple-label-secondary);
  line-height: 1.4;
}

/* Privacy Permission Cards Grid */
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.privacy-item-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--spring-duration) var(--spring-easing);
}

.privacy-item-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.privacy-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.privacy-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.privacy-icon-box svg {
  width: 17px;
  height: 17px;
}

.privacy-item-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #FFFFFF;
}

.privacy-item-desc {
  font-size: 0.82rem;
  color: var(--apple-label-secondary);
  line-height: 1.45;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: rgba(30, 30, 38, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  z-index: 300;
}

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

/* Footer
   ========================================================================== */
footer {
  margin-top: 60px;
  text-align: center;
  color: var(--apple-label-tertiary);
  font-size: 0.82rem;
}

footer a {
  color: var(--apple-label-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: #FFFFFF;
}

/* Responsive adjustments
   ========================================================================== */
@media (max-width: 640px) {
  header.hero-section {
    margin-top: 40px;
  }
  .hero-title {
    font-size: 2.1rem;
  }
  /* On mobile: Hide desktop segmented tabs, show Apple dropdown */
  .segmented-switcher {
    display: none !important;
  }
  .mobile-dropdown-wrapper {
    display: block;
  }
  .apps-grid {
    grid-template-columns: 1fr;
  }
}
