#host[data-game="western"]{--wood:#372922;--paper:#ffedc9;--accent:#f4b65a;--teal:#194844;color:var(--paper);background:#bb8965}
#host[data-game="western"] .scene-shade{background:linear-gradient(90deg,#59331315,transparent 58%)}
#host[data-game="western"][data-stage="playing"] .scene-shade{display:none}
#host[data-game="western"] #panel{left:clamp(20px,5vw,92px);top:auto;bottom:clamp(20px,7vh,84px);transform:none;width:min(390px,36vw);max-width:none;padding:clamp(18px,2.2vw,32px);color:#432b22;border:3px solid #50352b;border-radius:3px;background:#ffedc9;box-shadow:inset 0 0 0 5px #ffedc9,inset 0 0 0 6px #b68959,5px 7px 0 #49372cc7;text-shadow:none}
#host[data-game="western"] #panelLabel{color:#825031;font-weight:850;font-size:clamp(12px,1.06vw,15px);letter-spacing:.095em}
#host[data-game="western"] :is(#gameTitle,#panelTitle){font-family:Rockwell,'Hedvig Letters Serif',Georgia,serif;font-weight:900;font-size:clamp(35px,4.4vw,71px);color:#523323;letter-spacing:-.05em;line-height:.98}
#host[data-game="western"] #instruction{font-size:clamp(15px,1.16vw,19px);color:#4b3429;line-height:1.4;margin:14px 0 18px}
#host[data-game="western"] :is(#panel button,#buttons a,#quick button,#closeHelp){background:#1f514a;color:#fff2cb;border:2px solid #3e3023;border-radius:4px;box-shadow:0 3px 0 #3e3023;font-weight:800}
#host[data-game="western"] :is(#panel button.secondary,#buttons a,#quick button){background:#f0bf76;color:#38291e}
#host[data-game="western"] .roster{color:#362a21;background:#f2d8a7}
#host[data-game="western"] .roster small{color:#624128}
#host[data-game="western"] :is(.readouts span,.icon,.game-locale,#count>div,#helpBox){background-color:#203f3c;border:2px solid #342b24;color:#ffebc3;border-radius:5px}
#host[data-game="western"] #phase{font-size:clamp(18px,2.2vw,37px);font-weight:900;line-height:1;font-variant-numeric:tabular-nums}
#host[data-game="western"]:not([data-stage="playing"]) #phase{font-size:clamp(13px,1.25vw,19px)}
#host[data-game="western"] #phase[data-urgent="true"]{color:#ffdc9e;background:#943f31}
#host[data-game="western"] #countNum{color:#ffd188}
#host[data-game="western"] #scores{display:none}
#host[data-game="western"][data-stage="playing"] .top-hud{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:clamp(5px,1vw,16px);align-items:start}
#westernScores{display:flex;gap:4px;align-items:stretch;justify-content:center;min-width:0}
.west-score{flex:0 1 144px;min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:5px;padding:4px 8px 3px;color:#fff2cf;background:#283c37f5;border:2px solid #3f3027;border-top:4px solid var(--seat);border-radius:4px;box-shadow:2px 3px 0 #45372955;line-height:1}
.west-score b{font:800 clamp(12px,1.05vw,19px)/1.2 system-ui;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--seat)}
.west-score strong{grid-row:1/3;grid-column:2;font:900 clamp(23px,2.6vw,43px)/1 Georgia,serif}
.west-score small{font:700 clamp(9px,.9vw,15px)/1.2 ui-monospace,monospace;color:#ffdd9a;letter-spacing:.02em}
#phone[data-game="western"]{background:repeating-linear-gradient(90deg,#174641 0 5%,#1c4b45 5% 10%);color:#452f21}
#phone[data-game="western"] .phone-inner{text-align:center;background:#ffebc2;border:4px solid #453326;border-radius:5px;box-shadow:inset 0 0 0 5px #f3ce92,4px 5px 0 #102d28;padding:clamp(18px,5vw,35px)}
#westernBadge{display:inline-grid;place-items:center;width:60px;height:60px;font:900 42px/1 Georgia,serif;border:4px double #704a30;border-radius:50%;color:#523b27;background:var(--phone-color);margin-bottom:9px}
#phone[data-game="western"] #phoneTitle{font-family:Rockwell,Georgia,serif;color:#4f3325}
#phone[data-game="western"] :is(#phoneInfo,#phoneKind,#sensorStatus){color:#483b2b}
#phone[data-game="western"] #phoneButtons{justify-content:center}
#phone[data-game="western"] #phoneButtons button{background:#20554c;color:#fff3d6;border:2px solid #3c3225;border-radius:4px}
@media(max-width:740px){#westernScores{flex-wrap:wrap;gap:2px}.west-score{flex:1 1 28%;max-width:40%;padding:2px 4px}.west-score small{font-size:8px}.west-score strong{font-size:19px}.west-score b{font-size:11px}#host[data-game="western"] .game-tools{gap:2px}#host[data-game="western"] .game-tools .icon{width:30px;height:30px}}
@media(max-aspect-ratio:1.16){#host[data-game="western"] #panel{left:4%;bottom:max(12px,3vh);width:92%;max-height:calc(100% - 80px)}#host[data-game="western"][data-stage="playing"] .top-hud{grid-template-columns:1fr auto}#westernScores{grid-column:1/-1;grid-row:2}}
@media(max-height:540px) and (min-aspect-ratio:1.16){#host[data-game="western"] #panel{width:44vw;max-height:calc(100% - 50px);bottom:8px;padding:14px 17px}#host[data-game="western"] #instruction{font-size:14px;margin:10px 0}#host[data-game="western"] :is(#gameTitle,#panelTitle){font-size:30px}}

/* The sheriff presents the notice from the edge of the street. Keep the image
   outside the text fitter so a long translation never shrinks his portrait. */
.west-briefing{
 --top-room:max(62px,9dvh);--foot-room:clamp(12px,7dvh,84px);
 position:absolute;inset:var(--top-room) 4vw 0;z-index:3;pointer-events:none;
 display:grid;align-items:end;grid-template: minmax(0,1fr) / min(41vw,64dvh) minmax(0,min(46vw,740px));
}
.west-briefing>img{
 grid-area:1/1;width:100%;height:auto;max-height:100%;object-fit:contain;object-position:left bottom;
 filter:drop-shadow(4px 3px 0 #35271e60);transform-origin:left bottom;
 transition:opacity .2s,transform .26s ease-out;user-select:none;
}
#host[data-game=western][data-stage=playing] .west-briefing:not(:has(#helpBox:not([hidden]),#count:not([hidden])))>img{opacity:0;transform:translate(-38%,100%)}
#host[data-game=western] .west-briefing:has(#helpBox:not([hidden])) #count{display:none}
#host[data-game=western] .west-briefing :is(#panel,#helpBox,#count){
 grid-area:1/2;position:relative;inset:auto;transform:none;width:100%;height:auto;max-width:none;
 max-height:calc(100dvh - var(--top-room) - var(--foot-room));margin:0 0 var(--foot-room);
}
#host[data-game=western] .west-briefing :is(#panel,#helpBox,#count>div){
 border:3px solid #473324;background:#ffedcf;color:#38271f;border-radius:3px;
 padding:clamp(16px,2.7vmin,36px);box-shadow:inset 0 0 0 5px #ffedcf,inset 0 0 0 6px #bd9261,5px 6px 0 #35271e99;
}
#host[data-game=western] .west-briefing :is(#panel,#helpBox){pointer-events:auto}
#host[data-game=western] .west-briefing #count{display:block;align-self:end;background:transparent;padding:0}
#host[data-game=western] .west-briefing #count>div{width:100%;max-height:calc(100dvh - var(--top-room) - var(--foot-room));text-align:start}
#host[data-game=western] .west-briefing #countNum{text-align:center;color:#9d492f}
#host[data-game=western] .west-briefing :is(#instruction,#helpText,#countHint){max-width:none;font-size:clamp(16px,1.43vw,25px);line-height:1.38}
.west-speaker{display:table;width:fit-content;max-width:100%;background:#523625;color:#ffe4a3;
 margin:0 0 .65em;padding:.24em .65em;font:850 clamp(12px,1vw,16px)/1.2 system-ui,sans-serif;letter-spacing:.065em;text-transform:uppercase}
#host[data-game=western] .scene-shade{background:linear-gradient(0deg,#46342740,transparent 66%);pointer-events:none}
#host[data-game=western] .west-reaction{position:absolute;z-index:2;bottom:0;right:1.4vw;pointer-events:none;display:flex;align-items:flex-end;width:min(31vw,380px);gap:3px}
.west-reaction img{width:clamp(48px,6vw,100px);height:auto}
.west-reaction p{margin:0 0 6px;background:#ffedcf;border:2px solid #493125;color:#422820;border-radius:2px;padding:6px 9px;overflow-wrap:anywhere;font:750 clamp(12px,1.04vw,17px)/1.23 system-ui,sans-serif}
.west-pad-portrait{display:block;width:min(120px,21dvh);height:auto;margin:0 auto 4px}
#phone[data-game=western] .west-speaker{margin:0 auto 4px}
@media(orientation:portrait){
 .west-briefing{--foot-room:max(12px,2.7dvh);inset:var(--top-room) 4vw var(--foot-room);
  grid-template:minmax(0,1fr) auto / minmax(0,1fr)}
 .west-briefing>img{width:80%;height:100%;max-height:44dvh}
 #host[data-game=western] .west-briefing :is(#panel,#helpBox,#count){grid-area:2/1;margin:0;max-height:min(65dvh,calc(100dvh - 150px))}
 #host[data-game=western] .west-briefing #count>div{max-height:inherit}
 #host[data-game=western] .west-reaction{width:min(64vw,330px)}
}
@media(orientation:landscape) and (max-height:540px){
 .west-briefing{--top-room:48px;--foot-room:9px;inset-inline:2vw;grid-template-columns:min(33vw,60dvh) minmax(0,1fr)}
 #host[data-game=western] .west-briefing :is(#panel,#helpBox,#count>div){padding:10px 14px}
 .west-briefing .west-speaker{margin-bottom:4px}
 #host[data-game=western] .west-briefing :is(#instruction,#helpText,#countHint){font-size:16px;margin:6px 0}
 .west-pad-portrait{float:inline-end;width:min(18vw,100px);margin:0 0 0 5px}
}
@media(prefers-reduced-motion:reduce){.west-briefing>img{transition:none}}
