/* Compose page: a step panel on the left, the field in the middle, three score cards on the right.
   Every class is prefixed cp- (showcase.css and gallery.css are loaded too, and share generic names). */
.c-head { padding-bottom: 10px; }
.composer-page .foot { max-width: 1480px; margin: 0 auto; }

.cp-wrap {
  max-width: 1480px; margin: 0 auto; padding: 34px 40px 40px;
  display: grid; grid-template-columns: 340px minmax(0, 1fr) 320px; gap: 36px; align-items: start;
}

/* ---- panel ---- */
.cp-panel {
  padding: 20px 22px 20px; border-radius: 22px;
  background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10), 0 40px 110px -50px rgba(0, 0, 0, .8);
}
.cp-step { padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, .07); transition: opacity .25s, max-height .3s; }
.cp-step:first-child { border-top: 0; padding-top: 2px; }
.cp-step.cp-off { opacity: .28; pointer-events: none; }
.cp-h { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .17em;
  text-transform: uppercase; color: var(--text-2); margin-bottom: 11px; }
.cp-h span { display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; font-size: 10px; letter-spacing: 0;
  color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.cp-h em { font-style: normal; color: var(--text-3); letter-spacing: .1em; }
.cp-step.cp-flash .cp-h span { animation: cpflash 1.4s ease; }
@keyframes cpflash { 0%, 100% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); } 30% { box-shadow: inset 0 0 0 1px #ffaf28, 0 0 0 4px rgba(255, 175, 40, .25); } }

.cp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-chips .cp-sep { flex-basis: 100%; font-size: 10.5px; color: var(--text-3); letter-spacing: .08em; margin: 6px 0 1px; }
.cp-chip, .cp-rel {
  border: 0; font: inherit; font-size: 12px; color: var(--text-2); background: rgba(255, 255, 255, .05); cursor: pointer;
  padding: 5px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09);
  transition: background .2s, color .2s, box-shadow .2s, opacity .2s; display: inline-flex; align-items: center; gap: 7px;
}
.cp-chip:hover:not(:disabled), .cp-rel:hover:not(:disabled) { color: var(--text); background: rgba(255, 255, 255, .09); }
.cp-chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .55; }
.cp-chip.on { color: #06070b; font-weight: 600; box-shadow: none; }
.cp-chip.on i { background: #06070b; opacity: .6; }
#chipsA .cp-chip.on { background: #28eba5; }
#chipsB .cp-chip.on { background: #ff37af; }
.cp-regs-pick .cp-chip.on { background: var(--text); }
.cp-chip:disabled, .cp-rel:disabled { opacity: .25; cursor: not-allowed; }
.cp-chip.cp-adj { box-shadow: inset 0 0 0 1px rgba(255, 175, 40, .5); }

.cp-rels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.cp-rel { flex-direction: column; gap: 5px; padding: 9px 4px 8px; border-radius: 12px; font-size: 11.5px; justify-content: center; }
.cp-rel svg { width: 22px; height: 22px; opacity: .8; }
.cp-rel.on { background: rgba(255, 255, 255, .14); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.cp-radii { grid-template-columns: repeat(2, 1fr); }
.cp-radii .cp-rel { flex-direction: row; font-size: 13px; padding: 8px; font-variant-numeric: tabular-nums; }

.cp-out { margin-top: 6px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .07); }
.cp-sentence { margin: 0; font-family: var(--display); font-size: 22px; line-height: 1.32; letter-spacing: -.015em; color: var(--text-2); }
.cp-sentence .a { color: #28eba5; } .cp-sentence .b { color: #ff37af; } .cp-sentence .w { color: var(--text); }
.cp-spec { margin: 0; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, .42); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  font-family: var(--mono); font-size: 11.5px; line-height: 1.6; color: #cfd3e6; white-space: pre; overflow-x: auto; }
.cp-spec .k { color: #84b4ff; } .cp-spec .a { color: #28eba5; } .cp-spec .b { color: #ff37af; } .cp-spec .n { color: #ffaf28; } .cp-spec .c { color: var(--text-3); }
.cp-note { margin: 6px 0 10px; min-height: 17px; font-size: 12px; color: #ffc46b; opacity: 0; transition: opacity .3s; }
.cp-note.show { opacity: 1; }

.cp-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 16px; padding-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: 12px; color: var(--text-3); }
.cp-presets span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .15em; text-transform: uppercase; margin-right: 4px; }
.cp-presets button { border: 1px dashed rgba(255, 255, 255, .16); background: none; color: var(--text-2); font: inherit; font-size: 12px;
  padding: 5px 11px; border-radius: 999px; cursor: pointer; transition: color .2s, border-color .2s; }
.cp-presets button:hover { color: var(--text); border-color: rgba(255, 255, 255, .4); }

/* ---- stage ---- */
.cp-stage { min-width: 0; position: sticky; top: 76px; }
.cp-stage .c-viewer { width: min(100%, calc(100vh - 290px)); min-width: 320px; }
.ex-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; min-height: 40px; width: min(100%, calc(100vh - 290px)); min-width: 320px; }
.ex-legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.ex-legend span { display: inline-flex; align-items: center; white-space: nowrap; }
.ex-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; }
.c-viewer { cursor: default; }
.cp-mif { opacity: 0; transition: opacity .35s; background: #000; }
#cCells { transition: opacity .35s; }
.cp-metric { margin: 16px 2px 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.cp-metric b { font-family: var(--display); font-size: 30px; font-weight: 600; letter-spacing: -.03em; color: var(--text); margin-right: 6px; vertical-align: -3px; }
.cp-metric small { display: block; margin-top: 4px; font-size: 12px; color: var(--text-3); }

/* ---- score cards ---- */
.cp-scores { display: grid; gap: 14px; position: sticky; top: 76px; }
.cp-score { padding: 18px 20px 16px; border-radius: 20px; background: rgba(255, 255, 255, .04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10), 0 40px 110px -50px rgba(0, 0, 0, .8); }
.cp-score .cp-h { margin-bottom: 6px; }
.cp-big { display: flex; align-items: center; gap: 12px; margin: 2px 0 12px; min-height: 52px; flex-wrap: wrap; }
.cp-big b { font-family: var(--display); font-size: 44px; font-weight: 600; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.cp-badge { font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--text-2); }
.cp-badge.ok { background: rgba(31, 111, 224, .22); color: #8fc0ff; }
.cp-badge.no { background: rgba(255, 255, 255, .06); color: var(--text-3); }
.cp-badge.up { background: rgba(231, 102, 36, .2); color: #f59a68; }
.cp-badge.dn { background: rgba(0, 168, 136, .2); color: #3fd6b4; }
.cp-small { margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: var(--text-3); }
.cp-small b { color: var(--text-2); font-weight: 600; }
.cp-small a { color: #8fc0ff; text-decoration: none; }
.cp-small a:hover { text-decoration: underline; }
.gauge { position: relative; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); }
.gauge i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: #1f6fe0; transition: width .5s cubic-bezier(.2, .7, .2, 1), background .3s; }
.gauge s { position: absolute; top: -4px; bottom: -4px; width: 1px; background: rgba(255, 255, 255, .55); }
.cp-regbars { display: grid; gap: 6px; }
.cp-rg { display: grid; grid-template-columns: 138px 1fr 32px; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-3); }
.cp-rg.cur { color: var(--text); }
.cp-rg .t { position: relative; height: 7px; }
.cp-rg .t::before { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: rgba(255, 255, 255, .2); }
.cp-rg .t i { position: absolute; top: 0; height: 100%; transition: all .5s cubic-bezier(.2, .7, .2, 1); opacity: .45; }
.cp-rg.cur .t i { opacity: 1; }
.cp-rg .t i.up { left: 50%; background: #e76624; border-radius: 0 3px 3px 0; }
.cp-rg .t i.dn { right: 50%; background: #00a888; border-radius: 3px 0 0 3px; }
.cp-rg em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; }
.cp-dots { display: inline-flex; gap: 4px; }
.cp-dots i { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.cp-dots i.on { background: #84b4ff; box-shadow: none; }
.cp-dots i.rel { background: rgba(132, 180, 255, .35); box-shadow: none; }

@media (max-width: 1320px) {
  .cp-wrap { grid-template-columns: 330px minmax(0, 1fr); }
  .cp-scores { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); position: static; }
}
@media (max-width: 860px) {
  .cp-wrap { grid-template-columns: 1fr; padding: 20px; }
  .cp-stage, .cp-scores { position: static; }
  .cp-scores { grid-template-columns: 1fr; }
}
