:root {
  color-scheme: light;
  --ink: #272e2c;
  --muted: #737773;
  --line: rgba(47, 56, 52, .14);
  --paper: #f6f4ee;
  --accent: #a5533a;
  --accent-dark: #773b2b;
  --green: #687c68;
  --shadow: 0 18px 52px rgba(49, 45, 36, .12), 0 3px 10px rgba(49, 45, 36, .06);
}
* { box-sizing: border-box; }
html, body { height: 100%; width: 100%; margin: 0; overflow: hidden; }
body { background: #ebe8df; color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, a { font: inherit; }
button { color: inherit; }
.app-shell { position: relative; width: 100%; height: 100%; min-height: 420px; overflow: hidden; isolation: isolate; }
#tower-canvas { display: block; position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; outline: 0; touch-action: none; }
.canvas-wash { position: absolute; z-index: 1; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(239,236,228,.24), transparent 31%, transparent 70%, rgba(239,236,228,.18)), linear-gradient(0deg, rgba(235,232,223,.22), transparent 20%); }
.topbar { position: absolute; z-index: 8; top: 0; left: 0; right: 0; height: 65px; display: flex; align-items: center; padding: 0 25px; border-bottom: 1px solid rgba(59,62,54,.12); background: rgba(243,241,234,.78); backdrop-filter: blur(16px); }
.brand { color: inherit; display: inline-flex; align-items: center; gap: 11px; text-decoration: none; min-width: 310px; }
.brand-mark { position: relative; width: 28px; height: 31px; display: inline-block; border: 1px solid rgba(165,83,58,.58); border-radius: 15px 15px 4px 4px; overflow: hidden; }
.brand-mark i, .brand-mark b, .brand-mark em { position: absolute; display: block; bottom: 0; width: 1px; background: var(--accent); transform-origin: bottom; }
.brand-mark i { height: 25px; left: 8px; transform: rotate(-12deg); }
.brand-mark b { height: 29px; left: 14px; }
.brand-mark em { height: 22px; right: 6px; transform: rotate(16deg); }
.brand-name { font-size: 11px; font-weight: 760; letter-spacing: .16em; line-height: 1.3; }
.brand-name span { display: block; margin-top: 3px; color: #777a72; font-size: 8px; font-weight: 650; letter-spacing: .16em; }
.topbar-center { position: absolute; left: 50%; transform: translateX(-50%); color: #747872; font-size: 9px; font-weight: 700; letter-spacing: .13em; white-space: nowrap; }
.live-dot, .badge-dot { width: 6px; height: 6px; display: inline-block; background: #7e9975; border-radius: 50%; margin-right: 7px; box-shadow: 0 0 0 3px rgba(126,153,117,.14); }
.topbar-divider { margin: 0 9px; color: #b6b2a8; }
 .reset-button { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(52,60,56,.2); border-radius: 3px; padding: 8px 11px; background: rgba(255,255,255,.45); color: #555c57; font-size: 10px; font-weight: 700; letter-spacing: .04em; cursor: pointer; transition: background .2s, border-color .2s; }
.info-button { display: none; align-items: center; justify-content: center; gap: 5px; margin-left: auto; padding: 7px 9px; border: 1px solid rgba(52,60,56,.2); border-radius: 3px; background: rgba(255,255,255,.45); color: #616960; font-size: 10px; font-weight: 700; cursor: pointer; }
.info-button::first-letter { color: var(--accent); font-family: Georgia, serif; font-size: 14px; }
.reset-button:hover { border-color: var(--accent); background: white; }
.reset-icon { color: var(--accent); font-size: 15px; line-height: 9px; transform: rotate(-35deg); }
.glass-card { background: rgba(248,247,242,.91); border: 1px solid rgba(255,255,255,.86); outline: 1px solid rgba(63,65,57,.08); box-shadow: var(--shadow); backdrop-filter: blur(20px) saturate(1.1); }
.project-panel { position: absolute; z-index: 5; top: 84px; left: 24px; width: 310px; max-height: calc(100% - 185px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(79,85,77,.25) transparent; padding: 21px 21px 15px; border-radius: 4px; }
.eyebrow { display: flex; justify-content: space-between; align-items: center; color: #8a8d85; font-size: 8px; font-weight: 760; letter-spacing: .16em; }
.eyebrow-code { color: #b3ada1; font-size: 8px; letter-spacing: .1em; }
.project-panel h1 { margin: 17px 0 10px; font-family: Georgia, "Times New Roman", serif; font-size: 39px; font-weight: 400; letter-spacing: -.055em; line-height: .96; }
.project-panel h1 i { color: var(--accent); font-weight: 400; }
.lead { max-width: 245px; margin: 0; color: #676d67; font-family: Georgia, "Times New Roman", serif; font-size: 13px; line-height: 1.55; }
.metrics { display: grid; grid-template-columns: repeat(3,1fr); margin: 18px 0 19px; padding: 12px 0 11px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metrics > div { min-width: 0; padding-left: 10px; border-left: 1px solid var(--line); }
.metrics > div:first-child { padding-left: 0; border: 0; }
.metrics strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 400; letter-spacing: -.04em; }
.metrics strong span { margin-left: 2px; color: #888b83; font-family: inherit; font-size: 13px; }
.metrics small { display: block; margin-top: 2px; color: #93958d; font-size: 8px; font-weight: 690; letter-spacing: .12em; text-transform: uppercase; }
.panel-rule { display: flex; align-items: center; justify-content: space-between; color: #878a82; font-size: 8px; font-weight: 760; letter-spacing: .14em; }
.panel-rule span:last-child { font-size: 7px; color: #b1aea4; }
.level-list { margin: 7px -9px 0; }
.level-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 9px; border: 0; border-top: 1px solid rgba(47,56,52,.08); background: transparent; text-align: left; cursor: pointer; transition: background .16s; }
.level-row:hover, .level-row.is-active { background: rgba(165,83,58,.075); }
.level-row.is-active .level-mark { color: var(--accent); }
.level-mark { min-width: 31px; color: #777e75; font-family: Georgia, serif; font-size: 13px; }
.level-name { flex: 1; font-size: 10px; font-weight: 690; letter-spacing: .01em; }
.level-name small { display: block; margin-top: 2px; color: #8c9088; font-size: 9px; font-weight: 450; }
.level-arrow { color: #b1afa7; font-size: 12px; opacity: 0; transform: translate(-3px,3px); transition: .16s; }
.level-row:hover .level-arrow, .level-row.is-active .level-arrow { opacity: 1; transform: none; }
.panel-foot { display: flex; align-items: center; gap: 9px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); color: #8b8f87; font-size: 8px; line-height: 1.4; letter-spacing: .04em; }
.north-mark { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid #c5bfb3; border-radius: 50%; color: var(--accent); font-size: 8px; font-weight: 800; }
.foot-note { margin-left: auto; color: #b0ada3; font-size: 8px; letter-spacing: .18em; }
.variant-panel { position: absolute; z-index: 5; top: 84px; right: 24px; width: 275px; padding: 17px 16px 13px; border-radius: 4px; }
.variant-option { width: 100%; display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 8px; border: 1px solid transparent; border-radius: 3px; background: transparent; text-align: left; cursor: pointer; transition: .2s; }
.variant-option:hover { background: rgba(255,255,255,.65); }
.variant-option.is-active { border-color: rgba(165,83,58,.36); background: rgba(165,83,58,.07); }
.variant-number { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid #ded9cf; border-radius: 50%; color: #8c9087; font-family: Georgia, serif; font-size: 10px; }
.variant-option.is-active .variant-number { border-color: var(--accent); color: var(--accent); }
.variant-copy { flex: 1; min-width: 0; }
.variant-copy strong { display: block; font-family: Georgia, serif; font-size: 14px; font-weight: 500; }
.variant-copy small { display: block; margin-top: 4px; color: #858a82; font-size: 8px; line-height: 1.35; }
.variant-check { color: #b9b9af; font-size: 10px; }
.variant-option.is-active .variant-check { color: var(--accent); }
.variant-description { margin: 10px 2px 0; padding-top: 10px; border-top: 1px solid var(--line); color: #737870; font-family: Georgia, serif; font-size: 11px; line-height: 1.55; }
.variant-tags { display: flex; gap: 6px; margin-top: 10px; }
.variant-tags span { padding: 4px 6px; border: 1px solid rgba(47,56,52,.12); color: #848980; font-size: 7px; font-weight: 740; letter-spacing: .12em; }
.quick-focus { position: absolute; z-index: 5; left: 358px; bottom: 22px; display: flex; align-items: center; gap: 4px; padding: 5px; border: 1px solid rgba(255,255,255,.84); outline: 1px solid rgba(63,65,57,.07); border-radius: 4px; background: rgba(248,247,242,.87); box-shadow: 0 8px 28px rgba(49,45,36,.10); backdrop-filter: blur(16px); }
.quick-button { display: flex; align-items: center; gap: 7px; padding: 7px 9px; border: 0; border-radius: 3px; background: transparent; color: #555d56; font-size: 9px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.quick-button:hover { background: rgba(165,83,58,.08); color: var(--accent-dark); }
.quick-button > span { color: var(--accent); font-size: 15px; }
.quick-button small { margin-left: -3px; color: #92958e; font-size: 8px; font-weight: 500; }
.quick-separator { height: 20px; border-left: 1px solid var(--line); }
.tool-panel { position: absolute; z-index: 5; right: 24px; bottom: 22px; display: flex; align-items: center; gap: 3px; padding: 5px; border-radius: 4px; }
.tool-toggle { display: flex; align-items: center; gap: 7px; padding: 8px 9px; border: 0; border-radius: 3px; background: transparent; color: #646a63; font-size: 9px; font-weight: 650; white-space: nowrap; cursor: pointer; transition: background .16s; }
.tool-toggle:hover { background: rgba(255,255,255,.75); }
.toggle-icon { color: #8b9288; font-size: 14px; }
.section-icon { color: var(--accent); }
.switch-track { position: relative; width: 22px; height: 12px; margin-left: 1px; border: 1px solid #c5c9bf; border-radius: 10px; background: #e5e6df; transition: .2s; }
.switch-track i { position: absolute; top: 2px; left: 2px; width: 6px; height: 6px; border-radius: 50%; background: #92978f; transition: .2s; }
.tool-toggle[aria-pressed="true"] .switch-track { border-color: #81927f; background: #c6d1c1; }
.tool-toggle[aria-pressed="true"] .switch-track i { left: 12px; background: #4f6e50; }
.tool-toggle[aria-pressed="true"] .toggle-icon { color: var(--accent); }
.view-hint { position: absolute; z-index: 4; bottom: 81px; left: 50%; display: flex; align-items: center; gap: 7px; padding: 6px 9px; transform: translateX(-50%); color: rgba(80,86,79,.7); font-size: 7px; font-weight: 700; letter-spacing: .13em; white-space: nowrap; pointer-events: none; }
.view-hint b { color: #666d65; font-weight: 800; }
.mouse-glyph { width: 11px; height: 16px; display: inline-flex; align-items: flex-start; justify-content: center; border: 1px solid #9da198; border-radius: 6px; padding-top: 3px; }
.mouse-glyph i { width: 1px; height: 3px; background: var(--accent); }
.hint-divider { height: 12px; margin: 0 3px; border-left: 1px solid rgba(75,82,74,.2); }
.view-hint button { display: none; }
.concept-note { position: absolute; z-index: 4; right: 24px; bottom: 79px; display: flex; align-items: center; gap: 7px; color: #777c74; font-size: 8px; letter-spacing: .015em; }
.concept-note b { color: #5b625b; font-weight: 750; }
.note-mark { width: 13px; height: 13px; display: grid; place-items: center; border: 1px solid #b7a797; border-radius: 50%; color: #a36b4e; font-family: Georgia, serif; font-size: 9px; font-weight: 700; }
.model-badge { position: absolute; z-index: 4; left: 50%; bottom: 22px; display: flex; align-items: center; padding: 8px 10px; transform: translateX(-50%); border: 1px solid rgba(255,255,255,.8); border-radius: 3px; background: rgba(249,248,244,.75); color: #7d827b; box-shadow: 0 6px 22px rgba(49,45,36,.06); backdrop-filter: blur(12px); font-size: 7px; font-weight: 760; letter-spacing: .13em; white-space: nowrap; }
.model-badge .badge-dot { width: 5px; height: 5px; margin-right: 7px; }
.badge-divider { height: 11px; margin: 0 8px; border-left: 1px solid var(--line); }
#fps-status { min-width: 35px; color: #a2a49c; text-align: right; }
.corner-coordinates { position: absolute; z-index: 3; right: 25px; top: 48%; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; color: rgba(82,88,79,.4); font-size: 7px; font-weight: 650; letter-spacing: .16em; pointer-events: none; }
.loading-state { position: absolute; z-index: 12; inset: 0; display: flex; align-items: center; justify-content: center; gap: 11px; background: rgba(235,232,223,.72); color: #727970; font-size: 10px; letter-spacing: .08em; transition: opacity .45s; }
.loading-state.is-hidden { opacity: 0; pointer-events: none; }
.loader-ring { width: 18px; height: 18px; border: 1px solid rgba(165,83,58,.25); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-state { position: absolute; z-index: 14; inset: 50% auto auto 50%; width: min(360px, calc(100vw - 36px)); padding: 26px; transform: translate(-50%,-50%); border: 1px solid #ddd5c7; border-radius: 4px; background: #f8f6ef; box-shadow: var(--shadow); text-align: center; }
.error-state[hidden] { display: none; }
.error-symbol { width: 34px; height: 34px; display: grid; place-items: center; margin: 0 auto 12px; border: 1px solid #c88a6a; border-radius: 50%; color: var(--accent); font-family: Georgia, serif; font-size: 18px; }
.error-state strong { font-family: Georgia, serif; font-size: 18px; font-weight: 400; }
.error-state p { color: #777d75; font-size: 12px; line-height: 1.55; }
.error-state button { margin-top: 5px; padding: 9px 14px; border: 0; border-radius: 2px; background: var(--accent); color: white; font-size: 10px; font-weight: 700; cursor: pointer; }
.model-badge, .concept-note, .quick-focus, .tool-panel, .variant-panel, .project-panel, .view-hint, .topbar { user-select: none; }
@media (max-width: 1120px) {
  .brand { min-width: 250px; }
  .project-panel { left: 14px; width: 290px; }
  .variant-panel { right: 14px; width: 254px; }
  .quick-focus { left: 320px; }
  .tool-panel { right: 14px; }
  .concept-note { right: 16px; }
  .tool-toggle { gap: 5px; padding: 7px; }
}
@media (max-width: 850px) {
  .topbar { padding: 0 14px; }
  .brand { min-width: 0; }
  .topbar-center { display: none; }
  .project-panel { top: 76px; left: 12px; width: 270px; max-height: calc(100% - 166px); padding: 16px; }
  .project-panel h1 { font-size: 34px; }
  .variant-panel { top: 76px; right: 12px; width: 235px; padding: 14px 12px 10px; }
  .variant-description { font-size: 10px; }
  .variant-option { gap: 7px; padding: 8px 5px; }
  .variant-copy strong { font-size: 12px; }
  .quick-focus { left: 294px; bottom: 15px; }
  .tool-panel { right: 12px; bottom: 15px; gap: 0; }
  .tool-toggle { font-size: 8px; padding: 7px 6px; }
  .tool-toggle:nth-child(3) span:nth-child(2) { display: none; }
  .concept-note { bottom: 67px; right: 12px; max-width: 235px; font-size: 7px; }
  .model-badge { bottom: 15px; }
  .view-hint { bottom: 67px; }
  .corner-coordinates { display: none; }
}
@media (max-width: 620px) {
  .topbar { height: 56px; }
  .brand-mark { width: 23px; height: 26px; }
  .brand-name { font-size: 9px; }
  .brand-name span { font-size: 7px; }
  .info-button { display: inline-flex; margin-left: auto; }
  .reset-button { margin-left: 0; padding: 7px 8px; font-size: 8px; }
  .project-panel { display: none; top: auto; bottom: 110px; left: 10px; width: calc(100% - 20px); max-height: 34vh; padding: 12px 13px 9px; }
  .project-panel.is-open { display: block; }
  .project-panel h1 { margin: 9px 0 6px; font-size: 26px; line-height: .9; }
  .lead { max-width: 100%; font-size: 11px; }
  .metrics { margin: 9px 0 10px; padding: 8px 0; }
  .metrics strong { font-size: 17px; }
  .metrics small { font-size: 7px; }
  .panel-rule { font-size: 7px; }
  .level-list { display: grid; grid-template-columns: repeat(2,1fr); margin-top: 5px; }
  .level-row { gap: 6px; padding: 6px 5px; }
  .level-mark { min-width: 25px; font-size: 11px; }
  .level-name { font-size: 8px; }
  .level-name small { font-size: 7px; }
  .panel-foot { display: none; }
  .variant-panel { top: 64px; left: 10px; right: 10px; width: auto; padding: 9px 10px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 6px; }
  .variant-panel > .eyebrow { grid-column: 1 / -1; margin: 0 2px 3px; }
  .variant-option { min-width: 0; margin-top: 0; padding: 6px 4px; }
  .variant-number { width: 22px; height: 22px; font-size: 9px; }
  .variant-copy strong { font-size: 10px; }
  .variant-copy small { font-size: 7px; }
  .variant-check { display: none; }
  .variant-description, .variant-tags { display: none; }
  .quick-focus { left: 10px; right: 10px; bottom: 61px; justify-content: center; }
  .quick-button { flex: 1; justify-content: center; font-size: 8px; }
  .tool-panel { left: 10px; right: 10px; bottom: 8px; justify-content: space-around; gap: 0; padding: 3px; }
  .tool-toggle { flex: 1; justify-content: center; gap: 3px; padding: 6px 1px; font-size: 7px; }
  .tool-toggle:nth-child(2) span:nth-child(2), .tool-toggle:nth-child(3) span:nth-child(2), .tool-toggle:nth-child(4) span:nth-child(2) { font-size: 0; }
  .tool-toggle:nth-child(2) span:nth-child(2)::after { content: "Каркас"; font-size: 7px; }
  .tool-toggle:nth-child(3) span:nth-child(2)::after { content: "Кирпич"; font-size: 7px; }
  .tool-toggle:nth-child(4) span:nth-child(2)::after { content: "Купол"; font-size: 7px; }
  .toggle-icon { font-size: 12px; }
  .switch-track { width: 19px; height: 11px; }
  .tool-toggle[aria-pressed="true"] .switch-track i { left: 10px; }
  .tool-toggle:nth-child(3) span:nth-child(2) { display: inline; }
  .concept-note { display: none; }
  .model-badge { display: none; }
  .view-hint { display: none; }
}
@media (max-height: 700px) and (min-width: 621px) {
  .project-panel { max-height: calc(100% - 160px); padding-top: 14px; padding-bottom: 10px; }
  .project-panel h1 { margin-top: 10px; font-size: 33px; }
  .metrics { margin: 11px 0 12px; padding: 8px 0; }
  .level-row { padding-top: 6px; padding-bottom: 6px; }
  .panel-foot { margin-top: 8px; padding-top: 7px; }
  .variant-panel { padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
