/* 3D Graphics styles: a dark viewport and timeline (as in Blender) beside the suite's light panels. */
:root {
  --vp: #eceef2;
  --vp-bar: rgba(255, 255, 255, 0.92);
  --vp-ctl: transparent;
  --vp-ctl-hover: #eef0f4;
  --vp-on: var(--accent);
  --vp-text: #262a31;
  --vp-muted: #6b707a;
}
#main { display: flex; flex-direction: row; flex: 1; min-width: 0; min-height: 0; background: var(--panel); }
#g3-center { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#g3-view { position: relative; flex: 1; min-height: 160px; background: var(--vp); overflow: hidden; outline: none; user-select: none; -webkit-user-select: none; }
#g3-view:focus-visible { box-shadow: inset 0 0 0 2px var(--vp-on); }
.g3-canvas { position: absolute; inset: 0; display: block; touch-action: none; }
#g3-view.modal-on .g3-canvas { cursor: move; }

/* viewport header (as Blender's): mode, orientation, snapping … shading */
/* the view switches: a small group in the viewport's top-right corner */
#g3-vhead { position: absolute; right: 8px; top: 8px; z-index: 3; display: flex; align-items: center; gap: 2px; height: 34px; padding: 3px; border-radius: 10px; background: var(--vp-bar); color: var(--vp-text); box-shadow: 0 1px 3px rgba(24, 24, 27, .12), 0 0 0 1px rgba(24, 24, 27, .06); }
.vh-btn { width: 28px; height: 28px; border: 0; border-radius: 7px; background: var(--vp-ctl); color: var(--vp-text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.vh-btn:hover { background: var(--vp-ctl-hover); }
.vh-btn.on { background: var(--accent-soft); color: var(--accent-strong); }
.vh-btn:disabled { opacity: 0.4; cursor: default; }
.vh-btn .material-symbols-outlined { font-size: 17px; }
.vh-seg { display: inline-flex; gap: 1px; }
.vh-sep { width: 1px; height: 18px; background: var(--line); margin: 0 3px; }
#g3-vinfo { position: absolute; left: 12px; top: 10px; z-index: 2; color: var(--vp-text); font-size: 12px; line-height: 1.4; pointer-events: none; }
.vi-title { font-weight: 500; }
.vi-sub { color: var(--vp-muted); }

/* navigation gizmo */
#g3-nav { position: absolute; right: 8px; top: 52px; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.g3-navc { width: 96px; height: 96px; cursor: pointer; }
.g3-navb { display: flex; flex-direction: column; gap: 4px; }
.g3-nb { width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.92); box-shadow: 0 1px 3px rgba(24, 24, 27, .15); color: var(--vp-text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.g3-nb:hover { background: #fff; color: var(--text); }
.g3-nb.on { background: var(--accent-soft); color: var(--accent-strong); }
.g3-nb .material-symbols-outlined { font-size: 17px; }
#g3-frame { position: absolute; z-index: 1; pointer-events: none; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.42); outline: 1px dashed rgba(255, 255, 255, 0.55); }
#g3-frame[hidden], #g3-box[hidden], #g3-modal-text[hidden] { display: none; }
#g3-box { position: absolute; z-index: 2; pointer-events: none; border: 1px dashed #fff; background: rgba(255, 255, 255, 0.06); }
#g3-modal-text { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 3; max-width: calc(100% - 24px); padding: 6px 12px; border-radius: 6px; background: rgba(25, 25, 25, 0.88); color: #f2f2f2; font: 12px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }

/* timeline and status bar */
#g3-timeline { flex: none; background: var(--surface); color: var(--text); border-top: 1px solid var(--line); }
#g3-timeline[hidden] { display: none; }
.tl-bar { display: flex; align-items: center; gap: 4px; height: 32px; padding: 0 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.tl-btn { width: 26px; height: 24px; border: 0; border-radius: 4px; background: var(--sunk); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex: none; }
.tl-btn:hover { background: var(--hover); }
.tl-btn.on { background: var(--danger); color: #fff; }
.tl-btn .material-symbols-outlined { font-size: 17px; }
.tl-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; flex: none; }
.tl-field { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--vp-muted); flex: none; }
.tl-num { width: 58px; height: 24px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--text); font: 12px var(--mono); padding: 0 6px; }
.tl-num:focus { outline: 1px solid var(--vp-on); }
.tl-fps { height: 24px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--text); font-size: 12px; padding: 0 4px; flex: none; }
.tl-ruler { display: block; width: 100%; height: 40px; cursor: ew-resize; touch-action: none; }

/* right column: Outliner, Properties, History */
#g3-side, #g3-left { min-height: 0; }
.g3-pane { display: flex; flex-direction: column; min-height: 0; border-bottom: 1px solid var(--line); }
.g3-pane.grow { flex: 1; flex-direction: column; }
#g3-outliner { flex: 1; overflow: auto; padding: 0 4px 6px; outline: none; }
.ol-row { display: flex; align-items: center; gap: 3px; height: 26px; padding-right: 4px; border-radius: 5px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.ol-row:hover { background: var(--line-soft); }
.ol-row.sel { background: var(--sel-soft); }
.ol-row.active { background: var(--accent-soft); color: var(--accent-strong); }
.ol-row.active .ol-name { font-weight: 600; }
.ol-row.hidden-obj .ol-name, .ol-row.hidden-obj .ol-ic { opacity: 0.45; }
.ol-row.drop-in { box-shadow: inset 0 0 0 2px var(--prog); }
#g3-outliner.drop-root { box-shadow: inset 0 0 0 2px var(--prog); }
.ol-root { padding-left: 6px; color: var(--text-2); font-weight: 500; cursor: default; }
.ol-root:hover { background: none; }
.ol-root .material-symbols-outlined { font-size: 17px; color: var(--faint); margin-right: 4px; }
.ol-count { margin-left: auto; font-size: 11px; color: var(--muted); padding-right: 6px; }
.ol-caret { width: 18px; height: 20px; border: 0; background: none; padding: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; flex: none; }
.ol-caret:disabled { visibility: hidden; }
.ol-caret .material-symbols-outlined { font-size: 17px; }
.ol-ic { font-size: 16px; flex: none; margin-right: 3px; }
.ol-ic.k-mesh { color: var(--accent-strong); }
.ol-ic.k-light { color: #3c8a2e; }
.ol-ic.k-camera { color: #3c6fbf; }
.ol-ic.k-empty { color: #8a5cc4; }
.ol-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ol-anim { font-size: 14px; color: #c79a00; flex: none; }
.ol-eye { width: 24px; height: 22px; border: 0; background: none; border-radius: 4px; padding: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; flex: none; }
.ol-eye:hover { background: var(--line); color: var(--text); }
.ol-eye .material-symbols-outlined { font-size: 16px; }
.ol-rename { flex: 1; min-width: 0; height: 22px; border: 1px solid var(--prog); border-radius: 4px; padding: 0 5px; font: inherit; font-size: 13px; }
#g3-ptabs { flex: none; display: flex; flex-wrap: wrap; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--line-soft); }
.pt-btn { flex: none; height: 26px; display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.pt-btn:hover { background: var(--hover); color: var(--text); }
.pt-btn.on { background: var(--accent-soft); color: var(--accent-strong); font-weight: 500; }
.pt-btn[hidden] { display: none; }
.pt-btn .material-symbols-outlined { font-size: 16px; }
#g3-props { flex: 1; min-width: 0; overflow: auto; padding: 0 0 12px; }
.key-btn { margin-left: auto; width: 24px; height: 22px; border: 0; border-radius: 4px; background: none; color: var(--faint); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.key-btn .material-symbols-outlined { font-size: 14px; transform: rotate(45deg); }
.key-btn:hover { background: var(--line); color: var(--text-2); }
.key-btn.anim { color: #4f8a2c; }
.key-btn.on { color: #e3a600; }
.presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 4px 10px 10px; }
.preset { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font: inherit; font-size: 11px; color: var(--text-2); cursor: pointer; }
.preset:hover { border-color: var(--prog); }
.preset-sw { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12), inset -4px -5px 8px rgba(0, 0, 0, 0.18); }

/* the shading control on the top bar */
.g3w-seg { display: inline-flex; gap: 1px; }
.g3w-seg .cmd-btn.active { background: var(--prog-soft); color: var(--prog-strong); }

/* dialogs */
.render-out { display: flex; flex-direction: column; gap: 8px; }
.render-out video { max-width: 100%; max-height: 70vh; border-radius: 6px; background: #000; align-self: center; }
/* Render animation: the options, and the progress while it renders */
.vid-opts { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.dl-options .vid-opts { flex: 1; }
.vid-row { display: flex; align-items: center; gap: 10px; }
.vid-label { width: 64px; flex: none; color: var(--text-2); }
.vid-row select { flex: 1; min-width: 0; }
.vid-range { display: inline-flex; align-items: center; gap: 8px; }
.vid-num { width: 84px; }
.vid-info { font-size: 12px; line-height: 1.45; }
.vid-progress { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.vid-preview { display: block; width: 100%; height: auto; max-height: 50vh; object-fit: contain; border-radius: 6px; background: #000; }
.vid-bar { height: 8px; border-radius: 4px; background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.vid-bar > span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width .15s; }
.vid-msg { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.render-out img { max-width: 100%; max-height: 70vh; object-fit: contain; border-radius: 6px; background: repeating-conic-gradient(#ddd 0 25%, #fff 0 50%) 0 0 / 16px 16px; align-self: center; }
.kbd-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.kbd-table td { padding: 5px 6px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
kbd { font: 12px var(--mono); background: var(--hover); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
ul.feat { padding-left: 18px; margin: 4px 0; line-height: 1.55; font-size: 13px; }
.small { font-size: 12px; }
.load-error { max-width: 520px; padding: 16px; color: #b3261e; line-height: 1.5; }
.cmd-header #doc-title { min-width: 160px; }

@media (max-width: 1100px) {
  #g3-side { width: 280px; }
}
@media (max-width: 800px) {
  #main { flex-direction: column; }
  #g3-side { width: auto; height: 44%; flex-direction: row; border-left: 0; border-top: 1px solid var(--line); }
  #g3-outliner-pane { flex: 0 0 40%; border-right: 1px solid var(--line); border-bottom: 0; }
  #g3-props-pane { border-bottom: 0; }
  .tl-field:nth-of-type(n+2), .tl-fps { display: none; }
}
@media (max-width: 520px) {
  #g3-side { flex-direction: column; height: 50%; }
  #g3-outliner-pane { flex: 0 0 34%; border-right: 0; border-bottom: 1px solid var(--line); }
  .g3-navc { width: 72px; height: 72px; }
  }
#g3-tool-pane { display: flex; flex-direction: column; min-height: 0; }
#g3-tool { padding-top: 8px; }
