/* Protocols in Studio: the panel on an open piece, the line on each card, and the dialogs. */
.studio-protocol { margin: 14px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--fauna-card-radius, 18px); background: var(--white); }
.studio-protocol-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.studio-protocol-heading h2 { margin: 0; font-size: 13px; font-weight: 650; }
.studio-protocol-heading span { font-size: 12px; color: var(--muted); }
.studio-protocol-problem { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--wash); font-size: 13px; line-height: 1.45; }
.studio-protocol-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.studio-protocol-actions button { min-height: 44px; padding: 8px 14px; font-size: 14px; }
.studio-protocol-actions .action { min-width: 96px; }
.studio-protocol .room-reset { color: #8a3b12; margin-left: auto; }
.room-protocol-none { margin: 6px 0 0; min-height: 36px; display: flex; align-items: center; font-size: 14px; color: var(--muted); }
.room-protocol-open { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; margin: 4px -6px 0; padding: 4px 6px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; }
.room-protocol-open:hover { background: var(--wash); }
.room-protocol-open .protocol-score { height: 32px; width: auto; max-width: 40%; }
.room-protocol-title { display: block; font-size: 14px; line-height: 1.3; }
.room-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.room-steps li { display: flex; align-items: center; gap: 6px; min-height: 28px; padding: 3px 10px 3px 4px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; line-height: 1.2; color: var(--muted); }
.room-step-number { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--wash); font-size: 11px; font-weight: 650; }
.room-step-name { overflow-wrap: anywhere; }
.room-steps li[data-state="passed"] { border-color: transparent; background: var(--wash); color: var(--ink); }
.room-steps li[data-state="passed"] .room-step-number { background: var(--green); color: var(--white); }
.room-steps li[data-state="noted"] { color: var(--ink); }
.room-steps li[data-state="current"] { border-color: var(--green); color: var(--ink); font-weight: 600; }
.room-steps li[data-state="current"] .room-step-number { background: transparent; box-shadow: inset 0 0 0 2px var(--green); color: var(--green); }
.room-steps li[data-state="blocked"] { border-color: #c2591a; background: #fbeee4; color: #8a3b12; font-weight: 600; }
.room-steps li[data-state="blocked"] .room-step-number { background: #c2591a; color: var(--white); }
.room-method { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 10px 0 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.room-method strong { color: var(--ink); font-weight: 650; }
.room-method ol { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0; padding: 0; list-style: none; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.room-method li + li::before { content: "→"; margin: 0 6px; color: var(--muted); font-weight: 400; }
.room-method li[data-state="done"] { color: var(--green); }
.room-method li[data-state="current"] { color: var(--ink); font-weight: 700; }
.room-method-when, .room-method-finished { flex-basis: 100%; }
.room-method-finished { color: var(--green); font-weight: 600; }
.room-note { margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--wash); font-size: 13px; line-height: 1.45; }
.studio-protocol-offline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; background: #fbeee4; color: #8a3b12; }
.studio-protocol-offline button { min-height: 44px; padding: 8px 14px; }
.room-goal { margin: 8px 0 0; font-size: 14px; line-height: 1.4; }
.room-goal span { margin-right: 7px; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.room-trace, .protocol-history { margin: 8px 0 0; padding: 0; border: 0; font-size: 13px; }
.room-trace summary, .protocol-history summary { min-height: 44px; display: flex; align-items: center; gap: 8px; color: var(--muted); line-height: 1.35; cursor: pointer; }
.room-trace summary::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.room-trace[data-tone="moving"] summary, .room-trace[data-tone="done"] summary { color: var(--ink); }
.room-trace[data-tone="moving"] summary::before, .room-trace[data-tone="done"] summary::before { background: var(--green); }
.room-trace[data-tone="blocked"] summary { color: #8a3b12; }
.room-trace[data-tone="blocked"] summary::before { background: #c2591a; }
.room-trace ol, .protocol-history ol { max-height: 240px; overflow: auto; margin: 4px 0 6px; padding: 8px 10px 8px 30px; border-radius: 8px; background: var(--paper); line-height: 1.45; overflow-wrap: anywhere; }
.room-trace ol:empty { display: none; }
.room-trace li + li, .protocol-history li + li { margin-top: 4px; }
.room-trace time { display: block; font-size: 11px; color: var(--muted); }
.protocol-history time { margin-right: 8px; color: var(--muted); font-size: 12px; }
.artist-badge { flex: none; display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--wash); color: var(--ink); font: 700 12px/1.3 system-ui, sans-serif; letter-spacing: 0.4px; text-transform: uppercase; box-shadow: inset 0 0 0 1px var(--ink); }
.artist-badge[data-artist="astra"] { background: #f6ece4; color: #8a3b12; box-shadow: inset 0 0 0 1px #8a3b12; }
.artist-badge[data-artist="other"] { background: var(--white); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); text-transform: none; }
.studio-protocol-heading .studio-protocol-about { display: flex; align-items: center; gap: 8px; }
.studio-protocol-heading .artist-badge { font-size: 12px; color: var(--ink); }
.studio-protocol-heading .artist-badge[data-artist="astra"] { color: #8a3b12; }
.studio-protocol-heading .artist-badge[data-artist="other"] { color: var(--muted); }
.world-card-working { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 3px; }
.world-card-protocol { flex: 1; min-width: 0; display: block; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.world-card-protocol[data-tone="moving"], .world-card-protocol[data-tone="done"] { color: var(--green); }
.world-card-protocol[data-tone="done"] { font-weight: 700; }
.world-card-protocol[data-tone="blocked"] { color: #8a3b12; font-weight: 700; }

/* The shelf */
#protocol-shelf { width: min(1040px, calc(100% - 24px)); padding: 0 20px 20px; }
#protocol-shelf .protocol-room-heading { padding: 20px 0 4px; }
.shelf-note { margin: 0 0 10px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.shelf-row { display: grid; grid-template-columns: minmax(170px, 230px) minmax(0, 1fr); gap: 10px 20px; padding: 14px 0; border-top: 1px solid var(--line); }
.shelf-principle h3 { margin: 0 0 5px; font-size: 15px; font-weight: 650; }
.shelf-principle p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.shelf-spines { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.spine { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; min-height: 104px; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); text-align: left; }
.spine:hover { border-color: #9cbaa0; background: var(--paper); }
.spine .protocol-score { max-width: 100%; height: 34px; width: auto; }
.spine .protocol-command { margin: 0; }
.spine { position: relative; }
.spine-kit { position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 999px; background: var(--green); color: var(--white); font-size: 11px; font-weight: 650; letter-spacing: 0.3px; }
.shelf-methods .spine strong { padding-right: 60px; }
.spine-title { font-size: 13px; line-height: 1.35; }

.shelf-methods { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.shelf-methods .spine strong { font-size: 15px; font-weight: 650; }
.shelf-methods .protocol-command { white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
.method-body > p { margin: 0 0 6px; font-size: 15px; line-height: 1.5; }
.method-body .method-starts { color: var(--muted); font-size: 13px; }
.method-steps { margin: 12px 0 0; padding: 0; list-style: none; counter-reset: method; }
.method-steps li { counter-increment: method; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.method-steps li::before { content: counter(method); flex: none; width: 20px; color: var(--muted); font-size: 13px; text-align: center; }
.method-step { flex: 1; display: flex; align-items: center; gap: 14px; min-width: 0; min-height: 60px; padding: 8px 6px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; }
.method-step:hover { background: var(--wash); }
.method-step .protocol-score { height: 32px; width: 110px; }
.method-step .protocol-command { margin: 0; }
.method-when { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }

/* Reading a protocol and telling an artist */
#protocol-room { width: min(880px, calc(100% - 24px)); padding: 0; }
.protocol-room-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 20px 12px; }
#protocol-room-command { margin: 0 0 4px; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.protocol-room-heading h2 { margin: 0; font: 400 clamp(21px, 2.4vw, 28px)/1.2 var(--fauna-display, Georgia, serif); }
#assign-form { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; padding: 12px 20px; border-block: 1px solid var(--line); background: var(--wash); }
#assign-form[hidden] { display: none; }
.assign-to { flex: 1; min-width: 180px; margin: 0; font-size: 14px; font-weight: 600; }
#assign-form .assign-words { display: flex; flex-direction: column; gap: 5px; flex-basis: 100%; font-size: 12px; font-weight: 600; color: var(--muted); }
#assign-form textarea, #tell-words { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); font: inherit; font-size: 15px; line-height: 1.45; resize: vertical; }
#assign-form button, .protocol-room-heading button, .tell-actions button { min-height: 44px; }
#assign-status { flex-basis: 100%; margin: 0; font-size: 13px; line-height: 1.45; }
#assign-status:empty { display: none; }
#protocol-room .protocol-body { border-top: 0; padding: 16px 20px 22px; }
#tell-room { width: min(640px, calc(100% - 24px)); padding: 0; }
#tell-form { display: flex; flex-direction: column; gap: 8px; padding: 0 20px 20px; }
#tell-form .protocol-room-heading { padding: 20px 0 4px; }
#tell-note { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
#tell-form label { margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.tell-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#tell-status { margin: 0; font-size: 13px; }
@media (max-width: 720px) {
    .shelf-row { grid-template-columns: 1fr; }
    .shelf-spines { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .studio-protocol .room-reset { margin-left: 0; }
}

/* How the artist stands. Needing Jay is amber, apart from the burnt orange that marks an Astra artist. */
.room-activity, .world-card-activity { flex: none; display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1.3 system-ui, sans-serif; color: var(--muted); white-space: nowrap; }
.room-activity::before, .world-card-activity::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.studio-protocol-heading .room-activity[data-activity="working"], .world-card-activity[data-activity="working"] { color: var(--ink); }
.room-activity[data-activity="working"]::before, .world-card-activity[data-activity="working"]::before { background: #2fa866; box-shadow: 0 0 0 3px #2fa86633; }
.room-activity[data-activity="approval"], .room-activity[data-activity="input"], .world-card-activity[data-activity="approval"], .world-card-activity[data-activity="input"] { padding: 3px 10px; border-radius: 999px; background: #ffc83d; font-weight: 700; }
.studio-protocol-heading .room-activity[data-activity="approval"], .studio-protocol-heading .room-activity[data-activity="input"], .world-card-activity[data-activity="approval"], .world-card-activity[data-activity="input"] { color: #3d2600; }
.room-activity[data-activity="approval"]::before, .room-activity[data-activity="input"]::before, .world-card-activity[data-activity="approval"]::before, .world-card-activity[data-activity="input"]::before { background: #3d2600; }
.room-needs { margin: 10px 0 4px; padding: 12px 14px; border-radius: 10px; border: 2px solid #e0a100; background: #fff4cc; color: #3d2600; font-size: 14px; line-height: 1.45; }
.room-needs strong { display: block; margin-bottom: 2px; font-size: 16px; }
.world-card[data-needs-jay] { outline: 3px solid #e0a100; outline-offset: -3px; }
.room-trace-count { display: block; font-size: 11px; color: var(--muted); }
.spine-brief { margin-top: auto; padding: 2px 8px; border-radius: 999px; background: var(--wash); color: var(--ink); font-size: 11px; font-weight: 650; }
.spine[data-aside] { background: var(--paper); }
.spine[data-aside] .protocol-score, .spine[data-aside] .spine-title { opacity: .6; }
