@font-face {
  font-family: "Noto Sans Thai";
  src: url("/assets/NotoSansThai-Regular.ttf") format("truetype");
  font-weight: 400;
}

@font-face {
  font-family: "Noto Sans Thai";
  src: url("/assets/NotoSansThai-SemiBold.ttf") format("truetype");
  font-weight: 600;
}

@font-face {
  font-family: "Noto Sans Thai";
  src: url("/assets/NotoSansThai-Bold.ttf") format("truetype");
  font-weight: 700;
}

:root {
  color-scheme: dark;
  --ink: #f7fbff;
  --muted: #a8bed4;
  --soft: #7891aa;
  --panel: rgba(4, 19, 33, 0.84);
  --panel-strong: rgba(6, 26, 43, 0.94);
  --panel-soft: rgba(11, 39, 59, 0.72);
  --line: rgba(99, 162, 210, 0.28);
  --line-gold: rgba(238, 189, 98, 0.52);
  --gold: #f6c66b;
  --gold-deep: #b77a2b;
  --cyan: #4bd5ff;
  --blue: #2f86ff;
  --purple: #a371ff;
  --red: #ff624e;
  --green: #70f0a8;
  --shadow: rgba(0, 0, 0, 0.54);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #020911;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Noto Sans Thai", "Segoe UI", Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
  background:
    linear-gradient(180deg, rgba(3, 12, 24, 0.12) 0%, rgba(3, 8, 14, 0.9) 78%, #01060b 100%),
    url("/assets/hero-launch-v2.png") center top / cover fixed no-repeat,
    #020912;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.aether-canvas,
.scene-wash {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.aether-canvas {
  z-index: 0;
  opacity: 0.72;
}

.scene-wash {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(0, 6, 13, 0.76), rgba(3, 15, 27, 0.22) 45%, rgba(0, 5, 12, 0.84)),
    linear-gradient(180deg, rgba(5, 20, 38, 0.58), rgba(0, 5, 11, 0.84) 72%);
}

.app-shell {
  position: relative;
  z-index: 2;
  width: min(1840px, calc(100% - 34px));
  margin: 0 auto;
  padding: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 500px;
  gap: 10px;
  align-items: center;
  min-height: 80px;
  padding: 7px 8px;
  border: 1px solid rgba(73, 150, 208, 0.14);
  border-right-color: rgba(73, 150, 208, 0.06);
  border-left-color: rgba(73, 150, 208, 0.06);
  border-top-color: rgba(105, 190, 255, 0.2);
  border-bottom-color: rgba(42, 108, 162, 0.3);
  background:
    linear-gradient(180deg, rgba(4, 20, 35, 0.62), rgba(0, 8, 17, 0.5)),
    linear-gradient(90deg, rgba(0, 9, 19, 0.35), rgba(10, 36, 56, 0.16) 50%, rgba(0, 9, 19, 0.35));
  box-shadow:
    inset 0 1px 0 rgba(123, 209, 255, 0.08),
    inset 0 -1px 0 rgba(246, 198, 107, 0.08),
    0 16px 42px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  height: 68px;
  overflow: visible;
  padding: 0 10px 0 0;
}

.brand-art {
  position: relative;
  display: block;
  width: min(238px, 100%);
  height: 68px;
  min-width: 0;
  overflow: visible;
}

.brand-art img {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: auto;
  transform: translateY(-50%);
  filter:
    drop-shadow(0 2px 0 rgba(62, 32, 8, 0.72))
    drop-shadow(0 0 18px rgba(246, 198, 107, 0.34));
}

.brand-mark {
  position: relative;
  display: none;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  padding: 4px;
  border: 1px solid rgba(246, 198, 107, 0.62);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, rgba(246, 198, 107, 0.28), rgba(19, 50, 72, 0.2) 56%, rgba(0, 0, 0, 0.3));
  box-shadow: 0 0 24px rgba(246, 198, 107, 0.22);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  filter: drop-shadow(0 0 10px rgba(246, 198, 107, 0.3));
}

.brand-type {
  display: grid;
  min-width: 0;
  line-height: 1;
}

.brand-type-fallback {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.brand-main {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 43px;
  font-weight: 700;
  color: #ffe6aa;
  -webkit-text-stroke: 0.25px rgba(255, 248, 215, 0.42);
  text-shadow:
    0 2px 0 #5a310d,
    0 4px 10px rgba(0, 0, 0, 0.7),
    0 0 20px rgba(246, 198, 107, 0.44),
    0 0 2px #fff0c6;
}

.brand-sub {
  justify-self: center;
  margin-top: -1px;
  color: #f1ad48;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(246, 198, 107, 0.34);
}

.top-nav {
  position: relative;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  justify-self: start;
  width: min(100%, 1038px);
  gap: 0;
  min-width: 0;
}

.nav-tab,
.drawer-tab {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: 7px;
  min-width: 0;
  height: 54px;
  padding: 0 11px;
  overflow: hidden;
  border: 1px solid rgba(100, 173, 224, 0.34);
  border-bottom-color: rgba(246, 198, 107, 0.28);
  border-radius: 4px;
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  color: #d7e8f7;
  background:
    linear-gradient(145deg, rgba(9, 42, 68, 0.9), rgba(5, 20, 34, 0.9) 64%),
    rgba(3, 14, 25, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 22px rgba(0, 0, 0, 0.25);
  transition: transform 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.top-nav .nav-tab {
  grid-template-columns: 1fr;
  grid-template-rows: 34px 1fr;
  gap: 1px;
  height: 68px;
  padding: 7px 9px 7px;
  isolation: isolate;
  border: 1px solid rgba(92, 168, 218, 0.42);
  border-right-color: rgba(213, 172, 94, 0.34);
  border-bottom-color: rgba(71, 196, 255, 0.42);
  border-radius: 0;
  clip-path: polygon(13px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  color: #d9e4ee;
  background:
    linear-gradient(116deg, rgba(255, 228, 152, 0.1) 0 1px, transparent 1px 90%),
    radial-gradient(circle at 18% 0%, rgba(75, 213, 255, 0.15), transparent 38%),
    linear-gradient(180deg, rgba(23, 63, 94, 0.72), rgba(5, 24, 42, 0.92) 47%, rgba(2, 13, 25, 0.97)),
    rgba(3, 14, 25, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(200, 238, 255, 0.14),
    inset 0 -1px 0 rgba(67, 204, 255, 0.28),
    0 12px 24px rgba(0, 0, 0, 0.22);
  overflow: visible;
}

.top-nav .nav-tab:not(:first-child) {
  margin-left: -7px;
}

.top-nav .nav-tab::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  clip-path: inherit;
  background:
    linear-gradient(103deg, transparent 10%, rgba(255, 255, 255, 0.13) 24%, transparent 42%),
    linear-gradient(180deg, rgba(130, 211, 255, 0.13), transparent 24%, rgba(23, 92, 130, 0.16) 100%);
  opacity: 0.64;
  pointer-events: none;
}

.top-nav .nav-tab:first-child::before {
  background:
    radial-gradient(circle at 14% 86%, rgba(75, 213, 255, 0.2), transparent 34%),
    linear-gradient(103deg, transparent 10%, rgba(255, 255, 255, 0.14) 24%, transparent 42%),
    linear-gradient(180deg, rgba(130, 211, 255, 0.2), transparent 24%, rgba(23, 92, 130, 0.2) 100%);
}

.top-nav .nav-tab:last-child::before {
  background:
    radial-gradient(circle at 92% 10%, rgba(246, 198, 107, 0.16), transparent 26%),
    linear-gradient(103deg, transparent 10%, rgba(255, 255, 255, 0.12) 24%, transparent 42%),
    linear-gradient(180deg, rgba(130, 211, 255, 0.16), transparent 24%, rgba(23, 92, 130, 0.2) 100%);
}

.nav-tab::after,
.drawer-tab::after {
  content: "";
  position: absolute;
  inset: auto 18px 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--gold), transparent);
  opacity: 0;
}

.top-nav .nav-tab::after {
  inset: auto 21px 4px;
  height: 2px;
  background:
    radial-gradient(circle, rgba(75, 213, 255, 0.92), transparent 62%),
    linear-gradient(90deg, transparent, rgba(75, 213, 255, 0.92), rgba(255, 230, 170, 0.72), transparent);
}

.nav-tab img,
.drawer-tab img {
  width: 23px;
  height: 23px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(75, 213, 255, 0.3));
}

.top-nav .nav-tab img {
  position: relative;
  z-index: 1;
  justify-self: center;
  width: 34px;
  height: 34px;
  opacity: 0.9;
  filter: saturate(0.92) brightness(1.03) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}

.nav-tab span,
.drawer-tab span {
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-nav .nav-tab span {
  position: relative;
  z-index: 1;
  align-self: center;
  font-size: 13px;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.75), 0 0 8px rgba(118, 193, 236, 0.18);
}

.nav-tab:hover,
.drawer-tab:hover,
.nav-tab.active,
.drawer-tab.active {
  transform: translateY(-1px);
  border-color: rgba(75, 213, 255, 0.8);
  color: #ffffff;
  background:
    linear-gradient(145deg, rgba(13, 95, 142, 0.95), rgba(7, 30, 48, 0.96) 62%),
    rgba(3, 14, 25, 0.94);
  box-shadow: 0 0 24px rgba(75, 213, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.top-nav .nav-tab:hover,
.top-nav .nav-tab.active {
  z-index: 2;
  transform: translateY(-1px);
  color: #ffffff;
  border-color: rgba(75, 213, 255, 0.9);
  border-right-color: rgba(246, 198, 107, 0.62);
  border-bottom-color: rgba(75, 213, 255, 0.95);
  background:
    radial-gradient(circle at 20% 86%, rgba(75, 213, 255, 0.28), transparent 42%),
    linear-gradient(116deg, rgba(255, 230, 160, 0.16) 0 1px, transparent 1px 88%),
    linear-gradient(180deg, rgba(24, 91, 132, 0.78), rgba(6, 34, 59, 0.95) 48%, rgba(2, 15, 29, 0.98)),
    rgba(3, 14, 25, 0.96);
  box-shadow:
    0 0 22px rgba(75, 213, 255, 0.22),
    inset 0 1px 0 rgba(224, 248, 255, 0.24),
    inset 0 -2px 0 rgba(75, 213, 255, 0.52);
}

.top-nav .nav-tab:hover::before,
.top-nav .nav-tab.active::before {
  inset: 0;
  background:
    radial-gradient(circle at 48% 94%, rgba(75, 213, 255, 0.86), transparent 22%),
    linear-gradient(90deg, rgba(75, 213, 255, 0.34), transparent 24% 80%, rgba(246, 198, 107, 0.14)),
    linear-gradient(103deg, transparent 10%, rgba(255, 255, 255, 0.16) 25%, transparent 44%);
  opacity: 1;
  filter: none;
}

.top-nav .nav-tab:hover {
  z-index: 3;
}

.top-nav .nav-tab.active img {
  opacity: 1;
  width: 38px;
  height: 38px;
  filter: saturate(1.08) brightness(1.18) drop-shadow(0 0 10px rgba(75, 213, 255, 0.58));
}

.top-nav .nav-tab.active span {
  color: #ffe28e;
  text-shadow: 0 0 10px rgba(75, 213, 255, 0.55), 0 1px 0 rgba(0, 0, 0, 0.78);
}

.nav-tab.active::after,
.drawer-tab.active::after {
  opacity: 1;
}

.user-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding-right: 2px;
}

.currency-chip {
  border: 1px solid rgba(88, 162, 218, 0.34);
  border-radius: 7px;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(8, 34, 54, 0.72), rgba(2, 13, 24, 0.78));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.currency-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 128px;
  height: 42px;
  padding: 0 14px 0 9px;
}

.currency-chip img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: saturate(1.1) brightness(1.08) drop-shadow(0 0 10px rgba(255, 190, 65, 0.4));
}

.currency-chip strong {
  color: #ffffff;
  font-weight: 700;
}

.icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
}

.icon-button img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  opacity: 0.96;
  filter: saturate(0.9) brightness(1.12) drop-shadow(0 0 10px rgba(246, 198, 107, 0.22));
}

.button-dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px rgba(255, 98, 78, 0.8);
}

.notification-badge {
  position: absolute;
  right: 0;
  bottom: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 1px solid rgba(255, 235, 173, 0.82);
  border-radius: 999px;
  color: #1b1000;
  font-size: 10px;
  font-weight: 900;
  line-height: 16px;
  text-align: center;
  background: linear-gradient(180deg, #fff0a8, #d9932d);
  box-shadow: 0 0 14px rgba(246, 198, 107, 0.45);
}

.notification-popover {
  position: fixed;
  z-index: 60;
  top: 78px;
  right: max(18px, calc((100vw - min(1840px, calc(100% - 34px))) / 2 + 8px));
  display: none;
  width: min(360px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid rgba(88, 162, 218, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(7, 33, 52, 0.96), rgba(1, 9, 18, 0.98)),
    radial-gradient(circle at 80% 0%, rgba(246, 198, 107, 0.13), transparent 38%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 22px 48px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
}

.notification-popover.open {
  display: block;
}

.notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(246, 198, 107, 0.16);
}

.notification-head div {
  display: grid;
  gap: 1px;
}

.notification-head span {
  color: #7fb8dc;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.notification-head strong {
  color: var(--gold);
  font-size: 16px;
  text-shadow: 0 0 14px rgba(246, 198, 107, 0.2);
}

.notification-head button {
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(246, 198, 107, 0.46);
  border-radius: 7px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  background: rgba(2, 16, 26, 0.78);
}

.notification-list {
  display: grid;
  gap: 7px;
  max-height: 360px;
  overflow-y: auto;
  padding: 10px;
}

.notification-item,
.notification-empty {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(92, 158, 205, 0.15);
  border-radius: 7px;
  background: rgba(1, 11, 20, 0.58);
}

.notification-item.unread {
  border-color: rgba(246, 198, 107, 0.42);
  background:
    linear-gradient(90deg, rgba(246, 198, 107, 0.12), rgba(10, 42, 62, 0.5));
}

.notification-item strong,
.notification-empty strong {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-item span,
.notification-empty span {
  color: #a9c8dc;
  font-size: 12px;
  line-height: 1.42;
}

.notification-item small {
  color: #70a5c8;
  font-size: 10px;
}

.user-mini {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 154px;
  min-width: 154px;
  max-width: 154px;
  height: 50px;
  padding: 2px 20px 2px 14px;
  border: 0;
  border-left: 1px solid rgba(238, 189, 98, 0.22);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
}

.user-mini img {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(246, 198, 107, 0.7);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 18px rgba(246, 198, 107, 0.18);
}

.user-mini span {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.user-mini strong,
.user-mini small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-mini strong {
  color: #ffffff;
  font-size: 16px;
  line-height: 1.05;
  font-weight: 700;
}

.user-mini small {
  position: relative;
  width: auto;
  max-width: 100%;
  padding-bottom: 5px;
  color: var(--gold);
  line-height: 1;
  font-weight: 700;
}

.user-mini small::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(246, 198, 107, 0.92), transparent);
  box-shadow: 0 0 10px rgba(246, 198, 107, 0.38);
}

.user-mini i {
  position: absolute;
  right: 3px;
  top: 22px;
  width: 0;
  height: 0;
  border-top: 5px solid rgba(216, 232, 244, 0.72);
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
}

.mobile-menu,
.mobile-nav-drawer {
  display: none;
}

.server-strip {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr) 118px;
  gap: 12px;
  align-items: center;
  margin: 12px 0;
  min-height: 42px;
  padding: 6px 8px;
  border: 1px solid rgba(77, 144, 196, 0.24);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(2, 15, 28, 0.86), rgba(7, 35, 56, 0.64), rgba(2, 15, 28, 0.86));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}

.server-state {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.server-state strong {
  color: #ffffff;
}

.state-pulse {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 16px rgba(112, 240, 168, 0.9);
  animation: pulse 1.8s ease-in-out infinite;
}

.ticker-window {
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid rgba(246, 198, 107, 0.22);
  border-left: 1px solid rgba(246, 198, 107, 0.22);
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 34px;
  min-width: 100%;
  color: #d9e9f8;
  font-size: 13px;
  white-space: nowrap;
  animation: ticker var(--ticker-duration, 28s) linear infinite;
}

.ticker-track span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(246, 198, 107, 0.7);
}

.patch-button,
.edit-button,
.link-button,
.compact-button,
.send-button,
.wide-button,
.mission-row button,
.party-row button,
.primary-action,
.secondary-action {
  min-width: 0;
  border: 1px solid rgba(246, 198, 107, 0.55);
  border-radius: 7px;
  color: #fff2cf;
  background: linear-gradient(180deg, rgba(35, 68, 91, 0.92), rgba(5, 20, 34, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 150ms ease, filter 150ms ease, box-shadow 150ms ease;
}

.patch-button {
  height: 30px;
  color: #0b1722;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(180deg, #ffe39c, #d9993f);
}

.patch-button:hover,
.edit-button:hover,
.link-button:hover,
.compact-button:hover,
.send-button:hover,
.wide-button:hover,
.mission-row button:hover,
.party-row button:hover,
.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 0 20px rgba(246, 198, 107, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(260px, 292px) minmax(660px, 1fr) minmax(390px, 518px);
  gap: 16px;
  align-items: start;
}

.main-stack,
.right-stack {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.profile-window,
.panel,
.event-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top-color: rgba(124, 204, 255, 0.38);
  border-bottom-color: rgba(246, 198, 107, 0.35);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(9, 38, 58, 0.92), rgba(2, 15, 28, 0.9) 58%, rgba(4, 21, 32, 0.9)),
    var(--panel);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.profile-window::before,
.panel::before,
.event-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(246, 198, 107, 0.65), rgba(75, 213, 255, 0.5), transparent);
  opacity: 0.9;
}

.profile-window::after,
.panel::after,
.event-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border: 1px solid rgba(246, 198, 107, 0.08);
  border-radius: 5px;
}

.profile-window {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 13px;
  min-height: calc(100vh - 118px);
  padding: 15px;
  background:
    radial-gradient(circle at 50% 6%, rgba(75, 213, 255, 0.18), transparent 30%),
    radial-gradient(circle at 0% 34%, rgba(246, 198, 107, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(8, 36, 58, 0.97), rgba(1, 9, 18, 0.95) 54%, rgba(3, 17, 27, 0.96)),
    var(--panel);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 42px rgba(75, 213, 255, 0.06);
}

.profile-window > * {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.panel-crown {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  padding: 0 2px 8px;
  border-bottom: 1px solid rgba(106, 170, 218, 0.16);
  color: #ffd76f;
  font-size: 15px;
  font-weight: 900;
  text-shadow:
    0 1px 0 rgba(42, 19, 0, 0.84),
    0 0 12px rgba(246, 198, 107, 0.28);
}

.panel-crown::after {
  content: "";
  position: absolute;
  right: 34%;
  bottom: -1px;
  left: 0;
  height: 1px;
  background:
    linear-gradient(90deg, rgba(255, 230, 158, 0.95), rgba(246, 198, 107, 0.54), rgba(75, 213, 255, 0));
  box-shadow: 0 0 12px rgba(246, 198, 107, 0.22);
}

.panel-crown strong {
  display: inline-grid;
  place-items: center;
  min-height: 23px;
  padding: 0 8px;
  border: 1px solid rgba(75, 213, 255, 0.42);
  border-radius: 999px;
  color: #8ff1ff;
  font-size: 11px;
  font-weight: 900;
  background: rgba(4, 30, 45, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 14px rgba(75, 213, 255, 0.12);
}

.profile-portrait {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 196px;
  overflow: hidden;
  border: 1px solid rgba(246, 198, 107, 0.34);
  border-top-color: rgba(75, 213, 255, 0.34);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 44%, rgba(75, 213, 255, 0.23), transparent 36%),
    radial-gradient(circle at 50% 115%, rgba(246, 198, 107, 0.16), transparent 44%),
    linear-gradient(180deg, rgba(7, 29, 48, 0.66), rgba(2, 12, 22, 0.9)),
    rgba(1, 10, 18, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 -32px 56px rgba(0, 0, 0, 0.36),
    0 10px 24px rgba(0, 0, 0, 0.26);
}

.profile-portrait::before,
.profile-portrait::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.profile-portrait::before {
  inset: 13px;
  border: 1px solid rgba(75, 213, 255, 0.12);
  border-radius: 7px;
}

.profile-portrait::after {
  right: 28px;
  bottom: 34px;
  left: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(246, 198, 107, 0.42), rgba(75, 213, 255, 0.34), transparent);
  box-shadow: 0 0 18px rgba(75, 213, 255, 0.12);
}

.profile-portrait img {
  position: relative;
  z-index: 2;
  width: 148px;
  height: 148px;
  border: 2px solid rgba(246, 198, 107, 0.78);
  border-radius: 50%;
  object-fit: cover;
  box-shadow:
    0 0 0 6px rgba(2, 15, 28, 0.72),
    0 0 34px rgba(75, 213, 255, 0.36),
    0 18px 30px rgba(0, 0, 0, 0.42);
}

.portrait-ring {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: 176px;
  height: 176px;
  border: 1px solid rgba(75, 213, 255, 0.46);
  border-radius: 50%;
  box-shadow:
    inset 0 0 18px rgba(75, 213, 255, 0.2),
    0 0 28px rgba(246, 198, 107, 0.16);
  animation: slowSpin 18s linear infinite;
}

.portrait-ring.outer {
  width: 188px;
  height: 188px;
  border-color: rgba(246, 198, 107, 0.24);
  border-style: dashed;
  opacity: 0.76;
  animation-duration: 28s;
  animation-direction: reverse;
}

.portrait-status {
  position: absolute;
  z-index: 3;
  right: 13px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(112, 240, 168, 0.48);
  border-radius: 999px;
  color: #d9ffe9;
  font-size: 12px;
  font-weight: 900;
  background: rgba(3, 29, 26, 0.78);
  box-shadow: 0 0 18px rgba(112, 240, 168, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.portrait-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #70f0a8;
  box-shadow: 0 0 12px rgba(112, 240, 168, 0.82);
}

.portrait-status.offline,
.portrait-status.guest {
  border-color: rgba(246, 198, 107, 0.42);
  color: #ffe7ac;
  background: rgba(36, 27, 12, 0.78);
  box-shadow: 0 0 18px rgba(246, 198, 107, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.portrait-status.offline span,
.portrait-status.guest span {
  background: #f2c45f;
  box-shadow: 0 0 12px rgba(246, 198, 107, 0.7);
}

.profile-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid rgba(89, 157, 209, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(100deg, rgba(9, 35, 55, 0.82), rgba(2, 13, 24, 0.74));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.profile-head > div {
  flex: 1 1 auto;
  min-width: 0;
}

.profile-head h2 {
  margin: 0;
  max-width: 100%;
  overflow: hidden;
  font-size: 26px;
  line-height: 1.38;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow:
    0 1px 0 rgba(42, 19, 0, 0.86),
    0 0 16px rgba(246, 198, 107, 0.24);
}

.profile-head p {
  margin: 4px 0 0;
  overflow: hidden;
  color: #b7cce0;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-button {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 12px;
  border-color: rgba(246, 198, 107, 0.5);
  border-radius: 7px;
  color: #ffe9ac;
  font-size: 12px;
  font-weight: 900;
  background:
    linear-gradient(180deg, rgba(38, 60, 71, 0.94), rgba(12, 28, 43, 0.94));
}

.level-line {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 1px 1px -4px;
  color: #9fb8cf;
  font-size: 13px;
  font-weight: 700;
}

.level-line strong {
  color: #ffffff;
  font-weight: 900;
}

.progress-bar {
  position: relative;
  z-index: 1;
  height: 7px;
  overflow: hidden;
  border: 1px solid rgba(88, 162, 218, 0.28);
  border-radius: 999px;
  background: rgba(0, 7, 13, 0.7);
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #e9ff73 52%, var(--gold));
  box-shadow: 0 0 14px rgba(112, 240, 168, 0.42);
  transition: width 420ms ease;
}

.progress-bar.large {
  height: 10px;
  border-color: rgba(75, 213, 255, 0.34);
  background: rgba(0, 5, 10, 0.82);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.48);
}

.progress-bar.mini {
  flex: 1 1 auto;
  height: 6px;
}

.profile-stats {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  margin: 0;
}

.profile-stat-row {
  display: grid;
  grid-template-columns: minmax(118px, 1fr) minmax(0, 0.82fr);
  gap: 12px;
  align-items: center;
  min-height: 46px;
  padding: 6px 9px;
  border: 1px solid rgba(89, 157, 209, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(8, 35, 54, 0.86), rgba(1, 14, 25, 0.7));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.profile-stat-guild {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 5px;
  min-height: 64px;
  padding: 8px 10px 9px;
  background:
    radial-gradient(circle at 0% 30%, rgba(246, 198, 107, 0.1), transparent 72px),
    linear-gradient(90deg, rgba(8, 35, 54, 0.9), rgba(1, 14, 25, 0.72));
}

.profile-stats dt,
.profile-stats dd {
  min-width: 0;
  margin: 0;
}

.profile-stats dt {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  color: #b9d0e3;
  font-weight: 700;
  white-space: nowrap;
}

.profile-stats dt img {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 0 9px rgba(246, 198, 107, 0.26));
}

.profile-stats dd {
  justify-self: end;
  max-width: 100%;
  overflow: hidden;
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-stat-guild dd {
  display: -webkit-box;
  justify-self: stretch;
  min-height: 18px;
  max-height: 40px;
  color: #fff7da;
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.vip-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  padding: 12px 13px;
  overflow: hidden;
  border: 1px solid rgba(143, 102, 255, 0.58);
  border-top-color: rgba(246, 198, 107, 0.5);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 0%, rgba(246, 198, 107, 0.22), transparent 38%),
    linear-gradient(135deg, rgba(89, 42, 177, 0.78), rgba(14, 42, 75, 0.88)),
    rgba(20, 20, 58, 0.85);
  box-shadow:
    0 0 22px rgba(143, 102, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.vip-card::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 62px;
  height: 62px;
  border: 1px solid rgba(246, 198, 107, 0.18);
  border-radius: 50%;
  opacity: 0.7;
}

.vip-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.vip-card strong {
  color: #fff3ca;
  font-size: 20px;
  letter-spacing: 0;
  text-shadow: 0 0 14px rgba(246, 198, 107, 0.22);
}

.vip-card span {
  color: #f8edff;
  font-weight: 700;
}

.chat-level {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 12px;
}

.profile-menu {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 7px;
}

.profile-menu button {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid rgba(89, 157, 209, 0.22);
  border-radius: 7px;
  color: #d9e7f3;
  text-align: left;
  background:
    linear-gradient(90deg, rgba(7, 32, 51, 0.9), rgba(2, 17, 31, 0.78));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.profile-menu button img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(246, 198, 107, 0.25));
}

.profile-menu button span {
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-menu button:hover,
.profile-menu button.active {
  border-color: rgba(105, 176, 229, 0.42);
  color: #ffffff;
  background:
    radial-gradient(circle at 28px 50%, rgba(246, 198, 107, 0.18), transparent 38px),
    linear-gradient(90deg, rgba(29, 43, 42, 0.9), rgba(5, 28, 45, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 18px rgba(246, 198, 107, 0.06),
    0 0 16px rgba(75, 213, 255, 0.05);
}

.profile-window.profile-guest {
  min-height: 0;
}

.guest-login-hero {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  min-height: 132px;
  align-content: end;
  padding: 18px 15px;
  overflow: hidden;
  border: 1px solid rgba(246, 198, 107, 0.28);
  border-top-color: rgba(75, 213, 255, 0.36);
  border-radius: 8px;
  background:
    radial-gradient(circle at 78% 18%, rgba(75, 213, 255, 0.2), transparent 34%),
    radial-gradient(circle at 0% 0%, rgba(246, 198, 107, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(7, 34, 56, 0.94), rgba(1, 10, 20, 0.93));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 28px rgba(0, 0, 0, 0.22);
}

.guest-login-hero::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(75, 213, 255, 0.1);
  border-radius: 6px;
  pointer-events: none;
}

.guest-login-hero::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(246, 198, 107, 0.12);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 198, 107, 0.12), transparent 62%);
  pointer-events: none;
}

.guest-login-hero span,
.guest-login-hero strong,
.guest-login-hero p {
  position: relative;
  z-index: 1;
}

.guest-login-hero span {
  color: #8ff1ff;
  font-size: 11px;
  font-weight: 1000;
}

.guest-login-hero strong {
  color: #ffe9ac;
  font-size: 30px;
  font-weight: 1000;
  line-height: 1.1;
  text-shadow:
    0 2px 0 rgba(42, 19, 0, 0.78),
    0 0 18px rgba(246, 198, 107, 0.22);
}

.guest-login-hero p {
  max-width: 220px;
  margin: 0;
  color: #cde5f8;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.profile-head-guest.compact h2 {
  font-size: 22px;
}

.profile-auth-tabs {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 5px;
  padding: 4px;
  border: 1px solid rgba(89, 157, 209, 0.22);
  border-radius: 9px;
  background: rgba(0, 8, 16, 0.7);
}

.profile-auth-tabs button,
.profile-auth-link {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #9fb8cf;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  background: transparent;
}

.profile-auth-tabs button.active {
  color: #ffe9ac;
  border-color: rgba(246, 198, 107, 0.34);
  background: linear-gradient(180deg, rgba(82, 57, 18, 0.72), rgba(26, 27, 28, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.profile-auth-link {
  color: #8edcf3;
  border-color: rgba(75, 213, 255, 0.18);
  background: rgba(3, 26, 42, 0.5);
}

.profile-auth-tabs button:hover,
.profile-auth-link:hover {
  color: #fff0bd;
  border-color: rgba(246, 198, 107, 0.45);
}

.profile-login {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 11px;
  padding: 13px;
  border: 1px solid rgba(89, 157, 209, 0.24);
  border-top-color: rgba(246, 198, 107, 0.42);
  border-radius: 8px;
  background:
    radial-gradient(circle at 14% 0%, rgba(246, 198, 107, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(4, 24, 40, 0.92), rgba(1, 11, 21, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 22px rgba(0, 0, 0, 0.18);
}

.profile-register {
  max-height: min(60vh, 560px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(246, 198, 107, 0.5) rgba(2, 14, 24, 0.6);
}

.profile-login label {
  display: grid;
  gap: 6px;
  color: #b9d0e3;
  font-size: 12px;
  font-weight: 900;
}

.profile-login input {
  width: 100%;
  height: 40px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid rgba(92, 168, 218, 0.35);
  border-radius: 7px;
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  background:
    linear-gradient(180deg, rgba(0, 9, 17, 0.92), rgba(2, 19, 32, 0.86));
  box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.42);
}

.profile-login input:focus {
  outline: 0;
  border-color: rgba(246, 198, 107, 0.72);
  box-shadow:
    inset 0 1px 6px rgba(0, 0, 0, 0.42),
    0 0 0 2px rgba(246, 198, 107, 0.12),
    0 0 18px rgba(75, 213, 255, 0.12);
}

.profile-auth-message {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #9fb8cf;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.profile-auth-message.error,
.profile-auth-message.warning {
  color: #ffd69a;
}

.profile-login-button {
  display: grid;
  place-items: center;
  height: 44px;
  border: 1px solid rgba(246, 198, 107, 0.72);
  border-radius: 7px;
  color: #2b1702;
  font-size: 15px;
  font-weight: 1000;
  background:
    linear-gradient(180deg, #ffe9a9, #e8a83f 72%, #9a5e19);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.56),
    0 10px 22px rgba(246, 198, 107, 0.16);
}

.profile-login-button:disabled {
  cursor: wait;
  color: #d5c7a6;
  border-color: rgba(92, 168, 218, 0.3);
  background: linear-gradient(180deg, rgba(28, 50, 65, 0.95), rgba(8, 25, 38, 0.95));
}

.profile-guest-note {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid rgba(246, 198, 107, 0.22);
  border-radius: 8px;
  color: #b9d0e3;
  background:
    linear-gradient(90deg, rgba(42, 30, 11, 0.68), rgba(3, 18, 31, 0.76));
}

.profile-guest-note strong {
  color: #ffd76f;
  font-size: 13px;
  font-weight: 1000;
}

.profile-guest-note span {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.profile-core-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.profile-core-grid div {
  display: grid;
  grid-template-columns: minmax(82px, 0.82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid rgba(89, 157, 209, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(6, 30, 49, 0.88), rgba(1, 13, 24, 0.72));
}

.profile-core-grid span {
  min-width: 0;
  overflow: hidden;
  color: #9fb8cf;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-core-grid strong {
  justify-self: end;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  color: #fff7da;
  font-size: 13px;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vip-card.premium-empty {
  border-color: rgba(89, 157, 209, 0.28);
  border-top-color: rgba(246, 198, 107, 0.26);
  background:
    radial-gradient(circle at 18% 0%, rgba(246, 198, 107, 0.12), transparent 38%),
    linear-gradient(135deg, rgba(19, 54, 76, 0.8), rgba(4, 20, 34, 0.9));
}

.vip-card.premium-active {
  border-color: rgba(143, 102, 255, 0.72);
  box-shadow:
    0 0 24px rgba(143, 102, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.character-switcher {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(89, 157, 209, 0.24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 90% 0%, rgba(75, 213, 255, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(4, 24, 40, 0.9), rgba(1, 11, 21, 0.86));
}

.character-switch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #9fb8cf;
  font-size: 12px;
  font-weight: 900;
}

.character-switch-head strong {
  color: #ffd76f;
}

.character-list {
  display: grid;
  gap: 7px;
  max-height: 178px;
  overflow: auto;
  padding-right: 2px;
}

.character-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid rgba(89, 157, 209, 0.2);
  border-radius: 7px;
  color: #dcefff;
  text-align: left;
  background:
    linear-gradient(90deg, rgba(6, 30, 49, 0.84), rgba(1, 13, 24, 0.76));
}

.character-list button.active,
.character-list button:hover {
  border-color: rgba(246, 198, 107, 0.54);
  background:
    radial-gradient(circle at 0% 50%, rgba(246, 198, 107, 0.16), transparent 44px),
    linear-gradient(90deg, rgba(30, 42, 34, 0.9), rgba(5, 28, 45, 0.84));
}

.character-list span,
.character-list strong,
.character-list small {
  min-width: 0;
}

.character-list span {
  display: grid;
  gap: 2px;
}

.character-list strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.character-list small {
  overflow: hidden;
  color: #9fb8cf;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.character-list em {
  display: inline-grid;
  place-items: center;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid rgba(112, 240, 168, 0.34);
  border-radius: 999px;
  color: #caffdf;
  font-size: 10px;
  font-style: normal;
  font-weight: 1000;
  background: rgba(6, 42, 32, 0.72);
}

.pill-count {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  background: linear-gradient(180deg, var(--purple), #6241c3);
}

.hero {
  position: relative;
  min-height: 368px;
  overflow: hidden;
  border: 1px solid rgba(85, 165, 228, 0.46);
  border-bottom-color: rgba(246, 198, 107, 0.46);
  border-radius: 8px;
  background: #041323;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero::before {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 8, 17, 0.86) 0%, rgba(0, 12, 23, 0.66) 35%, rgba(0, 7, 13, 0.12) 70%),
    linear-gradient(180deg, rgba(4, 20, 36, 0.05), rgba(0, 4, 10, 0.78));
  z-index: 2;
}

.hero::after {
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(75, 213, 255, 0.9), rgba(246, 198, 107, 0.82), transparent);
  z-index: 6;
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 5, 12, 0.74), rgba(0, 10, 20, 0.14) 58%, rgba(0, 4, 9, 0.1)),
    linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(2, 8, 16, 0.64));
}

.hero-energy {
  position: absolute;
  z-index: 4;
  left: -12%;
  right: 34%;
  bottom: 18px;
  height: 72px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(75, 213, 255, 0.24), rgba(246, 198, 107, 0.22), transparent);
  filter: blur(10px);
  transform: skewX(-16deg);
  animation: energySweep 5s ease-in-out infinite;
}

.hero-copy {
  position: relative;
  z-index: 5;
  display: grid;
  align-content: center;
  width: min(620px, 62%);
  min-height: 368px;
  padding: 48px 0 44px 48px;
}

.hero-kicker {
  margin: 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 620px;
  margin: 10px 0 12px;
  color: #ffffff;
  font-size: 46px;
  line-height: 1.18;
  overflow-wrap: anywhere;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.46), 0 0 30px rgba(75, 213, 255, 0.28);
}

.hero-copy > p:not(.hero-kicker) {
  margin: 0;
  color: #dbeeff;
  font-size: 18px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-action,
.secondary-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 176px;
  height: 52px;
  padding: 0 18px;
  font-size: 16px;
  font-weight: 800;
}

.primary-action {
  border-color: rgba(255, 233, 164, 0.92);
  color: #201302;
  background: linear-gradient(180deg, #fff0b7, #f1bf5d 55%, #bd7427);
}

.secondary-action {
  border-color: rgba(167, 112, 255, 0.82);
  color: #fff;
  background: linear-gradient(180deg, rgba(124, 73, 224, 0.95), rgba(65, 33, 133, 0.95));
}

.secondary-action.is-unavailable,
[data-action="mobile-download"].is-unavailable {
  border-color: rgba(124, 149, 167, 0.44);
  color: rgba(226, 235, 241, 0.72);
  background: linear-gradient(180deg, rgba(46, 62, 74, 0.88), rgba(21, 31, 40, 0.92));
  cursor: not-allowed;
  filter: saturate(0.45);
}

.secondary-action.is-unavailable:hover,
[data-action="mobile-download"].is-unavailable:hover {
  transform: none;
  filter: saturate(0.45);
  box-shadow: none;
}

.primary-action img,
.secondary-action img {
  width: 25px;
  height: 25px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.24));
}

.hero-dots {
  position: absolute;
  z-index: 6;
  left: 48px;
  bottom: 18px;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 26px;
  height: 7px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.hero-dots .active {
  border-color: rgba(246, 198, 107, 0.8);
  background: linear-gradient(90deg, var(--gold), var(--cyan));
  box-shadow: 0 0 12px rgba(246, 198, 107, 0.4);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "chat chat"
    "mission market"
    "feed feed";
  gap: 16px;
  align-items: stretch;
}

.lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(310px, 0.92fr);
  gap: 16px;
}

.panel {
  min-width: 0;
  padding: 15px;
}

.chat-panel {
  grid-area: chat;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  height: clamp(560px, 69vh, 640px);
  min-height: 0;
}

.chat-ai-note {
  margin: 5px 2px 8px;
  color: rgba(203, 222, 238, 0.74);
  font-size: 11px;
  line-height: 1.45;
}

.chat-ai-note strong,
.chat-ai-mention {
  color: #80edf0;
}

.chat-ai-mention {
  appearance: none;
  margin: 0;
  padding: 0 2px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  font: inherit;
  font-weight: 800;
  line-height: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(128, 237, 240, 0.42);
  text-underline-offset: 2px;
}

.chat-ai-mention:hover {
  color: #c5ffff;
  background: rgba(84, 221, 225, 0.1);
  text-decoration-color: currentColor;
}

.chat-ai-mention:focus-visible {
  outline: 2px solid #80edf0;
  outline-offset: 2px;
}

.chat-ai-service {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 2px 7px;
  border: 1px solid rgba(139, 164, 176, .22);
  border-radius: 999px;
  background: rgba(6, 20, 27, .72);
  color: #aebdc4;
  font-size: 10px;
  font-weight: 800;
  vertical-align: middle;
}

.chat-ai-service-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8b969c;
  box-shadow: 0 0 0 3px rgba(139, 150, 156, .08);
}

.chat-ai-service.is-active {
  border-color: rgba(91, 218, 172, .28);
  color: #8de1bf;
}

.chat-ai-service.is-active .chat-ai-service-dot {
  background: #58d9a7;
  box-shadow: 0 0 0 3px rgba(88, 217, 167, .11), 0 0 10px rgba(88, 217, 167, .28);
}

.chat-ai-service.is-unavailable {
  border-color: rgba(221, 117, 117, .28);
  color: #dba4a4;
}

.chat-ai-service button {
  min-height: 20px;
  padding: 2px 8px;
  border: 1px solid rgba(231, 194, 105, .32);
  border-radius: 999px;
  background: rgba(231, 194, 105, .09);
  color: #e9ca7b;
  font: inherit;
  cursor: pointer;
}

.chat-ai-service button:hover:not(:disabled) {
  background: rgba(231, 194, 105, .16);
}

.chat-ai-service button:disabled {
  cursor: wait;
  opacity: .56;
}

.chat-ai-mention:disabled {
  cursor: not-allowed;
  filter: grayscale(.65);
  opacity: .58;
}

@media (max-width: 620px) {
  .chat-ai-service {
    display: flex;
    width: max-content;
    max-width: 100%;
    margin: 6px 0 0;
  }
}

.mission-panel {
  grid-area: mission;
}

.market-panel {
  grid-area: market;
}

.live-feed-panel {
  grid-area: feed;
}

.panel-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  margin-bottom: 11px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(106, 170, 218, 0.13);
}

.panel-head::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: min(174px, 58%);
  height: 1px;
  background:
    linear-gradient(90deg, rgba(255, 230, 158, 0.94), rgba(246, 198, 107, 0.58) 44%, rgba(75, 213, 255, 0.24) 72%, rgba(75, 213, 255, 0));
  box-shadow:
    0 0 10px rgba(246, 198, 107, 0.22),
    0 0 18px rgba(75, 213, 255, 0.08);
}

.panel-head > div {
  min-width: 0;
}

.panel-head h2,
.event-card h2 {
  display: inline-flex;
  align-items: center;
  margin: 0;
  color: var(--gold);
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
}

.panel-head h2 {
  position: relative;
  padding-bottom: 3px;
  color: #ffd76f;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow:
    0 1px 0 rgba(42, 19, 0, 0.84),
    0 0 8px rgba(246, 198, 107, 0.32),
    0 0 14px rgba(75, 213, 255, 0.08);
  -webkit-text-stroke: 0.25px rgba(63, 31, 0, 0.62);
}

.panel-head h2::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 1px;
  left: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 244, 189, 0.8), rgba(75, 213, 255, 0.26) 58%, rgba(75, 213, 255, 0));
  box-shadow: 0 0 8px rgba(246, 198, 107, 0.16);
}

.panel-head span {
  color: var(--muted);
  font-size: 12px;
}

.panel-head strong {
  color: var(--gold);
}

.market-head-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.market-mini-pager {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  height: 30px;
  border: 1px solid rgba(75, 213, 255, 0.2);
  border-radius: 999px;
  padding: 2px 4px;
  background:
    linear-gradient(180deg, rgba(14, 51, 70, 0.66), rgba(2, 16, 28, 0.78));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 0 14px rgba(75, 213, 255, 0.08),
    0 0 18px rgba(246, 198, 107, 0.05);
}

.market-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 94px;
  height: 24px;
  padding: 0 8px;
  color: #dff7ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-shadow:
    0 0 8px rgba(75, 213, 255, 0.22),
    0 1px 0 rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

.market-page-button {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(246, 198, 107, 0.28);
  border-radius: 50%;
  padding: 0;
  color: #ffe49a;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 231, 159, 0.24), transparent 58%),
    linear-gradient(180deg, rgba(28, 55, 67, 0.9), rgba(6, 21, 33, 0.92));
  box-shadow:
    inset 0 0 8px rgba(246, 198, 107, 0.08),
    0 0 10px rgba(75, 213, 255, 0.08);
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    opacity 160ms ease;
}

.market-page-button:hover,
.market-page-button:focus-visible {
  border-color: rgba(246, 198, 107, 0.66);
  color: #ffffff;
  box-shadow:
    inset 0 0 10px rgba(246, 198, 107, 0.14),
    0 0 14px rgba(246, 198, 107, 0.16),
    0 0 18px rgba(75, 213, 255, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.market-page-button:disabled {
  opacity: 0.36;
  color: rgba(216, 236, 248, 0.62);
  cursor: not-allowed;
  filter: saturate(0.72);
  transform: none;
}

.chat-presence-mini {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 62px;
  max-width: 132px;
  height: 32px;
  padding: 0 11px 0 9px;
  border: 1px solid rgba(89, 211, 229, 0.42);
  border-radius: 999px;
  color: #dffaff;
  background:
    linear-gradient(180deg, rgba(17, 61, 74, 0.9), rgba(4, 23, 35, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(196, 248, 255, 0.08),
    inset 0 0 16px rgba(73, 211, 232, 0.08),
    0 0 14px rgba(49, 179, 208, 0.08);
  outline: none;
}

.chat-presence-mini:hover,
.chat-presence-mini:focus-visible {
  border-color: rgba(112, 229, 244, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(213, 251, 255, 0.12),
    inset 0 0 18px rgba(73, 211, 232, 0.12),
    0 0 16px rgba(49, 179, 208, 0.16);
}

.chat-presence-mini::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 30;
  top: calc(100% + 9px);
  right: 0;
  width: max-content;
  max-width: min(290px, 78vw);
  padding: 7px 9px;
  border: 1px solid rgba(97, 207, 226, 0.34);
  border-radius: 5px;
  color: #d9f6fb;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
  background: rgba(3, 17, 28, 0.97);
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.34);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-3px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
  pointer-events: none;
}

.chat-presence-mini:hover::after,
.chat-presence-mini:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.chat-presence-glyph {
  position: relative;
  flex: 0 0 auto;
  width: 27px;
  height: 21px;
  filter: drop-shadow(0 0 6px rgba(102, 226, 244, 0.2));
}

.chat-presence-person {
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  color: #8bdcea;
  background: rgba(7, 35, 48, 0.96);
}

.chat-presence-person::after {
  content: "";
  position: absolute;
  top: 8px;
  left: -4px;
  width: 12px;
  height: 7px;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 9px 9px 3px 3px;
  background: linear-gradient(180deg, rgba(66, 163, 185, 0.2), rgba(5, 28, 40, 0.2));
}

.chat-presence-person.person-back {
  top: 4px;
  left: 3px;
  color: rgba(107, 185, 201, 0.76);
  transform: scale(0.9);
}

.chat-presence-person.person-front {
  z-index: 2;
  top: 1px;
  left: 13px;
  color: #b7f5ff;
}

.chat-presence-live-dot {
  position: absolute;
  z-index: 3;
  right: -1px;
  bottom: 0;
  width: 7px;
  height: 7px;
  border: 1.5px solid #061a26;
  border-radius: 50%;
  background: #6ef0aa;
  box-shadow: 0 0 7px rgba(110, 240, 170, 0.62);
}

.chat-presence-mini.is-live .chat-presence-live-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 1px solid rgba(110, 240, 170, 0.42);
  border-radius: inherit;
  animation: chat-presence-pulse 2.4s ease-out infinite;
}

.chat-presence-mini strong {
  color: #ffffff;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-shadow: 0 0 9px rgba(111, 227, 243, 0.22);
}

@keyframes chat-presence-pulse {
  0% { opacity: 0.74; transform: scale(0.75); }
  72%, 100% { opacity: 0; transform: scale(1.55); }
}

@media (prefers-reduced-motion: reduce) {
  .chat-presence-mini.is-live .chat-presence-live-dot::after {
    animation: none;
  }
}

.link-button {
  flex: 0 0 auto;
  height: 29px;
  padding: 0 13px;
  border-color: rgba(246, 198, 107, 0.48);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  background:
    linear-gradient(180deg, rgba(25, 54, 69, 0.82), rgba(7, 24, 39, 0.84));
  box-shadow: inset 0 0 10px rgba(246, 198, 107, 0.08);
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.event-card {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  min-height: 114px;
  padding: 12px;
}

.event-card > img {
  position: relative;
  z-index: 1;
  width: 70px;
  height: 70px;
  align-self: center;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(75, 213, 255, 0.18));
}

.event-body {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.event-card h2,
.event-card strong,
.event-card p,
.event-card small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-card strong {
  color: #ffffff;
  font-size: 19px;
  line-height: 1.18;
}

.event-card p {
  margin: 3px 0 2px;
  color: #dff4ff;
  font-size: 14px;
  font-weight: 700;
}

.event-card small {
  color: var(--soft);
  font-size: 11px;
}

.event-meter {
  display: block;
  width: 100%;
  height: 4px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.event-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
}

.event-card.green {
  border-color: rgba(112, 240, 168, 0.38);
}

.event-card.red {
  border-color: rgba(255, 98, 78, 0.4);
}

.event-card.purple {
  border-color: rgba(163, 113, 255, 0.42);
}

.event-card.gold {
  border-color: rgba(246, 198, 107, 0.42);
}

.tab-row {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 6px;
  min-width: 0;
  margin-bottom: 10px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.tab-row::-webkit-scrollbar {
  display: none;
}

.tab-row button {
  flex: 0 0 auto;
  min-width: 66px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(94, 157, 203, 0.34);
  border-radius: 5px;
  color: #cfe0ef;
  font-size: 13px;
  font-weight: 700;
  background:
    linear-gradient(180deg, rgba(12, 37, 56, 0.86), rgba(3, 18, 31, 0.84));
}

.tab-row button.active {
  border-color: rgba(246, 198, 107, 0.74);
  color: var(--gold);
  background:
    linear-gradient(180deg, rgba(67, 54, 29, 0.88), rgba(19, 35, 39, 0.9));
  box-shadow: inset 0 -2px 0 rgba(246, 198, 107, 0.58), 0 0 12px rgba(75, 213, 255, 0.08);
}

.tab-row button.whisper-tab {
  border-color: rgba(176, 126, 255, 0.38);
  color: #eadcff;
  background:
    radial-gradient(circle at 18% 0%, rgba(176, 126, 255, 0.2), transparent 44%),
    linear-gradient(180deg, rgba(25, 28, 55, 0.9), rgba(5, 14, 29, 0.9));
}

.chat-tab-combo {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: stretch;
  min-width: 0;
}

.chat-tab-combo .whisper-tab {
  min-width: 94px;
  max-width: 180px;
  overflow: hidden;
  border-radius: 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-row .chat-tab-close {
  width: 28px;
  min-width: 28px;
  height: 30px;
  padding: 0;
  border-color: rgba(176, 126, 255, 0.38);
  border-left-color: rgba(176, 126, 255, 0.2);
  border-radius: 0 5px 5px 0;
  color: #cdb7ee;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  background:
    radial-gradient(circle at 50% 0%, rgba(176, 126, 255, 0.14), transparent 45%),
    linear-gradient(180deg, rgba(23, 26, 48, 0.92), rgba(4, 12, 25, 0.92));
}

.chat-tab-combo.active .chat-tab-close {
  border-color: rgba(246, 198, 107, 0.62);
  border-left-color: rgba(246, 198, 107, 0.24);
  color: #ffe0a4;
  box-shadow: inset 0 -2px 0 rgba(246, 198, 107, 0.36);
}

.tab-row .chat-tab-close:hover,
.tab-row .chat-tab-close:focus-visible {
  color: #ffffff;
  outline: none;
  background:
    radial-gradient(circle at 50% 0%, rgba(246, 198, 107, 0.18), transparent 48%),
    linear-gradient(180deg, rgba(54, 39, 35, 0.94), rgba(10, 17, 28, 0.94));
}

.tab-row button.whisper-tab span {
  margin-right: 5px;
  color: #c799ff;
  font-size: 10px;
}

.tab-row.slim button {
  flex: 1 1 0;
  min-width: 0;
}

.chat-list {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  align-self: stretch;
  gap: 10px;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 10px;
  border: 1px solid rgba(46, 110, 154, 0.3);
  border-radius: 8px;
  background:
    radial-gradient(circle at 10% 4%, rgba(75, 213, 255, 0.13), transparent 30%),
    radial-gradient(circle at 86% 8%, rgba(246, 198, 107, 0.08), transparent 25%),
    linear-gradient(90deg, rgba(75, 213, 255, 0.04), transparent 22%, transparent 78%, rgba(246, 198, 107, 0.035)),
    linear-gradient(180deg, rgba(0, 3, 9, 0.98), rgba(0, 9, 17, 0.94) 52%, rgba(0, 3, 8, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    inset 0 0 34px rgba(0, 0, 0, 0.7),
    0 1px 0 rgba(255, 255, 255, 0.025);
  scrollbar-color: rgba(75, 213, 255, 0.42) rgba(0, 7, 14, 0.72);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.chat-list::-webkit-scrollbar {
  width: 7px;
}

.chat-list::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(0, 7, 14, 0.78);
  box-shadow: inset 0 0 0 1px rgba(75, 213, 255, 0.08);
}

.chat-list::-webkit-scrollbar-thumb {
  border: 2px solid rgba(0, 7, 14, 0.88);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(75, 213, 255, 0.52), rgba(246, 198, 107, 0.32));
}

.chat-row {
  --chat-accent: rgba(75, 213, 255, 0.72);
  --chat-accent-soft: rgba(75, 213, 255, 0.13);
  --chat-bubble: rgba(4, 17, 30, 0.96);
  --chat-bubble-bottom: rgba(0, 7, 15, 0.94);
  --chat-name-color: #ffffff;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: end;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.chat-row.tone-system {
  --chat-accent: rgba(246, 198, 107, 0.82);
  --chat-accent-soft: rgba(246, 198, 107, 0.14);
  grid-template-columns: minmax(0, 1fr);
}

.chat-row.tone-guild {
  --chat-accent: rgba(75, 213, 255, 0.78);
  --chat-accent-soft: rgba(75, 213, 255, 0.14);
}

.chat-row.tone-trade {
  --chat-accent: rgba(122, 182, 255, 0.82);
  --chat-accent-soft: rgba(122, 182, 255, 0.13);
}

.chat-row.tone-party {
  --chat-accent: rgba(163, 113, 255, 0.82);
  --chat-accent-soft: rgba(163, 113, 255, 0.13);
}

.chat-row.tone-whisper {
  --chat-accent: rgba(176, 126, 255, 0.84);
  --chat-accent-soft: rgba(176, 126, 255, 0.15);
  --chat-bubble: rgba(22, 17, 42, 0.96);
  --chat-bubble-bottom: rgba(6, 10, 25, 0.96);
}

.chat-row.tone-own {
  --chat-accent: rgba(150, 194, 222, 0.38);
  --chat-accent-soft: rgba(150, 194, 222, 0.1);
  --chat-bubble: rgba(5, 18, 30, 0.92);
  --chat-bubble-bottom: rgba(2, 8, 15, 0.94);
  grid-template-columns: minmax(0, 1fr) 36px;
}

.chat-row.role-gm {
  --chat-accent: rgba(255, 211, 106, 0.98);
  --chat-accent-soft: rgba(255, 211, 106, 0.2);
  --chat-bubble: rgba(34, 27, 12, 0.97);
  --chat-bubble-bottom: rgba(10, 10, 12, 0.96);
  --chat-name-color: #ffd66a;
}

.chat-row.role-ai {
  --chat-accent: rgba(154, 162, 173, 0.58);
  --chat-accent-soft: rgba(154, 162, 173, 0.08);
  --chat-bubble: rgba(27, 30, 35, 0.96);
  --chat-bubble-bottom: rgba(14, 16, 20, 0.97);
  --chat-name-color: #d2d6dc;
  grid-template-columns: minmax(0, 1fr);
}

.chat-row.role-ai .chat-body {
  border-color: rgba(154, 162, 173, 0.24);
  box-shadow:
    inset 3px 0 0 rgba(154, 162, 173, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    inset 0 -1px 0 rgba(0, 0, 0, 0.34),
    0 8px 17px rgba(0, 0, 0, 0.25);
}

.chat-row.role-ai .chat-meta strong {
  color: #d2d6dc;
  text-shadow: none;
}

.chat-row.role-ai .chat-channel {
  border-color: rgba(154, 162, 173, 0.16);
  color: #bfc5cd;
  background: rgba(63, 68, 76, 0.28);
}

.chat-row.role-vip {
  --chat-accent: rgba(190, 126, 255, 0.9);
  --chat-accent-soft: rgba(190, 126, 255, 0.17);
  --chat-bubble: rgba(28, 18, 55, 0.96);
  --chat-bubble-bottom: rgba(8, 12, 30, 0.95);
  --chat-name-color: #ead6ff;
}

.chat-row.role-rank-1 {
  --chat-accent: rgba(24, 237, 235, 0.95);
  --chat-accent-soft: rgba(24, 237, 235, 0.2);
  --chat-bubble: rgba(4, 34, 44, 0.98);
  --chat-bubble-bottom: rgba(2, 12, 19, 0.97);
  --chat-name-color: #18edeb;
  --chat-rank-badge-top: rgba(13, 108, 126, 0.9);
  --chat-rank-badge-bottom: rgba(4, 39, 52, 0.88);
}

.chat-row.role-rank-2 {
  --chat-accent: rgba(24, 237, 235, 0.95);
  --chat-accent-soft: rgba(24, 237, 235, 0.2);
  --chat-bubble: rgba(4, 34, 44, 0.98);
  --chat-bubble-bottom: rgba(2, 12, 19, 0.97);
  --chat-name-color: #18edeb;
  --chat-rank-badge-top: rgba(13, 108, 126, 0.9);
  --chat-rank-badge-bottom: rgba(4, 39, 52, 0.88);
}

.chat-row.role-rank-3 {
  --chat-accent: rgba(24, 237, 235, 0.92);
  --chat-accent-soft: rgba(24, 237, 235, 0.17);
  --chat-bubble: rgba(4, 31, 41, 0.97);
  --chat-bubble-bottom: rgba(2, 11, 18, 0.96);
  --chat-name-color: #18edeb;
  --chat-rank-badge-top: rgba(12, 94, 114, 0.88);
  --chat-rank-badge-bottom: rgba(4, 34, 47, 0.86);
}

.chat-row.role-rank-4 {
  --chat-accent: rgba(24, 237, 235, 0.89);
  --chat-accent-soft: rgba(24, 237, 235, 0.14);
  --chat-bubble: rgba(4, 28, 37, 0.97);
  --chat-bubble-bottom: rgba(2, 10, 17, 0.96);
  --chat-name-color: #18edeb;
  --chat-rank-badge-top: rgba(10, 81, 101, 0.86);
  --chat-rank-badge-bottom: rgba(4, 29, 42, 0.84);
}

.chat-row.role-rank-5 {
  --chat-accent: rgba(24, 237, 235, 0.86);
  --chat-accent-soft: rgba(24, 237, 235, 0.11);
  --chat-bubble: rgba(4, 25, 34, 0.96);
  --chat-bubble-bottom: rgba(2, 10, 17, 0.95);
  --chat-name-color: #18edeb;
  --chat-rank-badge-top: rgba(9, 70, 91, 0.84);
  --chat-rank-badge-bottom: rgba(4, 25, 38, 0.82);
}

.chat-avatar {
  width: 34px;
  height: 34px;
  margin-bottom: 2px;
  border: 1px solid rgba(246, 198, 107, 0.55);
  border-radius: 50%;
  object-fit: cover;
  box-shadow:
    0 0 0 2px rgba(0, 8, 16, 0.72),
    0 0 16px var(--chat-accent-soft),
    0 5px 13px rgba(0, 0, 0, 0.42);
}

.chat-body,
.chat-meta {
  min-width: 0;
}

.chat-body {
  position: relative;
  justify-self: start;
  width: fit-content;
  max-width: min(78%, 620px);
  padding: 9px 11px 10px 13px;
  overflow: hidden;
  border: 1px solid rgba(83, 157, 211, 0.22);
  border-radius: 11px 11px 11px 4px;
  background:
    radial-gradient(circle at 0% 0%, var(--chat-accent-soft), transparent 44%),
    linear-gradient(180deg, var(--chat-bubble), var(--chat-bubble-bottom));
  box-shadow:
    inset 3px 0 0 var(--chat-accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.34),
    0 11px 22px rgba(0, 0, 0, 0.32);
}

.chat-row.tone-own .chat-avatar {
  grid-column: 2;
}

.chat-row.tone-own .chat-body {
  grid-column: 1;
  justify-self: end;
  border-color: rgba(246, 198, 107, 0.28);
  border-radius: 11px 11px 4px 11px;
  box-shadow:
    inset -3px 0 0 var(--chat-accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.34),
    0 11px 22px rgba(0, 0, 0, 0.32);
}

.chat-row.role-normal .chat-body,
.chat-row.role-own .chat-body {
  width: auto;
  max-width: min(82%, 660px);
  padding: 3px 0 5px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.chat-row.role-own .chat-body {
  justify-self: end;
  text-align: right;
}

.chat-row.role-normal .chat-meta strong,
.chat-row.role-own .chat-meta strong {
  color: #ffffff;
  text-shadow: none;
}

.chat-row.tone-system .chat-body {
  justify-self: center;
  max-width: 92%;
  padding: 7px 14px;
  border-color: rgba(246, 198, 107, 0.28);
  border-radius: 999px;
  text-align: center;
  background:
    linear-gradient(90deg, transparent, rgba(246, 198, 107, 0.13), transparent),
    rgba(6, 12, 18, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 0 22px rgba(246, 198, 107, 0.07);
}

.chat-row.tone-announcement {
  grid-template-columns: minmax(0, 1fr);
  padding: 4px 0;
}

.chat-announcement {
  position: relative;
  isolation: isolate;
  justify-self: center;
  width: min(88%, 760px);
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(246, 198, 107, 0.38);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 0%, rgba(246, 198, 107, 0.14), transparent 36%),
    linear-gradient(180deg, rgba(28, 23, 14, 0.98), rgba(7, 11, 15, 0.98));
  box-shadow:
    inset 2px 0 0 rgba(246, 198, 107, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 28px rgba(0, 0, 0, 0.34),
    0 0 22px rgba(246, 198, 107, 0.09);
}

.chat-announcement.is-new {
  animation: chat-announcement-enter 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.chat-announcement::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 3%, #f6c66b 24%, #fff0bf 50%, #f6c66b 76%, transparent 97%);
  box-shadow: 0 0 14px rgba(246, 198, 107, 0.34);
}

.chat-announcement::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: -44%;
  width: 28%;
  pointer-events: none;
  opacity: 0;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 229, 164, 0.13), transparent);
}

.chat-announcement.is-new::after {
  animation: chat-announcement-sweep 1050ms ease-out 160ms 1 both;
}

.chat-announcement-head,
.chat-announcement-message {
  position: relative;
  z-index: 1;
}

.chat-announcement-head {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  padding: 10px 12px 9px;
  border-bottom: 1px solid rgba(246, 198, 107, 0.14);
  background: rgba(8, 12, 16, 0.36);
}

.chat-announcement-icon {
  width: 25px;
  height: 25px;
  color: #f6c66b;
  filter: drop-shadow(0 0 7px rgba(246, 198, 107, 0.34));
}

.chat-announcement-avatar {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(246, 198, 107, 0.5);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(0, 7, 12, 0.72), 0 0 12px rgba(246, 198, 107, 0.12);
}

.chat-announcement-identity {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 2px;
}

.chat-announcement-label {
  color: #f6c66b;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: 0;
}

.chat-announcement-author {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.chat-announcement-author > strong {
  min-width: 0;
  overflow: hidden;
  color: #fff2c8;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(246, 198, 107, 0.22);
}

.chat-announcement-meta {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.chat-announcement-meta time {
  color: #9fb6c5;
  font-size: 11px;
  white-space: nowrap;
}

.chat-announcement-delete {
  display: inline-grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #b5c6d0;
  background: transparent;
  opacity: 0.62;
  transition: opacity 150ms ease, color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.chat-announcement-delete:hover,
.chat-announcement-delete:focus-visible {
  border-color: rgba(255, 118, 118, 0.32);
  color: #ffd2d2;
  background: rgba(114, 28, 35, 0.24);
  opacity: 1;
}

.chat-announcement-delete-icon {
  width: 16px;
  height: 16px;
}

.chat-announcement-message {
  max-width: none;
  margin: 0;
  padding: 12px 14px 14px;
  overflow: visible;
  color: #f7f8f9;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.55;
  text-align: left;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

@keyframes chat-announcement-enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes chat-announcement-sweep {
  0% {
    left: -44%;
    opacity: 0;
  }
  22% {
    opacity: 1;
  }
  100% {
    left: 118%;
    opacity: 0;
  }
}

@media (max-width: 680px) {
  .chat-row.tone-announcement {
    padding: 2px 0;
  }

  .chat-announcement {
    width: 100%;
  }

  .chat-announcement-head {
    gap: 7px;
    padding: 9px 9px 8px;
  }

  .chat-announcement-icon {
    width: 22px;
    height: 22px;
  }

  .chat-announcement-avatar {
    width: 26px;
    height: 26px;
  }

  .chat-announcement-message {
    padding: 11px 11px 12px;
    font-size: 14px;
  }
}

.chat-row.role-gm .chat-body,
.chat-row.role-vip .chat-body,
.chat-row.role-rank-1 .chat-body,
.chat-row.role-rank-2 .chat-body,
.chat-row.role-rank-3 .chat-body,
.chat-row.role-rank-4 .chat-body,
.chat-row.role-rank-5 .chat-body {
  border-color: color-mix(in srgb, var(--chat-accent) 42%, rgba(83, 157, 211, 0.22));
}

.chat-row.role-rank-1 .chat-body {
  --chat-rank-border-glow: rgba(24, 237, 235, 0.94);
  --chat-rank-border-glow-soft: rgba(24, 237, 235, 0.5);
  border-color: rgba(24, 237, 235, 0.68);
  box-shadow:
    inset 4px 0 0 rgba(24, 237, 235, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.065),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 12px 23px rgba(0, 0, 0, 0.33),
    0 0 20px rgba(24, 237, 235, 0.14);
}

.chat-row.role-rank-2 .chat-body {
  --chat-rank-border-glow: rgba(24, 237, 235, 0.94);
  --chat-rank-border-glow-soft: rgba(24, 237, 235, 0.5);
  border-color: rgba(24, 237, 235, 0.68);
  box-shadow:
    inset 4px 0 0 rgba(24, 237, 235, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.065),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 12px 23px rgba(0, 0, 0, 0.33),
    0 0 20px rgba(24, 237, 235, 0.14);
}

.chat-row.role-rank-3 .chat-body {
  border-color: rgba(24, 237, 235, 0.58);
  box-shadow:
    inset 3px 0 0 rgba(24, 237, 235, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.058),
    inset 0 -1px 0 rgba(0, 0, 0, 0.34),
    0 11px 22px rgba(0, 0, 0, 0.32),
    0 0 16px rgba(24, 237, 235, 0.11);
}

.chat-row.role-rank-4 .chat-body {
  border-color: rgba(24, 237, 235, 0.5);
  box-shadow:
    inset 3px 0 0 rgba(24, 237, 235, 0.23),
    inset 0 1px 0 rgba(255, 255, 255, 0.052),
    inset 0 -1px 0 rgba(0, 0, 0, 0.34),
    0 11px 22px rgba(0, 0, 0, 0.31),
    0 0 12px rgba(24, 237, 235, 0.08);
}

.chat-row.role-rank-5 .chat-body {
  border-color: rgba(24, 237, 235, 0.43);
  box-shadow:
    inset 3px 0 0 rgba(24, 237, 235, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.048),
    inset 0 -1px 0 rgba(0, 0, 0, 0.34),
    0 11px 22px rgba(0, 0, 0, 0.3),
    0 0 10px rgba(24, 237, 235, 0.06);
}

.chat-row.role-gm .chat-body::after,
.chat-row.role-vip .chat-body::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 18%, rgba(255, 255, 255, 0.16) 45%, transparent 64%);
  opacity: 0.3;
  transform: translateX(-82%);
  animation: chat-bubble-sheen 8s ease-in-out infinite;
}

.chat-row.role-rank-1 .chat-body::before,
.chat-row.role-rank-2 .chat-body::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  background:
    linear-gradient(
      115deg,
      transparent 0%,
      transparent 34%,
      var(--chat-rank-border-glow-soft) 43%,
      var(--chat-rank-border-glow) 49%,
      rgba(255, 255, 255, 0.95) 52%,
      var(--chat-rank-border-glow) 55%,
      var(--chat-rank-border-glow-soft) 62%,
      transparent 72%,
      transparent 100%
    );
  background-size: 200% 200%;
  opacity: 1;
  filter: drop-shadow(0 0 8px var(--chat-rank-border-glow-soft));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: chat-rank-border-shimmer 6.4s ease-in-out infinite;
}

.chat-row.role-rank-1 .chat-body::before,
.chat-row.role-rank-2 .chat-body::before {
  opacity: 0.95;
  animation-duration: 7s;
}

.chat-row.role-gm .chat-meta strong {
  color: var(--chat-name-color);
  text-shadow: 0 0 14px rgba(255, 211, 106, 0.3);
}

.chat-row.role-vip .chat-meta strong {
  color: var(--chat-name-color);
  text-shadow: 0 0 13px rgba(190, 126, 255, 0.26);
}

.chat-row.role-rank-1 .chat-meta strong,
.chat-row.role-rank-2 .chat-meta strong,
.chat-row.role-rank-3 .chat-meta strong,
.chat-row.role-rank-4 .chat-meta strong,
.chat-row.role-rank-5 .chat-meta strong {
  color: var(--chat-name-color);
  text-shadow: 0 0 13px var(--chat-accent-soft);
}

.chat-row.role-rank-1 .chat-meta strong,
.chat-row.role-rank-2 .chat-meta strong {
  --chat-rank-name-shimmer: rgba(24, 237, 235, 0.95);
  --chat-rank-name-shimmer-soft: rgba(24, 237, 235, 0.56);
  --chat-rank-name-shimmer-core: rgba(224, 255, 255, 1);
}

.chat-row.role-rank-3 .chat-meta strong {
  --chat-rank-name-shimmer: rgba(24, 237, 235, 0.88);
  --chat-rank-name-shimmer-soft: rgba(24, 237, 235, 0.42);
  --chat-rank-name-shimmer-core: rgba(224, 255, 255, 0.98);
}

.chat-row.role-rank-1 .chat-meta strong,
.chat-row.role-rank-2 .chat-meta strong,
.chat-row.role-rank-3 .chat-meta strong {
  position: relative;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-row.role-rank-1 .chat-meta strong::after,
.chat-row.role-rank-2 .chat-meta strong::after,
.chat-row.role-rank-3 .chat-meta strong::after {
  content: attr(data-chat-name);
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  color: transparent;
  background:
    linear-gradient(
      100deg,
      transparent 0%,
      transparent 24%,
      var(--chat-rank-name-shimmer-soft) 36%,
      var(--chat-rank-name-shimmer) 46%,
      var(--chat-rank-name-shimmer-core) 52%,
      var(--chat-rank-name-shimmer) 60%,
      var(--chat-rank-name-shimmer-soft) 72%,
      transparent 86%,
      transparent 100%
    );
  background-size: 170% 100%;
  background-position: 140% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(0 0 8px var(--chat-rank-name-shimmer-soft))
    drop-shadow(0 0 14px var(--chat-rank-name-shimmer-soft));
  animation: chat-rank-name-shimmer 4.8s ease-in-out infinite;
}

.chat-row.role-rank-1 .chat-meta strong::after,
.chat-row.role-rank-2 .chat-meta strong::after {
  animation-duration: 5.4s;
}

.chat-row.role-rank-3 .chat-meta strong::after {
  opacity: 1;
  animation-duration: 6s;
}

.chat-row.role-gm .chat-avatar {
  border-color: var(--chat-accent);
  box-shadow:
    0 0 0 2px rgba(0, 8, 16, 0.74),
    0 0 18px var(--chat-accent-soft),
    0 5px 13px rgba(0, 0, 0, 0.42);
}

.chat-row:not(.role-normal):not(.role-own):hover .chat-body {
  border-color: rgba(96, 170, 222, 0.28);
  box-shadow:
    inset 3px 0 0 var(--chat-accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 10px 20px rgba(0, 0, 0, 0.28),
    0 0 18px var(--chat-accent-soft);
}

.chat-row.tone-own:not(.role-own):hover .chat-body {
  box-shadow:
    inset -3px 0 0 var(--chat-accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 10px 20px rgba(0, 0, 0, 0.28),
    0 0 18px var(--chat-accent-soft);
}

.chat-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  max-width: 100%;
}

.chat-speaker,
.chat-meta time {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-speaker {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 5px;
}

.chat-meta strong {
  flex: 0 1 auto;
  max-width: 210px;
  font-weight: 800;
}

.chat-speaker strong[role="button"] {
  cursor: pointer;
  outline: none;
  border-radius: 4px;
}

.chat-speaker strong[role="button"]:hover,
.chat-speaker strong[role="button"]:focus-visible {
  color: #f7d783;
  text-shadow: 0 0 12px rgba(246, 198, 107, 0.34);
}

.chat-badge,
.chat-channel,
.chat-status {
  flex: 0 0 auto;
  justify-self: start;
  padding: 1px 6px 2px;
  border-radius: 5px;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  background: rgba(93, 73, 169, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.chat-status {
  border: 1px solid rgba(255, 255, 255, 0.12);
  letter-spacing: 0;
}

.chat-status-gm {
  border-color: rgba(255, 205, 106, 0.56);
  color: #ffe8ac;
  background: linear-gradient(180deg, rgba(118, 86, 30, 0.92), rgba(45, 31, 12, 0.88));
}

.chat-status-ai {
  border-color: rgba(166, 173, 184, 0.34);
  color: #d9dde3;
  background: linear-gradient(180deg, rgba(74, 79, 87, 0.86), rgba(35, 38, 44, 0.88));
}

.chat-status-vip {
  border-color: rgba(190, 126, 255, 0.58);
  color: #f6e7ff;
  background: linear-gradient(180deg, rgba(105, 58, 174, 0.9), rgba(42, 26, 89, 0.86));
}

.chat-status-rank-1,
.chat-status-rank-2,
.chat-status-rank-3,
.chat-status-rank-4,
.chat-status-rank-5 {
  border-color: var(--chat-accent);
  color: var(--chat-name-color);
  background: linear-gradient(180deg, var(--chat-rank-badge-top), var(--chat-rank-badge-bottom));
}

.chat-status-rank-1,
.chat-status-rank-2 {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    0 0 9px rgba(24, 237, 235, 0.15);
}

.chat-status-rank-3 {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 0 7px rgba(24, 237, 235, 0.11);
}

.chat-status-rank-4 {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 0 5px rgba(24, 237, 235, 0.08);
}

.chat-status-rank-5 {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.chat-status-castle-dratan,
.chat-status-castle-merac {
  max-width: min(160px, 32vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-status-castle-dratan {
  border-color: rgba(255, 214, 96, 0.62);
  color: #ffe39a;
  background: linear-gradient(180deg, rgba(106, 77, 23, 0.9), rgba(38, 29, 10, 0.86));
}

.chat-status-castle-merac {
  border-color: rgba(255, 103, 103, 0.62);
  color: #ffd1d1;
  background: linear-gradient(180deg, rgba(113, 38, 38, 0.9), rgba(48, 16, 24, 0.86));
}

.chat-channel {
  border: 1px solid var(--chat-accent-soft);
  color: #bdefff;
  background: rgba(14, 52, 73, 0.34);
}

.chat-ai-reply-to {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #b8bec7;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-ai-sources {
  display: flex;
  max-width: min(560px, 100%);
  margin-top: 5px;
  gap: 5px;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
}

.chat-ai-sources > span {
  flex: 0 0 auto;
  color: #9da4ae;
  font-size: 10px;
}

.chat-ai-sources a {
  min-width: 0;
  max-width: 180px;
  padding: 2px 6px;
  overflow: hidden;
  border: 1px solid rgba(166, 173, 184, 0.24);
  border-radius: 999px;
  color: #d5d9df;
  background: rgba(63, 68, 76, 0.38);
  font-size: 10px;
  text-decoration: none;
  text-overflow: ellipsis;
}

.chat-ai-sources a:hover,
.chat-ai-sources a:focus-visible {
  border-color: rgba(190, 196, 205, 0.56);
  color: #ffffff;
}

.chat-meta time {
  flex: 0 0 auto;
  margin-left: 4px;
  justify-self: end;
  color: #8eb3cf;
  font-size: 12px;
}

.chat-body p {
  max-width: min(560px, 100%);
  margin: 3px 0 0;
  overflow: hidden;
  color: #e9f6ff;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.42);
}

.chat-row.role-ai .chat-body p {
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.player-action-menu {
  position: fixed;
  z-index: 80;
  display: grid;
  gap: 7px;
  min-width: 150px;
  padding: 9px;
  border: 1px solid rgba(176, 126, 255, 0.42);
  border-radius: 8px;
  background:
    radial-gradient(circle at 10% 0%, rgba(176, 126, 255, 0.2), transparent 45%),
    linear-gradient(180deg, rgba(10, 24, 42, 0.98), rgba(3, 9, 18, 0.98));
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.player-action-menu strong {
  min-width: 0;
  overflow: hidden;
  color: #f4fbff;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-action-menu button {
  min-height: 28px;
  border: 1px solid rgba(246, 198, 107, 0.54);
  border-radius: 6px;
  color: #ffe4a6;
  font-weight: 900;
  background: linear-gradient(180deg, rgba(63, 48, 22, 0.92), rgba(20, 29, 34, 0.94));
}

.chat-gm-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(246, 198, 107, 0.12);
}

.chat-gm-tools button {
  min-width: 34px;
  height: 23px;
  padding: 0 8px;
  border: 1px solid rgba(246, 198, 107, 0.34);
  border-radius: 6px;
  color: #ffe7a7;
  font-size: 11px;
  font-weight: 800;
  background:
    linear-gradient(180deg, rgba(50, 38, 18, 0.96), rgba(12, 16, 22, 0.95));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 5px 12px rgba(0, 0, 0, 0.22);
  cursor: pointer;
}

.chat-gm-tools button:hover {
  border-color: rgba(255, 215, 111, 0.62);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 16px rgba(246, 198, 107, 0.16);
}

@keyframes chat-bubble-sheen {
  0%,
  58% {
    transform: translateX(-82%);
    opacity: 0;
  }
  70% {
    opacity: 0.22;
  }
  100% {
    transform: translateX(82%);
    opacity: 0;
  }
}

@keyframes chat-rank-border-shimmer {
  0%,
  100% {
    background-position: 155% 0%;
    opacity: 0;
  }
  18% {
    opacity: 0.95;
  }
  54% {
    background-position: -55% 100%;
    opacity: 0.95;
  }
  74% {
    opacity: 0;
  }
}

@keyframes chat-rank-name-shimmer {
  0%,
  100% {
    background-position: 145% 0;
    opacity: 0;
  }
  16% {
    opacity: 1;
  }
  48% {
    background-position: -45% 0;
    opacity: 1;
  }
  66% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-announcement,
  .chat-announcement::after,
  .chat-row.role-gm .chat-body::after,
  .chat-row.role-vip .chat-body::after,
  .chat-row.role-rank-1 .chat-body::before,
  .chat-row.role-rank-2 .chat-body::before,
  .chat-row.role-rank-1 .chat-meta strong::after,
  .chat-row.role-rank-2 .chat-meta strong::after,
  .chat-row.role-rank-3 .chat-meta strong::after,
  .market-buy-status-panel.is-submitting .market-buy-step.active i,
  .market-buy-status-panel.is-pending_game_bridge .market-buy-step.active i,
  .market-buy-status-panel.is-processing .market-buy-step.active i {
    animation: none;
  }

  .chat-row.role-gm .chat-body::after,
  .chat-announcement::after,
  .chat-row.role-vip .chat-body::after,
  .chat-row.role-rank-1 .chat-body::before,
  .chat-row.role-rank-2 .chat-body::before,
  .chat-row.role-rank-1 .chat-meta strong::after,
  .chat-row.role-rank-2 .chat-meta strong::after,
  .chat-row.role-rank-3 .chat-meta strong::after {
    opacity: 0;
  }
}

.chat-compose {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px 54px;
  gap: 8px;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid rgba(61, 124, 170, 0.18);
  border-radius: 8px;
  background: rgba(0, 8, 16, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.chat-compose input {
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(88, 162, 218, 0.24);
  border-radius: 7px;
  color: #ffffff;
  background: rgba(0, 5, 11, 0.84);
  outline: none;
}

.chat-compose input:focus {
  border-color: rgba(75, 213, 255, 0.58);
  box-shadow: 0 0 0 2px rgba(75, 213, 255, 0.12);
}

.chat-emoji-toggle {
  display: inline-grid;
  width: 44px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(88, 162, 218, 0.24);
  border-radius: 7px;
  color: #8ddce6;
  background: linear-gradient(180deg, rgba(19, 42, 57, 0.92), rgba(4, 16, 26, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.chat-emoji-toggle:hover,
.chat-emoji-toggle:focus-visible,
.chat-emoji-toggle[aria-expanded="true"] {
  border-color: rgba(95, 220, 231, 0.52);
  color: #c7f7f7;
  background: linear-gradient(180deg, rgba(22, 61, 75, 0.96), rgba(5, 25, 36, 0.96));
  box-shadow: 0 0 0 2px rgba(75, 213, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.chat-emoji-toggle .ui-glyph {
  width: 20px;
  height: 20px;
}

.chat-emoji-picker {
  position: absolute;
  z-index: 24;
  right: 68px;
  bottom: calc(100% + 8px);
  width: 248px;
  max-width: calc(100vw - 36px);
  padding: 8px;
  border: 1px solid rgba(85, 178, 205, 0.34);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(10, 27, 38, 0.99), rgba(2, 10, 16, 0.99));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
}

.chat-emoji-picker[hidden] {
  display: none;
}

.chat-emoji-grid {
  display: grid;
  grid-template-columns: repeat(6, 34px);
  justify-content: space-between;
  gap: 5px;
}

.chat-emoji-grid button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #ffffff;
  font-family: "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 20px;
  line-height: 1;
  background: rgba(17, 45, 59, 0.38);
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.chat-emoji-grid button:hover,
.chat-emoji-grid button:focus-visible {
  border-color: rgba(246, 198, 107, 0.48);
  background: rgba(64, 75, 70, 0.66);
  transform: translateY(-1px);
}

.chat-compose.locked {
  border-color: rgba(246, 198, 107, 0.16);
  background:
    linear-gradient(90deg, rgba(42, 30, 11, 0.22), rgba(0, 8, 16, 0.68));
}

.chat-compose.locked input {
  cursor: not-allowed;
  color: #839bb0;
  border-color: rgba(89, 157, 209, 0.12);
  background: rgba(0, 5, 11, 0.56);
}

.chat-compose.locked input::placeholder {
  color: #8fa9bd;
}

.compact-button,
.send-button {
  height: 38px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 800;
}

.send-button {
  color: #201302;
  background: linear-gradient(180deg, #ffe7a0, #d99b3d);
}

.chat-compose.locked .compact-button,
.chat-compose.locked .chat-emoji-toggle,
.chat-compose.locked .send-button {
  cursor: not-allowed;
  color: #7f91a0;
  border-color: rgba(89, 157, 209, 0.16);
  background: linear-gradient(180deg, rgba(21, 40, 55, 0.9), rgba(5, 18, 30, 0.9));
}

.mission-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.mission-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 94px;
  gap: 11px;
  align-items: center;
  min-width: 0;
  min-height: 56px;
  padding: 8px;
  border: 1px solid rgba(94, 158, 205, 0.12);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(9, 34, 52, 0.64), rgba(3, 16, 28, 0.38));
}

.mission-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 7px;
  background:
    radial-gradient(circle at 50% 40%, rgba(75, 213, 255, 0.16), transparent 58%),
    rgba(5, 20, 33, 0.58);
}

.mission-icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(246, 198, 107, 0.2));
}

.mission-text {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.mission-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  min-width: 0;
}

.mission-main strong,
.mission-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mission-main strong {
  color: #ffffff;
  font-size: 14px;
}

.mission-main span {
  color: #b7cbe0;
  font-size: 12px;
}

.mission-row button {
  height: 34px;
  padding: 0 8px;
  overflow: hidden;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mission-row button.claimable {
  color: #201302;
  background: linear-gradient(180deg, #ffeaa8, #dc9a38);
}

.wide-button {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 38px;
  margin-top: 10px;
  font-weight: 800;
}

.ranking-list,
.guild-list,
.feed-list,
.market-list,
.party-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
}

.rank-row,
.guild-row,
.market-row,
.feed-row,
.party-row {
  min-width: 0;
  border: 1px solid rgba(94, 158, 205, 0.12);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(9, 34, 52, 0.58), rgba(3, 16, 28, 0.34));
}

.market-icon,
.feed-row img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(246, 198, 107, 0.18));
}

.market-icon {
  display: block;
  background-image: var(--market-icon-url);
  background-repeat: no-repeat;
  background-position: var(--market-icon-x, 0) var(--market-icon-y, 0);
}

img.market-icon,
.market-icon.fallback {
  background: none;
}

.rank-row,
.guild-row,
.market-row {
  display: grid;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 6px 8px;
}

.rank-row {
  grid-template-columns: 26px minmax(0, 1fr) auto;
}

.rank-row.you,
.guild-row.you {
  margin: 1px 0;
  border: 1px solid rgba(246, 198, 107, 0.46);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(246, 198, 107, 0.14), rgba(75, 213, 255, 0.06));
}

.rank-row.empty,
.guild-row.empty {
  opacity: 0.82;
}

.market-empty {
  display: grid;
  gap: 4px;
  min-height: 64px;
  padding: 12px;
  border: 1px solid rgba(96, 157, 202, 0.18);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(9, 34, 52, 0.66), rgba(1, 10, 18, 0.38));
}

.market-empty strong {
  color: #ffffff;
  font-size: 14px;
}

.market-empty span {
  color: #99bdd5;
  font-size: 12px;
  line-height: 1.45;
}

.rank-number {
  color: var(--gold);
  font-weight: 900;
  text-align: center;
}

.rank-row strong,
.guild-row strong,
.market-row strong {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-row .market-item-name {
  color: var(--market-item-color, #ffffff);
}

.market-browser-row .market-item-name {
  min-width: 0;
  overflow: hidden;
  color: var(--market-item-color, #ffffff);
  font-weight: 950;
  line-height: 1.22;
  text-overflow: ellipsis;
  text-shadow:
    0 0 10px color-mix(in srgb, var(--market-item-color, #ffffff) 24%, transparent),
    0 0 18px rgba(246, 198, 107, 0.08);
  white-space: nowrap;
}

.rank-row span:last-child,
.guild-row span,
.guild-row small,
.market-row span:last-child {
  color: #d5ecff;
  font-size: 12px;
  white-space: nowrap;
}

.score-pill,
.level-pill,
.market-price,
.party-meta,
.party-place {
  justify-self: end;
  padding: 2px 7px;
  border: 1px solid rgba(96, 157, 202, 0.17);
  border-radius: 999px;
  color: #d5ecff;
  background: rgba(1, 10, 18, 0.36);
}

.score-pill,
.market-price {
  color: #f8d37c;
}

.guild-row {
  grid-template-columns: 26px minmax(0, 1fr) 52px 66px;
}

.feed-row {
  display: grid;
  grid-template-columns: 48px 32px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 5px 8px;
}

.feed-row time {
  color: #8fb1ca;
  font-size: 12px;
}

.feed-row p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #dcebf8;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-row {
  grid-template-columns: 36px minmax(0, 1fr) auto;
}

.market-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.market-info small {
  overflow: hidden;
  color: #8fb1ca;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-info .market-seller {
  color: #d9c089;
  font-weight: 800;
  letter-spacing: 0;
  text-shadow: 0 0 10px rgba(246, 198, 107, 0.16);
}

.market-work-summary {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 5px;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.3;
  white-space: nowrap;
}

.market-work-summary .market-work-signature {
  flex: 0 1 auto;
  overflow: hidden;
  color: var(--market-work-prefix, #a88c55);
  text-overflow: ellipsis;
}

.market-work-summary strong {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--market-work-name, #6bd2ff);
  font-size: inherit;
  text-overflow: ellipsis;
}

.market-work-summary small {
  flex: 0 1 auto;
  min-width: 0;
  color: var(--market-work-bonus, #9eab9e);
}

.market-row {
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.market-row:hover,
.market-row:focus-visible {
  border-color: rgba(246, 198, 107, 0.42);
  background:
    linear-gradient(90deg, rgba(22, 53, 70, 0.78), rgba(7, 22, 34, 0.48));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 0 18px rgba(72, 191, 255, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.market-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 42;
  display: none;
  place-items: center;
  padding: 18px;
}

.market-detail-modal.open {
  display: grid;
}

.market-detail-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 14%, rgba(246, 198, 107, 0.13), transparent 28%),
    radial-gradient(circle at 50% 40%, rgba(49, 183, 255, 0.1), transparent 38%),
    rgba(0, 5, 12, 0.8);
  backdrop-filter: blur(7px);
}

.market-detail-dialog {
  position: relative;
  z-index: 1;
  width: min(640px, calc(100vw - 28px));
  max-height: calc(100vh - 34px);
  overflow: hidden;
  border: 1px solid rgba(246, 198, 107, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(10, 35, 50, 0.98), rgba(1, 8, 16, 0.98)),
    var(--panel-bg);
  box-shadow:
    0 28px 86px rgba(0, 0, 0, 0.62),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 0 54px rgba(72, 191, 255, 0.08);
}

.market-detail-dialog::before,
.market-detail-dialog::after {
  position: absolute;
  width: 54px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 226, 151, 0.86), transparent);
}

.market-detail-dialog::before {
  top: 0;
  left: 14px;
}

.market-detail-dialog::after {
  right: 14px;
  bottom: 0;
}

.market-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 17px 11px;
  border-bottom: 1px solid rgba(246, 198, 107, 0.28);
  background:
    linear-gradient(90deg, rgba(246, 198, 107, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent);
}

.market-detail-head span {
  color: #7bdcff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.market-detail-head h2 {
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--market-item-color, #ffffff);
  font-size: 21px;
  line-height: 1.18;
  text-overflow: ellipsis;
  text-shadow:
    0 0 12px rgba(246, 198, 107, 0.2),
    0 0 22px rgba(72, 191, 255, 0.08);
  white-space: nowrap;
}

.market-detail-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border-color: rgba(246, 198, 107, 0.44);
  font-size: 22px;
  line-height: 1;
}

.market-detail-body {
  display: grid;
  max-height: calc(100vh - 118px);
  gap: 10px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 14px 17px 17px;
  scrollbar-gutter: stable;
}

.market-detail-hero {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(94, 188, 225, 0.18);
  border-radius: 7px;
  background:
    radial-gradient(circle at 15% 50%, rgba(246, 198, 107, 0.14), transparent 40%),
    rgba(0, 9, 18, 0.48);
}

.market-detail-hero .market-icon {
  align-self: center;
  justify-self: center;
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(246, 198, 107, 0.22));
}

.market-detail-name {
  display: block;
  overflow: hidden;
  color: var(--market-item-color, #ffffff);
  font-size: 17px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-detail-buy-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgba(246, 198, 107, 0.34);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(246, 198, 107, 0.14), rgba(94, 188, 225, 0.07)),
    rgba(0, 9, 18, 0.64);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 22px rgba(246, 198, 107, 0.07);
}

.market-detail-buy-box strong {
  display: block;
  color: #ffd978;
  font-size: 15px;
  font-weight: 900;
  text-shadow: 0 0 14px rgba(246, 198, 107, 0.2);
}

.market-detail-buy-box small {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
  color: #9fc2d8;
  font-size: 12px;
  line-height: 1.35;
}

.market-buy-button {
  min-width: 118px;
  min-height: 38px;
  padding: 0 16px;
  border-color: rgba(255, 222, 139, 0.62);
  background:
    linear-gradient(180deg, #ffe18e 0%, #e4a63e 54%, #a96c17 100%);
  color: #211406;
  font-size: 13px;
  font-weight: 1000;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
  box-shadow:
    0 0 18px rgba(246, 198, 107, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.market-buy-button:hover:not(:disabled),
.market-buy-button:focus-visible:not(:disabled) {
  border-color: rgba(255, 238, 176, 0.82);
  box-shadow:
    0 0 26px rgba(246, 198, 107, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transform: translateY(-1px);
}

.market-buy-button:disabled {
  cursor: default;
  border-color: rgba(126, 159, 180, 0.32);
  background:
    linear-gradient(180deg, rgba(42, 74, 94, 0.9), rgba(13, 31, 45, 0.92));
  color: #a9c2d4;
  text-shadow: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.market-buy-status-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(94, 188, 225, 0.22);
  border-radius: 7px;
  background:
    radial-gradient(circle at 12% 12%, rgba(94, 188, 225, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(5, 26, 40, 0.82), rgba(0, 9, 18, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 24px rgba(33, 167, 207, 0.08);
}

.market-buy-status-panel.is-offline {
  border-color: rgba(246, 198, 107, 0.34);
  background:
    radial-gradient(circle at 12% 12%, rgba(246, 198, 107, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(39, 27, 9, 0.78), rgba(0, 9, 18, 0.72));
}

.market-buy-status-panel.is-completed {
  border-color: rgba(112, 255, 176, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 28px rgba(81, 239, 151, 0.12);
}

.market-buy-status-panel.is-failed,
.market-buy-status-panel.is-cancelled {
  border-color: rgba(255, 100, 100, 0.42);
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 100, 100, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(42, 13, 17, 0.78), rgba(0, 9, 18, 0.72));
}

.market-buy-status-head {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-width: 0;
}

.market-buy-signal {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #63ddff;
  box-shadow: 0 0 16px rgba(99, 221, 255, 0.64);
}

.market-buy-status-panel.is-offline .market-buy-signal {
  background: #ffd36d;
  box-shadow: 0 0 18px rgba(255, 211, 109, 0.62);
}

.market-buy-status-panel.is-completed .market-buy-signal {
  background: #76ffaf;
  box-shadow: 0 0 18px rgba(118, 255, 175, 0.62);
}

.market-buy-status-panel.is-failed .market-buy-signal,
.market-buy-status-panel.is-cancelled .market-buy-signal {
  background: #ff6464;
  box-shadow: 0 0 18px rgba(255, 100, 100, 0.62);
}

.market-buy-status-head strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #f3fbff;
  font-size: 13px;
  font-weight: 1000;
  line-height: 1.25;
  text-overflow: ellipsis;
  text-shadow: 0 0 14px rgba(94, 188, 225, 0.18);
  white-space: nowrap;
}

.market-buy-status-head small {
  display: block;
  min-width: 0;
  margin-top: 2px;
  color: #a8c8d9;
  font-size: 11px;
  line-height: 1.35;
}

.market-buy-status-head em {
  max-width: 96px;
  overflow: hidden;
  border: 1px solid rgba(94, 188, 225, 0.28);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(0, 13, 24, 0.62);
  color: #c7eaff;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-buy-status-panel.is-offline .market-buy-status-head em {
  border-color: rgba(246, 198, 107, 0.42);
  color: #ffdb86;
}

.market-buy-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.market-buy-step {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-width: 0;
  min-height: 30px;
  border: 1px solid rgba(94, 188, 225, 0.13);
  border-radius: 6px;
  padding: 4px 6px;
  background: rgba(0, 8, 16, 0.42);
}

.market-buy-step i {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(126, 159, 180, 0.28);
  border-radius: 50%;
  background: rgba(5, 22, 34, 0.92);
  color: #7fa2b9;
  font-size: 10px;
  font-style: normal;
  font-weight: 1000;
}

.market-buy-step b {
  min-width: 0;
  overflow: hidden;
  color: #83a9bf;
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-buy-step.done {
  border-color: rgba(112, 255, 176, 0.24);
}

.market-buy-step.done i {
  border-color: rgba(112, 255, 176, 0.5);
  background: rgba(20, 82, 53, 0.76);
  color: #baffd2;
}

.market-buy-step.done b {
  color: #d6f7e3;
}

.market-buy-step.active {
  border-color: rgba(246, 198, 107, 0.44);
  background:
    linear-gradient(90deg, rgba(246, 198, 107, 0.13), rgba(94, 188, 225, 0.05)),
    rgba(0, 8, 16, 0.54);
  box-shadow: 0 0 18px rgba(246, 198, 107, 0.12);
}

.market-buy-step.active i {
  border-color: rgba(255, 224, 145, 0.62);
  background: linear-gradient(180deg, #ffe293, #bf7a20);
  color: #241607;
  box-shadow: 0 0 16px rgba(246, 198, 107, 0.28);
}

.market-buy-step.active b {
  color: #ffe19a;
}

.market-buy-status-panel.is-submitting .market-buy-step.active i,
.market-buy-status-panel.is-pending_game_bridge .market-buy-step.active i,
.market-buy-status-panel.is-processing .market-buy-step.active i {
  animation: market-buy-pulse 1600ms ease-in-out infinite;
}

.market-buy-character-note {
  margin: -2px 0 0;
  overflow: hidden;
  color: #8daec3;
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-buy-character-note strong {
  color: #f3fbff;
  font-weight: 1000;
}

@keyframes market-buy-pulse {
  50% {
    box-shadow:
      0 0 22px rgba(246, 198, 107, 0.48),
      0 0 8px rgba(255, 244, 202, 0.28);
  }
}

.market-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.market-detail-chips span,
.market-detail-price {
  border: 1px solid rgba(96, 157, 202, 0.22);
  border-radius: 999px;
  background: rgba(1, 10, 18, 0.5);
}

.market-detail-chips span {
  padding: 2px 7px;
  color: #b9d7ea;
  font-size: 11px;
  font-weight: 800;
}

.market-detail-price {
  padding: 4px 9px;
  color: #f8d37c;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.market-detail-section {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px 0 0;
  border-top: 1px solid rgba(246, 198, 107, 0.16);
}

.market-detail-section h3 {
  margin: 0;
  color: var(--gold);
  font-size: 13px;
  text-shadow: 0 0 10px rgba(246, 198, 107, 0.18);
}

.market-work-detail {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(168, 140, 85, 0.26);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(168, 140, 85, 0.1), rgba(5, 20, 30, 0.52) 48%, rgba(107, 210, 255, 0.06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.market-work-detail > div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 7px;
}

.market-work-detail > div span {
  color: var(--market-work-prefix, #a88c55);
  font-size: 12px;
  font-weight: 850;
}

.market-work-detail > div strong {
  min-width: 0;
  overflow: hidden;
  color: var(--market-work-name, #6bd2ff);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-work-detail dl {
  display: grid;
  gap: 4px;
  margin: 0;
}

.market-work-detail dl div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px;
}

.market-work-detail dt,
.market-work-detail dd {
  margin: 0;
  font-size: 11px;
}

.market-work-detail dt {
  color: #8fb1ca;
}

.market-work-detail dd {
  color: var(--market-work-bonus, #9eab9e);
  font-weight: 750;
}

.market-detail-pair,
.market-detail-option,
.market-detail-slot {
  display: grid;
  min-width: 0;
  border: 1px solid rgba(94, 158, 205, 0.12);
  border-radius: 6px;
  background: rgba(0, 9, 18, 0.34);
}

.market-detail-pair {
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 6px 8px;
}

.market-detail-pair.has-note {
  align-items: start;
  row-gap: 2px;
}

.market-detail-pair span,
.market-detail-option span,
.market-detail-slot span,
.market-detail-slot small {
  color: #92b2c9;
  font-size: 11px;
}

.market-detail-pair small {
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
  color: rgba(160, 197, 217, 0.76);
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-detail-slot em {
  min-width: 0;
  overflow: hidden;
  color: #94b7c6;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-detail-pair strong,
.market-detail-whisper,
.market-detail-option strong,
.market-detail-slot strong {
  min-width: 0;
  overflow: hidden;
  color: #f4fbff;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-detail-whisper {
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  color: #f7d783;
  font: inherit;
  font-weight: 900;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(246, 198, 107, 0.42);
  text-underline-offset: 3px;
  background: transparent;
  cursor: pointer;
  text-shadow: 0 0 12px rgba(246, 198, 107, 0.18);
}

.market-detail-whisper:hover,
.market-detail-whisper:focus-visible {
  color: #fff0ba;
  outline: none;
  text-decoration-color: rgba(246, 198, 107, 0.82);
}

.market-detail-slots,
.market-detail-options {
  display: grid;
  gap: 6px;
}

.market-detail-slot,
.market-detail-option {
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 6px 8px;
}

.market-detail-slot.filled {
  border-color: rgba(124, 235, 255, 0.24);
  background:
    linear-gradient(90deg, rgba(25, 103, 120, 0.26), rgba(0, 9, 18, 0.38));
}

.market-detail-slot.empty {
  opacity: 0.7;
}

.market-detail-option.origin {
  border-color: rgba(204, 102, 255, 0.24);
}

.market-detail-option.rare {
  border-color: rgba(255, 92, 92, 0.34);
  background: linear-gradient(135deg, rgba(92, 18, 22, 0.36), rgba(0, 9, 18, 0.36));
}

.market-detail-option.set-effect {
  border-color: rgba(77, 201, 113, 0.32);
  background: linear-gradient(135deg, rgba(15, 64, 38, 0.34), rgba(0, 9, 18, 0.36));
}

.market-detail-description {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(159, 150, 132, 0.24);
  border-radius: 7px;
  padding: 9px 10px;
  background: rgba(0, 9, 18, 0.34);
  color: #c9c1b3;
  font-size: 12px;
  line-height: 1.55;
}

.market-detail-description p {
  margin: 0;
}

.market-detail-set-name {
  margin: 0 0 8px;
  color: #75dc8b;
  font-weight: 900;
  text-shadow: 0 0 12px rgba(49, 207, 101, 0.24);
}

.market-detail-set-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.market-detail-set-list span {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(91, 145, 110, 0.28);
  border-radius: 7px;
  padding: 7px 9px;
  color: #b3b3b3;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-detail-empty,
.market-detail-note,
.market-detail-error {
  margin: 0;
  color: #8fb1ca;
  font-size: 12px;
  line-height: 1.5;
}

.market-detail-note {
  padding-top: 2px;
  color: #7fa1b9;
}

.market-detail-loading,
.market-detail-error {
  display: grid;
  place-items: center;
  min-height: 190px;
  text-align: center;
}

.market-detail-loading span {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(94, 188, 225, 0.16);
  border-top-color: rgba(246, 198, 107, 0.92);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

.market-detail-loading strong {
  color: #d5ecff;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.market-browser-modal {
  position: fixed;
  inset: 0;
  z-index: 41;
  display: none;
  place-items: center;
  padding: 18px;
}

.market-browser-modal.open {
  display: grid;
}

.market-browser-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 45% 18%, rgba(246, 198, 107, 0.12), transparent 28%),
    radial-gradient(circle at 58% 45%, rgba(49, 183, 255, 0.11), transparent 40%),
    rgba(0, 5, 12, 0.82);
  backdrop-filter: blur(8px);
}

.market-browser-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  width: min(1020px, calc(100vw - 28px));
  max-height: calc(100vh - 34px);
  overflow: hidden;
  border: 1px solid rgba(246, 198, 107, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(10, 34, 49, 0.98), rgba(1, 8, 16, 0.98)),
    var(--panel-bg);
  box-shadow:
    0 30px 92px rgba(0, 0, 0, 0.66),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 0 60px rgba(72, 191, 255, 0.08);
}

.market-browser-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(246, 198, 107, 0.28);
  background:
    linear-gradient(90deg, rgba(246, 198, 107, 0.1), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent);
}

.market-browser-head span {
  color: #7bdcff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.market-browser-head h2 {
  margin: 2px 0 0;
  color: var(--gold);
  font-size: 22px;
  line-height: 1.1;
}

.market-browser-controls {
  display: grid;
  gap: 10px;
  padding: 13px 18px 10px;
  border-bottom: 1px solid rgba(96, 157, 202, 0.12);
}

.market-browser-categories {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.market-browser-categories button {
  flex: 0 0 auto;
  min-width: 78px;
  height: 32px;
  padding: 0 10px;
  border-color: rgba(96, 157, 202, 0.28);
  color: #cfe8f6;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(180deg, rgba(9, 31, 48, 0.92), rgba(2, 12, 22, 0.82));
}

.market-browser-categories button.active {
  border-color: rgba(246, 198, 107, 0.64);
  color: #221600;
  background: linear-gradient(180deg, #ffe9a7, #d99a39);
  box-shadow: 0 0 18px rgba(246, 198, 107, 0.14);
}

.market-browser-search {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 160px 88px;
  gap: 8px;
}

.market-browser-search input,
.market-browser-search select {
  min-width: 0;
  height: 34px;
  border: 1px solid rgba(96, 157, 202, 0.28);
  border-radius: 6px;
  padding: 0 10px;
  color: #dff2ff;
  background: rgba(0, 8, 16, 0.62);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.market-browser-search button {
  height: 34px;
  color: #201302;
  font-weight: 900;
  background: linear-gradient(180deg, #ffeaa8, #dc9a38);
}

.market-browser-summary {
  padding: 8px 18px;
  color: #98bdd5;
  font-size: 12px;
  font-weight: 800;
}

.market-browser-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 280px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 18px 12px;
  scrollbar-gutter: stable;
}

.market-browser-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  min-height: 74px;
  border: 1px solid rgba(94, 158, 205, 0.16);
  border-radius: 7px;
  padding: 10px;
  background:
    linear-gradient(90deg, rgba(9, 34, 52, 0.7), rgba(3, 16, 28, 0.44));
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.market-browser-row:hover,
.market-browser-row:focus-visible {
  border-color: rgba(246, 198, 107, 0.46);
  background:
    linear-gradient(90deg, rgba(23, 56, 75, 0.82), rgba(6, 22, 35, 0.55));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 0 20px rgba(72, 191, 255, 0.11);
  outline: none;
  transform: translateY(-1px);
}

.market-browser-icon {
  justify-self: center;
}

.market-browser-item-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.market-browser-item-main small {
  min-width: 0;
  overflow: hidden;
  color: #d9c089;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-browser-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.market-browser-chips span {
  border: 1px solid rgba(96, 157, 202, 0.2);
  border-radius: 999px;
  padding: 2px 7px;
  color: #a8c9df;
  background: rgba(1, 10, 18, 0.46);
  font-size: 11px;
  font-weight: 800;
}

.market-browser-price {
  justify-self: end;
  border: 1px solid rgba(246, 198, 107, 0.26);
  border-radius: 999px;
  padding: 4px 9px;
  color: #f8d37c;
  background: rgba(1, 10, 18, 0.48);
  font-size: 12px;
  white-space: nowrap;
}

.market-browser-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 12px 18px 15px;
  border-top: 1px solid rgba(246, 198, 107, 0.18);
}

.market-browser-foot button {
  min-width: 86px;
  height: 32px;
  font-weight: 900;
}

.market-browser-foot button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.market-browser-foot span {
  color: #b8d6e9;
  font-size: 12px;
  font-weight: 900;
}

.market-browser-loading {
  display: grid;
  place-items: center;
  min-height: 260px;
  text-align: center;
}

.market-browser-loading span {
  width: 38px;
  height: 38px;
  border: 2px solid rgba(94, 188, 225, 0.16);
  border-top-color: rgba(246, 198, 107, 0.92);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

.market-browser-loading strong {
  color: #d5ecff;
}

.party-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px 44px 76px 74px;
  gap: 7px;
  align-items: center;
  min-height: 43px;
  padding: 6px 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.party-row.owner {
  border-color: rgba(246, 198, 107, 0.28);
  background:
    linear-gradient(90deg, rgba(45, 42, 22, 0.34), rgba(3, 18, 31, 0.42));
}

.party-main {
  min-width: 0;
}

.party-row strong,
.party-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.party-row strong {
  color: #ffffff;
}

.party-row small,
.party-row span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.party-row button {
  height: 28px;
  padding: 0 8px;
  border-color: rgba(246, 198, 107, 0.52);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(180deg, rgba(53, 53, 42, 0.86), rgba(8, 25, 38, 0.9));
}

.party-row button:disabled {
  cursor: default;
  opacity: 0.58;
  transform: none;
}

.party-detail {
  grid-column: 1 / -1;
  min-width: 0;
  margin: -1px 0 0;
  overflow: hidden;
  color: #91adc3;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.party-my-request {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid rgba(91, 184, 226, 0.18);
  border-radius: 6px;
  color: #b9d8ea;
  font-size: 11px;
  line-height: 1.35;
  background: linear-gradient(90deg, rgba(0, 22, 34, 0.74), rgba(3, 12, 22, 0.42));
}

.party-my-request span {
  flex: 0 0 auto;
  min-width: 52px;
  padding: 2px 7px;
  border: 1px solid rgba(96, 157, 202, 0.22);
  border-radius: 999px;
  color: #d8f2ff;
  font-weight: 900;
  text-align: center;
  background: rgba(1, 10, 18, 0.54);
}

.party-my-request.accepted {
  border-color: rgba(117, 255, 173, 0.3);
  color: #dcffe8;
  background: linear-gradient(90deg, rgba(18, 87, 58, 0.42), rgba(3, 17, 24, 0.48));
}

.party-my-request.accepted span {
  border-color: rgba(117, 255, 173, 0.34);
  color: #8dffba;
}

.party-my-request.rejected {
  border-color: rgba(255, 108, 108, 0.24);
  color: #ffcaca;
  background: linear-gradient(90deg, rgba(88, 22, 28, 0.34), rgba(3, 17, 24, 0.48));
}

.party-my-request.rejected span {
  border-color: rgba(255, 108, 108, 0.3);
  color: #ffb7b7;
}

.party-requests {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  min-width: 0;
  margin-top: 3px;
  padding-top: 7px;
  border-top: 1px solid rgba(246, 198, 107, 0.16);
}

.party-request {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 48px 64px;
  gap: 6px;
  align-items: center;
  min-width: 0;
  padding: 6px;
  border: 1px solid rgba(92, 158, 205, 0.14);
  border-radius: 6px;
  background: rgba(1, 9, 18, 0.42);
}

.party-request.accepted {
  border-color: rgba(112, 255, 169, 0.22);
}

.party-request.rejected {
  opacity: 0.7;
}

.party-request-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.party-request-main strong,
.party-request-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.party-request-main strong {
  color: #ffffff;
  font-size: 12px;
}

.party-request-main small {
  color: #8faec4;
  font-size: 11px;
}

.party-request-status {
  justify-self: end;
  padding: 2px 7px;
  border: 1px solid rgba(96, 157, 202, 0.2);
  border-radius: 999px;
  color: #d7ecff;
  font-size: 11px;
  background: rgba(0, 11, 20, 0.5);
}

.party-request button {
  height: 26px;
  padding: 0 7px;
  font-size: 11px;
}

.party-request button[data-party-request-action="accept"] {
  color: #201302;
  background: linear-gradient(180deg, #ffedae, #d79835);
}

.party-empty {
  display: grid;
  gap: 8px;
  min-height: 116px;
  align-content: center;
  padding: 14px;
  border: 1px solid rgba(93, 175, 214, 0.18);
  border-radius: 7px;
  background:
    radial-gradient(circle at 18% 10%, rgba(73, 216, 255, 0.1), transparent 34%),
    linear-gradient(135deg, rgba(8, 39, 59, 0.72), rgba(2, 13, 24, 0.62));
  box-shadow: inset 0 0 24px rgba(32, 140, 189, 0.08);
}

.party-empty strong {
  color: #ffffff;
  font-size: 14px;
}

.party-empty span {
  color: #9eb8cc;
  font-size: 12px;
  line-height: 1.5;
}

.party-create-inline,
.party-submit,
.party-cancel,
.party-dialog-close {
  border: 1px solid rgba(246, 198, 107, 0.48);
  border-radius: 7px;
  color: var(--gold);
  font-family: inherit;
  font-weight: 900;
  background: linear-gradient(180deg, rgba(39, 55, 62, 0.94), rgba(8, 24, 36, 0.96));
}

.party-create-inline {
  justify-self: start;
  height: 30px;
  padding: 0 12px;
}

.party-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  place-items: center;
  padding: 18px;
}

.party-modal.open {
  display: grid;
}

.party-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(51, 193, 255, 0.14), transparent 32%),
    rgba(0, 5, 12, 0.78);
  backdrop-filter: blur(8px);
}

.party-dialog {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  border: 1px solid rgba(94, 188, 225, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(10, 38, 58, 0.98), rgba(2, 13, 24, 0.98)),
    var(--panel-bg);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.52),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    inset 0 0 42px rgba(72, 191, 255, 0.08);
}

.party-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px 10px;
  border-bottom: 1px solid rgba(246, 198, 107, 0.22);
}

.party-dialog-head span {
  color: #7bdcff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.party-dialog-head h2 {
  margin: 2px 0 0;
  color: var(--gold);
  font-size: 20px;
}

.party-dialog-close {
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.market-detail-close,
.party-dialog-close,
.tab-row .chat-tab-close {
  position: relative;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(112, 204, 246, 0.36);
  color: transparent;
  font-size: 0;
  line-height: 1;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.16), transparent 28%),
    radial-gradient(circle at 70% 78%, rgba(246, 198, 107, 0.2), transparent 38%),
    linear-gradient(180deg, rgba(13, 45, 64, 0.92), rgba(3, 14, 26, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(246, 198, 107, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.025),
    0 10px 24px rgba(0, 0, 0, 0.3);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.market-detail-close,
.party-dialog-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.tab-row .chat-tab-close {
  width: 28px;
  min-width: 28px;
  height: 28px;
  margin: 1px 0 0 4px;
  border-left-color: rgba(112, 204, 246, 0.36);
  border-radius: 50%;
}

.market-detail-close::before,
.market-detail-close::after,
.party-dialog-close::before,
.party-dialog-close::after,
.tab-row .chat-tab-close::before,
.tab-row .chat-tab-close::after {
  position: absolute;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  content: "";
  background: linear-gradient(90deg, #d7f6ff, #fff0b8 54%, #f4bf58);
  box-shadow:
    0 0 8px rgba(126, 222, 255, 0.42),
    0 0 12px rgba(246, 198, 107, 0.24);
}

.tab-row .chat-tab-close::before,
.tab-row .chat-tab-close::after {
  width: 11px;
  height: 2px;
}

.market-detail-close::before,
.party-dialog-close::before,
.tab-row .chat-tab-close::before {
  transform: rotate(45deg);
}

.market-detail-close::after,
.party-dialog-close::after,
.tab-row .chat-tab-close::after {
  transform: rotate(-45deg);
}

.market-detail-close:hover,
.market-detail-close:focus-visible,
.party-dialog-close:hover,
.party-dialog-close:focus-visible,
.tab-row .chat-tab-close:hover,
.tab-row .chat-tab-close:focus-visible {
  border-color: rgba(255, 231, 158, 0.72);
  outline: none;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.22), transparent 30%),
    radial-gradient(circle at 72% 78%, rgba(246, 198, 107, 0.28), transparent 40%),
    linear-gradient(180deg, rgba(24, 67, 83, 0.96), rgba(5, 18, 31, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(246, 198, 107, 0.2),
    0 0 18px rgba(90, 214, 255, 0.18),
    0 0 20px rgba(246, 198, 107, 0.14),
    0 12px 26px rgba(0, 0, 0, 0.34);
  transform: translateY(-1px);
}

.market-detail-close:active,
.party-dialog-close:active,
.tab-row .chat-tab-close:active {
  transform: translateY(0);
}

.party-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 18px 18px;
}

.party-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.party-field.wide,
.party-form-note,
.party-form-actions {
  grid-column: 1 / -1;
}

.party-field span:first-child {
  color: #b7d3e7;
  font-size: 12px;
  font-weight: 800;
}

.party-field input,
.party-field select,
.party-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(89, 169, 211, 0.24);
  border-radius: 7px;
  color: #edf8ff;
  font: inherit;
  background: rgba(0, 9, 18, 0.58);
  box-shadow: inset 0 1px 10px rgba(0, 0, 0, 0.24);
}

.party-field input,
.party-field select {
  height: 38px;
  padding: 0 10px;
}

.party-field textarea {
  resize: vertical;
  min-height: 72px;
  padding: 10px;
}

.party-member-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 6px;
  align-items: center;
}

.party-member-pair i {
  color: var(--gold);
  font-style: normal;
  font-weight: 900;
}

.party-form-note {
  margin: 0;
  color: #9db9cc;
  font-size: 12px;
  line-height: 1.5;
}

.party-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.party-submit,
.party-cancel {
  min-width: 112px;
  height: 38px;
  padding: 0 14px;
}

.party-submit {
  color: #201302;
  background: linear-gradient(180deg, #ffeaa8, #dc9a38);
}

.aura-gold,
.aura-cyan,
.aura-purple,
.aura-blue {
  font-weight: 800;
}

.aura-gold {
  color: var(--gold);
}

.aura-cyan {
  color: var(--cyan);
}

.aura-purple {
  color: var(--purple);
}

.aura-blue {
  color: #7ab6ff;
}

.footer {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(220px, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 64px;
  margin-top: 14px;
  padding: 14px 8px;
  border-top: 1px solid rgba(75, 143, 194, 0.24);
  color: #92a8bb;
}

.footer nav,
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.footer a {
  color: #adc3d4;
  font-size: 13px;
}

.socials span {
  color: #d7e6f1;
  font-size: 12px;
  text-transform: uppercase;
}

.socials a {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(78, 147, 202, 0.38);
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  background: rgba(8, 35, 56, 0.74);
}

.footer p {
  justify-self: end;
  margin: 0;
  font-size: 12px;
}

.mobile-bottom {
  display: none;
}

.toast {
  position: fixed;
  z-index: 60;
  right: 20px;
  bottom: 20px;
  max-width: min(360px, calc(100vw - 40px));
  padding: 12px 14px;
  border: 1px solid rgba(246, 198, 107, 0.5);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(180deg, rgba(12, 42, 63, 0.96), rgba(3, 15, 27, 0.96));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.18);
  }
}

@keyframes slowSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes energySweep {
  0%,
  100% {
    opacity: 0.28;
    transform: translateX(-5%) skewX(-16deg);
  }
  50% {
    opacity: 0.75;
    transform: translateX(18%) skewX(-16deg);
  }
}

@media (max-width: 1540px) {
  .app-shell {
    width: min(calc(100% - 24px), 1540px);
  }

  .topbar {
    grid-template-columns: 226px minmax(0, 1fr) 410px;
  }

  .brand {
    height: 62px;
    padding-right: 12px;
  }

  .brand-art {
    height: 62px;
  }

  .brand-main {
    font-size: 35px;
  }

  .top-nav {
    grid-template-columns: repeat(9, minmax(0, 1fr));
    width: 100%;
    gap: 0;
  }

  .top-nav .nav-tab:not(:first-child) {
    margin-left: -5px;
  }

  .top-nav .nav-tab {
    grid-template-rows: 31px 1fr;
    height: 64px;
    padding: 6px 9px 6px;
  }

  .top-nav .nav-tab img {
    width: 28px;
    height: 28px;
  }

  .top-nav .nav-tab.active img {
    width: 32px;
    height: 32px;
  }

  .top-nav .nav-tab span {
    font-size: 12px;
  }

  .user-mini {
    min-width: 142px;
    padding-right: 16px;
  }

  .dashboard {
    grid-template-columns: 272px minmax(610px, 1fr) minmax(360px, 460px);
    gap: 12px;
  }

  .event-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .event-card > img {
    width: 58px;
    height: 58px;
  }

  .hero h1 {
    font-size: 40px;
  }
}

@media (min-width: 1361px) {
  .event-grid {
    grid-auto-rows: calc((370px - 24px) / 3);
  }

  .event-card {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 10px;
    height: 100%;
    min-height: 0;
    padding: 10px;
  }

  .event-card > img {
    width: 60px;
    height: 60px;
  }

  .event-card h2 {
    font-size: 15px;
  }

  .event-card strong {
    font-size: 18px;
  }

  .event-card p {
    margin: 2px 0 1px;
    font-size: 13px;
  }

  .event-card small {
    font-size: 10px;
  }

  .event-meter {
    margin-top: 6px;
  }
}

@media (max-width: 1360px) {
  .topbar {
    grid-template-columns: 220px auto minmax(0, 1fr);
  }

  .user-strip {
    justify-content: flex-end;
  }

  .top-nav {
    display: none;
  }

  .mobile-menu {
    display: grid;
    gap: 4px;
    place-content: center;
    width: 46px;
    height: 42px;
    border: 1px solid rgba(100, 173, 224, 0.42);
    border-radius: 8px;
    background: rgba(8, 35, 56, 0.88);
  }

  .mobile-menu span {
    display: block;
    width: 20px;
    height: 2px;
    background: #dcefff;
  }

  .mobile-nav-drawer {
    display: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: -4px 0 12px;
    padding: 10px;
    border: 1px solid rgba(88, 162, 218, 0.28);
    border-radius: 8px;
    background: rgba(2, 14, 25, 0.96);
  }

  .mobile-nav-drawer.open {
    display: grid;
  }

  .drawer-tab {
    height: 46px;
    clip-path: none;
  }

  .dashboard {
    grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  }

  .profile-window {
    position: static;
    min-height: 0;
  }

  .main-stack {
    order: 2;
  }

  .right-stack {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    order: 3;
  }

  .event-grid,
  .party-panel {
    grid-column: 1 / -1;
  }

  .event-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer {
    grid-template-columns: 1fr;
  }

  .footer p {
    justify-self: start;
  }
}

@media (max-width: 920px) {
  body {
    background-attachment: scroll;
  }

  .market-detail-dialog {
    width: min(720px, calc(100vw - 18px));
  }

  .market-detail-hero {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .market-detail-price {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .market-detail-buy-box {
    grid-template-columns: minmax(0, 1fr);
  }

  .market-buy-button {
    justify-self: start;
  }

  .market-browser-dialog {
    width: min(760px, calc(100vw - 18px));
  }

  .market-browser-search {
    grid-template-columns: minmax(0, 1fr);
  }

  .market-browser-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .market-browser-price {
    grid-column: 2;
    justify-self: start;
  }

  .market-browser-list {
    min-height: 240px;
  }

  .notification-popover {
    top: 74px;
    right: 10px;
    left: 10px;
    width: auto;
  }

  .notification-list {
    max-height: min(420px, calc(100vh - 150px));
  }

  .app-shell {
    width: min(calc(100% - 18px), 760px);
    padding-bottom: 78px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) 46px 42px;
    gap: 8px;
  }

  .brand {
    padding-left: 0;
    height: 52px;
  }

  .brand-art {
    width: min(202px, 100%);
    height: 52px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .brand-main {
    font-size: 24px;
  }

  .user-strip {
    gap: 6px;
  }

  .currency-chip {
    justify-content: center;
    width: 42px;
    min-width: 42px;
    padding: 0;
  }

  .currency-chip img {
    width: 28px;
    height: 28px;
  }

  .currency-chip strong {
    display: none;
  }

  .icon-button {
    display: none;
  }

  .user-mini {
    display: none;
  }

  .user-mini span {
    display: none;
  }

  .user-mini i {
    display: none;
  }

  .server-strip,
  .dashboard,
  .content-grid,
  .lower-grid,
  .right-stack {
    grid-template-columns: 1fr;
  }

  .content-grid {
    grid-template-areas:
      "chat"
      "mission"
      "market"
      "feed";
  }

  .chat-panel {
    height: min(650px, calc(100vh - 112px));
    min-height: 0;
  }

  .chat-list {
    min-height: 0;
  }

  .server-strip {
    gap: 8px;
  }

  .ticker-window {
    min-height: 24px;
    border-right: 0;
    border-left: 0;
  }

  .patch-button {
    width: 100%;
  }

  .mobile-nav-drawer.open {
    grid-template-columns: 1fr 1fr;
  }

  .main-stack {
    order: 1;
  }

  .profile-window {
    order: 2;
  }

  .right-stack {
    order: 3;
  }

  .profile-window {
    min-height: 0;
  }

  .hero {
    min-height: 520px;
  }

  .hero-art {
    object-position: 63% center;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(0, 8, 17, 0.84) 0%, rgba(0, 10, 19, 0.58) 44%, rgba(0, 5, 10, 0.88) 100%),
      linear-gradient(90deg, rgba(0, 5, 12, 0.5), rgba(0, 5, 12, 0.1));
  }

  .hero-copy {
    width: 100%;
    min-height: 360px;
    padding: 34px 22px 22px;
    align-content: start;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero-copy > p:not(.hero-kicker) {
    font-size: 16px;
  }

  .hero-actions {
    margin-top: 18px;
  }

  .primary-action,
  .secondary-action {
    flex: 1 1 170px;
  }

  .hero-dots {
    left: 22px;
    bottom: 18px;
  }

  .event-grid {
    grid-template-columns: 1fr;
  }

  .party-row {
    grid-template-columns: minmax(0, 1fr) 58px 42px 86px;
  }

  .party-place {
    display: none;
  }

  .party-row button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .party-my-request {
    align-items: flex-start;
    flex-direction: column;
  }

  .party-request {
    grid-template-columns: minmax(0, 1fr) 68px;
  }

  .party-request button {
    justify-self: stretch;
  }

  .party-form {
    grid-template-columns: 1fr;
  }

  .party-dialog {
    max-height: calc(100vh - 34px);
    overflow: auto;
  }

  .footer nav {
    gap: 10px;
  }

  .mobile-bottom {
    position: fixed;
    z-index: 50;
    bottom: 10px;
    left: 10px;
    right: auto;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    width: min(calc(100% - 20px), 370px);
    padding: 8px;
    border: 1px solid rgba(92, 166, 221, 0.36);
    border-radius: 8px;
    background: rgba(2, 14, 25, 0.96);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
  }

  .mobile-bottom button {
    min-width: 0;
    height: 42px;
    padding: 0 5px;
    overflow: hidden;
    border: 1px solid rgba(84, 149, 200, 0.28);
    border-radius: 7px;
    color: #d8e8f4;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: rgba(8, 35, 56, 0.78);
  }

  .mobile-bottom .download-tab {
    color: #211304;
    background: linear-gradient(180deg, #ffe39c, #d99b3d);
  }
}

@media (max-width: 560px) {
  .market-panel .panel-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .market-head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .market-mini-pager {
    flex: 1 1 auto;
    justify-content: space-between;
  }

  .market-count-pill {
    flex: 1 1 auto;
    min-width: 0;
  }

  .market-detail-modal {
    align-items: stretch;
    padding: 9px;
  }

  .market-detail-dialog {
    width: 100%;
    max-height: calc(100vh - 18px);
  }

  .market-detail-head {
    padding: 13px 13px 10px;
  }

  .market-detail-head h2 {
    font-size: 18px;
  }

  .market-detail-body {
    max-height: calc(100vh - 104px);
    padding: 12px;
  }

  .market-detail-pair {
    grid-template-columns: 94px minmax(0, 1fr);
  }

  .market-detail-slot,
  .market-detail-option {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .market-buy-status-head {
    grid-template-columns: 16px minmax(0, 1fr);
  }

  .market-buy-status-head em {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
  }

  .market-buy-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-detail-slot small {
    display: none;
  }

  .market-browser-modal {
    align-items: stretch;
    padding: 9px;
  }

  .market-browser-dialog {
    width: 100%;
    max-height: calc(100vh - 18px);
  }

  .market-browser-head {
    padding: 13px 13px 10px;
  }

  .market-browser-head h2 {
    font-size: 18px;
  }

  .market-browser-controls,
  .market-browser-summary,
  .market-browser-list,
  .market-browser-foot {
    padding-right: 12px;
    padding-left: 12px;
  }

  .market-browser-categories button {
    min-width: auto;
    height: 30px;
    padding: 0 8px;
  }

  .market-browser-list {
    min-height: 220px;
  }

  .market-browser-row {
    min-height: 70px;
    padding: 8px;
    gap: 9px;
  }

  .market-browser-foot {
    justify-content: space-between;
  }

  .chat-channel {
    display: none;
  }

  .chat-meta {
    grid-template-columns: minmax(0, auto) auto minmax(42px, 1fr);
  }

  .tab-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .tab-row button {
    width: 100%;
    min-width: 0;
    padding: 0 6px;
  }

  .app-shell {
    width: min(calc(100% - 48px), 350px);
    margin: 0 auto 0 24px;
  }

  .topbar {
    min-height: 60px;
    grid-template-columns: minmax(0, 1fr) 46px 42px;
    padding: 6px;
  }

  .brand {
    height: 46px;
  }

  .brand-art {
    width: min(178px, 100%);
    height: 46px;
  }

  .brand-main {
    font-size: 21px;
  }

  .brand-sub {
    font-size: 10px;
  }

  .currency-chip strong {
    display: none;
  }

  .currency-chip {
    justify-content: center;
    width: 42px;
    min-width: 42px;
    padding: 0;
  }

  .user-mini {
    display: none;
  }

  .mobile-nav-drawer.open {
    grid-template-columns: 1fr;
  }

  .profile-window,
  .panel,
  .event-card {
    border-radius: 7px;
  }

  .profile-portrait {
    min-height: 172px;
  }

  .profile-portrait img {
    width: 126px;
    height: 126px;
  }

  .portrait-ring {
    width: 150px;
    height: 150px;
  }

  .portrait-ring.outer {
    width: 160px;
    height: 160px;
  }

  .portrait-status {
    right: 10px;
    bottom: 10px;
    min-height: 24px;
    padding: 0 9px;
    font-size: 11px;
  }

  .hero {
    min-height: 548px;
  }

  .hero-copy {
    min-height: 330px;
    padding: 28px 16px 18px;
  }

  .hero h1 {
    font-size: 27px;
    max-width: 292px;
    word-break: break-word;
  }

  .hero-copy > p:not(.hero-kicker) {
    max-width: 292px;
  }

  .hero-actions {
    display: grid;
  }

  .event-card {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .event-card > img {
    width: 52px;
    height: 52px;
  }

  .chat-compose {
    grid-template-columns: minmax(0, 1fr) 42px 48px;
  }

  .chat-emoji-toggle {
    width: 42px;
  }

  .chat-emoji-picker {
    right: 54px;
  }

  .compact-button {
    display: none;
  }

  .mission-row {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .mission-row button {
    grid-column: 2;
    width: 100%;
  }

  .guild-row {
    grid-template-columns: 22px minmax(0, 1fr) 44px;
  }

  .guild-row small {
    display: none;
  }

  .market-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .market-row span:last-child {
    grid-column: 2;
  }
}
body.email-verification-modal-open {
  overflow: hidden;
}

.email-verification-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  place-items: center;
  padding: 20px;
}

.email-verification-modal.open {
  display: grid;
}

.email-verification-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 9, 14, 0.86);
  backdrop-filter: blur(7px);
}

.email-verification-dialog {
  position: relative;
  width: min(520px, 100%);
  padding: 32px;
  border: 1px solid rgba(91, 214, 230, 0.38);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(76, 203, 222, 0.14), transparent 42%),
    linear-gradient(145deg, #0a202b, #07151d);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.58);
  color: #eaf7fb;
  outline: none;
}

.email-verification-kicker {
  display: block;
  margin-bottom: 8px;
  color: #71dce9;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.email-verification-dialog h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1.25;
}

.email-verification-dialog > p {
  margin: 0;
  color: #b7cdd5;
  line-height: 1.7;
}

.email-verification-dialog > p strong {
  color: #f3c968;
}

.email-verification-note {
  display: grid;
  gap: 5px;
  margin: 22px 0 14px;
  padding: 15px 16px;
  border: 1px solid rgba(121, 180, 199, 0.25);
  border-radius: 10px;
  background: rgba(2, 13, 19, 0.58);
}

.email-verification-note strong {
  color: #fff;
}

.email-verification-note span {
  color: #9fb8c2;
  font-size: 0.9rem;
  line-height: 1.6;
}

.email-verification-message {
  min-height: 1.6em;
  color: #72e0b4 !important;
  font-size: 0.9rem;
}

.email-verification-message.error {
  color: #ff9f9f !important;
}

.email-verification-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.email-verification-actions button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.email-verification-primary {
  flex: 1;
  border: 1px solid #f0c267;
  background: linear-gradient(#ffd982, #e5a83e);
  color: #182029;
}

.email-verification-secondary {
  border: 1px solid rgba(115, 198, 214, 0.38);
  background: #0a2531;
  color: #cbe9ef;
}

.email-verification-actions button:disabled {
  cursor: wait;
  opacity: 0.65;
}

@media (max-width: 560px) {
  .email-verification-dialog {
    padding: 24px 20px;
  }

  .email-verification-actions {
    flex-direction: column;
  }
}
