/* V26: only the table scene uses full seated bodies. Other avatar UI is unchanged. */
.premium-pub-scene.seated-scene {
  aspect-ratio: 2048 / 1150;
  min-height: 0;
  height: auto;
  padding: 0;
  overflow: hidden;
  background-size: 100% 100%;
}
.seated-scene .bar-guest.seated-guest {
  left: var(--body-x) !important;
  top: var(--body-y) !important;
  width: calc(var(--body-height) * .5615234375) !important;
  height: auto !important;
  aspect-ratio: 1;
  transform: translate(calc(-1 * var(--hip-x)), calc(-1 * var(--hip-y))) !important;
  transform-origin: var(--hip-x) var(--hip-y);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.35));
  animation: none;
}
.seated-scene .seated-avatar {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
  overflow: visible;
  transform: none;
  --flip: 1;
}
.seated-scene .bar-guest .seated-avatar,
.seated-scene .bar-guest.facing-left .seated-avatar { animation: none; transform: none; }
.seated-pose {
  position: absolute;
  inset: 0;
  display: block;
  background-image: var(--seated-url);
  background-size: var(--sheet-size,300% 200%);
  background-position: var(--pose-x) var(--pose-y);
  background-repeat: no-repeat;
  transform: scaleX(var(--pose-flip,1));
  filter: brightness(.82) saturate(.85);
}
.seated-load-status { position:absolute;left:50%;top:25%;color:#efca8b;font-size:20px; }
.seated-loaded .seated-load-status,.portrait-loaded .seated-load-status { display:none; }
.seated-failed .seated-load-status { color:#f3a56c; }
.seated-scene .guest-shadow { display:none; }
.seated-scene .table-foreground-mask {
  z-index:5;
  background-size:100% 100%;
  /* Matches the fixed round tabletop and apron, not the old oval-bar mask. */
  clip-path:ellipse(17.8% 20.1% at 49.3% 67.3%);
}
.seated-chair-front {
  position:absolute;inset:0;pointer-events:none;z-index:9;
  background:url('/assets/bar/bar_canonical_empty.png') center / 100% 100% no-repeat;
}
/* Thin upper chair rails only: open slats must never paste floor over a body. */
.chair-front-5 { clip-path:polygon(34.1% 88.1%,35.3% 90.2%,39.0% 92.3%,43.7% 91.3%,43.5% 93.0%,38.8% 94.0%,34.8% 91.8%); }
.seated-name {
  position:absolute;z-index:13;transform:translate(-50%,-100%);
  max-width:18%;padding:3px 7px;border:1px solid #c99b594d;border-radius:7px;
  color:#ffebc5;background:#160d09dd;font:600 clamp(8px,1.1vw,12px)/1.2 sans-serif;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;
}
/* Existing event clock, pause class and reaction types still drive all timing. */
.seated-scene .bar-guest.is-drinker .seated-avatar { animation:seated-sip 6s ease-in-out var(--phase-offset,0ms) both; }
/* Authored seat direction belongs to the inner pose, never the reaction wrapper.
   Outrank the legacy facing-left avatar rule to prevent a second mirror. */
.premium-pub-scene.seated-scene .bar-guest.seated-guest.is-reacting .seated-avatar { --flip:1; animation-duration:3.2s;animation-delay:var(--phase-offset,0ms);animation-fill-mode:both; }
@keyframes seated-sip { 0%,100%{transform:rotate(0)} 35%,65%{transform:rotate(-2deg)} }
@media(prefers-reduced-motion:reduce){.seated-scene .bar-guest .seated-avatar{animation:none!important}}

.seating-review { width:min(1250px,100%);margin:auto; }
.seating-review h1 { font:700 clamp(24px,4vw,38px) Georgia,serif; }
.seating-review-controls { display:flex;flex-wrap:wrap;align-items:end;gap:10px;margin:16px 0; }
.seating-review-controls label { display:grid;gap:5px;font-size:12px; }
.seating-review-controls select { min-height:44px;padding:8px;color:#f7e0b6;background:#23170f;border:1px solid #98713d;border-radius:8px; }
.seating-review .button { min-height:44px; }
.seating-review-note { color:#c4b296;line-height:1.5;font-size:13px; }

/* Props share the scene coordinate system, above the table and below labels. */
.seated-prop { position:absolute;inset:0;z-index:7;pointer-events:none; }
.seated-prop.is-drinker,.seated-prop.reaction-cheers { z-index:10; }
.seated-prop > .beer-glass.table-beer {
  position:absolute;left:var(--mug-rest-x);top:var(--mug-rest-y);
  width:2.4%;height:auto;aspect-ratio:1;
  transform:translate(-50%,-50%) rotate(var(--mug-rest-rotation)) scaleX(var(--mug-flip));
  transform-origin:48% 82%;
}
.seated-prop.is-drinker > .table-beer { animation:anchored-beer-drink 6s cubic-bezier(.4,0,.2,1) var(--phase-offset,0ms) both; }


/* V27: side legs must be behind the tabletop/apron, like the far seats. */
.seated-scene .bar-guest.seat-2,
.seated-scene .bar-guest.seat-5 { z-index:4!important; }
.seated-scene .table-foreground-mask { clip-path:ellipse(17.8% 19.2% at 49.3% 66.3%); }
.cocktail-glass {display:block;width:42px;height:44px;background:var(--seated-url) center/contain no-repeat;filter:drop-shadow(0 3px 2px #0008);}
.seated-prop > .cocktail-glass.table-beer {position:absolute;left:var(--mug-rest-x);top:var(--mug-rest-y);width:2.6%;height:auto;aspect-ratio:1;transform:translate(-50%,-50%);}
.seated-prop::before {content:"";position:absolute;left:var(--mug-rest-x);top:calc(var(--mug-rest-y) + .65%);width:1.3%;height:.45%;border-radius:50%;background:#10090077;filter:blur(1px);transform:translateX(-50%);}
.seated-scene .seated-prop.is-drinker > .table-beer {animation:drink-table-presence 6s linear var(--phase-offset,0ms) both;}
.seated-scene .seated-prop.is-drinker::before {animation:drink-table-presence 6s linear var(--phase-offset,0ms) both;}
.seated-scene .seated-prop.is-drinker {z-index:7;}
@keyframes drink-table-presence {0%,8%,94%,100%{opacity:1}15%,87%{opacity:0}}
.drink-picker {border:0;padding:0;margin:22px 0;min-width:0;}
.drink-picker legend {font-weight:700;font-size:16px;margin-bottom:10px;}
.drink-options {display:flex;gap:12px;flex-wrap:wrap;}
.drink-option {position:relative;display:flex;align-items:center;gap:12px;min-width:220px;max-width:100%;padding:12px 16px;border:1px solid #8a69454d;background:#20170f;border-radius:12px;cursor:pointer;}
.drink-option.selected,.drink-option:has(input:checked) {border-color:#efab2c;background:#392810;box-shadow:inset 0 0 0 1px #efab2c;}
.drink-option input {width:18px;height:18px;accent-color:#efab2c;flex-shrink:0;}
.drink-option:focus-within {outline:2px solid #ffe0a5;outline-offset:3px;}
.drink-option strong {display:block;font-size:16px;}.drink-option small {display:block;color:#cbbba4;font-size:13px;margin-top:4px;}
.drink-option-art {width:42px;flex:0 0 42px;}
.drink-closeup {position:absolute;inset:7% 25% 5%;z-index:20;border:1px solid #a3763e;border-radius:18px;overflow:hidden;background:#1b100a;box-shadow:0 20px 65px #000b;animation:drink-focus 6s ease-in-out var(--phase-offset,0ms) both;pointer-events:none;}
.drink-closeup-backdrop {position:absolute;inset:-10%;background:linear-gradient(#120c0544,#120c0588),url('/assets/bar/bar_canonical_empty.png') 50% 18%/cover;filter:blur(3px);}
.drink-closeup-person {position:absolute;left:0;top:0;width:100%;aspect-ratio:1;}
.drink-portrait {position:absolute;inset:0;display:block;}
.drink-keyframe {position:absolute;inset:0;background-image:var(--portrait-url);background-size:200% 100%;background-position:var(--pose-x) 0;background-repeat:no-repeat;}
.drink-hold {animation:hold-frame 6s linear var(--phase-offset,0ms) both;}
.drink-sip {animation:sip-frame 6s linear var(--phase-offset,0ms) both;}
.drink-closeup-caption {position:absolute;bottom:0;left:0;right:0;padding:5% 6%;background:linear-gradient(transparent,#140c07 35%);text-align:center;}
.drink-closeup-caption strong {display:block;font:700 clamp(16px,2.8vw,32px) Georgia,serif;color:#ffe6bc;}
.drink-closeup-caption span {display:block;margin-top:5px;color:#dfc397;font-size:clamp(11px,1.5vw,16px);}
@keyframes drink-focus {0%,8%,100%{opacity:0;transform:scale(.94)}15%,88%{opacity:1;transform:scale(1)}96%{opacity:0;transform:scale(.98)}}
@keyframes hold-frame {0%,29%,72%,100%{opacity:1}33%,68%{opacity:0}}
@keyframes sip-frame {0%,29%,72%,100%{opacity:0}33%,68%{opacity:1}}
@media(max-width:560px){.drink-option{min-width:0;flex:1 1 140px;padding:10px;gap:8px;}.drink-option-art{width:32px;flex-basis:32px}.drink-option-art>span{width:32px}.drink-option small{font-size:12px}.drink-closeup{inset:3% 20% 3%;border-radius:10px;}}
@media(prefers-reduced-motion:reduce){.drink-closeup{animation:none;opacity:1;transform:none}.drink-hold{animation:none;opacity:0}.drink-sip{animation:none;opacity:1}.seated-scene .seated-prop.is-drinker>.table-beer{animation:none;opacity:0}}

/* The whole speech overlay fades together; layout never moves the mouth tip. */
.player-speech {position:absolute;inset:0;z-index:14;pointer-events:none;visibility:hidden;animation:player-speech-fade 3.2s ease var(--phase-offset,0ms) both;}
.player-speech.speech-positioned {visibility:visible;}
.player-speech-tail {position:absolute;inset:0;width:100%;height:100%;overflow:visible;}
.player-speech-tail path {fill:#21160f;stroke:#c9a46b;stroke-width:1;}
.seated-scene .player-speech .player-reaction-bubble {animation:none;transform:none;max-width:min(250px,40%);width:max-content;box-sizing:border-box;border-radius:12px;padding:9px 12px;}
.seated-scene .player-speech .player-reaction-bubble::after {display:none;}
@keyframes player-speech-fade {0%,100%{opacity:0}12%,82%{opacity:1}}
@media(max-width:560px){.seated-scene .player-speech .player-reaction-bubble{padding:6px 8px;font-size:9px;line-height:1.3;}}
@media(prefers-reduced-motion:reduce){.player-speech{animation:none;opacity:1}}
