/* Shelf Official Website — Shelf OKLCH Design System (Cool Silver Showcase & Midnight Dark) */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(/site/fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ground: oklch(0.968 0.003 255);
  --surface: #FFFFFF;
  --float: #FFFFFF;
  --well: oklch(0.955 0.004 255);
  --ink: #1D1D1F;
  --sub: oklch(0.45 0.008 255);
  --faint: oklch(0.54 0.008 255);
  --edge: oklch(0.18 0.012 255 / 0.075);
  --edge-strong: oklch(0.18 0.012 255 / 0.145);
  --line: oklch(0.925 0.004 255);
  --accent: oklch(0.62 0.16 26);
  --accent-hover: oklch(0.57 0.16 26);
  --accent-soft: oklch(0.62 0.16 26 / 0.10);
  --nav-bg: oklch(0.968 0.003 255 / 0.82);
  --hero-glow-a: oklch(0.86 0.04 245 / 0.34);
  --hero-glow-b: oklch(0.82 0.08 28 / 0.16);
  --spotlight-bg: linear-gradient(135deg, #FFFFFF 0%, oklch(0.985 0.008 255) 62%, oklch(0.982 0.014 28) 100%);
  --closing-bg: linear-gradient(135deg, #FFFFFF 0%, oklch(0.978 0.010 250) 58%, oklch(0.976 0.016 28) 100%);
  --btn-primary-bg: #1D1D1F;
  --btn-primary-fg: #FFFFFF;
  --btn-primary-hover: #323236;
  --sh-xs: 0 1px 1px oklch(0.18 0.02 255 / 0.05);
  --sh-lg: 0 24px 64px -24px oklch(0.18 0.02 255 / 0.18);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --cw: 1120px;
  --nav: 56px;
  --pad-x: clamp(18px, 3vw, 28px);

  --t-hero: clamp(34px, 4.4vw, 52px);
  --t-h2: clamp(24px, 2.5vw, 32px);
  --t-h3: 18px;
  --t-body: 15px;
  --t-small: 13.5px;
  --t-xs: 12px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --dur: 180ms;
  color-scheme: light;
}

html[data-theme="dark"] {
  --ground: #141519;
  --surface: #1B1D24;
  --float: #242731;
  --well: #20232C;
  --ink: #F5F6FA;
  --sub: oklch(0.755 0.008 255);
  --faint: oklch(0.645 0.008 255);
  --edge: oklch(1 0 0 / 0.09);
  --edge-strong: oklch(1 0 0 / 0.16);
  --line: oklch(1 0 0 / 0.07);
  --accent: oklch(0.70 0.16 26);
  --accent-hover: oklch(0.74 0.16 26);
  --accent-soft: oklch(0.70 0.16 26 / 0.16);
  --nav-bg: rgba(20, 21, 25, 0.80);
  --hero-glow-a: oklch(0.45 0.08 255 / 0.22);
  --hero-glow-b: oklch(0.55 0.12 26 / 0.14);
  --spotlight-bg: linear-gradient(135deg, #1E212B 0%, #1B1D24 62%, #241F24 100%);
  --closing-bg: linear-gradient(135deg, #212430 0%, #1C1E26 60%, #262025 100%);
  --btn-primary-bg: #F5F6FA;
  --btn-primary-fg: #141519;
  --btn-primary-hover: #FFFFFF;
  --sh-xs: 0 1px 1px rgba(0, 0, 0, 0.28);
  --sh-lg: 0 28px 72px -24px rgba(0, 0, 0, 0.62);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav) + 16px);
  overflow-x: clip;
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, h4, p, ul, ol, pre, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
img, svg, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.mono { font-family: var(--mono); }

.wrap {
  max-width: calc(var(--cw) + var(--pad-x) * 2);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

section[id],
div[id] {
  scroll-margin-top: calc(var(--nav) + 16px);
}

/* ---------- Sticky Glass Top Bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  height: var(--nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.02em;
  flex: none;
}
.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  flex: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-links a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  color: var(--sub);
  white-space: nowrap;
  transition: color var(--dur) ease;
}
.nav-links a:hover { color: var(--ink); }

.nav-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  min-width: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--edge);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--sh-xs);
  transition: border-color var(--dur) ease, background-color var(--dur) ease;
}
.icon-btn:hover { border-color: var(--edge-strong); }
.icon-btn svg { width: 15px; height: 15px; }
.menu-btn { display: none; }
.nav-scrim { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  user-select: none;
  touch-action: manipulation;
  transition: background-color var(--dur) ease, border-color var(--dur) ease, transform 140ms var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn.sm { height: 34px; padding: 0 13px; border-radius: 8px; font-size: 13.5px; }
.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
}
.btn-primary:hover { background: var(--btn-primary-hover); }
.btn-accent {
  background: var(--accent);
  color: #FFFFFF;
}
.btn-accent:hover { background: var(--accent-hover); }
.btn-surface {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--edge);
  box-shadow: var(--sh-xs);
}
.btn-surface:hover { border-color: var(--edge-strong); }

/* ---------- Hero: Centered Showcase ---------- */
.hero {
  position: relative;
  padding-top: clamp(48px, 7vw, 84px);
  padding-bottom: clamp(48px, 6vw, 80px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -120px 0 auto 0;
  height: 560px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(640px 320px at 36% 18%, var(--hero-glow-a), transparent 72%),
    radial-gradient(520px 280px at 66% 14%, var(--hero-glow-b), transparent 74%);
}
.hero > .wrap {
  position: relative;
  z-index: 1;
}
.hero-header {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.hero h1 {
  font-size: var(--t-hero);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.hero-sub {
  max-width: 540px;
  font-size: 16px;
  line-height: 1.62;
  color: var(--sub);
  text-wrap: pretty;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.showcase-wrap {
  margin-top: clamp(32px, 4.5vw, 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.showcase-frame {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 20px;
  padding: 8px;
  box-shadow: var(--sh-lg);
}
.showcase-viewport {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--well);
}
.showcase-media {
  width: 100%;
  height: auto;
  display: block;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--well);
  border: 1px solid var(--edge);
}
.seg-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--sub);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--dur) ease, color var(--dur) ease, border-color var(--dur) ease;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn[aria-selected="true"],
.seg-btn[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--edge);
  box-shadow: var(--sh-xs);
}

/* ---------- Catalog Section (3-Layer App Store Rhythm) ---------- */
.section {
  padding-block: clamp(44px, 5.5vw, 76px);
}
.catalog-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.catalog-title-group {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.section-h2 {
  font-size: var(--t-h2);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.025em;
}
.catalog-count {
  font-size: 14px;
  color: var(--faint);
  font-weight: 400;
}
.search-box {
  position: relative;
  width: 280px;
  max-width: 100%;
}
.search-input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 36px;
  border-radius: 10px;
  border: 1px solid var(--edge);
  background: var(--well);
  color: var(--ink);
  font-size: 14px;
  transition: border-color var(--dur) ease, background-color var(--dur) ease;
}
.search-input:focus {
  outline: none;
  border-color: var(--edge-strong);
  background: var(--surface);
}
.search-input::placeholder { color: var(--faint); }
.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--faint);
  pointer-events: none;
}

.filter-bar {
  margin-bottom: 28px;
}

.shelf-layers {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.layer-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.layer-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.layer-title {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.layer-sub {
  font-size: 13.5px;
  color: var(--faint);
}

/* Layer 1: Spotlight Featured Card */
.spotlight-card {
  background: var(--spotlight-bg);
  border: 1px solid var(--edge);
  border-radius: 20px;
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr);
  gap: 24px;
  align-items: center;
}
.spotlight-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 8px 4px 8px 8px;
}
.spotlight-eyebrow {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
}
.spotlight-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.spotlight-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid var(--edge);
  object-fit: cover;
  flex: none;
  background: var(--well);
}
.spotlight-name {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.spotlight-sub {
  font-size: 14.5px;
  color: var(--sub);
  margin-top: 2px;
}
.spotlight-desc {
  font-size: 14.5px;
  color: var(--sub);
  line-height: 1.62;
}
.spotlight-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--faint);
}
.spotlight-actions {
  display: flex;
  flex-wrap: wrap-reverse;
  gap: 8px;
  margin-top: 4px;
}
.spotlight-media {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--edge);
  background: var(--well);
}
.spotlight-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

/* Layer 2: 3-Column Native Desktop Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.gallery-card {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 18px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  transition: border-color var(--dur) ease;
}
.gallery-card:hover { border-color: var(--edge-strong); }
.gallery-shot {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--well);
}
.gallery-shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}
.gallery-body {
  padding: 2px 6px 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.app-row-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.app-icon-sm {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--edge);
  object-fit: cover;
  flex: none;
  background: var(--well);
}
.app-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.app-row-name {
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
}
.app-row-sub {
  font-size: 13px;
  line-height: 1.45;
  color: var(--sub);
}
.gallery-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap-reverse;
}
.app-ver {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}
.card-btns {
  display: flex;
  flex-wrap: wrap-reverse;
  gap: 6px;
}

/* Layer 3: 2x2 Compact Hairline Mini-App List (zero double borders, zero dangling edges) */
.mini-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--edge);
  border-radius: 18px;
  overflow: hidden;
}
.mini-row {
  background: var(--surface);
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}
.mini-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.mini-actions {
  display: flex;
  flex-wrap: wrap-reverse;
  gap: 6px;
  flex: none;
}

/* Filtered / Search Result Grid */
.filtered-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.filtered-card {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.filtered-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap-reverse;
}
.cmd-inline {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.empty-state {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 16px;
  padding: 36px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--sub);
}

/* ---------- Asymmetric Bento Features (#features) ---------- */
.bento-top {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 18px;
  align-items: stretch;
}
.bento-card {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.bento-card h3 {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.25;
}
.bento-desc {
  font-size: 14.5px;
  color: var(--sub);
  line-height: 1.6;
}

.terminal-box {
  margin-top: auto;
  background: #16181F;
  color: #F5F6FA;
  border: 1px solid oklch(1 0 0 / 0.10);
  border-radius: 12px;
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid oklch(1 0 0 / 0.08);
  flex-wrap: wrap;
}
.terminal-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.term-tab {
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: oklch(0.72 0.008 255);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}
.term-tab:hover { color: #F5F6FA; }
.term-tab[aria-selected="true"] {
  background: oklch(1 0 0 / 0.12);
  color: #FFFFFF;
}
.copy-dark-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid oklch(1 0 0 / 0.16);
  background: transparent;
  color: #F5F6FA;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.copy-dark-btn:hover { background: oklch(1 0 0 / 0.08); }
.terminal-code {
  padding: 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.72;
}
.terminal-code pre { margin: 0; white-space: pre; }
.cmd-line { display: block; }
.cmd-line::before {
  content: "$ ";
  color: oklch(0.72 0.16 26);
  user-select: none;
  -webkit-user-select: none;
}
.cmd-comment { display: block; color: oklch(0.62 0.008 255); }

.miniapp-preview {
  margin-top: auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--well);
}
.miniapp-preview img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: right top;
  display: block;
}

/* Open 3-Column Frameless Strip (no nested white boxes) */
.maker-strip {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.maker-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.maker-item h3 {
  font-size: 16.5px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.maker-item p {
  font-size: 14px;
  color: var(--sub);
  line-height: 1.62;
}

/* ---------- Airy Closing Card & Minimal Single-Row Footer ---------- */
.closing-section {
  padding-top: 16px;
  padding-bottom: 48px;
}
.closing-card {
  background: var(--closing-bg);
  border: 1px solid var(--edge);
  border-radius: 24px;
  padding: clamp(28px, 4vw, 44px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.closing-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 520px;
}
.closing-copy h2 {
  font-size: var(--t-h2);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.closing-copy p {
  font-size: 15px;
  color: var(--sub);
}
.closing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 24px 36px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--sub);
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-links a {
  text-decoration: none;
  color: var(--sub);
  transition: color var(--dur) ease;
}
.footer-links a:hover { color: var(--ink); }
.footer-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-lang a {
  text-decoration: none;
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid var(--edge);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--sub);
}
.footer-lang a[aria-current="page"] {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--edge-strong);
}

/* ---------- Modal (Lifted --float surface) ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(12, 13, 18, 0.52);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-dialog {
  width: min(740px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  background: var(--float);
  color: var(--ink);
  border: 1px solid var(--edge-strong);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--sh-lg);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.modal-title-group {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}
.modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid var(--edge);
  object-fit: cover;
  flex: none;
}
.modal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--well);
  color: var(--sub);
  border: 1px solid var(--edge);
}
.pill-accent {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}
.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--edge);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: none;
}
.modal-close:hover { border-color: var(--edge-strong); }
.modal-desc {
  font-size: 14.5px;
  color: var(--sub);
  line-height: 1.62;
}
.modal-shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.modal-shot {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  object-fit: cover;
  aspect-ratio: 16 / 10;
  background: var(--well);
}
.modal-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.modal-meta-box {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--well);
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.modal-meta-k {
  font-size: 11.5px;
  color: var(--faint);
}
.modal-meta-v {
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.modal-cmds {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.modal-cmd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #16181F;
  color: #F5F6FA;
  font-family: var(--mono);
  font-size: 12.5px;
}
.modal-cmd-row code {
  overflow-x: auto;
  white-space: nowrap;
}
body.modal-open { overflow: hidden; }

/* ---------- Responsive (<= 960px and <= 760px) ---------- */
@media (max-width: 960px) {
  .spotlight-card,
  .bento-top {
    grid-template-columns: minmax(0, 1fr);
  }
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .maker-strip {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

@media (max-width: 760px) {
  :root {
    --t-hero: 32px;
    --t-h2: 24px;
  }
  .menu-btn { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--pad-x) 16px;
    background: var(--float);
    border-bottom: 1px solid var(--edge);
    display: none;
  }
  .topbar[data-open="true"] .nav-links { display: flex; }
  .nav-links a {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
  }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-scrim {
    position: fixed;
    inset: var(--nav) 0 0 0;
    background: rgba(12, 13, 18, 0.34);
    z-index: 35;
  }
  .topbar[data-open="true"] + .nav-scrim { display: block; }

  .search-box { width: 100%; }
  .gallery-grid,
  .mini-list,
  .filtered-grid,
  .modal-shots,
  .modal-meta-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .mini-row {
    flex-direction: column;
    align-items: stretch;
  }
  .closing-card {
    flex-direction: column;
    align-items: flex-start;
  }
}
