:root {
  --bg: #f7f8fb;
  --ink: #101114;
  --muted: #6a6f7a;
  --line: rgba(18, 21, 27, 0.1);
  --panel: rgba(255, 255, 255, 0.66);
  --panel-strong: rgba(255, 255, 255, 0.86);
  --blue: #0a84ff;
  --rose: #ff4f6d;
  --green: #16a37c;
  --gold: #d89b28;
  --shadow: 0 24px 70px rgba(31, 41, 55, 0.12);
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(247, 248, 251, 0.94)),
    linear-gradient(115deg, rgba(10, 132, 255, 0.14), rgba(255, 79, 109, 0.08) 42%, rgba(22, 163, 124, 0.1));
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

img {
  display: block;
  max-width: 100%;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(95deg, rgba(10, 132, 255, 0.14), transparent 30%),
    linear-gradient(150deg, transparent 38%, rgba(255, 79, 109, 0.1), transparent 68%),
    linear-gradient(25deg, transparent 52%, rgba(216, 155, 40, 0.12));
  filter: blur(24px);
  opacity: 0.85;
}

.auth-view {
  position: relative;
  z-index: 2;
  min-height: calc(100vh - 76px);
  display: grid;
  place-items: center;
  padding: 28px 18px;
}

.auth-card {
  width: min(440px, 100%);
  display: grid;
  gap: 18px;
  padding: 38px;
  background: rgba(255, 255, 255, 0.82);
}

.auth-brand {
  width: 48px;
  height: 48px;
}

.auth-card h1 {
  margin: -4px 0 0;
  font-size: 2rem;
}

.auth-card > p:not(.section-kicker):not(.form-error) {
  margin: -6px 0 2px;
  color: var(--muted);
  line-height: 1.65;
}

.form-error {
  min-height: 22px;
  margin: -4px 0 0;
  color: #c7354f;
  font-size: 0.86rem;
  font-weight: 680;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 62px;
  margin-bottom: 28px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 10px 40px rgba(31, 41, 55, 0.07);
  backdrop-filter: blur(24px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(16, 17, 20, 0.14);
  border-radius: 8px;
  background: linear-gradient(145deg, #111318, #303642);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.95rem;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.topbar-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.topbar-btn {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(16, 17, 20, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #24262c;
  font-size: 0.8rem;
  font-weight: 700;
}

.state-pill,
.section-chip {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid rgba(16, 17, 20, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #24262c;
  font-size: 0.8rem;
  font-weight: 650;
}

.state-pill.muted {
  color: var(--muted);
}

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

.glass-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px) saturate(1.3);
}

.section-kicker {
  margin: 0;
  color: #717783;
  font-size: 0.78rem;
  font-weight: 720;
}

.control-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
  padding: 22px;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(16, 17, 20, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.mode-button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 760;
}

.mode-button.active {
  background: #111318;
  color: #fff;
  box-shadow: 0 8px 20px rgba(17, 19, 24, 0.16);
}

.title-fields,
.batch-fields {
  display: grid;
  gap: 14px;
}

.batch-fields-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.batch-fields-head strong,
.batch-fields-head small {
  display: block;
}

.batch-fields-head strong {
  font-size: 0.92rem;
}

.batch-fields-head small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.batch-rows {
  display: grid;
  gap: 9px;
}

.batch-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 9px;
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(16, 17, 20, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.batch-row-number {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  align-self: center;
  border-radius: 7px;
  background: #111318;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.batch-row .field {
  gap: 5px;
}

.batch-row .field input {
  min-height: 40px;
}

.batch-remove {
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid rgba(199, 53, 79, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #b52e48;
  font-size: 0.78rem;
  font-weight: 730;
}

.batch-format-selector {
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  margin: 0;
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field span {
  color: #555b66;
  font-size: 0.82rem;
  font-weight: 700;
}

.field small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.span-full {
  grid-column: 1 / -1;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(16, 17, 20, 0.11);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input,
.field select {
  padding: 0 13px;
}

.field textarea {
  resize: vertical;
  min-height: 78px;
  padding: 12px 13px;
  line-height: 1.45;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(10, 132, 255, 0.58);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.12);
}

.upload-box {
  display: grid;
  min-height: 88px;
  align-content: center;
  gap: 6px;
  padding: 14px;
  border: 1px dashed rgba(16, 17, 20, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.upload-box:hover {
  border-color: rgba(10, 132, 255, 0.46);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.08);
}

.upload-box.permission-disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.api-key-field input:disabled {
  cursor: not-allowed;
  -webkit-text-security: disc;
  user-select: none;
  opacity: 0.82;
}

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

.upload-box strong {
  color: #20232a;
  font-size: 0.96rem;
}

.upload-box small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.reference-preview {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(16, 17, 20, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.reference-preview[hidden] {
  display: none;
}

.reference-preview img {
  width: 86px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(16, 17, 20, 0.08);
  background: #fff;
}

.portrait-preview {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 56px;
  padding: 8px;
  border: 1px solid rgba(16, 17, 20, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.portrait-preview[hidden] {
  display: none;
}

.portrait-preview img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(16, 17, 20, 0.08);
  background: #fff;
}

.portrait-preview small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.action-row,
.section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-btn,
.ghost-btn {
  min-height: 46px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 760;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.primary-btn {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #111318;
  color: #fff;
  box-shadow: 0 14px 30px rgba(17, 19, 24, 0.18);
}

.ghost-btn {
  border: 1px solid rgba(16, 17, 20, 0.12);
  background: rgba(255, 255, 255, 0.66);
  color: #20232a;
}

.primary-btn:hover:not(:disabled),
.ghost-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.primary-btn:disabled,
.ghost-btn:disabled {
  opacity: 0.45;
}

.compact {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.9rem;
}

.status-card {
  position: sticky;
  top: 18px;
  padding: 18px;
}

.status-top {
  display: flex;
  min-height: 32px;
  align-items: center;
  gap: 10px;
  font-weight: 760;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
}

.status-dot.running {
  background: var(--blue);
  box-shadow: 0 0 0 6px rgba(10, 132, 255, 0.12);
}

.status-dot.done {
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(22, 163, 124, 0.12);
}

.status-dot.error {
  background: var(--rose);
  box-shadow: 0 0 0 6px rgba(255, 79, 109, 0.12);
}

.progress-track {
  height: 7px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(16, 17, 20, 0.08);
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--gold));
  transition: width 220ms ease;
}

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

.mini-grid div {
  min-height: 72px;
  padding: 12px;
  border: 1px solid rgba(16, 17, 20, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.mini-grid strong,
.mini-grid span {
  display: block;
}

.mini-grid strong {
  font-size: 1.18rem;
}

.mini-grid span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 680;
}

.status-card p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.section-block {
  margin-top: 42px;
}

.admin-panel {
  scroll-margin-top: 24px;
  padding-top: 8px;
}

.admin-create {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) repeat(2, minmax(180px, 0.8fr));
  gap: 16px;
  align-items: end;
  padding: 20px;
}

.admin-create h3,
.user-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.admin-create p,
.user-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

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

.permission-check,
.account-toggle {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid rgba(16, 17, 20, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  color: #292c32;
  font-size: 0.82rem;
  font-weight: 680;
}

.permission-check input,
.account-toggle input {
  width: 17px;
  height: 17px;
  accent-color: #111318;
}

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

.user-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.user-card-head,
.user-card-actions {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.user-card-actions .field {
  width: min(360px, 100%);
}

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

.section-head h2 {
  margin: 5px 0 0;
  font-size: 2rem;
  line-height: 1.1;
}

.format-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.format-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "box label"
    "box meta";
  column-gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(16, 17, 20, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  min-width: 0;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.format-check:has(input:checked) {
  border-color: rgba(16, 17, 20, 0.42);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 7px 18px rgba(31, 41, 55, 0.08);
}

.format-check input {
  grid-area: box;
  width: 18px;
  height: 18px;
  accent-color: #111318;
}

.format-check span {
  grid-area: label;
  min-width: 0;
  color: #20232a;
  font-weight: 760;
}

.format-check small {
  grid-area: meta;
  min-width: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 680;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.cover-grid {
  display: grid;
  gap: 16px;
}

.batch-tasks-grid {
  display: grid;
  gap: 12px;
}

.batch-task {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(16, 17, 20, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 16px 42px rgba(31, 41, 55, 0.08);
}

.batch-task.failed {
  border-color: rgba(255, 79, 109, 0.28);
}

.batch-task-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.batch-task-head h3,
.batch-task-head p,
.batch-message {
  margin: 0;
}

.batch-task-head h3 {
  font-size: 1rem;
}

.batch-task-head p,
.batch-message {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.batch-message.error {
  color: #c7354f;
}

.batch-status {
  min-width: 68px;
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(10, 132, 255, 0.1);
  color: #0768c7;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 760;
}

.batch-status.completed {
  background: rgba(22, 163, 124, 0.12);
  color: #0c765a;
}

.batch-status.failed {
  background: rgba(255, 79, 109, 0.11);
  color: #b52e48;
}

.batch-status.queued {
  background: rgba(106, 111, 122, 0.1);
  color: var(--muted);
}

.batch-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(16, 17, 20, 0.08);
}

.batch-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width 220ms ease;
}

.batch-result-images {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.batch-result-images a {
  display: grid;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}

.batch-result-images img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border: 1px solid rgba(16, 17, 20, 0.08);
  border-radius: 7px;
  background: #fff;
}

.batch-result-images span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}

.batch-download-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 11px;
  border: 1px solid rgba(16, 17, 20, 0.11);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.74);
  color: #20232a;
  font-size: 0.8rem;
  font-weight: 740;
  text-decoration: none;
}

.batch-task-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.batch-delete-btn {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(199, 53, 79, 0.22);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.74);
  color: #ad2942;
  font-size: 0.8rem;
  font-weight: 740;
}

.batch-delete-btn:hover:not(:disabled) {
  border-color: rgba(199, 53, 79, 0.48);
  background: rgba(255, 79, 109, 0.07);
}

.batch-delete-btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

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

.finals-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cover-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(16, 17, 20, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 20px 54px rgba(31, 41, 55, 0.11);
  backdrop-filter: blur(22px);
}

.cover-card.selected {
  border-color: rgba(10, 132, 255, 0.66);
  box-shadow: 0 22px 64px rgba(10, 132, 255, 0.16);
}

.cover-image-shell {
  display: grid;
  place-items: center;
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(247, 248, 251, 0.56)),
    repeating-linear-gradient(45deg, rgba(16, 17, 20, 0.035), rgba(16, 17, 20, 0.035) 1px, transparent 1px, transparent 12px);
}

.example-grid .cover-image-shell {
  aspect-ratio: 1 / 1;
}

.finals-grid .cover-image-shell {
  aspect-ratio: 1 / 1;
}

.cover-card img {
  width: 100%;
  height: 100%;
  max-height: 440px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}

.cover-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
}

.cover-meta strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.96rem;
}

.cover-meta span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.cover-actions {
  display: flex;
  gap: 8px;
  padding: 0 12px 12px;
}

.cover-actions button {
  min-height: 36px;
  flex: 1;
  border: 1px solid rgba(16, 17, 20, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: #20232a;
  font-weight: 720;
}

.empty-state,
.skeleton-card {
  min-height: 260px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(16, 17, 20, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.44);
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.skeleton-card {
  overflow: hidden;
  position: relative;
}

.skeleton-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.86), transparent);
  transform: translateX(-100%);
  animation: sweep 1.3s infinite;
}

.site-footer {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 36px));
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin: 0 auto;
  padding: 20px 12px 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
  text-align: center;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10;
  max-width: min(520px, calc(100% - 32px));
  padding: 12px 14px;
  border: 1px solid rgba(16, 17, 20, 0.1);
  border-radius: 8px;
  background: rgba(17, 19, 24, 0.9);
  color: #fff;
  box-shadow: 0 16px 44px rgba(17, 19, 24, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes sweep {
  to {
    transform: translateX(100%);
  }
}

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

  .status-card {
    position: static;
  }

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

@media (max-width: 720px) {
  .auth-view {
    min-height: calc(100vh - 97px);
  }

  .shell {
    width: min(100% - 24px, 1180px);
    padding-top: 12px;
  }

  .topbar,
  .section-head,
  .section-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-meta {
    justify-content: flex-start;
  }

  .control-card,
  .example-grid,
  .finals-grid,
  .admin-create,
  .permission-grid {
    grid-template-columns: 1fr;
  }

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

  .batch-fields-head,
  .batch-task-head {
    align-items: stretch;
  }

  .batch-fields-head {
    flex-direction: column;
  }

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

  .batch-row .field,
  .batch-remove {
    grid-column: 2;
  }

  .batch-task-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .batch-status {
    grid-column: 2;
    justify-self: start;
  }

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

  .action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .site-footer {
    width: min(100% - 24px, 1180px);
    flex-direction: column;
  }

  .section-head h2 {
    font-size: 1.65rem;
  }

  .auth-card {
    padding: 28px 22px;
  }

  .user-card-head,
  .user-card-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 359px) {
  .format-selector {
    grid-template-columns: 1fr;
  }
}
