/* ==========================================================================
   CHEONGNA THELIV TIAMO CASA — Luxury Architectural Theme & Mobile Stream CSS
   ========================================================================== */

:root {
  --navy-950: #061524;
  --navy-900: #092136;
  --navy-800: #0f314d;
  --navy-700: #184366;
  --gold-600: #9e7352;
  --gold-500: #b6896a;
  --gold-400: #cda384;
  --gold-300: #e3c7b0;
  --gold-100: #f7f1ec;
  --ivory-100: #faf8f5;
  --ivory-200: #f1ede7;
  --ink-900: #102536;
  --ink-700: #374957;
  --ink-500: #667582;
  --line-light: #e5e0d8;
  --shadow-soft: 0 14px 38px rgba(9, 33, 54, 0.08);
  --shadow-elevated: 0 22px 54px rgba(6, 21, 36, 0.16);
}

.mobile-categories,
.mobile-subchips,
.mobile-bottom-cta {
  display: none;
}

/* Lightbox Modal for Floor Plans & Info Images (PC & Mobile) */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(6, 21, 36, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.lightbox-backdrop.open {
  opacity: 1;
  visibility: visible;
}
.lightbox-toolbar {
  position: absolute;
  top: 18px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
}
.lightbox-caption {
  color: var(--gold-300);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.lightbox-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(9, 33, 54, 0.75);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.lightbox-close:hover {
  background: var(--gold-500);
  border-color: var(--gold-400);
}
.lightbox-stage {
  max-width: min(1320px, 94vw);
  max-height: 86vh;
  overflow: auto;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
}
.lightbox-stage img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: auto;
}

/* Interior Thumbnail Filmstrip (PC & Mobile) */
.gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 4px 6px;
  margin-top: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-500) #eee;
}
.gallery-thumbs::-webkit-scrollbar {
  height: 5px;
}
.gallery-thumbs::-webkit-scrollbar-thumb {
  background: var(--gold-500);
  border-radius: 99px;
}
.gallery-thumb {
  flex: none;
  width: 76px;
  height: 52px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.58;
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  background: #092136;
}
.gallery-thumb:hover,
.gallery-thumb[aria-current="true"] {
  opacity: 1;
  border-color: var(--gold-500);
  transform: translateY(-2px);
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* PC Floating Quick Dock */
@media (min-width: 801px) {
  .pc-quick-dock {
    position: fixed;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 35;
    display: flex;
    flex-direction: column;
    background: rgba(9, 33, 54, 0.94);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(205, 163, 132, 0.35);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(6, 21, 36, 0.26);
    width: 86px;
  }
  .pc-quick-dock-head {
    background: linear-gradient(135deg, #b6896a, #946a4c);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-align: center;
    padding: 8px 4px;
    text-transform: uppercase;
  }
  .pc-quick-dock a,
  .pc-quick-dock button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 13px 6px;
    color: #e4ebf0;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: -0.03em;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    background: transparent;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s ease, color 0.2s ease;
  }
  .pc-quick-dock a:hover,
  .pc-quick-dock button:hover {
    background: rgba(182, 137, 106, 0.22);
    color: var(--gold-300);
  }
  .pc-quick-dock svg {
    width: 20px;
    height: 20px;
    stroke: var(--gold-400);
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .pc-quick-dock .dock-top {
    background: rgba(255, 255, 255, 0.05);
    color: var(--gold-300);
    font-size: 11px;
    padding: 10px 6px;
    border-bottom: 0;
  }
}
@media (max-width: 1280px) {
  .pc-quick-dock {
    display: none;
  }
}

/* ==========================================================================
   MOBILE ONE-PAGE STREAM (<= 800px)
   ========================================================================== */
@media (max-width: 800px) {
  html {
    scroll-behavior: smooth;
    scroll-padding-top: 152px;
  }
  body {
    overflow: auto !important;
    height: auto;
    min-height: 100%;
    background: var(--ivory-100);
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }
  .header {
    position: sticky !important;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(9, 33, 54, 0.08);
  }

  /* Sticky Primary Category Bar */
  .mobile-categories {
    position: sticky;
    top: 68px;
    z-index: 25;
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    background: #092136;
    border-bottom: 1px solid rgba(205, 163, 132, 0.25);
    box-shadow: 0 6px 16px rgba(9, 33, 54, 0.16);
  }
  .mobile-categories::-webkit-scrollbar {
    display: none;
  }
  .mobile-categories button {
    flex: none;
    background: none;
    border: 0;
    border-bottom: 3px solid transparent;
    padding: 13px 16px 11px;
    color: rgba(255, 255, 255, 0.68);
    font: 600 13.5px 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    letter-spacing: -0.03em;
    white-space: nowrap;
    transition: color 0.2s ease, border-color 0.2s ease;
  }
  .mobile-categories button[aria-current="true"] {
    color: #fff;
    border-bottom-color: var(--gold-400);
  }

  /* Sticky Secondary Sub-Section Chips */
  .mobile-subchips {
    position: sticky;
    top: 113px;
    z-index: 24;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    background: rgba(250, 248, 245, 0.96);
    backdrop-filter: blur(10px);
    padding: 8px 14px;
    border-bottom: 1px solid var(--line-light);
    box-shadow: 0 4px 12px rgba(9, 33, 54, 0.05);
  }
  .mobile-subchips::-webkit-scrollbar {
    display: none;
  }
  .mobile-subchips button {
    flex: none;
    border: 1px solid #d7d0c7;
    background: #fff;
    color: var(--ink-700);
    border-radius: 999px;
    padding: 6px 13px;
    font: 600 12px 'Noto Sans KR', sans-serif;
    letter-spacing: -0.03em;
    white-space: nowrap;
    transition: all 0.2s ease;
  }
  .mobile-subchips button[aria-current="true"] {
    background: var(--navy-900);
    color: var(--gold-300);
    border-color: var(--navy-900);
    box-shadow: 0 3px 8px rgba(9, 33, 54, 0.18);
  }

  /* Mobile Stream Hero */
  .mobile-stream .hero {
    height: auto !important;
    min-height: calc(100svh - 154px);
    display: flex;
    flex-direction: column;
    background: var(--navy-950);
    position: relative;
    overflow: hidden;
  }
  .mobile-stream .hero .photo-wrap {
    position: relative;
    width: 100%;
    height: 46svh;
    min-height: 270px;
    max-height: 390px;
    overflow: hidden;
  }
  .mobile-stream .hero .photo {
    position: static !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
  }
  .mobile-stream .hero .photo-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 21, 36, 0.18) 0%, rgba(6, 21, 36, 0.05) 65%, rgba(250, 248, 245, 0.98) 100%);
    pointer-events: none;
  }
  .mobile-stream .hero .hero-badge-floating {
    position: absolute;
    top: 14px;
    left: 16px;
    z-index: 2;
    background: rgba(6, 21, 36, 0.78);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(205, 163, 132, 0.45);
    color: var(--gold-300);
    padding: 5px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
  }
  .mobile-stream .hero .copy {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    padding: 20px 22px 28px;
    background: linear-gradient(180deg, #faf8f5 0%, #f1ece4 100%);
    color: var(--navy-900);
    border-bottom: 1px solid var(--line-light);
  }
  .mobile-stream .hero .copy-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold-600);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    margin-bottom: 10px;
  }
  .mobile-stream .hero .copy-eyebrow::before {
    content: '';
    width: 20px;
    height: 1px;
    background: var(--gold-500);
  }
  .mobile-stream .hero .copy p {
    color: var(--navy-900);
    font-family: 'Noto Serif KR', serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.55;
    margin: 0 0 16px;
  }
  .mobile-stream .hero .title {
    width: min(275px, 84%);
    display: block;
  }
  .mobile-stream .hero .line {
    width: 48px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-500), transparent);
    margin: 20px 0 16px;
  }
  .mobile-stream .hero .brand {
    width: 195px;
    display: block;
  }
  .mobile-stream .hero-highlights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 22px;
  }
  .mobile-stream .hero-hl-item {
    background: #fff;
    border: 1px solid #e2dad0;
    border-left: 3px solid var(--gold-500);
    border-radius: 6px;
    padding: 10px 12px;
    box-shadow: 0 4px 12px rgba(9, 33, 54, 0.05);
  }
  .mobile-stream .hero-hl-item strong {
    display: block;
    color: var(--navy-900);
    font-size: 12.5px;
    margin-bottom: 2px;
  }
  .mobile-stream .hero-hl-item span {
    display: block;
    color: var(--ink-500);
    font-size: 11.5px;
    letter-spacing: -0.03em;
  }
  .mobile-stream .hero-cta-row {
    display: flex;
    gap: 10px;
    margin-top: 18px;
  }
  .mobile-stream .hero-cta-row a,
  .mobile-stream .hero-cta-row button {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 12px;
    border-radius: 6px;
    font: 700 13.5px 'Noto Sans KR', sans-serif;
    cursor: pointer;
    text-align: center;
  }
  .mobile-stream .btn-gold {
    background: linear-gradient(135deg, #092136, #143a5a);
    color: var(--gold-300);
    border: 1px solid var(--navy-900);
    box-shadow: 0 6px 16px rgba(9, 33, 54, 0.18);
  }
  .mobile-stream .btn-outline-light {
    background: #fff;
    color: var(--navy-900);
    border: 1px solid #d2c7ba;
  }

  /* Mobile Sections */
  .mobile-section {
    scroll-margin-top: 152px;
    background: #fff;
    margin: 14px 12px;
    border-radius: 12px;
    border: 1px solid var(--line-light);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
  }
  .mobile-section-inner {
    max-width: 1200px;
    margin: auto;
    padding: 32px 16px 40px;
  }
  .mobile-sec-header {
    text-align: center;
    margin-bottom: 24px;
  }
  .mobile-sec-eyebrow {
    display: inline-block;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--gold-500);
    text-transform: uppercase;
    margin-bottom: 6px;
  }
  .mobile-section-inner > h2,
  .mobile-sec-header h2 {
    text-align: center;
    font: 600 24px 'Noto Serif KR', 'Batang', serif;
    color: var(--navy-900);
    margin: 0;
    letter-spacing: -0.03em;
  }
  .mobile-sec-divider {
    width: 36px;
    height: 2px;
    background: var(--gold-500);
    margin: 12px auto 0;
  }
  .mobile-zoom-hint {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    font-size: 11.5px;
    color: var(--ink-500);
    margin-bottom: 8px;
  }
  .mobile-section .page-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid #ece8e1;
    cursor: zoom-in;
  }
  .mobile-section .tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 22px;
  }
  .mobile-section .tabs button {
    flex: 1;
    min-width: 46%;
    padding: 12px 10px;
    border: 1px solid #d8d2c9;
    border-radius: 6px;
    background: var(--ivory-100);
    color: var(--ink-700);
    font: 600 13.5px 'Noto Sans KR', sans-serif;
    transition: all 0.2s ease;
  }
  .mobile-section .tabs button[aria-selected="true"] {
    background: var(--navy-900);
    color: #fff;
    border-color: var(--navy-900);
    box-shadow: 0 4px 12px rgba(9, 33, 54, 0.18);
  }
  .mobile-section .tab-panel[hidden] {
    display: none;
  }
  .mobile-section iframe {
    width: 100%;
    height: 430px;
    border: 0;
    border-radius: 8px;
  }
  .mobile-section video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #000;
    border-radius: 8px;
  }
  .mobile-section .note {
    font-size: 13px;
    line-height: 1.65;
    color: var(--ink-500);
    background: var(--ivory-100);
    padding: 12px 14px;
    border-radius: 6px;
    border-left: 3px solid var(--gold-500);
    margin-top: 14px;
  }
  .mobile-section .gallery {
    position: relative;
  }
  .mobile-section .gallery > img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
  }
  .mobile-section .gallery-controls button {
    position: absolute;
    top: 38%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.65);
    background: rgba(9, 33, 54, 0.82);
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-section #gallery-prev {
    left: 10px;
  }
  .mobile-section #gallery-next {
    right: 10px;
  }
  .mobile-section #gallery-count {
    display: block;
    text-align: center;
    padding: 12px 0 4px;
    color: var(--navy-900);
    font-weight: 700;
    font-size: 13.5px;
  }
  .mobile-section .registration {
    background: var(--ivory-100);
    padding: 24px 18px;
    border-radius: 10px;
    border: 1px solid var(--line-light);
  }
  .mobile-section .registration h2 {
    font: 600 21px 'Noto Serif KR', serif;
    color: var(--navy-900);
    margin-top: 0;
  }
  .mobile-section .registration p {
    line-height: 1.65;
    font-size: 14px;
    color: var(--ink-700);
  }
  .mobile-section .registration form > label:not(.agree) {
    display: block;
    margin: 18px 0;
    font-weight: 700;
    font-size: 14px;
    color: var(--navy-900);
  }
  .mobile-section .registration form > label b {
    color: var(--gold-600);
  }
  .mobile-section .registration input:not([type="checkbox"]),
  .mobile-section .registration select,
  .mobile-section .registration textarea {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 13px 14px;
    border: 1px solid #cbd2d9;
    border-radius: 6px;
    background: #fff;
    font: inherit;
  }
  .mobile-section .registration input:focus,
  .mobile-section .registration select:focus,
  .mobile-section .registration textarea:focus {
    outline: none;
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(182, 137, 106, 0.18);
  }
  .mobile-section .registration details {
    font-size: 13px;
    line-height: 1.75;
    background: #fff;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid var(--line-light);
  }
  .mobile-section .agree {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 18px 0;
    font-size: 13.5px;
    font-weight: 600;
  }
  .mobile-section .trap {
    display: none !important;
  }
  .mobile-section .send {
    width: 100%;
    border: 0;
    border-radius: 6px;
    background: linear-gradient(135deg, #092136, #133959);
    color: #fff;
    padding: 16px;
    font: 700 15px 'Noto Sans KR', sans-serif;
    box-shadow: 0 8px 20px rgba(9, 33, 54, 0.22);
  }
  .mobile-section .send:disabled {
    opacity: 0.55;
  }
  .mobile-footer {
    background: var(--navy-950);
    color: #b7c4ce;
    padding: 32px 20px 40px;
    font-size: 12.5px;
    line-height: 1.85;
    border-top: 2px solid var(--gold-500);
  }
  .mobile-footer strong {
    color: #fff;
    font-size: 15px;
  }
  .mobile-footer a {
    color: var(--gold-300);
    font-weight: 700;
  }

  /* Floating Quick Button (Top) & Fixed Bottom Conversion Bar */
  .mobile-quick {
    position: fixed;
    right: 14px;
    bottom: calc(80px + env(safe-area-inset-bottom));
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .mobile-quick a,
  .mobile-quick button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(205, 163, 132, 0.5);
    border-radius: 50%;
    box-shadow: 0 6px 16px rgba(6, 21, 36, 0.28);
    font: 700 11px 'Noto Sans KR', sans-serif;
    line-height: 1;
    color: #fff;
    background: rgba(9, 33, 54, 0.9);
    backdrop-filter: blur(6px);
    text-decoration: none;
    cursor: pointer;
  }
  .mobile-quick [data-action="top"] {
    background: rgba(255, 255, 255, 0.95);
    color: var(--navy-900);
    border-color: #cbd5dd;
  }
  .mobile-quick svg {
    display: block;
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-bottom-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: flex;
    background: var(--navy-950);
    border-top: 1px solid rgba(205, 163, 132, 0.35);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -6px 20px rgba(6, 21, 36, 0.25);
  }
  .mobile-bottom-cta a,
  .mobile-bottom-cta button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 56px;
    border: 0;
    font: 700 14px 'Noto Sans KR', sans-serif;
    letter-spacing: -0.02em;
    cursor: pointer;
    text-decoration: none;
  }
  .mobile-bottom-cta .cta-call {
    background: var(--navy-900);
    color: #fff;
  }
  .mobile-bottom-cta .cta-consult {
    background: linear-gradient(135deg, #c49a76, #a37754);
    color: #fff;
  }
  .mobile-bottom-cta svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
  }
}
