.direction-model-button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 18px 22px; border: 0; border-bottom: 1px solid #c5cdbf; background: #e7eddf; color: #173e32; font: 600 14px/1.4 Manrope,Arial,sans-serif; cursor: pointer; text-align: left; }
.direction-model-button:hover { background: #d9ff65; }
.direction-model-button small { font-size: 11px; font-weight: 400; }
.model-dialog { box-sizing: border-box; width: min(1200px,calc(100vw - 48px)); height: min(880px,calc(100dvh - 48px)); max-width: none; max-height: none; margin: auto; padding: 0; border: 1px solid #bbc5b6; border-radius: 10px; background: #fffef9; color: #173e32; box-shadow: 0 28px 90px #0c241950; overflow: hidden; }
.model-dialog::backdrop { background: #0a201cc9; backdrop-filter: blur(5px); }
.model-shell { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.model-dialog button, .model-dialog a { -webkit-tap-highlight-color: transparent; }
.model-dialog button { cursor: pointer; font-family: Manrope,Arial,sans-serif; color: #173e32; }
.model-dialog button:focus-visible, .model-dialog a:focus-visible, .model-dialog canvas:focus-visible, .direction-model-button:focus-visible { outline: 3px solid #40634b; outline-offset: -3px; }
.model-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 28px 14px; flex-shrink: 0; }
.model-eyebrow { color: #64715e; font: 10px/1.4 Manrope,Arial,sans-serif; letter-spacing: .16em; }
.model-header h2 { margin: 5px 0 0; color: #173e32; font: 30px/1.2 Prata,Georgia,serif; }
.model-close { flex-shrink: 0; width: 44px; height: 44px; border: 1px solid #c5cdbf; border-radius: 50%; background: #fffef9; font-size: 20px; }
.model-close:hover { background: #e7eddf; }
.model-variants { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 28px 16px; flex-shrink: 0; }
.model-variants button { min-height: 44px; padding: 10px 16px; border: 1px solid #bac6b7; border-radius: 5px; background: transparent; font-size: 12px; }
.model-variants button[aria-pressed="true"] { background: #173e32; color: #fffef9; border-color: #173e32; }
.model-stage { position: relative; flex: 1; min-height: 230px; overflow: hidden; background: #eeeae1; border-block: 1px solid #d9ddcf; }
.model-canvas-wrap { position: absolute; inset: 0; }
.model-canvas-wrap canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.model-placeholder { position: absolute; inset: 0; display: grid; place-items: center; background: #f4f0e7; pointer-events: none; }
.model-placeholder[hidden] { display: none; }
.model-placeholder img { width: 100%; height: 100%; object-fit: contain; opacity: .65; }
.model-loading { position: absolute; padding: 12px 20px; border-radius: 5px; background: #fffef9f5; color: #173e32; font-size: 13px; }
.model-dimensions { position: absolute; top: 18px; left: 24px; padding: 8px 12px; border: 1px solid #c4cabd; border-radius: 4px; background: #fffef9e6; color: #41533e; font-size: 11px; pointer-events: none; }
.model-dimensions span { margin: 0 5px; color: #88957f; }
.model-tools { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; max-width: calc(100% - 24px); padding: 6px; border: 1px solid #c4cabd; border-radius: 8px; background: #fffef9f2; box-shadow: 0 3px 18px #28432815; }
.model-tools button { white-space: nowrap; border: 1px solid transparent; border-radius: 4px; background: transparent; min-height: 42px; padding: 9px 12px; font-size: 12px; }
.model-tools button:hover, .model-tools button[aria-pressed="true"] { background: #e0ebd5; }
.model-tools button:disabled { opacity: .4; cursor: default; }
.model-zoom { display: flex; border-left: 1px solid #c4cabd; padding-left: 5px; }
.model-zoom button { width: 42px; font-size: 20px; padding: 4px; }
.model-footer { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 28px 20px; min-height: 0; background: #fffef9; color: #173e32; }
.model-footer p { margin: 0; text-transform: none; letter-spacing: normal; }
.model-hint { color: #304d3c; font-size: 12px; line-height: 1.5; }
#modelScope { color: #6c7569; font-size: 10px; line-height: 1.6; max-width: 720px; margin-top: 5px; }
.model-download { flex-shrink: 0; display: flex; align-items: center; min-height: 44px; padding: 10px 16px; background: #173e32; border-radius: 5px; color: #fffef9; text-decoration: none; font-size: 12px; }
@media(max-width:760px) {
  .model-dialog { width: calc(100vw - 16px); height: calc(100dvh - 16px); border-radius: 8px; overflow-y: auto; }
  .model-shell { min-height: 640px; }
  .model-header { padding: 16px 16px 12px; }
  .model-header h2 { font-size: 24px; }
  .model-eyebrow { font-size: 8px; letter-spacing: .1em; }
  .model-variants { padding: 0 16px 12px; gap: 6px; }
  .model-variants button { flex: 1; padding: 9px 6px; font-size: 11px; }
  .model-dimensions { top: 12px; left: 12px; right: 12px; text-align: center; font-size: 10px; padding: 7px; }
  .model-dimensions span { margin: 0 2px; }
  .model-tools { bottom: 10px; justify-content: center; flex-wrap: wrap; gap: 2px; width: max-content; }
  .model-tools button { min-height: 44px; padding: 7px 10px; font-size: 11px; }
  .model-tools [data-model-roof] { order: 2; }
  .model-zoom { order: 3; }
  .model-zoom button { width: 38px; font-size: 20px; }
  .model-footer { padding: 12px 16px 16px; flex-direction: column; align-items: stretch; gap: 10px; }
  .model-hint { font-size: 11px; }
  .model-download { justify-content: center; }
}
@media print { .model-dialog, .direction-model-button { display: none !important; } }
