/* Best iPhone Duo — Apple.com Gallery Design System (Light Default + Optional Pro Dark Mode) */
:root,
html[data-theme="light"] {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-elev: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --surface-3: #e8e8ed;
  --glass: rgba(255, 255, 255, 0.82);
  --glass-strong: rgba(255, 255, 255, 0.94);
  --text: #1d1d1f;
  --text-2: #424245;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.08);
  --line-2: rgba(0, 0, 0, 0.13);
  --line-bright: rgba(0, 0, 0, 0.24);
  --accent: #0066cc;
  --accent-hover: #0052a3;
  --accent-soft: rgba(0, 113, 227, 0.09);
  --new-eyebrow: #bf4800;
  --green: #1d8348;
  --green-soft: rgba(29, 131, 72, 0.1);
  --amber: #bf4800;
  --amber-soft: rgba(180, 83, 9, 0.1);
  --red: #dc2626;
  --stage-bg: linear-gradient(180deg, #f5f5f7 0%, #e8e8ed 100%);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 14px 32px -12px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.1);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, "PingFang SC", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #000000;
  --bg-alt: #161618;
  --bg-elev: #161618;
  --surface: #161618;
  --surface-2: #1d1d1f;
  --surface-3: #1d1d1f;
  --glass: rgba(22, 22, 24, 0.8);
  --glass-strong: rgba(28, 28, 30, 0.94);
  --text: #f5f5f7;
  --text-2: #e8e8ed;
  --muted: #6e6e73;
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.16);
  --line-bright: rgba(255, 255, 255, 0.28);
  --accent: #0066cc;
  --accent-hover: #0066cc;
  --accent-soft: rgba(41, 151, 255, 0.15);
  --new-eyebrow: #d97706;
  --green: #1d8348;
  --green-soft: rgba(48, 209, 88, 0.14);
  --amber: #d97706;
  --amber-soft: rgba(255, 159, 10, 0.14);
  --red: #dc2626;
  --stage-bg: linear-gradient(180deg, #161618 0%, #161618 100%);
  --shadow-card: 0 8px 28px -12px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.09);
  --shadow-hover: 0 18px 42px -14px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(41, 151, 255, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.52 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  max-width: 100vw;
}
main { overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select { font-family: inherit; color: inherit; }
::selection { background: var(--accent); color: #ffffff; }
.tabular { font-variant-numeric: tabular-nums; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 760px) { .wrap { padding: 0 28px; } }
.wrap-wide { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 760px) { .wrap-wide { padding: 0 28px; } }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 8px; background: var(--accent); color: #ffffff; padding: 8px 14px; z-index: 999; border-radius: 99px; text-decoration: none; font-size: 13px; }

/* ---------------- Apple.com Top Navigation Bar ---------------- */
.nav {
  position: sticky; top: 0; z-index: 80;
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 50px; gap: 16px; }
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 600; letter-spacing: -0.02em;
  text-decoration: none; white-space: nowrap; color: var(--text);
}
.brand-glyph {
  width: 20px; height: 14px; border-radius: 3.5px;
  border: 1.5px solid var(--text); position: relative; display: block;
}
.brand-glyph::before {
  content: ""; position: absolute; left: 50%; top: 1px; bottom: 1px; width: 1px;
  transform: translateX(-50%); background: var(--muted);
}

.nav-links { display: none; gap: 17px; align-items: center; }
@media (min-width: 1020px) { .nav-links { display: flex; } }
.nav-links a {
  text-decoration: none; font-size: 12.5px; font-weight: 400; letter-spacing: -0.005em;
  color: var(--text-2); padding: 4px 0; transition: color 0.16s ease; white-space: nowrap;
}
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--text); font-weight: 600; }

.nav-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.search-trigger {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 12px; border-radius: 99px;
  border: 1px solid var(--line-2); background: var(--surface-2);
  color:var(--text); font-size: 12.5px; font-weight: 400; cursor: pointer;
  transition: border-color 0.16s, color 0.16s, background 0.16s;
}
.search-trigger:hover { border-color: var(--line-bright); color: var(--text); }
.search-trigger svg { width: 14px; height: 14px; flex: none; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 32px; min-width: 32px; padding: 0 9px; border-radius: 99px;
  border: 1px solid transparent; background: transparent;
  color: var(--muted); font-size: 12px; font-weight: 500; cursor: pointer;
  transition: background 0.16s, color 0.16s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn[aria-pressed="true"] { color: var(--text); }
.icon-btn svg { width: 15px; height: 15px; flex: none; }
@media (max-width: 540px) {
  .search-trigger span:not(.sr-only) { display: none; }
  .search-trigger { padding: 0 9px; }
  .icon-btn .sound-lbl { display: none; }
}

.nav-mobile {
  display: flex; gap: 16px; overflow-x: auto; padding: 0 36px 10px 20px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(90deg, #000000 88%, transparent);
  mask-image: linear-gradient(90deg, #000000 88%, transparent);
}
.nav-mobile::-webkit-scrollbar { display: none; }
.nav-mobile a {
  text-decoration: none; white-space: nowrap; font-size: 12.5px; font-weight: 500;
  color: var(--muted); padding: 2px 0;
}
.nav-mobile a[aria-current="page"] { color: var(--text); font-weight: 600; border-bottom: 1.5px solid var(--text); }
@media (min-width: 1020px) { .nav-mobile { display: none; } }

/* ---------------- Apple.com Typography ---------------- */
.eyebrow {
  font-size: 13px; line-height: 1.3; font-weight: 600; letter-spacing: -0.005em;
  color: var(--muted); margin: 0 0 8px; display: block;
}
.eyebrow.accent { color: var(--new-eyebrow); }
h1 {
  font-size: clamp(36px, 5vw, 58px); font-weight: 700; line-height: 1.06;
  letter-spacing: -0.032em; margin: 0; color: var(--text);
}
h2 {
  font-size: clamp(26px, 3.4vw, 40px); font-weight: 700; line-height: 1.1;
  letter-spacing: -0.026em; margin: 0; color: var(--text);
}
h3 { font-size: 19px; font-weight: 600; line-height: 1.28; letter-spacing: -0.016em; margin: 0; color: var(--text); }
.lede { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.48; color: var(--muted); margin: 14px 0 0; max-width: 58ch; font-weight: 400; }
.muted { color: var(--muted); }

/* ---------------- Apple Buttons & Links ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 22px; border-radius: 99px; font-size: 15px; font-weight: 500;
  letter-spacing: -0.01em; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background 0.16s, color 0.16s, border-color 0.16s, opacity 0.16s;
}
.btn.primary { background: var(--accent); color: #ffffff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn.secondary:hover { background: var(--accent); color: #ffffff; }
.btn.subtle { background: var(--surface-2); color: var(--text); border-color: var(--line-2); }
.btn.subtle:hover { background: var(--surface-3); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; align-items: center; }
.apple-link {
  color: var(--accent); text-decoration: none; font-size: 15px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
}
.apple-link:hover { text-decoration: underline; }

/* ---------------- Apple Hero & Product Showcase ---------------- */
.hero {
  background: var(--bg);
  padding: 28px 0 46px;
  text-align: center;
}
.hero-head { max-width: 760px; margin: 0 auto 24px; }
.hero-head .lede { margin-left: auto; margin-right: auto; }
.hero-head .btn-row { justify-content: center; gap: 16px; margin-top: 18px; }

/* Inline Quick Search Strip (visible & effortless on Homepage & All) */
.hero-search-form {
  max-width: 520px; margin: 18px auto 0; position: relative;
  display: flex; align-items: center;
}
.hero-search-form input {
  width: 100%; height: 46px; padding: 0 96px 0 42px; border-radius: 99px;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  font-size: 15px; outline: none; transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.hero-search-form input:focus {
  background: var(--surface); border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.hero-search-form svg {
  position: absolute; left: 15px; width: 17px; height: 17px; color: var(--muted); pointer-events: none;
}
.hero-search-form button[type="submit"] {
  position: absolute; right: 5px; height: 36px; padding: 0 16px; border-radius: 99px;
  border: 0; background: var(--accent); color: #ffffff; font-size: 13.5px; font-weight: 500; cursor: pointer;
}
.hero-search-form button[type="submit"]:hover { background: var(--accent-hover); }

/* Clean Apple Studio Plinth (NO sci-fi grid, NO floating dark pills!) */
.studio {
  background: var(--bg-alt);
  border-radius: 28px;
  padding: 20px 20px 22px;
  max-width: 960px;
  margin: 0 auto;
  text-align: left;
  border: 1px solid var(--line);
}
.studio-viewport {
  position: relative; min-height: 300px;
  display: flex; align-items: center; justify-content: center;
  padding: 26px 14px 28px; perspective: 1600px; overflow: hidden;
  border-radius: 20px;
  cursor: grab; touch-action: pan-y; user-select: none;
  background: var(--stage-bg);
}
.studio-viewport.dragging { cursor: grabbing; }
@media (min-width: 680px) { .studio-viewport { min-height: 410px; padding: 34px 24px 36px; } }

.studio-caption-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 10px; font-size: 12.5px; color: var(--muted);
}
.studio-caption-actions { display: flex; gap: 12px; align-items: center; }
.text-toggle {
  border: 0; background: transparent; color: var(--accent); font-size: 12.5px; font-weight: 500;
  cursor: pointer; padding: 0;
}
.text-toggle:hover { text-decoration: underline; }
.text-toggle[aria-pressed="true"] { font-weight: 600; color: var(--text); }

/* 3D Orbit Gimbal & Brushed Titanium Hardware */
.duo-gimbal {
  width: 100%; display: flex; align-items: center; justify-content: center;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 4deg)) rotateY(var(--ry, -5deg));
  transition: transform 0.35s var(--ease-spring);
}
.studio-viewport.dragging .duo-gimbal { transition: none; }

.duo-shell {
  position: relative; width: 100%; max-width: 560px;
  aspect-ratio: 2670 / 1878;
  transform-style: preserve-3d;
  transition: max-width 0.45s var(--ease-spring), aspect-ratio 0.45s var(--ease-spring);
  cursor: pointer; user-select: none;
  --bezel: #1d1d1f;
  --rail-hi: rgba(255, 255, 255, 0.24);
  --rail-outer: #424245;
}
.duo-shell[data-finish="star-white"] {
  --bezel: #e8e8ed;
  --rail-hi: rgba(255, 255, 255, 0.9);
  --rail-outer: #e8e8ed;
}
.duo-shell[data-mode="closed"] { max-width: 224px; aspect-ratio: 1398 / 2034; }

.duo-shell::before {
  content: ""; position: absolute; left: 8%; right: 8%; bottom: -24px; height: 26px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.24), transparent 70%);
  transform: rotateX(78deg) translateZ(-26px);
  filter: blur(8px);
}
html[data-theme="dark"] .duo-shell::before {
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.72), transparent 72%);
}

.duo-wings { position: absolute; inset: 0; display: flex; transform-style: preserve-3d; transition: opacity 0.28s ease; }
.duo-half {
  position: relative; width: 50%; height: 100%; overflow: hidden;
  background: #000000;
  border-top: 7px solid var(--bezel); border-bottom: 7px solid var(--bezel);
  transition: transform 0.28s var(--ease-spring), border-color 0.25s;
  backface-visibility: hidden;
}
.duo-half-l {
  border-left: 7px solid var(--bezel); border-radius: 24px 0 0 24px;
  transform-origin: right center; transform: rotateY(calc(var(--fold, 0) * 44deg));
  box-shadow: inset 0 0 0 1px var(--rail-hi), -3px 0 0 0 var(--rail-outer), -4px 20px 38px -18px rgba(0, 0, 0, 0.36);
}
.duo-half-r {
  border-right: 7px solid var(--bezel); border-radius: 0 24px 24px 0;
  transform-origin: left center; transform: rotateY(calc(var(--fold, 0) * -44deg));
  box-shadow: inset 0 0 0 1px var(--rail-hi), 3px 0 0 0 var(--rail-outer), 4px 20px 38px -18px rgba(0, 0, 0, 0.36);
}
.duo-hw-touchid, .duo-hw-vol {
  position: absolute; pointer-events: none; z-index: 8; border-radius: 2px;
  background: var(--rail-outer); transition: opacity 0.25s ease;
}
.duo-hw-touchid { right: -6px; top: 24%; width: 3px; height: 16%; }
.duo-hw-vol { left: -6px; top: 20%; width: 3px; height: 11%; box-shadow: 0 26px 0 0 var(--rail-outer); }
.duo-shell[data-mode="closed"] .duo-hw-vol { opacity: 0; }

.duo-half img { position: absolute; top: 0; height: 100%; width: 200%; max-width: none; object-fit: cover; pointer-events: none; }
.duo-half-l img { left: 0; }
.duo-half-r img { right: 0; }

.duo-half-l::after, .duo-half-r::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.duo-half-l::after {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0%, transparent 40%, rgba(0, 0, 0, calc(0.06 + var(--fold, 0) * 0.42)) 95%, rgba(0, 0, 0, calc(0.18 + var(--fold, 0) * 0.45)) 100%);
}
.duo-half-r::after {
  background: linear-gradient(270deg, rgba(0, 0, 0, calc(0.04 + var(--fold, 0) * 0.14)) 0%, transparent 48%, rgba(255, 255, 255, calc(0.08 + var(--fold, 0) * 0.22)) 94%, rgba(0, 0, 0, calc(0.16 + var(--fold, 0) * 0.3)) 100%);
}
.duo-spine {
  position: absolute; left: 50%; top: 5px; bottom: 5px; width: 3px; transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.35), rgba(255, 255, 255, 0.4), rgba(0, 0, 0, 0.35));
  pointer-events: none; z-index: 6; opacity: calc(0.22 + var(--fold, 0) * 0.68);
}

.duo-safezone {
  position: absolute; left: 45%; width: 10%; top: 7px; bottom: 7px; z-index: 15;
  pointer-events: none; opacity: 0; transition: opacity 0.2s ease;
  background: rgba(0, 113, 227, 0.2); border-left: 1px dashed rgba(0, 113, 227, 0.85); border-right: 1px dashed rgba(0, 113, 227, 0.85);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px;
}
.duo-safezone span {
  font-size: 12px; font-weight: 600; color: #ffffff; background: var(--accent);
  padding: 2px 6px; border-radius: 4px; white-space: nowrap;
}
.duo-shell[data-guide="on"]:not([data-mode="closed"]) .duo-safezone { opacity: 1; }

.duo-cover-view {
  position: absolute; inset: 0; border-radius: 28px; overflow: hidden;
  border: 7px solid var(--bezel); background: #000000; opacity: 0; pointer-events: none;
  transform: scale(0.92); transition: opacity 0.3s ease, transform 0.35s var(--ease-spring);
  box-shadow: inset 0 0 0 1px var(--rail-hi), 3px 0 0 0 var(--rail-outer), -3px 0 0 0 var(--rail-outer), 0 22px 44px -18px rgba(0, 0, 0, 0.42);
}
.duo-cover-view img { width: 100%; height: 100%; object-fit: cover; }
.duo-shell[data-mode="closed"] .duo-wings,
.duo-shell[data-mode="closed"] .duo-spine { opacity: 0; pointer-events: none; }
.duo-shell[data-mode="closed"] .duo-cover-view { opacity: 1; pointer-events: auto; transform: scale(1); }

/* iOS 27 Screen Overlays */
.ios-overlay {
  position: absolute; inset: 7px; border-radius: 17px; z-index: 12; pointer-events: none;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 12px 18px 10px; color: #ffffff; opacity: 0; transition: opacity 0.22s ease;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.42);
}
.duo-shell[data-mode="closed"] .ios-overlay { border-radius: 21px; padding: 12px 14px 8px; }
.duo-shell[data-ui="lock"] .ios-lock { opacity: 1; }
.duo-shell[data-ui="home"] .ios-home { opacity: 1; }
.duo-shell[data-ui="split"] .ios-split { opacity: 1; }

.ios-status { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; opacity: 0.94; }
.ios-clock-wrap { text-align: center; margin-top: 6px; }
.ios-date { font-size: 12px; font-weight: 600; opacity: 0.94; }
.ios-time {
  font-size: clamp(36px, 5vw, 54px); font-weight: 700; line-height: 0.96;
  letter-spacing: -0.04em; font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.95); filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.35));
}
.duo-shell[data-mode="closed"] .ios-time { font-size: 40px; }
.ios-widgets { display: flex; justify-content: center; gap: 7px; margin-top: 8px; flex-wrap: wrap; }
.ios-w {
  padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600;
  background: rgba(20, 20, 24, 0.42); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.24);
}
.ios-lock-foot { display: flex; justify-content: space-between; align-items: flex-end; margin-top: auto; }
.ios-btn-dot {
  width: 28px; height: 28px; border-radius: 50%; background: rgba(20, 20, 24, 0.46); backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.24); display: grid; place-items: center; font-size: 12px;
}
.ios-homebar { width: 32%; height: 3.5px; border-radius: 99px; background: rgba(255, 255, 255, 0.88); margin: 6px auto 0; }

.ios-appgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px 14px; padding: 12px 10px; margin: auto 0; }
.duo-shell[data-mode="closed"] .ios-appgrid { grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 8px 2px; }
.ios-icon {
  aspect-ratio: 1; border-radius: 24%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.16));
  backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.3);
}
.ios-icon.b { background: linear-gradient(145deg, #0066cc, #0066cc); }
.ios-icon.g { background: linear-gradient(145deg, #1d8348, #1d8348); }
.ios-icon.o { background: linear-gradient(145deg, #d97706, #d97706); }
.ios-icon.p { background: linear-gradient(145deg, #e8e8ed, #6e6e73); }
.ios-dock {
  display: flex; justify-content: center; gap: 10px; padding: 7px 14px; border-radius: 18px; margin: 0 auto 2px;
  background: rgba(28, 28, 32, 0.48); backdrop-filter: blur(18px); border: 1px solid rgba(255, 255, 255, 0.22);
}
.ios-dock .ios-icon { width: 26px; height: 26px; }

.ios-split-panes { display: grid; grid-template-columns: 1fr 6px 1fr; gap: 6px; flex: 1; margin: 8px 0 6px; align-items: stretch; }
.duo-shell[data-mode="closed"] .ios-split-panes { grid-template-columns: 1fr; }
.duo-shell[data-mode="closed"] .ios-split-div,
.duo-shell[data-mode="closed"] .ios-split-card.right { display: none; }
.ios-split-card {
  border-radius: 12px; padding: 9px 10px; background: rgba(20, 20, 26, 0.56); backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.22); display: flex; flex-direction: column; gap: 5px;
}
.ios-split-card b { font-size: 12px; font-weight: 600; }
.ios-split-line { height: 5px; border-radius: 4px; background: rgba(255, 255, 255, 0.26); }
.ios-split-line.sm { width: 62%; opacity: 0.7; }
.ios-split-div { display: flex; align-items: center; justify-content: center; }
.ios-split-div::after { content: ""; width: 3px; height: 26px; border-radius: 99px; background: rgba(255, 255, 255, 0.78); }

/* Clean Apple Studio Controls */
.studio-controls {
  display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: center;
  margin-top: 16px;
}
.seg {
  display: inline-flex; padding: 3px; border-radius: 99px;
  background: var(--surface-3); gap: 2px;
}
.seg button {
  border: 0; background: transparent; color: var(--muted);
  padding: 6px 12px; border-radius: 99px; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: background 0.18s, color 0.18s; white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] {
  background: var(--surface); color: var(--text); font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.angle-wrap { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.angle-wrap input[type="range"] { width: 96px; accent-color: var(--accent); cursor: pointer; }
.angle-val { font-size: 12px; font-weight: 600; color: var(--text); min-width: 34px; }

.hero-thumbs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px;
}
@media (min-width: 720px) { .hero-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hero-thumb {
  display: flex; align-items: center; gap: 9px; min-width: 0; overflow: hidden;
  padding: 8px 10px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.hero-thumb:hover { border-color: var(--line-bright); }
.hero-thumb[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.hero-thumb img { width: 38px; height: 27px; border-radius: 6px; object-fit: cover; flex: none; }
.hero-thumb span { font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; color: var(--text); }

.hero-dl-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
}
.hero-dl-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hero-dl-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 99px; text-decoration: none;
  font-size: 13px; font-weight: 500;
  background: var(--surface); color: var(--text); border: 1px solid var(--line-2);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.hero-dl-btn.primary { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.hero-dl-btn:hover { border-color: var(--accent); color: var(--accent); }
.hero-dl-btn.primary:hover { background: var(--accent-hover); color: #ffffff; }

/* ---------------- Alternating Apple.com Bands & Bento Tiles ---------------- */
.sec { padding: 64px 0; background: var(--bg); }
.sec.alt { background: var(--bg-alt); }
.sec-head { display: grid; gap: 10px; margin-bottom: 30px; }
@media (min-width: 820px) {
  .sec-head { grid-template-columns: 1.15fr 1fr; align-items: end; gap: 36px; }
  .sec-head > p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; max-width: 48ch; justify-self: end; }
}

.bento-strip { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .bento-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .bento-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.bento-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
  padding: 26px 24px; border-radius: 24px; text-decoration: none;
  background: var(--surface); box-shadow: var(--shadow-card);
  transition: transform 0.24s var(--ease-spring), box-shadow 0.24s;
}
.sec:not(.alt) .bento-card { background: var(--bg-alt); box-shadow: none; border: 1px solid var(--line); }
.bento-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.bento-card p { margin: 8px 0 0; font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.bento-card .cta { font-size: 14px; font-weight: 500; color: var(--accent); }

/* ---------------- Filter Chips & Gallery Grid ---------------- */
.bar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 8px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; scrollbar-width: none; }
@media (min-width: 761px) { .chips { flex-wrap: wrap; overflow-x: visible; } }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-2); border-radius: 99px;
  padding: 7px 15px; font-size: 13.5px; font-weight: 500;
  color: var(--text-2); background: var(--surface); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}
.chip b { font-size: 12px; color: var(--muted); font-weight: 400; }
.chip:hover { border-color: var(--line-bright); color: var(--text); }
.chip[aria-current="page"], .chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip[aria-current="page"] b, .chip.active b { color: var(--bg); opacity: 0.72; }

.filter-input {
  height: 38px; padding: 0 15px; border-radius: 99px; width: 240px; max-width: 100%;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  font-size: 14px; outline: none; transition: border-color 0.18s, box-shadow 0.18s;
}
.filter-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 16px; padding: 16px 0 12px; }
@media (min-width: 680px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 24px 20px; } }
@media (min-width: 1020px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 28px 22px; } }

.wall { margin: 0; position: relative; min-width: 0; }
.frame {
  display: block; position: relative; border-radius: 22px; background: var(--surface);
  padding: 7px; text-decoration: none; box-shadow: var(--shadow-card);
  transition: transform 0.26s var(--ease-spring), box-shadow 0.26s ease;
}
.frame:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.open { display: block; position: relative; border-radius: 15px; overflow: hidden; background: var(--surface-2); }
.open img { width: 100%; height: auto; aspect-ratio: 2670 / 1878; object-fit: cover; transition: transform 0.5s var(--ease-spring); }
.frame:hover .open img { transform: scale(1.025); }
.hinge {
  position: absolute; left: 50%; top: 7px; bottom: 7px; width: 1px; transform: translateX(-0.5px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
  pointer-events: none; opacity: 0.45;
}
.cover {
  position: absolute; left: -2px; bottom: -12px; width: 24%; border-radius: 11px; overflow: hidden;
  border: 3px solid var(--surface); background: #000000;
  box-shadow: 0 10px 22px -8px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.14);
  transition: transform 0.26s var(--ease-spring);
}
.frame:hover .cover { transform: translateY(-2px) scale(1.03); }
.cover img { width: 100%; height: auto; aspect-ratio: 1398 / 2034; object-fit: cover; }

.card-clock {
  position: absolute; top: 14px; left: 0; right: 0; text-align: center;
  font-size: 24px; font-weight: 700; letter-spacing: -0.04em; color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); pointer-events: none; opacity: 0; transition: opacity 0.2s;
}
.grid[data-clock="on"] .card-clock { opacity: 1; }
.grid[data-view="cover"] .open, .grid[data-view="cover"] .hinge { display: none; }
.grid[data-view="cover"] .cover { position: relative; left: auto; bottom: auto; width: 100%; border: 0; border-radius: 15px; box-shadow: none; }
.grid[data-view="cover"] .cap { padding: 26px 12px 11px 12px; }
.grid[data-view="cover"] { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .grid[data-view="cover"] { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1020px) { .grid[data-view="cover"] { grid-template-columns: repeat(5, 1fr); } }

.cap {
  position: absolute; left: 7px; right: 7px; bottom: 7px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 6px;
  padding: 28px 12px 10px calc(24% + 10px); border-radius: 0 0 15px 15px; pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.16) 60%, rgba(0, 0, 0, 0));
}
.cap b {
  font-size: 13px; font-weight: 600; color: #ffffff; letter-spacing: -0.01em; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cap-tag {
  position: absolute; top: 14px; left: 14px; z-index: 4;
  padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600;
  background: rgba(255, 255, 255, 0.88); backdrop-filter: blur(10px); color: #1d1d1f;
  pointer-events: none;
}
.wall > .dl {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 32px; height: 32px; border-radius: 99px; display: grid; place-items: center;
  text-decoration: none; background: rgba(255, 255, 255, 0.9); color: #1d1d1f;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18); opacity: 0.9;
  transition: background 0.16s, color 0.16s, transform 0.16s;
}
.wall > .dl:hover { background: var(--accent); color: #ffffff; transform: scale(1.06); }
.dl svg { width: 14px; height: 14px; }

/* ---------------- Page Header, Breadcrumbs & AEO Direct Answer ---------------- */
.page-head { padding: 40px 0 24px; background: var(--bg); }
.page-head h1 { font-size: clamp(32px, 4.2vw, 48px); }
.page-head p { margin: 12px 0 0; color: var(--muted); font-size: 18px; line-height: 1.5; max-width: 64ch; }
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }

.aeo-box {
  margin: 24px 0 0; padding: 20px 24px; border-radius: 20px;
  background: var(--bg-alt); border: 1px solid var(--line);
}
.aeo-box-head { font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 6px; letter-spacing: 0.01em; }
.aeo-box p { margin: 0; font-size: 15.5px; color: var(--text-2); line-height: 1.62; max-width: none; }
.aeo-box strong { color: var(--text); }
.aeo-box a { color: var(--accent); text-decoration: none; }
.aeo-box a:hover { text-decoration: underline; }

/* ---------------- Product Cards (Apps & Accessories — Apple Store Style) ---------------- */
.product-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 680px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1020px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.product-card {
  background: var(--surface); border-radius: 24px; padding: 26px 24px; min-width: 0;
  box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 12px;
  transition: transform 0.24s var(--ease-spring), box-shadow 0.24s;
}
.sec:not(.alt) .product-card { background: var(--bg-alt); box-shadow: none; border: 1px solid var(--line); }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.product-top { display: flex; align-items: center; gap: 14px; }
.app-glyph {
  width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center;
  font-size: 17px; font-weight: 700; color: #ffffff; flex: none;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.28);
}
.product-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.product-card p { margin: 0; font-size: 14.5px; color: var(--text-2); line-height: 1.56; }
.product-tip { font-size: 13.5px !important; color: var(--muted) !important; }
.product-tip strong { color: var(--text); }
.product-foot {
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.pill-tag {
  padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 500;
  background: var(--surface-2); color: var(--text-2);
}
.sec:not(.alt) .pill-tag { background: var(--surface); }
.buy-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 99px; font-size: 13px; font-weight: 500;
  background: var(--accent); color: #ffffff; text-decoration: none;
  transition: background 0.16s;
}
.buy-btn:hover { background: var(--accent-hover); }

/* Warning Banner (Screen protector rule on Accessories page) */
.callout-warn {
  margin: 0 0 28px; padding: 20px 24px; border-radius: 20px;
  background: var(--amber-soft); border: 1px solid rgba(180, 83, 9, 0.22);
  display: flex; flex-direction: column; gap: 6px;
}
.callout-warn b { font-size: 15px; color: var(--amber); }
.callout-warn p { margin: 0; font-size: 15px; color: var(--text); line-height: 1.55; }

/* Audience Cards & Cross-Links */
.whom-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 680px) { .whom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1020px) { .whom-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1020px) { .whom-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.whom-card {
  background: var(--surface); border-radius: 22px; padding: 24px;
  box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 8px;
}
.sec:not(.alt) .whom-card { background: var(--bg-alt); box-shadow: none; border: 1px solid var(--line); }
.whom-card p { margin: 0; font-size: 14.5px; color: var(--text-2); line-height: 1.55; }
.whom-card a { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 500; color: var(--accent); text-decoration: none; }
.whom-card a:hover { text-decoration: underline; }

.cross-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cross-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .cross-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cross-card {
  display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 20px;
  background: var(--surface); box-shadow: var(--shadow-card); text-decoration: none;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s;
}
.sec:not(.alt) .cross-card { background: var(--bg-alt); box-shadow: none; border: 1px solid var(--line); }
.cross-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.cross-card span { font-size: 12px; font-weight: 600; color: var(--accent); }
.cross-card b { font-size: 16px; color: var(--text); }
.cross-card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.48; }

/* ---------------- Detail Page Studio ---------------- */
.detail { display: grid; gap: 32px; padding: 14px 0 42px; }
@media (min-width: 960px) { .detail { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 44px; align-items: start; } }
.detail .studio { max-width: none; margin: 0; }

.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.dl-btn {
  display: flex; flex-direction: column; gap: 3px; padding: 13px 16px; border-radius: 16px;
  text-decoration: none; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; text-align: left;
  transition: border-color 0.16s, background 0.16s, transform 0.16s;
}
.dl-btn b { font-size: 14px; font-weight: 600; color: var(--text); }
.dl-btn small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dl-btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.dl-btn.primary { background: var(--accent); border-color: var(--accent); }
.dl-btn.primary b { color: #ffffff; }
.dl-btn.primary small { color: rgba(255, 255, 255, 0.86); }
.dl-btn.primary:hover { background: var(--accent-hover); }

.side h1 { font-size: clamp(28px, 3vw, 38px); margin-bottom: 10px; }
.side .meta { font-size: 13px; color: var(--accent); margin: 0 0 8px; font-weight: 600; }
.side p { color: var(--text-2); font-size: 15.5px; line-height: 1.62; margin: 0 0 14px; }
.fit-note {
  margin: 14px 0 0; padding: 16px 18px; border-radius: 16px;
  background: var(--bg-alt); border: 1px solid var(--line);
  font-size: 13.5px; color: var(--text-2); line-height: 1.58;
}
.fit-note strong { color: var(--text); }
.thumb-pair { display: grid; grid-template-columns: 0.72fr 1.28fr; gap: 14px; margin-top: 18px; align-items: end; }
.thumb-pair figure { margin: 0; background: var(--bg-alt); border-radius: 16px; padding: 7px; border: 1px solid var(--line); min-width: 0; }
.thumb-pair figcaption { font-size: 12px; color: var(--muted); padding: 8px 4px 2px; font-weight: 500; }
.thumb-pair img { width: 100%; height: auto; display: block; border-radius: 10px; }
.credit { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; font-size: 13.5px; color: var(--muted); line-height: 1.58; }
.credit a { color: var(--accent); text-decoration: none; }
.credit a:hover { text-decoration: underline; }

/* ---------------- Prose, Steps, Checklist, Pairs, Maker, Calculator, Tables, FAQ ---------------- */
.prose { max-width: 72ch; }
.prose h2 { margin: 32px 0 12px; font-size: clamp(22px, 2.5vw, 30px); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { color: var(--text-2); font-size: 16px; line-height: 1.68; margin: 0 0 15px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 0 0 8px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--accent); text-decoration: none; }
.prose a:hover { text-decoration: underline; }

.steps-wide { display: grid; gap: 18px; }
@media (min-width: 820px) { .steps-wide { grid-template-columns: repeat(3, 1fr); } }
.step-card { background: var(--surface); border-radius: 22px; padding: 24px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 8px; }
.sec:not(.alt) .step-card { background: var(--bg-alt); box-shadow: none; border: 1px solid var(--line); }
.step-card b { font-size: 12.5px; color: var(--accent); font-weight: 600; }
.step-card p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.58; }

.checklist-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px 22px; border-radius: 20px; background: var(--bg-alt); border: 1px solid var(--line); margin-bottom: 18px;
}
.progress-track { flex: 1; min-width: 180px; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: var(--accent); border-radius: 99px; transition: width 0.35s var(--ease-spring); }

.tip-list { display: grid; gap: 12px; }
.tip-item {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start;
  padding: 20px 22px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-card);
  transition: opacity 0.2s;
}
.tip-item.done { opacity: 0.72; }
.tip-check {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-bright);
  background: transparent; cursor: pointer; display: grid; place-items: center; margin-top: 2px;
}
.tip-item.done .tip-check { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.tip-path {
  display: inline-block; margin-top: 8px; padding: 4px 10px; border-radius: 8px;
  background: var(--surface-2); font-size: 12px; color: var(--text-2); font-weight: 500;
}
.tip-item p { margin: 6px 0 0; color: var(--text-2); font-size: 15px; line-height: 1.6; }
.tip-item a { color: var(--accent); text-decoration: none; }

.pair-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .pair-grid { grid-template-columns: repeat(2, 1fr); } }
.pair-card { background: var(--surface); border-radius: 22px; padding: 22px; box-shadow: var(--shadow-card); }
.pair-screen { display: grid; grid-template-columns: 1fr 2px 1fr; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); margin-bottom: 12px; background: var(--bg-alt); }
.pair-pane { padding: 14px; font-size: 13.5px; }
.pair-pane b { display: block; font-size: 14.5px; margin-bottom: 3px; }
.pair-pane span { color: var(--muted); font-size: 12.5px; }
.pair-crease { background: var(--line-2); }

.maker-wrap { display: grid; gap: 24px; }
@media (min-width: 960px) { .maker-wrap { grid-template-columns: 1.35fr 1fr; align-items: start; } }
.maker-drop { border: 2px dashed var(--line-bright); border-radius: 20px; padding: 28px 20px; text-align: center; background: var(--surface); cursor: pointer; }
.maker-drop:hover, .maker-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.maker-canvas-box, .maker-controls { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 22px; padding: 20px; }
.maker-canvas-box canvas { width: 100%; height: auto; border-radius: 14px; display: block; background: #000000; }
.maker-controls { display: grid; gap: 14px; }
.ctrl-row { display: flex; flex-direction: column; gap: 6px; }
.ctrl-row label { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 500; }
.ctrl-row input[type="range"] { width: 100%; accent-color: var(--accent); }

.svg-blueprint { margin: 24px 0; padding: 22px; border-radius: 22px; background: #161618; overflow-x: auto; }
.svg-blueprint svg { width: 100%; height: auto; max-width: 820px; margin: 0 auto; display: block; }

.preset-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.preset-btn {
  padding: 7px 14px; border-radius: 99px; font-size: 13px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--text-2); cursor: pointer;
}
.preset-btn:hover, .preset-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.calc-box { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px; display: grid; gap: 18px; }
@media (min-width: 760px) { .calc-box { grid-template-columns: 1fr 1fr; align-items: center; } }
.calc-out { padding: 18px 20px; border-radius: 16px; background: var(--bg-alt); }
.calc-num { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.calc-verdict { font-size: 14px; margin-top: 6px; color: var(--text-2); }

.table-wrap { overflow-x: auto; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 540px; }
.tbl th, .tbl td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th { font-size: 12px; font-weight: 600; color:var(--text); background: var(--bg-alt); }
.tbl td { color: var(--text-2); }
.tbl td:first-child { color: var(--text); font-weight: 600; }
.tbl a { color: var(--accent); text-decoration: none; }
.tbl a:hover { text-decoration: underline; }
.status-pill { display: inline-flex; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--green-soft); color: var(--green); }

.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-size: 17px; font-weight: 600; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; font-weight: 300; color: var(--muted); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 10px 0 0; color: var(--text-2); font-size: 15.5px; max-width: 72ch; line-height: 1.65; }

/* ---------------- Apple.com Footer ---------------- */
.foot { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 44px 0 54px; font-size: 12.5px; color:var(--text); }
.foot-grid { display: grid; gap: 28px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.foot h4, .foot .foot-h { font-size: 12px; font-weight: 600; color: var(--text); margin: 0 0 12px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); text-decoration: underline; }
.foot-bot { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 12px; }

/* ---------------- Unbreakable Apple Search Overlay & Lightbox ---------------- */
.lb { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; color: var(--text); }
.lb::backdrop { background: rgba(0, 0, 0, 0.78); backdrop-filter: blur(12px); }
.lb-in { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px; }
.lb-in img { max-height: 80vh; width: auto; border-radius: 16px; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.65); }
.lb-bar { display: flex; gap: 14px; align-items: center; padding: 8px 18px; border-radius: 99px; background: var(--glass-strong); border: 1px solid var(--line-2); font-size: 13px; }
.lb-bar a { color: var(--accent); text-decoration: none; font-weight: 600; }
.lb-bar button { background: none; border: 0; color: var(--text); font-size: 22px; cursor: pointer; line-height: 1; padding: 0 4px; }

.search-modal {
  position: fixed; inset: 0; z-index: 300; display: none;
  background: rgba(0, 0, 0, 0.36); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 64px 16px 24px; align-items: flex-start; justify-content: center;
}
.search-modal.open { display: flex; }
.spot-panel {
  width: min(640px, 100%);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 22px; overflow: hidden;
  box-shadow: 0 32px 80px -20px rgba(0, 0, 0, 0.35);
}
.spot-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.spot-head svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.spot-head input { flex: 1; border: 0; background: transparent; font-size: 16px; outline: none; color: var(--text); }
.spot-close {
  border: 0; background: var(--surface-2); color:var(--text); border-radius: 99px;
  padding: 4px 10px; font-size: 12px; font-weight: 500; cursor: pointer;
}
.spot-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.spot-qbtn {
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2);
  border-radius: 99px; padding: 4px 11px; font-size: 12px; cursor: pointer;
}
.spot-qbtn:hover { border-color: var(--accent); color: var(--accent); }
.spot-list { max-height: 54vh; overflow-y: auto; padding: 8px; }
.spot-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none; transition: background 0.12s; }
.spot-item:hover, .spot-item.sel { background: var(--accent-soft); }
.spot-item img { width: 46px; height: 32px; border-radius: 7px; object-fit: cover; flex: none; background: var(--surface-2); }
.spot-item .spot-ic { width: 46px; height: 32px; border-radius: 7px; display: grid; place-items: center; background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--accent); flex: none; }
.spot-item b { display: block; font-size: 14.5px; font-weight: 600; color: var(--text); }
.spot-item small { font-size: 12.5px; color: var(--muted); }
.spot-foot { display: flex; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); background: var(--bg-alt); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 260;
  transform: translateX(-50%) translateY(90px); opacity: 0;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 99px;
  background: #1d1d1f; color: #f5f5f7; box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.35);
  font-size: 13.5px; font-weight: 500; pointer-events: none; transition: transform 0.32s var(--ease-spring), opacity 0.24s;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.toast-dot { width: 7px; height: 7px; border-radius: 50%; background: #0066cc; flex: none; }

.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s var(--ease-spring), transform 0.5s var(--ease-spring); }
.reveal.in { opacity: 1; transform: none; }
.note { font-size: 13.5px; color: var(--muted); margin: 12px 0 0; }
.hidden { display: none !important; }

@media (max-width: 540px) {
  .studio { padding: 14px; border-radius: 22px; }
  .studio-viewport { min-height: 250px; padding: 20px 10px 22px; }
  .seg button { padding: 5px 9px; font-size: 12px; }
  .hero-thumbs { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}


/* =====================================================================
   ROUND 3 — Real device frames, Apple highlights carousel, 2-up gallery,
   1-up mobile swipe, App Store cards (overrides earlier rules)
   ===================================================================== */

/* ---------- Real iPhone Duo device frames (screen composited under frame) ---------- */
.device { position: relative; width: 100%; container-type: inline-size; }
.device-open { aspect-ratio: 1184 / 859; }
.device-closed { aspect-ratio: 627 / 877; }
.device .device-screen { position: absolute; display: block; overflow: hidden; background: #161618; }
.device .device-screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.device-open .device-screen { left: 2.53%; top: 4.19%; width: 94.77%; height: 91.62%; border-radius: 5.1% / 7.25%; }
.device-closed .device-screen { left: 5.42%; top: 3.65%; width: 90.12%; height: 93.62%; border-radius: 1.6% 14.9% 14.9% 1.6% / 1.1% 10.2% 10.2% 1.1%; }
.device .device-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; user-select: none; }
.device .lock-clock {
  position: absolute; left: 0; right: 0; top: 13%; text-align: center; pointer-events: none;
  color: rgba(255, 255, 255, 0.96); text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}
.device .lock-clock small { display: block; font-size: 2.1cqw; font-weight: 600; letter-spacing: 0.01em; }
.device .lock-clock b { display: block; font-size: 15cqw; font-weight: 600; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.device-closed .lock-clock { top: 10%; }
.device-closed .lock-clock b { font-size: 25cqw; }
.device-closed .lock-clock small { font-size: 3.6cqw; }

.device-pair { display: grid; grid-template-columns: 1fr 0.42fr; gap: 4%; align-items: end; }

/* ---------- Hero: Apple "Get the highlights" carousel ---------- */
.hero { padding: 30px 0 18px; }
.hl { position: relative; margin-top: 8px; }
.hl-track {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 6px max(20px, calc((100vw - 1040px) / 2)) 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.hl-track::-webkit-scrollbar { display: none; }
.hl-slide {
  flex: 0 0 min(1040px, 88vw); scroll-snap-align: center; border-radius: 30px; background: var(--bg-alt);
  padding: 34px 6% 30px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px;
}
.hl-slide h3 { font-size: clamp(22px, 2.6vw, 32px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; max-width: 22ch; }
.hl-slide .device-pair { width: min(820px, 100%); }
.hl-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; }
.hl-foot .hl-name { font-size: 14px; color: var(--muted); }
.hl-controls { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 16px; }
.hl-dots { display: flex; gap: 8px; align-items: center; padding: 14px 20px; border-radius: 99px; background: var(--surface-3); }
.hl-dot { width: 8px; height: 8px; border-radius: 99px; border: 0; padding: 0; background: var(--muted); opacity: 0.45; cursor: pointer; transition: width 0.3s var(--ease-spring), opacity 0.2s; }
.hl-dot[aria-current="true"] { width: 40px; opacity: 0.9; }
.round-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--surface-3); color: var(--text); transition: background 0.16s, opacity 0.16s;
}
.round-btn:hover { background: var(--line-2); }
.round-btn:disabled { opacity: 0.35; cursor: default; }
.round-btn svg { width: 18px; height: 18px; }

/* ---------- Gallery: 2 big clean cards per row on desktop ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 32px; padding: 18px 0 8px; }
.grid[data-view="cover"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wall { margin: 0; min-width: 0; position: relative; }
.wall .frame {
  display: block; padding: 28px 26px 24px; border-radius: 28px; background: var(--bg-alt);
  box-shadow: none; transition: transform 0.3s var(--ease-spring), background 0.2s;
}
.sec.alt .wall .frame { background: var(--surface); }
.wall .frame:hover { transform: translateY(-3px); box-shadow: none; }
.wall .device-closed { display: none; width: 62%; margin: 0 auto; }
.grid[data-view="cover"] .wall .device-open { display: none; }
.grid[data-view="cover"] .wall .device-closed { display: block; }
.wall-cap { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 6px 0; }
.wall-cap a.wall-title { text-decoration: none; min-width: 0; }
.wall-cap a.wall-title b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wall-cap a.wall-title span { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.wall-cap .dl-link { flex: none; font-size: 14px; font-weight: 500; color: var(--accent); text-decoration: none; opacity: 0; transition: opacity 0.2s; }
.wall:hover .dl-link, .wall:focus-within .dl-link { opacity: 1; }
@media (hover: none) { .wall-cap .dl-link { opacity: 1; } }
/* retire old card chrome */
.wall .cap, .wall .cap-tag, .wall > .dl, .wall .hinge, .wall .card-clock, .wall .open, .wall .cover { display: none !important; }

/* ---------- Mobile: one card at a time, swipe + arrows (Apple style) ---------- */
.carousel-nav { display: none; }
@media (max-width: 760px) {
  .grid, .grid[data-view="cover"] {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 12px 20px 6px;
    margin: 0 -20px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .grid::-webkit-scrollbar { display: none; }
  .grid .wall { flex: 0 0 86%; scroll-snap-align: center; }
  .grid .wall.hidden { display: none; }
  .wall .frame { padding: 20px 16px 16px; border-radius: 24px; }
  .carousel-nav { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 0 4px; }
  .carousel-count { margin-right: auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
  .hl-slide { flex-basis: 86vw; padding: 24px 5% 22px; border-radius: 24px; }
  .hl-track { padding-left: 7vw; padding-right: 7vw; gap: 12px; }
  .device-pair { grid-template-columns: 1fr; }
  .device-pair .device-closed { display: none; }
}

/* ---------- Detail page: real device pair ---------- */
.detail-stage { background: var(--bg-alt); border-radius: 28px; padding: 32px 28px 26px; }
.detail-stage .device { cursor: zoom-in; }
.detail-stage .stage-note { text-align: center; font-size: 13px; color: var(--muted); margin: 16px 0 0; }
@media (max-width: 760px) {
  .detail-stage { padding: 20px 14px 18px; }
  .detail-stage .device-pair { grid-template-columns: 1fr 0.5fr; }
  .detail-stage .device-pair .device-closed { display: block; }
}

/* ---------- App Store style cards ---------- */
.app-icon { width: 64px; height: 64px; border-radius: 22.5%; flex: none; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.12); background: var(--surface-2); }
.app-row { display: flex; gap: 14px; align-items: center; min-width: 0; }
.app-row > div { flex: 1; min-width: 0; overflow: hidden; }
.app-row h3 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-sub { font-size: 13px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-rating { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.app-rating .stars { color: #d97706; letter-spacing: 1px; margin-right: 4px; }
.get-btn {
  margin-left: auto; flex: none; display: inline-flex; align-items: center; justify-content: center;
  min-width: 72px; height: 30px; padding: 0 14px; border-radius: 99px; text-decoration: none;
  background: var(--surface-3); color: var(--accent); font-size: 14px; font-weight: 700; letter-spacing: 0.01em;
}
.get-btn:hover { background: var(--accent); color: #ffffff; }

/* ---------- Round 3b: gallery as an art exhibition ---------- */
.wall .frame {
  padding: 52px 44px 46px; border-radius: 32px;
  background: radial-gradient(120% 90% at 50% 0%, #ffffff 0%, var(--bg-alt) 70%);
}
html[data-theme="dark"] .wall .frame { background: radial-gradient(120% 90% at 50% 0%, #1d1d1f 0%, #161618 70%); }
.wall .device, .hl-slide .device, .detail-stage .device { filter: drop-shadow(0 26px 28px rgba(0, 0, 0, 0.16)) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.08)); }
.wall .frame:hover .device { filter: drop-shadow(0 32px 34px rgba(0, 0, 0, 0.2)) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.08)); }
.wall-cap { justify-content: center; text-align: center; flex-direction: column; align-items: center; gap: 4px; padding-top: 18px; }
.wall-cap a.wall-title b { font-size: 19px; }
.wall-cap .dl-link { font-size: 14px; }
.h1-sub { display: block; font-size: 17px; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-top: 8px; }
@media (max-width: 760px) {
  .wall .frame { padding: 30px 18px 26px; border-radius: 26px; }
}

/* ---------- 500+ App directory (App Store "Top Charts" rows) ---------- */
.dir-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.dir-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; }
@media (max-width: 1020px) { .dir-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .dir-grid { grid-template-columns: 1fr; } }
.dir-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.dir-row img { width: 52px; height: 52px; border-radius: 22.5%; flex: none; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.12); background: var(--surface-2); }
.dir-row .dir-text { min-width: 0; flex: 1; }
.dir-row b { display: block; font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dir-row small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dir-row .get-btn { min-width: 64px; height: 28px; font-size: 13px; }
.dir-more { display: flex; justify-content: center; margin-top: 26px; }

/* =====================================================================
   ROUND 4 — Sticky Mobile Top Filter Dropdown, Clean Manual Carousel
   ===================================================================== */
.m-filter-bar, .m-cat-bar { display: none; }

@media (max-width: 760px) {
  .chips-desk, .bar-row-desk { display: none !important; }
  .page-head { padding: 24px 0 18px; }
  .page-head p { font-size: 16px; }

  .m-filter-bar {
    display: block;
    position: sticky; top: 50px; z-index: 65;
    background: var(--glass);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--line);
    padding: 9px 16px;
  }
  .m-cat-bar {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 14px;
  }
  .m-filter-row {
    display: flex; align-items: center; gap: 6px;
  }
  .m-select-wrap {
    position: relative; flex: 1; min-width: 0;
  }
  .m-select {
    width: 100%; height: 34px; padding: 0 28px 0 12px;
    border-radius: 99px; border: 1px solid var(--line-2);
    background: var(--surface); color: var(--text);
    font-size: 13px; font-weight: 600; letter-spacing: -0.01em;
    appearance: none; -webkit-appearance: none; cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .m-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .m-select-chev {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    width: 13px; height: 13px; color: var(--muted); pointer-events: none;
  }
  .m-filter-bar .seg, .m-cat-bar .seg {
    flex: none; padding: 2px; height: 34px; display: inline-flex; align-items: center;
  }
  .m-filter-bar .seg button, .m-cat-bar .seg button {
    padding: 0 9px; height: 28px; font-size: 12px; white-space: nowrap;
  }
  .m-search-toggle {
    width: 34px; height: 34px; flex: none; border-radius: 50%;
    border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2);
    display: grid; place-items: center; cursor: pointer;
    transition: border-color 0.16s, color 0.16s, background 0.16s;
  }
  .m-search-toggle svg { width: 15px; height: 15px; }
  .m-search-toggle[aria-expanded="true"] {
    border-color: var(--accent); background: var(--accent-soft); color: var(--accent);
  }
  .m-search-drawer {
    display: none; align-items: center; gap: 10px; margin-top: 8px;
  }
  .m-search-drawer.open { display: flex; }
  .m-search-drawer .filter-input { flex: 1; width: auto; height: 36px; font-size: 14px; }
  .m-search-drawer .m-count { flex: none; font-size: 12.5px; color: var(--muted); }
  .dir-tools { flex-direction: column; align-items: stretch; }
  .dir-tools .filter-input { width: 100%; }
}

/* =====================================================================
   ROUND 5 — Apple Photo-Realistic Interactive Maker + Upload History
   + Extended Museum & Curated Archive Modal
   ===================================================================== */
.maker-stage {
  background: radial-gradient(120% 90% at 50% 0%, #ffffff 0%, var(--bg-alt) 72%);
  border: 1px solid var(--line); border-radius: 28px; padding: 26px 22px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
html[data-theme="dark"] .maker-stage { background: radial-gradient(120% 90% at 50% 0%, #1d1d1f 0%, #161618 72%); }
.maker-toolbar {
  width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
}
.maker-devices {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 28px;
  padding: 12px 4px;
}
.maker-devices[data-view="open"] .maker-dev-closed { display: none; }
.maker-devices[data-view="cover"] .maker-dev-open { display: none; }
.maker-devices[data-view="both"] { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.42fr); align-items: end; gap: 4%; max-width: 760px; }
.maker-dev-open { width: min(640px, 100%); }
.maker-dev-closed { width: min(290px, 82%); }
.maker-devices[data-view="both"] .maker-dev-open,
.maker-devices[data-view="both"] .maker-dev-closed { width: 100%; }

.maker-device {
  position: relative; container-type: inline-size;
  filter: drop-shadow(0 28px 34px rgba(0, 0, 0, 0.2)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}
.maker-device .device-screen {
  cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none;
}
.maker-device.has-photo .device-screen { cursor: grab; }
.maker-device.has-photo.dragging .device-screen { cursor: grabbing; }
.maker-device .device-screen canvas {
  width: 100%; height: 100%; display: block;
}
.maker-upload-hint {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 16px; text-align: center; color: #ffffff;
  background: radial-gradient(ellipse at center, rgba(16, 18, 26, 0.45), rgba(16, 18, 26, 0.72));
  transition: opacity 0.2s, background 0.2s; pointer-events: none;
}
.maker-device:hover .maker-upload-hint { background: radial-gradient(ellipse at center, rgba(0, 113, 227, 0.35), rgba(16, 18, 26, 0.76)); }
.maker-device.has-photo .maker-upload-hint { opacity: 0; }
.maker-upload-hint .up-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 99px;
  background: var(--accent); color: #ffffff; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 113, 227, 0.4);
}
.maker-upload-hint small { font-size: 12px; color: rgba(255, 255, 255, 0.85); }
.maker-drag-badge {
  position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); z-index: 3;
  padding: 5px 12px; border-radius: 99px; font-size: 12px; font-weight: 600;
  background: rgba(20, 20, 24, 0.72); color: #ffffff; backdrop-filter: blur(8px);
  pointer-events: none; opacity: 0; transition: opacity 0.25s; white-space: nowrap;
}
.maker-device.has-photo:hover .maker-drag-badge { opacity: 1; }
.maker-device.dragging .maker-drag-badge { opacity: 0; }

.maker-safezone {
  position: absolute; top: 0; bottom: 0; left: 45%; width: 10%; z-index: 2; pointer-events: none;
  background: rgba(0, 113, 227, 0.18); border-left: 1px dashed rgba(41, 151, 255, 0.8);
  border-right: 1px dashed rgba(41, 151, 255, 0.8);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6%;
}
.maker-safezone::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px;
  background: rgba(41, 151, 255, 0.9);
}
.maker-safezone span {
  font-size: 12px; font-weight: 700; color: #ffffff; background: rgba(0, 113, 227, 0.88);
  padding: 2px 7px; border-radius: 99px; white-space: nowrap; z-index: 1;
}
.maker-stage[data-guides="off"] .maker-safezone { display: none; }
.maker-stage[data-clock="off"] .lock-clock { display: none; }
.maker-stage.drag-over { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Upload history strip (IndexedDB) */
.maker-history {
  width: 100%; border-top: 1px solid var(--line); padding-top: 14px;
}
.maker-history-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px;
  font-size: 12.5px; color: var(--muted);
}
.maker-history-head b { color: var(--text); font-weight: 600; }
.maker-history-strip {
  display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: thin;
}
.mh-item {
  position: relative; flex: none; width: 78px; border-radius: 12px; overflow: hidden;
  border: 2px solid var(--line-2); background: var(--surface-2); cursor: pointer; padding: 0;
  transition: border-color 0.16s, transform 0.16s;
}
.mh-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.mh-item.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.mh-item img { width: 78px; height: 56px; object-fit: cover; display: block; }
.mh-del {
  position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%;
  border: 0; background: rgba(0, 0, 0, 0.72); color: #ffffff; font-size: 12px; line-height: 1;
  display: grid; place-items: center; cursor: pointer; opacity: 0.85;
}
.mh-del:hover { background: var(--red); opacity: 1; }

/* Extended 1,800+ Archive Section & Dual-Screen Export Modal */
.archive-tools {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 18px;
}
.archive-tools .filter-input { flex: 1; min-width: 220px; max-width: 420px; }
.archive-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 28px; }
@media (max-width: 760px) { .archive-grid { grid-template-columns: 1fr; gap: 24px; } }
.archive-modal {
  border: 0; padding: 0; border-radius: 28px; width: min(860px, calc(100vw - 24px));
  max-height: 92vh; overflow-y: auto; background: var(--surface); color: var(--text);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.45);
}
.archive-modal::backdrop { background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(10px); }
.am-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.am-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.am-close {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface-2);
  color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; flex: none;
}
.am-stage {
  background: var(--bg-alt); border-radius: 22px; padding: 24px 20px;
}
.am-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.am-meta { font-size: 13px; color: var(--muted); line-height: 1.55; }
.am-meta a { color: var(--accent); text-decoration: none; }
.am-meta a:hover { text-decoration: underline; }
.apps-jump-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px;
}
/* Apple Store Studio Product Photos for 500 Accessories */
.acc-photo-wrap {
  margin: -22px -22px 14px; border-radius: 22px 22px 0 0; overflow: hidden;
  background: #f5f5f7; border-bottom: 1px solid var(--line); aspect-ratio: 4 / 3;
  display: grid; place-items: center;
}
.acc-photo {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.35s var(--ease-spring);
}
.product-card:hover .acc-photo, .acc-dir-card:hover .acc-photo { transform: scale(1.03); }
.acc-dir-tools {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 18px;
}
.acc-dir-tools .filter-input { flex: 1; min-width: 220px; max-width: 440px; }
.acc-dir-grid {
  display: grid; gap: 18px; grid-template-columns: 1fr;
}
@media (min-width: 640px) { .acc-dir-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1020px) { .acc-dir-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.acc-dir-card {
  background: var(--surface); border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow-card); display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--line);
}
.acc-dir-photo {
  background: #f5f5f7; aspect-ratio: 4 / 3; overflow: hidden; border-bottom: 1px solid var(--line);
}
.acc-dir-body {
  padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0;
}
.acc-dir-brand {
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent);
}
.acc-dir-title {
  margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--text);
}
.acc-dir-spec {
  margin: 0; font-size: 13.5px; line-height: 1.48; color: var(--text-2); flex: 1;
}
.acc-dir-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line);
}
.extra-sub-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
}
@media (max-width: 760px) {
  .maker-devices[data-view="both"] { grid-template-columns: 1fr; }
  .maker-devices[data-view="both"] .maker-dev-closed { width: 58%; margin: 0 auto; }
}
