:root {
  color-scheme: dark;
  --bg: #11100d;
  --panel: #1d1b16;
  --panel-2: #242118;
  --text: #f4ead4;
  --muted: #b7aa90;
  --line: #413a2c;
  --accent: #d8a846;
  --danger: #d96c5f;
  --ok: #6fbf8d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  background:
    linear-gradient(rgba(10, 8, 5, .62), rgba(10, 8, 5, .78)),
    url("/images/isaworld.png") center top / cover fixed;
  background-color: var(--bg);
  color: var(--text);
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 36px;
  padding: 8px 10px;
  border: 1px solid rgba(217, 174, 94, .22);
  border-radius: 8px;
  background: rgba(10, 12, 16, .34);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .18);
}

.topnav a {
  display: inline-flex;
  align-items: center;
  color: #e8ddc4;
  text-decoration: none;
  border: 1px solid rgba(232, 221, 196, .24);
  background: rgba(10, 12, 16, .68);
  padding: 8px 12px;
  border-radius: 6px;
}

.topnav a:hover,
.topnav a[aria-current="page"] {
  border-color: rgba(217, 174, 94, .72);
  color: #ffd98d;
}

.nav-menu {
  position: relative;
  padding-bottom: 8px;
  margin-bottom: -8px;
}

.nav-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 20;
  display: none;
  min-width: 210px;
  padding: 8px;
  border: 1px solid rgba(217, 174, 94, .38);
  border-radius: 6px;
  background: rgba(16, 14, 10, .96);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .35);
}

.nav-menu:hover .nav-dropdown,
.nav-menu:focus-within .nav-dropdown {
  display: grid;
  gap: 6px;
}

.nav-dropdown a {
  justify-content: flex-start;
  width: 100%;
}

.discord-strip {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: -20px auto 24px;
  text-align: center;
}

.discord-strip a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 16px;
  border: 1px solid rgba(217, 174, 94, .42);
  border-radius: 6px;
  background: rgba(10, 12, 16, .6);
  color: #ffd98d;
  font: 700 13px Arial, sans-serif;
  text-decoration: none;
}

.discord-strip a:hover {
  border-color: rgba(217, 174, 94, .8);
  color: #fff0bd;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 48px;
}

.hero {
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 56px;
  padding: 34px 0 46px;
}

.hero > div:first-child {
  max-width: 720px;
}

.hero-side {
  display: grid;
  justify-items: stretch;
  align-content: center;
  gap: 16px;
  width: 360px;
  min-width: 0;
  margin-left: 0;
  transform: none;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0;
  font: 700 13px Arial, sans-serif;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(44px, 8vw, 86px);
  line-height: 0.95;
}

h2 {
  font-size: 28px;
}

.lead {
  max-width: 580px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.5;
}

.status {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(217, 174, 94, .14), rgba(10, 12, 16, .16)),
    rgba(29, 27, 22, 0.9);
  padding: 14px 16px;
  order: 1;
}

.status-link {
  color: inherit;
  text-decoration: none;
}

.status-link:hover {
  border-color: rgba(217, 174, 94, .72);
}

.status span {
  display: block;
  color: var(--muted);
  font: 700 12px Arial, sans-serif;
  text-transform: uppercase;
}

.status strong {
  display: block;
  margin-top: 4px;
  color: var(--accent);
  font-size: 34px;
  line-height: 1;
}

.panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  border: 1px solid var(--line);
  background: rgba(29, 27, 22, 0.95);
  padding: 28px;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}

.home-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.home-actions-panel {
  grid-template-columns: minmax(240px, .8fr) minmax(320px, 1.2fr);
  align-items: stretch;
}

.home-action-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.home-action-card {
  display: grid;
  align-content: center;
  min-height: 138px;
  padding: 20px;
  border: 1px solid rgba(217, 174, 94, .34);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(217, 174, 94, .12), rgba(10, 12, 16, .2)),
    rgba(15, 14, 11, .82);
  color: var(--text);
  text-decoration: none;
}

.home-action-card:hover,
.home-action-card.primary {
  border-color: rgba(217, 174, 94, .82);
  background:
    linear-gradient(180deg, rgba(217, 174, 94, .22), rgba(10, 12, 16, .18)),
    rgba(24, 20, 13, .94);
}

.home-action-card strong {
  display: block;
  margin-bottom: 10px;
  color: #ffe0a0;
  font-size: 22px;
}

.home-action-card span {
  color: var(--muted);
  font: 14px/1.45 Arial, sans-serif;
}

.home-side {
  display: grid;
  gap: 18px;
}

.side-panel {
  border: 1px solid var(--line);
  background: rgba(29, 27, 22, 0.95);
  padding: 18px;
  border-radius: 6px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, .22);
}

.highscore-panel {
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(217, 174, 94, .13), rgba(10, 12, 16, .1) 38%),
    rgba(29, 27, 22, .96);
  box-shadow: 0 18px 36px rgba(0, 0, 0, .24);
}

.highscore-panel .side-panel-head {
  margin: 0;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(232, 221, 196, .14);
}

.highscore-panel .side-panel-head::before {
  content: "Top Level";
  display: inline-flex;
  margin-right: auto;
  color: rgba(255, 217, 141, .74);
  font: 700 11px Arial, sans-serif;
  text-transform: uppercase;
}

.side-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.side-panel-head .eyebrow {
  margin-bottom: 0;
}

.side-panel-head a {
  color: #ffe0a0;
  font: 700 12px Arial, sans-serif;
  text-decoration: none;
}

.home-highscores {
  display: grid;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}

.home-highscores li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  border-top: 1px solid rgba(232, 221, 196, .1);
  padding: 10px 14px;
}

.home-highscores li:nth-child(1) {
  min-height: 72px;
  background: rgba(217, 174, 94, .1);
}

.home-highscores .rank {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(217, 174, 94, .38);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(217, 174, 94, .26), rgba(64, 45, 20, .28));
  color: #ffd98d;
  font: 800 15px Arial, sans-serif;
}

.home-highscores li:nth-child(1) .rank {
  width: 38px;
  height: 38px;
  border-color: rgba(255, 217, 141, .8);
  color: #fff0bd;
}

.home-highscores a {
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.home-highscores strong,
.home-highscores small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-highscores strong {
  font-size: 16px;
}

.home-highscores li:nth-child(1) strong {
  color: #fff0bd;
  font-size: 18px;
}

.home-highscores small {
  color: var(--muted);
  font: 12px Arial, sans-serif;
}

.home-highscores b {
  justify-self: end;
  color: var(--accent);
  font: 800 20px Arial, sans-serif;
}

.home-highscores b::before {
  content: "Lv ";
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.featured-monster {
  display: grid;
  justify-items: center;
  gap: 10px;
  color: var(--text);
  text-align: center;
  text-decoration: none;
}

.monster-podium {
  position: relative;
  display: grid;
  width: 170px;
  height: 140px;
  place-items: center;
  isolation: isolate;
}

.monster-podium::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  height: 34px;
  border: 1px solid rgba(217, 174, 94, .4);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at center, rgba(217, 174, 94, .36), rgba(64, 45, 20, .32) 58%, rgba(0, 0, 0, 0) 72%);
  z-index: -1;
}

.monster-podium::after {
  content: "";
  position: absolute;
  left: 42px;
  right: 42px;
  bottom: 0;
  height: 24px;
  border: 1px solid rgba(232, 221, 196, .18);
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(#4b3720, #21180f);
  z-index: -1;
}

.monster-podium img {
  max-width: 132px;
  max-height: 112px;
  width: auto;
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 12px 10px rgba(0, 0, 0, .42));
}

.featured-monster strong {
  color: #ffd98d;
  font-size: 20px;
}

.hero-featured-monster {
  width: 100%;
  padding: 14px 16px 16px;
  order: 2;
}

.hero-featured-monster .side-panel-head {
  justify-content: flex-start;
  margin-bottom: 4px;
}

.hero-featured-monster .featured-monster {
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  text-align: left;
}

.hero-featured-monster .monster-podium {
  width: 132px;
  height: 116px;
}

.hero-featured-monster .monster-podium img {
  max-width: 112px;
  max-height: 98px;
}

.hero-highscore-panel {
  width: 100%;
  order: 3;
}

.hero-highscore-panel .home-highscores li {
  min-height: 52px;
}

.hero-highscore-panel .home-highscores li:nth-child(1) {
  min-height: 60px;
}

.empty-side-row {
  color: var(--muted);
  font: 14px Arial, sans-serif;
}

.single-panel {
  display: block;
}

.compact-hero {
  min-height: 260px;
  grid-template-columns: 1fr;
}

.create-account-panel {
  align-items: start;
}

.account-created {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
  padding: 8px 0;
}

.account-number-display {
  width: min(100%, 560px);
  padding: 24px 18px;
  border: 2px solid rgba(217, 174, 94, .92);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 217, 141, .18), rgba(15, 14, 11, .18)),
    rgba(10, 12, 16, .72);
  color: #fff0bd;
  font: 800 54px/1 Arial, sans-serif;
  letter-spacing: 2px;
  text-align: center;
  user-select: all;
}

.create-account-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.notice.warning {
  border-color: rgba(217, 174, 94, .55);
  color: #ffe0a0;
  background: rgba(217, 174, 94, .1);
}

.copy p {
  color: var(--muted);
  line-height: 1.6;
}

dl {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  color: var(--text);
}

.form {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font: 700 13px Arial, sans-serif;
  text-transform: uppercase;
}

input,
select,
button {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 10px 12px;
  font: 16px Arial, sans-serif;
}

.button-link,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid rgba(217, 174, 94, .55);
  color: #f6dfac;
  background: rgba(10, 12, 16, .58);
  text-decoration: none;
  font-weight: 700;
}

.primary-download {
  min-height: 52px;
  border-color: rgba(217, 174, 94, .75);
  background: rgba(217, 174, 94, .2);
  color: #ffd98d;
}

.danger {
  background: #7a2b2b;
  color: #fff3ed;
}

.danger:disabled,
input:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.account-hero {
  align-items: center;
}

.logout-form {
  margin: 0;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(280px, 1.2fr);
  gap: 24px;
  align-items: start;
}

.account-grid.single {
  max-width: 760px;
}

.account-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.account-summary p {
  margin-bottom: 0;
}

.pill {
  display: inline-flex;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(217, 174, 94, .16);
  color: #ffd98d;
  border: 1px solid rgba(217, 174, 94, .32);
}

.character-list {
  display: grid;
  gap: 10px;
}

.character-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(232, 221, 196, .16);
  border-radius: 6px;
  background: rgba(10, 12, 16, .34);
}

.character-card strong,
.character-card span {
  display: block;
}

.character-card span {
  color: #c9bca4;
  margin-top: 2px;
}

.character-card.muted {
  opacity: .58;
}

.inline-delete {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

@media (max-width: 780px) {
  .account-grid,
  .account-summary,
  .inline-delete {
    grid-template-columns: 1fr;
  }

  .account-summary {
    display: grid;
  }
}

button {
  cursor: pointer;
  border-color: #9c7428;
  background: var(--accent);
  color: #18140b;
  font-weight: 800;
}

.notice {
  border: 1px solid currentColor;
  padding: 12px;
  font: 15px Arial, sans-serif;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tool-card {
  border: 1px solid var(--line);
  background: rgba(29, 27, 22, 0.95);
  padding: 18px;
  min-width: 0;
}

.tool-card.wide {
  grid-column: 1 / -1;
}

.tool-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 12px;
}

.tool-heading h2 {
  margin-bottom: 0;
}

.tool-heading span {
  color: var(--accent);
  font: 700 12px Arial, sans-serif;
  text-transform: uppercase;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tabs a {
  color: var(--muted);
  text-decoration: none;
  border: 1px solid rgba(232, 221, 196, .18);
  border-radius: 6px;
  padding: 6px 8px;
  font: 700 12px Arial, sans-serif;
}

.tabs a[aria-current="page"],
.tabs a:hover {
  color: #ffd98d;
  border-color: rgba(217, 174, 94, .72);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.filter-bar.compact {
  grid-template-columns: minmax(220px, 420px) auto;
  justify-content: start;
}

.filter-bar button {
  min-width: 120px;
}

.table-form {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 6px;
  align-items: center;
  width: auto;
  margin: 0;
}

.table-form input,
.table-form select,
.table-form button {
  min-height: 34px;
  padding: 5px 8px;
  font-size: 13px;
}

.table-wrap {
  overflow-x: auto;
}

.guild-profile {
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
}

.guild-profile-logo,
.guild-logo-preview {
  width: 140px;
  height: 140px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 221, 196, .22);
  background: rgba(10, 9, 7, .45);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .45);
}

.guild-profile-logo img,
.guild-logo-preview {
  max-width: 140px;
  max-height: 140px;
  object-fit: contain;
}

.guild-logo-preview {
  margin-top: 14px;
}

.guild-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
  margin: 12px 0 18px;
}

.guild-facts div,
.guild-rank-list div {
  border: 1px solid rgba(232, 221, 196, .14);
  background: rgba(10, 9, 7, .28);
  padding: 11px 12px;
}

.guild-facts dt {
  color: var(--gold);
  font: 700 11px Arial, sans-serif;
  text-transform: uppercase;
}

.guild-facts dd {
  margin: 4px 0 0;
}

.guild-join-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  max-width: 620px;
}

.guild-rank-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.guild-rank-list strong,
.guild-rank-list span {
  display: block;
}

.guild-rank-list span {
  color: var(--muted);
  margin-top: 4px;
}

.character-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.equipment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.equipment-slot {
  min-height: 76px;
  border: 1px solid rgba(232, 221, 196, .16);
  border-radius: 6px;
  background: rgba(10, 12, 16, .34);
  padding: 10px;
}

.equipment-slot-name,
.equipment-slot strong {
  display: block;
}

.equipment-slot-name {
  color: var(--muted);
  font: 700 12px Arial, sans-serif;
  text-transform: uppercase;
}

.equipment-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.equipment-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(232, 221, 196, .18);
  border-radius: 4px;
  background: rgba(0, 0, 0, .28);
}

.equipment-icon img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.empty-icon {
  opacity: .35;
}

.equipment-slot strong {
  font: 700 14px Arial, sans-serif;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.equipment-slot.empty strong {
  color: var(--muted);
}


.shop-item-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 14px;
}

.shop-item-preview img {
  width: 40px;
  height: 40px;
  padding: 4px;
  border: 1px solid rgba(232, 221, 196, .18);
  border-radius: 4px;
  background: rgba(0, 0, 0, .32);
  image-rendering: pixelated;
}

.shop-item-preview-single img {
  width: 48px;
  height: 48px;
}

.shop-herb-mix-preview {
  flex-wrap: wrap;
}

table {
  width: 100%;
  border-collapse: collapse;
  font: 14px Arial, sans-serif;
}

th,
td {
  padding: 9px 8px;
  border-bottom: 1px solid rgba(232, 221, 196, .14);
  text-align: left;
  white-space: nowrap;
}

th {
  color: #f6dfac;
  font-size: 12px;
  text-transform: uppercase;
}

td {
  color: var(--text);
}

.success {
  color: var(--ok);
}

.error {
  color: var(--danger);
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .hero-side {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .panel,
  .home-grid,
  .home-actions-panel,
  .home-action-links,
  .tool-grid,
  .filter-bar,
  .filter-bar.compact,
  .character-summary-grid,
  .equipment-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 28px 0 34px;
  }

  .hero-side,
  .hero-featured-monster {
    width: 100%;
    min-width: 0;
    transform: none;
  }

  .shell {
    padding-top: 28px;
  }
}


.button-link span {
  color: rgba(255, 244, 215, .78);
  font-size: 12px;
  margin-left: 6px;
}

.home-action-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
}

.home-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid rgba(225, 177, 74, .65);
  border-radius: 4px;
  background: rgba(12, 12, 10, .72);
  color: #f8e8bc;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
}

.home-action-button.primary {
  background: #e1b14a;
  border-color: #f5d27b;
  color: #17130d;
}

.home-action-button:hover {
  transform: translateY(-1px);
  border-color: #f5d27b;
}

.wiki-shell {
  width: min(1320px, calc(100% - 32px));
}

.wiki-hero h1 {
  font-size: clamp(42px, 7vw, 78px);
}

.wiki-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.wiki-jump a {
  color: #ffe0a0;
  text-decoration: none;
  border: 1px solid rgba(217, 174, 94, .38);
  background: rgba(10, 12, 16, .52);
  padding: 8px 12px;
  border-radius: 6px;
}

.wiki-section {
  margin-top: 22px;
}

.wiki-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.muted {
  color: var(--muted);
}

.wiki-search {
  width: min(320px, 100%);
  border: 1px solid rgba(232, 221, 196, .24);
  background: rgba(10, 12, 16, .7);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 6px;
}

.wiki-details {
  border: 1px solid rgba(232, 221, 196, .15);
  background: rgba(12, 11, 9, .38);
  margin-top: 12px;
}

.wiki-details summary {
  cursor: pointer;
  color: #ffe0a0;
  padding: 12px 14px;
  font-weight: 700;
}

.wiki-details summary span {
  color: var(--muted);
  font: 700 12px Arial, sans-serif;
  margin-left: 10px;
}

.wiki-table-wrap {
  max-height: 520px;
  overflow: auto;
  border-top: 1px solid rgba(232, 221, 196, .12);
}

.wiki-table {
  width: 100%;
  border-collapse: collapse;
  font: 14px Arial, sans-serif;
}

.wiki-table th,
.wiki-table td {
  border-bottom: 1px solid rgba(232, 221, 196, .12);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.wiki-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #211d15;
  color: #ffd98d;
}

.wiki-table td {
  color: #eadfc9;
}

.wiki-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.wiki-card {
  border: 1px solid rgba(232, 221, 196, .16);
  background: rgba(12, 11, 9, .42);
  padding: 16px;
  border-radius: 6px;
}

.wiki-link-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.wiki-link-card:hover {
  border-color: rgba(217, 174, 94, .72);
}

.wiki-index-grid {
  margin-top: 22px;
}

.wiki-card h3 {
  margin: 0 0 10px;
  color: #ffe0a0;
}

.wiki-card p,
.wiki-card dd {
  color: var(--muted);
  line-height: 1.45;
}

.wiki-card dl {
  margin: 0 0 12px;
}

.wiki-bonus-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.rarity-magic {
  border-color: rgba(105, 153, 255, .34);
}

.rarity-rare {
  border-color: rgba(92, 201, 126, .34);
}

.rarity-legendary {
  border-color: rgba(232, 180, 74, .5);
}

.rarity-ancient {
  border-color: rgba(220, 111, 85, .55);
}

.wiki-two-col {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 22px;
}

.wiki-item-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(232, 221, 196, .14);
  border-radius: 4px;
  background: rgba(0, 0, 0, .26);
}

.wiki-item-icon img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.wiki-item-drop-trigger {
  display: inline-block;
}

.wiki-drop-panel {
  position: fixed;
  z-index: 5000;
  width: min(280px, calc(100vw - 24px));
  max-height: min(420px, calc(100vh - 24px));
  overflow: auto;
  border: 1px solid rgba(217, 174, 94, .54);
  border-radius: 6px;
  background: rgba(17, 15, 12, .97);
  box-shadow: 0 16px 32px rgba(0, 0, 0, .42);
  color: #eadfc9;
  padding: 12px;
}

.wiki-drop-panel h3 {
  margin: 0 0 9px;
  color: #ffd98d;
  font: 700 15px Georgia, serif;
}

.wiki-drop-panel ul {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.wiki-drop-panel li {
  display: grid;
  gap: 2px;
  border-top: 1px solid rgba(232, 221, 196, .1);
  padding-top: 8px;
}

.wiki-drop-panel li:first-child {
  border-top: 0;
  padding-top: 0;
}

.wiki-drop-panel strong {
  color: #fff0c7;
  font: 700 13px Arial, sans-serif;
}

.wiki-drop-panel small {
  color: var(--muted);
  font: 12px Arial, sans-serif;
}

.wiki-monster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(390px, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.wiki-monster-card {
  border: 1px solid rgba(232, 221, 196, .16);
  background: rgba(12, 11, 9, .46);
  border-radius: 6px;
  padding: 16px;
}

.wiki-monster-top {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 128px;
}

.wiki-monster-icon {
  display: grid;
  place-items: center;
  width: 122px;
  height: 122px;
  border: 1px solid rgba(232, 221, 196, .16);
  border-radius: 6px;
  background: rgba(0, 0, 0, .28);
}

.wiki-monster-icon img {
  max-width: 116px;
  max-height: 116px;
  image-rendering: pixelated;
}

.wiki-monster-card h2 {
  margin: 0;
  color: #ffe0a0;
  overflow-wrap: anywhere;
  line-height: 1.08;
}

.wiki-monster-card h3 {
  margin: 12px 0 10px;
  color: #ffd98d;
  font-size: 15px;
}

.wiki-monster-details {
  margin-top: 12px;
}

.wiki-monster-details summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(217, 174, 94, .42);
  border-radius: 6px;
  background: rgba(10, 12, 16, .56);
  color: #ffe0a0;
  padding: 7px 11px;
  font: 700 13px Arial, sans-serif;
}

.wiki-monster-details[open] summary {
  margin-bottom: 12px;
}

.wiki-monster-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wiki-monster-stats span {
  border: 1px solid rgba(217, 174, 94, .28);
  border-radius: 999px;
  background: rgba(10, 12, 16, .44);
  color: #eadfc9;
  padding: 5px 9px;
  font: 700 12px Arial, sans-serif;
}

.wiki-loot-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 12px;
}

.wiki-loot-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #eadfc9;
  font: 13px Arial, sans-serif;
}

.wiki-loot-item .wiki-item-icon {
  flex: 0 0 38px;
}

.wiki-loot-item > span:last-child {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.wiki-loot-item small {
  display: block;
  color: var(--muted);
}

.wiki-muted {
  color: var(--muted);
}

@media (max-width: 760px) {
  .wiki-section-head,
  .wiki-two-col {
    display: grid;
    grid-template-columns: 1fr;
  }
}



.character-actions {
  display: grid;
  gap: 10px;
}

.shop-divider {
  grid-column: 1 / -1;
  height: 1px;
  background: rgba(232, 221, 196, .14);
  margin: 4px 0;
}

.skill-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.skill-values div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(232, 221, 196, .14);
  border-radius: 6px;
  background: rgba(10, 12, 16, .34);
}

.skill-values span {
  color: #c9bca4;
}

.skill-values strong {
  color: #ffe0a0;
}

.skill-flipper-form button:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.house-builder-shell {
  width: min(1320px, calc(100% - 28px));
}

.house-builder-head {
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  margin-bottom: 22px;
}

.house-builder-head h1 {
  font-size: clamp(38px, 5vw, 70px);
}

.house-builder-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.house-builder-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.house-builder-tools,
.house-builder-board-wrap {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(29, 27, 22, .96);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .26);
}

.house-builder-tools {
  display: grid;
  gap: 18px;
  padding: 16px;
  position: sticky;
  top: 14px;
}

.builder-tool-group {
  display: grid;
  gap: 10px;
}

.floor-tabs,
.builder-tools-grid {
  display: grid;
  gap: 8px;
}

.floor-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.builder-tools-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.builder-tool,
.floor-tabs button {
  min-height: 42px;
  padding: 8px;
  border-color: rgba(232, 221, 196, .18);
  background: rgba(10, 12, 16, .58);
  color: var(--text);
  font: 700 13px Arial, sans-serif;
}

.builder-tool {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  text-align: left;
}

.builder-tool-icon {
  position: relative;
  display: block;
  width: 48px;
  height: 42px;
  overflow: hidden;
  border: 1px solid rgba(232, 221, 196, .14);
  background:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px),
    rgba(0, 0, 0, .22);
  background-size: 16px 16px;
}

.builder-tool img {
  position: absolute;
  left: 8px;
  top: 5px;
  width: 32px;
  height: 32px;
  max-width: none;
  max-height: none;
  object-fit: none;
  image-rendering: pixelated;
  z-index: 2;
}

.builder-tool-preview-east img {
  left: 8px;
  top: 5px;
  transform: none;
}

.builder-tool-preview-south img {
  left: 8px;
  top: 5px;
  transform: none;
}

.builder-tool-preview-corner img {
  left: 8px;
  top: 5px;
  transform: none;
}

.builder-tool.active,
.floor-tabs button.active {
  border-color: rgba(217, 174, 94, .85);
  background: rgba(85, 55, 18, .86);
  color: #ffe0a0;
}

.eraser-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(232, 221, 196, .22);
  color: #ffb7ad;
  font: 900 24px Arial, sans-serif;
}

.builder-stats {
  gap: 7px;
  border-top: 1px solid rgba(232, 221, 196, .12);
  padding-top: 12px;
}

.builder-stats p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: var(--muted);
  font: 13px Arial, sans-serif;
}

.builder-stats strong {
  color: #ffe0a0;
}
.builder-tile-settings {
  border-top: 1px solid rgba(232, 221, 196, .12);
  padding-top: 12px;
}

.builder-selected-tile {
  margin: 0;
  color: #ffe0a0;
  font: 700 13px Arial, sans-serif;
}

.builder-tile-settings label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font: 700 12px Arial, sans-serif;
}

.builder-tile-settings input:not([type="checkbox"]) {
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid rgba(232, 221, 196, .18);
  border-radius: 4px;
  background: rgba(7, 8, 10, .72);
  color: var(--text);
  font: 14px Arial, sans-serif;
}

.builder-check {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
}

.house-cell.selected {
  outline: 2px solid #ffd98d;
  outline-offset: -2px;
}

.house-builder-board-wrap {
  overflow: auto;
  padding: 14px;
}

.house-builder-board-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  color: var(--muted);
  font: 700 13px Arial, sans-serif;
}

.house-builder-board-head span:first-child {
  color: #ffe0a0;
}

.house-grid-stage {
  position: relative;
  width: 962px;
  height: 962px;
  border: 1px solid rgba(217, 174, 94, .36);
  background:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px),
    rgba(12, 11, 8, .78);
  background-size: 32px 32px;
  isolation: isolate;
}

.builder-submit-settings label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font: 700 12px Arial, sans-serif;
}

.builder-submit-settings select,
.builder-submit-settings textarea {
  width: 100%;
  border: 1px solid rgba(232, 221, 196, .18);
  border-radius: 4px;
  background: rgba(7, 8, 10, .72);
  color: var(--text);
  font: 14px Arial, sans-serif;
}

.builder-submit-settings select {
  min-height: 36px;
  padding: 7px 9px;
}

.builder-submit-settings textarea {
  min-height: 88px;
  padding: 9px;
  resize: vertical;
}

.builder-submit-status {
  min-height: 20px;
  color: var(--muted);
  font: 700 12px Arial, sans-serif;
}

.builder-submit-status.success {
  color: var(--ok);
}

.builder-submit-status.error {
  color: var(--danger);
}

.builder-placement-rules {
  padding: 10px 0;
  border-top: 1px solid rgba(224, 174, 68, 0.24);
  border-bottom: 1px solid rgba(224, 174, 68, 0.24);
  color: #d8cfbb;
}

.builder-placement-rules p {
  margin: 6px 0 0;
}

.house-package-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.house-package-list form,
.house-package-list button {
  width: 100%;
  height: 100%;
}

.house-package-list button {
  min-height: 52px;
  padding: 9px 12px;
}

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

.house-admin-list {
  display: grid;
  gap: 8px;
  position: sticky;
  top: 16px;
}

.house-admin-list-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(16, 15, 12, .78);
  color: var(--text);
  text-decoration: none;
}

.house-admin-list-item span {
  color: var(--muted);
  font: 12px Arial, sans-serif;
}

.house-admin-list-item.active {
  border-color: var(--accent);
  background: rgba(216, 168, 70, .12);
}

.house-admin-review {
  min-width: 0;
}

.house-admin-meta {
  padding: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.house-admin-meta dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 18px;
}

.house-admin-meta dl div {
  display: grid;
  gap: 3px;
}

.house-admin-meta dt {
  color: var(--muted);
  font: 700 11px Arial, sans-serif;
  text-transform: uppercase;
}

.house-admin-meta dd {
  margin: 0;
}

.house-admin-floor-tabs {
  margin: 14px 0 10px;
}

.house-admin-board-wrap {
  max-height: 680px;
  border: 1px solid var(--line);
}

.house-admin-decision {
  margin-top: 16px;
  max-width: 640px;
}

@media (max-width: 900px) {
  .house-admin-layout {
    grid-template-columns: 1fr;
  }

  .house-admin-list {
    position: static;
  }

  .house-admin-meta dl,
  .house-package-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .house-package-list {
    grid-template-columns: 1fr;
  }
}

.house-grid {
  position: absolute;
  left: 1px;
  top: 1px;
  display: grid;
  grid-template-columns: repeat(30, 32px);
  grid-template-rows: repeat(30, 32px);
  width: 960px;
  height: 960px;
  border: 0;
  background: transparent;
  isolation: isolate;
}

.house-grid-current {
  z-index: 2;
}

.house-grid-below {
  z-index: 1;
  opacity: 0;
  filter: brightness(.68) saturate(.72);
  pointer-events: none;
  transition: opacity 120ms ease;
}

.house-grid-below.visible {
  opacity: .52;
}

.house-cell {
  width: 32px;
  height: 32px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, .04);
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  border-radius: 0;
  background-color: transparent;
  image-rendering: pixelated;
  position: relative;
  overflow: visible;
  z-index: 1;
}

.house-ground-sprite,
.house-object-sprite {
  position: absolute;
  inset: 0;
  width: 32px;
  height: 32px;
  max-width: none;
  max-height: none;
  object-fit: none;
  image-rendering: pixelated;
  pointer-events: none;
  user-select: none;
}

.house-ground-sprite {
  z-index: 1;
}

.house-object-sprite {
  z-index: 4;
  inset: auto 0 0 auto;
  width: auto;
  height: auto;
}

.house-cell.has-object {
  z-index: 5;
}

.house-wall-south {
  transform: none;
}

.house-wall-east {
  transform: none;
}

.house-wall-corner {
  transform: none;
}

.house-tile-sprite {
  display: none;
}
.house-cell:hover {
  outline: 2px solid rgba(255, 217, 141, .82);
  outline-offset: -2px;
}

.house-export-dialog {
  width: min(760px, calc(100% - 24px));
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
}

.house-export-dialog textarea {
  width: 100%;
  min-height: 420px;
  font: 13px Consolas, monospace;
}

.dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.danger-lite {
  border-color: rgba(217, 108, 95, .55);
  color: #ffd3cd;
}

@media (max-width: 920px) {
  .house-builder-head,
  .house-builder-layout {
    grid-template-columns: 1fr;
  }

  .house-builder-tools {
    position: static;
  }
}














