.connection-cards button:disabled { opacity: .42; cursor: not-allowed; border-style: dashed; }
.scene-card.locked { border-color: rgba(236, 164, 72, .68); box-shadow: inset 3px 0 0 #eca448; }
.card-actions { display: flex; gap: .45rem; align-items: center; }
.card-actions button { min-height: 2rem; padding: .35rem .65rem; }
.move-information { display: flex; align-items: center; gap: .5rem; min-width: 15rem; }
.move-information span { white-space: nowrap; }
.move-information select { min-width: 10rem; }
.node.run-running { box-shadow: inset 0 0 0 2px var(--gold); }
.node.run-completed { box-shadow: inset 0 0 0 2px var(--cyan); }
@media (max-width: 850px) { .move-information { width: 100%; } }

/* Scene workspace readability and visual hierarchy */
#scene-workspace {
  font-size: 15px;
  line-height: 1.5;
}

#scene-workspace .scene-sheet { gap: 20px; }

#scene-workspace .scene-panel {
  padding: clamp(22px, 2.2vw, 30px);
  border-color: #3c4d49;
  border-radius: 10px;
  background: linear-gradient(145deg, #111b18, #0d1513);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}

#scene-workspace .scene-panel > header {
  margin: -2px 0 22px;
  padding-bottom: 16px;
  border-bottom: 2px solid #31423e;
}

#scene-workspace .scene-panel h2 {
  font-size: clamp(21px, 2vw, 27px);
  line-height: 1.2;
}

#scene-workspace .scene-panel h3 {
  font-size: 17px;
  line-height: 1.3;
}

#scene-workspace .scene-panel header p,
#scene-workspace .scene-card p {
  max-width: 78ch;
  color: #b5c1bd;
  font-size: 13px;
  line-height: 1.55;
}

#scene-workspace .scene-panel label > span,
#scene-workspace .run-block h3 {
  font-size: 11px;
  letter-spacing: .08em;
}

#scene-workspace input,
#scene-workspace textarea,
#scene-workspace select {
  min-height: 44px;
  padding: 12px 13px;
  border-color: #42534f;
  font-size: 15px;
  line-height: 1.45;
}

#scene-workspace textarea { min-height: 104px; }

#scene-workspace button {
  min-height: 42px;
  font-size: 13px;
  line-height: 1.25;
}

#scene-workspace .scene-card {
  margin-top: 12px;
  padding: 17px;
  border-color: #3a4a46;
  border-radius: 7px;
  background: #14201d;
}

#scene-workspace .scene-card strong { font-size: 15px; line-height: 1.3; }
#scene-workspace .scene-card small { font-size: 12px; line-height: 1.4; }
#scene-workspace .card-grid { gap: 14px; }

#scene-workspace .library-grid {
  gap: 18px;
}

#scene-workspace .library-grid > section {
  padding: 20px;
  border: 1px solid #40514d;
  border-top-width: 4px;
  border-radius: 8px;
  background: rgba(8, 15, 13, .55);
}

#scene-workspace .library-grid > section:nth-child(1) { border-top-color: var(--orange); }
#scene-workspace .library-grid > section:nth-child(2) { border-top-color: var(--cyan); }
#scene-workspace .library-grid > section:nth-child(3) { border-top-color: var(--gold); }
#scene-workspace .library-grid > section:nth-child(1) h3 { color: #f0a269; }
#scene-workspace .library-grid > section:nth-child(2) h3 { color: var(--cyan); }
#scene-workspace .library-grid > section:nth-child(3) h3 { color: var(--gold); }

#scene-workspace .library-grid h3 {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #33443f;
}

#scene-workspace .choice-chip {
  min-height: 40px;
  padding: 10px 12px;
  border-color: #394b46;
  font-size: 12px !important;
  white-space: normal;
  text-align: left;
}

#scene-workspace .choice-chip:hover {
  border-color: var(--cyan);
  background: #20312d;
}

#scene-workspace .library-grid .scene-card {
  margin-top: 18px;
  border-width: 2px;
  background: #172621;
}

#scene-workspace .library-grid .scene-card::before {
  content: "SELECTED FOR THIS SCENE";
  display: block;
  margin-bottom: 10px;
  color: var(--cyan);
  font: 11px "DM Mono";
  letter-spacing: .08em;
}

#scene-workspace .scene-end-list article {
  padding: 14px;
  border-color: #3a4b47;
  font-size: 14px;
}

#scene-workspace .run-start {
  font-size: 18px;
  line-height: 1.65;
}

@media (max-width: 1150px) {
  #scene-workspace .library-grid { grid-template-columns: 1fr; }
}

/* Persistent Adventure summary */
main:has(.adventure-glance:not(.collapsed)) { padding-right: 430px; }
main:has(.adventure-glance.collapsed) { padding-right: 210px; }

.adventure-glance {
  position: fixed;
  top: 152px;
  right: 22px;
  z-index: 18;
  width: 380px;
  max-height: calc(100vh - 176px);
  padding: 0;
  border: 1px solid #526761;
  border-top: 4px solid var(--orange);
  border-radius: 9px;
  background: rgba(10, 18, 16, .98);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .48);
  overflow: hidden;
}

.adventure-glance > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  border-bottom: 1px solid #354742;
}

.adventure-glance h3 { margin: 5px 0 6px; font-size: 19px; line-height: 1.25; }
.adventure-glance header small { color: var(--muted); font-size: 13px; }
.adventure-glance header button { border: 1px solid #50645e; background: #17241f; color: var(--ink); padding: 10px 12px; font-size: 13px; cursor: pointer; }
.adventure-glance .eyebrow { font-size: 11px; }
.adventure-glance .glance-body { max-height: calc(100vh - 285px); padding: 0 20px 20px; overflow: auto; }
.briefing-block { display: block; margin-top: 16px; padding: 16px; border: 1px solid #3b4d48; border-radius: 7px; background: #101b18; }
.briefing-block > span, .briefing-block > summary { color: var(--orange); font: 12px "DM Mono"; letter-spacing: .08em; text-transform: uppercase; }
.briefing-block > div { margin-top: 12px; color: var(--ink); font-size: 15px; line-height: 1.55; }
.gm-brief { border-left: 4px solid var(--gold); }
.briefing-coverage { margin-top: 14px; padding: 12px 0; border-top: 1px solid #354742; }
.briefing-coverage summary { color: var(--muted); cursor: pointer; font-size: 13px; }
.briefing-coverage article { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid #263733; }
.briefing-coverage article strong { color: var(--cyan); font-size: 12px; }
.briefing-coverage article span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.adventure-glance ol { margin: 0; }
.adventure-glance li button { padding: 16px 0; }
.adventure-glance li span { font-size: 13px; line-height: 1.4; }
.adventure-glance li strong { margin-top: 7px; font-size: 15px; line-height: 1.4; }
.adventure-glance.collapsed { width: 180px; }
.adventure-glance.collapsed .glance-body,
.adventure-glance.collapsed header div { display: none; }
.adventure-glance.collapsed > header { justify-content: center; padding: 12px; border: 0; }
.guided-workspace { grid-template-columns: 1fr; }

/* Player-owned group and mission availability */
.mission-group-panel { margin: 34px 0; padding: 26px; border: 1px solid #40514c; border-top: 4px solid var(--cyan); border-radius: 10px; background: linear-gradient(145deg,#111c19,#0b1412); }
.section-title.compact { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.section-title.compact h2 { margin: 5px 0 8px; font-size: 25px; }
.panel-link { padding: 12px 15px; border: 1px solid var(--cyan); color: var(--cyan); text-decoration: none; white-space: nowrap; }
.mission-group-layout { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(320px,.65fr); gap: 22px; margin-top: 22px; }
.mission-group-layout > section { padding: 20px; border: 1px solid #354742; border-radius: 8px; background: #0d1714; }
.mission-group-layout h3 { margin: 0 0 15px; font-size: 18px; }
.quick-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.character-quick-card { padding: 16px; border: 1px solid #41534e; border-radius: 7px; background: #121f1b; transition: opacity .15s,border-color .15s; }
.character-quick-card.unavailable { opacity: .55; }
.character-quick-card.available { border-color: var(--cyan); box-shadow: inset 4px 0 rgba(105,216,208,.7); }
.character-quick-card header { display: flex; justify-content: space-between; gap: 12px; }
.character-quick-card header span { color: var(--orange); font: 11px "DM Mono"; text-transform: uppercase; }
.character-quick-card h4 { margin: 5px 0; font-size: 19px; }
.character-quick-card button,.resource-choice-group button,.snapshot-row button { border: 1px solid #50645e; background: #17241f; color: var(--ink); cursor: pointer; }
.character-quick-card header button { align-self: flex-start; padding: 8px 10px; }
.quick-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.quick-stats b { padding: 6px 8px; background: #20312c; color: var(--cyan); font-size: 13px; }
.character-quick-card p { margin: 7px 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.resource-choice-group { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 18px; }
.resource-choice-group > span { grid-column: 1/-1; color: var(--orange); font: 12px "DM Mono"; text-transform: uppercase; }
.resource-choice-group button { padding: 11px; text-align: left; }
.resource-choice-group button.selected { border-color: var(--cyan); background: rgba(105,216,208,.12); }
.resource-choice-group strong,.resource-choice-group small { display: block; }
.resource-choice-group small { margin-top: 5px; color: var(--muted); }
.mission-resources label span { display: block; margin-bottom: 8px; font-weight: 700; }
.mission-resources textarea { width: 100%; min-height: 88px; padding: 12px; background: #09110f; color: var(--ink); border: 1px solid #50645e; font-size: 15px; }
.snapshot-row { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-top: 18px; padding-top: 18px; border-top: 1px solid #354742; }
.snapshot-row strong,.snapshot-row span { display: block; }
.snapshot-row span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.snapshot-row button { padding: 10px 12px; white-space: nowrap; }

/* Consistent Tone and Pressure controls */
.foundation-choice-workspace { margin: 32px 0 48px; }
.presentation-choice-grid { display: grid; gap: 18px; }
.presentation-choice-grid > section { padding: 22px; border: 1px solid #40514c; border-radius: 9px; background: linear-gradient(145deg, #111b18, #0c1412); }
.presentation-choice-grid > section > span,
.pressure-note-card label > span { display: block; margin-bottom: 14px; color: var(--ink); font: 14px "DM Mono"; text-transform: uppercase; letter-spacing: .06em; }
.uniform-choice-buttons { display: grid; grid-template-columns: repeat(6, minmax(105px, 1fr)); gap: 10px; }
.uniform-choice-buttons button { min-height: 54px; padding: 12px; border: 1px solid #40524d; border-radius: 6px; background: #15211e; color: var(--ink); font-size: 15px; text-align: left; cursor: pointer; }
.uniform-choice-buttons button:hover { border-color: #728b84; background: #1b2b26; }
.uniform-choice-buttons button.selected { border-color: var(--cyan); background: rgba(105, 216, 208, .12); box-shadow: inset 4px 0 var(--cyan); }
.uniform-choice-buttons button:disabled { opacity: .35; cursor: not-allowed; }
.pressure-buttons { grid-template-columns: repeat(4, minmax(160px, 1fr)); }
.pressure-buttons button { min-height: 92px; }
.uniform-choice-buttons strong,
.uniform-choice-buttons small { display: block; }
.uniform-choice-buttons strong { font-size: 15px; }
.uniform-choice-buttons small { margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.pressure-note-card { border-left: 4px solid var(--gold) !important; }
.pressure-note-card label small { display: block; margin: -7px 0 14px; color: var(--muted); font-size: 13px; }
.pressure-note-card textarea { width: 100%; min-height: 96px; padding: 14px; border: 1px solid #52645f; background: #0b1311; color: var(--ink); font-size: 16px; line-height: 1.5; resize: vertical; }

/* Opening Scene packages */
.openings { grid-template-columns: 1fr; gap: 20px; }
.opening.opening-package { min-height: 0; padding: 28px; border-color: #40524d; border-radius: 10px; }
.opening.opening-package h3 { margin: 24px 0 10px; font-size: 23px; }
.opening.opening-package > p { max-width: 90ch; font-size: 15px; line-height: 1.55; }
.opening-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 18px 0 22px; border: 1px solid #40514c; background: #40514c; }
.opening-preview > div { padding: 16px; background: #101a17; }
.opening-preview .wide { grid-column: 1 / -1; }
.opening-preview dt { color: var(--orange); font: 12px "DM Mono"; text-transform: uppercase; letter-spacing: .06em; }
.opening-preview dd { margin: 7px 0 0; color: var(--ink); font-size: 15px; line-height: 1.5; }
.opening-preview ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
.opening-preview li { padding: 10px; border: 1px solid #354641; background: #15231f; }
.opening.opening-package > button { min-height: 48px; padding: 13px 16px; font-size: 14px !important; }

@media (max-width: 1250px) {
  main:has(.adventure-glance:not(.collapsed)) { padding-right: 250px; }
  .adventure-glance:not(.collapsed) { width: 330px; }
  .uniform-choice-buttons { grid-template-columns: repeat(3, 1fr); }
  .pressure-buttons { grid-template-columns: repeat(2, 1fr); }
  .mission-group-layout { grid-template-columns: 1fr; }
}

@media (max-width: 950px) {
  main:has(.adventure-glance), main:has(.adventure-glance.collapsed) { padding-right: 22px; }
  .adventure-glance { top: auto; right: 14px; bottom: 14px; width: min(420px, calc(100vw - 28px)); max-height: 70vh; }
  .adventure-glance.collapsed { width: 170px; }
  .opening-preview, .opening-preview ol { grid-template-columns: 1fr; }
  .opening-preview .wide { grid-column: auto; }
  .quick-card-grid { grid-template-columns: 1fr; }
  .section-title.compact,.snapshot-row { flex-direction: column; }
}
