:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f0f3f6;
  --surface-3: #e8edf2;
  --ink: #0f172a;
  --muted: #5b6776;
  --accent: #1fb98b;
  --accent-dark: #14946f;
  --accent-2: #f59e0b;
  --warning: #f59e0b;
  --radius: 16px;
  --shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(31, 185, 139, 0.08), transparent 45%),
    radial-gradient(circle at 80% 15%, rgba(245, 158, 11, 0.06), transparent 40%),
    var(--bg);
  min-height: 100vh;
  font-size: 17px;
  line-height: 1.65;
}

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

.app {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}

.sidebar {
  width: 280px;
  background: var(--surface);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  position: sticky;
  top: 0;
  height: 100%;
  min-height: 100vh;
  align-self: stretch;
}

.sidebar__brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: #041013;
  font-weight: 700;
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.brand-title {
  font-weight: 700;
  font-size: 18px;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
}

.sidebar__profile {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent-2);
  color: #141414;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.avatar--lg {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  font-size: 22px;
}

.profile-name {
  font-weight: 600;
}

.profile-meta {
  font-size: 12px;
  color: var(--muted);
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--muted);
  transition: all 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
  background: var(--surface-3);
  color: var(--ink);
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.nav-group__title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8a96a6;
  margin: 6px 0 4px;
}

.sidebar__cta {
  margin-top: auto;
}

.cta-card {
  background: linear-gradient(135deg, rgba(31, 185, 139, 0.18), rgba(31, 185, 139, 0.04));
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(31, 185, 139, 0.24);
}

.cta-title {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.cta-value {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
}

.main {
  flex: 1;
  padding: 32px 36px 60px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.topbar__title h1 {
  margin: 4px 0 6px;
  font-size: 30px;
}

.topbar__title p {
  color: var(--muted);
  margin: 0;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow {
  color: #7c8796;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.icon-button {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.icon-button span {
  width: 22px;
  height: 2px;
  background: var(--ink);
}

.page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: center;
}

.hero h2 {
  font-size: 36px;
  margin: 10px 0;
}

.hero__card {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.lead {
  font-size: 16px;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 18px;
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.grid--5 {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

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

.panel {
  background: var(--surface);
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow);
  animation: fadeUp 0.5s ease both;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel--ghost {
  border: 1px dashed rgba(15, 23, 42, 0.2);
  background: transparent;
  box-shadow: none;
}

.panel--accent {
  border: 1px solid rgba(31, 185, 139, 0.35);
  background: linear-gradient(160deg, rgba(31, 185, 139, 0.12), rgba(31, 185, 139, 0.04));
}

.panel--error {
  border: 1px solid rgba(220, 38, 38, 0.35);
  background: linear-gradient(160deg, rgba(248, 113, 113, 0.18), rgba(248, 113, 113, 0.05));
  margin-bottom: 12px;
}

.panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.panel__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.panel__footer {
  margin-top: 12px;
}

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

.button {
  padding: 12px 18px;
  background: var(--accent);
  color: #ffffff;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  min-height: 44px;
}

.button--ghost {
  background: transparent;
  border: 1px solid rgba(15, 23, 42, 0.18);
  color: var(--ink);
}

.button--light {
  background: var(--accent-2);
  color: #1f2937;
}

.pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 14px;
}

.pill--outline {
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: transparent;
}

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chip--active {
  background: rgba(31, 185, 139, 0.16);
  color: var(--accent-dark);
}

.link {
  color: var(--accent);
  font-weight: 600;
}

.progress {
  height: 10px;
  background: rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.metric {
  font-size: 30px;
  font-weight: 700;
}

.metric-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.chapter-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.chapter-kpi {
  background: var(--surface-2);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  padding: 12px;
}

.chapter-kpi__value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.chapter-kpi__label {
  color: var(--muted);
  font-size: 13px;
}

.chapter-progress {
  margin-top: 12px;
}

.chapter-progress__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  align-items: center;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.08);
}

.list-item:last-child {
  border-bottom: none;
}

.list-title {
  font-weight: 600;
}

.list-item--actions {
  align-items: flex-start;
}

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

.chapter-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.85), rgba(240, 243, 246, 0.75));
}

.chapter-card__main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chapter-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chapter-card__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chapter-card__summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chapter-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
}

.chapter-card__progress {
  max-width: 420px;
}

.chapter-card__actions {
  display: flex;
  align-items: center;
}

.chapter-card__button {
  min-width: 130px;
  min-height: 44px;
}

.chapter-chip {
  border: 1px solid transparent;
}

.chapter-chip--done {
  background: rgba(34, 197, 94, 0.15);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.25);
}

.chapter-chip--progress {
  background: rgba(245, 158, 11, 0.16);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.28);
}

.chapter-chip--draft {
  background: rgba(15, 23, 42, 0.08);
  color: var(--ink);
  border-color: rgba(15, 23, 42, 0.12);
}

.divider {
  height: 1px;
  background: rgba(15, 23, 42, 0.08);
  margin: 20px 0;
}

.callout {
  background: linear-gradient(140deg, rgba(245, 158, 11, 0.18), rgba(31, 185, 139, 0.12));
  padding: 20px;
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.callout--compact {
  padding: 16px;
}

.project-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.phase-card {
  background: var(--surface-2);
  padding: 16px;
  border-radius: var(--radius);
  text-align: center;
}

.phase-card--active {
  border: 1px solid rgba(31, 185, 139, 0.35);
}

.phase-card--locked {
  opacity: 0.5;
}

.textarea,
.input,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: var(--surface-3);
  color: var(--ink);
  margin-top: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.editor {
  background: #f8fafc;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-family: 'Newsreader', serif;
}

.cover-mock {
  height: 260px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(31, 185, 139, 0.22), rgba(255, 255, 255, 0.6));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  border: 1px solid rgba(31, 185, 139, 0.3);
}

.cover-title {
  font-size: 22px;
  font-weight: 700;
}

.cover-sub {
  color: var(--muted);
  margin: 8px 0;
}

.cover-tag {
  background: rgba(15, 23, 42, 0.08);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.cover-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.cover-option {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  padding: 14px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.cover-option input {
  accent-color: var(--accent);
}

.cover-preview {
  border-radius: 18px;
  min-height: 240px;
  padding: 24px;
  display: flex;
  align-items: flex-end;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.cover-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.cover-card {
  border-radius: 16px;
  padding: 14px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.cover-card__meta {
  color: #0f172a;
}

.cover-card__actions {
  margin-top: 10px;
}

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

.cover-summary__numbers {
  display: flex;
  gap: 16px;
  font-size: 16px;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal--open {
  display: flex;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
}

.modal__content {
  position: relative;
  width: min(520px, 92vw);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal__content--wide {
  width: min(980px, 94vw);
}

.modal__content--fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border-radius: 0;
  padding: 0;
  gap: 0;
  box-shadow: none;
  overflow: hidden;
}

.modal__content--fullscreen .modal__header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  flex: 0 0 auto;
  background: var(--surface);
}

.modal__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px;
}

.modal__footer {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding: 14px 24px 18px;
  background: var(--surface);
  border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.modal__actions {
  margin-top: 0;
  justify-content: flex-end;
}

.generation-options {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.generation-option {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: var(--surface);
}

.generation-option input[type='radio'] {
  margin-top: 3px;
}

.generation-option__title {
  font-weight: 700;
}

.generation-option--recommended {
  border-color: rgba(31, 185, 139, 0.45);
  background: rgba(31, 185, 139, 0.08);
}

.generation-option--danger {
  border-color: rgba(220, 38, 38, 0.28);
  background: rgba(248, 113, 113, 0.08);
}

.chapter-health {
  min-height: 150px;
}

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

.chapter-manuscript {
  min-height: 420px;
  line-height: 1.7;
  font-family: 'Newsreader', serif;
  font-size: 19px;
  background: #f7fafc;
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal__close {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
}

.card {
  padding: 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 140px;
}

.card--ghost {
  background: transparent;
  border: 1px dashed rgba(15, 23, 42, 0.2);
  align-items: center;
  justify-content: center;
}

.card__plus {
  font-size: 28px;
  font-weight: 700;
}

.mission {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.timeline__item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 16px;
  align-items: start;
}

.timeline__marker {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.2);
  margin-top: 6px;
}

.timeline__item.is-done .timeline__marker,
.timeline__item.is-active .timeline__marker {
  background: var(--accent);
}

.timeline__item.is-locked {
  opacity: 0.5;
}

.tour {
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius);
}

.tour__slides {
  display: grid;
}

.tour__slide {
  display: none;
}

.tour__slide.is-active {
  display: block;
}

.tour__controls {
  margin-top: 20px;
  display: flex;
  gap: 12px;
}

.wizard__actions {
  margin-top: 18px;
  display: flex;
  gap: 12px;
}

.wizard__progress--spaced {
  margin-bottom: 16px;
}

.wizard-genres {
  margin-top: 10px;
}

.card--select {
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
}

.card--select input[type='radio'] {
  margin-top: 2px;
}

.genre-icon {
  font-size: 22px;
  line-height: 1;
}

.wizard__progress {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile__card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  padding: 16px;
  border-radius: var(--radius);
  margin-bottom: 18px;
}

.economy-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.economy-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.economy-table th,
.economy-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.1);
  vertical-align: top;
}

.economy-table th {
  font-size: 12px;
  color: #7c8796;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

.panel > .button {
  align-self: flex-start;
  margin-top: 4px;
}

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

.hidden {
  display: none;
}

.label {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.chat {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 18px;
}

.chat__sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.chat__main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat__thread {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat__message {
  display: flex;
}

.chat__message--bot {
  justify-content: flex-start;
}

.chat__message--user {
  justify-content: flex-end;
}

.chat__bubble {
  background: var(--surface-2);
  padding: 14px 16px;
  border-radius: 16px;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat__message--user .chat__bubble {
  background: rgba(31, 185, 139, 0.16);
  border: 1px solid rgba(31, 185, 139, 0.3);
}

.chat__input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

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

.split__pane {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.focus-body {
  background: #f7f9fb;
}

.focus-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 40px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.focus-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.focus-actions {
  display: flex;
  gap: 12px;
}

.focus {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 96px);
  padding: 40px 20px 80px;
}

.focus__shell {
  max-width: 720px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.focus__card {
  background: #ffffff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.focus__input {
  font-size: 18px;
  padding: 14px 16px;
}

.focus__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.focus__shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

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

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 40;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .icon-button {
    display: inline-flex;
  }

  .main {
    padding: 26px 20px 60px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar__actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .topbar__title h1 {
    font-size: 24px;
  }

  .hero h2 {
    font-size: 28px;
  }

  .modal__content--fullscreen .modal__header,
  .modal__body,
  .modal__footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .modal__actions {
    flex-direction: column;
  }

  .modal__actions form,
  .modal__actions .button {
    width: 100%;
  }

  .chapter-ai-actions .button {
    width: 100%;
  }

  .chapter-card {
    grid-template-columns: 1fr;
  }

  .chapter-card__actions {
    justify-content: flex-start;
  }

  .chapter-card__button {
    width: 100%;
  }
}

.editing-hero .panel {
  min-height: 120px;
}

.editing-template-grid,
.editing-format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.editing-template-card,
.editing-format-card {
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 14px;
  padding: 14px;
  background: var(--surface-2);
  display: grid;
  gap: 8px;
  cursor: pointer;
}

.editing-template-card input,
.editing-format-card input {
  accent-color: var(--accent);
}

.editing-template-card--locked,
.editing-format-card--locked {
  opacity: 0.56;
  cursor: not-allowed;
}

.editing-template-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.editing-format-title {
  font-weight: 700;
}

.editing-summary-bar {
  border: 1px solid rgba(31, 185, 139, 0.28);
  background: linear-gradient(130deg, rgba(31, 185, 139, 0.14), rgba(245, 158, 11, 0.08));
  border-radius: 14px;
  padding: 14px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.editing-asset-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.button--danger {
  background: #b91c1c;
  color: #fff;
  border-color: #991b1b;
}

.button--danger:hover {
  background: #991b1b;
}

.profile-studio-hero {
  background: linear-gradient(140deg, rgba(31, 185, 139, 0.13), rgba(245, 158, 11, 0.1));
}

.profile-studio-head {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.profile-studio-progress {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.profile-task-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}
