:root {
  --ink: #111318;
  --deep: #111b28;
  --panel: #ffffff;
  --paper: #f6f4ef;
  --line: #dbe1ea;
  --muted: #5f6b7a;
  --gold: #d7af63;
  --blue: #6f879f;
  --green: #17834a;
  --red: #b44747;
  --shadow: 0 24px 70px rgba(17, 24, 39, 0.12);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(215, 175, 99, 0.16), transparent 30%),
    linear-gradient(215deg, rgba(111, 135, 159, 0.18), transparent 34%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}

button,
a {
  font: inherit;
}

.studio-shell {
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

.studio-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0;
  color: #4c5b6c;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-family: var(--serif);
  line-height: 0.98;
}

h1 {
  margin-top: 8px;
  font-size: clamp(2.6rem, 5vw, 5.7rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 4.3rem);
}

h3 {
  margin-top: 5px;
  font-size: 1.05rem;
}

.studio-status {
  display: grid;
  gap: 5px;
  min-width: 210px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 46px rgba(17, 24, 39, 0.08);
}

.studio-status span,
.studio-overview span,
.data-source {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.studio-status strong,
.studio-overview strong {
  font-size: 1rem;
}

.studio-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.studio-overview article,
.panel,
.game-rail,
.game-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.studio-overview article {
  display: grid;
  gap: 6px;
  padding: 17px 18px;
}

.studio-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.32fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.game-rail {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.rail-heading {
  display: grid;
  gap: 6px;
}

.rail-heading p {
  color: var(--muted);
  line-height: 1.35;
}

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

.game-button {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 10px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.game-button:hover,
.game-button:focus-visible,
.game-button.active {
  border-color: rgba(215, 175, 99, 0.7);
  background: #fff8e8;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.08);
  outline: none;
  transform: translateX(3px);
}

.game-button img {
  width: 66px;
  height: 66px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--deep);
}

.game-button strong {
  display: block;
  margin-bottom: 4px;
}

.game-button span {
  color: var(--muted);
  font-size: 0.86rem;
}

.game-detail {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.logo-frame {
  overflow: hidden;
  border-radius: 8px;
  background: var(--deep);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.logo-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.detail-copy {
  display: grid;
  gap: 12px;
}

.detail-copy p {
  max-width: 820px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.48;
}

.status-pill {
  width: fit-content;
  border: 1px solid rgba(23, 131, 74, 0.24);
  border-radius: 999px;
  background: #eaf7ef;
  color: var(--green);
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.status-pill.needs-url {
  border-color: rgba(180, 71, 71, 0.24);
  background: #fff0f0;
  color: var(--red);
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.studio-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid #111318;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  padding: 10px 15px;
  font-weight: 850;
  text-decoration: none;
}

.studio-action.secondary {
  border-color: #cfd8e5;
  background: #f8f9fb;
  color: var(--ink);
}

.studio-action.disabled {
  border-color: #d4dae3;
  background: #e9edf3;
  color: #738094;
  pointer-events: none;
}

.detail-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  padding: 18px;
}

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

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

.drafts-panel {
  display: grid;
  align-content: start;
}

.draft-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.draft-stat,
.draft-row {
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  background: #fbfcfd;
}

.draft-stat {
  display: grid;
  gap: 7px;
  min-height: 96px;
  padding: 14px;
}

.draft-stat.wide {
  grid-column: 1 / -1;
}

.draft-stat span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.draft-stat strong {
  font-family: var(--serif);
  font-size: 1.8rem;
  line-height: 1;
}

.draft-stat p,
.draft-empty,
.draft-row p,
.draft-row span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

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

.draft-empty {
  border: 1px dashed #cfd8e5;
  border-radius: 8px;
  background: #fbfcfd;
  padding: 14px;
}

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

.draft-row.submitted {
  border-color: rgba(23, 131, 74, 0.28);
  background: #f4fbf6;
}

.draft-row.publication-ready {
  border-color: rgba(215, 175, 99, 0.36);
  background: #fffaf0;
}

.draft-row.published {
  border-color: rgba(111, 135, 159, 0.4);
  background: #f4f8fb;
}

.draft-row.needs-revision {
  border-color: rgba(180, 71, 71, 0.24);
  background: #fff8f3;
}

.draft-row strong {
  display: block;
  margin-bottom: 3px;
}

.draft-row span {
  display: block;
  margin-top: 4px;
}

.draft-state-pill {
  display: inline-flex !important;
  width: fit-content;
  margin: 0 8px 0 0 !important;
  border-radius: 999px;
  background: #edf2f8;
  color: #38475a;
  padding: 4px 8px;
  font-size: 0.72rem !important;
  font-weight: 900;
  text-transform: uppercase;
}

.draft-row.submitted .draft-state-pill {
  background: #e2f5e8;
  color: var(--green);
}

.draft-row.needs-revision .draft-state-pill {
  background: #ffe9df;
  color: #a2412e;
}

.draft-row.publication-ready .draft-state-pill {
  background: #fff0bf;
  color: #806019;
}

.draft-row.published .draft-state-pill {
  background: #e9f0f7;
  color: #496177;
}

.draft-row-actions {
  display: grid;
  gap: 8px;
}

.draft-link,
.draft-state-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid #cfd8e5;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px 11px;
  font-size: 0.86rem;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.draft-link:hover,
.draft-link:focus-visible,
.draft-state-button:hover,
.draft-state-button:focus-visible {
  border-color: rgba(215, 175, 99, 0.7);
  background: #fff8e8;
  outline: none;
}

.draft-state-button {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  cursor: pointer;
}

.draft-state-button.secondary {
  background: #fff;
  border-color: #cfd8e5;
  color: var(--ink);
}

.draft-state-button:hover,
.draft-state-button:focus-visible {
  background: #2c3340;
  color: #fff;
}

.draft-state-button:disabled {
  border-color: #d4dae3;
  background: #e9edf3;
  color: #738094;
  cursor: wait;
}

.metric-card {
  display: grid;
  gap: 7px;
  min-height: 104px;
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  background: #fbfcfd;
  padding: 14px;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.metric-card strong {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1;
}

.metric-card p {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.ready-list,
.workflow-list {
  display: grid;
  gap: 10px;
}

.ready-item,
.workflow-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid #e4eaf2;
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.ready-dot {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #eaf7ef;
  color: var(--green);
  font-weight: 950;
}

.ready-item.pending .ready-dot {
  background: #fff5dc;
  color: #8a641e;
}

.ready-item strong,
.workflow-item strong {
  display: block;
  margin-bottom: 3px;
}

.ready-item p,
.workflow-item p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.38;
}

.workflow-panel {
  box-shadow: none;
}

.workflow-step {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--deep);
  color: #fff;
  font-weight: 950;
}

@media (max-width: 980px) {
  .studio-shell {
    width: min(100% - 28px, 760px);
  }

  .studio-header,
  .detail-hero {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .studio-header {
    display: grid;
  }

  .studio-overview,
  .studio-grid,
  .detail-sections,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .game-rail {
    position: static;
  }

  .detail-hero {
    display: grid;
  }

  .logo-frame {
    max-width: 220px;
  }
}

@media (max-width: 620px) {
  .studio-shell {
    width: min(100% - 20px, 560px);
    padding-top: 18px;
  }

  h1 {
    font-size: 2.6rem;
  }

  h2 {
    font-size: 2.15rem;
  }

  .game-detail,
  .game-rail,
  .panel {
    padding: 14px;
  }

  .action-bar {
    display: grid;
  }

  .studio-action {
    width: 100%;
  }

  .draft-summary,
  .draft-row {
    grid-template-columns: 1fr;
  }

  .draft-link,
  .draft-state-button {
    width: 100%;
  }
}
