/* Tester gate overlays + tester-mode panel trimming (talk2yunai.lorecraft.io only). */
:root {
  --t-bg: rgba(8, 8, 10, .82);
  --t-card: #f7f5f2;
  --t-ink: #1c1b1f;
  --t-muted: #5f5b66;
  --t-line: #d9d4ce;
  --t-accent: #2f5bd3;
  --t-error: #b3261e;
}
body.t-overlay-open { cursor: auto; }
.t-overlay {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: var(--t-bg); backdrop-filter: blur(6px); overflow-y: auto;
}
.t-card {
  width: min(440px, 100%); background: var(--t-card); color: var(--t-ink); border-radius: 14px;
  padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.45); font-size: 15px; line-height: 1.45;
}
.t-card h1 { font-size: 22px; margin: 0 0 8px; }
.t-card p { margin: 0 0 12px; color: var(--t-muted); }
.t-logo { height: 34px; display: block; margin-bottom: 12px; filter: invert(1); }
.t-form { display: flex; flex-direction: column; gap: 12px; }
.t-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 14px; }
.t-form input:not([type=radio]):not([type=checkbox]), .t-form textarea {
  font: inherit; font-weight: 400; padding: 9px 10px; border: 1px solid var(--t-line); border-radius: 8px;
  background: #fff; color: var(--t-ink); width: 100%;
}
.t-form textarea { resize: vertical; }
.t-card button {
  font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--t-accent);
  background: var(--t-accent); color: #fff; cursor: pointer;
}
.t-card button.t-skip { background: transparent; color: var(--t-muted); border-color: var(--t-line); }
.t-actions { display: flex; gap: 8px; justify-content: flex-end; }
.t-error { color: var(--t-error) !important; margin: 0 !important; }
.t-runs { margin: 12px 0 0 !important; font-size: 13px; }
.t-card fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.t-card legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; padding: 0; }
.t-rating label { flex-direction: row !important; }
.t-rating input { position: absolute; opacity: 0; pointer-events: none; }
.t-rating span {
  display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--t-line);
  border-radius: 50%; background: #fff; cursor: pointer; font-weight: 600;
}
.t-rating input:checked + span { background: var(--t-accent); border-color: var(--t-accent); color: #fff; }
.t-rating input:focus-visible + span { outline: 2px solid var(--t-accent); outline-offset: 2px; }
.t-rating small { flex-basis: 100%; color: var(--t-muted); font-weight: 400; }
.t-tags label { flex-direction: row !important; align-items: center; gap: 6px !important; font-weight: 400 !important;
  border: 1px solid var(--t-line); border-radius: 999px; padding: 5px 10px; background: #fff; }

/* Panel additions */
#tBadge { color: #f1e3a0; font-size: 12px; }
#tBadge a { color: #9ad; }

/* Tester mode: only kept controls stay visible (robust to operator buttons added later). */
body.t-tester #panel .row > :not(.t-keep) { display: none !important; }
body.t-tester #panel .row.t-empty,
body.t-tester #directorRow, body.t-tester #beatRow,
body.t-tester #textLabel, body.t-tester #textForm,
body.t-tester #log, body.t-tester #trNotice,
body.t-tester #panel footer { display: none !important; }
.t-help { font-size: 13px; margin: -6px 0 0 !important; }
.t-help a, .t-runs a { color: var(--t-accent); }
.t-form label.t-inline { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
