.project-modal .detail-modal-content {
  width: min(1180px, 94vw);
  max-width: 1180px;
  max-height: 88vh;
  padding: 28px;
}

#project-modal,
#project-detail-modal {
  z-index: 12000;
}

.project-modal.open .modal-content {
  opacity: 1;
}

.project-case-body {
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(420px, 1.18fr);
  gap: 28px;
  align-items: start;
}

.project-mobile-tabs {
  display: none;
}

.case-tab {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  height: 34px;
  padding: 0 12px;
}

.case-tab.active {
  background: var(--fg);
  color: #fff;
}

.detail-body.project-case-root {
  display: block;
}

.project-case-body > #showcase-slot {
  width: 100%;
  min-width: 0;
}

.project-brief {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.brief-lede {
  color: var(--muted);
  line-height: 1.75;
  font-size: 14px;
  margin: 0;
}

.brief-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
}

.brief-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.brief-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.brief-value {
  color: var(--fg);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.brief-section {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.brief-section h4 {
  font-size: 14px;
  margin: 0 0 10px;
  font-weight: 800;
}

.brief-section p,
.brief-section li {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.brief-section p {
  margin: 0;
}

.brief-section ul {
  margin: 0;
  padding-left: 18px;
}

.arch-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.arch-list li::marker {
  color: var(--accent);
}

.demo-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface);
}

.demo-link svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.stack-table {
  display: grid;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.stack-row {
  display: grid;
  grid-template-columns: 112px 1fr;
  min-width: 0;
}

.stack-row + .stack-row {
  border-top: 1px solid var(--border);
}

.stack-layer {
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(10, 10, 11, 0.025);
  border-right: 1px solid var(--border);
}

.stack-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  min-width: 0;
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 25px;
  padding: 0 8px;
  border-radius: 6px;
  background: #111;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.tech-badge img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.tech-mark {
  display: inline-flex;
  width: 15px;
  height: 15px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: rgba(255,255,255,0.18);
  font-size: 9px;
  font-weight: 900;
}

.showcase-panel {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 18px;
  overflow: hidden;
  min-width: 0;
  box-shadow: 0 22px 60px rgba(10,10,11,0.07);
}

.showcase-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.showcase-eyebrow {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.device-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-2);
}

.device-btn,
.showcase-nav-btn {
  border: 0;
  cursor: pointer;
  color: var(--fg);
  background: transparent;
}

.device-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.device-btn svg,
.showcase-nav-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.device-btn.active {
  background: var(--fg);
  color: #fff;
}

.showcase-stage {
  position: relative;
  padding: 18px;
  background:
    radial-gradient(circle at 18% 12%, rgba(31,111,235,0.13), transparent 32%),
    linear-gradient(135deg, #f7f8fb, #fff);
}

.showcase-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  border: 1px solid rgba(10,10,11,0.12);
  background: #f5f5f2;
  overflow: hidden;
}

.showcase-frame.mobile {
  width: min(320px, 72%);
  margin: 0 auto;
  aspect-ratio: 9 / 18.6;
  border-radius: 28px;
  border: 8px solid #111;
  box-shadow: 0 24px 70px rgba(10,10,11,0.2);
}

.showcase-frame.mobile::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  width: 76px;
  height: 20px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: #111;
  z-index: 2;
}

.showcase-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #fff;
}

.showcase-frame.contain img {
  object-fit: contain;
}

.showcase-caption {
  padding: 15px 16px 16px;
  border-top: 1px solid var(--border);
}

.showcase-caption h4 {
  margin: 0 0 5px;
  font-size: 15px;
  font-weight: 800;
}

.showcase-caption p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.showcase-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 16px 16px;
}

.showcase-nav-btn {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.showcase-nav-btn:hover {
  background: var(--fg);
  color: #fff;
  transform: translateY(-1px);
}

.showcase-dots {
  display: flex;
  gap: 7px;
  align-items: center;
}

.showcase-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(10,10,11,0.18);
}

.showcase-dot.active {
  width: 22px;
  border-radius: 999px;
  background: var(--accent);
}

.feedback-rail {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 14px;
  align-items: center;
  margin-top: 48px;
}

.feedback-track {
  display: grid;
  overflow: hidden;
  width: min(720px, 100%);
  justify-self: center;
}

.feedback-slide {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateX(18px);
  pointer-events: none;
  transition: opacity 0.28s, transform 0.28s;
}

.feedback-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.feedback-nav {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}

.feedback-nav svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.feedback-card-rich {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(260px, 1fr);
  gap: 22px;
  align-items: center;
}

.feedback-copy {
  min-width: 0;
}

.feedback-project {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 10px;
}

.feedback-card-rich h3 {
  font-size: 20px;
  line-height: 1.25;
  margin: 0 0 10px;
}

.feedback-card-rich p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
  margin: 0 0 16px;
}

.feedback-open-project {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--fg);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.feedback-open-project svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.feedback-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.feedback-images.single {
  grid-template-columns: minmax(0, 1fr);
}

.feedback-shot {
  position: relative;
  border: 0;
  background: #e7eef7;
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 16px 44px rgba(10,10,11,0.1);
}

.feedback-shot img {
  width: 100%;
  aspect-ratio: 9 / 14;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.25s ease;
}

.feedback-shot:hover img {
  transform: scale(1.025);
}

.feedback-shot span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  right: 10px;
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  color: var(--fg);
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(10,10,11,0.08);
}

.feedback-lightbox {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.feedback-lightbox.open {
  display: flex;
}

.feedback-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(8px);
}

.feedback-lightbox-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  width: min(560px, 92vw);
  max-height: 92vh;
}

.feedback-lightbox-img {
  width: 100%;
  max-height: 84vh;
  object-fit: contain;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 90px rgba(0,0,0,0.42);
}

.feedback-lightbox-caption {
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.feedback-lightbox-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.28);
  background: #fff;
  color: #111;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.feedback-card-compact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 10px;
  transform: translate3d(0, var(--scroll-lift, 0), 0);
  transition: transform 0.32s ease-out, opacity 0.28s ease;
}

.feedback-placeholder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px dashed rgba(10,10,11,0.18);
}

.feedback-placeholder-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.feedback-placeholder-shot {
  min-height: 260px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(31,111,235,0.08), rgba(245,243,255,0.45)),
    var(--bg-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  cursor: default;
}

.feedback-placeholder-shot + .feedback-placeholder-shot {
  border-left: 1px dashed rgba(10,10,11,0.16);
}

.placeholder-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(10,10,11,0.34);
}

.placeholder-icon svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.placeholder-text {
  display: block;
  width: min(140px, 86%);
  font-size: 13px;
  font-weight: 800;
  color: rgba(10,10,11,0.42);
  line-height: 1.25;
  text-align: center;
}

.feedback-placeholder-shot small {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(10,10,11,0.36);
}

.feedback-real-shot {
  min-height: 0;
  margin: 0;
  border: 1px solid rgba(10,10,11,0.10);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr auto;
  box-shadow: 0 18px 44px rgba(15,23,42,0.08);
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), box-shadow 0.35s cubic-bezier(0.16,1,0.3,1), border-color 0.35s;
}

.feedback-real-shot:hover {
  transform: translateY(-4px);
  border-color: rgba(31,111,235,0.28);
  box-shadow: 0 26px 60px rgba(15,23,42,0.14);
}

.feedback-real-shot img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  min-height: 0;
  object-fit: cover;
  object-position: top center;
  display: block;
  background: #f8fafc;
  transition: transform 0.55s cubic-bezier(0.16,1,0.3,1), filter 0.55s cubic-bezier(0.16,1,0.3,1);
}

.feedback-real-shot:hover img {
  transform: scale(1.035);
  filter: saturate(1.06) contrast(1.03);
}

.feedback-real-shot figcaption {
  padding: 9px 11px 10px;
  font-size: 11px;
  line-height: 1.35;
  color: rgba(10,10,11,0.58);
  background: rgba(255,255,255,0.92);
  border-top: 1px solid rgba(10,10,11,0.07);
  text-align: center;
}

.feedback-caption-line {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}

.feedback-project-link {
  border: 0;
  padding: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.feedback-project-link:hover {
  color: var(--fg);
}

@media (max-width: 980px) {
  .project-modal .detail-modal-content {
    max-height: 92vh;
  }

  .project-case-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  #project-detail-modal {
    align-items: flex-start;
    padding-top: 16px;
  }

  .project-modal .detail-modal-content {
    width: 96vw;
    padding: 18px;
    border-radius: 18px;
    max-height: calc(100vh - 32px);
  }

  .project-mobile-tabs {
    display: flex;
    grid-column: 1 / -1;
    gap: 6px;
    overflow-x: auto;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-2);
    scrollbar-width: none;
  }

  .project-mobile-tabs::-webkit-scrollbar {
    display: none;
  }

  .case-tab {
    flex: 0 0 auto;
  }

  .project-case-body {
    gap: 16px;
  }

  .project-case-body [data-case-section] {
    display: none;
  }

  .project-case-body[data-active-tab="overview"] [data-case-section="overview"],
  .project-case-body[data-active-tab="stack"] [data-case-section="stack"],
  .project-case-body[data-active-tab="architecture"] [data-case-section="architecture"],
  .project-case-body[data-active-tab="screens"] [data-case-section="screens"] {
    display: block;
  }

  .project-case-body[data-active-tab="screens"] .project-brief {
    display: none;
  }

  .brief-meta {
    grid-template-columns: 1fr;
  }

  .stack-row {
    grid-template-columns: 92px 1fr;
  }

  .stack-layer {
    padding: 11px 10px;
  }

  .showcase-top,
  .showcase-controls {
    padding-left: 12px;
    padding-right: 12px;
  }

  .showcase-stage {
    padding: 12px;
  }

  .device-btn span {
    display: none;
  }

  .feedback-rail {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: center;
  }

  .feedback-track {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .feedback-nav {
    grid-row: 2;
    justify-self: center;
    width: 40px;
    height: 40px;
  }

  .feedback-card-rich {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .feedback-images {
    gap: 9px;
  }

  .feedback-card-rich h3 {
    font-size: 17px;
  }

  .feedback-card-compact {
    padding: 14px;
  }

  .feedback-placeholder-shot {
    min-height: 190px;
  }

  .feedback-real-shot {
    min-height: 0;
  }

  .feedback-real-shot img {
    min-height: 0;
    aspect-ratio: 3 / 4;
  }
}
