:root {
  color-scheme: light;
  --bg: #f6f3ef;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5ddd7;
  --panel: #ffffff;
  --panel-soft: #fffaf5;
  --side: #050505;
  --side-soft: #151515;
  --accent: #ea580c;
  --accent-dark: #9a3412;
  --accent-soft: #fff7ed;
  --green: #059669;
  --orange: #ea580c;
  --danger: #dc2626;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  align-content: center;
  gap: 22px;
  width: min(520px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: left;
}

.auth-brand .brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid #eadfd6;
  background: var(--panel);
  color: var(--accent-dark);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}

.auth-brand h1 {
  font-size: 28px;
  line-height: 1.1;
}

.auth-brand .eyebrow {
  color: var(--accent);
}

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

.auth-grid.single-auth {
  grid-template-columns: minmax(0, 500px);
  justify-content: center;
}

.auth-panel {
  gap: 16px;
  padding: 26px;
  border-color: #eadfd6;
  background: linear-gradient(180deg, #fff 0%, #fffaf5 100%);
}

.auth-card-head {
  display: grid;
  gap: 6px;
  padding-bottom: 4px;
}

.auth-card-head h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.auth-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 64px;
  gap: 8px;
  align-items: center;
}

.captcha-row strong {
  padding: 0 10px;
  border: 1px solid #e7d8cd;
  border-radius: 8px;
  background: #fffaf5;
  color: var(--accent-dark);
  font-size: 13px;
  line-height: 41px;
  text-align: center;
  white-space: nowrap;
}

.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
  align-items: center;
}

.aliyun-captcha-panel {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
}

.aliyun-captcha-panel strong {
  font-size: 13px;
}

.aliyun-captcha-panel span {
  color: #7c6f68;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.aliyun-captcha-element {
  position: fixed;
  z-index: 1000000;
}

.auth-switch {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  cursor: pointer;
  font-weight: 900;
}

.auth-foot {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding-top: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 180px minmax(0, 1fr);
}

.task-center {
  position: relative;
  z-index: 92;
  display: grid;
  justify-items: end;
  flex: 0 0 auto;
  width: auto;
  pointer-events: none;
}

.task-center-toggle,
.task-center-panel {
  pointer-events: auto;
}

.task-center-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px 8px 14px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.14);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  backdrop-filter: blur(14px);
}

.task-center-toggle strong {
  min-width: 24px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  line-height: 24px;
  text-align: center;
}

.task-center-toggle strong.idle {
  background: #94a3b8;
}

.task-center-panel {
  position: absolute;
  z-index: 94;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
  max-height: 430px;
  overflow: hidden;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(16px);
}

.task-center.collapsed .task-center-panel {
  display: none;
}

.task-center-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--ink);
}

.task-center-head strong {
  font-size: 14px;
}

.task-center-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.task-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.task-empty {
  display: grid;
  min-height: 72px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.task-filter {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.task-filter button {
  min-height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.task-filter button.active {
  background: #ffffff;
  color: var(--accent-dark);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.task-item {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.task-item:hover {
  border-color: #fed7aa;
  background: #fff7ed;
}

.task-item > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.task-item strong,
.task-item span,
.task-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-item strong {
  font-size: 13px;
}

.task-item span {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
}

.task-item.done span {
  color: var(--green);
}

.task-item.failed span {
  color: var(--danger);
}

.task-item small {
  color: var(--muted);
  font-size: 11px;
}

.task-progress {
  position: relative;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.task-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ea580c, #f59e0b);
  transition: width 180ms ease;
}

.task-item.running .task-progress i {
  position: relative;
  min-width: 22px;
  overflow: hidden;
}

.task-item.running .task-progress i::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(
    110deg,
    transparent 0%,
    rgba(255, 255, 255, 0.18) 32%,
    rgba(255, 255, 255, 0.62) 50%,
    rgba(255, 255, 255, 0.18) 68%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: task-progress-shine 1.15s linear infinite;
}

.task-item.running .task-progress::after {
  position: absolute;
  inset: 0;
  content: "";
  background-image: linear-gradient(
    45deg,
    rgba(234, 88, 12, 0.12) 25%,
    transparent 25%,
    transparent 50%,
    rgba(234, 88, 12, 0.12) 50%,
    rgba(234, 88, 12, 0.12) 75%,
    transparent 75%,
    transparent
  );
  background-size: 18px 18px;
  animation: task-progress-stripes 0.85s linear infinite;
  pointer-events: none;
}

.task-item.failed .task-progress i {
  background: var(--danger);
}

@keyframes task-progress-shine {
  to {
    transform: translateX(100%);
  }
}

@keyframes task-progress-stripes {
  to {
    background-position: 18px 0;
  }
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  align-self: start;
  height: 100vh;
  min-height: 100vh;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding: 16px 10px;
  background: var(--side);
  color: #f9fafb;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: #f9fafb;
  color: var(--side);
  font-size: 12px;
  font-weight: 900;
}

.eyebrow {
  margin: 0 0 3px;
  color: #f3c6a5;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 16px;
  line-height: 1.2;
}

h2 {
  color: var(--ink);
  font-size: 26px;
  line-height: 1.15;
}

h3 {
  font-size: 17px;
}

.side-nav {
  display: grid;
  gap: 6px;
}

.side-nav a,
.side-nav button {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 9px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  text-align: left;
}

.side-nav a:hover,
.side-nav a.active,
.side-nav button:hover,
.side-nav button.active {
  border-color: rgba(243, 198, 165, 0.26);
  background: var(--side-soft);
  color: white;
}

.side-nav span {
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.side-nav small {
  color: #9ca3af;
  font-size: 10px;
  font-weight: 700;
}

.side-status {
  display: grid;
  gap: 7px;
  margin-top: auto;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.side-status span {
  color: #9ca3af;
  font-size: 11px;
  font-weight: 800;
}

.side-status strong {
  color: #f9fafb;
  font-size: 12px;
}

.side-logout {
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f9fafb;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.side-logout:hover {
  background: rgba(255, 255, 255, 0.14);
}

.credit-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.credit-summary button {
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #f9fafb;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}

.credit-summary button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.credit-warning {
  color: #fecaca;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.credit-banner {
  padding: 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: var(--danger);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
}

.path-status {
  padding: 10px 11px;
  border: 1px solid #e7d8cd;
  border-radius: 8px;
  background: #fffaf5;
  color: #7c6f68;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.path-status.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: var(--green);
}

.path-status.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: var(--danger);
}

.submit-feedback {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 251, 247, 0.92);
  color: var(--muted);
  font-weight: 800;
  line-height: 1.5;
}

.submit-feedback.ok {
  border-color: rgba(5, 150, 105, 0.24);
  background: rgba(236, 253, 245, 0.88);
  color: #047857;
}

.submit-feedback.error {
  border-color: rgba(185, 28, 28, 0.24);
  background: rgba(254, 242, 242, 0.9);
  color: #991b1b;
}

.save-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e7d8cd;
  border-radius: 8px;
  background: #fffaf5;
}

.save-picker div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.save-picker strong {
  font-size: 13px;
}

.save-picker span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-button {
  min-height: 31px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f9fafb;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.side-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.content {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 28px;
}

.admin-login-page {
  background:
    radial-gradient(circle at 50% 0%, rgba(234, 88, 12, 0.12), transparent 34%),
    linear-gradient(180deg, #fffaf5 0%, #f6f3ef 48%, #efe9e2 100%);
}

.admin-login-page .app-shell {
  grid-template-columns: 1fr;
}

.admin-login-page .content {
  min-height: 100vh;
  align-content: center;
  justify-items: center;
  padding: 28px 18px;
}

.admin-login-page .page-head {
  justify-content: center;
  min-height: auto;
  padding: 0;
  text-align: center;
}

.admin-login-page .page-head > div:first-child {
  margin-right: 0;
}

.admin-login-page .page-head h2 {
  font-size: 26px;
}

.page-head {
  position: relative;
  z-index: 86;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-height: 60px;
  padding: 8px 0;
  background: transparent;
}

.page-head > div:first-child {
  margin-right: auto;
}

.top-account {
  position: relative;
  z-index: 91;
  display: flex;
  justify-content: flex-end;
  flex: 0 1 auto;
  min-width: 0;
}

.account-guest,
.account-user,
.account-loading {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.account-user,
.account-loading {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
}

.account-loading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.account-loading span::after {
  content: '';
  display: inline-block;
  width: 1.5em;
  animation: loading-dots 1.2s steps(4, end) infinite;
}

@keyframes loading-dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75%,
  100% { content: '...'; }
}

.account-user span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.account-user strong {
  color: var(--accent-dark);
  font-size: 13px;
}

.account-guest.hidden,
.account-user.hidden {
  display: none;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(330px, 440px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-tab-panel {
  display: grid;
  gap: 15px;
}

.admin-tab-panel.hidden {
  display: none;
}

.login-panel {
  width: min(460px, 100%);
}

.contact-change-note {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.contact-change-note strong {
  color: var(--ink);
}

[data-login-captcha-field] {
  display: none !important;
}

.admin-login-page .login-panel {
  position: relative;
  width: min(380px, 100%);
  padding: 22px;
  border-color: rgba(154, 52, 18, 0.16);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 54px rgba(17, 24, 39, 0.12);
  backdrop-filter: blur(12px);
}

.admin-security-box {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(234, 88, 12, 0.18);
  border-radius: 8px;
  background: var(--accent-soft);
}

.panel,
.results {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  display: grid;
  gap: 15px;
  padding: 18px;
}

.panel-title,
.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

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

label {
  display: grid;
  gap: 8px;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input,
select {
  height: 43px;
  padding: 0 12px;
}

textarea {
  min-height: 118px;
  resize: vertical;
  padding: 12px;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.14);
}

.grid {
  display: grid;
  gap: 12px;
}

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

.three {
  grid-template-columns: repeat(3, 1fr);
}

.hidden {
  display: none !important;
}

.primary,
.secondary,
.ghost {
  min-height: 42px;
  border-radius: 8px;
  cursor: pointer;
}

.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: white;
  font-weight: 900;
}

.primary {
  background: var(--accent);
  box-shadow: 0 12px 24px rgba(234, 88, 12, 0.18);
}

.primary:hover {
  background: var(--accent-dark);
}

.secondary {
  background: var(--orange);
  box-shadow: 0 12px 24px rgba(234, 88, 12, 0.17);
}

.secondary:hover {
  background: #c2410c;
}

.primary:disabled,
.secondary:disabled {
  cursor: wait;
  opacity: 0.68;
}

.ghost {
  padding: 0 14px;
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
  font-weight: 800;
}

.ghost:hover {
  border-color: #fed7aa;
  color: var(--accent-dark);
}

.compact {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.upload-box,
.batch-box,
.batch-note,
.save-folder {
  display: grid;
  gap: 10px;
  border-radius: 8px;
}

.upload-box {
  padding: 12px;
  border: 1px dashed #fed7aa;
  background: var(--accent-soft);
}

.prompt-composer {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #d6c7bd;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.92)),
    #fff7ed;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.prompt-composer.drag-over {
  border-color: #ea580c;
  background: #ffedd5;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

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

.composer-head strong {
  color: #6b5b51;
  font-size: 15px;
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.composer-actions span {
  min-width: 44px;
  color: #8a796f;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.reference-strip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.prompt-composer .reference-grid {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.prompt-composer .reference-grid:empty {
  display: none;
}

.prompt-composer .reference-grid figure {
  position: relative;
  overflow: hidden;
  flex: 0 0 88px;
  width: 88px;
  margin: 0;
  border-radius: 8px;
}

.prompt-composer .reference-grid img {
  width: 88px;
  height: 88px;
  border: 1px solid #d6c7bd;
  border-radius: 8px;
  background: #ffffff;
  object-fit: cover;
}

.prompt-composer .reference-grid figcaption {
  display: none;
}

.reference-index {
  position: absolute;
  top: 5px;
  left: 5px;
  min-width: 22px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  line-height: 22px;
  text-align: center;
}

.reference-controls {
  position: absolute;
  right: 5px;
  bottom: 5px;
  left: 5px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.reference-controls button {
  min-width: 0;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: rgba(17, 24, 39, 0.74);
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.reference-controls button:hover {
  background: rgba(234, 88, 12, 0.9);
}

.reference-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.upload-tile {
  display: grid;
  flex: 0 0 88px;
  order: -1;
  width: 88px;
  height: 88px;
  place-items: center;
  align-content: center;
  gap: 4px;
  border: 1px dashed #b6a398;
  border-radius: 8px;
  color: #7c6a60;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.upload-tile:hover {
  border-color: #ea580c;
  color: #9a3412;
  background: #fff7ed;
}

.upload-tile input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-tile span {
  font-size: 32px;
  font-weight: 400;
  line-height: 24px;
}

.upload-tile small {
  font-size: 13px;
  font-weight: 800;
}

.prompt-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.prompt-presets button {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid #d6c7bd;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  color: #7c4a2f;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.prompt-presets button:hover {
  border-color: #ea580c;
  background: #ffffff;
  color: #9a3412;
}

.option-panel {
  display: grid;
  gap: 18px;
  padding: 15px;
  border: 1px solid #e7d8cd;
  border-radius: 8px;
  background: #fffaf5;
}

.option-section {
  display: grid;
  gap: 10px;
}

.option-section > span {
  color: #7c6f68;
  font-size: 13px;
  font-weight: 900;
}

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

.option-buttons button {
  min-width: 72px;
  min-height: 44px;
  border: 1px solid #e7d8cd;
  border-radius: 8px;
  background: #fffaf5;
  color: #7c6f68;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
}

.option-buttons button:hover {
  border-color: #fb923c;
  color: #c2410c;
}

.option-buttons button.active {
  border-color: var(--orange);
  background: #fff7ed;
  color: #c2410c;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.14);
}

.compact-options button {
  min-width: 78px;
}

.prompt-composer textarea {
  min-height: 190px;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid #d6c7bd;
  border-radius: 0;
  background: transparent;
  color: #332821;
  font-size: 15px;
}

.prompt-composer textarea:focus {
  box-shadow: none;
}

.batch-box {
  padding: 14px;
  border: 1px solid #fed7aa;
  background: #fffaf3;
}

.folder-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  border: 1px dashed #f59e0b;
  border-radius: 8px;
  background: #ffffff;
  color: #9a3412;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.folder-picker:hover {
  border-color: #ea580c;
  background: #fff7ed;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

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

.folder-file-picker {
  position: relative;
}

.folder-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.folder-drop-zone {
  display: grid;
  gap: 5px;
  min-height: 86px;
  place-items: center;
  padding: 16px;
  border: 1px dashed #fdba74;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.folder-drop-zone strong {
  color: #9a3412;
  font-size: 15px;
  font-weight: 900;
}

.folder-drop-zone span {
  max-width: 420px;
  color: #7c6f68;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.folder-drop-zone.drag-over {
  border-color: #ea580c;
  background: #ffedd5;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12);
}

.folder-preview {
  max-height: 250px;
  overflow-y: auto;
  padding-right: 3px;
}

.folder-preview:empty {
  display: none;
}

.folder-preview .folder-preview-item {
  position: relative;
}

.folder-preview-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  display: flex;
}

.folder-preview-actions button {
  display: grid;
  width: 26px;
  height: 26px;
  min-width: 0;
  min-height: 0;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.74);
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.22);
}

.folder-preview-actions button:hover {
  background: rgba(234, 88, 12, 0.92);
}

.batch-note {
  padding: 11px 12px;
  border: 1px solid #e7d8cd;
  background: #fffaf5;
  color: #7c6f68;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.section-title {
  padding-top: 6px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: 18px;
  height: 18px;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.settings-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.settings-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.settings-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.settings-list strong {
  color: var(--ink);
  font-size: 13px;
}

.setting-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

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

.api-mode-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 6px;
  width: min(360px, 100%);
  padding: 5px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffaf3;
}

.api-mode-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.api-mode-tabs button.active {
  color: var(--accent-deep);
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.api-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.api-toolbar strong,
.api-toolbar span {
  display: block;
}

.api-toolbar strong {
  color: var(--ink);
  font-size: 15px;
}

.api-toolbar span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.api-routes-toolbar {
  grid-template-columns: 1fr auto;
}

.api-models-toolbar {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.api-panel.api-routes-mode .api-models-toolbar,
.api-panel.api-models-mode .api-routes-toolbar {
  display: none;
}

.provider-list {
  display: grid;
  gap: 12px;
}

.provider-list.api-routes-mode .provider-model-section,
.provider-list.api-models-mode .provider-route-section {
  display: none;
}

.provider-card {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  overflow: hidden;
}

.provider-card details {
  display: grid;
}

.provider-card summary {
  cursor: pointer;
  list-style: none;
}

.provider-card summary::-webkit-details-marker {
  display: none;
}

.provider-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 12px 16px;
  border-bottom: 1px solid transparent;
  background: linear-gradient(180deg, rgba(255, 250, 243, 0.96), rgba(255, 255, 255, 0.88));
}

.provider-card details[open] .provider-card-head {
  border-bottom-color: var(--line);
}

.provider-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.provider-card-head strong,
.provider-card-head small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-card-head strong {
  color: var(--ink);
  font-size: 15px;
}

.provider-card-head small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.provider-state {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid rgba(5, 150, 105, 0.18);
  border-radius: 999px;
  background: rgba(236, 253, 245, 0.9);
}

.provider-fields {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
}

.provider-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(226, 214, 205, 0.82);
  border-radius: 8px;
  background: rgba(255, 250, 245, 0.72);
}

.provider-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.provider-section-head strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.provider-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.provider-grid {
  display: grid;
  gap: 8px;
}

.provider-grid-main {
  grid-template-columns: minmax(150px, 0.78fr) minmax(260px, 1.45fr) minmax(220px, 1fr);
}

.provider-grid-models {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.provider-grid-endpoints {
  grid-template-columns: minmax(170px, 0.78fr) minmax(260px, 1.25fr) minmax(260px, 1.25fr) auto;
  align-items: end;
}

.provider-card label {
  gap: 5px;
  font-size: 12px;
  min-width: 0;
}

.provider-card input,
.provider-card select {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 13px;
}

.provider-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  min-width: 112px;
}

.danger-soft {
  color: var(--danger);
  border-color: rgba(190, 61, 32, 0.24);
}

.danger-soft:disabled {
  color: var(--muted);
  opacity: 0.75;
}

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

.error-log-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.user-search {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.user-row strong,
.user-row span {
  display: block;
}

.user-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.credit-form {
  display: grid;
  grid-template-columns: 110px auto auto auto auto;
  gap: 8px;
  align-items: center;
}

.credit-form input {
  height: 34px;
}

.danger-button {
  color: var(--danger);
}

.error-log-row {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff7f7;
}

.error-log-main {
  display: grid;
  gap: 7px;
}

.error-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.error-log-head strong {
  color: var(--danger);
  font-size: 15px;
}

.error-log-head span,
.error-log-main small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.error-log-main p {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
  word-break: break-word;
}

.error-log-row details {
  border-top: 1px solid #fee2e2;
  padding-top: 8px;
}

.error-log-row summary {
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.error-log-row pre {
  overflow: auto;
  max-height: 280px;
  margin: 9px 0 0;
  padding: 11px;
  border-radius: 8px;
  background: #111827;
  color: #e5e7eb;
  font-size: 12px;
  line-height: 1.5;
}

.compact-empty {
  min-height: 120px;
}

.batch-head h3 {
  font-size: 15px;
}

.batch-head p,
.result-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.upload-hint {
  margin: -2px 0 0;
  color: #7c6f68;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.upload-actions,
.batch-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.reference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 8px;
}

.reference-grid figure {
  min-width: 0;
  margin: 0;
}

.reference-grid img {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 7px;
  object-fit: cover;
  background: #e5e7eb;
}

.reference-grid figcaption {
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results {
  min-height: 640px;
  padding: 18px;
}

.save-folder {
  margin: 14px 0;
  padding: 13px 14px;
  border: 1px solid #e7d8cd;
  background: #fffaf5;
}

.save-folder span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.save-folder strong {
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.45;
}

.empty {
  display: grid;
  min-height: 440px;
  place-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel-soft);
  text-align: center;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  gap: 14px;
  align-items: start;
}

.main-preview {
  overflow: hidden;
  min-height: 520px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: var(--panel-soft);
}

.main-preview .empty {
  min-height: 520px;
  border: 0;
  background: transparent;
}

.main-preview .preview {
  min-height: 520px;
  align-content: start;
}

.preview-loading {
  display: grid;
  min-height: 492px;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--ink);
  text-align: center;
}

.preview-loading i {
  display: block;
  width: 54px;
  height: 54px;
  border: 4px solid #ffedd5;
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 900ms linear infinite;
}

.preview-loading strong {
  font-size: 18px;
  font-weight: 900;
}

.preview-loading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.main-preview .preview img,
.main-preview .preview video {
  max-height: 620px;
}

.batch-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
  padding: 12px;
}

.batch-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 0;
}

.batch-preview-toolbar strong {
  color: var(--ink);
  font-size: 14px;
}

.batch-preview-toolbar button,
.history-download {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #fed7aa;
  border-radius: 7px;
  background: #fff7ed;
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.batch-preview-toolbar button:hover,
.history-download:hover {
  background: #ffedd5;
}

.batch-preview-toolbar button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.batch-result-thumb {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
  text-align: left;
}

.batch-result-thumb:hover,
.batch-result-thumb.active {
  border-color: #fed7aa;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12);
}

.batch-result-media {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  background: #111827;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 900;
}

.batch-result-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.batch-result-thumb span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-download {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 28px;
  border: 0;
  border-radius: 7px;
  background: var(--panel-soft);
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.batch-download:hover {
  background: #ffedd5;
}

.history-panel {
  display: grid;
  gap: 10px;
  max-height: 620px;
  overflow: hidden;
}

.history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 2px;
  color: var(--ink);
  font-size: 13px;
}

.history-head span {
  min-width: 28px;
  border-radius: 999px;
  background: #ffedd5;
  color: #9a3412;
  font-size: 12px;
  font-weight: 900;
  line-height: 24px;
  text-align: center;
}

.history {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-height: 570px;
  overflow-y: auto;
  padding-right: 6px;
}

.history-thumb {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 142px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
  text-align: left;
}

.history-thumb:hover,
.history-thumb.active {
  border-color: #fed7aa;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12);
}

.thumb-media {
  display: grid;
  width: 86px;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  background: #e5e7eb;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.thumb-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-meta {
  display: grid;
  align-content: center;
  min-width: 0;
  gap: 6px;
}

.thumb-meta strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thumb-meta span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 4px;
}

.history-actions .history-download {
  min-width: 0;
  width: 100%;
  min-height: 32px;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.history-actions .history-download:nth-child(2) {
  grid-column: 1 / -1;
  order: 3;
}

.history-actions .history-download:nth-child(3) {
  order: 2;
}

.detail-login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.detail-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "tools"
    "board"
    "results";
  gap: 18px;
  align-items: start;
}

.detail-tools {
  grid-area: tools;
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(300px, 1fr) minmax(260px, 340px);
  gap: 14px;
  align-items: stretch;
}

.detail-tools .panel-title,
.detail-tools .credit-banner {
  grid-column: 1 / -1;
}

.detail-board {
  grid-area: board;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.detail-results {
  grid-area: results;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  padding: 14px;
}

.detail-upload {
  display: grid;
  place-items: center;
  min-height: 142px;
  border: 1px dashed #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
}

.detail-upload input {
  display: none;
}

.detail-prompt-field textarea {
  min-height: 142px;
}

.detail-control-stack {
  display: grid;
  gap: 10px;
  align-content: start;
}

.detail-upload:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.62;
}

.detail-status {
  margin: 0;
  padding: 10px 11px;
  border: 1px solid #e7d8cd;
  border-radius: 8px;
  background: #fffaf5;
  color: #7c6f68;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.detail-status.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: var(--green);
}

.detail-status.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: var(--danger);
}

.detail-canvas-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.detail-canvas-head p,
.detail-results .result-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-stage {
  position: relative;
  display: grid;
  min-height: 560px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(45deg, rgba(234, 88, 12, 0.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(234, 88, 12, 0.04) 25%, transparent 25%),
    #fffaf5;
  touch-action: none;
}

.detail-stage.empty-stage {
  min-height: 420px;
  border-style: dashed;
  background: #fff;
  touch-action: auto;
}

.detail-stage img {
  display: block;
  max-width: 100%;
  max-height: min(72vh, 760px);
  object-fit: contain;
  user-select: none;
}

.detail-stage img.hidden {
  display: none;
}

.detail-empty {
  padding: 20px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 900;
  text-align: center;
}

.detail-stage.empty-stage .detail-empty {
  color: #8a817b;
}

.detail-stage.empty-stage .mark-layer {
  display: none;
}

.mark-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.mark-box {
  position: absolute;
  display: block;
  padding: 0;
  border: 2px solid var(--accent);
  border-radius: 6px;
  background: rgba(234, 88, 12, 0.12);
  cursor: pointer;
}

.mark-box span {
  position: absolute;
  top: -28px;
  left: -2px;
  max-width: 170px;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.mark-box.draft {
  border-style: dashed;
  pointer-events: none;
}

.mark-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.mark-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.mark-list strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mark-list button,
.detail-result-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #fed7aa;
  border-radius: 7px;
  background: #fff7ed;
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.detail-result-grid {
  display: grid;
  align-items: start;
  align-self: start;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 8px;
}

.detail-result-grid article {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-result-grid article > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.detail-result-grid strong {
  color: var(--ink);
  font-size: 12px;
}

.detail-result-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.detail-result-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 7px;
  background: var(--panel-soft);
  cursor: zoom-in;
  object-fit: cover;
}

.detail-result-grid p {
  margin: 0;
  color: var(--danger);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.detail-result-actions {
  display: flex;
  justify-content: flex-end;
}

.gallery-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  padding: 18px;
}

.gallery-grid {
  display: grid;
  align-items: start;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e7d8cd;
  border-radius: 8px;
  background: #fffaf5;
}

.gallery-select-all,
.gallery-select {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #7c4a2f;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  user-select: none;
}

.gallery-select input,
.gallery-select-all input {
  width: 16px;
  height: 16px;
  accent-color: #ea580c;
}

.gallery-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: zoom-in;
}

.gallery-card.selected {
  border-color: #ea580c;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12);
}

.gallery-card.highlight {
  border-color: #fb923c;
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.2);
}

.gallery-card .gallery-select {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 250, 245, 0.92);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.14);
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 7px;
  background: var(--panel-soft);
  object-fit: cover;
}

.gallery-card strong,
.gallery-card span {
  display: block;
}

.gallery-card strong {
  color: var(--ink);
  font-size: 13px;
}

.gallery-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.gallery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.gallery-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #fed7aa;
  border-radius: 7px;
  background: #fff7ed;
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.gallery-empty {
  padding: 28px;
  border: 1px dashed #fed7aa;
  border-radius: 8px;
  background: #fffaf5;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.preview {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.preview img,
.preview video {
  width: 100%;
  max-height: 560px;
  border-radius: 7px;
  object-fit: contain;
  background: #111827;
}

.clickable-preview {
  cursor: zoom-in;
}

.preview a {
  color: var(--accent-dark);
  font-weight: 800;
}

.output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.output-actions button,
.output-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.output-actions button:hover,
.output-actions a:hover {
  background: #ffedd5;
}

.saved-path {
  overflow-wrap: anywhere;
  padding: 9px 10px;
  border-radius: 7px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.error {
  color: var(--danger);
}

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

.confirm-overlay {
  background: rgba(17, 24, 39, 0.38);
  backdrop-filter: blur(3px);
}

.confirm-dialog {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  width: min(480px, 100%);
  padding: 20px;
  border: 1px solid #eadbd1;
  border-radius: 12px;
  background: #fffaf5;
  box-shadow: 0 24px 70px rgba(43, 29, 19, 0.22);
}

.confirm-dialog-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: #fff0dd;
  color: var(--accent-dark);
  font-size: 24px;
  font-weight: 950;
}

.confirm-dialog-danger .confirm-dialog-icon {
  background: #fee2e2;
  color: #b91c1c;
}

.confirm-dialog-content {
  min-width: 0;
}

.confirm-dialog h3 {
  margin: 1px 0 8px;
  color: var(--text);
  font-size: 20px;
  font-weight: 950;
  letter-spacing: 0;
}

.confirm-dialog-body {
  display: grid;
  gap: 4px;
}

.confirm-dialog-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.65;
}

.confirm-dialog-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.confirm-dialog-actions button {
  min-width: 112px;
  min-height: 42px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 900;
}

.confirm-dialog-actions .danger-action {
  border: 1px solid #ef4444;
  background: #dc2626;
  color: #ffffff;
  cursor: pointer;
}

.confirm-dialog-actions .danger-action:hover {
  background: #b91c1c;
}

.reminder-dialog {
  display: grid;
  gap: 14px;
  width: min(460px, 100%);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.reminder-dialog h3 {
  margin: 0;
  font-size: 18px;
}

.reminder-dialog p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.reminder-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.reminder-actions .primary {
  grid-column: 1 / -1;
}

.credit-dialog {
  display: grid;
  gap: 13px;
  width: min(620px, 96vw);
  max-height: 82vh;
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.credit-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.credit-dialog-head h3,
.credit-dialog p {
  margin: 0;
}

.credit-dialog-head button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.credit-dialog p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.auth-modal.credit-dialog {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  gap: 18px;
  padding: 26px;
  border-color: rgba(226, 232, 240, 0.95);
}

.auth-modal .credit-dialog-head {
  justify-content: center;
  padding: 0 44px;
  text-align: center;
}

.auth-modal .credit-dialog-head h3 {
  font-size: 24px;
  font-weight: 950;
  line-height: 1.2;
}

.auth-modal .credit-dialog-head button {
  position: absolute;
  top: 18px;
  right: 18px;
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  font-size: 0;
}

.auth-modal .credit-dialog-head button::before {
  content: "×";
  font-size: 20px;
  line-height: 1;
}

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

.auth-modal-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.auth-modal-form input {
  width: 100%;
  min-height: 44px;
}

.auth-modal-form > button[type="submit"] {
  width: 100%;
  min-height: 46px;
  margin-top: 2px;
  justify-content: center;
  text-align: center;
}

.auth-modal .code-row {
  grid-template-columns: minmax(0, 1fr) 108px;
}

.auth-modal .form-message {
  text-align: center;
}

.auth-modal .auth-foot {
  justify-content: center;
  gap: 16px;
  padding-top: 0;
}

.credit-filters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.credit-filters button {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.credit-filters button.active {
  background: #ffffff;
  color: var(--accent-dark);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.credit-ledger {
  display: grid;
  gap: 8px;
  overflow: auto;
  max-height: 58vh;
}

.credit-ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.credit-ledger-row strong,
.credit-ledger-row span {
  display: block;
}

.credit-ledger-row strong {
  color: var(--ink);
  font-size: 13px;
}

.credit-ledger-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.credit-ledger-row em {
  color: var(--green);
  font-style: normal;
  font-weight: 900;
}

.credit-ledger-row.debit em {
  color: var(--danger);
}

.recharge-open-button {
  width: max-content;
}

.wechat-recharge {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf5;
  text-align: center;
}

.wechat-recharge strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
}

.wechat-recharge img {
  width: min(260px, 72vw);
  border-radius: 8px;
  background: #ffffff;
}

.wechat-recharge span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.recharge-plan {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf5;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.recharge-plan:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.12);
}

.recharge-plan strong {
  font-size: 16px;
  font-weight: 950;
}

.recharge-plan span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.recharge-plan em {
  color: var(--accent-dark);
  font-style: normal;
  font-weight: 950;
}

.lightbox-overlay {
  z-index: 320;
  background: rgba(15, 23, 42, 0.74);
}

.image-lightbox {
  position: relative;
  z-index: 321;
  display: grid;
  gap: 12px;
  width: min(1120px, 96vw);
  max-height: 94vh;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #0f172a;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.lightbox-head {
  position: relative;
  z-index: 324;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.lightbox-head strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox-head button {
  position: relative;
  z-index: 325;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.lightbox-stage {
  position: relative;
  z-index: 322;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
}

.lightbox-nav {
  display: grid;
  width: 44px;
  height: 72px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
  font-size: 34px;
  font-weight: 500;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.16);
}

.lightbox-nav:disabled {
  cursor: default;
  opacity: 0.25;
}

.lightbox-viewport {
  overflow: auto;
  max-height: calc(94vh - 132px);
  border-radius: 7px;
  background: #020617;
  text-align: center;
}

.image-lightbox img {
  width: 100%;
  max-height: calc(94vh - 120px);
  border-radius: 7px;
  object-fit: contain;
  background: #020617;
  transform-origin: center center;
  transition: transform 120ms ease;
}

.lightbox-zoom {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lightbox-zoom span {
  min-width: 48px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
  }

  .side-nav {
    grid-template-columns: 1fr 1fr;
  }

  .side-status {
    margin-top: 0;
  }

  .workspace,
  .detail-workspace,
  .admin-workspace,
  .auth-grid,
  .two,
  .api-toolbar,
  .provider-grid-main,
  .provider-grid-models,
  .provider-grid-endpoints {
    grid-template-columns: 1fr;
  }

  .detail-workspace {
    grid-template-areas:
      "tools"
      "board"
      "results";
  }

  .detail-tools {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  }

  .detail-control-stack {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px) minmax(240px, 320px);
    align-items: start;
  }

  .auth-shell {
    width: min(100vw - 24px, 520px);
    padding: 24px 0;
  }

  .auth-panel {
    padding: 20px;
  }

  .captcha-row {
    grid-template-columns: minmax(0, 1fr) 88px;
  }

  .captcha-row .captcha-refresh {
    grid-column: 1 / -1;
  }

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

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

  .history-panel,
  .history {
    max-height: none;
  }

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

  .user-row,
  .credit-form {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 18px;
  }

  .lightbox-stage {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
  }

  .lightbox-nav {
    width: 36px;
    height: 58px;
    font-size: 28px;
  }
}

@media (max-width: 720px) {
  body {
    background: #f7f4ef;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 88;
    display: grid;
    min-height: 0;
    height: auto;
    grid-template-columns: 1fr;
    gap: 8px;
    overflow: hidden;
    padding: 9px 10px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  }

  .brand {
    justify-content: flex-start;
    gap: 8px;
    min-height: 30px;
  }

  .brand-mark {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    font-size: 11px;
  }

  .brand .eyebrow {
    margin-bottom: 1px;
    font-size: 9px;
    line-height: 1;
  }

  .brand h1 {
    font-size: 14px;
    line-height: 1.05;
  }

  .side-nav {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 0 0 2px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  .side-nav a,
  .side-nav button {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 104px;
    min-height: 34px;
    padding: 0 12px;
    border-color: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    text-align: center;
    scroll-snap-align: start;
  }

  .side-nav span {
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
  }

  .side-nav small,
  .page-head .eyebrow {
    display: none;
  }

  .side-status {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    margin-top: 0;
    padding: 8px;
    min-height: 36px;
  }

  .side-status > span:nth-of-type(2),
  .side-status > strong#apiStatus {
    display: none;
  }

  .side-status span,
  .side-status strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .side-status strong {
    font-size: 11px;
  }

  .side-logout {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    white-space: nowrap;
  }

  .credit-summary {
    justify-content: flex-start;
  }

  .side-button,
  .credit-summary button {
    min-height: 30px;
    font-size: 11px;
  }

  .content {
    gap: 14px;
    padding: 12px 12px 20px;
  }

  .page-head {
    z-index: 86;
    min-height: auto;
    align-items: stretch;
    flex-direction: column;
    margin: 0 -12px;
    padding: 10px 12px;
    border-bottom: 0;
  }

  .top-account {
    width: 100%;
    min-width: 0;
    justify-content: stretch;
  }

  .account-guest,
  .account-user {
    width: 100%;
    justify-content: stretch;
  }

  .account-guest button,
  .account-guest a,
  .account-user button {
    flex: 1 1 auto;
  }

  .account-user span,
  .account-user strong {
    flex: 1 0 100%;
  }

  h2 {
    font-size: 22px;
  }

  .workspace {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .detail-workspace {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .detail-tools,
  .detail-control-stack {
    grid-template-columns: 1fr;
  }

  .detail-tools .panel-title,
  .detail-tools .credit-banner,
  .detail-control-stack {
    grid-column: auto;
  }

  .detail-stage {
    min-height: 320px;
  }

  .detail-stage img {
    max-height: 62vh;
  }

  .detail-canvas-head {
    align-items: stretch;
    flex-direction: column;
  }

  .panel,
  .results {
    padding: 14px;
    border-radius: 8px;
  }

  .prompt-composer {
    padding: 14px;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .reference-strip {
    gap: 10px;
  }

  .prompt-composer .reference-grid figure,
  .prompt-composer .reference-grid img,
  .upload-tile {
    width: 74px;
    height: 74px;
  }

  .prompt-composer .reference-grid figure {
    flex-basis: 74px;
  }

  .upload-tile {
    flex-basis: 74px;
  }

  .prompt-composer textarea {
    min-height: 150px;
    font-size: 16px;
  }

  .option-panel {
    gap: 14px;
    padding: 12px;
  }

  .option-buttons {
    gap: 8px;
  }

  .option-buttons button {
    min-width: 62px;
    min-height: 40px;
    font-size: 14px;
  }

  .save-picker {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .folder-picker-grid {
    grid-template-columns: 1fr;
  }

  .save-picker button,
  .folder-picker,
  .primary,
  .secondary {
    width: 100%;
  }

  .auth-modal.credit-dialog {
    width: 100%;
    max-height: calc(100dvh - 24px);
    padding: 22px 16px;
  }

  .auth-modal .credit-dialog-head {
    padding: 0 38px;
  }

  .auth-modal .code-row {
    grid-template-columns: 1fr;
  }

  .two,
  .three {
    grid-template-columns: 1fr;
  }

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

  .main-preview,
  .main-preview .empty,
  .main-preview .preview,
  .preview-loading {
    min-height: 280px;
  }

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

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

  .history-thumb {
    grid-template-columns: 86px minmax(0, 1fr);
    min-height: 124px;
  }

  .thumb-media {
    width: 86px;
  }

  .thumb-meta strong,
  .thumb-meta span {
    font-size: 12px;
  }

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

  .history-actions .history-download:nth-child(3) {
    grid-column: 1 / -1;
  }

  .task-center {
    justify-items: stretch;
    width: 100%;
  }

  .task-center-panel {
    right: auto;
    left: 0;
    width: 100%;
    max-height: 56vh;
    overflow: hidden;
  }

  .auth-shell {
    align-content: start;
    min-height: 100vh;
    padding: 22px 0;
  }

  .auth-brand h1 {
    font-size: 24px;
  }

  .auth-card-head h3 {
    font-size: 22px;
  }

  .auth-foot {
    flex-wrap: wrap;
  }

  .admin-workspace {
    gap: 14px;
  }

  .user-row {
    gap: 10px;
  }

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

  .credit-form input {
    grid-column: 1 / -1;
  }

  .error-log-row {
    padding: 11px;
  }

  .api-toolbar {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .provider-card {
    padding: 0;
  }

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

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

  .provider-actions {
    justify-content: stretch;
  }

  .modal-overlay {
    align-items: start;
    padding: 12px;
    overflow-y: auto;
  }

  .credit-dialog,
  .reminder-dialog,
  .confirm-dialog {
    width: 100%;
    max-height: calc(100dvh - 24px);
  }

  .confirm-dialog {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }

  .confirm-dialog-icon {
    width: 40px;
    height: 40px;
    font-size: 21px;
  }

  .confirm-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .confirm-dialog-actions button {
    min-width: 0;
  }

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

  .lightbox-stage {
    grid-template-columns: 1fr;
  }

  .lightbox-nav {
    display: none;
  }
}
