﻿:root {
  --paper: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef5ff;
  --ink: #111827;
  --muted: #5f6878;
  --line: #d7deea;
  --green: #12a8c7;
  --green-dark: #075b72;
  --blue: #285f9f;
  --copper: #b87520;
  --amber: #d69b2d;
  --red: #b83d50;
  --violet: #6b4fb3;
  --shadow: 0 18px 42px rgba(15, 23, 42, 0.11);
  --radius: 8px;
}


* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-padding-top: 86px;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(245, 247, 251, 0.72), rgba(245, 247, 251, 0.98)),
    repeating-linear-gradient(90deg, rgba(18, 29, 48, 0.045) 0, rgba(18, 29, 48, 0.045) 1px, transparent 1px, transparent 64px),
    repeating-linear-gradient(180deg, rgba(18, 29, 48, 0.026) 0, rgba(18, 29, 48, 0.026) 1px, transparent 1px, transparent 64px),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(16px, 4vw, 42px);
  background:
    linear-gradient(115deg, #070a10 0%, #111827 52%, #1a2234 100%);
  color: #f8fbff;
  border-bottom: 1px solid #172033;
  box-shadow:
    inset 0 -3px 0 #16b8d4,
    inset 0 -5px 0 rgba(107, 79, 179, 0.65);
}

.brand-block {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.brand-block > div:not(.brand-mark) {
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(45, 212, 191, 0.84);
  color: #f8fbff;
  background:
    linear-gradient(145deg, rgba(18, 168, 199, 0.95), rgba(107, 79, 179, 0.92)),
    #0d1724;
  border-radius: var(--radius);
  font-weight: 800;
  letter-spacing: 0;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 10px 24px rgba(18, 168, 199, 0.22);
  flex: 0 0 auto;
}

.brand-block h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.brand-block p {
  margin: 4px 0 0;
  color: #c7d2e4;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(45, 212, 191, 0.36);
  border-radius: 999px;
  background: rgba(7, 10, 16, 0.42);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.language-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 35px;
  height: 26px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #c7d2e4;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
}

.language-option:hover,
.language-option:focus-visible {
  color: #ffffff;
  outline: none;
}

.language-option.is-active {
  background: linear-gradient(135deg, #e9faff, #d9f2ff);
  color: #07384a;
  box-shadow: 0 6px 18px rgba(18, 168, 199, 0.24);
}

.status-pill,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
}

.status-pill {
  border-color: rgba(45, 212, 191, 0.36);
  background: rgba(7, 10, 16, 0.42);
  color: #e8f7ff;
}

.nav-tabs {
  display: flex;
  gap: 4px;
  padding: 10px clamp(10px, 4vw, 42px);
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.nav-tabs::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: #465367;
  white-space: nowrap;
}

.nav-tab svg,
.icon-button svg,
.link-button svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.nav-tab.is-active {
  color: #07384a;
  background: #e9f7fb;
  border-color: #a9dce8;
  box-shadow:
    inset 0 -2px 0 rgba(18, 168, 199, 0.38),
    0 1px 0 rgba(255, 255, 255, 0.86);
}

.workspace {
  padding: 24px clamp(14px, 4vw, 42px) 48px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-anchor {
  scroll-margin-top: 92px;
}

.section-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  min-width: 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.92) inset;
}

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

.stat-card strong {
  display: block;
  margin-top: 5px;
  font-size: 23px;
  overflow-wrap: anywhere;
  line-height: 1.15;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  align-items: start;
  gap: 18px;
}

.content-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.profile-jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 16px;
}

.profile-jump-nav .quick-chip {
  min-height: 34px;
  gap: 6px;
  background: #f8fbff;
  border-color: #cbdff1;
}

.profile-jump-nav .quick-chip:hover {
  border-color: #8fd4e1;
  background: #edf9fd;
}

.profile-jump-nav svg {
  width: 15px;
  height: 15px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 10px 26px rgba(15, 23, 42, 0.04);
  min-width: 0;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
}

.item-filter-panel {
  grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(130px, 1fr));
}

.custom-filter-panel {
  grid-template-columns: minmax(240px, 2fr) repeat(4, minmax(130px, 1fr));
}

.vocation-filter-panel {
  grid-template-columns: minmax(240px, 2fr) repeat(2, minmax(150px, 1fr));
}

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

.field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.field input,
.field select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  color: var(--ink);
  padding: 0 10px;
}

.field input:focus,
.field select:focus {
  outline: 2px solid rgba(18, 168, 199, 0.22);
  border-color: #72c7d9;
}

.quick-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-chip,
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  white-space: nowrap;
}

.quick-chip:hover,
.quick-chip.is-active {
  border-color: #8fd4e1;
  background: #ebf8fc;
  color: #07384a;
}

.primary-action {
  width: fit-content;
  border-color: #0c8098;
  background: linear-gradient(135deg, #08394b, #12647a 55%, #6b4fb3);
  color: #f8fbff;
  box-shadow: 0 10px 24px rgba(18, 100, 122, 0.18);
}

.primary-action svg {
  width: 17px;
  height: 17px;
}

.primary-action.subtle {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}

.result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  flex-wrap: wrap;
}

.limit-notice {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
  background: #fbfdff;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
  background: #fbfdff;
  flex-wrap: wrap;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination-controls .quick-chip:disabled {
  opacity: 0.48;
  cursor: default;
}

.page-size-control {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.page-size-control select {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 0 8px;
}

.table-wrap {
  overflow: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  position: relative;
  background: var(--surface-2);
  color: #364154;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

th.sortable-table-header {
  cursor: pointer;
  user-select: none;
  padding-right: 28px;
}

th.sortable-table-header:hover {
  background: #e8f1fb;
  color: #0d3f53;
}

th.sortable-table-header::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -4px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #9aabc0;
  opacity: 0.55;
}

th.sortable-table-header.is-sorted-asc::after {
  border-top: 0;
  border-bottom: 6px solid #075b72;
  opacity: 1;
}

th.sortable-table-header.is-sorted-desc::after {
  border-top: 6px solid #075b72;
  border-bottom: 0;
  opacity: 1;
}

tr:last-child td {
  border-bottom: 0;
}

tr.is-clickable:hover {
  background: #eff8fb;
}

.name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}

.sprite {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid #cbd6e4;
  border-radius: var(--radius);
  background: #eef5fb;
  overflow: hidden;
}

.sprite.large {
  width: 92px;
  height: 92px;
}

.sprite img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.sprite.large img {
  min-width: 48px;
  min-height: 48px;
}

.sprite::after {
  content: attr(data-fallback);
  display: none;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
}

.sprite.is-missing::after,
.sprite:not(:has(img))::after {
  display: block;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf5fb;
  color: #354357;
  font-size: 12px;
}

.badge.custom {
  background: #eeeafd;
  color: #554195;
}

.badge.common {
  background: #e1f4f8;
  color: #0c6578;
}

.badge.uncommon {
  background: #e7eefc;
  color: #285f9f;
}

.badge.semi-rare {
  background: #f4efdc;
  color: #80611f;
}

.badge.rare {
  background: #f8e6dc;
  color: #9a491d;
}

.badge.very-rare {
  background: #f1e7f4;
  color: #6b3c83;
}

.detail-panel {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.detail-empty {
  min-height: 340px;
  place-content: center;
  text-align: center;
  color: var(--muted);
  box-shadow: none;
}

.detail-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.detail-title h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.detail-title p {
  margin: 4px 0 0;
  color: var(--muted);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.metric {
  min-width: 0;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.link-list {
  display: grid;
  gap: 7px;
}

.vocation-overview-panel {
  grid-column: span 2;
  display: grid;
  gap: 10px;
}

.vocation-overview-panel .link-list {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.link-button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fbfdff;
  text-align: left;
}

.link-button:hover {
  border-color: #8fd4e1;
  background: #eef9fc;
}

.link-button .sprite {
  width: 30px;
  height: 30px;
}

.link-button small {
  color: var(--muted);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.entity-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.entity-card:hover {
  border-color: #8fd4e1;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.07);
}

.entity-card.is-custom {
  border-color: #b9a7ee;
  background: linear-gradient(180deg, #ffffff, #f5f1ff);
}

.entity-card h3 {
  margin: 0;
  font-size: 15px;
}

.entity-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.feature-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 240px;
  background:
    linear-gradient(135deg, rgba(18, 168, 199, 0.12), rgba(107, 79, 179, 0.12)),
    var(--surface);
  border-color: #cbd6f2;
}

.feature-panel h3 {
  margin: 0;
  max-width: 620px;
  font-size: 25px;
  line-height: 1.16;
}

.feature-panel p {
  margin: 0;
  color: var(--muted);
  max-width: 620px;
}

.online-panel {
  display: grid;
  gap: 10px;
  align-content: start;
}

.server-status-panel {
  display: grid;
  gap: 10px;
  align-content: start;
}

.online-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.online-head h3 {
  margin: 0;
}

.online-count {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #0d3f53;
  color: #f4fbff;
  font-weight: 800;
}

.server-state {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
}

.server-state.is-online,
.mini-status-row b.is-online {
  background: #dcfce7;
  color: #166534;
}

.server-state.is-offline,
.mini-status-row b.is-offline {
  background: #fee2e2;
  color: #991b1b;
}

.mini-status-list {
  display: grid;
  gap: 7px;
}

.mini-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  min-height: 38px;
  padding: 7px 9px;
}

.mini-status-row b {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
}

.online-list {
  display: grid;
  gap: 7px;
}

.online-player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  padding: 8px 10px;
  color: var(--ink);
  text-align: left;
  width: 100%;
}

.online-player strong,
.online-player small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.online-player small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.online-player b {
  color: #075b72;
  font-size: 13px;
  white-space: nowrap;
}

.online-player:hover {
  border-color: #8fd4e1;
  background: #eef9fc;
}

.live-cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

.live-cast-card {
  display: grid;
  gap: 14px;
}

.live-instructions {
  display: grid;
  gap: 12px;
}

.cast-steps,
.cast-connection {
  display: grid;
  gap: 8px;
}

.cast-steps div,
.cast-connection div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbff;
}

.cast-steps div {
  justify-content: flex-start;
}

.cast-steps b {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e9f7fb;
  color: #075b72;
  flex: 0 0 auto;
}

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

.cast-connection strong {
  text-align: right;
}

.profile-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.monster-profile-shell {
  max-width: 980px;
}

.monster-page-detail,
.item-page-detail,
.house-page-detail {
  position: static;
}

.item-profile-shell,
.house-profile-shell {
  max-width: 1120px;
}

.house-page-detail {
  max-height: none;
}

.monster-page-detail .link-list,
.item-page-detail .link-list,
.house-page-detail .link-list {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.character-search-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(130px, 0.8fr)) auto;
  align-items: end;
  gap: 10px;
}

.house-filter-panel {
  grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(140px, 1fr));
}

.possession-filter-panel {
  grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(150px, 1fr)) auto;
  align-items: end;
}

.houses-table {
  min-width: 900px;
}

.houses-table tr.is-selected {
  background: #eaf7fb;
}

.houses-table td small {
  color: var(--muted);
}

.house-detail {
  max-height: calc(100vh - 112px);
  overflow: auto;
}

.house-item-list {
  max-height: 520px;
  overflow: auto;
  padding-right: 2px;
}

.inert-link {
  cursor: default;
}

.inert-link:hover {
  border-color: var(--line);
  background: #fbfdff;
}

.character-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.character-profile {
  display: grid;
  gap: 16px;
}

.skill-rate-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbff;
  padding: 12px;
}

.character-sections {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
  gap: 14px;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

.character-history-panel {
  display: grid;
  gap: 12px;
}

.history-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.75fr) minmax(220px, 0.75fr);
  gap: 10px;
  align-items: start;
}

.history-control-group {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.control-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.history-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.icon-chip {
  width: 38px;
  justify-content: center;
}

.history-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.history-chart {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid #d7e2ef;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 249, 255, 0.92)),
    var(--surface);
  padding: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.history-chart svg {
  width: 100%;
  height: 330px;
  display: block;
  overflow: visible;
}

.history-chart rect {
  fill: #f8fbff;
  stroke: #d7deea;
}

.history-chart .grid-line {
  stroke: #dce6f1;
  stroke-width: 1;
}

.history-chart .grid-line.vertical {
  stroke-dasharray: 4 6;
  opacity: 0.55;
}

.history-chart .axis-line {
  stroke: #9fb3c8;
  stroke-width: 1.2;
}

.history-chart .history-area {
  stroke: none;
}

.history-chart .history-line {
  fill: none;
  stroke: #0d8299;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 5px 10px rgba(13, 130, 153, 0.16));
}

.history-chart .history-points circle {
  fill: #ffffff;
  stroke: #0d8299;
  stroke-width: 2;
  transition: r 0.15s ease, stroke 0.15s ease;
}

.history-chart .history-points circle:hover {
  r: 5px;
  stroke: #6b4fb3;
}

.history-chart .axis-label {
  fill: #5f6878;
  font-size: 12px;
}

.history-chart .x-label {
  text-anchor: middle;
}

.history-chart .axis-label.end {
  text-anchor: end;
}

.history-chart-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  flex-wrap: wrap;
}

.skill-card {
  width: 100%;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.skill-card.is-active {
  border-color: #8fd4e1;
  background: #eaf8fc;
  box-shadow: inset 0 -2px 0 rgba(18, 168, 199, 0.28);
}

.equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
}

.equipment-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  padding: 8px;
  color: inherit;
  font: inherit;
  text-align: left;
}

.equipment-card.is-clickable {
  cursor: pointer;
}

.equipment-card.is-clickable:hover {
  border-color: #8fd4e1;
  background: #eef9fc;
}

.equipment-card.is-empty {
  opacity: 0.68;
}

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

.equipment-card small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.equipment-attrs {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.equipment-attrs span {
  border: 1px solid #d7e5ef;
  border-radius: 999px;
  background: #f3f8fb;
  color: #31566a;
  padding: 2px 7px;
  font-size: 11px;
  line-height: 1.35;
  max-width: 100%;
}

.character-possessions {
  display: grid;
  gap: 12px;
}

.possession-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.possession-sections {
  display: grid;
  gap: 10px;
}

.possession-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  overflow: hidden;
}

.possession-section summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  padding: 12px 14px;
  background: #f2f8fc;
  border-bottom: 1px solid var(--line);
}

.possession-section:not([open]) summary {
  border-bottom: 0;
}

.possession-section summary strong,
.possession-section summary small {
  display: block;
  min-width: 0;
}

.possession-section summary small,
.possession-section summary > span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.possession-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 14px 0;
}

.possession-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 7px;
  padding: 12px 14px 14px;
  max-height: 520px;
  overflow: auto;
}

.possession-item-grid.compact {
  max-height: 360px;
  padding: 10px 0 0;
}

.possession-item-button {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.possession-item-button small + small {
  color: #527081;
}

.possession-item-button span,
.text-link-button,
.house-possession-head span {
  min-width: 0;
}

.house-possession-list {
  display: grid;
  gap: 10px;
  padding: 12px 14px 14px;
}

.house-possession-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px;
}

.guide-wide-panel {
  grid-column: 1 / -1;
}

.boss-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 8px;
  max-height: 460px;
  overflow: auto;
  padding-right: 2px;
}

.guide-destination-list {
  padding: 12px;
}

.data-health-panel .metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.data-health-columns h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.house-possession-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.text-link-button {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.text-link-button:hover {
  color: var(--green-dark);
}

.error-panel.compact {
  margin: 12px 14px 0;
  padding: 10px;
}

.vocation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.vocation-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 138px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  color: var(--ink);
  padding: 12px;
  text-align: left;
}

.vocation-card:hover {
  border-color: #8fd4e1;
  background: #eef9fc;
}

.vocation-card-image,
.mini-vocation-thumb {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border: 1px solid #bfd5e7;
  border-radius: var(--radius);
  background: #eef5fb;
}

.mini-vocation-thumb {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}

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

.vocation-card small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.vocation-card-stats {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.vocation-card-stats span {
  border: 1px solid #d7e5ef;
  border-radius: 999px;
  background: #f3f8fb;
  color: #31566a;
  padding: 2px 7px;
  font-size: 11px;
}

.vocation-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.85fr);
  gap: 14px;
  align-items: start;
}

.vocation-lore-panel {
  display: grid;
  gap: 14px;
}

.vocation-hero-image {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border: 1px solid #bfd5e7;
  border-radius: var(--radius);
  background: #eef5fb;
}

.lore-copy {
  display: grid;
  gap: 10px;
  color: #344154;
  line-height: 1.62;
}

.lore-copy p {
  margin: 0;
}

.vocation-style-panel {
  grid-column: 1 / -1;
}

.upgrade-stage-grid {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.upgrade-stage-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7fbff;
  padding: 10px;
}

.upgrade-stage-card strong,
.upgrade-stage-card span {
  display: block;
}

.upgrade-stage-card span {
  color: var(--muted);
  font-size: 12px;
}

.upgrade-stage-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.upgrade-stage-stats small {
  border: 1px solid #d7e5ef;
  border-radius: 999px;
  background: #ffffff;
  color: #31566a;
  padding: 2px 7px;
  font-size: 11px;
}

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

.skill-rate-grid div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7fbff;
  padding: 8px;
}

.skill-rate-grid strong,
.skill-rate-grid span {
  display: block;
}

.skill-rate-grid span {
  color: var(--muted);
  margin-top: 2px;
  font-size: 12px;
}

.fusion-cta-panel,
.fusion-guide-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
  background:
    linear-gradient(135deg, rgba(13, 130, 153, 0.1), rgba(107, 79, 179, 0.12)),
    var(--surface);
}

.fusion-cta-panel h3,
.fusion-guide-panel h3 {
  margin: 4px 0 8px;
  max-width: 980px;
  line-height: 1.25;
}

.fusion-cta-panel p,
.fusion-guide-panel p {
  margin: 0;
  color: var(--muted);
  max-width: 980px;
}

.fusion-guide-panel {
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  align-items: start;
}

.fusion-ability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.fusion-ability-grid div {
  border: 1px solid #d7e5ef;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  padding: 9px;
}

.fusion-ability-grid strong,
.fusion-ability-grid span {
  display: block;
}

.fusion-ability-grid span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
  line-height: 1.35;
}

.fusion-matrix-table {
  min-width: 980px;
}

.fusion-pair-grid {
  display: grid;
  gap: 10px;
}

.fusion-pair-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.fusion-pair-card summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  background: #f7fbff;
}

.fusion-pair-card summary::-webkit-details-marker {
  display: none;
}

.fusion-pair-card summary strong,
.fusion-pair-card summary small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fusion-pair-card summary small {
  color: var(--muted);
  margin-top: 2px;
}

.fusion-pair-card summary b {
  border: 1px solid #bde7ef;
  border-radius: 999px;
  background: #eef9fc;
  color: #075b72;
  padding: 4px 9px;
  font-size: 12px;
  white-space: nowrap;
}

.fusion-pair-card summary svg {
  width: 16px;
  height: 16px;
  transition: transform 0.18s ease;
}

.fusion-pair-card:not([open]) summary svg {
  transform: rotate(-90deg);
}

.fusion-pair-body {
  display: grid;
  gap: 10px;
  padding: 12px 14px 14px;
}

.fusion-pair-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.panel-head-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.spell-category-stack {
  display: grid;
  gap: 14px;
}

.spell-category {
  display: block;
  max-width: 100%;
  min-width: 0;
}

.spell-category summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7fbff;
  color: var(--ink);
  padding: 0 12px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  list-style: none;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.spell-category summary::-webkit-details-marker {
  display: none;
}

.spell-category summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin-left: auto;
}

.spell-category summary svg {
  width: 16px;
  height: 16px;
  transition: transform 0.18s ease;
}

.spell-category:not([open]) summary svg {
  transform: rotate(-90deg);
}

.spell-table {
  min-width: 1040px;
}

.spell-table-wrap {
  margin-top: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.spell-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
}

.spell-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(20, 34, 54, 0.12);
}

.spell-table code {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.spell-table small {
  color: var(--muted);
}

.recent-kill-list {
  display: grid;
  gap: 8px;
}

.recent-kill-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  color: inherit;
  font: inherit;
  text-align: left;
  padding: 8px;
}

.recent-kill-card.is-clickable {
  cursor: pointer;
}

.recent-kill-card.is-clickable:hover {
  border-color: #8fd4e1;
  background: #eef9fc;
}

.recent-kill-card .sprite {
  width: 34px;
  height: 34px;
}

.recent-kill-card strong,
.recent-kill-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-kill-card small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.death-list {
  display: grid;
  gap: 8px;
}

.death-card {
  display: grid;
  grid-template-columns: minmax(120px, 0.42fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  padding: 9px 10px;
}

.death-card strong,
.death-card b,
.death-card span,
.death-card small {
  display: block;
  min-width: 0;
}

.death-card span,
.death-card small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.avatar-token {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #bcd7e6;
  border-radius: var(--radius);
  background: #e8f7fb;
  color: #075b72;
  font-size: 12px;
  font-weight: 800;
}

.avatar-token.large {
  width: 72px;
  height: 72px;
  font-size: 22px;
}

.error-panel {
  color: #8a302a;
  background: #f8e7e2;
  border-color: #ecc2b8;
}

.eyebrow {
  color: var(--violet);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0;
}

.custom-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.system-card {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  padding: 12px;
  color: #354154;
  font-size: 13px;
}

.system-card svg {
  width: 18px;
  height: 18px;
  color: var(--green);
}

.set-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 12px;
}

.set-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f6f8ff);
  padding: 14px;
}

.set-card-head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
}

.set-card-head h3 {
  margin: 0;
  font-size: 18px;
}

.set-card-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.set-items {
  display: grid;
  gap: 7px;
}

.custom-lower-grid {
  align-items: start;
}

.wide-panel {
  grid-column: span 2;
}

.compact-table table {
  min-width: 860px;
}

.compact-table .link-button {
  grid-template-columns: 30px minmax(0, 1fr);
  min-height: 38px;
  border: 0;
  background: transparent;
  padding: 0;
}

.compact-table .link-button i {
  display: none;
}

.mini-list {
  display: grid;
  gap: 8px;
}

.mini-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.mini-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.mini-list span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.inset-panel {
  box-shadow: none;
  background: #fbfdff;
}

.guide-grid .panel h3,
.panel h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.plain-list {
  margin: 0;
  padding-left: 18px;
  color: #384356;
}

.plain-list li {
  margin: 6px 0;
}

.source-note {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.link-button,
.death-card,
.recent-kill-card {
  min-width: 0;
}

.empty-state {
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.empty-state.compact {
  padding: 18px 10px;
}

@media (max-width: 1120px) {
  .stat-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .split-layout {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    position: static;
  }

  .filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .character-search-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .character-search-panel .primary-action {
    width: 100%;
  }

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

  .hero-grid,
  .custom-summary,
  .character-layout,
  .character-sections,
  .vocation-profile-grid,
  .history-toolbar,
  .fusion-cta-panel,
  .fusion-guide-panel,
  .data-health-columns {
    grid-template-columns: 1fr;
  }

  .vocation-overview-panel {
    grid-column: auto;
  }

  .wide-panel {
    grid-column: auto;
  }
}

@media (max-width: 680px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-shell,
  .workspace,
  .view,
  .panel,
  .stat-card {
    min-width: 0;
    max-width: 100%;
  }

  .brand-block h1 {
    font-size: 21px;
  }

  .brand-block {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    width: 100%;
  }

  .brand-block p,
  .section-head p,
  .status-pill {
    max-width: 100%;
    white-space: normal;
  }

  .brand-block > div:not(.brand-mark) {
    width: calc(100vw - 118px);
    max-width: calc(100vw - 118px);
  }

  .brand-block p,
  .brand-block h1 {
    width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .section-head,
  .section-head > div,
  .section-head h2,
  .section-head p {
    width: 100%;
    max-width: calc(100vw - 40px);
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .brand-block p {
    font-size: 13px;
    line-height: 1.25;
    max-width: 28ch;
  }

  .section-head p {
    max-width: 34ch;
  }

  .top-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .workspace {
    padding-top: 16px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-head h2 {
    font-size: 27px;
    max-width: 18ch;
  }

  .stat-grid,
  .filter-panel,
  .item-filter-panel,
  .custom-filter-panel,
  .vocation-filter-panel,
  .house-filter-panel,
  .possession-filter-panel,
  .metric-grid,
  .skill-rate-grid,
  .history-summary,
  .fusion-ability-grid,
  .possession-summary {
    grid-template-columns: 1fr;
  }

  .profile-jump-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
  }

  .profile-jump-nav::-webkit-scrollbar {
    display: none;
  }

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

  .feature-panel h3 {
    font-size: 21px;
  }

  .character-search-panel {
    grid-template-columns: 1fr;
  }

  .quick-chip,
  .primary-action {
    white-space: normal;
  }

  .profile-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .vocation-card {
    grid-template-columns: 80px minmax(0, 1fr) auto;
    min-height: 124px;
  }

  .vocation-card-image {
    width: 80px;
    height: 80px;
  }

  .vocation-card-stats {
    grid-column: 1 / -1;
  }

  .vocation-hero-image {
    aspect-ratio: 4 / 3;
  }

  .spell-category summary {
    font-size: 14px;
  }

  .history-chart svg {
    height: 260px;
  }

  .fusion-pair-card summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .fusion-pair-card summary b {
    justify-self: start;
  }

  .possession-section summary,
  .house-possession-head {
    grid-template-columns: 1fr;
  }

  .possession-item-grid {
    grid-template-columns: 1fr;
    max-height: 420px;
  }

  .detail-title {
    align-items: flex-start;
  }

  .death-card {
    grid-template-columns: 1fr;
  }

  .sprite.large {
    width: 72px;
    height: 72px;
  }
}

/* Mystharion fantasy skin */
body {
  background:
    linear-gradient(90deg, rgba(5, 10, 20, 0.97) 0%, rgba(8, 13, 24, 0.8) 18%, rgba(34, 18, 9, 0.18) 50%, rgba(8, 13, 24, 0.8) 82%, rgba(5, 10, 20, 0.97) 100%),
    url("assets/vocations/necromancer.png") left top / auto 100vh no-repeat fixed,
    url("assets/vocations/sorcerer.png") right top / auto 100vh no-repeat fixed,
    #07101d;
  color: #2a1b0c;
  font-family: Georgia, "Times New Roman", serif;
}

/* Mystharion stone portal: a classic OT frame around the live encyclopedia. */
:root {
  --myst-void: #090807;
  --myst-night: #16100c;
  --myst-stone: #28221e;
  --myst-stone-deep: #120f0e;
  --myst-bronze: #8b5a24;
  --myst-gold: #d7a646;
  --myst-gold-bright: #ffe5a0;
  --myst-parchment: #ead8ac;
  --myst-parchment-deep: #d7bd84;
  --myst-ink: #281708;
  --myst-muted: #684923;
}

body {
  background:
    linear-gradient(90deg, rgba(4, 4, 5, .92) 0%, rgba(4, 4, 5, .54) 16%, rgba(11, 8, 6, .08) 34%, rgba(11, 8, 6, .08) 66%, rgba(4, 4, 5, .54) 84%, rgba(4, 4, 5, .92) 100%),
    url("assets/vocations/necromancer.png") left top / auto 100vh no-repeat fixed,
    url("assets/vocations/guardian.png") right top / auto 100vh no-repeat fixed,
    #090807;
  color: var(--myst-ink);
  font-family: "Alegreya", Georgia, serif;
  font-size: 17px;
}

body::before {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .42), transparent 22%, transparent 78%, rgba(0, 0, 0, .42)),
    repeating-linear-gradient(90deg, rgba(255, 233, 177, .025) 0 1px, transparent 1px 6px),
    linear-gradient(180deg, rgba(8, 5, 4, .12), rgba(8, 5, 4, .72));
}

.app-shell {
  width: min(1320px, calc(100% - 36px));
  margin: 18px auto 40px;
  overflow: hidden;
  border: 1px solid #b2792d;
  border-radius: 2px;
  background: #15120f;
  box-shadow:
    0 0 0 2px #080706,
    0 0 0 4px rgba(180, 119, 37, .55),
    0 28px 70px rgba(0, 0, 0, .72);
}

.topbar {
  min-height: 144px;
  padding: 24px 30px 26px;
  border: 0;
  border-bottom: 3px double #d6a13e;
  background:
    linear-gradient(90deg, rgba(13, 9, 7, .95) 0%, rgba(29, 18, 10, .43) 31%, rgba(26, 17, 10, .26) 69%, rgba(13, 9, 7, .95) 100%),
    url("assets/vocations/guardian.png") center 36% / cover no-repeat;
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 158, .55),
    inset 0 -1px 0 rgba(38, 19, 8, .95),
    0 8px 20px rgba(0, 0, 0, .35);
}

.topbar::before,
.topbar::after {
  width: 118px;
  height: 8px;
  bottom: -6px;
  border: 1px solid #d3a145;
  background: linear-gradient(90deg, #271609, #946027 50%, #271609);
  box-shadow: 0 2px 0 #070605;
}

.brand-block {
  gap: 16px;
}

.brand-mark {
  width: 76px;
  height: 76px;
  padding: 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: 0 8px 19px rgba(0, 0, 0, .48);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 0 #090604) drop-shadow(0 0 12px rgba(255, 195, 77, .28));
}

.brand-block h1,
.section-head h2,
.side-box h2,
.nav-heading,
.feature-panel h3,
.register-title h3 {
  font-family: "Cinzel Decorative", "Cinzel", Georgia, serif;
  letter-spacing: 0;
}

.brand-block h1 {
  font-size: clamp(32px, 3.6vw, 50px);
  line-height: 1;
  color: #ffdfa0;
  text-shadow: 0 2px 0 #3a1808, 0 5px 16px rgba(0, 0, 0, .75);
}

.brand-block p {
  margin-top: 8px;
  max-width: 580px;
  color: #f1dbad;
  font-family: "Alegreya", Georgia, serif;
  font-size: 17px;
  font-weight: 700;
}

.top-actions {
  gap: 8px;
}

.status-pill,
.language-switcher {
  border: 1px solid #b98636;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(43, 27, 16, .96), rgba(11, 10, 10, .96));
  box-shadow: inset 0 0 0 1px rgba(255, 225, 150, .16), 0 2px 0 rgba(0, 0, 0, .5);
}

.status-pill {
  min-height: 34px;
  color: #f8e6b8;
  font-family: "Cinzel", Georgia, serif;
  font-size: 11px;
}

.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #6fce69;
  box-shadow: 0 0 8px rgba(111, 206, 105, .84);
}

.language-switcher { padding: 3px; }
.language-option { min-width: 32px; border-radius: 1px; font-family: "Cinzel", Georgia, serif; font-size: 11px; }

.news-ticker {
  min-height: 48px;
  grid-template-columns: 170px minmax(0, 1fr);
  border-bottom: 1px solid #070605;
  background: linear-gradient(180deg, #3b2c22, #171311 52%, #0e0c0b);
  box-shadow: inset 0 1px 0 rgba(255, 219, 132, .14);
}

.news-ticker span {
  position: relative;
  border-right: 1px solid rgba(225, 179, 81, .55);
  background: linear-gradient(180deg, #57402a, #21160f);
  color: #ffe6a4;
  font-family: "Cinzel Decorative", "Cinzel", serif;
  font-size: 13px;
}

.news-ticker span::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  width: 8px;
  height: 8px;
  transform: translateY(-50%) rotate(45deg);
  border: 1px solid #d8a94c;
  background: #21160f;
}

.news-ticker p { color: #f1dcb0; font-size: 16px; }

.site-grid {
  grid-template-columns: 210px minmax(0, 1fr) 238px;
  gap: 14px;
  padding: 14px;
  background:
    linear-gradient(90deg, rgba(21, 17, 14, .98), rgba(42, 29, 18, .72) 50%, rgba(21, 17, 14, .98)),
    #171310;
}

.nav-tabs,
.side-box {
  border: 2px solid #6f4b25;
  border-radius: 2px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 235, 183, .035) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, #3a312b, #171411 45%, #0c0b0b);
  box-shadow:
    inset 0 0 0 1px rgba(255, 224, 148, .14),
    inset 0 0 24px rgba(0, 0, 0, .44),
    0 10px 20px rgba(0, 0, 0, .32);
}

.nav-tabs { padding: 9px; gap: 5px; }

.nav-heading {
  margin: 5px 2px 2px;
  padding: 7px 8px 6px;
  border-top: 1px solid rgba(238, 192, 93, .28);
  color: #f8d889;
  font-size: 11px;
  text-align: center;
  text-shadow: 0 2px 0 #120a05;
}

.nav-tab {
  min-height: 37px;
  padding: 0 9px;
  border: 1px solid rgba(198, 148, 59, .45);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(53, 47, 42, .9), rgba(19, 17, 16, .96));
  color: #efdfb7;
  font-family: "Cinzel", Georgia, serif;
  font-size: 12px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), inset 0 -1px 0 rgba(0,0,0,.65);
}

.nav-tab svg { width: 16px; height: 16px; color: #e2b75d; }
.nav-tab:hover { border-color: #e2b65b; background: linear-gradient(180deg, #59422b, #241811); color: #fff2ca; }
.nav-tab.is-active,
.nav-tab-create {
  border-color: #f4d27d;
  background: linear-gradient(180deg, #fff0b6, #d79732 49%, #8b461b);
  color: #251207;
  text-shadow: 0 1px 0 rgba(255, 250, 205, .82);
  box-shadow: inset 0 0 0 1px rgba(255, 249, 196, .54), 0 3px 8px rgba(0,0,0,.28);
}
.nav-tab.is-active svg,
.nav-tab-create svg { color: #5b260d; }

.workspace {
  padding: 29px 30px 46px;
  border: 2px solid #825a2a;
  border-radius: 2px;
  background:
    radial-gradient(ellipse at 50% 0, rgba(255, 250, 220, .86), transparent 47%),
    repeating-linear-gradient(0deg, rgba(108, 65, 20, .06) 0 1px, transparent 1px 7px),
    linear-gradient(90deg, rgba(145, 94, 33, .12), transparent 9%, transparent 91%, rgba(145, 94, 33, .12)),
    #ead8ad;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.65), inset 0 0 34px rgba(88, 48, 12, .22), 0 12px 26px rgba(0,0,0,.25);
}

.section-head { margin-bottom: 21px; padding-bottom: 14px; border-bottom: 1px solid rgba(116, 75, 29, .42); }
.section-head h2 { color: #3e1d08; font-size: clamp(27px, 3vw, 39px); }
.section-head p { color: #664821; font-size: 17px; }

.side-box { overflow: hidden; }
.side-box h2 {
  padding: 10px 8px 9px;
  border-bottom: 1px solid rgba(236, 192, 96, .5);
  background: linear-gradient(180deg, #60452b, #2a1b11 72%, #1b120d);
  color: #ffe2a0;
  font-size: 15px;
  text-shadow: 0 2px 0 #190b05;
}

.side-stat {
  margin: 8px;
  padding: 8px 9px;
  border: 1px solid rgba(214, 171, 78, .38);
  background: linear-gradient(180deg, rgba(14, 12, 11, .62), rgba(36, 26, 18, .48));
}
.side-stat span { color: #cfb991; font-family: "Cinzel", Georgia, serif; font-size: 10px; }
.side-stat strong { color: #fff0bd; font-size: 16px; }
.side-action,
.side-box-help a {
  min-height: 37px;
  border-radius: 2px;
  background: linear-gradient(180deg, #34689d, #123764 56%, #0d2345);
  font-family: "Cinzel", Georgia, serif;
  font-size: 12px;
}
.side-box-help a { background: linear-gradient(180deg, #44382b, #1b1613); }
.side-player { border-radius: 2px; background: rgba(255, 227, 161, .07); }

.stat-card,
.panel,
.detail-panel,
.table-wrap,
.vocation-card,
.set-card,
.fusion-pair-card {
  border-color: #a87837;
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255, 249, 222, .82), rgba(229, 200, 142, .9)),
    #ebd9ad;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55), 0 7px 15px rgba(70, 37, 9, .13);
}

.stat-card { min-height: 88px; }
.stat-card span { font-family: "Cinzel", Georgia, serif; font-size: 10px; color: #70502a; }
.stat-card strong { color: #2c1708; font-family: "Cinzel Decorative", "Cinzel", serif; font-size: 22px; }
.feature-panel { border-color: #9f6e2f; }
.feature-panel h3 { font-size: 22px; }

.field input,
.field select,
.page-size-control select,
textarea {
  border-radius: 2px;
  border-color: #9d6c2c;
  background: linear-gradient(180deg, #fff9e8, #e7ce98);
  font-family: "Alegreya", Georgia, serif;
  font-size: 17px;
}

.primary-action,
.quick-chip,
.link-button,
.online-player,
.entity-card,
.recent-kill-card,
.death-card { border-radius: 2px; }
.primary-action { font-family: "Cinzel", Georgia, serif; font-size: 12px; }

th { font-family: "Cinzel", Georgia, serif; font-size: 11px; background: linear-gradient(180deg, #51391f, #21150d); }
td { font-size: 16px; }
.badge { border-radius: 2px; font-family: "Cinzel", Georgia, serif; font-size: 10px; }

@media (max-width: 1240px) {
  .app-shell { width: min(1120px, calc(100% - 20px)); }
  .site-grid { grid-template-columns: 196px minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .app-shell { width: 100%; margin: 0; border-right: 0; border-left: 0; }
  .topbar { min-height: 116px; padding: 18px 16px; }
  .brand-mark { width: 58px; height: 58px; }
  .brand-block h1 { font-size: 28px; }
  .brand-block p { font-size: 14px; }
  .site-grid { padding: 8px; }
  .workspace { padding: 20px 14px 34px; }
  .nav-tab { font-size: 11px; }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 222, 150, 0.32), transparent 34rem),
    linear-gradient(180deg, rgba(5, 10, 20, 0.12), rgba(5, 10, 20, 0.86));
  z-index: 0;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  background: rgba(13, 17, 25, 0.78);
  box-shadow: 0 0 0 1px rgba(221, 165, 75, 0.28), 0 22px 70px rgba(0, 0, 0, 0.55);
}

.topbar {
  min-height: 104px;
  padding: 18px 24px;
  background:
    linear-gradient(90deg, rgba(19, 12, 8, 0.92), rgba(74, 35, 9, 0.54), rgba(19, 12, 8, 0.92)),
    url("assets/vocations/guardian.png") center 42% / cover no-repeat;
  border: 1px solid rgba(238, 190, 95, 0.5);
  border-top: 0;
  box-shadow: inset 0 -3px 0 #d9a441, inset 0 -5px 0 rgba(25, 11, 6, 0.78);
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-color: #f3c36c;
  color: #fff3c9;
  background: linear-gradient(145deg, #7c1f19, #13233b 58%, #9f6b24);
  box-shadow: inset 0 0 0 2px rgba(255, 244, 202, 0.22), 0 0 24px rgba(235, 174, 72, 0.35);
}

.brand-block h1 {
  color: #ffe7a3;
  text-shadow: 0 2px 0 #2a0e05, 0 0 18px rgba(255, 204, 90, 0.44);
}

.brand-block p {
  color: #fff1c7;
}

.nav-tabs {
  background: linear-gradient(180deg, #211915, #0f1118);
  border-left: 1px solid rgba(238, 190, 95, 0.45);
  border-right: 1px solid rgba(238, 190, 95, 0.45);
  border-bottom-color: rgba(238, 190, 95, 0.45);
}

.nav-tab {
  color: #f2ddad;
}

.nav-tab:hover,
.nav-tab.is-active {
  border-color: #d9a441;
  background: linear-gradient(180deg, #fff0bd, #ba762c);
  color: #251205;
}

.workspace {
  background:
    linear-gradient(rgba(255, 247, 224, 0.9), rgba(242, 224, 184, 0.92)),
    repeating-linear-gradient(0deg, rgba(108, 70, 26, 0.05) 0, rgba(108, 70, 26, 0.05) 1px, transparent 1px, transparent 6px);
  border-left: 1px solid rgba(238, 190, 95, 0.45);
  border-right: 1px solid rgba(238, 190, 95, 0.45);
}

.section-head h2,
.panel h3,
.detail-panel h3 {
  color: #3b1d06;
  font-family: Georgia, "Times New Roman", serif;
}

.section-head p,
.source-note,
small {
  color: #6c512f;
}

.panel,
.detail-panel,
.filter-panel,
.table-wrap,
.stat-card {
  background:
    linear-gradient(rgba(255, 248, 226, 0.95), rgba(241, 220, 176, 0.92)),
    #f4e5bd;
  border-color: #b98a43;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), 0 12px 26px rgba(68, 37, 10, 0.16);
}

.link-button,
.quick-chip,
.field input,
.field select,
textarea {
  border-color: #b98a43;
  background: rgba(255, 250, 235, 0.86);
  color: #2a1b0c;
}

.primary-action {
  border-color: #f1c268;
  background: linear-gradient(180deg, #173b66, #071e3e 52%, #0f3f7a);
  color: #fff2b7;
  box-shadow: inset 0 0 0 1px rgba(255, 247, 196, 0.38), 0 8px 20px rgba(22, 31, 58, 0.34);
}

.primary-action:hover,
.primary-action:focus-visible {
  background: linear-gradient(180deg, #244f88, #0d2a53 52%, #174f91);
}

.status-pill,
.language-switcher {
  border-color: rgba(244, 199, 105, 0.7);
  background: rgba(12, 9, 10, 0.72);
}

.language-option.is-active {
  background: linear-gradient(180deg, #fff0bd, #d49b3c);
  color: #241205;
}

.register-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.register-panel {
  padding: 28px;
}

.parchment-panel {
  background:
    linear-gradient(rgba(255, 248, 226, 0.96), rgba(242, 224, 184, 0.95)),
    repeating-linear-gradient(90deg, rgba(98, 57, 12, 0.04) 0, rgba(98, 57, 12, 0.04) 1px, transparent 1px, transparent 9px);
  border: 2px solid #8f5f24;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45), 0 22px 40px rgba(43, 21, 4, 0.2);
}

.register-title {
  margin-bottom: 20px;
  text-align: center;
}

.register-title h3 {
  margin: 6px 0;
  font-size: 31px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.register-title p {
  margin: 0 auto;
  max-width: 620px;
  color: #684a27;
}

.register-panel fieldset {
  margin: 18px 0 0;
  padding: 18px;
  border: 1px solid rgba(143, 95, 36, 0.55);
  background: rgba(255, 252, 240, 0.52);
}

.register-panel legend {
  padding: 0 8px;
  color: #6d3108;
  font-weight: 800;
}

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

.register-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.register-side {
  display: grid;
  gap: 14px;
}

.frame-panel {
  border: 2px solid #78521f;
  background:
    linear-gradient(rgba(30, 24, 18, 0.88), rgba(13, 14, 20, 0.94)),
    #17131a;
  color: #ffe7a3;
}

.frame-panel h3,
.frame-panel .source-note,
.frame-panel p,
.frame-panel .mini-status-row span,
.frame-panel .mini-status-row b {
  color: #ffe7a3;
}

.form-message {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid;
  border-radius: var(--radius);
}

.form-message.is-success {
  border-color: #4f9b5f;
  background: rgba(226, 255, 226, 0.82);
  color: #173c1e;
}

.form-message.is-error {
  border-color: #b64b39;
  background: rgba(255, 230, 220, 0.88);
  color: #7d180b;
}

@media (max-width: 980px) {
  .register-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  body {
    background:
      linear-gradient(180deg, rgba(5, 10, 20, 0.74), rgba(5, 10, 20, 0.9)),
      url("assets/vocations/necromancer.png") center top / cover no-repeat fixed,
      #07101d;
  }

  .app-shell {
    width: 100%;
  }

  .form-grid.two,
  .register-side {
    grid-template-columns: 1fr;
  }

  .register-panel {
    padding: 18px;
  }
}

/* Mystharion OT redesign v2 */
:root {
  --myst-void: #050913;
  --myst-iron: #13110f;
  --myst-iron-2: #211813;
  --myst-gold: #d7a64d;
  --myst-gold-bright: #ffe29a;
  --myst-bronze: #8f5a21;
  --myst-blood: #7d2019;
  --myst-blue: #093769;
  --myst-blue-2: #061b39;
  --myst-parchment: #f3e2b9;
  --myst-parchment-2: #ead2a1;
  --myst-ink: #2a1608;
  --myst-muted: #765a35;
  --myst-line: #9d6d2f;
  --radius: 4px;
  --shadow: 0 18px 36px rgba(28, 12, 3, 0.28);
}

html {
  background: var(--myst-void);
}

body {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(4, 8, 17, 0.98) 0%, rgba(4, 8, 17, 0.74) 22%, rgba(30, 15, 8, 0.18) 50%, rgba(4, 8, 17, 0.74) 78%, rgba(4, 8, 17, 0.98) 100%),
    radial-gradient(circle at 50% 6%, rgba(255, 210, 103, 0.18), transparent 34rem),
    url("assets/vocations/druid.png") left top / auto 100vh no-repeat fixed,
    url("assets/vocations/necromancer.png") right top / auto 100vh no-repeat fixed,
    #06101e;
  color: var(--myst-ink);
  font-family: Georgia, "Times New Roman", serif;
}

body::before {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.76), transparent 24%, transparent 76%, rgba(0, 0, 0, 0.76)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 4px),
    radial-gradient(circle at 50% 0, rgba(255, 226, 151, 0.2), transparent 30rem);
}

.app-shell {
  width: min(1370px, calc(100% - 28px));
  margin: 0 auto 34px;
  background: rgba(9, 8, 10, 0.86);
  border-right: 1px solid rgba(241, 194, 104, 0.46);
  border-left: 1px solid rgba(241, 194, 104, 0.46);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.88),
    0 0 0 3px rgba(150, 96, 32, 0.42),
    0 26px 90px rgba(0, 0, 0, 0.7);
}

.topbar {
  min-height: 128px;
  padding: 20px 28px;
  background:
    linear-gradient(90deg, rgba(13, 9, 8, 0.98), rgba(48, 27, 12, 0.78) 44%, rgba(13, 9, 8, 0.98)),
    url("assets/vocations/guardian.png") center 43% / cover no-repeat;
  border: 0;
  border-bottom: 3px double var(--myst-gold);
  box-shadow:
    inset 0 -1px 0 #1b0c05,
    inset 0 0 0 1px rgba(255, 233, 168, 0.18),
    0 12px 32px rgba(0, 0, 0, 0.35);
}

.topbar::before,
.topbar::after {
  content: "";
  position: absolute;
  bottom: -7px;
  width: 80px;
  height: 13px;
  border: 1px solid rgba(255, 226, 151, 0.52);
  background: linear-gradient(180deg, #2d1a0f, #0d0908);
}

.topbar::before {
  left: 18px;
}

.topbar::after {
  right: 18px;
}

.brand-block {
  gap: 18px;
}

.brand-mark {
  width: 66px;
  height: 66px;
  border-radius: 6px;
  border: 2px solid #f2ca73;
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.3), transparent 18px),
    linear-gradient(145deg, #9c2a1c 0%, #13233b 52%, #b87925 100%);
  color: #fff4c9;
  font-size: 23px;
  text-shadow: 0 2px 0 #2b0e05;
  box-shadow:
    inset 0 0 0 2px rgba(37, 15, 4, 0.55),
    inset 0 0 0 4px rgba(255, 237, 174, 0.18),
    0 0 24px rgba(255, 196, 88, 0.36);
}

.brand-block h1 {
  font-size: clamp(30px, 3.2vw, 48px);
  color: var(--myst-gold-bright);
  text-shadow:
    0 2px 0 #311006,
    0 4px 14px rgba(0, 0, 0, 0.65),
    0 0 18px rgba(255, 210, 103, 0.45);
}

.brand-block p {
  max-width: 580px;
  color: #ffedbd;
  font-size: 15px;
  font-weight: 700;
  text-shadow: 0 1px 3px #140803;
}

.top-actions {
  align-self: flex-start;
  padding-top: 4px;
}

.status-pill,
.language-switcher {
  border: 1px solid rgba(252, 220, 143, 0.72);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(37, 19, 10, 0.92), rgba(10, 9, 12, 0.92));
  color: #fff0bd;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.8),
    0 3px 0 rgba(0, 0, 0, 0.3);
}

.language-switcher {
  padding: 3px;
}

.language-option {
  border-radius: 4px;
  color: #ead9ad;
}

.language-option.is-active {
  background: linear-gradient(180deg, #fff3bc, #c8842e 54%, #8c4f1e);
  color: #231105;
  text-shadow: 0 1px 0 rgba(255, 244, 204, 0.6);
  box-shadow: inset 0 0 0 1px rgba(255, 247, 201, 0.42);
}

.news-ticker {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: stretch;
  min-height: 46px;
  border-bottom: 1px solid #1b0d06;
  background:
    linear-gradient(180deg, #281712, #0d0d12);
  color: #f5dfad;
}

.news-ticker span {
  display: grid;
  place-items: center;
  border-right: 1px solid rgba(229, 180, 87, 0.44);
  background:
    linear-gradient(180deg, #3b2113, #17100d);
  color: var(--myst-gold-bright);
  font-weight: 800;
  text-align: center;
}

.news-ticker p {
  margin: 0;
  padding: 12px 16px;
  overflow: hidden;
  color: #f1d8a5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-grid {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr) 248px;
  align-items: start;
  gap: 12px;
  padding: 12px;
  background:
    linear-gradient(90deg, rgba(16, 12, 10, 0.98), rgba(35, 21, 12, 0.5), rgba(16, 12, 10, 0.98)),
    #0f0d0d;
}

.nav-tabs {
  position: sticky;
  top: 12px;
  z-index: 4;
  display: grid;
  gap: 4px;
  padding: 8px;
  overflow: visible;
  background:
    linear-gradient(180deg, rgba(42, 34, 28, 0.96), rgba(10, 10, 13, 0.98)),
    var(--myst-iron);
  border: 2px solid #60421d;
  border-radius: 3px;
  box-shadow:
    inset 0 0 0 1px rgba(238, 205, 126, 0.18),
    0 10px 22px rgba(0, 0, 0, 0.34);
}

.nav-heading {
  margin: 6px 4px 3px;
  padding: 4px 8px;
  border-top: 1px solid rgba(232, 185, 90, 0.24);
  color: #f0c76f;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-heading:first-child {
  border-top: 0;
}

.nav-tab {
  justify-content: flex-start;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(181, 126, 51, 0.5);
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(30, 28, 26, 0.98), rgba(12, 12, 14, 0.98));
  color: #ecd8a7;
  font-weight: 700;
  text-shadow: 0 1px 0 #000;
}

.nav-tab:hover {
  border-color: #e2b75c;
  background:
    linear-gradient(180deg, #3a2416, #161013);
  color: #fff1bf;
}

.nav-tab.is-active,
.nav-tab-create {
  border-color: #f2ca73;
  background:
    linear-gradient(180deg, #fff0bd 0%, #d59b39 48%, #8f4e1e 100%);
  color: #241105;
  text-shadow: 0 1px 0 rgba(255, 244, 199, 0.7);
  box-shadow:
    inset 0 0 0 1px rgba(255, 249, 210, 0.5),
    0 4px 10px rgba(0, 0, 0, 0.24);
}

.nav-tab[data-view="live"],
#view-live {
  display: none !important;
}

.workspace {
  min-width: 0;
  padding: 24px 28px 42px;
  border: 2px solid #684820;
  border-radius: 3px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 251, 224, 0.76), transparent 33rem),
    linear-gradient(rgba(255, 246, 218, 0.94), rgba(231, 204, 150, 0.94)),
    repeating-linear-gradient(0deg, rgba(93, 53, 12, 0.055) 0, rgba(93, 53, 12, 0.055) 1px, transparent 1px, transparent 7px),
    var(--myst-parchment);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.54),
    inset 0 0 38px rgba(103, 61, 18, 0.18),
    0 18px 40px rgba(0, 0, 0, 0.28);
}

.world-sidebar {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 12px;
}

.side-box {
  border: 2px solid #60421d;
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(39, 31, 25, 0.96), rgba(10, 10, 13, 0.98));
  color: #f0dfb5;
  box-shadow:
    inset 0 0 0 1px rgba(255, 232, 155, 0.16),
    0 10px 22px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.side-box h2 {
  margin: 0;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(228, 180, 90, 0.42);
  background:
    linear-gradient(180deg, #40301c, #18100d);
  color: #ffe49e;
  font-size: 17px;
  text-align: center;
  text-shadow: 0 2px 0 #1a0803;
}

.side-stat {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  margin: 8px 10px;
  padding: 8px;
  border: 1px solid rgba(211, 163, 73, 0.34);
  background: rgba(0, 0, 0, 0.24);
}

.side-stat span {
  color: #cdbb93;
  font-size: 12px;
}

.side-stat strong {
  min-width: 0;
  color: #fff0bc;
  overflow-wrap: anywhere;
}

#sideServerState.is-online {
  color: #9cff9c;
}

#sideServerState.is-offline {
  color: #ff9b8d;
}

.side-action,
.side-box-help a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin: 8px 10px 10px;
  padding: 0 10px;
  border: 1px solid #e0b45a;
  border-radius: 3px;
  background: linear-gradient(180deg, #173c69, #071d3f 54%, #0b3568);
  color: #fff0bd;
  font-weight: 800;
  text-decoration: none;
  text-shadow: 0 1px 0 #000;
  box-shadow: inset 0 0 0 1px rgba(255, 244, 198, 0.25);
}

.side-action:hover,
.side-box-help a:hover {
  filter: brightness(1.12);
}

.side-list {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.side-player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid rgba(211, 163, 73, 0.34);
  border-radius: 3px;
  background: rgba(255, 235, 180, 0.08);
  color: #f4dfad;
  text-align: left;
}

.side-player span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-player b {
  color: #ffe49e;
  font-size: 12px;
}

.side-empty {
  padding: 8px;
  color: #cdbb93;
  text-align: center;
}

.side-box-help {
  padding-bottom: 2px;
}

.side-box-help a {
  justify-content: center;
  background: linear-gradient(180deg, #2d241b, #111014);
}

.section-head {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(122, 78, 31, 0.32);
}

.section-head h2 {
  color: #3d1d05;
  font-size: clamp(28px, 3vw, 40px);
  text-shadow: 0 1px 0 rgba(255, 244, 204, 0.78);
}

.section-head p {
  color: var(--myst-muted);
  font-size: 16px;
}

.stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.stat-card,
.panel,
.detail-panel,
.table-wrap {
  border: 1px solid #a77333;
  border-radius: 4px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 238, 0.84), transparent 12rem),
    linear-gradient(180deg, rgba(255, 241, 195, 0.96), rgba(235, 205, 145, 0.94)),
    var(--myst-parchment);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.52),
    0 10px 22px rgba(57, 29, 7, 0.16);
}

.stat-card {
  padding: 12px 14px;
}

.stat-card span,
.metric span,
.field span,
.source-note,
.online-player small,
.link-button small,
.entity-card p,
.vocation-card small {
  color: var(--myst-muted);
}

.stat-card strong {
  color: #231105;
  font-size: 24px;
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.85fr) minmax(280px, 0.85fr);
}

.feature-panel {
  min-height: 220px;
  background:
    linear-gradient(135deg, rgba(255, 240, 190, 0.94), rgba(229, 190, 117, 0.9)),
    url("assets/vocations/monk.png") right bottom / 170px auto no-repeat;
}

.feature-panel h3 {
  color: #2c1304;
  font-size: 25px;
}

.eyebrow {
  color: #6e2419;
  font-weight: 900;
}

.filter-panel,
.item-filter-panel,
.custom-filter-panel,
.vocation-filter-panel,
.house-filter-panel,
.possession-filter-panel,
.character-search-panel {
  background:
    linear-gradient(180deg, rgba(61, 37, 15, 0.12), rgba(255, 248, 225, 0.72)),
    var(--myst-parchment);
}

.field input,
.field select,
.page-size-control select,
textarea {
  min-height: 39px;
  border: 1px solid #a77333;
  border-radius: 3px;
  background:
    linear-gradient(180deg, #fff9e8, #ead3a2);
  color: #251205;
  box-shadow: inset 0 1px 3px rgba(69, 32, 8, 0.16);
}

.field input:focus,
.field select:focus,
textarea:focus {
  outline: 2px solid rgba(207, 140, 46, 0.32);
  border-color: #d29a42;
}

.primary-action,
.quick-chip,
.link-button,
.online-player,
.entity-card,
.recent-kill-card,
.death-card {
  border-radius: 3px;
}

.primary-action {
  min-height: 38px;
  border: 1px solid #e6bd66;
  background:
    linear-gradient(180deg, #1d4d82 0%, #08244c 55%, #0f3e77 100%);
  color: #fff0bd;
  font-weight: 800;
  text-shadow: 0 1px 0 #000;
  box-shadow:
    inset 0 0 0 1px rgba(255, 242, 194, 0.28),
    0 6px 14px rgba(8, 26, 56, 0.34);
}

.primary-action.subtle,
.quick-chip {
  background:
    linear-gradient(180deg, #fff2c3, #d69a3a 56%, #9f5c24);
  border-color: #855018;
  color: #241105;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(255, 244, 203, 0.52);
}

.quick-chip:hover,
.quick-chip.is-active,
.primary-action.subtle:hover {
  border-color: #f2ca73;
  background: linear-gradient(180deg, #fff7d4, #e7b65d 56%, #aa682d);
  color: #1b0c03;
}

.link-button,
.online-player,
.recent-kill-card,
.death-card,
.mini-status-row,
.upgrade-stage-card,
.system-card,
.fusion-pair-card summary,
.spell-category summary {
  border-color: rgba(142, 95, 36, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 248, 225, 0.88), rgba(230, 203, 151, 0.78));
}

.link-button:hover,
.online-player:hover,
.entity-card:hover,
.recent-kill-card.is-clickable:hover {
  border-color: #d29a42;
  background:
    linear-gradient(180deg, #fff8dc, #efcc80);
}

.online-count {
  background:
    linear-gradient(180deg, #173c69, #071d3f 54%, #0b3568);
  border: 1px solid #e1b75f;
  color: #fff0bd;
  box-shadow: inset 0 0 0 1px rgba(255, 244, 199, 0.22);
}

.server-state.is-online,
.mini-status-row b.is-online {
  background: linear-gradient(180deg, #d9ffd7, #91d783);
  color: #103f16;
}

.server-state.is-offline,
.mini-status-row b.is-offline {
  background: linear-gradient(180deg, #ffd6c9, #d67b67);
  color: #5c1108;
}

th {
  border-bottom: 1px solid #6d431a;
  background:
    linear-gradient(180deg, #3b291a, #17100d);
  color: #ffe5a7;
  text-shadow: 0 1px 0 #000;
}

td {
  border-bottom-color: rgba(122, 78, 31, 0.25);
}

tr.is-clickable:hover {
  background: rgba(231, 183, 91, 0.18);
}

.sprite,
.avatar-token {
  border: 1px solid #8c5f26;
  border-radius: 4px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 237, 173, 0.75), rgba(83, 48, 18, 0.2) 72%),
    #ead4a7;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.44),
    0 2px 6px rgba(44, 21, 5, 0.18);
}

.badge {
  border: 1px solid rgba(132, 89, 35, 0.4);
  background: #f3dfaf;
  color: #3a1c06;
}

.badge.custom,
.badge.common,
.badge.uncommon,
.badge.semi-rare,
.badge.rare,
.badge.very-rare {
  color: #321805;
}

.register-panel fieldset {
  border-color: rgba(120, 76, 28, 0.6);
}

.register-title h3 {
  color: #3d1d05;
}

.frame-panel {
  background:
    linear-gradient(180deg, rgba(39, 31, 25, 0.96), rgba(10, 10, 13, 0.98));
}

.frame-panel .mini-status-row {
  background: rgba(255, 235, 180, 0.08);
  color: #f4dfad;
}

.frame-panel h3,
.frame-panel .source-note,
.frame-panel p,
.frame-panel .mini-status-row span,
.frame-panel .mini-status-row b {
  color: #ffe7a3;
}

.vocation-card,
.set-card,
.fusion-pair-card {
  border-color: #a77333;
  background:
    linear-gradient(180deg, rgba(255, 243, 204, 0.96), rgba(229, 198, 136, 0.94));
}

.vocation-card-image,
.vocation-hero-image {
  border-color: #8c5f26;
  box-shadow: 0 8px 18px rgba(47, 23, 6, 0.22);
}

.history-chart,
.chart-panel {
  background:
    linear-gradient(180deg, rgba(255, 248, 225, 0.92), rgba(229, 201, 146, 0.9));
}

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

  .site-grid {
    grid-template-columns: 198px minmax(0, 1fr);
  }

  .world-sidebar {
    grid-column: 1 / -1;
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 900px) {
  .app-shell {
    width: 100%;
    margin-bottom: 0;
    border-right: 0;
    border-left: 0;
  }

  .topbar {
    min-height: 110px;
  }

  .news-ticker {
    grid-template-columns: 1fr;
  }

  .news-ticker p {
    white-space: normal;
  }

  .site-grid {
    grid-template-columns: 1fr;
    padding: 8px;
  }

  .nav-tabs {
    position: static;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-tabs::-webkit-scrollbar {
    display: none;
  }

  .nav-heading {
    display: none;
  }

  .nav-tab {
    flex: 0 0 auto;
    justify-content: center;
  }

  .workspace {
    padding: 18px 14px 34px;
  }

  .world-sidebar {
    grid-template-columns: 1fr;
  }

  .hero-grid,
  .register-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  body {
    background:
      linear-gradient(180deg, rgba(4, 8, 17, 0.74), rgba(4, 8, 17, 0.94)),
      url("assets/vocations/guardian.png") center top / cover no-repeat fixed,
      #06101e;
  }

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

  .brand-mark {
    width: 58px;
    height: 58px;
  }

  .brand-block > div:not(.brand-mark) {
    width: auto;
    max-width: none;
  }

  .brand-block h1 {
    font-size: 29px;
  }

  .brand-block p {
    max-width: none;
  }

  .top-actions {
    align-self: stretch;
  }

  .workspace {
    border-right: 0;
    border-left: 0;
  }
}
