/* Studio > 3D Hologram (A-126, builder B11, 12 Nov 2026). Loaded after race.css. Every class here starts with h3. */

/* The library: cards that keep one width, as many to a row as fit. The tiles start straight under the header, at the gap
   every screen has there (13 Nov 2026, Rrahul: "compact as we want to show the actual content"): no margin of its own. */
.h3grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; }
.h3grid > .empty { grid-column: 1 / -1; align-items: center; }
.h3grid > .empty p { margin: 0; color: var(--hb-slate); }
.h3card { padding: 12px !important; gap: 10px !important; min-width: 0; }

/* The tile: a still drawing with the words "3D model", and over it the model's kept picture once that has come (A-133,
   S1; 13 Nov 2026). No 3D viewer is put into a tile. The drawing stays alone when there is no picture. */
.h3tile { aspect-ratio: 4 / 3; border-radius: 10px; background: var(--hb-mist); border: 1px solid var(--hb-line); display: grid; place-items: center;
  align-content: center; gap: 4px; text-align: center; position: relative; overflow: hidden; padding: 0 12px; }
.h3tile::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--hb-spectrum); z-index: 2; }
.h3tile svg { width: 58px; height: 58px; fill: none; stroke: var(--hb-purple); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.h3tile b { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--hb-slate); }
.h3tile .small { color: var(--hb-ink); font-weight: 500; line-height: 1.35; }
.h3tile.h3link svg { stroke: var(--hb-slate); }
.h3tile .h3pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--hb-mist); }
.h3tile.h3cover .h3pic { object-fit: cover; }   /* a picture copied from Sketchfab is wide and has its own ground */
.h3tile button.link { font-size: 12.5px; position: relative; z-index: 2; }
/* The whole tile is a button that opens the model on this computer; the word "Open" sits in its corner. */
.h3open { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 10px; background: transparent; cursor: pointer; z-index: 1; display: block; }
.h3open span { position: absolute; right: 8px; bottom: 8px; padding: 4px 11px; border-radius: 999px; background: rgba(15,18,34,.74); color: var(--hb-white); font-size: 12px; font-weight: 600; }
.h3open:hover span { background: var(--hb-purple); }
.h3open:focus-visible { outline: 2px solid var(--hb-purple); outline-offset: -2px; }
/* Where a file model with no picture yet is drawn once for it: on the page so that it is drawn, never seen, never in the way. */
model-viewer.h3shot { position: fixed; left: 0; top: 0; width: 640px; height: 640px; opacity: 0; pointer-events: none; z-index: -1; }

.h3name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* a long name never stretches the card */
.h3meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.h3meta .small { color: var(--hb-slate); }
.h3acts { display: flex; flex-direction: column; gap: 6px; }
.h3acts .h3show { width: 100%; min-height: 38px; padding: 7px 14px; font-size: 13.5px; }
.h3acts > span { display: flex; justify-content: space-between; }
.h3acts .h3bad { color: var(--hb-bad); }

/* The pop-ups: what this part puts into Studio's one #dlg sits in its own .h3dlg, so no other pop-up changes. */
.h3dlg { display: flex; flex-direction: column; gap: 14px; }
.h3dlg h2 { margin-bottom: 0; }
.h3dlg p { margin: 0; }
.h3dlg .h3end { justify-content: flex-end; margin-top: 4px; }
.h3pick { border: 1px solid var(--hb-line); border-radius: var(--hb-radius-sm); padding: 10px 14px 12px; margin: 0; display: flex; gap: 8px 22px; flex-wrap: wrap; }
.h3pick legend { font-size: 13px; font-weight: 500; color: var(--hb-ink); padding: 0 6px; }
.h3pick label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; cursor: pointer; }
.h3pick input { width: 18px; height: 18px; accent-color: var(--hb-purple); margin: 0; }
#h3FileRow .small, #h3LinkRow .small { color: var(--hb-slate); margin-bottom: 8px; }
#h3File, #h3Link, #h3Name, #h3EName, #h3ESpin, #h3ESize, #h3Box { width: 100%; }
#h3File { border: 1px dashed var(--hb-slate); border-radius: var(--hb-radius-sm); padding: 14px; background: var(--hb-mist); }
#h3Bar { width: 100%; height: 10px; accent-color: var(--hb-purple); }
#h3AddMsg:empty, #h3EMsg:empty, #h3ShowMsg:empty { display: none; }

/* A model opened on this computer (A-133, S1): Studio's one pop-up, made large while it shows a model. */
#dlg.h3big { width: min(1100px, 96vw); }
.h3view { gap: 12px; }
.h3vhead { display: flex; align-items: center; gap: 10px; min-width: 0; }
.h3vhead h2 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.h3vhead .chip { flex: none; }
.h3vstage { position: relative; height: min(64vh, 660px); min-height: 260px; border-radius: 12px; border: 1px solid var(--hb-line); background: var(--hb-mist); overflow: hidden; display: grid; place-items: center; }
.h3vstage svg { width: 84px; height: 84px; fill: none; stroke: var(--hb-slate); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.h3vstage .h3vpic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.h3vstage model-viewer { position: absolute; inset: 0; width: 100%; height: 100%; background: var(--hb-mist); opacity: 0; transition: opacity .3s ease; }
.h3vstage.h3live model-viewer { opacity: 1; }
.h3vstage .h3vplay { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.h3vstage:fullscreen { height: 100vh; border: 0; border-radius: 0; }
.h3vnote { position: absolute; left: 0; right: 0; bottom: 12px; margin: 0; text-align: center; font-size: 13px; color: var(--hb-ink); pointer-events: none; z-index: 1; }
.h3vnote:empty { display: none; }
.h3vtools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 34px; }
.h3vtools button { padding: 6px 14px; font-size: 13px; min-height: 0; }
.h3vtools .small { color: var(--hb-slate); }
.h3vout { font-weight: 600; color: var(--hb-blue-deep); }
.h3view .h3end { align-items: center; flex-wrap: wrap; }
.h3view .h3end .h3bad { margin-right: auto; color: var(--hb-bad); }

/* A-174 (UX-18): "Name these models", and the Trash cards (the shared .cardgrid). */
.h3namenote { align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.h3namelist { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow: auto; }
.h3namerow { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; }
.h3namerow > div:last-child { min-width: 0; }
.h3namerow input { width: 100%; }
.h3namepic { width: 72px; aspect-ratio: 4 / 3; border-radius: 8px; background: var(--hb-mist); border: 1px solid var(--hb-line); display: grid; place-items: center; overflow: hidden; }
.h3namepic svg { width: 28px; height: 28px; fill: none; stroke: var(--hb-purple); stroke-width: 1.5; }
.h3namepic img { width: 100%; height: 100%; object-fit: contain; }
.cardgrid .h3card .h3tile { aspect-ratio: 16 / 9; }
