/* Sweep Studio (v12) — spec score, board, spec viewer, handoff, share.
   Uses the theme.css tokens, so light and Night Edition both work. */

.studio-kicker {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.studio-card {
  background: var(--color-paper);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 20px;
}
.studio-card h3, .studio-card h4 { font-family: var(--font-serif); margin: 4px 0 6px; color: var(--color-ink); }
.studio-card h4 { font-size: 17px; }
.studio-note, .studio-foot { font-size: 13px; color: var(--color-muted); line-height: 1.5; margin-top: 10px; }
.studio-note { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius-ctl); background: var(--accent-tint); color: var(--color-ink-light); }

/* ---------- plan strip ---------- */
.studio-strip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin: 0 0 24px;
  padding: 14px 18px;
  border-radius: var(--radius-card);
  background:
    linear-gradient(120deg, var(--accent-tint), transparent 60%),
    var(--color-paper);
  border: 1px solid var(--accent-tint-strong);
  box-shadow: var(--shadow-card);
}
.studio-strip button.strip-score, .studio-strip button.strip-board {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: none;
  border: 0;
  padding: 4px;
  border-radius: var(--radius-ctl);
  color: inherit;
  cursor: pointer;
}
.studio-strip button.strip-board { flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.studio-strip button.strip-score:hover, .studio-strip button.strip-board:hover { background: var(--accent-tint); }
.strip-ring { position: relative; display: inline-flex; }
.strip-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-serif); font-size: 17px; color: var(--color-ink); }
.strip-text { display: flex; flex-direction: column; gap: 2px; }
.strip-label { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-muted); }
.strip-value { font-weight: 600; color: var(--color-ink); font-size: 14px; }
.strip-next { font-size: 13px; color: var(--color-ink-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.strip-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- score ring ---------- */
.score-ring { transform: rotate(-90deg); }
.score-ring circle { fill: none; stroke-width: 6; }
.score-ring-track { stroke: var(--color-border-light); }
.score-ring-value { stroke: var(--color-accent); stroke-linecap: round; transition: stroke-dashoffset 600ms cubic-bezier(.2,.8,.2,1); }
.score-ring.grade-A .score-ring-value, .score-ring.grade-B .score-ring-value { stroke: var(--color-productive); }
.score-ring.grade-C .score-ring-value { stroke: var(--color-neutral); }

/* ---------- studio section ---------- */
.studio-hero { margin: 8px 0 22px; }
.studio-title { font-family: var(--font-serif); font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; margin: 6px 0 6px; color: var(--color-ink); }
.studio-sub { font-family: var(--font-serif); font-style: italic; color: var(--color-ink-light); font-size: 17px; }

.studio-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.score-head { display: flex; gap: 16px; align-items: center; }
.score-head p { font-size: 13px; color: var(--color-muted); }
.score-ring-wrap { position: relative; display: inline-flex; flex-shrink: 0; }
.score-ring-wrap .score-ring circle { stroke-width: 8; }
.score-number { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.score-number b { font-family: var(--font-serif); font-size: 30px; color: var(--color-ink); }
.score-number small { font-size: 11px; color: var(--color-muted); margin-top: 3px; font-weight: 600; }
.score-ring-wrap.small .score-number b { font-size: 22px; }
.score-parts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; margin: 16px 0 12px; }
.score-part { display: grid; grid-template-columns: 84px 1fr 22px; align-items: center; gap: 8px; font-size: 12px; color: var(--color-ink-light); }
.score-part b { text-align: right; color: var(--color-ink); }
.score-bar { height: 6px; border-radius: 99px; background: var(--color-border-light); overflow: hidden; }
.score-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--color-accent), var(--color-productive)); }
.score-issues { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.score-issues li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; font-size: 13px; padding: 8px 10px; border-radius: var(--radius-ctl); background: var(--color-white); border: 1px solid var(--color-border-light); }
.issue-area { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent); white-space: nowrap; }
.issue-text { color: var(--color-ink); line-height: 1.4; }
.issue-text em { color: var(--color-muted); }
.score-more { margin-top: 6px; }
.score-clean { font-size: 14px; color: var(--color-productive); font-weight: 600; }

.estimate-big { font-family: var(--font-serif); font-size: 18px; color: var(--color-ink); margin: 8px 0 10px; }
.estimate-big b { font-size: 40px; line-height: 1; }
.estimate-big span { color: var(--color-muted); }
.estimate-progress { height: 8px; border-radius: 99px; background: var(--color-border-light); overflow: hidden; }
.estimate-progress i { display: block; height: 100%; background: var(--color-productive); border-radius: inherit; transition: width 400ms ease; }
.estimate-line { font-size: 12px; color: var(--color-muted); margin: 8px 0 14px; }
.estimate-next { padding: 12px; border-radius: var(--radius-ctl); background: var(--color-white); border: 1px dashed var(--color-border); font-size: 13px; line-height: 1.45; color: var(--color-ink); }
.estimate-next .studio-kicker { display: block; margin-bottom: 4px; }
.estimate-next .btn { display: flex; margin-top: 10px; width: 100%; }
.estimate-next.done { border-style: solid; background: var(--ok-tint); }

.quick-card { display: flex; flex-direction: column; gap: 8px; }
.handoff-quick {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--radius-ctl);
  border: 1px solid var(--color-border-light);
  background: var(--color-white);
  color: var(--color-ink);
  font: 600 13px var(--font-ui);
  cursor: pointer;
  text-align: left;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}
.handoff-quick:hover { border-color: var(--color-accent); transform: translateY(-1px); box-shadow: var(--shadow-card); }
.handoff-quick .arrow { margin-left: auto; color: var(--color-muted); }

.tool-mark {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border-radius: 8px;
  font: 800 12px var(--font-ui);
  color: #fff;
  background: #444;
  flex-shrink: 0;
}
.tool-mark.lovable { background: linear-gradient(135deg, #ff6a3d, #e0368c 55%, #7a4bff); }
.tool-mark.v0 { background: #111; }
.tool-mark.bolt { background: linear-gradient(135deg, #1389fd, #0b5bd3); }
.tool-mark.cursor { background: #1d1d1f; }
.tool-mark.claude { background: #b4532f; }
.tool-mark.agents { background: var(--color-productive); }
.tool-mark.pack { background: var(--color-accent); }

/* tabs */
.studio-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--color-border-light);
  border: 1px solid var(--color-border-light);
}
.studio-tabs button {
  border: 0;
  background: none;
  padding: 8px 18px;
  border-radius: 9px;
  font: 600 14px var(--font-ui);
  color: var(--color-ink-light);
  cursor: pointer;
}
.studio-tabs button.active { background: var(--color-paper); color: var(--color-accent); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }

/* ---------- board ---------- */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.board-col {
  background: color-mix(in srgb, var(--color-border-light) 55%, transparent);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  padding: 10px;
  min-height: 220px;
  transition: background-color 140ms ease, border-color 140ms ease;
}
.board-col.is-over { background: var(--accent-tint); border-color: var(--color-accent); }
.board-col-head { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 6px 10px; font: 700 13px var(--font-ui); color: var(--color-ink); }
.board-col[data-col="done"] .board-col-head span:first-child { color: var(--color-productive); }
.board-count { font-weight: 500; color: var(--color-muted); font-size: 12px; }
.board-cards { display: flex; flex-direction: column; gap: 8px; }
.board-empty { padding: 26px 10px; text-align: center; font-size: 12px; color: var(--color-muted); border: 1px dashed var(--color-border); border-radius: var(--radius-ctl); }
.task-card {
  position: relative;
  background: var(--color-paper);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  padding: 10px 12px 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  cursor: grab;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}
.task-card:hover { box-shadow: var(--shadow-card); transform: translateY(-1px); }
.task-card.is-dragging { opacity: 0.45; }
.task-card.is-next { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.task-card.is-blocked { border-style: dashed; background: color-mix(in srgb, var(--color-border-light) 55%, var(--color-white)); }
.task-card.is-blocked h5, .task-card.is-blocked .task-title { color: var(--color-ink-light); }
.task-card.is-done .task-title { color: var(--color-muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--color-muted) 50%, transparent); }
.task-card.just-done { animation: task-pop 600ms ease; }
@keyframes task-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.04); box-shadow: 0 0 0 6px var(--ok-tint); }
  100% { transform: scale(1); }
}
.task-top { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }
.task-id { font: 700 11px var(--font-mono); color: var(--color-accent); }
.task-phase, .task-p, .task-flag { font: 700 10px var(--font-ui); letter-spacing: 0.05em; padding: 2px 6px; border-radius: 99px; background: var(--color-border-light); color: var(--color-ink-light); }
.task-p { background: color-mix(in srgb, var(--color-neutral) 18%, transparent); color: color-mix(in srgb, var(--color-neutral) 70%, var(--color-ink)); }
.task-flag { margin-left: auto; background: var(--color-accent); color: #fff; }
.task-flag.blocked { background: var(--color-border); color: var(--color-ink); }
.task-flag + .task-flag { margin-left: 0; }
.task-title { font-size: 13.5px; line-height: 1.4; color: var(--color-ink); margin: 0 0 8px; }
.task-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11px; color: var(--color-muted); }
.cx { display: inline-flex; gap: 2px; }
.cx i { width: 6px; height: 6px; border-radius: 50%; background: var(--color-border); }
.cx i.on { background: var(--color-accent); }
.task-deps b { font: 600 11px var(--font-mono); color: var(--color-muted); margin-left: 2px; }
.task-deps b.met { color: var(--color-productive); }
.task-move { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity 120ms ease; }
.task-card:hover .task-move, .task-card:focus-within .task-move { opacity: 1; }
.task-move button { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--color-border); background: var(--color-white); color: var(--color-ink); cursor: pointer; font-size: 13px; }
.task-move button:hover { border-color: var(--color-accent); color: var(--color-accent); }
@media (hover: none) { .task-move { opacity: 1; position: static; justify-content: flex-end; margin-top: 8px; } }

/* ---------- spec viewer ---------- */
.spec-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.spec-files { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 130px; }
.spec-file { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; padding: 9px 12px; border-radius: var(--radius-ctl); border: 1px solid transparent; background: none; cursor: pointer; text-align: left; color: var(--color-ink-light); }
.spec-file:hover { background: var(--color-border-light); }
.spec-file.active { background: var(--color-paper); border-color: var(--color-border-light); box-shadow: var(--shadow-card); color: var(--color-accent); }
.spec-file-name { font: 600 13px var(--font-mono); word-break: break-all; }
.spec-file-meta { font-size: 11px; color: var(--color-muted); white-space: nowrap; }
.spec-compat { font-size: 12px; color: var(--color-muted); padding: 10px 12px; line-height: 1.45; }
.spec-viewer { background: var(--color-paper); border: 1px solid var(--color-border-light); border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow: hidden; }
.spec-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--color-border-light); background: var(--color-white); flex-wrap: wrap; }
.spec-path { font: 600 13px var(--font-mono); color: var(--color-ink); }
.spec-tools { display: flex; gap: 8px; align-items: center; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: var(--color-border-light); }
.seg button { border: 0; background: none; padding: 5px 10px; border-radius: 7px; font: 600 12px var(--font-ui); color: var(--color-ink-light); cursor: pointer; }
.seg button.active { background: var(--color-paper); color: var(--color-accent); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); }

.md-body { padding: 22px 28px 28px; font-size: 15px; line-height: 1.65; color: var(--color-ink); max-width: 80ch; }
.md-body h2.md-h1 { font-family: var(--font-serif); font-size: 28px; margin: 0 0 12px; }
.md-body h3.md-h2 { font-family: var(--font-serif); font-size: 21px; margin: 26px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--color-border-light); }
.md-body h4.md-h3 { font-family: var(--font-serif); font-size: 17px; margin: 20px 0 8px; }
.md-body h5.md-h4 { font: 700 12px var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-muted); margin: 14px 0 6px; }
.md-body p { margin: 0 0 10px; }
.md-body blockquote { margin: 0 0 14px; padding: 8px 14px; border-left: 3px solid var(--color-accent); background: var(--accent-tint); font-family: var(--font-serif); font-style: italic; border-radius: 0 8px 8px 0; }
.md-body code { font: 13px var(--font-mono); padding: 1px 5px; border-radius: 5px; background: var(--color-border-light); }
.md-list { margin: 0 0 12px; padding-left: 22px; }
.md-list li { margin: 4px 0; }
.md-task { list-style: none; margin-left: -20px; display: flex; gap: 8px; align-items: baseline; }
.md-box { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--color-border); flex-shrink: 0; transform: translateY(2px); }
.md-task.is-done .md-box { background: var(--color-productive) var(--check-svg) center / 11px no-repeat; border-color: var(--color-productive); }
.md-task.is-done { color: var(--color-muted); }
.ears { font: 700 12px var(--font-mono); letter-spacing: 0.02em; color: var(--color-accent); }
.md-table-wrap { overflow-x: auto; margin: 0 0 14px; }
.md-table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.md-table th, .md-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--color-border-light); vertical-align: top; }
.md-table th { font: 700 11px var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-muted); }
.md-code, .md-raw { margin: 0; padding: 16px 18px; background: #1d1b18; color: #efe9de; font: 12.5px/1.6 var(--font-mono); overflow: auto; white-space: pre-wrap; word-break: break-word; }
.md-code { border-radius: 10px; margin-bottom: 14px; }
.md-raw { max-height: 70vh; }
.md-code code, .md-raw code { background: transparent; color: inherit; padding: 0; border-radius: 0; font: inherit; }
.md-raw.small { border-radius: 10px; padding: 10px 12px; font-size: 11.5px; margin: 10px 0; }
.md-body hr { border: 0; border-top: 1px solid var(--color-border-light); margin: 18px 0; }
.md-diagram { margin: 6px 0 18px; padding: 16px; border-radius: 12px; background: var(--color-white); border: 1px solid var(--color-border-light); overflow-x: auto; }

.arch { width: 100%; min-width: 560px; height: auto; color: var(--color-muted); }
.arch-node rect { fill: var(--color-paper); stroke: var(--color-border); stroke-width: 1.5; }
.arch-pill rect { fill: var(--accent-tint-strong); stroke: var(--color-accent); }
.arch-db rect { fill: var(--ok-tint); stroke: var(--color-productive); }
.arch-label { font: 700 15px var(--font-ui); fill: var(--color-ink); text-anchor: middle; }
.arch-sub { font: 12px var(--font-mono); fill: var(--color-muted); text-anchor: middle; }
.arch-pill .arch-sub { font-size: 10.5px; }
.arch-edge { stroke: currentColor; stroke-width: 1.8; }
.arch-edge.dashed { stroke-dasharray: 5 4; }

/* ---------- handoff ---------- */
.handoff-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.handoff-card { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-content: start; padding: 16px; border-radius: var(--radius-card); background: var(--color-paper); border: 1px solid var(--color-border-light); box-shadow: var(--shadow-card); }
.handoff-card .tool-mark { width: 38px; height: 38px; font-size: 13px; border-radius: 10px; }
.handoff-card h4 { font-family: var(--font-serif); font-size: 17px; margin: 0 0 2px; color: var(--color-ink); }
.handoff-card p { font-size: 13px; color: var(--color-muted); line-height: 1.45; margin: 0; }
.handoff-card .btn { grid-column: 1 / -1; margin-top: 8px; }
.prompt-editor { padding: 18px; border-radius: var(--radius-card); background: var(--color-paper); border: 1px solid var(--color-border-light); box-shadow: var(--shadow-card); }
.prompt-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.prompt-head h4 { font-family: var(--font-serif); margin: 2px 0 0; color: var(--color-ink); }
.prompt-tools { display: flex; gap: 8px; align-items: center; }
.prompt-count { font-size: 12px; color: var(--color-muted); }
#handoff-prompt { width: 100%; font: 13px/1.55 var(--font-mono); padding: 14px; resize: vertical; min-height: 220px; }

/* ---------- share ---------- */
.share-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.share-card-wrap canvas { width: 100%; height: auto; display: block; border-radius: var(--radius-card); box-shadow: var(--shadow-lift); border: 1px solid var(--color-border-light); }
.share-card-actions { display: flex; gap: 8px; margin-top: 12px; }
.share-side { display: flex; flex-direction: column; gap: 14px; }
.share-url-row { display: flex; gap: 8px; margin-top: 10px; }
.share-url-row input { flex: 1; min-width: 0; font: 12px var(--font-mono); padding: 9px 10px; }
.badge-preview { display: block; margin: 8px 0 4px; }

/* ---------- template gallery ---------- */
.template-gallery { margin: 34px 0 10px; }
.template-gallery-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.template-gallery-head h3 { font-family: var(--font-serif); font-size: 24px; margin: 4px 0 0; color: var(--color-ink); }
.template-gallery-head p { font-size: 14px; color: var(--color-muted); }
.template-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.template-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius-card);
  background: var(--color-paper);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-card);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.template-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--accent-tint-strong); }
.template-top { display: flex; justify-content: space-between; align-items: center; }
.template-tag { font: 700 10px var(--font-ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); background: var(--accent-tint); padding: 3px 8px; border-radius: 99px; }
.template-grade { font: 700 12px var(--font-ui); padding: 3px 8px; border-radius: 99px; background: var(--ok-tint); color: var(--color-productive); }
.template-grade::before { content: "Spec "; font-weight: 500; }
html:not([data-theme="night"]) .template-grade { color: #156b2e; }
.template-grade.grade-C, .template-grade.grade-D { background: var(--accent-tint); color: var(--color-accent); }
.template-card h4 { font-family: var(--font-serif); font-size: 19px; margin: 2px 0 0; color: var(--color-ink); }
.template-card p { font-size: 13.5px; color: var(--color-ink-light); line-height: 1.5; margin: 0; flex: 1; }
.template-meta { font-size: 12px; color: var(--color-muted); }
.template-remix { align-self: flex-start; }

/* ---------- shared-link modal ---------- */
body.studio-modal-open { overflow: hidden; }
.studio-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 16, 12, 0.45);
  backdrop-filter: blur(6px);
  animation: studio-fade 180ms ease;
}
@keyframes studio-fade { from { opacity: 0; } to { opacity: 1; } }
.studio-modal-card {
  position: relative;
  width: min(640px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 28px;
  border-radius: 18px;
  background: var(--color-paper);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.45);
  animation: studio-rise 220ms cubic-bezier(.2,.8,.2,1);
}
@keyframes studio-rise { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.studio-modal-close { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--color-border-light); font-size: 20px; line-height: 1; cursor: pointer; color: var(--color-ink); }
.shared-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin: 6px 0 14px; }
.shared-head h2 { font-family: var(--font-serif); font-size: 30px; line-height: 1.1; margin: 0 0 6px; color: var(--color-ink); }
.shared-liner { font-family: var(--font-serif); font-style: italic; color: var(--color-ink-light); }
.shared-facts { display: grid; gap: 8px; margin: 0 0 16px; }
.shared-facts div { display: grid; grid-template-columns: 76px 1fr; gap: 10px; font-size: 14px; }
.shared-facts dt { font: 700 11px var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-muted); padding-top: 2px; }
.shared-facts dd { margin: 0; color: var(--color-ink); line-height: 1.45; }
.studio-modal-card h3 { font-family: var(--font-serif); font-size: 17px; margin: 0 0 8px; color: var(--color-ink); }
.shared-checks { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.shared-checks li { padding: 8px 12px 8px 34px; position: relative; border-radius: var(--radius-ctl); background: var(--color-white); border: 1px solid var(--color-border-light); font-size: 14px; }
.shared-checks li::before { content: ""; position: absolute; left: 11px; top: 11px; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--color-border); }
.shared-nongoals { font-size: 13px; color: var(--color-ink-light); margin-bottom: 16px; }
.shared-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.studio-focus { box-shadow: var(--ring) !important; border-color: var(--color-accent) !important; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .studio-summary { grid-template-columns: 1fr 1fr; }
  .score-card { grid-column: 1 / -1; }
  .handoff-grid, .template-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .studio-strip { grid-template-columns: 1fr; gap: 10px; }
  .strip-actions { justify-content: flex-start; }
  .board { grid-template-columns: 1fr; }
  .board-col { min-height: 0; }
  .spec-layout { grid-template-columns: 1fr; }
  .spec-files { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .spec-file { flex-direction: column; flex-shrink: 0; }
  .spec-compat { display: none; }
  .share-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .studio-summary { grid-template-columns: 1fr; }
  .score-parts { grid-template-columns: 1fr; }
  .handoff-grid, .template-row { grid-template-columns: 1fr; }
  .studio-tabs { display: flex; width: 100%; }
  .studio-tabs button { flex: 1; padding: 8px 6px; }
  .md-body { padding: 16px; }
  .studio-modal-card { padding: 22px 18px; }
  .shared-head { flex-direction: column-reverse; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .task-card, .template-card, .handoff-quick, .studio-modal, .studio-modal-card { animation: none; transition: none; }
}

/* ---------- touch devices: no hover, bigger targets ---------- */
@media (hover: none) {
  .task-move { opacity: 1; }
}
@media (pointer: coarse) {
  .task-move button { width: 40px; height: 40px; font-size: 16px; }
  .task-card { padding-bottom: 54px; }
  .seg button { min-height: 40px; padding-left: 14px; padding-right: 14px; }
}
