:root {
  --ink: #2d504d;
  --muted: #70827d;
  --paper: #fffdf8;
  --cream: #fff5dc;
  --line: #ded5ba;
  --green: #3e9875;
  --green-dark: #27755b;
  --yellow: #f2c452;
  --coral: #ea756e;
  --blue: #6aadd0;
  --violet: #8876b7;
  --shadow: 0 18px 42px rgba(62, 78, 69, .12);
}

* { box-sizing: border-box; }

html { min-width: 320px; scroll-behavior: smooth; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 8%, rgba(244, 197, 91, .24) 0 105px, transparent 106px),
    radial-gradient(circle at 96% 21%, rgba(110, 179, 164, .17) 0 120px, transparent 121px),
    linear-gradient(135deg, #fff8e9 0%, #f7f1e3 54%, #f2f4e9 100%);
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
}

button, input { font: inherit; }
button { color: inherit; }

.app {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 0 50px;
}

.loading-card {
  display: grid;
  min-height: 310px;
  place-items: center;
  align-content: center;
  gap: 8px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.loading-card span { font-size: 52px; }
.loading-card p { margin: 0; font-weight: 900; }

.topbar,
.brand,
.topbar-actions,
.hero-actions,
.section-heading,
.project-head,
.workspace-head,
.workspace-actions,
.tray-head,
.tray-actions,
.feedback,
.result-actions,
.portfolio-card-head {
  display: flex;
  align-items: center;
}

.topbar {
  min-height: 70px;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 14px;
  background: rgba(255, 253, 248, .94);
  border: 2px solid var(--line);
  border-radius: 23px;
  box-shadow: 0 10px 26px rgba(56, 74, 66, .09);
}

.brand {
  min-height: 44px;
  min-width: 0;
  gap: 11px;
  padding: 0;
  color: var(--ink);
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.brand-mark {
  display: grid;
  width: 47px;
  height: 47px;
  flex: 0 0 47px;
  place-items: center;
  background: #f7cf68;
  border: 2px solid #d9b55d;
  border-radius: 15px;
  font-size: 25px;
  box-shadow: inset 0 -4px 0 rgba(163, 117, 36, .12);
}

.brand-copy strong,
.brand-copy small { display: block; }
.brand-copy strong { font-size: 19px; line-height: 1.05; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-family: Georgia, serif; font-size: 9px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }

.topbar-actions { gap: 9px; }

.top-button,
.primary-button,
.secondary-button,
.hint-button,
.icon-button,
.project-card,
.item-card,
.room-slot,
.rule-card,
.portfolio-card {
  -webkit-tap-highlight-color: transparent;
}

.top-button {
  min-height: 45px;
  padding: 0 15px;
  background: #f8f3e7;
  border: 2px solid var(--line);
  border-radius: 15px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.count-badge {
  display: inline-grid;
  min-width: 25px;
  height: 25px;
  margin-left: 7px;
  place-items: center;
  color: white;
  background: var(--coral);
  border-radius: 50%;
  font-size: 12px;
}

button:focus-visible {
  outline: 4px solid rgba(92, 164, 197, .35);
  outline-offset: 3px;
}

.top-button:hover,
.secondary-button:hover,
.hint-button:hover,
.project-card:hover,
.portfolio-card:hover { transform: translateY(-2px); }

.primary-button,
.secondary-button,
.hint-button {
  min-height: 50px;
  padding: 0 20px;
  border-radius: 16px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(180deg, #4ca987, var(--green));
  border: 2px solid var(--green-dark);
  box-shadow: 0 7px 0 #2c765d, 0 14px 22px rgba(45, 112, 88, .18);
}

.primary-button:hover { transform: translateY(-2px); box-shadow: 0 9px 0 #2c765d, 0 17px 24px rgba(45, 112, 88, .2); }
.primary-button:active { transform: translateY(5px); box-shadow: 0 2px 0 #2c765d; }

.secondary-button {
  background: #fffaf0;
  border: 2px solid var(--line);
  box-shadow: 0 5px 0 #d8cfb3;
}

.hint-button {
  color: #6b5725;
  background: #fff2b9;
  border: 2px solid #dfc56a;
  box-shadow: 0 5px 0 #d4b95f;
}

.eyebrow {
  margin: 0 0 7px;
  color: #5f7d75;
  font-family: Georgia, serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  min-height: 440px;
  margin-top: 20px;
  overflow: hidden;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 38px;
  box-shadow: var(--shadow);
}

.hero::before {
  position: absolute;
  inset: 0 0 0 52%;
  content: "";
  background: linear-gradient(145deg, #e2f0e8, #dcebf4 56%, #eee5f4);
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  padding: 52px 20px 52px 52px;
}

.hero h1,
.section-heading h2,
.workspace-head h1,
.result-copy h1,
.portfolio-hero h1 {
  margin: 0;
  letter-spacing: -.045em;
  line-height: .98;
}

.hero h1 { max-width: 480px; font-size: clamp(43px, 5.2vw, 66px); }
.hero h1 span { color: var(--coral); }
.hero-copy > p:not(.eyebrow) { max-width: 470px; margin: 20px 0 25px; color: var(--muted); font-size: 17px; font-weight: 700; line-height: 1.55; }
.hero-actions { flex-wrap: wrap; gap: 14px; }

.hero-room-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 35px 36px 30px 12px;
}

.hero-room-card {
  position: relative;
  width: min(480px, 100%);
  padding: 14px;
  background: #fffaf1;
  border: 2px solid #d9ceb2;
  border-radius: 28px;
  box-shadow: 0 20px 34px rgba(55, 78, 70, .16);
  transform: rotate(1.2deg);
}

.hero-room-card::before {
  position: absolute;
  top: -15px;
  left: 42%;
  width: 92px;
  height: 26px;
  content: "";
  background: rgba(239, 198, 104, .7);
  transform: rotate(-2deg);
}

.mini-room { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #f3ddcb; border-radius: 19px; }
.mini-wall { position: absolute; inset: 0 0 34%; background: linear-gradient(135deg, #f5e2d3, #e7f0e8); }
.mini-floor { position: absolute; inset: 66% 0 0; background: repeating-linear-gradient(90deg, #d7b786 0 34px, #cba976 35px 38px); }
.mini-window { position: absolute; top: 12%; left: 9%; width: 26%; height: 31%; background: #cce8f1; border: 7px solid #fffaf1; box-shadow: 0 0 0 3px #6f9088; }
.mini-window::before, .mini-window::after { position: absolute; content: ""; background: #6f9088; }
.mini-window::before { top: 48%; left: 0; width: 100%; height: 3px; }
.mini-window::after { top: 0; left: 48%; width: 3px; height: 100%; }
.mini-sofa { position: absolute; left: 31%; bottom: 12%; width: 47%; height: 32%; background: #69af91; border: 5px solid #356f62; border-radius: 18px 18px 9px 9px; }
.mini-sofa::before { position: absolute; inset: -12px 10px 42%; content: ""; background: #8bc6ad; border: 5px solid #356f62; border-radius: 19px; }
.mini-rug { position: absolute; left: 24%; bottom: 2%; width: 64%; height: 19%; background: #f0c965; border: 4px solid #b99032; border-radius: 50%; }
.mini-plant { position: absolute; right: 5%; bottom: 15%; font-size: clamp(35px, 4vw, 58px); }
.hero-room-card small { display: block; padding: 10px 4px 1px; color: var(--muted); font-size: 11px; font-weight: 900; text-align: center; }

.how-section, .projects-section, .portfolio-section { margin-top: 48px; }
.section-heading { justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.section-heading h2 { font-size: clamp(32px, 4vw, 43px); }
.section-heading > p { max-width: 410px; margin: 0; color: var(--muted); font-weight: 700; line-height: 1.5; text-align: right; }

.steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.step-card { display: grid; grid-template-columns: 54px 1fr; gap: 13px; min-height: 128px; padding: 20px; background: var(--paper); border: 2px solid var(--line); border-radius: 24px; box-shadow: 0 12px 25px rgba(57, 76, 68, .08); }
.step-number { display: grid; width: 50px; height: 50px; place-items: center; color: white; background: var(--coral); border-radius: 17px; font-family: Georgia, serif; font-size: 25px; font-weight: 900; }
.step-card:nth-child(2) .step-number { background: var(--blue); }
.step-card:nth-child(3) .step-number { background: var(--violet); }
.step-card strong, .step-card small { display: block; }
.step-card strong { margin-top: 3px; font-size: 18px; }
.step-card small { margin-top: 7px; color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.42; }

.projects-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.project-card {
  position: relative;
  min-height: 245px;
  padding: 20px;
  overflow: hidden;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 27px;
  box-shadow: 0 13px 27px rgba(57, 77, 68, .09);
  cursor: pointer;
  text-align: left;
  transition: transform .18s ease;
}

.project-card::after { position: absolute; right: -34px; bottom: -34px; width: 130px; height: 130px; content: ""; background: var(--project-color); border-radius: 50%; opacity: .28; }
.project-number { display: inline-grid; min-width: 46px; height: 33px; place-items: center; background: var(--project-color); border-radius: 12px; font-size: 12px; font-weight: 900; }
.project-icon { display: block; margin: 21px 0 11px; font-size: 48px; }
.project-card strong { display: block; font-size: 21px; }
.project-card small { display: block; max-width: 88%; margin-top: 8px; color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.4; }
.project-done { position: absolute; top: 16px; right: 16px; z-index: 2; display: grid; width: 34px; height: 34px; place-items: center; color: white; background: var(--green); border-radius: 50%; font-weight: 900; }

.adult-note { display: flex; gap: 13px; margin-top: 18px; padding: 16px 19px; color: #65756f; background: #edf4e7; border: 2px solid #cadbc3; border-radius: 20px; font-size: 13px; font-weight: 700; line-height: 1.45; }
.adult-note span { font-size: 24px; }
.adult-note p { margin: 0; }

.workspace-shell { margin-top: 20px; padding: 27px; background: rgba(255, 253, 248, .95); border: 2px solid var(--line); border-radius: 36px; box-shadow: var(--shadow); }
.workspace-head { justify-content: space-between; gap: 22px; margin-bottom: 20px; }
.workspace-head h1 { font-size: clamp(34px, 4vw, 48px); }
.workspace-head > div > p:not(.eyebrow) { margin: 9px 0 0; color: var(--muted); font-weight: 700; }
.project-progress { min-width: 128px; padding: 12px 16px; background: #f7f0df; border: 2px solid var(--line); border-radius: 18px; text-align: center; }
.project-progress strong, .project-progress small { display: block; }
.project-progress strong { font-size: 24px; }
.project-progress small { color: var(--muted); font-size: 11px; font-weight: 900; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); gap: 18px; align-items: start; }

.room-panel { min-width: 0; padding: 14px; background: #f8f1e3; border: 2px solid var(--line); border-radius: 28px; }
.room-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--wall-color);
  border: 3px solid #8a978c;
  border-radius: 21px;
  box-shadow: inset 0 0 35px rgba(50, 72, 64, .11);
  touch-action: manipulation;
}

.room-wall { position: absolute; inset: 0 0 34%; background: linear-gradient(140deg, rgba(255,255,255,.32), transparent 58%); }
.room-wall::before { position: absolute; inset: 0; content: ""; background-image: radial-gradient(circle, rgba(255,255,255,.42) 0 2px, transparent 2.5px); background-size: 28px 28px; opacity: var(--pattern-opacity); }
.room-floor { position: absolute; inset: 66% 0 0; background: repeating-linear-gradient(90deg, var(--floor-a) 0 52px, var(--floor-b) 53px 57px); border-top: 4px solid rgba(83, 87, 72, .42); transform-origin: top; }
.room-floor::after { position: absolute; inset: 0; content: ""; background: linear-gradient(160deg, rgba(255,255,255,.2), transparent 48%); }
.room-corner { position: absolute; top: 0; bottom: 34%; left: 50%; width: 2px; background: rgba(90, 102, 94, .2); }

.room-slot {
  position: absolute;
  z-index: 4;
  display: grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 3px dashed rgba(57, 91, 83, .38);
  border-radius: 17px;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.room-slot::after { color: rgba(53, 83, 75, .7); content: attr(data-short-label); font-size: 10px; font-weight: 900; }
.room-slot.has-item { border-color: transparent; }
.room-slot.has-item::after { display: none; }
.room-slot.is-compatible { z-index: 7; background: rgba(255, 241, 166, .48); border-color: #d4a735; animation: slot-pulse 1s ease-in-out infinite; }
.room-slot.is-wrong { background: rgba(239, 113, 104, .19); border-color: var(--coral); }
.room-slot.is-correct { border-color: rgba(62, 152, 117, .55); }
.room-slot.is-hinted { background: rgba(255, 231, 103, .55); box-shadow: 0 0 0 8px rgba(242, 196, 82, .22); }
.room-slot.drag-over { transform: scale(1.05); background: rgba(255, 239, 141, .72); border-color: #b88c20; }

@keyframes slot-pulse { 50% { box-shadow: 0 0 0 7px rgba(242, 196, 82, .18); } }

.slot-wall-left { top: 11%; left: 5%; width: 26%; height: 29%; }
.slot-wall-center { top: 8%; left: 37%; width: 26%; height: 29%; }
.slot-wall-right { top: 11%; right: 5%; width: 26%; height: 29%; }
.slot-ground-center { z-index: 2; left: 30%; bottom: 2.5%; width: 40%; height: 25%; border-radius: 50%; }
.slot-floor-left { left: 3%; bottom: 10%; width: 31%; height: 35%; }
.slot-floor-center { left: 34.5%; bottom: 9%; width: 31%; height: 38%; }
.slot-floor-right { right: 3%; bottom: 10%; width: 31%; height: 35%; }

.placed-item { width: 100%; height: 100%; pointer-events: none; filter: drop-shadow(0 7px 5px rgba(43, 60, 55, .18)); }
.placed-item svg { display: block; width: 100%; height: 100%; overflow: visible; }
.placed-label { position: absolute; left: 50%; bottom: -2px; padding: 2px 7px; color: #31524e; background: rgba(255,253,247,.9); border-radius: 8px; font-size: 9px; font-weight: 900; transform: translateX(-50%); white-space: nowrap; }
.slot-ground-center .placed-label { bottom: 0; }

.room-caption { display: flex; justify-content: space-between; gap: 12px; padding: 11px 3px 1px; color: var(--muted); font-size: 11px; font-weight: 800; }
.room-caption span:last-child { text-align: right; }

.side-panel { display: grid; gap: 14px; }
.brief-card, .tray-card { padding: 17px; background: #fffaf0; border: 2px solid var(--line); border-radius: 24px; }
.brief-card h2, .tray-head h2 { margin: 0; font-size: 23px; letter-spacing: -.03em; }
.brief-card > p { margin: 7px 0 14px; color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.42; }
.rules-list { display: grid; gap: 7px; }
.rule-card { gap: 9px; min-height: 44px; padding: 8px 10px; background: #f7f2e7; border: 2px solid #e2dbc5; border-radius: 14px; font-size: 12px; font-weight: 800; }
.rule-dot { display: grid; width: 27px; height: 27px; flex: 0 0 27px; place-items: center; background: #e5ded0; border-radius: 9px; }
.rule-card.is-done { color: #2d765d; background: #e8f4ec; border-color: #add3bb; }
.rule-card.is-done .rule-dot { color: white; background: var(--green); }

.tray-head { justify-content: space-between; gap: 12px; }
.tray-head small { color: var(--muted); font-size: 11px; font-weight: 900; }
.items-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 13px; }
.item-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 91px;
  place-items: center;
  align-content: center;
  gap: 3px;
  padding: 5px;
  background: white;
  border: 2px solid #ddd5bd;
  border-radius: 15px;
  cursor: pointer;
}
.item-card:hover { transform: translateY(-2px); }
.item-card[aria-pressed="true"] { background: #fff2bd; border-color: #cb9d29; box-shadow: 0 0 0 4px rgba(242, 196, 82, .22); }
.item-card.is-placed { opacity: .45; }
.item-card svg { width: 68px; height: 51px; overflow: visible; }
.item-card span { max-width: 100%; overflow: hidden; font-size: 10px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.item-card .placed-check { position: absolute; top: 4px; right: 4px; display: grid; width: 21px; height: 21px; place-items: center; color: white; background: var(--green); border-radius: 50%; font-size: 11px; }

.tray-actions { justify-content: space-between; gap: 8px; margin-top: 13px; }
.tray-actions button { min-height: 44px; padding: 0 12px; font-size: 12px; }

.feedback { min-height: 52px; gap: 10px; padding: 11px 13px; background: #f0f3eb; border: 2px solid #d4dccd; border-radius: 17px; color: #66766f; font-size: 12px; font-weight: 800; line-height: 1.35; }
.feedback-icon { display: grid; width: 31px; height: 31px; flex: 0 0 31px; place-items: center; background: white; border-radius: 10px; font-weight: 900; }
.feedback.is-error { color: #9b4d49; background: #fff0ed; border-color: #efb3ae; }
.feedback.is-success { color: #2c765c; background: #eaf6ed; border-color: #add6bd; }

.workspace-actions { justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.result-shell { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; margin-top: 20px; padding: 36px; background: var(--paper); border: 2px solid var(--line); border-radius: 38px; box-shadow: var(--shadow); }
.result-room { padding: 14px; background: #f9f2e5; border: 2px solid var(--line); border-radius: 27px; transform: rotate(-.8deg); }
.result-room .room-stage { pointer-events: none; }
.result-copy h1 { font-size: clamp(43px, 5vw, 65px); }
.result-copy h1 span { display: block; color: var(--coral); }
.result-copy > p:not(.eyebrow) { margin: 18px 0; color: var(--muted); font-size: 16px; font-weight: 700; line-height: 1.5; }
.result-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0; }
.result-stat { padding: 14px; background: #f7f1e4; border: 2px solid var(--line); border-radius: 17px; }
.result-stat strong, .result-stat small { display: block; }
.result-stat strong { font-size: 23px; }
.result-stat small { margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 900; }
.result-actions { flex-wrap: wrap; gap: 11px; }

.portfolio-hero { margin-top: 20px; padding: 34px; background: var(--paper); border: 2px solid var(--line); border-radius: 34px; box-shadow: var(--shadow); }
.portfolio-hero h1 { font-size: clamp(40px, 5vw, 58px); }
.portfolio-hero > p { max-width: 690px; margin: 15px 0 0; color: var(--muted); font-weight: 700; line-height: 1.5; }
.portfolio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.portfolio-card { padding: 14px; background: var(--paper); border: 2px solid var(--line); border-radius: 27px; box-shadow: 0 13px 27px rgba(57, 77, 68, .09); cursor: pointer; text-align: left; transition: transform .18s ease; }
.portfolio-card .room-stage { pointer-events: none; }
.portfolio-card-head { justify-content: space-between; gap: 12px; padding: 11px 4px 3px; }
.portfolio-card-head strong { font-size: 18px; }
.portfolio-card-head span { padding: 5px 9px; color: #2c765c; background: #e7f4ea; border-radius: 10px; font-size: 10px; font-weight: 900; }
.portfolio-empty { grid-column: 1 / -1; padding: 45px 24px; background: var(--paper); border: 3px dashed var(--line); border-radius: 29px; text-align: center; }
.portfolio-empty span { font-size: 58px; }
.portfolio-empty h2 { margin: 10px 0 8px; font-size: 30px; }
.portfolio-empty p { max-width: 520px; margin: 0 auto 19px; color: var(--muted); font-weight: 700; line-height: 1.5; }

.toast { position: fixed; z-index: 50; right: 18px; bottom: 18px; max-width: min(390px, calc(100% - 36px)); padding: 13px 17px; color: white; background: #315a52; border-radius: 16px; box-shadow: 0 13px 30px rgba(39, 65, 58, .23); font-size: 13px; font-weight: 900; opacity: 0; pointer-events: none; transform: translateY(15px); transition: opacity .2s ease, transform .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

.drag-ghost { position: fixed; z-index: 100; width: 110px; height: 85px; padding: 5px; pointer-events: none; transform: translate(-50%, -50%); filter: drop-shadow(0 8px 8px rgba(45,65,58,.25)); }
.drag-ghost svg { width: 100%; height: 100%; }

@media (max-width: 1024px) {
  .hero-copy { padding-left: 36px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .side-panel { grid-template-columns: .85fr 1.15fr; }
  .feedback { grid-column: 1 / -1; }
  .result-shell { gap: 22px; padding: 26px; }
}

@media (max-width: 820px) {
  .app { width: min(100% - 22px, 1120px); padding-top: 11px; }
  .topbar { min-height: 62px; }
  .brand-copy small { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero::before { inset: 48% 0 0; clip-path: polygon(0 14%, 100% 0, 100% 100%, 0 100%); }
  .hero-copy { padding: 43px 32px 20px; }
  .hero-room-wrap { padding: 25px 34px 38px; }
  .hero-room-card { width: min(500px, 84%); }
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps-grid { grid-template-columns: 1fr; }
  .step-card { min-height: 104px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .section-heading > p { text-align: left; }
  .side-panel { grid-template-columns: 1fr; }
  .result-shell { grid-template-columns: 1fr; }
  .result-room { width: min(600px, 100%); margin: 0 auto; }
}

@media (max-width: 560px) {
  .app { width: min(100% - 18px, 1120px); padding-bottom: 32px; }
  .topbar { padding: 8px; border-radius: 19px; }
  .brand { gap: 7px; }
  .brand-mark { width: 42px; height: 42px; flex-basis: 42px; font-size: 22px; }
  .brand-copy strong { max-width: 126px; font-size: 14px; line-height: 1.05; }
  .top-button { min-width: 45px; padding: 0 10px; }
  .top-button .button-label { display: none; }
  .count-badge { margin-left: 3px; }
  .hero { margin-top: 12px; border-radius: 28px; }
  .hero-copy { padding: 34px 23px 18px; }
  .hero h1 { font-size: 43px; }
  .hero-copy > p:not(.eyebrow) { margin: 16px 0 21px; font-size: 15px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions button { width: 100%; }
  .hero-room-wrap { padding: 24px 18px 30px; }
  .hero-room-card { width: 92%; }
  .how-section, .projects-section, .portfolio-section { margin-top: 37px; }
  .section-heading h2 { font-size: 32px; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 210px; }
  .workspace-shell { margin-top: 12px; padding: 14px; border-radius: 28px; }
  .workspace-head { align-items: flex-start; flex-direction: column; }
  .workspace-head h1 { font-size: 34px; }
  .project-progress { min-width: 112px; padding: 9px 12px; }
  .room-panel { padding: 7px; border-radius: 20px; }
  .room-stage { border-radius: 15px; }
  .room-slot { min-width: 44px; min-height: 44px; border-width: 2px; border-radius: 12px; }
  .room-slot::after { font-size: 8px; }
  .placed-label { display: none; }
  .room-caption { font-size: 9px; }
  .brief-card, .tray-card { padding: 14px; border-radius: 20px; }
  .items-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .item-card { min-height: 87px; }
  .item-card svg { width: 60px; height: 46px; }
  .item-card span { font-size: 9px; }
  .tray-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .tray-actions button { width: 100%; }
  .workspace-actions { display: grid; grid-template-columns: 1fr; }
  .workspace-actions button { width: 100%; }
  .result-shell { margin-top: 12px; padding: 17px; border-radius: 28px; }
  .result-copy h1 { font-size: 43px; }
  .result-actions { align-items: stretch; flex-direction: column; }
  .result-actions button { width: 100%; }
  .portfolio-hero { margin-top: 12px; padding: 25px 20px; border-radius: 28px; }
  .portfolio-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

.print-sheet { display: none; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body > * { display: none !important; }
  body > .print-sheet { display: grid !important; width: 100%; height: 100%; place-items: center; align-content: center; gap: 6mm; color: #2d504d; background: #fff; }
  .print-sheet__art { width: min(245mm, 100%); }
  .print-sheet .room-stage { width: 100%; margin: 0; box-shadow: none; }
  .print-sheet h1 { margin: 0; font-size: 18pt; text-align: center; }
}
