/*
 * PLASTIC HOUSE — Precision Atelier visual system
 * Shared by the storefront and the custom-print workspace.
 */

:root {
  --ph-bg-base: #080a0d;
  --ph-bg-surface: #101419;
  --ph-bg-surface-elevated: #171c23;
  --ph-bg-surface-highest: #202730;
  --ph-border-subtle: rgba(255, 255, 255, 0.09);
  --ph-border-medium: rgba(255, 255, 255, 0.18);
  --ph-border-focus: #62e6ff;
  --ph-text-primary: #f5f7f4;
  --ph-text-secondary: #a7afb8;
  --ph-text-tertiary: #717b86;
  --ph-brand-cyan: #62e6ff;
  --ph-brand-blue: #5b7cff;
  --ph-radius-sm: 8px;
  --ph-radius-md: 13px;
  --ph-radius-lg: 20px;
  --ph-radius-xl: 30px;
  --ph-shadow-card: 0 24px 70px rgba(0, 0, 0, 0.22);
  --ph-shadow-hover: 0 30px 90px rgba(0, 0, 0, 0.42);
  --atelier-lime: #c9ff57;
  --atelier-orange: #ff7a45;
  --atelier-ink: #080a0d;
  --atelier-grid: rgba(255, 255, 255, 0.055);
}

[data-theme="light"] {
  --ph-bg-base: #f2f1ec;
  --ph-bg-surface: #faf9f5;
  --ph-bg-surface-elevated: #ecebe5;
  --ph-bg-surface-highest: #dfded7;
  --ph-border-subtle: rgba(10, 12, 14, 0.1);
  --ph-border-medium: rgba(10, 12, 14, 0.2);
  --ph-text-primary: #101216;
  --ph-text-secondary: #555d65;
  --ph-text-tertiary: #7a8288;
  --ph-brand-cyan: #007f9a;
  --ph-brand-blue: #355de8;
  --atelier-lime: #9bcf22;
  --atelier-grid: rgba(10, 12, 14, 0.065);
}

html {
  background: var(--ph-bg-base);
}

body,
.ph-shell,
.ph-storefront-root,
.tp-page {
  background-color: var(--ph-bg-base);
  color: var(--ph-text-primary);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(var(--atelier-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--atelier-grid) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
  pointer-events: none;
  content: "";
}

.ph-container {
  max-width: 1380px;
  padding-inline: 30px;
}

.ph-announcement-bar {
  border: 0;
  background: var(--atelier-lime);
  color: var(--atelier-ink);
  padding-block: 9px;
  font-family: var(--ph-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.ph-announcement-content {
  justify-content: space-between;
}

.ph-announcement-icon {
  color: inherit;
}

.ph-navbar-wrap {
  border-bottom-color: var(--ph-border-subtle);
  background: color-mix(in srgb, var(--ph-bg-base) 82%, transparent);
  backdrop-filter: blur(24px) saturate(135%);
}

[data-theme="light"] .ph-navbar-wrap {
  background: color-mix(in srgb, var(--ph-bg-base) 86%, transparent);
}

.ph-navbar {
  height: 78px;
}

.ph-brand-logo {
  gap: 13px;
}

.ph-brand-symbol {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: var(--ph-brand-blue);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--ph-brand-blue) 12%, transparent);
}

.ph-brand-name {
  font-family: var(--ph-font-mono);
  font-size: 17px;
  letter-spacing: -0.03em;
}

.ph-brand-sub {
  margin-top: 3px;
  color: var(--ph-text-tertiary);
  letter-spacing: 0.16em;
}

.ph-nav-links {
  gap: 8px;
}

.ph-nav-link,
.ph-nav-link-btn {
  border-radius: 999px;
  padding: 10px 15px;
  font-size: 13px;
}

.ph-nav-link-btn.active {
  background: var(--ph-bg-surface-elevated);
  color: var(--ph-text-primary);
}

.ph-nav-link-btn.active::after {
  display: none;
}

.ph-theme-toggle,
.ph-hamburger-btn {
  border-color: var(--ph-border-medium);
  border-radius: 50%;
  background: transparent;
}

.ph-btn-kakao-nav {
  height: 46px;
  border-radius: 999px;
  padding-inline: 20px;
  box-shadow: none;
}

.ph-store-tab-nav {
  border-bottom-color: var(--ph-border-subtle);
  background: color-mix(in srgb, var(--ph-bg-base) 90%, transparent);
  padding-block: 8px;
  top: 78px;
  backdrop-filter: blur(20px);
}

[data-theme="light"] .ph-store-tab-nav {
  background: color-mix(in srgb, var(--ph-bg-base) 92%, transparent);
}

.ph-tab-pill-group {
  justify-content: center;
}

.ph-tab-pill-btn {
  min-height: 42px;
  border-color: transparent;
  background: transparent;
  padding-inline: 19px;
  font-size: 13px;
}

.ph-tab-pill-btn.active {
  border-color: var(--ph-border-medium);
  background: var(--ph-text-primary);
  color: var(--ph-bg-base);
  box-shadow: none;
}

[data-theme="light"] .ph-tab-pill-btn.active {
  border-color: var(--ph-text-primary);
  background: var(--ph-text-primary);
  color: var(--ph-bg-base);
}

/* Storefront hero */
.ph-store-hero {
  padding-block: 42px 26px;
}

.ph-store-hero-card {
  position: relative;
  min-height: 520px;
  border: 1px solid var(--ph-border-medium);
  border-radius: 34px;
  background:
    radial-gradient(circle at 76% 20%, rgba(98, 230, 255, 0.2), transparent 23rem),
    radial-gradient(circle at 92% 92%, rgba(91, 124, 255, 0.25), transparent 30rem),
    var(--ph-bg-surface);
  padding: clamp(42px, 6vw, 86px);
  overflow: hidden;
  box-shadow: var(--ph-shadow-card);
}

.ph-store-hero-card::before {
  position: absolute;
  top: -0.17em;
  right: -0.02em;
  color: rgba(255, 255, 255, 0.032);
  font-family: var(--ph-font-mono);
  font-size: clamp(220px, 32vw, 520px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.12em;
  content: "PH";
  pointer-events: none;
}

[data-theme="light"] .ph-store-hero-card::before {
  color: rgba(0, 0, 0, 0.035);
}

.ph-store-hero-left {
  position: relative;
  z-index: 1;
  flex: 0 1 860px;
}

.ph-store-tag,
.ph-section-eyebrow,
.tp-eyebrow,
.tp-step-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--atelier-lime);
  font-size: 11px;
  letter-spacing: 0.17em;
}

.ph-store-tag::before,
.ph-section-eyebrow::before,
.tp-eyebrow::before,
.tp-step-label::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 14%, transparent);
  content: "";
}

.ph-store-title {
  max-width: 960px;
  margin-bottom: 25px;
  font-family: var(--ph-font-mono);
  font-size: clamp(48px, 5.5vw, 80px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.065em;
  word-break: keep-all;
  overflow-wrap: normal;
}

.ph-gradient-text {
  color: var(--ph-text-primary);
  background: none;
  -webkit-text-fill-color: currentColor;
}

.ph-store-desc {
  max-width: 620px;
  margin-bottom: 30px;
  font-size: 16px;
  line-height: 1.75;
}

.ph-store-badges {
  gap: 8px;
}

.ph-store-pill {
  border-color: var(--ph-border-medium);
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 12px;
  font-size: 11px;
}

.ph-store-hero-right {
  position: relative;
  z-index: 2;
  align-self: flex-end;
}

.ph-btn-showroom-cta {
  min-height: 64px;
  border: 0;
  border-radius: 999px;
  background: var(--atelier-lime);
  color: var(--atelier-ink);
  padding-inline: 26px;
  font-family: var(--ph-font-mono);
  font-weight: 700;
  box-shadow: 0 18px 50px color-mix(in srgb, var(--atelier-lime) 18%, transparent);
}

.ph-btn-showroom-cta:hover {
  border-color: transparent;
  color: var(--atelier-ink);
  transform: translateY(-4px) rotate(-1deg);
}

/* Catalog */
.ph-catalog-section {
  padding-block: 70px 110px;
}

.ph-catalog-header-clean {
  margin-bottom: 26px;
}

.ph-catalog-title-row {
  align-items: end;
  margin-bottom: 30px;
}

.ph-catalog-main-title,
.ph-section-title {
  font-family: var(--ph-font-mono);
  font-size: clamp(34px, 4.5vw, 62px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.055em;
  word-break: keep-all;
}

.ph-catalog-sub-text,
.ph-section-subtitle,
.ph-section-desc {
  max-width: 720px;
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.7;
}

.ph-showroom-anchor-tag,
.ph-section-pill {
  border: 1px solid var(--ph-border-medium);
  border-radius: 999px;
  background: transparent;
  color: var(--ph-text-primary);
  padding: 10px 16px;
}

.ph-category-tabs {
  gap: 4px;
  border-bottom: 1px solid var(--ph-border-subtle);
  padding-bottom: 14px;
}

.ph-category-tab {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  padding-inline: 17px;
  font-size: 13px;
}

.ph-category-tab.active {
  background: var(--ph-text-primary);
  color: var(--ph-bg-base);
  box-shadow: none;
}

.ph-catalog-controls {
  display: block;
  margin: 0 0 22px;
  border-color: var(--ph-border-medium);
  border-radius: 18px;
  background: var(--ph-bg-surface);
  padding: 10px;
}

.ph-controls-top-row {
  gap: 8px;
}

.ph-search-bar,
.ph-sort-select,
.ph-material-select {
  min-height: 52px;
  border-color: transparent;
  border-radius: 12px;
  background: var(--ph-bg-surface-elevated);
}

.ph-search-bar {
  flex: 1 1 460px;
}

.ph-search-input {
  font-size: 15px;
}

.ph-catalog-meta-row {
  margin-bottom: 22px;
  padding-inline: 2px;
  font-family: var(--ph-font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

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

.ph-card {
  border-color: var(--ph-border-subtle);
  border-radius: 24px;
  background: var(--ph-bg-surface);
  box-shadow: none;
  transform: translateZ(0);
}

.ph-card:hover {
  border-color: var(--ph-border-medium);
  box-shadow: var(--ph-shadow-hover);
  transform: translateY(-8px);
}

.ph-card-thumb-wrap {
  aspect-ratio: 4 / 3;
  padding-top: 0;
  background: var(--ph-bg-surface-elevated);
}

.ph-card-thumb {
  position: absolute;
  inset: 0;
  filter: saturate(0.86) contrast(1.02);
}

.ph-card:hover .ph-card-thumb {
  filter: saturate(1) contrast(1.04);
  transform: scale(1.035);
}

.ph-card-badges {
  top: 14px;
  left: 14px;
}

.ph-badge {
  border-radius: 999px;
  padding: 5px 9px;
  font-family: var(--ph-font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.ph-card-body {
  padding: 20px;
}

.ph-card-category {
  margin-bottom: 9px;
  color: var(--ph-brand-cyan);
  font-family: var(--ph-font-mono);
  font-size: 10px;
  letter-spacing: 0.11em;
}

.ph-card-title {
  min-height: 2.7em;
  margin-bottom: 15px;
  font-size: 17px;
  letter-spacing: -0.025em;
}

.ph-spec-chip {
  border: 0;
  background: var(--ph-bg-surface-elevated);
  padding: 5px 7px;
  font-size: 9px;
}

.ph-card-price-row {
  margin-bottom: 14px;
  padding-top: 14px;
}

.ph-price-label {
  font-size: 10px;
}

.ph-price-value {
  font-family: var(--ph-font-mono);
  font-size: 22px;
  letter-spacing: -0.04em;
}

.ph-btn-naver-pay {
  min-height: 48px;
  border-radius: 12px;
  box-shadow: none;
}

.ph-card-dual-actions {
  gap: 7px;
}

.ph-btn-toss-card,
.ph-btn-quickview {
  min-height: 43px;
  border-radius: 11px;
}

/* Product detail and checkout */
.ph-modal-backdrop {
  background: rgba(2, 4, 7, 0.8);
  backdrop-filter: blur(18px);
}

.ph-modal-dialog,
.ph-checkout-dialog {
  border-color: var(--ph-border-medium);
  border-radius: 30px;
  background: var(--ph-bg-surface);
}

.ph-modal-grid {
  gap: 38px;
  padding: 36px;
}

.ph-modal-media-wrap {
  border: 0;
  border-radius: 22px;
}

.ph-modal-title {
  font-family: var(--ph-font-mono);
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.ph-modal-desc {
  line-height: 1.75;
}

.ph-modal-specs-table,
.ph-calc-breakdown,
.ph-form-section,
.ph-checkout-prod-card {
  border-color: var(--ph-border-subtle);
  border-radius: 16px;
  background: var(--ph-bg-surface-elevated);
}

.ph-modal-close-btn {
  width: 44px;
  height: 44px;
  border-color: var(--ph-border-medium);
  background: var(--ph-bg-surface-elevated);
}

/* Showroom and quality tabs */
.ph-section,
.ph-studio-section,
.ph-matrix-section,
.ph-quality-section,
.ph-faq-section {
  padding-block: clamp(55px, 7vw, 100px);
}

.ph-section-header {
  margin-bottom: 42px;
}

.three-material-studio,
.mat-matrix-container {
  border-color: var(--ph-border-medium);
  border-radius: 28px;
  background: var(--ph-bg-surface);
  box-shadow: var(--ph-shadow-card);
  overflow: hidden;
}

.three-studio-header,
.mat-matrix-header {
  border-bottom: 1px solid var(--ph-border-subtle);
  background: transparent;
  padding: 28px 32px;
}

.three-studio-title,
.mat-matrix-title-wrap h3 {
  font-family: var(--ph-font-mono);
  letter-spacing: -0.04em;
}

.three-studio-layout {
  gap: 0;
}

.three-viewport-area {
  background:
    radial-gradient(circle at 50% 38%, rgba(98, 230, 255, 0.09), transparent 36%),
    #07090c;
}

.three-controls-sidebar {
  border-left: 1px solid var(--ph-border-subtle);
  background: var(--ph-bg-surface);
}

.three-material-cards,
.mat-cards-grid,
.ph-quality-grid {
  gap: 14px;
}

.three-mat-card,
.mat-summary-card,
.ph-quality-card,
.ph-faq-item {
  border-color: var(--ph-border-subtle);
  border-radius: 18px;
  background: var(--ph-bg-surface);
}

.ph-quality-card {
  min-height: 280px;
  padding: 28px;
}

.ph-quality-step {
  color: var(--atelier-lime);
  font-family: var(--ph-font-mono);
  font-size: 11px;
}

.ph-quality-icon-wrap {
  border-radius: 50%;
}

.ph-quality-card-title {
  margin-top: 32px;
  font-family: var(--ph-font-mono);
  font-size: 21px;
  letter-spacing: -0.035em;
}

.ph-faq-list {
  gap: 10px;
}

.ph-faq-question-btn {
  min-height: 70px;
  padding-inline: 24px;
  font-size: 15px;
}

.ph-tab-return-bar {
  padding-block: 34px;
}

.ph-btn-return-store {
  border-radius: 999px;
  background: var(--atelier-lime);
  color: var(--atelier-ink);
  box-shadow: none;
}

/* Trade workspace */
.tp-page {
  background:
    radial-gradient(circle at 18% 15%, rgba(98, 230, 255, 0.08), transparent 28rem),
    radial-gradient(circle at 92% 38%, rgba(91, 124, 255, 0.08), transparent 34rem),
    var(--ph-bg-base);
}

.tp-intro {
  min-height: 540px;
  align-items: center;
  grid-template-columns: minmax(0, 1.25fr) minmax(430px, 0.75fr);
  gap: clamp(42px, 7vw, 100px);
  padding-block: clamp(68px, 8vw, 112px);
}

.tp-intro h1 {
  max-width: 850px;
  font-size: clamp(56px, 6.5vw, 94px);
  line-height: 0.98;
  letter-spacing: -0.065em;
  word-break: keep-all;
  overflow-wrap: normal;
}

.tp-intro-copy {
  max-width: 700px;
  font-size: 15px;
  line-height: 1.85;
}

.tp-process {
  grid-template-columns: 1fr;
  gap: 0;
  border-color: var(--ph-border-medium);
  border-radius: 26px;
  background: var(--ph-bg-surface);
  box-shadow: var(--ph-shadow-card);
}

.tp-process li {
  display: grid;
  grid-template-columns: 58px 1fr;
  min-height: 112px;
  align-content: center;
  padding: 22px 26px;
  border-bottom: 1px solid var(--ph-border-subtle);
  background: transparent;
}

.tp-process li:last-child {
  border-bottom: 0;
}

.tp-process span {
  grid-row: span 2;
  margin: 2px 0 0;
  color: var(--atelier-lime);
  font-size: 11px;
}

.tp-process strong {
  font-family: var(--ph-font-mono);
  font-size: 17px;
}

.tp-process small {
  margin-top: 6px;
  font-size: 11px;
}

.tp-workspace {
  grid-template-columns: minmax(0, 1.2fr) minmax(390px, 0.8fr);
  gap: 18px;
  padding-bottom: 110px;
}

.tp-model-column {
  gap: 18px;
}

.tp-card {
  border-color: var(--ph-border-subtle);
  border-radius: 24px;
  background: color-mix(in srgb, var(--ph-bg-surface) 94%, transparent);
  box-shadow: none;
}

.tp-viewer-card,
.tp-prusa-card,
.tp-quote-card {
  padding: 28px;
}

.tp-card-heading h2,
.tp-next h2 {
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.08;
}

.tp-file-types,
.tp-service-status {
  border-color: var(--ph-border-medium);
  background: transparent;
}

.tp-drop-zone {
  min-height: 520px;
  border-color: var(--ph-border-medium);
  border-radius: 18px;
  background:
    linear-gradient(var(--atelier-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--atelier-grid) 1px, transparent 1px),
    #07090c;
  background-size: 42px 42px;
}

.tp-upload-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(98, 230, 255, 0.08);
}

.tp-empty-state strong {
  font-family: var(--ph-font-mono);
  font-size: 22px;
  letter-spacing: -0.03em;
}

.tp-button {
  min-height: 50px;
  border-radius: 999px;
  padding-inline: 24px;
}

.tp-button-primary {
  border: 0;
  background: var(--atelier-lime);
  color: var(--atelier-ink) !important;
  box-shadow: none;
}

.tp-button-secondary {
  border-color: var(--ph-border-medium);
  background: transparent;
}

.tp-analysis-row {
  gap: 12px;
}

.tp-status-card,
.tp-privacy-card {
  min-height: 112px;
  padding: 22px;
}

.tp-quote-card {
  top: 158px;
  border-color: var(--ph-border-medium);
}

.tp-option-card,
.tp-segmented,
.tp-field select,
.tp-quantity,
.tp-switch-row,
.tp-breakdown,
.tp-prusa-result {
  border-color: var(--ph-border-subtle);
  background: var(--ph-bg-base);
}

.tp-option-card {
  min-height: 80px;
}

.tp-option-card.active,
.tp-option-card:hover {
  border-color: var(--atelier-lime);
  background: color-mix(in srgb, var(--atelier-lime) 7%, var(--ph-bg-base));
}

.tp-segmented label.active {
  background: var(--ph-text-primary);
  color: var(--ph-bg-base);
}

.tp-price-row strong {
  color: var(--atelier-lime);
  font-size: 30px;
}

.tp-next {
  border-color: var(--ph-border-medium);
  border-radius: 28px;
  background:
    radial-gradient(circle at 86% 50%, rgba(98, 230, 255, 0.14), transparent 22rem),
    var(--ph-bg-surface);
}

.tp-footer {
  border-top: 1px solid var(--ph-border-subtle);
  background: #07090c;
}

.ph-footer {
  border-top: 1px solid var(--ph-border-subtle);
  background: #07090c;
}

.ph-footer-grid {
  gap: 70px;
  padding-block: 58px 28px;
}

.ph-footer-col-title {
  font-family: var(--ph-font-mono);
  letter-spacing: -0.02em;
}

.ph-mobile-sticky-bar {
  border-top-color: var(--ph-border-medium);
  background: color-mix(in srgb, var(--ph-bg-base) 86%, transparent);
  backdrop-filter: blur(20px);
}

@media (max-width: 1180px) {
  .ph-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tp-intro {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.65fr);
  }
}

@media (max-width: 1050px) {
  .tp-intro {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .tp-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .tp-process {
    grid-template-columns: repeat(3, 1fr);
  }

  .tp-process li {
    display: block;
    min-height: 170px;
    border-right: 1px solid var(--ph-border-subtle);
    border-bottom: 0;
  }

  .tp-process li:last-child {
    border-right: 0;
  }
}

@media (max-width: 900px) {
  .ph-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ph-store-hero-card {
    min-height: 480px;
  }
}

@media (max-width: 768px) {
  body::before {
    background-size: 44px 44px;
  }

  .ph-container {
    padding-inline: 16px;
  }

  .ph-announcement-bar {
    padding-block: 7px;
  }

  .ph-navbar {
    height: 64px;
  }

  .ph-brand-symbol {
    width: 38px;
    height: 38px;
  }

  .ph-store-tab-nav {
    top: 64px;
  }

  .ph-tab-pill-group {
    justify-content: flex-start;
  }

  .ph-store-hero {
    padding-block: 18px 10px;
  }

  .ph-store-hero-card {
    min-height: 520px;
    align-content: space-between;
    padding: 34px 24px 26px;
    border-radius: 26px;
  }

  .ph-store-hero-card::before {
    top: auto;
    right: -0.05em;
    bottom: 0;
    font-size: 250px;
  }

  .ph-store-title {
    margin-bottom: 20px;
    font-size: clamp(42px, 13.5vw, 64px);
    line-height: 0.98;
    letter-spacing: -0.055em;
  }

  .ph-store-desc {
    font-size: 14px;
  }

  .ph-store-pill {
    padding: 6px 9px;
  }

  .ph-store-hero-right {
    width: 100%;
  }

  .ph-btn-showroom-cta {
    min-height: 56px;
  }

  .ph-catalog-section {
    padding-block: 54px 80px;
  }

  .ph-catalog-title-row {
    gap: 20px;
  }

  .ph-catalog-main-title,
  .ph-section-title {
    font-size: clamp(34px, 10vw, 48px);
  }

  .ph-catalog-controls {
    padding: 8px;
  }

  .ph-products-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .ph-card {
    border-radius: 22px;
  }

  .ph-card-title {
    min-height: 0;
    font-size: 20px;
  }

  .ph-card-body {
    padding: 20px;
  }

  .ph-modal-backdrop {
    z-index: 1200;
  }

  .ph-modal-dialog,
  .ph-checkout-dialog {
    border-radius: 24px 24px 0 0;
  }

  .ph-modal-dialog > .ph-modal-grid,
  .ph-modal-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 18px 16px calc(30px + env(safe-area-inset-bottom));
  }

  .ph-modal-media-wrap {
    height: clamp(190px, 58vw, 260px);
  }

  .ph-section,
  .ph-studio-section,
  .ph-matrix-section,
  .ph-quality-section,
  .ph-faq-section {
    padding-block: 58px;
  }

  .three-material-studio,
  .mat-matrix-container {
    border-radius: 22px;
  }

  .three-studio-header,
  .mat-matrix-header {
    padding: 22px 18px;
  }

  .three-controls-sidebar {
    border-top: 1px solid var(--ph-border-subtle);
    border-left: 0;
  }

  .ph-quality-card {
    min-height: 0;
    padding: 22px;
  }

  .ph-quality-card-title {
    margin-top: 22px;
  }

  .tp-intro {
    gap: 28px;
    padding-block: 45px 34px;
  }

  .tp-intro h1 {
    font-size: clamp(45px, 13vw, 66px);
  }

  .tp-process {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .tp-process li {
    display: grid;
    grid-template-columns: 46px 1fr;
    min-height: 86px;
    border-right: 0;
    border-bottom: 1px solid var(--ph-border-subtle);
    padding: 17px 20px;
  }

  .tp-process li:last-child {
    border-bottom: 0;
  }

  .tp-process span {
    grid-row: span 2;
  }

  .tp-workspace {
    gap: 14px;
  }

  .tp-viewer-card,
  .tp-prusa-card,
  .tp-quote-card {
    padding: 20px;
  }

  .tp-drop-zone,
  .tp-canvas-wrap,
  #model-canvas {
    min-height: clamp(270px, 78vw, 390px);
    height: clamp(270px, 78vw, 390px);
  }

  .tp-option-card {
    min-height: 64px;
  }

  .ph-footer-grid {
    gap: 34px;
    padding-block: 42px 24px;
  }
}

@media (max-width: 390px) {
  .ph-container {
    padding-inline: 12px;
  }

  .ph-store-hero-card {
    min-height: 500px;
    padding-inline: 20px;
  }

  .ph-store-title {
    font-size: 43px;
  }

  .ph-store-badges {
    display: grid;
  }

  .ph-store-pill {
    width: max-content;
    max-width: 100%;
  }

  .tp-intro h1 {
    font-size: 43px;
  }

  .tp-viewer-card,
  .tp-prusa-card,
  .tp-quote-card {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ph-card,
  .ph-card-thumb,
  .ph-btn-showroom-cta {
    transform: none !important;
  }
}

/* Radical shell: one navigation system, editorial canvas, asymmetric catalog. */
.ph-store-tab-nav {
  display: none !important;
}

@media (min-width: 1024px) {
  body:not(.ph-admin-app) {
    padding-left: 252px;
  }

  .ph-navbar-wrap {
    position: fixed;
    inset: 0 auto 0 0;
    width: 252px;
    border-right: 1px solid var(--ph-border-subtle);
    border-bottom: 0;
    background: rgba(6, 8, 11, 0.96);
    backdrop-filter: blur(24px);
  }

  [data-theme="light"] .ph-navbar-wrap {
    background: rgba(247, 249, 244, 0.97);
  }

  .ph-navbar-wrap > .ph-container {
    height: 100%;
    padding: 0 24px;
  }

  .ph-navbar {
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    padding: 28px 0 24px;
  }

  .ph-brand-logo {
    align-items: flex-start;
  }

  .ph-brand-symbol {
    width: 42px;
    height: 42px;
  }

  .ph-brand-name {
    font-size: 15px;
  }

  .ph-brand-sub {
    max-width: 120px;
    font-size: 9px;
  }

  .ph-nav-links {
    align-items: stretch;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    margin: 76px 0 0;
  }

  .ph-nav-links::before {
    margin: 0 13px 12px;
    color: var(--ph-text-tertiary);
    font-family: var(--ph-font-mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.18em;
    content: "EXPLORE / 01";
  }

  .ph-nav-links li,
  .ph-nav-link-btn {
    width: 100%;
  }

  .ph-nav-link-btn {
    display: flex;
    align-items: center;
    min-height: 46px;
    border-radius: 12px;
    padding: 0 13px;
    text-align: left;
  }

  .ph-nav-link-btn::before {
    width: 6px;
    height: 6px;
    margin-right: 11px;
    border: 1px solid currentColor;
    border-radius: 50%;
    content: "";
  }

  .ph-nav-link-btn.active {
    background: var(--atelier-lime);
    color: var(--atelier-ink);
  }

  .ph-nav-link-btn.active::before {
    background: currentColor;
  }

  .ph-nav-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: auto;
  }

  .ph-theme-toggle {
    width: 46px;
    height: 46px;
  }

  .ph-btn-kakao-nav {
    justify-content: center;
    width: 100%;
  }

  .ph-announcement-content {
    justify-content: space-between;
    padding-inline: 24px;
  }

  .ph-store-hero {
    padding: 0;
  }

  .ph-store-hero > .ph-container {
    max-width: none;
    padding: 0;
  }

  .ph-store-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    min-height: min(720px, calc(100vh - 32px));
    border: 0;
    border-bottom: 1px solid var(--ph-border-medium);
    border-radius: 0;
    padding: clamp(70px, 8vw, 126px) clamp(46px, 7vw, 118px);
    background:
      linear-gradient(90deg, transparent 0 71%, rgba(201,255,87,0.035) 71% 100%),
      radial-gradient(circle at 86% 28%, rgba(98,230,255,0.2), transparent 24rem),
      var(--ph-bg-base);
    box-shadow: none;
  }

  .ph-store-hero-card::after {
    position: absolute;
    inset: 42px 42px 42px auto;
    width: 1px;
    background: linear-gradient(transparent, var(--atelier-lime), transparent);
    content: "";
  }

  .ph-store-title {
    max-width: 1020px;
    font-size: clamp(62px, 7vw, 118px);
    line-height: 0.88;
    letter-spacing: -0.078em;
  }

  .ph-store-desc {
    max-width: 560px;
    margin-top: 34px;
  }

  .ph-store-hero-right {
    align-self: end;
  }

  .ph-btn-showroom-cta {
    display: flex;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    padding: 28px;
    text-align: center;
    white-space: normal;
  }

  .ph-catalog-section {
    padding: 100px clamp(30px, 5vw, 82px) 140px;
  }

  .ph-catalog-section > .ph-container {
    max-width: 1600px;
    padding: 0;
  }

  .ph-catalog-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 0.34fr);
    align-items: end;
    gap: 42px;
  }

  .ph-catalog-main-title,
  .ph-section-title {
    font-size: clamp(48px, 5.5vw, 88px);
  }

  .ph-catalog-controls {
    position: sticky;
    top: 16px;
    z-index: 20;
    border-radius: 18px;
    background: color-mix(in srgb, var(--ph-bg-surface) 86%, transparent);
    backdrop-filter: blur(20px);
  }

  .tp-intro {
    min-height: 690px;
    padding-inline: clamp(42px, 7vw, 112px);
  }

  .tp-workspace {
    padding-inline: clamp(30px, 5vw, 76px);
  }

  .ph-footer {
    border-top: 1px solid var(--ph-border-subtle);
  }
}

@media (min-width: 1280px) {
  .ph-products-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-flow: dense;
    gap: 12px;
  }

  .ph-products-grid > .ph-card {
    grid-column: span 3;
  }

  .ph-products-grid > .ph-card:first-child {
    grid-column: span 6;
    grid-row: span 2;
  }

  .ph-products-grid > .ph-card:first-child .ph-card-thumb-wrap {
    padding-top: 88%;
  }

  .ph-products-grid > .ph-card:first-child .ph-card-title {
    font-size: 28px;
  }

  .ph-products-grid > .ph-card:nth-child(6) {
    grid-column: span 6;
  }

  .ph-products-grid > .ph-card:nth-child(6) .ph-card-thumb-wrap {
    padding-top: 42%;
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .ph-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  body:not(.ph-admin-app) {
    padding-left: 0;
  }

  .ph-navbar-wrap {
    position: sticky;
  }
}

/* Checkout must become linear before either column gets cramped. */
@media (max-width: 1100px) {
  body .ph-modal-backdrop:has(.ph-checkout-dialog) {
    align-items: center;
    padding: 12px;
  }

  body .ph-checkout-dialog {
    width: min(100%, 760px);
    max-width: 100%;
    max-height: calc(100svh - 24px);
    overflow-x: hidden;
    overflow-y: auto;
  }

  body .ph-checkout-content {
    width: 100%;
    min-width: 0;
    padding: 24px;
  }

  body .ph-checkout-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
    min-width: 0;
    gap: 18px;
  }

  body .ph-checkout-col-summary,
  body .ph-checkout-col-form,
  body .ph-form-section,
  body .ph-payment-section {
    width: 100%;
    min-width: 0;
  }

  body .ph-payment-method-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body .ph-form-section :where(input, textarea, select, button),
  body .ph-payment-method-selector > * {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  body .ph-modal-backdrop:has(.ph-checkout-dialog) {
    align-items: flex-end;
    padding: 0;
  }

  body .ph-checkout-dialog {
    width: 100%;
    max-height: 96svh;
    border-radius: 22px 22px 0 0;
  }

  body .ph-checkout-content {
    padding: 20px 14px calc(28px + env(safe-area-inset-bottom));
  }

  body .ph-checkout-main-title {
    padding-right: 48px;
    font-size: clamp(24px, 7vw, 30px);
    line-height: 1.15;
    word-break: keep-all;
  }

  body .ph-checkout-desc {
    line-height: 1.6;
  }

  body .ph-checkout-prod-card {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
  }

  body .ph-checkout-thumb-wrap {
    width: 74px;
    height: 74px;
  }

  body .ph-checkout-prod-meta,
  body .ph-checkout-title {
    width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body .ph-payment-method-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
