:root {
  color-scheme: light;
  --ink: #1f1d1a;
  --muted: #6e665d;
  --paper: #fbfaf7;
  --soft: #f1eee8;
  --line: #d7d0c4;
  --accent: #8e7355;
  --deep: #2e3936;
  --white: #ffffff;
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.hero {
  position: relative;
  min-height: 92vh;
  overflow: hidden;
  background: #111;
}

.hero-media {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.72);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 40px));
  min-height: 76vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--white);
}

.hero-logo {
  position: absolute;
  z-index: 3;
  top: 24px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  padding: 13px 16px;
  border: 1px solid rgba(31, 29, 26, 0.12);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.brand-logo {
  width: clamp(150px, 18vw, 250px);
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 108px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-title-brand::after {
  content: " ";
}

.hero p {
  max-width: 640px;
  margin: 24px 0 0;
  font-size: clamp(18px, 2.2vw, 28px);
  line-height: 1.55;
}

.footer-links {
  display: grid;
  gap: 12px;
  justify-items: center;
  width: 100%;
  margin-top: 10px;
}

.footer-links span {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.footer-links div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.footer-links a {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 6px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  text-decoration: none;
}

.toc {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 40px));
  margin: -54px auto 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 0 28px;
}

.toc a,
.pill,
.primary,
.ghost {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 6px;
  padding: 11px 16px;
  text-decoration: none;
  white-space: nowrap;
}

.toc a {
  color: var(--white);
  background: rgba(20, 20, 20, 0.35);
  backdrop-filter: blur(8px);
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0;
}

.section.soft {
  width: 100%;
  max-width: none;
  padding-inline: max(16px, calc((100vw - 1180px) / 2));
  background: var(--soft);
}

.section-head {
  display: flex;
  align-items: end;
  gap: 16px;
  margin-bottom: 34px;
}

.section-head span {
  color: var(--accent);
  font-weight: 700;
}

.section h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  letter-spacing: 0;
}

.section-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.55;
}

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

.color-item {
  min-width: 0;
}

.color-chip,
.sample-row button,
.image-card,
.guide-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  overflow: hidden;
  text-align: left;
}

.color-chip img {
  width: 100%;
  aspect-ratio: 1 / 0.78;
  object-fit: cover;
}

.color-chip.is-expanded {
  border-color: var(--deep);
  box-shadow: 0 0 0 2px rgba(46, 57, 54, 0.12);
}

.color-item h3 {
  margin: 14px 0 10px;
  font-size: 20px;
}

.sample-row {
  display: grid;
  gap: 8px;
}

.sample-row img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.sample-row span,
.image-card span,
.image-card small {
  display: block;
  padding: 10px 12px;
}

.sample-row span,
.image-card span {
  font-weight: 700;
}

.color-detail {
  display: none;
}

.image-card small {
  padding-top: 0;
  color: var(--muted);
}

.filter-row,
.scroll-options,
.action-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 12px;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

.filter-row .pill,
.scroll-options .pill {
  flex: 0 0 auto;
}

.action-row button {
  flex: 1 1 0;
  min-width: 140px;
}

.action-row .primary:only-child {
  flex: 1 1 100%;
}

.pill {
  border-color: var(--line);
  background: var(--white);
  color: var(--ink);
}

.pill.is-active,
.primary {
  border-color: var(--deep);
  background: var(--deep);
  color: var(--white);
}

.ghost {
  border-color: var(--line);
  background: var(--white);
  color: var(--ink);
}

.card-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.card-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.image-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #f7f5ef;
}

.case-card img {
  object-fit: cover;
}

.simulator {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  align-items: start;
  gap: 32px;
}

.preview {
  position: sticky;
  top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 18px;
}

.simulator-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.simulator-tabs button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--muted);
  font: inherit;
  font-weight: 700;
}

.simulator-tabs button.is-active {
  border-color: var(--deep);
  background: var(--deep);
  color: var(--white);
}

.preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1.25 / 1;
  background: linear-gradient(180deg, #f7f5f1, #ece7de);
  overflow: hidden;
}

.preview-stage .preview-logo {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 6;
  width: clamp(96px, 18%, 150px);
  height: auto;
  padding: 8px 10px;
  border: 1px solid rgba(31, 29, 26, 0.12);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(31, 29, 26, 0.08);
  pointer-events: none;
}

.preview-stage .layer {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 78%;
  height: 78%;
  object-fit: contain;
  object-position: center;
  transform: translate(-50%, -50%);
  transition: opacity 0.25s ease, transform 0.25s ease;
  will-change: opacity, transform;
}

.preview-stage.is-set .layer {
  width: 104%;
  height: 104%;
  transform: translate(-50%, -33%);
}

.preview-stage.is-set.is-wall.size-600 .layer {
  width: 76%;
  height: 76%;
  transform: translate(-50%, -36%);
}

.preview-stage.is-set.is-wall.size-1000 .layer {
  width: 86%;
  height: 86%;
  transform: translate(-50%, -37%);
}

.preview-stage.is-set.is-wall.size-1300 .layer {
  width: 104%;
  height: 104%;
  transform: translate(-50%, -23.87%);
}

.preview-stage.is-set.is-wall.size-1300 .cabinet {
  transform: translate(-50%, -20.87%);
}

.preview-stage.is-set.is-wall.size-1500 .layer {
  transform: translate(-50%, -19%);
}

.preview-stage.is-set.is-leg.size-600 .layer {
  width: 76%;
  height: 76%;
  transform: translate(-50%, -51%);
}

.preview-stage.is-set.is-leg.size-1000 .layer {
  width: 86%;
  height: 86%;
  transform: translate(-50%, -53%);
}

.preview-stage.is-set.is-leg.size-1300 .layer {
  width: 96%;
  height: 96%;
  transform: translate(-50%, -38%);
}

.preview-stage.is-set.is-leg.size-1500 .layer {
  transform: translate(-50%, -31%);
}

.preview-stage .layer.is-changing {
  animation: productFadeIn 0.25s ease both;
}

.preview-stage .layer-ghost {
  pointer-events: none;
}

.preview-stage .layer-ghost.basin {
  z-index: 3;
}

.preview-stage .layer-ghost.cabinet {
  z-index: 1;
}

.preview-stage .basin {
  z-index: 3;
}

.preview-stage .cabinet {
  z-index: 1;
}

.preview-stage .cabinet.is-changing {
  z-index: 2;
}

.preview-stage .basin.is-changing {
  z-index: 4;
}

@keyframes productFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes productFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .preview-stage .layer {
    transition: none;
    animation: none;
  }
}

.order-sheet {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: center;
  padding: 18px 0 14px;
}

.drawing-panel {
  display: grid;
  gap: 14px;
}

.drawing-summary {
  padding: 14px 0 0;
}

.drawing-summary strong,
.drawing-panel.is-empty strong {
  display: block;
  font-size: 20px;
}

.drawing-summary p,
.drawing-panel.is-empty p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.drawing-card {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 10px;
  overflow: hidden;
}

.drawing-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1.414 / 1;
  object-fit: contain;
  background: #fff;
}

.drawing-panel.is-empty {
  min-height: 360px;
  display: grid;
  align-content: center;
  padding: 30px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f7f5ef;
}

.order-sheet img {
  width: 120px;
}

.order-sheet strong {
  font-size: 20px;
}

.order-sheet p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.order-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

.order-list div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: start;
}

.order-list dt {
  color: var(--muted);
  font-size: 14px;
}

.order-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.45;
}

.controls {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.control-group.is-compact {
  padding-bottom: 4px;
}

.control-group h3 {
  margin: 0 0 10px;
  font-size: 19px;
}

.select-control {
  display: none;
}

.select-control span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.select-control select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 38px 10px 12px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

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

.guide-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #fff;
}

.guide-card h3 {
  margin: 14px 14px 8px;
  font-size: 20px;
}

.guide-card p {
  margin: 0 14px 18px;
  color: var(--muted);
  line-height: 1.5;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 16px;
  background: var(--deep);
  color: var(--white);
}

.footer img {
  width: 130px;
}

.copyright-notice {
  max-width: 760px;
  margin: 6px auto 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

.build-version {
  display: block;
  width: 100%;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.32);
  font-size: 10px;
  line-height: 1.3;
  text-align: center;
  letter-spacing: 0;
}

.lightbox {
  width: min(980px, calc(100% - 28px));
  max-width: calc(100vw - 28px);
  max-height: calc(100dvh - 28px);
  border: 0;
  border-radius: 8px;
  padding: 14px;
  background: var(--white);
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.lightbox img {
  width: 100%;
  max-height: min(78vh, calc(100dvh - 104px));
  object-fit: contain;
  background: #f6f3ed;
}

.lightbox-detail {
  margin-top: 14px;
}

.lightbox-detail strong {
  display: block;
  margin: 0 4px 8px;
  font-size: 15px;
}

.lightbox-detail img {
  max-height: min(58vh, 560px);
}

.lightbox p {
  margin: 12px 4px 2px;
  font-weight: 700;
}

.close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.68);
  color: var(--white);
  font-size: 26px;
}

@media (max-width: 980px) {
  .hero-media {
    grid-template-columns: 1fr;
  }

  .hero-media img:nth-child(2) {
    display: none;
  }

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

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

  .preview {
    position: relative;
    top: 0;
    z-index: auto;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 82vh;
  }

  .hero-logo {
    top: 14px;
    left: 14px;
    min-height: 38px;
    padding: 8px 10px;
    border-color: rgba(31, 29, 26, 0.14);
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
  }

  .brand-logo {
    width: 118px;
  }

  .toc {
    width: calc(100% - 24px);
  }

  .section {
    width: min(100% - 20px, 1180px);
    padding: 64px 0;
  }

  .section.soft {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .hero-copy {
    min-height: 72vh;
    width: calc(100% - 24px);
    padding-top: 82px;
    justify-content: center;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(50px, 15vw, 70px);
    line-height: 1.05;
  }

  .hero-title-brand,
  .hero-title-product {
    display: block;
  }

  .hero-title-brand::after {
    content: "";
  }

  .hero p {
    margin-top: 18px;
    font-size: clamp(18px, 5.2vw, 24px);
  }

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

  .color-item h3 {
    margin: 8px 0 6px;
    font-size: 13px;
    line-height: 1.25;
  }

  .sample-row {
    display: none;
  }

  .color-detail {
    grid-column: 1 / -1;
    display: block;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    padding: 10px;
  }

  .color-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
  }

  .color-detail-head strong {
    font-size: 15px;
  }

  .color-detail-head button {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f7f5ef;
    color: var(--muted);
    padding: 6px 9px;
    font-size: 12px;
  }

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

  .color-detail-grid button {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--white);
    color: var(--ink);
    overflow: hidden;
    padding: 0;
    text-align: left;
  }

  .color-detail-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #f7f5ef;
  }

  .color-detail-grid span {
    display: block;
    padding: 7px 6px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
  }

  .card-grid.four {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .image-card span,
  .image-card small {
    padding: 8px 7px;
    font-size: 12px;
    line-height: 1.3;
  }

  .simulator {
    gap: 14px;
  }

  .preview {
    margin-inline: -10px;
    padding: 10px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    box-shadow: 0 8px 18px rgba(31, 29, 26, 0.08);
  }

  .simulator-tabs {
    margin-bottom: 10px;
  }

  .simulator-tabs button {
    min-height: 38px;
    font-size: 14px;
  }

  .preview-stage {
    aspect-ratio: 1.55 / 1;
  }

  .preview-stage .preview-logo {
    top: 10px;
    left: 10px;
    width: 88px;
    padding: 6px 8px;
  }

  .preview-stage.is-set .layer {
    width: 112%;
    height: 112%;
  }

  .preview-stage.is-set.is-wall.size-600 .layer,
  .preview-stage.is-set.is-leg.size-600 .layer {
    width: 92%;
    height: 92%;
  }

  .preview-stage.is-set.is-wall.size-1000 .layer,
  .preview-stage.is-set.is-leg.size-1000 .layer {
    width: 102%;
    height: 102%;
  }

  .order-sheet {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 0 8px;
  }

  .order-sheet img {
    width: 70px;
  }

  .order-sheet strong {
    font-size: 15px;
  }

  .drawing-summary {
    padding-top: 8px;
  }

  .drawing-summary strong,
  .drawing-panel.is-empty strong {
    font-size: 16px;
  }

  .drawing-summary p,
  .drawing-panel.is-empty p {
    font-size: 12px;
    line-height: 1.35;
  }

  .drawing-card {
    padding: 6px;
  }

  .drawing-panel.is-empty {
    min-height: 230px;
    padding: 18px;
  }

  .order-list {
    gap: 4px;
    margin-top: 7px;
  }

  .order-list div {
    grid-template-columns: 64px 1fr;
    gap: 7px;
  }

  .order-list dt,
  .order-list dd {
    font-size: 12px;
    line-height: 1.25;
  }

  .action-row {
    padding-bottom: 0;
  }

  .action-row button {
    flex: 1 0 0;
    min-width: 0;
  }

  .controls {
    gap: 16px;
  }

  .control-group h3 {
    margin-bottom: 8px;
    font-size: 16px;
  }

  .control-group h3,
  .scroll-options[data-select] {
    display: none;
  }

  .select-control {
    display: block;
  }

  .pill,
  .primary,
  .ghost {
    min-height: 40px;
    padding: 9px 12px;
    font-size: 14px;
  }

  .card-grid.cases {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .card-grid.cases .image-card span {
    font-size: 12px;
    line-height: 1.35;
    padding: 8px;
  }

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

  .guide-card h3 {
    margin: 9px 7px 5px;
    font-size: 12px;
    line-height: 1.25;
  }

  .guide-card p {
    margin: 0 7px 10px;
    font-size: 10px;
    line-height: 1.35;
  }

  .footer {
    flex-direction: column;
  }

  .footer-links {
    gap: 9px;
  }

  .footer-links div {
    gap: 7px;
  }

  .footer-links a {
    min-height: 38px;
    padding: 9px 12px;
    font-size: 13px;
  }

  .lightbox {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    padding: 8px;
  }

  .lightbox img {
    max-height: calc(100dvh - 78px);
  }

  .lightbox-detail {
    margin-top: 10px;
  }

  .lightbox-detail strong {
    margin-bottom: 6px;
    font-size: 13px;
  }

  .lightbox-detail img {
    max-height: 48dvh;
  }

  .lightbox p {
    margin: 8px 2px 0;
    font-size: 13px;
  }

  .close {
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 420px) {
  .color-grid,
  .card-grid.four {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .section h2 {
    font-size: 28px;
  }
}
