/* Shell SPA — layout full-width; home/salas centralizam só o cartão .home */

html.spartan-shell {
  width: 100%;
  min-height: 100%;
  min-height: 100dvh;
  background-color: #000;
  background-image: url("/papel-de-parede.jpg?v=12");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

html.spartan-shell,
html.spartan-shell body {
  margin: 0;
  padding: 0;
}

html.spartan-shell body {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  background: transparent !important;
  overflow-x: hidden !important;
}

html.spartan-shell #spartan-shell-root {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  min-width: 0;
}

.spartan-view {
  flex: 1 1 auto;
  display: none;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
}

.spartan-view.on {
  display: flex;
}

/* Home e salas: cartão centralizado, fundo em tela cheia */
html.spartan-shell #spartan-view-home.on,
html.spartan-shell #spartan-view-guest.on,
html.spartan-shell #spartan-view-salas.on {
  align-items: center !important;
  justify-content: center !important;
  padding: 1rem 1rem 5rem;
  overflow: hidden;
}

html.spartan-shell #spartan-view-home .home,
html.spartan-shell #spartan-view-guest .home,
html.spartan-shell #spartan-view-salas .home {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  flex-shrink: 0;
  align-self: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

html.spartan-shell #spartan-view-salas .home.salas-page {
  width: min(640px, 94vw);
  max-width: 640px;
  max-height: calc(100dvh - 6rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Sala/servidor: trilhos + palco da call (iframe) */
html.spartan-shell #spartan-view-room.on {
  flex: 1 1 auto;
  flex-direction: row;
  min-height: 0;
}

html.spartan-shell.spartan-in-room {
  overflow: hidden;
  height: 100%;
  height: 100dvh;
}

html.spartan-shell.spartan-in-room body {
  overflow: hidden;
  height: 100%;
  height: 100dvh;
}

html.spartan-shell.spartan-in-room #spartan-shell-root {
  height: 100%;
  height: 100dvh;
  min-height: 0;
}

html.spartan-shell.spartan-in-room #spartan-view-room.on {
  min-height: 100vh;
  min-height: 100dvh;
  height: 100%;
  height: 100dvh;
}

#spartan-guild-rail {
  flex: 0 0 56px;
  width: 56px;
  background: #111;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.25rem;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  border-right: 1px solid #2a2a2a;
}
#spartan-guild-rail::-webkit-scrollbar { display: none; width: 0; height: 0; }

.spartan-guild-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 14px;
  background: #33363d;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  flex: 0 0 auto;
}

.spartan-guild-btn.on {
  background: #dc2626;
  border-radius: 14px;
}
.spartan-guild-btn.muted { opacity: .72; }
.spartan-guild-btn.unread::after,
.spartan-guild-btn.unread-quiet::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #111214;
}
.spartan-guild-btn.unread::after { background: #eab308; }
.spartan-guild-btn.unread-quiet::after { background: #9ca3af; }
.spartan-guild-btn.has-photo,
.spartan-guild-btn.has-video,
#spartan-user-avatar.has-photo,
.spartan-chan-avatar.has-photo,
.spartan-people-av.has-photo,
#spartan-shell-avatar-preview.has-photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
}
.spartan-guild-btn.has-photo,
.spartan-guild-btn.has-video { background-color: #33363d; }
.spartan-guild-btn.on.has-photo,
.spartan-guild-btn.on.has-video {
  background-color: #33363d;
  box-shadow: 0 0 0 2px #dc2626;
}
.spartan-guild-btn.has-video,
.server-card-icon.has-video {
  position: relative;
  overflow: hidden;
}
.spartan-icon-vid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  pointer-events: none;
}

#spartan-channel-rail {
  flex: 0 0 220px;
  width: 220px;
  background: #1e1f22;
  color: #fff;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid #2a2a2a;
}

#spartan-server-title {
  margin: 0;
  padding: 0.85rem 0.9rem 0.4rem;
  font-size: 1rem;
  color: #fff;
}

#spartan-channel-list {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  padding: 0.3rem 0.55rem 1rem;
}

.spartan-chan-cat h3 {
  margin: 0.7rem 0.35rem 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b5bac1;
}

.spartan-chan-btn {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  text-align: left;
  border: 0;
  background: transparent;
  color: #dbdee1;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
}

.spartan-chan-btn.on {
  background: #33363d;
  color: #fff;
}
.spartan-chan-btn.unread { color: #facc15; font-weight: 800; }

#spartan-channel-hint {
  color: #f87171;
  font-size: 0.8rem;
  padding: 0 0.8rem 0.8rem;
}

#spartan-room-stage {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  position: relative;
  background: #313338;
}

#spartan-leave-call {
  position: absolute;
  top: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  background: #111;
  color: #fff;
  border: 1px solid #dc2626;
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

#spartan-room-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100% !important;
  height: 100% !important;
  min-width: 0;
  min-height: 0;
  border: 0;
  display: block;
  background: #313338;
}

#spartan-room-frame[hidden],
#spartan-text-pane[hidden],
#spartan-leave-call[hidden] {
  display: none !important;
}

#spartan-switch-ask {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.62);
}
#spartan-switch-ask[hidden],
#spartan-leave-ask[hidden],
#spartan-invite-ask[hidden],
#spartan-entrance-trim[hidden] {
  display: none !important;
}
#spartan-invite-ask,
#spartan-leave-ask,
#spartan-entrance-trim {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.72);
}
.spartan-entrance-card {
  width: min(560px, 94vw);
  background: #121316;
  border: 1px solid #dc2626;
  border-radius: 16px;
  padding: 1.35rem 1.35rem 1.2rem;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
  text-align: left;
  color: #e8eaed;
}
#spartan-entrance-title {
  margin: 0 0 0.45rem;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}
.spartan-entrance-lead {
  margin: 0 0 1rem;
  color: #b8bcc4;
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: center;
}
.spartan-entrance-wave-wrap {
  position: relative;
  width: 100%;
  height: 140px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #1a1c20 0%, #0d0e10 100%);
  border: 1px solid #33363d;
  touch-action: none;
  user-select: none;
}
#spartan-entrance-wave {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}
.spartan-entrance-sel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 40%;
  background: rgba(220, 38, 38, 0.22);
  border-left: 2px solid #dc2626;
  border-right: 2px solid #dc2626;
  box-sizing: border-box;
  pointer-events: auto;
  cursor: grab;
}
.spartan-entrance-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14px;
  padding: 0;
  border: none;
  background: #dc2626;
  cursor: ew-resize;
  pointer-events: auto;
  z-index: 2;
}
.spartan-entrance-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 28px;
  margin: -14px 0 0 -1.5px;
  border-radius: 2px;
  background: #fff;
  opacity: 0.9;
}
.spartan-entrance-handle.left { left: -7px; border-radius: 6px 0 0 6px; }
.spartan-entrance-handle.right { right: -7px; border-radius: 0 6px 6px 0; }
.spartan-entrance-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #fbbf24;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.7);
  pointer-events: none;
  z-index: 3;
}
.spartan-entrance-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.85rem 0 1rem;
  flex-wrap: wrap;
}
.spartan-entrance-play {
  border: none;
  border-radius: 10px;
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  background: #33363d;
  color: #fff;
}
.spartan-entrance-play:hover { background: #454851; }
.spartan-entrance-play.is-playing { background: #dc2626; }
#spartan-entrance-trim-hint {
  margin: 0;
  color: #c4c8d0;
  font-size: 0.9rem;
  font-weight: 600;
  flex: 1;
  min-width: 10rem;
}
#spartan-entrance-cancel,
#spartan-entrance-save {
  border: none;
  border-radius: 10px;
  padding: 0.7rem 1.15rem;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}
#spartan-entrance-cancel {
  background: #3b3d44;
  color: #fff;
}
#spartan-entrance-cancel:hover { background: #4a4d55; }
#spartan-entrance-save,
.spartan-entrance-save {
  background: #dc2626;
  color: #fff;
}
#spartan-entrance-save:hover { background: #b91c1c; }
.spartan-switch-card {
  width: min(460px, 92vw);
  background: #1e1f22;
  border: 1px solid #dc2626;
  border-radius: 16px;
  padding: 1.7rem 1.55rem 1.4rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  text-align: center;
}
#spartan-switch-title,
#spartan-leave-title {
  margin: 0 0 0.75rem;
  color: #fff;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.25;
}
#spartan-switch-msg,
#spartan-leave-msg {
  margin: 0 0 1.35rem;
  color: #e8eaed;
  font-size: 1.18rem;
  line-height: 1.5;
  font-weight: 500;
}
.spartan-switch-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
#spartan-switch-stay,
#spartan-switch-go {
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  font-size: 1.08rem;
  font-weight: 800;
  cursor: pointer;
}
#spartan-switch-stay {
  background: #3b3d44;
  color: #fff;
}
#spartan-switch-stay:hover {
  background: #4a4d55;
}
#spartan-switch-go {
  background: #dc2626;
  color: #fff;
}
#spartan-switch-go:hover {
  background: #b91c1c;
}

#spartan-text-pane {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: auto !important;
  max-width: none !important;
  background: #2b2d31;
  color: #fff;
}

#spartan-text-title {
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
}

#spartan-text-log {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0.8rem 1rem;
}

#spartan-text-log p {
  margin: 0 0 0.45rem;
}

#spartan-text-form {
  display: flex;
  gap: 0.4rem;
  padding: 0.7rem;
  border-top: 1px solid #3f4147;
  flex-shrink: 0;
}

#spartan-text-input {
  flex: 1;
  background: #1e1f22;
  color: #fff;
  border: 1px solid #7f1d1d;
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
}

#spartan-text-form button {
  background: #dc2626;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}
#spartan-text-attach {
  background: #4e5058;
  color: #fff;
}
#spartan-text-log .spartan-chat-img,
#spartan-text-log .spartan-chat-vid {
  display: block;
  width: 240px;
  height: 160px;
  max-width: 100%;
  object-fit: cover;
  margin-top: 0.4rem;
  border-radius: 8px;
  background: #1e1f22;
  cursor: pointer;
}
#spartan-text-log .spartan-chat-vid-wrap {
  position: relative;
  display: block;
  width: 240px;
  max-width: 100%;
  margin-top: 0.4rem;
  cursor: pointer;
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 8px;
}
#spartan-text-log .spartan-chat-vid-wrap .spartan-chat-vid {
  width: 100%;
  height: 160px;
  margin-top: 0;
  pointer-events: none;
}
.spartan-chat-vid-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.94);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.spartan-chat-vid-play svg { width: 22px; height: 22px; display: block; margin-left: 2px; }
.spartan-wave {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(100%, 420px);
  margin-top: 0.45rem;
  padding: 6px 8px;
  background: #1e1f22;
  border: 1px solid #3f4147;
  border-radius: 12px;
  box-sizing: border-box;
}
.spartan-wave audio { display: none !important; }
.spartan-wave-play,
.spartan-wave-dl {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
}
.spartan-wave-play {
  border: 0;
  background: #dc2626;
  cursor: pointer;
  padding: 0;
}
.spartan-wave-play svg { width: 16px; height: 16px; display: block; margin-left: 2px; }
.spartan-wave-play.is-on svg { margin-left: 0; }
.spartan-wave-dl {
  background: #3f4147;
}
.spartan-wave-dl svg { width: 16px; height: 16px; display: block; }
.spartan-wave-canvas {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  cursor: pointer;
  display: block;
}
#spartan-player {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  box-sizing: border-box;
}
#spartan-player[hidden] { display: none !important; }
.spartan-player-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(920px, calc(100vw - 2.4rem));
  max-height: calc(100dvh - 2.4rem);
  margin: 0 auto;
  background: #1a1b1e;
  border-radius: 14px;
  padding: 12px;
  box-sizing: border-box;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
.spartan-player-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: min(68vh, calc(100dvh - 9.5rem));
  min-height: 160px;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}
.spartan-player-vid {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
}
.spartan-player-card .spartan-wave {
  width: 100%;
  max-width: none;
  margin-top: 10px;
}
.spartan-player-close {
  position: absolute;
  top: -0.6rem;
  right: -0.6rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

#spartan-media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  background: rgba(0,0,0,0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
#spartan-media-lightbox[hidden] {
  display: none !important;
}
.spartan-media-lightbox-inner {
  position: relative;
  max-width: min(92vw, 960px);
  max-height: 90vh;
}
.spartan-media-lightbox-inner img,
.spartan-media-lightbox-inner video {
  display: block;
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 10px;
  background: #111;
}
.spartan-media-lightbox-inner video[hidden],
.spartan-media-lightbox-inner img[hidden] {
  display: none !important;
}
.spartan-media-lightbox-close {
  position: absolute;
  top: -0.6rem;
  right: -0.6rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

#spartan-server-people {
  flex: 0 0 248px;
  width: 248px;
  background: #2b2d31;
  color: #fff;
  overflow-y: auto;
  border-left: 1px solid #2a2a2a;
}

#spartan-server-people h3 {
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  color: #fff;
  text-align: center;
}

.spartan-people-sec {
  margin: 0.4rem 0.55rem 0.15rem;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b5bac1;
  text-align: left;
}
.spartan-people-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 0.45rem;
  margin: 0.12rem 0.45rem;
  padding: 0.28rem 0.4rem;
  background: #1e1f22;
  border: 1px solid #3f4147;
  border-radius: 8px;
}
.spartan-people-av {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
}
.spartan-people-card strong {
  display: block;
  flex: 1;
  min-width: 0;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
  color: #fff;
  background: none;
  padding: 0;
  font-weight: 600;
  font-size: 0.84rem;
}
.spartan-people-card span {
  color: #b5bac1;
  font-size: 0.75rem;
}
.spartan-people-card.off {
  opacity: 0.65;
}
.spartan-people-card.off .spartan-people-av {
  background: #4a4d55;
}
.spartan-people-card.off strong {
  color: #9aa0a6;
}
.spartan-people-empty {
  text-align: center;
  padding: 0.5rem 0.9rem;
  color: #b5bac1;
  font-size: 0.78rem;
}
html:not(.spartan-in-room) #spartan-people-strip,
html:not(.spartan-in-room) #spartan-server-people {
  display: none !important;
}

.spartan-invite-form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.9rem 0 0;
  width: min(280px, 90%);
}

.spartan-invite-label {
  margin: 0;
  color: #fff;
  font-weight: 700;
}

.spartan-invite-form input {
  background: #1e1f22;
  color: #fff;
  border: 1px solid #7f1d1d;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
}

.spartan-invite-btn {
  background: #33363d;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  font-weight: 700;
}

.spartan-invite-msg {
  min-height: 1.2em;
  margin: 0;
  color: #fecaca;
  font-size: 0.85rem;
}

.spartan-chan-tools {
  margin-top: 0.8rem;
  padding-top: 0.6rem;
  border-top: 1px solid #2a2a2a;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.spartan-chan-tools input,
.spartan-chan-tools select {
  background: #111;
  color: #fff;
  border: 1px solid #7f1d1d;
  border-radius: 6px;
  padding: 0.35rem 0.45rem;
}

.spartan-chan-tools button {
  background: #16a34a;
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  font-weight: 700;
}
.spartan-chan-tools button.okbtn { background: #16a34a; }

.spartan-invite-copy {
  margin: 0.3rem 0 0;
  color: #86efac;
  font-size: 0.78rem;
  word-break: break-all;
}

@media (max-width: 820px) {
  #spartan-channel-rail { flex-basis: 180px; width: 180px; }
}

html.spartan-shell #spartan-view-home.on footer.signature,
html.spartan-shell #spartan-view-salas.on footer.signature {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
}

#spartan-admin-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #0d0d0f;
  overflow: hidden;
}

#spartan-admin-overlay[hidden] {
  display: none !important;
}

#spartan-admin-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  background: #dc2626;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.45rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.45);
}

#spartan-admin-frame {
  position: absolute;
  inset: 0;
  border: 0;
  width: 100%;
  height: 100%;
  background: #0d0d0f;
}

html.spartan-shell .spartan-ff-card {
  width: 100%;
  max-width: 100%;
  margin: 0.15rem auto 1rem;
  box-sizing: border-box;
  background: #141416 !important;
  color: #fff !important;
  border: 1px solid #dc2626 !important;
  border-radius: 12px;
  padding: 0.9rem 1rem 0.85rem;
  text-align: left !important;
}
html.spartan-shell .spartan-ff-card[hidden] { display: none !important; }
html.spartan-shell .spartan-ff-card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff !important;
  text-align: left !important;
}
html.spartan-shell .spartan-ff-card p {
  margin: 0 0 0.55rem;
  color: #e8eaed !important;
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: left !important;
}
html.spartan-shell .spartan-ff-card button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-height: 0 !important;
  margin: 0.25rem 0 0 !important;
  background: #dc2626 !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 8px !important;
  padding: 0.45rem 1rem !important;
  font-weight: 700;
  cursor: pointer;
}
html.spartan-shell .spartan-ff-card button:hover { background: #b91c1c !important; }

/* Fluxer — camadas de cinza */
html.spartan-shell #spartan-view-guest.on {
  align-items: center !important;
  justify-content: center !important;
  padding: 1rem 1rem 5rem;
}

.spartan-login-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  width: 100%;
  max-width: 22rem;
  margin: 0.6rem auto 0;
  text-align: left;
  align-self: center;
}

.spartan-login-form label {
  color: #fff;
  font-size: 0.85rem;
}

.spartan-login-form input {
  width: 100%;
  box-sizing: border-box;
  background: #1e1f22;
  color: #fff;
  border: 1px solid #7f1d1d;
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
}

.spartan-login-form label.spartan-remember {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0.35rem 0 0.1rem;
}

.spartan-login-form label.spartan-remember input {
  width: 16px;
  height: 16px;
  flex: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 3px;
}

.spartan-login-form .spartan-btn {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.spartan-guest-link {
  display: inline-block;
  margin-top: 0.85rem;
  color: #fecaca;
  font-weight: 700;
  text-align: center;
}

#spartan-guild-rail { background: #1e1f22; border-right: 1px solid #111; }
#spartan-channel-rail { background: #2b2d31; border-right: 1px solid #1e1f22; }
#spartan-server-people { background: #2b2d31; border-left: 1px solid #1e1f22; }
#spartan-room-stage { background: #313338; flex-direction: column; }
#spartan-room-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100% !important;
  height: 100% !important;
  min-width: 0;
  min-height: 0;
}
#spartan-text-pane {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  width: auto !important;
  max-width: none !important;
  flex: none !important;
  background: #313338;
  border: 0;
}
html.spartan-settings-up #spartan-room-frame {
  z-index: 50;
}
html.spartan-settings-up #spartan-text-pane {
  z-index: 1;
}
#spartan-user-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.4rem;
  margin: 0.4rem;
  padding: 0.45rem;
  background: #232428;
  border-radius: 8px;
  flex: 0 0 auto;
}
#spartan-user-bar[hidden] { display: none !important; }
.spartan-user-who {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex: 1 1 auto;
}
#spartan-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  flex: 0 0 auto;
}
.spartan-user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
#spartan-user-nick {
  color: #f2f3f5;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
}
#spartan-user-voice {
  color: #23a559;
  font-size: 0.68rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spartan-user-acts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.15rem;
  flex: 0 0 auto;
}
.spartan-user-acts button {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #b5bac1;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.spartan-user-acts button:hover { background: #3b3d44; color: #fff; }
.spartan-user-acts button.on { color: #23a559; }
.spartan-user-acts button.off { color: #ed4245; }
.spartan-user-acts svg { width: 18px; height: 18px; display: block; }
.spartan-chan-row { margin: 0 0 0.15rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.1rem; }
.spartan-chan-grip {
  flex: 0 0 auto;
  cursor: grab;
  color: #b5bac1;
  font-size: 0.9rem;
  letter-spacing: -0.12em;
  padding: 0.2rem 0.15rem;
  user-select: none;
}
.spartan-chan-grip:active { cursor: grabbing; }
.spartan-chan-row.dragging { opacity: 0.55; }
.spartan-chan-btn.live { color: #23a559; }
.spartan-chan-user {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 100%;
  box-sizing: border-box;
  width: auto;
  max-width: 100%;
  min-width: 0;
  margin: 0.12rem 0.1rem 0.12rem 0.45rem;
  text-align: left;
  border: 2px solid #6b7078;
  background: transparent;
  color: #dbdee1;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.15rem 0.35rem 0.15rem 0.2rem;
  border-radius: 6px;
  overflow: visible;
}
.spartan-chan-user.mute-edge-local {
  border-color: #ea580c;
}
.spartan-chan-user.mute-edge-toward {
  border-color: #2563eb;
}
.spartan-chan-user.mute-edge-both {
  border-color: transparent;
  background:
    linear-gradient(#2b2d31, #2b2d31) padding-box,
    linear-gradient(90deg, #ea580c 0 50%, #2563eb 50% 100%) border-box;
}
.spartan-user-lives {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0.2rem 0 0 0;
  padding-left: 1.7rem;
  box-sizing: border-box;
}
.spartan-user-lives[hidden] { display: none !important; }
.spartan-user-lives .user-live-btn {
  flex: 1 1 calc(50% - 6px);
  min-width: 4.2rem;
}
.spartan-live-flag {
  flex: 0 0 auto;
  margin-left: auto;
  width: 14px;
  height: 14px;
  color: #16a34a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.spartan-live-flag svg {
  width: 14px;
  height: 14px;
  display: block;
}
#spartan-user-audio-pop .spartan-pop-lives {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  width: 100%;
}
#spartan-user-audio-pop .spartan-pop-lives[hidden] {
  display: none !important;
}
#spartan-user-audio-pop .user-live-btn {
  flex: 0 0 auto;
  min-width: 0;
  max-width: none;
  width: auto;
  box-sizing: border-box;
  background: #16a34a;
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
#spartan-user-audio-pop .user-live-btn.on {
  outline: 2px solid #fff;
  outline-offset: 1px;
}
#spartan-user-audio-pop {
  position: fixed;
  z-index: 9600;
  width: min(240px, calc(100vw - 16px));
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0.7rem 0.75rem 0.75rem;
  background: #121316;
  border: 1px solid #7f1d1d;
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  color: #e8eaed;
  pointer-events: auto;
}
#spartan-user-audio-pop[hidden] {
  display: none !important;
}
#spartan-user-audio-pop .spartan-user-audio-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.1rem;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
}
.spartan-chan-user.vol-open {
  background: #35373c;
}
#spartan-user-audio-pop .user-mute-btn {
  flex: 0 0 auto;
  width: 100%;
  background: #3f4147;
  color: #e5e7eb;
  border: 0;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
#spartan-user-audio-pop .user-mute-btn.mute-local {
  background: #ea580c;
  color: #111;
}
#spartan-user-audio-pop .user-mute-btn.mute-remote,
#spartan-user-audio-pop .user-mute-btn.on {
  background: #dc2626;
  color: #fff;
}
#spartan-user-audio-pop .user-mute-btn.mute-both {
  background: linear-gradient(90deg, #eab308 0 50%, #dc2626 50% 100%);
  color: #111;
  text-shadow: 0 0 2px #fff;
}
#spartan-user-audio-pop .user-mute-btn.mute-toward {
  background: #2563eb;
  color: #fff;
}
#spartan-user-audio-pop .user-mute-btn.mute-local-toward {
  background: linear-gradient(90deg, #eab308 0 50%, #2563eb 50% 100%);
  color: #111;
  text-shadow: 0 0 2px #fff;
}
#spartan-user-audio-pop .user-mute-btn.mute-remote-toward {
  background: linear-gradient(90deg, #dc2626 0 50%, #2563eb 50% 100%);
  color: #fff;
}
#spartan-user-audio-pop .user-mute-btn.mute-all {
  background: linear-gradient(90deg, #eab308 0 33%, #dc2626 33% 66%, #2563eb 66% 100%);
  color: #111;
  text-shadow: 0 0 2px #fff;
}
#spartan-user-audio-pop .user-mute-for-btn {
  flex: 0 0 auto;
  width: 100%;
  background: #3f4147;
  color: #e5e7eb;
  border: 0;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
#spartan-user-audio-pop .user-mute-for-btn.on {
  background: #2563eb;
  color: #fff;
}
#spartan-user-audio-pop .user-vol-slider {
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  height: 1.1rem;
  margin: 0;
  padding: 0;
  accent-color: #dc2626;
  cursor: pointer;
  box-sizing: border-box;
}
#spartan-user-audio-pop .user-vol-lab {
  flex: 0 0 auto;
  width: 100%;
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #dbdee1;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.spartan-chan-user:hover { background: #35373c; }
.spartan-chan-user.mute-edge-both:hover,
.spartan-chan-user.mute-edge-both.vol-open {
  background:
    linear-gradient(#35373c, #35373c) padding-box,
    linear-gradient(90deg, #ea580c 0 50%, #2563eb 50% 100%) border-box;
}
.spartan-chan-ident {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  flex: 1 1 auto;
}
.spartan-chan-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  flex: 0 0 auto;
}
.spartan-talk-dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6b7280;
}
.spartan-chan-user.user-talk-idle .spartan-talk-dot {
  background: #eab308;
  box-shadow: 0 0 6px #eab308;
}
.spartan-chan-user.user-talk-on .spartan-talk-dot {
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}
.spartan-chan-user.user-talk-muted .spartan-talk-dot {
  background: #dc2626;
  box-shadow: 0 0 6px #dc2626;
}
.spartan-chan-nick {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}
.spartan-chan-user .spartan-chan-ident,
.spartan-chan-user .spartan-talk-dot,
.spartan-chan-user .spartan-chan-nick,
.spartan-chan-user .spartan-live-flag {
  pointer-events: none;
}
.spartan-chan-user .spartan-chan-avatar {
  pointer-events: auto;
}
.spartan-chan-row.drop { outline: 1px dashed #dc2626; }
.spartan-text-head, .spartan-people-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
  padding: 0.55rem 0.8rem 0.2rem;
}
.spartan-people-head {
  padding: 0.7rem 0.7rem 0.25rem;
}
.spartan-text-head h3, .spartan-people-head h3 {
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spartan-text-head button, .spartan-people-head button {
  flex: 0 0 auto;
  white-space: nowrap;
  background: #1e1f22;
  color: #dbdee1;
  border: 0;
  border-radius: 6px;
  padding: 0.28rem 0.5rem;
  cursor: pointer;
  font-size: 0.75rem;
}
html.spartan-people-collapsed #spartan-server-people { display: none !important; }
html:not(.spartan-people-collapsed) #spartan-people-strip { display: none !important; }
#spartan-people-strip {
  flex: 0 0 32px;
  width: 32px;
  background: #2b2d31;
  border-left: 1px solid #1e1f22;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0.4rem 0.1rem;
}
#spartan-people-show {
  width: 24px;
  height: 24px;
  background: transparent;
  color: #b5bac1;
  border: 0;
  border-radius: 6px;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
#spartan-people-show svg { width: 16px; height: 16px; display: block; }
#spartan-people-show:hover { color: #fff; background: #3b3d44; }
#spartan-text-show {
  position: fixed;
  z-index: 40;
  bottom: 0.85rem;
  right: 0.85rem;
  background: #eab308;
  color: #111;
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,.4);
}
#spartan-text-show[hidden] { display: none !important; }
#spartan-text-badge { display: none !important; }
#spartan-text-pane[hidden] { display: none !important; }
#spartan-room-frame[hidden] { display: none !important; }

#spartan-first-modal,#spartan-chpw-modal { z-index: 11050; }
#spartan-shell-settings {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
#spartan-shell-settings[hidden] { display: none !important; }
.spartan-shell-settings-card {
  width: max-content;
  max-width: min(22rem, calc(100vw - 2rem));
  height: auto;
  background: #1e1f22;
  color: #f2f3f5;
  border-radius: 12px;
  padding: 0.9rem 1rem 1rem;
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}
.spartan-shell-settings-card h2 { margin: 0 0 .8rem; font-size: 1.15rem; color: #fff; }
.spartan-shell-avatar-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 0.85rem;
}
#spartan-shell-avatar-preview {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.35rem;
  flex: 0 0 auto;
}
.spartan-shell-avatar-meta { min-width: 0; flex: 1; }
.spartan-shell-avatar-meta label { display: block; margin: 0 0 .3rem; }
#spartan-shell-avatar-pick,
#spartan-shell-entrance-pick,
#spartan-shell-entrance-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 11.5rem;
  width: 11.5rem;
  border: 0;
  border-radius: 8px;
  padding: .45rem .7rem;
  cursor: pointer;
  font-weight: 700;
  font-size: .9rem;
  line-height: 1.2;
  background: #2563eb;
  color: #fff;
}
#spartan-shell-entrance-pick,
#spartan-shell-entrance-reset {
  margin-top: .4rem;
}
#spartan-shell-entrance-reset {
  background: #44484f;
  color: #fff;
}
#spartan-shell-avatar-pick:hover,
#spartan-shell-entrance-pick:hover {
  background: #1d4ed8;
}
#spartan-shell-entrance-reset:hover {
  background: #555a63;
}
#spartan-shell-entrance-reset[hidden] {
  display: none !important;
}
#spartan-shell-avatar-hint,
#spartan-shell-entrance-hint,
.spartan-shell-file-hint {
  margin: .35rem 0 0;
  color: #f87171;
  font-size: .78rem;
  line-height: 1.3;
}
#spartan-shell-avatar-hint[hidden],
#spartan-shell-entrance-hint[hidden] {
  display: none !important;
}
.spartan-shell-settings-card label, .spartan-shell-settings-card legend { color: #fff; }
.spartan-shell-settings-card select {
  width: 100%;
  min-width: 16rem;
  margin: .25rem 0 .7rem;
  background: #111214;
  color: #fff;
  border: 1px solid #3b3d44;
  border-radius: 8px;
  padding: .4rem .5rem;
}
.spartan-shell-sounds {
  border: 1px solid #3b3d44;
  border-radius: 8px;
  padding: .5rem .7rem .6rem;
  margin: 0 0 .8rem;
}
.spartan-shell-sounds label { display: flex; gap: .45rem; align-items: center; margin: .25rem 0; }
.spartan-shell-settings-acts { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .7rem; }
.spartan-shell-settings-acts button, #spartan-shell-settings-close {
  border: 0;
  border-radius: 8px;
  padding: .45rem .75rem;
  cursor: pointer;
  font-weight: 700;
}
#spartan-shell-chpw { background: #16a34a; color: #fff; }
#spartan-shell-leave { background: #b91c1c; color: #fff; }
#spartan-shell-admin { background: #dc2626; color: #fff; }
#spartan-shell-admin[hidden] { display: none !important; }
#spartan-shell-settings-close { background: #3b3d44; color: #fff; }
.spartan-shell-settings-foot { display: flex; align-items: center; gap: .4rem; }
.spartan-shell-app {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  padding: .45rem .75rem;
  font-weight: 700;
  line-height: 1;
}
.spartan-shell-app:hover { background: #1d4ed8; color: #fff; }

/* Toast simples: foto / som aplicados */
#spartan-shell-toast{
  position:fixed;left:50%;bottom:28px;transform:translateX(-50%);
  z-index:12000;max-width:min(420px,92vw);
  padding:12px 18px;border-radius:10px;
  background:#111;color:#fff;border:1px solid #dc2626;
  font:600 14px/1.35 system-ui,Segoe UI,sans-serif;
  box-shadow:0 8px 28px rgba(0,0,0,.45);
  pointer-events:none;
}
#spartan-shell-toast[hidden]{display:none!important;}
