/* Public generator pages (2026-10-29). GG host: black, white and very light grey. S&D host: blue-led
   (.gp--sd). No orange, amber or gold anywhere; text on black is always white. */
.gp { --gp-ink: #111; --gp-mid: #4a4f57; --gp-line: #dfe3e8; --gp-pale: #f4f5f7; --gp-acc: #111; --gp-acc-ink: #fff; --gp-focus: #2563eb; --gp-stage: #0c0d10; }
.gp--sd { --gp-acc: #1d4ed8; --gp-acc-ink: #fff; --gp-stage: #0b1220; }
.gp { max-width: 1240px; margin: 0 auto; padding: 1.5rem 1.1rem 4rem; color: var(--gp-ink); }
.gp h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin: .2rem 0 .4rem; line-height: 1.15; }
.gp-lede { color: var(--gp-mid); max-width: 760px; margin: 0 0 1.1rem; line-height: 1.55; }
.gp-crumbs { font-size: .85rem; color: var(--gp-mid); margin-bottom: .6rem; }
.gp-crumbs a { color: inherit; }
.gp-crumbs span { margin: 0 .35rem; }
.gp-step { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gp-mid); margin: 1.2rem 0 .5rem; font-weight: 700; }
.gp-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; margin-bottom: 1.2rem; }
.gp-preset { position: relative; display: flex; flex-direction: column; gap: .2rem; padding: .7rem .8rem; border: 1.5px solid var(--gp-line); border-radius: 10px; background: #fff; cursor: pointer; min-height: 44px; }
.gp-preset input { position: absolute; opacity: 0; pointer-events: none; }
.gp-preset strong { font-size: .95rem; }
.gp-preset span { font-size: .8rem; color: var(--gp-mid); line-height: 1.35; }
.gp-preset:hover { border-color: #9aa3ad; }
.gp-preset.is-on, .gp-preset:has(input:checked) { border-color: var(--gp-acc); box-shadow: 0 0 0 2px var(--gp-acc) inset; background: var(--gp-pale); }
.gp-preset:focus-within { outline: 2px solid var(--gp-focus); outline-offset: 2px; }
.gp-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.gp-view { position: sticky; top: .8rem; }
.gp-stage { position: relative; aspect-ratio: 4 / 3; background: var(--gp-stage); border-radius: 12px; overflow: hidden; }
.gp-canvas { position: absolute; inset: 0; }
.gp-canvas canvas { display: block; width: 100% !important; height: 100% !important; touch-action: none; }
.gp-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; text-align: center; padding: 1rem; }
.gp-fallback p { margin: .2rem 0; color: #fff; }
.gp-fallback[hidden], .gp-busy[hidden], #gpShip[hidden] { display: none; }
/* Picture-only presets (switch plate STLflix kits, 2026-10-30): a server-rendered picture over the 3D stage, never a mesh */
.gp-picture { position: absolute; inset: 0; z-index: 3; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; padding: .75rem; background: var(--gp-stage); }
.gp-picture[hidden] { display: none; }
.gp-picture__img { display: flex; justify-content: center; max-height: 82%; }
.gp-picture__img img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 8px; }
.gp-picture figcaption { color: #fff; font-size: .85rem; line-height: 1.35; text-align: center; max-width: 52ch; }
.gp-stage.is-picture .gp-toolbar, .gp-stage.is-picture .gp-dims { display: none; }
.gp-pic-note { display: none; }
.gp-controls.is-picture .gp-pic-note { display: block; padding: .75rem; border: 1px solid var(--gp-line); border-radius: 8px; background: var(--gp-pale); color: var(--gp-ink); }
.gp-controls.is-picture .gp-group, .gp-controls.is-picture .gp-addon { display: none; }
.gp-credit a { color: inherit; }
.gp-busy { position: absolute; top: .6rem; right: .6rem; background: rgba(255,255,255,.92); color: #111; font-size: .78rem; padding: .25rem .6rem; border-radius: 999px; }
.gp-toolbar { position: absolute; left: .6rem; top: .6rem; display: flex; gap: .4rem; }
.gp-tool { background: rgba(255,255,255,.92); color: #111; border: 0; border-radius: 6px; padding: .35rem .6rem; font-size: .8rem; cursor: pointer; min-height: 32px; }
.gp-tool[aria-pressed="true"] { background: #fff; box-shadow: 0 0 0 2px var(--gp-focus) inset; }
.gp-dims { position: absolute; left: .6rem; bottom: .6rem; color: #fff; background: rgba(0,0,0,.55); padding: .3rem .55rem; border-radius: 6px; font-size: .82rem; }
.gp-dims span { display: block; font-size: .74rem; color: #fff; opacity: .9; }
.gp-notes { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .35rem; }
.gp-note { font-size: .85rem; padding: .45rem .6rem; border-radius: 6px; border-left: 3px solid #9aa3ad; background: var(--gp-pale); }
.gp-note--err { border-color: #b91c1c; background: #fdf2f2; }
.gp-note--adj, .gp-note--info { border-color: #2563eb; background: #eef3fd; }
.gp-note--warn { border-color: #6d28d9; background: #f4f0fd; }
/* large piece note (gg_pub_large), by the request button and in the thank-you message: white text on dark */
.gp-large { margin: .8rem 0 0; padding: .6rem .8rem; border-radius: 8px; background: var(--gp-stage); color: #fff; font-size: .9rem; line-height: 1.4; }
.gp-large[hidden] { display: none; }
.gp-fine { font-size: .8rem; color: var(--gp-mid); margin: .6rem 0 0; }
.gp-controls { display: grid; gap: .9rem; }
.gp-group { border: 1px solid var(--gp-line); border-radius: 10px; padding: .7rem .9rem .9rem; margin: 0; background: #fff; }
.gp-group legend { font-weight: 700; padding: 0 .3rem; }
.gp-field { margin: .55rem 0; }
.gp-field[hidden] { display: none; }
.gp-field label, .gp-lbl { font-weight: 600; font-size: .9rem; }
.gp-field__top { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.gp-num { display: inline-flex; align-items: center; gap: .25rem; }
.gp-num input { width: 6.2rem; padding: .35rem .45rem; border: 1px solid #c3c9d0; border-radius: 6px; font-size: .95rem; }
.gp-unit { font-size: .8rem; color: var(--gp-mid); }
.gp-range { width: 100%; accent-color: var(--gp-acc); margin-top: .35rem; }
.gp-help { font-size: .8rem; color: var(--gp-mid); margin-top: .25rem; line-height: 1.4; }
.gp-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem; }
.gp-chip input { position: absolute; opacity: 0; }
.gp-chip span { display: inline-block; padding: .4rem .75rem; border: 1.5px solid var(--gp-line); border-radius: 999px; font-size: .85rem; cursor: pointer; min-height: 36px; line-height: 1.3; }
.gp-chip input:checked + span { border-color: var(--gp-acc); background: var(--gp-acc); color: var(--gp-acc-ink); }
.gp-chip input:focus-visible + span { outline: 2px solid var(--gp-focus); outline-offset: 2px; }
.gp-toggle { display: flex; gap: .5rem; align-items: center; cursor: pointer; }
.gp-toggle input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--gp-acc); }
.gp select, .gp input[type=text], .gp input[type=email], .gp input[type=tel], .gp input[type=date], .gp input[type=file], .gp textarea, .gp .gp-f input[type=number] {
  width: 100%; box-sizing: border-box; padding: .5rem .6rem; border: 1px solid #c3c9d0; border-radius: 6px; font: inherit; background: #fff; color: #111; margin-top: .25rem; }
.gp-request { margin-top: 1.6rem; border: 1px solid var(--gp-line); border-radius: 12px; padding: 1.1rem; background: var(--gp-pale); }
.gp-request h2 { margin: 0 0 .3rem; font-size: 1.25rem; }
.gp-f { margin: .55rem 0; flex: 1; }
.gp-f label { font-weight: 600; font-size: .9rem; }
.gp-row { display: flex; gap: .8rem; flex-wrap: wrap; }
.gp-row > .gp-f { min-width: 150px; }
.gp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.gp-btn { display: inline-block; background: var(--gp-acc); color: var(--gp-acc-ink); border: 0; border-radius: 8px; padding: .8rem 1.3rem; font-weight: 700; font-size: 1rem; cursor: pointer; text-decoration: none; min-height: 44px; }
.gp-btn:hover { filter: brightness(1.15); }
.gp-btn--ghost { background: #fff; color: #111; border: 1.5px solid #111; }
.gp-alert { padding: .8rem 1rem; border-radius: 8px; margin: .8rem 0; }
.gp-alert--ok { background: #eef7f0; border: 1px solid #b7dcc0; }
.gp-alert--err { background: #fdf2f2; border: 1px solid #f0c2c2; }
.gp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-top: 1rem; }
.gp-card { display: block; border: 1px solid var(--gp-line); border-radius: 12px; padding: 1.1rem; background: #fff; color: #111; text-decoration: none; }
.gp-card:hover { border-color: #111; }
.gp-card h2 { margin: .1rem 0 .3rem; font-size: 1.15rem; }
.gp-card p { margin: 0; color: var(--gp-mid); font-size: .9rem; }
.gp-card .gp-pill { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: #111; color: #fff; padding: .15rem .5rem; border-radius: 999px; }
.gp-card--sd .gp-pill { background: #1d4ed8; }
.gp-group[hidden] { display: none; }
.gp-swipe { display: none; }
.gp-cta { display: block; text-align: center; margin-top: .8rem; }
.gp-step--in { margin: 0; }
@media (max-width: 860px) {
  .gp-layout { grid-template-columns: 1fr; }
  .gp-view { position: static; }
  .gp-stage { aspect-ratio: 1 / 1; }
  /* presets: one swipeable row on phones so the 3D preview is on the first screen */
  .gp-presets { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; gap: .6rem; padding: 2px 2px .6rem; margin: 0 -2px 1rem; }
  .gp-preset { flex: 0 0 68%; scroll-snap-align: start; }
  .gp-swipe { display: block; font-size: .8rem; color: var(--gp-mid); margin: -.2rem 0 .4rem; }
}
.gp-card { display: flex; flex-direction: column; }
.gp-card .gp-pill { align-self: flex-start; }
.gp-card p { flex: 1; }
.gp-card__go { display: inline-block; margin-top: .8rem; font-weight: 700; color: #111; }
.gp-card--sd .gp-card__go { color: #1d4ed8; }
.gp-card:hover .gp-card__go, .gp-card:focus-visible .gp-card__go { text-decoration: underline; }
.gp-how { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; padding: 0; margin: 1rem 0 .2rem; color: var(--gp-mid); font-size: .92rem; }
.gp-how strong { color: #111; }
@media (max-width: 600px) {
  /* keep the last card and the send button clear of the Gigio chat launcher (bottom right) */
  .gp { padding-bottom: 76px; }
}
.gp-addon { border: 1px solid var(--gp-line); border-left: 4px solid #1d4ed8; border-radius: 10px; padding: .7rem .9rem; background: #fff; }
.gp-addon[hidden] { display: none; }
.gp-addon__title { margin: 0 0 .2rem; font-weight: 700; color: #111; }
.gp-addon .gp-help { margin: 0; }
/* Preview thumbnails (includes/gg_gen_thumbs.php): stills of the real generator part, 4:3 */
.gp-thumb { display: block; }
.gp-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 8px; background: #f3f4f6; }
.gp-preset .gp-thumb { margin: -.2rem -.3rem .35rem; }
.gp-card__img { margin: -.4rem -.4rem .8rem; }
@media (max-width: 600px) {
  .gp-preset:has(.gp-thumb) { display: grid; grid-template-columns: 96px 1fr; column-gap: .65rem; align-items: start; }
  .gp-preset .gp-thumb { grid-row: 1 / span 2; margin: 0; }
  .gp-preset .gp-thumb img { width: 96px; }
}
/* lit products (lithophanes, lighted slab stand): glowing picture first, unlit one on mouse hover only */
.gp-thumb--lit { position: relative; display: block; }
.gp-thumb--lit .gp-thumb__lit, .gp-thumb--lit .gp-thumb__off { display: block; }
.gp-thumb--lit .gp-thumb__off { position: absolute; inset: 0; opacity: 0; transition: opacity .25s ease; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  a:hover .gp-thumb--lit .gp-thumb__off, .gp-preset:hover .gp-thumb--lit .gp-thumb__off { opacity: 1; }
}
@media not all and (hover: hover) and (pointer: fine) { .gp-thumb--lit .gp-thumb__off { display: none; } }
@media (prefers-reduced-motion: reduce) { .gp-thumb--lit .gp-thumb__off { transition: none; } }

/* Design links (2026-10-30, assets/js/gg-share.js): "Copy link" / "Share link" under "Request a price". */
.gg-share { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin-top: .7rem; }
.gg-share__btn { background: #fff; color: #111; border: 1.5px solid #111; border-radius: 8px; padding: .6rem 1.1rem; font: inherit; font-weight: 700; cursor: pointer; min-height: 44px; }
.gg-share__btn:hover { background: var(--gp-pale); }
.gg-share__btn:focus-visible { outline: 3px solid var(--gp-focus); outline-offset: 2px; }
.gg-share__msg { font-size: .9rem; color: #14532d; font-weight: 600; }
.gg-share__url { flex: 1 1 100%; font: inherit; font-size: .85rem; padding: .5rem; border: 1px solid var(--gp-line); border-radius: 8px; color: #111; background: #fff; min-width: 0; }
.gg-share__help { flex: 1 1 100%; margin: 0; font-size: .85rem; color: var(--gp-mid); }
.gg-share__opened { border-left: 4px solid #2563eb; background: #eef3fd; color: #1e3a8a; padding: .6rem .8rem; border-radius: 8px; margin: .7rem 0 0; font-size: .92rem; }
.gp-cta + .gg-share .gg-share__btn { flex: 0 0 auto; }
/* 2026-10-30 (Jack pt949u "layout is a lil wonky compared to other pages"): the S&D request builders (pegboard,
   LED arm) get the same frame as the live S&D builders (sd-configurator.css .sdc-*): full page width, a tall
   viewer and a 340-440 px controls column. sd.css caps .sd-form at 760 px for plain forms, which squeezed the
   whole builder into a small viewer and cramped preset cards. The request form itself stays 760 px wide. */
.gp--sd #gpForm.sd-form { max-width: none; }
.gp--sd .gp-request { max-width: 760px; }
.gp--sd .gp-presets { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.gp--sd .gp-layout { grid-template-columns: minmax(0, 1fr) minmax(340px, 440px); gap: 1.6rem; }
.gp--sd .gp-view { top: 82px; }
.gp--sd .gp-stage { aspect-ratio: auto; height: min(68vh, 640px); min-height: 360px; border-radius: 18px; }
@media (max-width: 960px) {
  .gp--sd .gp-layout { grid-template-columns: 1fr; gap: 1rem; }
  .gp--sd .gp-view { position: static; }
  .gp--sd .gp-stage { height: 62vw; min-height: 300px; max-height: 520px; }
}
@media (max-width: 480px) { .gp--sd .gp-stage { height: 78vw; border-radius: 14px; } }
/* Place picker (topo magnet, 2026-10-30): search on submit plus a shaded relief map from the open Terrain Tiles */
.gp-place { margin: .2rem 0 .9rem; display: flex; flex-direction: column; gap: .5rem; }
.gp-place__row { display: flex; gap: .4rem; }
.gp-place__row input { flex: 1; min-width: 0; min-height: 44px; }
.gp-place__row .gp-btn { min-height: 44px; }
.gp-place__results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.gp-place__hit { width: 100%; text-align: left; background: #fff; color: var(--gp-ink); border: 1px solid var(--gp-line); border-radius: 8px; padding: .55rem .7rem; min-height: 44px; cursor: pointer; font: inherit; font-size: .88rem; }
.gp-place__hit:hover, .gp-place__hit:focus { border-color: var(--gp-acc); outline: none; box-shadow: 0 0 0 2px var(--gp-focus); }
.gp-place__map { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--gp-line); background: #dfe4ea; }
.gp-place__map canvas { display: block; width: 100%; height: auto; aspect-ratio: 640 / 440; touch-action: none; cursor: crosshair; }
.gp-place__map canvas:focus-visible { outline: 3px solid var(--gp-focus); outline-offset: -3px; }
.gp-place__zoom { position: absolute; right: .5rem; top: .5rem; display: flex; flex-direction: column; gap: .3rem; }
.gp-place__zoom .gp-tool { min-width: 44px; min-height: 44px; font-size: 1.1rem; }
.gp-place .gp-tool:focus-visible, .gp-place .gp-btn:focus-visible, .gp-datacredit summary:focus-visible, .gp-place__credit a:focus-visible, .gp-datacredit a:focus-visible { outline: 3px solid var(--gp-focus); outline-offset: 2px; }
.gp-place__credit a, .gp-datacredit a { color: inherit; text-decoration: underline; }
.gp-datacredit summary { cursor: pointer; padding: .75rem 0; }
.gp-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.gp-datacredit ul { margin: .3rem 0 0 1rem; padding: 0; }

/* Accessibility and mobile tap targets (2026-10-30): visible focus, white text on dark, 44px tap targets on phones */
.gp .gp-tool:focus-visible,
.gp .gp-btn:focus-visible,
.gp select:focus-visible,
.gp input[type=text]:focus-visible,
.gp input[type=email]:focus-visible,
.gp input[type=tel]:focus-visible,
.gp input[type=date]:focus-visible,
.gp input[type=file]:focus-visible,
.gp textarea:focus-visible,
.gp .gp-num input:focus-visible,
.gp .gp-f input[type=number]:focus-visible,
.gp-range:focus-visible {
  outline: 2px solid var(--gp-focus);
  outline-offset: 2px;
}
.gp-toggle input[type=checkbox]:focus-visible {
  outline: 2px solid var(--gp-focus);
  outline-offset: 2px;
}
@media (max-width: 600px) {
  .gp .gp-tool {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .5rem .75rem;
    font-size: .85rem;
  }
  .gp .gp-chip span {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: .5rem .9rem;
    box-sizing: border-box;
  }
  .gp .gp-num input {
    min-height: 44px;
    box-sizing: border-box;
  }
  .gp select,
  .gp input[type=text],
  .gp input[type=email],
  .gp input[type=tel],
  .gp input[type=date],
  .gp input[type=file],
  .gp .gp-f input[type=number] {
    min-height: 44px;
  }
  .gp .gp-toggle {
    min-height: 44px;
  }
}
