/* RC7 additions use the existing western palette and typography. */
.prominent-update{display:flex;flex-direction:column;align-items:stretch;text-align:left;gap:10px;padding:22px;border:2px solid #d6b979;background:linear-gradient(135deg,#641711,#33100d);box-shadow:0 8px 24px #0005;color:#fff0ce;border-radius:24px;width:100%;margin-bottom:16px}
.prominent-update .update-kicker{font:800 12px/1.4 Arial,sans-serif;letter-spacing:1.5px;display:flex;justify-content:space-between;align-items:center}
.prominent-update>strong{font:700 clamp(22px,4.5vw,32px)/1.2 Georgia,serif;overflow-wrap:anywhere}
.prominent-update #homeLatestText{font-size:17px;line-height:1.5;display:block;overflow-wrap:anywhere}
.prominent-update small{opacity:.85;font-size:12px}.update-read{font-weight:800;font-size:13px}
.prominent-update.no-update{padding:14px 18px;border-width:1px;background:#201a13;box-shadow:none;gap:5px}.prominent-update.no-update>strong{font-size:18px}.prominent-update.no-update #homeLatestText{font-size:14px}.prominent-update.no-update .update-read{display:none}
.prominent-update.critical-update{border-color:#ff9c85;background:linear-gradient(135deg,#971d14,#4b1510)}
.connection-note{padding:12px 16px;border:1px solid #b48c4f;border-radius:12px;background:#312517;color:#f5dfb6;font-size:14px;line-height:1.45;margin-bottom:16px}.connection-note[hidden]{display:none}
.mini-badge{max-width:calc(100% - 75px)}#onlineText{font-size:11px;line-height:1.4;white-space:normal}.inline-document{padding:14px!important;overflow:hidden}.document-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:12px;font-size:14px;flex-wrap:wrap}.document-toolbar>span{overflow-wrap:anywhere;flex:1;min-width:140px}.document-toolbar>div{display:flex;gap:6px}.document-toolbar .secondary{padding:9px 12px;min-width:42px;min-height:42px;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;font-size:13px}.document-scroll{overflow:auto;max-height:85vh;touch-action:pan-x pan-y pinch-zoom;border-radius:10px;background:#f5eee1}.document-pages{min-width:100%;width:max-content;max-width:none}.document-image{display:block;width:100%;max-width:100%;height:auto}.document-scroll:has(.document-image) .document-pages{width:100%}.pdf-page{margin-bottom:12px;background:white;color:#30251a}.pdf-page canvas{display:block}.sweep-sequence{font:800 20px/1.5 ui-monospace,monospace;overflow-wrap:anywhere;letter-spacing:1px}.stage-drop-zone{display:flex;flex-direction:column;align-items:center;gap:15px;padding:24px;border:2px dashed #a77838;background:#f7edda;border-radius:16px;color:#51351d;font-weight:700;cursor:pointer}.stage-drop-zone input{max-width:100%}.stage-import-panel .import-table{font-size:14px}.import-table td{vertical-align:top}.import-table td small{display:block}.import-table p{font-size:12px;margin-bottom:8px}.import-table select{min-width:130px;max-width:100%}.import-table input[type=checkbox]{width:22px;height:22px}.import-table{min-width:650px}.feedback-screenshot{max-width:100%;height:auto;border-radius:12px}.issue-card pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}.original-stage-dialog{width:min(95vw,900px);height:90vh;padding:16px;background:#efe0bd;color:#301b13;border:2px solid #b7924e;border-radius:14px}.original-stage-dialog::backdrop{background:#000b}.original-stage-dialog iframe{width:100%;height:calc(100% - 70px);border:none;background:white}#stageImportStatus,#feedbackStatus,#offlinePreparationStatus,#passwordResetStatus,#backupProgress{margin-top:14px;font-weight:700;line-height:1.5;overflow-wrap:anywhere}.stage-detail-hero p:empty{display:none}
@media(max-width:600px){.prominent-update{padding:18px}.document-toolbar{font-size:13px}.document-toolbar>span{flex-basis:100%}.inline-document{padding:10px!important}.original-stage-dialog{padding:8px}}

/* RC9 schedule status */
.event-ended{opacity:.52}
.event-live{border-left:4px solid #35b974;background:rgba(36,166,101,.11)}
.event-next{border-left:4px solid #dda345;background:rgba(221,163,69,.09)}
.schedule-status{display:inline-block;margin-top:5px;padding:3px 8px;border:1px solid currentColor;border-radius:12px;font-size:.68rem;font-weight:800;letter-spacing:.06em}

/* RC15.1 — welcome message typography polish (public home screen only).
   No data, forms, or other UI components are affected. */
#briefingCard {
  padding: 18px 19px;
}
#briefingCard .briefing-kicker {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.4;
  margin-bottom: 7px;
}
#briefingCard #briefingTitle {
  display: block;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(18px, 4.6vw, 22px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .018em;
}
#briefingCard #briefingBody {
  display: block;
  margin-top: 10px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(14px, 3.7vw, 15.5px);
  font-weight: 400;
  line-height: 1.58;
  letter-spacing: .005em;
  color: #392519 !important;
  white-space: pre-line;
  text-wrap: pretty;
  overflow-wrap: break-word;
}
#briefingCard #briefingUpdated {
  display: block;
  margin-top: 13px;
  padding-top: 9px;
  border-top: 1px solid rgba(88, 51, 26, .25);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 10px;
  font-weight: 600;
}
@media (max-width: 370px) {
  #briefingCard { padding: 16px 16px; }
}

/* RC15.2: simple, safer explanations for Stage Builder imports. */
.stage-import-panel .import-help{border:1px solid #65502f;border-radius:12px;padding:12px 14px;margin:12px 0 15px;background:#211911;color:#e9d8bb;font-size:12px;line-height:1.5}
.stage-import-panel .import-help strong{display:block;font:900 15px Georgia,serif;color:#ffe0aa;margin-bottom:6px}
.stage-import-panel .import-help p{margin:6px 0}
.stage-import-panel .import-hint{display:block;color:#b5d4b7;font-size:11px;line-height:1.4;margin:7px 0}
.stage-import-panel .import-warning{color:#ffcf78;font-size:11px;line-height:1.5;margin:7px 0}
.stage-import-panel .import-table td{min-width:100px}
.stage-import-panel .import-table td:last-child{min-width:240px}
.stage-import-panel .import-table select[data-import-conflict]{max-width:100%;width:100%;min-width:0;font-size:12px}
.stage-import-panel .import-table td small{line-height:1.5;margin:5px 0}


/* RC15.3 stage-action receipts: stay visible until dismissed, not a fleeting toast. */
.stage-result-backdrop[hidden],.stage-result-actions button[hidden]{display:none!important}
.stage-result-backdrop{position:fixed;inset:0;z-index:1500;display:grid;place-items:center;overflow:auto;padding:20px;background:rgba(4,3,3,.82);backdrop-filter:blur(4px)}
.stage-result-card{width:min(100%,560px);max-height:calc(100vh - 40px);overflow:auto;padding:clamp(20px,5vw,34px);text-align:center;border:2px solid #d1a263;border-radius:23px;background:linear-gradient(155deg,#302215,#120e0b 65%);box-shadow:0 30px 80px #000a;color:#fff0d5}
.stage-result-icon{margin:0 auto 12px;display:grid;place-items:center;width:66px;height:66px;border-radius:50%;border:2px solid #70c68b;background:#153323;color:#9beeb3;font:bold 40px Georgia,serif}
.stage-result-kicker{font:900 11px/1.45 Arial,sans-serif;letter-spacing:.13em;color:#d2b277;text-transform:uppercase}
.stage-result-card h2{font:900 clamp(23px,6vw,31px)/1.2 Georgia,serif;color:#f7deb1;margin:8px 0 13px}
.stage-result-card>p#stageResultMessage{font:15px/1.55 Georgia,serif;color:#ddd0bc;white-space:pre-line;overflow-wrap:anywhere}
.stage-result-stages{display:grid;gap:7px;margin:15px 0;text-align:left;max-height:35vh;overflow:auto}
.stage-result-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid rgba(201,157,82,.27);padding:10px 12px;border-radius:11px;background:#15130f;flex-wrap:wrap}
.stage-result-row strong{font:900 14px Georgia,serif;color:#efdbb8}.stage-result-row span{font:bold 10px Arial,sans-serif;letter-spacing:.05em;color:#9fd9b1}
.stage-result-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin:20px 0 9px}
.stage-result-actions button{min-width:140px;min-height:45px}
.stage-result-persistent{display:block;color:#988875;font-size:11px}
.stage-result-error .stage-result-card{border-color:#df735f;background:linear-gradient(155deg,#3a1612,#150c0a 75%)}
.stage-result-error .stage-result-icon{border-color:#e5a379;background:#4e1915;color:#ffe2b5}
.stage-result-error .stage-result-row{display:none}
.stage-save-progress{font-weight:750;line-height:1.5;color:#f0c787;min-height:1em;font-size:12px;margin:10px 0}
@media(max-width:550px){.stage-result-backdrop{padding:10px}.stage-result-card{max-height:calc(100dvh - 20px);padding:20px 16px}.stage-result-actions button{flex:1;min-width:130px}}

.stage-import-file-confirmation{font-weight:800;color:#b4dfba;font-size:13px;margin:12px 0;overflow-wrap:anywhere}

/* RC15.4: Upload -> Review -> Save, with advanced overwrite choices folded away. */
.stage-import-panel .import-simple-intro{max-width:940px;color:#e7d5b5;font-size:15px;line-height:1.55}
.import-simple-steps{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0 16px}
.import-simple-steps span{display:flex;align-items:center;gap:8px;border:1px solid #624d35;border-radius:20px;background:#211a14;padding:8px 12px;color:#e8d4b2;font:750 13px Arial,sans-serif}
.import-simple-steps b{display:inline-grid;place-items:center;width:23px;height:23px;background:#794529;border-radius:50%;color:white}
.import-simple-steps .step-current{border-color:#b99555;background:#322214}
.import-review-summary{display:flex;flex-direction:column;gap:5px;border:1px solid #3d8156;background:#102b1c;padding:13px 15px;margin:14px 0;border-radius:12px;color:#d8ffe0;overflow-wrap:anywhere}
.import-review-summary strong{font:900 15px Georgia,serif}.import-review-summary span{font-size:12px}
.import-review-list{display:grid;gap:11px;margin:11px 0 16px}
.import-review-stage{padding:15px 17px;border-radius:13px;border:1px solid #5d482d;background:#161210}
.import-review-stage:has([data-import-select]:checked){border-color:#b28a52;background:#1e1711}
.import-review-head{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:15px}
.import-review-choice{display:flex;align-items:center;gap:12px;cursor:pointer;font-size:14px}
.import-review-choice input{min-width:24px;width:24px;height:24px}
.import-review-choice strong{display:block;font:900 19px Georgia,serif;color:#f7dfb5}
.import-review-choice small{display:block;font-size:12px;margin-top:5px;color:#bda781}
.import-review-map{display:flex;align-items:center;gap:9px;font-weight:750;white-space:nowrap}
.import-review-map select{min-width:125px}
.import-review-impact{font-size:13px;color:#d2c1a7;line-height:1.55;margin:10px 0 7px}
.import-review-impact strong{color:#aeddba;font-weight:700}
.import-review-warning{font-size:13px!important;color:#e8b265;font-weight:750;margin:7px 0}
.import-stage-options{border-top:1px solid #423225;padding-top:9px;margin-top:10px}
.import-stage-options summary{cursor:pointer;font-weight:750;color:#eec78e}
.import-stage-options label{display:flex;flex-direction:column;gap:6px;margin-top:9px;font-size:12px}
.import-stage-options select{max-width:100%;width:min(100%,440px)}
.import-save-bar{border:1px solid #96723e;border-radius:14px;background:#271b11;padding:14px 17px;display:flex;align-items:center;justify-content:space-between;gap:13px;flex-wrap:wrap;margin-top:14px}
.import-save-description{font-size:13px;line-height:1.5;max-width:520px;color:#f4dbb6}
.import-save-bar .admin-buttons{margin:0;display:flex;gap:10px;flex-wrap:wrap}
.import-save-bar .primary{font-size:15px;min-height:45px}
.stage-import-panel .stage-drop-zone{padding:18px}
@media(max-width:650px){.import-review-head{align-items:stretch}.import-review-map{justify-content:space-between}.import-save-bar .admin-buttons,.import-save-bar .admin-buttons button{width:100%}.import-save-bar .admin-buttons button{min-height:48px}}

/* RC15.5: authored book sheet first; detailed fields remain available. */
.html-stage-page{position:relative;overflow:hidden;background:#fff;flex:none;border-radius:6px}
.html-stage-page iframe{pointer-events:none}
.stage-optional-details{margin:16px 0;padding:12px;border:1px solid var(--line,#6a4824);border-radius:12px}
.stage-optional-details>summary{cursor:pointer;font-weight:700;padding:8px;min-height:44px}
.stage-optional-details .content-card{margin-top:12px}
[data-stage-sheet] .document-toolbar{gap:8px;flex-wrap:wrap}
[data-stage-sheet] .document-toolbar>div{display:flex;gap:6px;flex-wrap:wrap}
[data-stage-sheet] .document-scroll{overflow:auto;max-height:none}
@media(max-width:500px){[data-stage-sheet].content-card{padding:10px}[data-stage-sheet] .document-toolbar>span{width:100%}}
