#page.ux-fe {
  max-width: none;
  padding: 16px 20px 40px;
}

.fe-lab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: start;
}

.fe-stage {
  position: relative;
  min-height: 640px;
  height: min(72vh, 760px);
  background: #050302;
  border: 1px solid #3a2214;
  overflow: hidden;
  color: #f4e8d8;
}

.fe-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 70%, rgba(232, 90, 26, 0.16), transparent 55%),
    #050302;
}

.fe-fire {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 220px;
  height: 280px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.9;
}

.fe-fire img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 14px rgba(232, 90, 26, 0.55));
}
/* Intro uses stacked brand in .fe-intro-brand; hide the absolute mark so text is not over it. */
.fe-stage[data-screen="intro"] .fe-fire {
  display: none;
}
.fe-stage[data-screen="main"] .fe-fire,
.fe-stage[data-screen="mode"] .fe-fire {
  animation: fe-burn 1.8s ease-in-out infinite;
}

@keyframes fe-glow {
  0%, 100% { filter: drop-shadow(0 0 6px #e85a1a); opacity: 0.7; }
  50% { filter: drop-shadow(0 0 22px #f0b446); opacity: 1; }
}
@keyframes fe-burn {
  0%, 100% { transform: translate(-50%, -50%) scale(1); filter: saturate(1); }
  50% { transform: translate(-50%, -52%) scale(1.04); filter: saturate(1.25); }
}

.fe-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.fe-screen[hidden] { display: none !important; }

.fe-intro-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}
.fe-intro-mark {
  width: 180px;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(232, 90, 26, 0.55));
  animation: fe-glow 3.2s ease-in-out infinite;
}

.fe-pillar {
  width: min(360px, 86%);
  background: rgba(18, 8, 4, 0.78);
  border: 1px solid #6a3a1c;
  border-radius: 28px;
  padding: 28px 22px 18px;
  text-align: center;
}
.fe-logo {
  margin: 0;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
}
.fe-pillar .fe-logo {
  margin: 0 0 18px;
}
.fe-logo strong {
  display: block;
  font-size: 22px;
  color: #f4e8d8;
}
.fe-logo span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #e85a1a;
  letter-spacing: 0.28em;
}

.fe-btn,
.fe-lab button.fe-btn {
  display: block;
  width: 100%;
  margin: 8px 0;
  padding: 12px 14px;
  border: 1px solid #8a4a22;
  border-radius: 10px;
  background: rgba(232, 90, 26, 0.14);
  color: #f4e8d8;
  font: 650 13px/1 "Segoe UI", "Bahnschrift", system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}
.fe-btn:hover, .fe-btn:focus {
  border-color: #e85a1a;
  background: rgba(232, 90, 26, 0.28);
  outline: none;
}
.fe-btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}
.fe-btn.ghost {
  background: transparent;
  border-color: #4a3428;
  color: #c8b4a4;
}
.fe-btn.danger { border-color: #c42a2a; color: #f0c0c0; }
.fe-btn.primary { background: rgba(232, 90, 26, 0.32); }

.fe-meta {
  position: absolute;
  left: 14px;
  bottom: 10px;
  z-index: 3;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #8a9aa8;
  text-transform: uppercase;
}

.fe-skip {
  position: absolute;
  right: 16px;
  bottom: 12px;
  z-index: 3;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #c8b4a4;
  text-transform: uppercase;
}

.fe-panel {
  width: min(820px, 92%);
  max-height: 92%;
  overflow: auto;
  background: rgba(12, 6, 4, 0.88);
  border: 1px solid #6a3a1c;
  border-radius: 16px;
  padding: 20px 22px;
}
.fe-panel h2 {
  margin: 0 0 12px;
  font-size: 16px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e8b44a;
}
.fe-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.fe-row .fe-btn { width: auto; min-width: 140px; }

.fe-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.fe-mode {
  text-align: left;
  padding: 18px;
  border: 1px solid #6a3a1c;
  background: rgba(232, 90, 26, 0.08);
  color: inherit;
  cursor: pointer;
  border-radius: 12px;
}
.fe-mode:hover, .fe-mode:focus { border-color: #e85a1a; outline: none; }
.fe-mode h3 {
  margin: 0 0 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f4e8d8;
}
.fe-mode p { margin: 0; color: #c8b4a4; font-size: 13px; }
.fe-fine { margin: 14px 0 0; color: #8a9aa8; font-size: 12px; }

.fe-field { display: block; margin: 10px 0; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #c8b4a4; }
.fe-field input, .fe-field select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  background: #120806;
  border: 1px solid #6a3a1c;
  color: #f4e8d8;
  font: 14px/1.3 "Segoe UI", sans-serif;
  text-transform: none;
  letter-spacing: 0;
}
.fe-check { display: flex; align-items: center; gap: 8px; margin: 8px 0; color: #c8b4a4; font-size: 13px; }
.fe-warn { color: #e8b44a; font-size: 12px; }

.fe-char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.fe-char {
  text-align: left;
  padding: 12px;
  border: 1px solid #4a3428;
  background: #120806;
  color: inherit;
  cursor: pointer;
  border-radius: 10px;
}
.fe-char[aria-selected="true"] { border-color: #e85a1a; background: rgba(232, 90, 26, 0.16); }
.fe-char b { display: block; letter-spacing: 0.08em; text-transform: uppercase; }
.fe-char small { display: block; color: #8a9aa8; margin-top: 4px; }
.fe-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 6px;
  border: 1px solid #e8b44a;
  color: #e8b44a;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.fe-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.fe-tabs button {
  border: 1px solid #4a3428;
  background: #120806;
  color: #c8b4a4;
  padding: 6px 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 11px;
  cursor: pointer;
}
.fe-tabs button[aria-selected="true"] { border-color: #e85a1a; color: #f4e8d8; }

.fe-world {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 16, 28, 0.35), rgba(5, 3, 2, 0.2)),
    #0a1210;
}
.fe-deck {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 4px;
  padding: 10px 12px;
  background: rgba(8, 4, 2, 0.72);
  border-bottom: 1px solid #3a2214;
  z-index: 4;
}
.fe-deck button {
  border: 1px solid #4a3428;
  background: transparent;
  color: #f4e8d8;
  padding: 6px 8px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.fe-deck button:hover, .fe-deck button[aria-current="true"] { border-color: #e85a1a; }
.fe-deck button[disabled] { opacity: 0.4; cursor: not-allowed; }
.fe-live {
  align-self: center;
  margin-right: 6px;
  padding: 4px 8px;
  border: 1px solid #c42a2a;
  color: #eb5f69;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.fe-live[hidden] { display: none !important; }
.fe-ft {
  display: flex;
  gap: 6px;
  margin: 8px 0 12px;
}
.fe-ft-slot {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #1d4e66;
  background: #0a1c2c;
  color: #82a8ba;
  font-size: 11px;
}
.fe-ft-slot.filled {
  border-color: #e85a1a;
  background: #1a0c06;
  color: #f4e8d8;
}
.fe-invite { margin-top: 12px; }
.fe-people {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 12px;
}
.fe-person {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid #1d4e66;
  background: #0a1c2c;
}
.fe-person.no-fav { grid-template-columns: minmax(0, 1fr) auto auto; }
.fe-person .who { min-width: 0; }
.fe-person .who strong {
  display: block;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #ecf6fa;
}
.fe-person .who small {
  display: block;
  color: #82a8ba;
  font-size: 10px;
  letter-spacing: 0.08em;
}
.fe-fav {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #2a6a88;
  background: transparent;
  color: #82a8ba;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}
.fe-fav.on {
  border-color: #f0b446;
  color: #f0b446;
  background: #1a1408;
}
.fe-person .fe-btn { padding: 4px 10px; font-size: 11px; }

.fe-map-wrap {
  display: grid;
  grid-template-columns: 240px 1fr;
  height: 100%;
  padding-top: 48px;
}
.fe-ops { padding: 12px; overflow: auto; border-right: 1px solid #3a2214; }
.fe-ops button {
  display: block;
  width: 100%;
  text-align: left;
  margin: 0 0 6px;
  padding: 8px;
  border: 1px solid #4a3428;
  background: #120806;
  color: #f4e8d8;
  cursor: pointer;
}
.fe-ops button[aria-selected="true"] { border-color: #e8b44a; }
.fe-ops .tag { float: right; font-size: 10px; letter-spacing: 0.12em; color: #e85a1a; }
.fe-ops .tag.vault { color: #8b6cff; }
.fe-ops .tag.obj { color: #5adceb; }
.fe-ops small {
  display: block;
  color: #82a8ba;
  font-size: 10px;
  letter-spacing: 0.04em;
}
.fe-ops .fe-btn { width: 100%; margin-top: 10px; }

.fe-map-kicker {
  position: relative;
  z-index: 3;
  margin: 52px 0 0 16px;
  color: #5adceb;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
}

.fe-topo {
  position: relative;
  margin: 12px auto;
  width: min(420px, 90%);
  height: 280px;
  background:
    radial-gradient(ellipse at 40% 45%, #143028, #071018 72%);
  border: 1px solid #2a6a88;
  overflow: hidden;
}
.fe-topo::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(42, 106, 136, 0.45);
  border-radius: 50%;
  pointer-events: none;
}
.fe-you {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #5adceb;
  font-size: 10px;
  letter-spacing: 0.16em;
  pointer-events: none;
}
.fe-mark.object {
  border-radius: 2px;
  border-color: #5adceb;
  width: 12px;
  height: 12px;
}

.fe-wp {
  position: relative;
  z-index: 3;
  margin: 0 auto 16px;
  padding: 0;
  border: none;
  background: transparent;
  text-align: center;
  min-width: 0;
}
.fe-wp-pip {
  display: block;
  width: 10px;
  height: 10px;
  margin: 0 auto 6px;
  border: 2px solid #f0b446;
  transform: rotate(45deg);
  background: transparent;
}
.fe-wp b { display: none; color: #f0b446; letter-spacing: 0.08em; font-size: 12px; }
.fe-wp span { display: none; color: #5adceb; font-size: 13px; }
.fe-wp.ping b,
.fe-wp.ping span { display: block; }
.fe-wp.ping {
  animation: fe-wp-ping 0.8s ease-out 2;
}
.fe-wp-rim {
  position: absolute;
  left: 14px;
  top: 48%;
  width: 3px;
  height: 12px;
  background: #f0b446;
  border: none;
  z-index: 4;
}
.fe-wp-rim.ping { filter: drop-shadow(0 0 6px #f0b446); }
@keyframes fe-wp-ping {
  from { box-shadow: 0 0 0 0 rgba(240, 180, 70, 0.8); }
  to { box-shadow: 0 0 0 16px rgba(240, 180, 70, 0); }
}

.fe-globe {
  position: relative;
  margin: 28px auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3a5a48, #142018 70%);
  box-shadow: 0 0 0 14px rgba(232, 180, 70, 0.12), 0 0 0 18px rgba(232, 180, 70, 0.28);
}
.fe-mark {
  position: absolute;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  border: 2px solid #e8b44a;
  background: #120806;
}
.fe-mark.story { transform: translate(-50%, -50%) rotate(45deg); }
.fe-mark.side { border-radius: 50%; border-color: #5adceb; }
.fe-mark.task { transform: translate(-50%, -50%) rotate(45deg); border-color: #f0b446; }
.fe-mark.raid {
  width: 18px;
  height: 18px;
  border-color: #c42a2a;
  clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%);
  animation: fe-spin 6s linear infinite;
}
.fe-mark.vault {
  width: 0;
  height: 0;
  border: 0;
  background: transparent;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 14px solid #8b6cff;
}
.fe-mark.soloops { border-radius: 2px; border-color: #8a9aa8; }
.fe-mark.on {
  box-shadow: 0 0 12px #e8b44a;
  outline: 2px solid #e8b44a;
}

@keyframes fe-spin { to { filter: hue-rotate(12deg); } }

.fe-pause {
  position: absolute;
  inset: 0;
  background: rgba(5, 3, 2, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
}
.fe-pause[hidden] { display: none !important; }

.fe-modal {
  position: absolute;
  inset: 0;
  background: rgba(5, 3, 2, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 8;
  padding: 16px;
}
.fe-modal[hidden] { display: none !important; }
.fe-modal-panel {
  max-width: 420px;
  width: 100%;
}

.fe-discord-oauth {
  border-color: #5865f2;
  max-width: 440px;
}
.fe-discord-brand {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #7289da;
}
.fe-discord-scopes {
  margin: 12px 0;
  padding-left: 1.2em;
  color: #c8b4a4;
  font-size: 13px;
  line-height: 1.5;
}
.fe-discord-card {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid #5865f2;
  border-radius: 12px;
  background: rgba(88, 101, 242, 0.1);
}
.fe-discord-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #5865f2;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
}
.fe-discord-meta { min-width: 0; }
.fe-discord-label {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a9aa8;
}
.fe-discord-name {
  margin: 0;
  font-size: 16px;
  color: #f4e8d8;
  font-weight: 600;
}
.fe-discord-user {
  margin: 4px 0 0;
  font-size: 13px;
  color: #7289da;
}
.fe-discord-eos {
  margin: 6px 0 0;
  font-size: 12px;
  color: #8a9aa8;
}

.fe-side {
  background: #0c2034;
  border: 1px solid #1d4e66;
  padding: 14px 16px;
}
.fe-side h3 {
  margin: 0 0 8px;
  color: #5adceb;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.fe-side p, .fe-side li { color: #82a8ba; font-size: 13px; line-height: 1.45; }
.fe-side ol { padding-left: 1.2em; }

@media (max-width: 980px) {
  .fe-lab { grid-template-columns: 1fr; }
  .fe-cards { grid-template-columns: 1fr; }
  .fe-map-wrap { grid-template-columns: 1fr; }
}
