/* The participant view gives the plan the whole screen. Controls float above it. */
#app.workspace-viewer.participant-app { position: relative; height: 100dvh; min-height: 0; overflow: hidden; background: #edf2f8; }
.participant-app .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.participant-header { position: absolute; z-index: 20; top: max(12px,env(safe-area-inset-top,0px)); left: 16px; right: 16px; display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 6px 8px 6px 12px; border: 1px solid #d6e1ef; border-radius: 14px; background: #ffffffed; box-shadow: 0 3px 18px #20324a0a; backdrop-filter: blur(12px); }
.participant-brand { display: flex; align-items: center; justify-content: center; flex: 0 0 36px; min-height: 44px; }
.participant-brand img { display: block; border-radius: 7px; }
.participant-heading { flex: 1 1 auto; min-width: 0; }
.participant-brandline { display: flex; align-items: center; gap: 8px; color: #2870cc; font-size: 12px; line-height: 1.6; font-weight: 700; letter-spacing: .06em; }
.participant-readonly { color: #52647a; font-weight: 400; letter-spacing: 0; }
.participant-heading h1 { max-width: 100%; color: #20324a; font-size: 16px; line-height: 1.5; font-weight: 650; letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.participant-header-actions { display: flex; gap: 2px; flex-shrink: 0; }
.participant-app .participant-header-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 10px; border-color: transparent; background: transparent; color: #52647a; font-size: 13px; }
.participant-app .participant-header-actions button:hover { background: #eaf3ff; color: #1c4e8d; }
.participant-viewer { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; outline-offset: -3px; }
.participant-workspace { position: relative; flex: 1 1 auto; display: flex; min-width: 0; min-height: 0; }
.participant-app .participant-canvas { flex: 1 1 auto; min-width: 0; min-height: 0; overflow: hidden; background: #edf2f8; }
.participant-app .participant-canvas .canvas-wrap { flex: 1 1 auto; height: 100%; min-height: 0; background: #edf2f8; }
.participant-app :is(.canvas-label,.scale-ruler,#search-empty) { display: none!important; }
.participant-direction { position: absolute; left: 50%; transform: translateX(-50%); padding: 3px 10px; border-radius: 20px; background: #ffffffdc; color: #52647a; font-size: 11px; line-height: 1.5; letter-spacing: .06em; white-space: nowrap; pointer-events: none; }
.participant-direction.direction-back { top: 82px; }
.participant-direction.direction-front { bottom: 82px; }
.participant-app .zoom-controls { z-index: 25; left: 50%; right: auto; bottom: max(16px,env(safe-area-inset-bottom,0px)); transform: translateX(-50%); display: flex; align-items: center; gap: 2px; width: max-content; max-width: calc(100% - 20px); padding: 5px; border: 1px solid #cbd8e7; border-radius: 16px; background: #fffffff5; box-shadow: 0 4px 24px #20324a18; }
.participant-app .zoom-controls button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 10px; border-radius: 10px; color: #20324a; font-size: 14px; }
.participant-app .zoom-controls button:hover { background: #eaf3ff; }
.participant-app .zoom-controls #fit { margin-left: 2px; padding: 10px 12px; border-left: 1px solid #dce5f0; border-radius: 0 10px 10px 0; white-space: nowrap; }
.participant-app .zoom-value { min-width: 40px; font-size: 12px; font-variant-numeric: tabular-nums; text-align: center; }
.participant-app .zoom-controls .participant-find { flex-shrink: 0; padding: 10px 14px; margin-right: 4px; border: 1px solid #2870cc; background: #2870cc; color: #fff; font-size: 14px; font-weight: 650; white-space: nowrap; }
.participant-app .zoom-controls .participant-find:hover { background: #205eaf; border-color: #205eaf; }
.participant-app .zoom-controls .participant-find[aria-expanded="true"] { background: #eaf3ff; border-color: #2870cc; color: #1c4e8d; }
.participant-update { position: absolute; z-index: 21; top: 80px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; justify-content: center; gap: 12px; width: max-content; max-width: calc(100% - 24px); padding: 8px 12px; border: 1px solid #b9d2f2; border-radius: 12px; background: #eff6ff; color: #1c4e8d; font-size: 13px; box-shadow: 0 3px 14px #20324a0a; }
.participant-update span { min-width: 0; }
.participant-update button { flex: 0 0 auto; min-height: 44px; color: #1c4e8d; border-color: #97b7df; background: #fff; }
.participant-app .stage-svg .dimmed { opacity: .26; }
.participant-app .stage-svg .selected { opacity: 1; }
.participant-app .stage-svg .selection-box { stroke: #2870cc; stroke-width: 3; stroke-dasharray: none; }
.participant-app .stage-svg .object:focus .hit { stroke: #174d94; stroke-width: 3; vector-effect: non-scaling-stroke; }
.participant-focus { position: absolute; top: 111px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 6px 12px; border: 1px solid #b8d2f5; border-radius: 9px; background: #fffffff0; color: #1c4e8d; font-size: 13px; text-align: center; overflow-wrap: anywhere; pointer-events: none; box-shadow: 0 2px 8px #20324a09; }
.participant-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 90px 24px; text-align: center; pointer-events: none; }
.participant-empty b { font-size: 17px; color: #20324a; }
.participant-empty span { max-width: 25em; font-size: 14px; color: #52647a; }
.participant-finder, .participant-detail { position: absolute; z-index: 30; top: 82px; right: 16px; bottom: 86px; width: 340px; max-width: calc(100% - 32px); min-height: 0; min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #cbd8e7; border-radius: 16px; background: #fff; box-shadow: 0 6px 32px #20324a18; }
.participant-detail { bottom: auto; max-height: calc(100% - 168px); }
.finder-head, .participant-detail-heading { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 8px 12px 8px 20px; }
.finder-head h2 { font-size: 17px; font-weight: 700; }
.participant-app :is(.finder-head, .participant-detail-heading) button { flex: 0 0 44px; width: 44px; height: 44px; padding: 11px; border-color: transparent; color: #52647a; background: #fff; }
.participant-app :is(.finder-head, .participant-detail-heading) button:hover { background: #edf2f8; }
#seat-search-form { flex: 0 0 auto; padding: 0 20px 16px; }
#app.participant-app #seat-search-form label { font-size: 13px; line-height: 1.6; color: #52647a; }
.participant-search-input { position: relative; margin-top: 5px; }
.participant-search-input > .ui-icon { position: absolute; left: 12px; top: 13px; width: 20px; height: 20px; color: #52647a; pointer-events: none; }
.participant-app .participant-search-input input { min-height: 46px; padding-left: 40px; font-size: 16px; border-color: #7c8fa7; border-radius: 9px; }
.participant-filters { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; margin-top: 12px; }
.finder-filter-details { margin-top: 8px; }
.finder-filter-details > summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 8px 2px; color: #1c4e8d; font-size: 13px; font-weight: 550; cursor: pointer; list-style: none; }
.finder-filter-details > summary::-webkit-details-marker { display: none; }
.finder-filter-details > summary::after { content: "+"; margin-left: 8px; color: #52647a; font-size: 20px; font-weight: 400; line-height: 1; }
.finder-filter-details[open] > summary::after { content: "−"; }
.finder-filter-details .participant-filters { margin-top: 0; }
.participant-app .participant-filters select { font-size: 16px; min-width: 0; margin-top: 4px; padding-right: 6px; }
.finder-actions { display: flex; gap: 8px; margin-top: 14px; }
.participant-app .finder-actions button { min-width: 0; min-height: 44px; font-size: 13px; padding: 9px 10px; }
.finder-actions .primary { flex: 1; }
.participant-app .finder-actions #search-clear { color: #52647a; background: #fff; border-color: transparent; }
.finder-results-head { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 2px 10px; justify-content: space-between; align-items: baseline; padding: 12px 20px; background: #f7fafe; border-top: 1px solid #dce5f0; border-bottom: 1px solid #dce5f0; }
.finder-results-head p { color: #20324a; font-size: 13px; font-weight: 650; }
.finder-results-head > span { color: #52647a; font-size: 11px; }
.seat-results { flex: 1 1 auto; min-height: 80px; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.seat-result-list { list-style: none; padding: 0; margin: 0; }
.seat-result-list li + li { border-top: 1px solid #edf2f8; }
.participant-app .seat-result-list button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 68px; padding: 12px 20px; border: 0; border-radius: 0; background: #fff; text-align: left; }
.participant-app .seat-result-list button:hover, .participant-app .seat-result-list button[aria-pressed="true"] { background: #eaf3ff; }
.participant-app .seat-result-list button:focus-visible { outline-offset: -4px; }
.result-seat { display: flex; align-items: center; gap: 8px; min-width: 72px; max-width: 48%; color: #1c4e8d; }
.result-seat b { font-size: 16px; overflow-wrap: anywhere; }
.result-seat .ui-icon { flex-shrink: 0; width: 20px; height: 20px; }
.result-description { flex: 1; min-width: 0; color: #20324a; font-size: 13px; font-weight: 550; overflow-wrap: anywhere; }
.result-description small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; }
.seat-result-list button > .ui-icon { flex: 0 0 16px; width: 16px; height: 16px; color: #7c8fa7; }
.seat-results-empty { padding: 24px 20px; font-size: 14px; line-height: 1.7; }
.seat-results-empty p { margin-top: 8px; color: #52647a; }
.participant-app #more-seats { width: calc(100% - 32px); margin: 12px 16px 16px; color: #1c4e8d; font-size: 13px; }
.participant-detail-heading { padding-top: 16px; padding-bottom: 12px; align-items: flex-start; border-bottom: 1px solid #edf2f8; }
.participant-detail-heading > div { min-width: 0; }
.participant-detail-heading p { color: #52647a; font-size: 12px; }
.participant-detail-heading h2 { font-size: 25px; line-height: 1.4; color: #1c4e8d; margin-top: 3px; overflow-wrap: anywhere; }
.participant-detail-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 16px 20px 24px; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.participant-seat-part { font-size: 16px; font-weight: 650; }
.participant-seat-part span { margin-left: 10px; padding: 3px 7px; background: #edf2f8; border-radius: 5px; color: #52647a; font-size: 13px; font-weight: 500; }
.participant-detail-body > p + p { margin-top: 10px; }
.participant-note { margin-top: 18px; padding: 14px; background: #f7fafe; border: 1px solid #dce5f0; border-radius: 10px; }
.participant-note b { font-size: 12px; color: #52647a; }
.participant-note p { white-space: pre-wrap; margin-top: 6px; }
.participant-no-note { color: #52647a; font-size: 13px; }
/* Share choices distinguish a participant's viewing link from editing access. */
dialog .share-section { padding: 18px; border: 1px solid #dce5f0; border-radius: 12px; background: #fff; }
dialog .share-section + .share-section { margin-top: 16px; }
dialog .share-section h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; line-height: 1.6; }
dialog .share-section p { margin: 6px 0 12px; font-size: 14px; color: #52647a; line-height: 1.7; }
dialog .share-participant { border-color: #b5cef0; background: #f4f8ff; }
dialog .share-participant h3 { color: #1c4e8d; }
dialog .share-section .linkbox { width: 100%; min-height: 44px; margin: 8px 0; padding: 10px 12px; background: #fff; border: 1px solid #7c8fa7; border-radius: 8px; font-size: 14px; overflow-wrap: anywhere; }
dialog .share-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
dialog .share-actions button { flex: 1 1 auto; justify-content: center; min-height: 44px; }
dialog .share-edit { background: #fff; }
dialog .share-edit > summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #52647a; font-size: 14px; font-weight: 550; cursor: pointer; list-style: none; }
dialog .share-edit > summary::-webkit-details-marker { display: none; }
dialog .share-edit > summary::after { content: "+"; font-size: 20px; font-weight: 400; }
dialog .share-edit[open] > summary::after { content: "−"; }

/* A finder is temporary at every width; the canvas keeps its dimensions. */
@media (max-width: 850px) {
  .participant-header { top: max(8px,env(safe-area-inset-top,0px)); left: 8px; right: 8px; gap: 6px; padding: 4px 4px 4px 8px; min-height: 56px; border-radius: 12px; }
  .participant-brand { flex-basis: 30px; }
  .participant-heading h1 { font-size: 14px; }
  .participant-brandline { font-size: 12px; gap: 6px; }
  .participant-header-actions button > span { display: none; }
  .participant-app .participant-header-actions button { padding: 10px; }
  .participant-direction.direction-back { top: 74px; }
  .participant-focus { top: 102px; padding: 5px 10px; font-size: 12px; }
  .participant-finder { position: fixed; z-index: 50; inset: 0; width: 100%; max-width: none; height: 100dvh; padding-top: env(safe-area-inset-top,0px); padding-bottom: env(safe-area-inset-bottom,0px); border: 0; border-radius: 0; overflow-y: auto; overscroll-behavior: contain; }
  .finder-head { min-height: 60px; padding: 8px 8px 8px 16px; }
  .finder-head h2 { font-size: 17px; }
  #seat-search-form { padding: 0 16px 12px; }
  .participant-filters { margin-top: 8px; }
  .finder-actions { margin-top: 10px; }
  .finder-results-head { padding: 10px 16px; }
  .seat-results { flex: 0 0 auto; overflow: visible; min-height: 68px; }
  .participant-app .seat-result-list button { min-height: 64px; padding: 10px 16px; }
  .participant-detail { top: auto; bottom: max(84px,calc(env(safe-area-inset-bottom,0px) + 68px)); left: 10px; right: 10px; width: auto; max-width: none; max-height: min(34%,280px); border-radius: 14px; }
  .participant-detail-heading { min-height: 58px; padding: 8px 8px 8px 16px; }
  .participant-detail-heading h2 { font-size: 20px; }
  .participant-detail-body { padding: 10px 16px 16px; }
  .participant-note { margin-top: 12px; padding: 10px 12px; }
  .participant-app .zoom-controls { bottom: max(12px,env(safe-area-inset-bottom,0px)); padding: 4px; gap: 0; border-radius: 14px; }
  .participant-app .zoom-controls .participant-find { padding: 10px 12px; margin-right: 2px; }
  .participant-app .zoom-controls #fit { padding: 10px; }
  .participant-update { top: 72px; gap: 8px; font-size: 12px; }
  .participant-viewer.finder-open .participant-canvas { visibility: hidden; }
}
@media (max-width: 400px) {
  .participant-app .zoom-value { display: none; }
  .participant-app .zoom-controls .participant-find { font-size: 13px; padding-left: 10px; padding-right: 10px; }
  .participant-app .zoom-controls #fit { font-size: 13px; padding-left: 8px; padding-right: 8px; }
}
@media (min-width: 600px) and (max-width: 850px) and (max-height: 500px) {
  .participant-detail { top: 76px; bottom: 80px; left: auto; right: 10px; width: 280px; max-height: none; }
}
@media (max-height: 580px) {
  .participant-finder { overflow-y: auto; }
  .seat-results { flex: 0 0 auto; overflow: visible; }
}
.participant-viewer.detail-open .stage-svg .object.dimmed { opacity: 1; }
.participant-info-notes { white-space: pre-wrap; overflow-wrap: anywhere; }
dialog .participant-open-link { display: inline-flex; gap: 6px; align-items: center; min-height: 44px; padding: 8px 0; }
.participant-app #drawing > text { display: none; }
@media (prefers-reduced-motion: reduce) {
  .participant-app *, .participant-app *::before, .participant-app *::after { animation: none!important; transition: none!important; }
}
