/* The member activity stays anchored to one seat, with its caption outside the scene. */
body:has(#member-shell) { margin:0; background:#19352c; }
.mb-shell { --mb-ink:#263e33; --mb-green:#2e5945; --mb-paper:#faf6e8; --mb-gold:#ebc16f; display:flex; flex-direction:column; height:100vh; height:100dvh; min-width:0; overflow:hidden; background:var(--mb-paper); color:var(--mb-ink); font:16px/1.45 system-ui,sans-serif; }
.mb-shell *, .mb-shell *::before,.mb-shell *::after { box-sizing:border-box; }
.mb-shell button,.mb-shell a { font:inherit; }
.mb-shell button { cursor:pointer; touch-action:manipulation; }
.mb-shell button[disabled] { cursor:default; opacity:.6; }
.mb-shell [hidden] { display:none!important; }
.mb-shell :is(button,a,[tabindex]):focus-visible { outline:3px solid #d68e33; outline-offset:3px; }
.mb-skip { position:absolute; z-index:9; transform:translateY(-130%); left:12px; padding:7px 12px; background:white; color:#234132; }
.mb-skip:focus { transform:none; }
.mb-header { flex:none; display:flex; align-items:center; justify-content:space-between; gap:10px; min-width:0; padding:9px clamp(12px,2.8vw,38px); color:#fff6da; background:#193b31; border-bottom:2px solid #b0935f; }
.mb-brand,.mb-header nav { display:flex; align-items:center; gap:8px; min-width:0; }
.mb-seat-icon { display:grid; flex:none; place-items:center; width:41px; height:41px; border:1px solid #e0c88899; border-radius:8px; color:#f2cf87; }
.mb-seat-icon svg { width:25px; height:25px; }
.mb-brand p,.mb-brand h1 { margin:0; }
.mb-brand p { color:#d8e4ce; font-size:12px; }
.mb-brand h1 { font:600 clamp(22px,2.4vw,34px)/1.1 Georgia,serif; }
.mb-header nav button,.mb-return { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:44px; min-width:44px; padding:6px 10px; color:#f9f1d7; border:1px solid #a5b299; border-radius:6px; background:transparent; font-size:13px; text-decoration:none; }
.mb-header nav button[aria-pressed=true] { color:#223b2e; background:#ebcf91; border-color:#ebcf91; }
.mb-main { display:grid; grid-template-columns:minmax(0,1fr) clamp(315px,33vw,440px); flex:1; min-height:0; }
.mb-scene { display:grid; grid-template-rows:minmax(0,1fr) auto; min-width:0; min-height:0; background:#b9cbbc; }
#member-stage { position:relative; min-width:0; min-height:0; overflow:hidden; }
#member-stage canvas { display:block; height:100%; width:100%; }
.mb-caption { display:flex; flex-wrap:wrap; align-items:baseline; gap:3px 12px; padding:10px clamp(12px,2vw,24px); color:#f8f5e6; background:#243e33; font-size:clamp(14px,1.25vw,17px); line-height:1.45; }
.mb-caption:empty { display:none; }
.mb-caption span { flex:1 1 175px; min-width:0; }
.mb-speaker { color:#ffdc90; font-size:14px; }
.mb-panel { min-width:0; min-height:0; overflow:auto; scrollbar-gutter:stable; overscroll-behavior:contain; border-left:1px solid #b1b396; background:#faf6e8; }
.mb-panel-inner { padding:clamp(16px,3.5vh,32px) clamp(16px,2.2vw,30px) 22px; }
.mb-panel h2 { margin:0 0 9px; color:#2c4837; font:600 clamp(25px,3vw,39px)/1.13 Georgia,serif; letter-spacing:-.018em; }
.mb-round { margin:0 0 8px; font-weight:700; color:#4c6952; font-size:13px; }
.mb-instruction { margin:0 0 13px; }
.mb-actions,.mb-options,.mb-candidates { display:grid; gap:8px; }
.mb-actions { margin-top:14px; }
.mb-actions:empty { display:none; }
.mb-action,.mb-candidate { min-width:0; min-height:46px; padding:9px 12px; border:1px solid #a8ad94; border-radius:7px; background:#fffdf4; color:#2b4635; text-decoration:none; line-height:1.35; }
.mb-action { display:inline-flex; justify-content:center; align-items:center; gap:7px; font-weight:650!important; }
.mb-action:hover,.mb-candidate:hover { background:#ebf0df; border-color:#638065; }
.mb-action-primary { background:#335c43; color:#fff9e9; border-color:#335c43; }
.mb-action-primary:hover { background:#264733; }
.mb-action-quiet { justify-self:start; background:transparent; border:0; font-size:14px!important; }
.mb-action-choice { justify-content:flex-start; text-align:left; }
.mb-votes { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.mb-candidate { display:grid; gap:4px; text-align:left; }
.mb-candidate strong { font:650 19px/1.15 Georgia,serif; }
.mb-candidate span { color:#4a5e4d; font-size:14px; }
.mb-candidate small { color:#486548; font-size:12px; }
.mb-candidate[aria-pressed=true] { border-color:#496c4c; background:#e6eedb; box-shadow:inset 3px 0 #4f704e; }
.mb-result { margin:9px 0; padding:9px 12px; border-left:3px solid #a47f37; background:#f0ebd7; }
.mb-vote-note { margin:7px 0; font-size:13px; color:#4c6151; }
.mb-reading { display:grid; grid-template-rows:minmax(0,1fr) auto; height:100%; min-height:0; margin:0; padding:clamp(6px,1.8vw,20px); gap:6px; background:#e8e6d5; }
.mb-reading-art { min-height:0; display:grid; place-items:center; }
.mb-reading-art svg { width:100%; height:100%; max-width:850px; }
.mb-reading figcaption { display:grid; justify-self:center; width:min(100%,750px); gap:3px; padding:7px 11px; border-left:3px solid #788d6d; background:#fffaf0; }
.mb-reading figcaption strong { font:600 18px/1.2 Georgia,serif; }
.mb-reading figcaption span { color:#405541; font-size:14px; }
.mb-reading figcaption i { display:inline-block; width:10px; height:10px; margin-right:5px; border-radius:50%; background:#f4c652; border:2px solid #3d5b40; }
@media(max-width:720px) and (orientation:portrait) {
  .mb-header { padding:5px 8px; gap:4px; }
  .mb-seat-icon { display:none; }
  .mb-brand h1 { font-size:19px; }
  .mb-brand p,.mb-header nav span { display:none; }
  .mb-header nav { gap:4px; }
  .mb-header nav button,.mb-return { padding:5px 7px; }
  .mb-return { font-size:12px!important; }
  .mb-main { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,45%) minmax(0,1fr); }
  .mb-panel { border-left:0; border-top:1px solid #b1b396; }
  .mb-panel-inner { padding:14px 15px 24px; }
  .mb-caption { padding:6px 10px; max-height:clamp(76px,18dvh,130px); overflow:auto; }
  .mb-reading { padding:4px 7px; gap:2px; }
  .mb-reading figcaption { padding:3px 6px; gap:1px; }
  .mb-reading figcaption strong { font-size:15px; }
  .mb-reading figcaption span { font-size:13px; }
}
@media(max-height:520px) and (orientation:landscape) {
  .mb-header { padding:3px 10px; }
  .mb-brand p,.mb-seat-icon { display:none; }
  .mb-brand h1 { font-size:22px; }
  .mb-main { grid-template-columns:minmax(0,1fr) minmax(245px,38%); }
  .mb-panel-inner { padding:13px 15px 20px; }
  .mb-caption { padding:4px 10px; max-height:clamp(65px,26dvh,110px); overflow:auto; }
}
@media(prefers-reduced-motion:reduce) { .mb-shell *,.mb-shell *::before,.mb-shell *::after { scroll-behavior:auto!important; animation:none!important; transition:none!important; } }
@media(forced-colors:active) { .mb-action,.mb-candidate,.mb-header button,.mb-return { border:1px solid ButtonText; } .mb-candidate[aria-pressed=true] { outline:2px solid Highlight; } }
.mb-candidate-focus { display:flex; align-items:center; justify-content:center; gap:clamp(12px,2vw,32px); min-width:0; min-height:0; }
.mb-candidate-portrait { display:block; flex:none; width:clamp(74px,24vw,230px); height:100%; max-height:280px; }
.mb-candidate-focus>div { min-width:0; color:#2d4635; }
.mb-candidate-focus p { margin:0 0 5px; font-size:13px; font-weight:650; }
.mb-candidate-focus strong { display:block; margin:0 0 5px; font:600 clamp(22px,3vw,40px)/1.15 Georgia,serif; }
.mb-candidate-focus span { display:block; color:#526454; font-size:15px; }
@media(max-width:720px) and (orientation:portrait), (max-height:520px) and (orientation:landscape) {
  .mb-candidate-portrait { width:70px; }
  .mb-candidate-focus p,.mb-candidate-focus span { margin:0; font-size:12px; }
  .mb-candidate-focus strong { margin:0; font-size:20px; }
}

body[data-entry="member"]{display:flex;flex-direction:column;height:100vh;height:100dvh;overflow:hidden;margin:0}
body[data-entry="member"] #member-app{flex:1 1 0;min-height:0;min-width:0}
body[data-entry="member"] .mb-shell{height:100%}

.mb-ballot-confirm { margin:0 0 11px; }
.mb-ballot-confirm .mb-action { width:100%; }
.mb-wait-note { margin:11px 0 0; padding:10px 12px; border-left:3px solid #9b8856; background:#eee9d6; font-size:15px; color:#405b45; }

.mb-support { display:grid; gap:3px; margin:10px 0; padding:11px 13px; border-left:3px solid #8b7947; background:#eee8d1; }
.mb-support strong { font-size:18px; }
.mb-support span { font-size:14px; }
.mb-public-votes,.mb-galleries { margin-top:18px; font-size:14px; }
.mb-public-votes summary,.mb-galleries summary { min-height:44px; padding:11px 0; cursor:pointer; color:#35573e; font-weight:650; }
.mb-public-votes p,.mb-galleries p { margin:5px 0 9px; }
.mb-public-votes ul { list-style:none; margin:0; padding:0; }
.mb-public-votes li { display:flex; justify-content:space-between; gap:12px; padding:6px 0; border-top:1px solid #d7d9c5; }
.mb-public-votes li span { min-width:0; overflow-wrap:anywhere; }
.mb-public-votes li strong { flex:none; }
.mb-galleries { border-top:1px solid #d0d4bd; }
.mb-galleries dl { display:grid; gap:10px; margin:0; }
.mb-galleries dt { font-weight:700; }
.mb-galleries dd { margin:2px 0 0; color:#4c6151; }
