/* Quiet, tactile surfaces. No bitmap wall textures, no animated glow. */
#board-3d { position: fixed; inset: 0; width: 100%; height: 100%; cursor: grab; }
#board-3d:active { cursor: grabbing; }
#board-labels { position: fixed; inset: 0; pointer-events: none; }
.view-tools { position: fixed; top: 108px; right: 24px; display: flex; gap: 8px; align-items: center; z-index: 3; color: #34483d; }
.view-tools > button, .view-switch { background: #fffdf6ed; border: 1px solid #d5dbcf; border-radius: 14px; box-shadow: 0 4px 20px #273e3010; backdrop-filter: blur(12px); }
.view-switch { display: flex; padding: 4px; }
.view-switch button { min-width: 48px; min-height: 36px; font-size: 12px; font-weight: 650; letter-spacing: .06em; }
.view-switch [aria-pressed=true] { background: #3f6251; color: #fffdf6; box-shadow: 0 2px 8px #314d3820; }
.view-tools > button { font-size: 11px; }
.board-minimap { position: fixed; right: 24px; bottom: 110px; z-index: 2; border: 1px solid #d4d9cd; background: #fffdf6eb; backdrop-filter: blur(14px); border-radius: 16px; box-shadow: 0 8px 32px #273e3012; overflow: hidden; width: 212px; color: #34483d; }
.board-minimap header { display: flex; justify-content: space-between; align-items: center; padding-left: 14px; }
.board-minimap header span { font-size: 9px; letter-spacing: .16em; }
.board-minimap header button { min-height: 32px; height: 32px; font-size: 16px; }
.minimap-picture { display: block; width: 100%; border-radius: 0; padding: 0; line-height: 0; }
.minimap-picture canvas { display: block; position: static; width: 100%; height: auto; pointer-events: none; }
.board-minimap footer { display: none; padding: 10px 14px 14px; border-top: 1px solid #d4d9cd; }
.board-minimap footer span { font-size: 11px; color: #738172; }
.board-minimap footer button { display: block; margin-top: 10px; background: #3f6251; color: white; width: 100%; font-size: 12px; }
.board-minimap.expanded { width: min(422px, calc(100vw - 32px)); }
.board-minimap.expanded footer { display: block; }
.board-minimap.collapsed { width: 142px; }
.board-minimap.collapsed .minimap-picture, .board-minimap.collapsed footer { display: none; }
body:has(.panel:not([hidden])) .board-minimap { visibility: hidden; }
.panel { z-index: 6; top: 170px; box-shadow: 0 20px 60px #273e301a; }
.orbit { z-index: 4; }
.orbit button { color: #36503e; border-color: #d3dacd; box-shadow: 0 3px 12px #24392b16; }
.orbit button[data-tool=somatic] { background: #ede9dd; }
.orbit button[data-tool=posture], .orbit button[data-tool=focus] { background: #e6eee6; }
.spatial-panel { border-top: 1px solid #d7dcd0; margin-top: 22px; padding-top: 8px; }
.spatial-panel h3 { font: 23px Georgia, serif; margin: 16px 0; }
.spatial-panel output { float: right; font-size: 11px; color: #667b66; }
.posture-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 20px; }
.posture-presets button { display: flex; flex-direction: column; gap: 5px; align-items: center; font-size: 25px; background: #edf1e8; border: 1px solid #d7dfd1; padding: 10px 3px; }
.posture-presets button span { font-size: 11px; }
.posture-presets button[aria-pressed=true] { background: #d7e5d9; border-color: #729980; }
.felt-sense { margin-top: 32px; padding-top: 22px; border-top: 1px solid #d7dcd0; }
.body-picker { position: relative; height: 225px; border-radius: 20px; background: radial-gradient(ellipse at 50% 45%, #e5eadf 0, #f7f7ee 70%); margin: 16px 0 20px; }
.body-picker svg { position: absolute; top: 17px; left: calc(50% - 80px); height: 190px; width: 126px; fill: #c2cfc0; stroke: #94a591; stroke-width: 1; }
.body-picker button { position: absolute; left: 51%; min-height: 35px; border: 1px solid #cdd7c7; background: #fffdf5ed; font-size: 11px; border-radius: 24px; padding: 4px 14px; box-shadow: -14px 0 22px var(--zone-color); }
.body-picker button[data-zone=throat] { top: 58px; }
.body-picker button[data-zone=chest] { top: 99px; }
.body-picker button[data-zone=belly] { top: 140px; }
.body-picker button[aria-pressed=true] { border-color: #4d7259; outline: 2px solid #4d725923; }
.body-picker button.marked::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--zone-color); margin-right: 7px; }
.zone-editor { padding: 4px 15px 14px; border: 1px solid #d9dfd0; border-radius: 14px; background: #f8f8f0; }
.zone-editor .zone-enabled { font-weight: 600; }
.demo-mode .view-tools { top: 92px; right: 22px; }
.demo-mode .board-minimap { bottom: 275px; right: 22px; }
.demo-mode .demo-inspector { z-index: 7; }
.presenting .view-tools { top: 85px; }
.demo-comparison, .demo-library { z-index: 8; }
@media (max-width: 1000px) {
    .board-minimap { right: 14px; bottom: 158px; }
    .view-tools { right: 14px; }
}
@media (max-width: 600px) {
    .view-tools { top: 88px; right: 12px; gap: 5px; }
    .view-tools > button { min-height: 38px; padding: 5px 9px; }
    .view-tools [data-camera-reset] span { display: none; }
    .view-switch button { min-width: 42px; min-height: 32px; padding: 4px 8px; }
    .board-minimap { width: 142px; right: 12px; bottom: 215px; border-radius: 12px; }
    .board-minimap.expanded { right: 16px; }
    .board-minimap header { padding-left: 10px; }
    .board-minimap header span { font-size: 8px; }
    .panel { top: auto; bottom: 0; max-height: 65dvh; }
    .orbit { max-width: calc(100vw - 20px); overflow-x: auto; bottom: 149px; padding: 5px; width: max-content !important; height: auto !important; gap: 0; }
    .orbit button { flex: 0 0 36px; min-width: 36px; width: 36px; height: 40px; min-height: 40px; }
    .demo-mode .view-tools { top: 116px; right: 10px; }
    .demo-mode .view-tools [data-guide] { max-width: 108px; font-size: 9px; line-height: 1.25; }
    .demo-mode .demo-caption { top: 166px; }
    .demo-mode .demo-caption h2 { font-size: 19px; max-width: 95%; }
    .demo-mode .board-minimap { bottom: 300px; right: 10px; }
    #board-badge { top: 138px; }
}
@media (max-height: 650px) {
    .demo-mode .board-minimap:not(.expanded) .minimap-picture { display: none; }
    .demo-mode .board-minimap { bottom: 280px; }
}
/* Unified object editor. The live renderer shares the board's figure geometry. */
.panel.object-properties{width:min(680px,calc(100vw - 32px));max-width:none;padding:22px;top:165px;max-height:calc(100dvh - 180px);transition:width 0.18s ease}
.panel.object-properties.panel--relations,
.panel.object-properties:has(.is-relations-tab),
.panel.object-properties:has([data-page="relations"]:not([hidden])) {
    width: min(760px, calc(100vw - 32px));
}
.figure-tabs{display:flex;gap:5px;margin:15px 0 20px;flex-wrap:wrap}.figure-tabs button{flex:1;min-width:0;padding:9px 6px;font-size:12px;border:1px solid #d8ded2}.figure-tabs [aria-selected=true]{background:#3f6251;color:#fffdf6}
.figure-editor-layout{display:grid;grid-template-columns:210px minmax(0,1fr);gap:22px}
.figure-editor.is-relations-tab .figure-editor-layout,
.figure-editor-layout.has-no-preview,
.figure-editor-layout:has(.figure-preview[hidden]) {
    display: block;
    grid-template-columns: 1fr;
}
.figure-editor.is-relations-tab .figure-form,
.figure-editor-layout.has-no-preview .figure-form,
.figure-editor-layout:has(.figure-preview[hidden]) .figure-form {
    width: 100%;
    min-width: 0;
}
.figure-preview{min-width:0;align-self:start;position:sticky;top:0;text-align:center;background:#f0f2eb;border-radius:16px;padding:10px}.figure-preview-canvas{position:static!important;width:100%;height:260px;display:block;border-radius:12px;pointer-events:none}.figure-preview-overlay{display:none}.figure-preview .help{font-size:11px;margin:3px 0 10px}.figure-form{min-width:0}.figure-form section[hidden]{display:none}.figure-form h3{font:22px Georgia,serif}.figure-form output{float:right;font-size:12px}.figure-form textarea{width:100%;box-sizing:border-box;min-height:76px}.figure-form .soma-tags{margin:10px 0 14px;display:flex;flex-wrap:wrap;gap:5px}.figure-form .soma-tags button{padding:5px 9px;min-height:32px;font-size:12px;border:1px solid #d7dcd0}.figure-form .soma-tags [aria-pressed=true]{background:#3f6251;color:#fffdf6}.feeling-select{width:100%;display:grid;grid-template-columns:10px 1fr;gap:2px 8px;text-align:left;border:1px solid transparent;background:#fffdf6;margin:6px 0;padding:9px 10px;overflow-wrap:anywhere}.feeling-select small{grid-column:2;font-size:11px;color:#627160}.feeling-select[aria-pressed=true]{border-color:#62816a;box-shadow:0 0 0 2px #62816a22}.feeling-color{width:9px;height:9px;border-radius:50%;align-self:center}.figure-preview [data-feeling-add]{margin-top:10px;border:1px dashed #a6b3a0;width:100%;font-size:12px;padding:10px 6px}.feeling-appearance{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;border-top:1px solid #d7dcd0;margin-top:12px}.feeling-appearance label{font-size:12px}.feeling-appearance input[type=color]{width:50px}.figure-form .remove-feeling{border:1px solid #c7b5ac;background:#f7eee8;color:#795443;margin-top:12px;width:100%;padding:10px}.small-action{font-size:11px;padding:2px 0;color:#627160}.emoji-options{display:flex;gap:4px;flex-wrap:wrap}.figure-form .posture-presets button{font-size:13px}.figure-form details{margin-top:16px}.figure-form input[type=number]{width:100%;min-width:0}.figure-form .row>label{min-width:0;flex:1}
#camera-controls{position:absolute;right:0;top:54px;background:#fffdf6;border:1px solid #d5dbcf;border-radius:16px;padding:14px;width:min(310px,calc(100vw - 28px));box-shadow:0 10px 30px #273e3020}#camera-controls button{font-size:12px;border:1px solid #d5dbcf;padding:8px 12px}#camera-controls [aria-pressed=true]{background:#3f6251;color:#fffdf6}#camera-controls .row{display:flex;gap:6px;margin-bottom:8px}#camera-controls p{font-size:12px;line-height:1.4;margin-bottom:0}.view-tools{z-index:7}
@media(max-width:700px){.panel.object-properties{top:145px;right:8px;width:calc(100vw - 16px);padding:16px;max-height:calc(100dvh - 158px)}.figure-editor-layout{grid-template-columns:1fr;gap:12px}.figure-preview{position:static;display:grid;grid-template-columns:100px 1fr;gap:8px;align-items:center}.figure-preview-canvas{height:155px;grid-row:1/4}.figure-preview .help{display:none}.figure-preview [data-feeling-add]{grid-column:2;margin-top:0}.figure-preview .feeling-list{grid-column:2}.figure-tabs{margin:8px 0 12px}.figure-tabs button{font-size:11px;padding:8px 4px}.view-tools{gap:4px}.view-tools>button{padding:7px}.figure-form .posture-presets{margin-bottom:10px}}

/* ── 3D Kamera-Modus Schnellumschalter ── */
.camera-mode-toggle {
    display: flex;
    background: #fffdf6ed;
    border: 1px solid #d5dbcf;
    border-radius: 14px;
    box-shadow: 0 4px 20px #273e3010;
    backdrop-filter: blur(12px);
    padding: 3px;
    gap: 3px;
}
.camera-mode-toggle button {
    min-height: 34px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 10px;
    border: 0;
    background: transparent;
    color: #34483d;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.camera-mode-toggle button[aria-pressed="true"] {
    background: #3f6251;
    color: #fffdf6;
    box-shadow: 0 2px 8px #314d3820;
}

/* ── 3D Steuerungshinweis ── */
.stage-3d-hint {
    position: fixed;
    bottom: 82px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(45, 59, 49, 0.94);
    color: #fffdf6;
    padding: 8px 16px;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
    pointer-events: auto;
    white-space: nowrap;
}
.stage-3d-hint .hint-close {
    background: transparent;
    border: 0;
    color: #cbd8cf;
    font-size: 16px;
    padding: 0 4px;
    min-width: 24px;
    min-height: 24px;
    cursor: pointer;
    line-height: 1;
}
.stage-3d-hint .hint-close:hover {
    color: #ffffff;
}
@media (pointer: coarse) {
    .stage-3d-hint .hint-desktop { display: none; }
    .stage-3d-hint .hint-touch { display: inline; }
}
@media (pointer: fine) {
    .stage-3d-hint .hint-touch { display: none; }
    .stage-3d-hint .hint-desktop { display: inline; }
}



/* Compact 2D/3D shared toolbar after integrating the Export controls.
   3D rotate/pan shortcuts remain available inside the Camera popover. */
@media (max-width:600px) {
  .view-tools { gap:3px; }
  .view-tools .view-switch { padding:2px; }
  .view-tools .view-switch button {
    min-width:31px; min-height:32px; padding:3px 6px; font-size:11px;
  }
  .view-tools .shared-person-add { min-height:34px; padding:5px 6px; font-size:10px; }
  .view-tools .camera-mode-toggle,
  .view-tools [data-camera-reset] { display:none!important; }
  .view-tools [data-camera-tools] { min-height:34px; padding:5px 7px; font-size:11px; }
}
@media (max-width:380px) {
  .view-tools { right:6px; max-width:calc(100vw - 12px); }
  .view-tools .view-switch button { min-width:28px; padding:3px 5px; }
  .view-tools .shared-person-add { padding:4px 5px; }
}
