@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=Manrope:wght@400;500;600;650;700;800&display=swap');
:root { color-scheme: light; --ink: #242522; --paper: #fff; --soft: #f3f3ef; --line: #dedfd8; --muted: #696b63; --accent: #575e43; --dark: #272b23; --display: 'Manrope', Arial, sans-serif; --body: 'DM Sans', Arial, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 14px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button, a, input, textarea, .upload { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
[hidden] { display: none !important; }
a { color: inherit; }
.header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 23px 5%; border-bottom: 1px solid var(--line); background: #fff; }
#product-status:empty { display: none; }
.brand { font: 700 30px/1 var(--display); text-decoration: none; letter-spacing: -1.8px; }
.brand span { font-weight: 400; }
main { max-width: 1536px; padding: 46px 5% 24px; margin: auto; }
.intro { margin-bottom: 32px; }
.intro .session-identifier { display: none; }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: 1.8px; }
.intro .eyebrow { margin: 0 0 12px; }
h1 { margin: 0; font: 500 clamp(32px, 3.4vw, 48px)/1.2 var(--display); letter-spacing: -2px; }
h1 span { color: var(--accent); }
.intro > p:last-child { margin: 13px 0 0; color: var(--muted); font-size: 15px; }
.workspace { display: grid; grid-template-columns: 365px minmax(0, 1fr); gap: 28px; align-items: start; }
.controls { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 25px; }
.step { padding-bottom: 25px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.last-step { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
.step h2 { font-family: var(--display); display: flex; align-items: center; gap: 11px; font-size: 15px; font-weight: 600; margin: 0 0 18px; }
.step-number { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; width: 28px; height: 28px; border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); font-family: var(--body); font-size: 13px; font-weight: 500; line-height: 1; }
label { display: block; font-size: 12px; margin-bottom: 8px; }
input[type=text], textarea { font-family: var(--body); font-size: 14px; font-weight: 400; line-height: 1.55; width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 11px 12px; color: var(--ink); outline: none; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(87, 94, 67, .08); }
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { display: block; resize: vertical; min-height: 85px; }
.button { border: 0; border-radius: 6px; padding: 11px 14px; font-size: 12px; font-weight: 550; }
.dark { background: var(--ink); color: #fff; white-space: nowrap; }
.dark span { margin-left: 7px; }
.hint { margin: 10px 0 0; font-size: 11px; color: var(--muted); line-height: 1.6; }
.hint.error { color: #a14036; }
.product { margin: 0 0 24px; border-radius: 7px; padding: 12px; background: var(--soft); }
.product-main { display: flex; align-items: center; gap: 15px; }
.product-main > img { width: 78px; height: 88px; object-fit: contain; mix-blend-mode: multiply; }
.product h3 { font-family: var(--display); font-size: 13px; font-weight: 550; line-height: 1.45; margin: 5px 0; }
.product .eyebrow { font-size: 8px; letter-spacing: 1.2px; }
.product-main p { margin: 0; font-size: 10px; color: var(--muted); }
.thumbnails { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.thumbnail { width: 42px; height: 44px; border: 1px solid var(--line); border-radius: 4px; background: #fff; padding: 4px; }
.thumbnail[aria-pressed=true] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.thumbnail img { width: 100%; height: 100%; object-fit: contain; }
.upload { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 141px; gap: 7px; padding: 18px 10px; margin: 0; border: 1px dashed var(--line); border-radius: 7px; background: var(--paper); cursor: pointer; text-align: center; }
.upload:hover, .upload.dragging { background: var(--soft); border-color: var(--accent); }
.upload:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.upload svg { width: 29px; height: 29px; color: var(--accent); margin-bottom: 3px; }
.upload strong { font-size: 12px; font-weight: 500; max-width: 100%; overflow-wrap: anywhere; }
.upload > span { color: var(--muted); font-size: 10px; }
.upload input { position: absolute; opacity: 0; width: 100%; height: 100%; inset: 0; cursor: pointer; }
.optional { color: var(--muted); }
.generate { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; margin-top: 19px; min-height: 48px; color: #fff; background: var(--accent); font-size: 13px; }
.generate > span:first-child { font-size: 23px; line-height: 1; }
.preview { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.preview.has-photo { width: 100%; max-width: calc(690px * var(--photo-ratio)); justify-self: center; }
.preview.has-photo .canvas { min-height: 0; }
.preview.has-photo .room-preview { height: auto; max-height: none; }
.preview-toolbar { min-height: 61px; padding: 15px 23px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.preview-toolbar > span { font-size: 9px; letter-spacing: 1.8px; color: var(--muted); font-weight: 600; }
.canvas { min-height: 520px; position: relative; background: var(--soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.empty { padding: 30px 15px 45px; text-align: center; }
.room-drawing { color: #aeb49f; width: min(390px, 85%); height: auto; display: block; margin: 0 auto 7px; }
.empty h2 { font: 500 23px/1.35 var(--display); letter-spacing: -.65px; margin: 0 0 12px; }
.empty p { color: var(--muted); font-size: 13px; margin: 0; }
.empty-caption { display: block; font-size: 8px; letter-spacing: 1.35px; color: var(--muted); margin-top: 41px; }
.room-preview { width: 100%; max-height: 690px; object-fit: contain; display: block; }
.preview-footer { min-height: 69px; padding: 16px 23px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.preview-footer p { color: var(--muted); font-size: 10px; margin: 0; max-width: 390px; }
.download { font-size: 12px; white-space: nowrap; text-decoration: none; border-bottom: 1px solid var(--accent); padding: 5px 0; }
.view-switch { display: flex; background: var(--soft); padding: 3px; border-radius: 5px; }
.view-switch button { border: 0; padding: 5px 9px; font-size: 10px; background: transparent; color: var(--muted); border-radius: 3px; }
.view-switch button[aria-pressed=true] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px #0000000c; }
.working { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 25px; background: rgba(243, 243, 239, .94); text-align: center; }
.working h2 { font-family: var(--display); font-size: 21px; font-weight: 500; margin: 22px 0 8px; }
.working p { color: var(--muted); font-size: 13px; max-width: 340px; }
.working > span:last-child { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); }
.spinner { width: 36px; height: 36px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-label { position: absolute; bottom: 14px; left: 16px; background: #ffffffdc; border-radius: 4px; padding: 5px 9px; font-size: 10px; }
.notice { padding: 13px 17px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 7px; background: var(--soft); font-size: 12px; }
.notice.error { border-color: #e8c8c0; background: #fcf0eb; color: #914534; }
.footer { display: flex; justify-content: space-between; gap: 20px; padding-top: 24px; color: var(--muted); font-size: 10px; }
@media (min-width: 1600px) {
    .canvas { min-height: 610px; }
}
@media (max-width: 1050px) {
    .workspace { grid-template-columns: 325px minmax(0, 1fr); gap: 18px; }
    .controls { padding: 20px; }
    .canvas { min-height: 500px; }
    .preview-footer { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (max-width: 760px) {
    .header { flex-wrap: wrap; padding: 21px 6%; }
    .brand { font-size: 27px; }
    main { padding: 30px 5% 20px; }
    .intro { margin-bottom: 25px; }
    .intro > p:last-child { font-size: 13px; }
    .workspace { grid-template-columns: 1fr; }
    .preview.has-photo { max-width: 100%; }
    .controls { padding: 23px; }
    .canvas { min-height: 360px; }
    .room-drawing { width: 280px; }
    .empty { padding: 0 12px 25px; }
    .empty-caption { margin-top: 25px; }
    .empty h2 { font-size: 20px; }
    .footer { flex-direction: column; gap: 4px; }
    .preview-toolbar { padding: 13px 16px; }
    .preview-toolbar > span { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .spinner { animation: none; }
}

/* Compact iframe layout; scrolling remains available on small screens. */
.visualisering-embedded main { display: flex; flex-direction: column; min-height: 100dvh; padding: 16px 24px; }
.visualisering-embedded .intro { margin-bottom: 16px; padding-right: 48px; }
.visualisering-embedded h1 { font-size: 36px; }
.visualisering-embedded .intro > p:last-child { margin-top: 6px; }
.visualisering-embedded .workspace { flex: 1; gap: 18px; align-items: stretch; }
.visualisering-embedded .controls { align-self: start; padding: 14px; }
.visualisering-embedded .preview:not(.has-photo) { display: flex; flex-direction: column; }
.visualisering-embedded .preview:not(.has-photo) .canvas { flex: 1; }
.visualisering-embedded .preview.has-photo { align-self: start; }
.visualisering-embedded .product { margin-bottom: 14px; padding: 10px; }
.visualisering-embedded .product-main > img { width: 60px; height: 60px; }
.visualisering-embedded .thumbnails { margin-top: 8px; flex-wrap: nowrap; overflow-x: auto; padding: 2px; }
.visualisering-embedded .thumbnail { flex-shrink: 0; }
.visualisering-embedded .step { padding-bottom: 14px; margin-bottom: 14px; }
.visualisering-embedded .last-step { padding-bottom: 0; margin-bottom: 0; }
.visualisering-embedded .step h2 { margin-bottom: 10px; }
.visualisering-embedded .upload { min-height: 100px; padding: 10px; gap: 4px; }
.visualisering-embedded .hint { margin-top: 6px; }
.visualisering-embedded textarea { min-height: 65px; height: 65px; padding: 8px 10px; }
.visualisering-embedded .generate { margin-top: 12px; min-height: 42px; }
.visualisering-embedded .preview-toolbar { min-height: 40px; padding: 8px 16px; }
.visualisering-embedded .preview-toolbar:has(#preview-title:empty):has(#view-switch[hidden]) { display: none; }
.visualisering-embedded .canvas { min-height: min(520px, calc(100dvh - 130px)); }
.visualisering-embedded .preview.has-photo { max-width: calc(min(560px, 100dvh - 210px) * var(--photo-ratio)); }
.visualisering-embedded .preview.has-photo .canvas { min-height: 0; }
.visualisering-embedded .preview-footer { min-height: 42px; padding: 8px 16px; }
@media (max-width: 760px) {
    .visualisering-embedded main { display: block; min-height: 0; padding: 16px; }
    .visualisering-embedded h1 { font-size: 30px; }
    .visualisering-embedded .preview.has-photo { max-width: 100%; }
}
