@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;700;800&family=Noto+Sans+KR:wght@400;500;700&display=swap");

:root {
  --bg: #0b0b0b;
  --bg-soft: #121212;
  --surface: #181818;
  --surface-2: #202020;
  --surface-3: #242424;
  --line: #2f2f2f;
  --text: #f7f7f7;
  --muted: #b3b3b3;
  --accent: #1db954;
  --accent-bright: #1ed760;
  --accent-dark: #14933f;
  --status: #95f0b3;
  --danger: #ff7a7a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Noto Sans KR", "Manrope", sans-serif;
  background: radial-gradient(circle at 16% 0%, rgba(30, 215, 96, 0.18), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(34, 197, 94, 0.16), transparent 28%),
    linear-gradient(180deg, #080808 0%, #111111 55%, #0d0d0d 100%);
}

body.is-loading {
  overflow: hidden;
}

.bg-aura {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 10% 30%, rgba(30, 215, 96, 0.08), transparent 28%),
    radial-gradient(circle at 90% 82%, rgba(30, 215, 96, 0.07), transparent 30%);
}

.shell {
  width: min(1180px, calc(100vw - 2rem));
  margin: 1.2rem auto 2rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: 300px 1fr;
  position: relative;
}

.sidebar,
.hero,
.panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(29, 29, 29, 0.95) 0%, rgba(20, 20, 20, 0.96) 100%);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
}

.sidebar {
  padding: 1rem;
  display: grid;
  align-content: start;
  gap: 1.1rem;
  position: sticky;
  top: 1rem;
  height: fit-content;
}

.brand {
  display: flex;
  gap: 0.7rem;
  align-items: center;
}

.brand-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(29, 185, 84, 0.18);
}

.brand-overline {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.brand h1 {
  margin: 0.2rem 0 0;
  font-family: "Manrope", sans-serif;
  font-size: 1.18rem;
  line-height: 1.25;
}

.side-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.93rem;
}

.flow-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.flow-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.52rem 0.56rem;
  border: 1px solid #2b2b2b;
  border-radius: 10px;
  font-size: 0.89rem;
  background: linear-gradient(180deg, #171717 0%, #131313 100%);
}

.flow-list span {
  width: 2rem;
  padding: 0.18rem 0;
  border-radius: 999px;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 800;
  color: #08130b;
  background: var(--accent);
  flex-shrink: 0;
}

.side-card {
  border: 1px solid #29533a;
  border-radius: 12px;
  padding: 0.72rem;
  background: linear-gradient(160deg, rgba(24, 62, 39, 0.52) 0%, rgba(12, 24, 17, 0.9) 100%);
}

.side-card-title {
  margin: 0;
  color: #9eeeb8;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.side-card-body {
  margin: 0.35rem 0 0;
  color: #deffe9;
  font-size: 0.9rem;
}

.content {
  display: grid;
  gap: 1rem;
}

.hero,
.panel {
  padding: 1.15rem;
  animation: fade-up 500ms ease both;
}

.hero {
  background: linear-gradient(120deg, #1a1a1a 0%, #111111 55%, #171717 100%);
}

.hero-overline {
  margin: 0;
  color: #9feab8;
  font-size: 0.76rem;
  letter-spacing: 0.07em;
}

.hero h2 {
  margin: 0.4rem 0 0.65rem;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.6rem, 4.2vw, 2.6rem);
  line-height: 1.15;
}

.hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.hero-meter {
  margin-top: 1rem;
  display: flex;
  align-items: end;
  gap: 0.32rem;
}

.hero-meter span {
  width: 16px;
  background: linear-gradient(180deg, var(--accent-bright) 0%, var(--accent-dark) 100%);
  border-radius: 3px;
  animation: pulse 1.8s ease-in-out infinite;
}

.hero-meter span:nth-child(1) {
  height: 12px;
}

.hero-meter span:nth-child(2) {
  height: 24px;
  animation-delay: 0.15s;
}

.hero-meter span:nth-child(3) {
  height: 18px;
  animation-delay: 0.3s;
}

.hero-meter span:nth-child(4) {
  height: 30px;
  animation-delay: 0.45s;
}

.hero-meter span:nth-child(5) {
  height: 15px;
  animation-delay: 0.6s;
}

.panel h3 {
  margin: 0 0 0.9rem;
  font-size: 1.05rem;
  font-family: "Manrope", sans-serif;
}

.grid {
  display: grid;
  gap: 0.75rem;
}

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

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #d6d6d6;
}

label.wide {
  grid-column: 1 / -1;
}

input,
textarea {
  width: 100%;
  border-radius: 11px;
  border: 1px solid #333;
  background: linear-gradient(180deg, #121212 0%, #181818 100%);
  color: var(--text);
  font: inherit;
  padding: 0.72rem 0.8rem;
}

input::placeholder,
textarea::placeholder {
  color: #7d7d7d;
}

textarea {
  min-height: 105px;
  resize: vertical;
  line-height: 1.52;
}

.notice-card {
  margin-top: 0.95rem;
  border: 1px solid #2a523a;
  border-radius: 16px;
  padding: 0.85rem 0.9rem;
  background: linear-gradient(180deg, rgba(19, 45, 29, 0.72) 0%, rgba(12, 23, 17, 0.95) 100%);
}

.notice-title {
  margin: 0;
  color: #a0eebb;
  font-weight: 800;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
}

.notice-body {
  margin: 0.34rem 0 0;
  color: #deffe9;
  line-height: 1.55;
  font-size: 0.9rem;
}

.notice-body a,
.help a {
  color: #9ef0bb;
}

.plan-panel {
  margin-top: 0.95rem;
  padding: 0.95rem;
  border: 1px solid #2d2d2d;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.92) 0%, rgba(14, 14, 14, 0.96) 100%);
}

.persona-panel {
  margin-top: 0.95rem;
  padding: 0.95rem;
  border: 1px solid #2d2d2d;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.92) 0%, rgba(14, 14, 14, 0.96) 100%);
}

.persona-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.persona-header h4 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 0.98rem;
}

.persona-header p {
  margin: 0.32rem 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.88rem;
}

.persona-grid textarea {
  min-height: 150px;
}

.plan-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.plan-header h4 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 0.98rem;
}

.plan-header p {
  margin: 0;
  color: #a7eabd;
  font-size: 0.88rem;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
}

.plan-option {
  position: relative;
  display: grid;
  gap: 0.2rem;
  min-height: 120px;
  padding: 0.9rem 0.85rem;
  border: 1px solid #313131;
  border-radius: 16px;
  background: linear-gradient(180deg, #171717 0%, #111111 100%);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.plan-option:hover {
  transform: translateY(-2px);
  border-color: #4a4a4a;
}

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

.plan-option:has(input:checked) {
  border-color: rgba(30, 215, 96, 0.78);
  background: linear-gradient(180deg, rgba(24, 56, 35, 0.92) 0%, rgba(14, 31, 20, 0.98) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(30, 215, 96, 0.12),
    0 0 0 1px rgba(30, 215, 96, 0.18),
    0 16px 32px rgba(0, 0, 0, 0.34);
}

.plan-count {
  font-family: "Manrope", sans-serif;
  font-size: 1.18rem;
  font-weight: 800;
  color: #f8f8f8;
}

.plan-runtime {
  font-size: 0.94rem;
  font-weight: 800;
  color: #7ef0a7;
}

.plan-tone {
  margin-top: auto;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

input:focus,
textarea:focus,
button:focus {
  outline: 2px solid rgba(30, 215, 96, 0.6);
  outline-offset: 1px;
}

.actions {
  margin-top: 0.95rem;
  display: flex;
  gap: 0.55rem;
}

.btn {
  border: 1px solid #3a3a3a;
  background: #262626;
  color: #f0f0f0;
  border-radius: 999px;
  padding: 0.62rem 1.02rem;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  cursor: pointer;
  transition: transform 130ms ease, background-color 130ms ease, border-color 130ms ease;
}

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

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.primary,
.btn.accent {
  border-color: var(--accent-dark);
  color: #07220f;
  background: linear-gradient(180deg, var(--accent-bright) 0%, var(--accent) 100%);
}

.btn.subtle {
  border-color: #355443;
  color: #dff8e8;
  background: linear-gradient(180deg, #1f2b24 0%, #152019 100%);
}

.btn.small {
  padding: 0.45rem 0.76rem;
  font-size: 0.76rem;
}

.help {
  margin: 0.78rem 0 0;
  font-size: 0.86rem;
  color: #9e9e9e;
}

.admin-shell {
  width: min(720px, calc(100vw - 1.2rem));
  margin: 2rem auto;
  position: relative;
}

.admin-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.2rem;
  background: linear-gradient(180deg, rgba(26, 26, 26, 0.96) 0%, rgba(16, 16, 16, 0.98) 100%);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.42);
}

.admin-copy {
  margin: 0.9rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.panel-block {
  margin-top: 1rem;
  padding: 0.95rem;
  border: 1px solid #2f2f2f;
  border-radius: 16px;
  background: linear-gradient(180deg, #161616 0%, #111111 100%);
}

.status-card {
  margin-top: 1rem;
  padding: 0.95rem;
  border: 1px solid #2d5a40;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(19, 48, 30, 0.78) 0%, rgba(12, 24, 17, 0.96) 100%);
}

.status-card-title {
  margin: 0;
  color: #a0eebb;
  font-weight: 800;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
}

.status-card-body {
  margin: 0.35rem 0 0;
  color: #deffe9;
  line-height: 1.55;
}

.quotes {
  display: grid;
  gap: 0.85rem;
}

.quote-toolbar {
  margin-bottom: 0.9rem;
  padding: 0.9rem;
  border: 1px solid #2f2f2f;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(19, 19, 19, 0.92) 0%, rgba(14, 14, 14, 0.96) 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.quote-toolbar-actions {
  margin-top: 0;
}

.section-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.9rem;
  max-width: 680px;
}

.quote-card {
  border: 1px solid #343434;
  border-radius: 14px;
  padding: 0.88rem;
  background: linear-gradient(180deg, #171717 0%, #131313 100%);
}

.quote-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.quote-order {
  font-weight: 800;
  font-size: 0.93rem;
}

.quote-chapter {
  color: #8c8c8c;
  font-size: 0.82rem;
}

blockquote {
  margin: 0.72rem 0 0.45rem;
  padding-left: 0.7rem;
  border-left: 3px solid var(--accent);
  font-family: "Manrope", sans-serif;
  font-size: 1.06rem;
  line-height: 1.42;
  color: #f2f2f2;
}

.quote-translation,
.quote-reason,
.quote-signal,
.quote-source {
  margin: 0.3rem 0;
  color: #cccccc;
  font-size: 0.9rem;
  line-height: 1.48;
}

.quote-source a {
  color: #6ee89b;
  text-decoration-color: #3a9f5c;
}

.thought-block {
  margin-top: 0.8rem;
}

.thought-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.thought-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
  color: #d9d9d9;
}

.thought-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.thought-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.54rem;
  border-radius: 999px;
  border: 1px solid #353535;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.thought-badge.empty {
  color: #a8a8a8;
  background: rgba(65, 65, 65, 0.22);
}

.thought-badge.ai {
  color: #cbffe1;
  border-color: #2b6341;
  background: rgba(20, 88, 47, 0.32);
}

.thought-badge.manual {
  color: #f5f5f5;
  border-color: #4a4a4a;
  background: rgba(66, 66, 66, 0.24);
}

.script-runtime-card,
.video-package-card,
.script-viewer-panel {
  margin-bottom: 0.95rem;
  border-radius: 20px;
}

.script-runtime-card {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(55, 81, 64, 0.92);
  background:
    radial-gradient(circle at top right, rgba(29, 185, 84, 0.14) 0%, rgba(29, 185, 84, 0.02) 30%, transparent 56%),
    linear-gradient(180deg, rgba(20, 27, 22, 0.98) 0%, rgba(12, 16, 13, 0.98) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(29, 185, 84, 0.06),
    0 16px 42px rgba(0, 0, 0, 0.28);
}

.script-dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.8rem;
}

.script-runtime-label {
  margin: 0;
  color: #9feab8;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.script-dashboard-copy {
  margin: 0.32rem 0 0;
  color: #b7beb9;
  line-height: 1.55;
  font-size: 0.92rem;
}

.runtime-metric-grid {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.runtime-metric {
  min-height: 106px;
  padding: 0.88rem 0.9rem;
  border: 1px solid rgba(61, 61, 61, 0.94);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(21, 21, 21, 0.96) 0%, rgba(13, 13, 13, 0.98) 100%);
}

.runtime-metric-primary {
  border-color: rgba(52, 120, 78, 0.95);
  background:
    linear-gradient(180deg, rgba(18, 49, 29, 0.55) 0%, rgba(11, 19, 14, 0.98) 100%);
}

.runtime-metric-delta {
  border-color: rgba(107, 100, 74, 0.92);
  background:
    linear-gradient(180deg, rgba(53, 41, 18, 0.32) 0%, rgba(18, 16, 12, 0.98) 100%);
}

.runtime-metric-label {
  margin: 0;
  color: #98a49c;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.runtime-metric-value {
  margin: 0.52rem 0 0;
  color: #f7f7f7;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  line-height: 1.12;
  font-weight: 800;
}

.script-runtime-summary {
  margin: 0.85rem 0 0;
  color: #e6ece8;
  line-height: 1.55;
  font-size: 0.96rem;
}

.video-package-card {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(62, 86, 69, 0.95);
  background:
    radial-gradient(circle at top left, rgba(29, 185, 84, 0.12) 0%, rgba(29, 185, 84, 0.03) 28%, transparent 54%),
    linear-gradient(180deg, rgba(17, 20, 18, 0.98) 0%, rgba(10, 11, 10, 0.98) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(29, 185, 84, 0.05),
    0 14px 32px rgba(0, 0, 0, 0.24);
}

.video-package-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.9rem;
}

.video-package-block {
  padding: 0.95rem;
  border: 1px solid rgba(56, 56, 56, 0.95);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(22, 22, 22, 0.98) 0%, rgba(13, 13, 13, 0.98) 100%);
}

.video-package-block.tone-accent {
  border-color: rgba(49, 115, 73, 0.95);
}

.video-package-block.tone-neutral {
  border-color: rgba(78, 78, 78, 0.95);
}

.video-package-block.tone-warm {
  border-color: rgba(118, 96, 54, 0.94);
  background: linear-gradient(180deg, rgba(32, 24, 14, 0.7) 0%, rgba(16, 14, 10, 0.98) 100%);
}

.video-package-header {
  margin: -0.05rem -0.05rem 0;
  padding: 0.82rem 0.86rem 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.video-package-content {
  margin-top: 0.75rem;
  padding-top: 0.78rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.video-package-block-wide {
  grid-column: 1 / -1;
}

.video-package-kicker {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #8edfae;
}

.video-package-heading {
  margin: 0.38rem 0 0;
  font-size: 1.1rem;
  font-weight: 900;
  color: #fcfffd;
  letter-spacing: 0.01em;
}

.video-package-description {
  margin: 0.34rem 0 0;
  color: #8e9892;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.55;
}

.video-package-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.video-package-list li {
  display: flex;
  align-items: start;
  gap: 0.7rem;
  padding: 0.8rem 0.84rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.03) 100%);
  color: #f3f3f3;
  line-height: 1.48;
  font-size: 0.95rem;
}

.video-package-item-index {
  flex-shrink: 0;
  width: 2rem;
  padding: 0.18rem 0 0.16rem;
  border-radius: 999px;
  text-align: center;
  font-size: 0.73rem;
  font-weight: 800;
  color: #08130b;
  background: linear-gradient(180deg, #62f392 0%, #1db954 100%);
}

.video-package-item-body {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.video-package-item-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.16rem 0.42rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: #98a8a0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.video-package-item-text {
  display: block;
  min-width: 0;
  color: #ffffff;
  overflow-wrap: anywhere;
  font-size: 1.06rem;
  font-weight: 800;
  line-height: 1.5;
}

.video-package-copy {
  margin: 0;
  padding: 1rem 1.05rem;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 248, 230, 0.07) 0%, rgba(255, 248, 230, 0.03) 100%);
  color: #f7f2e6;
  line-height: 1.72;
  font-size: 1.04rem;
  font-weight: 650;
  overflow-wrap: anywhere;
  border-left: 3px solid rgba(198, 162, 90, 0.7);
}

.script-viewer-panel {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(61, 61, 61, 0.95);
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.98) 0%, rgba(10, 10, 10, 0.98) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.script-viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.9rem;
  margin-bottom: 0.95rem;
}

.script-viewer {
  max-height: min(880px, 70vh);
  overflow: auto;
  display: grid;
  gap: 0.85rem;
  padding-right: 0.2rem;
}

.script-viewer-empty {
  margin: 0;
  padding: 1.15rem;
  border-radius: 16px;
  border: 1px dashed rgba(71, 71, 71, 0.95);
  color: #8f9491;
  background: rgba(255, 255, 255, 0.03);
}

.script-scene {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(56, 56, 56, 0.95);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(20, 20, 20, 0.98) 0%, rgba(13, 13, 13, 0.98) 100%);
}

.script-scene-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.script-scene-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.8rem;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(98, 243, 146, 0.18) 0%, rgba(29, 185, 84, 0.12) 100%);
  border: 1px solid rgba(62, 160, 96, 0.68);
  color: #d7ffe5;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.script-scene-order {
  color: #8f9691;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.script-scene-body {
  margin: 0;
  color: #f1f1f1;
  font-size: 1.05rem;
  line-height: 1.92;
  letter-spacing: -0.01em;
}

.script-cue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.16rem 0.48rem;
  margin: 0 0.22rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  vertical-align: middle;
}

.cue-pause {
  color: #fff4da;
  border: 1px solid rgba(180, 144, 70, 0.72);
  background: rgba(132, 102, 40, 0.24);
}

.cue-slow {
  color: #def8e8;
  border: 1px solid rgba(78, 154, 108, 0.72);
  background: rgba(43, 88, 58, 0.28);
}

.cue-emphasis {
  color: #f1f1f1;
  border: 1px solid rgba(118, 118, 118, 0.72);
  background: rgba(70, 70, 70, 0.3);
}

.status {
  min-height: 1.4rem;
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  color: var(--status);
  font-size: 0.93rem;
}

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

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
  background:
    radial-gradient(circle at center, rgba(29, 185, 84, 0.18) 0%, rgba(29, 185, 84, 0.06) 22%, transparent 45%),
    rgba(4, 4, 4, 0.82);
  backdrop-filter: blur(10px);
}

.loading-card {
  width: min(520px, 100%);
  border: 1px solid rgba(62, 62, 62, 0.95);
  border-radius: 28px;
  padding: 1.4rem 1.2rem 1.25rem;
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.98) 0%, rgba(12, 12, 12, 0.98) 100%);
  box-shadow:
    0 0 0 1px rgba(29, 185, 84, 0.12),
    0 32px 80px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(29, 185, 84, 0.18);
  text-align: center;
}

.loading-kicker {
  margin: 0;
  color: #9feab8;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.loading-visual {
  margin: 1rem auto 1.15rem;
  display: grid;
  justify-items: center;
  gap: 1rem;
}

.loading-vinyl {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  position: relative;
  background:
    radial-gradient(circle at center, #0f0f0f 0 18px, #1db954 18px 22px, #0b0b0b 22px 100%),
    repeating-radial-gradient(circle at center, rgba(255, 255, 255, 0.08) 0 2px, rgba(0, 0, 0, 0) 2px 6px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 0 18px rgba(255, 255, 255, 0.05),
    0 0 0 12px rgba(29, 185, 84, 0.08);
  animation: spin-record 1.9s linear infinite;
}

.loading-vinyl::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.loading-vinyl::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(29, 185, 84, 0.24);
  animation: ripple 1.6s ease-out infinite;
}

.loading-vinyl-core {
  position: absolute;
  inset: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f4f4f4;
  transform: translate(-50%, -50%);
}

.loading-eq {
  height: 58px;
  display: flex;
  align-items: end;
  gap: 0.38rem;
}

.loading-eq span {
  width: 12px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, #62f392 0%, #1db954 100%);
  box-shadow: 0 0 14px rgba(29, 185, 84, 0.35);
  transform-origin: center bottom;
  animation: equalizer 950ms ease-in-out infinite;
}

.loading-eq span:nth-child(2) {
  animation-delay: 0.08s;
}

.loading-eq span:nth-child(3) {
  animation-delay: 0.16s;
}

.loading-eq span:nth-child(4) {
  animation-delay: 0.24s;
}

.loading-eq span:nth-child(5) {
  animation-delay: 0.32s;
}

.loading-eq span:nth-child(6) {
  animation-delay: 0.4s;
}

.loading-eq span:nth-child(7) {
  animation-delay: 0.48s;
}

.loading-card h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.1;
}

.loading-card p:last-child {
  margin: 0.55rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.hidden {
  display: none;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scaleY(0.82);
  }

  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes spin-record {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes ripple {
  0% {
    opacity: 0.65;
    transform: scale(0.94);
  }

  100% {
    opacity: 0;
    transform: scale(1.12);
  }
}

@keyframes equalizer {
  0%,
  100% {
    height: 14px;
    opacity: 0.5;
  }

  50% {
    height: 58px;
    opacity: 1;
  }
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
    width: min(1180px, calc(100vw - 1rem));
    margin: 0.7rem auto 1.3rem;
  }

  .sidebar {
    position: static;
  }

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

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

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

  .quote-toolbar {
    align-items: stretch;
  }

  .script-dashboard-head,
  .script-viewer-header,
  .script-scene-head {
    flex-direction: column;
    align-items: stretch;
  }

  .runtime-metric-grid,
  .video-package-grid {
    grid-template-columns: 1fr;
  }

  .runtime-metric {
    min-height: 92px;
  }

  .script-viewer {
    max-height: none;
    overflow: visible;
  }

  .script-scene {
    padding: 0.9rem;
  }

  .script-scene-body {
    font-size: 0.98rem;
    line-height: 1.8;
  }

  .hero,
  .panel,
  .sidebar {
    border-radius: 16px;
    padding: 0.95rem;
  }

  .loading-card {
    padding: 1.1rem 1rem;
    border-radius: 22px;
  }

  .loading-vinyl {
    width: 96px;
    height: 96px;
  }

  .loading-eq {
    gap: 0.28rem;
  }

  .loading-eq span {
    width: 10px;
  }
}
