:root {
  color-scheme: light;
  --bg: #faf8f3;
  --bg-soft: #f4f0ea;
  --paper: #faf8f3;
  --paper-strong: #fffdf9;
  --border: #d8d1c7;
  --border-strong: rgba(110, 92, 83, 0.18);
  --text: #6e5c53;
  --muted: #8b7a72;
  --muted-soft: #aa9d95;
  --terracotta: #d7b2a3;
  --terracotta-deep: #b89083;
  --sage: #a8b3a1;
  --sage-deep: #8d9b87;
  --blush: #d7b2a3;
  --shadow-soft: 0 14px 34px rgba(110, 92, 83, 0.05);
  --shadow-lift: 0 18px 40px rgba(110, 92, 83, 0.08);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(215, 178, 163, 0.16), transparent 30%),
    radial-gradient(circle at top right, rgba(168, 179, 161, 0.18), transparent 24%),
    linear-gradient(180deg, #faf8f3 0%, #f7f4ee 46%, #f3eee7 100%);
}

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

button {
  cursor: pointer;
}

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

textarea {
  resize: vertical;
}

.app-shell {
  min-height: 100vh;
}

.studio-shell {
  min-height: 100vh;
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 18px 120px;
}

.studio-shell--single {
  max-width: 1160px;
}

.studio-column {
  max-width: 980px;
  margin: 0 auto;
}

.topbar,
.panel,
.pose-tray,
.loading-card,
.fatal-card,
.overlay-card,
.drawer {
  border: 1px solid rgba(217, 208, 199, 0.86);
  background: rgba(250, 248, 243, 0.94);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  border-radius: 24px;
  margin-bottom: 20px;
}

.topbar--studio {
  padding: 14px 18px 16px;
  display: grid;
  gap: 14px;
}

.topbar__fields--studio {
  display: grid;
  grid-template-columns: minmax(280px, 1.55fr) repeat(3, minmax(110px, 0.45fr)) minmax(220px, 1fr);
  gap: 12px;
}

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

.topbar__actions--studio {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar__status {
  display: grid;
  gap: 2px;
}

.topbar__status strong,
.eyebrow,
.panel__eyebrow,
.section-card__eyebrow,
.pose-card__eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-soft);
}

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

.topbar__status span {
  font-size: 13px;
  color: var(--muted);
}

.topbar__status--success strong {
  color: var(--sage-deep);
}

.topbar__status--error strong {
  color: var(--terracotta-deep);
}

.inline-field,
.field {
  display: grid;
  gap: 7px;
}

.inline-field span,
.field span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.inline-field input,
.inline-field select,
.field input,
.field select,
.field textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(217, 208, 199, 0.9);
  background: rgba(255, 253, 250, 0.96);
  padding: 12px 14px;
  min-height: 48px;
  transition: border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.inline-field input:focus,
.inline-field select:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(215, 178, 163, 0.9);
  box-shadow: 0 0 0 4px rgba(215, 178, 163, 0.14);
}

.inline-field--title input {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.field textarea {
  min-height: 92px;
}

.field--full {
  grid-column: 1 / -1;
}

.field__subtle {
  font-size: 12px;
  color: var(--muted-soft);
}

.topbar-btn,
.micro-btn,
.section-add-btn,
.chip-toggle,
.saved-item,
.structure-item,
.transition-node,
.flow-chip {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(217, 208, 199, 0.95);
  background: rgba(255, 253, 250, 0.94);
  color: var(--text);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.topbar-btn,
.micro-btn,
.section-add-btn {
  padding: 11px 16px;
}

.topbar-btn:hover,
.micro-btn:hover,
.section-add-btn:hover,
.chip-toggle:hover,
.saved-item:hover,
.structure-item:hover,
.flow-chip:hover,
.transition-node:hover {
  transform: translateY(-1px);
  border-color: rgba(215, 178, 163, 0.76);
  box-shadow: 0 10px 22px rgba(47, 33, 29, 0.06);
}

.topbar-btn--primary,
.micro-btn--primary {
  background: linear-gradient(135deg, rgba(215, 178, 163, 0.98), rgba(168, 179, 161, 0.96));
  border-color: transparent;
  color: #53443d;
}

.topbar-btn--ghost,
.micro-btn,
.chip-toggle {
  color: var(--muted);
}

.topbar-btn:disabled,
.micro-btn:disabled,
.icon-btn:disabled {
  opacity: 0.45;
  transform: none;
  cursor: not-allowed;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(217, 208, 199, 0.95);
  background: rgba(255, 253, 250, 0.95);
  color: var(--muted);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(215, 178, 163, 0.78);
}

.icon-btn--danger:hover {
  border-color: rgba(215, 178, 163, 0.9);
  color: var(--terracotta-deep);
}

.mode-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(217, 208, 199, 0.9);
  background: rgba(244, 240, 234, 0.92);
}

.panel {
  border-radius: var(--radius-xl);
  padding: 22px;
}

.panel--paper {
  background:
    radial-gradient(circle at top right, rgba(215, 178, 163, 0.08), transparent 26%),
    rgba(250, 248, 243, 0.98);
}

.panel--canvas {
  padding: 26px 28px 34px;
  min-height: calc(100vh - 160px);
}

.panel__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.panel__header--compact {
  align-items: center;
}

.panel__header h2,
.overlay-card__header h2,
.drawer__header h2,
.empty-canvas h3,
.detail-section h3,
.review-section h3,
.review-sheet h2,
.loading-card h2,
.fatal-card h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.6rem, 2vw, 2.3rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  font-weight: 600;
}

.panel__hint,
.journey-section__caption,
.detail-copy,
.review-section__note,
.review-block__note,
.material-card p,
.library-card p,
.empty-state {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--muted);
}

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

.tag,
.note-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(217, 208, 199, 0.96);
  background: rgba(255, 253, 249, 0.92);
  font-size: 12px;
  color: var(--muted);
}

.tag--soft,
.note-chip {
  background: rgba(242, 238, 232, 0.92);
}

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

.overview-stats div,
.insight-card {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(217, 208, 199, 0.96);
  background: rgba(255, 253, 249, 0.92);
}

.overview-stats strong,
.insight-card strong {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
  color: var(--text);
}

.overview-stats span,
.insight-card span {
  font-size: 12px;
  color: var(--muted);
}

.saved-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.saved-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  text-align: left;
}

.saved-item--active {
  border-color: rgba(215, 178, 163, 0.78);
  background: rgba(255, 250, 245, 0.98);
}

.review-section__index {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(217, 208, 199, 0.96);
  color: var(--muted);
  font-size: 12px;
}

.saved-item {
  min-width: 0;
}

.saved-item strong,
.material-card strong,
.review-block__header strong,
.review-pose strong,
.library-card strong,
.flow-line-card strong {
  display: block;
  font-weight: 700;
}

.saved-item span,
.flow-line-card span,
.review-block__header span,
.review-pose span,
.library-card span {
  font-size: 12px;
  color: var(--muted);
}

.canvas-stage__header {
  align-items: end;
}

.canvas-stage__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.canvas-paper {
  min-height: 100%;
  padding: 4px 0 18px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.18)),
    repeating-linear-gradient(180deg, rgba(216, 209, 199, 0.12) 0, rgba(216, 209, 199, 0.12) 1px, transparent 1px, transparent 34px);
}

.canvas-paper--empty {
  background: transparent;
}

.canvas-footer {
  margin-top: 20px;
}

.compose-controls {
  display: grid;
  gap: 16px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(216, 209, 199, 0.92);
}

.compose-controls__header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.compose-controls__header h3 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.8rem;
  font-weight: 600;
}

.compose-controls__actions,
.inline-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.composer-pill {
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(216, 209, 199, 0.96);
  background: rgba(255, 253, 249, 0.96);
  color: var(--muted);
}

.composer-plus {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(216, 209, 199, 0.96);
  background: rgba(250, 248, 243, 0.96);
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
}

.composer-insert {
  display: grid;
  place-items: center;
  padding: 6px 0 2px;
}

.empty-canvas {
  min-height: 240px;
  display: grid;
  place-items: center;
  gap: 18px;
  text-align: center;
  padding: 48px 18px 54px;
  border-radius: var(--radius-xl);
  border: 1px dashed rgba(217, 208, 199, 0.96);
  background: rgba(255, 252, 247, 0.72);
}

.empty-canvas__line {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  color: var(--text);
}

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

.journey-section {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px;
  padding: 14px 0;
  animation: rise-fade 0.48s ease both;
}

.journey-section__marker {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(217, 208, 199, 0.96);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  background: rgba(255, 253, 250, 0.9);
  position: sticky;
  top: 110px;
}

.journey-section__panel,
.flow-line-card,
.review-section,
.review-block,
.material-card,
.library-card,
.detail-section,
.curve-wrap,
.progression-card,
.analysis-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(217, 208, 199, 0.96);
  background: rgba(255, 253, 249, 0.94);
}

.journey-section__panel,
.review-section,
.material-card,
.detail-section,
.progression-card,
.analysis-card,
.flow-line-card {
  padding: 18px;
}

.journey-section--active .journey-section__panel {
  box-shadow: var(--shadow-soft);
}

.journey-section__header,
.flow-block__header,
.detail-section__header,
.review-block__header,
.library-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.journey-section__actions,
.flow-block__actions,
.detail-section__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.section-card__title,
.flow-block__title {
  width: 100%;
  border: none;
  padding: 0;
  background: transparent;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1;
  font-weight: 600;
}

.section-card__title:focus,
.flow-block__title:focus {
  outline: none;
}

.journey-section__editor,
.journey-section__preview,
.materials-panel,
.flow-line-stack,
.review-section__blocks {
  display: grid;
  gap: 16px;
}

.journey-section__preview {
  width: 100%;
  padding: 18px 0 0;
  border: none;
  background: transparent;
  text-align: left;
}

.journey-preview-stack {
  display: grid;
  gap: 8px;
}

.journey-preview-block {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(217, 208, 199, 0.94);
  background: rgba(248, 246, 242, 0.92);
}

.journey-preview-block strong {
  display: block;
  margin-bottom: 5px;
}

.journey-preview-block span {
  font-size: 13px;
  color: var(--muted);
}

.journey-section__meta,
.detail-grid,
.filter-grid,
.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

.atelier-flow-block {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(217, 208, 199, 0.96);
  background: rgba(248, 246, 242, 0.88);
}

.flow-block__meta {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.pose-track {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

.pose-card {
  min-width: 220px;
  max-width: 260px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(217, 208, 199, 0.96);
  background: rgba(255, 253, 250, 0.98);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  overflow: hidden;
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
  animation: rise-fade 0.42s ease both;
}

.pose-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.pose-card--selected {
  border-color: rgba(215, 178, 163, 0.84);
  box-shadow: 0 14px 36px rgba(215, 178, 163, 0.14);
}

.pose-card__main {
  border: none;
  background: transparent;
  text-align: left;
  padding: 14px;
  display: grid;
  gap: 6px;
}

.pose-card__main strong {
  font-size: 1rem;
}

.pose-card__main > span {
  font-size: 13px;
  color: var(--muted);
}

.pose-card__main small {
  font-size: 12px;
  color: var(--muted);
}

.pose-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pose-card__actions {
  padding: 10px 10px 10px 0;
  display: grid;
  align-content: start;
}

.transition-node {
  padding: 9px 13px;
  min-height: 38px;
  font-size: 12px;
  color: var(--muted);
}

.transition-node--selected {
  border-color: rgba(215, 178, 163, 0.82);
  color: var(--terracotta-deep);
}

.drop-slot {
  min-width: 112px;
  min-height: 40px;
  display: inline-grid;
  place-items: center;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  border: 1px dashed rgba(217, 208, 199, 0.98);
  color: var(--muted-soft);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.drop-slot.is-drop-target {
  border-color: rgba(215, 178, 163, 0.9);
  background: rgba(215, 178, 163, 0.12);
  color: var(--terracotta-deep);
}

.empty-slot-card {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(217, 208, 199, 0.98);
  background: rgba(255, 253, 249, 0.78);
  color: var(--muted);
}

.pose-tray {
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.pose-tray__bar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(217, 208, 199, 0.92);
}

.pose-tray__bar h3 {
  margin: 0 0 4px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.8rem;
  font-weight: 600;
}

.pose-tray__bar-actions,
.pose-tray__utility,
.materials-tabs,
.review-mode__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pose-tray__body {
  display: grid;
  gap: 16px;
  padding: 18px 22px 22px;
  max-height: calc(100vh - 150px);
  overflow: auto;
}

.materials-panel__body {
  display: grid;
  gap: 14px;
}

.materials-panel__body--stack {
  grid-template-columns: 1fr;
}

.material-card,
.library-card {
  display: grid;
  gap: 12px;
}

.material-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.library-grid {
  display: grid;
  gap: 12px;
}

.library-card__body {
  display: grid;
  gap: 10px;
}

.library-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-section {
  display: grid;
  gap: 14px;
}

.detail-section--selected {
  background:
    radial-gradient(circle at top right, rgba(216, 183, 167, 0.08), transparent 28%),
    rgba(255, 253, 249, 0.96);
}

.detail-list,
.analysis-list,
.mini-list ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.detail-list li,
.analysis-list li,
.mini-list li {
  margin-bottom: 6px;
}

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

.focus-chip-group__label {
  width: 100%;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-soft);
}

.chip-toggle {
  padding: 9px 13px;
  font-size: 12px;
}

.chip-toggle--active {
  background: rgba(215, 178, 163, 0.16);
  border-color: rgba(215, 178, 163, 0.72);
  color: var(--terracotta-deep);
}

.overlay-shell {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
}

.overlay-scrim {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(47, 33, 29, 0.2);
}

.overlay-card,
.drawer {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100vw - 30px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: var(--radius-xl);
}

.overlay-card--medium {
  width: min(680px, calc(100vw - 30px));
}

.overlay-card__header,
.drawer__header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 24px 24px 0;
}

.overlay-card__header + *,
.drawer__header + * {
  padding: 18px 24px 24px;
}

.drawer {
  width: min(560px, calc(100vw - 30px));
}

.drawer--left {
  justify-self: start;
}

.saved-list--overlay {
  padding: 18px 24px 24px;
}

.loading-card,
.fatal-card {
  max-width: 560px;
  margin: 72px auto;
  padding: 30px;
  border-radius: var(--radius-xl);
}

.review-sheet {
  display: grid;
  gap: 18px;
}

.review-sheet__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.review-sheet__meta p {
  margin: 0;
  display: grid;
  gap: 4px;
  min-width: 160px;
}

.review-sheet__meta strong {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-soft);
}

.review-sheet__notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-readthrough {
  display: grid;
  gap: 14px;
}

.review-section__header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.review-section__header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.review-section__blocks {
  display: grid;
  gap: 10px;
}

.review-block__poses {
  display: grid;
  gap: 8px;
}

.review-pose {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(248, 246, 242, 0.88);
}

.curve-wrap {
  padding: 18px;
  overflow: hidden;
}

.curve-axis {
  display: flex;
  justify-content: space-between;
  color: var(--muted-soft);
  font-size: 12px;
}

.curve-axis--y {
  margin-bottom: 8px;
}

.curve-axis--x {
  position: relative;
  min-height: 24px;
  margin-top: 10px;
}

.curve-axis--x span {
  position: absolute;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--muted-soft);
}

.curve-svg {
  width: 100%;
  height: auto;
}

.curve-baseline,
.curve-section-anchor line {
  stroke: rgba(217, 208, 199, 0.86);
  stroke-width: 1;
}

.curve-area {
  fill: rgba(215, 178, 163, 0.16);
}

.curve-line {
  fill: none;
  stroke: rgba(168, 179, 161, 0.98);
  stroke-width: 3;
}

.curve-point {
  fill: var(--paper-strong);
  stroke: rgba(215, 178, 163, 0.92);
  stroke-width: 2;
  transition: transform 0.24s ease, fill 0.24s ease;
}

.curve-point:hover,
.curve-point--selected {
  fill: rgba(215, 178, 163, 0.96);
}

.progression-grid {
  display: grid;
  gap: 12px;
}

.progression-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.progression-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.progression-label i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.progression-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(20px, 1fr);
  gap: 6px;
}

.progression-cell {
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(217, 208, 199, 0.96);
  background: rgba(242, 238, 232, 0.86);
}

.progression-cell--active {
  background: color-mix(in srgb, var(--progression-color) 28%, white);
  border-color: color-mix(in srgb, var(--progression-color) 50%, white);
}

.progression-cell--selected {
  box-shadow: inset 0 0 0 2px rgba(47, 33, 29, 0.12);
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}

.heatmap-card {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(217, 208, 199, 0.96);
  background: rgba(255, 253, 250, 0.98);
  box-shadow: inset 0 0 0 999px rgba(215, 178, 163, 0.09);
}

.heatmap-card strong {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.6rem;
}

.flow-line-stack {
  display: grid;
  gap: 12px;
}

.flow-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.flow-chip {
  padding: 9px 13px;
  font-size: 13px;
}

.flow-chip--selected {
  border-color: rgba(215, 178, 163, 0.82);
  color: var(--terracotta-deep);
}

.flow-arrow {
  color: var(--muted-soft);
}

.mini-list {
  display: grid;
  gap: 8px;
}

.review-score {
  display: inline-flex;
  align-items: end;
  gap: 4px;
  font-family: "Cormorant Garamond", Georgia, serif;
}

.review-score strong {
  font-size: 2.4rem;
}

.review-score span {
  color: var(--muted);
}

.pose-illustration-placeholder {
  min-height: 120px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: rgba(242, 238, 232, 0.92);
  color: var(--muted-soft);
}

.is-linked-hover {
  box-shadow: 0 0 0 3px rgba(215, 178, 163, 0.16);
}

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

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

@media (max-width: 1220px) {
  .topbar__fields--studio {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inline-field--title,
  .inline-field--theme {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .studio-shell {
    padding: 10px;
  }

  .overview-stats,
  .insight-grid,
  .journey-section__meta,
  .detail-grid,
  .flow-block__meta,
  .overview-grid,
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .journey-section {
    grid-template-columns: 1fr;
  }

  .journey-section__marker {
    position: static;
  }

  .panel--canvas {
    min-height: auto;
    padding: 18px;
  }

  .canvas-paper {
    padding: 0;
    background: transparent;
  }
}

@media (max-width: 640px) {
  .topbar--studio {
    border-radius: 20px;
    padding: 12px;
  }

  .topbar__fields--studio {
    grid-template-columns: 1fr;
  }

  .topbar__secondary {
    align-items: stretch;
  }

  .mode-switch,
  .topbar__actions--studio,
  .empty-canvas__actions,
  .material-card,
  .detail-section__actions {
    width: 100%;
  }

  .topbar__actions--studio,
  .material-card {
    justify-content: space-between;
  }

  .topbar__actions--studio .topbar-btn,
  .empty-canvas__actions .topbar-btn {
    flex: 1 1 calc(50% - 6px);
  }

  .pose-track {
    flex-direction: column;
    align-items: stretch;
  }

  .pose-card,
  .drop-slot,
  .transition-node {
    width: 100%;
    max-width: none;
  }

  .progression-row {
    grid-template-columns: 1fr;
  }

  .curve-wrap {
    padding: 12px;
  }
}
