:root {
  --bg-base: #f7f9fc;
  --bg-base-2: #eaf1fb;
  --bg-base-3: #f4f8ff;
  --bg-surface: #ffffff;
  --bg-card: #f1f4f8;
  --bg-card-soft: #e8edf5;
  --line: #d7dde7;
  --text-primary: #111318;
  --text-secondary: #4b5563;
  --text-tertiary: #6b7280;
  --brand-blue: #176bff;
  --brand-blue-soft: #4da3ff;
  --accent-orange: #ff9f2f;
  --chip: #e8edf5;
  --shadow-card: 0 18px 44px rgba(17, 19, 24, 0.08);
}

html[data-theme="dark"] {
  --bg-base: #000000;
  --bg-base-2: #121318;
  --bg-base-3: #0e1d3b;
  --bg-surface: #121318;
  --bg-card: #17191f;
  --bg-card-soft: #1d2027;
  --line: #2a2e37;
  --text-primary: #f4f7fb;
  --text-secondary: #a7afbc;
  --text-tertiary: #737b88;
  --chip: #22252d;
  --shadow-card: 0 18px 44px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--bg-base), var(--bg-base-2), var(--bg-base-3));
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.material-symbol {
  font-family: "Material Symbols Outlined", sans-serif;
  font-size: 20px;
  line-height: 1;
  font-weight: normal;
  font-style: normal;
  display: inline-block;
}

html[data-theme="dark"] body {
  background: linear-gradient(135deg, var(--bg-base), var(--bg-base-2), var(--bg-base-3));
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

main {
  display: block;
  margin-top: 52px;
  margin-bottom: 0;
}

.page-heading {
  margin-bottom: 8px;
}

.page-heading-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.7;
  margin-bottom: 6px;
}

.page-heading-title {
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.page-heading-sub {
  font-size: 14px;
  color: var(--text-secondary);
}

.site-shell {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  font-family: "Manrope", sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.15px;
  line-height: 1;
  display: inline-block;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

.brand-unified {
  color: var(--text-primary);
}

.brand-header {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: 0.12px;
}

.brand-footer {
  display: inline-block;
  margin-bottom: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.site-nav a {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  transition: color 160ms ease;
}

.site-nav a.is-active {
  color: var(--brand-blue);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 999px;
  cursor: pointer;
}

.theme-toggle:hover {
  background: color-mix(in srgb, var(--bg-card) 80%, transparent 20%);
  color: var(--text-primary);
}

.stack-lg,
.stack-md,
.stack-sm {
  display: flex;
  flex-direction: column;
}

.stack-lg { gap: 36px; }
.stack-md { gap: 24px; }
.stack-sm { gap: 16px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.card-soft {
  background: var(--bg-card-soft);
}

.section-card {
  padding: 24px;
}

.hero-shell {
  padding: 28px;
  border-radius: 28px;
}

.top-home-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 24px;
  align-items: start;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.22fr 0.98fr;
  gap: 24px;
  align-items: start;
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
}

.display-title {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1;
}
.display-line {
  display: block;
  margin-bottom: 0.32em;
}
.display-line:last-child {
  margin-bottom: 0;
}

.body-lg {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: -0.1px;
  color: var(--text-secondary);
}

.cta-row,
.proof-strip,
.project-grid,
.detail-grid,
.stats-grid,
.mini-grid {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-copy {
  align-self: center;
}

/* 고객사 로고 스트립 */
.client-strip-section {
  padding: 32px 0 28px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.client-strip-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0.45;
  margin-bottom: 20px;
}

.client-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
}

.client-logo {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  opacity: 0.22;
  filter: grayscale(1);
  transition: opacity 0.2s;
  white-space: nowrap;
  cursor: default;
  font-family: "Manrope", sans-serif;
}

.client-logo:hover {
  opacity: 0.55;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 20px;
  border-radius: 18px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.btn-primary {
  background: var(--brand-blue);
  color: #ffffff;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--line);
}

.btn-danger {
  background: color-mix(in srgb, #ff5c74 12%, var(--bg-card) 88%);
  color: #d92d47;
  border-color: color-mix(in srgb, #ff5c74 34%, var(--line) 66%);
}

.proof-card {
  min-width: 220px;
  padding: 18px;
  border-radius: 22px;
  background: var(--bg-card-soft);
  border: 1px solid var(--line);
}

.proof-card strong,
.mini-stat strong {
  display: block;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.lead-project h3,
.project-card h3,
.detail-title {
  margin: 0;
  letter-spacing: -0.4px;
}

.lead-showcase {
  display: grid;
  gap: 16px;
}

.lead-project {
  display: block;
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(135deg, #0f56d9, #176bff, #45b8f5);
  color: #ffffff;
}

.lead-visual {
  position: relative;
  height: 228px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.lead-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 52%),
    radial-gradient(circle at 88% 88%, rgba(77, 163, 255, 0.28), transparent 28%);
}

.lead-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 700;
}

.lead-meta {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lead-project h3 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.18;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lead-caption,
.subtle {
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  line-height: 1.5;
}

.lead-caption {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-project {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  background: var(--bg-card-soft);
  border: 1px solid var(--line);
  align-items: start;
}

.mini-cover,
.project-cover {
  position: relative;
  overflow: hidden;
  background: var(--bg-card-soft);
}

.mini-cover {
  border-radius: 18px;
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 12px;
  background: linear-gradient(135deg, #1d2027, #176bff);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
}

.project-cover {
  height: 140px;
  border-radius: 20px;
  padding: 18px;
  display: grid;
  place-items: center;
  color: var(--text-primary);
}

.project-cover-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.project-cover-logo {
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.project-cover-nhn-dooray-db-insurance-integration {
  background-position: center 24%;
}

.project-cover > *,
.mini-cover > * {
  position: relative;
  z-index: 1;
}

.project-cover-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.24;
  text-align: center;
}

.cover-meta {
  display: none;
}

.title-lg {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.24;
}

.title-xl {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.5px;
}

.title-md {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.body-md {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-text {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-tertiary);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand-blue) 24%, var(--line) 76%);
  background: color-mix(in srgb, var(--bg-card) 88%, var(--chip) 12%);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.list-panel li {
  position: relative;
  margin-bottom: 12px;
  padding-left: 18px;
  color: var(--text-secondary);
  list-style: none;
}

.list-panel {
  margin: 0;
  padding: 0;
}

.list-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand-blue);
}

.split-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

.detail-aside-cover .project-cover {
  height: 136px;
  border-radius: 20px;
}

.detail-aside-cover .gallery-img {
  height: 160px;
}

.detail-aside-cover .gallery {
  border-radius: 16px;
}

.detail-aside-cover .gallery-single {
  border-radius: 16px;
  overflow: hidden;
  height: 160px;
}

.detail-aside-cover .gallery-single .gallery-img {
  height: 160px;
  max-height: 160px;
  border-radius: 16px;
}

/* ── Gallery ──────────────────────────────────────────────────────── */
.gallery {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card);
}

.gallery-single {
  border-radius: 16px;
  overflow: hidden;
}

.gallery-track {
  display: flex;
  width: 100%;
}

.gallery-slide {
  flex: 0 0 100%;
  display: none;
}

.gallery-slide.active {
  display: block;
}

.gallery-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.gallery-single .gallery-img {
  height: 240px;
  border-radius: 16px;
}

.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.15s;
}

.gallery-btn:hover {
  background: rgba(0,0,0,0.65);
}

.gallery-prev { left: 8px; }
.gallery-next { right: 8px; }

.gallery-dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
}

.gallery-dot.active {
  background: #fff;
}

.gallery-clickable {
  cursor: zoom-in;
}

.cover-clickable {
  cursor: zoom-in;
}

.cover-multi-gallery {
  position: relative;
  overflow: hidden;
}

.cover-slide {
  position: absolute;
  inset: 0;
  display: none;
}

.cover-slide.active {
  display: block;
}

.cover-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.gallery-img-contain,
.gallery-img-svg {
  object-fit: contain;
  padding: 24px;
  background: var(--bg-surface);
}

.detail-aside-cover .gallery-img-contain,
.detail-aside-cover .gallery-img-svg {
  padding: 16px;
}

.gallery-single-contain,
.gallery-single-svg {
  background: var(--bg-surface);
}

.cover-slide-svg img {
  object-fit: contain;
  padding: 12px;
  background: var(--bg-surface);
}

.project-cover-svg {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: var(--bg-surface);
}

.cover-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
}

.cover-multi-gallery:hover .cover-nav {
  opacity: 1;
}

.cover-prev { left: 6px; }
.cover-next { right: 6px; }

.cover-zoom {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.4);
  color: #fff;
  border: none;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.15s;
}

.cover-multi-gallery:hover .cover-zoom {
  opacity: 1;
}

.cover-multi-gallery .gallery-dots {
  bottom: 6px;
}

.cover-multi-gallery .gallery-dot {
  width: 6px;
  height: 6px;
}

/* ── Lightbox ─────────────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
}

.lb-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: calc(100vw - 120px);
  max-height: calc(100vh - 80px);
}

.lb-img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: 8px;
  display: block;
  box-shadow: 0 8px 48px rgba(0,0,0,0.6);
}

.lb-counter {
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  margin-top: 12px;
  letter-spacing: 0.04em;
}

.lb-close {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 2;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.lb-close:hover {
  background: rgba(255,255,255,0.25);
}

.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 36px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  line-height: 1;
}

.lb-btn:hover {
  background: rgba(255,255,255,0.25);
}

.lb-prev { left: 16px; }
.lb-next { right: 16px; }

.home-feature-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

.needs-panel {
  border-radius: 28px;
}

.needs-panel .title-xl {
  margin-bottom: 18px;
}

.info-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--bg-card);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.detail-block {
  padding: 24px;
}

.detail-block p,
.detail-block li {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.search-shell,
.ctrl-shell {
  display: grid;
  gap: 24px;
}

.ctrl-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.ctrl-item.is-editing {
  border-color: color-mix(in srgb, var(--brand-blue) 55%, var(--line) 45%);
  box-shadow: 0 12px 28px rgba(23, 107, 255, 0.12);
}

.ctrl-item-actions {
  justify-content: flex-end;
}

.search-box,
.form-grid {
  display: grid;
  gap: 14px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.ctrl-editing-slug {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-blue);
}

.field,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: 18px;
  padding: 16px 18px;
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

.quick-actions {
  position: fixed;
  right: 28px;
  bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 20;
}

.quick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid transparent;
  color: #ffffff;
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(17, 19, 24, 0.16);
  cursor: pointer;
  padding: 0;
}

.quick-btn .material-symbol {
  font-size: 22px;
}

.quick-btn-accent {
  background: linear-gradient(180deg, #2d7cff, #176bff);
  color: #ffffff;
}

.quick-btn:not(.quick-btn-accent) {
  background: linear-gradient(180deg, #3a404a, #242830);
  color: #ffffff;
}

.chat-panel {
  position: fixed;
  right: 28px;
  bottom: 116px;
  width: min(380px, calc(100vw - 32px));
  height: 520px;
  display: none;
  flex-direction: column;
  border-radius: 28px;
  background: color-mix(in srgb, var(--bg-surface) 96%, transparent 4%);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  z-index: 30;
  overflow: hidden;
}

.chat-panel-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 16px;
  gap: 10px;
}

.chat-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-panel-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(180deg, #2d7cff, #176bff);
  color: #ffffff;
}

.chat-panel.is-open {
  display: flex;
}

.chat-log {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--bg-card-soft);
}

.chat-message {
  max-width: 78%;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.5;
}

.chat-message.assistant {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--line);
}

.chat-message.user {
  align-self: flex-end;
  background: var(--brand-blue);
  color: #ffffff;
}

/* 빠른 질문 버튼 */
.chat-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0;
}

.chat-quick-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.chat-quick-btn:hover {
  background: var(--chip);
}

/* 입력 영역 */
.chat-input-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.chat-input-row .btn {
  flex-shrink: 0;
  white-space: nowrap;
  writing-mode: horizontal-tb;
}

/* 관련 프로젝트 카드 */
.chat-refs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.chat-ref-card {
  display: block;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-surface);
  text-decoration: none;
  transition: background 0.15s;
}

.chat-ref-card:hover {
  background: var(--chip);
}

.chat-ref-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.chat-ref-meta {
  font-size: 11px;
  color: var(--text-secondary);
}

/* nextAction 버튼 영역 */
.chat-next-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* 타이핑 인디케이터 */
.chat-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 16px;
}

.chat-typing span {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-secondary);
  animation: chat-bounce 1.2s ease-in-out infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes chat-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* 챗 답변 구조화 스타일 */
.chat-message.assistant .chat-block {
  margin-bottom: 8px;
}

.chat-message.assistant .chat-block:last-child {
  margin-bottom: 0;
}

.chat-section-header {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.75;
  margin-bottom: 2px;
}

.chat-list {
  margin: 4px 0 4px 0;
  padding-left: 14px;
  list-style: none;
}

.chat-list li {
  position: relative;
  padding-left: 12px;
  margin-bottom: 3px;
  font-size: 13px;
  line-height: 1.5;
}

.chat-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.chat-bullet {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 2px;
  padding-left: 2px;
  color: var(--fg);
}

.chat-label-row {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 2px;
}

.chat-label {
  font-weight: 600;
  color: var(--fg);
  opacity: 0.65;
  font-size: 11px;
}

.chat-line {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 2px;
}

.footer-zone {
  width: min(1240px, calc(100% - 48px));
  margin: 170px auto 0;
}

.site-footer {
  padding: 0 28px 28px;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 28px;
  align-items: start;
}

.footer-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
}

.footer-description {
  max-width: 520px;
}

.footer-link-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.footer-company-bar {
  margin-top: 24px;
  display: grid;
  gap: 6px;
}

.company-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.company-meta-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: nowrap;
}

.company-meta-label {
  color: var(--text-primary);
  font-weight: 700;
}

.company-meta-address {
  white-space: normal;
}

.footer-copy {
  margin-top: 14px;
  display: flex;
  justify-content: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.empty-state {
  padding: 28px;
  border-radius: 24px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--text-secondary);
}

@media (max-width: 1100px) {
  .top-home-grid,
  .hero-grid,
  .home-feature-grid,
  .split-grid,
  .footer-top,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-link-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .site-shell {
    width: min(1240px, calc(100% - 24px));
  }

  .footer-zone {
    width: min(1240px, calc(100% - 24px));
  }

  .site-header {
    flex-wrap: wrap;
  }

  .site-nav {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
  }

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

  .footer-link-columns {
    grid-template-columns: 1fr;
  }

  .mini-project {
    grid-template-columns: 88px 1fr;
  }

  .lead-visual {
    height: 200px;
  }

  .quick-actions,
  .chat-panel {
    right: 16px;
  }

  .quick-actions {
    bottom: 20px;
  }

  .chat-panel {
    bottom: 108px;
    width: min(360px, calc(100vw - 24px));
  }
}

/* ── Solutions ────────────────────────────────────────────────────── */
.chip-blue {
  background: var(--brand-blue);
  color: #fff;
}

.pill-strong {
  background: var(--brand-blue);
  color: #fff;
  font-weight: 700;
}

.solution-featured-section {
  background: linear-gradient(135deg, #f0f6ff 0%, #e7efff 100%);
  border: 1.5px solid var(--brand-blue);
}

html[data-theme="dark"] .solution-featured-section {
  background: linear-gradient(135deg, #0e1d3b 0%, #182a52 100%);
}

.solution-featured-badge-row {
  margin-bottom: 16px;
}

.solution-featured-badge-large {
  display: inline-block;
  background: var(--brand-blue);
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 6px 12px;
  border-radius: 4px;
}

.solution-featured-badge {
  font-size: 10px;
  font-weight: 800;
  color: var(--brand-blue);
  letter-spacing: 0.05em;
}

.solution-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.solution-card-featured {
  border: 1.5px solid var(--brand-blue);
}

/* ── Reference category tabs ──────────────────────────────────────── */
.cat-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 12px 12px 0 0;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.15s;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.cat-tab:hover {
  color: var(--text-primary);
  background: var(--bg-card-soft);
}

.cat-tab.is-active {
  color: var(--brand-blue);
  border-bottom-color: var(--brand-blue);
  background: var(--bg-card-soft);
}

.cat-count {
  font-size: 11px;
  font-weight: 700;
  background: var(--chip);
  color: var(--text-tertiary);
  padding: 1px 7px;
  border-radius: 10px;
}

.cat-tab.is-active .cat-count {
  background: var(--brand-blue);
  color: #fff;
}

/* ── Scope grid (Solutions detail) ───────────────────────────────── */
.scope-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.scope-card {
  border-radius: 16px;
  padding: 16px 20px;
  border: 1px solid var(--line);
}

.scope-card .scope-label {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.scope-included {
  background: rgba(46, 196, 122, 0.08);
  border-color: rgba(46, 196, 122, 0.3);
}
.scope-included .scope-label {
  color: #1f9b5d;
}

.scope-optional {
  background: rgba(255, 159, 47, 0.08);
  border-color: rgba(255, 159, 47, 0.3);
}
.scope-optional .scope-label {
  color: #c97a14;
}

.scope-excluded {
  background: rgba(220, 80, 80, 0.06);
  border-color: rgba(220, 80, 80, 0.25);
}
.scope-excluded .scope-label {
  color: #b04545;
}

.bullet-list {
  list-style: disc;
  padding-left: 20px;
  margin: 0;
}

.bullet-list li {
  padding: 4px 0;
  line-height: 1.6;
  color: var(--text-secondary);
}

.cta-section {
  background: linear-gradient(135deg, var(--bg-card-soft) 0%, var(--bg-card) 100%);
  border: 1px solid var(--line);
}

/* ── Mini cover image ──────────────────────────────────────────── */
.mini-cover-image {
  background-size: cover;
  background-position: center;
}

.mini-cover-contain {
  background-size: contain !important;
  background-repeat: no-repeat;
  background-position: center;
  background-color: var(--bg-surface);
}

.mini-cover-label {
  font-weight: 700;
}

/* ── Deployment status ──────────────────────────────────────────── */
.deploy-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 12px;
  margin-top: 4px;
}

.deploy-status-running {
  background: rgba(46, 196, 122, 0.12);
  color: #1f9b5d;
  border: 1px solid rgba(46, 196, 122, 0.4);
}

.deploy-status-incoming {
  background: rgba(255, 159, 47, 0.14);
  color: #c97a14;
  border: 1px solid rgba(255, 159, 47, 0.45);
}

.deploy-status-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 8px 16px;
  border-radius: 22px;
  width: fit-content;
}

.deploy-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Solution cover (architecture diagram style) ──────────────────── */
.solution-cover {
  width: 100%;
  height: 160px;
  border-radius: 16px;
  overflow: hidden;
  background: #0E1730;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.solution-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.solution-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.solution-card .solution-cover {
  height: 168px;
}

/* On detail page hero, cover should be larger */
.detail-aside-cover .solution-cover {
  height: 200px;
}
