/* AI Experiments page */

.exp-legend { color: var(--muted); font-size: .95rem; max-width: 42rem; margin: 0; }

.exp-filter {
  display: grid; gap: .6rem;
  margin: .5rem 0 2rem;
  padding-block: .6rem;
  background: var(--bg);
}
@media (min-width: 52rem) {
  .exp-filter { position: sticky; top: 4.1rem; z-index: 5; }
}
.chip-row { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.chip-row-label {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); min-width: 5.5rem;
}
@media (max-width: 30rem) { .chip-row-label { min-width: 100%; } }
.exp-card[hidden] { display: none; }
.exp-empty { color: var(--muted); font-style: italic; }
.chip {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 2.5rem;
  padding: .35rem .95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit; font-size: .92rem; font-weight: 500;
  cursor: pointer;
}
.chip:hover { background: var(--surface-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .n { font-family: var(--font-mono); font-size: .75rem; opacity: .7; }

.exp-section { margin-bottom: 3rem; }
.exp-section[hidden] { display: none; }
.exp-section > h2 { display: flex; align-items: baseline; gap: .75rem; margin-bottom: 1.1rem; }
.exp-section > h2 .n { font-family: var(--font-mono); font-size: .85rem; font-weight: 400; color: var(--muted); }

.exp-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  align-items: start;
}

.exp-card { display: flex; flex-direction: column; scroll-margin-top: 8rem; }
.exp-card.is-target { outline: 3px solid var(--accent-bright); outline-offset: 3px; }

.exp-media {
  position: relative; display: block;
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.exp-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: transform .35s ease; }
a.exp-media:hover img { transform: scale(1.03); }

.exp-id {
  position: absolute; top: .6rem; left: .6rem;
  font-family: var(--font-mono); font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  background: rgb(15 15 15 / .75); color: #e9f5c9;
  padding: .2rem .5rem; border-radius: 5px;
}
.exp-status {
  position: absolute; top: .6rem; right: .6rem;
  font-size: .72rem; font-weight: 700;
  padding: .2rem .55rem; border-radius: 999px;
  background: #e6f4c6; color: #2f4a00;
}
.exp-status.archived { background: #ece6da; color: #5b4a2d; }
.exp-status.external { background: #d9eef4; color: #0b4a5a; }

.exp-body { padding: 1.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: .7rem; flex: 1; }
.exp-meta { display: flex; flex-wrap: wrap; gap: .35rem .5rem; align-items: center; font-size: .85rem; color: var(--muted); }
.exp-meta time { font-family: var(--font-mono); font-size: .78rem; }
.exp-body h3 { font-size: 1.22rem; margin: 0; }
.exp-summary { margin: 0; color: var(--ink); }

.exp-models { margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.exp-models div { display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; border: 1px solid var(--line); border-radius: 999px; padding: .15rem .6rem; }
.exp-models dt { color: var(--muted); font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.exp-models dd { margin: 0; font-weight: 600; }

.exp-note { margin: 0; font-size: .85rem; color: var(--muted); padding-left: .75rem; border-left: 3px solid var(--line); }

.exp-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: auto; padding-top: .25rem; }
.exp-actions .btn { min-height: 2.5rem; font-size: .9rem; }
.exp-archived-note { font-size: .88rem; color: var(--muted); font-style: italic; margin: 0; }

.exp-story { border-top: 1px dashed var(--line); padding-top: .6rem; }
.exp-story summary {
  cursor: pointer;
  font-weight: 600; font-size: .92rem;
  color: var(--accent-2);
  list-style: none;
  display: inline-flex; align-items: center; gap: .4rem;
  min-height: 2rem;
}
.exp-story summary::-webkit-details-marker { display: none; }
.exp-story summary::before {
  content: "+"; display: inline-grid; place-items: center;
  width: 1.2rem; height: 1.2rem; border-radius: 4px;
  border: 1px solid currentColor; font-family: var(--font-mono); font-size: .85rem; line-height: 1;
}
.exp-story[open] summary::before { content: "\2212"; }
.exp-story-body { padding-top: .5rem; font-size: .96rem; }
.exp-story-body p:last-child { margin-bottom: 0; }

/* Screenshot viewer */
.shot-dialog {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgb(8 9 8 / .94); color: #f2f2ee;
}
.shot-dialog[open] { display: flex; flex-direction: column; }
.shot-dialog::backdrop { background: rgb(8 9 8 / .7); }
.shot-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem clamp(1rem, 4vw, 2rem);
  padding-top: calc(.75rem + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid rgb(255 255 255 / .1);
}
.shot-title { margin: 0; font-weight: 600; }
.shot-close {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 2.75rem; padding: 0 1rem;
  border-radius: 999px; border: 1px solid rgb(255 255 255 / .25);
  background: rgb(30 30 30 / .7); color: #fff;
  font: inherit; font-weight: 600; cursor: pointer;
}
.shot-close:hover { background: rgb(70 70 70 / .85); }
.shot-close svg { width: 1.1rem; height: 1.1rem; }
.shot-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: clamp(.5rem, 3vw, 2rem); cursor: zoom-out; }
.shot-stage img { max-width: 100%; max-height: 100%; border-radius: 6px; box-shadow: 0 10px 40px rgb(0 0 0 / .5); cursor: default; }
