/* The exact server-issued GM identity is visually distinct everywhere it appears. */
html body .identity-badge.gm{
  position:relative;isolation:isolate;overflow:hidden;min-height:25px;padding:5px 10px 5px 7px;
  color:#fff8d8;background:linear-gradient(125deg,#140b22 0%,#3d1760 38%,#8d3db1 63%,#171022 100%);
  border:1px solid #ffe58d;box-shadow:inset 0 0 0 1px #d592ff66,0 3px 10px #17051a66,0 0 14px #d77bff66;
  font-family:Georgia,"Noto Serif TC",serif;font-size:10px;letter-spacing:.12em;text-shadow:0 1px 5px #000;
}
html body .identity-badge.gm:after{content:"";position:absolute;z-index:-1;inset:-60% auto -60% -38%;width:26%;transform:rotate(18deg);background:linear-gradient(90deg,transparent,#fff8c9b5,transparent);animation:gmBadgeSweep 3.8s ease-in-out infinite}
html body .gm-sigil{display:inline-grid;place-items:center;width:15px;height:15px;border-radius:50%;color:#32133f;background:linear-gradient(145deg,#fff7bd,#e0a435);box-shadow:0 0 8px #ffe889;letter-spacing:0}
html body .avatar.gm{border-color:#ffe487;box-shadow:0 0 0 2px #1a0d25,0 0 0 5px #b656d9,0 0 20px #dc75ffb8;animation:gmAvatarPulse 2.6s ease-in-out infinite}
html body .hero.gm{position:relative;isolation:isolate;background:radial-gradient(circle at 82% 18%,#ba65e044 0 8%,transparent 32%),linear-gradient(132deg,#090611 0%,#241035 43%,#5c2172 74%,#160d21 100%);border:1px solid #ffe48a;box-shadow:inset 0 0 0 2px #a143c866,inset 0 0 46px #e58aff24,0 18px 40px #1d082969}
html body .hero.gm:before{content:"";position:absolute;z-index:-1;inset:7px;border:1px solid #e8b5ff70;border-radius:17px;pointer-events:none}
html body .hero.gm:after{content:"♛  GAME MASTER";position:absolute;z-index:5;top:12px;right:12px;padding:7px 10px;border-radius:999px;color:#2f133a;background:linear-gradient(145deg,#fff8bd,#d99b31);border:1px solid #fff4bd;font:900 10px/1 Georgia,"Noto Serif TC",serif;letter-spacing:.1em;box-shadow:0 4px 15px #08030b70,0 0 15px #f2cc66a0}
html body .hero.gm h1{color:#fff9df;text-shadow:0 2px 13px #050208}
html body .hero.gm .progress{background:#0603097a;border:1px solid #d998f052}
html body .hero.gm .progress i{background:linear-gradient(90deg,#9f46ca,#ffe27f 50%,#c461e7);box-shadow:0 0 11px #ed9aff}
html body .member.gm{position:relative;border-color:#cf78e8;background:linear-gradient(100deg,#25122f,#fffdf7 66%);box-shadow:inset 4px 0 #f2c65f,0 8px 22px #461b5638}
html body .member.gm b{color:#5b2170}
html body .message.gm{border:1px solid #d18bea;border-left:5px solid #efc861;background:radial-gradient(circle at 92% 8%,#8f3aad45,transparent 34%),linear-gradient(110deg,#16091e 0%,#32123e 58%,#24102e 100%);color:#fffaf0;border-radius:14px;box-shadow:0 5px 18px #4216502d}
html body .message.gm .message-head b{color:#fff1c1;text-shadow:0 1px 5px #000}
html body .message.gm .message-head time{color:#f1ddf7}
html body .message.gm .message-body{color:#fffaf0}
html body .message.gm .message-text{color:#fffaf0;font-weight:650;line-height:1.65;text-shadow:0 1px 3px #000;overflow-wrap:anywhere}
html body .message.gm .message-actions .muted{color:#f1ddf7}
html body .gm-announce-action{color:#fff8d7!important;background:linear-gradient(125deg,#351044,#8f3aad)!important;border-color:#efca67!important;box-shadow:0 0 10px #c760e65c}
html body .player-announcement.gm{border:2px solid #ffe281;background:radial-gradient(circle at 88% 0,#a94bd057,transparent 35%),linear-gradient(115deg,#100817f7,#3b1550f7 55%,#160b20f7);color:#fff9df;box-shadow:0 8px 32px #120318a8,0 0 22px #c85aeca3}
html body .player-announcement.gm strong{color:#ffe58c;font-family:Georgia,"Noto Serif TC",serif;letter-spacing:.08em;text-shadow:0 1px 6px #000}
@keyframes gmBadgeSweep{0%,62%{left:-38%;opacity:0}70%{opacity:1}90%{left:125%;opacity:.8}100%{left:125%;opacity:0}}
@keyframes gmAvatarPulse{50%{box-shadow:0 0 0 2px #1a0d25,0 0 0 5px #d983f0,0 0 29px #e18aff}}
@media(prefers-reduced-motion:reduce){html body .identity-badge.gm:after{display:none}html body .avatar.gm{animation:none}}
html body .chat,html body .chat-form{width:100%;min-width:0}
html body .chat-card{padding:13px 14px 12px;overflow:hidden}
html body .chat-section-title{align-items:center;margin:18px 3px 9px}
html body .chat-section-title .muted{line-height:1.45;text-align:right}
html body .chat{max-height:min(58dvh,520px);scroll-padding-bottom:8px}
html body .chat .message{padding:10px 8px;min-width:0}
html body .chat .message-head{display:grid;grid-template-columns:44px minmax(0,1fr) auto;grid-template-areas:"avatar name time" "avatar badges badges";column-gap:8px;row-gap:4px;align-items:center;margin-bottom:6px}
html body .chat .message-head>.avatar{grid-area:avatar}
html body .chat .message-head>b{grid-area:name;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body .chat .message-head>.identity-badges{grid-area:badges;margin-left:0}
html body .chat .message-head>time{grid-area:time;margin-left:0;white-space:nowrap}
html body .chat .message-body{gap:8px;margin-top:0}
html body .chat .message-actions{align-self:center}
html body .chat-form{position:static;bottom:auto;align-items:stretch;margin-top:9px;padding-top:9px;border-top:1px solid #eadfce}
html body .chat-form input{flex:1 1 auto;min-width:0}
html body .chat-form button{flex:0 0 auto;white-space:nowrap}
@media(max-width:760px){html body .chat-form input{font-size:16px;line-height:1.5}}
@media(max-width:430px){html body .hero.gm:after{top:8px;right:8px;font-size:9px;padding:6px 8px}html body .identity-badge.gm{letter-spacing:.07em}html body .chat-card{padding:11px 10px 10px}html body .chat-section-title{display:block}html body .chat-section-title .muted{display:block;margin-top:2px;text-align:left}html body .chat .message{padding:9px 6px}html body .chat .message-head{grid-template-columns:40px minmax(0,1fr) auto}html body .chat .message-head>.avatar{width:40px;height:40px}html body .chat .identity-badge{font-size:9px;padding:4px 6px}html body .chat .message-body{grid-template-columns:minmax(0,1fr) auto}}

/* Compact, single-line GM marquee. */
html body .player-announcement.gm{left:12px;top:max(12px,env(safe-area-inset-top));width:calc(100vw - 24px);max-width:880px;height:42px;padding:7px 12px;border-radius:12px;display:flex;align-items:center;gap:10px;overflow:hidden}html body .player-announcement.gm[hidden]{display:none!important}html body .player-announcement.gm strong{flex:0 0 auto;max-width:36%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:800 12px/24px system-ui,sans-serif;letter-spacing:.02em}html body .player-announcement.gm p{flex:1;min-width:0;margin:0;overflow:hidden;white-space:nowrap;font:600 16px/24px system-ui,sans-serif}html body .player-announcement.gm p span{display:inline-block;white-space:nowrap}@media(max-width:430px){html body .player-announcement.gm{height:38px;padding:5px 9px;gap:8px}html body .player-announcement.gm strong{font-size:11px}html body .player-announcement.gm p{font-size:15px}}

/* Gold/violet particles stay inside the compact announcement strip. */
html body .player-announcement.gm{isolation:isolate;box-shadow:0 4px 18px #17082666,inset 0 0 13px #efc45c24,0 0 12px #bc67ed55;background:linear-gradient(105deg,#160920f5,#40204bf7 55%,#1c102cf5)}
html body .player-announcement.gm:before,html body .player-announcement.gm:after{content:"";position:absolute;pointer-events:none;z-index:0}
html body .player-announcement.gm:before{inset:-16px -25px;background:radial-gradient(circle at 8% 60%,#fff1aa 0 1px,transparent 2.5px),radial-gradient(circle at 17% 25%,#dab1ff 0 1.2px,transparent 3px),radial-gradient(circle at 28% 77%,#ffe18b 0 1.5px,transparent 3px),radial-gradient(circle at 37% 38%,#f5d3ff 0 .8px,transparent 2px),radial-gradient(circle at 48% 84%,#efbb54 0 1px,transparent 3px),radial-gradient(circle at 59% 15%,#fff4b8 0 1.4px,transparent 3px),radial-gradient(circle at 72% 74%,#c487ff 0 1.2px,transparent 3px),radial-gradient(circle at 84% 33%,#ffe4a0 0 1.2px,transparent 2.5px),radial-gradient(circle at 96% 69%,#efd0ff 0 1px,transparent 3px);opacity:.65;animation:gmAnnouncementParticles 3s ease-in-out infinite alternate}
html body .player-announcement.gm:after{top:-40%;bottom:-40%;left:-24%;width:20%;background:linear-gradient(100deg,transparent,#fff2bf22,transparent);transform:translate3d(0,0,0) skewX(-24deg);animation:gmAnnouncementSweep 4.8s ease-in-out infinite}
html body .player-announcement.gm strong,html body .player-announcement.gm p{position:relative;z-index:1;text-shadow:0 1px 3px #090210,0 0 8px #120417}
html body .player-announcement.gm strong{color:#ffdfa0}
@keyframes gmAnnouncementParticles{0%{transform:translate3d(-7px,5px,0);opacity:.3}50%{opacity:.8}100%{transform:translate3d(9px,-6px,0);opacity:.45}}
@keyframes gmAnnouncementSweep{0%,48%{transform:translate3d(0,0,0) skewX(-24deg);opacity:0}56%{opacity:1}94%,100%{transform:translate3d(680%,0,0) skewX(-24deg);opacity:0}}
@media(prefers-reduced-motion:reduce){html body .player-announcement.gm:before,html body .player-announcement.gm:after{animation:none}html body .player-announcement.gm:after{display:none}}

/* Independent star particles rise and fade beneath the readable text. */
html body .gm-announcement-sparks{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none;font-style:normal}
html body .gm-announcement-sparks b{position:absolute;left:var(--x);top:var(--y);color:#ffe69d;font:normal 9px/1 system-ui;opacity:0;text-shadow:0 0 5px #ffe9a2;animation:gmAnnouncementSpark var(--life) ease-in-out var(--delay) infinite}
html body .gm-announcement-sparks b:nth-child(3n){color:#deacff;font-size:7px;text-shadow:0 0 5px #bb69fc}
@keyframes gmAnnouncementSpark{0%{opacity:0;transform:translate3d(-3px,8px,0) scale(.3) rotate(0)}35%{opacity:.65}65%{opacity:.45}100%{opacity:0;transform:translate3d(5px,-12px,0) scale(1) rotate(55deg)}}
@media(prefers-reduced-motion:reduce){html body .gm-announcement-sparks{display:none}}
