@charset "UTF-8";

:root {
  color-scheme: light;
  --paper: #f2f0e8;
  --paper-light: #faf9f5;
  --paper-dark: #e5e3d9;
  --ink: #243b33;
  --ink-soft: #63716a;
  --muted: #969c90;
  --line: #dcded3;
  --wood: #a97e52;
  --wood-light: #dbc8ac;
  --red: #ab4c39;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; min-height: 100%; }
body { font-family: var(--sans); color: var(--ink); background: var(--paper); font-size: 13px; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, canvas:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
button { touch-action: manipulation; }
[hidden] { display: none !important; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.app-shell { display: flex; flex-direction: column; height: 100dvh; min-height: 600px; overflow: hidden; }

.app-header { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 31px; border-bottom: 1px solid var(--line); background: rgba(250,249,245,.95); z-index: 4; }
.brand { display: flex; align-items: center; gap: 13px; color: var(--ink); text-decoration: none; min-width: 250px; }
.brand-seal { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; color: var(--red); flex-shrink: 0; }
.brand-seal svg { width: 34px; height: 34px; stroke-width: 1.25; }
.brand-wordmark { font-family: var(--serif); font-weight: 700; font-size: 26px; letter-spacing: 5px; line-height: 1.2; }
.brand-logo-mark { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand-logotype { display: block; width: 67px; height: 30px; object-fit: contain; }
.brand-caption { display: block; font-family: var(--sans); font-size: 10px; font-weight: 400; letter-spacing: 2px; margin-top: 7px; color: var(--ink-soft); }
.mode-switch { display: flex; align-items: center; padding: 4px; gap: 4px; border: 1px solid var(--line); background: #edeee6; border-radius: 6px; }
.mode-button { min-width: 130px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 3px; padding: 11px 17px; font-size: 12px; letter-spacing: .5px; color: var(--ink-soft); background: transparent; transition: background .18s, color .18s, box-shadow .18s; }
.mode-button svg { width: 17px; height: 17px; }
.mode-button:hover { color: var(--ink); background: rgba(255,255,255,.6); }
.mode-button[aria-pressed="true"], .mode-button.is-active { color: var(--paper-light); background: var(--ink); box-shadow: 0 2px 5px #243b3314; }
.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 23px; min-width: 250px; }
.edition-label { font-family: var(--serif); color: #838a7d; font-size: 12px; letter-spacing: 1px; }
.help-button { display: inline-flex; align-items: center; gap: 7px; background: transparent; border: 0; padding: 10px 0 10px 11px; font-size: 11px; color: var(--ink-soft); }
.help-button svg { width: 18px; height: 18px; }
.help-button:hover { color: var(--red); }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 0; flex: 1; }
.stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; isolation: isolate; background: radial-gradient(ellipse at 45% 42%, #aebfb7 0%, #a2b7ab 60%, #98afa2 100%); }
#canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; outline-offset: -5px; }
.stage-heading { position: absolute; top: 29px; left: 32px; right: 30px; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; z-index: 2; pointer-events: none; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 10px; font-weight: 500; line-height: 1.5; letter-spacing: 2px; color: var(--ink-soft); }
.chapter-number { display: inline-flex; align-items: center; justify-content: center; height: 21px; width: 21px; border: 1px solid #aebaac; font-family: var(--serif); font-size: 12px; letter-spacing: 0; color: var(--ink); }
.eyebrow-rule { display: block; height: 1px; width: 36px; margin-left: 2px; background: #bfc6b8; }
.chapter-heading h1 { font-family: var(--serif); font-size: clamp(21px, 2vw, 28px); font-weight: 600; letter-spacing: 1px; line-height: 1.5; margin: 13px 0 5px; }
.chapter-heading p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.9; letter-spacing: .3px; max-width: 420px; }
.progress-panel { width: 142px; flex-shrink: 0; margin-top: 6px; }
.progress-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 10px; color: var(--ink-soft); }
.progress-caption strong { font-family: Georgia, var(--sans); color: var(--ink); font-size: 17px; font-weight: 400; white-space: nowrap; }
.progress-track { width: 100%; height: 3px; margin-top: 12px; background: #d8ddce; }
.progress-fill { height: 100%; max-width: 100%; background: var(--ink); transition: width .4s ease; }
.stage-watermark { position: absolute; top: 160px; left: 33px; display: flex; flex-direction: column; gap: 5px; font-family: var(--serif); font-size: 11px; letter-spacing: 1px; color: #899781; pointer-events: none; opacity: .55; }
.stage-watermark:after { content: ""; height: 75px; width: 1px; background: #aebaa4; margin: 9px auto; }
.stage-bottom { position: absolute; bottom: 23px; left: 30px; right: 29px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; z-index: 2; pointer-events: none; }
.stage-note { display: flex; align-items: center; gap: 12px; padding: 11px 16px 11px 0; }
.note-mark { width: 36px; height: 41px; display: flex; align-items: center; justify-content: center; border-top: 1px solid #b5bda9; border-bottom: 1px solid #b5bda9; font-family: var(--serif); font-size: 22px; color: #7e886e; }
.note-kicker { color: #929985; font-size: 9px; letter-spacing: 1.5px; }
.stage-note p { font-family: var(--serif); font-size: 15px; letter-spacing: 1px; line-height: 1.5; margin: 6px 0 0; }
.view-button { display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #cbd2c2; border-radius: 4px; background: rgba(249,248,241,.88); padding: 11px 13px; font-size: 10px; color: var(--ink-soft); pointer-events: auto; transition: background .15s, border-color .15s; }
.view-button svg { width: 16px; height: 16px; }
.view-button:hover { background: var(--paper-light); border-color: #9eaf9a; }

.piece-panel { display: flex; flex-direction: column; min-height: 0; background: var(--paper-light); border-left: 1px solid var(--line); z-index: 3; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 25px 25px 19px; }
.panel-heading .eyebrow { font-size: 9px; letter-spacing: 2px; color: #9a9d8d; }
.panel-heading h2 { font-family: var(--serif); font-size: 23px; font-weight: 600; letter-spacing: 4px; line-height: 1.2; margin: 8px 0 0; }
.panel-stamp { display: flex; align-items: center; justify-content: center; width: 28px; height: 41px; border: 1px solid #bd8e7a; color: var(--red); border-radius: 1px; font-family: var(--serif); font-size: 11px; line-height: 1.45; text-align: center; opacity: .8; transform: rotate(3deg); }
.selection-info { margin: 0 24px; padding: 15px 0 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.selection-label { display: flex; align-items: center; gap: 6px; color: #87917d; font-size: 9px; letter-spacing: .5px; }
.status-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #8b9c79; flex-shrink: 0; }
.selection-info h3 { font-size: 14px; font-weight: 500; letter-spacing: .5px; line-height: 1.6; margin: 9px 0 5px; }
.selection-info p { font-size: 10px; color: #93998d; margin: 0; line-height: 1.8; min-height: 18px; }
.piece-list-heading { display: flex; justify-content: space-between; align-items: center; padding: 18px 25px 12px; color: var(--ink-soft); font-size: 10px; letter-spacing: .5px; }
.list-scroll-hint { color: #a0a495; font-size: 9px; letter-spacing: 0; }
.piece-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; align-content: start; min-height: 60px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c9cebf transparent; margin: 0 15px 0 24px; padding: 0 8px 12px 0; flex: 1; }
.piece-list::-webkit-scrollbar { width: 4px; }
.piece-list::-webkit-scrollbar-thumb { border-radius: 2px; background: #c9cebf; }
.piece-list > button, .piece-card, .piece-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 85px; min-width: 0; border: 1px solid #e1e2d9; border-radius: 3px; background: #f4f3ed; color: #727e6c; font-size: 9px; line-height: 1.4; padding: 10px 3px 8px; transition: border-color .16s, background .16s, box-shadow .16s; }
.piece-list > button::before, .piece-card::before, .piece-item::before { content: ""; display: block; width: 11px; height: 34px; border: 1px solid #99784e; border-radius: 4px 4px 2px 2px; background: linear-gradient(90deg, #c3a782 0%, #ddcbb0 28%, #c8ae89 57%, #ab8e68 100%); box-shadow: inset 2px 0 0 #e7d7bc80; transform: rotate(-8deg); opacity: .8; }
.piece-list > button:hover, .piece-card:hover, .piece-item:hover { border-color: #b6c3a9; background: #eeefe6; }
.piece-list > button[aria-pressed="true"], .piece-list > button.selected, .piece-list > button.is-selected, .piece-card.selected, .piece-card.is-selected, .piece-item.selected, .piece-item.is-selected { border-color: #768e6b; background: #e9eddf; color: var(--ink); box-shadow: 0 0 0 1px #768e6b inset; }
.piece-list > button.placed, .piece-list > button.is-placed, .piece-list > button.complete, .piece-card.placed, .piece-card.is-placed, .piece-item.placed, .piece-item.is-placed { background: #ebeee5; border-color: #d4dcc9; color: #96a08d; }
.piece-list > button.placed::after, .piece-list > button.is-placed::after, .piece-list > button.complete::after, .piece-card.placed::after, .piece-card.is-placed::after, .piece-item.placed::after, .piece-item.is-placed::after { content: "✓"; position: absolute; top: 4px; right: 5px; font-size: 11px; font-family: var(--sans); color: #658154; }
.piece-list > button:disabled { opacity: .6; }
.piece-list > button:focus-visible { outline-offset: -3px; }
.piece-list > button span, .piece-list > button strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }
.piece-list .piece-id, .piece-number { font-size: 9px; letter-spacing: .3px; }
.piece-list .piece-status, .piece-description { font-size: 8px; color: var(--muted); }
.piece-list .piece-icon, .piece-thumb { display: none; }

.panel-controls { padding: 16px 24px 14px; border-top: 1px solid var(--line); background: #f8f8f1; }
.tool-row { display: flex; align-items: center; gap: 7px; margin-bottom: 11px; }
.tool-button { min-width: 0; flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 5px; border: 1px solid #dce0d2; border-radius: 3px; font-size: 10px; color: var(--ink-soft); background: transparent; }
.tool-button svg { width: 14px; height: 14px; stroke-width: 1.4; }
.tool-button:hover { background: #ecf0e4; }
.tool-button[aria-pressed="true"] { background: #e9eedf; color: #526646; border-color: #c1cdb2; }
.tool-button:disabled { color: #b7bbae; background: transparent; border-color: #e4e5dd; }
.primary-button { display: flex; justify-content: center; align-items: center; gap: 24px; border: 1px solid var(--ink); border-radius: 3px; padding: 13px 20px; background: var(--ink); color: var(--paper-light); font-size: 12px; letter-spacing: 1px; transition: background .16s, border-color .16s; }
.primary-button svg { height: 17px; width: 17px; }
.primary-button:hover { background: #3a5145; border-color: #3a5145; }
.primary-button:disabled { border-color: #d7dccd; background: #e2e6d9; color: #9ea794; }
.next-button { width: 100%; justify-content: space-between; padding: 12px 15px; font-size: 11px; }
.panel-footnote { display: flex; align-items: baseline; gap: 5px; color: #929a86; font-size: 9px; line-height: 1.8; margin: 10px 0 0; }
.mini-square { display: inline-block; width: 4px; height: 4px; border: 1px solid #a4b196; transform: rotate(45deg); flex-shrink: 0; }
.explode-controls { padding: 0 0 10px; }
.explode-controls label { display: flex; align-items: center; justify-content: space-between; font-size: 11px; }
.explode-symbol { font-size: 20px; color: var(--wood); }
.explode-controls input { width: 100%; margin: 18px 0 11px; accent-color: #526d49; cursor: pointer; }
.range-labels { display: flex; justify-content: space-between; color: #909985; font-size: 9px; }

.app-footer { min-height: 39px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding: 0 25px 0 31px; background: #f7f7ef; color: #919987; font-size: 9px; }
.control-legend { display: flex; align-items: center; gap: 12px; }
.control-legend svg { height: 14px; width: 14px; stroke-width: 1.3; color: #849278; margin-right: -3px; }
.control-legend i { height: 9px; width: 1px; background: #d1d7c7; }
.footer-note { margin-left: auto; }
.footer-title { font-family: var(--serif); color: #9fa592; letter-spacing: 2px; margin-left: 16px; }

.loading-screen { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(242,240,232,.98); text-align: center; padding: 24px; transition: opacity .35s; }
.loading-screen.is-hidden, .loading-screen.loaded { opacity: 0; pointer-events: none; }
.loading-emblem { width: 66px; height: 66px; display: flex; align-items: center; justify-content: center; border: 1px solid #b7c1ad; margin-bottom: 27px; color: #65795c; transform: rotate(45deg); }
.loading-emblem svg { height: 49px; width: 49px; transform: rotate(-45deg); stroke-width: 1; }
.loading-screen h2 { font-family: var(--serif); font-weight: 500; font-size: 26px; letter-spacing: 2px; margin: 17px 0 10px; }
.loading-screen p { font-size: 11px; color: #849079; max-width: 440px; line-height: 1.9; }
.loading-line { width: 120px; height: 2px; background: #d9dfcf; margin-top: 15px; overflow: hidden; }
.loading-line span { display: block; width: 40%; height: 100%; background: #6d855d; animation: loading-sweep 1.5s infinite ease-in-out; }
@keyframes loading-sweep { 0% { transform: translateX(-110%); } 100% { transform: translateX(360%); } }
.toast { position: absolute; z-index: 9; left: 50%; bottom: 112px; transform: translateX(-50%); max-width: min(520px, 80%); padding: 13px 21px; background: rgba(36,59,51,.94); border: 1px solid #879a7e4d; border-radius: 4px; color: #f5f4e9; font-size: 12px; line-height: 1.7; text-align: center; pointer-events: none; box-shadow: 0 5px 30px #243b3318; }
.toast:not([hidden]) { animation: toast-enter .2s ease-out; }
@keyframes toast-enter { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
.completion-overlay { position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; background: #e8e9de88; backdrop-filter: blur(4px); padding: 24px; }
.completion-card { width: 380px; max-width: 100%; background: #faf9f3; border: 1px solid #d0d7c4; text-align: center; padding: 36px 32px 30px; box-shadow: 0 16px 80px #243b331a; }
.completion-seal { display: flex; align-items: center; justify-content: center; width: 45px; height: 45px; border: 1px solid #b8c2a7; border-radius: 50%; margin: 0 auto 20px; background: #edf0e4; color: #607d4d; }
.completion-seal svg { width: 24px; height: 24px; }
.completion-card h2 { font-family: var(--serif); font-size: 25px; font-weight: 500; line-height: 1.5; margin: 14px 0 12px; }
.completion-card p { font-size: 12px; color: var(--ink-soft); line-height: 1.9; margin: 0 0 25px; }
.completion-card .primary-button { margin: auto; min-width: 190px; }

.help-dialog { border: 1px solid #cad2be; border-radius: 5px; background: #faf9f2; color: var(--ink); padding: 37px; width: 520px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 40px); box-shadow: 0 15px 100px #243b3330; }
.help-dialog::backdrop { background: #1f302d80; backdrop-filter: blur(3px); }
.dialog-close { display: flex; align-items: center; justify-content: center; position: absolute; top: 15px; right: 15px; width: 28px; height: 28px; border: 0; background: transparent; color: #7e8d73; }
.dialog-close svg { height: 18px; width: 18px; }
.dialog-close:hover { color: var(--red); }
.help-dialog h2 { font-family: var(--serif); font-size: 25px; font-weight: 500; line-height: 1.6; margin: 12px 0; }
.help-intro { font-size: 12px; color: var(--ink-soft); line-height: 1.9; }
.help-steps { display: flex; flex-direction: column; gap: 17px; list-style: none; margin: 26px 0 22px; padding: 0; }
.help-steps li { display: flex; gap: 17px; }
.help-steps li > span { color: #a1ad90; font-family: Georgia, serif; font-size: 22px; line-height: 1.3; }
.help-steps h3 { font-size: 13px; font-weight: 500; margin: 0 0 5px; }
.help-steps p { font-size: 11px; color: var(--ink-soft); line-height: 1.8; margin: 0; }
.help-keyboard { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 13px 0; font-size: 10px; color: #7b8b70; }
kbd { font: 9px var(--sans); border: 1px solid #d0d8c3; background: #f0f2e7; border-radius: 2px; padding: 2px 4px; margin-right: 3px; }
.help-disclaimer { font-size: 10px; color: #979d8c; line-height: 1.8; margin: 18px 0 22px; }
.help-dialog .primary-button { width: 100%; }

/* The exercise progresses by component batches: columns, wall panels and roofs. */
.stage-tabs { display: flex; align-items: center; gap: 5px; margin-top: 17px; pointer-events: auto; }
.stage-tabs:empty { display: none; }
.stage-tabs > button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 30px; padding: 6px 12px; border: 1px solid #d6ddcb; border-radius: 3px; background: rgba(249,249,241,.9); color: #6f7f62; font-size: 10px; letter-spacing: .4px; white-space: nowrap; transition: background .16s, color .16s, border-color .16s; }
.stage-tabs > button:hover:not(:disabled) { border-color: #92a583; background: #edf1e3; }
.stage-tabs > button[aria-current="step"], .stage-tabs > button[aria-current="true"], .stage-tabs > button[aria-selected="true"], .stage-tabs > button[aria-pressed="true"], .stage-tabs > button.active, .stage-tabs > button.is-active { background: var(--ink); border-color: var(--ink); color: #f8f8ec; }
.stage-tabs > button:disabled { color: #a6ae9b; border-color: #dfe3d6; background: #e9eddf80; }
.stage-tabs > button:disabled::after { content: ""; display: block; width: 6px; height: 6px; border: 1px solid #aeb7a2; border-radius: 1px; margin-left: 2px; opacity: .7; }
.stage-tabs .stage-index, .stage-tabs .step-number { font-family: Georgia, var(--serif); font-size: 11px; opacity: .65; }
.progress-panel { width: 177px; }
.batch-progress { margin: 9px 0 0; color: #849078; font-size: 9px; line-height: 1.8; text-align: right; letter-spacing: .15px; }
.target-markers { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.target-marker { position: absolute; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid #6d845c; border-radius: 50%; background: #fafbf1ed; color: #425b35; box-shadow: 0 2px 7px #243b3324; font-size: 10px; font-family: var(--sans); font-weight: 600; line-height: 1; pointer-events: auto; touch-action: manipulation; transform: translate(-50%, -50%); transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.target-marker:hover, .target-marker:focus-visible { background: #e7eed9; border-color: #456d32; box-shadow: 0 0 0 3px #77965326; z-index: 1; }
.target-marker.selected, .target-marker.is-selected, .target-marker[aria-pressed="true"] { background: #a8703a; border-color: #875b2c; color: #fffaf1; box-shadow: 0 0 0 3px #c99c6033; }
.selection-banner { position: absolute; z-index: 4; left: 50%; bottom: 88px; display: flex; align-items: center; justify-content: center; gap: 8px; width: max-content; max-width: calc(100% - 64px); padding: 11px 18px; border: 1px solid #c7d1ba; border-radius: 4px; background: #f5f7edeF; color: #526844; box-shadow: 0 4px 18px #324b3020; font-size: 11px; line-height: 1.7; letter-spacing: .3px; text-align: center; pointer-events: none; transform: translateX(-50%); }
.selection-banner::before { content: ""; display: block; width: 5px; height: 5px; flex-shrink: 0; background: #a37b47; transform: rotate(45deg); }
.piece-list .batch-count { position: absolute; top: 5px; right: 5px; display: inline-flex; align-items: center; justify-content: center; min-width: 22px; max-width: 40px; padding: 2px 4px; border-radius: 2px; border: 1px solid #d9dfcd; background: #f8f9f0; color: #7d8d6f; font-size: 8px; line-height: 1.25; font-variant-numeric: tabular-nums; letter-spacing: .1px; }
.piece-list > button.selected .batch-count, .piece-list > button[aria-pressed="true"] .batch-count { border-color: #b5c6a2; background: #f4f8e9; color: #536c42; }
.piece-list > button.placed::after, .piece-list > button.is-placed::after, .piece-list > button.complete::after, .piece-card.placed::after, .piece-card.is-placed::after, .piece-item.placed::after, .piece-item.is-placed::after { top: auto; bottom: 5px; right: 5px; }
.piece-list > button.column::before, .piece-list > button.kind-column::before, .piece-list > button[data-role="column"]::before { width: 11px; height: 34px; border-color: #99784e; border-radius: 4px 4px 2px 2px; background: linear-gradient(90deg, #c3a782 0%, #ddcbb0 28%, #c8ae89 57%, #ab8e68 100%); box-shadow: inset 2px 0 0 #e7d7bc80; transform: rotate(-8deg); }
.piece-list > button.wall::before, .piece-list > button.kind-wall::before, .piece-list > button[data-role="wall"]::before { width: 30px; height: 29px; border: 1px solid #b7ad92; border-bottom: 3px solid #a99d7d; border-radius: 1px; background: repeating-linear-gradient(0deg, transparent 0 8px, #bcb59c50 8px 9px), linear-gradient(100deg, #e6e0cc, #d0c6ab); box-shadow: inset 3px 0 #eeeadb; transform: skewY(-8deg); }
.piece-list > button.roof::before, .piece-list > button.kind-roof::before, .piece-list > button[data-role="roof"]::before { width: 42px; height: 27px; border: 0; border-radius: 3px 3px 0 0; background: repeating-linear-gradient(90deg, #827f6e 0 2px, #c0beab 2px 5px, #a29f8b 5px 7px); box-shadow: inset 0 3px #777b69; clip-path: polygon(15% 0, 85% 0, 100% 90%, 0 100%); transform: rotate(-8deg); }
.piece-list > button[data-phase="floor"]::before { width: 38px; height: 27px; border: 1px solid #9a805b; border-radius: 1px; background: repeating-linear-gradient(0deg, #b69a71 0 4px, #d6c3a1 4px 7px, #a78a62 7px 8px); box-shadow: 2px 3px #8f79594d; clip-path: none; transform: skewY(-12deg) rotate(-6deg); }

@media (max-width: 1150px) {
  .progress-panel { width: 139px; }
  .stage-tabs { gap: 5px; margin-top: 14px; }
  .stage-tabs > button { font-size: 9px; padding: 6px 10px; }
}

@media (max-width: 900px) {
  .stage-tabs { margin-top: 12px; }
  .stage-tabs > button { min-height: 27px; padding: 5px 10px; }
  .batch-progress { text-align: left; font-size: 8px; margin-top: 6px; }
  .selection-banner { bottom: 81px; font-size: 10px; padding: 10px 13px; }
}

@media (min-width: 1650px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 330px; }
  .app-header { padding: 0 39px; }
  .stage-heading { top: 34px; left: 40px; right: 38px; }
  .stage-bottom { left: 40px; right: 38px; }
  .stage-watermark { left: 41px; top: 180px; }
  .panel-heading { padding: 29px 28px 22px; }
  .selection-info { margin: 0 28px; }
  .piece-list-heading { padding-left: 29px; padding-right: 28px; }
  .piece-list { margin-left: 28px; margin-right: 19px; gap: 8px; }
  .piece-list > button { min-height: 94px; }
  .panel-controls { padding: 19px 28px; }
}

@media (max-width: 1150px) {
  .app-header { padding: 0 23px; gap: 18px; min-height: 78px; }
  .brand, .header-actions { min-width: 200px; }
  .edition-label { display: none; }
  .workspace { grid-template-columns: minmax(0, 1fr) 270px; }
  .mode-button { min-width: 115px; padding: 10px 11px; }
  .stage-heading { left: 24px; top: 24px; right: 23px; gap: 15px; }
  .chapter-heading h1 { font-size: 23px; }
  .chapter-heading p { max-width: 320px; }
  .progress-panel { width: 110px; }
  .progress-caption { font-size: 9px; }
  .progress-caption strong { font-size: 15px; }
  .stage-watermark { left: 25px; }
  .stage-bottom { left: 23px; right: 23px; }
  .panel-heading { padding: 23px 20px 17px; }
  .selection-info { margin: 0 19px; }
  .piece-list-heading { padding: 16px 20px 11px; }
  .piece-list { margin-left: 19px; margin-right: 11px; gap: 6px; }
  .piece-list > button { min-height: 80px; }
  .panel-controls { padding: 14px 19px; }
  .footer-title { display: none; }
  .app-footer { padding-left: 23px; padding-right: 20px; }
}

@media (max-width: 900px) {
  .app-header { padding: 0 18px; }
  .brand { min-width: 165px; gap: 10px; }
  .brand-wordmark { font-size: 24px; letter-spacing: 4px; }
  .brand-caption { letter-spacing: 1px; font-size: 9px; }
  .brand-seal { width: 36px; height: 36px; }
  .brand-seal svg { width: 30px; height: 30px; }
  .header-actions { min-width: auto; }
  .help-button span { display: none; }
  .help-button { padding-left: 0; }
  .workspace { grid-template-columns: minmax(0, 1fr) 244px; }
  .stage-heading { flex-direction: column; gap: 15px; }
  .chapter-heading h1 { font-size: 21px; }
  .chapter-heading p { font-size: 10px; max-width: 290px; }
  .progress-panel { width: 150px; margin-top: 0; }
  .progress-caption strong { font-size: 14px; }
  .progress-track { margin-top: 6px; }
  .stage-watermark { display: none; }
  .stage-note p { font-size: 13px; }
  .note-mark { width: 28px; font-size: 19px; }
  .stage-note { gap: 9px; }
  .view-button span { display: none; }
  .view-button { padding: 10px; }
  .panel-heading { padding-left: 17px; padding-right: 17px; }
  .selection-info { margin: 0 16px; }
  .piece-list-heading { padding-left: 17px; padding-right: 17px; }
  .piece-list { margin-left: 16px; margin-right: 8px; }
  .piece-list > button { min-height: 76px; }
  .piece-list > button::before { height: 29px; width: 10px; }
  .panel-controls { padding: 13px 16px; }
  .panel-footnote { font-size: 8px; }
  .app-footer { min-height: 36px; font-size: 8px; padding-left: 18px; padding-right: 17px; }
  .control-legend { gap: 8px; }
}

@media (max-height: 760px) and (min-width: 701px) {
  .app-shell { min-height: 540px; }
  .app-header { min-height: 70px; }
  .brand-seal { width: 35px; height: 35px; }
  .brand-wordmark { font-size: 24px; }
  .brand-caption { margin-top: 5px; }
  .panel-heading { padding-top: 18px; padding-bottom: 15px; }
  .panel-heading h2 { font-size: 21px; }
  .selection-info { padding-top: 12px; padding-bottom: 12px; }
  .selection-info h3 { margin-top: 6px; }
  .piece-list-heading { padding-top: 13px; padding-bottom: 9px; }
  .panel-controls { padding-top: 12px; padding-bottom: 10px; }
  .panel-footnote { margin-top: 7px; }
  .stage-heading { top: 23px; }
  .stage-bottom { bottom: 16px; }
}

@media (max-width: 700px) {
  .app-shell { min-height: 640px; height: 100dvh; }
  .app-header { min-height: 69px; padding: 0 14px; gap: 10px; }
  .brand { min-width: auto; gap: 8px; }
  .brand-seal { width: 31px; height: 31px; }
  .brand-seal svg { width: 27px; height: 27px; }
  .brand-wordmark { font-size: 21px; letter-spacing: 2px; }
  .brand-caption { font-size: 8px; letter-spacing: 0; margin-top: 4px; }
  .mode-switch { gap: 0; padding: 3px; border-radius: 4px; }
  .mode-button { min-width: 80px; padding: 9px 8px; font-size: 10px; gap: 5px; }
  .mode-button svg { width: 14px; height: 14px; }
  .help-button { padding: 7px 0; }
  .help-button svg { width: 18px; height: 18px; }
  .workspace { display: flex; flex-direction: column; }
  .stage { flex: 1; min-height: 300px; }
  .stage-heading { top: 20px; left: 19px; right: 18px; flex-direction: row; gap: 10px; }
  .chapter-heading .eyebrow { font-size: 8px; gap: 7px; letter-spacing: 1.5px; }
  .chapter-number { width: 18px; height: 18px; font-size: 10px; }
  .eyebrow-rule { width: 23px; }
  .chapter-heading h1 { font-size: 19px; margin-top: 9px; margin-bottom: 3px; letter-spacing: .5px; }
  .chapter-heading p { font-size: 9px; max-width: 230px; }
  .progress-panel { width: 80px; margin-top: 3px; }
  .progress-caption { flex-direction: column; align-items: flex-end; gap: 3px; font-size: 8px; }
  .progress-caption strong { font-size: 16px; }
  .progress-track { margin-top: 8px; }
  .stage-bottom { left: 19px; right: 18px; bottom: 12px; }
  .stage-note { padding: 0; gap: 8px; }
  .note-mark { width: 25px; height: 31px; font-size: 17px; }
  .note-kicker { font-size: 7px; letter-spacing: 1px; }
  .stage-note p { font-size: 11px; margin-top: 4px; }
  .view-button { padding: 9px; background: #f9f8f2d9; }
  .piece-panel { display: grid; grid-template-columns: 1fr; border-left: 0; border-top: 1px solid var(--line); flex-shrink: 0; max-height: 235px; padding: 0 15px; position: relative; }
  .piece-panel::before { content: ""; position: absolute; top: 7px; left: 50%; margin-left: -14px; height: 3px; width: 28px; border-radius: 2px; background: #c8cebc; }
  .panel-heading { padding: 17px 0 9px; min-height: 42px; }
  .panel-heading > div { display: flex; align-items: baseline; gap: 10px; }
  .panel-heading .eyebrow { font-size: 8px; letter-spacing: 1px; order: 2; }
  .panel-heading h2 { font-size: 17px; letter-spacing: 2px; margin: 0; }
  .panel-stamp { display: none; }
  .selection-info { position: absolute; right: 15px; top: 17px; display: flex; align-items: baseline; gap: 7px; border: 0; margin: 0; padding: 0; text-align: right; max-width: 52%; }
  .selection-info h3 { font-size: 10px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .selection-label { font-size: 8px; gap: 4px; white-space: nowrap; }
  .selection-info p { display: none; }
  .piece-list-heading { display: none; }
  .piece-list { display: flex; flex-wrap: nowrap; gap: 7px; margin: 0 -15px; padding: 0 15px 10px; overflow-x: auto; overflow-y: hidden; min-height: 88px; max-height: 91px; flex: none; scrollbar-width: thin; scrollbar-color: #c9cebf transparent; }
  .piece-list > button, .piece-card, .piece-item { min-width: 65px; width: 65px; min-height: 75px; height: 75px; padding: 7px 3px; font-size: 8px; gap: 4px; flex-shrink: 0; }
  .piece-list > button::before, .piece-card::before, .piece-item::before { width: 9px; height: 29px; }
  .panel-controls { padding: 10px 0 11px; border-top: 1px solid var(--line); background: transparent; }
  #assembly-controls { display: grid; grid-template-columns: 1fr 135px; align-items: center; gap: 0 12px; }
  .tool-row { margin: 0; gap: 6px; }
  .tool-button { font-size: 9px; padding: 9px 5px; gap: 5px; }
  .tool-button svg { height: 13px; width: 13px; }
  .next-button { padding: 10px 11px; font-size: 9px; }
  .next-button svg { height: 14px; width: 14px; }
  .panel-footnote { display: none; }
  .explode-controls { display: grid; grid-template-columns: 60px 1fr 110px; align-items: center; gap: 10px; padding: 0; height: 35px; }
  .explode-controls label { font-size: 10px; }
  .explode-symbol { display: none; }
  .explode-controls input { margin: 0; }
  .range-labels { font-size: 8px; }
  .app-footer { min-height: 27px; padding: 0 15px; font-size: 7px; gap: 7px; }
  .control-legend { gap: 6px; }
  .control-legend svg { display: none; }
  .control-legend i { height: 7px; }
  .footer-note { letter-spacing: -.25px; }
  .toast { bottom: 65px; font-size: 10px; padding: 10px 14px; }
  .loading-screen h2 { font-size: 21px; }
  .loading-emblem { height: 50px; width: 50px; margin-bottom: 19px; }
  .loading-emblem svg { height: 39px; width: 39px; }
  .completion-card { padding: 25px; width: 310px; }
  .completion-card h2 { font-size: 22px; }
  .completion-card p { font-size: 11px; }
  .help-dialog { padding: 29px 23px 23px; }
  .help-dialog h2 { font-size: 22px; }
}

@media (max-width: 390px) {
  .app-header { gap: 7px; padding: 0 10px; }
  .brand-seal { display: none; }
  .brand-wordmark { font-size: 21px; }
  .brand-caption { font-size: 7px; }
  .mode-button { min-width: 77px; padding-left: 7px; padding-right: 7px; }
  .chapter-heading h1 { font-size: 17px; }
  .progress-panel { width: 66px; }
  .chapter-heading p { max-width: 215px; }
  .footer-note { font-size: 6px; }
  #assembly-controls { grid-template-columns: 1fr 116px; gap: 8px; }
  .tool-button { gap: 3px; }
  .selection-info { gap: 5px; }
  .selection-info h3 { max-width: 83px; }
}

@media (max-width: 900px) {
  .stage-heading { flex-direction: row; }
  .progress-panel { width: 110px; margin-top: 4px; }
  .batch-progress { text-align: right; }
}

@media (max-width: 700px) {
  .stage-heading { gap: 10px; }
  .progress-panel { width: 91px; margin-top: 3px; }
  .batch-progress { font-size: 7px; line-height: 1.6; margin-top: 6px; }
  .stage-tabs { margin-top: 10px; gap: 4px; max-width: calc(100vw - 38px); }
  .stage-tabs > button { min-height: 25px; padding: 5px 8px; gap: 5px; font-size: 8px; letter-spacing: 0; }
  .stage-tabs .stage-index, .stage-tabs .step-number { font-size: 9px; }
  .stage-tabs > button:disabled::after { width: 5px; height: 5px; }
  .selection-banner { bottom: 58px; max-width: calc(100% - 38px); padding: 8px 12px; font-size: 9px; letter-spacing: 0; }
  .piece-list .batch-count { top: 4px; right: 4px; font-size: 7px; min-width: 19px; padding: 1px 3px; }
  .piece-list > button.column::before, .piece-list > button.kind-column::before, .piece-list > button[data-role="column"]::before { width: 9px; height: 29px; }
  .piece-list > button.wall::before, .piece-list > button.kind-wall::before, .piece-list > button[data-role="wall"]::before { width: 26px; height: 25px; }
  .piece-list > button.roof::before, .piece-list > button.kind-roof::before, .piece-list > button[data-role="roof"]::before { width: 35px; height: 24px; }
  .control-legend i, .control-legend i ~ span { display: none; }
}

@media (max-width: 390px) {
  .progress-panel { width: 70px; }
  .batch-progress { font-size: 6px; }
  .stage-tabs > button { padding: 5px 7px; }
}

.stage-navigation { margin-top: 13px; max-width: 350px; }
.stage-tabs-caption { color: #849078; font-size: 9px; line-height: 1.6; letter-spacing: .6px; }
.stage-navigation .stage-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; width: 100%; margin-top: 6px; }
.stage-tabs-help { margin: 7px 0 0; max-width: 420px; color: #7f8d72; font-size: 10px; line-height: 1.7; letter-spacing: .2px; pointer-events: none; }
.stage-heading .eyebrow, .stage-heading .chapter-heading p, .stage-heading .progress-caption, .stage-heading .batch-progress, .stage-heading .stage-tabs-caption { color: #293f34; }
.stage-heading .progress-track, .stage-heading .eyebrow-rule { background: #6f887b; }
.stage-navigation .stage-tabs > button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-width: 0; min-height: 46px; padding: 8px 13px; cursor: pointer; }
.stage-navigation .stage-tabs > button::after { display: none; }
.stage-label { color: inherit; font-size: 11px; line-height: 1.2; letter-spacing: .5px; }
.stage-tabs > button .stage-status { color: inherit; font-size: 8px; line-height: 1.2; letter-spacing: .3px; opacity: .65; }
.stage-tabs > button[data-status="locked"] { color: #8f9984; border-color: #d6ddcb; border-style: dashed; background: #eff2e780; }
.stage-tabs > button[data-status="locked"]:hover { border-color: #a5b595; background: #e7eddb; }
.stage-tabs > button[data-status="complete"] { color: #647a50; border-color: #c4d2b4; background: #ecf2e2; }
.stage-tabs > button[data-status="current"], .stage-tabs > button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); border-style: solid; color: #f8f8ec; }
.stage-tabs > button[aria-disabled="true"], .stage-tabs > button.is-locked, .stage-tabs > button[data-state="locked"] { color: #8f9984; border-color: #d6ddcb; border-style: dashed; background: #eff2e780; cursor: help; }
.stage-tabs > button[aria-disabled="true"]::after, .stage-tabs > button.is-locked::after, .stage-tabs > button[data-state="locked"]::after { content: ""; display: block; width: 6px; height: 6px; border: 1px solid #9ba98c; border-radius: 1px; margin-left: 2px; opacity: .7; }
.stage-tabs > button[aria-disabled="true"]:hover, .stage-tabs > button.is-locked:hover, .stage-tabs > button[data-state="locked"]:hover { border-color: #a5b595; background: #e7eddb; }
.stage-tabs > button .tab-status, .stage-tabs > button .stage-state { font-size: 8px; opacity: .7; margin-left: 1px; letter-spacing: 0; }
.stage-bottom { z-index: 5; }
.building-info { position: relative; width: 249px; flex-shrink: 0; color: var(--ink); border: 1px solid #ccd3bf; border-radius: 4px; background: #f9f9f0ee; box-shadow: 0 3px 15px #31452b09; pointer-events: auto; }
.building-info summary { display: flex; align-items: center; gap: 11px; padding: 11px 13px; list-style: none; cursor: pointer; border-radius: 3px; user-select: none; }
.building-info summary::-webkit-details-marker { display: none; }
.building-info summary::marker { content: ""; }
.building-info summary:hover { background: #f0f3e6; }
.building-info summary:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
.building-info-mark { display: flex; align-items: center; justify-content: center; width: 30px; height: 32px; border: 1px solid #bf9580; border-radius: 1px; color: var(--red); font-family: var(--serif); font-size: 20px; line-height: 1; flex-shrink: 0; }
.building-info-heading { display: flex; flex-direction: column; gap: 5px; }
.building-info-heading > span { font-size: 8px; letter-spacing: 1.4px; color: #9aa28a; }
.building-info-heading strong { font-family: var(--serif); font-size: 18px; font-weight: 500; line-height: 1; letter-spacing: 3px; }
.building-info-label { margin-left: auto; font-size: 9px; color: #7d8c6d; letter-spacing: .4px; }
.building-info-chevron { width: 14px; height: 14px; color: #7d8c6d; transition: transform .18s; }
.building-info[open] { border-color: #a6b595; background: #f5f8eb; }
.building-info[open] .building-info-chevron { transform: rotate(180deg); }
.building-info-body { position: absolute; bottom: calc(100% + 9px); left: -1px; width: 350px; max-width: calc(100vw - 64px); max-height: min(330px, calc(100dvh - 250px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 19px 20px 17px; border: 1px solid #c3cdb5; border-radius: 4px; background: #fafbf3; box-shadow: 0 8px 32px #243b3320; }
.building-info-body p { margin: 0 0 12px; color: #67765a; font-size: 12px; line-height: 1.95; letter-spacing: .2px; }
.building-info-body p:last-of-type { margin-bottom: 16px; }
.building-info-source { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #dce3d0; padding-top: 11px; color: #8c987c; font-size: 9px; line-height: 1.7; text-decoration-color: #bcc8ae; text-underline-offset: 3px; }
.building-info-source:hover { color: var(--red); }
.building-info-source svg { width: 13px; height: 13px; transform: rotate(-35deg); }

@media (max-width: 900px) {
  .stage-navigation { margin-top: 11px; }
  .stage-tabs-help { max-width: 300px; font-size: 9px; }
  .building-info { width: 229px; }
  .building-info summary { padding: 10px 12px; gap: 9px; }
}

@media (max-width: 700px) {
  .stage-navigation { margin-top: 9px; }
  .stage-tabs-caption { font-size: 8px; letter-spacing: .2px; }
  .stage-navigation .stage-tabs { margin-top: 5px; }
  .stage-navigation .stage-tabs { gap: 5px; }
  .stage-navigation .stage-tabs > button { min-height: 40px; padding: 7px 9px; gap: 4px; }
  .stage-label { font-size: 10px; letter-spacing: .2px; }
  .stage-tabs > button .stage-status { font-size: 7px; letter-spacing: .1px; }
  .stage-tabs-help { margin-top: 5px; max-width: 255px; font-size: 8px; line-height: 1.55; }
  .building-info { width: 217px; }
  .building-info summary { padding: 8px 10px; gap: 8px; }
  .building-info-mark { width: 25px; height: 28px; font-size: 17px; }
  .building-info-heading { gap: 4px; }
  .building-info-heading > span { font-size: 7px; letter-spacing: 1px; }
  .building-info-heading strong { font-size: 16px; letter-spacing: 2px; }
  .building-info-label { font-size: 8px; }
  .building-info-chevron { height: 12px; width: 12px; }
  .building-info-body { width: 320px; max-width: calc(100vw - 38px); max-height: min(265px, calc(100dvh - 315px)); padding: 16px 17px 14px; }
  .building-info-body p { font-size: 11px; line-height: 1.9; margin-bottom: 11px; }
  .building-info-source { font-size: 8px; padding-top: 10px; }
}

.model-select { display: flex; flex-direction: column; min-height: 100dvh; background: radial-gradient(ellipse at 50% 37%, #faf9f2 0%, #f3f2e9 65%, #eeeee3 100%); }
.catalog-header { display: flex; align-items: center; justify-content: space-between; gap: 25px; min-height: 86px; padding: 0 35px; border-bottom: 1px solid var(--line); background: #faf9f5d9; }
.catalog-header-note { font-family: var(--serif); font-size: 12px; letter-spacing: 2px; color: #909a83; }
.catalog-main { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; padding: 36px 24px 28px; }
.catalog-intro { text-align: center; }
.catalog-intro .eyebrow { gap: 12px; font-size: 9px; letter-spacing: 3px; color: #7e8b70; }
.catalog-intro-line { display: block; width: 28px; height: 1px; background: #bdc7ae; }
.catalog-intro h1 { font-family: var(--serif); font-size: 34px; font-weight: 500; letter-spacing: 4px; line-height: 1.45; margin: 12px 0 8px; }
.catalog-intro h1:focus { outline: none; }
.catalog-intro p { font-size: 12px; line-height: 1.8; letter-spacing: 1.5px; color: #849077; margin: 0; }
.model-cards { width: 520px; max-width: 100%; margin-top: 27px; }
.model-card { display: block; width: 100%; padding: 0; border: 1px solid #c8d1bb; border-radius: 5px; overflow: hidden; background: #fafbf3; text-align: left; box-shadow: 0 6px 28px #354d3210; transition: border-color .2s, box-shadow .2s, transform .2s; }
.model-card:hover { border-color: #96a784; box-shadow: 0 10px 35px #354d3220; transform: translateY(-2px); }
.model-card:active { transform: translateY(0); }
.model-card:focus-visible { outline: 2px solid var(--red); outline-offset: 5px; }
.model-card-image { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 8 / 5; overflow: hidden; background: #bbc9be; }
.model-card-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.model-card-tag { position: absolute; top: 16px; left: 17px; padding: 5px 9px; border: 1px solid #7a91764d; border-radius: 2px; background: #f4f7e9d9; color: #607653; font-size: 9px; line-height: 1.4; letter-spacing: 1.5px; }
.model-card-details { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 20px 23px; border-top: 1px solid #d3dbca; }
.model-card-name { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.model-card-name strong { font-family: var(--serif); font-size: 27px; font-weight: 500; letter-spacing: 4px; line-height: 1.25; }
.model-card-name > span { color: #8b967e; font-size: 10px; line-height: 1.6; letter-spacing: .5px; }
.model-card-enter { display: inline-flex; align-items: center; gap: 14px; flex-shrink: 0; padding: 11px 13px; border: 1px solid #344d3d; border-radius: 3px; color: #f6f8ec; background: var(--ink); font-size: 11px; letter-spacing: 1px; }
.model-card-enter svg { width: 17px; height: 17px; }
.model-card:hover .model-card-enter { background: #3d5544; }
.catalog-coming-soon { display: flex; align-items: center; justify-content: center; gap: 13px; font-family: var(--serif); font-size: 13px; line-height: 1.8; color: #64745f; letter-spacing: 1px; margin: 22px 0 0; text-align: center; }
.catalog-coming-soon::before, .catalog-coming-soon::after { content: ""; display: block; width: 28px; height: 1px; background: #bec8b3; }
.catalog-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 41px; padding: 10px 35px; border-top: 1px solid var(--line); color: #919b84; font-size: 9px; letter-spacing: .5px; }
.back-to-models { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 0; border: 0; background: transparent; color: #6c7c60; font-size: 10px; white-space: nowrap; }
.back-to-models svg { width: 15px; height: 15px; transform: rotate(180deg); }
.back-to-models:hover { color: var(--red); }
.back-label-short { display: none; }

@media (max-height: 760px) and (min-width: 701px) {
  .catalog-header { min-height: 74px; }
  .catalog-main { padding-top: 25px; padding-bottom: 23px; }
  .catalog-intro h1 { font-size: 29px; margin-top: 10px; }
  .model-cards { width: 465px; margin-top: 23px; }
  .model-card-details { padding-top: 16px; padding-bottom: 16px; }
  .model-card-name strong { font-size: 24px; }
  .catalog-coming-soon { margin-top: 18px; }
}

@media (max-width: 900px) {
  #game-screen .header-actions { gap: 16px; }
  .catalog-header { padding: 0 24px; }
  .catalog-footer { padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 700px) {
  .catalog-header { min-height: 74px; padding: 0 20px; gap: 15px; }
  .catalog-header .brand-seal { display: flex; }
  .catalog-header .brand-wordmark { font-size: 24px; letter-spacing: 4px; }
  .catalog-header .brand-caption { font-size: 8px; letter-spacing: .5px; }
  .catalog-header-note { font-size: 9px; line-height: 1.8; letter-spacing: 1px; max-width: 100px; text-align: right; }
  .catalog-main { padding: 35px 21px 31px; justify-content: flex-start; }
  .catalog-intro h1 { font-size: 28px; letter-spacing: 3px; margin-top: 13px; }
  .catalog-intro p { font-size: 10px; letter-spacing: 1px; }
  .model-cards { width: 440px; margin-top: 28px; }
  .model-card-tag { top: 12px; left: 12px; font-size: 8px; padding: 4px 7px; letter-spacing: 1px; }
  .model-card-details { padding: 17px; gap: 15px; }
  .model-card-name strong { font-size: 24px; letter-spacing: 3px; }
  .model-card-name > span { font-size: 9px; letter-spacing: 0; }
  .model-card-enter { gap: 9px; font-size: 10px; padding: 10px 11px; }
  .model-card-enter svg { width: 15px; height: 15px; }
  .catalog-coming-soon { font-size: 12px; letter-spacing: .5px; margin-top: 21px; }
  .catalog-footer { padding: 11px 20px; font-size: 8px; letter-spacing: 0; }
  #game-screen .app-header { gap: 9px; }
  #game-screen .app-header .brand-seal { display: none; }
  #game-screen .header-actions { gap: 9px; }
  .back-to-models { gap: 4px; font-size: 10px; padding: 9px 0; }
  .back-to-models svg { width: 13px; height: 13px; }
  .back-label-long { display: none; }
  .back-label-short { display: inline; }
}

@media (max-width: 390px) {
  #game-screen .brand-logotype { width: 58px; height: 27px; }
  #game-screen .brand-caption { display: none; }
  #game-screen .app-header { gap: 7px; }
  .catalog-header-note { max-width: 88px; font-size: 8px; }
  .catalog-main { padding: 31px 18px 26px; }
  .model-card-details { padding: 16px 14px; }
  .model-card-enter { gap: 8px; padding: 10px; font-size: 9px; }
  .catalog-footer { padding-left: 18px; padding-right: 18px; font-size: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
