/* ==========================================================
   Streamers: create, streamer page, gallery, admin
   ========================================================== */

.page { padding: 112px 0 var(--section); min-height: 100svh; }
.page__head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px 64px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.nav--solid { background: rgba(0,0,0,.82); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom-color: var(--line); }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--panel); font-size: 15px; color: var(--soft); }
.notice b { color: var(--white); }
.notice + .form { margin-top: 24px; }
.notice--go { border-color: rgba(48,209,88,.35); background: rgba(48,209,88,.08); }
.notice--warn { border-color: rgba(255,179,64,.35); background: rgba(255,179,64,.08); }
.notice .dot { margin-top: 7px; }
.dot--warn { background: var(--warn); }

/* ---------- Create ---------- */
.create { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
.preview { position: sticky; top: 100px; }
.preview__frame { position: relative; aspect-ratio: 4 / 5; border-radius: 24px; overflow: hidden; background: #0b0a0a; border: 1px solid var(--line-strong); }
.preview__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.preview__empty { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 12px; text-align: center; color: var(--dim); font-size: 15px; padding: 24px; }
.preview__empty svg { width: 44px; height: 44px; color: var(--soft); }
.preview__shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,0) 45%), linear-gradient(180deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,0) 20%); pointer-events: none; }
.preview__pill { position: absolute; left: 16px; top: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.6); font-size: 13px; font-weight: 600; }
.preview__pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--go); }
.preview__meta { position: absolute; left: 20px; right: 20px; bottom: 20px; }
.preview__name { font-family: var(--display); font-weight: 700; letter-spacing: -.025em; font-size: clamp(34px, 3.4vw, 46px); line-height: 1; color: var(--white); overflow-wrap: anywhere; }
.preview__ticker { margin-top: 6px; font-family: var(--mono); font-size: 15px; color: var(--soft); }
.preview__tag { margin-top: 6px; font-size: 15px; color: var(--soft); }
.preview__cap { margin-top: 14px; font-weight: 500; font-size: 17px; line-height: 1.4; }
.preview__cap span { background: rgba(0,0,0,.8); padding: .06em .32em .1em; border-radius: 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.preview__tips { margin-top: 18px; display: grid; gap: 8px; font-size: 14px; color: var(--soft); list-style: none; padding: 0; }
.preview__tips li { display: flex; gap: 10px; }
.preview__tips li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); margin-top: 8px; flex: none; }

.form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field__label { font-size: 15px; font-weight: 600; color: var(--white); display: flex; justify-content: space-between; gap: 12px; }
.field__label span { font-weight: 400; color: var(--dim); }
.field__hint { font-size: 14px; color: var(--dim); }
.input, .textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--white);
  font: 400 16px/1.45 var(--sans);
  padding: 13px 14px;
  outline: none;
  transition: border-color .2s ease;
}
.input:focus, .textarea:focus { border-color: rgba(255,255,255,.55); }
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.textarea { min-height: 120px; resize: vertical; }
.input--mono { font-family: var(--mono); font-size: 15px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.drop {
  position: relative;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  padding: 28px 20px;
  border-radius: 16px;
  border: 1.5px dashed var(--line-strong);
  background: var(--panel);
  color: var(--soft);
  font-size: 15px;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.drop:hover, .drop.is-over { border-color: var(--white); background: var(--panel-2); }
.drop b { color: var(--white); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop.has-file { border-style: solid; border-color: rgba(48,209,88,.5); }

.seg { display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-strong); width: fit-content; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: 9px 16px; border-radius: 9px; font-size: 15px; font-weight: 600; color: var(--soft); cursor: pointer; }
.seg input:checked + span { background: var(--white); color: #000; }
.seg input:focus-visible + span { outline: 2px solid var(--white); outline-offset: 2px; }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--soft); cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--go); flex: none; }
.form__error { color: var(--stop); font-size: 15px; min-height: 1.4em; }
.form .btn { width: fit-content; }

.done { display: grid; gap: 20px; padding: 28px; border-radius: 22px; border: 1px solid rgba(48,209,88,.35); background: rgba(48,209,88,.06); }
.done h2 { font-family: var(--display); font-weight: 650; letter-spacing: -.025em; font-size: clamp(32px, 3.6vw, 48px); line-height: 1.05; color: var(--white); }
.done p { color: var(--soft); }
.linkbox { display: flex; gap: 8px; align-items: center; padding: 6px 6px 6px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: #0b0a0a; }
.linkbox code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 14px; color: var(--white); }
.done__btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Streamer page ---------- */
.sp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 24px; align-items: start; }
.stage {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 24px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line-strong);
}
.stage__bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(40px) brightness(.45) saturate(1.1); transform: scale(1.1); }
.stage__img { position: absolute; inset: 0; margin: auto; height: 100%; max-width: 100%; object-fit: contain; }
.stage__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; opacity: 0; transition: opacity .4s ease; }
.stage.is-live .stage__video { opacity: 1; }
.stage__shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,0) 38%), linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 18%); pointer-events: none; }
.stage__top { position: absolute; left: 18px; right: 18px; top: 16px; display: flex; align-items: center; gap: 10px; }
.lpill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: rgba(0,0,0,.6); font-size: 13px; font-weight: 700; color: var(--white); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lpill i { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.lpill--ready i { background: var(--go); }
.lpill--live { background: var(--stop); }
.lpill--live i { background: #fff; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }
.stage__timer { margin-left: auto; font-family: var(--mono); font-size: 14px; color: var(--white); background: rgba(0,0,0,.55); padding: 6px 10px; border-radius: 8px; }
.stage__bottom { position: absolute; left: 20px; right: 20px; bottom: 18px; display: grid; gap: 14px; justify-items: center; text-align: center; }
.stage__cap { font-weight: 500; font-size: clamp(18px, 1.8vw, 24px); line-height: 1.42; min-height: 1.5em; max-width: 900px; text-wrap: balance; }
.stage__cap span { background: rgba(0,0,0,.82); padding: .06em .32em .1em; border-radius: 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.stage__controls { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.stage__say { display: none; gap: 8px; width: min(100%, 560px); padding: 5px; border-radius: 999px; background: rgba(20,19,18,.85); border: 1px solid var(--line-strong); }
.stage.is-live .stage__say { display: flex; }
.stage__say input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--white); font: 400 16px/1 var(--sans); padding: 0 14px; outline: none; }

.side { display: grid; gap: 16px; }
.card { border-radius: 20px; border: 1px solid var(--line); background: var(--panel); padding: 22px; }
.card h1 { font-family: var(--display); font-weight: 700; letter-spacing: -.025em; font-size: clamp(38px, 3.6vw, 52px); line-height: 1; color: var(--white); overflow-wrap: anywhere; }
.card__ticker { margin-top: 8px; font-family: var(--mono); font-size: 15px; color: var(--soft); display: flex; flex-wrap: wrap; gap: 8px 14px; }
.card__tag { margin-top: 14px; font-size: 17px; color: var(--text); }
.card__persona { margin-top: 12px; font-size: 15px; color: var(--soft); line-height: 1.55; white-space: pre-line; }
.card h2 { font-size: 15px; font-weight: 600; color: var(--soft); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.linkbtn { background: none; border: 0; color: var(--soft); font: 500 14px/1 var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 0; }
.linkbtn:hover { color: var(--white); }
.card__report { margin-top: 12px; }
.card__fine { margin-bottom: 16px; }
.sp__banner { margin-bottom: 20px; }
.btn--stop { background: var(--stop); color: #fff; }
.btn--stop:hover { background: #ff6259; }
.official { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #000; background: var(--white); padding: 4px 8px; border-radius: 6px; vertical-align: 6px; margin-left: 10px; font-family: var(--sans); }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.tile { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; background: #0b0a0a; border: 1px solid var(--line); text-decoration: none; color: var(--white); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover img { transform: scale(1.04); }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,0) 50%); }
.tile__meta { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; }
.tile__name { font-family: var(--display); font-weight: 650; letter-spacing: -.025em; font-size: 28px; line-height: 1.05; }
.tile__line { margin-top: 6px; font-size: 14px; line-height: 1.4; color: var(--soft); }
.tile__line b { display: block; font-family: var(--mono); font-weight: 500; color: var(--white); margin-bottom: 2px; }
.tile__line span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* More streamers under the stage */
.more { margin-top: 28px; }
.more__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 14px; }
.more__head h2 { font-size: 17px; font-weight: 600; color: var(--white); }
.more__head a { font-size: 15px; color: var(--soft); }
.more__head a:hover { color: var(--white); }
.more__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.more__row .tile { border-radius: 16px; }
.more__row .tile__name { font-size: 22px; }
.more__row .tile__line span { display: none; }
.more__row .tile--new span { font-size: 19px; }
.more__row .tile--new em { display: none; }
.more__row .tile--new svg { width: 30px; height: 30px; }
.tile__pill { position: absolute; left: 14px; top: 14px; z-index: 1; }
.tile--new { display: grid; place-items: center; align-content: center; gap: 12px; text-align: center; border-style: dashed; border-color: var(--line-strong); background: var(--panel); padding: 20px; }
.tile--new::after { display: none; }
.tile--new span { font-family: var(--display); font-weight: 650; letter-spacing: -.025em; font-size: 26px; }
.tile--new em { font-style: normal; font-size: 14px; color: var(--soft); }
.tile--new svg { width: 40px; height: 40px; color: var(--go); }

/* ---------- Admin ---------- */
.admin-filter { margin-bottom: 20px; }
.admin-list { display: grid; gap: 14px; }
.gallery + .fine { margin-top: 24px; }
.admin-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 18px; align-items: start; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.admin-row img { width: 120px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; background: #111; }
.admin-row h3 { font-size: 18px; color: var(--white); }
.admin-row p { font-size: 14px; color: var(--soft); margin-top: 4px; white-space: pre-line; }
.admin-row__btns { display: grid; gap: 8px; }

@media (max-width: 1000px) {
  .create, .sp, .page__head { grid-template-columns: 1fr; }
  .preview { position: static; max-width: 420px; }
  .sp__main { display: contents; }
  .side { order: 2; }
  .more { order: 3; margin-top: 0; }
}
@media (max-width: 640px) {
  .page { padding-top: 92px; }
  .row2 { grid-template-columns: 1fr; }
  .stage { aspect-ratio: 3 / 4; border-radius: 18px; }
  .stage__video { object-fit: cover; }
  .stage__bottom { left: 12px; right: 12px; bottom: 12px; gap: 10px; }
  .stage__cap { font-size: 16px; }
  .stage__controls { flex-wrap: nowrap; gap: 8px; }
  .stage__controls .btn { height: 44px; padding: 0 14px; font-size: 15px; }
  .stage__controls .btn svg { width: 16px; height: 16px; }
  .more__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-row { grid-template-columns: 80px minmax(0, 1fr); }
  .admin-row img { width: 80px; }
  .admin-row__btns { grid-column: 1 / -1; grid-auto-flow: column; }
}

/* ==========================================================
   Agents: personality lab, post card, launch wizard, studio
   ========================================================== */

/* ---------- Personality lab ---------- */
.lab { display: grid; gap: 26px; }
.lab__group { display: grid; gap: 12px; }
.lab__label { font-size: 15px; font-weight: 600; color: var(--white); }
.lab__label span { font-weight: 400; color: var(--dim); margin-left: 6px; }
.lab__arch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.arch { position: relative; display: block; cursor: pointer; }
.arch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.arch__body { display: grid; gap: 6px; height: 100%; padding: 14px 14px 16px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--panel); transition: border-color .2s ease, background .2s ease; }
.arch__body b { font-family: var(--display); font-weight: 650; letter-spacing: -.015em; font-size: 22px; line-height: 1.05; color: var(--white); }
.arch__line { font-size: 13px; line-height: 1.4; color: var(--soft); }
.arch:hover .arch__body { border-color: rgba(255,255,255,.4); }
.arch input:checked + .arch__body { border-color: var(--go); background: rgba(48,209,88,.08); box-shadow: inset 0 0 0 1px var(--go); }
.arch input:focus-visible + .arch__body { outline: 2px solid var(--white); outline-offset: 2px; }

.lab__sliders { display: grid; gap: 18px; }
.slider { display: grid; gap: 8px; }
.slider__top { display: flex; justify-content: space-between; font-size: 15px; font-weight: 600; color: var(--white); }
.slider__top output { font: 500 14px/1 var(--mono); color: var(--go); }
.slider__ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); }
.slider input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--go) 0 var(--v, 50%), rgba(255,255,255,.14) var(--v, 50%) 100%); outline: none; }
.slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--white); border: 0; box-shadow: 0 2px 10px rgba(0,0,0,.5); cursor: pointer; }
.slider input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--white); border: 0; cursor: pointer; }
.slider input[type=range]:focus-visible { outline: 2px solid var(--white); outline-offset: 6px; }

.lab__topics { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 14px; font-weight: 600; color: var(--soft); cursor: pointer; transition: all .15s ease; }
.chip input:checked + span { background: var(--white); border-color: var(--white); color: #000; }
.chip input:disabled + span { opacity: .4; cursor: not-allowed; }
.chip input:focus-visible + span { outline: 2px solid var(--white); outline-offset: 2px; }
.lab__row { grid-template-columns: 1fr 1fr; gap: 16px; }

.traits { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.traits li { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 8px; background: rgba(255,255,255,.07); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text); }
.traits li:first-child { background: rgba(48,209,88,.14); border-color: rgba(48,209,88,.35); color: var(--white); }

/* ---------- X post card ---------- */
.xlogo { display: inline-flex; width: 16px; height: 16px; color: currentColor; flex: none; }
.xlogo svg { width: 100%; height: 100%; }
.post { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 16px; border-radius: 18px; background: #000; border: 1px solid var(--line-strong); }
.post__avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; background: #222; }
.post__head { display: flex; align-items: center; gap: 6px; font-size: 15px; min-width: 0; }
.post__head b { color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post__badge { flex: none; font-size: 10px; font-weight: 700; padding: 2px 5px; border-radius: 4px; background: rgba(255,255,255,.12); color: var(--soft); }
.post__handle { color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.post__head .xlogo { margin-left: auto; color: var(--soft); width: 15px; height: 15px; }
.post__text { margin-top: 4px; font-size: 16px; line-height: 1.45; color: var(--white); white-space: pre-wrap; overflow-wrap: anywhere; }
.post__label { margin-top: 10px; font-size: 12px; color: var(--dim); }
.post__sig { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--go); }
.post__sig svg { width: 16px; height: 16px; flex: none; }

/* ---------- Launch wizard ---------- */
.page--launch { padding-top: 104px; }
.launch__form { min-width: 0; }
.launch { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: clamp(32px, 5vw, 72px); align-items: start; }
.launch__title { font-family: var(--display); font-weight: 700; font-size: clamp(48px, 5.6vw, 84px); line-height: 1; letter-spacing: -.035em; color: var(--white); }
.launch__lede { margin-top: 16px; }
.stepper { list-style: none; padding: 0; margin: 34px 0 26px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.stepper button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--soft); font: 600 14px/1 var(--sans); cursor: pointer; text-align: left; }
.stepper button span { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.1); font: 600 12px/1 var(--mono); color: var(--white); }
.stepper button[aria-current="step"] { border-color: var(--white); color: var(--white); background: var(--panel-2); }
.stepper button[aria-current="step"] span { background: var(--white); color: #000; }
.stepper button.is-done span { background: var(--go); color: #000; }
.stepper button:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.step { border: 0; padding: 0; margin: 0; display: grid; gap: 22px; min-width: 0; }
.step__title { font-family: var(--display); font-weight: 650; letter-spacing: -.025em; font-size: clamp(30px, 3vw, 40px); line-height: 1.05; color: var(--white); padding: 0; margin-bottom: 2px; }
.form__nav { display: flex; gap: 10px; flex-wrap: wrap; }
.inline { display: flex; gap: 10px; }
.inline .input { flex: 1; min-width: 0; }
.voices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.vcard { position: relative; cursor: pointer; }
.vcard input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.vcard span { display: grid; gap: 4px; padding: 18px 16px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--panel); }
.vcard b { font-size: 18px; color: var(--white); }
.vcard em { font-style: normal; font-size: 13px; color: var(--soft); }
.vcard input:checked + span { border-color: var(--go); box-shadow: inset 0 0 0 1px var(--go); background: rgba(48,209,88,.08); }
.vcard input:focus-visible + span { outline: 2px solid var(--white); outline-offset: 2px; }
.coinread { padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.checklist li { display: flex; gap: 12px; align-items: center; padding: 14px 16px; font-size: 15px; color: var(--soft); }
.checklist li + li { border-top: 1px solid var(--line); }
.checklist b { color: var(--white); font-weight: 600; }

.launch__preview { position: sticky; top: 96px; display: grid; gap: 14px; }
.launch__label { font-size: 14px; font-weight: 600; color: var(--soft); margin-top: 6px; }
.pcard { border-radius: 24px; overflow: hidden; border: 1px solid var(--line-strong); background: var(--panel); }
.pcard__media { position: relative; aspect-ratio: 4 / 4.2; background: #0b0a0a; }
.pcard__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.pcard__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,0) 42%); pointer-events: none; }
.pcard__empty { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--dim); font-size: 15px; }
.pcard__empty svg { width: 40px; height: 40px; color: var(--soft); }
.pcard__pill { position: absolute; z-index: 1; left: 14px; top: 14px; display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; background: rgba(0,0,0,.6); font-size: 13px; font-weight: 600; }
.pcard__pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--go); }
.pcard__cap { position: absolute; z-index: 1; left: 16px; right: 16px; bottom: 14px; text-align: center; font-size: 16px; font-weight: 500; line-height: 1.42; text-wrap: balance; }
.pcard__cap span { background: rgba(0,0,0,.82); padding: .06em .3em .1em; border-radius: 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.pcard__info { padding: 18px 20px 20px; }
.pcard__name { font-family: var(--display); font-weight: 700; letter-spacing: -.025em; font-size: 34px; line-height: 1; color: var(--white); overflow-wrap: anywhere; }
.pcard__ticker { font-family: var(--mono); font-size: 15px; color: var(--soft); vertical-align: 6px; margin-left: 6px; }
.pcard__tag { margin-top: 8px; font-size: 15px; color: var(--soft); }
.pcard .traits { margin-top: 12px; }

/* ---------- Studio ---------- */
.page--studio { padding-top: 100px; }
.studio { display: grid; gap: 22px; }
.studio__flash { margin: 0; }
.studio__head { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 22px; align-items: center; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.studio__avatar { width: 96px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; border-radius: 16px; background: #111; }
.studio__name { font-family: var(--display); font-weight: 700; letter-spacing: -.025em; font-size: clamp(40px, 4.4vw, 64px); line-height: 1; color: var(--white); }
.studio__meta { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 15px; color: var(--soft); }
.studio__meta .lpill { background: var(--panel-2); }
.studio__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.studio__tabs { position: sticky; top: 72px; z-index: 5; display: flex; gap: 4px; padding: 8px 0; background: rgba(0,0,0,.86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); overflow-x: auto; }
.studio__tabs a { flex: none; padding: 9px 14px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--soft); text-decoration: none; }
.studio__tabs a:hover { color: var(--white); background: var(--panel); }
.sblock { scroll-margin-top: 140px; padding: 28px; border-radius: 24px; border: 1px solid var(--line); background: var(--panel); display: grid; gap: 22px; }
.sblock__head { display: grid; gap: 6px; }
.sblock__title { font-family: var(--display); font-weight: 650; letter-spacing: -.025em; font-size: clamp(30px, 3vw, 40px); line-height: 1.05; color: var(--white); }
.sblock__lede { font-size: 16px; color: var(--soft); max-width: 60ch; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { padding: 16px 18px; border-radius: 16px; background: #000; border: 1px solid var(--line); }
.stat__k { font-size: 13px; color: var(--dim); }
.stat__v { margin-top: 6px; font-size: 20px; font-weight: 700; color: var(--white); overflow-wrap: anywhere; }
.stat__t { margin-top: 4px; font-size: 14px; color: var(--soft); }
.xcard { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 22px; border-radius: 18px; background: #000; border: 1px solid var(--line-strong); }
.xcard--on { grid-template-columns: 1fr; gap: 18px; }
.xcard__title { font-size: 19px; font-weight: 700; color: var(--white); }
.xcard__text { margin-top: 6px; font-size: 15px; color: var(--soft); max-width: 62ch; }
.xcard__list { margin: 10px 0 0; padding-left: 18px; font-size: 14px; color: var(--soft); display: grid; gap: 4px; }
.xcard__who { display: flex; align-items: center; gap: 10px; font-size: 18px; color: var(--white); }
.xcard__who .xlogo { width: 18px; height: 18px; }
.xcard__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.xcard__row .field__label { margin: 0; }
.select { width: auto; padding-right: 36px; }
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mode { position: relative; cursor: pointer; }
.mode input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.mode span { display: grid; gap: 4px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--panel); }
.mode b { font-size: 16px; color: var(--white); }
.mode em { font-style: normal; font-size: 13px; color: var(--soft); }
.mode input:checked + span { border-color: var(--go); box-shadow: inset 0 0 0 1px var(--go); background: rgba(48,209,88,.08); }
.mode input:focus-visible + span { outline: 2px solid var(--white); outline-offset: 2px; }
.btn .xlogo { width: 15px; height: 15px; }
.queue { display: grid; gap: 14px; }
.queue__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.queue h3 { font-size: 18px; font-weight: 700; color: var(--white); }
.queue__sub { margin-top: 10px; }
.queue__list { display: grid; gap: 10px; }
.draft { display: grid; gap: 10px; padding: 16px; border-radius: 16px; background: #000; border: 1px solid var(--line); }
.draft--failed { border-color: rgba(255,69,58,.45); }
.draft__meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--dim); }
.draft__text { min-height: 92px; }
.draft__count { justify-self: end; font: 500 12px/1 var(--mono); color: var(--dim); margin-top: -4px; }
.draft__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.draft__posted { font-size: 16px; color: var(--white); line-height: 1.45; }

/* ---------- Agent page: X feed ---------- */
.xfeed h2 .xlogo { width: 15px; height: 15px; color: var(--white); }
.xfeed__post { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.xfeed__post:first-child { border-top: 0; padding-top: 0; }
.xfeed__post p { font-size: 15px; line-height: 1.45; color: var(--white); }
.xfeed__post span { font-size: 13px; color: var(--dim); }
a.xfeed__post:hover p { text-decoration: underline; text-underline-offset: 3px; }
.xfeed__follow { margin-top: 12px; }

/* ---------- Directory ---------- */
.dirbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 22px; }
.dirbar__filters { max-width: 100%; overflow-x: auto; }
.dirbar__search { flex: 1 1 260px; max-width: 360px; }
.tile__tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.tile__tags span { font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px; background: rgba(255,255,255,.14); color: var(--white); }
.tile__tags span.is-x { background: var(--white); color: #000; }

@media (max-width: 1000px) {
  .launch { grid-template-columns: minmax(0, 1fr); }
  .launch__preview { position: static; max-width: 460px; }
  .launch__preview .pcard__media { aspect-ratio: 16 / 10; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio__head { grid-template-columns: 72px minmax(0, 1fr); }
  .studio__avatar { width: 72px; }
  .studio__actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 640px) {
  .lab__arch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lab__row { grid-template-columns: 1fr; }
  .stepper { grid-template-columns: repeat(5, auto); overflow-x: auto; }
  .stepper button { white-space: nowrap; font-size: 13px; padding: 10px; }
  .voices, .modes { grid-template-columns: 1fr; }
  .inline { flex-direction: column; }
  .stats { grid-template-columns: 1fr; }
  .sblock { padding: 18px; border-radius: 18px; }
  .xcard { grid-template-columns: 1fr; }
  .studio__tabs { top: 64px; }
}
.step > legend + * { margin-top: 18px; }

/* ==========================================================
   Agent page v2: profile header, cinematic stage, three panels
   ========================================================== */
.page--agent { padding-top: 100px; }
.ahead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 28px; margin-bottom: 22px; }
.ahead__id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.ahead__avatar { flex: none; width: 76px; height: 76px; border-radius: 50%; overflow: hidden; background: #161513; box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--go); }
.ahead__avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.ahead__names { min-width: 0; }
.ahead h1 { font-family: var(--display); font-weight: 700; font-size: clamp(44px, 4.8vw, 76px); line-height: 1; letter-spacing: -.035em; color: var(--white); overflow-wrap: anywhere; }
.ahead h1 .official { vertical-align: 14px; }
.ahead .card__ticker { margin-top: 6px; }
.ahead__tag { justify-self: start; max-width: 44ch; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.5; color: var(--soft); padding-left: 28px; border-left: 1px solid var(--line-strong); }
.ahead__tag:empty { display: none; }
.ahead__actions { margin: 0; justify-content: flex-end; }
.ahead__actions .xlogo { width: 14px; height: 14px; }

.page--agent .stage { aspect-ratio: auto; height: clamp(460px, calc(100svh - 250px), 740px); border-radius: 28px; box-shadow: 0 60px 140px rgba(0,0,0,.6); }
.page--agent .stage__bg { filter: blur(48px) brightness(.4) saturate(1.2); }
.stage__fine { margin-top: 12px; font-size: 14px; color: var(--dim); text-align: center; }

.apanels { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.apanel { border-radius: 24px; border: 1px solid var(--line); background: var(--panel); padding: 24px; display: grid; gap: 16px; align-content: start; min-width: 0; }
.apanel h2 { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; color: var(--soft); }
.apanel h2 .xlogo { width: 15px; height: 15px; color: var(--white); }
.apanel__arch { font-family: var(--display); font-weight: 700; letter-spacing: -.025em; font-size: 40px; line-height: 1; color: var(--white); }
.dials { display: grid; gap: 14px; }
.dial__top { display: flex; justify-content: space-between; font-size: 15px; color: var(--white); font-weight: 600; }
.dial__top b { font: 500 14px/1 var(--mono); color: var(--go); }
.dial__bar { margin-top: 8px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.dial__bar i { display: block; height: 100%; border-radius: 3px; background: var(--go); }
.dial__ends { margin-top: 6px; display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); }
.apanel .traits { margin: 0; }
.apanel .traits:empty { display: none; }
.apanel .traits li:first-child { background: rgba(255,255,255,.07); border-color: var(--line); color: var(--text); }
.apanel__quote { font-family: var(--display); font-weight: 650; letter-spacing: -.015em; font-size: 24px; line-height: 1.2; color: var(--white); padding-top: 14px; border-top: 1px solid var(--line); }
.apanel .card__persona { margin: 0; }
.apanel .card__persona:empty { display: none; }

.xfeed__body { display: grid; gap: 0; }
.xfeed__body > .fine { padding: 18px; border-radius: 16px; border: 1px dashed var(--line-strong); text-align: center; }
.page--agent .xfeed__post { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.page--agent .xfeed__post:first-child { border-top: 0; padding-top: 2px; }
.xfeed__av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; }
.xfeed__head { display: flex; gap: 6px; align-items: baseline; min-width: 0; font-size: 14px; }
.xfeed__head b { color: var(--white); }
.xfeed__head span { color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page--agent .xfeed__post p.xfeed__text { margin-top: 3px; font-size: 15px; line-height: 1.45; color: var(--white); }
.page--agent a.xfeed__post:hover .xfeed__text { text-decoration: underline; text-decoration-color: var(--line-strong); }

.apanel--vera { position: relative; overflow: hidden; }
.apanel__vera { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 22%; border-radius: 16px; }
.apanel__lead { font-size: 15px; line-height: 1.5; color: var(--soft); }
.apanel .btn { justify-self: start; }
.areport { margin-top: 14px; text-align: right; }
.page--agent .more { margin-top: clamp(48px, 6vw, 80px); }
.page--agent .more__head h2 { font-family: var(--display); font-weight: 650; letter-spacing: -.025em; font-size: clamp(30px, 3vw, 44px); line-height: 1; }

@media (max-width: 1080px) {
  .ahead { grid-template-columns: minmax(0, 1fr) auto; }
  .ahead__tag { grid-column: 1 / -1; grid-row: 2; padding-left: 0; border-left: 0; }
  .apanels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .page--agent { padding-top: 84px; }
  .ahead { grid-template-columns: 1fr; gap: 14px; }
  .ahead__avatar { width: 56px; height: 56px; }
  .ahead h1 { font-size: clamp(40px, 11vw, 52px); }
  .ahead h1 .official { vertical-align: 8px; margin-left: 6px; }
  .ahead__actions { justify-content: flex-start; }
  .page--agent .stage { height: auto; aspect-ratio: 3 / 4; border-radius: 20px; }
  .apanels { grid-template-columns: 1fr; }
  .apanel { padding: 18px; border-radius: 20px; }
  .areport { text-align: left; }
}

/* ==========================================================
   Studio v2: sticky sidebar with the agent, content on the right
   ========================================================== */
.studio:not([hidden]) { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 28px; align-items: start; }
.studio > .studio__flash, .studio > .notice { grid-column: 1 / -1; }
.studio__side { position: sticky; top: 92px; display: grid; gap: 22px; }
.studio__side .studio__head { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 0; border: 0; }
.studio__side .studio__avatar { display: block; width: 100%; aspect-ratio: 4 / 4.2; border-radius: 22px; overflow: hidden; background: #111; box-shadow: inset 0 0 0 1px var(--line); }
.studio__side .studio__avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.studio__side .studio__name { font-size: clamp(40px, 3.4vw, 52px); }
.studio__side .studio__meta { margin-top: 10px; }
.studio__summary { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--soft); }
.studio__side .studio__tabs { position: static; display: grid; gap: 2px; padding: 8px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); overflow: visible; -webkit-backdrop-filter: none; backdrop-filter: none; }
.studio__side .studio__tabs a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-size: 15px; }
.studio__tabs svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.studio__side .studio__tabs a[aria-current="true"] { background: rgba(255,255,255,.08); color: var(--white); }
.studio__side .studio__tabs a[aria-current="true"] svg { color: var(--go); }
.studio__side .studio__actions { justify-content: flex-start; }
.studio__main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }
.studio__main .sblock { scroll-margin-top: 96px; }

@media (max-width: 1000px) {
  .studio:not([hidden]) { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 14px; }
  .studio__side { position: static; }
  .studio__side .studio__head { grid-template-columns: 88px minmax(0, 1fr); align-items: center; }
  .studio__side .studio__avatar { aspect-ratio: 4 / 5; border-radius: 16px; }
  .studio__side .studio__tabs { position: sticky; top: 64px; z-index: 5; display: flex; overflow-x: auto; padding: 6px; background: rgba(18,17,16,.92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .studio__side .studio__tabs a { flex: none; padding: 9px 12px; }
  .studio__main .sblock { scroll-margin-top: 140px; }
}
@media (max-width: 1000px) {
  .studio__side { display: contents; }
  .studio__side .studio__head { order: 0; }
  .studio__side .studio__actions { order: 1; }
  .studio__side .studio__tabs { order: 2; }
  .studio__main { order: 3; }
}

/* ==========================================================
   Post-quantum identity: agent page panel, signed posts, verifier
   ========================================================== */
.pqid { margin-top: 14px; display: grid; grid-template-columns: 52px minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 16px 24px; align-items: center; padding: 20px 24px; border-radius: 24px; border: 1px solid var(--line); background: var(--panel); }
.pqid__seal { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.05); color: var(--dim); }
.pqid__seal svg { width: 30px; height: 30px; }
.pqid.is-good { border-color: rgba(48,209,88,.4); }
.pqid.is-good .pqid__seal { background: rgba(48,209,88,.12); color: var(--go); }
.pqid.is-bad { border-color: rgba(255,69,58,.5); }
.pqid.is-bad .pqid__seal { color: var(--stop); }
.pqid h2 { font-size: 16px; font-weight: 700; color: var(--white); }
.pqid__state { margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--soft); }
.pqid__keys { margin: 0; display: grid; gap: 10px; }
.pqid__keys dt { font-size: 12px; color: var(--dim); }
.pqid__keys dd { margin: 2px 0 0; font: 500 13px/1.3 var(--mono); color: var(--white); }
.pqid__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.xfeed__signed { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid rgba(48,209,88,.35); background: rgba(48,209,88,.08); color: var(--go); font: 700 12px/1 var(--sans); cursor: pointer; }
.xfeed__signed::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.xfeed__signed.is-bad { color: var(--stop); border-color: rgba(255,69,58,.4); background: rgba(255,69,58,.08); }
.xfeed__link { color: var(--dim); text-decoration: none; }
.xfeed__link:hover { color: var(--white); text-decoration: underline; }

.page--verify { padding-top: 120px; }
.vfy { max-width: 820px; }
.vfy__head .lede { margin-top: 18px; }
.vfy__form { margin-top: 36px; display: grid; gap: 10px; }
.vfy__input { min-height: 130px; resize: vertical; font-size: 17px; line-height: 1.5; padding: 14px 16px; }
.vfy__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.vfy__hint { font-size: 14px; color: var(--dim); }
.vfy__result { margin-top: 24px; display: grid; gap: 16px; justify-items: start; padding: 22px; border-radius: 22px; border: 1px solid var(--line-strong); background: var(--panel); font-size: 16px; color: var(--soft); }
.vfy__result h2 { font-size: 20px; font-weight: 700; color: var(--white); }
.vfy__result p { margin-top: 4px; }
.vfy__result.is-good { border-color: rgba(48,209,88,.45); }
.vfy__result.is-bad { border-color: rgba(255,69,58,.5); }
.vfy__seal { display: flex; gap: 14px; align-items: center; }
.vfy__seal svg { width: 44px; height: 44px; color: var(--go); flex: none; }
.vfy__quote { margin: 0; padding: 14px 16px; border-left: 3px solid var(--go); background: #000; border-radius: 0 12px 12px 0; font-size: 17px; line-height: 1.5; color: var(--white); }
.vfy__facts { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; font-size: 14px; }
.vfy__facts dt { color: var(--dim); }
.vfy__facts dd { margin: 0; font-family: var(--mono); color: var(--white); overflow-wrap: anywhere; }
.vfy__chain { margin-top: clamp(48px, 6vw, 80px); }
.vfy__chain h2 { font-family: var(--display); font-weight: 650; letter-spacing: -.025em; font-size: clamp(30px, 3vw, 40px); color: var(--white); }
.chain { list-style: none; margin: 20px 0 18px; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.chain li { display: grid; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.chain b { font-size: 16px; color: var(--white); }
.chain span { font-size: 15px; color: var(--soft); line-height: 1.5; }
.chain code { margin-top: 4px; font: 500 13px/1.4 var(--mono); color: var(--go); overflow-wrap: anywhere; }

@media (max-width: 1000px) {
  .pqid { grid-template-columns: 52px minmax(0, 1fr); }
  .pqid__keys, .pqid__actions { grid-column: 1 / -1; }
  .pqid__actions { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .pqid { padding: 16px; border-radius: 20px; }
  .page--verify { padding-top: 96px; }
  .vfy__facts { grid-template-columns: 1fr; gap: 2px; }
  .vfy__facts dd { margin-bottom: 8px; }
}
.page--agent .pqid { margin-top: clamp(28px, 4vw, 48px); }
.pqid + .apanels { margin-top: 14px; }
.ahead__pq { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px 0 7px; border-radius: 999px; border: 1px solid rgba(48,209,88,.4); background: rgba(48,209,88,.08); color: var(--white); font-size: 13px; font-weight: 700; text-decoration: none; }
.ahead__pq svg { width: 17px; height: 17px; color: var(--go); }
.ahead__pq:hover { background: rgba(48,209,88,.16); }
