:root {
  --bg: #080806;
  --panel: #15120d;
  --panel-soft: #201913;
  --text: #f7efe1;
  --muted: #baad97;
  --line: #3c3325;
  --accent: #d7a84c;
  --accent-strong: #f2cd72;
  --blood: #943329;
  --leaf: #6f8e56;
  --steel: #78828a;
  --danger: #df6b6b;
  --ok: #79c58a;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 0, rgba(74, 59, 34, 0.3), transparent 34rem),
    linear-gradient(180deg, #0b0a08 0%, var(--bg) 34rem);
  font-family: "Segoe UI", Tahoma, Verdana, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

.site-header,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(215, 168, 76, 0.22);
  background: rgba(8, 8, 6, 0.86);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border: 1px solid #8f6d33;
  border-radius: 4px;
  color: #120d06;
  background: linear-gradient(180deg, #f4d47b, #bb7b25);
  box-shadow: 0 0 0 1px rgba(255, 240, 172, 0.2) inset, 0 12px 20px rgba(0, 0, 0, 0.25);
  font: 800 0.82rem/1 "Segoe UI", Tahoma, Verdana, sans-serif;
}

.brand-text {
  display: grid;
  gap: 0.02rem;
}

.brand-text strong {
  color: #fff2cd;
  font: 800 1.02rem/1.05 "Segoe UI", Tahoma, Verdana, sans-serif;
}

.brand-text small {
  color: #c7b896;
  font: 700 0.68rem/1.05 "Segoe UI", Tahoma, Verdana, sans-serif;
  text-transform: uppercase;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.8rem;
}

.site-header nav a {
  color: #d7c9ad;
  font: 700 0.9rem/1.1 "Segoe UI", Tahoma, Verdana, sans-serif;
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--text);
}

.site-header nav a.server-taskbar-link,
.site-header nav a.admin-taskbar-link {
  color: var(--accent);
  font-weight: 700;
}

.site-header nav a.download-link {
  border: 1px solid rgba(215, 168, 76, 0.55);
  border-radius: 4px;
  padding: 0.42rem 0.65rem;
  color: #140f08;
  background: var(--accent);
}

.site-main {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0.8rem 0 2.5rem;
}

.site-main:has(.server-control),
.site-main:has(.admin-accounts) {
  width: min(1680px, calc(100% - 32px));
}

.site-main:has(.player-home) {
  width: 100%;
  padding: 0;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.hero {
  max-width: 680px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.portal-home {
  min-height: calc(100svh - 138px);
  overflow: hidden;
  background: #050504;
}

.portal-entrance {
  position: relative;
  display: grid;
  place-items: center;
  min-height: calc(100svh - 138px);
  padding: 3rem 1rem;
  overflow: hidden;
  isolation: isolate;
}

.portal-map {
  position: absolute;
  inset: -8%;
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(4, 5, 4, 0.96), rgba(4, 5, 4, 0.78) 45%, rgba(4, 5, 4, 0.92)),
    url("/generated/bigmaps/data-mmap-135.png") center / cover no-repeat;
  filter: saturate(0.65) brightness(0.55);
  transform: scale(1.03);
}

.portal-entrance::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 50% 48%, rgba(45, 180, 132, 0.32), transparent 9rem),
    radial-gradient(circle at 50% 48%, rgba(226, 180, 76, 0.26), transparent 15rem),
    radial-gradient(circle at 50% 50%, transparent 0 12rem, rgba(0, 0, 0, 0.2) 12.2rem, rgba(0, 0, 0, 0.82) 34rem),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 4px);
}

.portal-entrance::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  z-index: -1;
  background: linear-gradient(180deg, transparent, rgba(5, 5, 4, 0.95));
}

.portal-gate {
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(44vw, 28rem);
  aspect-ratio: 1;
  border: 2px solid rgba(243, 207, 115, 0.22);
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55) inset,
    0 0 34px rgba(95, 224, 177, 0.22),
    0 0 120px rgba(215, 168, 76, 0.2);
  transform: translate(-50%, -50%);
}

.portal-gate::before,
.portal-gate::after,
.portal-gate span {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.portal-gate::before {
  inset: 9%;
  border: 1px solid rgba(109, 224, 184, 0.28);
  box-shadow: 0 0 48px rgba(55, 224, 166, 0.26) inset;
}

.portal-gate::after {
  inset: 24%;
  background:
    radial-gradient(circle, rgba(190, 255, 229, 0.52), rgba(59, 205, 155, 0.2) 42%, transparent 70%);
  filter: blur(1px);
}

.portal-gate span {
  inset: 2.2rem;
  border: 1px dashed rgba(243, 207, 115, 0.26);
  animation: portal-spin 28s linear infinite;
}

.portal-copy {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  margin-top: 1rem;
  text-align: center;
}

.portal-eyebrow {
  margin: 0 0 0.7rem;
  color: #f0c76a;
  font: 800 0.78rem/1.2 "Segoe UI", Tahoma, Verdana, sans-serif;
  text-transform: uppercase;
}

.portal-copy h1 {
  margin: 0;
  color: #fff3cc;
  font: 800 clamp(3.2rem, 8vw, 6.6rem)/0.92 Georgia, "Times New Roman", serif;
  text-shadow: 0 4px 0 #160d06, 0 20px 44px rgba(0, 0, 0, 0.75);
}

.portal-line {
  margin: 1rem 0 0;
  color: #eee1c2;
  font-size: 1.08rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.portal-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.72rem;
  margin-top: 1.5rem;
}

.portal-actions .button {
  min-height: 3rem;
  border-radius: 4px;
  border-color: rgba(247, 218, 132, 0.28);
  padding: 0.68rem 1.05rem;
  background: rgba(18, 14, 9, 0.82);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
  font: 800 0.96rem/1 "Segoe UI", Tahoma, Verdana, sans-serif;
}

.portal-actions .button.primary {
  border-color: #f3cd72;
  color: #150f07;
  background: linear-gradient(180deg, #f3d37e, #c9852b);
}

.portal-actions .button.download {
  border-color: rgba(180, 70, 44, 0.9);
  color: #fff1d2;
  background: linear-gradient(180deg, #9f3c2e, #5e1d18);
}

.portal-actions .button.ghost {
  color: #f4e3b7;
  background: rgba(6, 7, 6, 0.56);
}

.portal-links {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  width: min(720px, calc(100% - 32px));
  transform: translateX(-50%);
}

.portal-links a {
  color: #d8c8a9;
  font: 800 0.78rem/1.1 "Segoe UI", Tahoma, Verdana, sans-serif;
  text-decoration: none;
  text-transform: uppercase;
}

.portal-links a:hover,
.portal-links a:focus-visible {
  color: #fff0c5;
}

@keyframes portal-spin {
  to {
    transform: rotate(360deg);
  }
}
.stack {
  display: grid;
  gap: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(1rem, 4vw, 1.5rem);
  background: var(--panel);
}

.panel h2 {
  margin: 0 0 0.75rem;
  color: #f4e6bd;
  font: 700 1.08rem/1.2 Tahoma, Verdana, sans-serif;
  letter-spacing: 0;
}

.form-card {
  max-width: 430px;
}

.form-row {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

label {
  color: var(--muted);
  font-size: 0.9rem;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.72rem 0.8rem;
  color: var(--text);
  background: #090b0f;
  font: inherit;
}

select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.72rem 0.8rem;
  color: var(--text);
  background: #090b0f;
  font: inherit;
}

input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent), transparent 55%);
  outline-offset: 2px;
}

select:focus {
  outline: 2px solid color-mix(in srgb, var(--accent), transparent 55%);
  outline-offset: 2px;
}

.help,
.muted {
  color: var(--muted);
  font-size: 0.92rem;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.55rem 1rem;
  color: var(--text);
  background: var(--panel-soft);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button.primary,
button.primary {
  border-color: var(--accent);
  color: #160f04;
  background: var(--accent);
}

.button.secondary,
button.secondary {
  border-color: color-mix(in srgb, var(--accent), transparent 45%);
  color: var(--accent);
}

.admin-navigation,
.admin-nav-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.admin-navigation {
  align-items: center;
  margin-bottom: 1rem;
}

.admin-nav-group {
  position: relative;
}

.admin-nav-group summary {
  cursor: pointer;
  padding: 0.45rem 0.65rem;
  color: var(--muted);
}

.admin-nav-group > div {
  margin-top: 0.35rem;
}

.admin-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.admin-overview-card {
  display: grid;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1rem;
  color: var(--text);
  background: #10100d;
}

.admin-overview-card:hover,
.admin-overview-card:focus-visible {
  border-color: var(--accent);
}

.admin-overview-card span {
  color: var(--muted);
}

.message {
  border: 1px solid var(--line);
  border-radius: 5px;
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  background: var(--panel-soft);
}

.message.error {
  border-color: color-mix(in srgb, var(--danger), transparent 45%);
  color: #ffdada;
}

.message.success {
  border-color: color-mix(in srgb, var(--ok), transparent 45%);
  color: #d6ffdf;
}

.details {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.5rem 1rem;
  margin: 0;
}

.details dt {
  color: var(--muted);
}

.details dd {
  margin: 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-head h2 {
  margin-bottom: 0;
}

.table-wrap {
  overflow-x: auto;
}

.ops-table {
  width: 100%;
  border-collapse: collapse;
  font: 0.92rem/1.45 Tahoma, Verdana, sans-serif;
}

.ops-table th,
.ops-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0.55rem;
  text-align: left;
  vertical-align: middle;
}

.ops-table th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.process-detail {
  min-width: 260px;
  max-width: 520px;
  color: var(--muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.15rem 0.45rem;
  color: var(--muted);
  background: #090b0f;
  font: 700 0.78rem/1 Tahoma, Verdana, sans-serif;
}

.status-pill.ok {
  border-color: color-mix(in srgb, var(--ok), transparent 45%);
  color: #d6ffdf;
}

.status-pill.warning {
  border-color: color-mix(in srgb, var(--accent), transparent 45%);
  color: #ffe0a2;
}

.status-pill.danger {
  border-color: color-mix(in srgb, var(--danger), transparent 45%);
  color: #ffdada;
}

.game-library-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 1rem;
  align-items: start;
}

.game-library-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7rem auto auto;
  gap: 0.55rem;
  align-items: end;
}

.game-library-toolbar label {
  align-self: center;
  margin-right: -0.25rem;
}

.npc-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 0.75rem;
}

.npc-appearance-grid {
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
}

.appearance-cheat-grid {
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
}

.appearance-cheat-tile {
  grid-template-rows: 170px auto;
}

.appearance-cheat-tile .npc-library-image img {
  max-height: 158px;
}

.npc-library-tile {
  display: grid;
  grid-template-rows: 132px auto;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #10100d;
  overflow: hidden;
}

.npc-appearance-tile {
  grid-template-rows: 150px auto;
}

.npc-library-image {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 0.45rem;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25% 75%, rgba(255, 255, 255, 0.035) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25% 75%, rgba(255, 255, 255, 0.035) 75%),
    #070806;
  background-position: 0 0, 8px 8px;
  background-size: 16px 16px;
}

.npc-library-image img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
  image-rendering: pixelated;
}

.npc-library-tile dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.1rem 0.45rem;
  margin: 0;
  padding: 0.55rem;
  font: 0.78rem/1.35 Tahoma, Verdana, sans-serif;
}

.npc-library-tile dt {
  color: var(--muted);
}

.npc-library-tile dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.npc-library-tile dd strong {
  color: var(--accent);
  font-size: 1rem;
}

@media (max-width: 760px) {
  .game-library-overview,
  .game-library-toolbar {
    grid-template-columns: 1fr;
  }

  .game-library-toolbar label {
    margin-right: 0;
  }
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.inline-actions button {
  min-height: 2.1rem;
  padding: 0.3rem 0.55rem;
  font-size: 0.82rem;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.log-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.log-filter select,
.log-filter input[type="search"] {
  min-width: 10rem;
}

.log-filter input[type="number"] {
  width: 5.5rem;
}

.config-file-picker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: min(100%, 32rem);
}

.config-file-picker select {
  min-width: 18rem;
}

.file-meta {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.35rem 0.8rem;
  margin: 0 0 0.9rem;
  font: 0.85rem/1.45 Tahoma, Verdana, sans-serif;
}

.file-meta dt {
  color: var(--muted);
}

.file-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.config-editor {
  display: grid;
  gap: 0.55rem;
}

.config-editor textarea {
  width: 100%;
  min-height: 30rem;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.85rem;
  color: #e7e0d5;
  background: #07090d;
  font: 0.85rem/1.45 Consolas, "Liberation Mono", monospace;
  tab-size: 2;
  white-space: pre;
}

.config-editor textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--accent), transparent 55%);
  outline-offset: 2px;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.access-manager-grid {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) minmax(26rem, 1.4fr);
  gap: 1rem;
  align-items: end;
}

.access-search-form,
.access-grant-form {
  display: grid;
  gap: 0.45rem;
}

.access-search-row,
.access-grant-row,
.access-level-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.access-search-row input,
.access-grant-row input {
  min-width: 0;
}

.access-grant-row select,
.access-level-form select {
  min-width: 9rem;
}

.access-level-form button {
  min-height: 2.25rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
}

.access-table td:first-child strong,
.access-table td:first-child span {
  display: block;
}

.db-toolbar,
.db-pager {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.db-overview-panel {
  padding-block: 1rem;
}

.db-overview-grid {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) minmax(18rem, auto);
  gap: 1rem;
  align-items: end;
}

.db-overview-grid .file-meta {
  margin: 0;
}

.db-overview-grid .db-toolbar {
  justify-content: flex-end;
}

.db-toolbar select {
  min-width: 12rem;
}

.db-toolbar input {
  min-width: 16rem;
}

.db-workbench {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}

.db-workbench.has-heads {
  grid-template-columns: 17rem minmax(0, 1fr);
}

.db-work-main,
.db-grid-panel,
.db-editor-panel,
.db-heads-panel {
  min-width: 0;
}

.db-heads-panel {
  position: sticky;
  top: 0.8rem;
  max-height: calc(100vh - 1.6rem);
  overflow: auto;
}

.db-heads-panel .section-head {
  align-items: center;
  margin-bottom: 0.75rem;
}

.db-head-list {
  display: grid;
  gap: 0.35rem;
}

.db-head-list.editable {
  gap: 0.55rem;
}

.db-head-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-width: 0;
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.42rem 0.55rem;
  color: var(--muted);
  background: #10141c;
  font: 700 0.82rem/1.1 Tahoma, Verdana, sans-serif;
  text-decoration: none;
}

.db-head-card {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.45rem;
  background: #10141c;
}

.db-head-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(215, 168, 76, 0.25) inset;
}

.db-head-card.dragging {
  opacity: 0.55;
}

.db-head-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
}

.db-head-card-main a {
  border: 0;
  padding: 0.25rem 0;
  background: transparent;
}

.db-head-card-main a.active,
.db-head-card-main a:hover,
.db-head-card-main a:focus-visible {
  color: var(--accent);
  background: transparent;
}

.db-head-card-actions {
  display: flex;
  gap: 0.25rem;
}

.db-head-move,
.db-head-rename button {
  min-height: 1.9rem;
  padding: 0.25rem 0.45rem;
  font-size: 0.72rem;
}

.db-head-rename {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.db-head-rename input {
  min-height: 2rem;
  padding: 0.35rem 0.45rem;
  font: 700 0.78rem/1.2 Tahoma, Verdana, sans-serif;
}

.db-head-list a.active,
.db-head-list a:hover,
.db-head-list a:focus-visible {
  border-color: var(--accent);
  color: #170f04;
  background: var(--accent);
}

.db-head-list a span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.db-head-list a small {
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.08rem 0.38rem;
  font-size: 0.68rem;
  line-height: 1.1;
}

.db-work-main {
  display: grid;
  gap: 1rem;
}

.db-table-wrap {
  overflow: auto;
  max-height: 36rem;
}

.db-table th,
.db-table td {
  white-space: nowrap;
}

.db-table tbody tr.selected td {
  background: rgba(255, 204, 51, 0.08);
}

.db-table tbody tr[data-db-row] {
  cursor: pointer;
}

.db-table tbody tr[data-db-row]:hover td {
  background: rgba(255, 255, 255, 0.035);
}

.db-table tbody tr[data-db-row].selected:hover td {
  background: rgba(255, 204, 51, 0.12);
}

.db-select-row {
  min-height: 2rem;
  padding: 0.3rem 0.55rem;
  font-size: 0.8rem;
}

.key-marker {
  display: inline-flex;
  margin-left: 0.35rem;
  border: 1px solid #594522;
  border-radius: 4px;
  padding: 0.05rem 0.25rem;
  color: #ffe0a2;
  background: #080a0e;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.db-row-editor {
  display: grid;
  gap: 1rem;
}

.db-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem;
}

.db-editor-grid label {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.db-editor-grid label span {
  color: var(--muted);
  font: 700 0.78rem/1.2 Tahoma, Verdana, sans-serif;
  overflow-wrap: anywhere;
}

.db-editor-grid small {
  color: #8d8174;
  font-weight: 400;
}

.db-editor-grid input,
.db-editor-grid select {
  width: 100%;
  min-width: 0;
}

.db-editor-grid input[readonly] {
  color: var(--muted);
  background: #0b0e13;
}

.translation-overview-panel {
  padding-block: 1rem;
}

.translation-overview-grid {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) minmax(18rem, auto);
  gap: 1rem;
  align-items: end;
}

.translation-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.translation-toolbar input:not([type]) {
  min-width: 16rem;
}

.translation-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font: 700 0.82rem/1.2 Tahoma, Verdana, sans-serif;
}

.translation-check input {
  width: 1rem;
  height: 1rem;
  min-height: 0;
  margin: 0;
}

.translation-editor {
  display: grid;
  gap: 1rem;
}

.translation-table-wrap {
  max-height: 42rem;
  overflow: auto;
}

.translation-table th,
.translation-table td {
  white-space: nowrap;
}

.translation-table tbody tr.needs-translation td {
  background: rgba(255, 204, 51, 0.045);
}

.translation-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.035);
}

.translation-item-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 36px;
  border: 1px solid #72552d;
  background: radial-gradient(circle at 50% 35%, #151a20, #05070a 72%);
  box-shadow: 0 0 0 1px #050505 inset;
}

.translation-item-icon img {
  display: block;
  width: 36px;
  height: 32px;
  object-fit: contain;
  image-rendering: pixelated;
}

.translation-item-meta {
  min-width: 11rem;
}

.translation-item-meta strong,
.translation-item-meta span {
  display: block;
}

.translation-item-meta span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.translation-name-cell,
.translation-suggestion-cell {
  min-width: 12rem;
  max-width: 19rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.translation-stats-cell {
  min-width: 12rem;
  max-width: 18rem;
  white-space: normal;
}

.translation-stats-cell span:not(.muted) {
  display: inline-block;
  margin: 0.1rem 0.18rem 0.1rem 0;
  padding: 0.12rem 0.32rem;
  border: 1px solid #72552d;
  border-radius: 0.2rem;
  color: #f4e6bd;
  font-size: 0.76rem;
}

.translation-suggestion-cell {
  color: #f4e6bd;
}

.translation-use-button {
  min-height: 1.85rem;
  margin-left: 0.4rem;
  padding: 0.22rem 0.45rem;
  font-size: 0.74rem;
}

.translation-edit-cell {
  min-width: 17rem;
}

.translation-edit-cell input {
  width: 100%;
  min-width: 0;
  font: 0.92rem/1.35 Tahoma, Verdana, sans-serif;
}

.translation-edit-cell input[readonly] {
  color: var(--muted);
  background: #0b0e13;
}

.translation-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.translation-workbench-grid {
  display: grid;
  grid-template-columns: minmax(15rem, 22rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.translation-file-panel {
  position: sticky;
  top: 0.8rem;
  max-height: calc(100vh - 1.6rem);
  overflow: auto;
}

.translation-file-list {
  display: grid;
  gap: 0.35rem;
}

.translation-file-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.42rem 0.55rem;
  color: var(--muted);
  background: #10141c;
  font: 700 0.8rem/1.15 Tahoma, Verdana, sans-serif;
  text-decoration: none;
}

.translation-file-list a.active,
.translation-file-list a:hover,
.translation-file-list a:focus-visible {
  border-color: var(--accent);
  color: #170f04;
  background: var(--accent);
}

.translation-file-list a span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.translation-file-list a small {
  font-size: 0.68rem;
  white-space: nowrap;
}

.translation-line-editor {
  display: grid;
  gap: 1rem;
}

.translation-file-meta {
  grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr);
}

.translation-line-table-wrap {
  max-height: 46rem;
  overflow: auto;
}

.translation-line-table th,
.translation-line-table td {
  vertical-align: top;
}

.translation-line-table tbody tr.needs-translation td {
  background: rgba(255, 204, 51, 0.045);
}

.translation-line-number {
  color: var(--muted);
  font: 700 0.8rem/1.2 Consolas, "Liberation Mono", monospace;
  text-align: right;
}

.translation-current-line {
  min-width: 20rem;
  max-width: 34rem;
}

.translation-current-line pre {
  overflow: auto;
  max-height: 8rem;
  margin: 0;
  color: #e8dfd0;
  font: 0.82rem/1.35 Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.translation-new-line {
  min-width: 24rem;
}

.translation-new-line textarea {
  width: 100%;
  min-width: 0;
  min-height: 4.75rem;
  resize: vertical;
  font: 0.85rem/1.35 Consolas, "Liberation Mono", monospace;
}

.translation-new-line textarea[readonly] {
  color: var(--muted);
  background: #0b0e13;
}

.npc-editor {
  display: grid;
  gap: 1rem;
}

.npc-editor-meta {
  margin-bottom: 0;
}

.npc-map-browser {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.npc-map-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.npc-map-picker {
  display: flex;
  align-items: end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.npc-map-picker label {
  flex: 0 0 100%;
  color: var(--muted);
  font: 700 0.82rem/1.2 Tahoma, Verdana, sans-serif;
}

.npc-map-picker select {
  min-width: min(28rem, 100%);
}

.npc-map-count {
  color: var(--muted);
  font: 700 0.82rem/1.2 Tahoma, Verdana, sans-serif;
}

.npc-map-scroll {
  overflow: auto;
  max-height: 34rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #05070a;
}

.npc-map-stage {
  position: relative;
  display: inline-block;
  min-width: 0;
  transform-origin: 0 0;
}

.npc-map-zoom {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.npc-map-zoom button {
  width: 2rem;
  height: 2rem;
  padding: 0;
  font: 700 1rem/1 Tahoma, Verdana, sans-serif;
}

.npc-map-zoom .npc-map-zoom-level {
  min-width: 3.2rem;
  text-align: center;
  color: var(--muted);
  font: 700 0.82rem/1.2 Tahoma, Verdana, sans-serif;
}

.npc-map-stage img {
  display: block;
  max-width: none;
  image-rendering: auto;
}

.npc-map-pin {
  position: absolute;
  z-index: 1;
  width: 18px;
  height: 18px;
  border: 1px solid #f0c85b;
  border-radius: 50%;
  background: #dbac35;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.55), 0 0 12px rgba(240, 200, 91, 0.45);
  transform: translate(-50%, -50%);
}

.npc-map-pin::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #201506;
}

.npc-map-pin:hover,
.npc-map-pin:focus,
.npc-map-pin.active {
  z-index: 3;
  border-color: #ffffff;
  background: #f5d56e;
  outline: none;
}

.npc-map-pin.disabled {
  opacity: 0.55;
}

.npc-map-pin span {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  display: none;
  max-width: 16rem;
  border: 1px solid #6f542c;
  border-radius: 4px;
  padding: 0.25rem 0.42rem;
  color: #fff2c4;
  background: #090b0e;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
  font: 700 0.78rem/1.2 Tahoma, Verdana, sans-serif;
  /* Keep the label on one line so an NPC near the map edge does not collapse
     into a vertical stack of characters; clip overflow with an ellipsis. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  transform: translateX(-50%);
}

.npc-map-pin:hover span,
.npc-map-pin:focus span,
.npc-map-pin.active span {
  display: block;
}

.npc-map-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.55rem;
  max-height: 18rem;
  overflow: auto;
}

.npc-map-list a,
.npc-map-list > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.55rem 0.65rem;
  color: #e8dfd0;
  background: #0b0e13;
  text-decoration: none;
}

.npc-map-list a:hover,
.npc-map-list a:focus {
  border-color: var(--accent);
  color: #ffffff;
  outline: none;
}

.npc-map-list span span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.npc-map-list small {
  flex: 0 0 auto;
  color: var(--muted);
}

.npc-editor-layout {
  display: grid;
  grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.npc-name-field,
.npc-script-editor {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.npc-name-field span,
.npc-script-editor label {
  color: var(--muted);
  font: 700 0.82rem/1.2 Tahoma, Verdana, sans-serif;
}

.npc-name-field input[readonly] {
  color: var(--muted);
  background: #0b0e13;
}

.npc-script-editor textarea {
  width: 100%;
  min-height: 42rem;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.85rem;
  color: #e7e0d5;
  background: #07090d;
  font: 0.85rem/1.45 Consolas, "Liberation Mono", monospace;
  tab-size: 2;
  white-space: pre;
}

.npc-script-editor textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--accent), transparent 55%);
  outline-offset: 2px;
}

.npc-script-editor textarea[readonly] {
  color: var(--muted);
  background: #0b0e13;
}

.log-view {
  overflow: auto;
  max-height: 32rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  margin: 0;
  padding: 0.85rem;
  color: #e7e0d5;
  background: #07090d;
  font: 0.85rem/1.45 Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
}

.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 200px) minmax(180px, 240px) auto;
  gap: 1rem;
  align-items: end;
}

.filters .form-row {
  margin-bottom: 0;
}

.compact-filters {
  grid-template-columns: minmax(180px, 280px) auto;
  margin-top: 0.75rem;
}

.split-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.split-heading h2,
.split-heading h3 {
  margin: 0;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0.5rem;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.card-grid.compact {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.mini-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: #10141c;
}

.mini-card h3 {
  margin: 0.12rem 0;
  font: 700 1.02rem/1.15 Tahoma, Verdana, sans-serif;
}

.mini-card p {
  margin: 0.25rem 0;
}

.listing-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.listing-icon {
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 32px;
  border: 1px solid #72552d;
  background: radial-gradient(circle at 50% 35%, #151a20, #05070a 72%);
  box-shadow: 0 0 0 1px #050505 inset;
}

.listing-icon img {
  display: block;
  width: 36px;
  height: 32px;
  image-rendering: pixelated;
  object-fit: contain;
}

.price {
  color: var(--accent);
  font-weight: 700;
}

.stat-line {
  color: #e6cf91;
  font-size: 0.92rem;
}

.mir-character-window {
  overflow: hidden;
  border: 2px solid #66502b;
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(255, 238, 173, 0.08), transparent 54px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 3px),
    #090b0e;
  box-shadow: 0 0 0 1px #100b05 inset, 0 18px 32px rgba(0, 0, 0, 0.45);
  font-family: Tahoma, Verdana, sans-serif;
}

.mir-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 42px;
  border-bottom: 1px solid #594525;
  padding: 0.45rem 0.75rem;
  color: #f7d982;
  background: linear-gradient(180deg, #21170c, #100c08);
}

.mir-titlebar strong {
  display: block;
  color: #ffd66b;
  font-size: 1rem;
}

.mir-titlebar span {
  color: #bdb5a0;
  font-size: 0.78rem;
}

.mir-titlebar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mir-titlebar-actions form {
  margin: 0;
}

.mir-titlebar a {
  border: 1px solid #725a34;
  padding: 0.28rem 0.55rem;
  color: #f4e2b0;
  background: #151923;
  font-size: 0.8rem;
  text-decoration: none;
}

.mir-character-body {
  display: grid;
  grid-template-columns: 560px minmax(190px, 1fr);
  gap: 1rem;
  padding: 0.85rem;
}

.mir-equipment-window {
  position: relative;
  width: 560px;
  height: 420px;
  overflow: hidden;
  border: 1px solid #473616;
  background: linear-gradient(180deg, #07090c, #090b0f);
}

.paperdoll-base {
  position: absolute;
  z-index: 1;
  image-rendering: pixelated;
  object-fit: contain;
}

.paperdoll-layer {
  position: absolute;
  z-index: 2;
  image-rendering: pixelated;
  object-fit: contain;
}

.mir-slot {
  position: absolute;
  z-index: 4;
  width: 36px;
  height: 36px;
  border: 1px solid #72552d;
  background: radial-gradient(circle at 50% 35%, #151a20, #06080b 72%);
  box-shadow: 0 0 0 1px #050505 inset, 0 0 18px rgba(0, 0, 0, 0.38) inset;
}

.mir-slot:hover,
.mir-slot:focus-within {
  z-index: 1000;
}

.mir-slot.empty {
  border-color: #3c3223;
  background: #080b10;
}

.mir-slot > span {
  position: absolute;
  left: 0;
  top: -13px;
  width: 36px;
  overflow: hidden;
  color: #82796a;
  font-size: 8px;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.mir-slot img {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  object-fit: contain;
}

.slot-helmet { left: 398px; top: 86px; }
.slot-necklace { left: 262px; top: 38px; }
.slot-dress { left: 262px; top: 328px; }
.slot-weapon { left: 126px; top: 86px; }
.slot-bracelet-l { left: 98px; top: 176px; }
.slot-bracelet-r { left: 426px; top: 176px; }
.slot-ring-l { left: 98px; top: 264px; }
.slot-ring-r { left: 426px; top: 264px; }
.slot-belt { left: 170px; top: 352px; }
.slot-boots { left: 354px; top: 352px; }
.slot-charm { left: 34px; top: 352px; }
.slot-bujuk { left: 490px; top: 352px; }

.mir-tooltip {
  position: fixed;
  z-index: 65000;
  display: none;
  min-width: 190px;
  max-width: 320px;
  border: 1px solid #91743f;
  padding: 7px 9px;
  color: #eeeeee;
  background: rgba(0, 0, 0, 0.94);
  box-shadow: 0 0 0 1px #161008 inset, 0 8px 18px rgba(0, 0, 0, 0.65);
  font: 12px/1.35 Tahoma, Verdana, sans-serif;
  pointer-events: none;
}

.mir-tooltip p {
  margin: 1px 0;
}

.mir-tooltip .name {
  color: #ffff00;
}

.mir-tooltip .grade {
  color: #ffffff;
}

.mir-tooltip .added-stat-line {
  color: #ffcc33;
}

.mir-tooltip .enhanced-stat-line {
  color: #efb539;
}

.mir-tooltip .added-suffix {
  display: inline-block;
  min-width: 3.5rem;
  margin-left: 2.2rem;
  color: #00ff00;
  text-align: left;
}

.mir-tooltip .separator {
  height: 0.45rem;
}

.mir-slot:hover .mir-tooltip,
.mir-slot:focus-within .mir-tooltip {
  display: block;
}

.mir-side-panel {
  min-width: 0;
  border: 1px solid #40331d;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.24);
}

.mir-side-panel dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.45rem 0.75rem;
  margin: 0 0 1rem;
  font-size: 0.82rem;
}

.mir-side-panel dt {
  color: #93856d;
}

.mir-side-panel dd {
  margin: 0;
  color: #f1e4bf;
}

.mir-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #3a2c18;
  margin-bottom: 0.65rem;
  padding-bottom: 0.35rem;
}

.mir-section-heading h3 {
  margin: 0;
  color: #f3cf73;
  font-size: 0.95rem;
}

.mir-section-heading span {
  color: #a99b83;
  font-size: 0.82rem;
}

.spell-panel {
  margin-top: 0;
}

.spell-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.spell-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.65rem;
  background: #10141c;
}

.spell-card img {
  width: 36px;
  height: 36px;
  image-rendering: pixelated;
}

.spell-card span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.buy-form {
  border-top: 1px solid var(--line);
  margin-top: 0.9rem;
  padding-top: 0.9rem;
}

.tab-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.merchant-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.merchant-account-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.merchant-character-form,
.refresh-inventory-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}

.merchant-character-form label {
  color: var(--muted);
  font-size: 0.78rem;
}

.merchant-character-form select {
  min-width: 128px;
  height: 34px;
  border-radius: 4px;
  padding: 0.25rem 0.45rem;
  font-weight: 700;
}

.merchant-character-form button,
.refresh-inventory-form button {
  min-height: 34px;
  padding: 0.35rem 0.65rem;
}

.merchant-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 34px;
  border: 1px solid #473616;
  border-radius: 4px;
  padding: 0.25rem 0.55rem;
  color: #ffcc33;
  background: #080a0e;
  box-shadow: 0 0 0 1px #060403 inset;
  font: 700 0.92rem/1 Georgia, serif;
  white-space: nowrap;
}

.gold-coin {
  width: 14px;
  height: 14px;
  border: 1px solid #8b5d12;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff2a5 0 12%, #f0be3f 32%, #9c5d0d 72%);
  box-shadow: 0 0 5px rgba(255, 204, 51, 0.35);
}

.server-admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: -0.15rem;
}

.tab-link {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.55rem 0.9rem;
  color: var(--muted);
  background: #10141c;
  font-weight: 700;
  text-decoration: none;
}

.tab-link.active,
.tab-link:hover,
.tab-link:focus-visible {
  border-color: var(--accent);
  color: #170f04;
  background: var(--accent);
}

.account-search-form {
  display: grid;
  gap: 0.45rem;
}

.account-search-row {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) auto auto;
  gap: 0.65rem;
  align-items: center;
}

.account-suite-grid {
  display: grid;
  grid-template-columns: minmax(20rem, 0.42fr) minmax(0, 0.58fr);
  gap: 1rem;
  align-items: start;
}

.account-detail-stack {
  display: grid;
  gap: 1rem;
}

.account-results-wrap {
  max-height: 42rem;
  overflow: auto;
}

.account-results-table tbody tr.selected td {
  background: rgba(255, 204, 51, 0.08);
}

.account-results-table td:first-child {
  min-width: 12rem;
}

.account-results-table td:first-child a,
.account-results-table td:first-child span {
  display: block;
}

.status-stack,
.account-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.account-status-strip {
  margin-bottom: 1rem;
}

.account-details {
  grid-template-columns: minmax(8rem, max-content) minmax(0, 1fr);
}

.account-editor-form {
  display: grid;
  gap: 1rem;
}

.account-form-grid,
.account-toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.75rem;
}

.account-form-grid label {
  display: grid;
  gap: 0.3rem;
}

.account-form-grid label span,
.checkbox-line span {
  color: var(--muted);
  font: 700 0.82rem/1.2 Tahoma, Verdana, sans-serif;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.7rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.55rem 0.7rem;
  background: #10141c;
}

.checkbox-line input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
}

.password-change-line {
  justify-self: start;
}

.character-strip {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.safezone-note {
  max-width: 330px;
  border: 1px solid #6a5128;
  border-radius: 5px;
  padding: 0.75rem;
  background: #100c07;
  font-size: 0.9rem;
}

.safezone-note strong,
.safezone-note span {
  display: block;
}

.safezone-note strong {
  color: #f3cf73;
}

.safezone-note span {
  color: var(--muted);
}

.consign-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.consign-summary span {
  border: 1px solid #40331d;
  border-radius: 3px;
  padding: 0.25rem 0.5rem;
  color: #f1e4bf;
  background: #0a0d12;
  font: 12px/1.4 Tahoma, Verdana, sans-serif;
}

.merchant-layout {
  display: grid;
  grid-template-columns: max-content minmax(190px, 1fr);
  gap: 1rem;
  overflow: visible;
}

.merchant-grids {
  display: grid;
  grid-template-columns: max-content max-content;
  gap: 1rem;
  overflow: visible;
  padding-bottom: 0.25rem;
}

.merchant-side-panel {
  min-width: 190px;
  border: 1px solid #473616;
  padding: 7px;
  background:
    linear-gradient(180deg, rgba(247, 207, 115, 0.06), transparent 34px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 3px),
    #070a0f;
  box-shadow: 0 0 0 1px #060403 inset;
  font-family: Tahoma, Verdana, sans-serif;
}

.selected-item-name {
  min-height: 20px;
  margin: 0 0 0.6rem;
  color: #f3cf73;
  font: 700 12px/1.35 Tahoma, Verdana, sans-serif;
}

.selected-action-form {
  display: grid;
  gap: 5px;
  margin-bottom: 0.75rem;
}

.selected-action-form label {
  color: #f1e4bf;
  font: 11px/1.2 Tahoma, Verdana, sans-serif;
}

.selected-action-form input {
  height: 25px;
  border-radius: 0;
  padding: 0.2rem 0.35rem;
  font: 12px/1.2 Tahoma, Verdana, sans-serif;
}

.selected-action-form button {
  min-height: 25px;
  border-radius: 0;
  padding: 0.15rem 0.45rem;
  color: #160f04;
  background: var(--accent);
  font: 700 12px/1 Tahoma, Verdana, sans-serif;
}

.selected-action-form button:disabled,
.selected-action-form input:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.similar-list {
  margin-top: 0.9rem;
}

.similar-listing {
  display: grid;
  gap: 2px;
  border-bottom: 1px solid #2f2518;
  padding: 0.45rem 0;
  color: #f1e4bf;
  font: 11px/1.25 Tahoma, Verdana, sans-serif;
}

.similar-listing strong {
  color: #f3cf73;
}

.similar-listing span {
  color: #d7c6a1;
}

.similar-listing em {
  color: #ffcc33;
  font-style: normal;
}

.consigned-panel {
  overflow: visible;
}

.consigned-window {
  display: inline-block;
  max-width: 100%;
  overflow: visible;
}

.consigned-grid {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  overflow: visible;
}

.consigned-empty {
  margin: 0;
  padding: 0.15rem 0.25rem;
}

.merchant-window {
  border: 1px solid #473616;
  padding: 7px;
  background:
    linear-gradient(180deg, rgba(247, 207, 115, 0.07), transparent 34px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 3px),
    #06080b;
  box-shadow: 0 0 0 1px #060403 inset;
  font-family: Tahoma, Verdana, sans-serif;
}

.merchant-title {
  border-bottom: 1px solid #3a2c18;
  margin-bottom: 7px;
  padding: 0 0 5px;
  color: #f3cf73;
  font-size: 12px;
  font-weight: 700;
}

.item-grid {
  display: grid;
  gap: 1px;
}

.bag-grid {
  grid-template-columns: repeat(6, 36px);
}

.storage-grid {
  grid-template-columns: repeat(10, 36px);
}

.tm-item-cell {
  position: relative;
  width: 36px;
  height: 32px;
  border: 1px solid #2f2518;
  background: radial-gradient(circle at 50% 35%, #151a20, #05070a 72%);
  box-shadow: 0 0 0 1px #050505 inset;
}

.tm-item-cell.empty {
  background: #06080b;
}

.tm-item-cell.filled {
  border-color: #72552d;
}

.tm-item-cell:hover,
.tm-item-cell:focus-within {
  z-index: 60000;
}

.tm-item-cell.is-selected {
  z-index: 60000;
  border-color: #f3cf73;
  box-shadow:
    0 0 0 1px #f3cf73 inset,
    0 0 12px rgba(243, 207, 115, 0.42);
}

.tm-item-cell img {
  display: block;
  width: 36px;
  height: 32px;
  image-rendering: pixelated;
  object-fit: contain;
}

.item-count {
  position: absolute;
  right: 1px;
  bottom: 0;
  color: #f7e6a2;
  font: 10px/1 Tahoma, Verdana, sans-serif;
  text-shadow: 1px 1px 0 #000;
}

.tm-item-cell:hover .mir-tooltip,
.tm-item-cell:focus-within .mir-tooltip,
.tm-item-cell.is-selected .mir-tooltip,
.listing-icon:hover .mir-tooltip,
.listing-icon:focus-within .mir-tooltip {
  display: block;
}

.cell-consign-form {
  position: absolute;
  z-index: 12001;
  left: 0;
  top: 34px;
  display: none;
  width: 132px;
  border: 1px solid #72552d;
  padding: 5px;
  background: rgba(0, 0, 0, 0.96);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.7);
}

.tm-item-cell:hover .cell-consign-form,
.tm-item-cell:focus-within .cell-consign-form,
.tm-item-cell.is-selected .cell-consign-form,
.tm-item-cell:hover .cell-remove-form,
.tm-item-cell:focus-within .cell-remove-form,
.tm-item-cell.is-selected .cell-remove-form {
  display: grid;
  gap: 4px;
}

.cell-consign-form input {
  height: 24px;
  border-radius: 0;
  padding: 0.2rem 0.35rem;
  font: 11px/1.2 Tahoma, Verdana, sans-serif;
}

.cell-consign-form button,
.cell-remove-form button {
  min-height: 22px;
  border-radius: 0;
  padding: 0.1rem 0.4rem;
  color: #160f04;
  background: var(--accent);
  font: 700 11px/1 Tahoma, Verdana, sans-serif;
}

.cell-search-link {
  display: block;
  color: #f3cf73;
  font: 700 11px/1.2 Tahoma, Verdana, sans-serif;
  text-decoration: none;
}

.cell-search-link:hover,
.cell-search-link:focus-visible {
  color: #fff1ae;
  text-decoration: underline;
}

.cell-remove-form {
  position: absolute;
  z-index: 20001;
  left: 0;
  top: 34px;
  display: none;
  width: 76px;
  border: 1px solid #72552d;
  padding: 5px;
  background: rgba(0, 0, 0, 0.96);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.7);
}

.tm-item-cell:hover .cell-remove-form,
.tm-item-cell:focus-within .cell-remove-form,
.tm-item-cell.is-selected .cell-remove-form {
  display: grid;
  gap: 4px;
}

.wiki-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-width: 0;
}

.magic-wiki,
.magic-wiki .panel {
  min-width: 0;
}

.wiki-tabs .tab-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.35rem 0.8rem;
  color: var(--muted);
  background: var(--panel);
  font: 700 0.9rem/1.1 Tahoma, Verdana, sans-serif;
  text-decoration: none;
}

.wiki-tabs .tab-link:hover,
.wiki-tabs .tab-link:focus-visible,
.wiki-tabs .tab-link.active {
  border-color: var(--accent);
  color: #fff4c7;
  background: #1d1f25;
}

.magic-class-heading {
  margin-bottom: 0.75rem;
}

.magic-table-wrap {
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
}

.magic-table {
  min-width: 760px;
}

.magic-table th,
.magic-table td {
  vertical-align: middle;
}

.magic-table th {
  white-space: nowrap;
}

.magic-table .numeric {
  color: #e6ddd2;
  font: 700 0.85rem/1.25 Tahoma, Verdana, sans-serif;
  text-align: right;
  white-space: nowrap;
}

.magic-skill {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  min-width: 220px;
}

.magic-skill strong,
.magic-skill span {
  display: block;
}

.magic-icon-wrap {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #3a2c18;
  background: radial-gradient(circle at 50% 35%, #202734, #05070a 74%);
}

.magic-icon {
  display: block;
  max-width: 34px;
  max-height: 34px;
  image-rendering: pixelated;
  object-fit: contain;
}

@media (max-width: 1080px) {
  .account-suite-grid {
    grid-template-columns: 1fr;
  }

  .db-workbench.has-heads {
    grid-template-columns: 1fr;
  }

  .db-heads-panel {
    position: static;
    max-height: 16rem;
  }

  .db-head-list {
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .access-manager-grid {
    grid-template-columns: 1fr;
  }

  .access-search-row,
  .access-grant-row,
  .access-level-form {
    align-items: stretch;
    flex-direction: column;
  }

  .account-search-row {
    grid-template-columns: 1fr;
  }

  .account-form-grid,
  .account-toggle-grid {
    grid-template-columns: 1fr;
  }

  .translation-overview-grid {
    grid-template-columns: 1fr;
  }

  .translation-workbench-grid {
    grid-template-columns: 1fr;
  }

  .translation-file-panel {
    position: static;
    max-height: 18rem;
  }

  .npc-editor-layout {
    grid-template-columns: 1fr;
  }

  .npc-map-toolbar,
  .npc-map-picker {
    align-items: stretch;
    flex-direction: column;
  }

  .npc-map-picker select,
  .npc-map-picker button {
    width: 100%;
  }

  .npc-map-scroll {
    max-height: 24rem;
  }

  .translation-toolbar {
    align-items: stretch;
    justify-content: flex-start;
  }

  .translation-toolbar input:not([type]) {
    width: 100%;
    min-width: 0;
  }

  .armoury-layout {
    grid-template-columns: 1fr;
  }

  .mir-character-body {
    grid-template-columns: 1fr;
  }

  .mir-equipment-window {
    width: 100%;
    max-width: 560px;
  }

  .character-strip {
    display: grid;
  }

  .merchant-grids {
    grid-template-columns: max-content;
  }

  .merchant-layout {
    grid-template-columns: max-content;
  }

  .db-overview-grid {
    grid-template-columns: 1fr;
  }

  .db-overview-grid .db-toolbar {
    justify-content: flex-start;
  }

  .db-toolbar input,
  .db-toolbar select {
    min-width: 0;
    width: 100%;
  }

  .db-workbench.has-heads {
    grid-template-columns: 1fr;
  }

  .db-heads-panel {
    position: static;
    max-height: 18rem;
  }

  .db-head-list {
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  }

}

@media (max-width: 720px) {
  .site-header nav {
    justify-content: flex-start;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-entrance {
    min-height: calc(100svh - 182px);
    padding: 2rem 1rem 5.5rem;
  }

  .portal-gate {
    top: 45%;
    width: min(82vw, 22rem);
  }

  .portal-copy {
    margin-top: 0;
  }

  .portal-line {
    font-size: 1rem;
  }

  .portal-actions .button {
    min-height: 2.75rem;
    padding: 0.58rem 0.9rem;
  }
}

@media (max-height: 620px) {
  .portal-entrance {
    min-height: 430px;
  }
}

/* Player-facing landing page */
body {
  background:
    radial-gradient(circle at 78% 10%, rgba(210, 155, 74, 0.16), transparent 28rem),
    linear-gradient(180deg, #070b0d 0%, #080a0b 45%, #050607 100%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  min-height: 78px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(204, 176, 119, 0.18);
  background: rgba(7, 11, 13, 0.94);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.brand {
  gap: 0.8rem;
  min-width: 220px;
}

.brand-mark {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  background: #020202;
  box-shadow: 0 0 0 1px rgba(224, 190, 119, 0.35), 0 0 22px rgba(226, 181, 59, 0.18);
}

.brand-mark::before,
.brand-mark::after {
  content: none;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text strong {
  color: #e8c985;
  font: 700 1.55rem/1 Georgia, "Times New Roman", serif;
  letter-spacing: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.72);
}

.primary-nav {
  flex: 1;
  justify-content: center;
  gap: 0.28rem 0.85rem;
}

.site-header nav a,
.primary-nav a {
  position: relative;
  min-height: 78px;
  display: inline-flex;
  align-items: center;
  color: #d9d4c7;
  font: 700 0.78rem/1.1 Georgia, "Times New Roman", serif;
  letter-spacing: 0;
  text-transform: uppercase;
  text-decoration: none;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: #ffe6aa;
}

.primary-nav a:first-child::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 54px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #e5bf6f, transparent);
  transform: translateX(-50%);
}

.primary-nav a:first-child::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: #e5bf6f;
  transform: translateX(-50%) rotate(45deg);
}

.site-header nav a.download-link {
  border: 0;
  padding: 0;
  color: #d9d4c7;
  background: transparent;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  min-width: 250px;
}

.language-switch {
  display: inline-grid;
  gap: 0.22rem;
  min-width: 7.4rem;
}

.language-switch span {
  color: #cabda3;
  font: 800 0.62rem/1 "Segoe UI", Tahoma, Verdana, sans-serif;
  text-transform: uppercase;
}

.language-switch select {
  min-height: 2.25rem;
  border: 1px solid rgba(226, 189, 108, 0.34);
  border-radius: 5px;
  padding: 0.35rem 1.85rem 0.35rem 0.55rem;
  color: #f5ddb0;
  background: rgba(12, 13, 12, 0.92);
  font: 800 0.78rem/1 "Segoe UI", Tahoma, Verdana, sans-serif;
}

.language-switch-mobile {
  margin: 0.42rem 0.55rem 0.25rem;
}

html[lang="zh-Hans"] body,
html[lang="zh-Hans"] button,
html[lang="zh-Hans"] input,
html[lang="zh-Hans"] select,
html[lang="zh-Hans"] textarea {
  font-family: "Microsoft YaHei", "Noto Sans SC", "PingFang SC", "Segoe UI", Tahoma, Verdana, sans-serif;
}

html[lang="zh-Hans"] h1,
html[lang="zh-Hans"] h2,
html[lang="zh-Hans"] h3,
html[lang="zh-Hans"] .brand-text strong,
html[lang="zh-Hans"] .payments-page .payments-hero h1,
html[lang="zh-Hans"] .payments-page .payments-section-head h2,
html[lang="zh-Hans"] .payments-page .checkout-panel h2,
html[lang="zh-Hans"] .payments-page .legal-summary h2 {
  font-family: "Microsoft YaHei", "Noto Serif SC", "Noto Sans SC", "Segoe UI", Tahoma, Verdana, sans-serif;
}

.server-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 43px;
  border: 1px solid rgba(214, 204, 181, 0.14);
  border-radius: 6px;
  padding: 0.45rem 0.72rem;
  color: #d9d4c7;
  background: rgba(18, 23, 25, 0.88);
}

.server-status-pill i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #27c36f;
  box-shadow: 0 0 18px rgba(39, 195, 111, 0.55);
}

.server-status-pill span {
  display: grid;
  font: 700 0.78rem/1.1 "Segoe UI", Tahoma, Verdana, sans-serif;
}

.server-status-pill small {
  color: #7ee09d;
  font: inherit;
}

.login-button,
.logout-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  border: 1px solid rgba(214, 204, 181, 0.18);
  border-radius: 6px;
  padding: 0.5rem 0.95rem;
  color: #f1e8d3;
  background: rgba(16, 19, 21, 0.88);
  font: 700 0.88rem/1 "Segoe UI", Tahoma, Verdana, sans-serif;
  text-transform: uppercase;
  text-decoration: none;
}

.logout-link {
  padding-inline: 0.7rem;
  color: #a9a093;
  background: transparent;
}

.site-main:has(.player-home) {
  width: 100%;
  padding: 0;
}

.player-home {
  min-height: calc(100svh - 78px);
  padding: 0 4.5vw 1.6rem;
  color: #eee5d2;
  background: #070a0b;
}

.mir-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 560px;
  height: calc(100svh - 320px);
  max-height: 690px;
  overflow: hidden;
  border-bottom: 1px solid rgba(229, 191, 111, 0.14);
  isolation: isolate;
}

.mir-hero-bg {
  position: absolute;
  inset: 0 -4.5vw;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(5, 8, 9, 0.96) 0%, rgba(5, 8, 9, 0.74) 32%, rgba(5, 8, 9, 0.18) 58%, rgba(5, 8, 9, 0.08) 100%),
    linear-gradient(180deg, rgba(5, 8, 9, 0.05), rgba(5, 8, 9, 0.88)),
    url("/images/home/playmir-hero.png") center right / cover no-repeat;
}

.mir-hero::after {
  content: "";
  position: absolute;
  inset: auto -4.5vw 0;
  z-index: -1;
  height: 38%;
  background: linear-gradient(180deg, transparent, rgba(7, 10, 11, 0.94));
}

.mir-hero-copy {
  width: min(840px, 58%);
  padding: 2.5rem 0 1.5rem 2.1rem;
}

.mir-kicker {
  margin: 0 0 1rem;
  color: #91c887;
  font: 800 0.82rem/1.2 "Segoe UI", Tahoma, Verdana, sans-serif;
  text-transform: uppercase;
}

.mir-hero h1 {
  display: grid;
  gap: 0.1rem;
  margin: 0;
  color: #e8c985;
  font: 700 6.1rem/0.92 Georgia, "Times New Roman", serif;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow:
    0 2px 0 #fff0bc,
    0 5px 0 #44311c,
    0 24px 46px rgba(0, 0, 0, 0.82);
}

.mir-hero h1 span:last-child {
  color: #d6d1c6;
  text-shadow:
    0 2px 0 #fff7df,
    0 5px 0 #343333,
    0 24px 46px rgba(0, 0, 0, 0.82);
}

.mir-tagline {
  max-width: 34rem;
  margin: 0;
  color: #d9d3c3;
  font: 1.68rem/1.35 Georgia, "Times New Roman", serif;
}

.mir-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 2.3rem;
}

.mir-action {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 0.72rem;
  min-height: 72px;
  border: 1px solid rgba(220, 202, 158, 0.22);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  color: #f5ecd8;
  background: rgba(17, 22, 24, 0.78);
  text-decoration: none;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

.mir-action.primary {
  border-color: rgba(85, 213, 152, 0.48);
  background: linear-gradient(180deg, rgba(24, 96, 70, 0.88), rgba(14, 54, 44, 0.88));
}

.mir-action.download {
  border-color: rgba(230, 184, 91, 0.42);
  background: linear-gradient(180deg, rgba(118, 82, 31, 0.9), rgba(58, 42, 24, 0.9));
}

.mir-action:hover,
.mir-action:focus-visible {
  border-color: rgba(235, 206, 135, 0.72);
  transform: translateY(-1px);
}

.mir-action-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #f2dfb0;
  font-size: 1.45rem;
}

.mir-action strong,
.mir-action small {
  display: block;
  min-width: 0;
}

.mir-action strong {
  color: #fff5d8;
  font: 800 0.82rem/1.15 Georgia, "Times New Roman", serif;
  text-transform: uppercase;
  white-space: nowrap;
}

.mir-action small {
  color: #cfc4b2;
  font-size: 0.88rem;
}

.mir-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.25rem;
  margin: 1.7rem 0 0;
  padding: 0;
  color: #9fc789;
  list-style: none;
  font: 700 0.88rem/1 "Segoe UI", Tahoma, Verdana, sans-serif;
}

.mir-traits li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.mir-traits li::before {
  content: "✦";
  color: #84b878;
}

.mir-panels {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.1rem;
}

.mir-panel {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 1rem;
  min-height: 166px;
  border: 1px solid rgba(210, 190, 148, 0.22);
  border-radius: 6px;
  padding: 1.45rem 1.35rem;
  color: #e8dfca;
  background:
    linear-gradient(180deg, rgba(26, 31, 33, 0.88), rgba(12, 16, 18, 0.88)),
    radial-gradient(circle at 20% 15%, rgba(219, 178, 94, 0.12), transparent 12rem);
  text-decoration: none;
}

.mir-panel:hover,
.mir-panel:focus-visible {
  border-color: rgba(235, 206, 135, 0.58);
  background-color: rgba(24, 31, 33, 0.96);
}

.mir-panel-icon {
  color: #d9b566;
  font-size: 2.5rem;
  line-height: 1;
  text-shadow: 0 0 22px rgba(217, 181, 102, 0.22);
}

.mir-panel strong,
.mir-panel small,
.mir-panel em {
  display: block;
}

.mir-panel strong {
  color: #ead9b0;
  font: 700 1.16rem/1.2 Georgia, "Times New Roman", serif;
  text-transform: uppercase;
}

.mir-panel small {
  min-height: 3.4rem;
  margin-top: 0.35rem;
  color: #c4bbad;
  font-size: 0.96rem;
  line-height: 1.45;
}

.mir-panel em {
  margin-top: 0.8rem;
  color: #b9d18e;
  font-style: normal;
  text-transform: uppercase;
}

.mir-realm-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(9rem, 0.18fr)) minmax(18rem, 1fr);
  align-items: center;
  gap: 1.4rem;
  min-height: 92px;
  border: 1px solid rgba(210, 190, 148, 0.18);
  border-radius: 6px;
  margin-top: 0.95rem;
  padding: 1rem 1.35rem;
  color: #d9d1c2;
  background: rgba(12, 17, 19, 0.9);
}

.mir-realm-strip > div {
  border-right: 1px solid rgba(210, 190, 148, 0.16);
  padding-right: 1.4rem;
}

.mir-realm-strip strong,
.mir-realm-strip span {
  display: block;
}

.mir-realm-strip div strong {
  color: #9ac878;
  font: 700 1.72rem/1 Georgia, "Times New Roman", serif;
}

.mir-realm-strip div span {
  color: #bdb4a5;
  font: 700 0.82rem/1.2 "Segoe UI", Tahoma, Verdana, sans-serif;
  text-transform: uppercase;
}

.mir-realm-strip .is-unavailable strong {
  color: #766f61;
}

.mir-realm-strip .is-unavailable span {
  color: #8d8578;
}

.mir-announcement {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  color: #dcd5c8;
  text-decoration: none;
}

.mir-announcement span {
  border: 1px solid rgba(127, 193, 106, 0.35);
  border-radius: 4px;
  padding: 0.34rem 0.62rem;
  color: #cfeec0;
  background: rgba(40, 93, 50, 0.48);
  font: 800 0.76rem/1 "Segoe UI", Tahoma, Verdana, sans-serif;
  text-transform: uppercase;
}

.mir-announcement strong {
  color: #dcd5c8;
  font: 0.95rem/1.35 "Segoe UI", Tahoma, Verdana, sans-serif;
}

.mir-announcement em {
  color: #8bd17f;
  font-style: normal;
}

.site-footer {
  width: 100%;
  padding: 1.6rem 4.5vw 2rem;
  border-top: 1px solid rgba(210, 190, 148, 0.12);
  color: #8f897d;
  background: #070a0b;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
}

.site-footer nav a {
  color: #9b9488;
  text-decoration: none;
}

/* Shared player tool pages */
.site-main:not(:has(.player-home)) {
  width: min(1180px, calc(100% - 2rem));
  padding: 2rem 0 3rem;
}

.site-main:not(:has(.player-home)):has(.mir-character-window),
.site-main:not(:has(.player-home)):has(.merchant-topbar),
.site-main:not(:has(.player-home)):has(.server-control),
.site-main:not(:has(.player-home)):has(.admin-accounts),
.site-main:not(:has(.player-home)):has(.translation-workbench-grid),
.site-main:not(:has(.player-home)):has(.db-workbench) {
  width: min(1480px, calc(100% - 2rem));
}

.site-main:not(:has(.player-home)) .stack {
  gap: 1.1rem;
}

.site-main:not(:has(.player-home)) .panel,
.site-main:not(:has(.player-home)) .form-card,
.site-main:not(:has(.player-home)) .filters,
.merchant-topbar,
.tab-strip,
.message {
  border-color: rgba(210, 190, 148, 0.2);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(26, 31, 33, 0.92), rgba(12, 16, 18, 0.92)),
    radial-gradient(circle at 14% 12%, rgba(219, 178, 94, 0.1), transparent 14rem);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.site-main:not(:has(.player-home)) .form-card {
  margin: 2.8rem auto;
  padding: clamp(1.2rem, 4vw, 1.8rem);
}

.site-main:not(:has(.player-home)) .panel h2,
.site-main:not(:has(.player-home)) .panel h3,
.split-heading h2,
.split-heading h3 {
  color: #ead9b0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.site-main:not(:has(.player-home)) label,
.site-main:not(:has(.player-home)) .muted,
.site-main:not(:has(.player-home)) .help {
  color: #bdb4a5;
}

.site-main:not(:has(.player-home)) input,
.site-main:not(:has(.player-home)) select,
.site-main:not(:has(.player-home)) textarea {
  border-color: rgba(210, 190, 148, 0.22);
  border-radius: 5px;
  color: #f1eadc;
  background: rgba(6, 9, 10, 0.9);
}

.site-main:not(:has(.player-home)) input:focus,
.site-main:not(:has(.player-home)) select:focus,
.site-main:not(:has(.player-home)) textarea:focus {
  outline-color: rgba(224, 190, 119, 0.52);
}

.site-main:not(:has(.player-home)) .filters {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) minmax(11rem, 0.35fr) auto;
  align-items: end;
  gap: 0.85rem;
}

.button,
button,
.site-main:not(:has(.player-home)) a.button {
  border-color: rgba(210, 190, 148, 0.22);
  border-radius: 5px;
  color: #f5ecd8;
  background: rgba(17, 22, 24, 0.88);
}

.button.primary,
button.primary {
  border-color: rgba(85, 213, 152, 0.48);
  color: #f7fff6;
  background: linear-gradient(180deg, rgba(24, 96, 70, 0.95), rgba(14, 54, 44, 0.95));
}

.button.secondary,
button.secondary {
  border-color: rgba(230, 184, 91, 0.42);
  color: #f3d78d;
  background: rgba(75, 53, 27, 0.58);
}

.site-main:not(:has(.player-home)) table {
  background: rgba(5, 8, 9, 0.45);
}

.site-main:not(:has(.player-home)) th,
.site-main:not(:has(.player-home)) td {
  border-bottom-color: rgba(210, 190, 148, 0.14);
}

.site-main:not(:has(.player-home)) th {
  color: #9fc789;
}

.site-main:not(:has(.player-home)) .tab-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.45rem;
}

.site-main:not(:has(.player-home)) .tab-link,
.wiki-tabs .tab-link {
  border-color: rgba(210, 190, 148, 0.18);
  color: #d9d1c2;
  background: rgba(10, 14, 16, 0.86);
}

.site-main:not(:has(.player-home)) .tab-link:hover,
.site-main:not(:has(.player-home)) .tab-link:focus-visible,
.site-main:not(:has(.player-home)) .tab-link.active,
.wiki-tabs .tab-link:hover,
.wiki-tabs .tab-link:focus-visible,
.wiki-tabs .tab-link.active {
  border-color: rgba(230, 184, 91, 0.58);
  color: #fff4c7;
  background: rgba(81, 58, 30, 0.78);
}

.message {
  margin-bottom: 0;
}

.message.error {
  border-color: rgba(223, 107, 107, 0.46);
  background: rgba(68, 24, 24, 0.42);
}

.message.success {
  border-color: rgba(121, 197, 138, 0.46);
  background: rgba(24, 68, 40, 0.42);
}

.site-main:has(.community-shell) {
  width: min(1320px, calc(100% - 2rem));
}

.community-shell {
  display: grid;
  gap: 1rem;
}

.community-hero,
.forum-page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.2rem;
  border: 1px solid rgba(210, 190, 148, 0.2);
  border-radius: 6px;
  padding: clamp(1.2rem, 4vw, 2rem);
  background:
    linear-gradient(120deg, rgba(22, 27, 28, 0.95), rgba(10, 13, 14, 0.95)),
    radial-gradient(circle at 8% 12%, color-mix(in srgb, var(--forum-accent, var(--accent)), transparent 72%), transparent 18rem);
  box-shadow: 0 24px 42px rgba(0, 0, 0, 0.22);
}

.community-hero h1,
.forum-page-head h1 {
  margin: 0;
  color: #fff1c8;
  font: 700 clamp(2rem, 5vw, 3.6rem)/1 Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.community-hero p,
.forum-page-head p {
  max-width: 720px;
  margin: 0.65rem 0 0;
  color: #d8cdb8;
}

.community-eyebrow {
  margin: 0 0 0.55rem;
  color: color-mix(in srgb, var(--forum-accent, var(--accent)), #ffffff 18%);
  font: 800 0.78rem/1.1 "Segoe UI", Tahoma, Verdana, sans-serif;
  text-transform: uppercase;
}

.community-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.community-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 0.35fr);
  gap: 1rem;
  align-items: start;
}

.forum-board,
.forum-side-panel,
.forum-post-stack {
  display: grid;
  gap: 1rem;
}

.forum-category-grid {
  display: grid;
  gap: 0.75rem;
}

.forum-category-card,
.forum-topic-row,
.forum-latest-list a {
  color: #f4ead7;
  text-decoration: none;
}

.forum-category-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(210, 190, 148, 0.2);
  border-left: 4px solid var(--forum-accent, var(--accent));
  border-radius: 6px;
  padding: 1rem;
  background:
    linear-gradient(180deg, rgba(23, 29, 30, 0.92), rgba(10, 14, 15, 0.92)),
    radial-gradient(circle at 4% 20%, color-mix(in srgb, var(--forum-accent, var(--accent)), transparent 80%), transparent 12rem);
}

.forum-category-card:hover,
.forum-category-card:focus-visible,
.forum-topic-row:hover,
.forum-topic-row:focus-visible,
.forum-latest-list a:hover,
.forum-latest-list a:focus-visible {
  border-color: rgba(230, 184, 91, 0.5);
  color: #fff4c7;
}

.forum-card-icon {
  display: inline-grid;
  place-items: center;
  width: 3.1rem;
  height: 3.1rem;
  border: 1px solid rgba(230, 184, 91, 0.34);
  border-radius: 5px;
  color: #f5d885;
  background: rgba(6, 9, 10, 0.7);
  font: 800 0.72rem/1 "Segoe UI", Tahoma, Verdana, sans-serif;
}

.forum-card-main,
.forum-topic-main,
.forum-card-meta,
.forum-topic-count,
.forum-latest-list a,
.forum-moderator-list div {
  display: grid;
  gap: 0.15rem;
}

.forum-card-main strong,
.forum-topic-main strong,
.forum-latest-list strong {
  color: #fff1c8;
  font: 800 1.03rem/1.2 "Segoe UI", Tahoma, Verdana, sans-serif;
}

.forum-card-main span,
.forum-card-main small,
.forum-topic-main span,
.forum-card-meta span,
.forum-topic-count span,
.forum-latest-list span,
.forum-moderator-list span,
.forum-note {
  color: #bdb4a5;
  font-size: 0.9rem;
}

.forum-card-meta,
.forum-topic-count {
  justify-items: end;
  min-width: 5.5rem;
}

.forum-card-meta strong,
.forum-topic-count strong {
  color: #9fda8c;
  font: 800 1.15rem/1 "Segoe UI", Tahoma, Verdana, sans-serif;
}

.forum-side-panel .panel,
.forum-list-panel,
.forum-moderator-panel,
.forum-reply-panel,
.forum-editor-panel,
.forum-settings-panel,
.forum-moderators-panel,
.forum-category-admin {
  background:
    linear-gradient(180deg, rgba(22, 27, 28, 0.94), rgba(10, 14, 15, 0.94)),
    radial-gradient(circle at 10% 0, rgba(214, 168, 76, 0.08), transparent 14rem);
}

.forum-rules p {
  white-space: pre-wrap;
}

.forum-latest-list {
  display: grid;
  gap: 0.65rem;
}

.forum-latest-list a {
  border: 1px solid rgba(210, 190, 148, 0.14);
  border-radius: 5px;
  padding: 0.72rem;
  background: rgba(6, 9, 10, 0.48);
}

.forum-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: #bdb4a5;
  font-size: 0.92rem;
}

.forum-crumbs a {
  color: #f0d184;
  text-decoration: none;
}

.forum-crumbs span::before {
  content: "/";
  margin-right: 0.45rem;
  color: #6f6a5f;
}

.forum-topic-list {
  display: grid;
  gap: 0.6rem;
}

.forum-topic-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(210, 190, 148, 0.16);
  border-radius: 5px;
  padding: 0.85rem;
  background: rgba(6, 9, 10, 0.48);
}

.forum-topic-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.forum-moderator-panel .section-head {
  align-items: center;
}

.forum-mod-actions,
.forum-post-tools {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) repeat(3, auto);
  gap: 0.55rem;
  align-items: center;
}

.forum-post-stack {
  margin-top: 0.15rem;
}

.forum-post {
  border: 1px solid rgba(210, 190, 148, 0.18);
  border-radius: 6px;
  padding: 1rem;
  background:
    linear-gradient(180deg, rgba(22, 27, 28, 0.94), rgba(9, 12, 13, 0.94)),
    radial-gradient(circle at 0 0, rgba(121, 197, 138, 0.06), transparent 12rem);
}

.forum-post > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.forum-post > header div {
  display: grid;
  gap: 0.1rem;
}

.forum-post > header span {
  color: #bdb4a5;
  font-size: 0.9rem;
}

.forum-body {
  white-space: pre-wrap;
  color: #efe7d8;
}

.forum-post.is-hidden,
.forum-category-card.is-muted,
.forum-topic-row.is-muted {
  opacity: 0.68;
}

.forum-post-tools {
  grid-template-columns: minmax(10rem, 1fr) auto;
  margin-top: 0.9rem;
}

.forum-reply-panel form,
.forum-editor-panel form,
.forum-admin-form {
  display: grid;
  gap: 0.9rem;
}

.forum-editor-panel label,
.forum-admin-form label {
  display: grid;
  gap: 0.32rem;
}

.forum-reply-panel textarea,
.forum-editor-panel textarea,
.forum-admin-form textarea {
  resize: vertical;
}

.forum-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.45fr);
  gap: 1rem;
}

.forum-moderator-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.forum-moderator-list div {
  border: 1px solid rgba(210, 190, 148, 0.14);
  border-radius: 5px;
  padding: 0.65rem;
  background: rgba(6, 9, 10, 0.45);
}

.forum-admin-categories {
  display: grid;
  gap: 0.7rem;
}

.forum-category-admin-row {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) minmax(8rem, 0.8fr) minmax(16rem, 2fr) minmax(5rem, 0.45fr) minmax(7rem, 0.55fr) minmax(5rem, 0.35fr) auto auto auto;
  gap: 0.55rem;
  align-items: end;
  border: 1px solid rgba(210, 190, 148, 0.16);
  border-left: 4px solid var(--forum-accent, var(--accent));
  border-radius: 5px;
  padding: 0.75rem;
  background: rgba(6, 9, 10, 0.42);
}

.forum-category-admin-row label {
  display: grid;
  gap: 0.25rem;
}

.forum-category-admin-row .checkbox-line {
  align-self: center;
  margin-bottom: 0.55rem;
}

.forum-category-admin-row.new-category {
  border-style: dashed;
}

.site-main:has(.payments-shell) {
  width: min(1180px, calc(100% - 2rem));
}

.payments-shell {
  display: grid;
  gap: 0.7rem;
}

.payments-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  border: 1px solid rgba(210, 190, 148, 0.16);
  border-radius: 6px;
  padding: 0.95rem 1.15rem;
  background:
    linear-gradient(120deg, rgba(20, 25, 26, 0.94), rgba(8, 11, 12, 0.94)),
    radial-gradient(circle at 12% 20%, rgba(217, 181, 102, 0.09), transparent 16rem);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.16);
}

.payments-hero h1 {
  margin: 0;
  color: #fff1c8;
  font: 700 clamp(1.55rem, 2.4vw, 2rem)/1.02 Georgia, "Times New Roman", serif;
}

.payments-hero p {
  max-width: 620px;
  margin: 0.35rem 0 0;
  color: #d8cdb8;
  font-size: 0.88rem;
}

.payments-eyebrow {
  margin: 0 0 0.28rem;
  color: #9fda8c;
  font: 800 0.68rem/1.1 "Segoe UI", Tahoma, Verdana, sans-serif;
  text-transform: uppercase;
}

.payments-rate {
  display: grid;
  gap: 0.18rem;
  min-width: 9.8rem;
  border: 1px solid rgba(121, 197, 138, 0.32);
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
  background: rgba(6, 9, 10, 0.58);
}

.payments-rate span,
.payments-rate small {
  color: #bdb4a5;
  font-size: 0.76rem;
}

.payments-rate strong {
  color: #9fda8c;
  font: 800 1rem/1 Georgia, "Times New Roman", serif;
}

.payment-package-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.payment-package {
  display: grid;
  align-content: space-between;
  gap: 0.55rem;
  border: 1px solid rgba(210, 190, 148, 0.16);
  border-radius: 6px;
  min-height: 9.4rem;
  padding: 0.72rem;
  background:
    linear-gradient(180deg, rgba(20, 26, 27, 0.92), rgba(8, 12, 13, 0.92)),
    radial-gradient(circle at 12% 0%, rgba(121, 197, 138, 0.08), transparent 10rem);
}

.payment-package-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.payment-package-top span {
  color: #9fda8c;
  font: 800 0.68rem/1.1 "Segoe UI", Tahoma, Verdana, sans-serif;
  text-transform: uppercase;
}

.payment-package-top small {
  border: 1px solid rgba(210, 190, 148, 0.18);
  border-radius: 999px;
  padding: 0.14rem 0.42rem;
  color: #9e9688;
  font-size: 0.68rem;
}

.payment-package-price {
  display: grid;
  gap: 0.22rem;
}

.payment-package h2 {
  margin: 0;
  color: #ead9b0;
  font: 700 1.42rem/1 Georgia, "Times New Roman", serif;
}

.payment-package strong {
  color: #fff1c8;
  font: 800 0.9rem/1.2 "Segoe UI", Tahoma, Verdana, sans-serif;
}

.payment-package-price small {
  color: #bdb4a5;
  font: 700 0.72rem/1.25 "Segoe UI", Tahoma, Verdana, sans-serif;
}

.payment-package button,
.payment-order-summary button,
.payment-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  border: 1px solid rgba(210, 190, 148, 0.18);
  border-radius: 5px;
  padding: 0.34rem 0.68rem;
  color: #fff1c8;
  background: linear-gradient(180deg, rgba(95, 72, 31, 0.66), rgba(37, 29, 16, 0.86));
  font: 800 0.78rem/1.1 "Segoe UI", Tahoma, Verdana, sans-serif;
  transition: border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
  text-decoration: none;
}

.payment-package button:hover:not(:disabled),
.payment-order-summary button:hover:not(:disabled),
.payment-login-button:hover {
  border-color: rgba(159, 218, 140, 0.45);
  color: #ffffff;
  transform: translateY(-1px);
}

.payment-package button:disabled,
.payment-order-summary button:disabled {
  cursor: not-allowed;
  color: #bdb4a5;
  background: rgba(13, 17, 18, 0.86);
  opacity: 0.68;
}

.payment-checkout-status {
  min-height: 1.1rem;
  margin: 0;
  color: #bdb4a5;
  font-size: 0.76rem;
  line-height: 1.35;
}

.payment-custom-card {
  min-height: 9.4rem;
}

.payment-custom-card label {
  display: grid;
  gap: 0.24rem;
  color: #d8cdb8;
  font-size: 0.78rem;
}

.payment-custom-card input {
  min-height: 2.1rem;
  padding-block: 0.36rem;
}

#customGameGoldResult {
  min-height: 2.1rem;
  border: 1px solid rgba(210, 190, 148, 0.18);
  border-radius: 5px;
  padding: 0.44rem 0.58rem;
  background: rgba(6, 9, 10, 0.76);
}

.payment-checkout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.38fr);
  gap: 0.7rem;
  scroll-margin-top: 5.25rem;
  border: 1px solid rgba(210, 190, 148, 0.16);
  border-radius: 6px;
  padding: 0.75rem;
  background:
    linear-gradient(180deg, rgba(18, 23, 24, 0.9), rgba(7, 10, 11, 0.92)),
    radial-gradient(circle at 80% 0%, rgba(217, 181, 102, 0.08), transparent 14rem);
}

.payment-basket,
.payment-order-summary {
  display: grid;
  align-content: start;
  gap: 0.58rem;
  min-width: 0;
}

.payment-order-summary {
  border: 1px solid rgba(210, 190, 148, 0.12);
  border-radius: 5px;
  padding: 0.7rem;
  background: rgba(6, 9, 10, 0.46);
}

.payment-checkout-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.payment-checkout-head h2 {
  margin: 0;
  color: #fff1c8;
  font: 700 1.22rem/1.05 Georgia, "Times New Roman", serif;
}

.payment-checkout-head > span {
  border: 1px solid rgba(159, 218, 140, 0.28);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  color: #9fda8c;
  font-size: 0.75rem;
}

.payment-basket-lines {
  display: grid;
  gap: 0.42rem;
}

.payment-empty {
  margin: 0;
  border: 1px dashed rgba(210, 190, 148, 0.14);
  border-radius: 5px;
  padding: 0.72rem;
  color: #a9a093;
  background: rgba(6, 9, 10, 0.34);
  font-size: 0.84rem;
}

.payment-basket-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.55rem;
  border: 1px solid rgba(210, 190, 148, 0.12);
  border-radius: 5px;
  padding: 0.42rem 0.45rem 0.42rem 0.62rem;
  background: rgba(6, 9, 10, 0.52);
}

.payment-basket-line span {
  min-width: 0;
  color: #ead9b0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.payment-basket-line strong,
.payment-basket-line em {
  color: #fff1c8;
  font-size: 0.82rem;
  font-style: normal;
  white-space: nowrap;
}

.payment-basket-line em {
  color: #9fda8c;
}

.payment-basket-line button {
  min-height: 1.75rem;
  border: 1px solid rgba(210, 190, 148, 0.16);
  border-radius: 4px;
  padding: 0.2rem 0.48rem;
  color: #bdb4a5;
  background: rgba(13, 17, 18, 0.78);
  font-size: 0.72rem;
}

.payment-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(210, 190, 148, 0.12);
  padding-bottom: 0.42rem;
}

.payment-total-row span {
  color: #bdb4a5;
  font-size: 0.78rem;
}

.payment-total-row strong {
  color: #fff1c8;
  font: 800 1rem/1.1 "Segoe UI", Tahoma, Verdana, sans-serif;
}

.payment-character-target {
  display: grid;
  gap: 0.32rem;
  margin-top: 0.2rem;
}

.payment-provider-select {
  display: grid;
  gap: 0.32rem;
  margin-top: 0.2rem;
}

.payment-provider-select label,
.payment-character-target label {
  color: #bdb4a5;
  font-size: 0.78rem;
}

.payment-provider-select select,
.payment-character-target select {
  width: 100%;
  min-height: 2.25rem;
  border: 1px solid rgba(210, 190, 148, 0.18);
  border-radius: 5px;
  padding: 0.38rem 0.52rem;
  color: #fff1c8;
  background: rgba(6, 9, 10, 0.76);
  font: 800 0.82rem/1.2 "Segoe UI", Tahoma, Verdana, sans-serif;
}

.payment-character-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  border: 1px solid rgba(159, 218, 140, 0.28);
  border-radius: 5px;
  padding: 0.38rem 0.52rem;
  color: #9fda8c;
  background: rgba(6, 9, 10, 0.6);
  font-size: 0.8rem;
  text-decoration: none;
}

.payment-legal-stack {
  display: grid;
  gap: 0.45rem;
}

.payment-disclosure {
  border: 1px solid rgba(210, 190, 148, 0.14);
  border-radius: 6px;
  background: rgba(11, 15, 16, 0.82);
}

.payment-disclosure summary {
  display: grid;
  grid-template-columns: minmax(0, 0.34fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  min-height: 2.8rem;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  list-style: none;
}

.payment-disclosure summary::-webkit-details-marker {
  display: none;
}

.payment-disclosure summary::after {
  content: "+";
  color: #9fda8c;
  font: 800 1rem/1 "Segoe UI", Tahoma, Verdana, sans-serif;
}

.payment-disclosure[open] summary::after {
  content: "-";
}

.payment-disclosure summary span {
  color: #ead9b0;
  font: 700 1rem/1.1 Georgia, "Times New Roman", serif;
}

.payment-disclosure summary small {
  color: #a9a093;
  font-size: 0.84rem;
}

.payment-disclosure-body {
  margin: 0;
  border-top: 1px solid rgba(210, 190, 148, 0.1);
  padding: 0.8rem 0.95rem 0.95rem;
  color: #d8cdb8;
  font-size: 0.86rem;
}

.payment-disclosure-body h3 {
  margin: 0.95rem 0 0.35rem;
  color: #ead9b0;
  font: 700 1rem/1.15 Georgia, "Times New Roman", serif;
}

.payment-disclosure-body h3:first-child,
.payment-disclosure-body .payment-legal-updated + p + h3 {
  margin-top: 0;
}

.payment-disclosure-body p {
  margin: 0.35rem 0 0;
  color: #d8cdb8;
}

.payment-disclosure-body ul {
  display: grid;
  gap: 0.32rem;
  margin: 0.45rem 0 0;
  padding-left: 1.8rem;
}

.payment-disclosure-body a {
  color: #9fda8c;
}

.payment-disclosure-body blockquote {
  margin: 0.55rem 0 0;
  border-left: 2px solid rgba(159, 218, 140, 0.5);
  padding: 0.45rem 0.7rem;
  color: #efe0bd;
  background: rgba(6, 9, 10, 0.42);
}

.payment-smallprint {
  border-top: 1px solid rgba(210, 190, 148, 0.14);
  margin-top: 0.65rem !important;
  padding-top: 0.6rem;
  color: #f0d184 !important;
}

.payment-legal-updated {
  margin: 0 0 0.55rem !important;
  color: #9fda8c !important;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.payment-acknowledgement {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  margin-top: 0.45rem;
  color: #d8cdb8;
  font-size: 0.78rem;
  line-height: 1.35;
}

.payment-acknowledgement input {
  margin-top: 0.18rem;
}

.payment-character-confirmation {
  margin-top: 0.35rem;
  color: #efe0bd;
}

.payment-character-confirmation strong {
  color: #fff1c8;
}

.payment-order-template {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.75rem;
  margin-top: 0.7rem;
  border: 1px solid rgba(210, 190, 148, 0.12);
  border-radius: 5px;
  padding: 0.65rem 0.75rem;
  background: rgba(6, 9, 10, 0.42);
  color: #d8cdb8;
  font-size: 0.78rem;
}

.payment-order-template strong {
  color: #fff1c8;
}

@media (max-width: 980px) {
  .community-grid,
  .forum-admin-grid {
    grid-template-columns: 1fr;
  }

  .payment-package-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payment-checkout {
    grid-template-columns: 1fr;
  }

  .forum-category-admin-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forum-category-admin-row .wide,
  .forum-category-admin-row button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .community-hero,
  .forum-page-head,
  .payments-hero {
    align-items: start;
    flex-direction: column;
  }

  .payment-package-grid {
    grid-template-columns: 1fr;
  }

  .payment-package-price {
    align-items: start;
    display: grid;
    gap: 0.28rem;
  }

  .payment-basket-line {
    grid-template-columns: 1fr auto;
  }

  .payment-basket-line strong,
  .payment-basket-line em {
    justify-self: start;
  }

  .payment-disclosure summary {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 2.85rem;
  }

  .payment-disclosure summary small {
    display: none;
  }

  .payment-order-template {
    grid-template-columns: 1fr;
  }

  .forum-category-card,
  .forum-topic-row {
    grid-template-columns: 1fr;
  }

  .forum-card-meta,
  .forum-topic-count,
  .forum-topic-badges {
    justify-items: start;
    justify-content: flex-start;
  }

  .forum-mod-actions,
  .forum-post-tools,
  .forum-category-admin-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
    min-height: 0;
    padding: 0.85rem 1.25rem;
  }

  .brand,
  .header-actions {
    min-width: 0;
  }

  .primary-nav {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
  }

  .site-header nav a,
  .primary-nav a {
    min-height: 36px;
  }

  .mir-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mir-realm-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mir-announcement {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .player-home {
    padding-inline: 1rem;
  }

  .mir-hero {
    min-height: 610px;
    height: auto;
    align-items: flex-end;
  }

  .mir-hero-bg {
    inset-inline: -1rem;
    background-position: 63% center;
  }

  .mir-hero-copy {
    width: min(100%, 35rem);
    padding: 7rem 0 1.5rem;
  }

  .mir-hero h1 {
    font-size: 4rem;
  }

  .mir-tagline {
    font-size: 1.2rem;
  }

  .mir-actions,
  .mir-panels,
  .mir-realm-strip {
    grid-template-columns: 1fr;
  }

  .mir-action {
    min-height: 64px;
  }

  .mir-realm-strip > div {
    border-right: 0;
    border-bottom: 1px solid rgba(210, 190, 148, 0.14);
    padding: 0 0 0.85rem;
  }

  .mir-announcement {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding-inline: 1rem;
  }

  .brand-text strong {
    font-size: 1.34rem;
  }

  .header-actions {
    align-items: stretch;
    width: 100%;
  }

  .server-status-pill,
  .login-button,
  .logout-link {
    flex: 1;
  }

  .mir-hero h1 {
    font-size: 3rem;
  }

  .mir-panel {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .site-main:not(:has(.player-home)) .filters {
    grid-template-columns: 1fr;
  }
}

.world-atlas-intro,
.world-atlas-workspace {
  display: grid;
  gap: 1rem;
}

.world-atlas-intro {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.world-atlas-intro h1,
.world-atlas-details h2,
.world-atlas-details h3 {
  margin-top: 0;
}

.world-atlas-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
}

.world-atlas-stats div {
  min-width: 5rem;
}

.world-atlas-stats dt,
.world-atlas-stats dd,
.atlas-list,
.atlas-list li {
  margin: 0;
}

.world-atlas-stats dt,
.atlas-list span,
.atlas-link small {
  color: var(--muted);
  font-size: 0.78rem;
}

.world-atlas-stats dd {
  font-weight: 700;
}

.world-atlas-workspace {
  grid-template-columns: minmax(0, 1.6fr) minmax(18rem, 0.7fr);
  align-items: start;
}

.world-atlas-graph-panel {
  min-height: 43rem;
}

.world-atlas-toolbar,
.atlas-title,
.atlas-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.world-atlas-toolbar input {
  min-width: min(18rem, 100%);
}

#atlasGraph {
  display: block;
  width: 100%;
  height: 37rem;
  margin-top: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: grab;
  touch-action: none;
}

#atlasGraph:active {
  cursor: grabbing;
}

.world-atlas-hint {
  margin: 0.65rem 0 0;
}

.world-atlas-details {
  max-height: 43rem;
  overflow: auto;
}

.world-atlas-details section {
  margin-top: 1.3rem;
}

.atlas-title {
  justify-content: space-between;
}

.atlas-kind {
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.atlas-kind.world {
  background: #17304d;
  color: #bddbff;
}

.atlas-kind.dungeon {
  background: #4b251c;
  color: #ffc2ad;
}

.atlas-link {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.45rem 0.55rem;
  color: var(--text);
  background: #10141c;
  text-align: left;
}

.atlas-link:hover,
.atlas-link:focus-visible {
  border-color: var(--accent);
}

.atlas-link small {
  display: block;
}

.atlas-list {
  display: grid;
  gap: 0.45rem;
  padding: 0;
  list-style: none;
}

.atlas-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 40%);
  padding-bottom: 0.4rem;
}

.atlas-list span {
  text-align: right;
}

.atlas-coordinate-canvas {
  display: block;
  width: 100%;
  height: 12rem;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.atlas-coordinate-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.atlas-coordinate-key span::before {
  content: '';
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.28rem;
  border-radius: 50%;
}

.atlas-coordinate-key .npc::before { background: #72d49b; }
.atlas-coordinate-key .monster::before { background: #df765b; }
.atlas-coordinate-key .exit::before { background: #efcb6a; }

@media (max-width: 920px) {
  .world-atlas-intro,
  .world-atlas-workspace {
    grid-template-columns: 1fr;
  }

  .world-atlas-graph-panel,
  .world-atlas-details {
    min-height: 0;
    max-height: none;
  }
}

/* PlayMir fantasy public theme */
:root {
  --bg: #070808;
  --bg-elevated: #101414;
  --surface: #171511;
  --surface-2: #221d16;
  --border: #4d3e25;
  --text: #f5ead4;
  --muted: #b9aa8f;
  --gold: #e2bd6c;
  --bronze: #9b6632;
  --red: #9d2f2a;
  --jade: #61b984;
  --blue: #5b95bd;
  --danger: #df6b6b;
  --success: #79c58a;
}

body {
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(7, 8, 8, 0.94), rgba(7, 8, 8, 0.98)),
    url("/images/theme/stone-texture.webp") center / 420px repeat,
    var(--bg);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--jade), white 12%);
  outline-offset: 3px;
}

.site-header {
  gap: 1rem;
}

.primary-nav {
  align-items: stretch;
}

.nav-group {
  position: relative;
}

.nav-group summary {
  display: inline-flex;
  align-items: center;
  min-height: 78px;
  cursor: pointer;
  color: #d9d4c7;
  font: 700 0.78rem/1.1 Georgia, "Times New Roman", serif;
  text-transform: uppercase;
  list-style: none;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary::after {
  content: "v";
  margin-left: 0.4rem;
  color: var(--gold);
  font: 800 0.66rem/1 "Segoe UI", Tahoma, Verdana, sans-serif;
}

.nav-group[open] summary,
.nav-group summary:hover {
  color: #ffe6aa;
}

.nav-menu {
  position: absolute;
  left: 50%;
  top: calc(100% - 0.4rem);
  z-index: 70;
  display: grid;
  gap: 0.25rem;
  min-width: 14rem;
  border: 1px solid rgba(226, 189, 108, 0.28);
  border-radius: 6px;
  padding: 0.5rem;
  background:
    linear-gradient(180deg, rgba(24, 21, 16, 0.98), rgba(9, 11, 11, 0.98)),
    url("/images/theme/parchment-texture.webp") center / 360px repeat;
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.42);
  transform: translateX(-50%);
}

.site-header .nav-menu a {
  min-height: 0;
  border-radius: 4px;
  padding: 0.65rem 0.72rem;
  color: #eadfc8;
  font-family: "Segoe UI", Tahoma, Verdana, sans-serif;
  text-transform: none;
}

.site-header .nav-menu a:hover,
.site-header .nav-menu a:focus-visible {
  color: #fff5dc;
  background: rgba(157, 47, 42, 0.28);
}

.mobile-nav {
  display: none;
}

.mobile-cta-bar {
  display: none;
}

.cta-primary,
.cta-secondary,
.table-cta,
.hero-login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 5px;
  padding: 0.62rem 0.95rem;
  font: 800 0.82rem/1 "Segoe UI", Tahoma, Verdana, sans-serif;
  text-decoration: none;
  text-transform: uppercase;
}

.cta-primary {
  border: 1px solid color-mix(in srgb, var(--red), #ffd09a 24%);
  color: #fff6e2;
  background: linear-gradient(180deg, #b43b32, #681d1c);
  box-shadow: 0 12px 26px rgba(157, 47, 42, 0.26);
}

.cta-secondary,
.table-cta {
  border: 1px solid rgba(226, 189, 108, 0.42);
  color: #f5ddb0;
  background: linear-gradient(180deg, rgba(72, 52, 26, 0.88), rgba(25, 21, 14, 0.92));
}

.hero-login-link {
  color: #cabda3;
  background: transparent;
}

.cta-primary:hover,
.cta-primary:focus-visible,
.cta-secondary:hover,
.cta-secondary:focus-visible,
.table-cta:hover,
.table-cta:focus-visible {
  transform: translateY(-1px);
}

.cta-primary.is-disabled,
.cta-secondary.is-disabled,
.download-link.is-disabled {
  cursor: default;
  opacity: 0.68;
  filter: saturate(0.72);
  transform: none;
}

.cta-primary.is-disabled:hover,
.cta-primary.is-disabled:focus-visible,
.cta-secondary.is-disabled:hover,
.cta-secondary.is-disabled:focus-visible,
.download-link.is-disabled:hover,
.download-link.is-disabled:focus-visible {
  transform: none;
}

.nav-disabled {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  border-radius: 4px;
  padding: 0.65rem 0.72rem;
  color: #9f9689;
  font: 700 0.9rem/1.1 "Segoe UI", Tahoma, Verdana, sans-serif;
}

.hero {
  max-width: none;
}

.player-home {
  padding: 0;
  background:
    linear-gradient(180deg, rgba(7, 8, 8, 0.1), var(--bg) 34rem),
    url("/images/theme/stone-texture.webp") center / 420px repeat,
    var(--bg);
}

.realm-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  min-height: 620px;
  padding: 7rem 4.5vw 3rem;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(4, 5, 5, 0.96), rgba(4, 5, 5, 0.76) 42%, rgba(4, 5, 5, 0.22)),
    linear-gradient(180deg, rgba(4, 5, 5, 0.1), rgba(4, 5, 5, 0.96)),
    url("/images/theme/playmir-hero.webp") center right / cover no-repeat;
}

.realm-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(226, 189, 108, 0.12) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgba(226, 189, 108, 0.06) 0 1px, transparent 1px 100%);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, black, transparent 66%);
  opacity: 0.34;
}

.realm-hero-copy {
  width: min(720px, 100%);
}

.realm-hero h1,
.page-hero h1,
.auth-side-panel h1,
.news-panel h2,
.section-title h2 {
  margin: 0;
  color: #fff0c9;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0;
}

.realm-hero h1 {
  max-width: 760px;
  font-size: 4.9rem;
  line-height: 0.95;
  text-shadow: 0 4px 0 rgba(38, 25, 12, 0.72), 0 22px 42px rgba(0, 0, 0, 0.7);
}

.realm-hero .mir-tagline {
  max-width: 38rem;
  margin-top: 1rem;
  color: #eadfc8;
  font-size: 1.35rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.hero-status-card {
  display: grid;
  justify-items: start;
  gap: 0.25rem;
  min-width: 12rem;
  border: 1px solid rgba(97, 185, 132, 0.32);
  border-radius: 6px;
  padding: 0.9rem 1rem;
  background: rgba(6, 10, 10, 0.74);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

.status-orb {
  width: 0.82rem;
  height: 0.82rem;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 16px rgba(121, 197, 138, 0.62);
}

.hero-status-card span {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.hero-status-card strong {
  color: #b9f0c4;
  font-size: 1.15rem;
}

.realm-stats-strip,
.home-section {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.realm-stats-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: -1.25rem;
  position: relative;
  z-index: 2;
}

.realm-stat {
  display: grid;
  gap: 0.3rem;
  border: 1px solid rgba(226, 189, 108, 0.22);
  border-radius: 6px;
  padding: 0.95rem;
  color: var(--text);
  background: linear-gradient(180deg, rgba(27, 24, 18, 0.96), rgba(9, 12, 12, 0.96));
  text-decoration: none;
}

.realm-stat span {
  color: var(--muted);
  font: 800 0.73rem/1 "Segoe UI", Tahoma, Verdana, sans-serif;
  text-transform: uppercase;
}

.realm-stat strong {
  color: #b8efc1;
  font: 800 1.35rem/1.1 Georgia, "Times New Roman", serif;
}

.realm-stat-link strong {
  color: var(--gold);
  font-size: 1rem;
}

.realm-stat.is-unavailable strong {
  color: #7f7566;
}

.home-section {
  padding: 3rem 0 0;
}

.section-title {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

.section-title p {
  margin: 0;
  color: var(--jade);
  font: 800 0.78rem/1.1 "Segoe UI", Tahoma, Verdana, sans-serif;
  text-transform: uppercase;
}

.section-title h2 {
  font-size: 2.4rem;
  line-height: 1.05;
}

.step-grid,
.class-grid,
.feature-grid,
.payment-support-grid {
  display: grid;
  gap: 1rem;
}

.step-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.class-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fantasy-card,
.class-card,
.feature-card,
.starter-community-panel,
.news-panel,
.page-hero,
.auth-side-panel {
  border: 1px solid rgba(226, 189, 108, 0.2);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(27, 24, 18, 0.94), rgba(10, 13, 13, 0.94)),
    url("/images/theme/parchment-texture.webp") center / 360px repeat;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.22);
}

.fantasy-card,
.class-card,
.feature-card {
  padding: 1.15rem;
}

.fantasy-card h3,
.class-card h3,
.feature-card strong,
.payment-support-grid h2 {
  margin: 0;
  color: #ffe9b6;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.fantasy-card p,
.class-card p,
.feature-card span,
.payment-support-grid p,
.news-panel p {
  color: var(--muted);
}

.fantasy-card a,
.fantasy-card .card-note,
.feature-card {
  color: var(--jade);
  text-decoration: none;
}

.fantasy-card .card-note {
  font-weight: 800;
  text-transform: uppercase;
}

.card-rune,
.class-emblem {
  display: inline-grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgba(226, 189, 108, 0.35);
  border-radius: 5px;
  color: #1a1209;
  background: linear-gradient(180deg, #f2cd72, #a66c2d);
  font-weight: 900;
}

/* TODO: replace CSS class-art placeholders with licensed local class artwork. */
.class-card {
  min-height: 15rem;
  display: grid;
  align-content: end;
  gap: 0.55rem;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

.class-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.45;
  background:
    linear-gradient(180deg, transparent, rgba(6, 8, 8, 0.92)),
    repeating-linear-gradient(135deg, rgba(226, 189, 108, 0.16) 0 1px, transparent 1px 14px);
}

.class-warrior { --class-accent: #c84d3f; }
.class-wizard { --class-accent: #5b95bd; }
.class-taoist { --class-accent: #61b984; }
.class-assassin { --class-accent: #b58bd4; }
.class-monk { --class-accent: #e2bd6c; }

.class-card {
  border-color: color-mix(in srgb, var(--class-accent), var(--gold) 18%);
}

.class-card .class-emblem {
  color: #fff8e6;
  background: color-mix(in srgb, var(--class-accent), #111 24%);
}

.feature-card {
  display: grid;
  gap: 0.35rem;
  min-height: 8rem;
}

.feature-card:hover,
.feature-card:focus-visible,
.class-card:hover,
.class-card:focus-within,
.fantasy-card:hover {
  border-color: rgba(226, 189, 108, 0.52);
}

.news-panel,
.starter-community-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 3rem;
  padding: 1.35rem;
}

.page-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem;
  background:
    linear-gradient(120deg, rgba(26, 21, 15, 0.96), rgba(8, 11, 12, 0.96)),
    radial-gradient(circle at 8% 18%, rgba(157, 47, 42, 0.18), transparent 16rem);
}

.page-hero h1 {
  font-size: 3rem;
  line-height: 1;
}

.page-hero p:not(.mir-kicker) {
  max-width: 48rem;
  color: #d8cdb8;
}

.class-badge,
.level-badge,
.market-listed-date,
.tech-field {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  border: 1px solid rgba(226, 189, 108, 0.22);
  border-radius: 999px;
  padding: 0.16rem 0.55rem;
  color: #efdba7;
  background: rgba(6, 10, 10, 0.46);
  font-size: 0.78rem;
}

.level-badge {
  color: #b9efc1;
  border-color: rgba(97, 185, 132, 0.28);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.empty-state {
  border: 1px dashed rgba(226, 189, 108, 0.24);
  border-radius: 6px;
  padding: 1rem;
  color: #d8cdb8;
  background: rgba(6, 10, 10, 0.48);
}

.icon-fallback {
  display: inline-grid;
  place-items: center;
  width: 100%;
  min-width: 2rem;
  min-height: 2rem;
  aspect-ratio: 1;
  border: 1px solid rgba(226, 189, 108, 0.35);
  border-radius: 5px;
  color: #f5ddb0;
  background:
    radial-gradient(circle at 35% 25%, rgba(97, 185, 132, 0.26), transparent 45%),
    linear-gradient(180deg, #221d16, #090c0c);
  font: 900 0.9rem/1 "Segoe UI", Tahoma, Verdana, sans-serif;
}

.mir-slot .icon-fallback,
.tm-item-cell .icon-fallback,
.listing-icon .icon-fallback,
.magic-icon-wrap .icon-fallback,
.spell-card .icon-fallback {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
}

.magic-icon-wrap .icon-fallback {
  width: 42px;
  height: 42px;
}

.market-filters fieldset {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}

.market-filters legend {
  color: var(--jade);
  font: 800 0.72rem/1 "Segoe UI", Tahoma, Verdana, sans-serif;
  text-transform: uppercase;
}

.payment-support-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.payment-support-grid .fantasy-card {
  min-height: 7rem;
}

.legal-accordion {
  overflow: hidden;
}

.wiki-search {
  display: grid;
  gap: 0.3rem;
  min-width: min(22rem, 100%);
}

.wiki-search span {
  color: var(--jade);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.65fr);
  gap: 1rem;
  align-items: stretch;
  margin: 2rem auto;
  width: min(980px, 100%);
}

.auth-side-panel {
  display: grid;
  align-content: center;
  gap: 0.9rem;
  padding: 1.6rem;
}

.auth-side-panel h1 {
  font-size: 3rem;
}

.auth-form-panel {
  margin: 0 !important;
}

.mobile-nav-panel {
  display: grid;
  gap: 0.2rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1180px) {
  .primary-nav {
    display: none !important;
  }

  .mobile-nav {
    display: block;
    order: 2;
    margin-left: auto;
  }

  .mobile-nav summary {
    min-height: 42px;
    border: 1px solid rgba(226, 189, 108, 0.32);
    border-radius: 5px;
    padding: 0.7rem 0.9rem;
    color: #f5ddb0;
    cursor: pointer;
    list-style: none;
    text-transform: uppercase;
  }

  .mobile-nav summary::-webkit-details-marker {
    display: none;
  }

  .mobile-nav-panel {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: calc(100% - 0.35rem);
    z-index: 80;
    border: 1px solid rgba(226, 189, 108, 0.28);
    border-radius: 6px;
    padding: 0.75rem;
    background: rgba(10, 12, 12, 0.98);
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.45);
  }

  .mobile-nav-panel a,
  .mobile-nav-panel .nav-disabled,
  .mobile-nav-panel strong {
    padding: 0.48rem 0.55rem;
    color: #eadfc8;
    text-decoration: none;
  }

  .mobile-nav-panel .nav-disabled {
    color: #9f9689;
  }

  .mobile-nav-panel strong {
    color: var(--jade);
    text-transform: uppercase;
  }

  .realm-stats-strip,
  .class-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .step-grid,
  .feature-grid,
  .payment-support-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .site-header {
    min-height: 68px;
    padding: 0.65rem 1rem;
  }

  .header-actions {
    display: none;
  }

  .mobile-cta-bar {
    position: sticky;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    border-top: 1px solid rgba(226, 189, 108, 0.22);
    padding: 0.55rem;
    background: rgba(7, 8, 8, 0.96);
  }

  .realm-hero {
    grid-template-columns: 1fr;
    min-height: 620px;
    padding: 6rem 1rem 2rem;
    background-position: 62% center;
  }

  .realm-hero h1 {
    font-size: 3.25rem;
  }

  .realm-hero .mir-tagline {
    font-size: 1.1rem;
  }

  .hero-status-card {
    width: min(100%, 18rem);
  }

  .realm-stats-strip,
  .step-grid,
  .class-grid,
  .feature-grid,
  .payment-support-grid,
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .news-panel,
  .starter-community-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .page-hero h1,
  .auth-side-panel h1,
  .section-title h2 {
    font-size: 2.2rem;
  }

  .site-main:not(:has(.player-home)) .filters.market-filters {
    grid-template-columns: 1fr;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table tr {
    border: 1px solid rgba(226, 189, 108, 0.16);
    border-radius: 6px;
    margin-bottom: 0.65rem;
    padding: 0.55rem;
    background: rgba(6, 10, 10, 0.38);
  }

  .data-table td {
    border: 0 !important;
    padding: 0.35rem 0;
  }

  .data-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
  }
}

@media (max-width: 560px) {
  .brand {
    min-width: 0;
  }

  .brand-text strong {
    font-size: 1.1rem;
  }

  .realm-hero h1 {
    font-size: 2.65rem;
  }

  .hero-actions {
    display: grid;
  }

  .realm-stats-strip,
  .home-section {
    width: min(100% - 1rem, 1180px);
  }
}

/* MMORPG GameGold shop */
.payments-page {
  --payment-bg: #090806;
  --payment-surface: #17120d;
  --payment-surface-2: #21180f;
  --payment-border: #5a3d1d;
  --payment-gold: #d6a84f;
  --payment-bronze: #9b6b34;
  --payment-red: #9f2f24;
  --payment-text: #f3ead8;
  --payment-muted: #b9aa91;
  --payment-success: #79b36a;
  --payment-warning: #d7a84f;
  gap: 1rem;
  color: var(--payment-text);
}

.site-main:has(.payments-page) {
  width: min(1220px, calc(100% - 2rem));
}

.payments-page .payments-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1rem;
  min-height: 0;
  border: 1px solid color-mix(in srgb, var(--payment-border), var(--payment-gold) 18%);
  border-radius: 6px;
  padding: 1rem;
  background:
    linear-gradient(120deg, rgba(28, 19, 12, 0.96), rgba(8, 8, 7, 0.98)),
    url("/images/theme/parchment-texture.webp") center / 380px repeat;
  box-shadow: inset 0 0 0 1px rgba(246, 214, 144, 0.05), 0 20px 42px rgba(0, 0, 0, 0.26);
}

.payments-page .payments-hero-copy {
  min-width: 0;
}

.payments-page .payments-hero h1,
.payments-page .payments-section-head h2,
.payments-page .checkout-panel h2,
.payments-page .legal-summary h2 {
  margin: 0;
  color: #ffe6ad;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.payments-page .payments-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.96;
}

.payments-page .payments-hero p {
  max-width: 44rem;
  margin: 0.45rem 0 0;
  color: var(--payment-muted);
  font-size: 0.95rem;
}

.payments-page .payments-eyebrow {
  color: var(--payment-success);
}

.gamegold-rate {
  display: grid;
  gap: 0.18rem;
  min-width: 11rem;
  border: 1px solid rgba(214, 168, 79, 0.34);
  border-radius: 6px;
  padding: 0.75rem 0.85rem;
  background:
    linear-gradient(180deg, rgba(44, 31, 16, 0.9), rgba(12, 10, 8, 0.92));
}

.gamegold-rate span,
.gamegold-rate small,
.payments-hero-badges span {
  color: var(--payment-muted);
  font-size: 0.76rem;
}

.gamegold-rate strong {
  color: #ffd987;
  font: 800 1.08rem/1 Georgia, "Times New Roman", serif;
}

.payments-hero-badges {
  display: grid;
  gap: 0.4rem;
  min-width: 13rem;
}

.payments-hero-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  border: 1px solid rgba(121, 179, 106, 0.24);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  color: #d8e7c8;
  background: rgba(8, 12, 10, 0.62);
}

.payments-shop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(21rem, 0.42fr);
  gap: 1rem;
  align-items: start;
}

.payments-shop-main,
.payments-section-block {
  min-width: 0;
}

.payments-section-block,
.checkout-panel,
.purchase-evidence-card {
  border: 1px solid rgba(214, 168, 79, 0.2);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(23, 18, 13, 0.95), rgba(9, 8, 6, 0.96)),
    url("/images/theme/stone-texture.webp") center / 430px repeat;
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.24);
}

.payments-section-block {
  padding: 1rem;
}

.payments-section-head {
  display: grid;
  justify-content: start;
  gap: 0.25rem;
  margin-bottom: 0.85rem;
}

.payments-section-head h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
}

.payments-page .package-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.gamegold-package-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(1.2rem, auto) auto auto;
  gap: 0.55rem;
  min-height: 12.4rem;
  border: 1px solid rgba(214, 168, 79, 0.24);
  border-radius: 6px;
  padding: 0.85rem;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(34, 24, 15, 0.96), rgba(11, 10, 8, 0.98)),
    radial-gradient(circle at 18% 0%, rgba(214, 168, 79, 0.2), transparent 9rem);
}

.gamegold-package-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-top: 2px solid rgba(255, 221, 149, 0.16);
}

.gamegold-package-card:hover,
.gamegold-package-card:focus-within {
  border-color: rgba(214, 168, 79, 0.58);
}

.package-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.package-price {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  border: 1px solid rgba(214, 168, 79, 0.36);
  border-radius: 5px;
  padding: 0.2rem 0.62rem;
  color: #1b1007;
  background: linear-gradient(180deg, #f1c96f, #a86e2e);
  font: 900 1rem/1 Georgia, "Times New Roman", serif;
}

.package-note,
.package-checkout-note,
.package-delivery-note {
  color: var(--payment-muted);
  font-size: 0.76rem;
}

.package-note {
  text-transform: uppercase;
  font-weight: 800;
}

.package-amount {
  color: #fff0c6;
  font: 800 clamp(1.25rem, 2vw, 1.6rem)/1.08 Georgia, "Times New Roman", serif;
}

.package-checkout-note {
  color: #f0cd80;
  font-weight: 800;
}

.package-delivery-note {
  min-height: 1.2rem;
}

.payments-page .payment-package button,
.payments-page .checkout-panel button,
.payments-page .payment-login-button {
  min-height: 2.35rem;
  border: 1px solid color-mix(in srgb, var(--payment-red), #ffd49b 26%);
  color: #fff6df;
  background: linear-gradient(180deg, #bd4235, #6e211b);
  box-shadow: 0 10px 22px rgba(159, 47, 36, 0.24);
}

.payments-page .payment-package button:hover:not(:disabled),
.payments-page .checkout-panel button:hover:not(:disabled),
.payments-page .payment-login-button:hover {
  border-color: rgba(255, 214, 145, 0.72);
}

.payments-page .payment-package button:disabled,
.payments-page .checkout-panel button:disabled {
  color: #8f8370;
  border-color: rgba(90, 61, 29, 0.38);
  background: rgba(21, 18, 15, 0.86);
  box-shadow: none;
}

.checkout-panel {
  position: sticky;
  top: 5.4rem;
  display: grid;
  gap: 0.7rem;
  padding: 0.9rem;
  scroll-margin-top: 5.4rem;
}

.checkout-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.checkout-panel-head h2 {
  font-size: 1.45rem;
}

.checkout-panel-head > span {
  border-color: rgba(214, 168, 79, 0.35);
  color: #ffd987;
}

.checkout-panel .payment-empty {
  border-color: rgba(214, 168, 79, 0.22);
  color: var(--payment-muted);
  background: rgba(7, 7, 6, 0.48);
}

.checkout-panel.is-empty .checkout-active-only {
  display: none;
}

.checkout-panel .payment-total-row {
  border-color: rgba(214, 168, 79, 0.16);
}

.checkout-panel .payment-total-row strong,
.checkout-panel .payment-order-template strong {
  color: #fff0c6;
}

.checkout-panel .payment-order-template {
  border-color: rgba(214, 168, 79, 0.18);
  background: rgba(8, 8, 7, 0.5);
}

.payments-page .payment-basket-line {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
}

.payments-page .basket-item-main {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.payments-page .basket-item-main span {
  color: #ffe6ad;
  font-weight: 900;
  overflow-wrap: normal;
  word-break: normal;
  white-space: normal;
}

.payments-page .basket-item-main strong,
.payments-page .basket-item-main em {
  justify-self: start;
  color: #fff1c8;
  font-size: 0.82rem;
  font-style: normal;
  overflow-wrap: normal;
  white-space: normal;
}

.payments-page .basket-item-main em {
  color: #9fda8c;
}

.payments-page .payment-basket-line button {
  justify-self: end;
}

.payment-method-list {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}

.payment-method-list legend,
.payment-character-target > label {
  margin-bottom: 0.12rem;
  color: var(--payment-muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.payment-method-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.6rem;
  align-items: start;
  border: 1px solid rgba(214, 168, 79, 0.18);
  border-radius: 6px;
  padding: 0.68rem;
  color: var(--payment-text);
  background: rgba(8, 8, 7, 0.48);
  cursor: pointer;
}

.payment-method-card input {
  margin-top: 0.18rem;
}

.payment-method-card .payment-method-copy {
  display: grid;
  gap: 0.26rem;
  min-width: 0;
}

.payment-method-card strong {
  color: #ffe6ad;
}

.payment-method-card small,
.payment-method-card em {
  color: var(--payment-muted);
  font-size: 0.78rem;
  font-style: normal;
}

.payment-method-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.payment-method-title-row strong,
.payment-method-card small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.payment-method-flag {
  flex: 0 0 auto;
}

.payment-method-flag-cn {
  position: relative;
  display: inline-block;
  width: 1.6rem;
  height: 1.05rem;
  border: 1px solid rgba(255, 221, 149, 0.42);
  border-radius: 2px;
  background: #de2910;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.24);
}

.payment-method-flag-cn::before {
  content: "*";
  position: absolute;
  left: 0.18rem;
  top: -0.12rem;
  color: #ffde00;
  font: 900 0.9rem/1 "Segoe UI", Tahoma, Verdana, sans-serif;
}

.payment-method-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  min-width: 0;
}

.payment-method-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 1.32rem;
  border: 1px solid rgba(214, 168, 79, 0.24);
  border-radius: 999px;
  padding: 0.12rem 0.42rem;
  color: #ffe7b1;
  background: rgba(7, 7, 6, 0.56);
  font-size: 0.66rem;
  font-weight: 800;
  white-space: nowrap;
}

.payment-method-card.is-selected {
  border-color: rgba(121, 179, 106, 0.66);
  box-shadow: inset 0 0 0 1px rgba(121, 179, 106, 0.16);
}

.payment-method-card.is-disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.payments-page .payment-character-target {
  gap: 0.5rem;
}

.payments-page .payment-character-target select {
  border-color: rgba(214, 168, 79, 0.22);
  color: #fff0c6;
  background: rgba(7, 7, 6, 0.72);
}

.character-delivery-card {
  display: grid;
  gap: 0.22rem;
  border: 1px solid rgba(121, 179, 106, 0.32);
  border-radius: 6px;
  padding: 0.68rem;
  background:
    linear-gradient(180deg, rgba(20, 30, 19, 0.66), rgba(8, 8, 7, 0.68));
}

.character-delivery-card strong {
  color: #e8f4ce;
}

.character-delivery-card span {
  color: var(--payment-muted);
  font-size: 0.82rem;
}

.character-delivery-card em {
  justify-self: start;
  border: 1px solid rgba(121, 179, 106, 0.28);
  border-radius: 999px;
  padding: 0.16rem 0.52rem;
  color: #bde0a6;
  font-size: 0.72rem;
  font-style: normal;
}

.character-delivery-card.is-muted {
  border-color: rgba(214, 168, 79, 0.18);
  background: rgba(8, 8, 7, 0.42);
}

.payments-page .payment-character-link {
  border-color: rgba(214, 168, 79, 0.3);
  color: #ffd987;
  background: rgba(8, 8, 7, 0.62);
}

.checkout-acknowledgement {
  border: 1px solid rgba(214, 168, 79, 0.16);
  border-radius: 6px;
  margin-top: 0;
  padding: 0.6rem;
  background: rgba(8, 8, 7, 0.42);
}

.payment-checkout-status {
  color: var(--payment-warning);
}

.payment-provider-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  border: 1px solid rgba(214, 168, 79, 0.35);
  border-radius: 5px;
  padding: 0.34rem 0.68rem;
  color: #ffd987;
  background: rgba(8, 8, 7, 0.5);
  font: 800 0.76rem/1.1 "Segoe UI", Tahoma, Verdana, sans-serif;
  text-align: center;
  text-decoration: none;
}

.payment-provider-fallback:hover {
  border-color: rgba(159, 218, 140, 0.5);
  color: #fff6cf;
}

.payment-provider-fallback[hidden] {
  display: none;
}

.bakong-qr-panel {
  display: grid;
  gap: 0.7rem;
  border: 1px solid rgba(159, 218, 140, 0.24);
  border-radius: 6px;
  padding: 0.75rem;
  background:
    linear-gradient(180deg, rgba(159, 218, 140, 0.08), transparent 70%),
    rgba(5, 8, 8, 0.72);
}

.bakong-qr-panel[hidden] {
  display: none;
}

.bakong-qr-head,
.bakong-qr-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-width: 0;
}

.bakong-qr-head strong {
  color: #fff1bd;
  font: 900 0.92rem/1.15 Georgia, serif;
}

.bakong-qr-head span,
.bakong-qr-meta span {
  color: #9fda8c;
  font: 800 0.76rem/1.25 "Segoe UI", Tahoma, Verdana, sans-serif;
}

.bakong-qr-code {
  display: grid;
  place-items: center;
  border: 1px solid rgba(214, 168, 79, 0.28);
  border-radius: 5px;
  padding: 0.55rem;
  background: #f7f4ea;
}

.bakong-qr-code svg {
  display: block;
  width: min(100%, 190px);
  height: auto;
}

.bakong-qr-meta code {
  max-width: 11rem;
  overflow: hidden;
  color: #d8caa2;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payments-page .checkout-panel .bakong-check-button {
  min-height: 2.25rem;
}

.support-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.support-summary-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.35rem 0.75rem;
  align-items: start;
}

.support-summary-card h2 {
  align-self: end;
}

.support-summary-card p {
  grid-column: 2;
  margin: 0;
}

.support-summary-icon {
  display: inline-grid;
  place-items: center;
  grid-row: span 2;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(214, 168, 79, 0.34);
  border-radius: 5px;
  color: #1b1007;
  background: linear-gradient(180deg, #f1c96f, #a86e2e);
  font: 900 0.72rem/1 "Segoe UI", Tahoma, Verdana, sans-serif;
}

.purchase-evidence-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
}

.purchase-evidence-card .legal-summary {
  display: grid;
  gap: 0.45rem;
}

.purchase-evidence-card .legal-summary h2 {
  font-size: 1.2rem;
}

.purchase-evidence-card .legal-summary ul {
  display: grid;
  gap: 0.35rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.purchase-evidence-card .legal-summary li {
  border: 1px solid rgba(214, 168, 79, 0.14);
  border-radius: 5px;
  padding: 0.55rem;
  color: var(--payment-muted);
  background: rgba(8, 8, 7, 0.42);
  font-size: 0.82rem;
}

.payments-page .payment-disclosure {
  border-color: rgba(214, 168, 79, 0.18);
  background:
    linear-gradient(180deg, rgba(18, 14, 10, 0.94), rgba(8, 8, 7, 0.96));
}

.payments-page .payment-disclosure summary {
  grid-template-columns: minmax(0, 0.44fr) minmax(0, 1fr) auto;
  min-height: 3rem;
}

.payments-page .payment-disclosure summary span {
  color: #ffe6ad;
}

.payments-page .payment-disclosure summary small {
  color: var(--payment-muted);
}

.payments-page .payment-disclosure summary::after {
  color: #ffd987;
}

.payments-page .payment-disclosure-body {
  border-color: rgba(214, 168, 79, 0.12);
  color: #ddcfb6;
}

.payment-disclosure-body > .legal-summary {
  border: 1px solid rgba(214, 168, 79, 0.14);
  border-radius: 5px;
  margin: 0 0 0.75rem;
  padding: 0.6rem 0.7rem;
  color: #f0dcae;
  background: rgba(8, 8, 7, 0.42);
}

.payments-page a:focus-visible,
.payments-page button:focus-visible,
.payments-page input:focus-visible,
.payments-page select:focus-visible,
.payments-page summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--payment-gold), white 12%);
  outline-offset: 3px;
}

@media (max-width: 1040px) {
  .payments-page .payments-hero,
  .payments-shop-layout {
    grid-template-columns: 1fr;
  }

  .checkout-panel {
    position: static;
  }

  .payments-hero-badges {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }
}

@media (max-width: 820px) {
  .payments-page .package-grid,
  .support-summary-grid,
  .purchase-evidence-card .legal-summary ul {
    grid-template-columns: 1fr;
  }

  .payments-page .payment-disclosure summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .payments-page .payment-disclosure summary small {
    display: block;
    grid-column: 1;
  }

  .payment-basket-line {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-main:has(.payments-page) {
    width: min(100% - 1rem, 1220px);
  }

  .payments-page .payments-hero,
  .payments-section-block,
  .checkout-panel,
  .purchase-evidence-card {
    padding: 0.75rem;
  }

  .payments-hero-badges {
    grid-template-columns: 1fr;
  }

  .payment-order-template {
    grid-template-columns: 1fr;
  }
}
