.event-stage-page {
  --stage-sage: #bce2ae;
  --stage-text: #e7eee4;
  --stage-muted: #b6c5b4;
  --stage-border: #425345;
  --stage-surface: #1c2a21;
  color: var(--stage-text);
  color-scheme: dark;
}
.stage-header, .stage-workspace { width: min(100%, 510px); margin-inline: auto; }
.stage-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 2px 15px; }
.stage-header h1 { margin: 0; font-size: clamp(1.36rem, 7vw, 1.94rem); letter-spacing: -.038em; }
.stage-eyebrow { margin: 0 0 4px; color: var(--stage-muted); font-size: .8rem; }
.stage-progress { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; padding: 0; margin: 0 0 14px; }
.stage-progress li { min-width: 0; border-top: 3px solid #425345; padding-top: 7px; color: var(--stage-muted); text-align: center; font-size: clamp(.62rem, 2.6vw, .77rem); line-height: 1.2; }
.stage-progress .is-complete { border-color: #6b8e63; }
.stage-progress [aria-current] { border-color: var(--stage-sage); color: #e9f5e4; font-weight: 800; }
.event-stage-page .stage-card { padding: clamp(13px, 4vw, 23px); border: 1px solid var(--stage-border); border-radius: 18px; background: var(--stage-surface); }
.event-stage-pane { display: grid; gap: 12px; min-width: 0; }
.event-stage-page [hidden] { display: none !important; }
.event-stage-pane h2 { margin: 0; font-size: clamp(1.19rem, 5.6vw, 1.54rem); letter-spacing: -.022em; }
.event-stage-pane h2:focus { outline: none; }
.event-stage-pane .text-field, .event-stage-pane textarea { min-width: 0; width: 100%; font-size: 16px; }
.event-stage-pane textarea { min-height: 100px; }
/* These styles also override the shared form’s focused and field-helper colors. */
.stage-workspace .stage-card .event-stage-pane .event-stage-error:not([hidden]) {
  margin: 0; padding: 8px 10px; border-inline-start: 3px solid #ff9c9c; border-radius: 6px;
  background: #4c252b; color: #ffd1d3; -webkit-text-fill-color: #ffd1d3; font-size: .84rem;
}
.stage-workspace .stage-card .event-stage-pane [aria-invalid="true"],
.stage-workspace .stage-card .event-stage-pane [aria-invalid="true"]:focus {
  border-color: #ff9c9c; outline: 2px solid #ff9c9c; outline-offset: 1px;
}
.stage-publish-error [role="alert"]:focus { outline: 2px solid #ff9c9c; outline-offset: 1px; }
.stage-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 11px 0 8px; }
.stage-primary, .stage-secondary, .stage-edit {
  min-height: 44px; padding: 5px 11px; border: 1px solid var(--stage-border); border-radius: 10px;
  color: var(--stage-text); background: #25352a; font: inherit; font-size: .84rem; font-weight: 750; cursor: pointer;
}
.stage-primary { background: var(--stage-sage); color: #1b2c1c; border-color: transparent; }
.stage-edit { border-color: transparent; background: transparent; color: var(--stage-sage); }
.stage-host-options summary { display: list-item; min-height: 44px; align-content: center; color: var(--stage-muted); cursor: pointer; }
.stage-host-options[open] > :not(summary) { margin-bottom: 10px; }
.stage-review-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; border-bottom: 1px solid var(--stage-border); gap: 8px; padding: 9px 0; }
.stage-review-row h3 { font-size: .77rem; margin: 0 0 2px; color: var(--stage-muted); }
.stage-review-row p { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.35; }
.stage-primary:focus-visible, .stage-secondary:focus-visible, .stage-edit:focus-visible { outline: 2px solid var(--stage-sage); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .event-stage-pane[data-stage-direction]:not([hidden]) {
    animation: stage-enter 180ms ease-out;
  }
  .event-stage-pane[data-stage-direction="forward"] { --stage-enter-from: 8px; }
  .event-stage-pane[data-stage-direction="backward"] { --stage-enter-from: -8px; }
  .stage-cover-view[open] { animation: stage-cover-enter 160ms ease-out; }
}
@keyframes stage-enter {
  from { opacity: .45; transform: translateX(var(--stage-enter-from)); }
  to { opacity: 1; transform: none; }
}
@keyframes stage-cover-enter {
  from { opacity: 0; transform: scale(.98); }
  to { opacity: 1; transform: none; }
}
.stage-actions:has([data-stage-action="publish"]:not([hidden])) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
}
.stage-actions [data-stage-action="publish"] { margin-inline: 0; }
.stage-actions :is([data-stage-action="save"], [data-stage-action="publish"]) {
  padding-inline: 6px;
  font-size: .8rem;
  line-height: 1.2;
}
.stage-edit-context { margin: 0 0 10px; color: var(--stage-sage); font-size: .83rem; }

.stage-review-row .stage-link-warning { color: #ffc0b2; }
.stage-community-chip {
  display: inline-flex; max-width: 100%; border-radius: 999px; border: 1px solid var(--stage-border);
  padding: 4px 10px; background: #1b2c21; color: #dcead9; margin-bottom: 6px;
}
.stage-bring-summary { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.stage-bring-summary li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border: 1px solid var(--stage-border); border-radius: 999px; }
.stage-bring-group { margin-top: 8px; }
.stage-bring-group > strong { color: var(--stage-muted); font-size: .8rem; }
.stage-grouped-bring .create-event-bring-items { display: none; }
.stage-bring-editor { list-style: none; padding: 0; margin: 4px 0 0; }
.stage-bring-editor li { display: flex; justify-content: space-between; align-items: center; gap: 5px; padding-block: 4px; border-bottom: 1px solid var(--stage-border); overflow-wrap: anywhere; }
.stage-bring-editor li > div { display: flex; gap: 4px; flex: none; }
.stage-remove-bring { min-height: 44px; min-width: 44px; color: var(--stage-muted); background: transparent; border: 0; font-size: 1.2rem; }
.stage-grouped-bring [data-host-bring-choices] { display: grid; gap: 10px; }
.stage-grouped-bring [data-host-bring-choices]:empty { display: none; }
.stage-grouped-bring [data-host-bring-choices] .stage-bring-group {
  margin: 0; padding: 9px 10px 3px; border: 1px solid var(--stage-border); border-radius: 12px;
}
.stage-grouped-bring [data-host-bring-choices] .stage-bring-selected { background: #203126; }
.stage-grouped-bring .stage-bring-editor li:last-child { border-bottom: 0; }
.stage-bring-check { color: var(--stage-sage); font-weight: 800; }
.stage-grouped-bring .stage-bring-editor li > div { gap: 0; }
.stage-bring-card { border: 1px solid var(--stage-border); border-radius: 14px; overflow: hidden; }
.stage-bring-card > .create-event-bring { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.stage-grouped-bring .stage-bring-card [data-host-bring-choices] { gap: 0; padding: 0 12px 4px; }
.stage-grouped-bring .stage-bring-card [data-host-bring-choices]:empty { padding: 0; }
.stage-grouped-bring .stage-bring-card [data-host-bring-choices] .stage-bring-group {
  border: 0; border-top: 1px solid var(--stage-border); border-radius: 0; background: transparent; padding: 9px 0 3px;
}
.stage-bring-card:not(.is-editing) .stage-remove-bring { display: none; }
.stage-bring-card [data-bring-edit] { justify-self: start; }
/* A neutral surface keeps the commitment and primary action easy to locate. */
.stage-grouped-bring .stage-bring-card {
  background: #171d24;
  border-color: #39434b;
  border-radius: 16px;
}
.stage-grouped-bring .stage-bring-card > .create-event-bring { background: transparent; }
.stage-grouped-bring .stage-bring-card .create-event-bring-icon {
  background: #273137; color: #c5d0d2; border-radius: 11px;
}
.stage-grouped-bring .stage-bring-card .create-event-bring-chevron { color: #aebbc0; }
.stage-grouped-bring .stage-bring-card [data-host-bring-choices] { padding-inline: 13px; }
.stage-grouped-bring .stage-bring-card [data-host-bring-choices] .stage-bring-group { border-top-color: #39434b; }
.stage-bring-card .stage-bring-group > strong { color: #bec8ce; }
.stage-bring-card .stage-bring-selected > strong { color: #bce2ae; }
.stage-bring-card .stage-bring-editor li { border-bottom-color: #39434b; }
.stage-bring-card [data-host-bring] { background: #283638; border-color: #536568; color: #ecf1ef; }
.stage-bring-card [data-host-undo], .stage-bring-card [data-bring-edit] {
  background: transparent; border-color: transparent; color: #cad3d8;
}
.stage-bring-card [data-host-undo]:hover, .stage-bring-card [data-bring-edit]:hover { background: #293239; }
.stage-bring-card [data-host-bring]:focus-visible, .stage-bring-card [data-host-undo]:focus-visible,
.stage-bring-card [data-bring-edit]:focus-visible { outline-offset: -3px; }
.event-stage-page[style*="--stage-world"] {
  --stage-sage: color-mix(in srgb, var(--stage-world) 57%, white);
  --stage-border: color-mix(in srgb, var(--stage-world) 21%, #39434b);
  --stage-muted: color-mix(in srgb, var(--stage-world) 18%, #c2c9cd);
  --stage-surface: #1c232a;
}
.event-stage-page[style*="--stage-world"] .stage-community-chip,
.event-stage-page[style*="--stage-world"] .stage-secondary {
  background: color-mix(in srgb, var(--stage-world) 17%, #1a2229);
  color: #eef2f5;
}
.event-stage-page[style*="--stage-world"] .stage-primary { color: #111b23; }
.event-stage-page[style*="--stage-world"] .stage-progress [aria-current],
.event-stage-page[style*="--stage-world"] .stage-bring-selected > strong { color: var(--stage-sage); }
.event-stage-page[style*="--stage-world"] .stage-progress .is-complete {
  border-color: color-mix(in srgb, var(--stage-world) 60%, #6b7580);
}
.stage-cover { display: grid; gap: 10px; }

.stage-cover [data-cover-open] { border: 0; padding: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: var(--stage-surface); }
.stage-cover [data-cover-open] img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.stage-cover-view { box-sizing: border-box; width: min(calc(100vw - 24px), 640px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); padding: 10px; overflow: hidden; color: var(--stage-text); background: #151921; border: 1px solid #495161; border-radius: 16px; }
.stage-cover-view::backdrop { background: #000b; }
.stage-cover-view button { display: block; margin-inline-start: auto; min-width: 44px; min-height: 44px; }
.stage-cover-view img { display: block; max-width: 100%; max-height: calc(100vh - 92px); max-height: calc(100dvh - 92px); margin-inline: auto; object-fit: contain; }
.staged-event-cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; }
.staged-event-cover[hidden] { display: none; }

.stage-review-cover { display: block; width: min(100%, 128px); padding: 0; border: 1px solid var(--stage-border); border-radius: 10px; overflow: hidden; background: #151921; cursor: zoom-in; }
.stage-review-cover img { display: block; width: 100%; height: 78px; margin: 0; object-fit: contain; }
.stage-review-cover:focus-visible, .stage-cover [data-cover-open]:focus-visible { outline: 2px solid var(--stage-sage); outline-offset: 2px; }
.stage-publish-error { padding: 10px; border: 1px solid #ef9785; border-radius: 10px; color: #ffc0b2; }
.stage-publish-error p { margin: 0 0 8px; }

.stage-cover-actions { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.stage-cover-input { position: absolute; width: 1px; height: 1px; padding: 0; clip-path: inset(50%); overflow: hidden; }
.stage-cover label.stage-cover-picker, .stage-cover-remove { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.stage-cover label.stage-cover-picker { padding: 0 12px; border: 1px solid var(--stage-border); border-radius: 12px; color: var(--stage-text); background: #151921; }
.stage-cover-input:focus-visible + label { outline: 2px solid var(--stage-sage); outline-offset: 2px; }
.stage-cover-remove { border: 0; padding-inline: 6px; background: transparent; color: #d7a6a6; font: inherit; }
.stage-cover [data-cover-open] { position: relative; }
.stage-cover [data-cover-open] > span { position: absolute; inset: auto 8px 8px auto; padding: 5px 8px; border-radius: 6px; background: #080c14e8; color: #fff; font-size: .75rem; }
.stage-cover [data-cover-status]:empty { display: none; }
.stage-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.stage-actions :is([data-stage-action="next"], [data-stage-action="publish"]) { order: 3; margin-inline-start: auto; }
.stage-actions [data-stage-action="save"] { order: 2; border-color: transparent; background: transparent; }
