:root {
  --paper: #f2efe8;
  --paper-deep: #e8e4dc;
  --ink: #20231f;
  --muted: #77796f;
  --line: rgba(32, 35, 31, .14);
  --accent: #d5693f;
  --accent-dark: #b8502c;
  --panel: #f8f6f1;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--paper); color: var(--ink); }
body { font-family: Inter, "Segoe UI", Arial, sans-serif; overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }

/* Intro / landing page */
.landing-page { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-rows: 74px 1fr; overflow: hidden; background: #f5f3ed; color: #171a17; transition: opacity .55s ease, transform .7s cubic-bezier(.76,0,.24,1); }
.landing-page::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .2; background-image: radial-gradient(rgba(22,24,21,.3) .45px, transparent .45px); background-size: 4px 4px; mix-blend-mode: multiply; }
.landing-page.leaving { opacity: 0; transform: translateY(-3.5%); pointer-events: none; }
.landing-page[hidden] { display: none; }
.landing-header { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px,4vw,68px); border-bottom: 1px solid rgba(23,26,23,.15); }
.landing-brand { display: inline-flex; align-items: center; gap: 13px; font-size: 15px; font-weight: 800; letter-spacing: .2em; }
.landing-brand b { color: #a55738; }
.landing-meta { display: flex; align-items: center; gap: 22px; }
.landing-edition { color: #6f726b; font-size: 9px; font-weight: 700; letter-spacing: .2em; }
.landing-school { display: inline-flex; align-items: center; gap: 7px; color: #171a17; text-decoration: none; font-size: 8px; font-weight: 750; letter-spacing: .12em; }
.landing-school img { width: 24px; height: 24px; object-fit: contain; }
.landing-school:focus-visible { outline: 2px solid #a55738; outline-offset: 4px; }
.landing-layout { min-height: 0; display: grid; grid-template-columns: minmax(470px,.9fr) minmax(560px,1.1fr); }
.landing-copy { position: relative; z-index: 4; display: flex; flex-direction: column; justify-content: center; padding: 4vh clamp(30px,5.5vw,94px) 4vh clamp(24px,4vw,68px); }
.landing-kicker { margin: 0 0 20px; color: #a55738; font-size: 10px; font-weight: 800; letter-spacing: .19em; }
.landing-copy h1 { margin: 0; font-family: Arial, "Segoe UI", sans-serif; font-size: clamp(60px,6.7vw,116px); font-weight: 800; line-height: .8; letter-spacing: -.075em; }
.landing-copy h1 span { display: block; }
.landing-copy h1 span:nth-child(2) { margin-left: .42em; }
.landing-copy h1 .accent-word { width: max-content; margin: .06em 0 0 .06em; color: #a55738; }
.landing-intro { width: min(510px,88%); margin: 30px 0 0; color: #5f625b; font-size: 14px; line-height: 1.55; }
.landing-steps { width: min(610px,100%); margin-top: clamp(26px,4vh,46px); display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid rgba(23,26,23,.2); }
.landing-steps > div { min-width: 0; padding: 13px 15px 0 0; display: grid; grid-template-columns: 26px 1fr; gap: 4px; }
.landing-steps > div + div { padding-left: 15px; border-left: 1px solid rgba(23,26,23,.14); }
.landing-steps > div > span { color: #a55738; font-size: 9px; font-weight: 800; }
.landing-steps p { margin: 0; display: flex; flex-direction: column; gap: 5px; }
.landing-steps b { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.landing-steps small { color: #777970; font-size: 9px; line-height: 1.35; }
.landing-cta { width: 190px; height: 54px; margin-top: clamp(26px,4vh,42px); padding: 0 8px 0 21px; border: 0; border-radius: 0; background: #171a17; color: white; display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-size: 12px; font-weight: 750; letter-spacing: .04em; transition: width .3s ease, background .2s ease; }
.landing-cta i { width: 39px; height: 39px; display: grid; place-items: center; background: #a55738; font-style: normal; font-size: 17px; }
.landing-cta:hover { width: 215px; background: #292d29; }
.landing-cta:focus-visible { outline: 3px solid rgba(165,87,56,.35); outline-offset: 4px; }
.facade-collage { position: relative; min-width: 0; overflow: hidden; background: #dedfd9; isolation: isolate; }
.facade-piece { position: absolute; margin: 0; overflow: hidden; background: #e8e7e1; filter: saturate(.72) contrast(.97); }
.facade-piece img { width: 100%; height: 100%; display: block; object-fit: cover; }
.facade-piece-a { z-index: 2; left: 3%; right: 4%; bottom: 4%; height: 53%; clip-path: polygon(0 17%,12% 17%,12% 5%,32% 5%,32% 12%,51% 12%,51% 0,71% 0,71% 9%,100% 9%,100% 100%,0 100%); }
.facade-piece-a img { object-position: 50% 61%; transform: scale(1.13); }
.facade-piece-b { z-index: 1; left: 10%; top: 5%; width: 68%; height: 48%; clip-path: polygon(0 0,76% 0,76% 15%,100% 15%,100% 83%,87% 83%,87% 100%,22% 100%,22% 86%,0 86%); opacity: .8; }
.facade-piece-b img { object-position: 47% 70%; transform: scale(1.28); }
.facade-piece-d { z-index: 1; right: -4%; top: 10%; width: 47%; height: 57%; clip-path: polygon(12% 0,100% 0,100% 100%,0 100%,0 24%,12% 24%); opacity: .76; }
.facade-piece-d img { object-position: 58% 50%; transform: scale(1.16); }
.facade-piece-c { z-index: 3; right: 7%; top: 24%; width: 36%; height: 45%; clip-path: polygon(17% 0,100% 0,100% 88%,83% 88%,83% 100%,0 100%,0 22%,17% 22%); background: #f5f3ed; box-shadow: -14px 16px 0 rgba(245,243,237,.84); }
.paper-cut { position: absolute; z-index: 5; display: block; background: #f5f3ed; pointer-events: none; animation: paperDrift 8s ease-in-out infinite alternate; }
.paper-cut-a { left: -5%; top: 17%; width: 33%; height: 18%; clip-path: polygon(0 0,100% 0,100% 60%,73% 60%,73% 100%,0 100%); }
.paper-cut-b { right: -3%; bottom: 14%; width: 27%; height: 17%; clip-path: polygon(20% 0,100% 0,100% 100%,0 100%,0 38%,20% 38%); animation-delay: -2.4s; animation-duration: 10s; }
.paper-cut-c { left: 34%; top: -5%; width: 22%; height: 20%; clip-path: polygon(0 0,100% 0,100% 74%,62% 74%,62% 100%,0 100%); animation-delay: -4s; animation-duration: 12s; }
.collage-cross { position: absolute; z-index: 6; color: #a55738; font-size: 24px; font-weight: 300; }
.cross-a { left: 5%; top: 38%; }
.cross-b { right: 8%; bottom: 10%; }
.collage-caption { position: absolute; z-index: 7; color: #555850; font-size: 8px; font-weight: 700; line-height: 1.5; letter-spacing: .16em; }
.caption-top { left: 5%; top: 4%; }
.app-shell { opacity: 1; transition: opacity .45s ease; }
.app-shell[aria-hidden="true"] { opacity: 0; }
@keyframes paperDrift { from { transform: translate3d(0,0,0) rotate(0); } to { transform: translate3d(12px,-8px,0) rotate(.7deg); } }
@media (prefers-reduced-motion: reduce) { .paper-cut { animation: none; } .landing-page, .app-shell { transition: none; } }

.app-shell { height: 100vh; min-height: 720px; display: flex; flex-direction: column; }
.topbar { height: 68px; flex: 0 0 68px; padding: 0 28px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line); background: rgba(242,239,232,.94); position: relative; z-index: 10; }
.brand { display: inline-flex; width: max-content; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); font-size: 14px; letter-spacing: .16em; font-weight: 700; }
.brand b { color: var(--accent); }
.brand-mark { width: 25px; height: 25px; position: relative; display: inline-block; }
.brand-mark i { position: absolute; width: 12px; height: 12px; background: var(--ink); transform: rotate(30deg) skew(-15deg); }
.brand-mark i:nth-child(1) { left: 0; top: 8px; }
.brand-mark i:nth-child(2) { right: 0; top: 0; background: var(--accent); }
.brand-mark i:nth-child(3) { right: 0; bottom: 0; opacity: .55; }
.project-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #6b8a70; box-shadow: 0 0 0 3px rgba(107,138,112,.12); }
.project-name { margin-left: 8px; border: 0; background: none; font-weight: 650; cursor: pointer; font-size: 12px; }
.project-name span { margin-left: 4px; color: var(--muted); }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.icon-button, .avatar { border: 1px solid var(--line); background: transparent; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
.avatar { background: var(--ink); color: white; border: 0; font-size: 10px; font-weight: 700; }

.workspace { min-height: 0; flex: 1; display: grid; grid-template-columns: 390px 1fr; }
.control-panel { padding: 29px 30px 20px; background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(32,35,31,.25) transparent; }
.panel-heading { display: flex; justify-content: space-between; align-items: start; margin-bottom: 26px; }
.eyebrow { display: block; margin-bottom: 8px; color: var(--accent-dark); font-size: 9px; text-transform: uppercase; letter-spacing: .18em; font-weight: 800; }
h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 31px; line-height: 1.04; font-weight: 400; letter-spacing: -.025em; }
.step-count { margin-top: 3px; font-size: 10px; color: var(--muted); letter-spacing: .08em; }
.control-section { border-top: 1px solid var(--line); padding: 18px 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.section-title h2 { margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.section-title > span { font-size: 9px; color: var(--muted); }
.text-button { padding: 0; border: 0; color: var(--muted); background: none; font-size: 9px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.type-card { min-height: 61px; padding: 8px 5px 7px; border: 1px solid var(--line); border-radius: 3px; background: transparent; cursor: pointer; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; font-size: 9px; line-height: 1.1; transition: .2s ease; }
.type-card:hover { background: white; transform: translateY(-1px); }
.type-card.active { border-color: var(--accent); background: rgba(213,105,63,.07); box-shadow: inset 0 0 0 1px var(--accent); }
.type-icon { font-size: 18px; line-height: 1; }
.reference-section { padding-bottom: 15px; }
.upload-zone { height: 65px; border: 1px dashed rgba(32,35,31,.28); border-radius: 3px; display: flex; align-items: center; padding: 10px; cursor: pointer; position: relative; overflow: hidden; background: rgba(255,255,255,.28); transition: .2s ease; }
.upload-zone:hover, .upload-zone.drag { border-color: var(--accent); background: rgba(213,105,63,.05); }
.upload-symbol { width: 32px; height: 32px; border-radius: 50%; background: var(--paper-deep); display: grid; place-items: center; font-size: 16px; flex: 0 0 auto; }
.upload-copy { margin-left: 10px; display: flex; flex-direction: column; gap: 3px; }
.upload-copy b { font-size: 10px; }
.upload-copy small { font-size: 8px; color: var(--muted); }
.upload-action { margin-left: auto; font-size: 9px; border-bottom: 1px solid; padding-bottom: 2px; }
#referencePreview { display: none; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.upload-zone.has-image #referencePreview { display: block; }
.upload-zone.has-image::after { content: "Заменить"; position: absolute; right: 8px; bottom: 7px; padding: 4px 7px; background: rgba(22,24,22,.78); color: white; border-radius: 2px; font-size: 8px; }
.palette-row { display: flex; align-items: center; margin-top: 12px; gap: 9px; }
.palette-label { width: 45px; font-size: 9px; color: var(--muted); }
.swatches { display: flex; gap: 4px; }
.swatches i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--panel); background: var(--c, #ddd9d0); box-shadow: 0 0 0 1px rgba(32,35,31,.08); transition: .25s ease; }
.swatches.waiting i { background: transparent; border: 1px dashed rgba(32,35,31,.2); box-shadow: none; }
.palette-name { margin-left: auto; font-size: 8px; color: var(--muted); }
.sliders-section { padding-bottom: 16px; }
.range-control { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 7px; margin-top: 12px; font-size: 9px; color: var(--muted); }
.range-control output { color: var(--ink); font-weight: 650; }
.range-control input { grid-column: 1 / -1; width: 100%; height: 2px; accent-color: var(--accent); cursor: pointer; }
.generate-button { width: 100%; height: 47px; padding: 0 16px; border: 0; border-radius: 3px; background: var(--ink); color: white; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: 11px; font-weight: 650; transition: .2s ease; }
.generate-button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.generate-button:disabled { cursor: not-allowed; opacity: .38; transform: none; }
.generate-icon { color: #f3bc85; font-size: 16px; }
.generation-note { margin: 7px 0 0; text-align: center; color: var(--muted); font-size: 8px; }

.viewer-panel { min-width: 0; display: grid; grid-template-rows: 54px 1fr 87px; background: #d9d5cd; }
.viewer-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 0 22px; background: var(--paper); border-bottom: 1px solid var(--line); }
.view-tabs { align-self: stretch; display: flex; gap: 23px; }
.view-tabs button { padding: 1px 0 0; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-size: 10px; cursor: pointer; }
.view-tabs button.active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 700; }
.viewer-actions { display: flex; gap: 7px; }
.tool-button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 3px; background: transparent; cursor: pointer; }
.tool-button.off { opacity: .35; }
.export-main { height: 32px; min-width: 88px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--ink); border-radius: 3px; background: transparent; cursor: pointer; font-size: 10px; font-weight: 650; }
.canvas-wrap { min-height: 0; overflow: hidden; position: relative; cursor: grab; touch-action: none; user-select: none; background: radial-gradient(circle at 54% 37%, #f2eee5 0%, #dad6ce 52%, #c9c5bd 100%); }
.canvas-wrap:active { cursor: grabbing; }
#buildingCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.canvas-scrim { position: absolute; inset: 0; background: rgba(235,231,223,.65); backdrop-filter: blur(5px); opacity: 0; pointer-events: none; transition: .25s; }
.canvas-scrim.show { opacity: 1; }
.generation-state { position: absolute; left: 50%; top: 50%; width: 270px; transform: translate(-50%,-50%); display: none; flex-direction: column; align-items: center; text-align: center; z-index: 3; }
.generation-state.show { display: flex; }
.ai-orb { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 17px; border: 1px solid rgba(213,105,63,.45); border-radius: 50%; color: var(--accent); font-size: 20px; animation: pulse 1.2s ease-in-out infinite; }
.generation-state strong { font-family: Georgia, serif; font-size: 17px; font-weight: 400; }
.generation-state small { margin-top: 7px; color: var(--muted); font-size: 9px; }
.progress-track { width: 180px; height: 2px; margin-top: 18px; background: rgba(32,35,31,.12); overflow: hidden; }
.progress-track i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .35s ease; }
@keyframes pulse { 50% { transform: scale(1.08); box-shadow: 0 0 0 12px rgba(213,105,63,.06); } }
.model-label { position: absolute; left: 25px; top: 22px; display: flex; gap: 10px; align-items: start; pointer-events: none; }
.model-index { padding: 4px 6px; background: var(--ink); color: white; font-size: 8px; letter-spacing: .08em; }
.model-label > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.model-label b { font-family: Georgia, serif; font-size: 14px; font-weight: 400; }
.model-label small { color: var(--muted); font-size: 8px; }
.view-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 7px 10px; background: rgba(248,246,241,.74); backdrop-filter: blur(7px); border-radius: 2px; font-size: 8px; color: var(--muted); pointer-events: none; }
.view-hint span { color: var(--ink); margin-right: 4px; }
.zoom-controls { position: absolute; right: 18px; bottom: 17px; height: 29px; display: flex; align-items: center; background: rgba(248,246,241,.84); border: 1px solid rgba(32,35,31,.1); }
.zoom-controls button { width: 27px; height: 100%; border: 0; background: none; cursor: pointer; }
.zoom-controls span { width: 40px; text-align: center; font-size: 8px; color: var(--muted); }
.compass { position: absolute; right: 23px; top: 20px; width: 38px; height: 38px; border: 1px solid rgba(32,35,31,.16); border-radius: 50%; display: grid; place-items: center; pointer-events: none; }
.compass span { position: absolute; top: -4px; padding: 0 2px; background: #e5e1d9; color: var(--accent-dark); font-size: 7px; }
.compass i { width: 1px; height: 25px; background: linear-gradient(var(--accent) 50%, rgba(32,35,31,.25) 50%); transform: rotate(18deg); }
.concept-strip { padding: 15px 23px; background: var(--paper); border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(220px,1.2fr) 1fr 34px; align-items: center; gap: 28px; }
.concept-copy .eyebrow { margin-bottom: 5px; }
.concept-copy p { margin: 0; max-width: 490px; font-family: Georgia, serif; font-size: 12px; line-height: 1.35; }
.metrics { display: grid; grid-template-columns: repeat(3,1fr); border-left: 1px solid var(--line); }
.metrics div { padding-left: 16px; display: flex; flex-direction: column; gap: 6px; }
.metrics span { color: var(--muted); font-size: 8px; }
.metrics b { font-size: 11px; font-weight: 650; }
.like-button { width: 34px; height: 34px; border: 1px solid var(--line); background: transparent; border-radius: 50%; font-size: 18px; cursor: pointer; }
.like-button.liked { background: var(--accent); border-color: var(--accent); color: white; }

.d0mo-credit-footer { min-height: 38px; flex: 0 0 auto; padding: 5px 28px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); background: #f2efe8; color: #565950; font-size: 8px; letter-spacing: .035em; position: relative; z-index: 12; }
.d0mo-footer-brand { min-width: 0; display: inline-flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; }
.d0mo-footer-brand img { width: 24px; height: 24px; flex: 0 0 24px; object-fit: contain; }
.d0mo-footer-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d0mo-footer-brand strong { color: var(--ink); }
.d0mo-footer-actions { display: flex; align-items: center; gap: 17px; white-space: nowrap; }
.d0mo-footer-actions button, .d0mo-footer-actions a { padding: 3px 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--ink); text-decoration: none; cursor: pointer; font-size: 8px; }
.d0mo-footer-actions button:hover, .d0mo-footer-actions a:hover { color: var(--accent-dark); }
.d0mo-footer-actions button:focus-visible, .d0mo-footer-actions a:focus-visible, .d0mo-footer-brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(25,27,24,.55); backdrop-filter: blur(5px); opacity: 0; pointer-events: none; transition: .25s; }
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.export-modal { width: min(510px, calc(100vw - 30px)); padding: 34px; background: var(--panel); position: relative; transform: translateY(15px); transition: .25s; }
.modal-backdrop.open .export-modal { transform: translateY(0); }
.modal-close { position: absolute; right: 17px; top: 14px; border: 0; background: none; font-size: 24px; cursor: pointer; font-weight: 200; }
.export-modal h2 { margin: 0; font-family: Georgia, serif; font-size: 27px; line-height: 1.08; font-weight: 400; }
.export-modal > p { margin: 12px 0 20px; color: var(--muted); font-size: 10px; }
.format-list { display: flex; flex-direction: column; gap: 7px; }
.format-card { width: 100%; min-height: 61px; padding: 9px 13px; border: 1px solid var(--line); background: transparent; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; text-align: left; cursor: pointer; transition: .2s; }
.format-card:hover { border-color: var(--accent); background: rgba(213,105,63,.05); transform: translateX(2px); }
.format-badge { width: 39px; height: 39px; display: grid; place-items: center; background: var(--accent); color: white; border-radius: 2px; font-size: 9px; font-weight: 800; }
.format-badge.dark { background: var(--ink); }
.format-badge.pale { background: #879589; }
.format-card > span:nth-child(2) { display: flex; flex-direction: column; gap: 4px; }
.format-card b { font-size: 11px; }
.format-card small { color: var(--muted); font-size: 8px; }
.export-foot { display: flex; gap: 17px; padding-top: 17px; margin-top: 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; }
.about-backdrop { z-index: 70; padding: 24px; }
.about-modal { width: min(1020px, calc(100vw - 32px)); max-height: min(820px, calc(100vh - 48px)); display: grid; grid-template-columns: minmax(220px,.72fr) minmax(0,1.7fr); overflow: auto; position: relative; background: #f2efe8; box-shadow: 0 28px 80px rgba(0,0,0,.3); transform: translateY(15px); transition: .25s; }
.about-backdrop.open .about-modal { transform: translateY(0); }
.about-brand { align-self: start; position: sticky; top: 0; padding: 38px 28px; }
.about-brand img { display: block; width: 100%; height: auto; object-fit: contain; }
.about-brand p { margin: 18px 0 0; padding-top: 12px; border-top: 4px solid #ff4d2f; color: #0d0d0f; font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.about-content { min-width: 0; padding: 45px 58px 52px 20px; color: #0d0d0f; font-size: 12px; line-height: 1.6; }
.about-content h2 { margin: 0 0 24px; font-family: Arial, "Segoe UI", sans-serif; font-size: clamp(42px,6vw,78px); line-height: .9; letter-spacing: -.055em; }
.about-content h3 { margin: 0 0 10px; font-size: 11px; letter-spacing: .13em; text-transform: uppercase; }
.about-content p { max-width: 72ch; margin: 0 0 13px; }
.about-content section { margin-top: 32px; padding-top: 22px; border-top: 1px solid rgba(13,13,15,.18); }
.about-meta { margin: 30px 0 0; border-top: 1px solid rgba(13,13,15,.18); }
.about-meta > div { display: grid; grid-template-columns: minmax(160px,.75fr) minmax(0,1.25fr); gap: 18px; padding: 10px 0; border-bottom: 1px solid rgba(13,13,15,.18); }
.about-meta dt { font-weight: 750; }
.about-meta dd { margin: 0; }
.about-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.about-links a { min-height: 40px; padding: 9px 12px; display: inline-flex; align-items: center; border: 1px solid currentColor; color: #0d0d0f; text-decoration: none; font-size: 10px; font-weight: 750; }
.about-links a:hover, .about-links a:focus-visible { background: #0d0d0f; color: #f2efe8; outline: none; }
.about-sources ul { margin: 0; padding-left: 18px; }
.about-sources li + li { margin-top: 7px; }
.about-rights { font-size: 10px; color: #55564f; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translate(-50%, 25px); min-width: 210px; padding: 12px 15px; background: var(--ink); color: white; display: flex; justify-content: center; gap: 9px; font-size: 10px; opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.toast > span:first-child { color: #b9d8aa; }

.result-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 28px; background: rgba(22,24,21,.72); backdrop-filter: blur(8px); opacity: 0; pointer-events: none; transition: .3s ease; }
.result-backdrop.open { opacity: 1; pointer-events: auto; }
.result-modal { width: min(1120px, 96vw); height: min(760px, 92vh); min-height: 520px; display: grid; grid-template-rows: 82px 1fr 45px; background: var(--paper); box-shadow: 0 28px 80px rgba(0,0,0,.28); transform: translateY(16px) scale(.985); transition: .3s ease; }
.result-backdrop.open .result-modal { transform: translateY(0) scale(1); }
.result-header { padding: 0 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.result-header .eyebrow { margin-bottom: 4px; }
.result-header h2 { margin: 0; font-family: Georgia, serif; font-size: 23px; font-weight: 400; }
.result-actions { display: flex; align-items: center; gap: 9px; }
.result-actions > button:first-child { height: 34px; padding: 0 14px; border: 1px solid var(--ink); background: var(--ink); color: white; border-radius: 2px; cursor: pointer; font-size: 9px; }
.result-close { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); background: transparent; border-radius: 50%; cursor: pointer; font-size: 20px; font-weight: 200; }
.result-viewer { position: relative; min-height: 0; overflow: hidden; cursor: grab; touch-action: none; user-select: none; background: radial-gradient(circle at 52% 40%, #f0ece3, #d3cfc7 60%, #bfbbb3); }
.result-viewer:active { cursor: grabbing; }
#resultCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.generated-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.result-tabs { position: absolute; z-index: 5; left: 50%; top: 17px; transform: translateX(-50%); display: flex; padding: 3px; background: rgba(248,246,241,.86); backdrop-filter: blur(8px); border: 1px solid rgba(32,35,31,.1); }
.result-tabs button { padding: 7px 12px; border: 0; background: transparent; color: var(--muted); font-size: 8px; cursor: pointer; }
.result-tabs button.active { background: var(--ink); color: white; }
.result-viewer.image-mode { cursor: default; }
.result-viewer.image-mode .generated-image { display: block; }
.result-viewer.image-mode #resultCanvas,
.result-viewer.image-mode .result-view-hint,
.result-viewer.image-mode .result-badge { display: none; }
.result-view-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 8px 12px; background: rgba(248,246,241,.8); backdrop-filter: blur(7px); color: var(--muted); font-size: 9px; pointer-events: none; }
.result-view-hint span { color: var(--ink); margin-right: 5px; }
.result-badge { position: absolute; left: 22px; top: 20px; display: grid; grid-template-columns: auto auto; align-items: center; gap: 2px 9px; pointer-events: none; }
.result-badge > span { grid-row: 1 / 3; width: 31px; height: 31px; display: grid; place-items: center; background: var(--ink); color: white; font-size: 8px; }
.result-badge b { font-family: Georgia, serif; font-size: 14px; font-weight: 400; }
.result-badge small { color: var(--muted); font-size: 8px; }
.result-footer { padding: 0 24px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 8px; letter-spacing: .04em; border-top: 1px solid var(--line); }
.result-footer i { display: inline-block; width: 6px; height: 6px; margin-right: 6px; background: #6b8a70; border-radius: 50%; }

@media (max-width: 1050px) {
  .landing-layout { grid-template-columns: 52% 48%; }
  .landing-copy { padding-right: 34px; }
  .landing-copy h1 { font-size: clamp(54px,7vw,76px); }
  .landing-steps { grid-template-columns: 1fr; }
  .landing-steps > div { padding: 9px 0; }
  .landing-steps > div + div { padding-left: 0; border-left: 0; border-top: 1px solid rgba(23,26,23,.1); }
  .workspace { grid-template-columns: 340px 1fr; }
  .control-panel { padding-left: 22px; padding-right: 22px; }
  .concept-strip { grid-template-columns: 1fr auto; }
  .metrics { display: none; }
}
@media (max-width: 780px) {
  body { overflow: auto; }
  body:has(.landing-page:not([hidden])) { overflow: hidden; }
  .landing-page { grid-template-rows: 62px 1fr; }
  .landing-header { padding: 0 20px; }
  .landing-edition { display: none; }
  .landing-layout { display: block; position: relative; }
  .landing-copy { height: 100%; justify-content: flex-start; padding: 7vh 22px 24px; }
  .landing-copy h1 { font-size: clamp(51px,14.5vw,78px); line-height: .83; }
  .landing-copy h1 span:nth-child(2) { margin-left: .15em; }
  .landing-intro { width: 78%; margin-top: 23px; font-size: 12px; }
  .landing-steps { width: 58%; margin-top: 24px; }
  .landing-steps small { display: none; }
  .landing-cta { margin-top: 22px; }
  .facade-collage { position: absolute; z-index: 1; right: -12%; bottom: -2%; width: 66%; height: 57%; background: transparent; opacity: .68; }
  .landing-copy { position: relative; z-index: 3; }
  .facade-piece-b, .paper-cut-c, .caption-top { display: none; }
  .facade-piece-a { left: 0; right: 0; bottom: 0; height: 68%; }
  .facade-piece-c { right: 4%; top: 3%; width: 57%; height: 62%; }
  .app-shell { height: auto; min-height: 100vh; }
  .topbar { grid-template-columns: 1fr auto; }
  .project-meta { display: none; }
  .workspace { display: flex; flex-direction: column; }
  .control-panel { order: 2; overflow: visible; border-right: 0; padding: 26px 22px; }
  .viewer-panel { order: 1; height: 620px; grid-template-rows: 50px 1fr 85px; }
  .viewer-toolbar { padding: 0 12px; }
  .view-tabs { gap: 14px; }
  .tool-button { display: none; }
  .type-grid { grid-template-columns: repeat(4, 1fr); }
  .d0mo-credit-footer { position: sticky; bottom: 0; padding: 7px 16px; }
  .d0mo-footer-actions a { display: none; }
  .about-backdrop { padding: 10px; }
  .about-modal { width: 100%; max-height: calc(100vh - 20px); grid-template-columns: 1fr; }
  .about-brand { position: static; padding: 30px 54px 10px 24px; }
  .about-brand img { width: min(310px,85%); }
  .about-content { padding: 25px 24px 42px; }
  .about-meta > div { grid-template-columns: 1fr; gap: 2px; }
  .result-backdrop { padding: 10px; }
  .result-modal { width: 100%; height: 90vh; }
  .result-header h2 { font-size: 17px; }
  .result-tabs { top: auto; bottom: 16px; }
}
@media (max-width: 480px) {
  .landing-meta { gap: 8px; }
  .landing-school span { display: none; }
  .landing-kicker { margin-bottom: 14px; font-size: 8px; }
  .landing-copy { padding-top: 5vh; }
  .landing-copy h1 { font-size: clamp(44px,14vw,63px); }
  .landing-intro { width: 93%; }
  .landing-steps { width: 74%; }
  .facade-collage { width: 72%; height: 44%; opacity: .48; }
  .topbar { height: 58px; flex-basis: 58px; padding: 0 16px; }
  .d0mo-footer-brand span { max-width: 220px; }
  .viewer-panel { height: 550px; }
  .view-tabs button:nth-child(2) { display: none; }
  .type-grid { grid-template-columns: repeat(3, 1fr); }
  .concept-strip { padding: 13px 15px; gap: 10px; }
  .concept-copy p { font-size: 11px; }
  .export-foot { flex-wrap: wrap; gap: 7px 12px; }
}
