:root {
  --bg: #f5eddf;
  --surface: #fffaf0;
  --surface-subtle: #fbf2e3;
  --ink: #29211a;
  --muted: #786b5b;
  --line: #e8d9c3;
  --line-strong: #d7c2a5;
  --accent: #9a5b22;
  --accent-dark: #7a4218;
  --success: #7c5a20;
  --warning: #a55b17;
  --shadow: 0 8px 24px rgba(61, 43, 25, 0.07);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

.page {
  width: min(1120px, calc(100vw - 28px));
  margin: 18px auto 32px;
}

.auth-body {
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.04) 0 25%, transparent 25% 50%, rgba(3, 105, 161, 0.05) 50% 75%, transparent 75%) 0 0 / 34px 34px,
    linear-gradient(160deg, #f8fafc 0%, #fff7e8 52%, #eef7fb 100%);
}

.auth-page {
  width: min(1080px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(360px, 1fr);
  gap: 18px;
  align-items: stretch;
  padding: 36px 0;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}

.hero,
.auth-card,
.auth-panel,
.user-panel,
.control-panel,
.live-panel,
.content-grid {
  max-width: 1080px;
  margin: 0 auto 12px;
}

.hero {
  box-shadow: none;
  padding: 18px 20px;
}

.brand {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.brand-logo {
  flex: none;
  width: 64px;
  height: 64px;
  margin-top: 2px;
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(61, 43, 25, 0.12);
}

.auth-brand {
  margin-bottom: 8px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0;
}

.sub,
.hint {
  color: var(--muted);
}

.sub {
  margin-bottom: 0;
  max-width: 820px;
  line-height: 1.65;
}

.auth-card,
.auth-panel {
  display: grid;
  gap: 18px;
  max-width: 520px;
}

.auth-card {
  align-self: center;
  width: 100%;
  border: 1px solid rgba(215, 194, 165, 0.8);
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.92);
  box-shadow: 0 24px 70px rgba(41, 33, 26, 0.14);
  padding: 30px;
  backdrop-filter: blur(14px);
}

.auth-hint,
.auth-status {
  min-height: 22px;
  margin-bottom: 0;
  font-size: 14px;
}

.auth-status[data-tone="error"] {
  color: #b42318;
}

.auth-status[data-tone="loading"] {
  color: #0369a1;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.78);
  padding: 4px;
}

button.auth-tab {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
}

button.auth-tab.active {
  color: #ffffff;
  background: #0f172a;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.16);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-form input {
  width: 100%;
  min-width: 0;
}

.auth-form button[type="submit"] {
  min-height: 46px;
  margin-top: 4px;
  background: #0369a1;
  box-shadow: 0 12px 24px rgba(3, 105, 161, 0.18);
}

.auth-form button[type="submit"]:hover:not(:disabled) {
  background: #075985;
  box-shadow: 0 14px 28px rgba(3, 105, 161, 0.22);
}

.auth-preview {
  position: relative;
  align-self: center;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 22px;
  background: #0f172a;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.auth-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.4;
}

.auth-preview-head {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px;
}

.auth-preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.38);
}

.auth-preview-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  padding: 34px;
}

.auth-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.auth-preview-block,
.auth-answer-card {
  border: 1px solid rgba(226, 232, 240, 0.14);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.08);
  color: #e2e8f0;
  padding: 18px;
}

.auth-preview-block span,
.auth-answer-card span {
  display: block;
  margin-bottom: 10px;
  color: #93c5fd;
  font-size: 13px;
  font-weight: 700;
}

.auth-preview-block strong {
  display: block;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.55;
}

.auth-preview-block-live {
  min-height: 190px;
}

.auth-preview-block-live strong {
  max-width: 420px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.25;
}

.auth-answer-card {
  margin-top: 28px;
  background: #fffaf0;
  color: var(--ink);
}

.auth-answer-card span {
  color: var(--accent);
}

.auth-answer-card p {
  margin-bottom: 0;
  color: #3b2d1f;
  font-size: 18px;
  line-height: 1.7;
}

.user-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.time-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(124, 90, 32, 0.2);
  border-radius: 999px;
  background: rgba(124, 90, 32, 0.08);
  color: var(--success);
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 700;
}

.time-pill.expired {
  border-color: rgba(180, 35, 24, 0.22);
  background: rgba(180, 35, 24, 0.08);
  color: #b42318;
}

.admin-entry {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  min-height: 30px;
  border-radius: 999px;
  padding: 5px 12px;
  background: #fffaf0;
  color: #4f3820;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.recharge-entry {
  min-height: 30px;
  border-radius: 999px;
  padding: 5px 12px;
  background: #0369a1;
  font-size: 13px;
  box-shadow: none;
}

.recharge-entry:hover:not(:disabled) {
  background: #075985;
  box-shadow: 0 6px 14px rgba(3, 105, 161, 0.18);
}

.admin-page {
  width: min(1360px, calc(100vw - 28px));
  display: grid;
  gap: 14px;
}

.admin-hero,
.admin-layout,
.admin-summary-grid {
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #ffffff;
  border-color: #dde5ee;
}

.admin-back-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fffaf0;
  color: #4f3820;
  padding: 9px 14px;
  text-decoration: none;
  font-weight: 700;
}

.admin-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

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

.admin-metric {
  min-height: 92px;
  border: 1px solid #dde5ee;
  border-radius: var(--radius);
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.admin-metric span,
.admin-muted {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.admin-metric strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.15;
}

.admin-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.admin-single-layout {
  grid-template-columns: minmax(0, 1fr);
}

.admin-section {
  max-width: none;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #ffffff;
  border-color: #dde5ee;
}

.admin-wide-section {
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
}

.admin-section .panel-head {
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-section .panel-head h2 {
  margin-top: 4px;
}

.admin-subtitle {
  margin: 16px 0 8px;
  color: var(--ink);
  font-size: 15px;
}

.admin-inline-form,
.admin-form-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-form-row {
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid #e5edf4;
  border-radius: var(--radius);
  background: #f8fafc;
}

.admin-inline-form input,
.admin-form-row input,
.admin-form-row select,
.admin-inline-form select {
  min-height: 38px;
}

.admin-form-row input,
.admin-form-row select {
  min-width: 160px;
  flex: 1 1 160px;
}

.admin-code-form select,
.admin-code-form input {
  flex: 1 1 140px;
}

.admin-table-wrap {
  flex: 1 1 auto;
  max-height: 520px;
  overflow: auto;
  border: 1px solid #e5edf4;
  border-radius: var(--radius);
  background: #ffffff;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.admin-records-table {
  min-width: 980px;
}

.admin-record-details-table {
  min-width: 1120px;
}

.admin-users-table {
  min-width: 1040px;
}

.admin-orders-table {
  min-width: 1120px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid #e5edf4;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.admin-table tbody tr:nth-child(even) {
  background: #fbfdff;
}

.admin-clickable-row {
  cursor: pointer;
}

.admin-clickable-row:hover {
  background: #eef6ff;
}

.admin-clickable-row.active {
  background: #e8f2ff;
  box-shadow: inset 3px 0 0 #2563eb;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-record-text {
  max-width: 260px;
  color: var(--ink);
  line-height: 1.6;
  word-break: break-word;
}

.admin-detail-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e5edf4;
}

.admin-detail-panel h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.admin-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding-right: 2px;
}

.admin-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #e5edf4;
  border-radius: var(--radius);
  background: #f8fafc;
  padding: 10px 12px;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5edf4;
}

.admin-pagination-info {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.admin-pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-page-btn {
  min-width: 76px;
}

.admin-list-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-badge.success {
  border-color: rgba(3, 105, 161, 0.24);
  background: rgba(3, 105, 161, 0.08);
  color: #075985;
}

.admin-badge.danger {
  border-color: rgba(180, 35, 24, 0.24);
  background: rgba(180, 35, 24, 0.08);
  color: #b42318;
}

.admin-small-btn {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}

.admin-danger-btn {
  border-color: rgba(180, 35, 24, 0.28);
  background: rgba(180, 35, 24, 0.08);
  color: #b42318;
}

.admin-danger-btn:hover:not(:disabled) {
  border-color: rgba(180, 35, 24, 0.42);
  background: rgba(180, 35, 24, 0.14);
  color: #8a1f16;
}

.admin-code-output {
  width: 100%;
  min-height: 116px;
  margin-bottom: 12px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf7;
  color: var(--ink);
  padding: 10px 12px;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.6;
}

.admin-empty {
  color: var(--muted);
  font-size: 14px;
}

.admin-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.42);
  padding: 20px;
}

.admin-dialog {
  width: min(460px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf7;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  padding: 20px;
}

.admin-dialog h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 20px;
}

.admin-dialog-message {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-line;
}

.admin-dialog-form {
  display: grid;
  gap: 12px;
}

.admin-dialog-field {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.admin-dialog-field input {
  width: 100%;
}

.admin-dialog-error {
  min-height: 18px;
  color: #b42318;
  font-size: 13px;
}

.admin-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.admin-dialog-danger {
  background: #b42318;
}

.admin-dialog-danger:hover:not(:disabled) {
  background: #8a1f16;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.38);
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none;
}

.recharge-dialog {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdf7;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  padding: 22px;
}

.recharge-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.recharge-head h2 {
  margin-bottom: 0;
}

.modal-close {
  flex: none;
  width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: 999px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.redeem-code-form {
  margin-bottom: 16px;
}

.redeem-code-form .row {
  margin-top: 8px;
}

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

.recharge-plan {
  position: relative;
  display: grid;
  gap: 12px;
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  padding: 24px 18px 18px;
  text-align: center;
  box-shadow: none;
}

.recharge-plan:hover:not(:disabled),
.recharge-plan:focus-visible {
  border-color: rgba(3, 105, 161, 0.42);
  background: #f8fbff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

.recharge-plan.featured {
  border-color: #facc15;
  box-shadow: 0 18px 44px rgba(154, 91, 34, 0.12);
}

.plan-badge {
  position: absolute;
  top: -1px;
  left: 18px;
  border-radius: 0 0 8px 8px;
  background: #facc15;
  color: #4f3820;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 800;
}

.plan-name {
  margin-top: 8px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 800;
}

.plan-price {
  color: #020617;
  font-size: 38px;
  line-height: 1;
}

.plan-desc {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.plan-action {
  align-self: end;
  min-height: 44px;
  border-radius: 999px;
  background: #facc15;
  color: #1f1711;
  padding: 11px 14px;
  font-size: 17px;
  font-weight: 800;
}

.control-panel,
.role-config,
.resume-config {
  display: grid;
  gap: 10px;
}

.field-label {
  color: #5d4327;
  font-size: 14px;
  font-weight: 700;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.action-row {
  align-items: center;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"],
input[type="search"],
input[type="date"],
input[type="file"],
select {
  flex: 1 1 320px;
  min-width: 220px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 12px;
  color: var(--ink);
  background: #fffdf7;
  font: inherit;
}

input[type="file"] {
  padding: 8px 12px;
}

.auth-form input[type="email"],
.auth-form input[type="password"] {
  height: 48px;
  border-color: rgba(215, 194, 165, 0.9);
  border-radius: 12px;
  background: #ffffff;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(154, 91, 34, 0.16);
}

.role-status {
  margin-bottom: 0;
}

.resume-status {
  margin-bottom: 0;
}

.resume-upload-hint {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: var(--muted);
  font-size: 14px;
}

.resume-status[data-tone="error"] {
  color: #b42318;
}

.resume-status[data-tone="loading"] {
  color: #0369a1;
}

.resume-status[data-tone="success"] {
  color: #166534;
}

button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 9px 14px;
  color: #ffffff;
  background: var(--accent);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

button:hover:not(:disabled) {
  background: var(--accent-dark);
  box-shadow: 0 6px 16px rgba(154, 91, 34, 0.18);
}

button:focus-visible {
  outline: 3px solid rgba(154, 91, 34, 0.22);
  outline-offset: 2px;
}

button.secondary {
  border-color: var(--line-strong);
  color: #4f3820;
  background: #fffaf0;
}

button.secondary:hover:not(:disabled) {
  background: var(--surface-subtle);
  box-shadow: none;
}

button.auth-tab:hover:not(:disabled) {
  color: var(--ink);
  background: rgba(15, 23, 42, 0.06);
  box-shadow: none;
}

button.auth-tab.active:hover:not(:disabled) {
  color: #ffffff;
  background: #0f172a;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.16);
}

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

button.answer-primary:hover:not(:disabled) {
  background: #614817;
  box-shadow: 0 6px 16px rgba(124, 90, 32, 0.18);
}

button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(340px, 1.05fr);
  gap: 14px;
  align-items: start;
}

.live-panel-compact {
  padding-top: 12px;
  padding-bottom: 12px;
}

.live-box,
.answer-stage,
.transcript-list {
  overflow: auto;
  border-radius: var(--radius);
  scrollbar-color: #cbd5e1 transparent;
}

.live-box {
  min-height: 84px;
  max-height: 112px;
  border: 1px solid var(--line);
  background: var(--surface-subtle);
  padding: 12px;
  color: #5d4327;
  line-height: 1.75;
}

.transcript-list {
  min-height: 420px;
  max-height: 520px;
}

.answer-stage {
  min-height: 420px;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
}

.answer-card {
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffaf0;
  padding: 14px;
}

.answer-meta,
.transcript-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.answer-tag,
.transcript-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  background: var(--surface-subtle);
  color: #6b5d4d;
  font-size: 12px;
  font-weight: 700;
}

.answer-tag {
  border-color: rgba(124, 90, 32, 0.2);
  background: rgba(124, 90, 32, 0.08);
  color: var(--success);
}

.answer-time,
.transcript-time {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.answer-section-title {
  margin: 0 0 6px;
  color: #6b5d4d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.answer-prompt,
.answer-result {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-subtle);
  padding: 12px;
}

.answer-prompt {
  margin-bottom: 10px;
}

.answer-prompt-text,
.answer-result-text {
  margin-bottom: 0;
  font-size: 16px;
  line-height: 1.75;
}

.answer-result-text.pending {
  color: inherit;
  font-style: normal;
  font-weight: inherit;
}

.answer-line + .answer-line {
  margin-top: 6px;
}

.answer-line-heading {
  margin-top: 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}

.answer-line-heading:first-child {
  margin-top: 0;
}

.answer-line-bullet {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #4f3820;
  font-weight: 500;
}

.answer-bullet-dot {
  flex: none;
  color: var(--success);
  line-height: 1.75;
}

.answer-line-paragraph {
  color: var(--ink);
  line-height: 1.8;
}

.answer-result-text strong {
  color: #1f1711;
  font-weight: 800;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-head h2,
.panel-hint {
  margin-bottom: 0;
}

.transcript-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

.transcript-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffaf0;
  padding: 12px;
  cursor: pointer;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.transcript-item:hover {
  border-color: var(--line-strong);
  background: var(--surface-subtle);
}

.transcript-item.active {
  border-color: rgba(154, 91, 34, 0.42);
  box-shadow: inset 3px 0 0 var(--accent);
  background: #fff6e8;
}

.transcript-item.answer-target {
  border-color: rgba(124, 90, 32, 0.42);
  box-shadow: inset 3px 0 0 var(--success);
}

.transcript-item.pending {
  opacity: 0.76;
}

.transcript-tag.active,
.transcript-tag.answered {
  border-color: rgba(154, 91, 34, 0.2);
  background: rgba(154, 91, 34, 0.08);
  color: var(--accent);
}

.transcript-tag.answer-target {
  border-color: rgba(124, 90, 32, 0.2);
  background: rgba(124, 90, 32, 0.08);
  color: var(--success);
}

.transcript-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
}

.transcript-raw,
.transcript-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.log-empty {
  color: var(--muted);
  line-height: 1.7;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media (max-width: 900px) {
  .auth-page {
    width: min(560px, calc(100vw - 24px));
    grid-template-columns: 1fr;
    padding: 22px 0;
  }

  .auth-preview {
    display: none;
  }

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

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

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

  .admin-hero {
    align-items: flex-start;
  }

  .page {
    width: min(100vw - 20px, 1080px);
    margin-top: 10px;
  }

  .answer-time,
  .transcript-time {
    margin-left: 0;
  }

  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .user-panel {
    align-items: flex-start;
  }

  .recharge-plans {
    grid-template-columns: 1fr;
  }

  .recharge-plan {
    min-height: 210px;
  }

  .transcript-list,
  .answer-stage {
    min-height: 280px;
  }
}

@media (max-width: 560px) {
  .auth-page {
    width: min(360px, calc(100vw - 32px));
  }

  .auth-card {
    max-width: 100%;
    border-radius: 16px;
    padding: 18px;
  }

  .panel {
    padding: 14px;
  }

  .brand {
    align-items: flex-start;
    gap: 12px;
  }

  .brand-logo {
    width: 54px;
    height: 54px;
    margin-top: 1px;
    border-radius: 14px;
  }

  button,
  input[type="email"],
  input[type="password"],
  input[type="text"],
  input[type="number"],
  input[type="search"],
  input[type="date"],
  input[type="file"],
  select {
    width: 100%;
  }

  .row {
    gap: 8px;
  }

  .user-panel {
    flex-direction: column;
  }

  .admin-summary-grid {
    grid-template-columns: 1fr;
  }

  .admin-hero,
  .admin-hero-actions,
  .admin-form-row,
  .admin-inline-form,
  .admin-list-row,
  .admin-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-back-link,
  .admin-small-btn,
  .admin-form-row select,
  .admin-page-btn {
    width: 100%;
  }

  .admin-pagination-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
