/* Shared glass materials: navigation floats above the table, content stays readable. */
:root{--ui-ink:#f8fbf9;--ui-muted:#cfdbd4;--ui-line:#ffffff2e;--glass-control:linear-gradient(145deg,rgba(49,78,65,.64),rgba(16,42,31,.78));--ui-glass:linear-gradient(145deg,rgba(47,76,63,.91),rgba(14,36,27,.95));--ui-control:linear-gradient(150deg,#ffffff17,#ffffff06);--glass-edge:inset 0 1px 0 #ffffff2b,inset 0 -1px 0 #00000016,0 5px 16px #0000001a}
body{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','PingFang SC','Microsoft YaHei',sans-serif;color:var(--ui-ink)}
.tools .icon,.infinite-rule-row button,.infinite-rule-row button.rule-ready,.infinite-rule-row button.rule-hit{background:var(--glass-control)!important;color:var(--ui-ink)!important;border:1px solid var(--ui-line)!important;border-radius:24px!important;box-shadow:var(--glass-edge)!important;backdrop-filter:blur(10px) saturate(120%)!important;-webkit-backdrop-filter:blur(10px) saturate(120%)!important;text-shadow:none!important}
.infinite-rule-row button{min-height:40px;gap:6px}.infinite-rule-name,.infinite-rule-count{color:var(--ui-ink)!important}.infinite-rule-row .infinite-rule-color{background:#aebdb4;transition:background-color .2s,box-shadow .2s}.infinite-rule-row .rule-ready .infinite-rule-color{background:#ddd0a8}.infinite-rule-row .rule-hit .infinite-rule-color{background:var(--rule-color);box-shadow:0 0 6px color-mix(in srgb,var(--rule-color) 30%,transparent)}
.infinite-pending{background:none!important;border:0!important;padding:0!important;color:#f4f8f5!important;font-size:10px!important;line-height:1.45;text-shadow:0 1px 3px #06160cb0}.infinite-pending[hidden]{display:none!important}
.infinite-rule-row button.rule-success{animation:glass-rule-confirm .55s ease}.infinite-rule-row button.rule-pulse{animation:none}.infinite-rule-row .rule-success .infinite-rule-color{animation:glass-dot-confirm .55s ease}
@keyframes glass-rule-confirm{35%{transform:scale(calc(1.025 + var(--chain-level,1)*.008))}100%{transform:scale(1)}}@keyframes glass-dot-confirm{35%{transform:scale(1.6);box-shadow:0 0 12px var(--rule-color)}100%{transform:scale(1)}}
body>dialog[open]:not(.shop-detail-dialog):not(.settings-dialog),body>dialog.compact-dialog[open],body>dialog.infinite-rule-detail[open],body>dialog.seat-occupant-dialog[open],body>dialog.shop-purchase-confirm[open]{background:var(--ui-glass)!important;color:var(--ui-ink)!important;border-color:var(--ui-line)!important;border-radius:28px!important;box-shadow:inset 0 1px 0 #ffffff35,0 20px 64px #0005!important;backdrop-filter:blur(14px) saturate(115%)!important;-webkit-backdrop-filter:blur(14px) saturate(115%)!important}
.settings-dialog>.settings-content,body>dialog.shop-detail-dialog[open],body>dialog.decor-inventory[open]{background:var(--ui-glass)!important;color:var(--ui-ink)!important;border:1px solid var(--ui-line)!important;border-radius:28px!important;box-shadow:inset 0 1px 0 #ffffff35,0 16px 48px #0004!important;backdrop-filter:blur(14px) saturate(115%)!important;-webkit-backdrop-filter:blur(14px) saturate(115%)!important}
.settings-navigation,.settings-tabs{color:var(--ui-ink)}.settings-tabs{border:1px solid #ffffff18;background:#ffffff05;border-radius:22px}.settings-tabs button{border-radius:18px!important;color:var(--ui-muted)!important;background:transparent!important;border-color:transparent!important}.settings-tabs button[aria-selected=true]{color:#fff!important;background:#ffffff17!important;box-shadow:inset 0 1px 0 #ffffff20,0 2px 7px #0001!important}
body>dialog button:not(.icon),.settings-dialog button:not(.icon):not(.shop-media-preview):not(.shop-detail-close):not(.navigation-back):not(.navigation-close),#actions button,.decor-toolbar button,.decor-left>button{color:var(--ui-ink);border-radius:18px;background:var(--ui-control);border-color:var(--ui-line);transition:background .16s,opacity .16s,transform .16s}
body>dialog button.primary,.settings-dialog button.primary,#actions button.primary{background:linear-gradient(145deg,#e0d0a4,#cbb783)!important;color:#183127!important;border-color:#fff0cb6b!important;box-shadow:inset 0 1px 0 #fff5d890,0 3px 9px #0002!important}
body>dialog button:not(:disabled):active,.tools .icon:active,#actions button:active{transform:scale(.975)}body>dialog button:disabled{opacity:.38}
body>dialog p,.settings-dialog p{color:var(--ui-muted)}.settings-dialog .animal-choice,.settings-dialog .shop-item,.settings-dialog .personal-row,.payer-card,.blood-win-record,.blood-ledger-entry{border-color:#ffffff20;background:#ffffff07;border-radius:20px}
body>dialog#infinite-opening[open]{width:min(680px,calc(100vw - 40px))!important;max-width:calc(100vw - 40px)!important;max-height:calc(100dvh - 28px)!important;padding:24px!important;display:flex!important;flex-direction:column;gap:16px!important;overflow:auto!important;text-align:left!important}
#infinite-opening .infinite-opening-header{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center}#infinite-opening .infinite-opening-kicker{font-size:10px;color:#cbd7cf;letter-spacing:2px}#infinite-opening h2{font-size:26px!important;font-weight:600;letter-spacing:.6px!important;margin:0!important}#infinite-opening .infinite-opening-header p{font-size:12px!important;line-height:1.5;margin:0!important;color:#c3d1c7!important}
#infinite-opening .infinite-opening-cards{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px!important}#infinite-opening .infinite-opening-cards section{background:linear-gradient(145deg,#ffffff0e,#ffffff04)!important;border:1px solid #ffffff21!important;border-radius:20px!important;padding:16px!important;min-width:0;display:flex;flex-direction:column;gap:10px;box-shadow:inset 0 1px 0 #ffffff16}
#infinite-opening .infinite-opening-category{display:flex;justify-content:space-between;align-items:center;color:#d0dcd4;font-size:10px}#infinite-opening .infinite-opening-category>span{display:flex;align-items:center;gap:6px}#infinite-opening .infinite-opening-category>small{font-size:15px;font-weight:300;color:#ffffff35}.infinite-opening-dot{width:6px!important;height:6px!important}
#infinite-opening .infinite-opening-cards b{font-size:18px!important;font-weight:600;color:#fff;letter-spacing:0;line-height:1.3}#infinite-opening .infinite-opening-cards p{font-size:12px!important;line-height:1.65;margin:0!important;color:#d8e0da!important}#infinite-opening .infinite-opening-cards section>small{font-size:11px;color:#eee2bd}#infinite-opening .infinite-opening-formula{text-align:center;font-size:10px;line-height:1.5;color:#c0d0c5}#infinite-opening footer{margin:0!important}#infinite-opening footer .primary{min-height:44px!important;border-radius:24px!important;margin:0!important;font-size:14px!important;width:min(280px,100%)}
@media(max-height:500px) and (orientation:landscape){body>dialog#infinite-opening[open]{padding:20px!important;gap:12px!important}#infinite-opening h2{font-size:23px!important}#infinite-opening .infinite-opening-cards section{padding:14px!important;gap:8px}#infinite-opening .infinite-opening-cards p{font-size:11px!important;line-height:1.55}}
@media(max-width:520px) and (orientation:portrait){#infinite-opening .infinite-opening-cards{grid-template-columns:1fr}body>dialog#infinite-opening[open]{width:calc(100vw - 32px)!important;padding:20px!important}#infinite-opening .infinite-opening-cards section{gap:8px}}
@media(prefers-reduced-transparency:reduce){:root{--glass-control:#203c2e;--ui-glass:#20382b}.tools .icon,.infinite-rule-row button,body>dialog[open],.settings-dialog>.settings-content{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}}
@media(prefers-reduced-motion:reduce){body>dialog button,.tools .icon,.infinite-rule-row button,.infinite-rule-color{animation:none!important;transition:none!important;transform:none!important}}

.infinite-rule-count::before{content:'';font-size:8px;font-weight:400;opacity:.7;margin-right:2px}

/* Keep touch scrolling, with no visible scroll track across settings. */
#creation-room-password::placeholder{color:#f8fbf9!important;opacity:.5!important}
:is(#home-dialog,#lobby,#coin-rules-dialog,#chat-dialog),:is(#home-dialog,#lobby,#coin-rules-dialog,#chat-dialog) *{scrollbar-width:none!important;scrollbar-color:transparent transparent!important}
:is(#home-dialog,#lobby,#coin-rules-dialog,#chat-dialog)::-webkit-scrollbar,:is(#home-dialog,#lobby,#coin-rules-dialog,#chat-dialog) *::-webkit-scrollbar{width:0!important;height:0!important;display:none!important;background:transparent!important}
body>dialog#home-dialog::backdrop,body>dialog#lobby::backdrop{background:#081b1390!important;backdrop-filter:blur(12px)!important;-webkit-backdrop-filter:blur(12px)!important}
.opponent.floating .infinite-avatar-counts{display:flex!important;flex-direction:row!important;gap:7px;line-height:1.25;font-weight:600;pointer-events:none}.opponent.floating .infinite-avatar-counts span{font-size:10px!important;text-shadow:0 1px 3px #102b20}
#infinite-opening .infinite-opening-header{padding:2px 0 6px}#infinite-opening h2{font-size:23px!important;letter-spacing:0!important}
body>dialog#home-dialog.settings-dialog .settings-panel,body>dialog#lobby.settings-dialog .settings-panel,body>dialog#home-dialog.settings-dialog .settings-subpage .settings-panel,body>dialog#lobby.settings-dialog .settings-subpage .settings-panel,#home-dialog #coin-rules-dialog .settings-panel,#coin-rules-dialog #coin-rules-form .settings-panel{scrollbar-width:none!important;scrollbar-color:transparent transparent!important}

/* An active declaration breathes independently of historical trigger counts. */
.infinite-rule-row button.rule-sustained .infinite-rule-color{background:var(--rule-color)!important;animation:infinite-active-breath 2.4s ease-in-out infinite;transform-origin:center}
@keyframes infinite-active-breath{0%,100%{transform:scale(.85);opacity:.65}50%{transform:scale(1.25);opacity:1}}
@media(prefers-reduced-motion:reduce){.infinite-rule-row button.rule-sustained .infinite-rule-color{animation:none!important;opacity:1}}

.infinite-rule-row button{align-items:center!important;justify-content:center!important;line-height:1!important}
.infinite-rule-row .infinite-rule-name,.infinite-rule-row .infinite-rule-count{display:inline-flex;align-items:center;line-height:1!important;margin:0!important;padding:0!important;align-self:center!important}
.opponent.floating .infinite-avatar-counts{gap:1ch!important;color:#f8fbf9!important}
.opponent.floating .infinite-avatar-counts span{color:#f8fbf9!important}
.opponent.floating .infinite-avatar-income{display:block;color:#f8fbf9;font-size:10px;line-height:1.4;white-space:nowrap;text-shadow:0 1px 3px #102b20;pointer-events:none}

/* Keep speech and payout feedback in front of the rule controls. */
.table-speech{z-index:40!important}.infinite-kong-money{display:flex;flex-direction:column;gap:4px;padding:9px 13px;max-width:320px!important;font-size:11px;color:#fff;pointer-events:none;animation:infinite-money-gain .45s ease}
.opponent.floating.infinite-seat{padding-left:12px!important;padding-right:12px!important;min-width:120px;max-width:calc(100vw - 24px);box-sizing:border-box}
.opponent.floating .infinite-avatar-income{font-size:9px;max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:center}
body>dialog#infinite-opening[open]{--opening-gap:16px;gap:0!important;padding-top:18px!important}
#infinite-opening .infinite-opening-header{padding:1.5px 0 4.5px;margin-bottom:calc(var(--opening-gap)*.75)}
#infinite-opening .infinite-opening-formula{display:block;align-self:center;width:100%;text-align:center;margin:calc(var(--opening-gap)*.5 + 6px) 0 calc(var(--opening-gap)*.5)!important;padding:0}
@media(max-height:500px) and (orientation:landscape){body>dialog#infinite-opening[open]{--opening-gap:12px;padding-top:15px!important}}
.settlement-counting{font-variant-numeric:tabular-nums;animation:infinite-money-gain 1.1s ease}
@media(prefers-reduced-motion:reduce){.infinite-kong-money,.settlement-counting{animation:none!important}}
.infinite-kong-money{position:fixed!important;z-index:45!important}
.table-speech.infinite-kong-money{flex-direction:column!important;align-items:flex-start!important;width:max-content;line-height:1.45}
:is(#creation-room-password,#room-password,#join-password,input[placeholder="留空则无密码"])::placeholder{text-align:center!important}
:is(#creation-room-password,input[placeholder="留空则无密码"]){text-align:center!important}
dialog#chat-dialog[open]{width:min(980px,calc(100vw - 32px))!important;max-width:calc(100vw - 32px)!important;text-align:left!important}
.chat-layout{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:16px;width:100%;min-height:0;max-height:62dvh}
.chat-record-column,.hand-reference-column{min-width:0;min-height:0;overflow:auto;scrollbar-width:none}
.chat-record-column{display:flex;flex-direction:column}.chat-record-column #chat-log{flex:1;min-height:90px;max-height:none!important;margin:0!important}.chat-record-column h3,.hand-reference-column h3{font-size:14px;color:#f8fbf9;margin:0 0 12px}
.hand-reference-column{padding-left:16px;border-left:1px solid #ffffff24;font-size:11px;line-height:1.6}.hand-reference-column section{padding:10px 0;border-bottom:1px solid #ffffff18}.hand-reference-column h4{margin:0;color:#f8fbf9;font-size:12px}.hand-reference-column p{font-size:11px!important;line-height:1.6!important;margin:6px 0!important}.hand-reference-column strong{color:#e4d49c;font-size:11px}.hand-reference-formula{padding:10px;border-radius:12px;background:#ffffff08}.hand-reference-column details{padding:8px 0;border-bottom:1px solid #ffffff18}.hand-reference-column summary{cursor:pointer;color:#f8fbf9}
.haptics-setting{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0}
.infinite-rule-detail .infinite-rule-body{text-align:left;display:flex;flex-direction:column;gap:8px}.infinite-rule-detail .infinite-rule-body h3{font-size:13px;font-weight:700;color:#fff;margin:12px 0 0;border-left:3px solid #8fe0cd;padding-left:9px}.infinite-rule-detail .infinite-rule-body p{margin:0!important;line-height:1.65!important;font-size:12px!important}.infinite-rule-detail .infinite-rule-body small{font-size:10px!important;line-height:1.6;color:#b5c7bd}.infinite-rule-metrics{padding:10px 12px;border:1px solid #ffffff20;border-radius:14px;background:#ffffff07}.infinite-listening-status,.infinite-listening-reason{color:#f2e1b5!important}
.infinite-rule-detail .infinite-rule-body h4{font-size:11px;font-weight:500;color:#b8cac0;margin:4px 0}
input[placeholder="留空则无密码"]{padding-left:3rem!important;padding-right:3rem!important}
.infinite-net,.infinite-pending{font-size:10px!important;line-height:1.4!important;font-weight:400!important;color:#e1e9e4!important}
.final-hand-card{padding:12px 0;border-bottom:1px solid #ffffff20}.final-hand-card h4{margin:0 0 8px;color:#fff;font-size:12px}.final-hand-card p{font-size:11px;line-height:1.5}.final-hand-tiles{display:flex;flex-wrap:wrap;align-items:center;gap:3px}.final-hand-tiles img{width:25px;height:35px;object-fit:contain;background:#fff6df;border-radius:3px}.final-hand-meld{display:inline-flex;gap:2px;margin-left:9px}
.chat-layout{display:flex;flex-direction:column;gap:12px;max-height:62dvh}.chat-layout>[hidden]{display:none!important}.hand-reference-tabs{display:flex;flex:none;gap:8px}.hand-reference-tabs button{flex:1;min-width:0;font-size:12px;white-space:normal}.chat-record-column,.hand-reference-column{flex:1;max-height:54dvh}.hand-reference-column{border-left:0;padding-left:0}.reference-tiles{display:flex;flex-wrap:wrap;gap:3px;align-items:center;margin:7px 0}.reference-tiles img{width:25px;height:35px;object-fit:contain;background:#fff6df;border-radius:3px}.reference-meld{display:inline-flex;gap:2px;margin-left:9px}.hand-reference-column .example-score{color:#e2d69f!important;font-size:10px!important}.hand-reference-column section>small{display:block;margin-top:10px;color:#b6cbc0}.infinite-net{white-space:pre!important}.infinite-honor-note{background:none!important;padding:0!important;font-size:10px!important;color:#e1e9e4!important;line-height:1.4}.infinite-honor-intro{text-align:center!important;margin:0 0 6px!important;font-size:10px!important;color:#c0d0c5}
.chat-layout .hand-reference-tabs button[aria-selected=true]{background:#ffffff24!important;color:#fff!important;box-shadow:inset 0 1px 0 #ffffff35!important}
.chat-layout .hand-reference-tabs button[aria-selected=false]{background:transparent!important;color:#c8d9cf!important;box-shadow:none!important}

.chat-record-column{overflow:hidden!important;height:54dvh;flex-shrink:0}.chat-record-column #table-status,.chat-record-column #chat-phase{flex:none}.chat-record-column #chat-phase{margin:5px 0 8px}.chat-record-column #chat-log{overflow:auto;min-height:0!important}.chat-record-column #room-chat-form{flex:none;margin-top:auto;position:sticky;bottom:0}.chat-layout{min-height:0}.hand-reference-column{overflow:auto}

/* Chat: one bounded scroll area, bottom composer, compact navigation. */
body>dialog#chat-dialog[open]{padding:10px 18px 8px!important;gap:6px!important;overflow:hidden!important}
#chat-dialog>.settings-navigation{height:16px!important;min-height:16px!important;margin:0!important;padding:0!important;border:0!important;grid-template-columns:32px minmax(0,1fr) 32px!important;align-items:center!important}
#chat-dialog>.settings-navigation>button{height:16px!important;min-height:16px!important;width:32px!important;min-width:32px!important;font-size:22px!important;align-items:center!important;justify-content:center!important}
#chat-dialog .navigation-title{line-height:16px!important;align-self:center!important;font-size:15px!important}
#chat-dialog>.chat-header{display:none!important;border:0!important}
#chat-dialog .chat-layout,.room-chat-panel .chat-layout{flex:1;min-height:0;max-height:none!important;overflow:hidden;gap:8px}
.chat-record-column,.hand-reference-column{height:auto!important;max-height:none!important;min-height:0!important;flex:1!important}
.chat-record-column{overflow:hidden!important;flex-shrink:1!important;gap:6px}
.chat-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y}
#chat-dialog .chat-scroll #chat-log,.room-chat-panel .chat-scroll #chat-log{overflow:visible!important;flex:none!important;min-height:0!important;max-height:none!important}
.chat-scroll #table-status{display:flex;flex-wrap:wrap;gap:6px 12px;padding:4px 0;font-size:10px}
.chat-scroll #chat-phase{font-size:10px;margin:2px 0 8px!important;opacity:.7}
.chat-record-column #room-chat-form{position:static!important;flex:none!important;flex-shrink:0!important;padding-top:3px!important;margin:0!important}
#chat-dialog #chat-log li,.room-chat-panel #chat-log li{gap:8px!important;align-items:flex-start!important}
#chat-log li>time{font-size:9px;line-height:1.5;font-variant-numeric:tabular-nums;color:#b5c9bc;flex:0 0 48px;white-space:nowrap;padding-top:2px}
#chat-dialog #chat-log li>span,.room-chat-panel #chat-log li>span{font-size:11px!important;line-height:1.6!important}
#chat-dialog #chat-log li>img,.room-chat-panel #chat-log li>img{width:22px!important;height:22px!important;flex:0 0 22px!important}
.hand-reference-column{padding:0 2px 6px!important;scroll-padding-top:8px;overflow-y:auto!important}
.hand-reference-column>h3{font-size:13px;margin:0 0 6px}.hand-reference-column>p{font-size:11px!important;line-height:1.6!important;margin:4px 0 12px!important;color:#c5d6cb}
.hand-reference-column>h4{font-size:13px!important;margin:16px 0 8px!important;color:#fff;letter-spacing:.3px}.hand-reference-column>h5{font-size:11px;margin:14px 0 6px;color:#b9d4c7}
.hand-reference-column .reference-overview{font-size:11px;line-height:1.75;background:#ffffff08;border:1px solid #ffffff14;border-radius:12px;padding:10px 12px}
.hand-reference-column .reference-hand-card{padding:10px 12px!important;margin:8px 0!important;border:1px solid #ffffff18!important;border-radius:12px;background:#ffffff06}
.reference-hand-card>header{display:flex;align-items:center;justify-content:space-between;gap:10px}.reference-hand-card h4{font-size:12px!important;margin:0!important}.reference-hand-card strong{font-size:10px!important;color:#efdca4;white-space:nowrap}
.hand-reference-column .reference-hand-card>p{font-size:11px!important;line-height:1.65!important;margin:7px 0!important}.reference-hand-card>small{font-size:10px!important;opacity:.8}.reference-hand-card .example-score{padding:7px 9px;border-radius:8px;background:#00000015;line-height:1.7!important}
.hand-reference-formula,.reference-payments{padding:10px 12px;background:#ffffff08;border-radius:12px;line-height:1.75!important}
.hand-reference-column details{border:1px solid #ffffff16;border-radius:10px;padding:9px 11px;margin:6px 0}.hand-reference-column details summary{font-size:12px;cursor:pointer}.hand-reference-column details p{font-size:11px;line-height:1.75}.hand-reference-column details small{font-size:10px;line-height:1.65;color:#adc6b6}

.reference-overview p{margin:0 0 6px!important;font-size:11px!important;line-height:1.65!important}.reference-overview p:last-child{margin-bottom:0!important}

#result #settlement-detail.infinite-settlement .blood-ledger-entry{margin:12px 0!important;padding:12px 14px!important;gap:7px!important}

.infinite-rule-row button.infinite-honor-target{width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;border-radius:50%!important;padding:0!important;font-size:14px!important;flex:none}
body>dialog.infinite-dialog[open]:not(.settings-dialog){background:rgba(17,47,35,.94)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;text-shadow:0 1px 3px #000}
body>dialog.infinite-dialog::backdrop{background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
.infinite-dialog .infinite-rule-metrics,#infinite-opening .infinite-opening-cards section{background:rgba(17,47,35,.88)!important}
.chat-loan-actions{display:flex;gap:8px;margin-top:7px}.chat-loan-actions button{font-size:11px!important;min-height:30px!important;padding:4px 12px!important}

.tools #chat{position:relative}.tools #chat-unread:not([hidden]){display:grid!important;background:#df6556!important;color:#fff!important;border:1px solid #ffffff80;box-shadow:0 2px 5px #0004}.tools #chat-unread[hidden]{display:none!important}

.infinite-rule-row:has(.infinite-honor-target){grid-template-columns:repeat(3,minmax(0,1fr)) 34px 34px!important;align-items:center!important}

.infinite-rule-row .infinite-rule-name{font-size:6px!important}.infinite-rule-row .infinite-rule-count{font-size:5.5px!important}.infinite-rule-count::before{font-size:4px!important}
.tools #chat-unread:not([hidden]){display:block!important;width:6px!important;height:6px!important;min-width:6px!important;padding:0!important;right:2px!important;top:2px!important;border:0!important;box-shadow:none!important;border-radius:50%!important;font-size:0!important;line-height:0!important;background:#ed6557!important}
.tools #chat-unread.unread-pulse{animation:chat-unread-breathe 1s ease-in-out 2}
@keyframes chat-unread-breathe{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.3);opacity:.45}}
@media(prefers-reduced-motion:reduce){.tools #chat-unread.unread-pulse{animation:none!important}}

.infinite-rule-row .infinite-rule-name,.infinite-rule-row .infinite-rule-count{font-size:10px!important;font-weight:400!important}.infinite-rule-count::before{font-size:10px!important}
.infinite-rule-row button:not(.infinite-honor-target){height:34px!important;min-height:34px!important;padding:4px 8px!important}
.tools #chat #chat-unread[hidden]{display:none!important}
.tools #chat.loan-request-pulse{animation:chat-loan-breathe 1.2s ease-in-out infinite}
@keyframes chat-loan-breathe{0%,100%{opacity:1;filter:brightness(1)}50%{opacity:.55;filter:brightness(1.3)}}
.infinite-rule-row button.rule-success{animation:hud-trigger-pop .55s ease-out!important}
@keyframes hud-trigger-pop{0%,100%{transform:scale(1);filter:brightness(1)}40%{transform:scale(1.06);filter:brightness(1.35)}}
@media(prefers-reduced-motion:reduce){.tools #chat.loan-request-pulse,.infinite-rule-row button.rule-success{animation:none!important}}

body>dialog.infinite-dialog:not(#infinite-opening){padding-top:7px!important}
body>dialog.infinite-dialog:not(#infinite-opening)>h2{font-size:14px!important;line-height:1.2!important;margin:0 0 5px!important;min-height:0!important;gap:6px!important}
body>dialog.infinite-dialog:not(#infinite-opening) button.infinite-ack{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:80px!important;min-width:80px!important;height:24px!important;min-height:24px!important;padding:3px 10px!important;margin:0 auto!important;font-size:7px!important;line-height:1.2!important;background:var(--glass-control)!important;color:#f4f8f5!important;border:1px solid var(--ui-line)!important;border-radius:12px!important;box-shadow:var(--glass-edge)!important}

body>dialog.infinite-rule-detail[open]{gap:6px!important}body>dialog.infinite-rule-detail>h2{margin-bottom:0!important}

.infinite-honor-target.honor-rotating{animation:honor-target-flash 1.25s ease-out!important}

@media(prefers-reduced-motion:reduce){.infinite-honor-target.honor-rotating{animation:none!important}}

/* Ready is a continuous preview; rotation is a short flash, never a 3D flip. */
.infinite-honor-target.honor-ready:not(.honor-rotating){animation:honor-ready-breathe 1.8s ease-in-out infinite!important;border-color:#f2d593!important}
@keyframes honor-ready-breathe{0%,100%{box-shadow:0 0 0 0 #f5d28422;filter:brightness(1)}50%{box-shadow:0 0 0 4px #f5d28440,0 0 14px #f5d28455;filter:brightness(1.35)}}
@keyframes honor-target-flash{0%{transform:scale(1);filter:brightness(1)}12%,42%{transform:scale(1.24);background:#ffe3a0;color:#183526;filter:brightness(1.8);box-shadow:0 0 0 5px #ffe1a466,0 0 26px #ffe1a4dd}27%,60%{transform:scale(1.08);filter:brightness(1.1);box-shadow:0 0 0 2px #ffe1a488}78%{transform:scale(1.15);filter:brightness(1.45);box-shadow:0 0 0 7px #ffe1a422,0 0 22px #ffe1a488}100%{transform:scale(1);filter:brightness(1)}}
.infinite-pending{max-width:min(510px,calc(100vw - 30px));white-space:normal!important;text-align:left;overflow-wrap:anywhere}
body>dialog.infinite-honor-dialog[open]{width:min(420px,calc(100vw - 28px))!important;max-height:calc(100dvh - 30px)!important;overflow-y:auto!important;padding:16px!important;text-align:left!important;box-sizing:border-box}
body>dialog.infinite-honor-dialog>h2{display:flex!important;align-items:center;justify-content:center;font-size:18px!important;margin-bottom:12px!important;gap:10px!important}
.infinite-honor-dialog h2 img{width:29px;height:40px;object-fit:contain;background:#fff5dc;border-radius:4px}
.honor-current{padding:10px 12px;border:1px solid #ebd69760;border-radius:12px;background:#efd68d0c;margin-bottom:12px}
.honor-current small{display:block!important;font-size:11px!important;color:#d3dfd5!important}
.honor-current strong{display:block;font-size:15px;color:#ffe1a2;margin:5px 0}
.infinite-honor-dialog .honor-current p,.infinite-honor-dialog .honor-detail-notes p{font-size:11px!important;line-height:1.65!important;margin:5px 0!important;letter-spacing:0!important}
.honor-reward-rows{display:grid;gap:7px}
.honor-reward-rows>div{display:grid;grid-template-columns:1fr auto;gap:2px 10px;padding:8px 10px;border-radius:9px;background:#ffffff09}
.honor-reward-rows b{font-size:13px;color:#eff5ed}.honor-reward-rows strong{font-size:16px;color:#ffe1a2}.honor-reward-rows small{grid-column:1/-1;font-size:11px!important;line-height:1.5!important;margin:0!important}
.honor-detail-notes{margin-top:10px;color:#d8e2d7}.infinite-honor-dialog footer{display:flex;justify-content:center;margin-top:12px}
body>dialog.infinite-honor-dialog button.infinite-ack{font-size:12px!important;height:32px!important;min-height:32px!important;width:96px!important}
@media(prefers-reduced-motion:reduce){.infinite-honor-target.honor-ready:not(.honor-rotating),.infinite-honor-target.honor-rotating{animation:none!important}.infinite-honor-target.honor-ready{box-shadow:0 0 0 2px #f5d28480}}

body>dialog.infinite-honor-dialog[open]{display:flex!important;flex-direction:column!important;gap:10px!important;overflow:hidden!important}
body>dialog.infinite-honor-dialog>h2{flex:none;margin:0!important;outline:none!important}
.honor-detail-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.infinite-honor-dialog footer{flex:none;margin:0!important}
.honor-current{padding:7px 10px;margin-bottom:8px}.honor-current strong{font-size:14px;margin:3px 0}
.honor-detail-notes summary{font-size:11px;line-height:1.6;cursor:pointer;color:#e4d7b4;padding:3px 0}
.opponent .infinite-public-waits{max-width:155px!important;text-align:left!important;font-size:10px!important;line-height:1.5!important;letter-spacing:0!important;color:#ffe4a8!important;white-space:normal!important}

body>dialog#infinite-honor-detail.infinite-dialog[open]{padding:14px!important;gap:9px!important;background:rgba(17,47,35,.96)!important}
body>dialog#infinite-honor-detail.infinite-dialog>h2{font-size:17px!important;letter-spacing:0!important;margin:0!important;gap:9px!important}
#infinite-honor-detail h2 img{width:23px;height:32px}
#infinite-honor-detail .honor-current{margin:0 0 8px!important;padding:7px 10px!important}
#infinite-honor-detail .honor-current small{display:inline!important;margin:0 8px 0 0!important;font-size:10px!important}
#infinite-honor-detail .honor-current strong{display:inline;font-size:14px;margin:0}
#infinite-honor-detail .honor-current p{margin:4px 0 0!important;line-height:1.5!important}
#infinite-honor-detail .honor-reward-rows{margin:0!important;gap:6px!important}
#infinite-honor-detail .honor-reward-rows>div{grid-template-columns:42px 50px minmax(0,1fr);align-items:center;padding:8px 10px;gap:6px}
#infinite-honor-detail .honor-reward-rows small{grid-column:auto;margin:0!important;font-size:11px!important;line-height:1.5!important}
body>dialog#infinite-honor-detail.infinite-dialog button.infinite-ack{font-size:12px!important;min-height:32px!important;height:32px!important;width:96px!important}

.infinite-rule-row button.infinite-honor-target.honor-rotating{position:relative;overflow:visible!important;background:#ffe4a7!important;color:#183526!important;border-color:#fff8e2!important;font-weight:800!important;font-size:17px!important}
.infinite-honor-target.honor-rotating::after{content:'';position:absolute;inset:-5px;border:2px solid #ffefb0;border-radius:50%;pointer-events:none;animation:honor-rotation-ring .6s ease-out 2}
@keyframes honor-rotation-ring{from{transform:scale(.9);opacity:1;box-shadow:0 0 10px #fff1b8}to{transform:scale(1.6);opacity:0}}
@media(prefers-reduced-motion:reduce){.infinite-honor-target.honor-rotating::after{animation:none;opacity:.7}}

.infinite-rule-row button:is([data-rule="A10"],[data-rule="C04"]){gap:3px!important;padding:4px 6px!important}
.infinite-rule-row button:is([data-rule="A10"],[data-rule="C04"]) .infinite-rule-name{font-size:11px!important;font-weight:600!important;white-space:nowrap!important;flex-shrink:0}
.infinite-rule-row button:is([data-rule="A10"],[data-rule="C04"]) .infinite-rule-count{font-size:9px!important}

.infinite-pending>.infinite-status-line{display:block!important;margin:0!important;padding:0!important;line-height:1.5!important;white-space:normal}

/* Camera lock has a persistent selected state, including touch devices. */
.tools button[aria-pressed="true"]{color:#e7bd62!important;background:transparent!important;border-color:transparent!important;box-shadow:none!important}
:root{--bubble-safe-top:env(safe-area-inset-top,0px);--bubble-safe-right:env(safe-area-inset-right,0px);--bubble-safe-bottom:env(safe-area-inset-bottom,0px);--bubble-safe-left:env(safe-area-inset-left,0px)}
#bubble-safe-probe{position:fixed;visibility:hidden;pointer-events:none;padding:var(--bubble-safe-top) var(--bubble-safe-right) var(--bubble-safe-bottom) var(--bubble-safe-left)}
.table-speech{max-width:calc(100vw - 112px)!important}

label:has(input[name="infiniteHonorBonus"]){display:none!important}

/* Keep the password hint clear of the visibility toggle. */
#creation-room-password{padding-left:8px!important;padding-right:38px!important;font-size:11px!important;text-align:left!important}
#creation-room-password::placeholder{text-align:left!important;font-size:11px!important;letter-spacing:0!important}
.password-control .room-password-toggle{right:2px!important;width:30px!important}
.infinite-rule-detail{position:relative}
.infinite-rule-detail h2{padding-right:28px!important}
.infinite-detail-close{position:absolute!important;right:10px!important;top:10px!important;min-height:30px!important;width:30px!important;padding:0!important;font-size:23px!important;background:transparent!important;border:0!important;box-shadow:none!important}
.infinite-rule-row button.rule-ready{animation:rule-frame-breath 2.8s ease-in-out infinite!important}
@keyframes rule-frame-breath{0%,100%{border-color:color-mix(in srgb,var(--rule-color) 45%,transparent);box-shadow:0 0 1px color-mix(in srgb,var(--rule-color) 8%,transparent)}50%{border-color:color-mix(in srgb,var(--rule-color) 85%,transparent);box-shadow:0 0 7px color-mix(in srgb,var(--rule-color) 22%,transparent)}}
@media(prefers-reduced-motion:reduce){.infinite-rule-row button.rule-ready{animation:none!important}}
.room-options label:has(#creation-room-password){display:grid!important;grid-template-columns:1fr!important;gap:6px!important;align-items:start!important}
.room-options .password-control{width:100%!important;max-width:none!important;min-width:0!important;margin-left:0!important}
#creation-room-password{width:100%!important;min-width:0!important}

/* Room credentials share the same label and control columns in every mode. */
#coin-rules-form .room-options label:has(input){display:grid!important;grid-template-columns:72px minmax(0,1fr)!important;align-items:center!important;gap:12px!important}
#coin-rules-form .room-options :is(#creation-room-number,.password-control){width:100%!important;max-width:none!important;min-width:0!important;box-sizing:border-box!important;margin:0!important}
#coin-rules-form .room-options :is(#creation-room-number,#creation-room-password){height:40px!important;box-sizing:border-box!important}
#chat-dialog .chat-layout,.room-chat-panel .chat-layout{display:flex!important;flex-direction:column!important}
#rules-dialog .hand-reference-column{display:block;max-height:none;overflow:visible;width:100%;box-sizing:border-box}
#coin-rules-form #creation-room-password-eye{top:0!important;bottom:0!important;right:10px!important;margin:auto 0!important;transform:none!important;transition:background .16s,opacity .16s!important;width:32px!important;height:32px!important;padding:5px!important}
#coin-rules-form #creation-room-password-eye:active{transform:none!important}

/* The same overview and transaction sections used by the other two modes. */
#result[data-variant=hongzhong] #result-title{flex-direction:column!important;font-size:18px!important;letter-spacing:0!important;gap:5px!important;padding:12px 0!important}
#result[data-variant=hongzhong] .blood-result-reason{font-size:13px!important;color:var(--ui-muted)}
#result[data-variant=hongzhong] #settlement-detail.hongzhong-settlement{display:block!important;text-align:left!important;overflow:visible!important}
#result[data-variant=hongzhong] .blood-result-section{display:block!important;width:100%!important;box-sizing:border-box!important;margin:0 0 18px!important}
#result[data-variant=hongzhong] .blood-result-section>h3{font-size:14px!important;margin:0 0 10px!important}
#result[data-variant=hongzhong] .blood-summary-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important}
#result[data-variant=hongzhong] .blood-player-summary{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:8px!important;padding:12px!important;margin:0!important;min-width:0!important;box-sizing:border-box!important;text-align:left!important}
#result[data-variant=hongzhong] .blood-player-summary header{display:block!important;padding:0!important;margin:0!important;min-height:0!important}
#result[data-variant=hongzhong] .blood-player-summary header b{display:block!important;white-space:normal!important;font-size:13px!important;line-height:1.5!important}
#result[data-variant=hongzhong] .blood-player-balance{display:block!important;font-size:11px!important;line-height:1.5!important;color:var(--ui-muted)}
#result[data-variant=hongzhong] .blood-net{font-size:26px!important;line-height:1.3!important;font-variant-numeric:tabular-nums}
#result[data-variant=hongzhong] .blood-summary-metrics{grid-template-columns:1fr!important;font-size:11px!important;line-height:1.6!important}
#result[data-variant=hongzhong] .blood-ledger-entry{margin:0 0 10px!important;padding:12px 14px!important;gap:6px!important}
#result[data-variant=hongzhong] .blood-result-note{font-size:11px!important;line-height:1.7!important;margin:10px 0!important;color:var(--ui-muted)}
@media(max-width:600px){#result[data-variant=hongzhong] .blood-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
#result[data-variant=hongzhong] .blood-player-summary small{margin:0!important}
#result[data-variant=hongzhong] .blood-summary-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important;font-size:10px!important;line-height:1.5!important}
#result[data-variant=hongzhong] .blood-summary-metrics span{min-width:0;overflow-wrap:anywhere}
#result[data-variant=hongzhong] .blood-current-due{font-size:10px!important}
#result[data-variant=hongzhong] .result-scroll{outline:none}

#coin-rules-form :is(#creation-room-number,#creation-room-password)::placeholder{font-size:12px!important;font-weight:400!important;font-family:inherit!important;letter-spacing:0!important;color:#f8fbf9!important;opacity:.5!important}

/* Only the in-game chat offers the reference tab. Room chat stays on messages. */
.room-chat-panel .hand-reference-tabs,.room-chat-panel .hand-reference-column{display:none!important}
#chat-dialog .hand-reference-tabs{flex:0 0 auto!important}
#chat-dialog .chat-layout>.hand-reference-column{overflow-y:auto!important;overscroll-behavior:contain;touch-action:pan-y}
/* Start at the top when blood-mode basic options exceed the available height. */
#coin-rules-dialog[data-variant=blood] #coin-rules-form>.basic-rules:not(.settings-inactive):not([hidden]){justify-content:flex-start!important;align-items:stretch!important;overflow-y:auto!important;overflow-x:hidden!important;min-height:0!important;flex:1 1 0!important;overscroll-behavior:contain!important;touch-action:pan-y!important;-webkit-overflow-scrolling:touch}
#coin-rules-dialog[data-variant=blood] .basic-rules>.rules-toggles{flex:0 0 auto!important;margin:0 auto!important;min-height:min-content!important}
#coin-rules-dialog[data-variant=blood] #coin-rules-form>.settings-tabs,#coin-rules-dialog[data-variant=blood] #coin-rules-form>.rules-footer{flex-shrink:0!important}

/* Only the chosen settlement mode has a filled segment. */
#coin-rules-dialog .rule-mode-options button[aria-pressed=false],#coin-rules-dialog .rule-mode-options button[aria-pressed=false]:is(:hover,:active,:focus){background:transparent!important;box-shadow:none!important;color:var(--ui-muted)!important}
#coin-rules-dialog .rule-mode-options button[aria-pressed=true]{background:#d4bb82!important;color:#12291e!important;box-shadow:none!important}

/* Opening rules: three deliberate reveals, with a quiet jade/gold finish. */
body>dialog#infinite-opening[open]{background:rgba(12,31,28,.94)!important;border:1px solid rgba(231,205,139,.42)!important;box-shadow:0 24px 80px #0009,inset 0 1px 0 #fff2!important}
#infinite-opening .infinite-opening-cards section{position:relative;overflow:hidden;border-color:color-mix(in srgb,var(--rule-color) 48%,transparent)!important;background:linear-gradient(145deg,rgba(45,72,60,.96),rgba(14,34,30,.96))!important;opacity:0;transform:translateY(20px) scale(.96);}
#infinite-opening .infinite-opening-cards section[data-revealed="true"]{animation:infinite-rule-arrive .65s cubic-bezier(.16,1,.3,1) both}
#infinite-opening .infinite-opening-cards section::after{content:"";pointer-events:none;position:absolute;inset:-50%;background:linear-gradient(110deg,transparent 40%,rgba(255,235,180,.18) 49%,transparent 58%);transform:translateX(-85%) rotate(-8deg)}
#infinite-opening .infinite-opening-cards section[data-revealed="true"]::after{animation:infinite-rule-sheen .95s ease-out both}
#infinite-opening .infinite-opening-cards section>b{color:#ffe7ab!important;letter-spacing:.06em;text-shadow:0 2px 14px #d9a84535}
@keyframes infinite-rule-arrive{to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes infinite-rule-sheen{to{transform:translateX(85%) rotate(-8deg)}}
@media(prefers-reduced-motion:reduce){#infinite-opening .infinite-opening-cards section[data-revealed="true"]{animation:none;opacity:1;transform:none}#infinite-opening .infinite-opening-cards section::after{display:none}}

/* Reserve the footer space so its final reveal does not move the rule cards. */
#infinite-opening .infinite-opening-after-rules{transition:opacity .35s ease,transform .35s ease}
#infinite-opening .infinite-opening-after-rules[data-revealed="false"]{visibility:hidden;opacity:0;transform:translateY(6px);pointer-events:none}
#infinite-opening .infinite-opening-after-rules[data-revealed="true"]{visibility:visible;opacity:1;transform:none}
@media(prefers-reduced-motion:reduce){#infinite-opening .infinite-opening-after-rules{transition:none}}

.infinite-rule-live{padding:14px 16px;border:1px solid #a4dfc64d;border-radius:14px;background:#ffffff0c;display:flex;flex-direction:column;gap:8px}.infinite-rule-live-badge{font-size:19px;color:#f2dda5;line-height:1.3}.infinite-rule-detail .infinite-rule-live p{font-size:14px!important;font-weight:600}.infinite-rule-detail .infinite-rule-live small{font-size:12px!important;color:#d0e2d7}.infinite-rule-short{color:#b8cac0!important;padding:6px 4px}
body>dialog#infinite-opening::backdrop{background:rgba(3,16,11,.42)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}

body>dialog.infinite-rule-detail[open]{height:min(290px,calc(100dvh - 32px))!important}
.infinite-rule-count.rule-number-pop{animation:rule-number-pop .7s ease-out!important}
@keyframes rule-number-pop{0%{transform:scale(.65);opacity:.3}45%{transform:scale(1.35);color:#ffe18b}100%{transform:scale(1);opacity:1}}
@media(prefers-reduced-motion:reduce){.infinite-rule-count.rule-number-pop{animation:none!important}}

#win-signal{display:flex!important;flex-direction:column!important;width:min(590px,calc(100vw - 48px))!important;padding:18px 24px!important;gap:10px!important}#win-signal[hidden]{display:none!important}#win-signal-name{flex:none!important;text-align:center;width:100%;white-space:nowrap!important;font-size:22px!important}#win-signal .win-cinematic{width:100%;margin:0;padding:0 0 10px;border-top:0;border-bottom:1px solid #e1c17d40;text-align:center}#win-signal .win-cinematic-title{white-space:nowrap;letter-spacing:0;font-size:clamp(14px,2.8vw,23px);line-height:1.5;overflow-x:auto;scrollbar-width:none}#win-signal .table-result-body{display:grid!important;grid-template-columns:52px minmax(0,1fr) 44px;align-items:center;gap:15px;width:100%}#win-signal-avatar{width:52px!important;height:52px!important}#win-signal-detail{display:block!important;margin:0!important;font-size:15px!important;line-height:1.65;white-space:pre-line}#win-signal-tile{width:44px!important;height:61px!important}#win-signal[data-kind=kong]{width:min(500px,calc(100vw - 48px))!important}#win-signal-name[hidden]{display:none!important}
#win-signal{pointer-events:auto!important;cursor:pointer}

#win-signal{width:min(550px,calc(100vw - 48px))!important;padding:18px 22px!important;gap:9px!important;border:1px solid #dac38b!important;background:linear-gradient(125deg,#193d33f5,#303e2cf5)!important;box-shadow:0 16px 48px #0007!important}#win-signal-name{font-size:18px!important;letter-spacing:1px!important;font-weight:600!important}#win-signal .win-cinematic{padding:0 0 12px!important;border-bottom:1px solid #e0d2a52e!important}#win-signal .win-cinematic-title{font-family:inherit!important;font-size:14px;font-weight:400!important;letter-spacing:.5px!important;line-height:1.6!important;color:#dfd6bd!important}#win-signal .table-result-body{grid-template-columns:44px minmax(0,1fr) 40px!important;gap:13px!important}#win-signal-avatar{width:44px!important;height:44px!important}#win-signal-detail{font-size:13px!important;color:#eee7d5!important}#win-signal-tile{width:40px!important;height:56px!important}#win-signal::after{display:none!important}

#win-signal{width:max-content!important;min-width:min(420px,calc(100vw - 48px))!important;max-width:min(510px,calc(100vw - 48px))!important}#win-signal[data-kind=kong]{width:max-content!important;min-width:min(360px,calc(100vw - 48px))!important;max-width:min(460px,calc(100vw - 48px))!important}

.infinite-rule-count.rule-number-loss{animation:rule-number-loss .65s ease-out!important}@keyframes rule-number-loss{0%{transform:translateY(-3px) scale(1.15);color:#ffb8a5;opacity:.5}50%{color:#ffb8a5}100%{transform:none;opacity:1}}@media(prefers-reduced-motion:reduce){.infinite-rule-count.rule-number-loss{animation:none!important}}

/* Concentric tab corners: outer radius minus border and inset. */
#chat-dialog .hand-reference-tabs{border-radius:18px!important;padding:4px!important;gap:4px!important;overflow:hidden;align-items:stretch}
#chat-dialog .hand-reference-tabs>button{border-radius:13px!important;margin:0!important;align-self:stretch}
/* Human messages: a small golden dot remains visible until the chat is read. */
.human-chat-button{position:relative}
body .human-chat-dot:not([hidden]),body .tools #chat #chat-unread.human-chat-dot:not([hidden]){display:block!important;position:absolute!important;right:5px!important;top:4px!important;width:8px!important;height:8px!important;min-width:8px!important;padding:0!important;border:1px solid #fff1ba!important;border-radius:50%!important;background:#edc464!important;box-shadow:0 0 5px #edc46488!important;font-size:0!important;line-height:0!important;pointer-events:none;animation:human-chat-breathe 1.4s ease-in-out infinite!important}
body .human-chat-dot[hidden]{display:none!important}
.room-page-tabs .human-chat-dot:not([hidden]),.hand-reference-tabs .human-chat-dot:not([hidden]){top:7px!important;right:9px!important}
@keyframes human-chat-breathe{0%,100%{opacity:.65;transform:scale(.85);box-shadow:0 0 3px #edc46466}50%{opacity:1;transform:scale(1.15);box-shadow:0 0 8px #edc464bb}}
.room-discovery-list .room-visited-label{display:inline-block;align-self:flex-start;font-size:10px;line-height:1.5;color:#edcf8e;letter-spacing:.2px}
@media(prefers-reduced-motion:reduce){body .human-chat-dot:not([hidden]),body .tools #chat #chat-unread.human-chat-dot:not([hidden]){animation:none!important;opacity:1}}
/* Android draws the scene edge to edge; only controls avoid the camera cutout. */
html[data-native-platform=android]{--bubble-safe-left:var(--native-safe-left,0px);--bubble-safe-right:var(--native-safe-right,0px);--bubble-safe-top:var(--native-safe-top,0px);--bubble-safe-bottom:var(--native-safe-bottom,0px)}
html[data-native-platform=android] .tools{top:calc(12px + var(--native-safe-top,0px))!important;right:calc(12px + var(--native-safe-right,0px))!important}
html[data-native-platform=android] #infinite-hud{margin-left:var(--native-safe-left,0px)}
#turn-reminder-notice{position:fixed;z-index:5000;left:50%;top:max(18px,env(safe-area-inset-top));transform:translateX(-50%);display:flex;align-items:center;gap:14px;max-width:calc(100vw - 40px);padding:12px 16px;background:#efe0b4;color:#223c2d;border:1px solid #fff0bd;border-radius:18px;box-shadow:0 8px 28px #0004;font-size:13px}
#turn-reminder-notice button{flex:none;min-height:32px;padding:5px 10px;border-radius:10px;background:#294535;color:#fff0c5;border:0}
#room-mode-switch{max-width:170px;min-height:36px;border-radius:10px;background:#223c30;color:#f4ebd5;border:1px solid #b8ad7c66;padding:6px 10px}
body>dialog#infinite-finale-dialog.infinite-dialog.infinite-finale[open]{width:min(920px,94vw)!important;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important;padding:18px!important;text-align:left!important}body>dialog#infinite-finale-dialog.infinite-dialog.infinite-finale[open]>h2{font-size:20px!important;line-height:1.4!important;text-align:center;letter-spacing:1px!important;margin:0 0 8px!important}#infinite-finale-dialog::backdrop{background:#06170e66!important}#infinite-finale-dialog .finale-tiles img{background:#ecebd8;border-radius:3px;box-shadow:0 1px 1px #0004;padding:1px;box-sizing:border-box}#infinite-finale-dialog .finale-intro{text-align:center}#infinite-finale-dialog .finale-melds{flex-direction:row!important}#infinite-finale-dialog .finale-meld{align-items:center}#infinite-finale-dialog .finale-concealed-hand{min-height:58px}
body>dialog#infinite-finale-dialog.infinite-dialog.infinite-finale[open]{display:flex!important;flex-direction:column!important;overflow:hidden!important}#infinite-finale-dialog>.infinite-finale-cards{min-height:0;flex:1 1 auto;overflow-y:auto}#infinite-finale-dialog>h2,#infinite-finale-dialog>.finale-intro,#infinite-finale-dialog>footer,#infinite-finale-dialog>.finale-public-results{flex:0 0 auto}#infinite-finale-dialog>.finale-public-results[open]{max-height:100px;overflow-y:auto}#infinite-finale-dialog>footer{flex-wrap:nowrap!important;justify-content:space-between!important}@media(max-height:500px){body>dialog#infinite-finale-dialog.infinite-dialog.infinite-finale[open]{padding:12px!important}body>dialog#infinite-finale-dialog.infinite-dialog.infinite-finale[open]>h2{font-size:16px!important;margin-bottom:4px!important}#infinite-finale-dialog .finale-intro{margin-bottom:8px;font-size:11px}#infinite-finale-dialog .infinite-finale-player{padding:8px;gap:7px}#infinite-finale-dialog>footer{margin-top:8px}#infinite-finale-dialog>.finale-public-results{margin-top:7px}}
@media(max-height:500px){#infinite-finale-dialog .infinite-finale-player{gap:5px!important}#infinite-finale-dialog .infinite-finale-player>header{height:28px!important;min-height:0!important;padding:0!important;margin:0!important}#infinite-finale-dialog .finale-melds{min-height:50px!important;row-gap:2px!important}#infinite-finale-dialog .finale-concealed-hand{min-height:0!important;gap:3px!important}#infinite-finale-dialog .finale-melds small,#infinite-finale-dialog .finale-concealed-hand small{line-height:1.2!important}#infinite-finale-dialog .finale-verdict{line-height:1.3!important}#infinite-finale-dialog .finale-suit-counts{line-height:1.2!important}}

/* Centre rule titles within an explicit header height. */
body>dialog.infinite-dialog:not(#infinite-opening)>h2,body>dialog#infinite-finale-dialog.infinite-dialog.infinite-finale[open]>h2{display:flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;flex:0 0 auto!important;min-height:40px!important;line-height:1.35!important;margin:0!important;padding:6px 32px!important;text-align:center!important}
#infinite-opening .infinite-opening-header{display:flex;align-items:center;justify-content:center;min-height:40px}

.blood-preparation>h2{display:flex!important;align-items:center!important;justify-content:center!important;min-height:40px!important;box-sizing:border-box!important;margin:0!important;line-height:1.35!important;padding:6px 32px!important}#coin-rules-dialog .settings-navigation>.navigation-title{display:flex;align-items:center;justify-content:center;align-self:stretch;min-height:36px}
.infinite-avatar-rule{display:block;border-radius:6px;padding:2px 5px;margin-top:3px;background:#16271bd9;color:#d8dfd5}
.infinite-avatar-rule.rule-active{color:#ffe5a4;animation:avatar-rule-breathe 2.4s ease-in-out infinite}
.infinite-avatar-rule.rule-changed{animation:avatar-rule-change .8s ease-out,avatar-rule-breathe 2.4s .8s ease-in-out infinite}
@keyframes avatar-rule-breathe{0%,100%{box-shadow:inset 0 0 0 1px #f4d78422}50%{box-shadow:inset 0 0 0 1px #f4d78488;background:#42502bdd}}
@keyframes avatar-rule-change{40%{color:#fff3bc;transform:scale(1.06);background:#74632bdd}}
@media(prefers-reduced-motion:reduce){.infinite-avatar-rule.rule-active,.infinite-avatar-rule.rule-changed{animation:none}}
