.stale-banner {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 120; width: min(520px, 92vw);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #2a1808; border: 1px solid var(--gold);
  padding: 10px 12px; font-size: 15px; color: var(--gold-bright);
  border-radius: 4px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.55);
  pointer-events: auto;
}
.stale-banner.hidden { display: none !important; }
.stale-banner #btn-stale-refresh {
  width: auto; margin: 0; padding: 6px 12px; font-size: 12px;
}
.serve-note {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  z-index: 20; background: #2a1808; border: 1px solid var(--gold);
  padding: 8px 12px; font-size: 13px; max-width: 90vw;
  border-radius: 4px;
}
code { color: var(--gold); }
#post-stats, #post-awards { margin: 12px 0; font-size: 15px; color: var(--muted); }
.post-card { text-align: center; }
.post-stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 16px 0 10px;
  text-align: left;
}
.post-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(28,18,10,0.78), rgba(12,8,6,0.82));
  border: 1px solid rgba(180,140,70,0.28);
  border-radius: 4px;
  color: var(--muted);
  font-size: 15px;
}
.post-stat b {
  color: var(--gold-bright);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
#btn-post-hub { margin-top: 8px; min-width: 200px; }
#login-err { min-height: 1.1em; margin: 6px 0 0; }
#stats-overlay, #resume-overlay {
  position: fixed; inset: 0; z-index: 62;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6,4,2,0.55);
  pointer-events: auto;
}
#stats-overlay.hidden, #resume-overlay.hidden { display: none !important; }
#stats-card, #resume-card {
  width: min(420px, 92vw);
  max-height: 86vh;
  overflow: auto;
  padding: 8px 18px 18px;
  background: linear-gradient(180deg, rgba(36,24,12,0.97), rgba(10,7,5,0.97));
  border: 1px solid #c4a050;
  border-radius: 6px;
  box-shadow:
    0 0 0 1px #1a1208,
    0 0 0 3px rgba(90, 64, 24, 0.85),
    0 18px 40px rgba(0,0,0,0.6);
  -webkit-user-select: none;
  user-select: none;
}
.stats-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0 2px;
}
.stats-tab {
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--ui-label);
  font-size: 11px;
}
.stats-tab.on {
  color: var(--gold-bright);
  border-color: var(--gold);
  box-shadow: inset 0 1px 0 rgba(255,220,150,0.28), 0 0 12px rgba(224,180,80,0.22);
}
#stats-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 8px;
}
.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  background: linear-gradient(180deg, rgba(28,18,10,0.78), rgba(12,8,6,0.82));
  border: 1px solid rgba(180,140,70,0.28);
  border-radius: 4px;
  color: var(--muted);
  font-size: 15px;
}
.stat-row b { color: var(--gold-bright); font-variant-numeric: tabular-nums; }
#resume-card { text-align: center; }
#resume-elapsed { color: var(--gold-bright); font-size: 18px; margin: 8px 0 4px; }
.resume-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
#btn-rejoin { margin-top: 0; }
#stats-card #btn-stats-close, #resume-card #btn-abandon { margin-top: 8px; }

#nameplates {
  position: absolute; inset: 0; pointer-events: none; z-index: 7;
  overflow: visible;
  transform: translateZ(0);
}
.nameplate {
  position: absolute; transform: translate(-50%, -100%);
  min-width: 148px; text-align: center;
  pointer-events: auto;
  cursor: pointer;
  padding: 10px 16px 14px;
  z-index: 1;
}
#nameplates.look-held .nameplate {
  pointer-events: none;
  cursor: inherit;
}
.nameplate::before {
  content: "";
  position: absolute;
  inset: -18px -32px -16px;
}
.nameplate:hover {
  filter: drop-shadow(0 0 7px #ffe08a);
}
.nameplate .np-name {
  font-size: 15px; color: #fff6d8;
  text-shadow: 0 1px 3px #000, 0 0 6px #000;
  letter-spacing: 0.02em; white-space: nowrap;
  pointer-events: none;
}
.nameplate .np-bar {
  height: 11px; background: #140808; border: 1px solid #5a4020; margin-top: 3px; overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 1px 3px #000, inset 0 1px 2px rgba(0,0,0,0.6);
  pointer-events: none;
}
.nameplate .np-bar > i { display: block; height: 100%; background: linear-gradient(#e06058, #8a1818); }
.nameplate.ally .np-bar > i { background: linear-gradient(#5aba62, #2f8a3a); }
.nameplate.sel { filter: drop-shadow(0 0 8px #ffe08a); transform: translate(-50%, -100%) scale(1.12); z-index: 4; }
.nameplate.sel .np-name { color: #ffe08a; font-size: 16px; }
.np-cast {
  height: 6px; background: #140808; border: 1px solid #c09040; margin-top: 3px; overflow: hidden; border-radius: 2px;
  pointer-events: none;
}
.np-cast > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #c07020, #ffe08a); }
.nameplate:not(.ally) .np-cast > i { background: linear-gradient(90deg, #8a1818, #ff6040); }
.np-cast.hidden { display: none !important; }

#prep-overlay {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 11vh; pointer-events: none;
  background: linear-gradient(180deg, rgba(8,6,4,0.35), transparent 42%);
}
#prep-overlay.hidden { display: none !important; }
#prep-count {
  font-size: 92px; line-height: 1; color: #ffe08a;
  font-family: var(--ui-display);
  text-shadow: 0 0 24px rgba(212,180,106,0.55), 0 4px 0 #3a2a10;
  font-variant-numeric: tabular-nums;
}
#prep-label {
  margin-top: 6px; letter-spacing: 0.32em; text-transform: uppercase;
  color: #d4c06a; font-size: 14px;
  font-family: var(--ui-label);
}

#ui-error {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
  z-index: 6; pointer-events: none;
  color: #ffd24a; font-size: 22px; letter-spacing: 0.04em;
  text-shadow: 0 2px 0 #000, 0 0 12px #000;
  white-space: nowrap;
}
#ui-error.hidden { display: none !important; }
#ui-error.pop { animation: errpop 0.85s ease-out; }
@keyframes errpop {
  0% { opacity: 0; transform: translate(-50%, -40%); }
  12% { opacity: 1; transform: translate(-50%, -50%); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -62%); }
}

#fct-layer { position: absolute; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.fct {
  position: absolute; transform: translate(-50%, -50%);
  font-size: 22px; font-weight: 700; pointer-events: none;
  text-shadow: 0 2px 0 #000, 0 0 8px #000;
  animation: fctup 1.05s ease-out forwards;
  white-space: nowrap;
}
.fct.heal { color: #5adf6a; font-size: 20px; }
.fct.dmg { color: #ffe8c0; }
.fct.crit { color: #ffb020; font-size: 28px; }
.fct.school-frost { color: #8ad4ff; }
.fct.school-fire { color: #ff8040; }
.fct.school-holy { color: #ffe08a; }
.fct.school-shadow { color: #c090ff; }
@keyframes fctup {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
  12% { opacity: 1; transform: translate(-50%, -60%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -130%) scale(1); }
}

.cc-mark,
.cc-stars {
  display: none !important;
}

#top-actions {
  position: fixed; top: 12px; right: 16px; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  pointer-events: auto;
}
#top-actions.on-match { right: 258px; top: 16px; }
.settings-gear {
  position: relative; top: auto; right: auto;
  width: auto; margin: 0;
  padding: 7px 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--ui-label);
  font-size: 11px;
  color: var(--gold-bright);
  border-color: #c4a050;
  background: linear-gradient(180deg, rgba(42,28,14,0.96), rgba(12,8,5,0.94));
  pointer-events: auto;
}
.settings-gear:hover { color: #fff6d8; border-color: var(--gold-bright); }
#btn-status.status-btn {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
  text-transform: none;
}
#btn-status .status-dot {
  width: 14px;
  height: 14px;
}
#btn-invite:disabled,
#btn-add-friend:disabled,
#btn-block:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: none;
  box-shadow: 0 2px 0 #140e08, inset 0 1px 0 rgba(255,220,150,0.12);
}
.status-wrap { position: relative; }
.float-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 148px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: linear-gradient(180deg, rgba(36,24,12,0.98), rgba(10,7,5,0.98));
  border: 1px solid #c4a050;
  border-radius: 4px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.5);
  z-index: 60;
}
.float-menu button {
  width: 100%;
  margin: 0;
  padding: 6px 10px;
  text-align: left;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: none;
}
.float-menu button.sel { border-color: var(--gold); color: var(--gold-bright); }
.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 5px currentColor;
}
.status-dot.online {
  background: #3dcc5a;
  color: #3dcc5a;
  animation: statusGlow 2.6s ease-in-out infinite;
}
.status-dot.away {
  background: #e0c040;
  color: #e0c040;
  animation: statusGlow 2.6s ease-in-out infinite;
}
.status-dot.offline { background: #6a4a4a; color: #6a4a4a; box-shadow: none; }
@keyframes statusGlow {
  0%, 100% { box-shadow: 0 0 2px currentColor, 0 0 5px currentColor; }
  50% { box-shadow: 0 0 4px currentColor, 0 0 10px currentColor; }
}
.friend { position: relative; }
.friend-menu-btn {
  margin-left: auto;
  padding: 5px 12px 6px;
  min-width: 38px;
  min-height: 28px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1;
  color: #fff6d8;
  border: 1px solid #f0d48a;
  border-radius: 3px;
  background: linear-gradient(180deg, #d4b060 0%, #a07830 42%, #6a4a16 56%, #3e2a0c 100%);
  text-shadow: 0 1px 0 #3a2a10;
  box-shadow:
    0 2px 0 #1a1208,
    inset 0 1px 0 rgba(255,240,200,0.5),
    inset 0 -2px 4px rgba(0,0,0,0.35);
}
.friend-menu-btn:hover {
  filter: brightness(1.12);
  border-color: var(--gold-bright);
}
.friend.pending { opacity: 0.75; }
.brackets.locked { pointer-events: none; opacity: 0.5; }
.queue-locked select,
.queue-locked input { pointer-events: none; opacity: 0.55; }
#settings-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6,4,2,0.55);
  pointer-events: auto;
}
#settings-overlay.hidden { display: none !important; }
#settings-card {
  width: min(380px, 92vw);
  padding: 8px 18px 18px;
  background: linear-gradient(180deg, rgba(36,24,12,0.97), rgba(10,7,5,0.97));
  border: 1px solid #c4a050;
  border-radius: 6px;
  box-shadow:
    0 0 0 1px #1a1208,
    0 0 0 3px rgba(90, 64, 24, 0.85),
    0 18px 40px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,220,150,0.22);
}
#settings-card h2 {
  margin: 10px 0 2px;
  text-align: center;
  font-family: var(--ui-display);
  font-size: 18px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.settings-sub {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 10px;
}
.vol-row {
  display: flex;
  justify-content: space-between;
  margin: 12px 0 4px;
}
#settings-card input[type="range"] {
  width: 100%;
  padding: 0;
  height: 8px;
  accent-color: #d4b060;
  background: transparent;
  border: 0;
  box-shadow: none;
  cursor: pointer;
}
.settings-display { margin-top: 18px; }
.fs-settings-hint {
  text-align: center;
  color: var(--gold-bright);
  font-size: 13px;
  margin: 0 0 10px;
  letter-spacing: 0.04em;
}
#btn-fullscreen { margin-top: 0; }
#settings-card #btn-settings-close { margin-top: 12px; }

.panel::-webkit-scrollbar, .queue-card::-webkit-scrollbar { width: 8px; }
.panel::-webkit-scrollbar-thumb, .queue-card::-webkit-scrollbar-thumb {
  background: linear-gradient(#8a6828, #4a3414);
  border-radius: 4px;
}
.panel::-webkit-scrollbar-track, .queue-card::-webkit-scrollbar-track { background: rgba(0,0,0,0.25); }

.wow-tip {
  position: fixed;
  z-index: 90;
  min-width: 228px;
  max-width: 320px;
  padding: 8px 12px 10px;
  background: linear-gradient(180deg, rgba(20, 16, 28, 0.97), rgba(8, 8, 14, 0.98));
  border: 1px solid #c4a050;
  border-radius: 4px;
  color: #fff6d8;
  pointer-events: none;
  box-shadow: 0 12px 28px rgba(0,0,0,0.65), 0 0 0 1px #1a1208;
  text-shadow: 0 1px 1px #000;
  font-family: var(--ui-font);
  line-height: 1.35;
}
.wow-tip .tip-name {
  color: #ffe08a;
  font-family: var(--ui-label);
  font-size: 15px;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}
.wow-tip .tip-school {
  font-size: 12px;
  margin-bottom: 4px;
  color: #d4b46a;
}
.wow-tip .tip-school.school-frost, .wow-tip .tip-school.aura-magic { color: #6ec4ff; }
.wow-tip .tip-school.school-fire { color: #ff9a4a; }
.wow-tip .tip-school.school-holy { color: #ffe9a0; }
.wow-tip .tip-school.school-shadow { color: #c090ff; }
.wow-tip .tip-school.school-arcane { color: #e0b0ff; }
.wow-tip .tip-school.school-physical, .wow-tip .tip-school.aura-physical { color: #d4b46a; }
.wow-tip .tip-school.aura-poison { color: #3dcc5a; }
.wow-tip .tip-school.aura-bleed { color: #e05050; }
.wow-tip .tip-school.aura-enrage { color: #e07828; }
.wow-tip .tip-school.aura-curse { color: #b070ff; }
.wow-tip .tip-school.aura-disease { color: #c4a040; }
.wow-tip .tip-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
  font-size: 12px;
  margin-bottom: 2px;
}
.wow-tip .tip-body {
  color: #fff6d8;
  font-size: 13px;
  margin-top: 6px;
}
.wow-tip .tip-talent {
  color: #b6e0b0;
}

@media (max-width: 900px) {
  .topbar { padding: 0 188px 0 14px; }
  .who-wrap { max-width: min(100px, 26vw); }
  #hub-who.who { font-size: 13px; padding: 5px 8px; }
  .hub-grid { grid-template-columns: 1fr; }
  .talent-spec-row { grid-template-columns: 1fr; }
  .unit-frame { width: 210px; }
  .unit-frame.target { left: 50%; }
  .aura-row.target-auras { left: 50%; }
  #target-cast-bar { left: 50%; top: 148px; width: 210px; }
  .slot { width: 52px; height: 52px; flex-basis: 52px; }
  .slot .icon { font-size: 22px; }
  #gcd-bar { bottom: 168px; }
  #cast-bar { bottom: 186px; }
  #combat-log { bottom: 168px; }
  #match-meta { right: 10px; bottom: 122px; font-size: 9px; padding: 2px 6px; }
  #top-actions.on-match { right: 16px; top: auto; bottom: 168px; }
  .fs-hint { top: auto; bottom: 210px; right: 16px; }
  .login-card { border-width: 42px; padding: 4px 10px 14px; }
  h1 { font-size: 20px; letter-spacing: 0.08em; }
}
