/* Approved compact controls. Board cells and gameplay hit areas keep their rules. */
/* Keep these room-specific rules ahead of legacy ID selectors by matching their scope. */
#panel[data-game="bunker"] .normal-management .story-shortcuts button{background:none;border:0;box-shadow:none;padding:8px 0;font-size:12px;min-height:40px;color:#8d7150}
#panel[data-game="bunker"] .normal-management .bunker-custom{padding:14px;border-radius:12px;margin:8px 0 16px}
#panel[data-game="bunker"] .normal-management .bunker-custom button{min-height:40px;font-size:13px;border-radius:10px;background:linear-gradient(135deg,#675036,#30271f);border-color:#59432d}
#panel[data-game="bunker"] .normal-management .bunker-custom textarea{min-height:86px;padding:11px;font-size:13px;border-radius:10px;background:#fffaf1}
.normal-management .management-guide summary{font-size:12px;min-height:36px;display:flex;align-items:center;color:#968066;cursor:pointer}
:root{--compact-ink:#302a23;--compact-gold:#c3a575;--compact-line:#ddceb5}
/* Direction two: one story card, compact secondary actions, deliberate AI entry. */
.normal-management .bunker-stories{padding:0;overflow:hidden;border:1px solid #d7c19e;border-radius:14px;background:linear-gradient(135deg,#f9f2e5,#ebdbc0);margin:16px 0 0}.normal-management .management-story-art{display:block;width:100%;height:112px;object-fit:cover;object-position:center 57%}.normal-management .management-story-copy{padding:14px}.normal-management .management-story-copy h3{font-size:17px;line-height:1.3;margin:6px 0}.normal-management .management-story-copy p{font-size:12px;line-height:1.5;margin:7px 0 12px}.normal-management .management-story-copy button{width:100%}.normal-management .story-shortcuts{display:flex;justify-content:space-between;gap:8px;margin:3px 0 12px}.normal-management .story-shortcuts button{font-size:12px;min-height:40px;padding:8px 0;background:none;border:0;box-shadow:none;color:#8d7150;flex:0 1 auto}.normal-management .bunker-custom{border-radius:12px;padding:14px;background:#f5ead6;margin:8px 0 16px}.normal-management .bunker-custom h3{font-size:16px}.normal-management .bunker-custom textarea{font-family:inherit;font-size:13px;background:#fffaf1}.normal-management .bunker-custom button{background:linear-gradient(135deg,#675036,#30271f);border-color:#59432d;color:#fff5e5;min-height:40px}.normal-management .management-more{border-top:1px solid #dfd2bd;margin-top:18px;padding-top:5px}.normal-management .management-more summary{font-size:12px;color:#968066;cursor:pointer;min-height:40px;display:flex;align-items:center;justify-content:space-between;list-style:none}.normal-management .management-more summary:after{content:'';display:block;width:6px;height:6px;margin-right:3px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg)}.normal-management .management-more[open] summary:after{transform:rotate(225deg)}.normal-management .management-more .management-exit{margin-top:0;padding-top:4px}.normal-management .setting-card{padding:12px;border-radius:12px}.normal-management .setting-card p{font-size:11px;margin:8px 0 0}.normal-management .setting-card button{font-size:12px;min-height:40px;padding:8px 10px}.normal-management .section-label h2{font-size:20px}.normal-management .management-members h3{font-size:13px}.normal-management .management-exit button{font-size:12px;min-height:40px}
.ivory-v2 .tiny-btn,.ivory-v2 .primary,.ivory-v2 .game-btn,.ivory-v2 .room-create button,.room-shell button,.stacker-shell button{font-size:13px;font-weight:600}
.ivory-v2 .primary,.ivory-v2 .primaryish,.ivory-v2 .tiny-btn,.room-shell .primary,.stacker-primary{background:linear-gradient(155deg,#514233,#332a22 52%,#29231e);color:#fff5e6;border:1px solid #6b5740;border-radius:12px;box-shadow:inset 0 1px 0 #e7c69840,inset 0 -1px 0 #0005,0 3px 7px #39291720;font-size:13px;min-height:44px;padding:10px 16px;font-weight:600}
.ivory-v2 .primary:hover,.ivory-v2 .tiny-btn:hover,.room-shell .primary:hover,.stacker-primary:hover{filter:brightness(1.06)}
.ivory-v2 .primary:active,.ivory-v2 .tiny-btn:active,.room-shell button:active,.stacker-shell button:active{transform:translateY(1px);box-shadow:inset 0 2px 4px #0002,0 1px 2px #38251112}
.ivory-v2 .room-secondary,.room-actions>button:not(.readiness-button),.normal-management button:not(.primary),.stacker-room-buttons button{background:linear-gradient(160deg,#fffdf9,#eee4d5);border:1px solid #cbb99c;border-radius:12px;box-shadow:inset 0 1px 0 #fff,0 2px 4px #5338180c;color:#5f472b;font-size:13px;min-height:44px;padding:10px 14px}
.room-actions>.room-action-card{display:flex;align-items:center;justify-content:space-between;min-height:52px;padding:10px 14px}.room-action-card .action-content b{font-size:14px}.room-action-card .action-content small{font-size:11px;margin-top:2px}.room-action-card .action-chevron{font-size:18px}
.room-shell .room-actions{gap:8px}.room-actions>[data-normal=leave]{font-size:12px;box-shadow:none;background:transparent;border-color:transparent;color:#985347}.normal-management>[data-normal=finish]{font-size:12px;color:#985347;background:transparent;box-shadow:none;border-color:#e1c9bf}
.room-shell .room-actions>.readiness-button{background:linear-gradient(155deg,#4e795f,#31553e);color:#f4fff5;border:1px solid #456c50;border-radius:12px;box-shadow:inset 0 1px 0 #e7ffe638,0 3px 6px #25472e20;min-height:44px;padding:10px 14px;font-size:13px;font-weight:600}
.room-shell .room-actions>.readiness-button.is-ready{background:linear-gradient(155deg,#a45b50,#7e3b34);color:#fff4ef;border-color:#99584a;box-shadow:inset 0 1px 0 #ffebe02b,0 3px 6px #6a30251c}
.room-shell .room-actions button:disabled{opacity:.6;transform:none}
#panel[data-managing=true][data-game]>.stage-scene{display:none}
.room-shell .readiness-button>.pb-icon{display:none}.room-shell .readiness-button:before{content:'✓';margin-right:8px;color:inherit}.room-shell .readiness-button.is-ready:before{content:'−'}
#panel[data-compact-lobby=true]>.stage-scene{display:grid;grid-template-columns:64px minmax(0,1fr);gap:14px;margin:18px 0 14px;align-items:start}#panel[data-compact-lobby=true] .stage-art{width:64px;height:64px;aspect-ratio:1;object-fit:cover;border-radius:10px;margin:0}#panel[data-compact-lobby=true] .stage-copy{padding:0}#panel[data-compact-lobby=true] .stage-copy h1{font-size:22px;margin:0 0 6px}#panel[data-compact-lobby=true] .stage-copy>.eyebrow,#panel[data-compact-lobby=true] .stage-copy>p.muted{display:none}#panel[data-compact-lobby=true] .stage-label{font-size:11px;padding:4px 8px}#panel[data-compact-lobby=true] .room-code{display:block;margin:7px 0 0;font-size:11px}
.room-shell #panel>.compact-invite{width:100%;display:flex;align-items:center;justify-content:space-between;min-height:44px;padding:10px 14px;margin:14px 0;background:linear-gradient(155deg,#514233,#332a22 52%,#29231e);border:1px solid #6b5740;border-radius:12px;box-shadow:inset 0 1px 0 #e7c69840,0 3px 7px #39291720;color:#fff5e6}.compact-invite .action-content small,.compact-invite>.pb-icon{display:none}.compact-invite .action-content b{color:inherit;font-size:13px}.compact-invite .action-chevron{color:#dfbd88;font-size:20px}
#panel[data-compact-lobby=true]>.participants-section{border-top:0;margin-top:10px;padding-top:0}#panel[data-compact-lobby=true] .participants-section h2{font-size:15px}#panel[data-compact-lobby=true]>.room-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;padding-top:12px;border-top:1px solid #e5dccd}#panel[data-compact-lobby=true] [data-normal=ready]{grid-column:1/-1}#panel[data-compact-lobby=true] #normal-manage{grid-column:1;min-height:44px;padding:9px 12px;width:auto}#panel[data-compact-lobby=true] #normal-manage small,#panel[data-compact-lobby=true] #normal-manage>.pb-icon{display:none}#panel[data-compact-lobby=true] #normal-manage b{font-size:13px}#panel[data-compact-lobby=true] [data-normal=leave]{grid-column:2}
.ivory-v2 .room-create .theme-choice,.ivory-v2 .room-create .level-options button{min-height:44px;padding:9px 11px;font-size:13px}.ivory-v2 .room-create .level-options button small{font-size:11px}
.ivory-v2 .my-game-actions>button{font-size:13px!important;padding:9px 13px!important;min-height:44px!important;flex:0 1 auto}.ivory-v2 .premium-room .my-game-actions{justify-content:flex-end}.ivory-v2 .premium-room .tiny-btn{flex:0 1 auto;min-width:100px}.ivory-v2 .premium-room .room-main>b{font-size:15px}.ivory-v2 .premium-room .room-main{gap:4px}.ivory-v2 .premium-room{padding:14px;border-radius:13px}
.room-shell .normal-management{gap:12px}.normal-management h2{font-size:20px}.normal-management legend{font-size:13px}.normal-management input{font-size:16px}.normal-management .field-label{font-size:12px}.room-shell .normal-management .management-card{padding:16px;border-radius:13px}.room-shell .normal-management .management-members{font-size:13px}
.profile-compact{color:#302b25}.profile-compact .compact-identity{display:flex;align-items:center;gap:13px;margin:6px 0 20px;min-width:0}.profile-compact .profile-v2-avatar{width:48px;height:48px;flex:none;overflow:hidden;border-radius:50%;background:#d6c29f;display:grid;place-items:center}.profile-compact .profile-logo{font-size:22px;color:#594525;font-weight:600}.profile-compact .profile-v2-avatar img{width:100%;height:100%;object-fit:cover}.profile-compact .compact-identity h3{font-size:22px;line-height:1.2;margin:0 0 4px;overflow-wrap:anywhere}.profile-compact small{font-size:12px;color:#827564;line-height:1.4}
.profile-compact .compact-stats{display:grid;grid-template-columns:1fr 1fr;border:1px solid #dfd1ba;border-radius:12px;padding:8px 12px;background:linear-gradient(125deg,#f8f1e5,#eee1cc);box-shadow:inset 0 1px 0 #fff9,0 2px 7px #71502a08;margin-bottom:20px}.profile-compact .compact-stats button{border:0;border-right:1px solid #d5c4a6;background:transparent;padding:6px 8px 6px 2px;min-height:52px;color:inherit;text-align:left;font:inherit;display:block;min-width:0}.profile-compact .compact-stats button:last-child{border-right:0;padding-left:18px}.profile-compact .compact-stats b{display:block;font-size:21px;font-weight:600;color:#5e4529;line-height:1.2;font-variant-numeric:tabular-nums}.profile-compact .compact-stats span{font-size:12px;color:#786e5d}
.profile-compact .profile-records,.profile-compact .profile-recent{border:0;padding:0;margin:0 0 20px}.profile-compact .profile-records h3,.profile-compact .compact-section-heading h3{font-size:14px;font-weight:600;margin:0 0 10px;letter-spacing:0}.profile-compact .profile-records>button{display:flex;align-items:center;width:100%;gap:10px;min-height:62px;padding:9px 12px;margin:8px 0 0;background:linear-gradient(140deg,#fffefa,#f6f0e6);border:1px solid #e0d4c0;border-radius:12px;box-shadow:inset 0 1px 0 #fff,0 2px 5px #5c3d1807;font:inherit;color:inherit;text-align:left}.profile-compact .profile-records>button img{width:36px;height:40px;object-fit:cover;border-radius:6px}.profile-compact .profile-records>button span{flex:1;min-width:0}.profile-compact .profile-records b{font-size:14px;font-weight:600}.profile-compact .profile-records small{display:block;margin-top:2px}.profile-compact .profile-records strong{font-size:18px;font-weight:600;color:#70502e;white-space:nowrap}.profile-compact .profile-records i{font-style:normal;background:#ede0ca;color:#8a673c;border-radius:50%;width:20px;height:20px;text-align:center;line-height:18px;font-size:18px;flex:none}
.profile-compact .compact-section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.profile-compact .compact-section-heading h3{margin:0}.profile-compact .compact-section-heading button{border:0;background:transparent;color:#796342;padding:8px 4px;min-height:44px;font-size:12px}.profile-compact .profile-recent>button{display:flex;align-items:center;width:100%;gap:10px;min-height:58px;padding:10px 0;border:0;border-bottom:1px solid #e6dfd2;background:transparent;border-radius:0;margin:0;font:inherit;text-align:left;box-shadow:none;color:inherit}.profile-compact .profile-recent>button:last-child{border:0}.profile-compact .profile-recent>button span{flex:1;min-width:0}.profile-compact .profile-recent b{font-size:14px;font-weight:600}.profile-compact .profile-recent small{display:block;margin-top:2px}.profile-compact .profile-recent i{font-style:normal;color:#9d896b}.profile-compact .profile-test-note{font-size:12px;margin:12px 0}
.profile-compact button:hover{filter:brightness(.98)}.profile-compact button:focus-visible{outline:2px solid #9a7b4f;outline-offset:3px}.profile-compact .compact-stats button:active,.profile-compact .profile-records button:active{background:#eadcc5;box-shadow:inset 0 1px 3px #6f4d2018}
#profileView .page-v2-head{margin:14px 0 18px;padding:0}#profileView .page-v2-head h1{font-size:24px;margin:0;line-height:1.25}#profileView .page-v2-head p,#profileView .page-v2-head .kicker{display:none}
.stacker-shell .stacker-room-buttons button{font-size:12px}.stacker-shell .stacker-actions button{font-size:13px;min-height:44px;padding:10px 16px}.stacker-shell .stacker-action-card{min-height:56px;padding:11px 14px}.stacker-shell .stacker-action-card b{font-size:14px}.stacker-shell .stacker-action-card small{font-size:11px}
@media(max-width:360px){.profile-compact .compact-stats{padding:8px 10px}.profile-compact .compact-stats span{font-size:11px}.profile-compact .compact-identity h3{font-size:21px}.room-shell .room-actions .action-content small{display:none}}
@media(prefers-reduced-motion:reduce){.room-shell button:active,.ivory-v2 button:active,.stacker-shell button:active{transform:none}}

/* Approved compact refinement and truthful AI waiting state. */
.profile-compact .compact-identity{margin-bottom:14px}.profile-compact .compact-stats{padding:5px 10px;margin-bottom:16px}.profile-compact .compact-stats button{min-height:44px;padding-top:3px;padding-bottom:3px}.profile-compact .profile-records>button{min-height:54px;padding:6px 10px;margin-top:6px}.profile-compact .profile-records>button img{width:36px;height:36px}.profile-compact .profile-recent>button{min-height:50px;padding:7px 0}.profile-compact .profile-records,.profile-compact .profile-recent{margin-bottom:16px}
.custom-magic{padding:22px 16px;text-align:center;border:1px solid #e1cfaf;border-radius:14px;background:radial-gradient(ellipse at center,#f4ddb477,transparent 75%),#fffaf2;color:#725533;margin:12px 0}.custom-magic b{display:block;font-size:14px}.custom-magic p{font-size:12px;margin:7px 0 0}.custom-orb{display:grid;place-items:center;margin:0 auto 15px;width:52px;height:52px;border:1px solid #c5a16c;border-radius:17px;font-size:24px;color:#97713d;box-shadow:0 0 25px #caa15b22;animation:custom-breathe 2.8s ease-in-out infinite}.bunker-custom .custom-result{animation:custom-reveal .5s ease-out}@keyframes custom-breathe{50%{transform:translateY(-3px) rotate(4deg);box-shadow:0 0 35px #caa15b55}}@keyframes custom-reveal{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.custom-orb,.bunker-custom .custom-result{animation:none}}

.bunker-custom .custom-magic{position:relative;overflow:hidden;padding:24px 20px 20px;border:1px solid #c7a16c;border-radius:20px;background:radial-gradient(circle at 50% 10%,#f9e3ba 0,#f3dfc0 32%,#fffaf1 76%);box-shadow:inset 0 1px 0 #fff,0 14px 32px #6b45201a;color:#49341f}
.custom-scene{position:relative;height:98px;margin:0 auto 12px;max-width:180px;isolation:isolate}
.custom-scene-glow{position:absolute;inset:12px 15px 0;border-radius:50%;background:#f0b85088;filter:blur(24px);animation:custom-glow 2.8s ease-in-out infinite alternate}
.custom-scene-card{position:absolute;left:50%;top:12px;width:69px;height:79px;border:1px solid #c9aa7e;border-radius:10px;background:linear-gradient(145deg,#fff9ec,#ead1a8);box-shadow:0 8px 17px #6c482c30}
.custom-scene-card-back{transform:translateX(-29%) rotate(17deg);animation:custom-back 3s ease-in-out infinite alternate}
.custom-scene-card-front{display:flex;flex-direction:column;gap:8px;padding:21px 13px;transform:translateX(-72%) rotate(-10deg);animation:custom-front 3s ease-in-out infinite alternate}
.custom-scene-card-front i{height:5px;border-radius:4px;background:#a98452}.custom-scene-card-front i:nth-child(2){width:82%;opacity:.7}.custom-scene-card-front i:nth-child(3){width:60%;opacity:.5}
.custom-magic-kicker{display:block;margin:3px 0 7px;color:#8b6031;font-size:10px;font-weight:800;letter-spacing:.17em}
.bunker-custom .custom-magic b{font-size:18px;line-height:1.2}.bunker-custom .custom-magic p{max-width:250px;margin:9px auto 16px;color:#695744;font-size:12px;line-height:1.5}
.custom-magic-track{display:block;overflow:hidden;width:100%;height:4px;border-radius:4px;background:#e7d6bd}.custom-magic-track i{display:block;width:38%;height:100%;border-radius:inherit;background:linear-gradient(90deg,#ae7840,#edc979,#ae7840);animation:custom-track 1.8s ease-in-out infinite alternate}
@keyframes custom-glow{to{opacity:.55;transform:scale(.8)}}@keyframes custom-back{to{transform:translateX(-20%) rotate(22deg) translateY(-4px)}}@keyframes custom-front{to{transform:translateX(-78%) rotate(-13deg) translateY(3px)}}@keyframes custom-track{to{transform:translateX(165%)}}
@media(prefers-reduced-motion:reduce){.custom-scene-glow,.custom-scene-card,.custom-magic-track i{animation:none}}

.bunker-story-dialog{padding:18px;border-radius:18px}.bunker-story-dialog header h2{font-size:20px}.bunker-story-dialog header>[data-story-close]{flex:0 0 40px;min-width:40px;min-height:40px;height:40px;padding:0;font-size:20px;line-height:1;border-radius:11px}.bunker-story-actions{display:flex;gap:8px;margin:10px 0 14px}.bunker-story-actions button{flex:1;min-width:0;font-size:13px;min-height:44px;padding:9px 10px;border:1px solid #dfd1bd;border-radius:11px;margin:0;background:#fffcf7;color:#453722}.bunker-story-actions button.primary{background:linear-gradient(#493a2b,#30271f);color:#fff9ee;border-color:#5a4934}.bunker-story-preview{padding:11px;gap:10px;border-radius:12px}.bunker-story-preview>img{width:48px;height:48px;border-radius:10px}.bunker-story-preview b{font-size:14px;margin:3px 0}.bunker-story-preview em{font-size:12px;margin-top:5px}

/* Story creation: the animation indicates waiting, not measured progress. */
.bunker-custom .custom-story-loading{min-height:340px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:28px 22px;border-color:#ddc5a3;border-radius:18px;background:linear-gradient(160deg,#fffaf1,#f1e2cb);box-shadow:0 12px 28px #5d41200f}
.story-loading-scene{width:142px;height:142px;position:relative;display:grid;place-items:center;margin:0 0 15px}.story-loading-ring{position:absolute;inset:4px;border:1px solid #caa87288;border-radius:50%;animation:story-orbit 6s linear infinite}.story-loading-ring:before{content:"";position:absolute;width:7px;height:7px;top:15px;left:18px;background:#b3864b;border-radius:50%;box-shadow:0 0 10px #bd965d}.story-loading-ring-inner{inset:17px;border-style:dashed;opacity:.55;animation-direction:reverse;animation-duration:9s}.story-loading-core{width:76px;height:76px;background:#fbf4e8;border:1px solid #d9bd93;border-radius:24px;display:grid;place-items:center;box-shadow:0 9px 24px #a77e4b24;animation:story-breathe 2.6s ease-in-out infinite}.story-loading-core img{width:43px;height:43px}.bunker-custom .custom-story-loading b{font:700 25px/1.15 Georgia,serif;margin:3px 0}.bunker-custom .custom-story-loading p{font-size:13px;max-width:260px;margin:9px auto 0}.story-loading-status{margin-top:20px;color:#91724b;font-size:11px}.story-loading-dots:after{content:"";display:inline-block;width:16px;text-align:left;animation:story-dots 1.8s steps(1,end) infinite}@keyframes story-orbit{to{transform:rotate(360deg)}}@keyframes story-breathe{50%{transform:translateY(-3px);box-shadow:0 15px 30px #a77e4b32}}@keyframes story-dots{0%{content:"."}33%{content:".."}66%{content:"..."}}@media(prefers-reduced-motion:reduce){.story-loading-ring,.story-loading-core,.story-loading-dots:after{animation:none}.story-loading-dots:after{content:"..."}}

/* Approved Mafia night layout, scoped to the night phase. */
#panel[data-game="mafia"][data-mafia-scene="night"]{background:radial-gradient(ellipse at 50% 0%,#ded0bc,#f4efe6 60%)}#panel[data-game="mafia"][data-mafia-scene="night"] .stage-scene{border:1px solid #704a45;border-radius:22px;background:linear-gradient(145deg,#6e4846,#493b38 65%,#292d2d);box-shadow:0 15px 32px #3d2b2625;padding:22px;color:#fff7ec}#panel[data-game="mafia"][data-mafia-scene="night"] .stage-scene h1,#panel[data-game="mafia"][data-mafia-scene="night"] .stage-scene p,#panel[data-game="mafia"][data-mafia-scene="night"] .stage-scene .room-code,#panel[data-game="mafia"][data-mafia-scene="night"] .stage-scene .eyebrow{color:#fff4e7!important}#panel[data-game="mafia"][data-mafia-scene="night"] .stage-scene h1{font:700 28px Georgia,serif}#panel[data-game="mafia"][data-mafia-scene="night"] .stage-label{background:#f2e5d5;color:#5e3c37;border:1px solid #fff5e4;border-radius:99px;padding:7px 12px;display:inline-block}#panel[data-game="mafia"][data-mafia-scene="night"] .participants-section{background:linear-gradient(145deg,#fffaf1,#eee1cf);border:1px solid #dfceb7;border-radius:18px;padding:16px;margin:16px 0;box-shadow:0 8px 22px #5d403318}#panel[data-game="mafia"][data-mafia-scene="night"] .card.private{background:linear-gradient(145deg,#fffdf8,#f2e6d5);border:1px solid #dec9b0;border-radius:20px;box-shadow:0 12px 28px #5d403320}#panel[data-game="mafia"][data-mafia-scene="night"] .targets button{background:linear-gradient(145deg,#fbf6ee,#e8dbcc);border:1px solid #d3beaa;border-radius:12px;min-height:46px;box-shadow:inset 0 1px #fff,0 4px 9px #63483a18;color:#543d36}#panel[data-game="mafia"][data-mafia-scene="night"] .targets button:active{transform:translateY(2px) scale(.98)}#panel[data-game="mafia"][data-mafia-scene="night"] .private-head h2{font:700 21px Georgia;color:#48322d}#panel[data-game="mafia"][data-mafia-scene="night"] .secret-text{line-height:1.55}@media(prefers-reduced-motion:reduce){#panel[data-game="mafia"][data-mafia-scene="night"] .targets button{transition:none}}

/* Keep the approved light cards readable inside Telegram dark theme. */
#panel[data-game="mafia"][data-mafia-scene="night"]{--paper:#fffdf9;--ink:#1f1c18;--muted:#756b60;--line:#e7ded2;--iv-ink:#1f1c18;--iv-secondary:#756b60;--iv-rule:#e7ded2;color:#1f1c18;color-scheme:light}

/* Approved Spy discussion view, with readable text in both Telegram themes. */
#panel[data-game="spy"]:is([data-spy-scene="discussion"],[data-spy-scene="vote"],[data-spy-scene="finished"]){--paper:#fffdf9;--ink:#1f1c18;--muted:#756b60;--line:#e7ded2;--iv-ink:#1f1c18;--iv-secondary:#756b60;--iv-rule:#e7ded2;color:#1f1c18;color-scheme:light}#panel[data-game="spy"]:is([data-spy-scene="discussion"],[data-spy-scene="vote"],[data-spy-scene="finished"]) .stage-scene{border:1px solid #4d6d67;border-radius:22px;background:linear-gradient(145deg,#405b58,#304a4a 65%,#263638);box-shadow:0 15px 32px #3d2b2625;padding:22px;color:#fff7ec}#panel[data-game="spy"]:is([data-spy-scene="discussion"],[data-spy-scene="vote"],[data-spy-scene="finished"]) .stage-scene h1,#panel[data-game="spy"]:is([data-spy-scene="discussion"],[data-spy-scene="vote"],[data-spy-scene="finished"]) .stage-scene p,#panel[data-game="spy"]:is([data-spy-scene="discussion"],[data-spy-scene="vote"],[data-spy-scene="finished"]) .stage-scene .room-code,#panel[data-game="spy"]:is([data-spy-scene="discussion"],[data-spy-scene="vote"],[data-spy-scene="finished"]) .stage-scene .eyebrow{color:#fff4e7!important}#panel[data-game="spy"]:is([data-spy-scene="discussion"],[data-spy-scene="vote"],[data-spy-scene="finished"]) .stage-scene h1{font:700 28px Georgia,serif}#panel[data-game="spy"]:is([data-spy-scene="discussion"],[data-spy-scene="vote"],[data-spy-scene="finished"]) .stage-label{background:#f2e5d5;color:#345c55;border:1px solid #fff5e4;border-radius:99px;padding:7px 12px;display:inline-block}#panel[data-game="spy"]:is([data-spy-scene="discussion"],[data-spy-scene="vote"],[data-spy-scene="finished"]) .participants-section{background:linear-gradient(145deg,#fffaf1,#eee1cf);border:1px solid #dfceb7;border-radius:18px;padding:16px;margin:16px 0;box-shadow:0 8px 22px #5d403318}#panel[data-game="spy"]:is([data-spy-scene="discussion"],[data-spy-scene="vote"],[data-spy-scene="finished"]) .card.private{background:linear-gradient(145deg,#fffdf8,#f2e6d5);border:1px solid #dec9b0;border-radius:20px;box-shadow:0 12px 28px #5d403320}#panel[data-game="spy"]:is([data-spy-scene="discussion"],[data-spy-scene="vote"],[data-spy-scene="finished"]) .targets button{background:linear-gradient(145deg,#fbf6ee,#e8dbcc);border:1px solid #d3beaa;border-radius:12px;min-height:46px;box-shadow:inset 0 1px #fff,0 4px 9px #63483a18;color:#543d36}#panel[data-game="spy"]:is([data-spy-scene="discussion"],[data-spy-scene="vote"],[data-spy-scene="finished"]) .targets button:active{transform:translateY(2px) scale(.98)}#panel[data-game="spy"]:is([data-spy-scene="discussion"],[data-spy-scene="vote"],[data-spy-scene="finished"]) .private-head h2{font:700 21px Georgia;color:#304a43}#panel[data-game="spy"]:is([data-spy-scene="discussion"],[data-spy-scene="vote"],[data-spy-scene="finished"]) .secret-text{line-height:1.55}@media(prefers-reduced-motion:reduce){#panel[data-game="spy"]:is([data-spy-scene="discussion"],[data-spy-scene="vote"],[data-spy-scene="finished"]) .targets button{transition:none}}

/* Approved Mafia daytime presentation. */
#panel[data-game="mafia"]:is([data-mafia-scene="day"],[data-mafia-scene="vote"],[data-mafia-scene="finished"]){background:radial-gradient(ellipse at 50% 0%,#ded0bc,#f4efe6 60%)}#panel[data-game="mafia"]:is([data-mafia-scene="day"],[data-mafia-scene="vote"],[data-mafia-scene="finished"]) .stage-scene{border:1px solid #c6af96;border-radius:22px;background:linear-gradient(145deg,#f7ecdd,#dfcdb9 65%,#cab49d);box-shadow:0 15px 32px #3d2b2625;padding:22px;color:#49362b}#panel[data-game="mafia"]:is([data-mafia-scene="day"],[data-mafia-scene="vote"],[data-mafia-scene="finished"]) .stage-scene h1,#panel[data-game="mafia"]:is([data-mafia-scene="day"],[data-mafia-scene="vote"],[data-mafia-scene="finished"]) .stage-scene p,#panel[data-game="mafia"]:is([data-mafia-scene="day"],[data-mafia-scene="vote"],[data-mafia-scene="finished"]) .stage-scene .room-code,#panel[data-game="mafia"]:is([data-mafia-scene="day"],[data-mafia-scene="vote"],[data-mafia-scene="finished"]) .stage-scene .eyebrow{color:#49362b!important}#panel[data-game="mafia"]:is([data-mafia-scene="day"],[data-mafia-scene="vote"],[data-mafia-scene="finished"]) .stage-scene h1{font:700 28px Georgia,serif}#panel[data-game="mafia"]:is([data-mafia-scene="day"],[data-mafia-scene="vote"],[data-mafia-scene="finished"]) .stage-label{background:#f2e5d5;color:#5e3c37;border:1px solid #fff5e4;border-radius:99px;padding:7px 12px;display:inline-block}#panel[data-game="mafia"]:is([data-mafia-scene="day"],[data-mafia-scene="vote"],[data-mafia-scene="finished"]) .participants-section{background:linear-gradient(145deg,#fffaf1,#eee1cf);border:1px solid #dfceb7;border-radius:18px;padding:16px;margin:16px 0;box-shadow:0 8px 22px #5d403318}#panel[data-game="mafia"]:is([data-mafia-scene="day"],[data-mafia-scene="vote"],[data-mafia-scene="finished"]) .card.private{background:linear-gradient(145deg,#fffdf8,#f2e6d5);border:1px solid #dec9b0;border-radius:20px;box-shadow:0 12px 28px #5d403320}#panel[data-game="mafia"]:is([data-mafia-scene="day"],[data-mafia-scene="vote"],[data-mafia-scene="finished"]) .targets button{background:linear-gradient(145deg,#fbf6ee,#e8dbcc);border:1px solid #d3beaa;border-radius:12px;min-height:46px;box-shadow:inset 0 1px #fff,0 4px 9px #63483a18;color:#543d36}#panel[data-game="mafia"]:is([data-mafia-scene="day"],[data-mafia-scene="vote"],[data-mafia-scene="finished"]) .targets button:active{transform:translateY(2px) scale(.98)}#panel[data-game="mafia"]:is([data-mafia-scene="day"],[data-mafia-scene="vote"],[data-mafia-scene="finished"]) .private-head h2{font:700 21px Georgia;color:#48322d}#panel[data-game="mafia"]:is([data-mafia-scene="day"],[data-mafia-scene="vote"],[data-mafia-scene="finished"]) .secret-text{line-height:1.55}#panel[data-game="mafia"]:is([data-mafia-scene="day"],[data-mafia-scene="vote"],[data-mafia-scene="finished"]) .room-header{border-bottom-color:#d8c5ae}@media(prefers-reduced-motion:reduce){#panel[data-game="mafia"]:is([data-mafia-scene="day"],[data-mafia-scene="vote"],[data-mafia-scene="finished"]) .targets button{transition:none}}

#panel[data-game="spy"] .spy-vote-progress{display:flex;flex-direction:column;gap:5px;margin-top:15px;padding:12px 14px;border:1px solid #6a8881;background:#eef4ef;color:#284b44;border-radius:14px;font-size:13px}#panel[data-game="spy"] .spy-vote-progress b{font-size:14px}#panel[data-game="spy"] .spy-vote-progress small{font-size:12px;color:#587268}

#panel[data-game="mafia"][data-mafia-scene="finished"] .mafia-finale{margin-top:17px;padding:17px;border-radius:17px;background:#fffaf4;border:1px solid #e2d3c5;box-shadow:0 8px 24px #5b37301a;color:#3f302c}#panel[data-game="mafia"] .finale-label{display:block;font:700 10px system-ui;letter-spacing:.12em;color:#856d64}#panel[data-game="mafia"] .finale-title{display:block;margin-top:6px;font:700 23px Georgia,serif;color:#653a3b}#panel[data-game="mafia"] .finale-sub{display:block;margin-top:5px;font:13px system-ui;color:#75645b;white-space:pre-line}#panel[data-game="mafia"] .finale-roles-title{margin-top:17px;padding-top:14px;border-top:1px solid #eadfd3;font:700 13px system-ui;color:#513c38}#panel[data-game="mafia"] .finale-role{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px solid #f0e7dd;font:13px system-ui}#panel[data-game="mafia"] .finale-role:last-child{border:0;padding-bottom:0}#panel[data-game="mafia"] .finale-role b{font-size:12px;color:#775557;text-align:right}#panel[data-game="mafia"] .finale-identity{display:flex;align-items:center;gap:9px;min-width:0}#panel[data-game="mafia"] .finale-identity .avatar{width:30px;height:30px;flex:none}#panel[data-game="mafia"] .mafia-finale-plain{white-space:pre-line}

/* Approved compact story creation. Motion indicates waiting, never percentage. */
.bunker-custom .custom-story-loading{min-height:0;display:grid;grid-template-columns:58px minmax(0,1fr);gap:0 15px;align-items:center;padding:17px 18px;text-align:left;border:1px solid #d9d3c8;border-radius:18px;background:linear-gradient(120deg,#fffdf8,#f0eee5);box-shadow:0 12px 30px #42382908}
.bunker-custom .custom-story-loading b{font:600 23px/1.15 Georgia,serif;letter-spacing:-.035em;color:#30483e;margin:0;overflow-wrap:anywhere}.story-compact-art{width:58px;height:64px;position:relative;perspective:250px}.story-compact-art i{position:absolute;width:36px;height:47px;top:7px;left:11px;border:1px solid #b8c8be;border-radius:8px;background:linear-gradient(135deg,#f8fcf7,#b5c9bd);box-shadow:0 4px 8px #304d3d12;animation:story-card-float 3s ease-in-out infinite}.story-compact-art i:first-child{transform:rotate(-16deg);animation-delay:-1s}.story-compact-art i:nth-child(2){transform:rotate(16deg);animation-delay:-2s}.story-compact-art i:last-child{display:grid;place-items:center;background:linear-gradient(140deg,#526e63,#283f36);color:#f4ead6;border-color:#6c8275;overflow:hidden}.story-compact-art i:last-child:after{content:'';position:absolute;inset:-30%;background:linear-gradient(110deg,transparent 35%,#ffffff55 50%,transparent 65%);animation:story-card-shine 2.8s infinite}.story-compact-track{grid-column:1/-1;height:2px;overflow:hidden;background:#e8ede6;margin-top:12px;border-radius:5px}.story-compact-track:after{content:'';display:block;width:35%;height:100%;background:linear-gradient(90deg,transparent,#6d9685,transparent);animation:story-track-flow 2s ease-in-out infinite}@keyframes story-card-float{0%,100%{translate:0 2px}50%{translate:0 -4px;rotate:4deg}}@keyframes story-card-shine{0%,20%{translate:-100%}80%,100%{translate:100%}}@keyframes story-track-flow{from{transform:translateX(-110%)}to{transform:translateX(390%)}}@media(prefers-reduced-motion:reduce){.story-compact-art i,.story-compact-art i:after,.story-compact-track:after{animation:none}}

#panel[data-game="bunker"] .normal-management .story-shortcuts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0 14px}
#panel[data-game="bunker"] .normal-management .story-shortcuts button{display:flex;align-items:center;gap:9px;text-align:left;min-width:0;min-height:60px;padding:10px;background:linear-gradient(145deg,#fffdf8,#eee6da);border:1px solid #d8cbb9;border-radius:14px;color:#3f433a;box-shadow:inset 0 1px #fff,0 3px 0 #d8cdbf,0 6px 12px #4437260a;transition:transform .15s,box-shadow .15s}
#panel[data-game="bunker"] .normal-management .story-shortcuts button:active{transform:translateY(2px);box-shadow:inset 0 1px #ffffff88,0 1px 0 #d8cdbf}.story-shortcuts button>.pb-icon{display:none}

.bunker-custom .custom-story-loading.story-motion-host{display:block;min-height:0;padding:0;border:0;background:none;box-shadow:none;margin:12px 0}
