/* PatchReply Review Lab */

:root {
  --bg: #0e1116;
  --panel: #141922;
  --card: #1a2029;
  --card-hover: #1e2530;
  --line: #29313d;
  --line-soft: #222a35;
  --text: #e9eef5;
  --muted: #8c99ab;
  --faint: #5c6b7d;
  --rec: #ff5c5c;
  --rec-soft: rgba(255, 92, 92, 0.12);
  --patch: #3ddc97;
  --patch-ink: #07130d;
  --patch-soft: rgba(61, 220, 151, 0.12);
  --focus: rgba(61, 220, 151, 0.5);
  --radius: 10px;
  /* The platform stack (DESIGN.md): no third-party font request on either the Lab or the embedded demo. */
  --font-ui: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: var(--font-ui);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hidden { display: none !important; }
.linklike { color: var(--patch); text-decoration: underline; text-underline-offset: 3px; }

.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  height: 100svh;
  overflow: hidden;
}

#patchreplyUiHost {
  position: fixed;
  inset: 0;
  z-index: 100;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* ---------- workspace / browser chrome ---------- */

.workspace {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.browser {
  display: grid;
  grid-template-columns: auto minmax(200px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--panel);
}

.browser-nav { display: flex; gap: 6px; }

.chrome-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 18px;
  transition: background 0.15s ease, color 0.15s ease;
}
.chrome-btn:hover:not(:disabled) { background: var(--card-hover); color: var(--text); }
.chrome-btn:disabled { opacity: 0.4; cursor: default; }
.chrome-btn.wide { font-size: 13px; font-weight: 500; }
.patchreply-toggle[aria-pressed="true"] {
  border-color: rgba(61, 220, 151, 0.42);
  color: var(--text);
}

.urlbar {
  display: grid;
  grid-template-columns: 1fr auto;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0a0d11;
  overflow: hidden;
}
.urlbar:focus-within { border-color: var(--faint); }
.urlbar input {
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0 6px 0 16px;
  color: var(--text);
  font-size: 13px;
}
.urlbar input::placeholder { color: var(--faint); }
.urlbar input:focus { outline: none; }
.urlbar-go {
  padding: 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.urlbar-go:hover { color: var(--text); }

.browser-tools { display: flex; align-items: center; gap: 8px; }

.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #0a0d11;
}
.segmented button {
  height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.segmented button.active { background: var(--card-hover); color: var(--text); }

.stage-pad {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background:
    radial-gradient(circle at 50% 0%, rgba(61, 220, 151, 0.03), transparent 60%),
    var(--bg);
}

.stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line-soft), 0 18px 50px rgba(0, 0, 0, 0.35);
  transition: width 0.25s ease, height 0.25s ease, border-radius 0.25s ease;
}
.stage.mobile {
  width: min(390px, 100%);
  height: min(760px, 100%);
  border-radius: 24px;
  box-shadow: 0 0 0 10px #171d26, 0 0 0 11px var(--line), 0 28px 70px rgba(0, 0, 0, 0.5);
}
.stage iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }

/* The embedded homepage demo: no chrome, and the example scene fills the frame edge to edge. */
[data-review-host="embedded"] .workspace { grid-template-rows: minmax(0, 1fr); }
[data-review-host="embedded"] .stage-pad { padding: 0; background: #fff; }
[data-review-host="embedded"] .stage { min-height: 0; border-radius: 0; box-shadow: none; transition: none; }

.stage-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #f6f7f9;
  color: #1c232e;
}
.stage-empty-inner { max-width: 380px; text-align: center; padding: 24px; }
.stage-empty-inner h2 { font: 600 20px/1.3 var(--font-display); margin: 0 0 8px; }
.stage-empty-inner p { color: #5c6b7d; margin: 0; }
.stage-empty-inner .linklike { color: #0b8a58; }
.stage-empty-pin {
  width: 34px; height: 34px;
  margin: 0 auto 16px;
  border-radius: 50% 50% 50% 6px;
  background: var(--rec);
  box-shadow: 0 0 0 3px #fff, 0 10px 24px rgba(28, 35, 46, 0.25);
}

/* ---------- panel ---------- */

.panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid var(--line-soft);
  background: var(--panel);
  position: relative;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.brand { display: flex; align-items: center; gap: 9px; }
.brand-pin {
  width: 18px; height: 18px;
  display: block;
}
.brand-name { font: 700 16px/1 var(--font-display); letter-spacing: -0.01em; }

.mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.mode-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.mode-chip.voice .dot { background: var(--patch); }
.mode-chip.voice { color: var(--text); }
.mode-chip.recording .dot { background: var(--rec); animation: pulse-dot 1.2s ease-in-out infinite; }
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 92, 92, 0.5); }
  55% { box-shadow: 0 0 0 5px rgba(255, 92, 92, 0); }
}

/* setup */

.setup-card {
  margin: 16px;
  padding: 22px 18px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background:
    radial-gradient(circle at 8% 0%, rgba(61, 220, 151, 0.12), transparent 34%),
    var(--card);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
}
.setup-intro { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; }
.setup-icon {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid rgba(61, 220, 151, 0.3);
  border-radius: 13px;
  background: var(--patch-soft);
  color: var(--patch);
}
.setup-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.setup-kicker {
  margin: 0 0 2px;
  color: var(--patch);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.setup-title { max-width: 250px; font: 600 20px/1.2 var(--font-display); letter-spacing: -0.01em; margin: 0; }
.setup-sub { color: var(--muted); line-height: 1.55; margin: 0 0 20px; }
.field-label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.mic-row { margin-bottom: 16px; }
.mic-row select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 42px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0a0d11 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238c99ab' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 13px center;
  color: var(--text);
  cursor: pointer;
  text-overflow: ellipsis;
}
.mic-row select:hover { border-color: var(--faint); }
.mic-row select:focus { outline: none; border-color: var(--patch); box-shadow: 0 0 0 3px var(--patch-soft); }
.meter {
  height: 10px;
  margin: 0 0 10px;
  border-radius: 999px;
  background: #0a0d11;
  border: 1px solid var(--line-soft);
  overflow: hidden;
}
.meter-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--patch), #7fe9bd);
  transition: width 0.08s linear;
}
.mic-hint { color: var(--faint); font-size: 12px; margin: 0 0 14px; }
.mic-hint.ok { color: var(--patch); }
.mic-hint.warn { color: var(--rec); }
.setup-gesture-block { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 9px; background: rgba(255,255,255,.025); }
.setup-gesture-label { margin: 0 0 6px; color: var(--faint); font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.setup-gesture { display: flex; align-items: center; gap: 5px; min-height: 28px; color: var(--text); font-size: 12px; }
.setup-gesture .mod-select { flex: 0 0 auto; }
.setup-privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 8px;
  color: var(--faint);
  font-size: 11px;
}
.setup-privacy svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.25; }
.setup-type-only { margin-top: 2px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--card-hover); }
.btn:active { transform: translateY(1px); }
.btn.full { width: 100%; }
.btn.small { height: 28px; padding: 0 10px; font-size: 12px; font-weight: 500; }
.btn.primary { background: var(--rec); border-color: transparent; color: #fff; }
.btn.primary:hover { background: #ff6f6f; }
.btn.patch { background: var(--patch); border-color: transparent; color: var(--patch-ink); }
.btn.patch:hover { background: #57e5a7; }
.btn.subtle { background: transparent; border-color: transparent; color: var(--muted); font-weight: 500; }
.btn.subtle:hover { color: var(--text); background: var(--card); }
.btn-icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* review */

.review-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 16px 0;
}

.howto {
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(61, 220, 151, 0.04);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.8;
}
.howto-tail { display: block; color: var(--muted); }

.mod-select {
  appearance: none;
  -webkit-appearance: none;
  display: inline-block;
  vertical-align: baseline;
  padding: 2px 20px 2px 9px;
  margin: 0 1px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 7px;
  background: #0a0d11 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%238c99ab'/%3E%3C/svg%3E") no-repeat right 7px center;
  color: var(--text);
  font: 600 12px var(--font-mono);
  cursor: pointer;
}
.mod-select:hover { border-color: var(--faint); }

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 10px;
}
.list-head h2 { font: 600 15px/1 var(--font-display); margin: 0; }
.list-head-tools { display: flex; align-items: center; gap: 8px; }
.count-pill {
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.recording-card {
  border: 1px solid rgba(255, 92, 92, 0.55);
  border-radius: var(--radius);
  background: var(--rec-soft);
  padding: 12px;
  margin-bottom: 10px;
}
.recording-head { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.recording-timer { margin-left: auto; color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.rec-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--rec);
  animation: pulse-dot 1.2s ease-in-out infinite;
}
.recording-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 26px;
  margin: 10px 0 8px;
}
.recording-bars i {
  flex: 1;
  min-height: 3px;
  border-radius: 2px;
  background: var(--rec);
  opacity: 0.85;
  transition: height 0.09s ease;
}
.recording-target {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.page-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 8px 0 2px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}
.page-head strong {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--card);
  padding: 10px 12px 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.item-card:hover { background: var(--card-hover); }
.item-card.selected { border-color: var(--rec); }
.item-card.error { border-color: rgba(255, 92, 92, 0.4); }

.item-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 6px;
}
.item-num {
  flex: none;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50% 50% 50% 3px;
  background: var(--rec);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.item-label {
  min-width: 0;
  flex: 1;
  font-size: 12.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item-tag {
  flex: none;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11px;
}
.item-delete {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  color: var(--faint);
  font-size: 21px;
  line-height: 1;
}
.item-delete:hover { color: var(--rec); background: var(--rec-soft); }

.item-screenshot {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  margin: 9px 0 8px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #0a0d11;
}
.item-screenshot img { width: 100%; height: 100%; display: block; object-fit: contain; }
.item-screenshot .pr-screenshot,
.item-screenshot .pr-screenshot__frame {
  width: 100%;
  height: 100%;
  margin: 0;
}
.item-screenshot .pr-screenshot__frame { border: 0; border-radius: 0; }
.item-screenshot .pr-screenshot__status {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  margin: 0;
  padding: 8px;
  color: var(--faint);
  font-size: 11px;
}
.item-screenshot.pending {
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 11px;
  background: linear-gradient(100deg, #0f141b 30%, #18202a 48%, #0f141b 66%);
  background-size: 240% 100%;
  animation: screenshot-loading 1.5s ease-in-out infinite;
}
.screenshot-target {
  position: absolute;
  min-width: 8px;
  min-height: 8px;
  border: 2px solid var(--rec);
  border-radius: 5px;
  box-shadow: 0 0 0 2px rgba(255,255,255,.92), 0 5px 15px rgba(10,12,16,.28);
  pointer-events: none;
}
.screenshot-target.point {
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 50% 50% 50% 4px;
  transform: translate(-50%, -50%);
  background: var(--rec);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.92), 0 5px 15px rgba(10,12,16,.28);
}
.screenshot-target.point.adaptive-marker-target {
  width: 0;
  height: 0;
  transform: none;
  background: transparent;
  box-shadow: none;
}
.item-screenshot-marker {
  --pr-marker-height: 24px;
  transform: translate(-12px, -12px);
  filter: drop-shadow(0 5px 8px rgba(10,12,16,.28));
}
.screenshot-target.region { border-style: dashed; background: rgba(255,92,92,.08); }
.screenshot-target i { display: none; }
.screenshot-target.point i {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font: 800 10px/1 var(--sans);
}
@keyframes screenshot-loading { to { background-position: -140% 0; } }

.item-transcript {
  width: 100%;
  min-height: 34px;
  resize: none;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  padding: 6px 8px;
  margin-left: -8px;
  font-size: 13px;
  line-height: 1.5;
}
.item-transcript::placeholder { color: var(--faint); font-style: italic; }
.item-transcript:hover { border-color: var(--line-soft); }
.item-transcript:focus { outline: none; border-color: var(--faint); background: #0a0d11; }

.item-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  min-height: 20px;
}
.item-status { font-size: 11.5px; color: var(--faint); }
.item-status.transcribing { color: var(--muted); }
.item-status.transcribing::after {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  margin-left: 6px;
  vertical-align: -1px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--patch);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.item-status.error { color: var(--rec); }
.item-action {
  margin-left: auto;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}
.item-action:hover { color: var(--text); background: var(--card-hover); }

.list-empty {
  padding: 26px 8px;
  text-align: center;
  color: var(--muted);
}
.list-empty p { margin: 0 0 6px; font-weight: 600; }
.list-empty-sub { color: var(--faint); font-weight: 400 !important; font-size: 12.5px; line-height: 1.55; }

/* export bar + prompt view */

.export-bar {
  padding: 12px 16px;
  border-top: 1px solid var(--line-soft);
  background: var(--panel);
}

.prompt-view {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  padding: 14px 16px 16px;
}
.prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.prompt-meta { color: var(--faint); font-size: 12px; }
.prompt-text {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #0a0d11;
  color: #c8d2de;
  font: 12px/1.6 var(--font-mono);
  white-space: pre-wrap;
  word-break: break-word;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.prompt-cta-row { display: flex; gap: 8px; }
.prompt-cta-row .btn.patch { flex: 1; }
.more-wrap { position: relative; flex: none; }
.more-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  min-width: 210px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0f131a;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.more-menu button {
  text-align: left;
  padding: 9px 11px;
  border-radius: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}
.more-menu button:hover { background: var(--card-hover); }

.finish-btn { margin-top: 8px; }

/* prompt settings */

.panel-header-tools { display: flex; align-items: center; gap: 8px; position: relative; }
button.mode-chip { cursor: pointer; }
button.mode-chip:hover { background: var(--card-hover); }
button.mode-chip.static { cursor: default; }
button.mode-chip.static:hover { background: var(--card); }
.chip-caret { color: var(--faint); font-size: 10px; margin-left: -2px; }
.mode-chip.static .chip-caret { display: none; }
.chip-menu { bottom: auto; top: calc(100% + 6px); right: 36px; }
.mode-chip.off .dot { background: var(--rec); }
.gear-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  border: 1px solid var(--line-soft);
  background: var(--card);
  color: var(--muted);
  font-size: 19px;
}
.gear-btn:hover { color: var(--text); background: var(--card-hover); }
.gear-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.settings-view {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  padding: 14px 16px 16px;
}
.settings-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.settings-hint { color: var(--muted); font-size: 12px; margin: 0 0 8px; line-height: 1.5; }
.settings-body .field-label { margin-top: 4px; }
.settings-body .field-label + .settings-hint { margin-top: -2px; }
.settings-textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a0d11;
  color: #c8d2de;
  padding: 10px 12px;
  font: 12px/1.6 var(--font-mono);
}
.settings-textarea::placeholder { color: var(--muted); font-style: italic; }
.settings-textarea:focus { outline: none; border-color: var(--faint); }
.settings-row { display: flex; justify-content: flex-end; margin: 6px 0 16px; }

/* reviews list */

.reviews-view {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  padding: 14px 16px 16px;
}
.reviews-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.review-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.review-row:hover { background: var(--card-hover); }
.review-row.current { border-color: rgba(61, 220, 151, 0.45); }
.review-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.review-row-main strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.review-row-meta { color: var(--faint); font-size: 11.5px; }
.review-status {
  flex: none;
  height: 20px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.review-status.exported { color: var(--patch); border-color: rgba(61, 220, 151, 0.35); }
.reviews-empty { color: var(--faint); font-size: 13px; text-align: center; padding: 30px 10px; }
.reviews-footer { padding-top: 12px; }

.detail-title { font: 600 15px/1.3 var(--font-display); margin: 0 0 10px; }
.item-card.readonly { cursor: default; }
.item-card.readonly:hover { background: var(--card); }
.detail-feedback {
  margin: 0;
  color: var(--soft, #c7d0dc);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

/* toasts */

.toasts {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 74px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 10px 13px;
  border-radius: 9px;
  background: #0a0d11;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12.5px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  animation: toast-in 0.2s ease;
}
.toast.warn { border-color: rgba(255, 92, 92, 0.5); }
.toast.ok { border-color: rgba(61, 220, 151, 0.5); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; height: 100svh; }
  .browser { grid-template-columns: auto 1fr; }
  .browser-tools .segmented { display: none; }
  .browser-tools .chrome-btn:not(.patchreply-toggle) { display: none; }
  .prompt-view { position: fixed; }
}
