:root {
  --ink: #101c46;
  --muted: #60708f;
  --line: rgba(80, 103, 146, 0.18);
  --line-strong: rgba(100, 93, 221, 0.34);
  --panel: rgba(255, 255, 255, 0.72);
  --panel-solid: rgba(255, 255, 255, 0.84);
  --panel-soft: rgba(244, 248, 255, 0.68);
  --primary: #5e6fe8;
  --primary-dark: #4f60d7;
  --shadow: 0 18px 52px rgba(70, 94, 143, 0.16);
  --shadow-soft: 0 14px 34px rgba(48, 69, 115, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    Arial,
    sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(115deg, rgba(244, 248, 255, 0.96), rgba(232, 246, 250, 0.9) 48%, rgba(248, 245, 255, 0.92)),
    url("Page%201.jpg") center / cover no-repeat fixed;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: rgba(248, 251, 255, 0.7);
  backdrop-filter: blur(18px) saturate(0.9);
}

body::after {
  content: "";
  position: fixed;
  left: -8vw;
  right: -8vw;
  bottom: -18vh;
  z-index: -1;
  height: 38vh;
  background:
    radial-gradient(65% 110% at 65% 18%, rgba(135, 119, 232, 0.28), transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.9));
  border-radius: 50% 50% 0 0;
  filter: blur(2px);
}

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

.app-shell {
  min-height: 100vh;
  padding: 52px 24px 64px;
}

.workspace {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.topbar,
.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.topbar {
  margin-bottom: 26px;
  text-align: left;
}

.step-nav {
  display: flex;
  gap: 10px;
  margin: 0 0 20px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.step-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.5);
  color: #263764;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.step-link span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: var(--radius);
  background: rgba(94, 111, 232, 0.14);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.step-link:hover,
.step-link.is-active {
  border-color: rgba(255, 255, 255, 0.62);
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-1px);
}

.step-link:hover span,
.step-link.is-active span {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.return-nav {
  margin: -8px 0 20px;
}

.return-topic-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(80, 103, 146, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
  color: #263764;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.return-topic-button:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(77, 96, 216, 0.24);
}

.eyebrow {
  margin: 0 0 8px;
  color: #51627f;
  font-size: 13px;
  font-weight: 800;
}

h1,
h2 {
  margin: 0;
  line-height: 1.18;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 800;
}

h1 span {
  color: #6b55dc;
}

h2 {
  font-size: 22px;
}

.topbar-copy {
  max-width: 620px;
  margin: 14px 0 0;
  color: #263764;
  font-size: 16px;
  line-height: 1.7;
  font-weight: 700;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
}

.input-panel,
.result-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.input-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
}

.result-panel {
  min-height: 360px;
  padding: 20px;
}

.form-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
}

.persona-field {
  min-height: 100%;
}

.field {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.field span,
.field legend {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.field-hint {
  margin: -4px 0 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 700;
}

textarea,
input[type="text"],
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

textarea {
  min-height: 180px;
  resize: vertical;
  padding: 16px;
  line-height: 1.65;
  font-weight: 600;
}

input[type="text"] {
  height: 48px;
  padding: 0 14px;
}

select {
  height: 48px;
  padding: 0 42px 0 14px;
  font-weight: 800;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #5e6fe8 50%),
    linear-gradient(135deg, #5e6fe8 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 20px,
    calc(100% - 14px) 20px;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

textarea:focus,
input[type="text"]:focus,
select:focus {
  border-color: rgba(94, 111, 232, 0.74);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 0 0 4px rgba(94, 111, 232, 0.13);
}

textarea::placeholder,
input::placeholder {
  color: #96a3bb;
}

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

.option-card {
  position: relative;
  display: grid;
  min-height: 58px;
  gap: 4px;
  align-items: center;
  align-content: center;
  justify-content: center;
  border: 1px solid rgba(100, 115, 153, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  box-shadow: 0 10px 22px rgba(70, 94, 143, 0.08);
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-card span {
  color: inherit;
  font-size: 14px;
  font-weight: 800;
}

.option-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.option-card:has(input:checked) {
  border-color: rgba(255, 255, 255, 0.62);
  background: linear-gradient(135deg, #28a8e3, #75cee4);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(40, 168, 227, 0.22);
}

.option-card:has(input:checked) small {
  color: rgba(255, 255, 255, 0.9);
}

.option-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(70, 94, 143, 0.12);
}

.primary-button,
.ghost-button,
.copy-button {
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.primary-button {
  align-self: center;
  min-width: 220px;
  min-height: 52px;
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 10px 22px rgba(77, 96, 216, 0.26);
}

.primary-button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(77, 96, 216, 0.32);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  transform: none;
}

.submit-row {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.count-field {
  min-width: 260px;
  max-width: 320px;
}

.count-select-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.count-points {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(80, 103, 146, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
  color: #5e6fe8;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
}

.script-submit-row {
  margin-top: 4px;
}

.script-points-text {
  min-width: 144px;
}

.ghost-button,
.copy-button {
  min-height: 40px;
  padding: 0 14px;
  color: #263764;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(80, 103, 146, 0.18);
  box-shadow: var(--shadow-soft);
}

.ghost-button:hover,
.copy-button:hover {
  color: #ffffff;
  background: var(--primary);
  transform: translateY(-1px);
}

.topic-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: topic;
}

.topic-card {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(80, 103, 146, 0.16);
  border-radius: var(--radius);
  background: var(--panel-solid);
  box-shadow: 0 12px 28px rgba(70, 94, 143, 0.09);
  overflow: hidden;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.topic-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(120deg, #28a8e3, #5e6fe8, #75cee4, #28a8e3);
  background-size: 240% 240%;
  opacity: 0;
  pointer-events: none;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: opacity 180ms ease;
}

.topic-card:hover,
.topic-card:focus-within {
  border-color: rgba(94, 111, 232, 0.36);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 40px rgba(70, 94, 143, 0.15);
  transform: translateY(-2px);
}

.topic-card:hover::before,
.topic-card:focus-within::before {
  opacity: 1;
  animation: topicBorderFlow 2.8s linear infinite;
}

.topic-number {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #8f6bea, #75cee4);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.topic-content {
  min-width: 0;
}

.topic-content strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}

.topic-content p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.topic-direction-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-right: 8px;
  padding: 0 8px;
  border: 1px solid rgba(40, 168, 227, 0.36);
  border-radius: 6px;
  color: #0694b7;
  background: rgba(40, 168, 227, 0.1);
  font-size: 12px;
  font-weight: 900;
  vertical-align: 1px;
}

.copy-button {
  min-width: 72px;
  box-shadow: none;
}

.topic-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  opacity: 0;
  transform: translateX(10px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.topic-card:hover .topic-actions,
.topic-card:focus-within .topic-actions {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.topic-loading-card {
  min-height: 108px;
  overflow: hidden;
}

.topic-loading-visual,
.script-loading-visual {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 76px;
  overflow: hidden;
  padding: 10px 12px;
  border: 1px solid rgba(78, 121, 255, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(241, 246, 255, 0.74)),
    repeating-linear-gradient(0deg, rgba(117, 206, 228, 0.08) 0 1px, transparent 1px 10px);
}

.topic-loading-visual::before,
.script-loading-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(143, 107, 234, 0.18), transparent);
  transform: translateX(-100%);
  animation: loadingSweep 1.7s ease-in-out infinite;
}

.data-row {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(80, 103, 146, 0.1);
}

.data-row::before {
  content: "010011 101100 011010 110101 001101 101011 010110 110010";
  position: absolute;
  top: 50%;
  left: 0;
  min-width: 200%;
  color: rgba(78, 121, 255, 0.78);
  font: 900 10px/1 "Consolas", "Microsoft YaHei", monospace;
  letter-spacing: 1px;
  white-space: nowrap;
  transform: translateY(-50%);
  animation: dataStream 2.4s linear infinite;
}

.row-b::before,
.row-d::before {
  animation-duration: 3s;
  animation-direction: reverse;
  color: rgba(117, 206, 228, 0.82);
}

.row-a {
  width: 92%;
}

.row-b {
  width: 76%;
}

.row-c {
  width: 100%;
}

.row-d {
  width: 84%;
}

.row-e {
  width: 66%;
}

.topic-loading-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  min-height: 36px;
  border: 1px solid rgba(80, 103, 146, 0.16);
  border-radius: var(--radius);
  color: var(--primary);
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 900;
}

.create-button {
  color: #ffffff;
  background: var(--primary);
  border-color: transparent;
  min-width: 96px;
}

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

.points-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
  z-index: 260;
}

.points-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.points-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 28, 70, 0.24);
  backdrop-filter: blur(8px);
}

.points-modal-card {
  position: relative;
  width: min(460px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid rgba(80, 103, 146, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 54px rgba(48, 69, 115, 0.22);
  backdrop-filter: blur(22px);
}

.points-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  color: #60708f;
  background: rgba(94, 111, 232, 0.1);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.points-modal-close:hover {
  color: #ffffff;
  background: var(--primary);
  transform: translateY(-1px);
}

.points-modal-copy {
  margin: 12px 0 0;
  color: #51627f;
  font-size: 15px;
  line-height: 1.7;
  font-weight: 700;
}

.points-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

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

.points-confirm-button {
  min-width: 140px;
  min-height: 44px;
}

.script-form-layout {
  gap: 20px;
}

.script-panel-heading {
  display: grid;
  gap: 8px;
  padding-bottom: 2px;
}

.script-panel-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.2;
}

.script-panel-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  font-weight: 700;
}

.field-step-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.field-step-title b {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #28a8e3, #75cee4);
  font-size: 14px;
  line-height: 1;
}

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

.script-type-card {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px;
  text-align: left;
}

.script-type-icon {
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1;
}

.script-type-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.script-type-copy strong {
  color: inherit;
  font-size: 14px;
  line-height: 1.2;
}

.script-type-copy small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-type-card:has(input:checked) .script-type-copy small {
  color: rgba(255, 255, 255, 0.9);
}

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

.element-sections {
  display: grid;
  gap: 14px;
}

.element-section {
  display: grid;
  gap: 8px;
}

.element-section p {
  margin: 0;
  color: #51627f;
  font-size: 13px;
  font-weight: 800;
}

.chip-card {
  position: relative;
  cursor: pointer;
}

.chip-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-card span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(100, 115, 153, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.52);
  color: #263764;
  font-size: 13px;
  font-weight: 800;
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.chip-card:hover span,
.chip-card:has(input:checked) span {
  border-color: rgba(255, 255, 255, 0.62);
  background: linear-gradient(135deg, #28a8e3, #75cee4);
  color: #ffffff;
  transform: translateY(-1px);
}

.length-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(80, 103, 146, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.46);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.length-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #263764;
  font-size: 14px;
  font-weight: 800;
}

.quick-lengths {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-lengths button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(80, 103, 146, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
  color: #51627f;
  font-size: 12px;
  font-weight: 800;
}

.quick-lengths button:hover,
.quick-lengths button.is-active {
  border-color: transparent;
  background: var(--primary);
  color: #ffffff;
}

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

.script-result {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.script-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(80, 103, 146, 0.16);
  border-radius: var(--radius);
  background: var(--panel-solid);
  box-shadow: 0 12px 28px rgba(70, 94, 143, 0.09);
}

.script-loading-card {
  overflow: hidden;
}

.script-loading-card .script-card-title-group {
  flex: 1 1 auto;
  width: 100%;
}

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

.script-card-title-group {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.script-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.45;
}

.script-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.script-type-pill,
.script-count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(80, 103, 146, 0.16);
  border-radius: 999px;
  background: rgba(242, 247, 255, 0.78);
  color: #4d5f82;
  font-size: 12px;
  font-weight: 800;
}

.script-type-pill {
  border-color: rgba(78, 121, 255, 0.22);
  background: rgba(78, 121, 255, 0.1);
  color: var(--primary);
}

.script-topic-title {
  min-width: 0;
  color: #324566;
  font-weight: 800;
}

.script-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
}

.script-card-actions button {
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(80, 103, 146, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #445677;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(70, 94, 143, 0.06);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.script-card-actions button:hover,
.script-card-actions button.is-favorited {
  transform: translateY(-1px);
  border-color: rgba(78, 121, 255, 0.34);
  background: var(--primary);
  color: #ffffff;
}

.script-body,
.script-body-block {
  padding: 18px;
  border: 1px solid rgba(80, 103, 146, 0.12);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(239, 246, 255, 0.72));
  color: #263764;
  font-size: 15px;
  line-height: 1.85;
  font-weight: 650;
  white-space: normal;
}

.shooting-tips {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(80, 103, 146, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
}

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

.shooting-tips ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.65;
}

.script-card-footer {
  display: flex;
  justify-content: flex-end;
  color: #6b7791;
  font-size: 13px;
  font-weight: 800;
}

.title-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 22px;
}

.title-modal.is-open {
  display: grid;
}

.title-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 35, 61, 0.28);
  backdrop-filter: blur(10px);
}

.title-modal-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  width: min(680px, 100%);
  max-height: calc(100vh - 44px);
  min-height: 280px;
  padding: 28px;
  border: 1px solid rgba(80, 103, 146, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px rgba(48, 70, 116, 0.24);
  overflow: hidden;
}

.title-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(80, 103, 146, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #5d6d8d;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.title-modal-copy-all {
  position: absolute;
  top: 18px;
  right: 60px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(80, 103, 146, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #445677;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.title-modal-copy-all:hover:not(:disabled) {
  border-color: rgba(78, 121, 255, 0.34);
  background: var(--primary);
  color: #ffffff;
}

.title-modal-copy-all:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.title-modal-close:hover {
  border-color: rgba(78, 121, 255, 0.28);
  color: var(--primary);
}

.title-modal-card h2 {
  margin: 0;
  padding-right: 132px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.35;
}

.title-modal-subtitle {
  margin: -8px 0 0;
  color: #536582;
  font-size: 14px;
  font-weight: 700;
}

.title-modal-body {
  display: grid;
  gap: 14px;
  justify-items: center;
  align-content: center;
  min-height: 170px;
  min-width: 0;
  overflow: auto;
  text-align: center;
}

.title-modal-body.is-loading,
.title-modal-body.has-results {
  align-content: start;
  justify-items: stretch;
  max-height: min(640px, calc(100vh - 180px));
  padding-right: 6px;
  text-align: left;
}

.title-modal-icon {
  font-size: 34px;
  line-height: 1;
}

.title-modal-body p {
  margin: 0;
  max-width: 460px;
  color: #405576;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.7;
}

.title-modal-generate {
  min-width: 160px;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(78, 121, 255, 0.24);
}

.title-modal-generate:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(78, 121, 255, 0.3);
}

.title-loading-list,
.title-result-list {
  display: grid;
  gap: 12px;
}

.title-skeleton-card,
.title-result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 78px;
  padding: 16px;
  border: 1px solid rgba(80, 103, 146, 0.14);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.86);
}

.title-skeleton-copy,
.title-result-content {
  display: grid;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.title-skeleton-line {
  display: block;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(80, 103, 146, 0.14), rgba(80, 103, 146, 0.24), rgba(80, 103, 146, 0.14));
  background-size: 220% 100%;
  animation: titleSkeleton 1.35s ease-in-out infinite;
}

.title-skeleton-line.short {
  width: 74px;
}

.title-skeleton-line.long {
  width: min(430px, 82%);
}

.title-skeleton-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.title-skeleton-actions span {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(80, 103, 146, 0.18);
}

@keyframes titleSkeleton {
  from {
    background-position: 100% 0;
  }

  to {
    background-position: -100% 0;
  }
}

@keyframes dataStream {
  from {
    transform: translate(-48%, -50%);
  }

  to {
    transform: translate(0, -50%);
  }
}

@keyframes loadingSweep {
  0% {
    transform: translateX(-100%);
  }

  55%,
  100% {
    transform: translateX(100%);
  }
}

@keyframes topicBorderFlow {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 240% 50%;
  }
}

.title-result-index {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(78, 121, 255, 0.12);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.title-result-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

.title-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.title-tags span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(78, 121, 255, 0.08);
  color: #50617e;
  font-size: 12px;
  font-weight: 750;
}

.title-result-card button {
  min-width: 56px;
  min-height: 34px;
  border: 1px solid rgba(80, 103, 146, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: #445677;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.title-result-card button:hover {
  border-color: rgba(78, 121, 255, 0.34);
  background: var(--primary);
  color: #ffffff;
}

.empty-state {
  display: grid;
  gap: 8px;
  min-height: 320px;
  align-content: center;
  justify-items: center;
  padding: 24px;
  border: 1px dashed rgba(100, 115, 153, 0.28);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--muted);
  text-align: center;
}

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

.empty-state span {
  max-width: 420px;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .app-shell {
    padding: 36px 16px 48px;
  }

  .result-panel {
    min-height: 420px;
  }

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

  .script-card-head {
    flex-direction: column;
  }

  .script-card-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .count-select-wrap {
    grid-template-columns: 1fr;
  }

  .count-points {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .topbar,
  .result-header {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 30px;
  }

  .topbar-copy {
    font-size: 14px;
  }

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

  .topic-card {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .topic-loading-status {
    grid-column: 1 / -1;
    justify-content: flex-start;
    width: 100%;
    padding: 0 13px;
  }

  .topic-actions {
    grid-column: 2;
    width: 100%;
    flex-direction: column;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .copy-button {
    width: 100%;
  }

  .submit-row {
    align-items: stretch;
  }

  .count-field,
  .primary-button {
    width: 100%;
    max-width: none;
  }

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

  .script-card {
    padding: 16px;
  }

  .script-card-actions button {
    flex: 1 1 calc(50% - 8px);
  }

  .script-body-block {
    padding: 14px;
  }

  .script-card-footer {
    justify-content: flex-start;
  }

  .points-modal-card {
    padding: 22px 18px 18px;
  }

  .points-modal-actions {
    justify-content: stretch;
  }

  .points-modal-actions > * {
    width: 100%;
  }
}
