/* Apex: the master-prompt room. The room is room.css; this is its bench — the library, the
   brief, the prompt cards and the platform chooser. */
.rail .newbrief { width: 100%; margin-bottom: 10px; }
.library { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.library .libempty { color: var(--mute); font: 400 14px/1.5 var(--serif); padding: 4px 2px; }
.library .entry { display: flex; align-items: stretch; border-radius: 12px; background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 0 0 1px var(--glass-edge); min-width: 0; }
.library .entry[aria-current="true"] { background: var(--neon-soft); box-shadow: inset 0 0 0 1px rgba(184, 153, 90, 0.85); }
.library .open { flex: 1; min-width: 0; display: grid; gap: 5px; padding: 10px; text-align: left; background: none; box-shadow: none; text-transform: none; letter-spacing: 0; }
.library .open b { font: 400 14px/1.25 var(--serif); color: var(--tx); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.library .open small { font: 400 10px/1 var(--mono); color: var(--mute); }
.library .del { flex: none; padding: 0 12px; background: none; box-shadow: none; color: var(--dim); font-size: 15px; }
.library .del:hover { color: var(--n2); }
.easel { display: grid; gap: clamp(12px, 1.8vw, 22px); min-width: 0; }
.files .actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Brief ───────────────────────────────────────────────────────────────────────── */
.brief { display: grid; gap: 14px; margin: 0; }
.field { display: grid; gap: 7px; align-content: start; min-width: 0; }
.field > span, .field > label { font: 500 10px/1 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute); }
.field textarea, .field input { width: 100%; background: rgba(0, 0, 0, 0.32); border: 0; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--glass-edge); color: var(--tx); padding: 12px 14px; font: 400 16px/1.4 var(--serif); }
.field textarea { resize: vertical; min-height: 96px; }
.field textarea:focus, .field input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--n2), 0 0 0 3px rgba(184, 153, 90, 0.18); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sugg { display: flex; flex-wrap: wrap; gap: 5px; }
.sg { padding: 6px 9px; border-radius: 999px; font: 400 10.5px/1 var(--mono); letter-spacing: 0.02em; text-transform: none; color: var(--mute); background: rgba(255, 255, 255, 0.03); }
.sg:hover { color: var(--tx); }
.askrow { display: flex; flex-wrap: wrap; gap: 8px; }
.brief .note { margin: 0; min-height: 1.4em; padding: 0 4px; color: var(--tx2); font: 400 14px/1.45 var(--serif); }
.refining #refine { background: var(--neon); color: #fff; }
@keyframes breathe { 50% { box-shadow: 0 0 26px rgba(201, 165, 96, 0.7); } }

/* ── Prompts ─────────────────────────────────────────────────────────────────────── */
.families { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 13px; background: rgba(0, 0, 0, 0.28); box-shadow: inset 0 0 0 1px var(--glass-edge); width: fit-content; max-width: 100%; }
.fambtn { display: inline-flex; gap: 8px; align-items: baseline; padding: 9px 13px; background: none; box-shadow: none; color: var(--tx2); }
.fambtn small { font: 400 10px/1 var(--mono); color: var(--mute); }
.fambtn[aria-pressed="true"] { background: var(--neon); color: #fff; box-shadow: var(--glow); }
.fambtn[aria-pressed="true"] small { color: rgba(255, 255, 255, 0.8); }
.prompts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.emptybrief { grid-column: 1 / -1; padding: 34px 20px; text-align: center; color: var(--mute); font: 400 15px/1.5 var(--serif); border-radius: 14px; box-shadow: inset 0 0 0 1px var(--glass-edge); }
.emptybrief b { display: block; margin-bottom: 6px; color: var(--tx); }
.emptybrief p { margin: 0; }

.pc { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 12px; border-radius: 15px; min-width: 0; background: rgba(0, 0, 0, 0.26); box-shadow: inset 0 0 0 1px var(--glass-edge); }
.pc::before { content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 1px; background: var(--neon); opacity: 0.55; }
.pc[data-family="design"]::before { background: linear-gradient(90deg, var(--n3), var(--n4)); }
.pc[data-family="video"]::before { background: linear-gradient(90deg, var(--n4), var(--n1)); }
.pc header { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pc .fam, .pc .src { font: 500 9.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; padding: 5px 7px; color: var(--mute); box-shadow: inset 0 0 0 1px var(--glass-edge); }
.pc .src { margin-left: auto; }
.pc .where { margin: -4px 0 0; font: 400 12.5px/1.35 var(--serif); color: var(--mute); }
.ptext { margin: 0; padding: 12px; color: var(--tx); font: 400 12.5px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; user-select: all; max-height: 260px; overflow: auto; scrollbar-width: thin; }
.ptext:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.neg { display: grid; gap: 4px; }
.neg span, .pset dt { font: 500 9.5px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.neg p { margin: 0; font: 400 12px/1.5 var(--mono); color: var(--tx2); word-break: break-word; }
.pset { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; align-items: baseline; }
.pset dd { margin: 0; font: 400 13px/1.35 var(--serif); color: var(--tx2); min-width: 0; }
.pnote { margin: 0; }
.pc footer { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 4px; }
.pc .count { margin-right: auto; font: 400 10px/1 var(--mono); color: var(--dim); font-variant-numeric: tabular-nums; }
.pc footer button { padding: 9px 11px; font-size: 10px; }
.pc .copy { box-shadow: none; }
.pc button.done { background: var(--neon); color: #fff; }

/* ── Platforms ───────────────────────────────────────────────────────────────────── */
.sect.plats { margin-top: 22px; }
.pgroup { padding: 12px 14px; margin-bottom: 8px; border-radius: 14px; background: rgba(0, 0, 0, 0.18); box-shadow: inset 0 0 0 1px var(--glass-edge); }
.pghead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pghead span { font: 500 14px/1 var(--display); letter-spacing: 0.1em; }
.pgall { padding: 6px 9px; font-size: 9.5px; }
.pgroup .chip[aria-pressed="true"] { background: var(--neon); color: #fff; box-shadow: 0 0 16px -2px rgba(201, 165, 96, 0.7); }

@media (max-width: 1180px) {
  .library { display: flex; overflow-x: auto; padding-bottom: 4px; }
  .library .entry { flex: 0 0 220px; }
  .rail .newbrief { width: auto; }
}
@media (max-width: 760px) {
  .fields { grid-template-columns: minmax(0, 1fr); }
  .askrow button { flex: 1 1 auto; }
  .families { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .files .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .files .actions button { padding-inline: 8px; letter-spacing: 0.1em; white-space: nowrap; }
}
