:root {
  --bg: #f4efe5;
  --bg-2: #efe6d3;
  --surface: rgba(255, 252, 246, 0.9);
  --surface-strong: #fffaf0;
  --ink: #143642;
  --ink-soft: #46616b;
  --line: rgba(20, 54, 66, 0.12);
  --brand: #0f766e;
  --brand-2: #f97316;
  --brand-3: #0f3d56;
  --success: #246b50;
  --shadow: 0 16px 40px rgba(20, 54, 66, 0.14);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Bahnschrift", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.12), transparent 26%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(20, 54, 66, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 54, 66, 0.035) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}

.page-shell {
  width: min(1440px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.72);
  border: 1px solid rgba(20, 54, 66, 0.08);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 24px rgba(20, 54, 66, 0.08);
}

.nav-link {
  background: transparent;
  color: var(--ink-soft);
  padding: 12px 16px;
}

.nav-link.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(20, 54, 66, 0.08);
}

.workspace {
  margin-top: 18px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding: 30px 32px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(255, 250, 240, 0.95), rgba(246, 244, 235, 0.88));
  border: 1px solid rgba(20, 54, 66, 0.08);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -60px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.14), transparent 70%);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--brand);
  margin: 0 0 10px;
}

.hero h1 {
  font-family: Georgia, "STZhongsong", "Microsoft YaHei", serif;
  font-size: clamp(34px, 3vw, 52px);
  line-height: 1.08;
  margin: 0 0 14px;
  max-width: 12ch;
}

.hero-copy {
  max-width: 66ch;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.hero-status {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--brand-3);
  font-weight: 600;
}

.pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 6px rgba(15, 118, 110, 0.14);
}

.pill-muted {
  background: rgba(20, 54, 66, 0.1);
}

.dashboard {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 340px 420px 1fr;
  gap: 18px;
  align-items: start;
}

.menu-intro,
.view-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.menu-kicker,
.view-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--brand);
}

.menu-intro h2,
.view-header h2 {
  margin: 0 0 8px;
  font-size: 32px;
  font-family: Georgia, "STZhongsong", "Microsoft YaHei", serif;
}

.menu-intro p,
.view-header p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 68ch;
}

.menu-tip-card,
.info-card,
.stat-card,
.session-item {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(20, 54, 66, 0.1);
  background: rgba(255, 252, 246, 0.82);
}

.menu-tip-card {
  width: min(320px, 100%);
  padding: 16px 18px;
  box-shadow: 0 12px 26px rgba(20, 54, 66, 0.08);
}

.menu-tip-card strong,
.info-card strong {
  display: block;
  margin-bottom: 8px;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.menu-card {
  text-align: left;
  padding: 22px;
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.96), rgba(246, 244, 235, 0.92));
  border: 1px solid rgba(20, 54, 66, 0.1);
  box-shadow: var(--shadow);
  color: var(--ink);
  border-radius: var(--radius-xl);
  min-height: 230px;
}

.menu-card:hover {
  transform: translateY(-3px);
}

.menu-card-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  margin-bottom: 18px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 20px rgba(15, 118, 110, 0.18);
}

.menu-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
}

.menu-card p {
  margin: 0;
  line-height: 1.7;
  color: var(--ink-soft);
}

.view-grid {
  display: grid;
  gap: 18px;
}

.view-grid-two {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
}

.translation-layout {
  grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.1fr);
}

.view-grid-profile {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-wide {
  grid-column: 1 / -1;
}

.side-panel {
  align-self: start;
}

.note-stack {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.info-card {
  padding: 16px;
}

.info-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.accent-card {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.09), rgba(249, 115, 22, 0.09));
}

.panel {
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 22px;
}

.panel-header h2,
.sub-header h3,
.context-card h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.panel-header p,
.muted,
.note-block {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.stack {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.compact {
  gap: 10px;
}

label span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.field-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.required-mark {
  color: #d62828;
  font-weight: 700;
}

.required-note,
.helper-text {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.6;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(20, 54, 66, 0.18);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

textarea {
  resize: vertical;
  min-height: 96px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
  transform: translateY(-1px);
}

button {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 13px 18px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.primary-button {
  background: linear-gradient(135deg, var(--brand), #159a8d);
  color: white;
  box-shadow: 0 14px 24px rgba(15, 118, 110, 0.22);
}

.secondary-button {
  background: linear-gradient(135deg, var(--brand-2), #fb923c);
  color: white;
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.18);
}

.ghost-button {
  background: rgba(20, 54, 66, 0.08);
  color: var(--brand-3);
}

.mini-card,
.slide-preview,
.context-card,
.entry-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(20, 54, 66, 0.1);
  background: var(--surface-strong);
}

.mini-card,
.slide-preview,
.context-card {
  padding: 14px 16px;
}

.mini-card p {
  margin: 6px 0 0;
  line-height: 1.65;
}

.hidden {
  display: none !important;
}

.auth-tabs {
  display: inline-flex;
  gap: 8px;
  margin-top: 14px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(20, 54, 66, 0.06);
}

.tab {
  background: transparent;
  color: var(--ink-soft);
  padding: 10px 14px;
}

.tab.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(20, 54, 66, 0.08);
}

.upload-row,
.live-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.provider-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.provider-grid.provider-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.model-connection-panel {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.model-access-mode-panel,
.platform-billing-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 16px;
  background: rgba(15, 118, 110, 0.045);
}

.compact-panel-header {
  margin-bottom: 12px;
}

.compact-panel-header h4 {
  margin: 0;
}

.compact-panel-header p {
  margin: 5px 0 0;
}

.model-access-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.model-access-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
  cursor: pointer;
}

.model-access-option:has(input:checked) {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.1);
}

.model-access-option input {
  width: auto;
  margin-top: 3px;
}

.model-access-option strong,
.model-access-option small {
  display: block;
}

.model-access-option small {
  margin-top: 5px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.billing-account-topline,
.billing-recharge-box {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.billing-account-topline strong {
  display: block;
  margin-top: 4px;
  color: var(--brand-deep);
  font-size: 24px;
}

.billing-pricing {
  margin: 14px 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.billing-recharge-box label {
  flex: 1 1 220px;
}

.billing-orders {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.billing-record {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 5px 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.billing-record strong {
  color: var(--ink);
}

.billing-record span,
.billing-record small {
  color: var(--ink-soft);
}

.billing-payment-result {
  display: grid;
  justify-items: start;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
}

.billing-payment-result p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.billing-payment-link {
  display: inline-flex;
  text-decoration: none;
}

.billing-payment-qr {
  width: 240px;
  height: 240px;
  padding: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.billing-payment-code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.billing-payment-code-card {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  justify-items: center;
}

.billing-payment-code-card img {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #fff;
}

.billing-payment-code-card figcaption {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.billing-payment-confirmation {
  display: grid;
  gap: 12px;
  width: 100%;
  padding-top: 4px;
}

.billing-payment-confirmation label {
  display: grid;
  gap: 6px;
}

.billing-payment-confirmation input,
.billing-payment-confirmation select {
  width: 100%;
}

.billing-payment-proof-field small {
  color: var(--ink-soft);
  font-size: 12px;
}

.developer-payment-proof-actions {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.developer-payment-proof-preview {
  width: 100%;
}

.developer-payment-proof-preview img {
  display: block;
  width: min(100%, 360px);
  max-height: 520px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.developer-inline-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(180, 35, 24, 0.28);
  border-radius: 8px;
  background: rgba(180, 35, 24, 0.06);
  color: #9f241b !important;
  line-height: 1.5;
}

.account-recovery-card {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.account-recovery-card > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}

.verification-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.verification-grid h5 {
  margin: 0;
  font-size: 15px;
}

.developer-credit-form {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(150px, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.developer-access-form {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(140px, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.model-connection-window,
.model-routing-window {
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.055), rgba(255, 255, 255, 0.82));
  overflow: hidden;
}

.model-routing-window {
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.model-connection-window > summary,
.model-routing-window > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  cursor: pointer;
  list-style: none;
}

.model-connection-window > summary::-webkit-details-marker,
.model-routing-window > summary::-webkit-details-marker {
  display: none;
}

.model-connection-window > summary small {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-weight: 500;
}

.connection-summary-badge {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.model-connection-form,
.routing-content {
  padding: 0 16px 16px;
}

.connection-notice {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.16);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

.connection-steps,
.connection-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.connection-steps span,
.connection-check {
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.connection-check.is-ok {
  color: var(--success);
  border-color: rgba(36, 107, 80, 0.25);
  background: rgba(36, 107, 80, 0.08);
}

.connection-check.is-failed {
  color: #a13b2c;
  border-color: rgba(161, 59, 44, 0.25);
  background: rgba(161, 59, 44, 0.08);
}

.connection-suggestions {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

.browser-session-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--brand);
  color: var(--ink-soft);
  background: rgba(15, 118, 110, 0.06);
  font-size: 12px;
  line-height: 1.6;
}

.account-center-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.72);
  box-shadow: 0 10px 24px rgba(20, 54, 66, 0.08);
}

.account-center-tab {
  flex: 1 1 150px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--ink-soft);
}

.account-center-tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.2);
}

.account-security-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
  gap: 16px;
  margin-top: 16px;
}

.account-security-card {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.account-security-card h4,
.account-security-card p {
  margin-top: 0;
}

.account-security-heading,
.account-session-card,
.account-session-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-security-heading {
  align-items: flex-start;
}

.account-session-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.account-session-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 250, 240, 0.7);
}

.account-session-card.is-current {
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(15, 118, 110, 0.07);
}

.account-session-card p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.account-ai-panel-body .model-connection-panel {
  margin-top: 0;
}

.status-active {
  color: var(--success);
  background: rgba(36, 107, 80, 0.1);
}

.status-suspended {
  color: #a13b2c;
  background: rgba(161, 59, 44, 0.1);
}

.developer-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.developer-guide {
  display: grid;
  gap: 12px;
}

.developer-guide details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
  overflow: hidden;
}

.developer-guide summary {
  cursor: pointer;
  padding: 14px 16px;
  color: var(--brand-3);
  font-weight: 800;
}

.developer-guide details > :not(summary) {
  margin-left: 16px;
  margin-right: 16px;
}

.developer-guide ol {
  padding-left: 22px;
  color: var(--ink-soft);
  line-height: 1.75;
}

.module-apply-fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0;
  padding: 12px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.module-apply-fieldset legend {
  padding: 0 6px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.module-apply-fieldset label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}

.module-apply-fieldset input {
  width: auto;
}

.connection-actions {
  margin-top: 0;
}

.danger-button {
  color: #a13b2c;
  border-color: rgba(161, 59, 44, 0.22);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.slide-preview {
  margin-top: 16px;
  display: grid;
  gap: 10px;
  max-height: 240px;
  overflow: auto;
}

.deck-page-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.09), rgba(255, 255, 255, 0.78));
}

.deck-page-status > div {
  display: grid;
  gap: 4px;
}

.deck-status-label {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.deck-status-metrics {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 10px !important;
  flex-wrap: wrap;
}

.deck-status-metrics span,
.deck-status-metrics strong {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
}

.deck-status-metrics .warning-text {
  color: #9a4b22;
  background: rgba(249, 115, 22, 0.1);
}

.slides-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.slides-action-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(15, 118, 110, 0.055));
}

.slides-action-card.summary-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(249, 115, 22, 0.06));
}

.slides-action-card h4,
.slides-action-card p {
  margin: 0;
}

.slides-action-card p {
  margin-top: 6px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.action-number {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--brand);
  font-family: "Space Mono", monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.page-range-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 10px;
}

.range-separator {
  padding-bottom: 13px;
  color: var(--ink-soft);
  font-weight: 800;
}

.range-hint {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(20, 54, 66, 0.055);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.slide-explanation-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.page-explanation-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  background: rgba(255, 255, 255, 0.78);
}

.page-explanation-card p {
  color: var(--ink-soft);
  line-height: 1.75;
}

.page-explanation-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-explanation-heading span {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--brand);
  background: rgba(15, 118, 110, 0.1);
  font-size: 12px;
  font-weight: 800;
}

.page-key-points,
.agent-page-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.page-key-points span,
.agent-page-tags span {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--ink-soft);
  font-size: 12px;
}

.slides-detail-header {
  align-items: flex-start;
}

.slides-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.slides-detail-content {
  min-width: 0;
}

.slides-detail-content > * + * {
  margin-top: 16px;
}

.slides-detail-status.is-error {
  color: #8c2f20;
  border-color: rgba(180, 66, 44, 0.24);
  background: rgba(180, 66, 44, 0.08);
}

.slides-detail-notes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.slides-detail-actions {
  justify-content: flex-start;
}

.slides-detail-agent {
  position: sticky;
  top: 18px;
  padding: 0;
  overflow: hidden;
}

.slides-detail-agent .agent-shell {
  max-height: calc(100vh - 52px);
  min-height: 660px;
}

.slides-detail-agent .agent-messages {
  min-height: 320px;
}

.agent-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: min(840px, calc(100vh - 28px));
  padding: 0;
  border: 0;
  border-radius: 26px;
  color: var(--ink);
  background: var(--surface-strong);
  box-shadow: 0 28px 80px rgba(20, 54, 66, 0.3);
  overflow: hidden;
}

.agent-dialog::backdrop {
  background: rgba(15, 35, 42, 0.55);
  backdrop-filter: blur(8px);
}

.agent-shell {
  display: grid;
  grid-template-rows: auto minmax(260px, 1fr) auto;
  max-height: min(840px, calc(100vh - 28px));
}

.agent-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(249, 115, 22, 0.08));
}

.agent-header h3,
.agent-header p {
  margin: 0;
}

.agent-header > div > p:last-child {
  margin-top: 7px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.agent-close-button {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  font-size: 24px;
}

.agent-messages {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 20px;
  overflow-y: auto;
  background:
    linear-gradient(rgba(20, 54, 66, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 54, 66, 0.025) 1px, transparent 1px);
  background-size: 20px 20px;
}

.agent-message {
  width: min(88%, 620px);
  padding: 14px 16px;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(20, 54, 66, 0.07);
}

.agent-message span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

.agent-message p {
  margin: 7px 0 0;
  line-height: 1.75;
  white-space: pre-wrap;
}

.assistant-message {
  justify-self: start;
  background: white;
  border: 1px solid rgba(15, 118, 110, 0.12);
}

.user-message {
  justify-self: end;
  color: white;
  background: linear-gradient(135deg, var(--brand), #169b8f);
}

.user-message span {
  color: rgba(255, 255, 255, 0.78);
}

.agent-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.agent-suggestions button {
  padding: 7px 10px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.06);
  color: var(--ink-soft);
  font-size: 12px;
}

.agent-composer {
  display: grid;
  gap: 9px;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.96);
}

.agent-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.agent-composer-footer span {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.slide-preview.empty,
.mini-card.empty {
  color: var(--ink-soft);
}

.slide-card {
  padding: 12px;
  border-radius: 16px;
  background: rgba(15, 118, 110, 0.06);
  border: 1px solid rgba(15, 118, 110, 0.12);
}

.slide-card strong {
  display: block;
  margin-bottom: 6px;
}

.subtitle-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 18px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(20, 54, 66, 0.1);
  background: rgba(255, 252, 246, 0.72);
  min-height: 180px;
  font-size: 22px;
  line-height: 1.7;
  font-weight: 700;
}

.subtitle-board[data-layout="bilingual-split"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.subtitle-board[data-layout="translation-only"] .subtitle-language-panel-source,
.subtitle-board[data-layout="source-only"] .subtitle-language-panel-translation {
  display: none;
}

.subtitle-language-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 76px;
  padding: 14px 16px;
  border: 1px solid rgba(20, 54, 66, 0.1);
  border-radius: 6px;
}

.subtitle-language-panel-source {
  border-left: 4px solid var(--brand);
  background: rgba(15, 118, 110, 0.07);
}

.subtitle-language-panel-translation {
  border-left: 4px solid var(--brand-2);
  background: rgba(249, 115, 22, 0.08);
}

.subtitle-language-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
}

.subtitle-board.empty {
  color: var(--ink-soft);
  font-weight: 600;
}

.subtitle-board.subtitle-mode {
  font-size: 28px;
  letter-spacing: 0;
}

.subtitle-source,
.subtitle-translation {
  margin: 0;
}

.subtitle-source {
  color: var(--ink-soft);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.subtitle-translation {
  font-size: 24px;
  overflow-wrap: anywhere;
}

.subtitle-board.subtitle-mode .subtitle-source {
  font-size: 22px;
}

.subtitle-board.subtitle-mode .subtitle-translation {
  font-size: 30px;
}

.subtitle-cursor::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 5px;
  vertical-align: -0.1em;
  background: currentColor;
  animation: subtitle-cursor 0.8s steps(1) infinite;
}

@keyframes subtitle-cursor {
  50% {
    opacity: 0;
  }
}

.realtime-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  margin: 12px 0 4px;
}

.external-subtitle-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 16px 0 20px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.external-subtitle-actions strong,
.external-subtitle-actions p {
  display: block;
  margin: 0;
}

.external-subtitle-actions p {
  margin-top: 4px;
}

.external-subtitle-actions .live-controls {
  flex: 0 0 auto;
  margin: 0;
}

.external-subtitle-actions button {
  min-width: 172px;
}

.low-latency-settings {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(280px, 1.3fr);
  align-items: end;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.low-latency-settings p {
  margin: 7px 0 0;
  line-height: 1.5;
}

.low-latency-settings button {
  min-width: 180px;
}

.speech-preview {
  min-height: 54px;
  margin: 14px 0 18px;
  padding: 12px 14px;
  border-left: 3px solid var(--brand);
  background: rgba(15, 118, 110, 0.06);
  color: var(--ink);
  line-height: 1.65;
}

.speech-preview.empty {
  color: var(--ink-soft);
}

.slide-tracking-heading {
  align-items: center;
  margin-bottom: 12px;
}

.slide-tracking-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.slide-stepper {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.slide-stepper button {
  width: 100%;
}

.camera-tracker {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.camera-tracker > summary {
  cursor: pointer;
  color: var(--brand-3);
  font-weight: 750;
}

.camera-tracker-body {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.camera-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #142f37;
  object-fit: cover;
}

.compact-controls {
  gap: 8px;
}

.compact-controls button {
  flex: 1 1 120px;
}

.camera-auto-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 13px;
}

.camera-auto-toggle input {
  width: 18px;
  height: 18px;
}

.resource-search-panel {
  margin-top: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 8%, rgba(249, 115, 22, 0.16), transparent 24%),
    linear-gradient(135deg, rgba(255, 250, 240, 0.98), rgba(237, 247, 241, 0.94));
}

.resource-search-panel[data-live-panel] {
  margin-top: 0;
}

.resource-search-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.resource-search-header h3 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 34px);
}

.resource-search-header p:not(.view-kicker) {
  margin: 0;
  color: var(--ink-soft);
  max-width: 760px;
}

.resource-free-badge {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 999px;
  color: #165a43;
  background: rgba(36, 107, 80, 0.1);
  border: 1px solid rgba(36, 107, 80, 0.18);
  font-size: 13px;
  font-weight: 700;
}

.resource-search-form {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.resource-query-field {
  min-width: 0;
}

.resource-search-form .primary-button {
  min-height: 48px;
}

.resource-context-toggle {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 14px;
}

.resource-context-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.resource-search-status {
  margin-top: 16px;
}

.resource-quick-links {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.resource-quick-link {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 118, 110, 0.16);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.resource-quick-link:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.4);
  box-shadow: 0 10px 24px rgba(20, 54, 66, 0.1);
}

.resource-quick-link span {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.resource-results {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.resource-results.empty {
  display: block;
  padding: 18px;
  border: 1px dashed rgba(20, 54, 66, 0.18);
  border-radius: var(--radius-lg);
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.45);
}

.resource-card {
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 17px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(20, 54, 66, 0.11);
  background: rgba(255, 252, 246, 0.94);
  box-shadow: 0 10px 28px rgba(20, 54, 66, 0.08);
}

.resource-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.resource-source,
.resource-type {
  font-size: 12px;
  font-weight: 700;
}

.resource-source {
  color: var(--brand);
}

.resource-type {
  padding: 5px 8px;
  border-radius: 999px;
  color: #9a4513;
  background: rgba(249, 115, 22, 0.1);
}

.resource-card h4 {
  margin: 14px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.resource-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.resource-metadata {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 13px;
}

.resource-card > a {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 16px;
  color: var(--brand-3);
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.live-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.6fr 0.9fr;
  gap: 16px;
}

.stream-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  max-height: 860px;
  overflow: auto;
  padding-right: 6px;
}

.compact-list {
  max-height: 540px;
}

.entry-card {
  padding: 16px;
  animation: rise-in 260ms ease;
}

.entry-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.entry-provider {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--success);
  font-weight: 700;
}

.entry-source {
  font-weight: 600;
  line-height: 1.55;
  margin: 0 0 10px;
}

.entry-block {
  padding-top: 10px;
  border-top: 1px dashed rgba(20, 54, 66, 0.12);
  margin-top: 10px;
}

.entry-block h4 {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--brand-3);
}

.entry-block p {
  margin: 0;
  line-height: 1.65;
}

.feedback-widget {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(20, 54, 66, 0.1);
}

.feedback-header,
.feedback-actions,
.feedback-form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.feedback-header {
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

.feedback-hint {
  font-weight: 500;
  color: var(--ink-soft);
  opacity: 0.78;
}

.feedback-actions {
  margin-top: 9px;
}

.feedback-button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 10px;
  background: rgba(15, 118, 110, 0.06);
  color: var(--brand-3);
  font-size: 12px;
  font-weight: 800;
}

.feedback-button:hover {
  background: rgba(15, 118, 110, 0.13);
}

.feedback-button-warn {
  border-color: rgba(249, 115, 22, 0.24);
  background: rgba(249, 115, 22, 0.07);
  color: #9a3412;
}

.feedback-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(249, 115, 22, 0.18);
  border-radius: 13px;
  background: rgba(255, 250, 240, 0.82);
}

.feedback-form .field-label {
  font-size: 12px;
}

.feedback-form-actions {
  justify-content: flex-end;
}

.feedback-form-actions .primary-button,
.feedback-form-actions .ghost-button {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 12px;
}

.feedback-submitted {
  padding: 9px 11px;
  border: 1px solid rgba(36, 107, 80, 0.18);
  border-radius: 10px;
  background: rgba(36, 107, 80, 0.07);
}

.feedback-status {
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
}

.context-column {
  display: grid;
  gap: 12px;
}

.tag-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.12);
  color: #9a3412;
  font-size: 13px;
}

.note-block {
  min-height: 92px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.stat-card {
  padding: 16px;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.stat-card strong {
  font-size: 24px;
}

.session-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.session-list.empty {
  color: var(--ink-soft);
  line-height: 1.7;
}

.session-item {
  text-align: left;
  padding: 16px;
  background: rgba(255, 255, 255, 0.8);
}

.session-item strong,
.session-item span {
  display: block;
}

.session-item strong {
  margin-bottom: 6px;
}

.session-item span {
  color: var(--ink-soft);
  line-height: 1.6;
}

.developer-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.developer-list.empty {
  color: var(--ink-soft);
  line-height: 1.7;
}

.developer-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.developer-health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.developer-health-card {
  min-height: 126px;
  padding: 14px;
  border: 1px solid rgba(20, 54, 66, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
}

.developer-health-card p {
  margin: 10px 0 0;
  color: var(--ink);
  font-weight: 800;
}

.developer-health-card small {
  display: block;
  margin-top: 6px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.developer-health-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.developer-health-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: #64748b;
}

.developer-health-card.status-ok .developer-health-dot {
  background: #15803d;
}

.developer-health-card.status-warning .developer-health-dot {
  background: #ca8a04;
}

.developer-health-card.status-error .developer-health-dot {
  background: #b42318;
}

.developer-health-card.status-error {
  border-color: rgba(180, 35, 24, 0.34);
  background: rgba(180, 35, 24, 0.045);
}

.developer-health-card.status-warning {
  border-color: rgba(202, 138, 4, 0.3);
  background: rgba(202, 138, 4, 0.045);
}

.developer-filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.developer-filter-row label {
  display: grid;
  gap: 6px;
}

.developer-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.developer-pagination .helper-text {
  margin: 0;
}

.developer-tab {
  padding: 10px 14px;
  background: rgba(20, 54, 66, 0.08);
  color: var(--ink-soft);
}

.developer-tab.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(20, 54, 66, 0.08);
}

.developer-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(20, 54, 66, 0.1);
  background: rgba(255, 255, 255, 0.82);
}

.developer-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.developer-card strong {
  display: block;
}

.developer-card-subtitle {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.developer-card p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.developer-user-summary {
  color: var(--ink) !important;
  font-weight: 700;
}

.developer-user-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(20, 54, 66, 0.1);
}

.developer-user-details[open] summary {
  margin-bottom: 10px;
}

.translation-stage-panel .mini-card,
.translation-stage-panel .subtitle-board {
  margin-top: 16px;
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--brand-3);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.developer-pre {
  margin: 18px 0 0;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(20, 54, 66, 0.1);
  background: rgba(20, 54, 66, 0.92);
  color: #f4efe5;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.65;
  overflow: auto;
  max-height: 520px;
  white-space: pre-wrap;
  word-break: break-word;
}

.developer-details summary {
  cursor: pointer;
  color: var(--brand-3);
  font-weight: 700;
}

input[readonly] {
  background: rgba(20, 54, 66, 0.05);
  color: var(--ink-soft);
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 54, 66, 0.42);
  backdrop-filter: blur(10px);
}

.auth-gate.hidden {
  display: none;
}

.auth-gate-card {
  width: min(520px, 100%);
  padding: 28px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(20, 54, 66, 0.1);
  background: rgba(255, 252, 246, 0.96);
  box-shadow: 0 22px 48px rgba(20, 54, 66, 0.18);
}

.auth-gate-card h3 {
  margin: 0 0 12px;
  font-size: 28px;
  font-family: Georgia, "STZhongsong", "Microsoft YaHei", serif;
}

.auth-gate-card p:last-of-type {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: grid;
  width: min(420px, calc(100vw - 32px));
  gap: 10px;
  pointer-events: none;
}

.toast-notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 14px 14px 14px 16px;
  border: 1px solid rgba(20, 54, 66, 0.16);
  border-left: 4px solid var(--brand-3);
  border-radius: 8px;
  background: rgba(255, 252, 246, 0.98);
  box-shadow: 0 16px 34px rgba(20, 54, 66, 0.2);
  pointer-events: auto;
  animation: toast-in 180ms ease-out;
}

.toast-notice p {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.toast-success {
  border-left-color: var(--success);
}

.toast-error {
  border-left-color: #b42318;
  background: rgba(255, 248, 246, 0.98);
}

.toast-close {
  min-height: 32px;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  color: var(--ink-soft);
  background: transparent;
}

.toast-close:hover {
  color: var(--ink);
  background: rgba(20, 54, 66, 0.07);
}

.toast-notice.is-repeated {
  animation: toast-repeat 180ms ease-out;
}

.toast-notice.is-leaving {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.asr-retry-button {
  margin-top: 4px;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes toast-repeat {
  50% {
    transform: translateY(-2px);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .live-grid {
    grid-template-columns: 1fr;
  }

  .resource-quick-links,
  .resource-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    flex-direction: column;
  }

  .translation-layout,
  .menu-grid,
  .view-grid-two,
  .view-grid-profile {
    grid-template-columns: 1fr;
  }

  .slides-action-grid {
    grid-template-columns: 1fr;
  }

  .slides-detail-layout {
    grid-template-columns: 1fr;
  }

  .slides-detail-agent {
    position: static;
  }

  .slides-detail-agent .agent-shell {
    min-height: 560px;
    max-height: none;
  }

  .account-security-grid {
    grid-template-columns: 1fr;
  }

  .menu-intro,
  .view-header {
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 20px, 100%);
    padding-top: 20px;
  }

  .hero,
  .panel {
    padding: 18px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .top-nav {
    border-radius: 24px;
  }

  .nav-link {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .developer-health-grid,
  .developer-filter-row {
    grid-template-columns: 1fr;
  }

  .developer-pagination {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .provider-grid {
    grid-template-columns: 1fr;
  }

  .model-access-options {
    grid-template-columns: 1fr;
  }

  .billing-account-topline,
  .billing-recharge-box {
    align-items: stretch;
    flex-direction: column;
  }

  .billing-payment-code-grid {
    grid-template-columns: 1fr;
  }

  .developer-credit-form {
    grid-template-columns: 1fr;
  }

  .developer-access-form,
  .verification-grid {
    grid-template-columns: 1fr;
  }

  .account-session-card,
  .account-security-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .connection-steps,
  .connection-checklist {
    grid-template-columns: 1fr;
  }

  .deck-page-status,
  .agent-composer-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .deck-status-metrics {
    justify-content: flex-start;
  }

  .agent-message {
    width: 94%;
  }

  .slides-detail-notes {
    grid-template-columns: 1fr;
  }

  .subtitle-board {
    grid-template-columns: minmax(0, 1fr) !important;
    font-size: 18px;
    padding: 8px;
  }

  .subtitle-board.subtitle-mode .subtitle-source,
  .subtitle-board.subtitle-mode .subtitle-translation {
    font-size: 20px;
  }

  .realtime-status-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .external-subtitle-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .external-subtitle-actions .live-controls {
    width: 100%;
  }

  .external-subtitle-actions button {
    width: 100%;
    min-width: 0;
  }

  .low-latency-settings {
    grid-template-columns: 1fr;
  }

  .low-latency-settings button {
    width: 100%;
    min-width: 0;
  }

  .slide-tracking-controls {
    grid-template-columns: 1fr;
  }

  .slide-stepper {
    grid-column: 1;
  }

  .resource-search-header {
    flex-direction: column;
  }

  .resource-search-form {
    grid-template-columns: 1fr;
  }

  .resource-search-form .primary-button,
  .resource-quick-links,
  .resource-results {
    width: 100%;
    grid-template-columns: 1fr;
  }
}

/* Visual refresh: a quiet study-workbench treatment with less decorative chrome. */
:root {
  --bg: #f3f5f7;
  --bg-2: #edf1f4;
  --surface: #ffffff;
  --surface-strong: #fbfcfd;
  --ink: #1f2d38;
  --ink-soft: #657582;
  --line: #d8e0e6;
  --brand: #235d82;
  --brand-2: #c76843;
  --brand-3: #194762;
  --success: #2d7657;
  --shadow: 0 8px 24px rgba(31, 52, 67, 0.07);
  --radius-xl: 16px;
  --radius-lg: 12px;
  --radius-md: 8px;
}

body {
  font-family: "Aptos", "Noto Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
}

body::before {
  display: none;
}

.page-shell {
  width: min(1320px, calc(100vw - 40px));
  padding-top: 22px;
}

.hero {
  position: relative;
  padding: 22px 0 24px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.hero::after {
  display: none;
}

.hero::before {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 156px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0 56%, var(--brand-2) 56% 80%, #5d8c70 80%);
}

.eyebrow,
.menu-kicker,
.view-kicker {
  letter-spacing: 0.08em;
  font-weight: 800;
  color: var(--brand);
}

.hero h1 {
  max-width: none;
  font-family: "Aptos Display", "Noto Sans SC", "Microsoft YaHei UI", sans-serif;
  font-size: clamp(30px, 3vw, 44px);
  letter-spacing: 0;
}

.hero-copy {
  max-width: 72ch;
  font-size: 15px;
}

.hero-status {
  align-items: center;
}

.pill {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.pill::before {
  width: 6px;
  height: 6px;
  box-shadow: none;
}

.pill-muted {
  background: #f7f9fa;
}

.top-nav {
  gap: 4px;
  margin-top: 14px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 7px;
  color: var(--ink-soft);
  font-size: 14px;
}

.nav-link:hover {
  background: #f1f5f7;
}

.nav-link.active {
  background: #e8f0f5;
  color: var(--brand-3);
  box-shadow: none;
}

.workspace {
  margin-top: 26px;
}

.menu-intro,
.view-header {
  margin-bottom: 20px;
}

.menu-intro h2,
.view-header h2 {
  font-family: "Aptos Display", "Noto Sans SC", "Microsoft YaHei UI", sans-serif;
  font-size: 30px;
  letter-spacing: 0;
}

.menu-tip-card {
  width: min(360px, 100%);
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand-2);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.menu-grid {
  gap: 12px;
}

.menu-card {
  position: relative;
  overflow: hidden;
  min-height: 174px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.menu-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 18px;
  left: 18px;
  height: 3px;
  background: var(--brand);
}

.menu-card:nth-child(2)::before {
  background: var(--brand-2);
}

.menu-card:nth-child(3)::before {
  background: #5d8c70;
}

.menu-card:nth-child(4)::before {
  background: #b28a39;
}

.menu-card:hover {
  transform: none;
  border-color: #9ab5c6;
  box-shadow: 0 8px 20px rgba(31, 52, 67, 0.08);
}

.menu-card-index {
  width: 32px;
  height: 28px;
  margin-bottom: 20px;
  border: 1px solid #9ab5c6;
  border-radius: 5px;
  color: var(--brand-3);
  background: #eef4f7;
  box-shadow: none;
  font-size: 12px;
}

.menu-card strong {
  margin-bottom: 8px;
  font-size: 19px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.panel-header h2,
.sub-header h3,
.context-card h3 {
  font-family: "Aptos Display", "Noto Sans SC", "Microsoft YaHei UI", sans-serif;
}

.info-card,
.mini-card,
.slide-preview,
.context-card,
.entry-card,
.stat-card,
.session-item {
  border-radius: 9px;
  border-color: var(--line);
  background: var(--surface-strong);
}

.accent-card {
  border-left: 3px solid var(--brand);
  background: #f1f6f8;
}

input,
select,
textarea {
  border-color: #cbd6de;
  border-radius: 7px;
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(35, 93, 130, 0.13);
  transform: none;
}

button {
  border-radius: 7px;
  padding: 11px 15px;
}

button:hover {
  transform: none;
}

.primary-button,
.secondary-button {
  box-shadow: none;
}

.primary-button {
  background: var(--brand);
}

.primary-button:hover {
  background: #194b6a;
}

.secondary-button {
  background: var(--brand-2);
}

.secondary-button:hover {
  background: #ad5437;
}

.ghost-button {
  border: 1px solid #cbd6de;
  background: #f5f7f8;
  color: var(--brand-3);
}

.ghost-button:hover {
  background: #eaf0f3;
}

.auth-tabs,
.account-center-nav,
.developer-tabs {
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f7f9fa;
}

.tab,
.account-center-tab,
.developer-tab {
  border-radius: 6px;
  box-shadow: none;
}

.tab.active,
.account-center-tab.active,
.developer-tab.active {
  background: #e8f0f5;
  color: var(--brand-3);
  box-shadow: none;
}

.model-connection-window,
.model-routing-window,
.slides-action-card,
.resource-search-panel,
.agent-header {
  background: #fff;
}

.user-message {
  background: var(--brand);
}

.developer-card,
.developer-health-card {
  border-radius: 9px;
  background: #fff;
  box-shadow: none;
}

.auth-gate {
  background: rgba(31, 45, 56, 0.34);
  backdrop-filter: blur(5px);
}

.auth-gate-card {
  width: min(480px, 100%);
  padding: 24px;
  border-radius: 12px;
  border-color: var(--line);
  background: #fff;
  box-shadow: 0 16px 36px rgba(31, 52, 67, 0.16);
}

.auth-gate-card h3 {
  margin-bottom: 8px;
  font-family: "Aptos Display", "Noto Sans SC", "Microsoft YaHei UI", sans-serif;
  font-size: 26px;
  letter-spacing: 0;
}

.mini-pill {
  border-radius: 6px;
  background: #edf4f7;
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 20px, 100%);
  }

  .hero,
  .panel {
    padding: 18px;
  }

  .hero {
    padding-left: 0;
    padding-right: 0;
  }

  .hero::before {
    width: 118px;
  }

  .top-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    border-radius: 9px;
  }

  .top-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 10px 8px;
    font-size: 13px;
  }
}

/* Visual polish: slightly warmer accents while keeping the app work-focused. */
:root {
  --accent-green: #5f8f78;
  --accent-gold: #b88a35;
  --surface-warm: #fffdf8;
  --surface-blue: #f2f7fa;
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74) 0, rgba(255, 255, 255, 0) 230px),
    repeating-linear-gradient(90deg, rgba(35, 93, 130, 0.035) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(0deg, rgba(31, 45, 56, 0.026) 0 1px, transparent 1px 36px),
    linear-gradient(180deg, #f6f8fa 0%, #edf3f6 48%, #f5f1e9 100%);
}

body::before {
  display: none;
}

.hero {
  padding-top: 26px;
}

.hero::before {
  height: 4px;
  background: linear-gradient(90deg, var(--brand) 0 46%, var(--brand-2) 46% 65%, var(--accent-green) 65% 82%, var(--accent-gold) 82%);
}

.hero-copy {
  color: #516878;
}

.top-nav {
  border-color: #cad8e1;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(31, 52, 67, 0.06);
}

.nav-link.active,
.tab.active,
.account-center-tab.active,
.developer-tab.active {
  background: linear-gradient(180deg, #edf6fa, #e5eff4);
}

.menu-tip-card,
.panel,
.menu-card,
.mini-card,
.context-card,
.entry-card,
.stat-card,
.session-item,
.developer-card,
.developer-health-card,
.model-connection-window,
.model-routing-window,
.slides-action-card,
.resource-search-panel {
  border-color: #ccd9e1;
}

.menu-card,
.panel,
.developer-card,
.developer-health-card {
  box-shadow: 0 12px 30px rgba(31, 52, 67, 0.075);
}

.menu-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 253, 255, 0.96)),
    linear-gradient(135deg, rgba(35, 93, 130, 0.08), transparent 42%);
}

.menu-card::before {
  right: 0;
  left: 0;
  height: 4px;
}

.menu-card::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 42px;
  height: 42px;
  border-right: 2px solid rgba(35, 93, 130, 0.16);
  border-bottom: 2px solid rgba(35, 93, 130, 0.16);
  pointer-events: none;
}

.menu-card:nth-child(2)::after {
  border-color: rgba(199, 104, 67, 0.2);
}

.menu-card:nth-child(3)::after {
  border-color: rgba(95, 143, 120, 0.22);
}

.menu-card:nth-child(4)::after {
  border-color: rgba(184, 138, 53, 0.24);
}

.menu-card:hover {
  border-color: #9db7c8;
  box-shadow: 0 16px 34px rgba(31, 52, 67, 0.1);
}

.panel {
  background:
    linear-gradient(90deg, var(--brand) 0 12%, var(--brand-2) 12% 18%, var(--accent-green) 18% 24%, transparent 24%) top left / 100% 3px no-repeat,
    linear-gradient(180deg, var(--surface), #fbfcfd);
}

.panel-header h3,
.sub-header h3 {
  color: #173040;
}

.mini-card,
.context-card,
.entry-card,
.stat-card,
.session-item {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 253, 254, 0.96)),
    var(--surface-strong);
}

.mini-card.empty,
.developer-list.empty,
.deck-page-status.empty,
.slide-preview.empty {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.95), rgba(246, 250, 251, 0.95)),
    var(--surface-warm);
}

.stat-card {
  border-left: 3px solid rgba(35, 93, 130, 0.28);
}

.stat-card:nth-child(2n) {
  border-left-color: rgba(199, 104, 67, 0.28);
}

.stat-card:nth-child(3n) {
  border-left-color: rgba(95, 143, 120, 0.32);
}

.account-center-nav,
.developer-tabs,
.auth-tabs {
  background: linear-gradient(180deg, #fbfdfe, #f1f6f8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.model-access-mode-panel,
.platform-billing-panel {
  border-color: rgba(35, 93, 130, 0.2);
  background:
    linear-gradient(135deg, rgba(35, 93, 130, 0.075), rgba(184, 138, 53, 0.055)),
    #fbfcfd;
}

.model-access-option:has(input:checked) {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(35, 93, 130, 0.11);
}

input,
select,
textarea {
  background: linear-gradient(180deg, #ffffff, #fcfdfd);
}

.primary-button {
  background: linear-gradient(180deg, #27688f, var(--brand));
  box-shadow: 0 8px 18px rgba(35, 93, 130, 0.14);
}

.primary-button:hover {
  background: linear-gradient(180deg, #2d739d, #1e5477);
}

.secondary-button {
  background: linear-gradient(180deg, #d27751, var(--brand-2));
  box-shadow: 0 8px 18px rgba(199, 104, 67, 0.13);
}

.secondary-button:hover {
  background: linear-gradient(180deg, #c66a46, #a85335);
}

.ghost-button {
  background: linear-gradient(180deg, #ffffff, #f2f6f8);
}

.developer-card,
.developer-health-card {
  background:
    linear-gradient(90deg, rgba(35, 93, 130, 0.12), transparent 42%) top left / 100% 3px no-repeat,
    #fff;
}

.developer-card:nth-child(2n),
.developer-health-card:nth-child(2n) {
  background:
    linear-gradient(90deg, rgba(199, 104, 67, 0.14), transparent 42%) top left / 100% 3px no-repeat,
    #fff;
}

@media (max-width: 720px) {
  body {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.76) 0, rgba(255, 255, 255, 0) 220px),
      repeating-linear-gradient(0deg, rgba(31, 45, 56, 0.026) 0 1px, transparent 1px 32px),
      linear-gradient(180deg, #f6f8fa 0%, #edf3f6 50%, #f5f1e9 100%);
  }

  .menu-card::after {
    width: 32px;
    height: 32px;
    right: 14px;
    bottom: 14px;
  }

  .menu-card,
  .panel,
  .developer-card,
  .developer-health-card {
    box-shadow: 0 8px 20px rgba(31, 52, 67, 0.07);
  }
}

html[data-theme="dark"] {
  --bg: #05070a;
  --bg-2: #0a0f14;
  --surface: #101820;
  --surface-strong: #131e27;
  --surface-warm: #171b1e;
  --surface-blue: #111f2a;
  --ink: #f4f7fb;
  --ink-soft: #aebdca;
  --line: rgba(213, 225, 235, 0.18);
  --brand: #62b7f0;
  --brand-2: #f19a6b;
  --brand-3: #cbeaff;
  --success: #72d6a8;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  color-scheme: dark;
}

html[data-theme="dark"] body {
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(40, 65, 82, 0.35) 0, rgba(5, 7, 10, 0) 240px),
    repeating-linear-gradient(90deg, rgba(194, 220, 238, 0.045) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(0deg, rgba(194, 220, 238, 0.03) 0 1px, transparent 1px 38px),
    #05070a;
}

html[data-theme="dark"] .hero {
  border-bottom-color: rgba(213, 225, 235, 0.18);
}

html[data-theme="dark"] .hero-copy,
html[data-theme="dark"] .menu-intro p,
html[data-theme="dark"] .view-header p,
html[data-theme="dark"] .panel-header p,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .note-block,
html[data-theme="dark"] .helper-text,
html[data-theme="dark"] .required-note,
html[data-theme="dark"] .menu-card p,
html[data-theme="dark"] .info-card p,
html[data-theme="dark"] .developer-card p,
html[data-theme="dark"] .developer-card-subtitle,
html[data-theme="dark"] .model-access-option small,
html[data-theme="dark"] .billing-record span,
html[data-theme="dark"] .billing-record small,
html[data-theme="dark"] label span {
  color: var(--ink-soft);
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] strong,
html[data-theme="dark"] .panel-header h3,
html[data-theme="dark"] .sub-header h3,
html[data-theme="dark"] .context-card h3,
html[data-theme="dark"] .compact-panel-header h4 {
  color: var(--ink);
}

html[data-theme="dark"] .top-nav,
html[data-theme="dark"] .pill,
html[data-theme="dark"] .theme-toggle-button,
html[data-theme="dark"] .menu-tip-card,
html[data-theme="dark"] .menu-card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .mini-card,
html[data-theme="dark"] .slide-preview,
html[data-theme="dark"] .context-card,
html[data-theme="dark"] .entry-card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .session-item,
html[data-theme="dark"] .developer-card,
html[data-theme="dark"] .developer-health-card,
html[data-theme="dark"] .model-connection-window,
html[data-theme="dark"] .model-routing-window,
html[data-theme="dark"] .slides-action-card,
html[data-theme="dark"] .resource-search-panel,
html[data-theme="dark"] .billing-record,
html[data-theme="dark"] .billing-payment-result,
html[data-theme="dark"] .billing-payment-code-card,
html[data-theme="dark"] .account-recovery-card,
html[data-theme="dark"] .auth-gate-card {
  border-color: var(--line);
  background-color: var(--surface);
  color: var(--ink);
}

html[data-theme="dark"] .top-nav,
html[data-theme="dark"] .auth-tabs,
html[data-theme="dark"] .account-center-nav,
html[data-theme="dark"] .developer-tabs {
  background: rgba(13, 22, 30, 0.92);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .nav-link,
html[data-theme="dark"] .tab,
html[data-theme="dark"] .account-center-tab,
html[data-theme="dark"] .developer-tab {
  color: var(--ink-soft);
}

html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .ghost-button:hover {
  background: rgba(120, 170, 205, 0.14);
}

html[data-theme="dark"] .nav-link.active,
html[data-theme="dark"] .tab.active,
html[data-theme="dark"] .account-center-tab.active,
html[data-theme="dark"] .developer-tab.active,
html[data-theme="dark"] .mini-pill {
  background: rgba(98, 183, 240, 0.16);
  color: var(--brand-3);
}

html[data-theme="dark"] .panel {
  background:
    linear-gradient(90deg, var(--brand) 0 12%, var(--brand-2) 12% 18%, var(--accent-green) 18% 24%, transparent 24%) top left / 100% 3px no-repeat,
    linear-gradient(180deg, #101820, #0d141b);
}

html[data-theme="dark"] .menu-card {
  background:
    linear-gradient(180deg, rgba(18, 28, 37, 0.98), rgba(13, 20, 27, 0.98)),
    linear-gradient(135deg, rgba(98, 183, 240, 0.08), transparent 42%);
}

html[data-theme="dark"] .menu-card:hover {
  border-color: rgba(98, 183, 240, 0.45);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.36);
}

html[data-theme="dark"] .menu-card-index {
  border-color: rgba(98, 183, 240, 0.42);
  background: rgba(98, 183, 240, 0.12);
  color: var(--brand-3);
}

html[data-theme="dark"] .menu-card::after {
  opacity: 0.72;
}

html[data-theme="dark"] .menu-tip-card {
  background: #101820;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .mini-card,
html[data-theme="dark"] .context-card,
html[data-theme="dark"] .entry-card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .session-item,
html[data-theme="dark"] .developer-card,
html[data-theme="dark"] .developer-health-card {
  background:
    linear-gradient(180deg, rgba(19, 30, 39, 0.98), rgba(15, 23, 31, 0.98)),
    var(--surface-strong);
}

html[data-theme="dark"] .mini-card.empty,
html[data-theme="dark"] .developer-list.empty,
html[data-theme="dark"] .deck-page-status.empty,
html[data-theme="dark"] .slide-preview.empty {
  background: #0d141b;
  color: var(--ink-soft);
}

html[data-theme="dark"] .accent-card,
html[data-theme="dark"] .model-access-mode-panel,
html[data-theme="dark"] .platform-billing-panel {
  background:
    linear-gradient(135deg, rgba(98, 183, 240, 0.12), rgba(241, 154, 107, 0.08)),
    #0f171f;
  border-color: rgba(98, 183, 240, 0.22);
}

html[data-theme="dark"] .account-recovery-card {
  background: #101820;
}

html[data-theme="dark"] .account-recovery-card > summary {
  color: var(--ink);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .developer-pre {
  border-color: rgba(213, 225, 235, 0.2);
  background: #090f15;
  color: var(--ink);
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #7f93a3;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
  border-color: rgba(98, 183, 240, 0.74);
  box-shadow: 0 0 0 3px rgba(98, 183, 240, 0.16);
}

html[data-theme="dark"] .primary-button {
  background: linear-gradient(180deg, #2f8fc9, #236e9b);
  color: #fff;
  box-shadow: 0 10px 24px rgba(47, 143, 201, 0.18);
}

html[data-theme="dark"] .secondary-button {
  background: linear-gradient(180deg, #df845a, #b96543);
  color: #fff;
  box-shadow: 0 10px 24px rgba(223, 132, 90, 0.16);
}

html[data-theme="dark"] .ghost-button {
  border-color: rgba(213, 225, 235, 0.2);
  background: #111a22;
  color: var(--brand-3);
}

html[data-theme="dark"] .theme-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid rgba(213, 225, 235, 0.22);
  border-radius: 6px;
  background: #111a22;
  color: var(--brand-3);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

html[data-theme="dark"] .theme-toggle-button::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-2);
}

html[data-theme="dark"] .subtitle-board,
html[data-theme="dark"] .subtitle-language-panel,
html[data-theme="dark"] .agent-message,
html[data-theme="dark"] .resource-result,
html[data-theme="dark"] .toast {
  border-color: var(--line);
  background: #0b1218;
  color: var(--ink);
}

html[data-theme="dark"] .user-message {
  background: #236e9b;
}

html[data-theme="dark"] .auth-gate {
  background: rgba(0, 0, 0, 0.62);
}

.theme-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.theme-toggle-button::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-3);
}

.theme-toggle-button:hover {
  border-color: #9db7c8;
  color: var(--brand-3);
}


.connection-check.is-warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #92400e;
}
