/* SH Courts 3D Court Designer (Founders Freedom Concept, Nov 10, 2026): CourtCo's builder in SH Courts' blue, gray and Libre Franklin */
@font-face { font-family: "DM Sans"; src: url("fonts/DM-Sans-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DM-Sans-600.ttf") format("truetype"); font-weight: 500 700; font-display: swap; }

:root {
  --brand: #0b72da;
  --brand-2: #2ea3f2;
  --brand-ink: #075bb0;
  --brand-soft: rgba(11, 114, 218, 0.12);
  --ink: #121416;
  --text: #36393d;
  --muted: #74787d;
  --line: #e4e6e9;
  --line-2: #d6d9dd;
  --bg: #f5f6f7;
  --card: #ffffff;
  --sky: #dde6ec;
  --r: 14px;
  --head: "Libre Franklin", "DM Sans", Arial, sans-serif;
  --body: "Libre Franklin", "DM Sans", Arial, sans-serif;
  --btn: "Libre Franklin", "DM Sans", Arial, sans-serif;
  --topbar: 68px;
  --panel-w: 452px;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --shadow-sm: 0 1px 2px rgba(18, 20, 22, 0.06), 0 2px 8px rgba(18, 20, 22, 0.05);
  --shadow-md: 0 6px 20px rgba(18, 20, 22, 0.1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  overscroll-behavior: none;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h2, h3, h4 { margin: 0; }
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; }

/* ---------- icons ---------- */
.i { display: inline-flex; width: 18px; height: 18px; flex: none; }
.i svg { width: 100%; height: 100%; }

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: #fff;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__logo { width: 132px; height: auto; opacity: 0.92; animation: breathe 1.8s ease-in-out infinite; }
.loader__bar { width: 168px; height: 3px; border-radius: 3px; background: #eceef0; overflow: hidden; }
.loader__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 3px; transition: width 0.35s var(--ease); }
.loader__text { margin: 0; font: 600 11px/1 var(--btn); letter-spacing: 0.18em; text-transform: uppercase; color: #9a9ea3; }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: 0.92; } 50% { transform: scale(1.035); opacity: 1; } }

/* ---------- buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 11px;
  background: linear-gradient(180deg, #2b8ff0 0%, var(--brand) 100%);
  color: #fff; font: 700 13px/1 var(--btn); letter-spacing: 0.1em; text-transform: uppercase;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 8px 18px -6px rgba(11, 114, 218, 0.55);
  transition: transform 0.15s var(--ease), box-shadow 0.2s, filter 0.2s;
  white-space: nowrap;
}
.btn-primary:hover { filter: brightness(1.04); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 10px 22px -6px rgba(11, 114, 218, 0.6); }
.btn-primary:active { transform: translateY(1px) scale(0.99); }
.btn-primary[disabled] { opacity: 0.7; cursor: progress; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 16px; border-radius: 11px;
  border: 1.5px solid var(--line-2); background: #fff; color: var(--ink);
  font: 700 13.5px/1 var(--btn); letter-spacing: 0.02em; text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.btn-ghost:hover { border-color: #b9bdc2; background: #fafafa; }
.btn-block { width: 100%; height: 54px; font-size: 14px; }

/* ---------- top bar ---------- */
.topbar {
  position: relative; z-index: 5;
  height: var(--topbar);
  display: flex; align-items: center; gap: 18px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand img { height: 46px; width: auto; }
.brand__divider { width: 1px; height: 28px; background: var(--line-2); }
.brand__label { font: 700 11.5px/1 var(--btn); letter-spacing: 0.22em; text-transform: uppercase; color: #3b3f43; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar__phone { height: 40px; font-size: 13.5px; }
.topbar__quote { height: 40px; transition: opacity 0.25s, visibility 0.25s; }
body.step-quote .topbar__quote { opacity: 0; visibility: hidden; }

/* ---------- layout ---------- */
.app {
  height: calc(100vh - var(--topbar));
  height: calc(100dvh - var(--topbar));
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--panel-w);
}

/* ---------- viewer ---------- */
.viewer { position: relative; min-width: 0; min-height: 0; background: var(--sky); overflow: hidden; }
.stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.viewer.is-dragging .stage { cursor: grabbing; }
.viewer__tools { position: absolute; top: 16px; left: 16px; z-index: 2; display: flex; gap: 8px; }
.tool {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.94);
  color: #2a2d30;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px);
  transition: transform 0.15s var(--ease), background 0.2s, color 0.2s;
}
.tool svg { width: 19px; height: 19px; }
.tool:hover { background: #fff; transform: translateY(-1px); }
.tool[aria-pressed="true"] { background: var(--ink); color: #fff; }
.hint {
  position: absolute; left: 50%; bottom: 18px; z-index: 2;
  transform: translateX(-50%);
  padding: 9px 15px; border-radius: 999px;
  background: rgba(18, 20, 22, 0.78); color: #fff;
  font: 600 12.5px/1.2 var(--body); letter-spacing: 0.01em; white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.hint.is-hidden { opacity: 0; transform: translate(-50%, 6px); }
.toast {
  position: absolute; top: 16px; left: 50%; z-index: 3;
  transform: translate(-50%, -12px); opacity: 0;
  padding: 10px 16px; border-radius: 12px;
  background: var(--ink); color: #fff; font: 600 13px/1.2 var(--body);
  box-shadow: var(--shadow-md);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.nogl { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--text); }

/* ---------- panel ---------- */
.panel {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 0;
  background: #fff;
  border-left: 1px solid var(--line);
}
.steps {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
  padding: 16px 24px 0;
  border-bottom: 1px solid var(--line);
}
.steps button {
  display: flex; flex-direction: column; gap: 9px;
  padding: 0 0 13px;
  text-align: left;
  font: 700 10.5px/1 var(--btn); letter-spacing: 0.12em; text-transform: uppercase;
  color: #9a9ea3;
  transition: color 0.2s;
}
.steps__bar { display: block; width: 100%; align-self: stretch; height: 4px; border-radius: 4px; background: #e6e8eb; overflow: hidden; }
.steps__bar b { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width 0.45s var(--ease); }
.steps button.is-done .steps__bar b, .steps button.is-on .steps__bar b { width: 100%; }
.steps button.is-done { color: #55595e; }
.steps button.is-on { color: var(--brand); }
.steps button:hover { color: var(--ink); }

.panel__body {
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  padding: 24px 24px 28px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.step { animation: stepIn 0.36s var(--ease) both; }
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.step h2 { font: 600 25px/1.15 var(--head); color: var(--ink); letter-spacing: -0.01em; }
.step__lead { margin: 6px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.label { margin: 24px 0 11px; font: 700 11px/1 var(--btn); letter-spacing: 0.15em; text-transform: uppercase; color: #4b4f54; }
.label-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.label-row .label { margin-bottom: 11px; }
.label-value { margin-bottom: 10px; font: 600 13px/1 var(--body); color: var(--ink); }
.sublabel { margin: 16px 0 9px; font: 700 10.5px/1 var(--btn); letter-spacing: 0.14em; text-transform: uppercase; color: #9a9ea3; }

.panel__nav {
  display: flex; gap: 10px;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.btn-back {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 54px; min-width: 96px; padding: 0 16px;
  border-radius: 12px; border: 1.5px solid var(--line-2);
  font: 700 13px/1 var(--btn); letter-spacing: 0.06em; text-transform: uppercase; color: #3b3f43;
  transition: border-color 0.2s, background 0.2s;
}
.btn-back:hover { border-color: #b9bdc2; background: #fafafa; }
.btn-back[hidden] { display: none; }
.btn-next { flex: 1; height: 54px; font-size: 14px; border-radius: 12px; }
.btn-next .i { width: 16px; height: 16px; margin-left: 2px; }

/* ---------- cards ---------- */
.cards { display: grid; gap: 12px; }
.cards--courts { grid-template-columns: 1fr 1fr; margin-top: 20px; }
.cards--looks { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cards--styles { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tip { margin: 10px 2px 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 8px 8px 11px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.2s var(--ease);
}
.card:hover { border-color: #c9ccd1; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card.is-on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.card__media {
  display: block; width: 100%;
  position: relative; border-radius: 10px; overflow: hidden;
  background: linear-gradient(180deg, #f6f7f9, #eef0f3);
  aspect-ratio: 440 / 320;
}
.card__media img, .card__media canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.card__media.is-loading::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.7) 50%, transparent 80%);
  background-size: 200% 100%; animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.card__name { margin: 9px 4px 0; font: 600 14px/1.25 var(--head); color: var(--ink); }
.card__meta { margin: 3px 4px 0; font-size: 12px; color: var(--muted); }
.card__check {
  position: absolute; top: 10px; right: 10px; z-index: 1;
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
  box-shadow: 0 2px 6px rgba(11, 114, 218, 0.4);
  transform: scale(0.4); opacity: 0;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.card__check svg { width: 13px; height: 13px; }
.card.is-on .card__check { transform: none; opacity: 1; }

.cards--looks .card, .cards--styles .card { padding: 6px 6px 9px; border-radius: 14px; }
.cards--looks .card__media, .cards--styles .card__media { aspect-ratio: 16 / 10; border-radius: 9px; background: #eef0f2; }
.cards--looks .card__media canvas, .cards--styles .card__media canvas { object-fit: contain; }
.cards--looks .card__name, .cards--styles .card__name { margin-top: 8px; font-size: 12.5px; }
.cards--styles .card__meta { font-size: 11px; line-height: 1.35; }
.cards--looks .card__check, .cards--styles .card__check { top: 8px; right: 8px; width: 20px; height: 20px; }

.stats {
  margin: 18px 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg);
}
.stats > div { padding: 13px 10px 12px; text-align: center; }
.stats > div + div { border-left: 1px solid var(--line); }
.stats dt { font: 700 9.5px/1 var(--btn); letter-spacing: 0.14em; text-transform: uppercase; color: #8d9196; }
.stats dd { margin: 7px 0 0; font: 600 16px/1 var(--head); color: var(--ink); }
.stats dd[data-stat="coverage"] { color: var(--brand); }

/* ---------- colors ---------- */
.chip-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; margin-bottom: 7px; padding: 0 12px;
  border-radius: 999px; border: 1.5px solid var(--line-2);
  font: 700 11px/1 var(--btn); letter-spacing: 0.08em; text-transform: uppercase; color: #3b3f43;
  transition: border-color 0.2s, background 0.2s;
}
.chip-btn .i { width: 15px; height: 15px; }
.chip-btn:hover { border-color: var(--brand); color: var(--brand); }
.chip-btn.is-rolling .i { animation: roll 0.5s var(--ease); }
@keyframes roll { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.seg {
  display: flex; gap: 4px; padding: 4px;
  border-radius: 13px; background: #f0f1f3;
}
.seg button, .seg label {
  flex: 1; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 8px; border-radius: 10px;
  font: 600 13px/1 var(--body); color: #5d6166;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.seg button.is-on, .seg label:has(input:checked) { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.seg .dot { width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); flex: none; }
.seg--form label { cursor: pointer; position: relative; }
.seg--form input { position: absolute; opacity: 0; pointer-events: none; }
.seg--form label:has(input:focus-visible) { outline: 2.5px solid var(--brand); outline-offset: 1px; }

.swatches { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 9px; }
#swLines, #swLines2 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.sw {
  position: relative;
  aspect-ratio: 1; min-width: 0;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
  transition: transform 0.15s var(--ease), box-shadow 0.2s;
}
.sw:hover { transform: translateY(-1px) scale(1.04); }
.sw.is-on { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), 0 0 0 2.5px #fff, 0 0 0 4.5px var(--brand); }
.sw.is-on::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 14px; height: 8px;
  border: solid currentColor; border-width: 0 0 2.5px 2.5px;
  transform: translateY(-2px) rotate(-45deg);
  color: var(--check, #fff);
}
.sw--rainbow {
  background: conic-gradient(from 0deg, #ff3b30, #ff9500, #ffcc00, #34c759, #00c7be, #007aff, #5856d6, #af52de, #ff2d55, #ff3b30);
  display: grid; place-items: center;
}
.sw--rainbow .sw__plus {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.sw--rainbow .sw__plus svg { width: 13px; height: 13px; }
.sw--custom { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), 0 0 0 2px #fff, 0 0 0 3.5px transparent; }
.sw--custom::before {
  content: ""; position: absolute; inset: -4px; border-radius: 13px; z-index: -1;
  background: conic-gradient(from 0deg, #ff3b30, #ff9500, #ffcc00, #34c759, #00c7be, #007aff, #5856d6, #af52de, #ff2d55, #ff3b30);
}
.swatch-group .sublabel:first-child { margin-top: 18px; }
.picked {
  margin: 18px 0 0; padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
  border-radius: 12px; background: var(--bg);
  font-size: 13.5px; color: var(--text);
}
.picked .dot { width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); flex: none; }
.picked b { color: var(--ink); font-weight: 600; }
.picked small { margin-left: auto; color: var(--muted); font-size: 12px; }

/* ---------- color picker ---------- */
.cp-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(10, 12, 14, 0.28); opacity: 0; transition: opacity 0.25s; }
.cp-backdrop.is-on { opacity: 1; }
.cp {
  position: fixed; z-index: 61;
  width: 300px; padding: 16px;
  border-radius: 18px; background: #fff;
  box-shadow: 0 20px 50px rgba(10, 12, 14, 0.22), 0 0 0 1px rgba(10, 12, 14, 0.05);
  opacity: 0; transform: translateY(8px) scale(0.98);
  transition: opacity 0.2s, transform 0.25s var(--ease);
}
.cp.is-on { opacity: 1; transform: none; }
.cp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cp-title { font: 600 15px/1 var(--head); color: var(--ink); }
.cp-x { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #5d6166; }
.cp-x:hover { background: var(--bg); }
.cp-x svg { width: 16px; height: 16px; }
.cp-sv {
  position: relative; height: 170px; border-radius: 12px;
  touch-action: none; cursor: crosshair;
  background-color: red;
}
.cp-sv::before, .cp-sv::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.cp-sv::before { background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0)); }
.cp-sv::after { background: linear-gradient(0deg, #000, rgba(0, 0, 0, 0)); }
.cp-thumb, .cp-hthumb {
  position: absolute; z-index: 1;
  width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border-radius: 50%; border: 3px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
.cp-hue {
  position: relative; height: 16px; margin: 16px 4px 0; border-radius: 999px;
  background: linear-gradient(90deg, #f00, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00);
  touch-action: none; cursor: pointer;
}
.cp-hthumb { top: 50%; }
.cp-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.cp-chip { width: 40px; height: 40px; border-radius: 10px; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.cp-hexwrap {
  flex: 1; display: flex; align-items: center; gap: 2px;
  height: 40px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--line-2);
  font: 600 14px/1 var(--body); color: var(--muted);
}
.cp-hexwrap:focus-within { border-color: var(--brand); }
.cp-hex { width: 100%; border: 0; outline: 0; padding: 0; font: 600 14px/1 var(--body); color: var(--ink); text-transform: uppercase; background: none; }
.cp-random { width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: #3b3f43; flex: none; }
.cp-random:hover { border-color: var(--brand); color: var(--brand); }
.cp-random svg { width: 18px; height: 18px; }
.cp-recent { display: flex; gap: 7px; margin-top: 12px; min-height: 0; }
.cp-recent:empty { display: none; }
.cp-recent button { width: 26px; height: 26px; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.cp-done { width: 100%; margin-top: 14px; height: 46px; }
.cp-note { margin: 10px 2px 0; font-size: 11.5px; line-height: 1.4; color: var(--muted); text-align: center; }

/* ---------- extras ---------- */
.extras { display: grid; gap: 11px; margin-top: 20px; }
.extra {
  border: 1.5px solid var(--line); border-radius: 16px; background: #fff;
  transition: border-color 0.2s, box-shadow 0.25s;
}
.extra.is-on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.extra__head { width: 100%; display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; text-align: left; }
.extra__media {
  width: 84px; height: 62px; flex: none; border-radius: 11px; overflow: hidden;
  background: linear-gradient(180deg, #f6f7f9, #eceef1);
  display: grid; place-items: center; color: #6a6e73;
}
.extra__media img { width: 100%; height: 100%; object-fit: contain; }
.extra__media svg { width: 26px; height: 26px; }
.extra__media.is-loading { position: relative; }
.extra__media.is-loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.7) 50%, transparent 80%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.extra__txt { flex: 1; min-width: 0; }
.extra__name { display: block; font: 600 15px/1.2 var(--head); color: var(--ink); }
.extra__desc { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.extra__tick {
  width: 26px; height: 26px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--line-2);
  display: grid; place-items: center; color: transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.extra__tick svg { width: 14px; height: 14px; }
.extra.is-on .extra__tick { background: var(--brand); border-color: var(--brand); color: #fff; }
.extra__more { padding: 2px 14px 14px; display: grid; gap: 12px; }
.extra__more[hidden] { display: none; }
.drop {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 12px; border: 1.5px dashed var(--line-2);
  background: var(--bg); text-align: left; width: 100%;
  font-size: 13px; color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}
.drop:hover, .drop.is-over { border-color: var(--brand); background: #fff7f3; }
.drop__img { width: 46px; height: 46px; border-radius: 9px; background: #fff center / contain no-repeat; box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; color: var(--muted); flex: none; }
.drop__img svg { width: 20px; height: 20px; }
.drop b { display: block; color: var(--ink); font-weight: 600; }
.drop small { color: var(--muted); font-size: 12px; }
.opt-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.opt-row > span { font: 700 10.5px/1 var(--btn); letter-spacing: 0.12em; text-transform: uppercase; color: #6a6e73; min-width: 64px; }
.pill {
  height: 34px; padding: 0 13px; border-radius: 999px;
  border: 1.5px solid var(--line-2);
  font: 600 12.5px/1 var(--body); color: var(--text);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.pill.is-on { border-color: var(--brand); background: var(--brand); color: #fff; }
.range { flex: 1; min-width: 120px; accent-color: var(--brand); height: 34px; }
.switch { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--text); cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 25px; border-radius: 999px; background: #d4d7db; position: relative; transition: background 0.2s; cursor: pointer; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.22s var(--ease); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(17px); }

/* ---------- quote ---------- */
.summary { margin-top: 20px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.sum-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.sum-row + .sum-row { border-top: 1px solid var(--line); }
.sum-row dt, .sum-k { width: 62px; flex: none; font: 700 10px/1 var(--btn); letter-spacing: 0.14em; text-transform: uppercase; color: #8d9196; }
.sum-v { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink); line-height: 1.35; }
.sum-v small { color: var(--muted); font-size: 12.5px; }
.sum-v .dot { width: 16px; height: 16px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.sum-edit { flex: none; font: 700 12px/1 var(--btn); color: var(--brand); padding: 6px 2px; }
.sum-edit:hover { color: var(--brand-ink); text-decoration: underline; }

.form { margin-top: 18px; display: grid; gap: 12px; }
.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.field__label { padding: 0; margin: 0 0 9px; font: 700 10.5px/1 var(--btn); letter-spacing: 0.14em; text-transform: uppercase; color: #4b4f54; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input {
  width: 100%; height: 50px; padding: 0 15px;
  border-radius: 12px; border: 1.5px solid var(--line-2); background: #fff;
  font: 400 15px/1.3 var(--body); color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: #9a9ea3; }
.input:hover { border-color: #b9bdc2; }
.input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.input.is-bad { border-color: #d33a2c; }
.input--area { height: auto; min-height: 84px; padding: 13px 15px; resize: vertical; }
.field__err { margin: 6px 2px 0; min-height: 0; font: 600 12.5px/1.3 var(--body); color: #d33a2c; }
.field__err:empty { display: none; }
.consent { display: flex; align-items: flex-start; gap: 11px; font-size: 13px; line-height: 1.45; color: var(--text); cursor: pointer; margin-top: 2px; }
.consent input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--brand); cursor: pointer; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn-submit { margin-top: 4px; }
.btn-submit.is-busy span { opacity: 0.85; }
.btn-submit.is-busy::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.form__err { margin: 0; font: 600 13px/1.4 var(--body); color: #d33a2c; text-align: center; }
.form__err:empty { display: none; }
.form__call { margin: 2px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.form__call a { color: var(--brand); font-weight: 600; text-decoration: none; }
.link-back { display: inline-flex; align-items: center; gap: 4px; margin-top: 22px; font: 700 12px/1 var(--btn); letter-spacing: 0.04em; color: #5d6166; padding: 6px 0; }
.link-back:hover { color: var(--ink); }
.link-back .i { width: 15px; height: 15px; }
.link-back--center { margin: 6px auto 0; display: flex; }

.done { text-align: center; padding-top: 18px; animation: stepIn 0.4s var(--ease) both; }
.done__check {
  width: 74px; height: 74px; margin: 0 auto 18px; border-radius: 50%;
  background: linear-gradient(180deg, #2b8ff0, var(--brand));
  box-shadow: 0 14px 30px -10px rgba(11, 114, 218, 0.6);
  position: relative;
  animation: pop 0.5s var(--ease) both 0.05s;
}
.done__check::after { content: ""; position: absolute; left: 25px; top: 23px; width: 24px; height: 13px; border: solid #fff; border-width: 0 0 4px 4px; transform: rotate(-45deg); }
@keyframes pop { from { transform: scale(0.5); opacity: 0; } to { transform: none; opacity: 1; } }
.done__actions { display: grid; gap: 10px; margin-top: 24px; }
.done__actions .i { width: 17px; height: 17px; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  :root { --panel-w: 400px; }
  .cards--looks, .cards--styles { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- phone ---------- */
@media (max-width: 860px) {
  :root { --topbar: 60px; --viewer-h: clamp(240px, 43dvh, 460px); }
  .topbar { padding: 0 16px; gap: 12px; }
  .brand img { height: 38px; }
  .brand__divider, .brand__label, .topbar__phone { display: none; }
  .topbar__quote { height: 40px; padding: 0 16px; font-size: 12.5px; }
  .app { display: flex; flex-direction: column; }
  .viewer { flex: none; height: var(--viewer-h); transition: height 0.35s var(--ease); }
  body.step-quote .viewer { --viewer-h: clamp(170px, 27dvh, 300px); }
  body.kb-open .viewer { height: 0; }
  .viewer__tools { top: 12px; left: 12px; gap: 6px; }
  .tool { width: 38px; height: 38px; border-radius: 11px; }
  .tool svg { width: 17px; height: 17px; }
  .hint { bottom: 12px; font-size: 12px; padding: 8px 13px; }
  .toast { top: 12px; }
  .panel { flex: 1; min-height: 0; border-left: 0; border-top: 1px solid var(--line); }
  .steps { padding: 12px 16px 0; gap: 6px; }
  .steps button { gap: 8px; padding-bottom: 11px; font-size: 10px; letter-spacing: 0.08em; }
  .steps__bar { height: 3.5px; }
  .panel__body { padding: 18px 16px 22px; }
  .step h2 { font-size: 22px; }
  .step__lead { font-size: 13.5px; }
  .label { margin-top: 20px; }
  .panel__nav { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .btn-back { min-width: 54px; width: 54px; padding: 0; }
  .btn-back__txt { display: none; }
  .btn-back .i { width: 20px; height: 20px; }
  /* Horizontal card rails on phones */
  .cards--courts, .cards--looks {
    display: grid; grid-auto-flow: column; grid-template-columns: none;
    grid-auto-columns: 44%;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding: 0 16px;
    margin-left: -16px; margin-right: -16px; padding: 4px 16px 6px;
    scrollbar-width: none;
  }
  .cards--looks { grid-auto-columns: 36%; }
  .cards--courts::-webkit-scrollbar, .cards--looks::-webkit-scrollbar { display: none; }
  .cards--courts .card, .cards--looks .card { scroll-snap-align: start; }
  .cards--courts { margin-top: 16px; grid-auto-columns: 47%; }
  .cards--courts .card__name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cards--courts .card__meta { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cards--styles { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cards--styles .card__meta { display: none; }
  .stats { margin-top: 14px; }
  .stats dd { font-size: 15px; }
  .swatches { gap: 8px; }
  .field-row { grid-template-columns: 1fr; }
  .input { font-size: 16px; }
  .cp { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; border-radius: 22px 22px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); transform: translateY(30px); }
  .cp.is-on { transform: none; }
  .cp-sv { height: 190px; }
  .cp-hue { height: 22px; }
}
@media (max-width: 380px) {
  .cards--courts { grid-auto-columns: 48%; }
  .cards--styles .card__name { font-size: 11.5px; }
  .seg button { font-size: 12px; gap: 6px; padding: 0 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Adam's call, Nov 7: sizes, fence and light options, pergola photo, blended lines ---------- */
.sizes .label { margin-top: 18px; }
.seg--sizes { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.seg--sizes button { flex-direction: column; gap: 3px; padding: 9px 6px; line-height: 1.15; text-align: center; }
.seg--sizes button b { font: 700 10px/1 var(--btn); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.seg--sizes button.is-on b { color: var(--brand); }
.seg--sizes button span { font: 600 13.5px/1.1 var(--head); }
.pills { display: flex; flex-wrap: wrap; gap: 7px; flex: 1; min-width: 0; }
.extra__more .opt-row { align-items: flex-start; }
.extra__more .opt-row > span { padding-top: 12px; }
.opt-help { margin: -4px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.extra__media--photo { background: #dfe3e6; }
.extra__media--photo img { object-fit: cover; }
.extra__photo { margin: 0; border-radius: 12px; overflow: hidden; background: #eef0f2; }
.extra__photo img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.extra__photo figcaption { padding: 9px 11px 10px; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.sw--blend { background: conic-gradient(from 0deg, #8fb1d6, #3f6e8f, #7f9f6a, #4f6a3f, #b7b7bd, #6b6b72, #8fb1d6); }
.cards--pb { grid-template-columns: repeat(2, 1fr); }

/* "See it in your yard" button on the 3D view */
.yard-btn {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 15px 0 12px;
  border-radius: 12px; background: var(--ink); color: #fff;
  font: 700 13px/1 var(--btn); letter-spacing: 0.01em; box-shadow: var(--shadow-md);
  transition: transform 0.15s var(--ease), background 0.2s;
}
.yard-btn:hover { background: #000; transform: translateY(-1px); }
.yard-btn .i { width: 19px; height: 19px; display: grid; }
.yard-btn .i svg { width: 19px; height: 19px; }
.link-yard { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 12px 0 2px; height: 44px; border-radius: 12px;
  border: 1.5px solid var(--line-2); background: #fff; font: 700 13px/1 var(--btn); color: var(--ink); }
.link-yard:hover { border-color: var(--brand); color: var(--brand-ink); }
.link-yard .i, .link-yard .i svg { width: 18px; height: 18px; display: grid; }
.done__actions .btn-ghost .i { width: 17px; height: 17px; display: inline-grid; }

/* The yard view: camera or photo behind a see-through 3D court */
body.yard-open { overflow: hidden; }
.yard { position: fixed; inset: 0; z-index: 200; background: #0d0f11; color: #fff; }
.yard[hidden] { display: none; }
.yard__stage { position: absolute; inset: 0; overflow: hidden; }
.yard__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.yard__bg[hidden] { display: none; }
.yard__gl { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.yard__gl:active { cursor: grabbing; }
.yard__tag { position: absolute; left: 14px; bottom: calc(176px + env(safe-area-inset-bottom)); padding: 6px 10px; border-radius: 999px;
  background: rgba(17, 18, 20, 0.6); font: 700 10.5px/1 var(--btn); letter-spacing: 0.1em; text-transform: uppercase; pointer-events: none; }
.yard__top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top)) 14px 12px; background: linear-gradient(rgba(0, 0, 0, 0.55), transparent); pointer-events: none; }
.yard__title { font: 600 16px/1 var(--head); }
.yard__x { pointer-events: auto; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); color: #fff; display: grid; place-items: center; }
.yard__x svg { width: 18px; height: 18px; }
.yard__start, .yard__result { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(13, 15, 17, 0.72); }
.yard__start[hidden], .yard__result[hidden], .yard__bar[hidden] { display: none; }
.yard__card { width: min(420px, 100%); background: #fff; color: var(--text); border-radius: 20px; padding: 24px 22px 18px; text-align: center; display: grid; gap: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); }
.yard__card h3 { margin: 4px 0 0; font: 600 21px/1.2 var(--head); color: var(--ink); }
.yard__card p { margin: 0 0 6px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.yard__card .btn-primary .i, .yard__card .btn-ghost .i { width: 18px; height: 18px; display: inline-grid; }
.yard__card .btn-primary .i svg, .yard__card .btn-ghost .i svg { width: 18px; height: 18px; }
.yard__icon { justify-self: center; width: 52px; height: 52px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.yard__icon svg { width: 28px; height: 28px; }
.yard__fine { font-size: 12px !important; margin: 4px 0 0 !important; }
.yard__result img { width: 100%; border-radius: 12px; display: block; max-height: 52vh; object-fit: contain; background: #111; }
.yard__bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.62) 30%); display: grid; gap: 10px; }
.yard__hint { margin: 0; text-align: center; font-size: 12.5px; color: rgba(255, 255, 255, 0.85); }
.yard__row { display: flex; align-items: center; justify-content: center; gap: 14px; }
.yard__row--main { justify-content: space-between; max-width: 360px; width: 100%; margin: 0 auto; }
.yard__btn { width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); color: #fff; display: grid; place-items: center; flex: none; }
.yard__btn svg { width: 20px; height: 20px; }
.yard__tilt { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 240px; font: 700 10.5px/1 var(--btn); letter-spacing: 0.1em; text-transform: uppercase; }
.yard__tilt input { flex: 1; accent-color: var(--brand); }
.yard__text { min-width: 92px; height: 40px; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); color: #fff; font: 700 12.5px/1 var(--btn); }
.yard__shutter { width: 74px; height: 74px; border-radius: 50%; border: 4px solid #fff; background: transparent; display: grid; place-items: center; }
.yard__shutter i { width: 58px; height: 58px; border-radius: 50%; background: var(--brand); transition: transform 0.15s; }
.yard__shutter:active i { transform: scale(0.9); }
.yard__toast { position: absolute; top: calc(70px + env(safe-area-inset-top)); left: 50%; transform: translate(-50%, -8px); max-width: calc(100% - 32px);
  padding: 10px 15px; border-radius: 12px; background: rgba(17, 18, 20, 0.85); font-size: 13px; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
.yard__toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  .yard-btn { top: 12px; right: 12px; height: 38px; padding: 0 12px 0 10px; font-size: 12px; border-radius: 11px; }
  .seg--sizes button span { font-size: 12.5px; }
}
@media (max-width: 380px) {
  .yard-btn span:last-child { display: none; }
  .yard-btn { padding: 0 10px; }
}
.cards--courts > .sizes { grid-column: 1 / -1; margin: -2px 0 4px; }
.cards--courts > .sizes .label { margin-top: 2px; }

/* ---------- SH Courts (Founders Freedom Concept) ---------- */
:root { --navy: #14213a; }
/* The Jack Sock Signature look: his name, then "Signature" in script in his red (his Selkirk paddle: red, black and white) */
.card__sig { display: block; font: 400 21px/0.9 "Allura", cursive; font-style: normal; color: #cc372c; margin-top: 1px; letter-spacing: 0; text-transform: none; }
.card.is-on .card__sig { color: #b02a20; }
