/* Standalone ASCII Studio page. The studio mounts its own scoped styles
   (.asx-*, incl. the webcam .asx-cam UI reached via its 📷 Camera button);
   this only styles the page shell. */
:root { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: #0a0a0a; color: #ddd;
  font: 14px system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }

.top { flex: 0 0 auto; display: flex; align-items: center; gap: 16px; padding: 8px 16px; border-bottom: 1px solid #222; }
.top h1 { font-size: 16px; margin: 0; font-weight: 600; }

main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.drop { flex: 0 0 auto; padding: 6px 16px; border-bottom: 1px solid #222; color: #aaa; }
.drop p { margin: 0; }
.drop.over { background: #15203a; }
.link { background: none; border: none; color: #6ab0ff; cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }
.studio-host { flex: 1; min-height: 0; }

.sample-dialog { width: min(860px, calc(100vw - 32px)); max-height: min(760px, calc(100dvh - 32px)); padding: 0;
  border: 1px solid #343434; border-radius: 10px; background: #111; color: #ddd; box-shadow: 0 24px 72px #000c; }
.sample-dialog::backdrop { background: #000b; }
.sample-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 14px 16px; border-bottom: 1px solid #2a2a2a; background: #111; }
.sample-head h2 { margin: 0; font-size: 17px; }
.sample-head p { margin: 4px 0 0; color: #999; font-size: 12px; }
.sample-close { width: 34px; height: 34px; border: 1px solid #3b3b3b; border-radius: 6px; background: #1b1b1b; color: #ddd; cursor: pointer; }
.sample-error { min-height: 20px; padding: 8px 16px 0; color: #ff9a9a; }
.sample-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 12px 16px 18px; overflow: auto; }
.sample-card { min-width: 0; padding: 8px; border: 1px solid #333; border-radius: 8px; background: #191919; color: #ddd; cursor: pointer; text-align: left; }
.sample-card:hover, .sample-card:focus-visible { border-color: #6ab0ff; outline: none; background: #202838; }
.sample-card:disabled { cursor: wait; opacity: .65; }
.sample-card img { display: block; width: 100%; height: 112px; object-fit: contain; border-radius: 5px; background: #080808; }
.sample-card span { display: block; margin-top: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }

@media (max-width: 620px) {
  .top { padding: 6px 10px; }
  .drop { padding: 6px 10px; }
  .sample-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 10px; }
  .sample-card img { height: 92px; }
}
