/* OriginSpace tokens: astro/tailwind.config.mjs, BaseLayout, PaperLayout, PropertyList. */
.sidebar-account { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-top: 1px solid #ececec; font-size: 12px; }
.sidebar-account button { font-size: 11px; min-height: 30px; padding: 4px 8px; }
:root {
  --bg: #f7f7f7;
  --panel: #fff;
  --panel2: #fafafa;
  --line: #ececec;
  --txt: #000;
  --dim: #777;
  --acc: #171717;
  --ok: #23775d;
  --warn: #9b692a;
  --bad: #a03d3d;
  --muted: #999;
  --border-light: #f4f4f4;
  --sidebar: 240px;
  --paper-shadow: 0 4px 30px rgb(0 0 0 / 0.04);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    "Noto Sans SC",
    sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scrollbar-gutter: stable;
  scroll-padding-top: 80px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-size: 13px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 12px;
  color: var(--txt);
  background: #fff;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
button:hover {
  background: #f5f5f5;
  border-color: #ddd;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button.primary {
  background: #191919;
  border-color: #191919;
  color: #fff;
}
button.primary:hover {
  background: #353535;
}
button.ghost {
  background: transparent;
  border-color: transparent;
  color: #666;
}
button.ghost:hover {
  background: #f5f5f5;
  color: #000;
}
button.danger {
  background: #fff6f5;
  border-color: #f1dfdd;
  color: var(--bad);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid rgb(0 0 0 / 0.55);
  outline-offset: 3px;
}
button i {
  font-size: 16px;
}
button.text-button {
  border: 0;
  background: transparent;
  padding: 0;
  min-height: 26px;
  font-size: 12.5px;
  color: #666;
}
button.text-button:hover {
  color: #000;
}
button.icon-button {
  width: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #888;
}
button.icon-button:hover {
  background: #f5f5f5;
  color: #000;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 120;
  background: #fff;
  color: #000;
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.skip-link:focus {
  top: 16px;
}
h1,
h2,
h3,
h4,
p,
dl,
dd {
  margin: 0;
}
h1 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 700;
}
h2 {
  font-size: 14px;
  font-weight: 600;
}
h3 {
  font-size: 16px;
  font-weight: 650;
}
a {
  color: inherit;
  text-decoration: none;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #e0e0e0;
  border-radius: 3px;
}
[hidden] {
  display: none !important;
}
#sidebar {
  width: 240px;
  position: fixed;
  left: 12px;
  top: 12px;
  bottom: 12px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  box-shadow: 0 2px 20px rgb(0 0 0 / 0.04);
  overflow: hidden;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 28px 20px 26px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.brand > i {
  font-size: 24px;
  line-height: 1;
}
.brand:hover {
  opacity: 0.8;
}
#sidebar nav {
  flex: 1;
  overflow: auto;
  padding: 0 12px;
}
.nav-group {
  font-size: 11px;
  font-weight: 500;
  color: #999;
  letter-spacing: 0.05em;
  padding: 0 12px;
  margin: 8px 0 8px;
}
.nav-group:not(:first-child) {
  margin-top: 25px;
}
.nav-item {
  width: 100%;
  border: 0;
  background: transparent;
  min-height: 42px;
  padding: 10px 12px;
  justify-content: flex-start;
  gap: 12px;
  color: #666;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  margin: 1px 0;
}
.nav-item > i {
  font-size: 17px;
  line-height: 1;
  width: 20px;
  text-align: center;
}
.nav-item:hover {
  background: #fafafa;
  color: #000;
}
.nav-item.active {
  background: #f5f5f5;
  color: #000;
}
.nav-count {
  margin-left: auto;
  font-size: 10.5px;
  background: #f4f4f4;
  padding: 1px 5px;
  border-radius: 4px;
  color: #999;
  white-space: nowrap;
}
.sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 17px 23px;
  border-top: 1px solid var(--border-light);
  color: #888;
}
.sidebar-bottom > i {
  font-size: 20px;
}
.sidebar-bottom strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #555;
}
.sidebar-bottom span {
  display: block;
  font-size: 10.5px;
  color: #999;
}
#sidebarClose {
  display: none;
  margin-left: auto;
}
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgb(0 0 0 / 0.25);
  border: 0;
  border-radius: 0;
}
#workspaceMain {
  margin-left: 252px;
  min-height: 100dvh;
}
.page-header {
  height: 66px;
  max-width: 1320px;
  margin: auto;
  padding: 0 64px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: #999;
}
.breadcrumb i {
  font-size: 15px;
  color: #bbb;
}
.breadcrumb strong {
  font-weight: 500;
  color: #333;
}
.local-state {
  margin-left: auto;
  font-size: 11px;
  color: #999;
  display: flex;
  align-items: center;
  gap: 6px;
}
.local-state i {
  font-size: 13px;
  color: var(--ok);
}
#mobileMenu {
  display: none;
}
#workspace {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 64px 32px;
}
.paper {
  background: #fff;
  border: 1px solid rgb(0 0 0 / 0.04);
  border-radius: 24px;
  box-shadow: var(--paper-shadow);
}
#main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rightW, 288px);
  gap: 32px;
  align-items: start;
  min-width: 0;
}
#conversationCard {
  padding: 30px 32px 24px;
  min-width: 0;
}
#top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.card-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}
#btnStop {
  min-height: 29px;
  padding: 4px 9px;
}
.properties {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1px 16px;
  margin-bottom: 20px;
}
.properties > div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  min-height: 34px;
  font-size: 12px;
}
.properties > div + div {
  border-top: 1px solid #f7f7f7;
}
.properties dt {
  color: #aaa;
}
.properties dd {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.properties dd .text-button {
  color: #333;
  min-height: 18px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12.5px;
}
.properties dd i {
  font-size: 12px;
  color: #aaa;
}
.pill {
  font-size: 11px;
  color: #777;
  white-space: nowrap;
  line-height: 1.7;
}
.pill.live {
  color: var(--ok);
}
.pill.err {
  color: var(--bad);
}
#voicePill i {
  font-size: 12px;
  color: #aaa;
}
#videoWrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(160px, 24vh, 300px);
  border-radius: 12px;
  background: #f7f7f7;
  overflow: hidden;
}
#videoWrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#avatarStill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
#mask {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 18px;
  z-index: 5;
  background: rgb(247 247 247 / 0.92);
  text-align: center;
}
.stage-empty-icon {
  font-size: 28px;
  color: #aaa;
  line-height: 1;
}
#mask h2 {
  font-size: 14px;
  font-weight: 500;
  color: #444;
}
#mask .cap {
  font-size: 11.5px;
  color: #999;
  max-width: 100%;
  line-height: 1.6;
}
#mask button {
  font-size: 12px;
  min-height: 28px;
  padding: 3px 8px;
}
#soundHint {
  position: absolute;
  inset: 0;
  z-index: 55;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgb(0 0 0 / 0.4);
  color: #fff;
  cursor: pointer;
}
.stage-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 0 14px;
}
.stage-options {
  display: flex;
  align-items: center;
  gap: 5px;
}
.stage-options .text-button {
  font-size: 11px;
  color: #999;
}
.session-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.session-actions button {
  font-size: 11px;
  min-height: 28px;
  padding: 4px 8px;
}
.session-actions #btnGo {
  font-size: 12px !important;
  padding: 5px 13px !important;
  min-height: 31px;
}
.session-actions #btnRec {
  border: 0;
  background: transparent;
  color: #999;
  padding: 0;
}
.session-actions #btnRec.on {
  color: var(--bad);
}
#btnRecFetch {
  font-size: 0;
}
.session-actions #btnRecFetch i {
  font-size: 15px;
  color: #999;
}
#bottom {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
#txt {
  display: block;
  width: 100%;
  height: 60px;
  resize: vertical;
  min-height: 50px;
  max-height: 180px;
  padding: 13px 14px;
  border: 0;
  background: transparent;
  font-size: 13px;
  line-height: 1.6;
  color: #222;
}
#txt:focus-visible {
  outline: none;
}
#bottom:focus-within {
  border-color: #bbb;
}
#txt::placeholder {
  color: #aaa;
}
.composer-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 0 9px 9px;
}
.kbd {
  color: #aaa;
  font-size: 10px;
}
.composer-actions .kbd {
  margin-right: auto;
}
.composer-actions button {
  font-size: 11.5px;
  min-height: 29px;
  padding: 4px 9px;
}
.composer-actions button i {
  font-size: 14px;
}
#splitter {
  display: none;
}
#rightPanel {
  background: rgb(255 255 255 / 0.55);
  border-radius: 16px;
  box-shadow: 0 2px 20px rgb(0 0 0 / 0.04);
  position: sticky;
  top: 20px;
  min-width: 0;
  height: calc(100dvh - 112px);
  max-height: 720px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#rightPanel .head {
  padding: 21px 21px 17px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
#rightPanel .head h2 {
  font-size: 12px;
  font-weight: 500;
  color: #555;
}
#rightPanel .head button {
  font-size: 10.5px;
  color: #999;
}
.record-tabs {
  display: flex;
  gap: 18px;
  padding: 0 21px;
  border-bottom: 1px solid var(--line);
}
.record-tabs button {
  padding: 0 0 9px;
  border-radius: 0;
  background: none;
  border: 0;
  font-size: 11.5px;
  color: #999;
  min-height: 28px;
  border-bottom: 1px solid transparent;
}
.record-tabs button.active {
  color: #222;
  border-bottom-color: #222;
}
#trList {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  overflow: auto;
  min-height: 0;
  padding: 20px;
}
#trList[data-filter="chat"] .tr.sys,
#trList[data-filter="chat"] .tr.srv {
  display: none;
}
#trList[data-filter="events"] .tr.user,
#trList[data-filter="events"] .tr.dh {
  display: none;
}
.tr {
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 100%;
}
.tr.user {
  align-self: flex-end;
  background: #efefef;
  padding: 9px 12px;
  border-radius: 12px 12px 3px 12px;
}
.tr.dh {
  align-self: flex-start;
  color: #333;
}
.tr.sys,
.tr.srv {
  font-size: 11px;
  color: #888;
  line-height: 1.7;
}
.tr b {
  font-weight: 600;
  color: #222;
}
.empty-record {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #aaa;
  gap: 7px;
  padding: 30px 0;
  min-height: 220px;
}
.empty-record i {
  font-size: 27px;
  color: #bbb;
  margin-bottom: 5px;
}
.empty-record p {
  font-size: 12px;
  color: #888;
}
.empty-record span {
  font-size: 11px;
  color: #aaa;
}
.aside-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--border-light);
}
.aside-footer button {
  width: 100%;
  justify-content: flex-start;
  font-size: 11px;
  gap: 7px;
}
.aside-footer button > i:last-child {
  margin-left: auto;
}
.aside-footer #readinessCount {
  font-size: 10px;
  color: #999;
  margin-left: auto;
}
.aside-footer #readinessCount + i {
  margin-left: 0;
}
#main.focus-mode {
  grid-template-columns: minmax(0, 1fr);
}
#main.focus-mode #rightPanel {
  display: none;
}
#main.focus-mode #videoWrap {
  height: 55vh;
}
.workspace-view {
  display: none;
  padding: 32px;
  min-width: 0;
}
.workspace-view.open {
  display: block;
}
#workspace.has-view #main {
  display: none;
}
.view-header,
.shead,
.dhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}
.shead > span:first-child,
.dhead > span:first-child {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.shead > span > span {
  display: none;
}
.shead .icon-button,
.dhead .icon-button {
  flex-shrink: 0;
}
.subtle-tag {
  font-size: 11px;
  color: #999;
  background: #f5f5f5;
  border-radius: 5px;
  padding: 3px 8px;
  font-weight: 400;
}
.sbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.sbar > span {
  font-size: 12px;
}
.sbar button {
  font-size: 12px;
}
.sbar label {
  font-size: 12px;
}
.sbar input[type="text"] {
  flex: 1;
  min-width: 180px;
}
.hint {
  font-size: 11.5px;
  color: #999;
  line-height: 1.8;
}
.action-input {
  margin: 24px 0;
}
.action-input label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #555;
  margin-bottom: 9px;
}
.action-input > div {
  display: flex;
  gap: 8px;
}
.action-input input {
  flex: 1;
  min-width: 0;
}
.cgroup {
  padding: 23px 0;
  border-bottom: 1px solid var(--border-light);
}
.cgroup:last-child {
  border: 0;
}
.cgroup h4 {
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #888;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chipwrap {
  position: relative;
  display: inline-flex;
  max-width: 100%;
}
.chip {
  background: #fafafa;
  border: 1px solid transparent;
  padding: 8px 13px;
  font-size: 12px;
  min-height: 34px;
  color: #555;
}
.chip:hover {
  border-color: #ddd;
  background: #f5f5f5;
  color: #000;
}
.chip.sent {
  background: #eaf3ee;
  color: #286548;
}
.chip.merged {
  background: #f4f0e8;
  color: #8b6b39;
}
.chipdel {
  min-height: 24px;
  width: 24px;
  padding: 0;
  border-radius: 50%;
  position: absolute;
  top: -7px;
  right: -6px;
  background: #f1f1f1;
  font-size: 12px;
}
.chipnew {
  background: #fff;
  border: 1px dashed #ddd;
}
.chipwrap.dragging {
  opacity: 0.35;
}
.chipwrap.dragover {
  outline: 1px solid #888;
  outline-offset: 3px;
  border-radius: 8px;
}
.chipadded .chip {
  background: #f5f5f5;
}
.ghostchip {
  opacity: 0.6;
}
.cgroup .mini {
  padding: 0 5px;
  font-size: 10px;
  min-height: 24px;
}
.rndh {
  flex-wrap: wrap;
}
.rndh #rndBtn {
  margin-left: auto;
}
.rndh select {
  width: auto;
  font-size: 11px;
  min-height: 28px;
  padding: 3px 7px;
}
.rndh button {
  font-size: 11px;
  min-height: 28px;
  padding: 3px 7px;
}
#cmdEditTip {
  margin-left: auto;
}
#voiceList {
  margin-top: 24px;
}
#voiceList .vrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  background: #fff;
}
#voiceList .vrow.on {
  background: #f8f8f8;
  border-color: #aaa;
}
.vname {
  font-weight: 500;
  font-size: 13px;
}
.vlabel {
  margin-right: auto;
  color: #999;
  font-size: 11.5px;
}
.vprev {
  font-size: 11px;
}
#songGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  padding-top: 24px;
}
.song {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 15px 30px 15px 16px;
  cursor: pointer;
  font-size: 13px;
  min-width: 0;
}
.song:hover {
  background: #fafafa;
}
.song .t {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.song small {
  font-size: 10px;
  color: #aaa;
}
.song.playing {
  border-color: #aaa;
  background: #f5f5f5;
}
.song .del,
.song .scr {
  position: absolute;
  right: 5px;
  min-height: 22px;
  padding: 2px 5px;
  border: 0;
  color: #999;
  background: none;
}
.song .del {
  top: 5px;
}
.song .scr {
  bottom: 5px;
}
.songlib {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #999;
  border-bottom: 1px solid var(--line);
  padding: 10px 0 8px;
  cursor: pointer;
}
.songlib .ar {
  margin-left: auto;
}
#songGrid .empty {
  grid-column: 1/-1;
  padding: 50px 20px;
  text-align: center;
  color: #999;
  font-size: 12px;
}
#refThumb {
  padding-top: 24px;
}
#refThumb img {
  display: block;
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 12px;
}
.workspace-view .empty-view {
  padding: 64px 20px;
  text-align: center;
  color: #999;
  font-size: 12px;
}
.empty-view > i {
  display: block;
  font-size: 30px;
  color: #bbb;
  margin-bottom: 14px;
}
.empty-view strong {
  font-weight: 500;
  display: block;
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}
.empty-view p {
  max-width: 400px;
  margin: auto;
  font-size: 12px;
  line-height: 1.8;
}
.empty-view button {
  margin-top: 18px;
}
input[type="text"],
input[type="number"],
input[type="password"],
input:not([type]),
textarea,
select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 12.5px;
  min-height: 36px;
  max-width: 100%;
  color: #333;
  outline-offset: 2px;
}
input::placeholder,
textarea::placeholder {
  color: #aaa;
}
select {
  appearance: auto;
}
input[type="checkbox"] {
  accent-color: #222;
  width: 14px;
  height: 14px;
  cursor: pointer;
}
.settings-layout {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 32px;
}
.settings-layout nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 1px;
  align-self: start;
  position: sticky;
  top: 28px;
}
.settings-layout nav button {
  justify-content: flex-start;
  border: 0;
  background: none;
  color: #888;
  font-size: 12px;
  min-height: 36px;
  padding: 8px 10px;
}
.settings-layout nav button.active {
  background: #f5f5f5;
  color: #111;
}
.sect {
  padding-bottom: 18px;
}
.sect h3 {
  font-size: 16px;
  margin-bottom: 22px;
  font-weight: 600;
}
.sect .row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  flex-wrap: wrap;
  border-bottom: 1px solid #f7f7f7;
  font-size: 12px;
}
.sect .row > label {
  width: 110px;
  flex-shrink: 0;
  color: #999;
  font-size: 12px;
}
.sect input[type="text"],
.sect input[type="password"],
.sect select {
  flex: 1;
  min-width: 120px;
}
.sect input[type="number"] {
  width: 95px;
}
.sect textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  margin: 12px 0;
}
.sect .hint {
  margin-top: 18px;
  font-size: 11px;
  color: #999 !important;
}
.sect .row .hint {
  flex-basis: 100%;
  margin: 4px 0 0 120px;
}
.settings-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 20px;
  font-size: 11px;
  color: #999;
}
.settings-footer button {
  font-size: 12px;
}
#avList {
  margin-top: 20px;
}
#avList > div {
  background: #fff !important;
  color: #666 !important;
  border-color: var(--line) !important;
}
#avList button {
  min-height: 28px;
}
#avList img {
  background: #fafafa !important;
}
.props-dialog {
  margin: auto;
  max-height: 80dvh;
  width: min(560px, calc(100vw - 32px));
  padding: 24px;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.18);
}
.props-dialog::backdrop {
  background: rgb(0 0 0 / 0.3);
}
#readinessPanel {
  margin-top: 26px;
}
#readinessSummary {
  font-size: 12px;
  color: #888;
  margin-bottom: 22px;
}
#readinessChecks {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
}
#readinessChecks li {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  padding: 17px 20px;
  font-size: 12px;
  align-items: start;
}
#readinessChecks li + li {
  border-top: 1px solid var(--border-light);
}
#readinessChecks strong {
  font-size: 12px;
  font-weight: 500;
  color: #444;
}
#readinessChecks li > span {
  color: #999;
  font-size: 12px;
}
#readinessChecks li.missing strong {
  color: #8a693d;
}
#readinessPanel .maskRow {
  display: flex;
  gap: 8px;
  margin-top: 24px;
}
.runtime-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 24px;
  font-size: 11.5px;
  line-height: 1.8;
  color: #999;
}
.runtime-note > i {
  font-size: 15px;
}
#confirmBar {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: min(360px, calc(100vw - 48px));
  z-index: 75;
  flex-direction: column;
  gap: 10px;
}
.citem {
  background: #fff;
  border: 1px solid var(--line);
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgb(0 0 0 / 0.08);
  font-size: 12px;
}
.crow {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.citem .csrc {
  font-size: 10px;
  color: #999;
}
.citem .ok {
  background: #222;
  color: #fff;
}
.citem .no {
  color: #999;
  background: #fff;
}
#toasts {
  position: fixed;
  top: 20px;
  left: calc(50% + 126px);
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: calc(100vw - 32px);
  align-items: center;
  pointer-events: none;
}
.toast {
  background: #fff;
  border: 1px solid var(--line);
  color: #444;
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.08);
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 12px;
  text-align: center;
  animation: toast-in 0.18s ease-out;
}
.toast.bad {
  color: var(--bad);
  border-color: #eadcda;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (min-width: 1600px) {
  #videoWrap {
    height: 320px;
  }
  #conversationCard {
    padding: 36px;
  }
  #main {
    gap: 48px;
  }
}
@media (max-width: 1199px) and (min-width: 1024px) {
  #workspace {
    padding: 0 32px 32px;
  }
  .page-header {
    padding: 0 32px;
  }
  #main {
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  #conversationCard {
    padding: 26px 24px;
  }
  .stage-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .session-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
@media (max-width: 1023px) {
  #sidebar {
    transform: translateX(-270px);
    visibility: hidden;
    transition: transform 0.2s;
    z-index: 60;
  }
  body.nav-open #sidebar {
    transform: none;
    visibility: visible;
  }
  #sidebarClose {
    display: inline-flex;
  }
  #workspaceMain {
    margin-left: 0;
  }
  .page-header {
    height: 58px;
    padding: 0 24px;
  }
  #mobileMenu {
    display: inline-flex;
    margin-left: -8px;
  }
  #workspace {
    padding: 0 24px 32px;
  }
  #main {
    gap: 24px;
  }
  #toasts {
    left: 50%;
  }
}
@media (max-width: 760px) {
  .page-header {
    height: 54px;
    padding: 0 16px;
  }
  #workspace {
    padding: 0 12px 24px;
  }
  #main {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  #conversationCard {
    width: 100%;
    padding: 24px 20px 20px;
    border-radius: 20px;
  }
  h1,
  .shead > span:first-child,
  .dhead > span:first-child {
    font-size: 26px;
  }
  #top {
    margin-bottom: 20px;
  }
  .properties {
    padding: 0 13px;
    margin-bottom: 18px;
  }
  .properties > div {
    grid-template-columns: 58px minmax(0, 1fr);
    padding: 10px 0;
  }
  #videoWrap {
    height: 220px;
  }
  .stage-toolbar {
    padding: 10px 0 14px;
    align-items: flex-start;
  }
  .stage-options {
    display: none;
  }
  .session-actions {
    justify-content: space-between;
    width: 100%;
    gap: 7px;
  }
  .session-actions #btnGo {
    order: 3;
    margin-left: auto;
  }
  .composer-actions .kbd {
    font-size: 9px;
    max-width: 130px;
    line-height: 1.5;
  }
  #rightPanel {
    position: static;
    width: 100%;
    height: 400px;
    min-height: 300px;
    max-height: none;
  }
  #trList {
    padding: 20px;
  }
  .workspace-view {
    padding: 25px 20px;
    border-radius: 20px;
  }
  .view-header,
  .shead,
  .dhead {
    margin-bottom: 20px;
  }
  .settings-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  .settings-layout nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    max-width: 100%;
    flex-shrink: 0;
  }
  .settings-layout nav button {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .sect .row > label {
    width: 100%;
    margin-bottom: 1px;
  }
  .sect .row .hint {
    margin-left: 0;
  }
  .sect .row {
    gap: 9px;
  }
  .sect input[type="text"],
  .sect select {
    min-width: 0;
    width: 100%;
    flex-basis: 100%;
  }
  .sect input[type="number"] {
    flex: 1;
  }
  .sbar {
    gap: 8px;
  }
  .sbar > button {
    flex: 0 1 auto;
    font-size: 11px;
  }
  .sbar input[type="text"] {
    min-width: 0;
    width: 100%;
    flex-basis: 100%;
  }
  .sbar > span {
    font-size: 11px !important;
  }
  .action-input > div {
    flex-wrap: wrap;
  }
  .action-input input {
    width: 100%;
    flex-basis: 100%;
  }
  .action-input button {
    margin-left: auto;
  }
  #readinessChecks li {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 16px;
  }
  #readinessSummary {
    line-height: 1.8;
  }
  #cmdEditTip {
    width: 100%;
    margin-left: 0 !important;
  }
  .chips {
    gap: 7px;
  }
  .chip {
    padding: 8px 10px;
  }
  #main.focus-mode #videoWrap {
    height: 48vh;
  }
  #main.focus-mode #rightPanel {
    display: none;
  }
  .settings-footer {
    gap: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Rehearsal shares the same paper, property and button vocabulary. */
.rehearsal-panel {
  padding: 22px 0;
  border-bottom: 1px solid var(--border, #ededed);
}
.rehearsal-panel h2 { margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.rehearsal-panel p { color: #777; font-size: 13px; line-height: 1.7; }
.rehearsal-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.turn-list { padding-left: 22px; }
.turn-list li { padding: 8px 0; overflow-wrap: anywhere; }
.turn-list strong { font-size: 13px; font-weight: 500; }
.turn-list p { margin: 4px 0; }
.history-session { display: block; width: 100%; margin-top: 8px; text-align: left; white-space: normal; }
[hidden] { display: none !important; }

.rehearsal-start, .section-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.rehearsal-start h2, .section-toolbar h2 { margin: 0; font-size: 15px; }
.rehearsal-start button { margin-left: auto; }
.section-toolbar { margin-bottom: 16px; }
.section-toolbar > span { margin-right: auto; color: var(--dim); font-size: 12px; }
.rehearsal-form { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.rehearsal-form h3 { flex: 0 0 44px; font-size: 13px; font-weight: 500; margin: 0; }
.rehearsal-form input { width: 112px; min-width: 0; }
.rehearsal-form #demoDanText { flex: 1; min-width: 130px; }
.rehearsal-form input[type=number] { width: 65px; }
.rehearsal-form select { flex: 1; min-width: 100px; }
.rehearsal-form > span, .compact-status { color: var(--dim); font-size: 12px; }
.turn-list { list-style: none; padding: 0; margin: 0; }
.turn-list li { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--border, #ededed); padding: 12px 0; }
.turn-list strong { flex: 1; min-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.turn-kind, .turn-state { font-size: 12px; color: var(--dim); }
.turn-state.failed, .turn-error { color: #ae4545; }
.turn-error { font-size: 12px; flex-basis: 100%; }
@media (max-width: 600px) { .rehearsal-form h3 { flex-basis: 100%; } .rehearsal-form input { flex: 1; width: 70px; } }
.media-audio { display: block; width: 220px; max-width: 100%; height: 32px; }
#demoRecordControls .section-toolbar { margin-bottom: 0; }
.vrow { flex-wrap: wrap; }
.acceptance-groups { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 0; margin: 0; list-style: none; }
.acceptance-groups li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; border: 1px solid var(--border, #ededed); border-radius: 8px; font-size: 12px; }
.acceptance-groups strong { font-weight: 500; margin-right: auto; }
.acceptance-state { color: var(--dim); font-size: 12px; }
.acceptance-state.failed { color: #ae4545; }
#acceptanceDetails { margin-top: 14px; font-size: 12px; }
#acceptanceDetails summary { color: var(--dim); cursor: pointer; }
.acceptance-checks { padding: 0; list-style: none; margin: 12px 0 0; }
.acceptance-checks li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; border-top: 1px solid var(--border, #ededed); padding: 9px 0; }
@media (max-width: 600px) { .acceptance-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
