:root {
  --brand-yellow: #f1dd38;
  --brand-black: #000000;
  --brand-white: #ffffff;
  --ip-nero: #0e0e10;
  --ip-giallo: #f1dd38;
  --ip-arancio: #df5e16;
  --ip-rosso: #c1121c;
  --ip-blu: #005387;
  --ip-verde: #0f4336;
  --panel: #242423;
  --panel-2: #2c2c2b;
  --line: #3a3a38;
  --muted: #bfbfb9;
  --success-bg: #2a3a24;
  --success-line: #6e8f62;
  --error-bg: #402525;
  --error-line: #9f5b5b;
  --config-panel-width: 460px;
  --scrollbar-track: #1b1b19;
  --scrollbar-thumb: #4b4b33;
  --scrollbar-thumb-hover: #6a693b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Sora', 'Trebuchet MS', sans-serif;
  color: var(--brand-white);
  background: var(--brand-black);
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 999px;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #5a5933 0%, var(--scrollbar-thumb) 100%);
  border: 1px solid var(--scrollbar-track);
  border-radius: 999px;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #7a783f 0%, var(--scrollbar-thumb-hover) 100%);
}

html::-webkit-scrollbar-button,
body::-webkit-scrollbar-button,
*::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

body.loading {
  cursor: progress;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.layout-root {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

.startup-loader {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(227, 226, 21, 0.16), transparent 34%),
    linear-gradient(160deg, #121211 0%, #1d1d1c 48%, #0f1218 100%);
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.startup-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.submission-loader {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 9, 8, 0.82);
  backdrop-filter: blur(14px);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.submission-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.submission-loader__panel {
  width: min(100%, 340px);
  display: grid;
  justify-items: center;
  gap: 9px;
  border: 1px solid rgba(241, 221, 56, 0.35);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(44, 44, 39, 0.98), rgba(18, 18, 17, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48), inset 0 1px rgba(255, 255, 255, 0.08);
  padding: 25px 24px 22px;
  text-align: center;
}

.submission-loader__panel p {
  color: #f1dd38;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.submission-loader__panel strong {
  color: #fffef3;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.submission-loader__panel > span:last-child {
  max-width: 235px;
  color: #c4c4bb;
  font-size: 11px;
  line-height: 1.45;
}

.submission-loader__mark {
  width: 42px;
  height: 42px;
  position: relative;
  display: inline-grid;
  place-items: center;
  margin-bottom: 4px;
}

.submission-loader__mark::before,
.submission-loader__mark::after,
.submission-loader__mark i {
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-top-color: #f1dd38;
  border-radius: 50%;
  content: '';
  animation: submissionSpin 1.1s linear infinite;
}

.submission-loader__mark::after { inset: 6px; border-top-color: rgba(255, 255, 255, 0.85); animation-direction: reverse; animation-duration: 0.8s; }
.submission-loader__mark i:nth-child(1) { inset: 12px; border-top-color: #f1dd38; animation-duration: 0.65s; }
.submission-loader__mark i:nth-child(2),
.submission-loader__mark i:nth-child(3) { display: none; }

@keyframes submissionSpin {
  to { transform: rotate(360deg); }
}

.startup-loader__panel {
  width: min(100%, 520px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  background: rgba(20, 20, 19, 0.88);
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.38);
  padding: 28px;
  backdrop-filter: blur(18px);
}

.startup-loader__panel img {
  width: 144px;
  height: auto;
  margin-bottom: 18px;
}

.startup-loader__eyebrow {
  color: var(--brand-yellow);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  margin-bottom: 12px;
}

.startup-loader__panel h1,
.startup-loader__heading {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 1.08;
  margin-bottom: 12px;
}

.startup-loader__status {
  font-size: 14px;
  color: #f5f5ef;
  margin-bottom: 6px;
}

.startup-loader__subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

.startup-loader__bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.startup-loader__bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e3e215 0%, #fff37a 100%);
  transition: width 0.24s ease;
}

.startup-loader__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}

.topbar {
  position: relative;
  z-index: 45;
  height: 64px;
  border-bottom: 1px solid #2a2a28;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  background: #1a1a19;
  animation: fadeIn 0.35s ease;
}

.change-court-btn {
  border: 1px solid rgba(241, 221, 56, 0.28);
  border-radius: 999px;
  background: rgba(241, 221, 56, 0.08);
  color: #f5f0b8;
  padding: 9px 14px;
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.change-court-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(241, 221, 56, 0.5);
  background: rgba(241, 221, 56, 0.14);
}

.top-preset-bar {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 40;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  background: rgba(21, 21, 20, 0.96);
  border-bottom: 1px solid #2f2f2a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
  transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.25s ease;
}

.top-preset-bar.open {
  max-height: 390px;
  opacity: 1;
  transform: translateY(0);
}

.top-preset-bar__inner {
  padding: 16px 22px 18px;
}

.top-preset-bar__intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.top-preset-bar__eyebrow {
  margin-bottom: 8px;
  color: var(--brand-yellow);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.top-preset-bar__intro h2 {
  font-size: 20px;
  line-height: 1.08;
  margin-bottom: 6px;
}

.top-preset-bar__intro p {
  max-width: 760px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.top-preset-bar__close {
  border: 1px solid #3f3f38;
  border-radius: 8px;
  background: #242421;
  color: #e8e8de;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.top-preset-bar__content {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  align-items: start;
}

.top-preset-bar .flow-step {
  margin-bottom: 0;
}

.top-preset-bar .flow-title {
  margin-bottom: 6px;
  font-size: 14px;
}

.top-preset-bar .flow-copy {
  margin-bottom: 10px;
  font-size: 11px;
}

.preset-workbench-host .top-preset-bar {
  position: static;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: none;
  border: 1px solid #373731;
  border-radius: 14px;
  background: rgba(26, 26, 25, 0.92);
  box-shadow: none;
}

.preset-workbench-host .top-preset-bar.open {
  max-height: 1800px;
  opacity: 1;
  margin-bottom: 14px;
}

.preset-workbench-host .top-preset-bar__inner {
  padding: 14px;
}

.preset-workbench-host .top-preset-bar__content {
  grid-template-columns: 1fr;
}

.preset-workbench-host .top-preset-bar__intro h2 {
  font-size: 18px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-brand img { width: 120px; max-height: 46px; height: auto; object-fit: contain; }
.topbar-brand strong { font-size: 14px; font-family: 'Sora', sans-serif; }
.topbar-brand small { display: block; color: var(--muted); font-size: 11px; }

.topbar-title { text-align: center; font-size: 14px; letter-spacing: 0.02em; color: #d6d6d0; font-weight: 600; }

.topbar-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-chip {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(227, 226, 21, 0.08);
  color: #ecebb4;
  border-color: rgba(227, 226, 21, 0.24);
}

.chip {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
}

.request-quote-top {
  background: var(--brand-yellow);
  color: var(--brand-black);
  text-decoration: none;
  border-radius: 999px;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
  padding: 10px 16px;
  font-size: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.request-quote-top:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(227, 226, 21, 0.2); }

.lang-select {
  border: 1px solid #3a3a36;
  background: #232321;
  color: #d2d2cb;
  border-radius: 999px;
  font-size: 11px;
  padding: 7px 10px;
}

.workspace {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
  overflow: hidden;
}

.stage {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #b9c3cc;
  transition: margin-right 0.3s ease;
}

body.court-selected .stage {
  margin-right: 0;
}

body:not(.court-selected) .stage {
  margin-right: 0;
}

/* The right panel is fixed above the workspace. Reserve its exact footprint
   in the workspace, so the stage has one stable, real viewport for the
   renderer rather than a calculated width plus an external margin. */
@media (min-width: 1081px) {
  body.court-selected:not(.stage-fullscreen) .workspace {
    padding-right: var(--config-panel-width);
  }
}

#court-canvas { width: 100%; height: 100%; display: block; }

.stage-loader {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: grid;
  place-items: center;
  background: rgba(18, 19, 21, 0.24);
  backdrop-filter: blur(10px);
}

.stage-loader__card {
  min-width: 240px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(20, 20, 19, 0.84);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.stage-loader__card strong {
  font-size: 14px;
}

.stage-loader__card span {
  color: var(--brand-yellow);
  font-size: 12px;
  font-weight: 700;
}

.mobile-config-toggle {
  display: none;
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 8;
  border: 1px solid rgba(241, 221, 56, 0.38);
  border-radius: 999px;
  background: rgba(24, 24, 23, 0.9);
  backdrop-filter: blur(10px);
  color: #fffef5;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.mobile-court-info-btn {
  display: none;
}

.stage-info-card__head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stage-info-card__close {
  display: none;
}

.stage-instructions--touch {
  display: none;
}

@media (hover: none) and (pointer: coarse) {
  .stage-instructions--desktop {
    display: none;
  }
  .stage-instructions--touch {
    display: inline;
  }
}

.stage-overlay {
  position: absolute;
  z-index: 5;
  animation: rise 0.35s ease both;
}

.stage-left { right: 98px; bottom: 16px; display: flex; gap: 6px; background: rgba(29,29,28,.85); border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
.stage-info-panel {
  top: 16px;
  left: 16px;
  width: min(292px, calc(100% - 32px));
  display: grid;
  gap: 10px;
}

body:not(.court-selected) .stage-info-panel,
body:not(.court-selected) .stage-left,
body:not(.court-selected) .stage-right,
body:not(.court-selected) .stage-bottom-left,
body:not(.court-selected) .stage-bottom-right,
body:not(.court-selected) .mobile-config-toggle,
body:not(.court-selected) .mobile-court-info-btn {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}
.stage-right {
  right: 16px;
  bottom: 16px;
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 6px;
  background: rgba(29,29,28,.85);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
}

.stage-bottom-left { left: 16px; bottom: 16px; background: rgba(29,29,28,.75); padding: 6px 10px; border: 1px solid #333330; border-radius: 16px; font-size: 11px; color: #c6c6bf; }
.stage-bottom-right { right: 16px; bottom: 68px; display: grid; }

/* Desktop builder: the configuration panel is fixed, so dock every 3D
   overlay to the viewport immediately to its left. This keeps controls in
   the visible 3D area regardless of how the stage grid is sized. */
@media (min-width: 1081px) {
  body.court-selected:not(.stage-fullscreen) .stage-left,
  body.court-selected:not(.stage-fullscreen) .stage-right,
  body.court-selected:not(.stage-fullscreen) .stage-bottom-right {
    position: fixed;
  }

  body.court-selected:not(.stage-fullscreen) .stage-right {
    right: calc(var(--config-panel-width) + 16px);
    bottom: 16px;
  }

  body.court-selected:not(.stage-fullscreen) .stage-left {
    right: calc(var(--config-panel-width) + 15px);
    bottom: 16px;
  }

  body.court-selected:not(.stage-fullscreen) .stage-bottom-right {
    right: calc(var(--config-panel-width) + 16px);
    bottom: 68px;
  }
}

.view-btn {
  border: 1px solid var(--line);
  background: #262625;
  color: var(--muted);
  border-radius: 7px;
  padding: 7px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.view-btn.active {
  border-color: var(--brand-yellow);
  color: var(--brand-yellow);
}

.scene-btn {
  border: 1px solid var(--line);
  background: #262625;
  color: var(--muted);
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 11px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.scene-btn.active {
  border-color: var(--brand-yellow);
  color: var(--brand-yellow);
}

.scene-btn--icon,
.icon-btn {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
}

.scene-btn[hidden] {
  display: none !important;
}

.scene-btn--icon svg,
.icon-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.icon-btn {
  flex: 0 0 auto;
}

.stage-info-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(231, 215, 113, 0.34);
  border-radius: 15px;
  background:
    linear-gradient(135deg, rgba(42, 42, 36, 0.96), rgba(15, 15, 14, 0.92) 62%),
    rgba(18, 18, 17, 0.92);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.32), inset 0 1px rgba(255, 255, 255, 0.08);
  padding: 14px;
  backdrop-filter: blur(20px) saturate(1.15);
}

.stage-info-card::before {
  position: absolute;
  top: 0;
  left: 14px;
  width: 54px;
  height: 2px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, #f4dd59, #fff4ab);
  box-shadow: 0 0 14px rgba(244, 221, 89, 0.72);
  content: '';
}

.stage-info-card::after {
  position: absolute;
  top: -48px;
  right: -42px;
  width: 128px;
  height: 128px;
  border: 1px solid rgba(244, 221, 89, 0.13);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(244, 221, 89, 0.025), 0 0 0 38px rgba(244, 221, 89, 0.018);
  content: '';
  pointer-events: none;
}

.stage-info-card__identity,
.stage-info-timing {
  position: relative;
  z-index: 1;
}

.stage-info-card__eyebrow {
  display: block;
  margin-bottom: 6px;
  color: #f2df79;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.17em;
}

.stage-info-card h2 {
  max-width: 235px;
  color: #fffef5;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin: 0 0 6px;
}

.stage-info-card__copy {
  max-width: 245px;
  color: #c6c6bc;
  font-size: 11px;
  line-height: 1.42;
  margin: 0;
}

.stage-info-specs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-top: 10px;
}

.stage-info-specs > div {
  min-width: 0;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.stage-info-specs small {
  display: block;
  overflow: hidden;
  color: #929288;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.stage-info-specs strong {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #f9f8ed;
  font-family: 'Sora', sans-serif;
  font-size: 9px;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-info-timing {
  margin-top: 11px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.stage-info-timing .stage-info-card__eyebrow {
  display: block;
  margin-bottom: 6px;
}

.stage-info-timing .production-disclaimer {
  margin: 5px 0 0;
  color: #98988e;
}

.stage-info-timing .production-main {
  margin-bottom: 5px;
}

.stage-info-timing .production-main strong {
  color: #fffef5;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.stage-info-timing .production-badge {
  border-color: rgba(244, 221, 89, 0.55);
  background: rgba(244, 221, 89, 0.1);
  color: #f8e779;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.stage-info-timing .muted {
  color: #c6c6bb;
  font-size: 10px;
  line-height: 1.4;
  margin: 0;
}

.stage-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.info-pill {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.info-pill span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.info-pill strong {
  font-size: 12px;
  line-height: 1.35;
}

.config-panel {
  position: fixed;
  top: 64px;
  right: 0;
  bottom: 0;
  width: var(--config-panel-width);
  border-left: 1px solid #2e2e2a;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top right, rgba(241, 221, 56, 0.08), transparent 28%),
    linear-gradient(180deg, #1d1d1c, #171716);
  min-height: 0;
  box-shadow: -14px 0 40px rgba(0, 0, 0, 0.18);
  z-index: 20;
  transition: transform 0.3s ease, opacity 0.25s ease;
}

.court-welcome {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(241, 221, 56, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(10, 10, 10, 0.42), rgba(10, 10, 10, 0.72));
  backdrop-filter: blur(8px);
  animation: fadeIn 0.4s ease;
}

body.court-selected .court-welcome {
  display: none;
}

body.court-selected #custom-workbench > .flow-step {
  display: none;
}

.court-welcome__panel {
  width: min(100%, 560px);
  border: 1px solid rgba(241, 221, 56, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(42, 42, 39, 0.96), rgba(17, 17, 16, 0.98) 62%),
    #161615;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.4), inset 0 1px rgba(255, 255, 255, 0.07);
  padding: 20px;
}

.court-welcome__eyebrow {
  margin-bottom: 7px;
  color: var(--brand-yellow);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.court-welcome__title {
  font-size: 25px;
  line-height: 1.08;
  margin-bottom: 6px;
}

.court-welcome__copy {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 16px;
}

.env-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.env-choice-btn {
  position: relative;
  min-height: 96px;
  border: 1px solid #3c3c36;
  border-radius: 12px;
  background: linear-gradient(135deg, #2b2b28 0%, #1e1e1c 100%);
  color: var(--brand-white);
  padding: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.env-choice-btn:hover {
  border-color: #666648;
  background: linear-gradient(135deg, #30302b 0%, #20201e 100%);
}

.env-choice-btn.active,
.env-choice-btn:focus-visible {
  border-color: var(--brand-yellow);
  box-shadow: 0 0 0 1px rgba(241, 221, 56, 0.14) inset, 0 10px 22px rgba(0, 0, 0, 0.16);
}

.env-choice-btn__label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.env-choice-btn__hint {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.court-picker {
  animation: rise 0.28s ease;
}

.court-picker__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.court-picker__back {
  border: 1px solid #3f3f38;
  border-radius: 999px;
  background: #242421;
  color: #e8e8de;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.court-picker__eyebrow {
  margin-bottom: 6px;
  color: var(--brand-yellow);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.court-picker__title {
  font-size: 20px;
  line-height: 1.1;
}

.welcome-model-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: min(50vh, 360px);
  overflow: auto;
  padding-right: 4px;
}

.welcome-model-grid .model-card {
  min-height: 112px;
  border-radius: 12px;
  padding: 13px;
}

.welcome-model-grid .model-card__family {
  margin-bottom: 6px;
  font-size: 9px;
}

.welcome-model-grid .model-card__title {
  font-size: 15px;
  margin-bottom: 4px;
}

.welcome-model-grid .model-card__copy {
  min-height: 0;
  font-size: 10px;
  line-height: 1.35;
}

.welcome-model-grid .model-card__meta {
  gap: 5px;
  margin-top: 8px;
}

.welcome-model-grid .model-card__meta span {
  padding: 3px 6px;
  font-size: 9px;
}

.panel-mobile-head {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.panel-mobile-head button {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 12px;
}

.panel-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-bottom: 1px solid var(--line);
}

.tab-btn {
  border: 1px solid #31312d;
  border-radius: 999px;
  background: #242421;
  color: var(--muted);
  padding: 9px 12px;
  font-size: 11px;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.28s ease, background-color 0.28s ease, color 0.28s ease, transform 0.28s ease, box-shadow 0.28s ease, opacity 0.28s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex: 0 0 auto;
  position: relative;
  transform-origin: center;
}

/* The Branding step is conditionally revealed by the configurator script. */
.panel-tabs .tab-btn[hidden] { display: none !important; }

.tab-btn:hover { transform: translateY(-1px); }
.tab-btn.active {
  color: var(--brand-yellow);
  background: #2b2b22;
  border-color: #5a5a2d;
  box-shadow: 0 0 0 1px rgba(241, 221, 56, 0.18) inset, 0 8px 18px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px) scale(1.02);
}
.tab-btn.is-complete {
  color: #ecebb4;
  border-color: #4a4a35;
  background: linear-gradient(180deg, #292923 0%, #24241f 100%);
}
.tab-btn.is-disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.tab-btn__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 10px;
  font-weight: 700;
}

.tab-btn.active .tab-btn__index { background: rgba(241, 221, 56, 0.18); }

.panel-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 5px 22px 0;
  display: flex;
  flex-direction: column;
}
.panel-body::-webkit-scrollbar {
  width: 6px;
}
.panel-body::-webkit-scrollbar-track {
  background: rgba(27, 27, 25, 0.6);
  border-radius: 999px;
}
.panel-body::-webkit-scrollbar-thumb {
  background: rgba(241, 221, 56, 0.35);
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.2);
}
.panel-body::-webkit-scrollbar-thumb:hover {
  background: var(--brand-yellow);
}

.wizard-shell {
  display: grid;
  gap: 14px;
  animation: rise 0.26s ease;
}

.wizard-hero {
  padding: 18px;
  border: 1px solid #373731;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(241, 221, 56, 0.12), transparent 34%),
    linear-gradient(180deg, #272725 0%, #1c1c1a 100%);
}

.wizard-hero__eyebrow {
  margin-bottom: 8px;
  color: var(--brand-yellow);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.wizard-hero__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.wizard-step-count,
.wizard-step-lock {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.wizard-step-count { color: #f7f4c3; }
.wizard-step-lock { color: var(--muted); text-align: right; }

.wizard-hero h2 {
  font-size: 24px;
  line-height: 1.08;
  margin-bottom: 8px;
}

.wizard-hero__copy {
  color: #d0d0c8;
  font-size: 13px;
  line-height: 1.5;
}

.panel-headline--wizard { margin-bottom: 0; }

.wizard-progress {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.wizard-progress {
  scrollbar-width: thin;
}

.wizard-progress::-webkit-scrollbar { height: 2px; }

.wizard-progress::-webkit-scrollbar-thumb {
  background: rgba(90, 89, 51, 0.8);
  border: none;
  border-radius: 999px;
}

.wizard-progress::-webkit-scrollbar-track {
  background: transparent;
}

.experience-intro {
  display: none;
}

.build-shell {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #34342f;
  border-radius: 16px;
  background: linear-gradient(180deg, #242422 0%, #1b1b19 100%);
  display: none;
}

.build-choice-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.build-choice-btn {
  border: 1px solid #3b3b35;
  border-radius: 12px;
  background: #242421;
  color: #d4d4cd;
  padding: 11px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.build-choice-btn:hover {
  transform: translateY(-1px);
  border-color: #56564a;
}

.build-choice-btn.active {
  border-color: var(--brand-yellow);
  background: linear-gradient(180deg, #302f22 0%, #26261f 100%);
  color: #fff9b3;
  box-shadow: 0 0 0 1px rgba(227, 226, 21, 0.12) inset;
}

.build-choice-copy {
  margin-top: 10px;
}

.build-choice-title {
  color: #f2f2ec;
  font-size: 13px;
  line-height: 1.35;
}

.build-choice-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.panel-headline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.panel-headline a {
  color: var(--brand-yellow);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

.muted { color: var(--muted); font-size: 12px; }

.section-card { border: 1px solid #30302c; border-radius: 12px; padding: 10px 12px; background: #222220; margin-bottom: 8px; animation: rise 0.28s ease both; }

.section-card--intro {
  padding: 8px 12px 9px;
  margin-bottom: 8px;
}
.section-card--intro .step-form-meta {
  margin-bottom: 3px;
}
.section-card--intro .selected-model-tab-name {
  margin: 0 0 3px;
  font-size: 13.5px;
}
.section-card--intro .section-title {
  font-size: 12.5px;
  margin-bottom: 2px;
}
.section-card--intro .option-copy {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
}

/* Selection updates rebuild cards for state accuracy, but must not replay the tab-entry motion. */
#configurator-controls.no-entry-animation .section-card {
  animation: none;
}

.section-card.disabled {
  opacity: 0.72;
}

.section-title {
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: #efefea;
  margin-bottom: 8px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.info-dot {
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 20px;
  height: 20px;
  background: #2d2d2c;
  color: var(--brand-yellow);
  font-size: 11px;
  font-weight: 700;
  cursor: help;
}

.info-tooltip {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.info-tooltip__popover {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  right: 0;
  width: min(280px, calc(100vw - 48px));
  padding: 10px 11px;
  border: 1px solid #484840;
  border-radius: 10px;
  background: #111110;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42);
  color: #f1f1ea;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease;
}

.info-tooltip:hover .info-tooltip__popover,
.info-tooltip:focus-within .info-tooltip__popover {
  opacity: 1;
  transform: translateY(0);
}

.option-copy {
  margin-bottom: 8px;
  line-height: 1.4;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mode-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 8px;
  background: #2a2a28;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.mode-btn.active {
  border-color: var(--brand-yellow);
  color: var(--brand-yellow);
  background: #26261f;
}

.mode-description { margin-top: 10px; line-height: 1.35; font-size: 12px; }

.mode-disclaimer { margin-top: 8px; line-height: 1.35; font-size: 11px; }

.flow-step { margin-bottom: 22px; }
.flow-step--tight { margin-bottom: 18px; }
.flow-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; color: #f6f6f2; }
.flow-copy { color: var(--muted); font-size: 12px; line-height: 1.45; margin-bottom: 12px; }

.custom-workbench {
  animation: rise 0.26s ease;
}

.wizard-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 2px;
}

.wizard-nav__btn {
  min-height: 44px;
}

.wizard-nav__btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.quickstart-card {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid #34342f;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(46, 46, 35, 0.96), rgba(31, 31, 29, 0.98)),
    radial-gradient(circle at top right, rgba(241, 221, 56, 0.12), transparent 38%);
}

.quickstart-card__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.quickstart-card__eyebrow {
  color: var(--brand-yellow);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.quickstart-card__head strong {
  font-size: 18px;
  color: #f8f8f4;
}

.quickstart-steps {
  display: grid;
  gap: 10px;
}

.quickstart-step {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.quickstart-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--brand-yellow);
  color: #111111;
  font-size: 13px;
  font-weight: 700;
}

.quickstart-step h3 {
  margin-bottom: 4px;
  font-size: 14px;
  color: #ffffff;
}

.quickstart-step p {
  color: #c7c7be;
  font-size: 12px;
  line-height: 1.45;
}

.advanced-accordion {
  /*
  border: 1px solid #2f2f2c;
  border-radius: 18px;
  background: #1f1f1d;
  margin-bottom: 14px;
  */
  overflow: visible;
}

.advanced-accordion summary {
  list-style: none;
  cursor: pointer;
  /* padding: 16px; */ 
  color: #ecece7;
  font-size: 14px;
  font-weight: 600;
}

.advanced-accordion summary::-webkit-details-marker { display: none; }
.advanced-inner { padding: 0 12px 12px; }

.advanced-inner .panel-tabs {
    position: sticky;
    top: 0;
    z-index: 8;
    display: flex;
    gap: 6px;
    border: 1px #474747 solid;
    margin: 0 -12px 10px;
    overflow-x: auto;
    padding: 10px 12px 8px;
    /* background: linear-gradient(180deg, rgba(29, 29, 28, 0.98) 0%, rgba(29, 29, 28, 0.94) 76%, rgba(29, 29, 28, 0) 100%); */
    backdrop-filter: blur(12px);
    scrollbar-width: none;
    scroll-behavior: smooth;
    border-radius: 12px;
}

.advanced-inner .panel-tabs::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.advanced-inner .panel-tabs::-webkit-scrollbar-thumb {
  background: rgba(90, 89, 51, 0.8);
  border: none;
  border-radius: 999px;
}

.advanced-inner .panel-tabs::-webkit-scrollbar-track {
  background: transparent;
}

.advanced-inner .tab-btn {
  border: 1px solid #31312d;
  border-right: 1px solid #31312d;
  border-radius: 999px;
  padding: 7px 10px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  flex-direction: row;
  white-space: nowrap;
  align-items: center;
  justify-content: center;
  min-height: 0;
  flex: 0 0 auto;
}

.advanced-inner .tab-btn.active {
  color: var(--brand-yellow);
  background: #2b2b22;
  border-color: #5a5a2d;
}

.advanced-inner .tab-btn__index {
  display: none;
}

#configurator-controls {
  display: flex;
  flex-direction: column;
  transition: opacity 0.28s ease, transform 0.32s ease;
  transform-origin: top center;
  padding-bottom: 16px;
}

#step-nav-dock {
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin-top: auto;
  margin-left: -22px;
  margin-right: -22px;
  padding: 7px 18px 8px;
  border-top: 1px solid #33332d;
  background: #1a1a19;
  box-shadow: 0 -8px 20px -3px rgba(0, 0, 0, 0.6);
}

#configurator-controls.step-panel-enter {
  opacity: 0;
}

#configurator-controls.step-panel-enter.step-panel-enter--forward {
  transform: translateX(12px);
}

#configurator-controls.step-panel-enter.step-panel-enter--backward {
  transform: translateX(-12px);
}

#configurator-controls.step-panel-enter.is-active {
  opacity: 1;
  transform: translateX(0);
}

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

.step-form-meta__eyebrow {
  color: var(--brand-yellow);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.step-form-meta strong {
  color: #ecebb4;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-card--selected-court {
  padding-bottom: 14px;
}

.selected-court-focus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.selected-court-focus__name {
  color: #fffced;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.selected-model-tab-name {
  margin: 1px 0 7px;
  color: #fffced;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.extra-protection-section {
  margin: 4px 0 14px;
}

.extra-protection-section__heading {
  margin: 0 0 7px;
  color: #f2f2e9;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}

.extra-protection-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

.extra-protection-toggle {
  flex: 1;
  width: auto;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px 10px 15px;
  border: 1px solid #45453d;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  color: #c7c7bd;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.extra-protection-toggle:hover {
  border-color: #777561;
}

.extra-protection-toggle.is-active {
  border-color: var(--brand-yellow);
  background: linear-gradient(90deg, rgba(241, 221, 56, 0.18), rgba(241, 221, 56, 0.06));
  color: #fffce7;
  box-shadow: inset 0 0 0 1px rgba(255, 244, 151, 0.1), 0 8px 22px rgba(0, 0, 0, 0.16);
}

.extra-protection-toggle__state {
  font-size: 13px;
  letter-spacing: .01em;
}

.extra-protection-toggle__track {
  width: 44px;
  height: 24px;
  display: flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: #55554e;
  transition: background .18s ease;
}

.extra-protection-toggle__track span {
  width: 18px;
  height: 18px;
  display: block;
  border-radius: 50%;
  background: #deded4;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.34);
  transition: transform .18s ease, background .18s ease;
}

.extra-protection-toggle.is-active .extra-protection-toggle__track {
  background: var(--brand-yellow);
}

.extra-protection-toggle.is-active .extra-protection-toggle__track span {
  transform: translateX(20px);
  background: #171714;
}

.sand-included-control {
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #3c3c37;
  border-radius: 10px;
  background: #242422;
  color: #d7d7ce;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.sand-included-control__check {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid #68685f;
  border-radius: 5px;
  color: transparent;
  font-size: 12px;
}

.sand-included-control.is-active {
  border-color: var(--brand-yellow);
  color: #fffce7;
}

.sand-included-control.is-active .sand-included-control__check {
  border-color: var(--brand-yellow);
  background: var(--brand-yellow);
  color: #171714;
}

.selected-court-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #34342f;
  border-radius: 14px;
  background: #1f1f1d;
}

.selected-court-inline__copy {
  display: grid;
  gap: 3px;
}

.selected-court-inline__copy span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.selected-court-inline__copy strong {
  color: #f2f2ec;
  font-size: 13px;
  line-height: 1.25;
}

.flow-step {
  margin-bottom: 10px;
}

.flow-step .flow-title {
  font-size: 16px;
  margin-bottom: 4px;
}

.flow-step .flow-copy {
  font-size: 11px;
  line-height: 1.4;
  margin-bottom: 8px;
}

.section-card--step-nav {
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.step-nav-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.step-nav-btn {
  min-height: 38px;
  padding: 7px 12px;
  font-size: 11.5px;
}

.step-nav-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.step-nav-hint {
  margin: 5px 2px 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.25;
  text-align: center;
}

.model-showcase,
.preset-grid,
.goal-grid {
  display: grid;
  gap: 12px;
}

.model-showcase {
  grid-template-columns: 1fr;
}

.model-card {
  border: 1px solid #353530;
  background:
    linear-gradient(180deg, rgba(44, 44, 40, 0.94), rgba(31, 31, 29, 0.98)),
    linear-gradient(135deg, rgba(227, 226, 21, 0.08), transparent 42%);
  border-radius: 18px;
  padding: 16px;
  text-align: left;
  color: var(--brand-white);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 170px;
}

.model-card:hover {
  transform: translateY(-2px);
  border-color: #4d4d42;
}

.model-card.active {
  border-color: var(--brand-yellow);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(227, 226, 21, 0.16) inset;
}

.model-card__family {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  color: #ecebb4;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.model-card__title {
  display: block;
  font-size: 18px;
  line-height: 1.05;
  margin-bottom: 7px;
}

.model-card__copy {
  color: #bdbdb6;
  font-size: 12px;
  line-height: 1.45;
  min-height: 50px;
}

.model-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.model-card__meta span {
  border: 1px solid #3f3f39;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  color: #d8d8d0;
}

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

.top-preset-bar .goal-grid {
  gap: 8px;
}

.goal-btn {
  border: 1px solid #33332e;
  border-radius: 8px;
  padding: 10px;
  background: #232321;
  color: #d7d7d0;
  text-align: left;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.goal-btn:hover {
  transform: translateY(-1px);
  border-color: #505046;
}

.goal-btn.active {
  border-color: var(--brand-yellow);
  background: #292920;
  color: #f5f5ef;
}

.preset-card {
  border: 1px solid #32322f;
  background: linear-gradient(180deg, #252523 0%, #1f1f1d 100%);
  border-radius: 8px;
  padding: 12px;
  text-align: left;
  color: var(--brand-white);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-preset-bar .preset-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.top-preset-bar .preset-card {
  min-height: 132px;
  display: flex;
  flex-direction: column;
}

.top-preset-bar .preset-head {
  display: block;
}

.top-preset-bar .preset-tag {
  display: inline-flex;
  margin-top: 8px;
}

.top-preset-bar .preset-card p {
  flex: 1;
  margin: 8px 0;
}

.top-preset-bar .preset-meta {
  display: grid;
  gap: 4px;
}

.preset-card.active {
  border-color: var(--brand-yellow);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(227, 226, 21, 0.18) inset;
}

.preset-card.recommended {
  border-color: #7a7a43;
  background: linear-gradient(180deg, #2a2a22 0%, #232320 100%);
}

.preset-card:hover {
  transform: translateY(-2px);
  border-color: #4b4b44;
}

.preset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.preset-tag {
  border: 1px solid #75752f;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  color: var(--brand-yellow);
}

.preset-card p { color: #bdbdb7; font-size: 12px; line-height: 1.35; margin-bottom: 8px; }

.preset-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 6px;
}

.preset-kicker {
  margin-bottom: 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #ecebb4;
}

.preset-badges { display: none; }

.option-grid {
  display: grid;
  gap: 7px;
}

.option-btn {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-2);
  color: var(--brand-white);
  text-align: left;
  padding: 9px;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.option-btn:hover { transform: translateY(-1px); }
.option-btn.active { border-color: var(--brand-yellow); background: #29291f; }
.option-btn small { display: block; color: var(--muted); margin-top: 3px; font-size: 11px; }

.option-btn[data-status] { position: relative; padding-right: 86px; }
.option-btn[data-status=""] { padding-right: 9px; }

.option-btn[data-status]:not([data-status=""])::after {
  content: attr(data-status);
  position: absolute;
  top: 9px;
  right: 9px;
  border-radius: 999px;
  padding: 3px 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #cfcfc6;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.option-btn.active::after {
  background: rgba(241, 221, 56, 0.16);
  color: #f2e86b;
}

.option-grid--radio .option-btn {
  min-height: 44px;
  padding-left: 38px;
}

.option-grid--radio .option-btn::before {
  content: '';
  position: absolute;
  top: 13px;
  left: 12px;
  width: 14px;
  height: 14px;
  border: 1px solid #75756d;
  border-radius: 50%;
  background: transparent;
}

.option-grid--radio .option-btn.active::before {
  border-color: var(--brand-yellow);
  box-shadow: inset 0 0 0 3px #29291f;
  background: var(--brand-yellow);
}

/* The protection choice is intentionally split into inclusion and level groups. */
.protection-inclusion-grid {
  margin: 10px 0 12px;
}

.protection-inclusion-grid .option-btn,
.protection-level-grid .option-btn {
  display: block;
  white-space: normal;
  line-height: 1.35;
}

.protection-inclusion-grid .option-btn small {
  margin-top: 5px;
  font-style: italic;
}

.protection-level-grid {
  gap: 9px;
}

/* The final step is a review only: changes always happen in the relevant tab. */
.configuration-summary-card {
  padding: 0;
  overflow: hidden;
}

.configuration-summary-section {
  padding: 14px 13px;
  border-bottom: 1px solid var(--line);
}

.configuration-summary-section:last-child {
  border-bottom: 0;
}

.configuration-summary-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: var(--brand-white);
  font-family: 'Sora', sans-serif;
  font-size: 13px;
}

.summary-edit-button {
  display: inline-grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #292927;
  color: var(--brand-yellow);
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}

.summary-edit-button:hover,
.summary-edit-button:focus-visible {
  border-color: var(--brand-yellow);
  background: #35352d;
  outline: none;
}

.configuration-summary-row {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, .07);
  font-size: 12px;
  line-height: 1.35;
}

.configuration-summary-row span {
  color: var(--muted);
}

.configuration-summary-row strong {
  color: var(--brand-white);
  font-weight: 600;
  text-align: right;
}

.ral-color-swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 7px;
  vertical-align: -3px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 3px;
  background: var(--ral-color);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18);
}

@media (max-width: 600px) {
  .configuration-summary-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .configuration-summary-row strong {
    text-align: left;
  }
}

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

.option-btn--color {
  position: relative;
  padding-left: 40px;
}

.option-btn--color::before {
  content: '';
  position: absolute;
  top: 11px;
  left: 11px;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 3px;
  background: var(--option-swatch);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16);
}

.color-row { display: flex; gap: 7px; flex-wrap: wrap; }
.color-dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid var(--line);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.color-dot.active { border-color: var(--brand-yellow); transform: scale(1.08); }

.panel-footer {
  border-top: 1px solid #2d2d29;
  padding: 6px 18px 7px;
  background: #181817;
  position: relative;
  z-index: 5;
}

#quote-compact-view {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
}

.production-estimate-panel {
  border: 1px solid #35352f;
  border-radius: 14px;
  background: #21211f;
  padding: 14px;
  margin-bottom: 14px;
}

.production-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.production-main strong {
  font-size: 26px;
  font-family: 'Sora', sans-serif;
}

.production-badge {
  border: 1px solid #5e5e35;
  color: var(--brand-yellow);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 10px;
  text-transform: uppercase;
}

.delivery-info { margin-top: 8px; }
.delivery-info summary { color: #9f9f97; font-size: 11px; cursor: pointer; }
.production-disclaimer { margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.35; }

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
}

.summary-row strong { font-family: 'Sora', sans-serif; }
.summary-branding { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.is-hidden { display: none !important; }
/*
.quote-card,
.quote-compact-card,
.quote-form-shell {
  border: 1px solid #373731;
  border-radius: 18px;
  background: linear-gradient(180deg, #232321 0%, #1b1b19 100%);
  padding: 16px;
}
*/
.quote-compact-card {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
}

.quote-compact-card__copy {
  display: flex;
  align-items: center;
  min-width: 0;
}

.quote-compact-card__copy .quote-card__eyebrow,
.quote-compact-card__copy strong,
.quote-compact-card__copy #quote-compact-summary {
  display: none !important;
}

.quote-compact-card__copy .quote-progress {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ecebb4;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: rgba(241, 221, 56, 0.08);
  border: 1px solid rgba(241, 221, 56, 0.22);
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.quote-compact-card__copy .quote-progress::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-yellow);
  box-shadow: 0 0 6px rgba(241, 221, 56, 0.7);
  flex-shrink: 0;
}

.review-summary-btn {
  justify-self: start;
  width: auto;
  padding: 8px 12px;
  font-size: 12px;
  color: #ecebb4;
  border-color: #4a4a35;
}

.review-summary-btn.is-ready {
  border-color: rgba(241, 221, 56, 0.72);
  background: rgba(241, 221, 56, 0.12);
  color: #f2e86b;
}

.review-summary-btn:hover {
  border-color: #666640;
  color: #fff6a9;
}

/* The final review is intentionally hidden; save and share remain available. */
#quote-review-btn {
  display: none !important;
}

.quote-card__head,
.quote-form-shell__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.quote-card__eyebrow {
  margin-bottom: 6px;
  color: var(--brand-yellow);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.quote-card__head strong,
.quote-form-shell__head strong {
  font-size: 18px;
  line-height: 1.1;
}

.quote-card__head span:last-child {
  border: 1px solid #4a4a3b;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ecebb4;
  font-size: 10px;
  white-space: nowrap;
}

.quote-card__copy {
  margin: 14px 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.quote-card__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.quote-chip {
  border: 1px solid #34342f;
  border-radius: 14px;
  padding: 10px;
  background: #1f1f1d;
}

.quote-chip span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.quote-chip strong {
  font-size: 12px;
  color: #f2f2ec;
  line-height: 1.35;
}

.utility-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  flex-shrink: 0;
}

.utility-actions .mini-btn {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border: 1px solid #3c3c34;
  border-radius: 6px;
  background: var(--panel-2);
  color: #d8d8ce;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
  white-space: nowrap;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.utility-actions .mini-btn::before {
  content: none;
  display: none;
}

.utility-actions #share-config-btn {
  border-color: #4a4a35;
  background: var(--panel-2);
  color: #ecebb4;
}

.utility-actions #share-config-btn::before {
  content: none;
}

.utility-actions .mini-btn:hover:not(:disabled) {
  border-color: var(--brand-yellow);
  background: rgba(241, 221, 56, 0.08);
  color: var(--brand-yellow);
}

.utility-actions .mini-btn:disabled {
  cursor: wait;
  opacity: 0.68;
}

.utility-feedback:empty {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.utility-feedback {
  position: absolute;
  bottom: calc(100% + 7px);
  right: 12px;
  margin: 0;
  background: #232320;
  border: 1px solid #4a4a35;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 11px;
  color: #fffced;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
  cursor: pointer;
  z-index: 30;
  white-space: nowrap;
  animation: feedbackToastIn 0.2s ease both;
}

@keyframes feedbackToastIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.utility-feedback.is-error {
  border-color: #7d3333;
  background: #2b1c1c;
  color: #f7aaaa;
}

.utility-feedback a {
  color: var(--brand-yellow);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mini-btn {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--muted);
  padding: 5px 10px;
  font-size: 11px;
  cursor: pointer;
  width: 100%;
}

.mini-btn--inline {
  width: auto;
  white-space: nowrap;
}

#quote-compact-view,
#quote-details-view,
#quote-form-view {
  animation: rise 0.2s ease;
}

.contact-drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  border: 0;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(3px);
}

.contact-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  width: min(540px, 100vw);
  transform: translateX(100%);
  border-left: 1px solid #42423b;
  background:
    radial-gradient(circle at top right, rgba(241, 221, 56, 0.13), transparent 28%),
    linear-gradient(180deg, #20201e 0%, #171716 100%);
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.36);
  transition: transform 0.32s ease;
}

.contact-drawer__host {
  height: 100%;
  overflow: auto;
  padding: 24px;
}

body.contact-drawer-open .contact-drawer {
  transform: translateX(0);
}

body.contact-drawer-open .contact-drawer-scrim {
  display: block;
}

.contact-drawer .quote-form-shell {
  max-width: none;
}

.contact-drawer .form-grid {
  grid-template-columns: 1fr;
}

.contact-config-summary {
  margin: 6px 0 8px;
  border: 1px solid #3d3d34;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.14);
  overflow: hidden;
}

.contact-config-summary summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.contact-config-summary summary::-webkit-details-marker { display: none; }

.contact-config-summary summary span {
  color: #f2f2ec;
  font-size: 12px;
  font-weight: 700;
}

.contact-config-summary summary strong {
  color: #f2e86b;
  font-size: 11px;
}

.contact-config-summary__content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.24s ease;
}

.contact-config-summary[open] .contact-config-summary__content {
  grid-template-rows: 1fr;
}

.contact-config-summary.is-opening .contact-config-summary__content,
.contact-config-summary.is-closing .contact-config-summary__content {
  grid-template-rows: 0fr;
}

.contact-config-summary__content-inner {
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.18s ease, transform 0.24s ease;
}

.contact-config-summary[open] .contact-config-summary__content-inner {
  opacity: 1;
  transform: translateY(0);
}

.contact-config-summary.is-opening .contact-config-summary__content-inner,
.contact-config-summary.is-closing .contact-config-summary__content-inner {
  opacity: 0;
  transform: translateY(-5px);
}

.contact-config-summary__content-inner > span {
  display: block;
  padding: 0 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.contact-config-summary .quote-selection-summary {
  margin: 8px 12px 12px;
}

@media (prefers-reduced-motion: reduce) {
  .contact-config-summary__content,
  .contact-config-summary__content-inner {
    transition: none;
  }
}

#quote-form { display: flex; flex-direction: column; gap: 7px; }

.quote-form-shell__copy {
  margin: 12px 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.form-row--location,
.form-row--project {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.form-field span {
  color: #efefea;
  font-size: 12px;
  font-weight: 600;
}

#quote-form input,
.form-field select,
#quote-form textarea,
.branding-input-wrap input,
.branding-input-wrap textarea {
  width: 100%;
  padding: 12px 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #252524;
  color: var(--brand-white);
  outline: none;
}

#quote-form input:focus,
.form-field select:focus,
#quote-form textarea:focus,
.branding-input-wrap input:focus,
.branding-input-wrap textarea:focus { border-color: var(--brand-yellow); }

#quote-form .iti {
  width: 100%;
}

#quote-form .iti__tel-input {
  padding-left: 100px !important;
}

#quote-form .iti__selected-country {
  border-right: 1px solid #45453f;
  border-radius: 12px 0 0 12px;
  background: #20201f;
  transition: background-color 0.2s ease;
  padding-right: 8px;
}

.iti__search-icon {
  padding-left: 8px;
}

.iti__search-input {
  padding-left: 30px !important;
}

#quote-form .iti__selected-country:hover,
#quote-form .iti--container:focus-within .iti__selected-country {
  background: #2b2b28;
}

#quote-form .iti__selected-dial-code {
  color: #f2f2ec;
  font-size: 12px;
  font-weight: 700;
}

#quote-form .country-picker {
  position: relative;
}

#quote-form .country-picker__trigger {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 47px;
  padding: 12px 40px 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #252524;
  color: var(--brand-white);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

#quote-form .country-picker__trigger:focus-visible {
  border-color: var(--brand-yellow);
  outline: none;
}

#quote-form .country-picker__trigger .iti__flag {
  flex: 0 0 auto;
  margin-right: 10px;
}

.country-picker__value {
  overflow: hidden;
  color: #f2f2ec;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-picker__arrow {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #d4d3c9;
  border-bottom: 1.5px solid #d4d3c9;
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.18s ease;
}

.country-picker__trigger[aria-expanded="true"] .country-picker__arrow {
  transform: translateY(-30%) rotate(-135deg);
}

.country-picker__dialog {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  display: flex;
  flex-direction: column;
  width: min(476px, calc(100vw - 32px));
  height: 235px;
  max-height: calc(100vh - 80px);
  overflow: hidden;
  border: 1px solid #444;
  border-radius: 11px;
  background: #333;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.4);
}

.country-picker__dialog[hidden] {
  display: none;
}

.country-picker__search-wrap {
  flex: 0 0 auto;
  padding: 8px;
  border-bottom: 1px solid #444;
}

#quote-form .country-picker__search {
  width: 100%;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid #4a4a4a;
  border-radius: 8px;
  background: #3b3b3b;
  color: #f2f2ec;
}

#quote-form .country-picker__search:focus {
  border-color: var(--brand-yellow);
}

.country-picker__list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.country-picker__option {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  background: transparent;
  color: #f2f2ec;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.country-picker__option:hover,
.country-picker__option:focus-visible,
.country-picker__option[aria-selected="true"] {
  background: rgba(241, 221, 56, 0.12);
  outline: none;
}

.country-picker__option .iti__flag {
  flex: 0 0 auto;
  margin-right: 10px;
}

.iti__country-selector,
#iti-0__country-selector {
  width: min(476px, calc(100vw - 32px)) !important;
  height: 235px;
  max-height: calc(100vh - 80px);
  border: 1px solid #444 !important;
  border-radius: 11px !important;
  background: #333 !important;
  color: #f2f2ec;
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.4);
}

.iti__country-list {
  max-height: 181px;
  background: #333;
  color: #f2f2ec;
}

.iti__search-input-wrapper {
  border-bottom: 1px solid #444;
  background: #333;
}

.iti__search-input {
  margin: 8px;
  width: calc(100% - 16px);
  border: 1px solid #4a4a4a;
  border-radius: 8px;
  background: #3b3b3b;
  color: #f2f2ec;
  outline: none;
}

.iti__search-input:focus {
  border-color: var(--brand-yellow);
}

.iti__country {
  padding: 9px 10px;
}

.iti__country.iti__highlight {
  background: rgba(241, 221, 56, 0.12);
}

.iti__country-name,
.iti__dial-code {
  color: inherit;
}

.iti__dial-code {
  color: #cccbbf;
}

@media (max-width: 520px) {
  .country-picker__dialog {
    width: calc(100vw - 24px);
  }

  .iti__country-selector,
  #iti-0__country-selector {
    width: calc(100vw - 24px) !important;
  }
}

.form-field select,
#quote-form textarea {
  appearance: none;
}

#quote-form textarea {
  min-height: 110px;
  resize: vertical;
  font: inherit;
}
#quote-form input[type="number"]::-webkit-outer-spin-button,
#quote-form input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.branding-input-wrap {
  margin-top: 8px;
}

.branding-counter {
  margin-top: 4px;
  text-align: right;
  color: var(--muted);
  font-size: 11px;
}

.branding-question,
.branding-notes-label {
  display: block;
  margin: 0 0 7px;
  color: #efefea;
  font-size: 12px;
  font-weight: 700;
}

.branding-notes-wrap textarea {
  min-height: 82px;
  resize: vertical;
  line-height: 1.45;
}

.branding-assessment-card .option-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.branding-logo-upload {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 15px;
  border: 1px dashed #626157;
  border-radius: 12px;
  background: #20201e;
  cursor: pointer;
}

.branding-logo-upload:hover,
.branding-logo-upload:focus-within {
  border-color: var(--brand-yellow);
  background: #282824;
}

.branding-logo-upload__title { color: var(--brand-white); font-weight: 700; }
.branding-logo-upload__hint { color: var(--muted); font-size: 12px; }
.branding-logo-upload__selected { color: var(--brand-yellow); font-size: 12px; font-weight: 700; }
.branding-logo-upload input { width: 100%; margin-top: 7px; color: #d8d7cc; font: inherit; }

@media (max-width: 520px) {
  .branding-assessment-card .option-grid { grid-template-columns: 1fr; }
}

.quote-form-note {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #35352f;
  border-radius: 14px;
  background: #1f1f1d;
  margin: 4px 0 6px;
}

.quote-form-note strong {
  font-size: 12px;
}

.quote-form-note span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.quote-selection-summary {
  display: grid;
  gap: 8px;
  margin: 14px 0 16px;
}

.quote-selection-summary--compact {
  margin: 8px 0 0;
}

.quote-selection-summary__item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #34342f;
  border-radius: 12px;
  padding: 9px 10px;
  background: #1f1f1d;
}

.quote-selection-summary__item span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.quote-selection-summary__item strong {
  color: #f2f2ec;
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}

.slider-control {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.slider-control span {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.slider-control strong {
  color: var(--brand-white);
  font-weight: 700;
}

.slider-control input[type="range"] {
  width: 100%;
  accent-color: var(--brand-yellow);
}

.color-picker-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.color-picker-row input[type="color"] {
  width: 44px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.btn-submit {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--brand-yellow);
  border-radius: 12px;
  background: var(--brand-yellow);
  color: var(--brand-black);
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.btn-submit--compact {
  padding: 13px 14px;
}

.btn-submit:hover { transform: translateY(-1px); }
.btn-submit:disabled { opacity: 0.6; transform: none; cursor: not-allowed; }

#submit-feedback {
  display: none;
  margin-top: 4px;
  padding: 8px;
  border-radius: 8px;
  font-size: 12px;
  border: 1px solid transparent;
}

#submit-feedback.success { display: block; background: var(--success-bg); border-color: var(--success-line); }
#submit-feedback.error { display: block; background: var(--error-bg); border-color: var(--error-line); }

/* ----- Panel Toggle Arrows ----- */

.panel-toggle {
  position: absolute;
  z-index: 50;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(29, 29, 28, 0.92);
  color: #d6d6d0;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 8px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-toggle:hover {
  background: rgba(50, 50, 48, 0.95);
  border-color: rgba(241, 221, 56, 0.28);
  color: var(--brand-yellow);
  transform: scale(1.06);
}

.panel-toggle__arrow {
  display: block;
  font-size: 11px;
  line-height: 1;
}

/* Topbar toggle */
.panel-toggle--topbar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 46;
  border-radius: 0 0 10px 10px;
  padding: 4px 18px 6px;
  transition: top 0.3s ease, transform 0.2s ease;
}

body.court-selected .panel-toggle--topbar {
  display: flex;
}

body:not(.court-selected) .panel-toggle--topbar {
  display: none !important;
}

.topbar:not(.collapsed) ~ .panel-toggle--topbar {
  top: 64px;
}

.topbar:not(.collapsed) ~ .panel-toggle--topbar .panel-toggle__arrow {
  display: block;
}

.topbar.collapsed ~ .panel-toggle--topbar {
  top: 0;
}

.topbar.collapsed ~ .panel-toggle--topbar .panel-toggle__arrow {
  display: block;
}

/* Topbar collapsed state */
.topbar {
  transition: transform 0.3s ease, opacity 0.25s ease, max-height 0.3s ease;
  transform-origin: top center;
}

.topbar.collapsed {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  border-bottom: none;
}

/* Pre-court-selection: hide config panel & left info (Desktop right drawer) */
@media (min-width: 1081px) {
  body:not(.court-selected) .config-panel {
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
  }

  body.court-selected .config-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }
}

body.stage-fullscreen .workspace {
  position: fixed;
  inset: 0;
  z-index: 60;
  padding-right: 0 !important;
  padding-bottom: 0 !important;
}

body.stage-fullscreen .stage {
  margin-right: 0;
}

/* Native Fullscreen API target: the stage fills the display without relying
   on its normal workspace dimensions. */
.stage:fullscreen {
  width: 100%;
  height: 100%;
  margin: 0;
}

body.stage-fullscreen .config-panel,
body.stage-fullscreen .stage-info-panel,
body.stage-fullscreen .stage-bottom-left,
body.stage-fullscreen .topbar,
body.stage-fullscreen .panel-toggle--topbar,
body.stage-fullscreen .mobile-config-toggle,
body.stage-fullscreen .mobile-court-info-btn {
  display: none !important;
}

body.stage-fullscreen .scene-btn--fullscreen {
  border-color: var(--brand-yellow);
  color: var(--brand-yellow);
}

body.stage-fullscreen .stage-left { right: 98px; }
body.stage-fullscreen .stage-right { right: 16px; }

body:not(.court-selected) .topbar-actions .change-court-btn,
body:not(.court-selected) .topbar-actions .request-quote-top,
body:not(.court-selected) .topbar-chip {
  opacity: 0;
  pointer-events: none;
}

body.court-selected .topbar-actions .request-quote-top,
body.court-selected .topbar-chip {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

.court-welcome,
.court-welcome__panel,
.env-choice,
.env-choice-btn,
.court-picker,
.court-picker__back,
.welcome-model-grid,
.welcome-model-grid .model-card {
  pointer-events: auto;
}

/* Topbar Left with Back to Site & Brand */
.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.back-to-site-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #ecece6;
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  user-select: none;
}

.back-to-site-btn:hover {
  background: rgba(227, 226, 21, 0.12);
  border-color: rgba(227, 226, 21, 0.4);
  color: #ffffff;
  transform: translateX(-2px);
}

.back-to-site-btn .back-icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.2px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.back-to-site-btn:hover .back-icon {
  transform: translateX(-2px);
}

/* Language Switcher / Translator Dropdown */
.lang-selector-wrap {
  position: relative;
  z-index: 60;
}

.lang-selector-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #ecece6;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.lang-selector-btn:hover,
.lang-selector-wrap.open .lang-selector-btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.26);
  color: #ffffff;
}

.lang-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.flag-icon {
  width: 19px;
  height: 14px;
  object-fit: cover;
  border-radius: 2.5px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 2px 4px rgba(0, 0, 0, 0.35);
  display: block;
}

.lang-code {
  font-size: 12px;
  letter-spacing: 0.5px;
}

.lang-arrow {
  color: #999990;
  transition: transform 0.2s ease;
}

.lang-selector-wrap.open .lang-arrow {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 175px;
  background: #1c1c1b;
  border: 1px solid #333330;
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 100;
  animation: langDropdownIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes langDropdownIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.lang-dropdown.is-hidden {
  display: none !important;
}

.lang-dropdown__title {
  padding: 6px 10px 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #888880;
  font-weight: 600;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #d6d6d0;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.lang-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.lang-item.active {
  background: rgba(227, 226, 21, 0.12);
  color: #ecebb4;
  font-weight: 600;
}

.lang-item__flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 15px;
}

.lang-item__flag .flag-icon {
  width: 20px;
  height: 15px;
  border-radius: 2px;
}

.lang-item__check {
  margin-left: auto;
  font-size: 12px;
  color: #e3e215;
  display: none;
}

.lang-item.active .lang-item__check {
  display: inline-block;
}

/* ==========================================================================
   Smartphone & Tablet Responsive System (<= 1080px)
   ========================================================================== */
@media (max-width: 1080px) {
  :root {
    --config-panel-width: 100%;
    --mobile-peek-height: calc(52px + env(safe-area-inset-bottom, 0px));
    --mobile-split-height: 50vh;
    --mobile-expanded-height: min(86vh, calc(100vh - 58px));
  }

  @supports (height: 100dvh) {
    :root {
      --mobile-split-height: 50dvh;
      --mobile-expanded-height: min(86dvh, calc(100dvh - 58px));
    }
  }

  /* Compact single-row header */
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    height: auto;
    min-height: 54px;
    padding: calc(8px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px));
    gap: 10px;
  }

  .topbar-left {
    justify-content: flex-start;
    gap: 10px;
    min-width: 0;
  }

  .topbar-brand {
    min-width: 0;
    flex-shrink: 1;
  }

  .topbar-brand img {
    width: 106px;
    max-height: 36px;
  }

  .topbar-title {
    display: none;
  }

  .topbar-actions {
    justify-self: end;
    gap: 7px;
    flex-shrink: 0;
  }

  .back-to-site-btn {
    padding: 6px 10px;
    font-size: 11.5px;
    gap: 6px;
  }

  .change-court-btn {
    padding: 7px 11px;
    font-size: 11px;
    white-space: nowrap;
  }

  .lang-selector-btn {
    padding: 6px 10px;
    font-size: 11.5px;
    gap: 5px;
  }

  .lang-dropdown {
    max-width: calc(100vw - 24px);
  }

  /* Dynamic split workspace: live 3D court above + builder sheet below */
  .workspace {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    padding-right: 0;
  }

  .stage {
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    margin-right: 0 !important;
  }

  body.court-selected:not(.panel-open):not(.stage-fullscreen) .workspace {
    padding-bottom: var(--mobile-peek-height);
  }

  body.court-selected.panel-open:not(.stage-fullscreen) .workspace {
    padding-bottom: var(--mobile-split-height);
  }

  /* Scroll-safe welcome court picker on all tablet/phone heights */
  .court-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 16px 14px calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .court-welcome__panel {
    margin: auto 0;
    width: min(100%, 560px);
    padding: 18px 16px;
  }

  .welcome-model-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  /* 3D stage overlays: zero overlap, clean viewport */
  .mobile-config-toggle {
    display: none !important;
  }

  .mobile-court-info-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 13;
    max-width: calc(100% - 20px);
    border: 1px solid rgba(241, 221, 56, 0.34);
    border-radius: 999px;
    background: rgba(20, 20, 19, 0.86);
    backdrop-filter: blur(12px);
    color: #fffef5;
    padding: 5px 12px 5px 6px;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
    transition: opacity 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  }

  .mobile-court-info-btn[aria-expanded="true"] {
    border-color: var(--brand-yellow);
    background: rgba(34, 34, 27, 0.94);
  }

  .mobile-court-info-btn__icon {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(241, 221, 56, 0.18);
    border: 1px solid rgba(241, 221, 56, 0.45);
    color: var(--brand-yellow);
    font-family: 'Sora', sans-serif;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
  }

  .mobile-court-info-btn__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .stage-info-panel {
    display: none;
    animation: none;
    top: 46px;
    left: 10px;
    right: auto;
    bottom: auto;
    width: min(336px, calc(100% - 20px));
    max-height: calc(100% - 56px);
    overflow-y: auto;
    z-index: 14;
  }

  body.court-selected.mobile-stage-info-open:not(.panel-expanded) .stage-info-panel {
    display: grid;
    animation: rise 0.2s ease both;
  }

  .stage-info-card__close {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #ecece4;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
  }

  .stage-left,
  body.stage-fullscreen .stage-left {
    animation: none;
    left: 0;
    right: 0;
    bottom: 10px;
    width: fit-content;
    max-width: calc(100% - 20px);
    margin-inline: auto;
    transform: none;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
    padding: 4px;
    gap: 4px;
    border-radius: 999px;
    background: rgba(22, 22, 21, 0.86);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  }

  .stage-left::-webkit-scrollbar {
    display: none;
  }

  .stage-left .view-btn {
    padding: 6px 11px;
    font-size: 11.5px;
    border-radius: 999px;
  }

  .stage-left .scene-btn--fullscreen {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    flex-shrink: 0;
  }

  .stage-bottom-left {
    animation: none;
    top: 10px;
    right: 10px;
    left: auto;
    bottom: auto;
    padding: 5px 10px;
    font-size: 10.5px;
  }

  body.panel-open .stage-bottom-left,
  body.panel-open.panel-expanded .stage-left,
  body.panel-open.panel-expanded .mobile-court-info-btn {
    display: none !important;
  }

  /* 3-State Bottom Builder Sheet: Peek / Split / Expanded */
  .config-panel {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: var(--mobile-split-height);
    max-height: calc(100vh - 54px);
    max-height: calc(100dvh - 54px);
    border-left: none;
    border-top: 1px solid rgba(241, 221, 56, 0.24);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -16px 42px rgba(0, 0, 0, 0.48);
    z-index: 25;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), height 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
  }

  body:not(.court-selected) .config-panel {
    opacity: 0;
    pointer-events: none;
    transform: translateY(100%);
  }

  body.court-selected:not(.panel-open) .config-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(calc(100% - var(--mobile-peek-height)));
  }

  body.court-selected.panel-open .config-panel {
    opacity: 1;
    pointer-events: auto;
    height: var(--mobile-split-height);
    transform: translateY(0);
  }

  body.court-selected.panel-open.panel-expanded .config-panel {
    height: var(--mobile-expanded-height);
    transform: translateY(0);
  }

  /* Mobile sheet header + grabber + controls */
  .panel-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: relative;
    min-height: 52px;
    padding: 12px 14px 8px;
    border-bottom: 1px solid #2e2e29;
    flex-shrink: 0;
    touch-action: none;
    user-select: none;
  }

  body.court-selected:not(.panel-open) .panel-mobile-head {
    min-height: var(--mobile-peek-height);
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    border-bottom-color: transparent;
    cursor: pointer;
  }

  .panel-mobile-grabber {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    pointer-events: none;
  }

  .panel-mobile-head__title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .panel-mobile-head__title strong {
    font-size: 13.5px;
    color: #fffef5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .panel-mobile-step-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(241, 221, 56, 0.3);
    background: rgba(241, 221, 56, 0.1);
    color: #f4ea8e;
    font-size: 10.5px;
    font-weight: 700;
    flex-shrink: 0;
  }

  .panel-mobile-step-badge:empty {
    display: none;
  }

  .panel-mobile-head__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  .panel-mobile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid #3c3c35;
    background: #252522;
    color: #e8e8df;
    border-radius: 999px;
    padding: 6px 11px;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
  }

  .panel-mobile-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
  }

  .panel-mobile-btn--icon {
    width: 31px;
    height: 31px;
    padding: 0;
  }

  .panel-mobile-btn--icon[aria-pressed="true"] {
    border-color: rgba(241, 221, 56, 0.55);
    background: rgba(241, 221, 56, 0.12);
    color: var(--brand-yellow);
  }

  body.court-selected:not(.panel-open) #expand-config-btn {
    display: none;
  }

  body.court-selected:not(.panel-open) .panel-mobile-btn--toggle {
    border-color: rgba(241, 221, 56, 0.65);
    background: rgba(241, 221, 56, 0.16);
    color: #fff59e;
  }

  .panel-mobile-chevron {
    transition: transform 0.22s ease;
  }

  body.court-selected:not(.panel-open) .panel-mobile-chevron {
    transform: rotate(180deg);
  }

  /* Builder interior: horizontal swipeable tabs + compact dock */
  .panel-body {
    padding: 6px 14px 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .advanced-inner {
    padding: 0 0 8px;
  }

  .advanced-inner .panel-tabs {
    display: flex !important;
    grid-template-columns: none !important;
    margin: 0 0 8px;
    padding: 7px 8px;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: rgba(26, 26, 25, 0.96);
    border-radius: 11px;
  }

  .advanced-inner .tab-btn {
    padding: 6px 10px;
    font-size: 11.5px;
    gap: 6px;
  }

  .advanced-inner .tab-btn__index {
    display: inline-flex;
    width: 17px;
    height: 17px;
    font-size: 9.5px;
  }

  #step-nav-dock {
    margin-left: -14px;
    margin-right: -14px;
    padding: 7px 14px;
  }

  .step-nav-actions {
    grid-template-columns: minmax(96px, 0.85fr) minmax(0, 1.35fr);
    gap: 8px;
  }

  .panel-footer {
    padding: 6px 14px calc(7px + env(safe-area-inset-bottom, 0px));
    flex-shrink: 0;
  }

  /* Presets, models & forms */
  .model-showcase,
  .quote-card__grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .top-preset-bar {
    top: 56px;
  }

  .top-preset-bar.open {
    max-height: 72vh;
    overflow: auto;
  }

  .top-preset-bar__content {
    grid-template-columns: 1fr;
  }

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

  /* Prevent iOS Safari auto-zoom on form field focus & polish contact drawer */
  #quote-form input,
  .form-field select,
  #quote-form textarea,
  #quote-form .country-picker__trigger,
  #quote-form .country-picker__search,
  .iti__search-input,
  .branding-input-wrap input,
  .branding-input-wrap textarea {
    font-size: 16px;
  }

  .contact-drawer {
    width: min(520px, 100vw);
    height: 100vh;
    height: 100dvh;
  }

  .contact-drawer__host {
    padding: calc(18px + env(safe-area-inset-top, 0px)) 18px calc(28px + env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .quote-form-shell__head {
    flex-direction: row;
    align-items: flex-start;
  }
}

@media (max-width: 680px) {
  :root {
    --mobile-split-height: 54vh;
  }

  @supports (height: 100dvh) {
    :root {
      --mobile-split-height: 54dvh;
    }
  }

  .topbar {
    min-height: 50px;
    padding: calc(6px + env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) 6px max(10px, env(safe-area-inset-left, 0px));
    gap: 8px;
  }

  .topbar-left {
    gap: 8px;
  }

  .topbar-brand img {
    width: 92px;
    max-height: 32px;
  }

  .startup-loader {
    padding: 16px;
  }

  .startup-loader__panel {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .startup-loader__panel h1,
  .startup-loader__heading {
    font-size: 23px;
  }

  .court-welcome {
    padding: 12px 12px calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .court-welcome__title {
    font-size: 22px;
  }

  .env-choice,
  .welcome-model-grid,
  .goal-grid,
  .top-preset-bar .preset-grid,
  .form-row--location,
  .form-row--project {
    grid-template-columns: 1fr;
  }

  .env-choice-btn {
    min-height: 78px;
    padding: 14px;
  }

  .stage-bottom-left {
    display: none;
  }

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

  .panel-body {
    padding: 6px 12px 0;
  }

  #step-nav-dock {
    margin-left: -12px;
    margin-right: -12px;
    padding: 6px 12px;
  }

  .step-nav-btn {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .step-nav-hint {
    font-size: 10px;
    margin-top: 4px;
  }

  .panel-footer {
    padding: 6px 12px calc(7px + env(safe-area-inset-bottom, 0px));
  }

  .quote-compact-card {
    min-width: 0;
    flex: 1 1 auto;
  }

  .quote-compact-card__copy .quote-progress {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10.5px;
    padding: 3px 8px;
  }

  .contact-drawer {
    width: 100vw;
    border-left: none;
  }

  .contact-drawer__host {
    padding: calc(16px + env(safe-area-inset-top, 0px)) 15px calc(28px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 430px) {
  .back-to-site-btn {
    padding: 6px 9px;
  }

  .back-to-site-btn .back-to-site-text {
    display: none;
  }

  .change-court-btn {
    padding: 6px 10px;
    font-size: 10.5px;
  }

  .lang-selector-btn {
    padding: 6px 8px;
  }

  .option-grid--colors,
  .branding-assessment-card .option-grid {
    grid-template-columns: 1fr;
  }

  .stage-left .view-btn {
    padding: 6px 9px;
    font-size: 11px;
  }
}

/* Landscape smartphones: side-by-side 3D stage + right builder drawer */
@media (max-width: 960px) and (max-height: 520px) and (orientation: landscape) {
  .topbar {
    min-height: 46px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  body.court-selected:not(.stage-fullscreen) .workspace {
    padding-bottom: 0 !important;
  }

  body.court-selected.panel-open:not(.stage-fullscreen) .workspace {
    padding-right: min(370px, 48vw);
  }

  body.court-selected:not(.panel-open):not(.stage-fullscreen) .mobile-config-toggle {
    display: inline-flex !important;
  }

  .config-panel,
  body.court-selected.panel-open .config-panel,
  body.court-selected.panel-open.panel-expanded .config-panel {
    top: 47px;
    left: auto;
    right: 0;
    bottom: 0;
    width: min(370px, 48vw);
    height: auto !important;
    max-height: none;
    border-radius: 0;
    border-top: none;
    border-left: 1px solid var(--line);
  }

  body.court-selected:not(.panel-open) .config-panel {
    transform: translateX(100%);
  }

  .panel-mobile-grabber,
  #expand-config-btn {
    display: none !important;
  }

  .panel-mobile-head {
    min-height: 40px;
    padding: 4px 12px;
  }

  #step-nav-dock {
    padding: 4px 12px;
  }

  .step-nav-btn {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 11px;
  }

  .step-nav-hint {
    display: none;
  }

  .panel-footer {
    padding: 4px 12px;
  }
}

/* Google Translate overrides - clean & transparent */
.goog-te-banner-frame.skiptranslate,
.goog-te-banner-frame,
iframe.goog-te-banner-frame {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
}

body {
  top: 0px !important;
  position: static !important;
}

.skiptranslate iframe {
  display: none !important;
}

#goog-gt-tt,
.goog-te-balloon-frame {
  display: none !important;
}

.goog-text-highlight {
  background: transparent !important;
  box-shadow: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.seo-noscript {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: radial-gradient(circle at top, #272924 0%, #161715 70%);
  color: #f5f5ef;
}

.seo-noscript__card {
  width: min(680px, 100%);
  padding: 32px 28px;
  border-radius: 24px;
  border: 1px solid rgba(227, 226, 21, 0.24);
  background: rgba(24, 25, 23, 0.94);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.seo-noscript__eyebrow {
  margin: 18px 0 8px;
  color: var(--brand-yellow);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.seo-noscript__card h2 {
  font-family: 'Sora', sans-serif;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
  margin: 0 0 12px;
}

.seo-noscript__intro {
  color: #d6d7cf;
  line-height: 1.6;
  margin: 0 0 18px;
}

.seo-noscript__list {
  margin: 0 0 24px;
  padding-left: 20px;
  color: #e7e8e0;
  line-height: 1.6;
  display: grid;
  gap: 8px;
}

.seo-noscript__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.seo-noscript__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}

.seo-noscript__btn--primary {
  background: var(--brand-yellow);
  color: #171816;
}

.seo-noscript__btn--secondary {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f5f5ef;
}
