:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-soft: #f1f2ef;
  --text: #101113;
  --muted: #666b70;
  --line: #dedfdc;
  --strong-line: #cfd1cd;
  --button: #101113;
  --button-text: #ffffff;
  --accent: #158b5b;
  --accent-soft: #e3f3eb;
  --chip: #f1f2ef;
  --shadow: 0 14px 40px rgba(19, 22, 26, 0.08);
  --radius-lg: 18px;
  --radius-md: 13px;
  --radius-sm: 9px;
  --max-width: 1240px;
}

html[data-theme="dark"] {
  --bg: #111315;
  --surface: #171a1d;
  --surface-soft: #202429;
  --text: #f4f5f3;
  --muted: #a7adb3;
  --line: #2c3136;
  --strong-line: #3a4046;
  --button: #f4f5f3;
  --button-text: #101113;
  --accent: #6ed5a7;
  --accent-soft: #17352a;
  --chip: #22262a;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color 180ms ease, color 180ms ease;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { display: block; max-width: 100%; }

.site-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
}

.site-header {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.045em;
  font-size: 21px;
}
.wordmark::before {
  content: "";
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #ffffff url("assets/code-micros-logo.png") center / cover no-repeat;
  border: 1px solid var(--line);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 31px;
  font-size: 13px;
  font-weight: 600;
}
.nav-links > a { color: var(--text); opacity: 0.86; }
.nav-links > a:hover { opacity: 1; }
.theme-toggle {
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
html[data-theme="light"] .icon-sun { display: none; }
html[data-theme="dark"] .icon-moon { display: none; }

.hero {
  min-height: 470px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(480px, 1.1fr);
  align-items: center;
  gap: 34px;
  padding: 42px 0 46px;
  border-bottom: 1px solid var(--line);
}
.hero-copy { padding-left: 2px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 6px;
  color: var(--accent);
  background: var(--accent-soft);
  background-image: none;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  margin-bottom: 26px;
}
.hero h1 {
  margin: 0;
  max-width: 580px;
  font-size: clamp(48px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 780;
}
.hero-copy > p {
  max-width: 520px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}
.hero-actions { display: flex; gap: 10px; margin-top: 28px; }
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--line);
  transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease;
}
.button:hover { transform: translateY(-1px); border-color: var(--strong-line); }
.button-primary { color: var(--button-text); background: var(--button); border-color: var(--button); }
.button-secondary { background: var(--surface); color: var(--text); }

.hero-visual {
  position: relative;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.laptop-frame {
  width: min(100%, 500px);
  position: absolute;
  left: 6px;
  bottom: 35px;
  border-radius: 14px 14px 7px 7px;
  background: #181a1d;
  padding: 11px 11px 13px;
  box-shadow: var(--shadow);
}
.laptop-camera { width: 5px; height: 5px; background: #5f6469; border-radius: 50%; margin: -7px auto 5px; }
.laptop-screen {
  height: 254px;
  border-radius: 7px;
  overflow: hidden;
  position: relative;
  background: #f3f3f0;
}
.laptop-screen img { width: 100%; height: 100%; object-fit: cover; }
.laptop-site-label {
  position: absolute;
  z-index: 2;
  left: 12px;
  top: 12px;
  padding: 6px 9px;
  border-radius: 6px;
  color: #101113;
  background: #ffffff;
  border: 1px solid #dedfdc;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.02em;
}
.laptop-base {
  position: absolute;
  height: 10px;
  left: -24px;
  right: -24px;
  bottom: -8px;
  border-radius: 0 0 45px 45px;
  background: #c8c9c7;
  border-top: 2px solid #989b9c;
}
.phone-frame {
  position: absolute;
  z-index: 4;
  right: 12px;
  bottom: 13px;
  width: 170px;
  height: 350px;
  padding: 8px;
  border-radius: 32px;
  background: #090a0b;
  box-shadow: 0 18px 40px rgba(0,0,0,0.22);
}
.phone-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center; border-radius: 25px; background: white; }
.phone-speaker { position: absolute; z-index: 2; top: 13px; left: 50%; transform: translateX(-50%); width: 42px; height: 4px; border-radius: 4px; background: #1e2023; }
.hero-app-icon {
  position: absolute;
  z-index: 5;
  width: 70px;
  height: 70px;
  right: 156px;
  top: 20px;
  padding: 7px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero-app-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}
.stat { text-align: center; padding: 4px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-size: 24px; letter-spacing: -0.04em; }
.stat span { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }

.section { padding: 55px 0 4px; }
.section-heading-row, .projects-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 21px;
}
.section-heading-row h2 { font-size: 12px; letter-spacing: 0.16em; margin: 0; }
.text-link { color: var(--muted); font-size: 12px; font-weight: 650; }

.featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.featured-card, .project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.featured-card:hover, .project-card:hover { transform: translateY(-2px); border-color: var(--strong-line); box-shadow: var(--shadow); }
.featured-card-art {
  height: 205px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}
.featured-card-art[data-visual="screen"] img.preview { width: 78%; height: 184px; object-fit: cover; object-position: top; border-radius: 13px 13px 0 0; margin-top: 22px; box-shadow: 0 12px 28px rgba(0,0,0,0.14); }
.featured-card-art[data-visual="icon"] img.preview { width: 108px; height: 108px; object-fit: cover; border-radius: 25px; box-shadow: 0 12px 28px rgba(0,0,0,0.12); }
.featured-card-art[data-visual="site"] img.preview { width: 88%; height: 150px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0,0,0,0.09); }
.featured-card-body { padding: 17px 17px 16px; }
.card-title-row { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.card-title-row h3 { margin: 0; font-size: 16px; letter-spacing: -0.025em; }
.card-arrow { font-size: 20px; line-height: 1; }
.featured-card-body p { margin: 7px 0 16px; min-height: 38px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 5px 9px; border-radius: 999px; background: var(--chip); border: 1px solid var(--line); font-size: 10px; color: var(--muted); font-weight: 700; }

.all-projects { padding-top: 58px; }
.projects-heading-row h2 { margin: 0; font-size: 30px; letter-spacing: -0.04em; }
.filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.filter { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 8px 16px; font-size: 11px; font-weight: 700; cursor: pointer; }
.filter.is-active { background: var(--button); color: var(--button-text); border-color: var(--button); }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.project-card { min-height: 112px; display: grid; grid-template-columns: 78px minmax(0, 1fr) 24px; align-items: center; gap: 13px; padding: 15px; }
.project-icon-wrap { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 15px; background: var(--surface-soft); border: 1px solid var(--line); overflow: hidden; }
.project-icon-wrap img { width: 100%; height: 100%; object-fit: cover; }
.project-card[data-kind="website"] .project-icon-wrap img,
.project-card[data-kind="tool"] .project-icon-wrap img { object-fit: contain; padding: 7px; }
.project-card-copy h3 { margin: 0; font-size: 13px; letter-spacing: -0.02em; }
.project-card-copy p { margin: 5px 0 9px; color: var(--muted); font-size: 10.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-card-arrow { justify-self: end; font-size: 19px; }
.empty-state { color: var(--muted); border: 1px dashed var(--line); padding: 24px; border-radius: var(--radius-md); text-align: center; }

.services-section { padding-top: 78px; }
.services-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 28px;
}
.section-kicker { color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: 0.18em; }
.services-heading h2, .build-together h2 { margin: 9px 0 0; font-size: clamp(34px, 4.2vw, 58px); line-height: 1; letter-spacing: -0.05em; }
.services-heading > p { margin: 0 0 4px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.service-card {
  min-height: 212px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.service-number { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: 0.12em; }
.service-card h3 { margin: auto 0 9px; font-size: 17px; line-height: 1.2; letter-spacing: -0.025em; }
.service-card p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.55; }

.build-together {
  margin-top: 64px;
  padding: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.55fr);
  gap: 54px;
  align-items: center;
  color: #ffffff;
  background: #111315;
  border: 1px solid #2c3136;
  border-radius: var(--radius-lg);
}
.build-copy > p { max-width: 680px; margin: 19px 0 0; color: #bec3c7; font-size: 14px; line-height: 1.7; }
.build-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 27px; }
.build-primary { color: #101113; background: #ffffff; border-color: #ffffff; }
.build-secondary { color: #ffffff; background: #1d2023; border-color: #393e43; }
.build-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.build-options span { padding: 15px 13px; color: #dfe2e3; background: #1d2023; border: 1px solid #34393e; border-radius: 8px; font-size: 11px; font-weight: 700; text-align: center; }

.about-strip, .contact-strip {
  margin-top: 52px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.about-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  padding: 31px 32px;
}
.about-label { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: 0.17em; }
.about-strip h2 { margin: 7px 0 6px; font-size: 23px; letter-spacing: -0.035em; }
.about-strip p { margin: 0; color: var(--muted); font-size: 12.5px; }
.contact-strip { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 24px; }
.contact-strip strong { display: block; font-size: 13px; }
.contact-strip span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.contact-button { flex: 0 0 auto; }

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 24px;
  padding: 43px 0 35px;
  font-size: 11px;
}
.footer-wordmark { font-size: 16px; }
.footer-wordmark::before { width: 31px; height: 31px; }
.site-footer p { margin: 5px 0 0; color: var(--muted); }
.footer-links { display: flex; gap: 22px; }
.footer-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; color: var(--muted); }
.footer-meta a:hover, .footer-links a:hover { color: var(--text); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .hero-copy { max-width: 660px; }
  .hero-visual { height: 400px; max-width: 680px; width: 100%; margin: 0 auto; }
  .laptop-frame { left: 4%; width: 72%; }
  .phone-frame { right: 7%; }
  .featured-grid, .project-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .build-together { grid-template-columns: 1fr; }
  .featured-card:last-child { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); padding-bottom: 24px; margin-bottom: 20px; }
}

@media (max-width: 700px) {
  .site-shell { width: min(calc(100% - 22px), var(--max-width)); }
  .site-header { height: 72px; }
  .wordmark { font-size: 18px; }
  .nav-links { gap: 13px; font-size: 11px; }
  .nav-links > a:nth-of-type(3), .nav-links > a:nth-of-type(4) { display: none; }
  .theme-toggle { width: 34px; height: 34px; }
  .hero { min-height: auto; padding: 38px 0 30px; gap: 12px; }
  .eyebrow { margin-bottom: 20px; }
  .hero h1 { font-size: clamp(45px, 13vw, 60px); }
  .hero-copy > p { font-size: 15px; }
  .hero-actions { flex-wrap: wrap; }
  .hero-visual { height: 330px; margin-top: 8px; }
  .laptop-frame { left: 0; bottom: 36px; width: 78%; padding: 8px; }
  .laptop-screen { height: 200px; }
  .laptop-site-label { left: 8px; top: 8px; padding: 5px 7px; font-size: 8px; }
  .laptop-base { left: -12px; right: -12px; }
  .phone-frame { width: 130px; height: 270px; right: 2px; bottom: 18px; border-radius: 25px; padding: 6px; }
  .phone-frame img { border-radius: 20px; }
  .hero-app-icon { width: 56px; height: 56px; right: 107px; top: 8px; border-radius: 14px; padding: 5px; }
  .hero-app-icon img { border-radius: 10px; }
  .stats { padding: 26px 0; }
  .stat { padding-left: 8px; padding-right: 8px; }
  .stat strong { font-size: 20px; }
  .section { padding-top: 42px; }
  .section-heading-row { align-items: end; }
  .featured-grid, .project-grid { grid-template-columns: 1fr; }
  .services-section { padding-top: 58px; }
  .services-heading { grid-template-columns: 1fr; gap: 14px; }
  .services-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 170px; }
  .build-together { margin-top: 46px; padding: 28px 22px; gap: 30px; }
  .build-options { grid-template-columns: 1fr 1fr; }
  .featured-card:last-child { display: block; }
  .projects-heading-row { align-items: flex-start; flex-direction: column; }
  .filters { justify-content: flex-start; width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .filter { flex: 0 0 auto; }
  .about-strip, .contact-strip { flex-direction: column; align-items: flex-start; padding: 24px; }
  .site-footer { grid-template-columns: 1fr; align-items: start; }
  .footer-links { order: 3; }
  .footer-meta { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Project detail pages */
.detail-page .site-shell { min-height: 100vh; }
.detail-page .site-header { border-bottom: 1px solid var(--line); }
.detail-page .site-header .wordmark { text-decoration: none; }
.detail-main { padding-top: 20px; }
.detail-hero { display: grid; grid-template-columns: minmax(0, .95fr) minmax(360px, 1.05fr); gap: 64px; align-items: center; padding: 52px 0 72px; border-bottom: 1px solid var(--line); }
.back-link { display: inline-flex; color: var(--muted); text-decoration: none; font-size: .9rem; margin-bottom: 34px; }
.back-link:hover { color: var(--text); }
.detail-title-row { display: flex; gap: 20px; align-items: center; }
.detail-icon { width: 76px; height: 76px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); flex: 0 0 auto; display: grid; place-items: center; }
.detail-icon img { width: 100%; height: 100%; object-fit: cover; }
.detail-title-row h1 { margin: 8px 0 0; font-size: clamp(2.5rem, 5vw, 5.3rem); line-height: .95; letter-spacing: -.055em; max-width: 760px; }
.detail-lead { max-width: 700px; font-size: 1.15rem; line-height: 1.65; color: var(--muted); margin: 28px 0 18px; }
.detail-tags { margin-bottom: 30px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.detail-hero-visual { min-height: 520px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); display: grid; place-items: center; overflow: hidden; padding: 30px; }
.detail-hero-visual img { max-width: 100%; max-height: 500px; object-fit: contain; border-radius: 16px; }
.detail-hero-visual[data-visual="site"] img { width: 100%; max-height: 460px; object-fit: cover; }
.detail-hero-visual[data-visual="icon"] img { width: min(72%, 420px); max-height: 420px; }
.detail-content-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .65fr); gap: 84px; padding: 76px 0; border-bottom: 1px solid var(--line); }
.detail-section-label { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .16em; color: var(--muted); margin-bottom: 16px; }
.detail-main-copy h2, .detail-section-heading h2 { font-size: clamp(2rem, 4vw, 3.8rem); letter-spacing: -.045em; line-height: 1; margin: 0 0 22px; }
.detail-main-copy p { max-width: 780px; font-size: 1.08rem; line-height: 1.78; color: var(--muted); margin: 0; }
.detail-facts { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; align-self: start; }
.detail-facts > div { padding: 19px 20px; display: flex; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.detail-facts > div:last-child { border-bottom: 0; }
.detail-facts span { color: var(--muted); font-size: .88rem; }
.detail-facts strong { text-align: right; font-size: .92rem; }
.detail-facts .detail-policy-links { justify-content: flex-start; flex-wrap: wrap; gap: 12px 18px; }
.detail-policy-links a { color: var(--text); font-size: .88rem; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.detail-section { padding: 76px 0; border-bottom: 1px solid var(--line); }
.detail-section-heading { max-width: 720px; margin-bottom: 34px; }
.detail-section-heading > p { color: var(--muted); margin-top: -10px; }
.feature-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border-top: 1px solid var(--line); }
.feature-item { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 24px 12px 24px 0; border-bottom: 1px solid var(--line); }
.feature-item:nth-child(odd) { border-right: 1px solid var(--line); padding-right: 28px; }
.feature-item:nth-child(even) { padding-left: 28px; }
.feature-item span { color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .08em; }
.feature-item p { margin: 0; font-weight: 650; line-height: 1.45; }
.screenshot-track { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; align-items: stretch; }
.screenshot-card { appearance: none; border: 1px solid var(--line); background: var(--surface); border-radius: 18px; padding: 18px; min-height: 430px; display: grid; place-items: center; cursor: zoom-in; overflow: hidden; }
.screenshot-card:hover { transform: translateY(-2px); border-color: var(--muted-2, var(--muted)); }
.screenshot-card img { width: 100%; height: 100%; max-height: 510px; object-fit: contain; border-radius: 12px; }
.related-section { border-bottom: 0; }
.related-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.related-card { position: relative; border: 1px solid var(--line); border-radius: 16px; padding: 18px; color: var(--text); text-decoration: none; display: grid; grid-template-columns: 58px 1fr 20px; gap: 14px; align-items: start; background: var(--surface); }
.related-card:hover { transform: translateY(-2px); }
.related-card-icon { width: 58px; height: 58px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: var(--bg); }
.related-card-icon img { width: 100%; height: 100%; object-fit: cover; }
.related-card h3 { margin: 3px 0 5px; font-size: 1rem; }
.related-card p { margin: 0 0 12px; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.detail-not-found { padding: 120px 0; text-align: center; }
.detail-not-found h1 { font-size: clamp(2.5rem,7vw,5rem); letter-spacing: -.05em; }
.image-dialog { padding: 0; border: 0; border-radius: 18px; background: var(--surface); max-width: min(92vw, 980px); max-height: 92vh; box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.image-dialog::backdrop { background: rgba(0,0,0,.72); }
.image-dialog-inner { position: relative; padding: 18px; display: grid; place-items: center; min-width: min(88vw, 900px); min-height: 50vh; }
.image-dialog img { max-width: 100%; max-height: 82vh; object-fit: contain; border-radius: 12px; }
.dialog-close { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text); font-size: 1.15rem; cursor: pointer; z-index: 2; }

@media (max-width: 900px) {
  .detail-hero { grid-template-columns: 1fr; gap: 34px; padding: 38px 0 54px; }
  .detail-hero-visual { min-height: 420px; }
  .detail-content-grid { grid-template-columns: 1fr; gap: 36px; padding: 54px 0; }
  .screenshot-track, .related-grid { grid-template-columns: 1fr 1fr; }
  .screenshot-card { min-height: 360px; }
}
@media (max-width: 640px) {
  .detail-main { padding-top: 4px; }
  .detail-hero { padding-top: 24px; }
  .back-link { margin-bottom: 24px; }
  .detail-title-row { align-items: flex-start; }
  .detail-icon { width: 60px; height: 60px; border-radius: 14px; }
  .detail-title-row h1 { font-size: clamp(2.2rem, 12vw, 3.7rem); }
  .detail-lead { font-size: 1rem; }
  .detail-hero-visual { min-height: 320px; padding: 16px; border-radius: 16px; }
  .feature-list { grid-template-columns: 1fr; }
  .feature-item:nth-child(odd), .feature-item:nth-child(even) { border-right: 0; padding: 20px 0; }
  .screenshot-track, .related-grid { grid-template-columns: 1fr; }
  .screenshot-card { min-height: 320px; }
  .detail-section { padding: 54px 0; }
  .image-dialog-inner { min-width: 88vw; }
}
