:root {
  --ink-950: #07151f;
  --ink-900: #10212d;
  --ink-700: #496476;
  --aqua-500: #1fb8aa;
  --amber-400: #ffbb61;
  --rose-300: #ff907c;
  --paper: rgba(248, 252, 252, 0.8);
  --paper-strong: rgba(255, 255, 255, 0.92);
  --line: rgba(16, 33, 45, 0.1);
  --shadow: 0 28px 70px rgba(7, 21, 31, 0.16);
  --shadow-soft: 0 16px 40px rgba(7, 21, 31, 0.1);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Aptos", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink-950);
  background:
    radial-gradient(circle at top left, rgba(143, 226, 216, 0.68), transparent 32%),
    radial-gradient(circle at 85% 15%, rgba(255, 187, 97, 0.32), transparent 24%),
    linear-gradient(160deg, #eef8f8 0%, #f7f1e6 48%, #f5f8fb 100%);
  overflow-x: hidden;
}

body.auth-page {
  display: grid;
  place-items: center;
  padding: 24px 0;
  background:
    radial-gradient(circle at 14% 18%, rgba(192, 132, 252, 0.36), transparent 26%),
    radial-gradient(circle at 86% 14%, rgba(129, 140, 248, 0.3), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(76, 29, 149, 0.44), transparent 42%),
    linear-gradient(165deg, #120f26 0%, #1f1742 46%, #2b1b5a 100%);
}

body.dashboard-page {
  display: grid;
  justify-items: center;
  padding: 18px 0 110px;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
}

textarea {
  resize: none;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 33, 45, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 33, 45, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 82%);
  pointer-events: none;
}

body.auth-page .bg-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.18));
}

.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(24px);
  opacity: 0.75;
  pointer-events: none;
  animation: drift 14s ease-in-out infinite;
}

body.auth-page .glow {
  filter: blur(50px);
  opacity: 1;
}

.glow-a {
  width: 220px;
  height: 220px;
  left: -40px;
  top: 70px;
  background: rgba(31, 184, 170, 0.22);
}

.glow-b {
  width: 260px;
  height: 260px;
  right: -30px;
  bottom: 60px;
  background: rgba(255, 144, 124, 0.18);
  animation-delay: -6s;
}

body.auth-page .glow-a {
  width: 280px;
  height: 280px;
  left: -44px;
  top: 10%;
  background: rgba(167, 139, 250, 0.28);
}

body.auth-page .glow-b {
  width: 320px;
  height: 320px;
  right: -60px;
  bottom: 12%;
  background: rgba(232, 121, 249, 0.18);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 0 18px;
}

body.auth-page .shell {
  width: min(100%, 500px);
  min-height: calc(100dvh - 48px);
  display: flex;
  align-items: center;
}

body.dashboard-page .shell {
  padding-top: 18px;
  padding-bottom: 24px;
}

.panel-card {
  backdrop-filter: blur(20px);
  background: linear-gradient(180deg, var(--paper) 0%, rgba(255, 255, 255, 0.66) 100%);
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.auth-root {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.auth-root,
.auth-root * {
  box-sizing: border-box;
}

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
}

.auth-shell {
  position: relative;
  width: 100%;
  display: grid;
  gap: 18px;
  padding: 18px;
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 90px rgba(6, 5, 19, 0.4);
  backdrop-filter: blur(26px);
  overflow: hidden;
}

.auth-shell::before {
  content: "";
  position: absolute;
  top: -110px;
  right: -42px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 181, 253, 0.42), rgba(196, 181, 253, 0));
  pointer-events: none;
}

.auth-shell::after {
  content: "";
  position: absolute;
  left: -80px;
  bottom: -120px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.24), rgba(244, 114, 182, 0));
  pointer-events: none;
}

.auth-hero {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 20px;
  padding: 26px 22px 22px;
  border-radius: 26px;
  background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 38%, #a855f7 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 22px 48px rgba(76, 29, 149, 0.35);
  overflow: hidden;
}

.auth-hero::before {
  content: "";
  position: absolute;
  top: -32px;
  right: -20px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0));
}

.auth-hero::after {
  content: "";
  position: absolute;
  left: -54px;
  bottom: -70px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
}

.auth-hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.auth-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-hero h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.auth-lead {
  margin: 0;
  max-width: 28ch;
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.84);
}

.auth-metric-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.auth-metric-card {
  display: grid;
  gap: 6px;
  min-height: 84px;
  padding: 14px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.auth-metric-card strong {
  font-size: 1.1rem;
  font-weight: 800;
}

.auth-metric-card span {
  font-size: 0.76rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.82);
}

.auth-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(196, 181, 253, 0.28);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 243, 255, 0.94));
  box-shadow: 0 24px 60px rgba(23, 19, 55, 0.18);
}

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

.auth-head-copy {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.auth-card-head--form {
  align-items: center;
}

.auth-meta-copy {
  margin: 0;
  color: #5b4b8a;
  font-size: 0.92rem;
  line-height: 1.6;
}

.auth-config-btn {
  flex-shrink: 0;
  min-width: 72px;
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.16);
  color: #5b21b6;
  box-shadow: none;
}

.auth-config-btn:hover {
  background: rgba(124, 58, 237, 0.12);
  color: #4c1d95;
}

.auth-config-panel {
  margin-top: 0;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.06), rgba(139, 92, 246, 0.03));
  border: 1px solid rgba(124, 58, 237, 0.14);
  box-shadow: none;
}

.auth-card--form .mode-switch {
  margin-top: 0;
  padding: 7px;
  gap: 10px;
  border-radius: 20px;
  background: rgba(109, 40, 217, 0.08);
  border: 1px solid rgba(109, 40, 217, 0.08);
}

.auth-card--form .auth-mode-switch--single,
.auth-mode-switch--single {
  grid-template-columns: 1fr;
}

.auth-card--form .auth-form {
  margin-top: 0;
  gap: 16px;
}

.auth-card--form .mode-btn {
  min-height: 48px;
  border-radius: 16px;
  color: #6b5a93;
  font-weight: 700;
}

.auth-card--form .mode-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, #6d28d9, #8b5cf6 58%, #c084fc 100%);
  box-shadow: 0 12px 24px rgba(124, 58, 237, 0.24);
}

.auth-card--form .field {
  gap: 8px;
}

.auth-card--form .field span {
  color: #3b1f73;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.auth-card--form .field input {
  min-height: 56px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(109, 40, 217, 0.14);
  background: rgba(250, 247, 255, 0.96);
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.auth-card--form .field input::placeholder {
  color: #9b8bc4;
}

.auth-card--form .field input:focus {
  border-color: rgba(124, 58, 237, 0.7);
  box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.22);
  background: #fff;
  transform: translateY(-1px);
}

.auth-card--form .primary-btn {
  min-height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 52%, #c084fc 100%);
  box-shadow: 0 18px 36px rgba(109, 40, 217, 0.28);
}

.auth-card--form .primary-btn:hover {
  box-shadow: 0 22px 40px rgba(109, 40, 217, 0.32);
}

.auth-message {
  display: none;
  min-height: 0;
  margin: 0;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid rgba(109, 40, 217, 0.1);
  background: rgba(124, 58, 237, 0.05);
  color: #4c1d95;
}

.auth-message:not(:empty) {
  display: block;
}

.auth-card--form .auth-message.is-success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.18);
  color: #065f46;
}

.auth-card--form .auth-message.is-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.14);
  color: #991b1b;
}

.auth-card--form .auth-message.is-info {
  background: rgba(109, 40, 217, 0.06);
  border-color: rgba(109, 40, 217, 0.1);
  color: #5b21b6;
}

.auth-page .tip {
  color: #6d5d96;
  font-size: 0.8rem;
}

.auth-page .wide-btn {
  width: 100%;
}

@media (max-width: 520px) {
  body.auth-page .shell {
    min-height: calc(100dvh - 36px);
    padding: 0 14px;
  }

  .auth-shell {
    gap: 14px;
    padding: 14px;
    border-radius: 28px;
  }

  .auth-hero,
  .auth-card {
    padding: 20px 18px;
    border-radius: 22px;
  }

  .auth-hero h1 {
    font-size: 1.72rem;
  }
}

@media (max-width: 380px) {
  .auth-metric-grid {
    grid-template-columns: 1fr;
  }

  .auth-metric-card {
    min-height: auto;
  }
}

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

.dashboard-hero,
.quick-panel,
.module-panel {
  padding: 20px;
}

.card-head,
.dashboard-hero,
.section-heading,
.tool-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.tool-detail-head {
  align-items: center;
}

.tool-head-copy {
  flex: 1;
}

.eyebrow,
.section-tag {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--ink-700);
}

.eyebrow,
.section-tag {
  margin-bottom: 8px;
}

.tool-subtitle {
  margin: 8px 0 0;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-700);
}

h2,
h3,
h4 {
  margin: 0;
  line-height: 1.15;
}

h2 {
  font-size: 1.72rem;
}

h3 {
  font-size: 1.18rem;
}

h4 {
  font-size: 1rem;
}

.tool-page-title {
  font-size: 1.85rem;
}

.dashboard-status,
.module-subtitle,
.tip,
.module-card p,
.quick-action span:last-child,
.tool-detail-description,
.tool-hint {
  margin: 0;
  color: var(--ink-700);
  line-height: 1.6;
}

.tool-detail {
  display: grid;
  gap: 18px;
}

.tool-detail-card,
.tool-form-card {
  padding: 20px;
}

.tool-route-tag {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(16, 33, 45, 0.06);
  border: 1px solid rgba(16, 33, 45, 0.08);
  color: var(--ink-700);
  font-size: 0.82rem;
  font-weight: 700;
}

.tool-hero {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.tool-hero-badge {
  width: fit-content;
  padding: 8px 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(17, 50, 70, 0.96), rgba(31, 184, 170, 0.88));
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

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

.tool-feature-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(16, 33, 45, 0.08);
  color: var(--ink-900);
  font-size: 0.82rem;
  font-weight: 700;
}

.dashboard-account {
  margin: 12px 0 0;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(31, 184, 170, 0.12);
  color: #0d6e66;
  font-weight: 700;
}

.icon-btn,
.ghost-btn,
.primary-btn,
.tab-btn,
.quick-action {
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.icon-btn:hover,
.ghost-btn:hover,
.primary-btn:hover,
.tab-btn:hover,
.quick-action:hover {
  transform: translateY(-1px);
}

.icon-btn,
.ghost-btn {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  color: var(--ink-900);
}

.primary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, #113246 0%, #1fb8aa 58%, #ffbb61 100%);
  box-shadow: 0 16px 34px rgba(20, 57, 76, 0.24);
}

.primary-btn-lg {
  min-height: 56px;
}

.primary-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.config-panel {
  margin-top: 18px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  display: grid;
  gap: 12px;
}

.config-panel.is-collapsed {
  display: none;
}

.mode-switch {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(16, 33, 45, 0.06);
}

.mode-btn {
  min-height: 46px;
  border-radius: 14px;
  background: transparent;
  color: var(--ink-700);
  font-weight: 700;
}

.mode-btn.is-active {
  color: var(--ink-950);
  background: linear-gradient(145deg, rgba(31, 184, 170, 0.22), rgba(255, 255, 255, 0.86));
  box-shadow: inset 0 0 0 1px rgba(16, 33, 45, 0.08);
}

.auth-form,
.tool-form {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.tool-form {
  margin-top: 0;
}

.field {
  display: grid;
  gap: 10px;
}

.field span {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-900);
}

.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(16, 33, 45, 0.12);
  background: var(--paper-strong);
  color: var(--ink-950);
  outline: none;
  box-shadow: var(--shadow-soft);
}

.field input {
  min-height: 54px;
}

.field textarea {
  min-height: 136px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 251, 0.92));
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(31, 184, 170, 0.8);
  box-shadow: 0 0 0 4px rgba(31, 184, 170, 0.14);
}

.compact-field input {
  min-height: 48px;
}

.tool-field {
  margin-top: 4px;
}

.tool-hint {
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(31, 184, 170, 0.12), rgba(255, 255, 255, 0.88));
  border: 1px solid rgba(31, 184, 170, 0.14);
  box-shadow: var(--shadow-soft);
}

.message {
  min-height: 24px;
  margin: 14px 2px 0;
  font-size: 0.94rem;
  line-height: 1.5;
}

.message.is-success {
  color: #0f6a52;
}

.message.is-error {
  color: #a13f3f;
}

.message.is-info {
  color: var(--ink-700);
}

.banner-card {
  overflow: hidden;
  padding: 0;
}

.banner-track {
  display: flex;
  transition: transform 0.35s ease;
}

.banner-slide {
  min-width: 100%;
  min-height: 182px;
  padding: 24px 22px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
}

.banner-slide p {
  margin: 0;
  max-width: 28ch;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
}

.banner-slide-a {
  background: linear-gradient(145deg, #14394c 0%, #1f6d7d 56%, #6ac7bc 100%);
}

.banner-slide-b {
  background: linear-gradient(145deg, #57381f 0%, #ad6d28 52%, #ffbb61 100%);
}

.banner-slide-c {
  background: linear-gradient(145deg, #5d2e3d 0%, #a1465c 55%, #ff907c 100%);
}

.banner-pill {
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 0.78rem;
  font-weight: 700;
}

.banner-footer {
  padding: 14px 18px 16px;
  display: flex;
  justify-content: center;
}

.banner-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(16, 33, 45, 0.16);
}

.banner-dot.is-active {
  width: 22px;
  background: linear-gradient(90deg, #1fb8aa, #ffbb61);
}

.quick-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.quick-action {
  min-height: 122px;
  padding: 14px 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 249, 250, 0.78));
  border: 1px solid rgba(16, 33, 45, 0.08);
  box-shadow: var(--shadow-soft);
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.quick-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #103243, #1fb8aa);
  color: white;
  font-weight: 800;
}

.quick-action strong {
  font-size: 0.96rem;
}

.module-grid {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.module-card {
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 249, 250, 0.78));
  border: 1px solid rgba(16, 33, 45, 0.08);
  box-shadow: var(--shadow-soft);
}

.module-card-button {
  width: 100%;
  text-align: left;
  color: inherit;
}

.module-card.is-clickable {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.module-card.is-clickable:hover {
  transform: translateY(-1px);
}

.module-card.is-clickable:focus-visible {
  outline: 2px solid rgba(31, 184, 170, 0.35);
  outline-offset: 2px;
}

.module-card.is-accent {
  background: linear-gradient(145deg, rgba(20, 57, 76, 0.96), rgba(31, 184, 170, 0.88));
  color: white;
}

.module-card.is-accent p,
.module-card.is-accent .module-meta {
  color: rgba(255, 255, 255, 0.88);
}

.module-card p {
  margin-top: 10px;
}

.module-card-image {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.module-card-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.module-meta {
  display: inline-block;
  margin-top: 14px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(31, 184, 170, 0.1);
  color: #0d6e66;
  font-size: 0.82rem;
  font-weight: 700;
}

.module-panel.profile-mode {
  padding-top: 22px;
}

.module-panel.messages-mode {
  padding-top: 22px;
}

.messages-scroll-grid {
  max-height: 376px;
  overflow-y: auto;
  padding-right: 6px;
}

.messages-scroll-grid::-webkit-scrollbar {
  width: 8px;
}

.messages-scroll-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(16, 33, 45, 0.16);
}

.tool-detail-description {
  margin-top: 0;
  font-size: 0.98rem;
}

.tab-bar {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 394px);
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  border-radius: 24px;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 18px 50px rgba(7, 21, 31, 0.16);
}

.tab-btn {
  min-height: 54px;
  padding: 8px 6px;
  border-radius: 16px;
  background: transparent;
  color: var(--ink-700);
  font-size: 0.82rem;
  font-weight: 700;
}

.tab-btn.is-active {
  background: linear-gradient(145deg, rgba(31, 184, 170, 0.22), rgba(255, 255, 255, 0.88));
  color: var(--ink-950);
}

/* ---- Dashboard Outer Pages Redesign ---- */

body.dashboard-page {
  background:
    radial-gradient(circle at 12% 18%, rgba(221, 214, 254, 0.86), transparent 28%),
    radial-gradient(circle at 86% 12%, rgba(244, 208, 255, 0.58), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(216, 180, 254, 0.38), transparent 42%),
    linear-gradient(180deg, #faf7ff 0%, #f4efff 52%, #f7f2ff 100%);
}

body.dashboard-page .bg-grid {
  background-image:
    linear-gradient(rgba(103, 80, 164, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 80, 164, 0.05) 1px, transparent 1px);
}

body.dashboard-page .glow-a {
  background: rgba(167, 139, 250, 0.18);
}

body.dashboard-page .glow-b {
  background: rgba(244, 114, 182, 0.12);
}

.dashboard-view {
  gap: 16px;
  padding-bottom: 108px;
}

.dashboard-view.has-tool-detail {
  padding-bottom: 20px;
}

.dashboard-hero,
.quick-panel,
.module-panel {
  padding: 22px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 243, 255, 0.94));
  border: 1px solid rgba(177, 156, 231, 0.16);
  box-shadow: 0 18px 40px rgba(73, 49, 124, 0.08);
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 18px;
  background: linear-gradient(145deg, #fbf7ff 0%, #f2eaff 52%, #e7dbff 100%);
  border: 1px solid rgba(177, 156, 231, 0.18);
  box-shadow: 0 24px 54px rgba(100, 76, 156, 0.12);
  color: #38245f;
}

.dashboard-hero::before {
  content: "";
  position: absolute;
  top: -34px;
  right: -28px;
  width: 160px;
  height: 160px;
  border-radius: 38px;
  background: rgba(139, 92, 246, 0.08);
  transform: rotate(18deg);
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  left: -46px;
  bottom: -86px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 181, 253, 0.52), rgba(196, 181, 253, 0));
}

.dashboard-hero-main,
.section-heading--stacked {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.dashboard-hero-main {
  position: relative;
  z-index: 1;
}

.dashboard-hero-copy,
.section-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.dashboard-hero h2 {
  color: #38245f;
  font-size: 1.92rem;
  letter-spacing: -0.03em;
}

.dashboard-status {
  max-width: 30ch;
  color: #6b5b93;
  font-size: 0.95rem;
  line-height: 1.7;
}

.dashboard-account {
  margin: 2px 0 0;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.14);
  color: #5b3fa6;
  font-size: 0.82rem;
  font-weight: 700;
}

.dashboard-context-pills {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-pill {
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.12);
  color: #5d469f;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
}

.dashboard-hero .icon-btn {
  min-height: 42px;
  padding: 0 14px;
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.12);
  color: #5b3fa6;
  box-shadow: none;
}

.dashboard-hero .icon-btn:hover {
  background: rgba(139, 92, 246, 0.14);
}

.section-heading--stacked {
  align-items: flex-start;
}

.panel-lead,
.module-subtitle {
  margin: 0;
  color: #6d5b9c;
  font-size: 0.88rem;
  line-height: 1.65;
}

.banner-card {
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 241, 255, 0.94));
  border-color: rgba(177, 156, 231, 0.16);
}

.banner-slide {
  position: relative;
  min-height: 168px;
  padding: 24px 22px;
  gap: 12px;
  color: #3d2b67;
}

.banner-slide::after {
  content: "";
  position: absolute;
  top: -26px;
  right: -22px;
  width: 136px;
  height: 136px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.26);
  transform: rotate(16deg);
}

.banner-slide-a {
  background: linear-gradient(145deg, #f6efff 0%, #eee5ff 56%, #e0d2ff 100%);
}

.banner-slide-b {
  background: linear-gradient(145deg, #fff1fb 0%, #f6e8ff 52%, #ebdbff 100%);
}

.banner-slide-c {
  background: linear-gradient(145deg, #f2f3ff 0%, #ebe8ff 54%, #ded7ff 100%);
}

.banner-slide h3 {
  position: relative;
  z-index: 1;
  max-width: 12ch;
  font-size: 1.28rem;
  line-height: 1.2;
  color: #3d2b67;
}

.banner-slide p {
  position: relative;
  z-index: 1;
  max-width: 29ch;
  font-size: 0.88rem;
  color: #6b5d96;
}

.banner-footer {
  justify-content: flex-start;
  padding: 14px 18px 18px;
}

.banner-dot.is-active {
  background: linear-gradient(90deg, #8b5cf6, #c084fc);
}

.banner-slide {
  overflow: hidden;
}

.banner-slide.has-media {
  color: #ffffff;
}

.banner-slide.has-media::after {
  display: none;
}

.banner-slide.has-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(34, 18, 63, 0.06) 0%, rgba(34, 18, 63, 0.18) 38%, rgba(26, 13, 52, 0.82) 100%);
}

.banner-slide-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.banner-slide-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
  max-width: min(82%, 320px);
}

.banner-slide.has-media .banner-slide-copy h3,
.banner-slide.has-media .banner-slide-copy p {
  max-width: none;
  color: #ffffff;
  text-shadow: 0 8px 24px rgba(24, 10, 51, 0.38);
}

.banner-slide.has-media .banner-slide-copy p {
  color: rgba(255, 255, 255, 0.92);
}

.banner-image-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: banner-overlay-in 0.2s ease;
}

.banner-image-overlay img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
}

.banner-image-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 22px;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.banner-image-close:hover {
  background: rgba(255, 255, 255, 0.35);
}

@keyframes banner-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.quick-panel-content {
  display: grid;
  gap: 16px;
}

.quick-grid {
  margin-top: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  grid-auto-rows: 188px;
}

.quick-action {
  height: 100%;
  padding: 18px 14px 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(249, 244, 255, 0.94));
  border: 1px solid rgba(177, 156, 231, 0.14);
  box-shadow: 0 16px 34px rgba(95, 72, 150, 0.08);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  text-align: center;
}

.quick-action:hover {
  border-color: rgba(139, 92, 246, 0.22);
  box-shadow: 0 18px 36px rgba(100, 76, 156, 0.12);
}

.quick-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.48rem;
  line-height: 1;
  background: linear-gradient(145deg, #7c5bd9, #b494ff);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 16px 26px rgba(124, 91, 217, 0.2);
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
  overflow: hidden;
  flex-shrink: 0;
  margin: 0 auto 2px;
  align-self: center;
}

.quick-action:nth-child(6n + 1) .quick-icon {
  background: linear-gradient(145deg, #8a63f6, #b799ff);
}

.quick-action:nth-child(6n + 2) .quick-icon {
  background: linear-gradient(145deg, #b16ad9, #e0a9ff);
}

.quick-action:nth-child(6n + 3) .quick-icon {
  background: linear-gradient(145deg, #dd78af, #ffb4d4);
}

.quick-action:nth-child(6n + 4) .quick-icon {
  background: linear-gradient(145deg, #6d7ef2, #a4b0ff);
}

.quick-action:nth-child(6n + 5) .quick-icon {
  background: linear-gradient(145deg, #8b78d6, #b6abeb);
}

.quick-action:nth-child(6n + 6) .quick-icon {
  background: linear-gradient(145deg, #8e68d7, #c49fff);
}

.quick-action strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.36;
  color: #34225d;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 2.72em;
  width: 100%;
}

.quick-action span:last-child {
  font-size: 0.78rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  min-height: 4.8em;
  width: 100%;
  color: #746493;
}

.module-panel {
  display: grid;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.module-grid {
  margin-top: 0;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.module-card {
  display: grid;
  gap: 14px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(249, 244, 255, 0.94));
  border: 1px solid rgba(177, 156, 231, 0.14);
  box-shadow: 0 16px 34px rgba(95, 72, 150, 0.08);
}

.module-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.module-card-head.has-side-action {
  justify-content: space-between;
  align-items: center;
}

.module-card-head.has-side-action .module-card-copy {
  display: grid;
  gap: 6px;
  align-content: center;
}

.module-card-head.has-side-action .module-card-copy p {
  margin-top: 0;
}

.module-card-copy {
  flex: 1;
  min-width: 0;
  max-width: 100%;
}

.module-card-side-action {
  min-height: 40px;
  padding: 0 14px;
  flex-shrink: 0;
  white-space: nowrap;
  align-self: center;
}

.module-card h4 {
  font-size: 1rem;
  line-height: 1.32;
  color: #34225d;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.module-card p {
  margin: 6px 0 0;
  line-height: 1.68;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: #746493;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.module-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.35rem;
  line-height: 1;
  color: #fff;
  background: linear-gradient(145deg, #8a63f6, #b799ff);
  box-shadow: 0 14px 24px rgba(124, 91, 217, 0.16);
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
}

.module-card-icon.is-aqua {
  background: linear-gradient(145deg, #8a63f6, #b799ff);
}

.module-card-icon.is-amber {
  background: linear-gradient(145deg, #b16ad9, #e0a9ff);
}

.module-card-icon.is-rose {
  background: linear-gradient(145deg, #dd78af, #ffb4d4);
}

.module-card-icon.is-sky {
  background: linear-gradient(145deg, #6d7ef2, #a4b0ff);
}

.module-card-icon.is-slate {
  background: linear-gradient(145deg, #8b78d6, #b6abeb);
}

.module-card-icon.is-mint {
  background: linear-gradient(145deg, #8e68d7, #c49fff);
}

.module-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.module-card-image {
  margin: 0;
  border-radius: 16px;
}

.module-card-image img {
  border-radius: 16px;
}

.module-card-button {
  width: 100%;
  min-width: 0;
  text-align: left;
}

.message-swipe-row {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 22px;
  touch-action: pan-y;
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

.message-swipe-row.is-deleting {
  pointer-events: none;
  opacity: 0.72;
}

.message-swipe-front {
  position: relative;
  z-index: 1;
  will-change: transform;
  touch-action: pan-y;
}

.message-swipe-front > .module-card,
.message-swipe-front > .module-card-button {
  margin: 0;
  border-radius: 22px;
}

.message-swipe-delete {
  position: absolute;
  inset: 0 0 0 auto;
  width: 92px;
  border: 0;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

.module-card.is-clickable:hover {
  box-shadow: 0 18px 36px rgba(100, 76, 156, 0.12);
}

.module-card.is-accent {
  background: linear-gradient(145deg, #f4eeff, #e7dbff);
  color: #34225d;
  border-color: rgba(139, 92, 246, 0.16);
}

.module-card.is-accent .module-card-icon {
  background: linear-gradient(145deg, #7c5bd9, #b494ff);
  box-shadow: 0 14px 24px rgba(124, 91, 217, 0.18);
}

.module-card.is-accent p,
.module-card.is-accent .module-meta,
.module-card.is-accent .module-card-status-text {
  color: #6d5b9c;
}

.module-card.is-accent .module-meta {
  background: rgba(139, 92, 246, 0.1);
}

.module-meta {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  background: rgba(139, 92, 246, 0.1);
  color: #6b55b4;
}

.module-card-status-text {
  max-width: 100%;
  white-space: normal;
  text-align: center;
  overflow-wrap: anywhere;
  word-break: break-word;
  background: rgba(139, 92, 246, 0.1);
  color: #6b55b4;
}

.tab-bar {
  bottom: 16px;
  width: min(calc(100% - 24px), 408px);
  padding: 10px;
  gap: 10px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(205, 191, 241, 0.72);
  box-shadow: 0 18px 46px rgba(95, 72, 150, 0.14);
  z-index: 40;
}

.tab-btn {
  min-height: 58px;
  padding: 8px 6px 10px;
  border-radius: 18px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  color: #7a6a9f;
}

.tab-btn.is-active {
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.16), rgba(255, 255, 255, 0.98));
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.08);
  color: #4f348d;
}

.tab-icon {
  font-size: 1.08rem;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
}

.tab-label {
  font-size: 0.77rem;
  line-height: 1.2;
}

.tab-badge {
  top: 6px;
  right: 10px;
}

@media (max-width: 420px) {
  .dashboard-hero,
  .quick-panel,
  .module-panel {
    padding: 18px;
    border-radius: 24px;
  }

  .dashboard-hero h2 {
    font-size: 1.72rem;
  }

  .quick-action {
    height: 100%;
    padding: 16px 12px 14px;
    gap: 8px;
  }

  .quick-icon {
    width: 54px;
    height: 54px;
  }

  .module-card-head.has-side-action {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .module-card-side-action {
    white-space: normal;
    max-width: 100%;
  }
}

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

  .tab-btn {
    min-height: 54px;
  }
}

.hidden {
  display: none !important;
}

body.body-scroll-lock {
  overflow: hidden;
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -14px, 0);
  }
}

@media (max-width: 360px) {
  .tab-btn {
    font-size: 0.76rem;
  }
}

@media (min-width: 920px) {
  .shell {
    width: min(430px, calc(100% - 40px));
  }
}



.tool-detail-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, rgba(17, 50, 70, 0.98) 0%, rgba(25, 95, 111, 0.94) 58%, rgba(31, 184, 170, 0.88) 100%);
  border: 0;
  box-shadow: 0 26px 56px rgba(17, 50, 70, 0.28);
}

.tool-detail-card::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -42px;
  width: 180px;
  height: 180px;
  border-radius: 42px;
  transform: rotate(18deg);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02));
}

.tool-detail-card .tool-page-title,
.tool-detail-card .tool-subtitle,
.tool-detail-card .tool-detail-description,
.tool-detail-card .tool-route-tag,
.tool-detail-card .tool-feature-pill {
  position: relative;
  z-index: 1;
}

.tool-detail-card .tool-page-title {
  color: #ffffff;
}

.tool-detail-card .tool-subtitle,
.tool-detail-card .tool-detail-description {
  color: rgba(255, 255, 255, 0.86);
}

.tool-detail-card .icon-btn {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.tool-detail-card .tool-route-tag {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.tool-detail-card .tool-feature-pill {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.tool-form-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 251, 0.9));
}

.tool-form-card .field span {
  letter-spacing: 0.04em;
}

.tool-form-card .field textarea {
  min-height: 148px;
}

.tool-form-card .primary-btn-lg {
  font-size: 1rem;
  letter-spacing: 0.06em;
}

.green-bubble-intro {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px 22px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 253, 245, 0.94));
}

.green-bubble-intro-badge {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(145deg, #f0fdf4, #dcfce7);
  box-shadow: 0 18px 34px rgba(16, 185, 129, 0.18);
  font-size: 2rem;
}

.green-bubble-intro h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.36rem;
}

.green-bubble-intro .section-tag {
  margin: 0;
}

.green-bubble-intro-text {
  margin: 0;
  max-width: 18rem;
  color: #166534;
  font-size: 1rem;
  line-height: 1.7;
}

.ai-official-writing-intro {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px 22px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.94));
}

.ai-official-writing-intro-badge {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(145deg, #eff6ff, #dbeafe);
  box-shadow: 0 18px 34px rgba(59, 130, 246, 0.18);
  font-size: 2rem;
}

.ai-official-writing-intro h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.36rem;
}

.ai-official-writing-intro .section-tag {
  margin: 0;
}

.ai-official-writing-intro-text {
  margin: 0;
  max-width: 18rem;
  color: #1e40af;
  font-size: 1rem;
  line-height: 1.7;
}

/* ---- AI Assistant Intro ---- */
/* ---- AI Assistant Chat ---- */

.tool-detail.asa-fullscreen {
  gap: 0;
  padding: 0;
  margin: 0;
  height: var(--asa-viewport-height, 100dvh);
  overflow: hidden;
}

.tool-detail.asa-fullscreen .tool-detail-card {
  height: 100vh;
  height: 100dvh;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.tool-detail.asa-fullscreen .tool-detail-card::after,
.tool-detail.asa-fullscreen .tool-detail-head {
  display: none;
}

html.asa-chat-active,
body.asa-chat-active {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

.asa-chat-wrapper {
  display: block;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  overflow: hidden;
}

.asa-chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--bg, #f1f5f9);
  border-radius: 0;
  overflow: hidden;
}

.asa-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.asa-back-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 8px;
  background: none;
  color: #64748b;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.asa-back-btn:hover {
  background: #f1f5f9;
  color: #334155;
}

.asa-chat-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.asa-chat-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #f0fdf4, #dcfce7);
  font-size: 1.2rem;
}

.asa-chat-header-info {
  display: flex;
  flex-direction: column;
}

.asa-chat-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.asa-chat-status {
  font-size: 0.72rem;
  color: #22c55e;
}

.asa-new-chat-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #64748b;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.asa-new-chat-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

.asa-new-chat-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.asa-chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.asa-chat-messages::-webkit-scrollbar {
  width: 4px;
}

.asa-chat-messages::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.asa-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 60px 20px;
  text-align: center;
}

.asa-welcome-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(145deg, #f0fdf4, #dcfce7);
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.asa-welcome-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

.asa-welcome-desc {
  margin: 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

.asa-msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 88%;
}

.asa-msg--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.asa-msg-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #f0fdf4, #dcfce7);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.asa-msg-avatar--user {
  background: linear-gradient(145deg, #dbeafe, #bfdbfe);
  font-size: 0.75rem;
  color: #3b82f6;
  font-weight: 600;
}

.asa-msg-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.65;
  word-break: break-word;
  white-space: pre-wrap;
}

.asa-msg-bubble--assistant {
  background: #fff;
  color: #1e293b;
  border-top-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.asa-msg-bubble--user {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  border-top-right-radius: 4px;
}

.assistant-richtext {
  display: flex;
  flex-direction: column;
  gap: 10px;
  white-space: normal;
}

.assistant-richtext p,
.assistant-richtext ul,
.assistant-richtext ol,
.assistant-richtext section {
  margin: 0;
}

.assistant-richtext ul,
.assistant-richtext ol {
  padding-left: 1.15rem;
}

.assistant-richtext li + li {
  margin-top: 0.3rem;
}

.assistant-richtext-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.assistant-richtext-heading {
  font-weight: 700;
  color: #0f172a;
}

.assistant-richtext-heading--1 {
  font-size: 1rem;
}

.assistant-richtext-heading--2 {
  font-size: 0.96rem;
}

.assistant-richtext-heading--3,
.assistant-richtext-heading--4 {
  font-size: 0.92rem;
}

.assistant-richtext strong {
  color: #0f172a;
  font-weight: 700;
}

.assistant-richtext em {
  color: #475569;
  font-style: italic;
}

.assistant-richtext code {
  padding: 0.08rem 0.38rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 0.82em;
}

.assistant-richtext-divider {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 0;
}

.asa-typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: #22c55e;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: asa-blink 0.7s step-end infinite;
}

@keyframes asa-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.asa-chat-input-area {
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.asa-input-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.asa-chat-input {
  flex: 1;
  resize: none;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #1e293b;
  background: #f8fafc;
  outline: none;
  font-family: inherit;
  max-height: 120px;
  overflow-y: auto;
  transition: border-color 0.2s;
}

.asa-chat-input:focus {
  border-color: #22c55e;
  background: #fff;
}

.asa-chat-input::placeholder {
  color: #94a3b8;
}

.asa-send-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 12px;
  background: #22c55e;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.asa-send-btn:hover:not(:disabled) {
  background: #16a34a;
  transform: scale(1.05);
}

.asa-send-btn:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}
/* ---- AI News ---- */
.tool-detail.ainw-fullscreen {
  gap: 0;
  padding: 0;
  margin: 0;
}

.tool-detail.ainw-fullscreen .tool-detail-card {
  height: 100vh;
  height: 100dvh;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.tool-detail.ainw-fullscreen .tool-detail-card::after,
.tool-detail.ainw-fullscreen .tool-detail-head {
  display: none;
}

.ainw-wrapper {
  display: block;
  height: 100%;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  overflow: hidden;
}

.ainw-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--bg, #f1f5f9);
  overflow: hidden;
}

.ainw-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.ainw-back-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 8px;
  background: none;
  color: #64748b;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.ainw-back-btn:hover {
  background: #f1f5f9;
  color: #334155;
}

.ainw-header-info {
  display: flex;
  flex-direction: column;
}

.ainw-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.ainw-subtitle {
  font-size: 0.72rem;
  color: #94a3b8;
}

.ainw-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
  justify-content: center;
}

.ainw-tab {
  padding: 6px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #fff;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.ainw-tab:hover {
  border-color: #94a3b8;
  color: #334155;
}

.ainw-tab.is-active {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

.ainw-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px;
  overscroll-behavior: contain;
}

.ainw-list::-webkit-scrollbar {
  width: 4px;
}

.ainw-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.ainw-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: #94a3b8;
  font-size: 0.85rem;
}

.ainw-loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e2e8f0;
  border-top-color: #0f172a;
  border-radius: 50%;
  animation: ainw-spin 0.8s linear infinite;
}

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

.ainw-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #94a3b8;
  font-size: 0.88rem;
}

.ainw-card {
  background: #fff;
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s;
}

.ainw-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ainw-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
}

.ainw-card-tag {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 12px;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
}

.ainw-card-title {
  flex: 1;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ainw-card-arrow {
  flex-shrink: 0;
  color: #94a3b8;
  transition: transform 0.2s;
}

.ainw-card-arrow.is-rotated {
  transform: rotate(180deg);
}

.ainw-card-body {
  padding: 0 16px 16px;
  border-top: 1px solid #f1f5f9;
}

.ainw-card-content {
  margin: 12px 0 0;
  font-size: 0.84rem;
  line-height: 1.75;
  color: #475569;
  white-space: pre-wrap;
}

/* ---- Watermark Removal ---- */
/* ---- Watermark (wm-mode) — Polished Minimalist Redesign ---- */

/* Hide shared tool-detail header */
.wm-mode .tool-hero {
  display: none;
}

.wm-mode .tool-detail-head {
  display: none;
}

.wm-mode {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
}

/* Back Button */
.wm-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.wm-back-link:hover { background: #f1f5f9; color: #334155; }
.wm-back-link:active { background: #e2e8f0; color: #334155; }
.wm-back-link svg { width: 18px; height: 18px; color: #6366f1; }

/* Workspace */
.wm-workspace {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Form Card */
.wm-form-card {
  background: white;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Form Header */
.wm-form-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid #f1f5f9;
}

.wm-form-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #ede9fe;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wm-form-icon svg {
  width: 15px;
  height: 15px;
  color: #7c3aed;
}

.wm-form-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.wm-reupload-btn {
  margin-left: auto;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  flex-shrink: 0;
}
.wm-reupload-btn:hover {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}
.wm-reupload-btn:active {
  background: #e2e8f0;
}
.wm-reupload-btn.hidden {
  display: none;
}

/* Upload Area */
.wm-upload-area {
  position: relative;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  border: 2px dashed #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: #f8fafc;
}

.wm-upload-area:hover {
  border-color: #6366f1;
  background: #fafafa;
}

.wm-upload-area.has-file {
  border-style: solid;
  border-color: #6366f1;
  background: #fafafa;
}

.wm-upload-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}
.wm-upload-label svg {
  width: 18px;
  height: 18px;
  color: #6366f1;
  flex-shrink: 0;
}

.wm-upload-subtitle {
  font-size: 0.78rem;
  color: #94a3b8;
}

.wm-upload-preview {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  object-fit: contain;
}

/* Selection overlay */
.wm-selection-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.wm-selection-hint {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 8px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 0.75rem;
  white-space: nowrap;
  pointer-events: none;
}

.wm-region-box {
  position: absolute;
  border: 2px solid #ef4444;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.15);
  pointer-events: auto;
}

.wm-region-delete {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  cursor: pointer;
  pointer-events: auto;
  border: none;
}
.wm-region-delete:hover { background: #dc2626; }

.wm-live-rect {
  position: absolute;
  border: 2px dashed #3b82f6;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.1);
  pointer-events: none;
}

/* Submit Button */
.wm-submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: inherit;
}
.wm-submit-btn:active { opacity: 0.85; transform: scale(0.985); }
.wm-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Result Section */
.wm-result {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.wm-result-card {
  background: white;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wm-result-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f0fdf4;
  border-radius: 10px;
  border: 1px solid #bbf7d0;
}
.wm-result-header strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
}
.wm-result-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

/* Result Images */
.wm-result-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wm-result-img-box {
  text-align: center;
}

.wm-result-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
}

.wm-result-img-box img {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 10px;
  background: #f8fafc;
  cursor: zoom-in;
}

.ai-poster-intro {
  display: block;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  overflow: hidden;
}

.ai-poster-intro-badge {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: #eef2ff;
  box-shadow: none;
  color: #6366f1;
  font-size: 2rem;
}

.ai-poster-intro h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.36rem;
}

.ai-poster-intro .section-tag {
  margin: 0;
}

.ai-poster-intro-text {
  margin: 0;
  max-width: 18rem;
  color: #64748b;
  font-size: 1rem;
  line-height: 1.7;
}

/* ---- AI Poster Feature ---- */
.poster-mode .tool-hero {
  display: none;
}

.poster-mode .tool-detail-head {
  display: none;
}

.poster-mode {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
}

.poster-root {
  display: block;
  padding: 0;
  text-align: left;
  background: transparent;
}

.poster-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#aiAssistantIntro.poster-shell {
  position: fixed;
  inset: 0;
  z-index: 30;
  height: var(--asa-viewport-height, 100dvh);
  min-height: var(--asa-viewport-height, 100dvh);
  overflow: hidden;
  gap: 0;
  padding: max(env(safe-area-inset-top, 0px), 10px) 12px max(env(safe-area-inset-bottom, 0px), 12px);
  box-sizing: border-box;
  background:
    radial-gradient(circle at 12% 14%, rgba(221, 214, 254, 0.8), transparent 24%),
    radial-gradient(circle at 88% 10%, rgba(196, 242, 255, 0.72), transparent 22%),
    linear-gradient(180deg, #f8fbff 0%, #eef6ff 48%, #f4f8ff 100%);
}

#aiAssistantIntro.poster-shell .asa-chat-container {
  flex: 1;
  min-height: 0;
  border-radius: 26px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

.poster-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-bottom: 10px;
}

.poster-back-link svg {
  width: 18px;
  height: 18px;
}

.poster-back-link:hover {
  background: #f1f5f9;
  color: #334155;
}

.poster-back-link:active {
  background: #e2e8f0;
}

.poster-back-link svg {
  color: #6366f1;
}

.poster-compose,
.poster-result {
  display: block;
}

.poster-form-card,
.poster-result-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.poster-form-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 2px;
}

.poster-form-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #6366f1;
  background: #eef2ff;
  box-shadow: none;
}

.poster-form-icon svg {
  width: 18px;
  height: 18px;
}

.poster-form-copy h3 {
  margin: 0;
  font-size: 1rem;
  color: #1e293b;
}

.poster-form-copy p {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.6;
}

.poster-field {
  margin-bottom: 18px;
}

.poster-label {
  display: block;
  margin-bottom: 10px;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 600;
}

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

.poster-choice-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.poster-choice-btn strong {
  font-size: 0.82rem;
  font-weight: 700;
}

.poster-choice-btn small {
  font-size: 0.72rem;
  line-height: 1.5;
  color: #94a3b8;
}

.poster-choice-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.poster-choice-btn.is-active {
  border-color: #c7d2fe;
  background: #eef2ff;
  box-shadow: none;
}

.poster-choice-btn.is-active strong {
  color: #6366f1;
}

.poster-step-card {
  padding: 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.poster-step-card + .poster-step-card {
  margin-top: 16px;
}

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

.poster-step-copy h4 {
  margin: 4px 0 0;
  color: #1e293b;
  font-size: 0.95rem;
}

.poster-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
}

.poster-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 10px;
  background: #eef2ff;
  color: #6366f1;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  border: none;
}

.poster-input-wrap input,
.poster-textarea-wrap textarea {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  color: #334155;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.poster-input-wrap input {
  min-height: 42px;
  padding: 10px 12px;
}

.poster-textarea-wrap textarea {
  min-height: 112px;
  padding: 12px;
  resize: vertical;
  line-height: 1.6;
}

.poster-input-wrap input:focus,
.poster-textarea-wrap textarea:focus {
  outline: none;
  border-color: #c7d2fe;
  box-shadow: none;
  background: #fff;
}

.poster-expand-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.poster-expand-btn {
  min-width: 112px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.poster-expand-btn:hover:not(:disabled) {
  background: #f8fafc;
  color: #334155;
}

.poster-expand-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.poster-field-hint {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.65;
}

.poster-upload-shell {
  position: relative;
}

.poster-upload-shell input[type="file"] {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  cursor: pointer;
}

.poster-upload-placeholder,
.poster-upload-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  min-height: 176px;
  padding: 18px;
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.poster-upload-placeholder {
  border: 1px dashed #cbd5e1;
}

.poster-upload-placeholder span {
  font-size: 1.8rem;
}

.poster-upload-placeholder p,
.poster-upload-placeholder small {
  margin: 0;
  text-align: center;
}

.poster-upload-placeholder p {
  color: #334155;
  font-size: 0.92rem;
  font-weight: 600;
}

.poster-upload-placeholder small {
  color: #64748b;
  font-size: 0.8rem;
}

.poster-upload-shell:hover .poster-upload-placeholder {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.poster-upload-preview {
  border: 1px solid #e2e8f0;
}

.poster-upload-image {
  display: block;
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 14px;
}

.poster-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  margin-top: 20px;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  background: #6366f1;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
  transition: all 0.2s;
}

.poster-btn-primary:hover:not(:disabled) {
  opacity: 0.92;
}

.poster-btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.poster-btn-primary--inline {
  width: auto;
  min-width: 168px;
  margin-top: 0;
}

.poster-message {
  margin-top: 14px;
}

.poster-support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 16px;
  margin-top: 20px;
}

.poster-support-card,
.poster-block {
  padding: 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.poster-support-head,
.poster-block-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.poster-support-icon,
.poster-block-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.poster-support-icon svg,
.poster-block-icon svg {
  width: 16px;
  height: 16px;
}

.poster-support-icon--summary,
.poster-block-icon--image {
  background: #eef2ff;
  color: #6366f1;
}

.poster-support-icon--notice,
.poster-block-icon--notice {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.poster-support-copy h4,
.poster-block-title h4 {
  margin: 4px 0 0;
  color: #1e293b;
  font-size: 0.95rem;
}

.poster-preview-body {
  display: grid;
  gap: 10px;
  min-height: 92px;
}

.poster-summary-grid {
  margin-top: 14px;
}

.poster-summary-grid strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poster-flow-list {
  display: grid;
  gap: 10px;
}

.poster-flow-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.poster-flow-item strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #eef2ff;
  color: #6366f1;
  font-size: 0.82rem;
}

.poster-flow-item p {
  margin: 2px 0 0;
  color: #475569;
  font-size: 0.88rem;
  line-height: 1.65;
}

.poster-result-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.poster-result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.poster-result-status {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.poster-result-status-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 999px;
  background: #6366f1;
  box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.12);
}

.poster-result-status-copy strong {
  display: block;
  color: #0f172a;
  font-size: 1rem;
}

.poster-result-status-copy span {
  display: block;
  margin-top: 4px;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.7;
}

.poster-result-meta-grid {
  margin: 0;
}

.poster-block-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.poster-result-image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding: 18px;
  border-radius: 12px;
  background: #fff;
  border: 1px dashed #e2e8f0;
}

.poster-result-img {
  display: block;
  max-width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.poster-result-note {
  margin: 0;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.8;
}

.poster-result-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.poster-result-actions .ow-secondary-btn {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 10px;
}

@media (max-width: 900px) {
  .poster-support-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .poster-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .poster-form-card,
  .poster-result-card {
    padding: 18px;
    border-radius: 22px;
  }
}

@media (max-width: 640px) {
  .poster-expand-row {
    grid-template-columns: 1fr;
  }

  .poster-expand-btn {
    width: 100%;
  }

  .poster-result-header {
    flex-direction: column;
  }

  .poster-result-actions {
    justify-content: stretch;
  }

  .poster-btn-primary--inline,
  .poster-result-actions .ow-secondary-btn {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .poster-choice-grid {
    grid-template-columns: 1fr;
  }

  .poster-form-header,
  .poster-step-head {
    flex-direction: column;
  }
}

.ow-mode .tool-hero {
  display: none;
}

.ow-mode .tool-detail-head {
  display: none;
}

.ow-mode {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
}

.ow-root {
  display: block;
  padding: 0;
  text-align: left;
  background: transparent;
}

.ow-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ow-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.ow-back-link:hover {
  background: #f1f5f9;
  color: #334155;
}

.ow-back-link:active {
  background: #e2e8f0;
}

.ow-back-link svg {
  width: 18px;
  height: 18px;
  color: #6366f1;
}

.ow-form-card,
.ow-result-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ow-form-header,
.ow-step-head,
.ow-support-head,
.ow-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ow-form-header {
  margin-bottom: 2px;
}

.ow-form-icon,
.ow-support-icon,
.ow-block-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ow-form-icon {
  background: #eef2ff;
  color: #6366f1;
}

.ow-form-copy,
.ow-step-copy,
.ow-support-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ow-form-copy h3,
.ow-step-copy h4,
.ow-support-copy h4,
.ow-block-title h4 {
  margin: 0;
  color: #1e293b;
}

.ow-form-copy h3 {
  font-size: 1rem;
}

.ow-form-copy p {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.6;
}

.ow-kicker {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
}

.ow-chip {
  padding: 3px 10px;
  border-radius: 10px;
  background: #eef2ff;
  color: #6366f1;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.ow-field,
.ow-step-card,
.ow-support-card,
.ow-topic-display,
.ow-confirmed-topic,
.ow-article-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ow-step-card,
.ow-support-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
}

.ow-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
}

.ow-textarea-wrap textarea,
.ow-input-wrap input {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  font-size: 0.85rem;
  color: #334155;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
  transition: all 0.2s;
  line-height: 1.6;
}

.ow-input-wrap input {
  min-height: 44px;
}

.ow-textarea-wrap textarea:focus,
.ow-input-wrap input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: #ffffff;
}

.ow-input-wrap input.is-active {
  border-color: #6366f1;
  background: #eef2ff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.ow-field-hint,
.ow-result-note {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.7;
  color: #94a3b8;
}

.ow-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ow-choice-btn {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ow-choice-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.ow-choice-btn strong {
  font-size: 0.82rem;
  color: #1e293b;
}

.ow-choice-btn small {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.5;
}

.ow-choice-btn.is-active {
  background: #6366f1;
  color: #ffffff;
  border-color: #6366f1;
}

.ow-choice-btn.is-active strong,
.ow-choice-btn.is-active small {
  color: #ffffff;
}

.ow-btn-primary,
.ow-btn-secondary,
.ow-copy-btn {
  min-height: 42px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.ow-btn-primary {
  width: 100%;
  padding: 12px 14px;
  background: #6366f1;
  color: #ffffff;
  border: none;
}

.ow-btn-primary:hover:not(:disabled) {
  opacity: 0.92;
}

.ow-btn-primary--inline {
  width: auto;
  min-width: 128px;
}

.ow-btn-secondary {
  flex: 1;
  padding: 0 14px;
  background: #ffffff;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.ow-btn-secondary:hover:not(:disabled),
.ow-copy-btn:hover:not(:disabled) {
  background: #f8fafc;
  color: #334155;
}

.ow-copy-btn {
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  white-space: nowrap;
}

.ow-btn-primary:disabled,
.ow-btn-secondary:disabled,
.ow-copy-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ow-inline-actions {
  display: flex;
  gap: 10px;
}

.ow-topic-display {
  padding: 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.ow-topic-card strong,
.ow-confirmed-topic-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  color: #64748b;
}

.ow-topic-card p,
.ow-confirmed-topic-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #1e293b;
  font-weight: 700;
}

.ow-confirmed-topic-card {
  padding: 12px;
  border-radius: 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.ow-confirmed-topic-card strong {
  color: #16a34a;
}

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

.ow-support-icon--summary {
  background: #eef2ff;
  color: #6366f1;
}

.ow-support-icon--notice,
.ow-block-icon--notice {
  background: #fce7f3;
  color: #db2777;
}

.ow-block-icon--topic {
  background: #fef3c7;
  color: #d97706;
}

.ow-block-icon--article {
  background: #e0f2fe;
  color: #0284c7;
}

.ow-preview-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.ow-summary-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.ow-summary-grid span {
  font-size: 0.72rem;
  color: #94a3b8;
}

.ow-summary-grid strong {
  font-size: 0.82rem;
  color: #1e293b;
  line-height: 1.5;
  word-break: break-word;
}

.ow-flow-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ow-flow-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.ow-flow-item strong {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #eef2ff;
  color: #6366f1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.72rem;
}

.ow-flow-item p {
  margin: 0;
  color: #475569;
  font-size: 0.78rem;
  line-height: 1.6;
}

.ow-empty-box {
  text-align: center;
  padding: 24px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.ow-empty-box strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: #64748b;
}

.ow-empty-box p {
  margin: 0;
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.6;
}

.ow-empty-box.is-failed {
  background: #fef2f2;
  border-color: #fecaca;
}

.ow-empty-box.is-failed strong {
  color: #dc2626;
}

.ow-link-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.ow-link-card span {
  font-size: 0.72rem;
  color: #94a3b8;
}

.ow-link-card strong {
  font-size: 0.82rem;
  color: #1e293b;
  line-height: 1.5;
  word-break: break-word;
}

.ow-result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: #f0fdf4;
  border-radius: 10px;
  border: 1px solid #bbf7d0;
}

.ow-result-header.is-pending {
  background: #fffbeb;
  border-color: #fde68a;
}

.ow-result-header.is-failed {
  background: #fef2f2;
  border-color: #fecaca;
}

.ow-result-status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ow-result-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  margin-top: 6px;
  flex-shrink: 0;
}

.ow-result-header.is-pending .ow-result-status-dot {
  background: #d97706;
}

.ow-result-header.is-failed .ow-result-status-dot {
  background: #dc2626;
}

.ow-result-status-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ow-result-status-copy strong {
  font-size: 0.86rem;
  color: #1e293b;
}

.ow-result-status-copy span {
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.5;
}

.ow-result-badge {
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.ow-result-badge.is-success {
  background: #dcfce7;
  color: #16a34a;
}

.ow-result-badge.is-pending {
  background: #fef3c7;
  color: #d97706;
}

.ow-result-badge.is-failed {
  background: #fee2e2;
  color: #dc2626;
}

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

.ow-block {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ow-block-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ow-topic-result,
.ow-article-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ow-article-text {
  padding: 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.85rem;
  line-height: 1.8;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 560px;
  overflow-y: auto;
}

.ow-step-card .message {
  margin: 0;
}

@media (max-width: 768px) {
  .ow-choice-grid,
  .ow-support-grid,
  .ow-result-meta-grid {
    grid-template-columns: 1fr;
  }

  .ow-inline-actions {
    flex-direction: column;
  }

  .ow-btn-primary--inline,
  .ow-btn-secondary,
  .ow-copy-btn {
    width: 100%;
  }

  .ow-block-head,
  .ow-result-header {
    flex-direction: column;
    align-items: stretch;
  }
}

.note-clone-result {
  padding: 0;
  display: grid;
  justify-items: center;
  gap: 18px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.result-hero,
.result-meta-grid,
.result-block {
  width: 100%;
}

.result-hero {
  position: relative;
  overflow: hidden;
  padding: 24px 20px;
  border-radius: 28px;
  background: linear-gradient(145deg, #14394c 0%, #1c6978 54%, #79d5c6 100%);
  color: #ffffff;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 14px;
  box-shadow: 0 24px 52px rgba(20, 57, 76, 0.24);
}

.result-hero::after {
  content: "";
  position: absolute;
  right: -42px;
  top: -34px;
  width: 170px;
  height: 170px;
  border-radius: 38px;
  transform: rotate(18deg);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.03));
}

.result-hero > * {
  position: relative;
  z-index: 1;
}

.result-hero-copy {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.result-hero-text,
.result-gallery-tip {
  margin: 0;
  line-height: 1.7;
}

.result-hero-text {
  max-width: 28ch;
  color: rgba(255, 255, 255, 0.84);
}

.result-reset-btn {
  min-width: 108px;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.result-block-head,
.result-image-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.result-block-head-single {
  justify-content: center;
}

.result-block-head-single h4 {
  text-align: center;
}

.result-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
  padding: 0;
}

.result-meta-card,
.result-block {
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 248, 0.92));
  border: 1px solid rgba(16, 33, 45, 0.08);
  box-shadow: var(--shadow-soft);
}

.result-meta-card {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
}

.result-meta-card-accent {
  background: linear-gradient(145deg, rgba(20, 57, 76, 0.96), rgba(31, 184, 170, 0.88));
  border-color: transparent;
}

.result-meta-card span {
  font-size: 0.82rem;
  color: var(--ink-700);
}

.result-meta-card strong {
  font-size: 1.08rem;
  color: var(--ink-950);
  line-height: 1.35;
  word-break: break-word;
}

.result-meta-card-accent span,
.result-meta-card-accent strong {
  color: #ffffff;
}

.result-gallery-tip {
  color: var(--ink-700);
  text-align: center;
}

.result-block {
  display: grid;
  gap: 14px;
}

.result-copy-block {
  position: relative;
  overflow: hidden;
}

.result-copy-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(31, 184, 170, 0.06), transparent 42%);
  pointer-events: none;
}

.result-copy-block > * {
  position: relative;
  z-index: 1;
}

.copy-btn,
.result-download-btn {
  min-height: 42px;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 700;
}

.copy-btn {
  background: rgba(16, 33, 45, 0.06);
}

.result-copy-text,
.result-rich-text,
.result-empty {
  margin: 0;
  padding: 16px;
  border-radius: 18px;
  background: rgba(16, 33, 45, 0.04);
  border: 1px solid rgba(16, 33, 45, 0.06);
  color: var(--ink-900);
  line-height: 1.7;
}

.result-copy-text {
  font-size: 1rem;
  font-weight: 700;
}

.result-rich-text {
  white-space: normal;
  word-break: break-word;
}

.result-empty {
  text-align: center;
  color: var(--ink-700);
}

.result-gallery-block {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 245, 247, 0.94));
}

.result-image-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.result-image-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 250, 0.94));
  border: 1px solid rgba(16, 33, 45, 0.06);
}

.result-image-index {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(31, 184, 170, 0.12);
  color: #0d6e66;
  font-size: 0.8rem;
  font-weight: 700;
}

.result-image-tip {
  font-size: 0.82rem;
  color: var(--ink-700);
}

.result-image-link {
  display: block;
  padding: 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(16, 33, 45, 0.05), rgba(16, 33, 45, 0.02));
}

.result-image-card img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(16, 33, 45, 0.06);
}

.result-download-btn {
  display: grid;
  place-items: center;
  text-decoration: none;
  color: #ffffff;
  background: linear-gradient(135deg, #14394c 0%, #1fb8aa 100%);
  border: 0;
}

/* ---- Compliance Check — Polished Minimalist Redesign ---- */

/* Hide shared tool-detail header when compliance is active */
.cc-mode .tool-hero {
  display: none;
}

.cc-mode .tool-detail-head {
  display: none;
}

.cc-mode {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
}

/* Back Button */
.cc-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  border-radius: 10px;
  margin-bottom: 10px;
  transition: all 0.2s;
}

.cc-back-link:active { background: #e2e8f0; color: #334155; }

.cc-back-link svg {
  width: 18px;
  height: 18px;
  color: #6366f1;
}

/* Form Card */
.cc-form-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 16px;
}

.cc-form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}

.cc-textarea-wrap {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.2s;
}

.cc-textarea-wrap:focus-within {
  border-color: #6366f1;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.cc-textarea-wrap textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #1e293b;
  font-size: 0.88rem;
  padding: 14px;
  font-family: inherit;
  resize: none;
  min-height: 180px;
  line-height: 1.7;
  border-radius: 10px;
}

.cc-textarea-wrap textarea::placeholder { color: #94a3b8; }

.cc-form-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.cc-char-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
}

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

.cc-btn-ghost {
  flex: 1;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  transition: all 0.2s;
}

.cc-btn-ghost:active { background: #e2e8f0; }

.cc-btn-primary {
  flex: 1.4;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border: none;
  color: white;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}

.cc-btn-primary:active { opacity: 0.85; transform: scale(0.985); }
.cc-btn-primary:disabled { opacity: 0.5; cursor: wait; transform: none; }

/* ---- Result Section ---- */

.cc-result {
  padding: 0 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* Result Header */
.cc-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.cc-result-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cc-result-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.cc-result[data-level="中风险"] .cc-result-status-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.cc-result[data-level="高风险"] .cc-result-status-dot {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.cc-result-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
}

.cc-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}

.cc-reset-btn:active { background: #e2e8f0; color: #334155; }
.cc-reset-btn svg { flex-shrink: 0; }

/* Summary */
.cc-summary {
  font-size: 0.82rem;
  line-height: 1.65;
  color: #64748b;
  margin: 0;
  padding: 0 2px;
}

/* ---- Score Grid ---- */

.cc-score-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 8px;
}

.cc-score-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.cc-score-main {
  background: linear-gradient(135deg, #14394c 0%, #1fb8aa 100%);
  border-color: transparent;
}

.cc-result[data-level="中风险"] .cc-score-main {
  background: linear-gradient(135deg, #92400e, #f59e0b);
}

.cc-result[data-level="高风险"] .cc-score-main {
  background: linear-gradient(135deg, #7f1d1d, #ef4444);
}

.cc-score-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cc-score-main .cc-score-label { color: rgba(255, 255, 255, 0.75); }

.cc-score-card strong {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  color: #1e293b;
}

.cc-score-main strong { color: #ffffff; }

.cc-score-card em,
.cc-score-unit {
  font-style: normal;
  font-size: 0.72rem;
  color: #94a3b8;
}

.cc-score-main em,
.cc-score-main .cc-score-unit { color: rgba(255, 255, 255, 0.7); }

/* ---- Content Blocks ---- */

.cc-block {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
}

.cc-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cc-block-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cc-block-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cc-block-icon--risk {
  background: #fef2f2;
  color: #ef4444;
}

.cc-block-icon--preview {
  background: #f0f0ff;
  color: #6366f1;
}

.cc-block-icon--rewrite {
  background: #f0fdf4;
  color: #22c55e;
}

.cc-block-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

/* ---- Copy Button ---- */

.cc-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.cc-copy-btn:active { background: rgba(99, 102, 241, 0.14); }
.cc-copy-btn svg { flex-shrink: 0; }

/* ---- Risk List ---- */

.cc-risk-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.compliance-risk-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.compliance-risk-card-high {
  border-color: rgba(239, 68, 68, 0.2);
  background: #fff5f5;
}

.compliance-risk-card-medium {
  border-color: rgba(245, 158, 11, 0.2);
  background: #fffbeb;
}

.compliance-risk-card-safe,
.compliance-risk-card-low {
  border-color: rgba(34, 197, 94, 0.15);
  background: #f0fdf4;
}

.compliance-risk-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.compliance-risk-card-head h4,
.compliance-risk-card-head p,
.compliance-risk-copy p,
.compliance-risk-index,
.cc-preview {
  margin: 0;
}

.compliance-risk-index {
  margin-bottom: 4px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
}

.compliance-risk-card-head h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
}

.compliance-risk-badge {
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.compliance-risk-badge.is-high {
  background: #fef2f2;
  color: #dc2626;
}

.compliance-risk-badge.is-medium {
  background: #fffbeb;
  color: #d97706;
}

.compliance-risk-badge.is-low {
  background: #f0fdf4;
  color: #16a34a;
}

.compliance-risk-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.compliance-term-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 600;
}

.compliance-risk-copy {
  display: grid;
  gap: 8px;
  line-height: 1.7;
  color: #475569;
  font-size: 0.82rem;
}

.compliance-risk-copy strong {
  color: #334155;
}

/* ---- Preview ---- */

.cc-preview {
  padding: 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  line-height: 1.9;
  color: #475569;
  font-size: 0.85rem;
  word-break: break-word;
  white-space: pre-wrap;
}

.risk-highlight {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  font-weight: 700;
}

/* ---- Rewrite Section ---- */

.cc-rewrite-block {
  border-color: rgba(34, 197, 94, 0.15);
}

.cc-rewrite-text {
  min-height: 120px;
  background: #f0fdf4;
  border-color: rgba(34, 197, 94, 0.12);
}

/* ---- Action Footer ---- */

.cc-action-footer {
  padding-top: 4px;
}

.cc-btn-gradient {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  transition: all 0.2s;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cc-btn-gradient:active { opacity: 0.85; transform: scale(0.985); }
.cc-btn-gradient:disabled { opacity: 0.5; cursor: wait; transform: none; }
.cc-btn-gradient svg { flex-shrink: 0; }

/* ---- Responsive ---- */

@media (max-width: 380px) {
  .cc-score-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cc-score-grid .cc-score-card:first-child {
    grid-column: 1 / -1;
  }

  .cc-action-row {
    flex-direction: column;
  }
}

@media (max-width: 380px) {
  .result-block-head,
  .result-image-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0;
    padding: 0;
  }

  .result-meta-card-accent {
    grid-column: 1 / -1;
  }
}







.result-meta-grid {
  align-items: stretch;
}

.result-meta-card,
.result-block {
  position: relative;
  overflow: hidden;
  box-shadow:
    0 22px 42px rgba(16, 33, 45, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.result-meta-card::before,
.result-block::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.result-meta-card::before {
  right: -18px;
  top: -18px;
  width: 90px;
  height: 90px;
  border-radius: 26px;
  transform: rotate(16deg);
  background: linear-gradient(145deg, rgba(31, 184, 170, 0.18), rgba(255, 255, 255, 0.04));
}

.result-meta-card:nth-child(2)::before {
  background: linear-gradient(145deg, rgba(255, 187, 97, 0.22), rgba(255, 255, 255, 0.04));
}

.result-meta-card:nth-child(3)::before {
  background: linear-gradient(145deg, rgba(255, 144, 124, 0.22), rgba(255, 255, 255, 0.04));
}

.result-meta-card span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.result-meta-card span::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: none;
  box-shadow: 0 0 0 5px rgba(31, 184, 170, 0.12);
  background: linear-gradient(135deg, #1fb8aa, #79d5c6);
}

.result-meta-card:nth-child(2) span::before {
  box-shadow: 0 0 0 5px rgba(255, 187, 97, 0.14);
  background: linear-gradient(135deg, #ffbb61, #ffd69a);
}

.result-meta-card:nth-child(3) span::before {
  box-shadow: 0 0 0 5px rgba(255, 144, 124, 0.14);
  background: linear-gradient(135deg, #ff907c, #ffc1b4);
}

.result-meta-card strong {
  position: relative;
  z-index: 1;
}

.result-meta-card-accent {
  box-shadow:
    0 22px 42px rgba(20, 57, 76, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.result-block {
  padding: 18px;
  gap: 16px;
}

.result-block::after {
  right: -28px;
  bottom: -28px;
  width: 120px;
  height: 120px;
  border-radius: 34px;
  transform: rotate(18deg);
  background: linear-gradient(145deg, rgba(16, 33, 45, 0.05), rgba(255, 255, 255, 0.02));
}

.result-copy-block:nth-of-type(1)::after {
  background: linear-gradient(145deg, rgba(31, 184, 170, 0.14), rgba(255, 255, 255, 0.02));
}

.result-copy-block:nth-of-type(2)::after {
  background: linear-gradient(145deg, rgba(255, 187, 97, 0.16), rgba(255, 255, 255, 0.02));
}

.result-gallery-block::after {
  background: linear-gradient(145deg, rgba(255, 144, 124, 0.16), rgba(255, 255, 255, 0.02));
}

.result-block-head,
.result-block-head-single {
  align-items: center;
}

.result-block-head-single {
  justify-content: flex-start;
}

.result-block-head-single h4 {
  text-align: left;
}

.result-block-head h4,
.result-block-head-single h4 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.04rem;
  letter-spacing: 0.02em;
}

.result-block-head h4::before,
.result-block-head-single h4::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 12px;
  flex: none;
  box-shadow: 0 12px 22px rgba(16, 33, 45, 0.14);
}

.result-copy-block:nth-of-type(1) .result-block-head h4::before {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.06)),
    linear-gradient(145deg, #1fb8aa, #0f6a83);
}

.result-copy-block:nth-of-type(2) .result-block-head h4::before {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.06)),
    linear-gradient(145deg, #ffbb61, #c77224);
}

.result-gallery-block .result-block-head-single h4::before {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.06)),
    linear-gradient(145deg, #ff907c, #a1465c);
}

.result-copy-text,
.result-rich-text,
.result-empty,
.result-image-card {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 14px 24px rgba(16, 33, 45, 0.08);
}

.result-copy-text,
.result-rich-text {
  position: relative;
  z-index: 1;
}

.result-gallery-tip {
  text-align: left;
}

.result-gallery-block {
  background:
    radial-gradient(circle at top right, rgba(255, 144, 124, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 245, 247, 0.94));
}

.result-image-card {
  position: relative;
}

.result-image-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.result-switch {
  width: 100%;
  max-width: 276px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.result-switch-btn {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.84);
  font-weight: 700;
}

.result-switch-btn.is-active {
  background: rgba(255, 255, 255, 0.92);
  color: #14394c;
  box-shadow: 0 14px 24px rgba(16, 33, 45, 0.14);
}

.result-switch-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.result-empty-warning {
  background: linear-gradient(180deg, rgba(255, 244, 231, 0.92), rgba(255, 250, 243, 0.96));
  border-color: rgba(199, 114, 36, 0.14);
  color: #8e5721;
}

/* ============================================
   Note Clone — Polished Minimalist Redesign
   Scoped to #noteCloneForm and #noteCloneResult
   to avoid affecting benchmark analysis styles.
   ============================================ */

.nc-mode .tool-hero {
  display: none;
}

.nc-mode .tool-detail-head {
  display: none;
}

.nc-mode {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
}

/* ---- Back Button ---- */

.nc-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  border-radius: 10px;
  margin-bottom: 10px;
  transition: all 0.2s;
}

.nc-back-link:active {
  background: #e2e8f0;
  color: #334155;
}

.nc-back-link svg {
  width: 18px;
  height: 18px;
  color: #6366f1;
}

/* ---- Form Page ---- */

#noteCloneForm.tool-form {
  padding: 0 12px 20px;
  border: 0;
  box-shadow: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Form Card */
.nc-form-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 16px;
}

.nc-form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}

.nc-textarea-wrap {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.2s;
}

.nc-textarea-wrap:focus-within {
  border-color: #6366f1;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#noteCloneForm textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #1e293b;
  font-size: 0.88rem;
  padding: 14px 14px;
  font-family: inherit;
  resize: none;
  min-height: 52px;
  max-height: 120px;
  line-height: 1.5;
  border-radius: 10px;
}

#noteCloneForm textarea::placeholder { color: #94a3b8; }

.nc-hint {
  margin-top: 8px;
  font-size: 0.72rem;
  color: #94a3b8;
}

.nc-submit-btn {
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}

.nc-submit-btn:active { opacity: 0.85; transform: scale(0.985); }
.nc-submit-btn:disabled { opacity: 0.5; cursor: wait; transform: none; }

/* ---- Result Section ---- */

.nc-result {
  padding: 0 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* Result Header */
.nc-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.nc-result-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nc-result-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.nc-result-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
}

.nc-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}

.nc-reset-btn:active {
  background: #e2e8f0;
  color: #334155;
}

.nc-reset-btn svg {
  flex-shrink: 0;
}

/* ---- Tabs ---- */

.nc-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}

.nc-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.25s ease;
  border: none;
  background: transparent;
  font-family: inherit;
  user-select: none;
}

.nc-tab.active {
  background: #ffffff;
  color: #6366f1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.nc-tab:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* ---- Meta Row ---- */

.nc-meta-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.nc-meta-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nc-meta-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f0f0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6366f1;
  flex-shrink: 0;
}

.nc-meta-icon--like {
  background: #fef2f2;
  color: #ef4444;
}

.nc-meta-icon--image {
  background: #f0fdf4;
  color: #22c55e;
}

.nc-meta-info {
  flex: 1;
  min-width: 0;
}

.nc-meta-value {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nc-meta-label {
  font-size: 0.68rem;
  color: #94a3b8;
}

/* ---- Content Blocks ---- */

.nc-block {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  transition: border-color 0.2s;
}

.nc-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.nc-block-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.nc-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.nc-copy-btn:active {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(99, 102, 241, 0.25);
}

.nc-copy-btn svg {
  flex-shrink: 0;
}

.nc-title-text {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.6;
  color: #1e293b;
}

.nc-body-text {
  font-size: 0.88rem;
  line-height: 1.85;
  color: #475569;
  white-space: pre-wrap;
  word-break: break-word;
}

.nc-empty {
  text-align: center;
  color: #94a3b8;
  font-size: 0.82rem;
  padding: 24px 0;
}

/* ---- Image Grid ---- */

.nc-image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.nc-image-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s;
}

.nc-image-card:active {
  transform: scale(0.97);
}

.nc-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nc-image-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.nc-image-dl {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: none;
  border-radius: 8px;
  color: #475569;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s;
}

.nc-image-dl:active {
  background: #ffffff;
  color: #6366f1;
  transform: scale(0.9);
}

/* ---- Action Row ---- */

.nc-action-row {
  display: flex;
  gap: 10px;
  padding-top: 4px;
}

.nc-btn {
  flex: 1;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: all 0.2s;
  border: none;
  letter-spacing: 0.3px;
}

.nc-btn:active { opacity: 0.85; transform: scale(0.985); }
.nc-btn:disabled { opacity: 0.5; cursor: wait; transform: none; }

.nc-btn-outline {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
}

.nc-btn-gradient {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nc-btn-gradient svg {
  flex-shrink: 0;
}

/* ---- Responsive ---- */

@media (max-width: 380px) {
  .nc-meta-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .nc-hero {
    padding: 20px 16px;
  }

  .nc-hero-title {
    font-size: 1.1rem;
  }
}

.tool-form-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: -2px;
}

.tool-char-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(16, 33, 45, 0.06);
  color: var(--ink-700);
  font-size: 0.82rem;
  font-weight: 700;
}

.tool-action-row {
  display: grid;
  grid-template-columns: minmax(104px, auto) 1fr;
  gap: 12px;
  align-items: stretch;
}

.tool-clear-btn {
  min-width: 108px;
}



/* ---- Note Diagnosis — Polished Minimalist Redesign ---- */

/* Hide shared tool-detail header when note diagnosis is active */
.nd-mode .tool-hero {
  display: none;
}

.nd-mode .tool-detail-head {
  display: none;
}

.nd-mode {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
}

/* Back Button */
.nd-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.nd-back-link:hover {
  background: #f1f5f9;
  color: #334155;
}

.nd-back-link:active {
  background: #e2e8f0;
  color: #334155;
}

.nd-back-link svg {
  width: 18px;
  height: 18px;
  color: #6366f1;
}

/* Form Card */
.nd-form-card {
  background: white;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid #e2e8f0;
}

.nd-form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

.nd-textarea-wrap textarea {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  font-size: 0.85rem;
  color: #334155;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  min-height: 120px;
  transition: all 0.2s;
  line-height: 1.6;
}

.nd-textarea-wrap textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: white;
}

.nd-textarea-wrap textarea::placeholder {
  color: #94a3b8;
}

.nd-form-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
  margin-bottom: 10px;
}

.nd-char-count {
  font-size: 0.7rem;
  color: #94a3b8;
}

.nd-btn-primary {
  width: 100%;
  padding: 12px;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.nd-btn-primary:hover {
  opacity: 0.9;
}

.nd-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Result */
.nd-result {
  display: grid;
  gap: 14px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.nd-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

.nd-result-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nd-result-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
}

.nd-result-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #334155;
}

.nd-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.nd-reset-btn:hover {
  background: #f1f5f9;
  color: #334155;
}

.nd-reset-btn svg {
  color: #6366f1;
}

.nd-summary {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

/* Score Grid */
.nd-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.nd-score-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.nd-score-main {
  background: #6366f1;
  border-color: #6366f1;
}

.nd-score-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
}

.nd-score-main .nd-score-label {
  color: rgba(255, 255, 255, 0.8);
}

.nd-score-card strong {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1;
}

.nd-score-main strong {
  color: white;
}

.nd-score-card em,
.nd-score-unit {
  font-style: normal;
  font-size: 0.68rem;
  color: #94a3b8;
}

.nd-score-main em,
.nd-score-main .nd-score-unit {
  color: rgba(255, 255, 255, 0.7);
}

/* Blocks */
.nd-block {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
}

.nd-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.nd-block-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nd-block-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nd-block-icon--issue {
  background: #fef3c7;
  color: #92400e;
}

.nd-block-icon--pain {
  background: #fee2e2;
  color: #991b1b;
}

.nd-block-icon--rewrite {
  background: #ede9fe;
  color: #6366f1;
}

.nd-block-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

.nd-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.nd-copy-btn:hover {
  background: #f1f5f9;
  color: #334155;
}

.nd-copy-btn svg {
  color: #6366f1;
}

/* Issue List */
.nd-issue-list {
  display: grid;
  gap: 10px;
}

.diagnosis-issue-card {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: white;
  display: grid;
  gap: 10px;
}

.diagnosis-issue-card-high {
  border-color: #fecaca;
  background: #fff5f5;
}

.diagnosis-issue-card-medium {
  border-color: #fed7aa;
  background: #fffbf5;
}

.diagnosis-issue-card-safe,
.diagnosis-issue-card-low {
  border-color: #a7f3d0;
  background: #f0fdf4;
}

.diagnosis-issue-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.diagnosis-issue-head h4,
.diagnosis-issue-head p,
.diagnosis-issue-copy p,
.diagnosis-issue-index {
  margin: 0;
}

.diagnosis-issue-index {
  font-size: 0.7rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.03em;
}

.diagnosis-issue-head h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

.diagnosis-issue-badge {
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.diagnosis-issue-badge.is-high {
  background: #fee2e2;
  color: #991b1b;
}

.diagnosis-issue-badge.is-medium {
  background: #fef3c7;
  color: #92400e;
}

.diagnosis-issue-badge.is-low {
  background: #d1fae5;
  color: #065f46;
}

.diagnosis-excerpt-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
}

.diagnosis-issue-copy {
  display: grid;
  gap: 8px;
  line-height: 1.65;
  color: #475569;
  font-size: 0.8rem;
}

/* Core Pain */
.nd-core-pain {
  padding: 12px 14px;
  line-height: 1.7;
  color: #475569;
  font-size: 0.82rem;
  word-break: break-word;
  background: #fef2f2;
  border-radius: 10px;
  border: 1px solid #fecaca;
  margin: 0;
}

/* Optimized Content */
.nd-optimized-block {
  border-color: #ede9fe;
  background: #faf5ff;
}

.nd-optimized-content {
  padding: 12px 14px;
  line-height: 1.75;
  color: #475569;
  font-size: 0.82rem;
  word-break: break-word;
  background: white;
  border-radius: 10px;
  border: 1px solid #e9e5f5;
  margin: 0;
}

@media (max-width: 380px) {
  .nd-score-grid {
    grid-template-columns: 1fr;
  }

  .diagnosis-issue-head,
  .nd-block-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---- Track Script — Polished Minimalist Redesign ---- */

/* Hide shared tool-detail header when track script is active */
.ts-mode .tool-hero {
  display: none;
}

.ts-mode .tool-detail-head {
  display: none;
}

.ts-mode {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
}

/* Back Button */
.ts-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.ts-back-link:hover {
  background: #f1f5f9;
  color: #334155;
}

.ts-back-link:active {
  background: #e2e8f0;
  color: #334155;
}

.ts-back-link svg {
  width: 18px;
  height: 18px;
  color: #6366f1;
}

/* Form Card */
.ts-form-card {
  background: white;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  display: grid;
  gap: 12px;
}

/* Intro */
.ts-intro {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  background: #f0f4ff;
  border-radius: 10px;
  border: 1px solid #e0e7ff;
}

.ts-intro-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #6366f1;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ts-intro-text {
  flex: 1;
  min-width: 0;
}

.ts-intro-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
  display: block;
  margin-bottom: 2px;
}

.ts-intro-desc {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.6;
}

/* Option Grid */
.ts-form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
}

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

.ts-option {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: white;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  display: grid;
  gap: 3px;
}

.ts-option strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

.ts-option span {
  font-size: 0.7rem;
  color: #94a3b8;
}

.ts-option:hover {
  border-color: #c7d2fe;
}

.ts-option.is-active {
  border-color: #6366f1;
  background: #f5f3ff;
}

.ts-option.is-active strong {
  color: #6366f1;
}

.ts-option.is-active span {
  color: #818cf8;
}

/* Textarea */
.ts-textarea-wrap textarea {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  font-size: 0.85rem;
  color: #334155;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  min-height: 120px;
  transition: all 0.2s;
  line-height: 1.6;
}

.ts-textarea-wrap textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: white;
}

.ts-textarea-wrap textarea::placeholder {
  color: #94a3b8;
}

.ts-form-meta {
  display: flex;
  justify-content: flex-end;
}

.ts-char-count {
  font-size: 0.7rem;
  color: #94a3b8;
}

.ts-btn-primary {
  width: 100%;
  padding: 12px;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.ts-btn-primary:hover {
  opacity: 0.9;
}

.ts-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Result */
.ts-result {
  display: grid;
  gap: 14px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.ts-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

.ts-result-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ts-result-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
}

.ts-result-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #334155;
}

.ts-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.ts-reset-btn:hover {
  background: #f1f5f9;
  color: #334155;
}

.ts-reset-btn svg {
  color: #6366f1;
}

.ts-summary {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

/* Score Grid */
.ts-score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ts-score-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.ts-score-main {
  background: #6366f1;
  border-color: #6366f1;
}

.ts-score-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #94a3b8;
}

.ts-score-main .ts-score-label {
  color: rgba(255, 255, 255, 0.8);
}

.ts-score-card strong {
  font-size: 1.2rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1;
}

.ts-score-main strong {
  color: white;
}

.ts-score-card em,
.ts-score-unit {
  font-style: normal;
  font-size: 0.65rem;
  color: #94a3b8;
}

.ts-score-main em,
.ts-score-main .ts-score-unit {
  color: rgba(255, 255, 255, 0.7);
}

/* Blocks */
.ts-block {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
}

.ts-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.ts-block-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ts-block-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ts-block-icon--strategy {
  background: #fef3c7;
  color: #92400e;
}

.ts-block-icon--structure {
  background: #ede9fe;
  color: #6366f1;
}

.ts-block-icon--script {
  background: #d1fae5;
  color: #065f46;
}

.ts-block-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

.ts-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.ts-copy-btn:hover {
  background: #f1f5f9;
  color: #334155;
}

.ts-copy-btn svg {
  color: #6366f1;
}

/* Rich text & content */
.ts-rich-text {
  padding: 12px 14px;
  line-height: 1.7;
  color: #475569;
  font-size: 0.82rem;
  word-break: break-word;
  background: #fffbeb;
  border-radius: 10px;
  border: 1px solid #fef3c7;
  margin: 0;
}

.ts-content {
  padding: 12px 14px;
  line-height: 1.75;
  color: #475569;
  font-size: 0.82rem;
  word-break: break-word;
  background: white;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  margin: 0;
}

.ts-copy-block {
  border-color: #ede9fe;
  background: #faf5ff;
}

/* Structure List */
.ts-structure-list {
  display: grid;
  gap: 8px;
}

.track-script-structure-card {
  padding: 10px 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.track-script-structure-card p {
  margin: 0;
  line-height: 1.65;
  color: #475569;
  font-size: 0.8rem;
}

.track-script-structure-index {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #6366f1;
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

@media (max-width: 380px) {
  .ts-option-grid,
  .ts-score-grid {
    grid-template-columns: 1fr;
  }

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

  .track-script-structure-card {
    flex-direction: column;
  }
}
/* ---- Ecommerce Copy — Polished Minimalist Redesign ---- */

/* Hide shared tool-detail header when ecommerce copy is active */
.ec-mode .tool-hero {
  display: none;
}

.ec-mode .tool-detail-head {
  display: none;
}

.ec-mode {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
}

/* Back Button */
.ec-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.ec-back-link:hover {
  background: #f1f5f9;
  color: #334155;
}

.ec-back-link:active {
  background: #e2e8f0;
  color: #334155;
}

.ec-back-link svg {
  width: 18px;
  height: 18px;
  color: #6366f1;
}

/* Form Card */
.ec-form-card {
  background: white;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ec-form-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}

.ec-form-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.ec-form-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

/* Field */
.ec-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ec-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
}

.ec-label-optional {
  font-weight: 400;
  color: #94a3b8;
}

.ec-input {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.85rem;
  color: #334155;
  font-family: inherit;
  box-sizing: border-box;
  transition: all 0.2s;
}

.ec-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: white;
}

.ec-input::placeholder {
  color: #94a3b8;
}

.ec-textarea-wrap textarea {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  font-size: 0.85rem;
  color: #334155;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  min-height: 100px;
  transition: all 0.2s;
  line-height: 1.6;
}

.ec-textarea-wrap textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: white;
}

.ec-textarea-wrap textarea::placeholder {
  color: #94a3b8;
}

/* Platform Grid */
.ec-platform-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.ecommerce-platform-btn {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.ecommerce-platform-btn:hover {
  border-color: #6366f1;
}

.ecommerce-platform-btn.is-active {
  background: #6366f1;
  color: white;
  border-color: #6366f1;
}

/* Upload Panel */
.ec-upload-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.ec-upload-tip {
  margin: 0;
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.5;
}

.ec-upload-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.ec-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: white;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.ec-upload-btn:hover {
  border-color: #6366f1;
  color: #6366f1;
}

.ec-upload-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.ec-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: white;
  color: #64748b;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.ec-remove-btn:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}

/* Image Preview (dynamic HTML uses these class names) */
.ecommerce-image-preview {
  min-height: 120px;
  border-radius: 10px;
  background: white;
  border: 1px dashed #e2e8f0;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ecommerce-preview-empty {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.ecommerce-preview-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 1.2rem;
  font-weight: 700;
}

.ecommerce-preview-empty strong {
  font-size: 0.82rem;
  color: #334155;
  margin: 0;
}

.ecommerce-preview-empty p {
  font-size: 0.72rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.5;
}

.ecommerce-preview-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ecommerce-preview-card img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

.ecommerce-preview-meta strong {
  font-size: 0.82rem;
  color: #334155;
  word-break: break-word;
}

.ecommerce-preview-meta p {
  font-size: 0.72rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.5;
}

/* Submit Button */
.ec-btn-primary {
  width: 100%;
  padding: 14px;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 4px;
}

.ec-btn-primary:hover {
  opacity: 0.9;
}

.ec-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Result Section */
.ec-result {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ec-result-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: #f0fdf4;
  border-radius: 10px;
  border: 1px solid #bbf7d0;
}

.ec-result-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

.ec-result-header span {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 600;
  color: #166534;
}

.ec-result-reset {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: white;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.ec-result-reset:hover {
  background: #f1f5f9;
  color: #334155;
}

/* Summary */
.ec-summary {
  padding: 14px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.ec-summary-text {
  margin: 0;
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.7;
}

/* Meta Grid */
.ec-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ec-meta-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ec-meta-label {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 500;
}

.ec-meta-card strong {
  font-size: 0.82rem;
  color: #1e293b;
  font-weight: 700;
  word-break: break-word;
}

/* Block */
.ec-block {
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ec-block-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ec-block-head h4 {
  flex: 1;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
}

.ec-block-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ec-block-icon svg {
  width: 16px;
  height: 16px;
}

.ec-block-icon--title {
  background: #fef3c7;
  color: #d97706;
}

.ec-block-icon--content {
  background: #ede9fe;
  color: #7c3aed;
}

.ec-block-icon--image {
  background: #e0f2fe;
  color: #0284c7;
}

.ec-block-icon--notice {
  background: #fce7f3;
  color: #db2777;
}

.ec-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.ec-copy-btn:hover {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

.ec-copy-btn svg {
  width: 14px;
  height: 14px;
}

.ec-block-content {
  margin: 0;
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.8;
  word-break: break-word;
}

.ec-rich-text {
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
}

/* Uploaded image (result) */
.ecommerce-uploaded-image-link {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.ecommerce-uploaded-image {
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  background: #f8fafc;
}

/* Notice block */
.ec-notice-block {
  background: #fffbeb;
  border-color: #fde68a;
}

.ec-debug-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.ec-debug-link:hover {
  background: #fef3c7;
}

/* Hide old form classes */
.ecommerce-copy-form {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.ecommerce-copy-result {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

/* Keep result text classes functional */
.ecommerce-result-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}

.ecommerce-result-content {
  min-height: 80px;
}

.ecommerce-result-notice-text {
  font-size: 0.82rem;
  color: #92400e;
  line-height: 1.7;
}

@media (max-width: 380px) {
  .ec-platform-grid,
  .ec-meta-grid {
    grid-template-columns: 1fr;
  }
}


.module-card,
.tab-btn {
  position: relative;
}

.module-card-unread-badge,
.module-card-count-badge,
.module-card-loading-badge,
.tab-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff6b6b, #ff3d71);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(255, 61, 113, 0.26);
}

.module-card-unread-badge {
  min-width: 44px;
}

.module-card-loading-badge {
  min-width: 48px;
  background: linear-gradient(135deg, #ffb347, #ff8f3d);
  box-shadow: 0 12px 24px rgba(255, 143, 61, 0.24);
}

.module-card.is-pending {
  border-color: rgba(255, 179, 71, 0.34);
  background: linear-gradient(180deg, rgba(255, 248, 236, 0.96), rgba(255, 255, 255, 0.94));
}

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

.module-card-status-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: rgba(148, 163, 184, 0.16);
  color: #475569;
}

.module-card-status-text.is-pending {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.module-card-status-text.is-success {
  background: rgba(16, 185, 129, 0.16);
  color: #047857;
}

.module-card-status-text.is-failed {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
}

.tab-badge {
  top: 6px;
  right: 6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 0.68rem;
}

.async-notice {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 21, 31, 0.18);
  backdrop-filter: blur(10px);
}

.async-notice-card {
  width: min(100%, 320px);
  padding: 24px 22px;
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.async-notice-card h3 {
  margin: 0;
  font-size: 1.06rem;
  color: var(--ink-950);
}

.async-notice-card p {
  margin: 0;
  color: var(--ink-700);
  line-height: 1.6;
}

.async-notice-spinner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 4px solid rgba(31, 184, 170, 0.18);
  border-top-color: #1fb8aa;
  animation: async-spin 0.9s linear infinite;
}

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

.benchmark-form {
  display: grid;
  gap: 16px;
}

.benchmark-intro {
  position: relative;
  overflow: hidden;
  padding: 24px 20px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(255, 187, 97, 0.18), transparent 30%),
    linear-gradient(145deg, rgba(20, 57, 76, 0.12), rgba(31, 184, 170, 0.1));
  border: 1px solid rgba(16, 33, 45, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 20px 34px rgba(16, 33, 45, 0.08);
}

.benchmark-intro::after {
  content: "";
  position: absolute;
  right: -26px;
  top: -34px;
  width: 130px;
  height: 130px;
  border-radius: 30px;
  transform: rotate(22deg);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.03));
  pointer-events: none;
}

.benchmark-intro > * {
  position: relative;
  z-index: 1;
}

.benchmark-intro h3,
.benchmark-intro-desc {
  margin: 0;
}

.benchmark-intro-desc,
.benchmark-hint {
  line-height: 1.8;
  color: var(--ink-700);
}

.benchmark-setting-block,
.benchmark-custom-block {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 249, 0.92));
  border: 1px solid rgba(16, 33, 45, 0.08);
  box-shadow: 0 16px 30px rgba(16, 33, 45, 0.08);
}

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

.benchmark-block-head h4,
.benchmark-block-head p {
  margin: 0;
}

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

.benchmark-style-option,
.benchmark-custom-style-chip {
  min-height: 56px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(16, 33, 45, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 247, 248, 0.88));
  box-shadow: var(--shadow-soft);
  color: var(--ink-900);
  font-weight: 700;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.benchmark-style-option:hover,
.benchmark-custom-style-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(16, 33, 45, 0.1);
}

.benchmark-style-option.is-active,
.benchmark-custom-style-chip.is-active {
  border-color: rgba(31, 184, 170, 0.44);
  background: linear-gradient(145deg, rgba(31, 184, 170, 0.2), rgba(255, 255, 255, 0.96));
  color: var(--ink-950);
}

.benchmark-custom-style-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.benchmark-custom-style-chip em {
  font-style: normal;
  font-size: 0.78rem;
  color: #0d6e66;
}

@media (max-width: 380px) {
  .benchmark-style-grid,
  .benchmark-custom-style-list {
    grid-template-columns: 1fr;
  }

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

.benchmark-hint-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 248, 220, 0.95), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(255, 187, 97, 0.28);
  box-shadow: 0 14px 28px rgba(255, 187, 97, 0.12);
}

.benchmark-hint-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #ffcf70, #ffb44c);
  box-shadow: 0 10px 20px rgba(255, 180, 76, 0.24);
  font-size: 1rem;
}

.benchmark-single-tip {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--ink-700);
}

.benchmark-setting-block,
.benchmark-custom-block {
  gap: 16px;
  padding: 20px;
  border-radius: 26px;
  box-shadow: 0 18px 34px rgba(16, 33, 45, 0.09);
}

.benchmark-style-grid,
.benchmark-custom-style-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.benchmark-style-option,
.benchmark-custom-style-chip {
  position: relative;
  min-height: 60px;
  padding: 16px 18px;
  border-radius: 20px;
  font-weight: 800;
}

.benchmark-style-option::after,
.benchmark-custom-style-chip::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(16, 33, 45, 0.14);
  transition: transform 0.18s ease, background 0.18s ease;
}

.benchmark-style-option.is-active,
.benchmark-custom-style-chip.is-active {
  border-color: rgba(31, 184, 170, 0.52);
  background: linear-gradient(145deg, rgba(31, 184, 170, 0.24), rgba(255, 255, 255, 0.98));
  box-shadow: 0 18px 30px rgba(31, 184, 170, 0.14);
}

.benchmark-style-option.is-active::after,
.benchmark-custom-style-chip.is-active::after {
  background: #1fb8aa;
  transform: scale(1.1);
}

.benchmark-custom-style-chip {
  padding-right: 74px;
}

.benchmark-custom-style-remove {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-style: normal;
  font-size: 0.76rem;
  font-weight: 700;
  color: #0d6e66;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(31, 184, 170, 0.12);
}


.benchmark-intro {
  display: grid;
  justify-items: center;
  text-align: center;
}

.benchmark-intro > div {
  display: grid;
  gap: 10px;
  justify-items: center;
}

#benchmarkAnalysisResult .result-hero {
  justify-items: center;
  text-align: center;
}

#benchmarkAnalysisResult .result-hero-copy {
  justify-items: center;
}

#benchmarkAnalysisResult .result-hero-text:empty,
#benchmarkAnalysisResult .result-image-tip:empty {
  display: none;
}

#benchmarkAnalysisResult .result-block {
  text-align: left;
}

.benchmark-count-block {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 249, 0.92));
  border: 1px solid rgba(16, 33, 45, 0.08);
  box-shadow: 0 18px 34px rgba(16, 33, 45, 0.09);
}

.benchmark-count-stepper {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 14px;
}

.benchmark-count-btn {
  height: 52px;
  border-radius: 18px;
  border: 1px solid rgba(16, 33, 45, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 247, 248, 0.88));
  box-shadow: var(--shadow-soft);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink-900);
}

.benchmark-count-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.benchmark-count-value {
  display: grid;
  place-items: center;
  min-height: 52px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(31, 184, 170, 0.16), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(31, 184, 170, 0.18);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink-950);
}

/* ============================================
   Benchmark Analysis — Polished Minimalist Redesign
   Prefix: bm-
   ============================================ */

/* Hide shared hero/detail head in bm-mode */
.bm-mode .tool-hero { display: none; }
.bm-mode .tool-detail-head { display: none; }

.bm-mode {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
}

/* ---- Back Button ---- */
.bm-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  border-radius: 10px;
  margin-bottom: 10px;
  transition: all 0.2s;
}
.bm-back-link:hover { background: #f1f5f9; color: #334155; }
.bm-back-link:active { background: #e2e8f0; color: #334155; }
.bm-back-link svg { width: 18px; height: 18px; color: #6366f1; }

/* ---- Form ---- */
.bm-mode #benchmarkAnalysisForm.tool-form,
.bm-mode #benchmarkAnalysisForm.panel-card,
.bm-mode #benchmarkAnalysisForm.tool-form-card {
  padding: 0 12px 20px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bm-form-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bm-form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

.bm-textarea-wrap {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s;
}
.bm-textarea-wrap:focus-within {
  border-color: #6366f1;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.bm-input-wrap {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s;
}
.bm-input-wrap:focus-within {
  border-color: #6366f1;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.bm-mode #benchmarkAnalysisForm textarea,
.bm-mode #benchmarkAnalysisForm input[type="text"] {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #1e293b;
  font-size: 0.85rem;
  padding: 12px 14px;
  font-family: inherit;
  resize: none;
  line-height: 1.6;
  border-radius: 10px;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}
.bm-mode #benchmarkAnalysisForm textarea::placeholder,
.bm-mode #benchmarkAnalysisForm input[type="text"]::placeholder {
  color: #94a3b8;
}
.bm-mode #benchmarkAnalysisForm textarea {
  min-height: 100px;
  max-height: 200px;
}
.bm-mode #benchmarkAnalysisForm input[type="text"] {
  min-height: 44px;
  padding: 10px 14px;
}

.bm-hint {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 2px;
}

/* ---- Block (form sections) ---- */
.bm-block {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bm-block-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bm-block-head h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  flex: 1;
}

.bm-block-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bm-block-icon svg {
  width: 16px;
  height: 16px;
}
.bm-block-icon--style { background: #ede9fe; color: #7c3aed; }
.bm-block-icon--custom { background: #e0f2fe; color: #0284c7; }
.bm-block-icon--image { background: #f0fdf4; color: #22c55e; }
.bm-block-icon--title { background: #fef3c7; color: #d97706; }
.bm-block-icon--content { background: #ede9fe; color: #7c3aed; }

.bm-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #6366f1;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  margin-left: auto;
}
.bm-add-btn:active { background: #ede9fe; border-color: #c7d2fe; }

/* ---- Style Option Grid ---- */
.bm-option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.bm-mode .benchmark-style-option {
  min-height: auto;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  box-shadow: none;
  position: relative;
}
.bm-mode .benchmark-style-option::after {
  display: none;
}
.bm-mode .benchmark-style-option:hover {
  background: #f1f5f9;
  transform: none;
}
.bm-mode .benchmark-style-option.is-active {
  background: #6366f1;
  color: #ffffff;
  border-color: #6366f1;
  box-shadow: none;
}
.bm-mode .benchmark-style-option.is-active::after {
  display: none;
}

/* ---- Custom Style List ---- */
.bm-custom-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bm-mode .benchmark-custom-style-chip {
  min-height: auto;
  padding: 8px 40px 8px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  box-shadow: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.bm-mode .benchmark-custom-style-chip::after {
  display: none;
}
.bm-mode .benchmark-custom-style-chip.is-active {
  background: #6366f1;
  color: #ffffff;
  border-color: #6366f1;
  box-shadow: none;
}
.bm-mode .benchmark-custom-style-chip.is-active::after {
  display: none;
}
.bm-mode .benchmark-custom-style-remove {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0,0,0,0.06);
}
.bm-mode .benchmark-custom-style-chip.is-active .benchmark-custom-style-remove {
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.2);
}

/* ---- Stepper ---- */
.bm-stepper {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
}

.bm-stepper-btn {
  height: 44px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 1.1rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.bm-stepper-btn:active { background: #e2e8f0; }
.bm-stepper-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.bm-stepper-value {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}

/* ---- Submit Button ---- */
.bm-submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}
.bm-submit-btn:active { opacity: 0.85; transform: scale(0.985); }
.bm-submit-btn:disabled { opacity: 0.5; cursor: wait; transform: none; }

/* ---- Result Section ---- */
.bm-result {
  padding: 0 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}

.bm-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.bm-result-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bm-result-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.bm-result-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
}

.bm-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}
.bm-reset-btn:active { background: #f1f5f9; color: #334155; }

/* ---- Tabs ---- */
.bm-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.bm-mode .bm-tab.result-switch-btn {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.25s ease;
  border: none;
  background: transparent;
  font-family: inherit;
  user-select: none;
}
.bm-mode .bm-tab.result-switch-btn.is-active {
  background: #ffffff;
  color: #6366f1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.bm-mode .bm-tab.result-switch-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* ---- Meta Row ---- */
.bm-meta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.bm-meta-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.bm-meta-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f0f0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6366f1;
  flex-shrink: 0;
}
.bm-meta-icon svg {
  width: 18px;
  height: 18px;
}
.bm-meta-icon--style { background: #ede9fe; color: #7c3aed; }
.bm-meta-icon--image { background: #f0fdf4; color: #22c55e; }

.bm-meta-info {
  flex: 1;
  min-width: 0;
}

.bm-meta-value {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bm-meta-label {
  font-size: 0.68rem;
  color: #94a3b8;
}

/* ---- Result Blocks ---- */
.bm-result .bm-block {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  transition: border-color 0.2s;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.bm-result .bm-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.bm-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.bm-copy-btn:active {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(99, 102, 241, 0.25);
}

.bm-title-text {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.6;
  color: #1e293b;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.bm-body-text {
  font-size: 0.88rem;
  line-height: 1.85;
  color: #475569;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* ---- Image Grid (JS-generated content restyled) ---- */
.bm-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  justify-items: stretch;
}

.bm-mode .result-image-card {
  position: relative;
  display: grid;
  align-items: center;
  justify-items: center;
  width: 100%;
  min-width: 0;
  min-height: 220px;
  padding: 10px 10px 48px;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: auto;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s;
}
.bm-mode .result-image-card:active { transform: scale(0.97); }

.bm-mode .result-image-head {
  display: none;
}

.bm-mode .result-image-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 160px;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: zoom-in;
}

.bm-mode .result-image-link:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

.bm-mode .result-image-card img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(62vh, 520px);
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

.bm-mode .result-download-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: none;
  border-radius: 8px;
  color: #475569;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s;
  padding: 0;
}
.bm-mode .result-download-btn:active {
  background: #ffffff;
  color: #6366f1;
  transform: scale(0.9);
}

.bm-mode .result-empty {
  text-align: center;
  color: #94a3b8;
  font-size: 0.82rem;
  padding: 24px 0;
  margin: 0;
  border-radius: 0;
  background: transparent;
  border: none;
}
.bm-mode .result-empty-warning {
  background: transparent;
  border-color: transparent;
  color: #94a3b8;
}

.bm-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: 18px 12px;
}

.bm-preview-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(6px);
  cursor: zoom-out;
}

.bm-preview-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 960px);
  display: grid;
  gap: 12px;
  justify-items: end;
}

.bm-preview-close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.bm-preview-close:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.bm-preview-stage {
  width: 100%;
  max-height: calc(100vh - 96px);
  padding: 12px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.42);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.bm-preview-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 132px);
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

/* ---- Responsive narrow screens ---- */
@media (max-width: 380px) {
  .bm-option-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .bm-result-header {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
  }

  .bm-meta-row,
  .bm-image-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

.cover-assistant-intro {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
  padding: 22px 20px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(255, 214, 132, 0.28), transparent 30%),
    linear-gradient(145deg, rgba(20, 57, 76, 0.12), rgba(31, 184, 170, 0.1));
  border: 1px solid rgba(16, 33, 45, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 18px 32px rgba(16, 33, 45, 0.08);
}

.cover-assistant-intro::after {
  content: "";
  position: absolute;
  right: -26px;
  top: -30px;
  width: 130px;
  height: 130px;
  border-radius: 32px;
  transform: rotate(18deg);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04));
}

.cover-assistant-intro > * {
  position: relative;
  z-index: 1;
}

.cover-assistant-intro h3,
.cover-assistant-intro p {
  margin: 0;
}

.cover-assistant-intro p {
  line-height: 1.8;
  color: var(--ink-900);
}

.cover-upload-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 250, 0.94));
  border: 1px solid rgba(16, 33, 45, 0.08);
  box-shadow:
    0 18px 34px rgba(16, 33, 45, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.cover-image-preview {
  min-height: 188px;
  border-radius: 22px;
  padding: 16px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top right, rgba(255, 214, 132, 0.16), transparent 35%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 251, 0.92));
  border: 1px dashed rgba(16, 33, 45, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.cover-preview-empty,
.cover-preview-card {
  width: 100%;
}

.cover-preview-empty {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.cover-preview-empty strong,
.cover-preview-empty p,
.cover-preview-meta p {
  margin: 0;
}

.cover-preview-empty p,
.cover-preview-meta p {
  line-height: 1.7;
  color: var(--ink-700);
}

.cover-preview-icon {
  width: 60px;
  height: 60px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ffb84c, #ff7b54);
  color: #ffffff;
  font-size: 1.08rem;
  font-weight: 800;
  box-shadow: 0 16px 28px rgba(255, 123, 84, 0.22);
}

.cover-preview-card {
  display: grid;
  gap: 12px;
}

.cover-preview-card img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 18px 32px rgba(16, 33, 45, 0.14);
}

.cover-preview-meta {
  display: grid;
  gap: 6px;
}

.cover-preview-meta strong {
  font-size: 0.96rem;
  color: var(--ink-950);
  word-break: break-word;
}

@media (max-width: 380px) {
  .cover-upload-panel .ecommerce-upload-actions {
    grid-template-columns: 1fr;
  }
}
.cover-assistant-form {
  gap: 18px;
}

.cover-assistant-result {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 18px;
  padding: 22px 20px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(255, 202, 94, 0.18), transparent 26%),
    radial-gradient(circle at bottom left, rgba(73, 145, 255, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(244, 248, 251, 0.96));
  border: 1px solid rgba(16, 33, 45, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 24px 42px rgba(16, 33, 45, 0.1);
}

.cover-assistant-result::before,
.cover-assistant-result::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.cover-assistant-result::before {
  right: -80px;
  top: -80px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 210, 118, 0.26), rgba(255, 210, 118, 0));
}

.cover-assistant-result::after {
  left: -90px;
  bottom: -90px;
  width: 210px;
  height: 210px;
  background: radial-gradient(circle, rgba(84, 154, 255, 0.16), rgba(84, 154, 255, 0));
}

.cover-result-hero,
.cover-result-meta-grid,
.cover-result-block {
  position: relative;
  z-index: 1;
}

.cover-result-hero {
  display: grid;
  gap: 14px;
  padding: 22px 20px;
  border-radius: 26px;
  text-align: left;
  background:
    radial-gradient(circle at top right, rgba(255, 211, 123, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(17, 24, 39, 0.98), rgba(28, 41, 66, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 42px rgba(15, 23, 42, 0.22);
}

.cover-result-hero-copy {
  display: grid;
  gap: 10px;
}

.cover-result-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 247, 222, 0.96);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
}

.cover-result-hero-copy h3,
.cover-result-prompt {
  margin: 0;
}

.cover-result-hero-copy h3 {
  color: #f8fafc;
  font-size: clamp(1.35rem, 4vw, 1.7rem);
  letter-spacing: 0.01em;
}

.cover-result-summary {
  display: none;
}

.cover-result-prompt {
  line-height: 1.85;
  color: var(--ink-700);
}

.cover-result-hero .ghost-btn {
  justify-self: start;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  box-shadow: none;
}

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

.cover-result-meta-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 8px;
  padding: 18px 18px 18px 54px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(243, 247, 249, 0.92));
  border: 1px solid rgba(16, 33, 45, 0.08);
  box-shadow: 0 18px 30px rgba(16, 33, 45, 0.08);
}

.cover-result-meta-card::before {
  content: "✦";
  position: absolute;
  left: 18px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 212, 127, 0.22), rgba(255, 255, 255, 0.98));
  color: #d97706;
  font-size: 0.9rem;
}

.cover-result-meta-card:last-child::before {
  content: "✓";
  color: #2563eb;
  background: linear-gradient(145deg, rgba(96, 165, 250, 0.22), rgba(255, 255, 255, 0.98));
}

.cover-result-meta-card::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -26px;
  width: 86px;
  height: 86px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 214, 132, 0.22), rgba(255, 255, 255, 0.04));
  transform: rotate(22deg);
}

.cover-result-meta-card span,
.cover-result-meta-card strong {
  position: relative;
  z-index: 1;
}

.cover-result-meta-card span {
  font-size: 0.78rem;
  color: var(--ink-600);
}

.cover-result-meta-card strong {
  font-size: 1.04rem;
  color: var(--ink-950);
}

.cover-result-meta-card-accent {
  background: linear-gradient(145deg, rgba(255, 214, 132, 0.24), rgba(255, 255, 255, 0.98));
  border-color: rgba(255, 184, 76, 0.24);
}

.cover-result-block {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(245, 248, 250, 0.94));
  border: 1px solid rgba(16, 33, 45, 0.08);
  box-shadow: 0 18px 30px rgba(16, 33, 45, 0.08);
  text-align: left;
}

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

.cover-result-block-head h4 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--ink-950);
}

.cover-result-block-head h4::before {
  content: "✦";
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 212, 127, 0.22);
  color: #d97706;
  font-size: 0.76rem;
}

.cover-result-prompt {
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.94));
  border: 1px solid rgba(16, 33, 45, 0.06);
}

.cover-result-image-block {
  gap: 16px;
}

.cover-result-image-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 16px;
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(255, 218, 150, 0.16), transparent 26%),
    linear-gradient(180deg, rgba(16, 33, 45, 0.04), rgba(16, 33, 45, 0.1));
  border: 1px solid rgba(16, 33, 45, 0.08);
  box-shadow: 0 22px 36px rgba(16, 33, 45, 0.14);
}

.cover-result-image {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 32px rgba(16, 33, 45, 0.12);
}

.cover-result-image-actions {
  display: flex;
  justify-content: center;
}

.cover-result-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
  color: #f8fafc;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 18px 28px rgba(29, 78, 216, 0.2);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.cover-result-download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 34px rgba(29, 78, 216, 0.24);
  filter: saturate(1.04);
}

.cover-result-download-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  font-size: 1rem;
}

.cover-result-download-btn-secondary {
  background: linear-gradient(135deg, #0f766e, #0f172a);
  box-shadow: 0 18px 28px rgba(15, 118, 110, 0.2);
}

.cover-result-download-btn-secondary:hover {
  box-shadow: 0 22px 34px rgba(15, 118, 110, 0.24);
}

.cover-template-block {
  gap: 16px;
}

.cover-template-copy {
  margin: 0;
  line-height: 1.8;
  color: var(--ink-700);
}

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

.cover-template-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(16, 33, 45, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 250, 0.94));
  color: var(--ink-950);
  text-align: left;
  box-shadow: 0 16px 26px rgba(16, 33, 45, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.cover-template-card::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.34);
}

.cover-template-card strong,
.cover-template-card p {
  margin: 0;
}

.cover-template-card strong {
  font-size: 0.96rem;
}

.cover-template-card p {
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--ink-600);
}

.cover-template-card.is-active {
  transform: translateY(-1px);
  border-color: rgba(29, 78, 216, 0.2);
  box-shadow: 0 20px 32px rgba(29, 78, 216, 0.12);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.96));
}

.cover-template-card.is-active::after {
  background: #1d4ed8;
  box-shadow: 0 0 0 6px rgba(29, 78, 216, 0.12);
}

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

@media (min-width: 680px) {
  .cover-template-editor {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cover-template-field-badge {
    grid-column: 1 / -1;
  }
}

.cover-template-field input {
  min-height: 46px;
}

.cover-template-field-badge input {
  max-width: 220px;
}

.cover-poster-result-block {
  gap: 16px;
}

.cover-poster-status {
  margin: 0;
  line-height: 1.7;
  color: var(--ink-700);
}

.cover-poster-preview-link {
  min-height: 360px;
  background:
    radial-gradient(circle at top, rgba(137, 196, 255, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.1));
}

.cover-poster-preview {
  max-height: 760px;
  background: #ffffff;
}

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

  .cover-template-field-badge input {
    max-width: none;
  }
}

@media (min-width: 480px) {
  .cover-result-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .cover-result-hero .ghost-btn {
    justify-self: end;
  }
}

@media (max-width: 420px) {
  .cover-result-meta-grid {
    grid-template-columns: 1fr;
  }

  .cover-result-block-head {
    flex-direction: column;
    align-items: flex-start;
  }
}






.voice-clone-intro {
  gap: 18px;
}

.voice-clone-overview,
.voice-clone-card,
.voice-clone-flow-step,
.voice-clone-note {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(16, 33, 45, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 18px 34px rgba(16, 33, 45, 0.08);
}

.voice-clone-overview {
  display: grid;
  gap: 16px;
  padding: 22px 20px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(91, 143, 249, 0.16), transparent 28%),
    radial-gradient(circle at bottom left, rgba(31, 184, 170, 0.14), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 247, 250, 0.94));
}

.voice-clone-overview-copy,
.voice-clone-section,
.voice-clone-section-head,
.voice-clone-highlight,
.voice-clone-card,
.voice-clone-flow,
.voice-clone-flow-step,
.voice-clone-note {
  display: grid;
}

.voice-clone-overview-copy,
.voice-clone-section,
.voice-clone-highlight,
.voice-clone-card,
.voice-clone-flow-step,
.voice-clone-note {
  gap: 10px;
}

.voice-clone-overview-copy h3,
.voice-clone-section-head h4,
.voice-clone-highlight strong,
.voice-clone-card strong,
.voice-clone-flow-step strong,
.voice-clone-note strong {
  color: var(--ink-950);
}

.voice-clone-lead,
.voice-clone-card p,
.voice-clone-flow-step p,
.voice-clone-note p {
  margin: 0;
  line-height: 1.78;
  color: var(--ink-700);
}

.voice-clone-highlight {
  padding: 16px 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(17, 50, 70, 0.96), rgba(91, 143, 249, 0.9));
  box-shadow: 0 18px 30px rgba(17, 50, 70, 0.2);
}

.voice-clone-highlight-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.voice-clone-highlight strong {
  font-size: 1rem;
  line-height: 1.6;
  color: #ffffff;
}

.voice-clone-section {
  gap: 14px;
}

.voice-clone-card-grid,
.voice-clone-flow {
  display: grid;
  gap: 12px;
}

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

.voice-clone-card,
.voice-clone-flow-step,
.voice-clone-note {
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 251, 0.92));
}

.voice-clone-card strong,
.voice-clone-flow-step strong {
  font-size: 1rem;
}

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

.voice-clone-flow-step span {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(31, 184, 170, 0.12);
  color: #0c7a70;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.voice-clone-note {
  background:
    radial-gradient(circle at top right, rgba(255, 187, 97, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 247, 250, 0.94));
}

@media (max-width: 720px) {
  .voice-clone-card-grid,
  .voice-clone-flow {
    grid-template-columns: 1fr;
  }
}

.ecommerce-video-intro {
  display: grid;
  gap: 18px;
}

.ecommerce-video-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 16px;
  padding: 24px 22px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(255, 208, 120, 0.2), transparent 28%),
    radial-gradient(circle at bottom left, rgba(77, 149, 255, 0.14), transparent 24%),
    linear-gradient(135deg, rgba(16, 24, 40, 0.98), rgba(28, 40, 64, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.22);
}

.ecommerce-video-hero > * {
  position: relative;
  z-index: 1;
}

.ecommerce-video-hero-copy {
  display: grid;
  gap: 10px;
}

.ecommerce-video-hero-copy h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1.44rem;
}

.ecommerce-video-hero-desc {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.ecommerce-video-pill-row,
.ecommerce-video-card-grid,
.ecommerce-video-flow {
  display: grid;
  gap: 12px;
}

.ecommerce-video-pill-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ecommerce-video-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ecommerce-video-card-grid,
.ecommerce-video-flow {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ecommerce-video-card,
.ecommerce-video-flow-step,
.ecommerce-video-note {
  display: grid;
  gap: 10px;
  padding: 18px 16px;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(245, 248, 252, 0.95));
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

.ecommerce-video-card strong,
.ecommerce-video-flow-step strong,
.ecommerce-video-note strong {
  color: var(--ink-950);
  font-size: 1rem;
}

.ecommerce-video-card p,
.ecommerce-video-flow-step p,
.ecommerce-video-note p {
  margin: 0;
  color: var(--ink-700);
  line-height: 1.65;
}

.ecommerce-video-flow-step span {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 178, 83, 0.14);
  color: #c86414;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.ecommerce-video-note {
  background:
    radial-gradient(circle at top right, rgba(255, 191, 112, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 248, 251, 0.95));
}

@media (max-width: 720px) {
  .ecommerce-video-pill-row,
  .ecommerce-video-card-grid,
  .ecommerce-video-flow {
    grid-template-columns: 1fr;
  }
}

.ecommerce-video-root {
  width: 100%;
}

.ecommerce-video-page {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 22px;
}

.ecommerce-video-hero-banner,
.ecommerce-video-compose-card,
.ecommerce-video-result-card {
  border-radius: 28px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.ecommerce-video-hero-banner {
  display: grid;
  gap: 18px;
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(255, 211, 146, 0.26), transparent 26%),
    radial-gradient(circle at bottom left, rgba(84, 158, 255, 0.12), transparent 24%),
    linear-gradient(135deg, rgba(255, 250, 242, 0.96), rgba(246, 249, 255, 0.98));
}

.ecommerce-video-hero-copy,
.ecommerce-video-mode-banner,
.ecommerce-video-panel-head,
.ecommerce-video-block-head,
.ecommerce-video-result-copy,
.ecommerce-video-result-empty,
.ecommerce-video-player-placeholder,
.ecommerce-video-detail-row,
.ecommerce-video-readonly-field,
.ecommerce-video-inline-field,
.ecommerce-video-toggle-list,
.ecommerce-video-summary-item,
.ecommerce-video-stat-card,
.ecommerce-video-upload-placeholder,
.ecommerce-video-multi-empty,
.ecommerce-video-multi-meta {
  display: grid;
  gap: 8px;
}

.ecommerce-video-centered-tag {
  width: fit-content;
  margin: 0 auto 0 0;
}

.ecommerce-video-hero-copy h3,
.ecommerce-video-section-head h4 {
  margin: 0;
}

.ecommerce-video-hero-desc,
.ecommerce-video-mode-banner p,
.ecommerce-video-mode-note,
.ecommerce-video-stat-card span,
.ecommerce-video-block-head span,
.ecommerce-video-file-meta,
.ecommerce-video-prompt-meta span,
.ecommerce-video-expire-hint,
.ecommerce-video-result-empty p,
.ecommerce-video-player-placeholder span,
.ecommerce-video-detail-row p {
  margin: 0;
  color: var(--ink-700);
  line-height: 1.68;
}

.ecommerce-video-pill-row,
.ecommerce-video-hero-stats,
.ecommerce-video-config-grid,
.ecommerce-video-summary-grid,
.ecommerce-video-detail-grid {
  display: grid;
  gap: 14px;
}

.ecommerce-video-pill-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ecommerce-video-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink-900);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
}

.ecommerce-video-mode-switch {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ecommerce-video-mode-btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--ink-800);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.ecommerce-video-mode-btn.is-active {
  background: linear-gradient(135deg, #111827, #233351);
  color: #fff;
  transform: translateY(-1px);
}

.ecommerce-video-mode-banner {
  padding: 18px 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.8);
}

.ecommerce-video-mode-banner-meta,
.ecommerce-video-fixed-meta,
.ecommerce-video-result-meta,
.ecommerce-video-upload-action-row,
.ecommerce-video-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.ecommerce-video-head-chip,
.ecommerce-video-counter-pill,
.ecommerce-video-doc-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.ecommerce-video-head-chip,
.ecommerce-video-doc-chip {
  background: rgba(255, 183, 77, 0.18);
  color: #a25014;
}

.ecommerce-video-counter-pill {
  background: rgba(15, 23, 42, 0.08);
  color: var(--ink-800);
}

.ecommerce-video-hero-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ecommerce-video-stat-card,
.ecommerce-video-upload-panel,
.ecommerce-video-brief-panel,
.ecommerce-video-config-panel,
.ecommerce-video-summary-card,
.ecommerce-video-result-panel,
.ecommerce-video-result-empty {
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 252, 0.96));
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.ecommerce-video-workspace,
.ecommerce-video-compose-shell,
.ecommerce-video-mode-two-grid {
  display: grid;
  gap: 18px;
}

.ecommerce-video-compose-shell,
.ecommerce-video-mode-two-grid {
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
}

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

.ecommerce-video-config-grid-two {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ecommerce-video-upload-preview,
.ecommerce-video-multi-preview-grid,
.ecommerce-video-product-preview,
.ecommerce-video-player-wrap {
  min-height: 280px;
  border-radius: 22px;
  border: 1px dashed rgba(15, 23, 42, 0.14);
  background: linear-gradient(180deg, rgba(249, 250, 251, 0.96), rgba(241, 245, 249, 0.95));
}

.ecommerce-video-upload-preview,
.ecommerce-video-multi-preview-grid {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.ecommerce-video-upload-image,
.ecommerce-video-product-image,
.ecommerce-video-multi-media img,
.ecommerce-video-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 22px;
}

.ecommerce-video-player-wrap {
  overflow: hidden;
}

.ecommerce-video-product-preview {
  overflow: hidden;
}

.ecommerce-video-upload-actions-stack {
  gap: 10px;
}

.ecommerce-video-multi-card {
  width: 100%;
  display: grid;
  gap: 10px;
}

.ecommerce-video-multi-media {
  position: relative;
  min-height: 280px;
}

.ecommerce-video-remove-chip {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(17, 24, 39, 0.86);
  color: #fff;
  cursor: pointer;
}

.ecommerce-video-size-group {
  display: grid;
  gap: 10px;
}

.ecommerce-video-size-btn {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 18px;
  padding: 14px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.ecommerce-video-size-btn strong,
.ecommerce-video-summary-item strong,
.ecommerce-video-detail-row span,
.ecommerce-video-panel-head strong,
.ecommerce-video-block-head strong,
.ecommerce-video-stat-card strong,
.ecommerce-video-readonly-field strong {
  color: var(--ink-950);
}

.ecommerce-video-size-btn span,
.ecommerce-video-summary-item span {
  display: block;
  margin-top: 4px;
  color: var(--ink-600);
  line-height: 1.5;
}

.ecommerce-video-size-btn.is-active {
  border-color: rgba(17, 24, 39, 0.26);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(248, 250, 252, 1));
}

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

.ecommerce-video-summary-item {
  padding: 16px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.04);
}

.ecommerce-video-readonly-field,
.ecommerce-video-inline-field {
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.04);
}

.ecommerce-video-toggle-list {
  margin-top: 12px;
}

.ecommerce-video-toggle-row {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 600;
  color: var(--ink-800);
}

.ecommerce-video-inline-field .tool-input {
  width: 100%;
}

.ecommerce-video-generate-wrap {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.ecommerce-video-generate-btn {
  min-width: min(360px, 100%);
}

.ecommerce-video-result-media {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(240px, 0.82fr) minmax(0, 1.18fr);
}

.ecommerce-video-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.ecommerce-video-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f59e0b, #1d4ed8);
}

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

.ecommerce-video-status-badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.ecommerce-video-status-badge.is-pending {
  background: rgba(251, 191, 36, 0.16);
  color: #a16207;
}

.ecommerce-video-status-badge.is-success {
  background: rgba(34, 197, 94, 0.14);
  color: #166534;
}

.ecommerce-video-status-badge.is-failed {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
}

.ecommerce-video-root.is-result-only .ecommerce-video-compose-card {
  display: none;
}

@media (max-width: 980px) {
  .ecommerce-video-pill-row,
  .ecommerce-video-summary-grid,
  .ecommerce-video-config-grid,
  .ecommerce-video-config-grid-two,
  .ecommerce-video-hero-stats,
  .ecommerce-video-result-media,
  .ecommerce-video-detail-grid,
  .ecommerce-video-compose-shell,
  .ecommerce-video-mode-two-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .ecommerce-video-page {
    gap: 16px;
  }

  .ecommerce-video-hero-banner,
  .ecommerce-video-compose-card,
  .ecommerce-video-result-card {
    border-radius: 22px;
    padding: 0;
  }

  .ecommerce-video-hero-banner,
  .ecommerce-video-compose-card,
  .ecommerce-video-result-card,
  .ecommerce-video-stat-card,
  .ecommerce-video-upload-panel,
  .ecommerce-video-brief-panel,
  .ecommerce-video-config-panel,
  .ecommerce-video-summary-card,
  .ecommerce-video-result-panel,
  .ecommerce-video-result-empty {
    padding: 16px;
  }

  .ecommerce-video-pill-row {
    grid-template-columns: 1fr 1fr;
  }
}

.green-bubble-page {
  display: grid;
  gap: 18px;
}

.green-bubble-hero-card,
.green-bubble-step-grid,
.green-bubble-panel,
.green-bubble-preview-card {
  border-radius: 28px;
}

.green-bubble-hero-card {
  display: grid;
  gap: 18px;
  padding: 26px 22px;
  background: linear-gradient(145deg, rgba(15, 118, 110, 0.96), rgba(16, 185, 129, 0.9));
  color: #ffffff;
  box-shadow: 0 22px 48px rgba(16, 185, 129, 0.18);
}

.green-bubble-hero-card .section-tag,
.green-bubble-hero-card h3,
.green-bubble-hero-card p {
  color: inherit;
}

.green-bubble-hero-card h3 {
  margin: 0;
  font-size: 1.48rem;
}

.green-bubble-hero-desc {
  margin: 8px 0 0;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
}

.green-bubble-pill-row,
.green-bubble-mini-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.green-bubble-pill,
.green-bubble-mini-chip,
.green-bubble-head-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.green-bubble-pill {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.green-bubble-head-chip {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.green-bubble-step-grid {
  display: grid;
  gap: 12px;
}

.green-bubble-step-card,
.green-bubble-panel,
.green-bubble-preview-card {
  padding: 20px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 252, 248, 0.92));
  border: 1px solid rgba(15, 118, 110, 0.08);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.green-bubble-step-card {
  display: grid;
  gap: 8px;
}

.green-bubble-step-card span:first-child {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #dcfce7, #a7f3d0);
  color: #047857;
  font-weight: 800;
}

.green-bubble-step-card strong,
.green-bubble-panel h4,
.green-bubble-preview-card h4 {
  color: #0f172a;
}

.green-bubble-step-card p,
.green-bubble-safe-note,
.green-bubble-option-head span,
.green-bubble-message,
.green-bubble-phone-section p,
.green-bubble-phone-highlight p,
.green-bubble-poster-overlay p {
  margin: 0;
  color: #475569;
  line-height: 1.7;
}

.green-bubble-builder-grid,
.green-bubble-output-grid {
  display: grid;
  gap: 18px;
}

.green-bubble-panel-head,
.green-bubble-preview-head,
.green-bubble-option-head,
.green-bubble-upload-head,
.green-bubble-poster-top,
.green-bubble-poster-main,
.green-bubble-poster-footer,
.green-bubble-phone-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.green-bubble-panel-head h4,
.green-bubble-preview-head h4 {
  margin: 4px 0 0;
}

.green-bubble-form-grid,
.green-bubble-upload-grid,
.green-bubble-stat-grid,
.green-bubble-choice-grid {
  display: grid;
  gap: 12px;
}

.green-bubble-upload-grid,
.green-bubble-stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.green-bubble-upload-card {
  padding: 16px;
  border-radius: 22px;
  background: rgba(240, 253, 244, 0.62);
}

.green-bubble-upload-preview {
  margin-top: 14px;
  min-height: 160px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px dashed rgba(15, 118, 110, 0.2);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.green-bubble-avatar-preview,
.green-bubble-qr-preview {
  aspect-ratio: 1;
}

.green-bubble-upload-preview img,
.green-bubble-phone-avatar img,
.green-bubble-poster-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.green-bubble-qr-preview img,
.green-bubble-poster-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.green-bubble-upload-empty {
  padding: 18px;
  text-align: center;
  color: #64748b;
  line-height: 1.6;
}

.green-bubble-stat-card {
  padding: 16px;
  border-radius: 20px;
  background: rgba(248, 250, 252, 0.9);
}

.green-bubble-stat-card span {
  display: block;
  color: #64748b;
  font-size: 0.84rem;
}

.green-bubble-stat-card strong {
  display: block;
  margin-top: 8px;
  color: #0f172a;
  font-size: 1rem;
}

.green-bubble-option-block {
  display: grid;
  gap: 12px;
}

.green-bubble-option-head {
  align-items: center;
}

.green-bubble-choice-grid,
.green-bubble-ratio-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.green-bubble-choice-btn {
  padding: 14px 12px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  gap: 6px;
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.green-bubble-choice-btn strong {
  color: #0f172a;
  font-size: 0.94rem;
}

.green-bubble-choice-btn span {
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.6;
}

.green-bubble-choice-btn.is-active {
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(16, 185, 129, 0.14);
}

.green-bubble-action-row {
  display: grid;
  gap: 12px;
}

.green-bubble-message {
  min-height: 24px;
  font-size: 0.92rem;
}

.green-bubble-message.is-info {
  color: #0f766e;
}

.green-bubble-message.is-success {
  color: #15803d;
}

.green-bubble-message.is-error {
  color: #b91c1c;
}

.green-bubble-phone-shell {
  width: min(100%, 320px);
  margin: 0 auto;
  padding: 14px;
  border-radius: 34px;
  background: linear-gradient(180deg, #0f172a, #1e293b);
  box-shadow: 0 24px 44px rgba(15, 23, 42, 0.22);
}

.green-bubble-phone-notch {
  width: 96px;
  height: 8px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.green-bubble-phone-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, #f8fafc, #ecfdf5);
}

.green-bubble-phone-avatar,
.green-bubble-poster-avatar {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(145deg, #dcfce7, #a7f3d0);
  color: #047857;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.green-bubble-phone-copy,
.green-bubble-poster-copy {
  display: grid;
  gap: 6px;
}

.green-bubble-phone-copy strong,
.green-bubble-phone-highlight strong,
.green-bubble-phone-section strong,
.green-bubble-poster-copy h5,
.green-bubble-poster-footer strong {
  color: #0f172a;
}

.green-bubble-phone-copy span,
.green-bubble-phone-section span {
  color: #64748b;
  font-size: 0.88rem;
}

.green-bubble-phone-highlight,
.green-bubble-phone-section {
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.green-bubble-phone-section-link strong {
  display: block;
  margin-top: 8px;
}
.green-bubble-poster-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  aspect-ratio: 4 / 5;
  background: linear-gradient(155deg, var(--green-bubble-from), var(--green-bubble-to));
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
}

.green-bubble-poster-shell[data-ratio="3:4"] {
  aspect-ratio: 3 / 4;
}

.green-bubble-poster-shell[data-ratio="1:1"] {
  aspect-ratio: 1 / 1;
}

.green-bubble-poster-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  gap: 18px;
  padding: 22px;
}

.green-bubble-poster-float {
  position: absolute;
  border-radius: 999px;
  filter: blur(4px);
  opacity: 0.44;
}

.green-bubble-poster-float-a {
  right: -28px;
  top: -24px;
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, 0.42);
}

.green-bubble-poster-float-b {
  left: -34px;
  bottom: -40px;
  width: 160px;
  height: 160px;
  background: rgba(16, 185, 129, 0.18);
}

.green-bubble-poster-style-badge,
.green-bubble-poster-qrid,
.green-bubble-poster-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--green-bubble-ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.green-bubble-poster-badge {
  width: fit-content;
}

.green-bubble-poster-main {
  align-items: stretch;
  gap: 18px;
}

.green-bubble-poster-copy {
  flex: 1;
}

.green-bubble-poster-copy h5 {
  margin: 0;
  font-size: 1.46rem;
  line-height: 1.25;
  color: var(--green-bubble-ink);
}

.green-bubble-poster-copy p {
  margin: 0;
  color: var(--green-bubble-muted);
  line-height: 1.7;
}

.green-bubble-mini-chip {
  background: rgba(255, 255, 255, 0.58);
  color: var(--green-bubble-muted);
}

.green-bubble-poster-assets {
  width: 112px;
  display: grid;
  gap: 12px;
}

.green-bubble-poster-avatar {
  width: 100%;
  height: 112px;
  border-radius: 26px;
  background: var(--green-bubble-surface);
}

.green-bubble-poster-qr {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
}

.green-bubble-poster-footer {
  margin-top: auto;
  align-items: end;
  padding: 18px;
  border-radius: 24px;
  background: var(--green-bubble-surface);
}

.green-bubble-poster-footer p {
  margin: 6px 0 0;
  color: var(--green-bubble-muted);
  line-height: 1.7;
}

.green-bubble-poster-cta {
  min-width: 120px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--green-bubble-accent), #34d399);
  color: #ffffff;
  font-weight: 800;
}

.green-bubble-poster-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  background: rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(4px);
}

.green-bubble-poster-overlay strong {
  color: #ffffff;
  font-size: 1.12rem;
}

@media (min-width: 720px) {
  .green-bubble-step-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .green-bubble-builder-grid,
  .green-bubble-output-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 719px) {
  .green-bubble-upload-grid,
  .green-bubble-stat-grid,
  .green-bubble-choice-grid,
  .green-bubble-ratio-grid,
  .green-bubble-form-grid {
    grid-template-columns: 1fr;
  }

  .green-bubble-poster-main,
  .green-bubble-poster-footer {
    flex-direction: column;
  }

  .green-bubble-poster-assets {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .green-bubble-poster-avatar {
    height: auto;
    aspect-ratio: 1;
  }
}
.gbqr-page {
  display: grid;
  gap: 18px;
}

.gbqr-hero,
.gbqr-panel {
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(247, 252, 248, 0.86) 100%);
  border: 1px solid rgba(16, 33, 45, 0.08);
  box-shadow: 0 18px 42px rgba(7, 21, 31, 0.08);
}

.gbqr-hero {
  text-align: center;
  background:
    radial-gradient(circle at top right, rgba(132, 204, 22, 0.22), transparent 34%),
    radial-gradient(circle at left center, rgba(34, 197, 94, 0.16), transparent 38%),
    linear-gradient(160deg, rgba(240, 253, 244, 0.98) 0%, rgba(255, 251, 235, 0.94) 100%);
}

.gbqr-hero h3 {
  font-size: 1.32rem;
}

.gbqr-hero-desc {
  margin: 10px auto 0;
  max-width: 30rem;
  color: var(--ink-700);
  line-height: 1.7;
}

.gbqr-hero-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.gbqr-hero-pills span,
.gbqr-chip,
.gbqr-result-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.gbqr-hero-pills span,
.gbqr-chip {
  background: rgba(255, 255, 255, 0.72);
  color: #166534;
  border: 1px solid rgba(34, 197, 94, 0.16);
}

.gbqr-grid,
.gbqr-main,
.gbqr-side,
.gbqr-result-grid,
.gbqr-result-meta {
  display: grid;
  gap: 18px;
}

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

.gbqr-mode-btn,
.gbqr-choice-btn,
.gbqr-mini-btn {
  border: 1px solid rgba(16, 33, 45, 0.08);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-950);
  border-radius: 20px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.gbqr-mode-btn {
  display: grid;
  gap: 6px;
  padding: 16px;
  text-align: left;
}

.gbqr-mode-btn strong,
.gbqr-choice-btn strong,
.gbqr-mini-btn strong {
  font-size: 0.96rem;
}

.gbqr-mode-btn span,
.gbqr-panel-desc,
.gbqr-tip,
.gbqr-empty-box p,
.gbqr-notice-list,
.gbqr-link-card span,
.gbqr-file-meta span,
.gbqr-summary-grid span,
.gbqr-result-note {
  color: var(--ink-700);
  line-height: 1.6;
}

.gbqr-mode-btn.is-active,
.gbqr-choice-btn.is-active,
.gbqr-mini-btn.is-active {
  border-color: rgba(34, 197, 94, 0.36);
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.98) 0%, rgba(255, 255, 255, 0.96) 100%);
  box-shadow: 0 14px 28px rgba(34, 197, 94, 0.12);
  transform: translateY(-1px);
}

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

.gbqr-upload-btn,
.gbqr-submit-btn,
.gbqr-result .primary-btn {
  width: 100%;
}

.gbqr-file-preview,
.gbqr-preview-body,
.gbqr-result-media {
  display: grid;
}

.gbqr-file-card,
.gbqr-link-card,
.gbqr-empty-box {
  border-radius: 22px;
  border: 1px dashed rgba(16, 33, 45, 0.14);
  background: rgba(248, 252, 250, 0.86);
}

.gbqr-file-card,
.gbqr-link-card {
  padding: 14px;
  gap: 12px;
}

.gbqr-file-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
}

.gbqr-file-image,
.gbqr-preview-image,
.gbqr-result-image {
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.92) 0%, rgba(220, 252, 231, 0.76) 100%);
}

.gbqr-file-image {
  width: 92px;
  height: 92px;
}

.gbqr-preview-image,
.gbqr-result-image {
  min-height: 220px;
}

.gbqr-file-image img,
.gbqr-preview-image img,
.gbqr-result-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 10px;
}

.gbqr-empty-box {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 180px;
  padding: 20px;
  text-align: center;
}

.gbqr-empty-box.is-failed {
  border-color: rgba(239, 68, 68, 0.24);
  background: rgba(254, 242, 242, 0.92);
}

.gbqr-link-card strong,
.gbqr-file-meta strong,
.gbqr-summary-grid strong,
.gbqr-notice-list li::marker,
.gbqr-result-note {
  color: var(--ink-950);
}

.gbqr-link-card strong {
  word-break: break-all;
}

.gbqr-choice-grid,
.gbqr-mini-grid,
.gbqr-summary-grid {
  display: grid;
  gap: 12px;
}

.gbqr-choice-grid {
  grid-template-columns: 1fr;
}

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

.gbqr-choice-btn,
.gbqr-mini-btn {
  padding: 14px;
  text-align: left;
}

.gbqr-sub-head {
  margin-top: 14px;
  margin-bottom: 10px;
  font-weight: 800;
  color: var(--ink-950);
}

.gbqr-summary-grid div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(244, 248, 246, 0.88);
  border: 1px solid rgba(16, 33, 45, 0.06);
}

.gbqr-notice-list {
  margin: 0;
  padding-left: 18px;
}

.gbqr-action-row {
  display: grid;
  gap: 10px;
}

.gbqr-result-badge.is-success {
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
}

.gbqr-result-badge.is-pending {
  background: rgba(251, 191, 36, 0.18);
  color: #b45309;
}

.gbqr-result-badge.is-failed {
  background: rgba(239, 68, 68, 0.14);
  color: #dc2626;
}

.gbqr-result-grid {
  align-items: start;
}

.gbqr-result-note {
  margin: 0;
}

@media (max-width: 420px) {
  .gbqr-mode-bar,
  .gbqr-mini-grid,
  .gbqr-summary-grid {
    grid-template-columns: 1fr;
  }

  .gbqr-file-card {
    grid-template-columns: 1fr;
  }

  .gbqr-file-image {
    width: 100%;
    height: 160px;
  }
}

/* ============================================
   Cover Assistant - Polished Minimalist Redesign
   Prefix: cv-
   ============================================ */

.cv-mode .tool-hero {
  display: none;
}

.cv-mode .tool-detail-head {
  display: none;
}

.cv-mode {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
}

.cv-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  padding: 0;
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.cv-back-link:hover {
  background: #f1f5f9;
  color: #334155;
}

.cv-back-link:active {
  background: #e2e8f0;
  color: #334155;
}

.cv-back-link svg {
  width: 18px;
  height: 18px;
  color: #6366f1;
}

.cv-mode #coverAssistantForm.tool-form,
.cv-mode #coverAssistantForm.panel-card,
.cv-mode #coverAssistantForm.tool-form-card {
  padding: 0 12px 20px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cv-form-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cv-block-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cv-block-head h4 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
}

.cv-block-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cv-block-icon svg {
  width: 16px;
  height: 16px;
}

.cv-block-icon--image {
  background: #e0f2fe;
  color: #0284c7;
}

.cv-block-icon--prompt {
  background: #ede9fe;
  color: #7c3aed;
}

.cv-upload-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.cv-upload-btn,
.cv-remove-btn,
.cv-reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.cv-upload-btn:hover,
.cv-remove-btn:hover,
.cv-reset-btn:hover {
  background: #f1f5f9;
  color: #334155;
}

.cv-upload-btn:active,
.cv-remove-btn:active,
.cv-reset-btn:active {
  background: #e2e8f0;
  color: #334155;
}

.cv-form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

.cv-input-wrap,
.cv-textarea-wrap {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s;
}

.cv-input-wrap:focus-within,
.cv-textarea-wrap:focus-within {
  border-color: #6366f1;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.cv-mode #coverAssistantForm input[type="text"],
.cv-mode #coverAssistantForm textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #1e293b;
  font-size: 0.85rem;
  padding: 12px 14px;
  font-family: inherit;
  box-sizing: border-box;
  line-height: 1.6;
}

.cv-mode #coverAssistantForm input[type="text"]::placeholder,
.cv-mode #coverAssistantForm textarea::placeholder {
  color: #94a3b8;
}

.cv-mode #coverAssistantForm input[type="text"] {
  min-height: 44px;
}

.cv-mode #coverAssistantForm textarea {
  min-height: 112px;
  resize: vertical;
}

.cv-submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}

.cv-submit-btn:active {
  opacity: 0.85;
  transform: scale(0.985);
}

.cv-submit-btn:disabled {
  opacity: 0.5;
  cursor: wait;
  transform: none;
}

.cv-mode #coverMessage.message {
  margin-top: 0;
  padding: 0 2px;
}

.cv-mode .cover-image-preview {
  min-height: 188px;
  border-radius: 12px;
  padding: 14px;
  display: grid;
  place-items: center;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  box-shadow: none;
}

.cv-mode .cover-preview-empty,
.cv-mode .cover-preview-card {
  width: 100%;
}

.cv-mode .cover-preview-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.cv-mode .cover-preview-empty strong,
.cv-mode .cover-preview-empty p,
.cv-mode .cover-preview-meta p {
  margin: 0;
}

.cv-mode .cover-preview-empty p,
.cv-mode .cover-preview-meta p {
  line-height: 1.7;
  color: #64748b;
}

.cv-mode .cover-preview-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #ede9fe;
  color: #7c3aed;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: none;
}

.cv-mode .cover-preview-card {
  display: grid;
  gap: 10px;
}

.cv-mode .cover-preview-card img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: none;
}

.cv-mode .cover-preview-meta {
  display: grid;
  gap: 4px;
}

.cv-mode .cover-preview-meta strong {
  font-size: 0.9rem;
  color: #1e293b;
  word-break: break-word;
}

.cv-mode #coverAssistantResult,
.cv-mode #coverAssistantResult.panel-card {
  padding: 0 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.cv-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

.cv-result-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cv-result-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
  flex-shrink: 0;
}

.cv-result-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
}

.cv-result-summary {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  line-height: 1.7;
}

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

.cv-meta-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 4px;
}

.cv-meta-card span {
  font-size: 0.72rem;
  color: #94a3b8;
}

.cv-meta-card strong {
  font-size: 0.88rem;
  color: #1e293b;
}

.cv-meta-card--accent {
  background: #f8fafc;
}

.cv-block {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cv-block-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.85;
  color: #475569;
  white-space: pre-wrap;
  word-break: break-word;
}

.cv-result-image-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  text-decoration: none;
}

.cv-result-image {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  border-radius: 10px;
  background: #ffffff;
}

.cv-result-actions {
  display: flex;
}

.cv-download-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  transition: opacity 0.2s;
}

.cv-download-btn:hover {
  opacity: 0.92;
}

@media (max-width: 380px) {
  .cv-upload-actions,
  .cv-meta-grid {
    grid-template-columns: 1fr;
  }

  .cv-result-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
