/* v4: one navigation, clear live status, and an optional practice partner. */
#yunyi-preview .yy-header-nav{display:flex;gap:clamp(12px,1.35vw,24px);margin-right:auto;min-width:0}
#yunyi-preview .yy-header-nav button{white-space:nowrap;letter-spacing:1px;font-size:13px}
#yunyi-preview .yy-header{gap:20px}
#yunyi-preview .yy-stage,#yunyi-preview .yy-screen{min-height:calc(100svh - 90px)}
#yunyi-preview [data-page="game"]{padding-bottom:65px;min-height:calc(100svh - 90px)}
#yunyi-preview .yy-game-top{display:grid;grid-template-columns:1fr minmax(0,auto) 1fr;align-items:center;min-height:70px}
#yunyi-preview .yy-room-title{justify-self:start}
#yunyi-preview #yy-game-status{position:relative;text-align:center;font-size:15px;letter-spacing:1px;line-height:1.65;color:#fff2da;text-shadow:0 2px 8px #302116,0 0 18px #302116;background:radial-gradient(ellipse,#493a2a99,transparent 75%);padding:12px 22px;max-width:600px}
#yunyi-preview .yy-view-toggle{justify-self:end;position:relative;isolation:isolate;overflow:hidden;border:.5px solid #fff8e657;border-radius:40px;padding:5px;gap:4px;background:linear-gradient(145deg,#fff9eb24,#f7eadc08 46%,#e9d1b71c);backdrop-filter:blur(14px) saturate(1.6) contrast(1.06);-webkit-backdrop-filter:blur(14px) saturate(1.6) contrast(1.06);box-shadow:inset 0 .5px .5px #ffffff85,inset 0 -.5px 1px #fff5db36,0 4px 16px #261c2324}
#yunyi-preview .yy-view-toggle:before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(113deg,transparent 8%,#fff9e632 16%,transparent 27%,transparent 75%,#cfe9ff17 89%,#fff9ed38 100%);box-shadow:inset 1px 0 2px #fff8e630,inset -1px 0 2px #d1e7ff24;border-radius:inherit}
#yunyi-preview .yy-view-toggle button{border-radius:30px;color:#352c25;padding:11px 16px;text-shadow:0 1px 2px #fff7e8c9;font-size:12px;white-space:nowrap}
#yunyi-preview .yy-view-toggle button[aria-pressed="true"]{color:#fff9eb;background:linear-gradient(145deg,#7363577a,#392e2799);text-shadow:0 1px 3px #251b13;box-shadow:inset 0 .5px 1px #fff5e95c,inset 0 -.5px 1px #18120d33,0 1px 4px #37281e30}
#yunyi-preview[data-weather="night"] .yy-view-toggle button{color:#f8eddb;text-shadow:0 1px 3px #241d17b3}
#yunyi-preview[data-weather="night"] .yy-view-toggle button[aria-pressed="true"]{color:#fff9eb;background:linear-gradient(145deg,#e8cfb651,#cbb39e26);box-shadow:inset 0 .5px 1px #fff5e966,0 1px 5px #17110d30}
#yunyi-preview [data-view="scene"] .yy-game-top{grid-template-columns:1fr}
#yunyi-preview [data-view="scene"] .yy-view-toggle{justify-self:center}
#yunyi-preview [data-view="scene"] #yy-game-status{display:none}
#yunyi-preview .yy-vertical-poem{right:4%;top:45px;font-size:17px;line-height:1.8;letter-spacing:6px;color:#fff4df;text-shadow:0 1px 3px #32291f,0 2px 8px #32291f,0 0 16px #32291f;background:linear-gradient(180deg,transparent,#44382c82 16%,#44382c82 85%,transparent);padding:28px 12px}
#yunyi-preview .yy-presence-name{font-size:23px}
#yunyi-preview .yy-presence-name small{font-size:13px}
#yunyi-preview .yy-presence-connection,#yunyi-preview .yy-presence-status{font-size:15px}
#yunyi-preview .yy-presence-person .yy-mini-avatar{width:46px;height:46px;flex-basis:46px}
#yunyi-preview .yy-presence-status:before{width:8px;height:8px}
#yunyi-preview .yy-lobby-panels .yy-lobby-panel,#yunyi-preview .yy-lobby-panels .yy-presence-panel{width:390px}
#yunyi-preview #yy-win-rate{color:#9a482e;text-shadow:0 1px 0 #fff4df;font-weight:700}
#yunyi-preview[data-weather="night"] #yy-win-rate{color:#efc682;text-shadow:0 2px 8px #30221a}
#yunyi-preview .yy-account-stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
#yunyi-preview .yy-account-stats>div{position:relative;padding-left:0;text-align:center}
#yunyi-preview .yy-account-stats>div:first-child{padding-left:0}
#yunyi-preview .yy-account-stats dt{position:relative}
#yunyi-preview .yy-account-stats>div+div dt:before{content:"｜";position:absolute;left:calc(-9px - .5em);top:0;color:var(--yy-sub);font-weight:400;opacity:.65}
.house-practice-entry{margin:22px 0 12px;padding-top:18px;border-top:1px solid #846c5444}
.house-practice-entry>div{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px;flex-wrap:wrap}
.house-practice-entry select{font:inherit;color:inherit;border:1px solid #93765f88;border-radius:14px;padding:5px 8px;background:#e6d7c380}
#yunyi-preview #house-practice-start{width:100%;margin:12px 0 5px;padding:12px;border-radius:12px;border:1px solid #806b5680;background:linear-gradient(130deg,#f6e7d550,#d1b69e60);font-size:14px}
#house-practice-start strong{font-family:'House Liao',serif;font-size:24px;font-weight:400}
.house-practice-entry small{font-size:11px;color:var(--yy-sub)}
#house-seated-actors{position:absolute;inset:0;pointer-events:none;z-index:3}
#house-seated-actors>div{position:absolute;filter:drop-shadow(0 12px 9px #21190f45)}
#house-seated-actors img{display:block;width:100%;height:100%}
#house-seated-actors [data-scene-seat="black"] img{transform:scaleX(-1)}
#house-seated-actors [data-turn="true"]{filter:drop-shadow(0 8px 7px #24190f55) brightness(1.035)}
@media(max-width:1100px){#yunyi-preview .yy-header{flex-wrap:wrap;height:auto;min-height:100px;padding-top:12px;padding-bottom:10px;gap:8px 18px}#yunyi-preview .yy-header-nav{order:5;flex:0 0 100%;justify-content:center;margin:0;gap:22px}#yunyi-preview .yy-brand{margin-right:auto}#yunyi-preview .yy-weather{flex-basis:auto;order:0}#yunyi-preview .yy-sound-wrap{margin-left:0}#yunyi-preview .yy-game-top{grid-template-columns:auto 1fr;gap:8px}#yunyi-preview #yy-game-status{grid-column:1/-1;grid-row:2;justify-self:center;font-size:14px;padding:3px 14px}#yunyi-preview .yy-view-toggle{grid-column:2;grid-row:1}#yunyi-preview [data-view="scene"] .yy-view-toggle{grid-column:1;justify-self:center}}
@media(max-width:620px){#yunyi-preview .yy-header{min-height:130px;padding:12px 16px;gap:8px}#yunyi-preview .yy-header-nav{display:grid;grid-template-columns:repeat(3,1fr);gap:0 10px}#yunyi-preview .yy-header-nav button{font-size:12px;padding:8px 0}#yunyi-preview .yy-weather button{padding:7px;min-height:36px}#yunyi-preview .yy-sound-open{width:34px;height:34px}#yunyi-preview .yy-view-toggle button{padding:9px 13px}#yunyi-preview .yy-account-stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}#yunyi-preview .yy-account-stats>div{padding-left:0}#yunyi-preview .yy-account-stats dt{font-size:11px;letter-spacing:0}#yunyi-preview .yy-account-stats dd{font-size:28px}#yunyi-preview .yy-account-stats small{font-size:10px}#yunyi-preview .yy-vertical-poem{display:none}#yunyi-preview .yy-presence-name{font-size:22px}#yunyi-preview .yy-presence-status,#yunyi-preview .yy-presence-connection{font-size:14px}}

#yunyi-preview[data-weather="night"] #house-seated-actors>div{filter:brightness(1.04) saturate(.88) sepia(.12) drop-shadow(0 10px 10px #120d0870) drop-shadow(0 0 16px #ffc17414)}

/* Keep all four edges transparent throughout action, reaction, and invitation motion. */
#yunyi-preview .yy-event-character,.house-cutscene-character,.house-letter-actor{
 -webkit-mask-image:linear-gradient(90deg,transparent,#000 13%,#000 87%,transparent),linear-gradient(180deg,transparent,#000 9%,#000 72%,transparent);
 mask-image:linear-gradient(90deg,transparent,#000 13%,#000 87%,transparent),linear-gradient(180deg,transparent,#000 9%,#000 72%,transparent);
 -webkit-mask-composite:source-in;mask-composite:intersect;
}
#yunyi-preview .yy-lobby-panels .yy-presence-list{max-height:600px;overflow-y:auto;scrollbar-gutter:stable;overscroll-behavior:contain}
@media(max-width:620px){#yunyi-preview .yy-account-stats>div+div dt:before{left:calc(-4px - .5em)}}

/* A translucent diagonal veil keeps the actual board visible beneath the performance. */
.house-cutscene{background:#201a152e;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}
.house-cutscene-wash{background:linear-gradient(100deg,#30251c55,#98745266,#30251c55);border-color:#e4c79735;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}

/* Show the next invitation after the result performance, keeping the board underneath. */
#house-rematch[inert]{visibility:hidden}

.house-release-pagination{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 0 20px;border-bottom:1px solid #dcc5ae33;color:#eadac8;font-size:13px}
.house-release-pagination>div{display:flex;align-items:center;gap:14px;flex-shrink:0}
#yunyi-preview .house-release-pagination button{padding:9px 12px;border:1px solid #dcc5ae55;border-radius:8px;background:#fff5e50c;color:#f6e7d3;font:inherit}
#yunyi-preview .house-release-pagination button:hover:not(:disabled){background:#fff5e521}
#yunyi-preview .house-release-pagination button:disabled{opacity:.35;cursor:default}
#house-release-page{min-width:38px;text-align:center;font-variant-numeric:tabular-nums}
@media(max-width:620px){.house-release-pagination{flex-direction:column;align-items:stretch;gap:12px}.house-release-pagination>div{justify-content:space-between}.house-release-pagination>span{text-align:center}}

/* The old footer haze must not obscure candlelit players in the foreground. */
#yunyi-preview[data-screen="game"] .yy-chrome-bottom{height:72px;opacity:.24}
#yunyi-preview[data-screen="game"] .yy-chrome-bottom:after{backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}

/* Leave breathing room around the native choice, including its arrow. */
.house-practice-entry>div{gap:12px;padding-inline:4px 8px}
.house-practice-entry label{position:relative;display:inline-flex;align-items:center;gap:8px;flex-shrink:0}
.house-practice-entry select{appearance:none;-webkit-appearance:none;padding:9px 32px 9px 13px;min-width:108px;line-height:1.4;border-color:#93765f60}
.house-practice-entry label:after{content:"";position:absolute;right:13px;width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-2px) rotate(45deg);pointer-events:none;opacity:.7}
#yunyi-preview .house-chat{background:linear-gradient(145deg,#56483c9e,#352e2878);backdrop-filter:blur(36px) saturate(.85);-webkit-backdrop-filter:blur(36px) saturate(.85);border-color:#f2deca45;box-shadow:inset 0 1px 0 #fff4e326,0 14px 44px #211a1824}
#yunyi-preview .house-chat header p,#yunyi-preview #house-chat-empty{color:#f1dfcc}
#yunyi-preview .house-chat-message p{background:#30271f8a}
#yunyi-preview .house-chat-meta{color:#f1d9bd}
#yunyi-preview .house-seat-request{pointer-events:auto;max-width:650px;margin:18px auto 0;padding:16px 22px;border:1px solid #eed9bc45;border-radius:16px;background:#3a302968;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);color:#fff0d9;text-align:center}
#yunyi-preview .house-seat-request p{margin:0 0 12px;font-size:14px;line-height:1.8;color:inherit}
.house-seat-request>div{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px}
#yunyi-preview .house-seat-request button{padding:10px 17px;border-radius:22px;border:1px solid #efd7b969;color:#fff1dc;background:#ceb39326;font-size:13px;line-height:1.4}
#yunyi-preview .house-seat-request [data-seat-request="accept"],#yunyi-preview #house-practice-begin{color:#403027;background:#e5d1b6}
#yunyi-preview .house-seat-request button:hover:not(:disabled){filter:brightness(1.15)}
#yunyi-preview .house-seat-request button:focus-visible{outline:2px solid #fff1d6;outline-offset:3px}
#yunyi-preview .house-seat-request button:disabled{opacity:.45;cursor:default}
#yunyi-preview .yy-event-choice{display:flex;flex-direction:column;align-items:stretch;width:100%;max-width:1120px;gap:13px;margin-top:24px}
.house-event-row{display:flex;align-items:center;justify-content:center;gap:18px}
.house-event-row-label{font-size:12px;letter-spacing:3px;color:#e7cba8;min-width:36px;flex-shrink:0}
.house-event-row>div{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
#yunyi-preview .yy-event-choice button{display:inline-flex;align-items:center;gap:8px;padding:10px 15px;white-space:nowrap}
#yunyi-preview .yy-event-choice button span{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;font-size:13px;letter-spacing:0;border-radius:50%;background:#edd3ab1c;color:#efd4a4}
#yunyi-preview .yy-event-choice button[data-paired="false"] span{color:#edbdbe;background:#e2acb21c}
#yunyi-preview .yy-event-choice button[aria-pressed="true"] span{color:#6c4c32;background:#fff6e43b}
@media(max-width:700px){.house-event-row{flex-direction:column;gap:8px}.house-event-row+.house-event-row{padding-top:14px;border-top:1px solid #ead5b82e}#yunyi-preview .yy-event-choice button{font-size:12px;padding:9px 12px}#yunyi-preview .house-seat-request{padding:14px 16px;margin-top:16px}}
/* Reserve space for the lower nameplate before instructions and pregame controls. */
@media(min-width:901px){#yunyi-preview .house-board-seat{padding-bottom:64px}}

/* Keep identity prominent and supporting notes below the controls they explain. */
#yunyi-preview .yy-user-row>div,#yunyi-preview .yy-account-identity>div{min-width:0}
#yunyi-preview .yy-user-name{font-size:36px;line-height:1.35;overflow-wrap:anywhere}
#yunyi-preview .yy-user-row .yy-mini-avatar{width:58px;height:58px;flex:0 0 58px}
#yunyi-preview .yy-lobby-links{justify-content:flex-end}
#yunyi-preview .yy-account-identity h2{font-size:52px;line-height:1.25;margin:6px 0 0;text-align:left}
#yunyi-preview .yy-account-kicker{margin:0;text-align:left}
#yunyi-preview .house-event-legend{position:relative;margin:18px auto 0;padding:0 12px;text-align:center;color:#d8c3ab;font-size:12px;line-height:1.7;letter-spacing:.6px}
@media(max-width:620px){#yunyi-preview .yy-user-name{font-size:32px}#yunyi-preview .yy-account-identity h2{font-size:42px}#yunyi-preview .house-event-legend{font-size:11px}}

/* Let the chosen names lead; role selection stays in the registration form. */
#yunyi-preview .yy-presence-name{font-size:32px;line-height:1.35}
#yunyi-preview .yy-friend{width:max-content;min-width:130px;max-width:200px}
#yunyi-preview .yy-friend-name{font-size:34px;line-height:1.35;overflow-wrap:anywhere;max-width:100%}
@media(max-width:620px){#yunyi-preview .yy-presence-name{font-size:28px}#yunyi-preview .yy-friend{min-width:108px;max-width:min(200px,100%)}#yunyi-preview .yy-friend-name{font-size:30px}}
