/* Event workspaces use the same paper, ink and brass as the drawing tools. */
#eventStudio { margin: 0 0 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); }
.ev-launcher, .ev-head, .ev-phase-tools { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px 18px; padding:12px 16px; }
.ev-launcher { background:#faf6ed; border-radius:inherit; }
.ev-launch-copy { display:flex; flex-wrap:wrap; gap:2px 14px; align-items:baseline; }
.ev-launch-copy strong { font:400 1.2rem/1.2 var(--serif); }
.ev-launch-copy span, .ev-hint, .ev-metadata, .ev-sync, .crew-time, .crew-foot { color:#6a604e; font-size:.88rem; }
.ev-head { padding:15px 16px 12px; }
.ev-heading { min-width:0; }
.ev-heading h2 { font:400 clamp(1.65rem,3vw,2.4rem)/1.12 var(--serif); letter-spacing:-.03em; margin:2px 0 0; overflow-wrap:anywhere; }
.ev-actions, .ev-metadata, .ev-status-line { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.ev-metadata { gap:6px 12px; }
.ev-metadata > span + span { border-left:1px solid var(--line); padding-left:12px; }
.ev-btn { display:inline-flex; align-items:center; justify-content:center; min-height:34px; color:#493f31; line-height:1.2; padding:7px 10px; border:1px solid #cfc4b0; border-radius:5px; background:var(--paper); font:550 .87rem/1.25 var(--sans); text-decoration:none; text-align:center; }
.ev-btn:hover, .ev-btn[aria-pressed=true] { background:#f3ead7; border-color:#b6a078; }
.ev-btn.ev-primary { background:#e7d7b2; border-color:#c4ab7b; color:#342b20; }
.ev-btn.ev-primary:hover { background:#deca9f; }
.ev-btn[hidden], .ev-message:empty { display:none; }
.ev-portal-return { padding:8px 16px; border-bottom:1px solid var(--line-light); background:#faf6ed; border-radius:inherit; }
.ev-btn.ev-back-portal { min-height:38px; color:#392e1d; background:#f3ead7; }
.ev-btn.ev-back-portal:hover { background:#e7d7b2; }
body:has(.event-dialog[open] .ev-back-portal) .ev-portal-return { display:none; }
.ev-tabs { display:flex; overflow-x:auto; max-width:100%; border-block:1px solid var(--line-light); background:#faf7f0; padding-inline:10px; gap:3px; }
.ev-tab { display:inline-flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:5px; flex:0 0 auto; padding:10px 11px; border-bottom:3px solid transparent; margin-bottom:0; min-height:42px; color:#675e4f; font-size:.93rem; }
.ev-tab small { font-size:.74rem; }
.ev-tab:hover { background:#f5eee2; }
.ev-tab[aria-pressed=true] { color:#3f3420; font-weight:650; border-color:#927449; background:#f2e9d7; }
.ev-phase-tools { padding:9px 16px 3px; }
.ev-status-line { padding:2px 16px 8px; min-height:23px; }
.ev-sync { font-size:.77rem; }
.ev-error { color:#874730; }
.ev-status-line .ev-retry { min-height:26px; padding:3px 7px; }
body.event-active .studio > .layout-heading { display:none; }
body.event-active #eventStudio { margin-top:15px; }
body.event-active .preset-field { display:none; }
body.drawing-expanded #eventStudio { display:none; }

.event-dialog { background:var(--paper); color:var(--ink); border:1px solid #c1b295; border-radius:10px; width:min(620px,calc(100% - 26px)); max-height:88dvh; padding:0; box-shadow:0 18px 85px #30271d52; }
.event-dialog::backdrop { background:#302a2385; }
.ev-dialog-head { position:sticky; top:0; z-index:1; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 18px; border-bottom:1px solid var(--line); background:var(--paper); }
.ev-dialog-head h2, .crew-sheet h2 { margin:0; font:400 1.65rem/1.16 var(--serif); overflow-wrap:anywhere; }
.ev-dialog-head:has(.ev-dialog-actions) { flex-wrap:wrap; gap:8px 14px; }
.ev-dialog-body { display:grid; gap:14px; padding:16px 18px 20px; }
.ev-dialog-body > .ev-btn, .ev-form > .ev-btn { justify-self:start; }
.ev-dialog-body .ev-hint, .ev-message { margin:0; line-height:1.45; }
.ev-list-section:empty { display:none; }
.ev-list-section h3, .crew-sheet h4 { font-size:.94rem; margin:0 0 7px; color:#524430; }
.ev-form, .ev-list-section { display:grid; gap:10px; }
.ev-fields { display:grid; grid-template-columns:2fr 1fr 1fr; gap:10px; }
.ev-fields.ev-pair { grid-template-columns:1fr 1fr; }
.ev-field { min-width:0; display:grid; align-content:start; gap:5px; color:#554b3f; font-size:.85rem; font-weight:550; }
.ev-field :is(input,textarea,select) { display:block; width:100%; min-width:0; min-height:38px; padding:7px 9px; background-color:#fffdf9; border:1px solid #c9bfa9; border-radius:4px; font:400 .92rem/1.4 var(--sans); color:var(--ink); }
.ev-field select { padding-right:27px; }
.ev-field textarea { resize:vertical; }
.ev-records { display:grid; gap:5px; }
.ev-record, .ev-member { display:flex; align-items:center; gap:6px 12px; flex-wrap:wrap; padding:8px 10px; border:1px solid var(--line-light); border-radius:5px; text-align:left; }
.ev-record { justify-content:space-between; width:100%; min-height:42px; }
.ev-record:hover { background:#f7f1e5; }
.ev-record strong, .ev-member strong { overflow-wrap:anywhere; }
.ev-member span, .ev-member small, .ev-record small { color:var(--muted); font-size:.8rem; overflow-wrap:anywhere; }
.ev-member .ev-btn { margin-left:auto; }
.crew-sheet { padding:14px 15px; border:1px solid var(--line); border-radius:5px; }
.crew-sheet .eyebrow { margin:0 0 5px; }
.crew-route { margin:4px 0 5px; font:400 1.16rem/1.4 var(--serif); }
.crew-sheet h4 { margin:14px 0 5px; }
.crew-lines { margin:0; padding:0; list-style:none; }
.crew-lines li { padding:6px 0; border-bottom:1px solid var(--line-light); }
.crew-lines label { display:flex; align-items:baseline; gap:9px; }
.crew-lines input { accent-color:#776442; }
.crew-note { white-space:pre-wrap; overflow-wrap:anywhere; }
.crew-time,.crew-foot,.crew-note { margin:6px 0 0; }
.crew-foot { margin-top:12px; }
.crew-print { display:none; }
@media(max-width:650px) {
  .ev-head, .ev-phase-tools, .ev-launcher { padding-inline:11px; }
  .ev-portal-return { padding-inline:11px; }
  .ev-status-line { padding-inline:11px; }
  .ev-dialog-head, .ev-dialog-body { padding-inline:13px; }
  .ev-fields { grid-template-columns:1fr 1fr; }
  .ev-fields:not(.ev-pair) > :first-child { grid-column:1 / -1; }
}
@media print {
  #eventStudio, .event-dialog, dialog.event-dialog[open] { display:none !important; }
  body.printing-crew > *:not(.crew-print) { display:none !important; }
  body.printing-crew .crew-print { display:block !important; }
  .event-dialog::backdrop { display:none !important; background:transparent !important; }
  .crew-print .crew-sheet { border:0; color:#111; font-size:11pt; }
  .crew-print .crew-sheet h2 { font-size:19pt; }
  .crew-print .crew-lines li { padding:4pt 0; }
  .crew-print .crew-lines li { break-inside:avoid; }
  .crew-print h4 { break-after:avoid; }
}
