/* castomo sauna studio: the configurator's look. Light, warm glass panels float over the 3D garden; text is the
   brand's warm dark ink (#1b1712, as the favicon, the link card and theme-color); one bronze accent for text and
   fills on light surfaces, and the brand's amber (#e0a96e) where it sits on ink (the price dock).
   Layout: the scene fills the window; bar (top), panel (left), chat (right), dock (bottom) float over it.
   Below 900 px the panel becomes a bottom sheet, the chat a full-width card, and the bar slims to icons. */

:root {
  --ink: #1b1712;
  --ink-2: #463b31;
  --muted: #74685c; /* 5.4:1 on white, 4.9:1 on --soft */
  --line: rgba(27, 23, 18, 0.09);
  --line-2: rgba(27, 23, 18, 0.17);
  --hover: rgba(27, 23, 18, 0.06);
  --glass: rgba(255, 253, 250, 0.86);
  --glass-2: rgba(255, 253, 250, 0.94);
  --card: #ffffff;
  --soft: #f4f0ea;
  --chosen: #fffaf3; /* the background of a picked choice */
  --accent: #8a5a2b; /* bronze: 5.9:1 on white, white text on it 5.9:1 */
  --accent-2: #6f4520;
  --accent-soft: #f6ece0;
  --amber: #e0a96e; /* the brand's amber: on ink only (ink text on it 8.5:1) */
  --amber-2: #ebbd88;
  --warn: #b4572e;
  --ok: #2f8a5b;
  --radius: 18px;
  --shadow: 0 18px 48px -18px rgba(27, 23, 18, 0.34), 0 2px 8px rgba(27, 23, 18, 0.06);
  --shadow-sm: 0 6px 18px -8px rgba(27, 23, 18, 0.32);
  --panel-w: 392px;
  --chat-w: 360px;
  --gap: 16px;
  --font: "Figtree", "Figtree fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
/* Korean breaks between words, as its readers expect, not inside one (the browser's default splits syllables) */
:lang(ko) { word-break: keep-all; overflow-wrap: break-word; } /* a word longer than the line still breaks */
html, body { margin: 0; height: 100%; overflow: hidden; background: #e8e4dd; color: var(--ink); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: 0.4; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* the browser's own surfaces in the palette too: selection, caret, scrollbars */
::selection { background: rgba(224, 169, 110, 0.38); }
input, textarea { caret-color: var(--accent); }
.opts, .log, .start, .modal-card { scrollbar-width: thin; scrollbar-color: rgba(27, 23, 18, 0.22) transparent; }
svg { display: block; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
/* visually hidden but still focusable and named (the chat's file input) */
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; }
/* a press is felt: the small controls sink a little (transform only, so nothing reflows) */
.icon, .chip, .primary, .ghost, .send, .photo, .talk, .x, .lang, .sugg button, .tod button, .views button, .tabs button, .garden-pop .chips button { transition: background .15s, color .15s, border-color .15s, transform .1s; }
:is(.icon, .chip, .primary, .ghost, .send, .photo, .talk, .x, .lang, .sugg button, .tod button, .views button, .tabs button, .garden-pop .chips button):active:not(:disabled) { transform: scale(.96); }

.scene { position: fixed; inset: 0; }
.scene canvas { display: block; width: 100% !important; height: 100% !important; touch-action: none; }

/* ---------------------------------------------------------------- bar */
.bar { position: fixed; top: var(--gap); inset-inline-start: var(--gap); inset-inline-end: var(--gap); display: flex; align-items: center; gap: 12px; pointer-events: none; z-index: 20; }
.pill { pointer-events: auto; display: flex; align-items: center; gap: 4px; background: var(--glass); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 999px; box-shadow: var(--shadow-sm); padding: 5px; }
.brand { padding: 6px 16px 6px 8px; gap: 10px; }
a.brand { color: inherit; text-decoration: none; transition: box-shadow .15s, transform .1s; } /* the way home (main.js #homeLink asks first) */
a.brand:hover { box-shadow: var(--shadow); }
a.brand:active { transform: scale(.97); }
a.brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.brand .mark { width: 30px; height: 30px; padding: 5px; border-radius: 50%; background: var(--ink); }
.brand b { display: block; font-weight: 700; font-size: 15px; letter-spacing: -0.01em; line-height: 1.1; }
.brand small { display: block; color: var(--muted); font-size: 12px; line-height: 1.1; }
.views { margin: 0 auto; }
.views button { padding: 7px 14px; border-radius: 999px; font-weight: 500; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.views button:hover { background: var(--hover); }
.views button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.icon { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; font-weight: 500; font-size: 14px; color: var(--ink-2); }
.icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon:hover:not(:disabled) { background: var(--hover); }
.icon[aria-pressed="true"], .icon[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent-2); }
.icon.primary { background: var(--accent); color: #fff; }
.icon.primary:hover { background: var(--accent-2); }
.icon.sm { padding: 7px; }
.icon.sm svg { width: 18px; height: 18px; }
.lang { min-width: 40px; padding: 7px 11px; border-radius: 999px; font-weight: 700; font-size: 13px; letter-spacing: .04em; color: var(--ink-2); border: 1px solid var(--line-2); margin-inline-start: 2px; }
.lang:hover { background: var(--hover); }
/* the random design dice: bronze, so it reads as the playful one among the tools; it tumbles on every roll */
.dice svg .pips { fill: currentColor; stroke: none; }
.icon.dice { color: var(--accent); }
.dice svg { transition: transform .2s; }
@media (hover: hover) { .dice:hover svg { transform: rotate(-12deg); } }
.dice.rolling svg { animation: roll .55s cubic-bezier(.3, .7, .3, 1); }
@keyframes roll { 0% { transform: rotate(0) scale(1); } 45% { transform: rotate(200deg) scale(.82); } 100% { transform: rotate(360deg) scale(1); } }

/* ---------------------------------------------------------------- the configurator */
/* main.js, the configurator. .panel is only a frame: the steps (.tabs) in a row centred at the bottom, the open
   step's tray (.opts) above them, the product card (.ph) top left on desktop. The frame has no background, filter or
   transform, so the product card's position: fixed still means the screen, and its empty parts let clicks through to
   the 3D view. On desktop the frame sits between the price dock (left) and the chat (right); below 1280 px in a row
   of its own above them; on phones above the dock, with the product card as its top row. */
.panel { position: fixed; z-index: 15; inset-inline-start: calc(var(--panel-w) + var(--gap) * 2); inset-inline-end: calc(var(--chat-w) + var(--gap) * 2); bottom: var(--gap);
  display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.panel > * { pointer-events: auto; max-width: 100%; }
.ph { position: fixed; top: calc(var(--gap) + 66px); inset-inline-start: var(--gap); display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 18px;
  background: var(--glass-2); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); border: 1px solid rgba(255,255,255,.75); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.ph-title { min-width: 0; }
.ph-title b { display: block; font-size: 19px; letter-spacing: -0.02em; line-height: 1.15; }
.ph-title span { color: var(--muted); font-size: 13px; }
.ph-tools { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; color: var(--ink-2); margin-inline-start: 4px; white-space: nowrap; }
.chip:hover { background: var(--soft); border-color: rgba(27, 23, 18, .28); }

/* the steps: a sideways-scrolling row (main.js paintTabs keeps the open one in view and sets the fades) */
.tabs { --fl: 0px; --fr: 0px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--fl), #000 calc(100% - var(--fr)), transparent); mask-image: linear-gradient(90deg, transparent, #000 var(--fl), #000 calc(100% - var(--fr)), transparent); }
.tabs::-webkit-scrollbar { display: none; }
.tabs.less { --fl: 28px; }
.tabs.more { --fr: 36px; }
.tabs button { position: relative; flex: none; display: flex; align-items: center; gap: 8px; white-space: nowrap; min-height: 44px; }
.tabs button i { font-style: normal; }
.tabs button i, .tabs button small { display: none; }
/* a group a choice has just made appear */
.tabs button.new::after { content: ""; position: absolute; top: 7px; inset-inline-end: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }

/* the tray: the open step's header (n/N, title, what is picked, the arrows and close) over its tiles */
.opts { width: max-content; min-width: min(420px, 100%); }
.opts[hidden] { display: none; }
.opt.flash { animation: tray-in .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes tray-in { from { opacity: 0; transform: translateY(8px); } }
.opt-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.opt-h > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; min-width: 0; }
.opt-h i { font-style: normal; font-size: 12px; font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; }
.opt-h h3 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -0.005em; }
.opt-h .cur { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-h .nav { display: flex; gap: 2px; flex: none; }
.opt-h .nav button:disabled { opacity: .3; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--muted); padding: 2px 8px; border-radius: 999px; background: var(--soft); white-space: nowrap; }
.badge.vis { color: var(--accent-2); background: var(--accent-soft); }
.peerdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-inline-start: 4px; box-shadow: 0 0 0 2px #fff; vertical-align: middle; }

/* the tiles: the picture is the button, the name a caption. Sideways when they do not fit. */
.choices { --tile: 104px; display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 4px 4px 2px; margin: -4px -4px 0; justify-content: safe center; }
.choices::-webkit-scrollbar { display: none; }
.ch { position: relative; flex: none; width: var(--tile); display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; }
.pic { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 16px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); transition: box-shadow .15s, transform .15s; }
/* the texture tinted by the colour (three.js multiplies map by color), or the colour alone */
.pic.sw { background: var(--img, none) center / cover, var(--c); background-blend-mode: multiply; }
.pic.ico { background: linear-gradient(160deg, #fff, var(--soft)); }
.pic.ico svg { width: 38%; height: 38%; fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ch .tx { display: grid; gap: 1px; max-width: 100%; }
.ch .tx b { font-size: 13px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ch .p { font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
/* the picked one: a check in the picture's corner (a square one in pick-any groups) */
.ch::after { content: ""; position: absolute; top: 7px; inset-inline-end: 7px; width: 22px; height: 22px; border-radius: 50%; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s;
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat; }
.ch.multi::after { border-radius: 7px; }
.ch[aria-checked="true"]::after { opacity: 1; transform: none; }
.ch:focus-visible { outline: none; }
.ch:focus-visible .pic { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (hover: hover) { .ch:hover .pic { transform: translateY(-2px); } }

/* the look: round samples floating over the garden, each with its name on a dark label; the steps
   a dark bar that shows what is picked in every step, so the whole configuration reads at a glance */
.opt-h { width: max-content; max-width: 100%; margin: 0 auto 14px; padding: 6px 6px 6px 16px; border-radius: 999px; background: rgba(27, 23, 18, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: #fff; }
.opt-h i, .opt-h .cur { color: rgba(255,255,255,.62); }
.opt-h .nav button { color: #fff; }
.opt-h .nav svg { stroke: #fff; }
.opt-h .nav button:hover { background: rgba(255,255,255,.12); }
.choices { --tile: 92px; gap: 14px; }
.pic { border-radius: 50%; box-shadow: 0 0 0 3px #fff, 0 10px 24px -8px rgba(0,0,0,.55); }
.ch[aria-checked="true"] .pic { box-shadow: 0 0 0 3px #fff, 0 0 0 6.5px var(--amber), 0 10px 24px -8px rgba(0,0,0,.55); }
.choices { padding: 8px 8px 4px; margin: -8px -8px 0; }
.ch::after { top: 0; inset-inline-end: 4px; background-color: var(--amber); }
.ch .tx { padding: 3px 9px; border-radius: 999px; background: rgba(27, 23, 18, .78); color: #fff; }
.ch .tx b { font-size: 12.5px; -webkit-line-clamp: 1; }
.ch .p { color: rgba(255,255,255,.7); }
.tabs { padding: 6px; gap: 0; border-radius: 18px; background: var(--ink); box-shadow: var(--shadow); }
.tabs button { flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; padding: 6px 16px 8px; border-radius: 12px; }
.tabs button + button::before { content: ""; position: absolute; inset-inline-start: 0; top: 12px; bottom: 12px; width: 1px; background: rgba(255,255,255,.12); }
.tabs button span { font-size: 11.5px; font-weight: 600; color: rgba(255,255,255,.58); }
.tabs button small { display: block; font-size: 14px; font-weight: 650; color: #fff; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.tabs button:hover { background: rgba(255,255,255,.07); }
.tabs button[aria-expanded="true"] { background: rgba(224, 169, 110, .16); }
.tabs button[aria-expanded="true"] span { color: var(--amber); }


/* ---------------------------------------------------------------- dock */
.dock { position: fixed; z-index: 16; inset-inline-start: var(--gap); bottom: var(--gap); width: var(--panel-w); display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 18px;
  background: var(--ink); color: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.dock :focus-visible { outline-color: var(--amber); }
.dock-price { flex: 1; min-width: 0; line-height: 1.15; }
.dock-name { display: block; font-size: 12px; color: rgba(255,255,255,.62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 1px; }
.dock-price b { display: block; font-size: 21px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
/* no price list yet: "price on request" is a note, not a number, so it is set smaller and may wrap (Polish is long) */
.dock.req .dock-price b { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; text-wrap: balance; }
.dock-gross { display: block; font-size: 12px; color: rgba(255,255,255,.62); font-variant-numeric: tabular-nums; }
.dock .primary, .dock .ghost { padding: 12px 16px; border-radius: 12px; font-weight: 650; font-size: 14px; white-space: nowrap; }
.dock .ghost { color: #fff; border: 1px solid rgba(255,255,255,.25); }
.dock .ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.4); }
.dock .ghost.sq { padding: 10px; }
.dock .ghost.sq svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.primary { background: var(--accent); color: #fff; padding: 11px 18px; border-radius: 12px; font-weight: 650; }
.primary:hover:not(:disabled) { background: var(--accent-2); }
.primary:disabled { cursor: progress; }
/* the one call to action on the ink dock: the brand's amber */
.dock .primary { background: var(--amber); color: var(--ink); }
.dock .primary:hover:not(:disabled) { background: var(--amber-2); }
.dock.bump b { animation: bump .5s ease-out; }
@keyframes bump { 0% { transform: translateY(0); } 30% { transform: translateY(-3px); color: var(--amber); } 100% { transform: none; } }

/* ---------------------------------------------------------------- chat */
.chat { position: fixed; z-index: 15; inset-inline-end: var(--gap); bottom: var(--gap); width: var(--chat-w); max-height: calc(100% - var(--gap) * 2 - 66px); display: flex; flex-direction: column;
  background: var(--glass-2); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); border: 1px solid rgba(255,255,255,.75); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 11px; padding: 12px 14px; text-align: start; width: 100%; border-radius: var(--radius); }
.chat-head:hover .chev { stroke: var(--ink); }
.chat-head:focus-visible { outline-offset: -3px; }
.spark { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 11px; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 65%, #fff)); display: grid; place-items: center; }
.spark svg { width: 20px; height: 20px; fill: #fff; }
.chat-titles { flex: 1; min-width: 0; }
.chat-titles b { display: block; font-size: 15px; }
.chat-titles small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s, stroke .15s; }
.chat.folded .chev { transform: rotate(180deg); }
.chat.folded .chat-body { display: none; }
.people { display: flex; }
.people i { width: 24px; height: 24px; border-radius: 50%; background: var(--c); color: #fff; font-style: normal; font-size: 11px; font-weight: 700; display: grid; place-items: center; margin-inline-start: -6px; box-shadow: 0 0 0 2px #fff; }
.chat-body { display: flex; flex-direction: column; min-height: 0; flex: 1; border-top: 1px solid var(--line); }
.conn { padding: 6px 14px; font-size: 12.5px; color: var(--warn); background: #fdf3ec; }
.log { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; min-height: 160px; max-height: 46vh; overscroll-behavior: contain; }
.msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.42; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.ai { background: #fff; border: 1px solid var(--line); border-start-start-radius: 5px; align-self: flex-start; }
.msg.me { background: var(--ink); color: #fff; border-start-end-radius: 5px; align-self: flex-end; }
.msg.me ::selection { background: rgba(224, 169, 110, 0.55); }
.msg.other { background: var(--accent-soft); border-start-start-radius: 5px; align-self: flex-start; }
.msg .who { display: block; font-size: 11.5px; font-weight: 700; color: var(--accent-2); margin-bottom: 1px; }
.msg.me .who { color: var(--amber); }
.msg img { display: block; max-width: 100%; border-radius: 9px; margin-top: 6px; }
.msg .meta { display: flex; align-items: center; gap: 6px; margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--accent-2); }
.msg .meta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.sys { align-self: center; font-size: 12px; color: var(--muted); text-align: center; }
.typing { align-self: flex-start; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.sugg { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.sugg:empty { display: none; }
.sugg button { min-height: 32px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font-size: 12.5px; font-weight: 550; color: var(--ink-2); text-align: start; }
.sugg button:hover { border-color: var(--accent); color: var(--accent-2); }
.pending { position: relative; margin: 2px 14px 10px; width: 72px; }
.pending img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
/* the photo's remove button: drawn 24 px, a 40 px hit area round it (::before) for a finger */
.pending button { position: absolute; top: -8px; inset-inline-end: -8px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.pending button::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; }
.pending button:hover { background: var(--accent-2); }
.pending button svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.leave { align-self: flex-start; margin: 0 14px 8px; padding: 0; border: 0; background: none; font-size: 12.5px; font-weight: 600; color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.leave:hover { color: var(--accent); }
.composer { display: flex; align-items: flex-end; gap: 4px; padding: 8px 10px 10px; border-top: 1px solid var(--line); background: #fff; }
/* the textarea draws no outline of its own, so the composer shows where typing goes: a 2 px accent line on top */
.composer:focus-within { border-top-color: var(--accent); box-shadow: inset 0 1px 0 var(--accent); }
.composer textarea { flex: 1; resize: none; border: 0; outline: none; padding: 9px 4px; max-height: 120px; background: transparent; font-size: 14.5px; }
.composer textarea::placeholder { color: var(--muted); }
.photo, .send, .talk { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; display: grid; place-items: center; cursor: pointer; }
.photo svg, .talk svg { width: 21px; height: 21px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.photo:hover, .talk:hover { background: var(--soft); }
.photo:hover svg, .talk:hover svg { stroke: var(--ink-2); }
/* the file input is visually hidden but focusable: its label shows the focus */
.photo:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
/* talk mode (voice.js): the mic, ringed while it listens, filled while the AI speaks */
.talk[aria-pressed="true"] { background: var(--accent-soft); }
.talk[aria-pressed="true"] svg { stroke: var(--accent); }
.talk[data-phase="listening"] { box-shadow: 0 0 0 2px var(--accent) inset; animation: talkPulse 1.4s ease-in-out infinite; }
.talk[data-phase="speaking"] { background: var(--accent); }
.talk[data-phase="speaking"] svg { stroke: #fff; }
@keyframes talkPulse { 50% { box-shadow: 0 0 0 4px var(--accent-soft), 0 0 0 2px var(--accent) inset; } }
.talk-status { padding: 4px 14px 0; font-size: 12.5px; color: var(--accent-2); }
.send { background: var(--accent); }
.send:hover:not(:disabled) { background: var(--accent-2); }
.send svg { width: 18px; height: 18px; fill: #fff; }
.send:disabled { opacity: .35; }

/* ---------------------------------------------------------------- 3D overlays */
.tip { position: fixed; z-index: 30; pointer-events: none; background: var(--ink); color: #fff; padding: 6px 10px; border-radius: 9px; font-size: 13px; font-weight: 550; white-space: nowrap; transform: translate(14px, 14px); box-shadow: var(--shadow-sm); }
.tip small { color: rgba(255,255,255,.65); font-weight: 450; margin-inline-start: 6px; }
/* Dimensions overlay (scene.js setDims): labels placed by script on the measure lines; they never take a click. */
.dims { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.dims span { position: absolute; inset-inline-start: 0; top: 0; padding: 3px 8px; border-radius: 999px; background: rgba(27, 23, 18, 0.8); color: #fff; font: 600 12.5px/1.2 var(--font, inherit); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------------------------------------------------------------- start */
/* The catalogue (main.js, the start screen): dark like an evening garden, so the golden-hour pictures glow. Its own
   tokens: --s-* below; amber is the one accent (ink text on it), the bronze of the light studio stays out. */
.start { --s-bg: #16120e; --s-card: #1f1a14; --s-raise: #2a231b; --s-chip: #1e1913; --s-text: #f4efe8; --s-text-2: #d8cdbf;
  --s-muted: #b5a896; /* 8.6:1 on --s-bg */ --s-line: rgba(255, 255, 255, .08); --s-line-2: rgba(255, 255, 255, .14);
  position: fixed; inset: 0; z-index: 40; background: var(--s-bg); color: var(--s-text); overflow-y: auto; scrollbar-color: rgba(255, 255, 255, .2) transparent; }
.start ::selection { background: rgba(224, 169, 110, .35); }
.start :focus-visible { outline-color: var(--amber); }
.start-in { width: min(1280px, 100%); margin: 0 auto; padding: 0 32px; box-sizing: border-box; }
.start-top { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 24px 0 0; }
.start-brand { display: flex; align-items: center; gap: 12px; margin-inline-end: auto; }
.start-brand .mark { width: 40px; height: 40px; padding: 6px; box-sizing: border-box; border-radius: 12px; background: var(--s-raise); }
.start-brand b { display: block; font-size: 16px; }
.start-brand small { display: block; color: var(--s-muted); font-size: 13px; }
.start-tabs, .sizes { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: #241e17; border: 1px solid var(--s-line); }
.start-tabs button, .sizes button { min-height: 40px; padding: 0 18px; border-radius: 999px; font-weight: 600; color: var(--s-text-2); white-space: nowrap; transition: background .15s, color .15s; }
.start-tabs small, .sizes small { font-weight: 500; opacity: .65; font-size: inherit; }
.start-tabs [aria-pressed="true"], .sizes [aria-pressed="true"] { background: var(--s-text); color: var(--ink); }
.start .lang { min-width: 44px; min-height: 44px; color: var(--s-text); border-color: var(--s-line-2); }
.start-hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 24px 48px; padding: 64px 0 36px; }
.hero-a { flex: 1 1 560px; min-width: 0; }
.hero-b { flex: 1 1 340px; max-width: 440px; }
.start .eyebrow { margin: 0 0 14px; color: var(--amber); font-weight: 600; }
.start h1 { margin: 0; font-size: clamp(36px, 5vw, 64px); line-height: 1.02; font-weight: 800; letter-spacing: -0.03em; text-wrap: balance; }
.hero-b p { margin: 0; color: #c9bdae; font-size: 17px; text-wrap: pretty; }
.start .surprise { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; min-height: 46px; padding: 0 20px 0 16px; border-radius: 999px; border: 1px solid var(--s-line-2); color: var(--s-text); font-weight: 700; }
.start .surprise svg { width: 22px; height: 22px; fill: none; stroke: var(--amber); stroke-width: 1.7; }
.start.busy .surprise { opacity: .5; cursor: progress; }
/* busy: a picked model loads (main.js paintStart) */
.start .wait { display: none; align-items: center; gap: 10px; width: fit-content; margin: 0 0 20px; padding: 9px 18px; border-radius: 999px; background: var(--s-raise); font-weight: 600; font-size: 14px; }
.start.busy .wait { display: flex; }

/* the shape rail: one tile per body form, with a line drawing and a count */
.shapes { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
.shapes button { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 16px; border-radius: 18px; border: 1px solid var(--s-line); background: var(--s-chip); text-align: start; transition: border-color .15s, background .15s; }
.shapes svg { width: 44px; height: 32px; fill: none; stroke: #8f8273; stroke-width: 1.6; stroke-linejoin: round; }
.shapes b { display: block; font-weight: 600; }
.shapes small { display: block; font-size: 13px; color: var(--s-muted); }
.shapes [aria-pressed="true"] { background: #2e261d; border-color: var(--amber); }
.shapes [aria-pressed="true"] svg { stroke: var(--amber); }

/* the filters stay at the top of the scrolling catalogue */
.filters { position: sticky; top: 0; z-index: 2; margin-top: 20px; background: rgba(22, 18, 14, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--s-line); }
.fl { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding-top: 14px; padding-bottom: 14px; }
.tog, .space, .sort select { min-height: 48px; box-sizing: border-box; border-radius: 999px; border: 1px solid var(--s-line-2); }
.tog { display: flex; align-items: center; gap: 8px; padding: 0 16px; font-weight: 600; color: var(--s-text); transition: background .15s, color .15s; }
.tog svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tog[aria-pressed="true"] { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.space { display: flex; align-items: center; gap: 8px; padding: 0 14px 0 16px; color: var(--s-muted); }
.space > span:first-child { font-weight: 600; color: var(--s-text-2); margin-inline-end: 2px; }
.space input { width: 62px; height: 36px; box-sizing: border-box; border-radius: 10px; border: 1px solid var(--s-line-2); background: #241e17; color: var(--s-text); text-align: center; }
.results { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 24px; }
.results[hidden], .shapes[hidden] { display: none; } /* the saunas' own parts, hidden on the other tabs */
.count { color: var(--s-muted); }
.sort { display: flex; align-items: center; gap: 8px; color: var(--s-muted); }
.sort select { padding: 0 14px; border-radius: 12px; min-height: 44px; background: #241e17; color: var(--s-text); font-weight: 600; }

/* the cards */
.models { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 24px; padding: 20px 0 96px; }
.model { position: relative; display: flex; flex-direction: column; border-radius: 24px; overflow: hidden; background: var(--s-card); border: 1px solid rgba(255, 255, 255, .07); transition: transform .25s cubic-bezier(.2, .7, .2, 1), border-color .25s; }
.model .img { position: relative; aspect-ratio: 4 / 3; background: var(--s-raise); overflow: hidden; }
.model .img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.model .badge { position: absolute; inset-inline-start: 14px; top: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(22, 18, 14, .74); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 13px; font-weight: 600; }
.model .badge.ar { inset-inline-start: auto; top: auto; inset-inline-end: 14px; bottom: 14px; display: flex; align-items: center; gap: 6px; }
.model .badge svg { width: 14px; height: 14px; fill: none; stroke: var(--amber); stroke-width: 2; stroke-linejoin: round; }
.model .body { display: flex; flex-direction: column; gap: 16px; flex: 1; padding: 20px 22px 22px; }
.model .nm { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
/* model cards are h2: under the start screen's h1, an h3 skipped a level (Lighthouse heading-order) */
.model h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.model .nm small { color: var(--s-muted); font-size: 13px; white-space: nowrap; }
.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 14px 0; border-block: 1px solid var(--s-line); }
.specs dt { font-size: 12px; color: var(--s-muted); }
.specs dd { margin: 2px 0 0; font-weight: 600; }
.hl { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.hl li { padding: 5px 10px; border-radius: 8px; background: var(--s-raise); color: var(--s-text-2); font-size: 13px; }
.woods { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--s-muted); }
.dots { display: flex; }
.dots i { width: 18px; height: 18px; margin-inline-end: -4px; border-radius: 50%; border: 2px solid var(--s-card); }
.model .desc { margin: 0; color: #c9bdae; font-size: 14.5px; flex: 1; }
.model .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.model .from { font-size: 16px; }
.model .go, .go-all { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; background: var(--amber); color: var(--ink); font-weight: 700; white-space: nowrap; transition: background .15s; }
.model .go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* the card's one button covers the whole card: a click anywhere picks it, and the focus ring shows on the card */
.model .go::after { content: ""; position: absolute; inset: 0; }
.model:has(.go:focus-visible) { outline: 2px solid var(--amber); outline-offset: 3px; }
.model .go:focus-visible { outline: none; }
.none { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 64px 32px; border-radius: 24px; border: 1px dashed var(--s-line-2); text-align: center; }
.none h2 { margin: 0; font-size: 24px; }
.none p { margin: 0; max-width: 460px; color: #c9bdae; }
/* hover only where there is a pointer that hovers: on a touch screen it would stick after the tap */
@media (hover: hover) {
  .start-tabs button:not([aria-pressed="true"]):hover, .sizes button:not([aria-pressed="true"]):hover { color: var(--s-text); background: rgba(255, 255, 255, .05); }
  .shapes button:hover { border-color: rgba(224, 169, 110, .55); }
  .start .surprise:hover, .tog:not([aria-pressed="true"]):hover, .start .lang:hover { background: rgba(255, 255, 255, .06); }
  .model:hover { transform: translateY(-3px); border-color: rgba(224, 169, 110, .45); }
  .model:hover .img img { transform: scale(1.035); }
  .model:hover .go, .go-all:hover { background: var(--amber-2); }
}
.start.busy .model { cursor: progress; }
.start.busy .model:hover { transform: none; }
.start.busy .model:hover .img img { transform: none; }
.model.off { opacity: .55; }
.start.busy .model.picked { outline: 2px solid var(--amber); outline-offset: 3px; }
.spinner.sm { width: 15px; height: 15px; border-width: 2px; flex-shrink: 0; }

/* ---------------------------------------------------------------- dialogs */
.modal { border: 0; padding: 0; background: transparent; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); }
.modal::backdrop { background: rgba(27, 23, 18, 0.4); backdrop-filter: blur(3px); }
.modal-card { width: 480px; max-width: 100%; background: #fff; border-radius: 22px; padding: 20px 24px 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 24px); overflow-y: auto; }
.modal-card.wide { width: 640px; }
.modal-card header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-inline-end: -8px; }
.modal-card h2 { margin: 0; font-size: 21px; letter-spacing: -0.02em; }
.modal-card p { margin: 0; }
.modal-card footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.x { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.x:hover { background: var(--soft); color: var(--ink); }
.modal label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.modal input, .modal textarea { border: 1px solid var(--line-2); border-radius: 11px; padding: 11px 12px; font-weight: 450; font-size: 15px; outline: none; background: #fff; transition: border-color .15s, box-shadow .15s; }
.modal input:hover, .modal textarea:hover { border-color: rgba(27, 23, 18, .3); }
.modal input:focus, .modal textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.modal input::placeholder, .modal textarea::placeholder { color: var(--muted); }
.modal textarea { resize: vertical; min-height: 84px; }
.modal .check { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; min-height: 32px; cursor: pointer; }
.modal .check input { width: 20px; height: 20px; margin: 0; flex: 0 0 20px; accent-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.err { color: var(--warn); font-size: 13px; font-weight: 550; }
.err:empty { display: none; }
.btn { display: inline-flex; align-items: center; text-decoration: none; padding: 11px 16px; border-radius: 12px; font-weight: 650; }
.modal .ico { display: inline-flex; align-items: center; gap: 8px; }
.ico svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.ico:hover svg.back { transform: translateX(-3px); }
[dir="rtl"] .ico svg.back { scale: -1 1; }
[dir="rtl"] .ico:hover svg.back { transform: translateX(3px); }
.ico:hover svg.home { transform: translateY(-2px); }
.modal .ghost { border: 1px solid var(--line-2); color: var(--ink); }
.modal .ghost:hover { background: var(--soft); }
.qsum { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--soft); font-size: 14px; }
.qsum b { font-variant-numeric: tabular-nums; text-align: end; }
.lines { width: 100%; border-collapse: collapse; font-size: 14px; }
.lines td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines td:last-child { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; padding-inline-start: 12px; }
.lines .grp { color: var(--muted); font-size: 12px; display: block; }
.lines tr.tot td { border-bottom: 0; padding-top: 12px; font-size: 16px; font-weight: 700; }
.lines tr.sub td { color: var(--muted); font-weight: 500; border-bottom: 0; padding: 2px 0; }

/* ---------------------------------------------------------------- loading, toasts, AR */
.loading { position: fixed; z-index: 35; inset-inline-start: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-radius: 999px; background: var(--glass-2); box-shadow: var(--shadow); font-weight: 600; font-size: 14px; transition: opacity .3s; }
.loading.done { opacity: 0; pointer-events: none; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toasts { position: fixed; z-index: 50; inset-inline-start: 50%; top: 84px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow); max-width: min(520px, calc(100vw - 32px)); animation: toast .25s cubic-bezier(.2, .8, .2, 1); }
@keyframes toast { from { opacity: 0; transform: translateY(-6px); } }
.ar-qr { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(27, 23, 18, .4); backdrop-filter: blur(3px); }
.ar-qr-card { background: #fff; border-radius: 22px; padding: 24px; width: min(380px, calc(100vw - 32px)); text-align: center; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.ar-qr-card b { font-size: 18px; }
.ar-qr-card p { margin: 0; color: var(--ink-2); font-size: 14px; }
.ar-qr-code { width: 220px; height: 220px; }
.ar-qr-code svg { width: 100%; height: 100%; }
.ar-overlay { position: fixed; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 24px 16px; pointer-events: none; }
.ar-hint { align-self: center; background: rgba(27, 23, 18, .78); color: #fff; padding: 10px 14px; border-radius: 12px; font-size: 15px; }
.ar-actions { display: flex; justify-content: center; gap: 10px; pointer-events: auto; }
.ar-actions button { min-height: 48px; background: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 650; }

/* ---------------------------------------------------------------- the garden and time-of-day pill */
/* main.js paintEnv: under the bar, on the right, its garden card opening below */
.envbar { position: fixed; z-index: 19; top: calc(var(--gap) + 62px); inset-inline-end: var(--gap); }
/* the bar's popups (main.js showPop): picture quality under the actions, the time of day and the garden under the
   garden pill, right-aligned to their pill */
.actions { position: relative; }
.pop { position: absolute; z-index: 2; top: calc(100% + 8px); inset-inline-end: 0; width: 320px; max-width: calc(100vw - var(--gap) * 2); box-sizing: border-box; padding: 14px; border-radius: var(--radius);
  background: var(--glass-2); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); box-shadow: var(--shadow); display: grid; gap: 10px; }
.pop[hidden] { display: none; }
.pop > b, .tp-h b { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.qv { font-variant-numeric: tabular-nums; }
.qv .qs { display: none; }
.pop-list { display: grid; gap: 6px; }
.pop-list button { display: grid; gap: 2px; text-align: start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); }
.pop-list button span { font-size: 14px; font-weight: 600; color: var(--ink); }
.pop-list button small { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.pop-list button:hover { border-color: var(--ink-2); }
.pop-list button[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--chosen); }
/* the time: the hour large, a slider over the whole day (its track the sky's colours, keyframes at daytime.js HOURS:
   night to 4:30, morning 7, day 13, golden 18:30, dusk 20:30, night from 22:30) and the five named times */
.tv { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 4.2ch; text-align: start; }
.tp-h { display: flex; justify-content: space-between; align-items: baseline; }
.tp-h output { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
#timeRange { --sky: linear-gradient(90deg, #1c2438 0%, #1c2438 18.75%, #f3c9a0 29.2%, #a9cdf2 54.2%, #f2a560 77.1%, #6f4b6c 85.4%, #1c2438 93.75%, #1c2438 100%);
  width: 100%; height: 30px; margin: 0; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; }
#timeRange::-webkit-slider-runnable-track { height: 10px; border-radius: 999px; background: var(--sky); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
#timeRange::-moz-range-track { height: 10px; border-radius: 999px; background: var(--sky); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
#timeRange::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -7px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); box-shadow: var(--shadow-sm); }
#timeRange::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); box-shadow: var(--shadow-sm); }
#timeRange:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 999px; }
.tod { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.tod button { display: grid; justify-items: center; gap: 4px; padding: 8px 2px; border-radius: 12px; font-size: 11.5px; font-weight: 600; line-height: 1.2; text-align: center; color: var(--ink-2); }
.tod button:hover { background: var(--hover); }
.tod button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.tod svg, .ti svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; display: block; }
.garden-pop { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; width: 300px; padding: 14px 14px 10px; border-radius: var(--radius); background: var(--glass-2);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); box-shadow: var(--shadow); display: grid; gap: 8px; }
.garden-pop b { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.garden-pop .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.garden-pop .chips button { min-height: 34px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; font-weight: 500; color: var(--ink-2); background: var(--card); }
.garden-pop .chips button:hover { border-color: var(--ink-2); }
.garden-pop .chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------------------------------------------------------------- narrower screens */
/* castomo's offer assistant (wellness.castomo.com/shared/offer-chat.js): its button sits above the folded chat
   (main.js dockOfferButton); it leaves while the chat is open, which covers that spot, and on phones, where the
   bottom of the screen is the price dock and the configurator. */
:root { --offer-x: var(--gap); --offer-y: calc(var(--gap) + 72px); }
.chat-open #castomo-offer-chat { display: none; }
/* below 1280 px the configurator's row spans the screen above the dock and the chat: the button goes above it */
@media (max-width: 1280px) { :root { --offer-y: calc(var(--gap) + 150px); } }
@media (max-width: 900px) { #castomo-offer-chat { display: none; } }

/* The maker's panel put the chat on the left (main.js, from /api/site/chatbot): it swaps sides with the price dock and,
   on desktop, stays clear of the product card above it; the configurator's frame swaps its insets to match. */
.chat-left .chat { inset-inline-end: auto; inset-inline-start: var(--gap); max-height: calc(100% - var(--gap) * 2 - 66px - 96px); }
.chat-left .dock { inset-inline-start: auto; inset-inline-end: var(--gap); }
.chat-left .panel { inset-inline-start: calc(var(--chat-w) + var(--gap) * 2); inset-inline-end: calc(var(--panel-w) + var(--gap) * 2); }

@media (max-width: 1280px) {
  .views { display: none; }
  .chat-left .panel { inset-inline-start: var(--gap); inset-inline-end: var(--gap); }
  /* no room between the dock and the chat: the configurator gets a row of its own above them */
  .panel { inset-inline-start: var(--gap); inset-inline-end: var(--gap); bottom: calc(var(--gap) + 84px); }
}
@media (max-width: 1100px) {
  .icon .lbl { display: none; }
  .icon { padding: 7px 9px; }
  /* eight shape tiles no longer fit a row: they become chips in a sideways-scrolling row (phones too) */
  .shapes { display: flex; overflow-x: auto; scrollbar-width: none; margin: 0 -32px; padding: 2px 32px; }
  .shapes::-webkit-scrollbar { display: none; }
  .shapes button { flex: none; flex-direction: row; align-items: center; gap: 8px; padding: 0 16px 0 10px; min-height: 48px; border-radius: 999px; }
  .shapes svg { width: 28px; height: 20px; stroke-width: 2; }
  .shapes small { display: none; }
}
@media (max-width: 900px) {
  :root { --gap: 10px; }
  .brand small { display: none; }
  /* phones keep the quality picker, with short labels (Std / HD / Ultra) */
  .qv .qf { display: none; }
  .qv .qs { display: inline; }
  /* the envbar sits 70 px in from the right (the folded chat button): its popups reach back to the screen edge */
  .envbar .pop, .envbar .garden-pop { inset-inline-end: -70px; }
  .brand { padding: 5px 12px 5px 6px; }
  .bar .actions { margin-inline-start: auto; }
  /* phones: the configurator spans the screen above the price dock, and the product card is its top row */
  .panel { inset-inline-start: var(--gap); inset-inline-end: var(--gap); bottom: calc(var(--gap) + 74px); gap: 8px; }
  .ph { position: static; align-self: stretch; justify-content: space-between; gap: 8px; padding: 5px 5px 5px 14px; }
  .ph-title b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ph-title span { display: none; }
  .tabs { touch-action: pan-x; }
  .opts { width: auto; min-width: 0; align-self: stretch; }
  .choices { --tile: 84px; gap: 10px; }
  .choices { --tile: 72px; }
  .loading { top: 32%; } /* in the view above the configurator, not over it */
  .dock { inset-inline-start: var(--gap); inset-inline-end: var(--gap); width: auto; padding: 8px 8px 8px 14px; }
  .dock-price b { font-size: 18px; }
  .dock.req .dock-price b { font-size: 15px; }
  .dock .primary { padding: 12px 14px; }
  .chat { inset-inline-start: var(--gap); inset-inline-end: var(--gap); width: auto; top: calc(var(--gap) + 58px); bottom: auto; max-height: calc(100% - 160px); }
  /* open, the chat is the top card: above the garden pill, which would otherwise cover its header */
  .chat:not(.folded) { z-index: 21; }
  .chat.folded { inset-inline-start: auto; width: auto; }
  .chat.folded .chat-titles, .chat.folded .chev, .chat.folded .people { display: none; }
  .chat.folded .chat-head { padding: 7px; }
  .grid2 { grid-template-columns: 1fr; }
  .envbar { top: calc(var(--gap) + 60px); inset-inline-end: calc(var(--gap) + 70px); }
  /* phones: the chat is a top card either way; on the left, its folded button sits left and the envbar takes the corner */
  .chat-left .chat { inset-inline-start: var(--gap); inset-inline-end: var(--gap); max-height: calc(100% - 160px); }
  .chat-left .chat.folded { inset-inline-end: auto; }
  .chat-left .dock { inset-inline-start: var(--gap); inset-inline-end: var(--gap); }
  .chat-left .envbar { inset-inline-end: var(--gap); }
  .chat-left .envbar .pop, .chat-left .envbar .garden-pop { inset-inline-end: 0; }
}
@media (max-width: 700px) {
  /* the catalogue on a phone: tabs on their own row, the shape rail and the filters scroll sideways, one card a row */
  .start-in { padding: 0 16px; }
  .start-top { padding-top: 14px; gap: 12px; }
  .start-brand small { display: none; }
  .start-tabs { order: 3; width: 100%; box-sizing: border-box; }
  .start-tabs button { flex: 1 1 auto; padding: 0 12px; } /* sized by their words: "Gotowe projekty" needs more room than "Balie" */
  .start-tabs small { display: none; }
  .start-hero { padding: 32px 0 22px; gap: 14px; }
  .hero-a, .hero-b { flex-basis: 100%; }
  .hero-b p { display: none; } /* the first card shows above the fold; the title and the cards say enough */
  .start .surprise { margin-top: 0; }
  .shapes { margin: 0 -16px; padding: 2px 16px; }
  .fl { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .fl::-webkit-scrollbar { display: none; }
  .fl > * { flex: none; }
  .models { grid-template-columns: 1fr; gap: 18px; padding: 20px 0 64px; }
  .model .body { padding: 16px 18px 18px; gap: 14px; }
  .model h2 { font-size: 20px; }
}
/* narrow phones (iPhone 393 px): the bar fits brand mark + inside + quality + AR + share + language */
@media (max-width: 560px) { .bar .brand > div { display: none; } .bar .brand { padding: 5px; } #dimsBtn { display: none; } }
@media (max-width: 420px) {
  .bar .icon { padding: 7px; }
  /* Ultra (2× supersampling) is beyond a phone's GPU anyway; its button makes room for the language */
  #quality [data-q="ultra"] { display: none; }
}

/* Phones: the menu (main.js placeMenu). The brand on the left, one menu button in the top-right corner; the bar's
   actions, the time-and-garden pill and "Change model" are moved into the sheet below it, a two-column grid of
   labelled tiles whose popups open in place, full width. Until the script has moved them they stay hidden, so they
   never show in their desktop places first. */
.menu-btn, .menu-sheet { display: none; }
@media (max-width: 900px) {
  .bar > .actions, body > .envbar, .ph-tools > #changeModel { display: none; }
  /* the product card (name, dice, undo, redo) is the top bar's middle, between the logo and the menu button, so the
     configurator at the bottom is only the steps and their choices */
  .ph { position: fixed; top: var(--gap); inset-inline: calc(var(--gap) + 52px); height: 44px; box-sizing: border-box; padding: 0 4px 0 14px; }
  /* so the logo is its mark alone and the look switcher gives way, as on the narrowest phones */
  .bar .brand > div, .bar .look-at { display: none; }
  .bar .brand { padding: 5px; }
  /* the samples: low, wide swatches instead of tall circles, so the open step takes less of the view; the step's
     heading (count, name, arrows, close) goes, as the steps below already name it and switch it */
  .choices { --tile: 92px; gap: 10px; }
  .pic { aspect-ratio: 16 / 10; border-radius: 14px; }
  .ch::after { top: 6px; inset-inline-end: 6px; width: 20px; height: 20px; background-size: 13px; }
  .ch { gap: 6px; }
  .opt-h { display: none; }
  .menu-btn { display: flex; justify-content: center; margin-inline-start: auto; width: 44px; height: 44px; padding: 0; color: var(--ink); }
  .menu-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
  .menu-btn .m-close, .menu-btn[aria-expanded="true"] .m-open { display: none; }
  .menu-btn[aria-expanded="true"] .m-close { display: inline; }
  .menu-sheet { position: fixed; z-index: 22; top: calc(var(--gap) + 54px); inset-inline-end: var(--gap); width: min(360px, calc(100% - var(--gap) * 2));
    max-height: calc(100% - var(--gap) * 2 - 54px - 84px); overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; padding: 10px;
    display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: row dense; gap: 8px; border-radius: var(--radius);
    background: var(--glass-2); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); box-shadow: var(--shadow); }
  .menu-sheet > .actions, .menu-sheet > .envbar { display: contents; }
  /* the look switcher is a full-width row in the menu, its list opening in place under it */
  .menu-sheet > .look-at { grid-column: 1 / -1; }
  .menu-sheet .lk > button { width: 100%; min-height: 48px; justify-content: space-between; padding: 10px 14px; border-radius: 14px; font-size: 14px; box-shadow: none; border: 1px solid var(--line-2); background: var(--card); }
  .menu-sheet .lk > button small { display: inline; margin-inline-end: auto; }
  .menu-sheet .lk ul { position: static; min-width: 0; margin-top: 8px; box-shadow: none; border: 1px solid var(--line-2); }
  .menu-sheet #changeModel { grid-column: 1 / -1; margin: 0; min-height: 48px; font-size: 15px; background: var(--ink); border-color: var(--ink); color: #fff; }
  .menu-sheet .icon, .menu-sheet .lang { justify-content: flex-start; gap: 10px; min-height: 48px; margin: 0; padding: 10px 14px; border-radius: 14px;
    border: 1px solid var(--line-2); background: var(--card); font-size: 14px; }
  .menu-sheet .icon.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
  .menu-sheet .icon[aria-pressed="true"], .menu-sheet .icon[aria-expanded="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); }
  .menu-sheet .icon .lbl, .menu-sheet #dimsBtn { display: inline-flex; }
  .menu-sheet .qv .qf { display: inline; }
  .menu-sheet .qv .qs { display: none; }
  .menu-sheet .pop, .menu-sheet .garden-pop { position: static; grid-column: 1 / -1; width: auto; max-width: none; box-shadow: none;
    background: var(--card); backdrop-filter: none; -webkit-backdrop-filter: none; border: 1px solid var(--line-2); }
}

@media (prefers-reduced-motion: reduce) {
  .dice svg, .dice.rolling svg, .talk[data-phase="listening"], .typing i, .opt.flash, .dock.bump b, .toast { animation: none; }
  .model, .model .img img, .panel, .dice svg, .ico svg { transition: none; }
  .opts { scroll-behavior: auto; }
}
@media print { body { overflow: visible; } }
.thumb .bar, .thumb .panel, .thumb .chat, .thumb .dock, .thumb .tip, .thumb .loading, .thumb .toasts, .thumb .envbar, .thumb .menu-btn, .thumb .menu-sheet { display: none !important; }

/* the look switcher (app/switcher.js) in the top bar, before the actions; on phones it gives way to them */
.bar .look-at { pointer-events: auto; }
@media (max-width: 900px) { .bar .look-at .lk > button small { display: none; } }
@media (max-width: 560px) { .bar .look-at { display: none; } }

/* the privacy notice beside every consent box (wellness.castomo.com/privacy/ covers this site) */
.privacy-link { align-self: flex-start; font-size: 13px; color: inherit; opacity: .75; text-decoration: underline; }

/* The panel stands on the bottom edge and grows upward as its steps arrive from the script; it waits, invisible, until
   they have, instead of jumping up the page after the first paint (a layout shift Lighthouse scored 0.12 on phones). */
.panel:has(#tabs:empty) { visibility: hidden; }
