@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans-500.ttf") format("truetype");
}

.article-page main {
  padding-top: 0;
}

.article-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.article-page .section.article-hero {
  margin-bottom: 34px;
  padding-top: 34px;
  padding-bottom: 0;
}

.article-hero h1 {
  max-width: min(100%, 860px);
  margin: 6px 0 0;
  color: var(--ink);
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
}

.article-hero h1 > .title-accent {
  display: inline;
  white-space: normal;
}

.article-hero .lead {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--muted);
}

.article-list-section {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.article-page .section.article-list-section {
  padding-top: 0;
  padding-bottom: 76px;
}

.article-category-panel,
.article-card,
.article-empty,
.article-side {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.article-category-panel {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.article-category-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.article-category-link svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.article-category-link:hover,
.article-category-link:focus-visible,
.article-category-link.is-active {
  background: var(--primary-soft);
  color: var(--primary);
}

.article-category-link.is-child {
  margin-left: 18px;
  font-size: 0.94rem;
  font-weight: 650;
}

.article-list-main {
  min-width: 0;
}

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

.article-card {
  display: grid;
  overflow: hidden;
}

.article-card-media {
  display: block;
  aspect-ratio: 12 / 7;
  overflow: hidden;
  background: var(--surface-soft);
}

.article-card-media img,
.article-detail-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 190px;
  place-items: center;
  color: var(--primary);
}

.article-card-placeholder svg {
  width: 44px;
  height: 44px;
}

.article-card-body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.article-meta a {
  color: var(--primary);
  text-decoration: none;
}

.article-card h2 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.42;
}

.article-card h2 a {
  color: var(--ink);
  text-decoration: none;
}

.article-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.7;
}

.article-read-link,
.article-back,
.article-side-link {
  color: var(--primary);
  text-decoration: none;
}

.article-read-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 40px;
  font-weight: 800;
}

.article-read-link svg,
.article-back svg {
  width: 18px;
  height: 18px;
}

.article-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 56px 24px;
  text-align: center;
}

.article-empty svg {
  width: 42px;
  height: 42px;
  color: var(--primary);
}

.article-empty h2,
.article-empty p {
  margin: 0;
}

.article-empty p {
  color: var(--muted);
}

.article-pagination {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.article-pagination .pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.article-pagination .pagination > li {
  list-style: none;
}

.article-pagination .pagination > li > a,
.article-pagination .pagination > li > span {
  display: grid;
  min-width: 40px;
  min-height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.article-pagination .pagination > .active > span,
.article-pagination .pagination > li > a:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.article-detail {
  width: min(var(--container), 100% - 48px);
  margin: 0 auto;
  padding: 116px 0 56px;
}

.article-detail-head {
  max-width: 840px;
  margin-bottom: 28px;
}

.article-detail-head h1 {
  margin: 14px 0 0;
  color: var(--ink);
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  line-height: 1.08;
}

.article-detail-head .lead {
  margin: 18px 0 0;
  color: var(--text);
  line-height: 1.75;
}

.article-detail-cover {
  aspect-ratio: 60 / 31;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.article-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
  margin-top: 28px;
}

.article-body {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: clamp(24px, 4vw, 42px);
  color: var(--text);
  font-size: 1.04rem;
  line-height: 1.82;
}

.article-body h2,
.article-body h3,
.article-body h4 {
  margin: 1.65em 0 0.7em;
  color: var(--ink);
  line-height: 1.35;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote,
.article-body pre {
  margin: 0 0 1.1em;
}

.article-body a {
  color: var(--primary);
  font-weight: 700;
}

.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 20px auto;
  border-radius: var(--radius);
}

.article-body blockquote {
  border-left: 4px solid var(--primary);
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink);
}

.article-body pre {
  overflow-x: auto;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface-neutral);
}

.article-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
  padding: 16px;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  font-weight: 800;
}

.article-side-block {
  display: grid;
  gap: 10px;
}

.article-side-block h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.article-side-link {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface-neutral);
  color: var(--ink);
}

.article-side-link span {
  line-height: 1.45;
  font-weight: 750;
}

.article-side-link small {
  color: var(--muted);
}

@media (max-width: 980px) {
  .article-hero,
  .article-list-section,
  .article-detail-layout {
    grid-template-columns: 1fr;
  }

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

  .article-category-panel,
  .article-side {
    position: static;
  }

  .article-category-panel {
    display: flex;
    overflow-x: auto;
    padding-bottom: 14px;
  }

  .article-category-link {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .article-category-link.is-child {
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  .article-page main {
    padding-top: 0;
  }

  .article-page .section.article-hero {
    margin-bottom: 34px;
    padding-top: 26px;
    padding-bottom: 0;
  }

  .article-page .section.article-list-section {
    padding-bottom: 56px;
  }

  .article-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

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

  .article-detail {
    width: min(var(--container), 100% - 32px);
    padding-top: 92px;
  }

  .article-detail-head h1 {
    font-size: 2.05rem;
  }

  .article-body {
    padding: 22px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-category-link,
  .article-read-link {
    transition: none;
  }
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans-600.ttf") format("truetype");
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans-700.ttf") format("truetype");
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans-800.ttf") format("truetype");
}

:root {
  color-scheme: light;
  --bg: #f8fbff;
  --surface: #ffffff;
  --surface-soft: #f1f7ff;
  --surface-neutral: #f8fafc;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #dbe7f5;
  --line-strong: #c6d7ee;
  --primary: #2563eb;
  --title-accent: #5b5cff;
  --primary-dark: #1d4ed8;
  --primary-soft: #eaf2ff;
  --teal: #0ea5a4;
  --orange: #f97316;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --shadow: 0 18px 42px rgba(37, 99, 235, 0.1);
  --shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.06);
  --radius: 8px;
  --container: 1200px;
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  --scroll-progress: 0;
  min-width: 0;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fafc 42%, #ffffff 100%);
  line-height: 1.58;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #38bdf8, #8b5cf6);
  content: "";
  pointer-events: none;
  transform: scaleX(var(--scroll-progress));
  transform-origin: left center;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

picture {
  display: contents;
}

:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.32);
  outline-offset: 3px;
}

.page {
  min-height: 100dvh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(219, 231, 245, 0.82);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.035);
  transition: background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.site-header.is-scrolled {
  border-bottom-color: rgba(198, 215, 238, 0.94);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.nav {
  display: flex;
  width: min(var(--container), calc(100% - 48px));
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  min-height: 44px;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand span:last-child {
  display: block;
  max-width: clamp(96px, 24vw, 220px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-logo {
  display: block;
  width: 220px;
  max-width: min(52vw, 230px);
  height: auto;
  max-height: 48px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), #39a4ff);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
  overflow: hidden;
}

.brand-mark::before {
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  transform: rotate(-18deg);
}

.brand-mark::after {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--teal);
  content: "";
}

.nav-links,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links {
  flex: 1;
  justify-content: center;
}

.nav-links a {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  border-radius: var(--radius);
  padding: 0 12px;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease;
}

.auth-open[hidden],
.user-pill[hidden] {
  display: none !important;
}

.user-pill {
  position: relative;
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  border: 0;
  border-radius: var(--radius);
  padding: 4px;
  color: var(--text);
  background: var(--surface);
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
}

.user-pill::after {
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  height: 10px;
  content: "";
}

.user-summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 3px 7px 3px 3px;
}

.user-avatar {
  position: relative;
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
  overflow: hidden;
}

.user-avatar img {
  width: 34px;
  height: 34px;
  object-fit: cover;
}

.user-avatar img[hidden] {
  display: none;
}

.user-meta {
  display: grid;
  min-width: 0;
  gap: 2px;
  line-height: 1.2;
}

.user-meta > strong {
  max-width: 126px;
  color: var(--ink);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-credit {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.user-credit strong {
  color: var(--text);
  font-size: 13px;
}

.user-pill svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.user-chevron {
  flex: 0 0 auto;
  color: var(--muted) !important;
  transition: transform 180ms ease;
}

.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  min-width: 154px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px;
  color: var(--muted);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  visibility: hidden;
}

.user-pill:hover .user-menu,
.user-pill:focus-within .user-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.user-pill:hover .user-chevron,
.user-pill:focus-within .user-chevron {
  transform: rotate(180deg);
}

.user-menu-item {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius);
  padding: 0 10px;
  color: var(--text);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  transition: color 180ms ease, background 180ms ease;
}

.user-menu-item:hover,
.user-menu-item:focus-visible {
  color: var(--primary);
  background: var(--primary-soft);
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--primary);
  background: var(--primary-soft);
}

.btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 12px 18px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

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

.btn svg,
.icon-box svg,
.mini-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.btn-primary {
  color: #ffffff;
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
}

.btn-outline {
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.24);
  background: #f6faff;
}

.btn-outline:hover {
  border-color: rgba(37, 99, 235, 0.4);
  background: #edf5ff;
}

.nav-actions .auth-open {
  min-height: 40px;
  padding: 9px 16px;
  color: #ffffff;
  border-color: var(--primary);
  background: var(--primary);
}

.nav-actions .auth-open:hover,
.nav-actions .auth-open:focus-visible {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
}

.hero-wrap {
  background:
    linear-gradient(135deg, #f8fbff 0%, #ffffff 48%, #f2f7fd 100%);
}

.hero {
  display: grid;
  width: min(var(--container), calc(100% - 48px));
  min-height: auto;
  grid-template-columns: minmax(0, 0.92fr) minmax(560px, 1.08fr);
  align-items: center;
  gap: 52px;
  margin: 0 auto;
  padding: 32px 0 28px;
}

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

h1 {
  max-width: 690px;
  margin: 18px 0 20px;
  color: var(--ink);
  font-size: clamp(44px, 4.5vw, 58px);
  line-height: 1.04;
  letter-spacing: 0;
}

h1 > span {
  display: block;
  white-space: nowrap;
}

h1 > span:first-child {
  margin-bottom: 0.14em;
}

.title-accent {
  color: var(--title-accent);
}

.animated-text {
  position: relative;
  display: inline-block;
  padding-bottom: 0.13em;
  vertical-align: top;
}

.animated-letters {
  display: flex;
  overflow: hidden;
}

.animated-letters span {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: animated-letter-in 0.5s cubic-bezier(0.2, 0.85, 0.32, 1.25) forwards;
  animation-delay: calc(var(--letter-index) * 0.1s);
}

.animated-letters span:nth-child(2) {
  margin-right: 0.08em;
}

.animated-letters span:nth-child(-n + 2) {
  color: #2563eb;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 52%, #e11d48 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.animated-underline {
  position: absolute;
  right: 50%;
  bottom: 0;
  left: 50%;
  height: 0.07em;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #9e7aff, #fe8bbb);
  animation: animated-underline-in 0.8s ease-out 0.4s forwards;
}

@keyframes animated-letter-in {
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes animated-underline-in {
  100% {
    right: 0;
    left: 0;
  }
}

h2 {
  max-width: 780px;
  margin-bottom: 14px;
  color: var(--ink);
  font-size: clamp(32px, 3vw, 46px);
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.28;
  letter-spacing: 0;
}

.lead {
  max-width: 630px;
  margin-bottom: 28px;
  color: #4b5f77;
  font-size: 18px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 0;
}

.cutout-modal-overlay[hidden] {
  display: none !important;
}

.cutout-modal-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(10px);
}

.cutout-modal {
  display: grid;
  width: min(100% - 32px, 520px);
  max-height: calc(100dvh - 48px);
  gap: 18px;
  border: 1px solid rgba(198, 215, 238, 0.88);
  border-radius: var(--radius);
  padding: 22px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: auto;
  animation: cutout-modal-in 180ms ease-out;
}

.cutout-modal:focus {
  outline: none;
}

.cutout-modal-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(100, 116, 139, 0.18);
}

.cutout-modal.is-plain .cutout-modal-head {
  grid-template-columns: minmax(0, 1fr) auto;
}

.cutout-modal-icon {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: var(--radius);
  color: var(--primary);
  background: var(--primary-soft);
}

.cutout-modal-icon[hidden] {
  display: none !important;
}

.cutout-modal-icon svg {
  width: 21px;
  height: 21px;
}

.cutout-prompt-modal .cutout-modal-icon {
  width: 22px;
  height: 22px;
  border: 0;
  color: var(--primary);
  background: transparent;
}

.cutout-prompt-modal .cutout-modal-icon svg {
  width: 18px;
  height: 18px;
  opacity: 0.58;
}

.cutout-prompt-modal .cutout-modal-head {
  align-items: center;
  gap: 8px;
}

.cutout-prompt-modal .cutout-modal-title {
  font-size: 21px;
  line-height: 1.22;
}

.cutout-modal[data-type="success"] .cutout-modal-icon {
  border-color: rgba(5, 150, 105, 0.16);
  color: var(--success);
  background: rgba(5, 150, 105, 0.08);
}

.cutout-modal[data-type="warning"] .cutout-modal-icon {
  border-color: rgba(217, 119, 6, 0.18);
  color: var(--warning);
  background: rgba(217, 119, 6, 0.08);
}

.cutout-modal[data-type="danger"] .cutout-modal-icon {
  border-color: rgba(220, 38, 38, 0.16);
  color: var(--danger);
  background: rgba(220, 38, 38, 0.07);
}

.cutout-prompt-modal[data-type="success"] .cutout-modal-icon,
.cutout-prompt-modal[data-type="warning"] .cutout-modal-icon,
.cutout-prompt-modal[data-type="danger"] .cutout-modal-icon {
  background: transparent;
}

.cutout-modal-title-wrap {
  min-width: 0;
}

.cutout-modal-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.cutout-modal-kicker[hidden] {
  display: none !important;
}

.cutout-modal-title {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.cutout-modal.wechat-auth-modal {
  width: min(calc(100% - 16px), 380px);
  gap: 14px;
  padding: 22px;
}

.wechat-auth-modal .cutout-modal-head {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 10px;
}

.wechat-auth-modal .cutout-modal-icon {
  display: none;
}

.wechat-auth-modal .cutout-modal-title {
  font-size: 22px;
  line-height: 1.22;
}

.wechat-auth-modal .cutout-modal-close {
  width: 38px;
  height: 38px;
}

.cutout-modal-close {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-neutral);
}

.cutout-modal-close:hover,
.cutout-modal-close:focus-visible {
  color: var(--primary);
  background: var(--primary-soft);
}

.cutout-modal-close svg {
  width: 18px;
  height: 18px;
}

.cutout-modal-body {
  min-width: 0;
}

.cutout-modal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.cutout-modal-footer[hidden] {
  display: none !important;
}

.cutout-modal-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 0 16px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
}

.cutout-modal-action.primary {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.cutout-modal-action.primary:hover,
.cutout-modal-action.primary:focus-visible {
  color: #ffffff;
  background: var(--primary-dark);
}

.cutout-modal-action.outline {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface);
}

.cutout-modal-action.outline:hover,
.cutout-modal-action.outline:focus-visible {
  border-color: rgba(37, 99, 235, 0.28);
  color: var(--primary);
  background: var(--primary-soft);
}

.cutout-prompt {
  display: grid;
  gap: 12px;
}

.cutout-prompt-message {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.cutout-prompt-detail {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--muted);
  background: var(--surface-neutral);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.cutout-pay-modal {
  width: min(100% - 32px, 430px);
  gap: 16px;
}

.cutout-pay-modal.cutout-modal {
  padding: 24px;
}

.cutout-pay-modal .cutout-modal-head {
  align-items: center;
  gap: 16px;
}

.cutout-pay-modal .cutout-modal-kicker {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  text-transform: none;
}

.cutout-pay-modal .cutout-modal-title {
  font-size: 22px;
  line-height: 1.18;
}

.cutout-pay {
  display: grid;
  gap: 14px;
}

.cutout-pay-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 0;
  padding: 0;
  background: transparent;
}

.cutout-pay-plan {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.cutout-pay-price {
  display: grid;
  min-width: 88px;
  gap: 3px;
  text-align: right;
}

.cutout-pay-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.cutout-pay-summary strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.cutout-pay-price strong {
  font-size: 20px;
  line-height: 1.2;
}

.cutout-pay-score {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.cutout-pay-stage {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding-top: 2px;
}

.cutout-pay-qr-frame {
  position: relative;
  display: grid;
  width: 224px;
  height: 224px;
  place-items: center;
  justify-self: center;
  border: 1px solid rgba(198, 215, 238, 0.82);
  border-radius: var(--radius);
  padding: 8px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.cutout-pay-qr-frame img {
  width: 208px;
  height: 208px;
  object-fit: contain;
}

.cutout-pay-qr-frame.is-loading img {
  opacity: 0.14;
}

.cutout-pay-loading {
  position: absolute;
  inset: 8px;
  display: grid;
  place-items: center;
  gap: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.94);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.cutout-pay-loading[hidden] {
  display: none !important;
}

.cutout-pay-loading svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
  animation: cutout-pay-spin 900ms linear infinite;
}

.cutout-pay-status {
  display: inline-flex;
  min-height: 24px;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.cutout-pay-status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.cutout-pay-status[data-type="success"] .cutout-pay-status-dot {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
}

.cutout-pay-status[data-type="warning"] .cutout-pay-status-dot {
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.11);
}

.cutout-pay-status[data-type="danger"] .cutout-pay-status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.cutout-pay-status [data-type="success"] {
  color: var(--success);
}

.cutout-pay-status [data-type="warning"] {
  color: var(--warning);
}

.cutout-pay-status [data-type="danger"] {
  color: var(--danger);
}

.cutout-pay-countdown {
  color: var(--ink);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.cutout-pay-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.cutout-pay-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 2px;
}

.cutout-pay-actions [hidden] {
  display: none !important;
}

.cutout-pay-retry {
  min-height: 42px;
  padding: 10px 14px;
}

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

@media (prefers-reduced-motion: reduce) {
  .cutout-pay-loading svg {
    animation: none;
  }
}

@keyframes cutout-modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 520px) {
  .cutout-modal-overlay {
    padding: 16px;
  }

  .cutout-modal {
    width: min(100%, 520px);
    padding: 18px;
  }

  .cutout-modal.wechat-auth-modal {
    width: min(100%, 340px);
    padding: 18px;
  }

  .wechat-auth-modal .cutout-modal-head {
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 8px;
  }

  .wechat-auth-modal .cutout-modal-title {
    font-size: 20px;
    line-height: 1.2;
  }

  .cutout-modal-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cutout-modal-action {
    width: 100%;
  }

  .cutout-pay-modal.cutout-modal {
    padding: 18px;
  }

  .cutout-pay-summary {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .cutout-pay-price {
    min-width: 0;
    text-align: left;
  }

  .cutout-pay-qr-frame {
    width: min(224px, 100%);
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .cutout-pay-qr-frame img {
    width: min(208px, calc(100% - 16px));
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .cutout-pay-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cutout-pay-retry {
    width: 100%;
  }
}

.hero-media {
  position: relative;
}

.comparison-shell {
  position: relative;
  border-radius: var(--radius);
  /* box-shadow: var(--shadow); */
}

.comparison-slider {
  --split: 50%;
  position: relative;
  height: clamp(360px, 34vw, 452px);
  border-radius: var(--radius);
  background: #edf3f9;
  isolation: isolate;
  overflow: hidden;
}

.comparison-layer,
.comparison-layer img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.comparison-layer img {
  object-fit: cover;
  object-position: center;
  user-select: none;
  pointer-events: none;
}

.comparison-after {
  background:
    linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
    linear-gradient(-45deg, transparent 75%, #e5e7eb 75%),
    #ffffff;
  background-position: 0 0, 0 14px, 14px -14px, -14px 0;
  background-size: 28px 28px;
  clip-path: inset(0 0 0 var(--split));
  z-index: 1;
}

.comparison-label {
  position: absolute;
  bottom: 16px;
  z-index: 6;
  border-radius: 999px;
  padding: 8px 16px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.48);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
  backdrop-filter: blur(10px);
}

.comparison-label.before {
  left: 16px;
}

.comparison-label.after {
  right: 16px;
}

.comparison-range {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: ew-resize;
  opacity: 0;
  touch-action: none;
  appearance: none;
}

.comparison-range::-webkit-slider-thumb {
  width: 48px;
  height: 452px;
  cursor: ew-resize;
  appearance: none;
}

.comparison-range::-moz-range-thumb {
  width: 48px;
  height: 452px;
  border: 0;
  cursor: ew-resize;
}

.comparison-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  z-index: 4;
  width: 2px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
  transform: translateX(-50%);
  pointer-events: none;
}

.comparison-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.3);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(8px);
}

.comparison-handle svg {
  width: 23px;
  height: 23px;
  stroke-width: 2.6;
}

.comparison-range:focus-visible ~ .comparison-divider .comparison-handle {
  outline: 3px solid rgba(37, 99, 235, 0.34);
  outline-offset: 4px;
}

.workbench {
  border: 1px solid rgba(198, 215, 238, 0.82);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.workbench-top {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
  background: rgba(248, 251, 255, 0.94);
}

.traffic {
  display: flex;
  gap: 7px;
  align-items: center;
}

.traffic span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff6b5f;
}

.traffic span:nth-child(2) {
  background: #ffbd4a;
}

.traffic span:nth-child(3) {
  background: #30c76b;
}

.workbench-title {
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.workbench-chip {
  border: 1px solid rgba(14, 165, 164, 0.18);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--teal);
  background: rgba(14, 165, 164, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.workbench-body {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 150px;
  min-height: 464px;
}

.side-panel {
  border-right: 1px solid var(--line);
  padding: 16px;
  background: #f8fbff;
}

.side-panel.right {
  border-right: 0;
  border-left: 1px solid var(--line);
}

.upload-box {
  display: grid;
  min-height: 116px;
  place-items: center;
  border: 1.5px dashed rgba(37, 99, 235, 0.42);
  border-radius: var(--radius);
  padding: 14px;
  color: var(--primary);
  background: #eef6ff;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.upload-box svg {
  width: 25px;
  height: 25px;
  margin: 0 auto 8px;
}

.queue-list,
.export-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.queue-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 9px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.queue-thumb {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  background-position: center;
  background-size: cover;
}

.queue-item strong,
.export-list strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
}

.queue-item span,
.export-list span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.progress-line {
  height: 6px;
  margin-top: 8px;
  border-radius: 999px;
  background: #e6edf7;
  overflow: hidden;
}

.progress-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #38bdf8);
}

.tool-section {
  padding-top: 34px;
}

.tool-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.42fr);
  gap: 18px;
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.tool-upload-card,
.history-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--surface-neutral);
}

.tool-upload-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

.live-upload {
  width: 100%;
  min-height: 150px;
}

.live-upload span {
  display: block;
}

.tool-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.tool-meta span {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 8px;
  background: var(--surface);
}

.tool-message {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--text);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
}

.tool-message[data-type="success"] {
  border-color: rgba(5, 150, 105, 0.25);
  color: var(--success);
  background: rgba(5, 150, 105, 0.08);
}

.tool-message[data-type="warning"] {
  border-color: rgba(217, 119, 6, 0.25);
  color: var(--warning);
  background: rgba(217, 119, 6, 0.08);
}

.tool-message[data-type="danger"] {
  border-color: rgba(220, 38, 38, 0.25);
  color: var(--danger);
  background: rgba(220, 38, 38, 0.08);
}

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

.tool-preview-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eff5fb;
  overflow: hidden;
}

.tool-preview-card.checker {
  background:
    linear-gradient(45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f7 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f7 75%),
    #ffffff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.tool-preview-card figcaption {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 800;
}

.tool-preview-canvas {
  display: grid;
  min-height: 260px;
  place-items: center;
  padding: 14px;
}

.tool-preview-canvas img {
  max-height: 300px;
  width: auto;
  object-fit: contain;
}

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

.tool-actions .is-disabled {
  opacity: 0.52;
  pointer-events: none;
}

.history-panel {
  grid-column: 1 / -1;
}

.history-panel h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 18px;
}

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

.history-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px;
  background: var(--surface);
}

.history-item img {
  width: 56px;
  height: 56px;
  border-radius: 7px;
  object-fit: cover;
}

.history-item strong,
.history-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item strong {
  color: var(--ink);
  font-size: 12px;
}

.history-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.history-item a {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.history-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--muted);
  background: var(--surface);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.auth-tip {
  display: grid;
  gap: 4px;
  min-height: 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.auth-tip[data-type="success"] {
  color: var(--success);
}

.auth-tip[data-type="warning"] {
  color: var(--warning);
}

.auth-tip[data-type="danger"] {
  color: var(--danger);
}

.auth-countdown {
  color: var(--danger);
  font-variant-numeric: tabular-nums;
}

.auth-countdown-line,
.auth-status-text {
  display: block;
}

.wechat-login {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.wechat-qr-box {
  display: grid;
  width: min(256px, 100%);
  min-height: 0;
  aspect-ratio: 1;
  place-items: center;
  border: 0;
  border-radius: var(--radius);
  padding: 12px;
  background: transparent;
  box-shadow: none;
}

.wechat-qr-box img {
  display: block;
  width: min(228px, 100%);
  height: auto;
  aspect-ratio: 1;
  border: 0;
  border-radius: 0;
  background: var(--surface);
}

.wechat-qr-box img[hidden],
.wechat-qr-placeholder[hidden] {
  display: none !important;
}

.wechat-qr-placeholder {
  display: grid;
  gap: 10px;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.wechat-qr-placeholder svg {
  width: 40px;
  height: 40px;
  color: var(--primary);
}

.wechat-login .btn {
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
}

.canvas-area {
  padding: 18px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  height: 292px;
}

.compare-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eff5fb;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.compare-card.checker {
  background:
    linear-gradient(45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f7 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f7 75%),
    #ffffff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.compare-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
  filter: drop-shadow(0 18px 24px rgba(15, 23, 42, 0.14));
}

.compare-card.checker img {
  padding: 20px;
}

.image-tag {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.processing-strip {
  display: grid;
  grid-template-columns: 1fr 126px;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.processing-strip strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.processing-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-panel {
  display: grid;
  gap: 10px;
}

.export-option {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: #ffffff;
}

.export-option.is-active {
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.quality {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.hero-badge {
  position: absolute;
  right: 28px;
  bottom: 18px;
  display: flex;
  width: min(260px, 48%);
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(198, 215, 238, 0.9);
  border-radius: var(--radius);
  padding: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.hero-badge strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.hero-badge span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.section {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
  padding: 90px 0;
  scroll-margin-top: 92px;
}

.section.compact {
  padding-top: 28px;
}

.section.full-width {
  padding-bottom: 0;
}

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

.section-head p {
  max-width: 520px;
  margin-bottom: 0;
  color: #475569;
  font-weight: 600;
}

.section-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.quick-card {
  position: relative;
  display: flex;
  min-height: 306px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.quick-card:hover {
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.085);
  transform: translateY(-3px);
}

.quick-visual {
  position: relative;
  height: 168px;
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.quick-card:nth-child(2) .quick-visual,
.quick-card:nth-child(3) .quick-visual,
.quick-card:nth-child(4) .quick-visual {
  background-color: #ffffff;
  background-size: cover;
}

.quick-card .quick-visual.is-checker {
  background:
    linear-gradient(45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f7 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f7 75%),
    #ffffff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.quick-card .quick-visual.is-checker::after {
  position: absolute;
  inset: 0;
  background-image: var(--quick-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  content: "";
}

.quick-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.quick-content p {
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 600;
}

.mini-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 0;
  background: transparent;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
  text-align: left;
}

.feature-card,
.step-card,
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.category-section {
  width: min(var(--container), calc(100% - 48px));
  padding-top: 74px;
}

.category-section .section-head {
  display: block;
  max-width: 1260px;
  margin: 0 auto 46px;
  text-align: center;
}

.category-section .section-kicker {
  display: none;
}

.category-section .section-head h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  column-gap: 18px;
  row-gap: 4px;
  width: 100%;
  max-width: none;
  margin: 0 0 22px;
  color: #2a2b31;
  font-size: clamp(36px, 3vw, 50px);
  line-height: 1.18;
  text-align: center;
  white-space: nowrap;
}

.category-title-accent {
  color: var(--title-accent);
}

.category-title-text {
  color: #2a2b31;
}

.category-section .section-head p {
  max-width: 980px;
  margin: 0 auto;
  color: #475569;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.7;
}

.category-showcase {
  display: grid;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 34px;
}

.category-tab {
  display: inline-flex;
  min-width: 104px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid #9da3b5;
  border-radius: 999px;
  padding: 0 24px;
  color: #17181c;
  background: #ffffff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  appearance: none;
  -webkit-appearance: none;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.category-tab.is-wide {
  min-width: 132px;
}

.category-tab:hover {
  border-color: rgba(37, 99, 235, 0.62);
  color: var(--primary);
  transform: translateY(-2px);
}

.category-tab.is-active,
.category-tab.is-active:hover,
.category-tab.is-active:active {
  border-color: var(--primary);
  color: #1d4ed8;
  background: #eff6ff;
  box-shadow: none;
}

.category-panel {
  position: relative;
  display: none;
  min-height: 520px;
  grid-template-columns: minmax(280px, 0.34fr) minmax(0, 0.66fr);
  gap: 28px;
  align-items: center;
  border-radius: 18px;
  padding: 74px 42px 64px 34px;
  background:
    linear-gradient(135deg, #f8fbff 0%, #f4f7fb 100%);
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.06);
  overflow: visible;
}

.category-panel::after {
  display: none;
}

.category-panel.is-active {
  display: grid;
}

.category-copy {
  position: relative;
  z-index: 2;
  max-width: 360px;
}

.category-copy h3 {
  display: inline;
  margin: 0;
  color: #1d4ed8;
  background: linear-gradient(180deg, transparent 48%, rgba(37, 99, 235, 0.12) 48%);
  font-size: 28px;
  line-height: 1.25;
}

.category-points {
  margin: 26px 0 0;
  padding-left: 1.05em;
  color: #343640;
  list-style: disc;
}

.category-points li {
  margin: 0 0 10px;
  padding-left: 4px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.65;
}

.category-visual {
  position: relative;
  display: grid;
  min-height: 340px;
  grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.category-main-card,
.category-result-card {
  position: relative;
  margin: 0;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  background: #ffffff;
}

.category-main-card {
  box-shadow: 0 18px 36px rgba(42, 43, 49, 0.1);
  transform: rotate(-1.2deg);
}

.category-result-card {
  background:
    linear-gradient(45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f7 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f7 75%),
    #ffffff;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-size: 24px 24px;
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.12);
  transform: rotate(1.2deg);
}

.category-main-card img,
.category-result-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  pointer-events: none;
}

.category-result-card img {
  filter: none;
}

.category-arrow {
  position: relative;
  z-index: 4;
  justify-self: center;
  color: #343640;
  transform: none;
}

.category-arrow svg {
  width: 52px;
  height: 52px;
  stroke-width: 2.5;
}

.quality-section {
  width: 100%;
  max-width: none;
  padding: 94px 0 104px;
  background: var(--surface-neutral);
}

.quality-inner {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
}

.quality-head {
  max-width: 760px;
  margin: 0 auto 38px;
  text-align: center;
}

.quality-head .section-kicker {
  display: none;
}

.quality-head h2 {
  max-width: none;
  margin-bottom: 14px;
  font-size: clamp(34px, 3.2vw, 48px);
  line-height: 1.16;
  word-break: keep-all;
}

.quality-head p {
  max-width: 680px;
  margin: 0 auto;
  color: #475569;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.65;
}

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

.audience-card {
  min-width: 0;
  min-height: 300px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.audience-quote {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #eef5ff;
  color: #2563eb;
  margin-bottom: 24px;
}

.audience-quote svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.3;
}

.audience-card h3 {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.25;
}

.audience-card p {
  margin-bottom: 0;
  color: #475569;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
}

.audience-card-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid #edf2f7;
}

.audience-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f2f6fb;
  color: #2563eb;
  flex: 0 0 auto;
}

.audience-avatar svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.2;
}

.audience-role {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}

.audience-meta {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

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

.feature-card,
.step-card {
  padding: 22px;
}

.feature-card p,
.step-card p,
.faq-item p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 600;
}

.icon-box,
.mini-icon {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: var(--radius);
  color: var(--primary);
  background: var(--primary-soft);
  margin-bottom: 16px;
}

.icon-box.teal {
  color: var(--teal);
  background: rgba(14, 165, 164, 0.1);
}

.icon-box.orange {
  color: var(--orange);
  background: rgba(249, 115, 22, 0.11);
}

.why-section {
  width: 100%;
  max-width: none;
  padding: 102px 0;
  background: #ffffff;
}

.why-inner {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
}

.why-section .section-head {
  display: block;
  max-width: 860px;
  margin: 0 auto 42px;
  text-align: center;
}

.why-section .section-kicker {
  display: none;
}

.why-section h2 {
  max-width: none;
  margin-bottom: 16px;
  font-size: clamp(34px, 3.5vw, 50px);
  line-height: 1.14;
}

.why-section .section-head p {
  max-width: 560px;
  margin: 0 auto;
  color: #475569;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.55;
}

.why-section .feature-grid {
  gap: 20px;
  align-items: stretch;
}

.why-section .feature-card {
  position: relative;
  display: grid;
  min-height: 360px;
  grid-template-rows: auto 1fr;
  gap: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 32px 0;
  background: #f8fafc;
  box-shadow: none;
  overflow: hidden;
  isolation: isolate;
}

.why-section .feature-card::before {
  position: absolute;
  inset: auto 28px 0 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.22), transparent);
  content: "";
}

.feature-copy {
  position: relative;
  z-index: 2;
}

.feature-copy h3 {
  margin-bottom: 12px;
  font-size: 24px;
  line-height: 1.25;
}

.feature-copy p {
  max-width: 360px;
  color: #475569;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.55;
}

.feature-media {
  position: relative;
  min-height: 198px;
  margin: 0 -18px;
  align-self: end;
  overflow: hidden;
  background:
    linear-gradient(45deg, rgba(229, 231, 235, 0.82) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(229, 231, 235, 0.82) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(229, 231, 235, 0.82) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(229, 231, 235, 0.82) 75%),
    #ffffff;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-size: 24px 24px;
}

.feature-media img {
  width: 100%;
  height: 100%;
  min-height: 198px;
  object-fit: cover;
  object-position: center;
}

.feature-media.contain {
  display: grid;
  place-items: center;
  padding: 18px;
}

.feature-media.contain img {
  width: 86%;
  height: 86%;
  min-height: 0;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(15, 23, 42, 0.14));
}

.feature-media.app-preview {
  border-top: 1px solid rgba(198, 215, 238, 0.7);
  background: #ffffff;
}

.feature-media.app-preview img {
  object-fit: cover;
  object-position: left top;
}

.feature-badge {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 0 14px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.feature-badge svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.6;
}

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

.step-number {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--primary);
  font-weight: 800;
  margin-bottom: 16px;
}

.how-section {
  width: 100%;
  max-width: none;
  padding: 102px 0;
  background: #f1f5f9;
}

.how-inner {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
}

.how-section .section-head {
  display: block;
  max-width: 820px;
  margin: 0 auto 44px;
  text-align: center;
}

.how-section .section-kicker {
  display: none;
}

.how-section h2 {
  max-width: none;
  margin-bottom: 14px;
  font-size: clamp(34px, 3.4vw, 50px);
  line-height: 1.14;
}

.how-section .section-head p {
  max-width: 560px;
  margin: 0 auto;
  color: #475569;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.65;
}

.how-section .step-grid {
  gap: 24px;
}

.how-section .step-card {
  position: relative;
  min-height: 278px;
  border: 1px solid var(--line);
  padding: 40px 34px 34px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.how-section .step-card::after {
  position: absolute;
  right: -40px;
  bottom: -48px;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  background: #f1f5f9;
  content: "";
}

.step-icon {
  position: relative;
  z-index: 1;
  display: inline-grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin-bottom: 28px;
  color: #111827;
}

.step-icon svg {
  width: 48px;
  height: 48px;
  stroke-width: 1.8;
}

.step-label {
  position: absolute;
  top: 30px;
  right: 32px;
  color: #c8d8ec;
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
}

.how-section .step-card h3 {
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
  font-size: 25px;
  line-height: 1.25;
}

.how-section .step-card p {
  position: relative;
  z-index: 1;
  color: #475569;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.75;
}

.faq-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.faq-heading {
  text-align: center;
}

.faq-heading h2,
.faq-heading .lead {
  margin-right: auto;
  margin-left: auto;
}

.faq-heading .lead {
  margin-bottom: 0;
}

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

.faq-question {
  display: flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
  font-weight: 800;
}

.faq-item {
  padding: 0 18px;
}

.faq-answer {
  display: none;
  padding: 0 0 18px;
  color: var(--muted);
  font-weight: 600;
  white-space: pre-line;
}

.faq-item.is-open .faq-answer {
  display: block;
}

.final-section {
  position: relative;
  width: 100%;
  max-width: none;
  overflow: hidden;
  isolation: isolate;
}

.final-section::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  background: linear-gradient(180deg, #eef6ff 0%, #eaf3ff 100%);
  content: "";
}

.final-cta {
  position: relative;
  display: flex;
  width: min(var(--container), calc(100% - 48px));
  min-height: 220px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 28px 0 52px;
}

.final-copy {
  position: relative;
  z-index: 1;
  max-width: 680px;
  text-align: center;
}

.final-copy::after {
  position: absolute;
  top: -86px;
  right: -96px;
  z-index: -1;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(96, 165, 250, 0.42) 0%, rgba(147, 197, 253, 0.3) 34%, rgba(191, 219, 254, 0.16) 58%, rgba(239, 246, 255, 0) 76%);
  content: "";
  opacity: 0.95;
  pointer-events: none;
  transform: rotate(-8deg);
}

.final-cta h2 {
  margin-right: auto;
  margin-bottom: 22px;
  margin-left: auto;
  font-size: clamp(34px, 3vw, 48px);
}

.final-cta .hero-actions {
  justify-content: center;
}

.final-cta p {
  max-width: 560px;
  margin-bottom: 22px;
  color: #4b5f77;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.62;
}

.credit-pricing {
  position: relative;
  display: block;
  max-width: none;
  margin: 0 auto;
  padding: 0;
}

.credit-heading,
.credit-plans {
  position: relative;
  z-index: 1;
}

.credit-heading {
  margin: 0 0 34px;
  text-align: left;
}

.credit-plans {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  padding-top: 14px;
}

.credit-card {
  position: relative;
  display: flex;
  min-height: 408px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  background:
    linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: var(--shadow-sm);
  overflow: visible;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.credit-card:hover {
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.085);
  transform: translateY(-3px);
}

.credit-card.featured {
  border-color: rgba(37, 99, 235, 0.28);
}

.credit-tag {
  position: absolute;
  top: -15px;
  left: 50%;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 14px;
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.22);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  transform: translateX(-50%);
  white-space: nowrap;
}

.credit-name {
  display: block;
  min-height: 28px;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
}

.credit-subtitle {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.credit-price {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0;
  margin: 6px 0 8px;
  color: var(--primary);
  line-height: 1;
  white-space: nowrap;
}

.credit-price span {
  margin-right: 4px;
  font-size: 20px;
  font-weight: 800;
}

.credit-price strong {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 0;
}

.credit-price em {
  color: var(--muted);
  font-size: 16px;
  font-style: normal;
  font-weight: 800;
  margin-left: 0;
  word-spacing: 2px;
}

.credit-rate {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.credit-features {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.credit-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.credit-features svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--success);
  stroke-width: 2.5;
}

.credit-buy {
  width: 100%;
  margin-top: auto;
  padding-inline: 14px;
}

.pricing-plans-section {
  padding-top: 48px;
}

.pricing-plans-section .section-head h1 {
  max-width: 780px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(32px, 3vw, 46px);
  line-height: 1.12;
  letter-spacing: 0;
}

.pricing-plans-section .section-head h1 > span {
  display: inline;
  white-space: normal;
}

.pricing-message {
  max-width: 640px;
  margin-bottom: 28px;
}

.pricing-plan-grid .credit-card {
  min-height: 430px;
}

.pricing-faq-section {
  padding-top: 42px;
  padding-bottom: 76px;
}

.pricing-faq-section .faq-wrap {
  max-width: 920px;
  margin: 0 auto;
}
html.motion-ready [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 28px, 0) scale(0.98);
  transition:
    opacity 560ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 560ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

html.motion-ready [data-reveal="headline"] {
  transform: translate3d(0, 22px, 0);
}

html.motion-ready [data-reveal="panel"] {
  transform: translate3d(0, 34px, 0) scale(0.975);
}

html.motion-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

html.motion-ready [data-reveal].is-reveal-complete {
  transition-delay: 0ms;
  will-change: auto;
}

html.motion-ready .quick-card[data-reveal].is-visible:hover,
html.motion-ready .credit-card[data-reveal].is-visible:hover {
  transform: translateY(-3px);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 30px 0;
  background: #ffffff;
}

.footer-inner {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-main .brand span:last-child {
  max-width: min(70vw, 320px);
}

.footer-main .brand-logo {
  width: 220px;
  max-width: min(70vw, 230px);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  display: inline-flex;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
}

.footer-record {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.footer-record a {
  color: inherit;
}

.footer-record a:hover {
  color: var(--primary);
}

.friend-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.friend-links-title {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
}

.friend-links-list {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px 18px;
  min-width: 0;
}

.friend-links-list a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  color: var(--text);
  line-height: 1.35;
  word-break: break-word;
  transition: color 0.2s ease;
}

.friend-links-list a:hover {
  color: var(--primary);
}

@media (max-width: 1120px) {
  .workbench-body,
  .category-panel,
  .faq-wrap {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
    gap: 32px;
  }

  h1 {
    font-size: clamp(40px, 4.6vw, 52px);
  }

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

  .workbench-body {
    min-height: auto;
  }

  .tool-panel {
    grid-template-columns: 1fr;
  }

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

  .comparison-slider {
    height: clamp(320px, 34vw, 420px);
  }

  .side-panel,
  .side-panel.right {
    border: 0;
    border-bottom: 1px solid var(--line);
  }

  .category-panel {
    min-height: auto;
    padding: 54px 28px 46px;
  }

  .category-panel::after {
    display: none;
  }

  .category-copy {
    max-width: none;
  }

  .category-visual {
    min-height: 360px;
  }

  .audience-grid {
    gap: 28px;
  }

  .nav {
    min-height: 72px;
    flex-wrap: wrap;
    row-gap: 8px;
    padding: 10px 0;
  }

  .nav-links {
    order: 3;
    flex: 0 0 100%;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

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

  .nav-links a {
    min-height: 44px;
    flex: 0 0 auto;
    border: 1px solid rgba(198, 215, 238, 0.86);
    background: #ffffff;
  }
}

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

  .comparison-slider {
    height: clamp(340px, 54vw, 500px);
  }

  .tool-preview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .nav,
  .hero,
  .section,
  .footer-inner {
    width: min(100% - 32px, var(--container));
  }

  h1 {
    font-size: clamp(40px, 12vw, 58px);
  }

  h1 > span {
    white-space: normal;
  }

  .section {
    padding: 64px 0;
    scroll-margin-top: 132px;
  }

  .section.full-width {
    padding-bottom: 0;
  }

  .quality-section {
    width: 100%;
    padding: 68px 0;
  }

  .why-section {
    width: 100%;
    padding: 68px 0;
  }

  .how-section {
    width: 100%;
    padding: 68px 0;
  }

  .quality-inner,
  .why-inner,
  .how-inner {
    width: min(100% - 32px, var(--container));
  }

  .section-head {
    display: block;
  }

  .quick-grid,
  .feature-grid,
  .step-grid,
  .compare-grid,
  .history-list {
    grid-template-columns: 1fr;
  }

  .tool-panel {
    width: min(100% - 32px, var(--container));
    padding: 14px;
  }

  .tool-preview-canvas {
    min-height: 220px;
  }

  .history-item {
    grid-template-columns: 52px minmax(0, 1fr) auto;
  }

  .history-item img {
    width: 52px;
    height: 52px;
  }

  .category-section {
    width: min(100% - 32px, var(--container));
    padding-top: 56px;
  }

  .category-section .section-head {
    margin-bottom: 30px;
  }

  .category-section .section-head h2 {
    font-size: clamp(32px, 10vw, 44px);
    display: block;
    white-space: normal;
  }

  .category-section .section-head p {
    font-size: 16px;
  }

  .category-tabs {
    gap: 10px;
    margin-bottom: 24px;
  }

  .category-tab {
    min-width: calc(50% - 6px);
    min-height: 46px;
    padding: 0 14px;
    font-size: 16px;
  }

  .category-panel {
    grid-template-columns: 1fr;
    gap: 24px;
    border-radius: 22px;
    padding: 28px 16px 24px;
    overflow: hidden;
  }

  .category-copy h3 {
    font-size: 24px;
  }

  .category-points li {
    font-size: 15px;
  }

  .category-visual {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .category-main-card,
  .category-result-card {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 20px;
    transform: none;
  }

  .category-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }

  .category-arrow svg {
    width: 38px;
    height: 38px;
  }

  .nav-actions .btn {
    padding-inline: 13px;
  }

  .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 8px;
  }

  .nav .brand {
    min-width: 0;
    overflow: hidden;
  }

  .nav .brand-logo {
    width: clamp(164px, 46vw, 200px);
    max-width: 100%;
    max-height: 44px;
  }

  .nav-actions {
    min-width: 0;
    justify-content: flex-end;
  }

  .nav-links {
    grid-column: 1 / -1;
  }

  .user-pill {
    max-width: min(100%, 200px);
  }

  .user-summary {
    width: 100%;
    gap: 8px;
  }

  .user-meta > strong {
    max-width: clamp(76px, 22vw, 112px);
  }

  .compare-grid {
    height: auto;
  }

  .compare-card {
    min-height: 260px;
  }

  .comparison-slider {
    height: clamp(300px, 78vw, 430px);
  }

  .comparison-label {
    bottom: 12px;
    padding: 7px 13px;
    font-size: 13px;
  }

  .comparison-label.before {
    left: 12px;
  }

  .comparison-label.after {
    right: 12px;
  }

  .hero-badge {
    position: static;
    width: auto;
    margin-top: 14px;
  }

  .quality-head {
    margin-bottom: 28px;
    text-align: left;
  }

  .quality-head h2 {
    font-size: clamp(32px, 10vw, 42px);
    white-space: normal;
  }

  .quality-head p {
    margin: 0;
    font-size: 16px;
  }

  .audience-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .audience-card {
    min-height: 0;
    padding: 24px 22px;
  }

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

  .audience-card-foot {
    margin-top: 22px;
    padding-top: 18px;
  }

  .why-section .section-head {
    margin-bottom: 28px;
    text-align: left;
  }

  .why-section h2 {
    font-size: clamp(32px, 10vw, 42px);
  }

  .why-section .section-head p {
    margin: 0;
    font-size: 16px;
  }

  .why-section .feature-card {
    min-height: 330px;
    padding: 26px 22px 0;
  }

  .feature-copy h3 {
    font-size: 22px;
  }

  .feature-media {
    min-height: 188px;
    margin-inline: -10px;
  }

  .feature-media img {
    min-height: 188px;
  }

  .how-section .section-head {
    margin-bottom: 28px;
    text-align: left;
  }

  .how-section h2 {
    font-size: clamp(32px, 10vw, 42px);
  }

  .how-section .section-head p {
    margin: 0;
    font-size: 16px;
  }

  .how-section .step-grid {
    gap: 16px;
  }

  .how-section .step-card {
    min-height: 240px;
    padding: 30px 24px 28px;
  }

  .how-section .step-card::after {
    right: 0;
    bottom: -68px;
  }

  .step-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 22px;
  }

  .step-icon svg {
    width: 42px;
    height: 42px;
  }

  .step-label {
    top: 26px;
    right: 24px;
    font-size: 36px;
  }

  .final-cta {
    width: min(100% - 32px, var(--container));
    min-height: 230px;
    padding: 28px 0 44px;
  }

  .final-cta h2 {
    margin-bottom: 20px;
    font-size: clamp(32px, 10vw, 42px);
  }

  .final-cta h2 .title-accent {
    display: block;
  }

  .final-copy::after {
    top: -78px;
    right: -34px;
    width: 180px;
    height: 180px;
  }

  .final-cta p {
    font-size: 16px;
  }

  .credit-pricing {
    max-width: none;
  }

  .credit-plans {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .credit-card {
    min-height: 386px;
  }

  .footer-inner {
    display: grid;
    gap: 18px;
  }

  .footer-main {
    display: grid;
    gap: 16px;
    align-items: start;
    justify-items: start;
  }

  .footer-main .brand-logo {
    width: clamp(176px, 54vw, 220px);
    max-width: 100%;
  }

  .footer-links {
    display: flex;
    width: 100%;
    max-width: 320px;
    flex-wrap: wrap;
    gap: 6px 22px;
  }

  .footer-links a {
    min-width: 44px;
    justify-content: flex-start;
  }

  .footer-record {
    margin-top: 0;
  }

  .friend-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
  }

  .friend-links-list {
    flex: 1 1 auto;
    gap: 6px 14px;
  }

  .friend-links-title {
    line-height: 1.4;
  }
}

@media (max-width: 360px) {
  .nav .brand {
    gap: 8px;
  }

  .nav .brand-mark {
    width: 32px;
    height: 32px;
  }

  .nav .brand-logo {
    width: clamp(142px, 44vw, 164px);
    max-height: 34px;
  }

  .nav {
    gap: 8px;
  }

  .nav-actions .btn {
    padding-inline: 12px;
  }

  .user-summary {
    gap: 6px;
    padding: 3px 6px 3px 3px;
  }

  .user-avatar,
  .user-avatar img {
    width: 30px;
    height: 30px;
  }

  .user-meta > strong {
    max-width: 68px;
    font-size: 13px;
  }

  .user-credit {
    font-size: 11px;
  }

  .step-label {
    right: 18px;
  }
}

.workbench-page {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 46%, #ffffff 100%);
}

.workbench-main {
  display: grid;
  width: min(var(--container), calc(100% - 48px));
  gap: 16px;
  margin: 0 auto;
  padding: 28px 0 42px;
}

.queue-upload-actions {
  display: grid;
  gap: 10px;
}

.queue-upload-actions .btn {
  width: 100%;
  justify-content: center;
}

.queue-status {
  min-height: 0;
  padding: 10px 12px;
  box-shadow: none;
  font-size: 13px;
}

.workbench-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(420px, 1.5fr) minmax(260px, 0.9fr);
  gap: 16px;
  align-items: stretch;
}

.workbench-queue-panel,
.workbench-editor-panel,
.workbench-controls {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.workbench-queue-panel,
.workbench-controls {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
}

.workbench-editor-panel {
  min-width: 0;
  overflow: hidden;
}

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

.workbench-panel-head h2,
.control-group h3 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.workbench-count {
  display: inline-flex;
  min-width: 34px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 14px;
  font-weight: 800;
}

.workbench-queue-list {
  display: grid;
  gap: 10px;
}

.queue-task {
  display: grid;
  width: 100%;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px;
  color: var(--text);
  background: var(--surface-neutral);
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.queue-task:hover,
.queue-task.is-active {
  border-color: rgba(37, 99, 235, 0.42);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.1);
}

.queue-thumb {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: var(--radius);
  background:
    linear-gradient(45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f7 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f7 75%),
    #ffffff;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  overflow: hidden;
}

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

.queue-thumb svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.queue-task strong,
.queue-task span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-task strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
}

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

.queue-status {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 800;
}

.queue-status.status-succeeded {
  color: var(--success);
  background: rgba(5, 150, 105, 0.08);
}

.queue-status.status-failed {
  color: var(--danger);
  background: rgba(220, 38, 38, 0.08);
}

.queue-empty {
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 20px 12px;
  color: var(--muted);
  background: var(--surface-neutral);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.editor-head {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.workbench-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.workbench-toolbar button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface-neutral);
}

.workbench-toolbar button:hover,
.workbench-toolbar button.is-active {
  border-color: rgba(37, 99, 235, 0.42);
  color: var(--primary);
  background: var(--primary-soft);
}

.workbench-toolbar button:disabled,
.tool-button-grid button:disabled,
.export-group .btn:disabled,
.segmented-control button:disabled,
.size-grid button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.workbench-toolbar svg,
.tool-button-grid svg {
  width: 18px;
  height: 18px;
}

.workbench-canvas-shell {
  position: relative;
  display: grid;
  min-height: 620px;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 20% 18%, rgba(14, 165, 164, 0.1), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
}

.workbench-canvas-shell canvas {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(45deg, #e7eef8 25%, transparent 25%),
    linear-gradient(-45deg, #e7eef8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e7eef8 75%),
    linear-gradient(-45deg, transparent 75%, #e7eef8 75%),
    #ffffff;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-size: 24px 24px;
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.13);
  touch-action: none;
}

.workbench-empty {
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.82);
  text-align: center;
}

.workbench-empty[hidden] {
  display: none !important;
}

.workbench-empty svg {
  width: 36px;
  height: 36px;
  color: var(--primary);
}

.workbench-empty strong {
  color: var(--ink);
  font-size: 17px;
}

.workbench-empty span {
  font-size: 13px;
  font-weight: 700;
}

.control-group {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-neutral);
}

.segmented-control,
.size-grid,
.tool-button-grid {
  display: grid;
  gap: 8px;
}

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

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

.segmented-control button,
.size-grid button,
.tool-button-grid button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  color: var(--text);
  background: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.segmented-control button:hover,
.segmented-control button.is-active,
.size-grid button:hover,
.size-grid button.is-active,
.tool-button-grid button:hover {
  border-color: rgba(37, 99, 235, 0.42);
  color: var(--primary);
  background: var(--primary-soft);
}

.color-control,
.range-control {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.color-control {
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: center;
}

.color-control input {
  width: 46px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 3px;
  background: #ffffff;
}

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

.custom-size label {
  display: grid;
  gap: 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.custom-size input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 9px;
  color: var(--ink);
  background: #ffffff;
}

.range-control input {
  width: 100%;
}

.range-control strong {
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.export-group .btn {
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .queue-task,
  .workbench-toolbar button {
    transition: none;
  }
}

@media (max-width: 1180px) {
  .workbench-layout {
    grid-template-columns: minmax(210px, 0.8fr) minmax(0, 1.4fr);
  }

  .workbench-controls {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .export-group {
    align-content: start;
  }
}

@media (max-width: 860px) {
  .workbench-main {
    width: min(100% - 32px, var(--container));
    padding-top: 22px;
  }

  .workbench-layout,
  .workbench-controls {
    grid-template-columns: 1fr;
  }

  .workbench-canvas-shell {
    min-height: 420px;
    padding: 12px;
  }

  .workbench-empty {
    inset: 12px;
  }

  .editor-head,
  .workbench-panel-head {
    align-items: start;
  }

  .editor-head {
    display: grid;
  }

  .workbench-toolbar {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .segmented-control,
  .size-grid,
  .custom-size {
    grid-template-columns: 1fr;
  }

  .queue-task {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .queue-thumb {
    width: 42px;
    height: 42px;
  }
}

/* Refined workbench */
.workbench-page {
  background:
    linear-gradient(180deg, #ffffff 0%, #f6faff 45%, #ffffff 100%);
}

.workbench-main {
  display: grid;
  width: min(var(--container), calc(100% - 48px));
  gap: 18px;
  margin: 0 auto;
  padding: 34px 0 50px;
}

.workbench-empty-stage {
  display: grid;
  gap: 26px;
}

.workbench-empty-stage[hidden],
.workbench-editor-stage[hidden] {
  display: none !important;
}

.workbench-hero-copy {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.workbench-hero-copy h1 {
  margin: 8px 0 10px;
  color: var(--ink);
  font-size: 52px;
  line-height: 1.08;
  letter-spacing: 0;
}

.workbench-hero-copy p {
  max-width: 650px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

.workbench-upload-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 40px;
  align-items: stretch;
}

.sample-board,
.workbench-upload-zone {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
}

.sample-board {
  display: grid;
  gap: 16px;
  padding: 20px;
}

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

.sample-board-head h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.22;
}

.sample-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius);
  padding: 0 10px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

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

.sample-frame {
  position: relative;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  background: var(--surface-neutral);
  overflow: hidden;
}

.sample-frame.is-result {
  background:
    linear-gradient(45deg, #e7eef8 25%, transparent 25%),
    linear-gradient(-45deg, #e7eef8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e7eef8 75%),
    linear-gradient(-45deg, transparent 75%, #e7eef8 75%),
    #ffffff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.sample-frame > span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  border-radius: var(--radius);
  padding: 5px 8px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.66);
  font-size: 12px;
  font-weight: 800;
}

.sample-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sample-frame.is-result img {
  object-fit: contain;
  padding: 10px;
}

.sample-copy {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.sample-copy strong {
  color: var(--ink);
  font-size: 16px;
}

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

.sample-options button {
  display: grid;
  min-width: 0;
  min-height: 98px;
  gap: 7px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  color: var(--text);
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.sample-options button:hover,
.sample-options button.is-active {
  border-color: rgba(37, 99, 235, 0.42);
  color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.09);
}

.sample-options img {
  width: 100%;
  height: 56px;
  border-radius: var(--radius);
  object-fit: cover;
  background: #ffffff;
}

.sample-options span {
  overflow-wrap: anywhere;
}

.workbench-upload-zone {
  display: grid;
  min-height: 468px;
  place-items: center;
  border-style: dashed;
  border-color: var(--line-strong);
  padding: 30px;
  background:
    linear-gradient(180deg, rgba(234, 242, 255, 0.74), rgba(255, 255, 255, 0.92)),
    #ffffff;
  text-align: center;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.workbench-upload-zone.is-dragging {
  border-color: rgba(37, 99, 235, 0.78);
  background:
    linear-gradient(180deg, rgba(234, 242, 255, 0.98), rgba(255, 255, 255, 0.96)),
    #ffffff;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.upload-zone-content {
  display: grid;
  width: min(520px, 100%);
  gap: 14px;
  justify-items: center;
}

.upload-zone-icon {
  display: inline-grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border-radius: var(--radius);
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #39a4ff);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.2);
}

.upload-zone-icon svg {
  width: 32px;
  height: 32px;
}

.upload-zone-content h2 {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.18;
}

.upload-zone-content p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.upload-zone-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.upload-zone-actions .btn {
  min-width: 154px;
  justify-content: center;
}

.upload-zone-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.upload-zone-meta span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.upload-zone-meta svg {
  width: 15px;
  height: 15px;
  color: var(--primary);
}

.workbench-live-status {
  min-height: 42px;
  box-shadow: none;
}

.workbench-editor-stage {
  min-width: 0;
}

.workbench-layout {
  display: grid;
  grid-template-columns: minmax(220px, 244px) minmax(0, 1fr) minmax(276px, 304px);
  gap: 14px;
  align-items: start;
}

.workbench-queue-panel,
.workbench-editor-panel,
.workbench-controls {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.workbench-queue-panel,
.workbench-controls {
  position: sticky;
  top: 92px;
  max-height: calc(100dvh - 116px);
  overflow: auto;
}

.workbench-queue-panel {
  display: grid;
  align-content: start;
  gap: 0;
  padding: 0;
}

.workbench-queue-panel .workbench-panel-head,
.workbench-controls > .workbench-panel-head {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.queue-upload-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.queue-upload-actions .btn {
  width: 100%;
  min-height: 44px;
  justify-content: center;
}

.workbench-queue-list {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
}

.queue-task {
  min-height: 68px;
  background: #ffffff;
}

.queue-task.is-active {
  border-color: rgba(37, 99, 235, 0.54);
}

.workbench-editor-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.editor-head {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.96);
}

.workbench-panel-head h2,
.control-group h3 {
  color: var(--ink);
  letter-spacing: 0;
}

.workbench-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.workbench-toolbar button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface-neutral);
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.workbench-canvas-shell {
  position: relative;
  display: grid;
  min-height: 638px;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(45deg, rgba(219, 231, 245, 0.42) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(219, 231, 245, 0.42) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(219, 231, 245, 0.42) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(219, 231, 245, 0.42) 75%),
    linear-gradient(180deg, #fbfdff 0%, #edf5ff 100%);
  background-position: 0 0, 0 14px, 14px -14px, -14px 0, 0 0;
  background-size: 28px 28px, 28px 28px, 28px 28px, 28px 28px, auto;
}

.workbench-canvas-shell.is-dragging {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.42);
}

.workbench-canvas-shell canvas {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 220px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.13);
  touch-action: none;
}

.workbench-empty {
  inset: 24px;
  background: rgba(255, 255, 255, 0.88);
}

.workbench-controls {
  display: block;
  padding: 0;
}

.control-group {
  display: grid;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 16px;
  background: transparent;
}

.control-group:last-child {
  border-bottom: 0;
}

.segmented-control,
.size-grid,
.tool-button-grid {
  display: grid;
  gap: 8px;
}

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

.tool-button-grid {
  grid-template-columns: 1fr;
}

.segmented-control button,
.size-grid button,
.tool-button-grid button {
  min-height: 44px;
}

.tool-button-grid button {
  justify-content: flex-start;
}

.export-group {
  display: grid;
}

.export-group .btn {
  width: 100%;
  min-height: 46px;
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  .sample-options button,
  .workbench-upload-zone,
  .workbench-toolbar button {
    transition: none;
  }

  .workbench-upload-zone.is-dragging {
    transform: none;
  }
}

@media (max-width: 1180px) {
  .workbench-upload-grid {
    gap: 24px;
  }

  .workbench-layout {
    grid-template-columns: minmax(210px, 236px) minmax(0, 1fr);
  }

  .workbench-controls {
    position: static;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
    overflow: visible;
  }

  .workbench-controls > .workbench-panel-head {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .workbench-main {
    width: min(var(--container), calc(100% - 32px));
    padding: 24px 0 42px;
  }

  .workbench-hero-copy {
    text-align: left;
  }

  .workbench-hero-copy h1 {
    font-size: 38px;
  }

  .workbench-hero-copy p {
    margin-left: 0;
  }

  .workbench-upload-grid,
  .workbench-layout,
  .workbench-controls {
    grid-template-columns: 1fr;
  }

  .workbench-upload-zone {
    order: -1;
    min-height: 390px;
    padding: 22px;
  }

  .upload-zone-content h2 {
    font-size: 25px;
  }

  .workbench-queue-panel,
  .workbench-controls {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .workbench-editor-panel {
    order: 1;
  }

  .workbench-controls {
    order: 2;
  }

  .workbench-queue-panel {
    order: 3;
  }

  .editor-head {
    display: grid;
    gap: 12px;
  }

  .workbench-toolbar {
    justify-content: flex-start;
  }

  .workbench-canvas-shell {
    min-height: 430px;
    padding: 14px;
  }

  .workbench-empty {
    inset: 14px;
  }
}

@media (max-width: 560px) {
  .workbench-hero-copy h1 {
    font-size: 34px;
  }

  .sample-board,
  .workbench-upload-zone {
    padding: 16px;
  }

  .sample-board-head {
    display: grid;
  }

  .sample-preview,
  .sample-options,
  .segmented-control,
  .size-grid,
  .custom-size {
    grid-template-columns: 1fr;
  }

  .sample-options button {
    grid-template-columns: 58px minmax(0, 1fr);
    min-height: 72px;
    align-items: center;
    text-align: left;
  }

  .sample-options img {
    width: 58px;
    height: 54px;
  }

  .upload-zone-actions {
    display: grid;
    width: 100%;
  }

  .upload-zone-actions .btn {
    width: 100%;
  }

  .upload-zone-meta {
    display: grid;
    width: 100%;
  }

  .upload-zone-meta span {
    justify-content: center;
  }
}

.tasks-page {
  background: #f8fbff;
}

.tasks-shell {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 72px;
}

.tasks-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 34px;
}

.tasks-hero h1 {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
  white-space: nowrap;
}

.tasks-hero h1 > span {
  display: inline;
  white-space: inherit;
}

.task-auth-card[hidden],
.tasks-board[hidden] {
  display: none !important;
}

.task-auth-card {
  display: grid;
  justify-items: center;
  border: 0;
  padding: 72px 16px 84px;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.task-auth-copy {
  display: grid;
  max-width: 560px;
  justify-items: center;
}

.task-auth-card h2 {
  margin: 0 0 24px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.18;
}

.tasks-board {
  display: grid;
  gap: 14px;
}

.task-notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: #1e3a8a;
  background: #f4f8ff;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
}

.task-notice svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--primary);
}

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

.task-status-filter button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 13px;
  color: var(--text);
  background: #ffffff;
  font-size: 14px;
  font-weight: 750;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.task-status-filter button:hover,
.task-status-filter button.is-active {
  border-color: rgba(37, 99, 235, 0.28);
  color: var(--primary-dark);
  background: #f4f8ff;
  box-shadow: none;
}

.task-status-filter button span {
  display: inline-flex;
  min-width: 23px;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.task-status-filter button.is-active span {
  color: var(--primary);
}

.task-status-filter svg {
  width: 16px;
  height: 16px;
}

.task-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

.task-card {
  display: grid;
  grid-template-columns: minmax(300px, 388px) minmax(0, 1fr);
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.035);
  overflow: hidden;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.task-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.task-card-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: center;
  border-right: 1px solid var(--line);
  padding: 10px;
  background: #f8fafc;
}

.task-card-content {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px 20px;
}

.task-card-head,
.task-card-content {
  min-width: 0;
}

.task-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.task-card-head > div {
  min-width: 0;
}

.task-number,
.task-card time {
  display: block;
}

.task-number {
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.task-card time {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.task-status {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(100, 116, 139, 0.2);
  border-radius: var(--radius);
  padding: 0 9px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.task-status svg {
  width: 15px;
  height: 15px;
}

.status-succeeded .task-status {
  border-color: rgba(5, 150, 105, 0.22);
  color: var(--success);
  background: rgba(5, 150, 105, 0.08);
}

.status-processing .task-status,
.status-pending .task-status {
  border-color: rgba(217, 119, 6, 0.22);
  color: var(--warning);
  background: rgba(217, 119, 6, 0.08);
}

.status-failed .task-status {
  border-color: rgba(220, 38, 38, 0.22);
  color: var(--danger);
  background: rgba(220, 38, 38, 0.08);
}

.task-thumb {
  position: relative;
  display: grid;
  aspect-ratio: 4 / 3;
  min-height: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: #eff5fb;
  overflow: hidden;
}

.task-thumb.checker {
  background:
    linear-gradient(45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f7 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f7 75%),
    #ffffff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

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

a.task-thumb {
  cursor: zoom-in;
}

.task-preview-modal {
  width: min(100% - 32px, 1120px);
}

.task-preview-modal .cutout-modal-body {
  display: grid;
  min-height: 0;
}

.task-preview-figure {
  display: grid;
  min-width: 0;
  margin: 0;
}

.task-preview-stage {
  display: grid;
  max-height: min(72dvh, 760px);
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eff5fb;
  overflow: hidden;
}

.task-preview-stage.checker {
  background:
    linear-gradient(45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f7 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f7 75%),
    #ffffff;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-size: 24px 24px;
}

.task-preview-stage img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(72dvh, 760px);
  object-fit: contain;
}

.task-thumb-label {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid rgba(198, 215, 238, 0.82);
  border-radius: var(--radius);
  padding: 0 7px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 750;
}

.task-thumb.is-empty {
  padding: 34px 12px 16px;
  color: var(--muted);
  background: var(--surface-neutral);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.task-thumb.is-failed {
  color: var(--danger);
  background:
    linear-gradient(180deg, rgba(220, 38, 38, 0.035) 0%, rgba(255, 255, 255, 0.94) 100%),
    var(--surface-neutral);
}

.task-thumb-empty {
  display: inline-grid;
  max-width: min(220px, 100%);
  justify-items: center;
  gap: 9px;
}

.task-thumb-empty-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.task-thumb.is-failed .task-thumb-empty-icon {
  width: auto;
  height: auto;
  border: 0;
  color: var(--danger);
  background: transparent;
  box-shadow: none;
}

.task-thumb-empty-icon svg {
  width: 21px;
  height: 21px;
}

.task-thumb-empty > span:last-child {
  color: currentColor;
  font-size: 12px;
  line-height: 1.35;
}

.task-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  overflow: hidden;
}

.task-meta-grid span {
  min-width: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 12px;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.task-meta-grid span:last-child {
  border-right: 0;
}

.task-meta-grid strong {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.task-error {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: #991b1b;
  background: #fff7f7;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.task-error svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 2px;
}

.task-error span {
  min-width: 0;
}

.task-error strong {
  display: block;
  margin-bottom: 2px;
  color: var(--danger);
  font-size: 11px;
}

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

.task-card-actions .btn {
  min-height: 38px;
  flex: 0 0 auto;
  padding-inline: 12px;
  font-size: 13px;
}

.task-main-action {
  border-color: rgba(37, 99, 235, 0.34);
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.task-action-note {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--muted);
  background: var(--surface-neutral);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.task-empty {
  display: grid;
  min-height: 280px;
  grid-column: 1 / -1;
  place-items: center;
  gap: 10px;
  border: 0;
  border-radius: var(--radius);
  padding: 28px;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.task-empty .task-empty-icon {
  width: 144px;
  height: 144px;
  display: block;
}

.task-empty strong {
  color: var(--ink);
  font-size: 18px;
}

.task-empty span {
  font-size: 14px;
  font-weight: 800;
}

.task-card.is-loading {
  pointer-events: none;
}

.task-card.is-loading .task-thumb,
.task-skeleton {
  background:
    linear-gradient(90deg, #eef5ff 0%, #f8fbff 48%, #eef5ff 100%);
  background-size: 220% 100%;
  animation: task-skeleton-pulse 1.3s ease-in-out infinite;
}

.task-card.is-loading .task-card-content {
  min-height: 220px;
}

.task-skeleton {
  height: 14px;
  border-radius: var(--radius);
}

.task-skeleton.line-wide {
  width: 74%;
}

.task-skeleton.line-mid {
  width: 52%;
}

.task-skeleton.line-short {
  width: 34%;
}

@keyframes task-skeleton-pulse {
  100% {
    background-position: -220% 0;
  }
}

.task-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.task-pagination span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.task-pagination button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

@media (max-width: 1080px) {
  .task-card {
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  }

  .task-card-content {
    padding: 16px;
  }
}

@media (max-width: 820px) {
  .tasks-shell {
    width: min(100% - 32px, var(--container));
    padding-top: 26px;
  }

  .tasks-hero {
    display: grid;
    align-items: start;
  }

  .task-status-filter {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-status-filter button {
    padding-inline: 10px;
  }

  .task-card {
    grid-template-columns: 1fr;
  }

  .task-card-content {
    padding: 14px;
  }

  .task-card-gallery {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .task-pagination {
    justify-content: space-between;
  }
}

@media (max-width: 560px) {
  .task-auth-copy .btn,
  .task-card-actions .btn {
    width: 100%;
  }

  .task-preview-modal {
    width: 100%;
  }

  .task-preview-stage,
  .task-preview-stage img {
    max-height: 62dvh;
  }

  .task-meta-grid {
    grid-template-columns: 1fr;
  }

  .task-meta-grid span {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .task-meta-grid span:last-child {
    border-bottom: 0;
  }

  .task-card-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
  }
}

@media (max-width: 420px) {
  .task-status-filter {
    grid-template-columns: 1fr;
  }

  .task-pagination {
    display: grid;
    grid-template-columns: 1fr;
  }

  .task-pagination span {
    order: -1;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .task-card,
  .task-status-filter button,
  .task-card.is-loading .task-thumb,
  .task-skeleton {
    transition: none;
    animation: none;
  }
}

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

/* Workbench console */
.workbench-main.console-main {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.console-shell {
  display: grid;
  min-height: calc(100dvh - 74px);
  grid-template-columns: 72px 260px minmax(0, 1fr) 260px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f3f6fb;
  overflow: hidden;
}

.console-shell button,
.console-shell input,
.console-shell a {
  touch-action: manipulation;
}

.console-rail {
  display: grid;
  grid-auto-rows: 76px;
  align-content: start;
  justify-items: center;
  gap: 12px;
  border-right: 1px solid var(--line);
  padding: 18px 10px;
  background: #ffffff;
}

.console-rail button {
  display: grid;
  min-width: 52px;
  min-height: 52px;
  place-items: center;
  gap: 4px;
  border: 0;
  border-radius: 999px;
  color: #8a93a6;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.console-rail button svg {
  width: 22px;
  height: 22px;
}

.console-rail button:hover,
.console-rail button.is-active {
  color: var(--title-accent);
  background: #eeeeff;
}

.console-settings,
.console-image-panel {
  min-width: 0;
  overflow-y: auto;
  background: #ffffff;
}

.console-settings {
  border-right: 1px solid var(--line);
  padding: 20px;
}

.console-panel-section[hidden] {
  display: none !important;
}

.console-panel-head,
.image-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.console-panel-head h2,
.image-panel-head h2,
.console-canvas-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
}

.console-panel-head span,
.section-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.console-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  min-height: 44px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  background: var(--surface-neutral);
  overflow: hidden;
}

.console-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 900;
}

.console-tabs button.is-active {
  color: var(--title-accent);
  background: #eeeeff;
}

.console-tabs button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.background-swatch-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.bg-swatch {
  position: relative;
  min-width: 44px;
  min-height: 44px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--swatch, #ffffff);
  cursor: pointer;
}

.bg-swatch.is-checker {
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #dfe6f0 25%, transparent 25%),
    linear-gradient(-45deg, #dfe6f0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dfe6f0 75%),
    linear-gradient(-45deg, transparent 75%, #dfe6f0 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.bg-swatch:hover,
.bg-swatch.is-active {
  border-color: var(--title-accent);
  box-shadow: 0 0 0 2px rgba(91, 92, 255, 0.16);
}

.bg-swatch.is-active::after {
  position: absolute;
  inset: 5px;
  border: 2px solid #ffffff;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.18);
  content: "";
}

.console-color-picker,
.console-custom-size label,
.console-range {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.console-color-picker input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px;
  background: #ffffff;
}

.console-size-grid {
  grid-template-columns: 1fr;
  margin-bottom: 16px;
}

.console-size-grid button,
.console-custom-size input,
.console-tool-stack button,
.image-action-grid button,
.image-action-row button,
.image-delete,
.filmstrip-add {
  min-height: 44px;
}

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

.console-custom-size input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.console-tool-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.console-tool-stack button,
.image-action-grid button,
.image-action-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: #ffffff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.console-tool-stack button:hover,
.console-tool-stack button.is-active,
.image-action-grid button:hover,
.image-action-grid button.is-active,
.image-action-row button:hover {
  border-color: rgba(37, 99, 235, 0.38);
  color: var(--primary);
  background: var(--primary-soft);
}

.console-range input {
  width: 100%;
}

.console-canvas-region {
  display: grid;
  min-width: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #f3f6fb;
}

.console-canvas-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
  border-bottom: 1px solid #e6edf7;
  padding: 12px 18px;
}

.console-status {
  max-width: min(520px, 52vw);
  margin: 0;
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 900;
}

.console-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #f3f6fb;
}

.console-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  cursor: grab;
  touch-action: none;
}

.console-stage:active canvas {
  cursor: grabbing;
}

.console-stage.is-dragging {
  outline: 3px solid rgba(37, 99, 235, 0.24);
  outline-offset: -3px;
}

.console-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: min(420px, calc(100% - 48px));
  transform: translate(-50%, -50%);
  place-items: center;
  gap: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 28px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.console-empty svg {
  width: 42px;
  height: 42px;
  color: var(--primary);
}

.console-empty strong {
  color: var(--ink);
  font-size: 18px;
}

.console-empty span {
  font-size: 14px;
  font-weight: 800;
}

.console-filmstrip {
  display: flex;
  min-width: 0;
  min-height: 112px;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #e6edf7;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.96);
}

.filmstrip-summary {
  display: grid;
  min-width: 78px;
  gap: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.filmstrip-summary strong {
  color: var(--ink);
  font-size: 20px;
}

.filmstrip-status {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted);
  background: var(--surface-neutral);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.filmstrip-status[data-status="succeeded"] {
  color: var(--success);
  background: #ecfdf5;
}

.filmstrip-status[data-status="failed"] {
  color: var(--danger);
  background: #fef2f2;
}

.filmstrip-add {
  display: inline-grid;
  min-width: 78px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.filmstrip-list {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px;
}

.filmstrip-list .queue-task {
  display: grid;
  flex: 0 0 94px;
  width: 94px;
  min-height: 76px;
  grid-template-columns: 1fr;
  grid-template-rows: 52px 1fr;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px;
  background: #ffffff;
  box-shadow: none;
}

.filmstrip-list .queue-task.is-active {
  border-color: var(--title-accent);
  box-shadow: 0 0 0 2px rgba(91, 92, 255, 0.14);
}

.filmstrip-list .queue-task > span:last-child {
  display: block;
  min-width: 0;
}

.filmstrip-list .queue-task strong,
.filmstrip-list .queue-task > span:last-child > span:first-of-type {
  display: none;
}

.filmstrip-list .queue-thumb {
  width: 100%;
  height: 52px;
  border-radius: 7px;
}

.filmstrip-list .queue-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.filmstrip-list .queue-status {
  display: flex;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  line-height: 1.2;
}

.filmstrip-empty {
  display: grid;
  min-width: 110px;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.console-image-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  border-left: 1px solid var(--line);
  padding: 20px;
}

.image-panel-head {
  margin-bottom: 0;
  justify-content: flex-start;
}

.image-panel-head button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-neutral);
  cursor: pointer;
}

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

.image-action-grid button {
  display: grid;
  min-height: 72px;
  gap: 6px;
  color: var(--ink);
}

.image-action-grid button svg {
  width: 22px;
  height: 22px;
}

.image-action-row,
.console-export-group {
  display: grid;
  gap: 10px;
}

.console-export-group .btn {
  width: 100%;
  justify-content: center;
}

.image-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  color: #8d94a6;
  background: #f3f4f6;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.image-delete:hover {
  color: var(--danger);
  background: #fef2f2;
}

@media (max-width: 1180px) {
  .console-shell {
    grid-template-columns: 68px 236px minmax(0, 1fr) 236px;
  }

  .console-settings,
  .console-image-panel {
    padding: 16px;
  }
}

@media (max-width: 860px) {
  .workbench-main.console-main {
    width: 100%;
    padding: 0;
  }

  .console-shell {
    display: flex;
    min-height: 0;
    flex-direction: column;
    overflow: visible;
  }

  .console-canvas-region {
    order: 1;
    grid-template-rows: auto minmax(420px, 58dvh) auto;
  }

  .console-canvas-head {
    display: grid;
    min-height: 0;
    padding: 14px 16px;
  }

  .console-status {
    max-width: 100%;
  }

  .console-stage canvas {
    min-height: 420px;
  }

  .console-rail {
    order: 2;
    display: flex;
    grid-auto-rows: auto;
    justify-content: flex-start;
    gap: 8px;
    border-top: 1px solid var(--line);
    border-right: 0;
    overflow-x: auto;
    padding: 10px 16px;
  }

  .console-rail button {
    flex: 0 0 72px;
    border-radius: var(--radius);
  }

  .console-settings {
    order: 3;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .console-image-panel {
    order: 4;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .console-filmstrip {
    min-height: 0;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .filmstrip-list {
    flex: 1 0 100%;
    order: 4;
  }

  .background-swatch-grid {
    grid-template-columns: repeat(5, minmax(44px, 1fr));
  }

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

@media (max-width: 520px) {
  .console-canvas-region {
    grid-template-rows: auto minmax(360px, 52dvh) auto;
  }

  .console-stage canvas {
    min-height: 360px;
  }

  .console-empty {
    width: min(330px, calc(100% - 32px));
    padding: 22px 16px;
  }

  .console-filmstrip {
    padding: 10px 12px;
  }

  .background-swatch-grid {
    grid-template-columns: repeat(4, minmax(44px, 1fr));
  }

  .console-custom-size,
  .image-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filmstrip-add {
    min-width: 58px;
  }
}

/* Batch workbench */
.workbench-main.batch-main {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: var(--bg);
}

.batch-shell {
  position: relative;
  display: grid;
  min-height: calc(100dvh - 74px);
  grid-template-rows: auto auto minmax(0, 1fr);
  border-top: 1px solid var(--line);
  padding-top: 18px;
  background: var(--bg);
}

.batch-shell button,
.batch-shell input {
  touch-action: manipulation;
}

.batch-upload {
  display: grid;
  width: min(var(--container), calc(100% - 48px));
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin: 0 auto 16px;
  border: 1px dashed rgba(37, 99, 235, 0.34);
  border-radius: var(--radius);
  padding: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.batch-upload[hidden] {
  display: none !important;
}

.batch-upload.is-dragging {
  border-color: var(--primary);
  background: #f0f6ff;
  box-shadow: 0 16px 42px rgba(37, 99, 235, 0.16);
}

.batch-upload-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: var(--radius);
  color: var(--primary);
  background: var(--primary-soft);
}

.batch-upload-icon svg {
  width: 30px;
  height: 30px;
}

.batch-upload h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.18;
}

.batch-upload p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.batch-upload-actions,
.batch-actions,
.batch-selection-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.batch-upload-actions .btn {
  min-height: 44px;
}

.batch-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  width: min(var(--container), calc(100% - 48px));
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.batch-toolbar-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
}

.batch-summary {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.batch-summary span,
.batch-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.batch-summary span {
  white-space: nowrap;
}

.batch-summary strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.batch-summary small {
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-filters {
  display: flex;
  min-width: 0;
  gap: 8px;
  overflow-x: auto;
  padding: 2px;
}

.batch-filters button,
.batch-actions button,
.batch-selection-actions button,
.batch-floating-actions button,
.batch-card-actions button,
.drawer-tools button,
.drawer-size-grid button,
.drawer-head button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  color: var(--text);
  background: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.batch-filters button span {
  min-width: 22px;
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--muted);
  background: var(--surface-neutral);
  font-size: 12px;
}

.batch-filters button:hover,
.batch-filters button.is-active,
.batch-actions button:hover,
.batch-selection-actions button:hover,
.batch-floating-actions button:hover,
.batch-card-actions button:hover,
.drawer-tools button:hover,
.drawer-tools button.is-active,
.drawer-size-grid button:hover,
.drawer-size-grid button.is-active {
  border-color: rgba(37, 99, 235, 0.38);
  color: var(--primary);
  background: var(--primary-soft);
}

.batch-actions {
  justify-content: flex-end;
}

.batch-selection-actions {
  display: none;
  justify-content: flex-end;
  border-left: 1px solid var(--line);
  padding-left: 12px;
}

.batch-toolbar.has-selection .batch-selection-actions {
  display: flex;
}

.batch-toolbar.has-selection {
  grid-template-columns: minmax(0, 1fr) auto;
}

.batch-toolbar.has-selection .batch-selection-actions {
  grid-column: 1 / -1;
  border-left: 0;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  padding-left: 0;
}

.batch-selection-actions[hidden] {
  display: none !important;
}

.batch-actions button:disabled,
.batch-selection-actions button:disabled,
.batch-floating-actions button:disabled,
.batch-card-actions button:disabled,
.batch-select:disabled,
.batch-floating-bar button:disabled,
.drawer-export button:disabled {
  color: #94a3b8;
  background: #f8fafc;
  opacity: 0.72;
  cursor: not-allowed;
}

.batch-content {
  display: grid;
  width: min(var(--container), calc(100% - 48px));
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin: 18px auto 128px;
  align-items: start;
}

.batch-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(auto-fill, 284px);
  justify-content: start;
  gap: 18px;
}

.batch-card {
  display: grid;
  min-width: 0;
  width: 284px;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.batch-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.batch-card.is-selected,
.batch-card.is-active {
  border-color: rgba(37, 99, 235, 0.48);
  background: linear-gradient(180deg, rgba(234, 242, 255, 0.48), #ffffff 42%);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.16), 0 12px 28px rgba(37, 99, 235, 0.1);
}

.batch-card-media {
  position: relative;
  display: grid;
  aspect-ratio: 4 / 3;
  place-items: center;
  border: 1px solid #e4edf8;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, rgba(219, 231, 245, 0.52) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(219, 231, 245, 0.52) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(219, 231, 245, 0.52) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(219, 231, 245, 0.52) 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

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

.batch-card-preview {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  cursor: zoom-in;
}

.batch-card-preview:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.36);
  outline-offset: -3px;
}

.batch-card-preview:hover img,
.batch-card-preview:focus-visible img {
  filter: saturate(1.04) contrast(1.02);
}

.batch-select {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.batch-select svg {
  width: 20px;
  height: 20px;
}

.batch-select:hover,
.batch-select[aria-pressed="true"] {
  border-color: rgba(37, 99, 235, 0.5);
  color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), 0 8px 18px rgba(15, 23, 42, 0.08);
}

.batch-card-status {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  gap: 4px;
  margin-top: 0;
  border: 1px solid rgba(5, 150, 105, 0.14);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.batch-card-status svg {
  width: 15px;
  height: 15px;
}

.batch-card-placeholder,
.batch-processing {
  display: grid;
  place-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 900;
}

.batch-processing span {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 5px solid #dbeafe;
  border-top-color: var(--primary);
  animation: batch-spin 0.9s linear infinite;
}

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

.batch-card-body {
  display: block;
}

.batch-card-title {
  min-width: 0;
}

.batch-card-body strong,
.batch-card-body span,
.batch-card-note {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-card-body strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.28;
}

.batch-card-body span,
.batch-card-note {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.batch-card-note {
  margin: -4px 0 0;
}

.batch-card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding-top: 0;
}

.batch-card-actions button {
  min-height: 36px;
  min-width: 0;
  gap: 6px;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  background: #ffffff;
}

.batch-shell button.is-loading,
.cutout-modal-action.is-loading {
  cursor: progress;
}

.batch-button-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  opacity: 0.86;
  animation: batch-spin 0.72s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .batch-button-spinner {
    animation: none;
    border-right-color: currentColor;
  }
}

.batch-card-actions button svg {
  width: 18px;
  height: 18px;
}

.batch-card-actions .batch-card-primary {
  border-color: rgba(37, 99, 235, 0.42);
  color: var(--primary);
  background: var(--primary-soft);
}

.batch-card-actions .batch-card-primary:hover {
  border-color: rgba(37, 99, 235, 0.55);
  color: #ffffff;
  background: var(--primary);
}

.batch-card-actions .batch-card-danger {
  color: var(--muted);
}

.batch-card-actions .batch-card-danger:hover {
  border-color: rgba(220, 38, 38, 0.28);
  color: var(--danger);
  background: rgba(254, 242, 242, 0.96);
}

.batch-card-actions .batch-card-primary:disabled {
  border-color: var(--line);
  color: #94a3b8;
  background: #f8fafc;
}

.batch-empty-result {
  display: flex;
  min-height: 260px;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 36px 24px;
  color: var(--muted);
  background: linear-gradient(180deg, #ffffff, rgba(241, 247, 255, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
  text-align: center;
}

.batch-empty-icon {
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: var(--radius);
  color: var(--primary);
  background: var(--primary-soft);
}

.batch-empty-result svg {
  width: 30px;
  height: 30px;
}

.batch-empty-result strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.batch-empty-result > span:not(.batch-empty-icon) {
  max-width: 320px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
}

.batch-empty-result button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: var(--radius);
  padding: 0 14px;
  color: var(--primary);
  background: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.batch-empty-result button:hover {
  border-color: rgba(37, 99, 235, 0.42);
  background: var(--primary-soft);
}

.batch-empty-result button svg {
  width: 17px;
  height: 17px;
}

.batch-drawer {
  position: sticky;
  top: 92px;
  display: grid;
  max-height: calc(100dvh - 112px);
  min-width: 0;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  overflow-y: auto;
}

.batch-drawer[hidden] {
  display: none !important;
}

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

.drawer-head h2,
.drawer-section h3 {
  margin: 0;
  color: var(--ink);
}

.drawer-head h2 {
  font-size: 22px;
}

.drawer-section h3 {
  margin-bottom: 10px;
  font-size: 15px;
}

.drawer-head button {
  width: 44px;
  padding: 0;
  border-radius: 999px;
}

.drawer-stage {
  position: relative;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #eef2f8;
}

.drawer-stage canvas {
  display: block;
  width: 100%;
  height: 300px;
  touch-action: none;
}

.drawer-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 24px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.92);
  text-align: center;
}

.drawer-empty svg {
  width: 40px;
  height: 40px;
  color: var(--primary);
}

.drawer-section {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.drawer-swatches {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.drawer-section-head input {
  width: 58px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 3px;
  background: #ffffff;
}

.drawer-size-grid,
.drawer-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.drawer-custom-size {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.drawer-custom-size label,
.drawer-range {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.drawer-custom-size input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.drawer-export {
  display: grid;
  gap: 10px;
}

.drawer-export .btn {
  width: 100%;
  justify-content: center;
}

.batch-floating-bar {
  position: fixed;
  z-index: 60;
  right: max(24px, calc((100vw - var(--container)) / 2));
  bottom: 18px;
  left: max(24px, calc((100vw - var(--container)) / 2));
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(198, 215, 238, 0.92);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(14px);
}

.batch-floating-bar[hidden] {
  display: none !important;
}

.batch-floating-summary {
  display: flex;
  min-width: 136px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.batch-floating-summary strong {
  display: grid;
  min-width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 20px;
  line-height: 1;
}

.batch-floating-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.batch-floating-actions .btn {
  min-height: 44px;
}

.batch-floating-actions [data-batch-save]:not(:disabled),
.batch-floating-actions [data-batch-zip]:not(:disabled) {
  border-color: var(--primary);
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

.batch-floating-actions [data-batch-save]:not(:disabled):hover,
.batch-floating-actions [data-batch-save]:not(:disabled):focus-visible,
.batch-floating-actions [data-batch-zip]:not(:disabled):hover,
.batch-floating-actions [data-batch-zip]:not(:disabled):focus-visible {
  border-color: var(--primary-dark);
  color: #ffffff;
  background: var(--primary-dark);
}

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

  .batch-toolbar-main {
    flex-wrap: wrap;
  }

  .batch-actions {
    justify-content: flex-start;
  }

  .batch-selection-actions {
    justify-content: flex-start;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 12px;
    padding-left: 0;
  }
}

@media (max-width: 900px) {
  .batch-upload,
  .batch-toolbar,
  .batch-content {
    width: min(100% - 32px, var(--container));
  }

  .batch-upload {
    grid-template-columns: 1fr;
  }

  .batch-upload-actions {
    width: 100%;
  }

  .batch-upload-actions .btn {
    flex: 1 1 160px;
  }

  .batch-content {
    display: block;
    margin-bottom: 128px;
  }

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

  .batch-card {
    width: 100%;
  }

  .batch-drawer {
    position: fixed;
    z-index: 70;
    inset: auto 0 0;
    max-height: min(86dvh, 760px);
    border-radius: 8px 8px 0 0;
    padding: 16px;
  }

  .batch-floating-bar {
    right: 12px;
    bottom: 12px;
    left: 12px;
    min-height: 60px;
    gap: 10px;
    padding: 10px;
  }

  .batch-floating-summary {
    min-width: auto;
  }

  .batch-floating-summary strong {
    min-width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .batch-floating-actions {
    gap: 8px;
    flex-wrap: nowrap;
  }

  .batch-floating-bar .btn,
  .batch-floating-actions button {
    min-height: 42px;
    padding: 0 12px;
  }
}

@media (max-width: 560px) {
  .batch-toolbar {
    padding: 10px;
  }

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

  .batch-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
  }

  .batch-filters button {
    min-width: 0;
    padding: 0 8px;
    font-size: 13px;
  }

  .batch-filters button span {
    min-width: 20px;
    padding: 2px 6px;
  }

  .batch-floating-bar {
    display: flex;
    align-items: center;
  }

  .batch-floating-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    flex: 1 1 auto;
  }

  .batch-floating-actions .btn {
    display: inline-flex;
  }

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

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

  .drawer-swatches {
    grid-template-columns: repeat(6, minmax(40px, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .batch-processing span {
    animation: none;
  }
}

/* Batch edit modal uses the shared Cutout modal shell. */
.batch-content {
  grid-template-columns: minmax(0, 1fr);
}

.batch-edit-overlay {
  z-index: 120;
}

.batch-edit-modal {
  width: min(100% - 32px, 1180px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  overflow: hidden;
}

.batch-edit-body {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  gap: 16px;
  overflow: auto;
}

.batch-edit-controls {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 14px;
}

.batch-edit-modal .drawer-stage {
  min-height: 420px;
}

.batch-edit-modal .drawer-stage canvas {
  height: min(58dvh, 560px);
  min-height: 420px;
}

.batch-edit-modal .drawer-export {
  display: flex;
  border-top: 1px solid var(--line);
  margin-top: 0;
  padding-top: 14px;
  justify-content: flex-end;
}

.batch-edit-modal .drawer-export .btn {
  width: auto;
}

@media (max-width: 900px) {
  .batch-content {
    display: block;
  }

  .batch-edit-modal {
    width: min(100%, 720px);
    max-height: calc(100dvh - 32px);
  }

  .batch-edit-body {
    grid-template-columns: 1fr;
  }

  .batch-edit-modal .drawer-stage {
    min-height: 320px;
  }

  .batch-edit-modal .drawer-stage canvas {
    height: 42dvh;
    min-height: 320px;
  }

  .batch-edit-modal .drawer-export {
    display: grid;
    grid-template-columns: 1fr;
  }

  .batch-edit-modal .drawer-export .btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .batch-edit-overlay {
    padding: 12px;
  }

  .batch-edit-modal {
    width: 100%;
  }

  .batch-edit-modal .drawer-stage,
  .batch-edit-modal .drawer-stage canvas {
    min-height: 280px;
  }

  .batch-edit-modal .drawer-stage canvas {
    height: 36dvh;
  }
}

.home-article-section {
  scroll-margin-top: 96px;
}

.home-article-section .section-head {
  display: block;
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}

.home-article-section .section-head h2 {
  max-width: none;
  margin-right: auto;
  margin-left: auto;
  font-size: clamp(34px, 3.4vw, 50px);
  line-height: 1.14;
}

.home-article-section .lead {
  max-width: 640px;
  margin-top: 12px;
  margin-right: auto;
  margin-bottom: 0;
  margin-left: auto;
}

.home-article-more {
  white-space: nowrap;
}

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

.home-article-actions {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}

.home-article-actions .home-article-more {
  min-width: 200px;
  justify-content: center;
}

.home-article-card {
  display: grid;
  min-width: 0;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.home-article-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.home-article-cover {
  display: block;
  aspect-ratio: 12 / 7;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, var(--surface-soft), var(--surface));
  color: var(--primary);
}

.home-article-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-article-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.home-article-placeholder svg {
  width: 44px;
  height: 44px;
}

.home-article-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}

.home-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 0.84rem;
}

.home-article-meta a {
  color: var(--primary);
  font-weight: 750;
  text-decoration: none;
}

.home-article-meta a:hover,
.home-article-body h3 a:hover {
  color: var(--primary-dark);
}

.home-article-body h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.42;
}

.home-article-body h3 a {
  color: inherit;
  text-decoration: none;
}

.home-article-body p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 3.2em;
  margin: 0;
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-article-body .article-read-link {
  margin-top: auto;
}

@media (prefers-reduced-motion: reduce) {
  .home-article-card {
    transition: none;
  }

  .home-article-card:hover {
    transform: none;
  }
}

@media (max-width: 980px) {
  .home-article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .home-article-section .section-head {
    margin-bottom: 28px;
    text-align: left;
  }

  .home-article-section .section-head h2 {
    margin-right: 0;
    margin-left: 0;
    font-size: clamp(32px, 10vw, 42px);
  }

  .home-article-section .lead {
    margin-right: 0;
    margin-left: 0;
    font-size: 16px;
  }

  .home-article-actions .home-article-more {
    width: min(100%, 300px);
    justify-content: center;
  }

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

  .home-article-body {
    padding: 16px;
  }

  .home-article-body h3 {
    font-size: 1rem;
  }
}

/* Shared Cutout subpage shell */
.page-main {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 48%, #ffffff 100%);
}

.page-shell {
  display: grid;
  width: min(var(--container), calc(100% - 48px));
  gap: 24px;
  margin: 0 auto;
  padding: 34px 0 76px;
  scroll-margin-top: 92px;
}

.page-hero {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 0 4px;
}

.page-hero > div {
  min-width: 0;
}

.page-hero h1 {
  max-width: min(100%, 860px);
  margin: 6px 0 0;
  color: var(--ink);
  font-size: clamp(32px, 3.2vw, 46px);
  line-height: 1.12;
  letter-spacing: 0;
}

.page-hero h1 > .title-accent,
.page-hero h1 .title-accent {
  display: inline;
  white-space: normal;
}

.page-hero p {
  max-width: 700px;
  margin: 12px 0 0;
  color: #475569;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
}

.page-hero .btn {
  flex: 0 0 auto;
}

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

.page-panel-narrow {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}

.page-grid {
  display: grid;
  gap: 20px;
}

.pricing-page .page-shell,
.tasks-page .page-shell,
.article-page .page-shell {
  padding-top: 34px;
}

.pricing-shell {
  gap: 30px;
}

.pricing-hero {
  justify-content: center;
  text-align: center;
}

.pricing-hero > div {
  width: min(100%, 760px);
  margin: 0 auto;
}

.pricing-hero h1,
.pricing-hero p {
  margin-left: auto;
  margin-right: auto;
}

.pricing-plan-grid {
  gap: 16px;
  padding-top: 0;
}

.pricing-plan-grid .credit-card {
  min-height: 420px;
}

.pricing-faq-section {
  padding: 24px 0 0;
}

.pricing-faq-section .faq-wrap {
  max-width: none;
  margin: 0;
}

.pricing-page .pricing-plan-grid {
  gap: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.pricing-page .pricing-plan-grid .credit-card {
  min-height: 388px;
  border: 1px solid rgba(198, 215, 238, 0.74);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: none;
  transition: background 180ms ease, border-color 180ms ease;
}

.pricing-page .pricing-plan-grid .credit-card + .credit-card {
  border-left: 1px solid rgba(198, 215, 238, 0.74);
}

.pricing-page .credit-card:hover {
  border-color: rgba(37, 99, 235, 0.24);
  background: #ffffff;
  box-shadow: none;
  transform: none;
}

.pricing-page .credit-card.featured {
  border-color: rgba(37, 99, 235, 0.28);
  background: linear-gradient(180deg, rgba(234, 242, 255, 0.82) 0%, rgba(255, 255, 255, 0.98) 62%, #ffffff 100%);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.09);
}

.pricing-page .credit-card.featured .credit-name {
  padding-right: 84px;
}

.pricing-page .credit-tag {
  top: 24px;
  right: 22px;
  left: auto;
  min-height: 24px;
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--primary);
  background: var(--primary-soft);
  box-shadow: none;
  font-size: 12px;
  line-height: 1;
  transform: none;
}

.pricing-page .credit-buy:hover {
  transform: none;
}

.pricing-page .credit-card:not(.featured) .credit-buy.btn-outline {
  border-color: var(--line-strong);
  background: transparent;
  box-shadow: none;
  color: var(--primary-dark);
}

.pricing-page .credit-card:not(.featured) .credit-buy.btn-outline:hover,
.pricing-page .credit-card:not(.featured) .credit-buy.btn-outline:focus-visible {
  border-color: rgba(37, 99, 235, 0.32);
  background: var(--primary-soft);
}

.pricing-page .credit-card.featured .credit-buy.btn-primary {
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.16);
}

.pricing-page .faq-list {
  gap: 0;
  border-top: 1px solid var(--line);
}

.pricing-page .faq-item {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.pricing-page .faq-question {
  min-height: 62px;
  padding: 0 4px;
}

.pricing-page .faq-answer {
  padding: 0 4px 18px;
}

.tasks-shell {
  width: min(var(--container), calc(100% - 48px));
  gap: 18px;
  padding: 24px 0 76px;
}

.tasks-hero {
  margin-bottom: 0;
}

.tasks-hero h1 {
  font-size: clamp(32px, 3.2vw, 46px);
  line-height: 1.12;
  white-space: normal;
}

.task-auth-card.page-panel {
  border: 0;
  padding: 72px 16px 84px;
  background: transparent;
  box-shadow: none;
}

.tasks-board.page-panel {
  display: grid;
  gap: 14px;
  border-color: #d7e4f3;
  padding: 20px 22px 22px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.045);
}

.tasks-board .task-status-filter {
  padding: 0;
}

.batch-empty-result,
.article-empty {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, rgba(241, 247, 255, 0.72) 100%);
  box-shadow: var(--shadow-sm);
}

.workbench-main.batch-main {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 48%, #ffffff 100%);
}

.batch-shell.page-shell {
  display: grid;
  min-height: auto;
  grid-template-rows: none;
  gap: 16px;
  border-top: 0;
  padding: 34px 0 96px;
  background: transparent;
}

.workbench-hero {
  margin-bottom: 2px;
}

.batch-upload.page-panel {
  width: 100%;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  margin: 0;
  border: 1px solid var(--line);
}

.batch-toolbar.page-panel {
  top: 88px;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
}

.batch-content {
  width: 100%;
  gap: 16px;
  margin: 2px auto 96px;
}

.batch-grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.batch-card {
  width: 100%;
}

.article-shell {
  gap: 24px;
}

.article-hero {
  margin-bottom: 0;
  padding: 8px 0 0;
}

.article-list-section {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.article-detail {
  gap: 24px;
}

.article-detail-head {
  max-width: 900px;
  margin-bottom: 0;
}

.article-detail-head h1 {
  margin: 12px 0 0;
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.14;
}

.article-detail-head .lead {
  max-width: 760px;
  margin-top: 16px;
  color: var(--text);
  font-size: 16px;
}

.article-detail-cover {
  aspect-ratio: 16 / 7.8;
}

.article-detail-layout {
  margin-top: 0;
}

.article-body {
  font-size: 1rem;
}

/* Tutorial center list page */
.tutorial-center-page .page-main {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 42%, #ffffff 100%);
}

.tutorial-shell {
  gap: 22px;
}

.tutorial-hero {
  align-items: flex-end;
}

.tutorial-hero-copy {
  max-width: 780px;
}

.tutorial-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.tutorial-search-field {
  display: flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  background: var(--surface-neutral);
  color: var(--muted);
}

.tutorial-search-field svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.tutorial-search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
}

.tutorial-search-field input::placeholder {
  color: #94a3b8;
}

.tutorial-search-button,
.tutorial-search-clear {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 0 18px;
  font-weight: 800;
  text-decoration: none;
}

.tutorial-search-button {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
}

.tutorial-search-clear {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.tutorial-paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.tutorial-path-card {
  display: flex;
  min-width: 0;
  min-height: 82px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.tutorial-path-card:hover,
.tutorial-path-card:focus-visible {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.tutorial-path-card.is-active {
  border-color: rgba(37, 99, 235, 0.42);
  background: var(--primary-soft);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.1);
}

.tutorial-path-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: var(--radius);
  background: #eef6ff;
  color: var(--primary);
}

.tutorial-path-icon svg {
  width: 21px;
  height: 21px;
}

.tutorial-path-text {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.tutorial-path-text strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tutorial-path-text small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.tutorial-feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.78fr);
  gap: 18px;
  align-items: stretch;
}

.tutorial-feature-card,
.tutorial-hot-panel,
.tutorial-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.tutorial-feature-card {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1fr);
  overflow: hidden;
}

.tutorial-feature-media,
.tutorial-card-media {
  display: block;
  overflow: hidden;
  background: var(--surface-soft);
}

.tutorial-feature-media {
  min-height: 320px;
}

.tutorial-feature-media img,
.tutorial-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tutorial-feature-body {
  display: grid;
  align-content: center;
  gap: 14px;
  min-width: 0;
  padding: clamp(22px, 3vw, 34px);
}

.tutorial-feature-body h2,
.tutorial-panel-head h2,
.tutorial-topic-head h2,
.tutorial-card h3 {
  margin: 0;
  color: var(--ink);
}

.tutorial-feature-body h2 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.22;
}

.tutorial-feature-body h2 a,
.tutorial-card h3 a {
  color: inherit;
  text-decoration: none;
}

.tutorial-feature-body p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--text);
  line-height: 1.75;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.tutorial-hot-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 20px;
}

.tutorial-panel-head {
  display: grid;
  gap: 6px;
}

.tutorial-panel-head h2 {
  font-size: 22px;
  line-height: 1.25;
}

.tutorial-hot-list {
  display: grid;
  gap: 0;
}

.tutorial-hot-item {
  display: grid;
  gap: 7px;
  border-top: 1px solid var(--line);
  padding: 15px 0;
  color: var(--ink);
  text-decoration: none;
}

.tutorial-hot-item:first-child {
  border-top: 0;
}

.tutorial-hot-category {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.tutorial-hot-item strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tutorial-hot-item small {
  color: var(--muted);
  font-weight: 650;
}

.tutorial-hot-empty {
  margin: 0;
  border-top: 1px solid var(--line);
  padding: 16px 0 0;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.6;
}

.tutorial-section-stack {
  display: grid;
  gap: 34px;
  padding-top: 8px;
}

.tutorial-topic-section {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.tutorial-topic-head {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.tutorial-topic-head > div {
  min-width: 0;
}

.tutorial-topic-head h2 {
  margin-top: 5px;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.25;
}

.tutorial-topic-head p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.65;
}

.tutorial-topic-more {
  display: inline-flex;
  min-height: 40px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

.tutorial-topic-more svg {
  width: 17px;
  height: 17px;
}

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

.tutorial-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.tutorial-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.tutorial-card-media {
  aspect-ratio: 16 / 9;
}

.tutorial-card-body {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 16px;
}

.tutorial-card h3 {
  font-size: 18px;
  line-height: 1.42;
}

.tutorial-card h3 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tutorial-card p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 52px;
  margin: 0;
  color: var(--text);
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tutorial-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.tutorial-card-foot .article-read-link {
  min-height: 32px;
  gap: 6px;
}

.tutorial-card-foot .article-read-link svg {
  width: 16px;
  height: 16px;
}

.tutorial-empty {
  min-height: 280px;
}

@media (max-width: 980px) {
  .article-list-section,
  .article-detail-layout {
    grid-template-columns: 1fr;
  }

  .article-category-panel,
  .article-side {
    position: static;
  }

  .article-category-panel {
    display: flex;
    overflow-x: auto;
    padding-bottom: 14px;
  }

  .article-category-link {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .article-category-link.is-child {
    margin-left: 0;
  }

  .tutorial-hero,
  .tutorial-feature-layout,
  .tutorial-feature-card {
    grid-template-columns: 1fr;
  }

  .tutorial-feature-media {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

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

@media (max-width: 820px) {
  .page-shell,
  .tasks-shell {
    width: min(100% - 32px, var(--container));
  }

  .batch-upload.page-panel,
  .batch-toolbar.page-panel,
  .batch-content {
    width: 100%;
  }

  .page-shell,
  .pricing-page .page-shell,
  .tasks-page .page-shell,
  .article-page .page-shell,
  .batch-shell.page-shell {
    gap: 18px;
    padding-top: 26px;
    padding-bottom: 60px;
  }

  .page-hero {
    display: grid;
    align-items: start;
    gap: 16px;
  }

  .page-hero h1 {
    font-size: clamp(32px, 10vw, 42px);
    line-height: 1.14;
  }

  .page-hero p {
    max-width: none;
    font-size: 16px;
  }

  .page-panel {
    padding: 18px;
  }

  .pricing-plan-grid {
    grid-template-columns: 1fr;
  }

  .pricing-plan-grid .credit-card {
    min-height: 0;
  }

  .pricing-page .pricing-plan-grid {
    gap: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .pricing-page .pricing-plan-grid .credit-card {
    min-height: 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    padding: 26px 0 28px;
    background: transparent;
    box-shadow: none;
  }

  .pricing-page .pricing-plan-grid .credit-card:first-child {
    border-top: 0;
  }

  .pricing-page .pricing-plan-grid .credit-card + .credit-card {
    border-left: 0;
  }

  .pricing-page .credit-card.featured {
    border-top: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 0;
    background: linear-gradient(180deg, rgba(234, 242, 255, 0.74) 0%, rgba(255, 255, 255, 0.96) 74%, #ffffff 100%);
    box-shadow: none;
  }

  .pricing-page .credit-card.featured .credit-name {
    padding-right: 86px;
  }

  .pricing-page .credit-tag {
    top: 24px;
    right: 22px;
  }

  .task-auth-card.page-panel {
    padding: 56px 16px 64px;
  }

  .tasks-board.page-panel {
    padding: 14px;
  }

  .task-status-filter {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-status-filter button {
    min-width: 0;
    padding-inline: 10px;
  }

  .batch-upload.page-panel {
    grid-template-columns: 1fr;
  }

  .batch-upload-actions {
    width: 100%;
  }

  .batch-upload-actions .btn {
    flex: 1 1 160px;
  }

  .batch-toolbar.page-panel {
    top: 124px;
    grid-template-columns: 1fr;
  }

  .batch-toolbar-main {
    flex-wrap: wrap;
  }

  .batch-actions {
    justify-content: flex-start;
  }

  .batch-content {
    display: block;
    margin-bottom: 128px;
  }

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

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

  .article-detail-head h1 {
    font-size: clamp(32px, 9vw, 42px);
  }

  .tutorial-search {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .tutorial-search-clear {
    grid-column: 1 / -1;
  }

  .tutorial-topic-head {
    display: grid;
    align-items: start;
  }
}

@media (max-width: 560px) {
  .page-hero .btn {
    width: 100%;
  }

  .article-category-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding: 10px;
  }

  .article-category-link {
    min-width: 0;
    min-height: 44px;
    white-space: normal;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.25;
  }

  .pricing-faq-section {
    padding: 18px 0 0;
  }

  .task-auth-copy .btn,
  .task-card-actions .btn {
    width: 100%;
  }

  .batch-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

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

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

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

  .article-detail-cover {
    aspect-ratio: 12 / 7;
  }

  .article-body {
    padding: 22px 18px;
  }

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

  .tutorial-search-button,
  .tutorial-search-clear {
    width: 100%;
  }

  .tutorial-paths {
    grid-template-columns: 1fr;
  }

  .tutorial-path-card {
    min-height: 70px;
  }

  .tutorial-feature-body,
  .tutorial-hot-panel {
    padding: 18px;
  }

  .tutorial-card-grid {
    grid-template-columns: 1fr;
  }

  .tutorial-card p {
    min-height: 0;
  }

  .tutorial-card-foot {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tutorial-path-card,
  .tutorial-card {
    transition: none;
  }

  .tutorial-path-card:hover,
  .tutorial-path-card:focus-visible,
  .tutorial-card:hover {
    transform: none;
  }
}

/* Refined tutorial library layout */
.tutorial-library-page .page-main {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 44%, #ffffff 100%);
}

.tutorial-library-page .tutorial-shell {
  gap: 18px;
  padding-top: 30px;
}

.tutorial-library-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: 28px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding: 12px 0 24px;
}

.tutorial-library-copy {
  min-width: 0;
}

.tutorial-library-copy h1 {
  max-width: 780px;
  margin: 8px 0 0;
  color: var(--ink);
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: 0;
}

.tutorial-library-copy p {
  max-width: 720px;
  margin: 14px 0 0;
  color: #334155;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.75;
}

.tutorial-library-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.045);
}

.tutorial-library-search-field {
  display: flex;
  min-width: 0;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius);
  padding: 0 12px;
  background: var(--surface-neutral);
  color: var(--muted);
}

.tutorial-library-search-field svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.tutorial-library-search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
}

.tutorial-library-search-field input::placeholder {
  color: #94a3b8;
}

.tutorial-library-search button,
.tutorial-library-search a {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 0 16px;
  font-weight: 800;
  text-decoration: none;
}

.tutorial-library-search button {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
}

.tutorial-library-search > a {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
}

.tutorial-chip-row {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding: 2px 0 8px;
  scrollbar-width: thin;
}

.tutorial-chip {
  display: inline-flex;
  min-height: 42px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.tutorial-chip svg {
  width: 17px;
  height: 17px;
  color: var(--primary);
}

.tutorial-chip small {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tutorial-chip:hover,
.tutorial-chip:focus-visible,
.tutorial-chip.is-active {
  border-color: rgba(37, 99, 235, 0.42);
  background: var(--primary-soft);
  color: var(--primary);
}

.tutorial-directory-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
  padding-top: 4px;
}

.tutorial-directory-main {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.tutorial-lead-row,
.tutorial-list-panel,
.tutorial-side-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.045);
}

.tutorial-lead-row {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
}

.tutorial-lead-thumb,
.tutorial-list-thumb {
  display: block;
  overflow: hidden;
  background: var(--surface-soft);
}

.tutorial-lead-thumb {
  aspect-ratio: 5 / 3;
  min-height: 100%;
}

.tutorial-lead-thumb img,
.tutorial-list-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tutorial-lead-content {
  display: grid;
  align-content: center;
  gap: 12px;
  min-width: 0;
  padding: 22px 24px;
}

.tutorial-lead-content h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.25;
}

.tutorial-lead-content h2 a,
.tutorial-list-body h4 a {
  color: inherit;
  text-decoration: none;
}

.tutorial-lead-content p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--text);
  line-height: 1.72;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tutorial-list-panel {
  display: grid;
  gap: 0;
  overflow: hidden;
}

.tutorial-list-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
}

.tutorial-list-head h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.25;
}

.tutorial-list-head > span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.tutorial-list-groups {
  display: grid;
}

.tutorial-list-group {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.tutorial-list-group:first-child {
  border-top: 0;
}

.tutorial-list-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px 8px;
}

.tutorial-list-group h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.tutorial-list-group > header a {
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.tutorial-list {
  display: grid;
}

.tutorial-list-item {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 16px 20px;
}

.tutorial-list-group > .tutorial-list > .tutorial-list-item:first-child {
  border-top-color: transparent;
}

.tutorial-list-thumb {
  aspect-ratio: 39 / 25;
  border-radius: var(--radius);
}

.tutorial-list-body {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.tutorial-list-body h4 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.38;
}

.tutorial-list-body h4 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tutorial-list-body p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--text);
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tutorial-directory-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 16px;
}

.tutorial-side-block {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.tutorial-side-head {
  display: grid;
  gap: 5px;
}

.tutorial-side-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
}

.tutorial-route-list {
  display: grid;
  gap: 6px;
}

.tutorial-route-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  border-radius: var(--radius);
  padding: 8px 10px;
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
}

.tutorial-route-item svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.tutorial-route-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tutorial-route-item small {
  color: var(--muted);
  font-weight: 800;
}

.tutorial-route-item:hover,
.tutorial-route-item:focus-visible,
.tutorial-route-item.is-active {
  background: var(--primary-soft);
  color: var(--primary);
}

.tutorial-library-page .tutorial-hot-list {
  gap: 0;
}

.tutorial-library-page .tutorial-hot-item {
  padding: 13px 0;
}

.tutorial-library-page .tutorial-hot-item:first-child {
  border-top: 0;
  padding-top: 0;
}

@media (max-width: 980px) {
  .tutorial-library-hero,
  .tutorial-directory-layout {
    grid-template-columns: 1fr;
  }

  .tutorial-directory-side {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .tutorial-library-page .tutorial-shell {
    padding-top: 22px;
  }

  .tutorial-library-hero {
    gap: 18px;
    padding-bottom: 18px;
  }

  .tutorial-library-copy h1 {
    font-size: clamp(34px, 10vw, 42px);
  }

  .tutorial-library-copy p {
    font-size: 16px;
  }

  .tutorial-library-search {
    grid-template-columns: 1fr;
  }

  .tutorial-library-search button,
  .tutorial-library-search a {
    width: 100%;
  }

  .tutorial-lead-row,
  .tutorial-list-item,
  .tutorial-directory-side {
    grid-template-columns: 1fr;
  }

  .tutorial-lead-thumb {
    aspect-ratio: 16 / 9;
  }

  .tutorial-lead-content,
  .tutorial-list-head,
  .tutorial-list-group > header,
  .tutorial-list-item,
  .tutorial-side-block {
    padding-inline: 16px;
  }

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

  .tutorial-list-thumb {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 480px) {
  .tutorial-chip-row {
    margin-right: -16px;
    padding-right: 16px;
  }

  .tutorial-chip {
    max-width: 250px;
  }

  .tutorial-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .tutorial-list-body p {
    -webkit-line-clamp: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tutorial-chip,
  .tutorial-route-item {
    transition: none;
  }
}

/* Premium minimal tutorial center */
.tutorial-premium-page .page-main {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 58%, #ffffff 100%);
}

.premium-tutorial-shell {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
  padding: 54px 0 86px;
}

.premium-tutorial-hero {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 22px 0 34px;
  text-align: center;
}

.premium-tutorial-hero .title-accent {
  display: inline;
}

.premium-tutorial-hero h1 {
  max-width: 900px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: 0;
}

.premium-tutorial-hero p {
  max-width: 760px;
  margin: 0;
  color: #334155;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.8;
}

.premium-tutorial-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  width: min(680px, 100%);
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
  background: #ffffff;
}

.premium-tutorial-search label {
  display: flex;
  min-width: 0;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  color: var(--muted);
}

.premium-tutorial-search svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.premium-tutorial-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
}

.premium-tutorial-search input::placeholder {
  color: #94a3b8;
}

.premium-tutorial-search button,
.premium-tutorial-search a {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
  text-decoration: none;
}

.premium-tutorial-search button {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
}

.premium-tutorial-search a {
  border: 1px solid transparent;
  color: var(--muted);
}

.premium-topic-tabs {
  display: flex;
  gap: 28px;
  min-width: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding: 0;
  scrollbar-width: thin;
}

.premium-topic-tabs a {
  position: relative;
  display: inline-flex;
  min-height: 60px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.premium-topic-tabs a::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
  content: "";
}

.premium-topic-tabs small {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

.premium-topic-tabs a:hover,
.premium-topic-tabs a:focus-visible,
.premium-topic-tabs a.is-active {
  color: var(--primary);
}

.premium-topic-tabs a.is-active::after {
  background: var(--primary);
}

.premium-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(340px, 0.86fr);
  gap: 36px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 34px 0;
}

.premium-feature-cover {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9.6;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.premium-feature-cover img,
.premium-article-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.premium-feature-copy {
  display: grid;
  align-content: center;
  gap: 14px;
  min-width: 0;
}

.premium-label {
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.premium-feature-copy h2,
.premium-section-head h2,
.premium-side-block h2,
.premium-list-group h3,
.premium-article-body h4 {
  margin: 0;
  color: var(--ink);
}

.premium-feature-copy h2 {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.14;
}

.premium-feature-copy h2 a,
.premium-article-body h4 a {
  color: inherit;
  text-decoration: none;
}

.premium-feature-copy p {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.78;
}

.premium-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 44px;
  align-items: start;
  padding-top: 34px;
}

.premium-list-panel {
  min-width: 0;
}

.premium-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.premium-section-head h2 {
  margin-top: 6px;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
}

.premium-section-head > span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.premium-list-groups {
  display: grid;
  gap: 34px;
}

.premium-list-group {
  display: grid;
  gap: 0;
}

.premium-list-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.premium-list-group h3 {
  font-size: 18px;
  line-height: 1.35;
}

.premium-list-group > header a {
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.premium-article-row {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}

.premium-article-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 43 / 26;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.premium-article-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.premium-article-body h4 {
  font-size: 20px;
  line-height: 1.36;
}

.premium-article-body h4 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.premium-article-body p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--text);
  line-height: 1.68;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.premium-side {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 24px;
}

.premium-side-block {
  display: grid;
  gap: 14px;
}

.premium-side-block h2 {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  font-size: 20px;
  line-height: 1.25;
}

.premium-topic-list {
  display: grid;
  gap: 2px;
}

.premium-topic-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.premium-topic-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.premium-topic-list small {
  color: var(--muted);
  font-weight: 800;
}

.premium-topic-list a:hover,
.premium-topic-list a:focus-visible,
.premium-topic-list a.is-active {
  color: var(--primary);
}

.premium-popular-list {
  display: grid;
  gap: 14px;
}

.premium-popular-list a {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  color: var(--ink);
  text-decoration: none;
}

.premium-random-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.premium-random-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.premium-random-thumb .article-card-placeholder {
  min-height: 0;
}

.premium-random-body {
  display: grid;
  min-width: 0;
  min-height: 64px;
  align-content: space-between;
  gap: 8px;
}

.premium-popular-list strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.premium-popular-list time,
.premium-popular-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.premium-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(720px, 100%);
  margin: 54px auto 0;
  border: 0;
  border-radius: 0;
  padding: 58px 24px 64px;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.premium-empty h2 {
  color: var(--ink);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: 0;
}

.premium-empty p {
  max-width: 520px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.premium-empty a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

.premium-empty a:hover,
.premium-empty a:focus-visible {
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 980px) {
  .premium-feature,
  .premium-content-grid {
    grid-template-columns: 1fr;
  }

  .premium-side {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .premium-tutorial-shell {
    width: min(100% - 32px, var(--container));
    padding: 30px 0 64px;
  }

  .premium-tutorial-hero {
    gap: 14px;
    padding: 16px 0 24px;
    text-align: left;
    justify-items: start;
  }

  .premium-tutorial-hero h1 {
    font-size: clamp(38px, 12vw, 50px);
    line-height: 1.05;
  }

  .premium-tutorial-hero p {
    font-size: 16px;
  }

  .premium-tutorial-search {
    grid-template-columns: 1fr;
    border-radius: var(--radius);
    padding: 8px;
  }

  .premium-tutorial-search label {
    border-radius: var(--radius);
    background: var(--surface-neutral);
  }

  .premium-tutorial-search button,
  .premium-tutorial-search a {
    width: 100%;
    border-radius: var(--radius);
  }

  .premium-empty {
    width: 100%;
    margin-top: 32px;
    padding: 44px 12px 54px;
  }

  .premium-empty h2 {
    font-size: 22px;
  }

  .premium-empty p {
    font-size: 14px;
  }

  .premium-topic-tabs {
    gap: 22px;
    margin-right: -16px;
    padding-right: 16px;
  }

  .premium-feature {
    gap: 20px;
    padding: 24px 0;
  }

  .premium-content-grid {
    gap: 30px;
    padding-top: 28px;
  }

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

  .premium-article-row,
  .premium-side {
    grid-template-columns: 1fr;
  }

  .premium-article-thumb {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 480px) {
  .premium-feature-copy h2 {
    font-size: 28px;
  }

  .premium-article-body h4 {
    font-size: 19px;
  }

  .premium-topic-tabs a {
    min-height: 54px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .premium-topic-tabs a,
  .premium-topic-list a,
  .premium-popular-list a {
    transition: none;
  }
}

/* Premium article detail page */
.article-detail-page .page-main {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 56%, #ffffff 100%);
}

.article-detail-page .article-detail {
  width: min(var(--container), calc(100% - 48px));
  gap: 24px;
  padding: 42px 0 88px;
}

.article-breadcrumb {
  display: flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.article-breadcrumb a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease;
}

.article-breadcrumb a:hover,
.article-breadcrumb a:focus-visible {
  color: var(--primary);
}

.article-breadcrumb svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: #94a3b8;
}

.article-detail-page .article-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: end;
  max-width: none;
  margin: 0;
  border-bottom: 1px solid var(--line);
  padding: 8px 0 28px;
}

.article-detail-copy {
  min-width: 0;
}

.article-detail-page .article-detail-meta {
  gap: 10px;
  margin-bottom: 18px;
}

.article-detail-page .article-detail-meta a,
.article-detail-page .article-detail-meta span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.article-detail-page .article-detail-meta a {
  border-color: #cfe0ff;
  background: var(--primary-soft);
  color: var(--primary);
}

.article-detail-page .article-detail-meta svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.article-detail-page .article-detail-head h1 {
  max-width: 900px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.08;
  letter-spacing: 0;
}

.article-detail-page .article-detail-head .lead {
  max-width: 760px;
  margin: 18px 0 0;
  color: #334155;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.78;
}

.article-hero-cta {
  display: grid;
  gap: 12px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f1f7ff 100%);
  box-shadow: var(--shadow-sm);
}

.article-hero-cta .section-kicker,
.article-detail-page .article-side .section-kicker {
  margin-bottom: 0;
  color: var(--primary);
  letter-spacing: 0;
}

.article-hero-cta h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.3;
}

.article-hero-cta p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.7;
}

.article-hero-cta .btn {
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
}

.article-cover-frame {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  aspect-ratio: 16 / 7.8;
  background: var(--surface-soft);
  box-shadow: var(--shadow-sm);
}

.article-cover-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-detail-page .article-detail-layout {
  grid-template-columns: minmax(0, 820px) minmax(280px, 320px);
  justify-content: space-between;
  gap: 34px;
  margin-top: 4px;
}

.article-detail-page .article-body {
  overflow-wrap: anywhere;
  border-color: #d7e4f3;
  padding: clamp(26px, 4vw, 48px);
  color: #334155;
  font-size: 17px;
  line-height: 1.86;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.045);
}

.article-detail-page .article-body > :first-child {
  margin-top: 0;
}

.article-detail-page .article-body h2,
.article-detail-page .article-body h3,
.article-detail-page .article-body h4 {
  scroll-margin-top: 96px;
}

.article-detail-page .article-body h2 {
  font-size: clamp(24px, 2.4vw, 32px);
}

.article-detail-page .article-body h3 {
  font-size: 22px;
}

.article-detail-page .article-body h4 {
  font-size: 19px;
}

.article-detail-page .article-body ul,
.article-detail-page .article-body ol {
  padding-left: 1.35em;
}

.article-detail-page .article-body li + li {
  margin-top: 8px;
}

.article-detail-page .article-body strong,
.article-detail-page .article-body b {
  color: var(--ink);
}

.article-detail-page .article-body blockquote {
  border-left-color: var(--primary);
  background: linear-gradient(90deg, var(--primary-soft), #ffffff);
}

.article-detail-page .article-body pre {
  border: 1px solid var(--line);
}

.article-detail-page .article-side {
  border: 0;
  gap: 16px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.article-detail-page .article-back,
.article-detail-page .article-side-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.article-detail-page .article-back {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  padding: 0 16px;
  color: var(--primary);
  font-weight: 850;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.article-detail-page .article-back:hover,
.article-detail-page .article-back:focus-visible {
  border-color: #cfe0ff;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.article-detail-page .article-side-block {
  padding: 18px;
}

.article-detail-page .article-read-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f1f7ff 100%);
}

.article-read-facts {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.article-read-facts span {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
  min-width: 0;
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.article-read-facts svg {
  grid-row: 1 / span 2;
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.article-read-facts strong {
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.article-read-facts small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.article-detail-page .article-side-block h2 {
  margin: 6px 0 4px;
  font-size: 20px;
  line-height: 1.25;
}

.article-detail-page .article-side-link {
  border: 1px solid transparent;
  background: var(--surface-neutral);
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.article-detail-page .article-side-link:hover,
.article-detail-page .article-side-link:focus-visible {
  border-color: #cfe0ff;
  background: var(--primary-soft);
  color: var(--primary-dark);
  transform: translateY(-1px);
}

@media (max-width: 980px) {
  .article-detail-page .article-detail-head,
  .article-detail-page .article-detail-layout {
    grid-template-columns: 1fr;
  }

  .article-detail-page .article-side {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-detail-page .article-back {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .article-detail-page .article-detail {
    width: min(var(--container), calc(100% - 32px));
    gap: 18px;
    padding: 30px 0 64px;
  }

  .article-breadcrumb {
    min-height: 38px;
    overflow-x: auto;
    padding-bottom: 2px;
    white-space: nowrap;
  }

  .article-detail-page .article-detail-head {
    gap: 20px;
    padding: 4px 0 22px;
  }

  .article-detail-page .article-detail-meta a,
  .article-detail-page .article-detail-meta span {
    min-height: 36px;
    padding: 0 10px;
    font-size: 12px;
  }

  .article-detail-page .article-detail-head h1 {
    font-size: clamp(32px, 10vw, 44px);
  }

  .article-detail-page .article-detail-head .lead {
    font-size: 16px;
  }

  .article-hero-cta,
  .article-detail-page .article-side-block {
    padding: 18px;
  }

  .article-cover-frame {
    aspect-ratio: 16 / 9.4;
  }

  .article-detail-page .article-body {
    padding: 22px 18px;
    font-size: 16px;
  }

  .article-detail-page .article-body h3 {
    font-size: 20px;
  }

  .article-detail-page .article-side {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-breadcrumb a,
  .article-detail-page .article-back,
  .article-detail-page .article-side-link {
    transition: none;
  }

  .article-detail-page .article-side-link:hover,
  .article-detail-page .article-side-link:focus-visible {
    transform: none;
  }
}

/* Minimal article detail refinement */
.article-detail-page .page-main {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 64%, #ffffff 100%);
}

.article-detail-page .article-detail {
  width: min(1080px, calc(100% - 48px));
  gap: 28px;
  padding: 46px 0 90px;
}

.article-detail-page .article-breadcrumb {
  width: min(1080px, 100%);
  margin: 0 auto;
  min-height: 36px;
  gap: 10px;
  color: #64748b;
  font-size: 13px;
  font-weight: 750;
}

.article-detail-page .article-breadcrumb a {
  min-height: 32px;
}

.article-detail-page .article-breadcrumb span {
  color: #cbd5e1;
}

.article-detail-page .article-detail-head {
  display: block;
  width: min(1080px, 100%);
  max-width: 1080px;
  margin: 0 auto;
  border-bottom: 0;
  padding: 10px 0 0;
}

.article-detail-page .article-detail-head h1 {
  max-width: 1080px;
  color: var(--ink);
  font-size: clamp(34px, 3.7vw, 48px);
  font-weight: 800;
  line-height: 1.12;
}

.article-detail-page .article-detail-head .lead {
  max-width: 860px;
  margin-top: 18px;
  color: #475569;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.82;
}

.article-detail-page .article-detail-meta {
  gap: 0;
  margin-top: 24px;
  margin-bottom: 0;
}

.article-detail-page .article-detail-meta a,
.article-detail-page .article-detail-meta span {
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.article-detail-page .article-detail-meta a {
  color: var(--primary);
}

.article-detail-page .article-detail-meta a:not(:last-child)::after,
.article-detail-page .article-detail-meta span:not(:last-child)::after {
  margin: 0 10px;
  color: #cbd5e1;
  content: "/";
}

.article-detail-page .article-detail-meta svg,
.article-hero-cta,
.article-read-panel {
  display: none;
}

.article-detail-page .article-cover-frame {
  width: 100%;
  border-color: #e2ebf7;
  aspect-ratio: 16 / 7.4;
  background: #f8fafc;
  box-shadow: none;
}

.article-detail-page .article-detail-layout {
  grid-template-columns: minmax(0, 760px) minmax(240px, 280px);
  gap: 40px;
  justify-content: center;
  margin-top: 6px;
}

.article-detail-page .article-body {
  border-color: #e2ebf7;
  padding: clamp(30px, 4.2vw, 48px);
  color: #334155;
  font-size: 17px;
  line-height: 1.92;
  box-shadow: none;
}

.article-detail-page .article-body h2 {
  margin-top: 1.8em;
  font-size: clamp(25px, 2.2vw, 31px);
  font-weight: 800;
  line-height: 1.28;
}

.article-detail-page .article-body h3 {
  margin-top: 1.7em;
  font-size: 21px;
  font-weight: 800;
}

.article-detail-page .article-body blockquote {
  border-left-color: #c6d7ee;
  background: #f8fafc;
}

.article-detail-page .article-side {
  gap: 22px;
}

.article-detail-page .article-back,
.article-detail-page .article-side-block {
  border-width: 1px 0 0;
  border-color: #dbe7f5;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.article-detail-page .article-back {
  min-height: 44px;
  padding: 12px 0 0;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
}

.article-detail-page .article-back::before {
  margin-right: 8px;
  content: "<";
}

.article-detail-page .article-back:hover,
.article-detail-page .article-back:focus-visible {
  border-color: #dbe7f5;
  background: transparent;
  color: var(--primary-dark);
}

.article-detail-page .article-side-block {
  gap: 0;
  padding: 18px 0 0;
}

.article-detail-page .article-side-block h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
}

.article-detail-page .article-side-link {
  border: 0;
  border-bottom: 1px solid #edf2f7;
  border-radius: 0;
  padding: 14px 0;
  background: transparent;
}

.article-detail-page .article-side-link:hover,
.article-detail-page .article-side-link:focus-visible {
  border-color: #edf2f7;
  background: transparent;
  color: var(--primary-dark);
  transform: none;
}

.article-detail-page .article-side-link span {
  font-weight: 750;
}

@media (max-width: 980px) {
  .article-detail-page .article-detail-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .article-detail-page .article-side {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .article-detail-page .article-detail {
    width: min(100% - 32px, 1080px);
    gap: 20px;
    padding: 32px 0 66px;
  }

  .article-detail-page .article-detail-head h1 {
    font-size: clamp(32px, 9vw, 42px);
  }

  .article-detail-page .article-detail-head .lead {
    font-size: 16px;
  }

  .article-detail-page .article-detail-meta {
    gap: 8px 0;
  }

  .article-detail-page .article-cover-frame {
    aspect-ratio: 16 / 9.2;
  }

  .article-detail-page .article-body {
    padding: 24px 18px;
    font-size: 16px;
  }
}

/* Integrated article detail layout */
.article-detail-page .article-detail {
  width: min(1120px, calc(100% - 48px));
  gap: 22px;
}

.article-detail-page .article-breadcrumb {
  width: min(1120px, 100%);
}

.article-detail-page .article-detail-layout {
  grid-template-columns: minmax(0, 768px) 320px;
  gap: 32px;
  align-items: start;
  justify-content: space-between;
  margin-top: 0;
}

.article-main {
  min-width: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.article-detail-page .article-main .article-detail-head {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px 0 28px;
}

.article-detail-page .article-main .article-detail-head h1 {
  max-width: none;
  font-size: clamp(32px, 3.1vw, 44px);
  line-height: 1.16;
}

.article-detail-page .article-main .article-detail-head .lead {
  max-width: none;
  font-size: 17px;
  line-height: 1.78;
}

.article-detail-page .article-main .article-detail-meta {
  margin-top: 22px;
}

.article-detail-page .article-main .article-cover-frame {
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: var(--radius);
  aspect-ratio: 16 / 8.6;
  box-shadow: none;
}

.article-detail-page .article-main .article-body {
  border: 0;
  border-radius: 0;
  padding: 34px 0 46px;
  background: transparent;
  box-shadow: none;
}

.article-detail-page .article-main .article-body > :first-child {
  margin-top: 0;
}

.article-detail-side.premium-side {
  top: 96px;
  gap: 24px;
}

.article-detail-side .premium-side-block:first-child {
  border-top: 0;
  padding-top: 0;
}

.article-detail-side .premium-popular-list a {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  min-height: 64px;
}

.article-detail-side .premium-random-thumb {
  width: 96px;
  height: 64px;
  align-self: start;
  aspect-ratio: auto;
}

.article-detail-side .premium-random-body {
  min-height: 64px;
}

.article-detail-side .premium-popular-list strong {
  font-size: 15px;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .article-detail-page .article-detail-layout {
    grid-template-columns: 1fr;
  }

  .article-detail-side.premium-side {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .article-detail-page .article-detail {
    width: min(100% - 32px, 1120px);
  }

  .article-detail-page .article-main .article-detail-head {
    padding: 20px 0 22px;
  }

  .article-detail-page .article-main .article-detail-head h1 {
    font-size: clamp(30px, 8.6vw, 40px);
  }

  .article-detail-page .article-main .article-cover-frame {
    aspect-ratio: 16 / 9.4;
  }

  .article-detail-page .article-main .article-body {
    padding: 26px 0 34px;
  }

  .article-detail-side.premium-side {
    grid-template-columns: 1fr;
  }
}

/* Screenshot-style persistent workbench */
.workbench-page {
  background: #ffffff;
}

.workbench-main.batch-main.studio-main {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: #ffffff;
}

.studio-shell {
  width: min(var(--container), calc(100% - 48px));
  min-height: calc(100dvh - 73px);
  margin: 0 auto;
  border-top: 1px solid #e4ecf7;
  background: #ffffff;
}

.studio-shell button,
.studio-shell input {
  touch-action: manipulation;
}

.studio-filmstrip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 128px;
  border-bottom: 1px solid #e2e9f4;
  padding: 10px 0 12px;
  background: #ffffff;
}

.studio-filmstrip.is-dragging {
  background: #edf4ff;
  box-shadow: inset 0 -1px 0 rgba(37, 99, 235, 0.22);
}

.studio-filmstrip-track {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
}

.studio-filmstrip-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.studio-filmstrip-actions .btn {
  min-height: 48px;
  padding-right: 16px;
  padding-left: 16px;
}

.studio-thumb {
  position: relative;
  display: grid;
  width: 104px;
  height: 104px;
  flex: 0 0 auto;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
  border: 1px solid rgba(219, 231, 245, 0.92);
  border-radius: var(--radius);
  padding: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.055);
  cursor: pointer;
  transition: none;
}

.studio-thumb:hover,
.studio-thumb:focus-visible {
  border-color: var(--line-strong);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  transform: none;
}

.studio-thumb.is-active {
  border-color: #706cff;
  box-shadow: 0 0 0 2px rgba(112, 108, 255, 0.22), 0 14px 32px rgba(37, 99, 235, 0.12);
}

.studio-thumb-media {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  border-radius: calc(var(--radius) - 1px);
  overflow: hidden;
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, rgba(219, 231, 245, 0.58) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(219, 231, 245, 0.58) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(219, 231, 245, 0.58) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(219, 231, 245, 0.58) 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

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

.studio-thumb-placeholder,
.studio-thumb-empty .studio-thumb-media {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--primary);
}

.studio-thumb-placeholder svg,
.studio-thumb-empty svg {
  width: 30px;
  height: 30px;
}

.studio-thumb-empty {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.studio-thumb-status {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
}

.studio-thumb-status svg {
  width: 14px;
  height: 14px;
}

.studio-thumb.status-succeeded .studio-thumb-status {
  color: var(--success);
}

.studio-thumb.status-failed .studio-thumb-status {
  color: var(--danger);
}

.studio-thumb-failed-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.34);
}

.studio-thumb-failed-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: var(--danger);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.studio-thumb-failed-icon svg {
  width: 24px;
  height: 24px;
}

.studio-thumb-spinner {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 3px solid #dbeafe;
  border-top-color: var(--primary);
  border-radius: 999px;
  animation: batch-spin 0.9s linear infinite;
}

.studio-layout {
  display: grid;
  width: 100%;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 392px);
  grid-template-areas:
    "preview tools"
    "presets presets";
  align-items: start;
  column-gap: 34px;
  row-gap: 12px;
  margin: 0 auto;
  padding: 16px 0 20px;
}

.studio-preview {
  grid-area: preview;
  min-width: 0;
}

.studio-stage {
  position: relative;
  aspect-ratio: 1.55 / 1;
  border: 1px solid #e8edf4;
  border-radius: var(--radius);
  background: #f8f9fb;
  box-shadow: none;
  overflow: hidden;
}

.studio-stage canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: auto;
  transform: none;
  transition: none;
  cursor: default;
  touch-action: none;
}

.studio-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 24px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.88);
  text-align: center;
}

.studio-empty[hidden] {
  display: none !important;
}

.studio-empty svg {
  width: 46px;
  height: 46px;
  color: var(--primary);
}

.studio-empty.is-loading svg {
  animation: batch-spin 0.9s linear infinite;
}

.studio-empty strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.studio-empty span {
  max-width: 360px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
}

.studio-compare {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 3;
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(219, 231, 245, 0.92);
  border-radius: var(--radius);
  padding: 0 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  font-size: 13px;
  font-weight: 900;
}

.studio-compare:hover,
.studio-compare:focus-visible {
  border-color: rgba(37, 99, 235, 0.36);
  color: var(--primary);
}

.studio-compare svg {
  width: 18px;
  height: 18px;
}

.studio-tools {
  display: flex;
  flex-direction: column;
  grid-area: tools;
  align-self: stretch;
  min-width: 0;
  gap: 26px;
  padding: 6px 0 0;
}

.studio-tool-section {
  display: grid;
  gap: 12px;
}

.studio-tool-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

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

.studio-text-action {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  color: var(--primary);
  background: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.studio-text-action svg {
  width: 16px;
  height: 16px;
}

.studio-swatches {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.studio-swatch {
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--swatch, #ffffff);
  box-shadow: none;
  cursor: pointer;
  overflow: hidden;
}

.studio-swatch:hover,
.studio-swatch.is-active {
  border-color: #111827;
  box-shadow: 0 0 0 1px #111827;
}

.studio-swatch.is-checker {
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #eeeeee 25%, transparent 25%),
    linear-gradient(-45deg, #eeeeee 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eeeeee 75%),
    linear-gradient(-45deg, transparent 75%, #eeeeee 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.studio-swatch-picker {
  background: linear-gradient(135deg, #facc15 0%, #22d3ee 42%, #2563eb 68%, #ec4899 100%);
}

.studio-swatch-picker input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.studio-swatch-picker svg {
  width: 26px;
  height: 26px;
  color: #ffffff;
  stroke-width: 2.4;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.22));
}

.studio-ratio-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px;
  background: #f8fafc;
}

.studio-ratio-grid button,
.studio-transform-grid button {
  display: inline-grid;
  min-height: 42px;
  min-width: 0;
  place-items: center;
  align-content: center;
  gap: 4px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 8px;
  color: var(--text);
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.studio-ratio-grid button:hover,
.studio-ratio-grid button.is-active,
.studio-transform-grid button:hover {
  border-color: rgba(37, 99, 235, 0.3);
  color: var(--primary);
  background: #ffffff;
}

.ratio-icon {
  display: block;
  border: 2px solid #1f2937;
  border-radius: 4px;
  background: #ffffff;
}

.ratio-square {
  width: 24px;
  height: 24px;
}

.ratio-landscape {
  width: 30px;
  height: 20px;
}

.ratio-portrait {
  width: 20px;
  height: 30px;
}

.ratio-wide {
  width: 31px;
  height: 23px;
}

.ratio-tall {
  width: 23px;
  height: 31px;
}

.ratio-cinema {
  width: 32px;
  height: 18px;
}

.ratio-story {
  width: 18px;
  height: 32px;
}

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

.studio-transform-grid button {
  min-height: 44px;
  grid-auto-flow: column;
  justify-content: center;
  background: #ffffff;
  border-color: var(--line);
}

.studio-transform-grid svg {
  width: 17px;
  height: 17px;
}

.studio-download {
  width: 100%;
  min-height: 58px;
  margin-top: auto;
  font-size: 16px;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.2);
}

.studio-preset-bar {
  position: relative;
  display: block;
  grid-area: presets;
  min-width: 0;
  padding: 0;
}

.studio-preset-bar::before,
.studio-preset-bar::after {
  position: absolute;
  top: 0;
  bottom: 8px;
  z-index: 1;
  width: 72px;
  pointer-events: none;
  content: "";
}

.studio-preset-bar::before {
  left: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.72) 42%, rgba(255, 255, 255, 0) 100%);
}

.studio-preset-bar::after {
  right: 0;
  background: linear-gradient(270deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.72) 42%, rgba(255, 255, 255, 0) 100%);
}

.studio-preset-bar.is-at-start::before,
.studio-preset-bar.is-at-end::after,
.studio-preset-bar:not(.has-overflow)::before,
.studio-preset-bar:not(.has-overflow)::after {
  display: none;
}

.studio-preset-track {
  display: flex;
  min-width: 0;
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 2px 0 8px;
  scrollbar-width: none;
}

.studio-preset-track::-webkit-scrollbar {
  display: none;
}

.studio-preset {
  display: inline-grid;
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 8px;
  color: var(--ink);
  background: #f5f7fa;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}

.studio-preset.is-active {
  border-color: #2f7cff;
  color: var(--primary);
  background: #f8fbff;
}

.studio-preset:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  background: #f5f7fa;
}

.studio-preset.is-active:hover {
  border-color: #2f7cff;
  color: var(--primary);
  background: #f8fbff;
}

.studio-preset svg {
  width: 28px;
  height: 28px;
  color: #1f2937;
  stroke-width: 1.9;
}

.studio-preset.is-active svg,
.studio-preset.is-active .ratio-icon {
  color: var(--primary);
  border-color: var(--primary);
}

.preset-glyph {
  color: #111827;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.preset-word {
  color: #111827;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.studio-preset-nav {
  position: absolute;
  top: 25px;
  z-index: 2;
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #d9e2ef;
  border-radius: 999px;
  color: #111827;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.studio-preset-prev {
  left: -8px;
  transform: none;
}

.studio-preset-next {
  right: -8px;
  transform: none;
}

.studio-preset-nav svg {
  width: 22px;
  height: 22px;
}

.studio-preset-nav:disabled {
  display: none;
  opacity: 0.72;
}

.studio-shell button:disabled,
.studio-shell input:disabled {
  color: #94a3b8;
  background-color: #f8fafc;
  opacity: 0.72;
  cursor: not-allowed;
}

.studio-shell .is-loading {
  cursor: progress;
}

.workbench-page .studio-shell button,
.workbench-page .studio-shell .studio-thumb,
.workbench-page .studio-shell .studio-preset,
.workbench-page .studio-shell .studio-swatch {
  transition: none !important;
}

.workbench-page .studio-shell button:hover,
.workbench-page .studio-shell button:focus,
.workbench-page .studio-shell button:focus-visible,
.workbench-page .studio-shell .studio-thumb:hover,
.workbench-page .studio-shell .studio-thumb:focus-visible,
.workbench-page .studio-shell .studio-preset:hover,
.workbench-page .studio-shell .studio-preset:focus-visible,
.workbench-page .studio-shell .studio-swatch:hover,
.workbench-page .studio-shell .studio-swatch:focus-visible {
  transform: none !important;
}

@media (max-width: 1180px) {
  .studio-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "preview"
      "presets"
      "tools";
  }

  .studio-tools {
    gap: 20px;
  }
}

@media (max-width: 760px) {
  .studio-shell {
    width: min(var(--container), calc(100% - 32px));
  }

  .studio-filmstrip {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 10px;
    padding: 10px 16px 14px;
  }

  .studio-filmstrip-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .studio-filmstrip-actions .btn {
    width: 100%;
    padding-right: 10px;
    padding-left: 10px;
  }

  .studio-layout {
    width: 100%;
    gap: 20px;
    padding-top: 14px;
  }

  .studio-preset-bar {
    padding: 0 0 22px;
  }

  .studio-preset-bar::before,
  .studio-preset-bar::after {
    width: 56px;
  }

  .studio-preset-bar::before {
    left: 0;
  }

  .studio-preset-bar::after {
    right: 0;
  }

  .studio-preset-nav {
    top: 21px;
    display: inline-grid;
    width: 42px;
    height: 42px;
  }

  .studio-preset-prev {
    left: 4px;
  }

  .studio-preset-next {
    right: 4px;
  }

  .studio-preset {
    width: 104px;
    height: 84px;
  }

  .studio-stage {
    width: 100%;
    height: clamp(340px, 64vw, 380px);
    min-height: 0;
    aspect-ratio: auto;
  }

  .studio-tools {
    padding-bottom: 28px;
  }

  .studio-tool-section h2 {
    font-size: 18px;
  }
}

@media (max-width: 560px) {
  .studio-thumb {
    width: 100px;
    height: 100px;
    border-radius: 14px;
  }

  .studio-stage {
    height: min(340px, calc(100vw - 32px));
  }

  .studio-compare {
    top: 12px;
    right: 12px;
    min-height: 38px;
    padding: 0 11px;
    font-size: 13px;
  }

  .studio-swatches {
    gap: 10px;
  }

  .studio-swatch {
    width: 56px;
    height: 56px;
  }

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

  .studio-ratio-grid button {
    min-height: 42px;
    padding-right: 4px;
    padding-left: 4px;
    font-size: 13px;
  }

  .studio-preset-track {
    gap: 10px;
  }

  .studio-preset {
    width: 96px;
    height: 80px;
    font-size: 12px;
  }

  .studio-transform-grid {
    grid-template-columns: 1fr;
  }

  .studio-transform-grid button {
    min-height: 52px;
    grid-auto-flow: column;
    justify-content: center;
  }

  .studio-download {
    min-height: 58px;
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .studio-thumb,
  .studio-ratio-grid button,
  .studio-transform-grid button,
  .studio-filmstrip-actions .btn {
    transition-duration: 0.01ms !important;
  }

  .studio-thumb:hover,
  .studio-thumb:focus-visible {
    transform: none;
  }

  .studio-thumb-spinner {
    animation: none;
    border-top-color: #dbeafe;
  }

  .studio-empty.is-loading svg {
    animation: none;
  }
}

/* Frontend buttons: keep color states, remove elevation and hover motion. */
.page button,
.page .btn,
.page a.btn,
.cutout-modal button,
.cutout-modal .btn,
.cutout-modal .cutout-modal-action {
  box-shadow: none !important;
  transition: none !important;
}

.page button:hover,
.page button:focus,
.page button:focus-visible,
.page button:active,
.page .btn:hover,
.page .btn:focus,
.page .btn:focus-visible,
.page .btn:active,
.page a.btn:hover,
.page a.btn:focus,
.page a.btn:focus-visible,
.page a.btn:active,
.cutout-modal button:hover,
.cutout-modal button:focus,
.cutout-modal button:focus-visible,
.cutout-modal button:active,
.cutout-modal .btn:hover,
.cutout-modal .btn:focus,
.cutout-modal .btn:focus-visible,
.cutout-modal .btn:active,
.cutout-modal .cutout-modal-action:hover,
.cutout-modal .cutout-modal-action:focus,
.cutout-modal .cutout-modal-action:focus-visible,
.cutout-modal .cutout-modal-action:active {
  box-shadow: none !important;
  transform: none !important;
}

/* Task records gallery */
.tasks-page {
  background: var(--bg);
}

.tasks-shell {
  width: min(var(--container), calc(100% - 48px));
  padding: 28px 0 76px;
}

.tasks-board {
  display: grid;
  gap: 18px;
}

.tasks-board .task-status-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 0;
}

.tasks-board .task-status-filter button {
  min-height: 38px;
  border-color: transparent;
  padding: 0 10px;
  color: var(--text);
  background: transparent;
  font-size: 14px;
  font-weight: 780;
}

.tasks-board .task-status-filter button:hover,
.tasks-board .task-status-filter button:focus-visible,
.tasks-board .task-status-filter button.is-active {
  border-color: rgba(37, 99, 235, 0.18);
  color: var(--primary-dark);
  background: rgba(234, 242, 255, 0.74);
}

.tasks-board .task-status-filter button span {
  min-width: 20px;
  min-height: 20px;
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(241, 245, 249, 0.78);
  font-size: 12px;
}

.tasks-board .task-status-filter button.is-active span {
  color: var(--primary);
  background: #ffffff;
}

.tasks-board .task-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 20px;
}

.task-tile {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  margin: 0;
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  color: var(--text);
  background: transparent;
  box-shadow: none;
  text-align: left;
  overflow: hidden;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 180ms ease;
}

button.task-tile {
  font: inherit;
}

.task-tile:hover,
.task-tile:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.task-tile:focus-visible {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16) !important;
}

.task-tile-media {
  position: relative;
  display: grid;
  aspect-ratio: 4 / 3;
  min-height: 0;
  place-items: center;
  border: 1px solid rgba(198, 215, 238, 0.54);
  border-radius: var(--radius);
  background: var(--surface-neutral);
  box-shadow: none;
  overflow: hidden;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.task-tile:hover .task-tile-media,
.task-tile:focus-visible .task-tile-media {
  border-color: var(--line-strong);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
}

.task-tile-media.checker,
.task-detail-stage.checker {
  background:
    linear-gradient(45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f7 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f7 75%),
    #ffffff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.task-tile-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.task-tile-media.is-placeholder {
  gap: 10px;
  padding: 28px 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
  text-align: center;
}

.task-tile-media.is-failed {
  color: var(--danger);
  background: #fffafa;
}

.task-tile-media.is-failed-source img {
  opacity: 0.66;
  filter: saturate(0.76);
}

.task-placeholder-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(198, 215, 238, 0.66);
  border-radius: 50%;
  color: currentColor;
  background: rgba(255, 255, 255, 0.86);
}

.task-placeholder-icon svg {
  width: 20px;
  height: 20px;
}

.task-tile-status {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 1;
  display: inline-flex;
  width: 26px;
  height: 26px;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 50%;
  padding: 0;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  backdrop-filter: blur(8px);
  overflow: hidden;
  transition: width 180ms ease, padding 180ms ease, border-radius 180ms ease, background 180ms ease;
}

.task-tile-status svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
}

.task-tile-status-text {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
  transition: max-width 180ms ease, opacity 180ms ease;
}

.task-tile:hover .task-tile-status,
.task-tile:focus-visible .task-tile-status {
  width: auto;
  min-width: 26px;
  justify-content: flex-start;
  gap: 5px;
  border-radius: var(--radius);
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.88);
}

.task-tile:hover .task-tile-status-text,
.task-tile:focus-visible .task-tile-status-text {
  max-width: 56px;
  opacity: 1;
}

.status-succeeded .task-tile-status,
.task-status.status-succeeded {
  border-color: rgba(5, 150, 105, 0.1);
  color: var(--success);
  background: rgba(255, 255, 255, 0.76);
}

.status-processing .task-tile-status,
.status-pending .task-tile-status,
.task-status.status-processing,
.task-status.status-pending {
  border-color: rgba(217, 119, 6, 0.1);
  color: var(--warning);
  background: rgba(255, 255, 255, 0.76);
}

.status-failed .task-tile-status,
.task-status.status-failed {
  border-color: rgba(220, 38, 38, 0.1);
  color: var(--danger);
  background: rgba(255, 255, 255, 0.76);
}

.task-tile.is-loading {
  pointer-events: none;
}

.task-tile.is-loading .task-tile-media,
.task-tile.is-loading .task-skeleton {
  background:
    linear-gradient(90deg, #eef5ff 0%, #f8fbff 48%, #eef5ff 100%);
  background-size: 220% 100%;
  animation: task-skeleton-pulse 1.3s ease-in-out infinite;
}

.task-gallery .task-empty {
  display: grid;
  min-height: 280px;
  grid-column: 1 / -1;
  place-items: center;
  gap: 10px;
  border: 0;
  border-radius: var(--radius);
  padding: 28px;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.task-gallery .task-empty .task-empty-icon {
  display: block;
  width: 144px;
  height: 144px;
}

.task-gallery .task-empty strong {
  color: var(--ink);
  font-size: 18px;
}

.task-gallery .task-empty > span:not(.task-empty-icon) {
  font-size: 14px;
  font-weight: 800;
}

.task-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
}

.task-pagination[hidden] {
  display: none !important;
}

.task-pagination > span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
}

.task-pagination button[hidden] {
  display: none !important;
}

.task-detail-modal.cutout-modal {
  width: min(calc(100% - 32px), 1040px);
  gap: 18px;
  border-color: rgba(198, 215, 238, 0.7);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.14);
}

.task-detail-modal .cutout-modal-head {
  align-items: center;
  border-bottom: 0;
  padding-bottom: 0;
}

.task-detail-modal .cutout-modal-title {
  font-size: 22px;
  line-height: 1.2;
}

.task-detail-modal .cutout-modal-close {
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
}

.task-detail-modal .cutout-modal-close:hover,
.task-detail-modal .cutout-modal-close:focus-visible {
  border-color: rgba(37, 99, 235, 0.16);
  background: var(--primary-soft);
}

.task-detail-modal .cutout-modal-body {
  min-height: 0;
}

.task-detail-modal .cutout-modal-footer {
  justify-content: flex-end;
  gap: 8px;
}

.task-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(260px, 0.78fr);
  gap: 22px;
  align-items: start;
}

.task-detail-preview,
.task-detail-info {
  min-width: 0;
}

.task-detail-preview {
  display: grid;
  gap: 10px;
}

.task-detail-stage {
  position: relative;
  display: grid;
  min-height: 420px;
  max-height: min(70dvh, 680px);
  place-items: center;
  border: 1px solid rgba(198, 215, 238, 0.68);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface-neutral);
  text-decoration: none;
  overflow: hidden;
}

.task-detail-stage img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(70dvh, 680px);
  object-fit: contain;
}

.task-detail-stage.is-empty {
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
}

.task-detail-label {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  border: 1px solid rgba(198, 215, 238, 0.52);
  border-radius: var(--radius);
  padding: 4px 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.task-detail-info {
  display: grid;
  gap: 16px;
  padding-top: 2px;
}

.task-detail-meta {
  display: grid;
  gap: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.task-detail-meta-item {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  min-width: 0;
  align-items: baseline;
  gap: 18px;
  border-bottom: 1px solid rgba(198, 215, 238, 0.62);
  padding: 0 0 14px;
  margin-bottom: 14px;
}

.task-detail-meta-item:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.task-detail-meta-item span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.task-detail-meta-item strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
  font-weight: 820;
  text-align: right;
}

.task-detail-error {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 8px;
  border: 0;
  border-left: 2px solid rgba(220, 38, 38, 0.42);
  border-radius: 0;
  padding: 2px 0 2px 10px;
  color: #991b1b;
  background: transparent;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}

.task-detail-error svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 2px;
}

.task-detail-error span {
  min-width: 0;
}

.task-detail-error strong {
  display: block;
  margin-bottom: 2px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 400;
}

@media (max-width: 960px) {
  .tasks-board .task-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .tasks-shell {
    width: min(var(--container), calc(100% - 32px));
    padding: 24px 0 60px;
  }

  .tasks-board .task-status-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tasks-board .task-status-filter button {
    min-width: 0;
  }

  .tasks-board .task-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

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

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

@media (max-width: 460px) {
  .tasks-board .task-status-filter,
  .tasks-board .task-gallery {
    grid-template-columns: 1fr;
  }

  .task-pagination {
    display: grid;
  }

  .task-detail-modal.cutout-modal {
    width: 100%;
  }

  .task-detail-meta-item {
    display: grid;
    gap: 4px;
  }

  .task-detail-meta-item strong {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .task-tile,
  .task-tile-media,
  .task-tile-status,
  .task-tile-status-text,
  .task-tile.is-loading .task-tile-media,
  .task-tile.is-loading .task-skeleton {
    transition: none;
    animation: none;
  }

  .task-tile:hover,
  .task-tile:focus-visible {
    transform: none;
  }
}
