/* Chisel 3D kit: the box, buttons, labels and cards around a scene (STYLE.md section 6).
   Lifted from ericiscool.net styles/global.css (.room3d and .r3-*), with the site's variables replaced by their values. */
@font-face { font-family: "Fira Code"; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/fira-code-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: "Fira Code"; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/fira-code-latin-700-normal.woff2') format('woff2'); }

.room3d { --r3-mono: "Fira Code", ui-monospace, Menlo, Consolas, monospace;
          box-sizing: border-box; position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: 70vh; min-height: 280px; overflow: hidden;
          background: #0d0221; border: 1px solid rgba(255, 255, 255, .08); border-radius: 6px; font-family: var(--r3-mono); }
.room3d:focus { outline: none; }
.room3d:focus-visible { outline: 2px solid #22d3ee; outline-offset: 2px; }
.room3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.room3d canvas:active { cursor: grabbing; }
.r3-btn { font: inherit; font-family: var(--r3-mono); font-size: 14px; color: #9ffcff; background: rgba(19, 8, 38, .78);
          border: 1px solid #00e5ff; border-radius: 8px; box-shadow: 0 0 8px rgba(0, 229, 255, .35); touch-action: none;
          user-select: none; -webkit-user-select: none; cursor: pointer; }
.r3-btn:active, .r3-btn.on { background: rgba(0, 229, 255, .25); }
.r3-sit { position: absolute; left: 10px; bottom: 10px; padding: 6px 12px; touch-action: manipulation; }
.r3-pad { position: absolute; right: 10px; bottom: 10px; display: grid; grid-template-columns: repeat(3, 40px);
          grid-template-rows: repeat(2, 40px); gap: 5px; }
.r3-pad .r3-btn { width: 40px; height: 40px; padding: 0; font-size: 16px; }
.r3-f { grid-column: 2; grid-row: 1; }
.r3-l { grid-column: 1; grid-row: 2; }
.r3-b { grid-column: 2; grid-row: 2; }
.r3-r { grid-column: 3; grid-row: 2; }
.r3-nogl { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 16px;
           text-align: center; color: #b9a6d3; }
.r3-menu { position: absolute; top: 8px; left: 8px; padding: 4px 10px; font-size: 13px; touch-action: manipulation; }
.r3-fs { position: absolute; top: 8px; right: 8px; width: 36px; height: 32px; padding: 0; font-size: 16px; touch-action: manipulation; }
.r3-layers { position: absolute; top: 46px; left: 8px; display: flex; flex-direction: column; gap: 4px; }
.r3-layers[hidden] { display: none; }
.r3-lay { min-width: 76px; text-align: left; padding: 4px 10px; font-size: 12px; color: #e9dcff; touch-action: manipulation; }
.r3-lay.on { background: rgba(255, 255, 255, .18); }
.room3d:fullscreen { width: 100%; height: 100%; max-height: none; min-height: 0; aspect-ratio: auto; border: 0; border-radius: 0; }
.room3d.r3-full { position: fixed; inset: 0; z-index: 1000; width: 100vw; height: 100vh; height: 100dvh; max-height: none;
                  min-height: 0; aspect-ratio: auto; border: 0; border-radius: 0; }
html.r3-lock, html.r3-lock body { overflow: hidden; }
.r3-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.r3-label { position: absolute; left: 0; top: 0; display: none; padding: 2px 6px; font-family: var(--r3-mono); font-size: 11px; line-height: 1.3;
            white-space: nowrap; background: rgba(13, 2, 33, .82); border: 1px solid; border-radius: 4px; }
.r3-detail { position: absolute; top: 46px; right: 8px; width: min(300px, calc(100% - 120px)); max-height: calc(100% - 110px);
             overflow-y: auto; padding: 10px 12px; font-family: var(--r3-mono); font-size: 12px; line-height: 1.45; color: #f2e9ff;
             background: rgba(13, 2, 33, .9); border: 1px solid #ff2bd6; border-radius: 8px; box-shadow: 0 0 12px rgba(255, 43, 214, .35); }
.r3-detail[hidden] { display: none; }
.r3-detail a { color: #22d3ee; }
.r3-detail-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.r3-detail-head strong { flex: 1; font-size: 13px; color: #9ffcff; }
.r3-detail-n { flex: none; min-width: 22px; padding: 1px 5px; text-align: center; color: #0d0221; background: #ffd319; border-radius: 4px; font-weight: bold; }
.r3-detail-x { flex: none; width: 26px; height: 24px; padding: 0; font-size: 12px; touch-action: manipulation; }
.r3-detail dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; }
.r3-detail dt { color: #ff8cf7; }
.r3-detail dd { margin: 0; }
.r3-detail .r3-note { margin: 8px 0 0; font-size: 11px; color: #c9b8ff; }
.r3-pin { position: absolute; left: 0; top: 0; width: 26px; height: 26px; pointer-events: none; border: 2px solid #ffd319;
          border-radius: 50%; box-shadow: 0 0 10px #ffd319; }
.r3-pin[hidden] { display: none !important; }
/* ?still on the page address: the same scene without its buttons, for rendering stills */
.room3d.r3-still .r3-btn, .room3d.r3-still .r3-layers, .room3d.r3-still .r3-pad { display: none; }
/* a full-page scene: the box fills the window */
.room3d.r3-page { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-height: none; min-height: 0;
                  aspect-ratio: auto; border: 0; border-radius: 0; }
