/* The minimal look (public/minimal.html): v1's customiser face. Measured from v1.castomo.pl: Outfit, 1px tracking,
   22px-round pills with a light grey gradient, the chosen one #333 with an orange tick, the call to action an orange
   gradient, a wide soft haze round the bottom buttons so they read over the model. */
:root {
  --ink: #111; --mute: #6b6b6b; --line: #e6e6e6;
  --orange: linear-gradient(-45deg, #dc4425, #ff834f, #dc4425);
  --pill: linear-gradient(22deg, #fafafa, #e2e2e2);
  --dark: linear-gradient(22deg, #000, #3a3a3a);
  --haze: -10px -1px 82px 43px rgba(0, 0, 0, .1);
  --pad: clamp(16px, 4vw, 50px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: #fff; color: var(--ink); font: 400 15px/1.4 Outfit, system-ui, sans-serif; letter-spacing: 1px; -webkit-font-smoothing: antialiased; }
/* Every language wraps differently: body copy never ends on one lonely word, and a button or link evens out its
   lines, so its arrow never sits alone on the second one (home.js also glues the arrow to the last word). */
p, li, dd, figcaption { text-wrap: pretty; }
a, button { text-wrap: balance; }
/* 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 */
button, input, textarea { font: inherit; letter-spacing: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #dc4425; outline-offset: 2px; }

/* ---- first screen */
.stage { position: relative; height: 100vh; height: 100svh; overflow: hidden; }
.scene { position: absolute; inset: 0; }
.scene canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.loading { position: absolute; inset-inline-start: 50%; top: 45%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; }
.loading .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--orange); animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(.5); opacity: .5; } }

.bar { position: absolute; inset-inline-start: 0; inset-inline-end: 0; bottom: 0; padding: 0 var(--pad) max(30px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; pointer-events: none; }
.bar > * { pointer-events: auto; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; }

/* the two buttons: closed, "Change" is the call to action; open, "Done" is (v1 swaps them) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; white-space: nowrap; flex: none; min-height: 45px; padding: 10px 30px; border: 0; border-radius: 22px; font-weight: 900; font-size: 16.5px; letter-spacing: 1px; text-decoration: none; color: var(--ink); background: #f4f4f4; box-shadow: var(--haze); transition: background .25s ease-in-out, color .25s ease-in-out, transform .15s; }
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.change { min-width: 226px; justify-content: flex-start; padding-inline-start: 40px; background: var(--orange); color: #fff; }
.bar.open .change { background: #f4f4f4; color: #000; }
.change .i-close, .change .t-close, .bar.open .change .i-open, .bar.open .change .t-open { display: none; }
.bar.open .change .i-close, .bar.open .change .t-close { display: inline; }
.done { background: #fff; font-size: 15px; }
.bar.open .done, .cta { background: var(--orange); color: #fff; }

/* "Start here": a black speech bubble over "Change" until the bar is first opened */
.hint { position: absolute; inset-inline-start: 12px; bottom: calc(100% + 14px); padding: 9px 26px; border-radius: 16px; background: linear-gradient(180deg, #2a2a2a, #000); color: #fff; font-weight: 900; font-size: 17px; box-shadow: 0 4px 0 #dc4425; animation: bob 1.6s ease-in-out infinite; }
.hint::after { content: ''; position: absolute; inset-inline-start: 50%; top: 100%; margin: 3px 0 0 -7px; border: 7px solid transparent; border-top-color: #000; }
@keyframes bob { 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .hint, .loading .dot { animation: none; } }

/* the pills: a row of groups and above it the open group's choices; each row scrolls sideways when it overflows */
.groups, .choices { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 10px 2px 2px; margin: -10px -2px 0; }
.groups::-webkit-scrollbar, .choices::-webkit-scrollbar { display: none; }
.pill { position: relative; flex: none; min-height: 40px; padding: 10px 40px; border: 0; border-radius: 22px; background: var(--pill); color: var(--ink); font-weight: 700; font-size: 13.5px; letter-spacing: 1px; white-space: nowrap; flex: none; transition: background .4s, color .4s; }
.pill:hover { background: linear-gradient(22deg, #f2f2f2, #d6d6d6); }
.groups .pill { font-weight: 900; }
.groups .pill[aria-pressed="true"] { background: var(--dark); color: #fff; }
.choices .pill[aria-checked="true"] { background: #333; color: #eee; }
/* v1's tick: an orange disc with a white check on the chosen pill's top-right corner */
.choices .pill[aria-checked="true"]::after { content: ''; position: absolute; top: -7px; inset-inline-end: -5px; width: 20px; height: 20px; border-radius: 50%; background: #dc4425 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='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; box-shadow: 0 0 0 2px #fff; }
.choices .pill.multi[aria-checked="true"]::after { border-radius: 6px; }

/* ---- below the fold: the summary and the quote, as v1's "Wybrane opcje" */
.summary { max-width: 980px; margin: 0 auto; padding: 64px var(--pad) 80px; }
.summary h2 { margin: 0 0 16px; font-size: 22px; font-weight: 900; letter-spacing: 0; padding-bottom: 16px; border-bottom: 2px solid var(--line); }
.lines { width: 100%; border-collapse: collapse; font-size: 14px; }
.lines th, .lines td { text-align: start; font-weight: 400; padding: 10px 0; vertical-align: top; }
.lines th { width: 50%; color: var(--mute); }
.total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 18px; padding: 16px 0; border-bottom: 2px solid var(--line); font-weight: 900; font-size: 20px; letter-spacing: 0; }
.facts { margin: 12px 0 28px; display: grid; gap: 8px; }
.facts div { display: flex; justify-content: space-between; gap: 16px; }
.facts dt { font-weight: 900; letter-spacing: 0; }
.facts dd { margin: 0; font-weight: 700; }
.quote { display: grid; gap: 14px; }
.quote textarea, .quote input:not([type=checkbox]) { width: 100%; padding: 12px 14px; border: 1px solid #ddd; border-radius: 12px; background: #fff; font-size: 16px; letter-spacing: 0; }
.quote textarea { resize: vertical; min-height: 84px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.fields label { display: grid; gap: 6px; font-size: 13px; color: var(--mute); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: #dc4425; }
.err { margin: 0; min-height: 1.4em; font-size: 14px; font-weight: 700; }
.go { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta { min-height: 56px; padding: 14px 40px; box-shadow: 0 10px 30px rgba(220, 68, 37, .25); }
.cta:disabled { opacity: .6; }
.back { color: var(--mute); font-size: 14px; }

/* phones: the buttons keep their size, the pill rows scroll; "Change" stops stretching */
@media (max-width: 600px) {
  .bar { gap: 10px; }
  .change { min-width: 0; padding: 10px 26px; }
  .btn { font-size: 15.5px; }
  .pill { padding: 10px 26px; }
  .hint { font-size: 15px; padding: 8px 20px; }
}

/* the look switcher (app/switcher.js), top right over the 3D view */
.look-at { position: absolute; z-index: 3; top: 18px; inset-inline-end: var(--pad); }

/* 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; }

/* castomo's offer button waits until app/offer-corner.js has moved it to the top-left corner, so it never shows at the
   bottom first, over the bar */
#castomo-offer-chat:not([data-placed]) { display: none; }
