/* Booth tent templates (tables / walls / racks / cases) + maker lineup + house tent + preview mode.
   Data-driven: booth JSON "template" -> <div class="booth-tent booth-tent--{template}">. Mirrors tools/build_booths.py + js/booth-gen.js.
   Booth colors (--booth-*) drive drapes, rails, pegboard and case trim; the KR frame (prices, buttons) stays gold. */

.booth-tent { position: relative; margin-top: 8px; border-radius: 12px; overflow: hidden; background: #0c0d10; border: 1px solid rgba(255,255,255,.07); }
.booth-tent__canopy { position: relative; height: 26px; background: linear-gradient(#15171b, #0c0d10); }
.booth-tent__canopy .fair-awning { top: 0; height: 26px; }
.tent-items {
  list-style: none; margin: 0; padding: 26px 18px 0; display: grid;
  grid-template-columns: repeat(var(--n, 4), minmax(168px, 1fr)); grid-template-rows: auto auto; column-gap: 0;
  overflow-x: auto; scroll-snap-type: x proximity;
}
.tent-item { display: grid; grid-row: span 2; grid-template-rows: subgrid; scroll-snap-align: start; min-width: 0; }
.tent-item__media { position: relative; aspect-ratio: 1 / 1; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; padding: 18px 16px; min-height: 0; }
.tent-item__media > img { min-height: 0; max-height: 100%; }
.tent-item__media img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 14px 22px rgba(0,0,0,.55)); position: relative; z-index: 1; }
.tent-item__media--cover img { object-fit: cover; border-radius: 6px; }
.tent-item__ph { width: 100%; height: 100%; position: relative; z-index: 1; }
.tent-item__media .render-note { z-index: 3; left: 20px; bottom: 22px; }
.tent-item__tag { margin: 0 8px 18px; padding: 14px 14px 16px; background: var(--lux-panel); border: 1px solid rgba(201,169,98,.14); border-radius: 8px; display: flex; flex-direction: column; gap: 7px; }
.tent-item__tag h3 { margin: 0; font: 600 1rem/1.3 var(--font-body); color: var(--lux-cream); }
.tent-item:hover .tent-item__tag, .tent-item:focus-within .tent-item__tag { border-color: color-mix(in srgb, var(--booth-1-text) 60%, transparent); }

/* TABLES: draped table, merch laid on top */
.booth-tent--tables .tent-items { background: radial-gradient(ellipse 70% 60% at 50% 30%, rgba(255,240,200,.05), transparent 70%); }
.booth-tent--tables .tent-item__media { padding-bottom: 56px; }
.booth-tent--tables .tent-item__media::before { /* table top */
  content: ""; position: absolute; left: 0; right: 0; bottom: 38px; height: 16px;
  background: linear-gradient(#f5f2eb14, #0000), var(--booth-2); box-shadow: inset 0 2px 0 rgba(255,255,255,.12);
}
.booth-tent--tables .tent-item__media::after { /* drape (skirt) with scallops */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40px;
  background: repeating-linear-gradient(90deg, var(--booth-1) 0 22px, color-mix(in srgb, var(--booth-1) 70%, #000) 22px 30px);
  -webkit-mask: radial-gradient(circle 11px at 15px 29px, #000 98%, transparent) 0 0 / 30px 100% repeat-x, linear-gradient(#000,#000) 0 0 / 100% 29px no-repeat; mask: radial-gradient(circle 11px at 15px 29px, #000 98%, transparent) 0 0 / 30px 100% repeat-x, linear-gradient(#000,#000) 0 0 / 100% 29px no-repeat;
}
.booth-tent--tables .tent-item__media img, .booth-tent--tables .tent-item__ph { align-self: end; }
.booth-tent--tables .tent-item__media { padding-top: 8px; }

/* WALLS: pegboard / gallery wall, framed pieces on hooks */
.booth-tent--walls .tent-items {
  background-color: color-mix(in srgb, var(--booth-field) 70%, #16181c);
  background-image: radial-gradient(circle 2.5px, rgba(0,0,0,.55) 98%, transparent), linear-gradient(rgba(255,255,255,.03), rgba(255,255,255,0));
  background-size: 26px 26px, 100% 100%; background-position: 13px 13px, 0 0;
}
.booth-tent--walls .tent-item__media { padding: 34px 26px 22px; }
.booth-tent--walls .tent-item__media::before { /* hook + wire */
  content: ""; position: absolute; top: 10px; left: 50%; width: 46%; height: 30px; transform: translateX(-50%);
  border: 1.5px solid rgba(245,242,235,.35); border-bottom: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: transparent;
}
.booth-tent--walls .tent-item__media::after { content: ""; position: absolute; top: 6px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #9a948b; box-shadow: 0 1px 2px #000; }
.booth-tent--walls .tent-item__media img, .booth-tent--walls .tent-item__ph {
  background: #08080A; padding: 8px; box-sizing: border-box; border: 6px solid color-mix(in srgb, var(--booth-3) 55%, #2a2520);
  box-shadow: 0 16px 26px rgba(0,0,0,.55); filter: none; border-radius: 2px;
}
.booth-tent--walls .tent-item:nth-child(even) .tent-item__media img { transform: rotate(-1.2deg); }
.booth-tent--walls .tent-item:nth-child(3n) .tent-item__media img { transform: rotate(1deg); }

/* RACKS: apparel rail + hangers */
.booth-tent--racks .tent-items { position: relative; background: linear-gradient(#0f1014, #0a0b0d); }
.booth-tent--racks .tent-items::before { /* rail */
  content: ""; position: absolute; left: 10px; right: 10px; top: 30px; height: 6px; border-radius: 3px;
  background: linear-gradient(#d8d4cc, #7d7a74); box-shadow: 0 2px 6px rgba(0,0,0,.6); z-index: 2; min-width: calc(var(--n) * 200px - 20px);
}
.booth-tent--racks .tent-item__media { padding: 44px 22px 16px; }
.booth-tent--racks .tent-item__media::before { /* hanger hook + shoulders */
  content: ""; position: absolute; top: 4px; left: 50%; width: 58%; height: 44px; transform: translateX(-50%); z-index: 2;
  background:
    radial-gradient(circle 9px at 50% 9px, transparent 6.5px, #cfc9bf 7px 8.5px, transparent 9px) no-repeat,
    linear-gradient(to bottom right, transparent calc(50% - 1.5px), var(--booth-2) calc(50% - 1.5px) calc(50% + 1.5px), transparent calc(50% + 1.5px)) 0 22px / 50% 22px no-repeat,
    linear-gradient(to bottom left, transparent calc(50% - 1.5px), var(--booth-2) calc(50% - 1.5px) calc(50% + 1.5px), transparent calc(50% + 1.5px)) 100% 22px / 50% 22px no-repeat;
}
.booth-tent--racks .tent-item__media img, .booth-tent--racks .tent-item__ph {
  background: color-mix(in srgb, var(--booth-1) 18%, #111317); border-radius: 10px 10px 6px 6px; padding: 12px; box-sizing: border-box;
  border-top: 3px solid var(--booth-1); transform-origin: 50% 0; animation: tent-sway 6s ease-in-out infinite;
}
.booth-tent--racks .tent-item:nth-child(2n) .tent-item__media img, .booth-tent--racks .tent-item:nth-child(2n) .tent-item__ph { animation-delay: -2s; }
.tent-item__ph--apparel { clip-path: polygon(22% 0, 38% 0, 44% 8%, 56% 8%, 62% 0, 78% 0, 100% 16%, 90% 32%, 80% 26%, 80% 100%, 20% 100%, 20% 26%, 10% 32%, 0 16%); padding-top: 26% !important; }
@keyframes tent-sway { 0%,100% { transform: rotate(-.6deg); } 50% { transform: rotate(.6deg); } }

/* CASES: lit glass jewelry / coin case */
.booth-tent--cases .tent-items { padding-top: 22px; background: linear-gradient(#0c0d10, #08080A); }
.booth-tent--cases .tent-item__media {
  margin: 0; padding: 26px 20px 30px;
  background:
    radial-gradient(ellipse 60% 48% at 50% 0, rgba(255,244,214,.22), transparent 70%),
    radial-gradient(ellipse 50% 14% at 50% 88%, rgba(0,0,0,.6), transparent 70%),
    linear-gradient(color-mix(in srgb, var(--booth-field) 60%, #121016), #0a090c);
  border-top: 3px solid rgba(255,248,230,.55); border-bottom: 10px solid color-mix(in srgb, var(--booth-3) 40%, #1b1a1d);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
}
.booth-tent--cases .tent-item:first-child .tent-item__media { border-left: 3px solid rgba(255,248,230,.28); border-top-left-radius: 8px; }
.booth-tent--cases .tent-item:last-child .tent-item__media { border-right: 3px solid rgba(255,248,230,.28); border-top-right-radius: 8px; }
.booth-tent--cases .tent-item__media::after { /* glass sheen */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(115deg, rgba(255,255,255,.10) 0 18%, transparent 30% 62%, rgba(255,255,255,.05) 70%, transparent 80%);
}
.booth-tent--cases .tent-item__media img { width: 82%; height: 82%; filter: drop-shadow(0 10px 18px rgba(0,0,0,.7)) drop-shadow(0 0 16px rgba(255,236,190,.12)); }
.booth-tent--cases .tent-item__tag { margin-top: 14px; }

@media (max-width: 760px) {
  .tent-items { grid-template-columns: repeat(var(--n, 4), 74vw); padding-left: 10px; padding-right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .booth-tent--racks .tent-item__media img, .booth-tent--racks .tent-item__ph { animation: none; }
}

/* ---------- Maker lineup (sauces) ---------- */
.sauce-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; max-width: 900px; }
.sauce-card { background: var(--lux-panel); border: 1px solid rgba(255,255,255,.07); border-radius: 10px; overflow: hidden; border-top: 3px solid var(--booth-1); }
.sauce-card__media { position: relative; aspect-ratio: 4 / 5; background: #08080A; }
.sauce-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sauce-card__media .band-ph { position: absolute; inset: 0; border-radius: 0; }
.sauce-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.sauce-card__body h3 { margin: 0; font: 400 1.35rem var(--booth-font), var(--font-display); color: var(--lux-cream); }
.sauce-card__heat { margin: 0; color: var(--booth-1-text); font-size: .86rem; letter-spacing: .04em; }

/* ---------- SAMPLE + house ---------- */
.booth-chip--sample { background: #3a0f0f; border-color: #f0b4b4; color: #ffd6d6; }
.pending-tag--sample { background: rgba(240,180,180,.14); border-color: #f0b4b4; color: #ffd6d6; }
.booth-profile-img { display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, rgba(201,169,98,.14), #08080A 70%); border-radius: 8px; }
.booth-profile-img img { width: 82%; height: 82%; object-fit: contain; }
.fair-booth[data-booth-type="house"] { flex-basis: clamp(280px, 34%, 400px); }
.fair-booth[data-booth-type="house"] .fair-booth__link { border-color: rgba(201,169,98,.55); box-shadow: 0 0 0 1px rgba(201,169,98,.18), 0 20px 50px rgba(201,169,98,.08); }
.fair-booth[data-booth-type="house"] .fair-awning { background: repeating-linear-gradient(90deg, #C9A962 0 28px, #08080A 28px 56px); height: 26px; top: -18px; }
.fair-booth[data-booth-type="house"] .fair-booth__name { font-family: var(--font-display); text-transform: none; font-size: 1.7rem; }
.page-booth--house .band-h2 em, .page-booth--house .band-about h2 em { color: var(--lux-gold); }

/* ---------- Tent thumbnails (join.html step + preview card) ---------- */
.tent-thumb { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: #0c0d10; }
.tent-thumb::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12%; background: repeating-linear-gradient(90deg, var(--booth-1, #5a5e66) 0 12%, var(--booth-2, #3a3d44) 12% 24%); }
.tent-thumb i { position: absolute; display: block; }
.tent-thumb--tables i:nth-child(1) { left: 8%; right: 8%; top: 58%; height: 7%; background: var(--booth-2, #6b7079); }
.tent-thumb--tables i:nth-child(2) { left: 8%; right: 8%; top: 65%; height: 22%; background: repeating-linear-gradient(90deg, var(--booth-1, #4a4e56) 0 10px, color-mix(in srgb, var(--booth-1, #4a4e56) 70%, #000) 10px 14px); border-radius: 0 0 6px 6px; }
.tent-thumb--tables i:nth-child(3) { left: 18%; width: 16%; top: 38%; height: 20%; background: #d9cfb8; border-radius: 3px; box-shadow: 30px -4px 0 #b9a27a, 62px 2px 0 #e8e1d3, 94px -2px 0 #c7b58f; }
.tent-thumb--walls { background-color: #1a1c20; background-image: radial-gradient(circle 1.5px, rgba(0,0,0,.6) 98%, transparent); background-size: 12px 12px; }
.tent-thumb--walls i:nth-child(1) { left: 12%; top: 26%; width: 22%; height: 34%; border: 3px solid var(--booth-3, #6b7079); background: #d9cfb8; }
.tent-thumb--walls i:nth-child(2) { left: 42%; top: 22%; width: 18%; height: 44%; border: 3px solid var(--booth-3, #6b7079); background: #b9a27a; }
.tent-thumb--walls i:nth-child(3) { left: 68%; top: 30%; width: 20%; height: 30%; border: 3px solid var(--booth-3, #6b7079); background: #e8e1d3; }
.tent-thumb--racks i:nth-child(1) { left: 6%; right: 6%; top: 26%; height: 4%; background: #cfc9bf; border-radius: 3px; }
.tent-thumb--racks i:nth-child(2), .tent-thumb--racks i:nth-child(3) { top: 32%; width: 22%; height: 50%; background: var(--booth-1, #4a4e56); clip-path: polygon(22% 0, 78% 0, 100% 16%, 88% 30%, 80% 26%, 80% 100%, 20% 100%, 20% 26%, 12% 30%, 0 16%); }
.tent-thumb--racks i:nth-child(2) { left: 18%; } .tent-thumb--racks i:nth-child(3) { left: 58%; background: var(--booth-2, #6b7079); }
.tent-thumb--cases i:nth-child(1) { left: 8%; right: 8%; top: 30%; height: 48%; background: radial-gradient(ellipse 60% 50% at 50% 0, rgba(255,244,214,.35), transparent 70%), #121016; border-top: 2px solid rgba(255,248,230,.6); border-bottom: 5px solid var(--booth-3, #2f3238); }
.tent-thumb--cases i:nth-child(2) { left: 22%; top: 46%; width: 14%; aspect-ratio: 1; border-radius: 50%; background: #d9b86a; box-shadow: 40px 0 0 #c7c7c7, 80px 0 0 #b98a4a; }
.tent-thumb--cases i:nth-child(3) { display: none; }

/* ---------- Preview mode (join.html "View booth") + template demo banner ---------- */
.booth-preview-banner {
  position: sticky; top: 0; z-index: 95; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 16px; background: #2a0f0f; border-bottom: 1px solid #f0b4b4; color: #ffe3e3; font: 600 .86rem var(--font-body); text-align: center;
}
.booth-preview-banner--demo { background: #14161a; border-color: rgba(201,169,98,.5); color: var(--lux-cream); }
.booth-preview-banner button { cursor: pointer; }
.booth-preview-banner .lux-btn-fill, .booth-preview-banner .lux-btn-ghost { padding: 7px 16px; font-size: .82rem; }
body.is-booth-preview > main:not(#booth-preview-main) > section, body.is-booth-preview > footer, body.is-booth-preview .join-hide-in-preview { display: none !important; }
body.is-booth-preview #booth-preview-main { display: block !important; }
#booth-preview-main[hidden] { display: none; }
.booth-preview-state { max-width: 40rem; margin: 40px auto 0; text-align: center; }

/* ---------- join.html additions (maker type, sauces, tent step, view booth) ---------- */
.join-types--3 { grid-template-columns: repeat(3, 1fr); }
.join-sauce { display: grid; grid-template-columns: 1fr 130px; gap: 10px; margin-bottom: 10px; }
.join-sauce input, .join-sauce select { width: 100%; }
.join-suggest { margin: 0 0 14px; color: var(--lux-cream); font-size: .95rem; }
.join-suggest strong { color: var(--lux-gold); }
.join-tents { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.join-tent { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 12px; background: var(--lux-panel); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; color: var(--lux-cream); cursor: pointer; font: inherit; }
.join-tent strong { font-size: 1.02rem; } .join-tent small { color: var(--lux-muted, #a8a39a); font-size: .82rem; line-height: 1.4; }
.join-tent[aria-checked="true"] { border-color: var(--lux-gold); box-shadow: 0 0 0 1px var(--lux-gold); }
.join-tent:focus-visible { outline: 2px solid var(--lux-gold); outline-offset: 2px; }
.join-tent .is-suggested-tag { align-self: flex-start; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: #08080A; background: var(--lux-gold); border-radius: 99px; padding: 2px 8px; }
.join-files { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.join-files li { display: flex; align-items: center; gap: 8px; background: #111216; border: 1px solid rgba(255,255,255,.1); border-radius: 6px; padding: 4px 8px 4px 4px; font-size: .8rem; color: var(--lux-cream); }
.join-files img { width: 34px; height: 42px; object-fit: cover; border-radius: 3px; }
.join-view { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 18px; }
.join-dev-btn { background: none; border: 1px dashed rgba(255,255,255,.25); color: var(--lux-muted, #a8a39a); border-radius: 6px; padding: 7px 12px; font: 500 .78rem var(--font-body); cursor: pointer; }
.fair-booth__tent { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.fair-booth__tent + .fair-booth__ph { inset: auto auto 12px 10px; z-index: 1; padding: 4px 9px; font-size: .68rem; min-height: 0; background: rgba(8,8,10,.78); border-radius: 4px; }
.fair-booth__tent + .fair-booth__ph[hidden] { display: none; }
@media (max-width: 760px) { .join-types--3 { grid-template-columns: 1fr; } .join-tents { grid-template-columns: 1fr 1fr; } }

/* ---------- Pending state (curated/visibility.json has the booth's pieces OFF) ---------- */
.booth-chip--pending { background: rgba(245,242,235,.08); border-color: rgba(245,242,235,.45); color: var(--lux-cream); }
.fair-booth[data-pending="true"] .fair-booth__status { color: var(--lux-cream); }
.fair-booth[data-pending="true"] .fair-booth__ph { display: grid; place-items: center; font: 400 1.4rem var(--booth-font, var(--font-display)); letter-spacing: .08em; color: var(--booth-1-text, var(--lux-cream)); text-transform: uppercase; }
