/* ── step rail in the top bar ────────────────────────────── */
.rail { display: flex; align-items: center; gap: 4px; margin-left: 10px; }
.rail-step {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-3);
  padding: 5px 11px; border-radius: 99px; border: 1px solid transparent;
  transition: color var(--t), border-color var(--t), background var(--t);
}
.rail-step i {
  font-style: normal; font-size: 10.5px; font-weight: 800;
  width: 17px; height: 17px; border-radius: 99px; display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-3);
}
.rail-step.done { color: var(--moss); }
.rail-step.done i { background: rgba(107,191,114,.14); border-color: #2c4a33; color: var(--moss); }
.rail-step.now { color: var(--brass); border-color: rgba(217,164,65,.3); background: rgba(217,164,65,.08); }
.rail-step.now i { background: rgba(217,164,65,.18); border-color: var(--brass-dim); color: var(--brass); }

/* ── step 1: the folder gate ─────────────────────────────── */
.gate { min-height: calc(100vh - 58px); display: grid; place-items: center; padding: 30px 24px; }
.gate-card { max-width: 560px; text-align: center; padding: 40px 38px; position: relative; z-index: 1; }
.gate-icon { font-size: 42px; margin-bottom: 14px; filter: saturate(.6); }
.gate-card h1 { font-size: 27px; margin-bottom: 12px; }
.gate-card p { font-size: 14.5px; margin-bottom: 22px; }
.gate-unsupported {
  margin-top: 18px; padding: 13px 15px; border-radius: var(--r);
  background: rgba(217,83,79,.08); border: 1px solid #4a2422; text-align: left;
}
.gate-unsupported b { display: block; color: #ff9b97; font-size: 13.5px; margin-bottom: 3px; }
.gate-unsupported span { font-size: 12.5px; color: var(--ink-2); }

/* ── work area ───────────────────────────────────────────── */
.work { max-width: 1240px; margin: 0 auto; padding: 20px 24px 70px; position: relative; z-index: 1; }
.work-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.work-head .spacer { flex: 1; }
.folder-line { display: flex; align-items: center; gap: 8px; }
.stats { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-3); }
.stats b { color: var(--ink); font-weight: 700; }

.cols { display: grid; grid-template-columns: minmax(0,1fr) 372px; gap: 20px; align-items: start; }

/* entries column */
.tools { display: flex; gap: 8px; margin-bottom: 12px; }
.tools input { flex: 1; }

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

.entry {
  display: flex; align-items: center; gap: 13px;
  padding: 10px 13px;
  background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: var(--r); cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.entry:hover { border-color: var(--line); background: var(--panel-2); transform: translateX(2px); }
.entry.hot { border-color: var(--brass); box-shadow: var(--glow); }
.entry.muted { opacity: .48; }
.entry-thumb {
  width: 60px; height: 40px; flex: none; border-radius: var(--r-sm);
  object-fit: cover; background: var(--bg-2); border: 1px solid var(--line-soft);
}
.entry-main { flex: 1; min-width: 0; }
.entry-name { font-weight: 650; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.entry-kws { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.kw {
  font-size: 11px; padding: 2px 8px; border-radius: 99px;
  background: var(--bg-2); border: 1px solid var(--line-soft); color: var(--ink-2);
}
.kw.lit { background: rgba(217,164,65,.16); border-color: var(--brass-dim); color: var(--brass); }
.entry-score {
  font-size: 12px; font-variant-numeric: tabular-nums; color: var(--brass);
  min-width: 42px; text-align: right; opacity: 0; transition: opacity var(--t-fast);
}
.entry.hot .entry-score, .entry.scored .entry-score { opacity: 1; }
.flag { font-size: 11px; padding: 1px 7px; border-radius: 99px; font-weight: 700; }
.flag.bad  { background: rgba(217,83,79,.16); color: #ff9b97; }
.flag.warn { background: rgba(217,164,65,.14); color: var(--brass); }
.flag.hid  { background: var(--panel-2); color: var(--ink-3); border: 1px solid var(--line); }

.empty { text-align: center; padding: 46px 20px; color: var(--ink-3); }

/* health */
.health { border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--panel); margin-bottom: 12px; }
.health-head { display: flex; align-items: center; gap: 10px; padding: 10px 13px; }
.health-title { font-size: 13px; font-weight: 650; flex: 1; }
.health-list { list-style: none; margin: 0; padding: 0 13px 12px; display: flex; flex-direction: column; gap: 7px; }
.health-list li { font-size: 12.5px; color: var(--ink-2); display: flex; gap: 9px; align-items: flex-start; }
.health-list li b { color: var(--ink); font-weight: 650; }
.health-list .lvl { flex: none; width: 6px; height: 6px; border-radius: 99px; margin-top: 6px; }
.health-list .lvl.bad { background: var(--blood); }
.health-list .lvl.warn { background: var(--brass); }

/* rehearsal column */
.col-rehearse { position: sticky; top: 74px; }
.rehearse { padding: 17px; }
.reh-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.reh-head h2 { flex: 1; font-size: 17px; }
.rehearse > .btn { margin: 14px 0 4px; }

.heard, .would, .ranks { margin-top: 15px; }
.heard-box {
  background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  padding: 10px 12px; min-height: 62px; font-size: 13.5px; color: var(--ink-2);
  line-height: 1.5; word-break: break-word;
}
.heard-box .hit { color: var(--brass); font-weight: 700; }
.heard-box .near { color: var(--ember); font-weight: 600; }

.would-card {
  position: relative; border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--line-soft); background: var(--bg-2);
  aspect-ratio: 16/9; display: grid; place-items: center;
}
.would-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.would-card .cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 9px 11px; font-size: 13px; font-weight: 650;
  background: linear-gradient(transparent, rgba(0,0,0,.82));
}
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.rank-list li {
  display: flex; align-items: center; gap: 9px; font-size: 12.5px;
  padding: 5px 9px; border-radius: var(--r-sm); background: var(--bg-2);
  border: 1px solid var(--line-soft);
}
.rank-list .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list .sc { font-variant-numeric: tabular-nums; color: var(--brass); font-weight: 700; }
.rank-list .why { font-size: 11px; color: var(--ink-3); }
.rank-list li.win { border-color: var(--brass-dim); background: rgba(217,164,65,.08); }

/* ── modal ───────────────────────────────────────────────── */
.modal-bg {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(5,6,9,.72); backdrop-filter: blur(3px);
  display: none; place-items: center; padding: 24px;
}
.modal-bg.open { display: grid; }
.modal { width: min(560px, 100%); padding: 0; animation: rise 220ms cubic-bezier(.2,.7,.3,1) both; }
.modal-head { display: flex; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.modal-head h2 { flex: 1; font-size: 17px; }
.modal-body { padding: 18px; display: flex; flex-direction: column; gap: 15px; }
.modal-foot { display: flex; gap: 9px; padding: 14px 18px; border-top: 1px solid var(--line-soft); }
.modal-foot .spacer { flex: 1; }
.field { display: block; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check input { width: auto; }
.kw-preview { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 9px; }

@media (max-width: 1000px) {
  .cols { grid-template-columns: 1fr; }
  .col-rehearse { position: static; }
  .rail { display: none; }
}

.gate-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── per-row session controls: the point is that neither needs an edit-and-save ── */
/* the toggle - the point of the whole panel, so it is the biggest thing on the row */
.e-toggle {
  flex: none; width: 40px; height: 23px; padding: 0; border-radius: 99px;
  background: var(--bg-2); border: 1px solid var(--line);
  position: relative; cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.e-toggle::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 17px; height: 17px; border-radius: 99px; background: var(--ink-3);
  transition: transform var(--t-fast), background var(--t-fast);
}
.e-toggle[aria-pressed="true"] { background: rgba(107,191,114,.18); border-color: #2c4a33; }
.e-toggle[aria-pressed="true"]::after { transform: translateX(17px); background: var(--moss); }
.e-toggle:hover { border-color: var(--ink-3); background: var(--bg-2); }
.e-toggle[aria-pressed="true"]:hover { background: rgba(107,191,114,.26); }

.e-show { flex: none; padding: 6px 11px; font-size: 12.5px; border-radius: var(--r-sm); }
.e-show:hover { border-color: var(--brass-dim); color: var(--brass); }


.entry-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.e-show { padding: 6px 12px; font-size: 12.5px; border-radius: var(--r-sm); }
@keyframes ping { 0% { background: rgba(217,164,65,.34); } 100% { background: var(--panel); } }
.entry.ping { animation: ping 560ms ease-out; }
