:root {
  --bg: #171a14;
  --bg-panel: #20241c;
  --bg-panel-alt: #2a2f22;
  --border: #3d4434;
  --text: #e6e8dc;
  --text-dim: #9aa38c;
  --accent: #7c9a5c;
  --accent-2: #b23a3a;
  --star-on: #e8b23a;
  --star-off: #453c31;
  --immune: #6d9e6d;
  --radius: 10px;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(circle at top, #1e2318 0%, #0e100b 70%);
  color: var(--text);
  min-height: 100vh;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(180deg, #262b1f, #14170f);
  border-bottom: 2px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  margin-left: auto;
  flex-wrap: wrap;
}

.header-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
}

.brand-monhundb {
  height: 34px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
}

.brand-home {
  cursor: pointer;
  border-radius: 6px;
  flex: 0 0 auto;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar h1 {
  font-size: 1.25rem;
  margin: 0;
  letter-spacing: 0.02em;
}

.brand-home:hover .title-main {
  color: var(--accent);
}

.brand-home:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.topbar h1 .title-sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.selector-wrap {
  min-width: 280px;
  flex: 1 1 320px;
  max-width: 460px;
}

#monster-combobox { position: relative; }

.monster-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.8rem;
  font-size: 1rem;
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.monster-trigger:focus,
.monster-trigger[aria-expanded="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 154, 92, 0.25);
}

.trigger-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 auto;
  background: var(--bg-panel-alt);
  border-radius: 6px;
}

.trigger-label {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trigger-caret {
  flex: 0 0 auto;
  color: var(--text-dim);
  font-size: 0.8rem;
  transition: transform 0.15s ease;
}

.monster-trigger[aria-expanded="true"] .trigger-caret { transform: rotate(180deg); }

.monster-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  z-index: 30;
  display: flex;
  flex-direction: column;
  max-height: min(420px, 70vh);
  overflow: hidden;
}

.monster-panel[hidden] { display: none; }

.monster-search {
  margin: 0.5rem;
  padding: 0.5rem 0.65rem;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}

.monster-search:focus { border-color: var(--accent); }

.monster-list {
  overflow-y: auto;
  padding: 0 0.4rem 0.5rem;
}

/* Monster selector section headings (large / small) */
.monster-section-heading {
  padding: 0.5rem 0.75rem 0.2rem;
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: #b8c478; opacity: 0.8;
  border-bottom: 1px solid #454f3a; margin: 0.4rem 0 0.15rem;
}
.monster-section-heading:first-child { margin-top: 0; border-top: none; }

.monster-group {
  margin-top: 0.3rem;
}

.monster-group:first-child { margin-top: 0; }

.monster-option--variant {
  padding-left: 1.6rem;
}

.variant-dash {
  color: var(--text-dim);
  margin-right: -0.3rem;
}

.monster-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.4rem 0.5rem;
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.monster-option:hover,
.monster-option.active {
  background: var(--bg-panel-alt);
}

.monster-option.selected {
  color: var(--accent);
  font-weight: 600;
}

.monster-option img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex: 0 0 auto;
  background: var(--bg-panel-alt);
  border-radius: 6px;
}

.monster-option img.icon-missing { visibility: hidden; }
.monster-option[hidden] { display: none; }

.monster-list .no-results {
  padding: 1rem 0.6rem;
  color: var(--text-dim);
  font-size: 0.88rem;
  text-align: center;
}

.global-search-wrap {
  position: relative;
  flex: 0 0 auto;
}

.header-icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.header-icon-btn:hover,
.header-icon-btn[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

/* Keep the current section visible in the top navigation. */
body[data-page="decorations"] .header-icon-btn[href^="decorations"],
body[data-page="weapons"] .header-icon-btn[href^="weapons"],
body[data-page="armor"] .header-icon-btn[href^="armor"],
body[data-page="materials"] .header-icon-btn[href^="materials"],
body[data-page="skills"] .header-icon-btn[href^="skills"],
body[data-page="charms"] .header-icon-btn[href^="charms"],
body[data-page="missions"] .header-icon-btn[href^="missions"] {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-panel));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent),
    0 0 12px color-mix(in srgb, var(--accent) 32%, transparent);
}

.header-icon-btn--label {
  width: auto;
  height: auto;
  padding: 0.5rem 0.8rem;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-family: inherit;
}

.global-search-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  width: 420px;
  max-width: calc(100vw - 2rem);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  z-index: 40;
  display: flex;
  flex-direction: column;
  max-height: 75vh;
  overflow: hidden;
}
@media (max-width: 500px) {
  .global-search-panel { left: 50%; right: auto; transform: translateX(-50%); width: calc(100vw - 2rem); }
}

.global-search-panel[hidden] { display: none; }

.global-search-results {
  overflow-y: auto;
  padding: 0 0.6rem 0.6rem;
}

.gs-section {
  margin-top: 0.6rem;
}
.gs-section:first-child { margin-top: 0; }

.gs-section-title {
  padding: 0.3rem 0.4rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.gs-monster-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.4rem 0.5rem;
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.gs-monster-row:hover { background: var(--bg-panel-alt); }
.gs-monster-row img { width: 26px; height: 26px; object-fit: contain; border-radius: 6px; background: var(--bg-panel-alt); flex: 0 0 auto; }

.gs-material-block {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.6rem 0.3rem;
  margin: 0 0.1rem 0.6rem;
}

.gs-material-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.gs-material-header:hover span { color: var(--accent); }
.gs-material-header img { width: 26px; height: 26px; object-fit: contain; border-radius: 6px; }

.gs-material-intro {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin: 0 0 0.4rem;
}

.gs-source-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  width: 100%;
  padding: 0.45rem 0.5rem;
  background: var(--bg-panel);
  border: none;
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  margin-bottom: 0.35rem;
}
.gs-source-row:hover { background: var(--bg-panel-alt); }

.gs-source-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.gs-source-top img { width: 22px; height: 22px; object-fit: contain; border-radius: 5px; background: var(--bg-panel-alt); flex: 0 0 auto; }
.gs-source-name { font-weight: 600; }
.gs-source-rank {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: auto;
}
.gs-source-summary {
  font-size: 0.8rem;
  color: var(--text-dim);
  padding-left: 1.85rem;
}
.gs-xn {
  border-bottom: 1px dotted var(--text-dim);
  cursor: help;
}

.gs-decoration-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 1em;
  text-align: left;
  cursor: pointer;
}
.gs-decoration-header:hover { color: var(--accent); }
.gs-decoration-header img { width: 26px; height: 26px; object-fit: contain; border-radius: 6px; }

.gs-decoration-skill {
  font-size: 0.82rem;
  color: var(--text);
  margin: 0 0 0.45rem;
}

.gs-decoration-materials {
  list-style: none;
  margin: 0 0 0.3rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.gs-decoration-materials li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
}
.gs-decoration-qty {
  color: var(--text-dim);
  margin-left: auto;
}

.gs-no-results {
  padding: 1rem 0.6rem;
  color: var(--text-dim);
  font-size: 0.88rem;
  text-align: center;
}

.material-combinations-block { margin-top: 1rem; }
.materials-mode-toggle { display:flex; align-items:stretch; border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; background:var(--bg-panel); }
.materials-mode-toggle button { padding:.55rem .8rem; border:0; border-right:1px solid var(--border); background:transparent; color:var(--text-dim); font:600 .82rem inherit; cursor:pointer; }
.materials-mode-toggle button:last-child { border-right:0; }.materials-mode-toggle button:hover:not(.active){background:var(--bg-panel-alt)}.materials-mode-toggle button.active{background:var(--accent);color:var(--bg)}
.combination-list{display:grid;gap:.55rem}.combination-card{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(300px,1.2fr);gap:.75rem;align-items:center;padding:.65rem .75rem;background:var(--bg-panel-alt);border:1px solid var(--border);border-radius:8px}.combination-result,.combination-formula{display:flex;align-items:center;gap:.45rem;min-width:0}.combination-result{border-right:1px solid var(--border);padding-right:.75rem}.combination-caption{color:var(--text-dim);font-size:.72rem;text-transform:uppercase}.combination-item{display:inline-flex;align-items:center;gap:.32rem;min-width:0;padding:.2rem;background:transparent;color:var(--text);border:0;border-radius:5px;font:600 .82rem inherit;cursor:pointer}.combination-item:hover{color:var(--accent);background:var(--bg-panel)}.combination-item .material-icon{width:24px;height:24px}.combination-item--result{color:var(--accent)}.combination-symbol,.combination-amount{color:var(--text-dim);font-weight:700}.combination-amount{margin-left:auto;font-size:.78rem}@media(max-width:720px){.materials-mode-toggle{width:100%}.materials-mode-toggle button{flex:1}.combination-card{grid-template-columns:1fr}.combination-result{border-right:0;border-bottom:1px solid var(--border);padding:0 0 .4rem}.combination-formula{flex-wrap:wrap}}
.material-combinations-block h4 { margin: 0 0 0.45rem; font-size: 0.95rem; }
.material-combination-formula { display:flex; align-items:center; flex-wrap:wrap; gap:0.35rem; margin-top:0.38rem; padding:0.45rem; border:1px solid var(--border); border-radius:7px; background:var(--bg-panel-alt); }
.material-combination-formula button { display:inline-flex; align-items:center; gap:0.3rem; border:0; background:transparent; color:var(--text); font:inherit; cursor:pointer; padding:0.12rem; }
.material-combination-formula button:hover { color:var(--accent); }
.material-combination-formula .material-icon { width:22px; height:22px; }

.lang-toggle {
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.55rem 0.55rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.lang-toggle:hover { border-color: var(--accent); }

.lang-toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 3 2'%3E%3Crect width='3' height='2' fill='%23AA151B'/%3E%3Crect y='0.5' width='3' height='1' fill='%23F1BF00'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}
.lang-toggle[data-lang="en"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3Crect width='60' height='30' fill='%23012169'/%3E%3Cpath d='M0,0 L60,30 M60,0 L0,30' stroke='%23FFFFFF' stroke-width='6'/%3E%3Cpath d='M0,0 L60,30 M60,0 L0,30' stroke='%23C8102E' stroke-width='2'/%3E%3Cpath d='M30,0 V30 M0,15 H60' stroke='%23FFFFFF' stroke-width='10'/%3E%3Cpath d='M30,0 V30 M0,15 H60' stroke='%23C8102E' stroke-width='6'/%3E%3C/svg%3E");
}

.lang-opt { color: var(--text-dim); position: relative; z-index: 1; }
.lang-opt.active { color: var(--accent); }

.detail {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
}

.empty-state {
  text-align: center;
  color: var(--text-dim);
  margin-top: 3rem;
  font-size: 1.05rem;
}

.home-view {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
}

.news-section {
  margin-top: 2.5rem;
}

.news-heading {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin: 0 0 0.9rem;
}

.news-item {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.news-item-toggle {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  padding: 1.1rem;
  margin: 0;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.news-item-toggle:hover {
  background: var(--bg-panel-alt);
}

.news-item-image {
  flex: 0 0 auto;
  display: flex;
  gap: 0.5rem;
}
.news-item-image img {
  width: 72px;
  height: 76px;
  object-fit: contain;
  background: var(--bg-panel-alt);
  border-radius: 6px;
}

.news-preview-svg {
  width: 72px;
  height: 76px;
  background: var(--bg-panel-alt);
  border-radius: 6px;
}

.news-item-image--split img {
  width: 72px;
  height: 76px;
  object-fit: contain;
  background: var(--bg-panel-alt);
  border-radius: 6px;
}

.news-item-icon {
  width: 72px;
  height: 76px;
  background: var(--bg-panel-alt);
  border-radius: 6px;
}

.news-item-body {
  min-width: 0;
}

.news-item-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: rgba(124, 154, 92, 0.15);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  margin-bottom: 0.4rem;
}

.news-item-title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.news-item-text {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.5;
}

.news-item-toggle-label {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}
.news-item-toggle-label::after {
  content: "▾";
  display: inline-block;
  margin-left: 0.35rem;
  transition: transform 0.15s ease;
}
.news-item.expanded .news-item-toggle-label::after {
  transform: rotate(180deg);
}

.news-item-detail {
  padding: 0 1.1rem 1.1rem calc(1.1rem + 72px + 1.25rem);
}
.news-item-detail ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.news-item-detail li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.5;
}
.news-item-detail li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

@media (max-width: 560px) {
  .news-item-toggle {
    flex-direction: column;
    align-items: flex-start;
  }
  .news-item-detail {
    padding-left: 1.1rem;
  }
}

.monster-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.monster-header {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.monster-header-divider {
  align-self: stretch;
  width: 1px;
  background: var(--border);
  margin: 0 0.3rem;
}

.monster-header-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mh-info-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.mh-info-label {
  color: var(--text-dim);
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  min-width: 110px;
}

.mh-info-value {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}

@media (max-width: 560px) {
  .monster-header { flex-wrap: wrap; }
  .monster-header-divider { display: none; }
  .monster-header-info { flex-basis: 100%; }
}

.monster-render {
  width: 190px;
  height: 190px;
  object-fit: contain;
  flex-shrink: 0;
  background: radial-gradient(circle, rgba(124, 154, 92, 0.12) 0%, transparent 72%);
  border-radius: var(--radius);
}

@media (max-width: 560px) {
  .monster-render { width: 68px; height: 68px; }
}

.model3d-block h3 { display: flex; align-items: center; gap: 0.5rem; }
.beta-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #1a1714;
  background: var(--accent);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  text-transform: uppercase;
}
.model3d-stage { position: relative; overflow: hidden; border-radius: 8px; background: var(--bg-panel-alt); }
.monster-model3d {
  width: 100%;
  height: 46vh;
  min-height: 300px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.model3d-variant-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.6rem;
}
.model3d-variant-btn {
  padding: 0.35rem 0.7rem;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 999px;
  font-size: 0.78rem;
  cursor: pointer;
}
.model3d-variant-btn:hover { border-color: var(--accent); }
.model3d-variant-btn.active { background: var(--accent); border-color: var(--accent); color: #1a1714; font-weight: 600; }
.model3d-note { font-size: 0.78rem; color: var(--text-dim); margin: 0.5rem 0 0; }

.cross-game-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.cross-game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 108px;
  padding: 0.6rem 0.5rem;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  /* <button> doesn't inherit page text color by default (UA stylesheet
     sets its own), so the name showed up browser-default black instead
     of the site's cream text. */
  color: var(--text);
}
.cross-game-card:hover { border-color: var(--accent); }
.cross-game-card img.cross-game-render { width: 72px; height: 72px; object-fit: contain; }
.cross-game-card-game { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); }
.cross-game-card-name { font-size: 0.78rem; font-weight: 600; }

.monster-name {
  margin: 0;
  font-size: 1.8rem;
  color: var(--accent);
}

.monster-species {
  margin: 0.2rem 0 0;
  color: var(--text-dim);
}

.block {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.block[data-block="resistances"] {
  background: linear-gradient(180deg, rgba(178, 58, 58, 0.14), rgba(178, 58, 58, 0.05));
  border-color: rgba(178, 58, 58, 0.35);
}

.block[data-block="elements"] {
  background: linear-gradient(180deg, rgba(79, 217, 104, 0.12), rgba(79, 217, 104, 0.04));
  border-color: rgba(79, 217, 104, 0.3);
}

.block h3 {
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.subhead {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  opacity: 0.75;
}

.inflicts-columns {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
}

.inflicts-col { min-width: 0; }

.inflicts-columns::before {
  content: "";
  grid-row: 1;
  grid-column: 2;
  border-left: 1px solid var(--border);
  justify-self: center;
  width: 0;
}

@media (max-width: 560px) {
  .inflicts-columns {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }
  .inflicts-columns::before { display: none; }
  .inflicts-col:first-child {
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.9rem;
  }
}

.chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chips li {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.88rem;
}

.inflicts-list li { border-color: var(--accent-2); }

.stat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.5rem;
}

.ailments-list {
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

/* Wilds decoration sources: always exactly 2 (the two orb types), give each
   half the row instead of the cramped auto-fill minmax(190px) columns. */
.decoration-sources-list {
  grid-template-columns: 1fr 1fr;
}
.decoration-sources-list li {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.7rem 0.9rem;
}
.decoration-sources-list .material-icon.deco-mask-icon--sm { margin-right: 0; }

@media (max-width: 560px) {
  .decoration-sources-list { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .ailments-list { grid-template-columns: 1fr; }
}

.stat-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
}

.stat-list li.has-note {
  flex-wrap: wrap;
  grid-column: 1 / -1;
}

.res-note {
  flex-basis: 100%;
  order: 3;
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  font-style: italic;
  color: var(--text-dim);
  line-height: 1.35;
}

.res-note--unconfirmed::before {
  content: "âš  ";
  font-style: normal;
}

.res-cond { border-style: dashed; }

.res-cond .stat-name::after {
  content: " âš ";
  color: var(--accent);
}

.stat-name { text-transform: none; }

.stars {
  display: inline-block;
  min-width: 60px;
  text-align: center;
  letter-spacing: 1px;
  font-size: 0.95rem;
}

.stars .on { color: var(--star-on); }
.stars .off { color: var(--star-off); }

.badge-immune {
  color: var(--immune);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-resistant {
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rank-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.rank-tab {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
}

.rank-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #10140c;
  font-weight: 600;
}

.materials-table-wrap {
  overflow-x: auto;
}

.materials-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 560px;
}

.materials-table th,
.materials-table td {
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.materials-table th {
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.materials-table tbody tr:hover {
  background: rgba(124, 154, 92, 0.08);
}

.materials-table td.material-name {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  padding-right: 1.2rem;
}

.material-name-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.material-name-link:hover { color: var(--accent); text-decoration: underline; }

.skill-name-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.skill-name-link:hover { color: var(--accent); text-decoration: underline; }

.decoration-card.skill-card {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}
.skill-card .decoration-card-skill {
  white-space: normal;
  line-height: 1.4;
}
.skill-card-top { display: flex; align-items: center; gap: 0.5rem; }

/* replicates MHRice's own 2-layer masked-icon technique: a colored "r"
   (ring/base) mask on top of a solid black "a" (detail) mask underneath --
   see scrape_skills.js for why skills only vary by color, not by shape */
.skill-icon {
  display: inline-grid;
  grid-template: 1fr / 1fr;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  flex: 0 0 auto;
  vertical-align: middle;
}
.skill-icon > * {
  grid-column: 1 / 1;
  grid-row: 1 / 1;
  width: 100%;
  height: 100%;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.skill-icon-r {
  z-index: 2;
  -webkit-mask-image: url("data/images/icons/skill.r.png");
  mask-image: url("data/images/icons/skill.r.png");
}
.skill-icon-a {
  z-index: 1;
  background-color: #000;
  -webkit-mask-image: url("data/images/icons/skill.a.png");
  mask-image: url("data/images/icons/skill.a.png");
}
.decoration-detail-header .skill-icon { width: 34px; height: 34px; }

/* same 2-layer mask technique as .skill-icon, but for materials/decorations
   which DO have real per-item icon art (see itemMaskIconTag() in app.js) --
   kept as a separate class since the base size differs (.material-icon's
   existing 22px etc.) and gets combined with that class for sizing */
.item-mask-icon {
  display: inline-grid;
  grid-template: 1fr / 1fr;
  place-items: center;
}
.item-mask-icon > * {
  grid-column: 1 / 1;
  grid-row: 1 / 1;
  width: 100%;
  height: 100%;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.item-mask-icon-r { z-index: 2; }
.item-mask-icon-a { z-index: 1; background-color: #000; }

/* Wilds decoration icons: grayscale gem art (shading/facets baked in) tinted
   via mix-blend-mode so the linework stays visible instead of flattening to
   one solid color like a plain alpha mask would. */
.material-icon.deco-mask-icon {
  position: relative;
  display: inline-block;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.deco-mask-icon-tint {
  position: absolute;
  inset: 0;
  mix-blend-mode: multiply;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.decoration-card .material-icon.deco-mask-icon { width: 28px; height: 28px; flex: 0 0 auto; }
.decoration-detail-header .material-icon.deco-mask-icon { width: 42px; height: 42px; }
.deco-mask-icon-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 40%;
  height: 40%;
  background-size: contain;
  background-repeat: no-repeat;
}
.stat-list .material-icon.deco-mask-icon--sm { width: 20px; height: 20px; margin-right: 0.5rem; }

.no-data {
  color: var(--text-dim);
  font-size: 0.88rem;
  font-style: italic;
}

.status-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: -4px;
  margin-right: 0.35rem;
}

.material-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  vertical-align: -6px;
  margin-right: 0.4rem;
  border-radius: 4px;
  background: var(--bg-panel-alt);
}

.material-icon--placeholder {
  display: inline-block;
}

/* Hitzones */
.hz-legend {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: -0.2rem 0 0.8rem;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.hz-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  display: inline-block;
  margin-left: 0.6rem;
}
.hz-legend .hz-dot:first-child { margin-left: 0; }

.hz-dot.hz-best { background: var(--hz-best); box-shadow: 0 0 6px 1px var(--hz-best); }
.hz-dot.hz-ok { background: var(--hz-ok); }
.hz-dot.hz-zero { background: var(--hz-zero); }

:root {
  --hz-best: #4fd968;
  --hz-ok: #d9c94a;
  --hz-zero: #b23a3a;
}

.hitzones-table-scroll { overflow-x: auto; }

.hz-silhouette-stat-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.hz-silhouette-stat-picker-label {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.hz-silhouette-stat-tabs {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.hz-silhouette-stat-tab {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
}

.hz-silhouette-stat-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #10140c;
  font-weight: 600;
}

.hz-silhouette-caption {
  margin: 1rem 0 0.5rem;
  font-size: 0.78rem;
  font-style: italic;
  color: var(--text-dim);
  text-align: center;
}

.hz-silhouette {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 1.5rem auto 0;
}

.hz-silhouette polygon[data-part] {
  cursor: help;
  transition: opacity 0.15s ease;
}
.hz-silhouette polygon[data-part]:hover { opacity: 0.8; }

.hitzones-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 640px;
}

.hitzones-table th,
.hitzones-table td {
  text-align: center;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.hitzones-table th {
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.hitzones-table tbody tr:hover { background: rgba(124, 154, 92, 0.08); }

.hitzones-table th.hz-best,
.hitzones-table td.hz-best {
  background: rgba(79, 217, 104, 0.22);
  color: #c7f5d0;
  position: relative;
}

.hitzones-table th.hz-best {
  animation: hz-glow 2.2s ease-in-out infinite;
}

.hitzones-table td.hz-best {
  box-shadow: inset 0 0 10px rgba(79, 217, 104, 0.4);
  font-weight: 700;
}

.hitzones-table th.hz-ok,
.hitzones-table td.hz-ok {
  background: rgba(217, 201, 74, 0.16);
  color: #e8dfa8;
}

.hitzones-table th.hz-zero,
.hitzones-table td.hz-zero {
  background: rgba(178, 58, 58, 0.18);
  color: #e8b4b4;
}

@keyframes hz-glow {
  0%, 100% { text-shadow: 0 0 4px rgba(79, 217, 104, 0.45); }
  50% { text-shadow: 0 0 12px rgba(79, 217, 104, 0.95), 0 0 20px rgba(79, 217, 104, 0.55); }
}

.hitzones-table td.material-name,
.hitzones-table th:first-child {
  white-space: nowrap;
  text-align: left;
}

/* Ailments dropdown */
.ailment-item { padding: 0; overflow: hidden; }

.ailment-item details { width: 100%; }

.ailment-item summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  list-style: none;
}

.ailment-item summary .stat-name {
  min-width: 160px;
}

@media (max-width: 560px) {
  .ailment-item summary .stat-name { min-width: 120px; }
}

.ailment-item summary::-webkit-details-marker { display: none; }

.ailment-item summary::after {
  content: "▾";
  color: var(--text-dim);
  font-size: 0.75rem;
  margin-left: 0.4rem;
}

.ailment-item details[open] summary::after { content: "â–´"; }

.buildup-bars {
  padding: 0 0.6rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.buildup-row {
  display: grid;
  grid-template-columns: 1fr 100px;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.buildup-track {
  height: 6px;
  background: var(--star-off);
  border-radius: 3px;
  overflow: hidden;
}

.buildup-fill {
  height: 100%;
  background: var(--accent);
}

@media (max-width: 560px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
    padding: 0.7rem 1rem;
    gap: 0.5rem;
    position: static;
  }
  .topbar h1 { font-size: 1.05rem; }
   .topbar h1 .title-sub { font-size: 0.62rem; }
   .brand-home { margin: 0; }
   .header-right { margin-left: 0; }
   .header-logo { height: 36px; }
  .selector-wrap { max-width: none; flex: 0 0 auto; min-width: 0; }
  .lang-toggle { align-self: flex-end; }
  .detail { padding: 1rem 0.85rem; }
  .materials-table th, .materials-table td { white-space: normal; }
  .header-icon-btn--label span:not(.lang-opt) { display: none; }
}

/* Decorations view */
.decorations-view {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.decorations-view[hidden] { display: none; }

.decorations-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.decorations-back {
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  white-space: nowrap;
}
.decorations-back:hover { border-color: var(--accent); color: var(--accent); }

.decorations-toolbar .monster-search { flex: 1 1 260px; }

.decorations-slot-group + .decorations-slot-group { margin-top: 1.5rem; }

.decorations-slot-heading {
  color: var(--accent);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem;
}

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

.material-plus-tier-note {
  margin: 0 0 0.5rem;
  padding: 0.45rem 0.7rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  background: var(--bg-panel-alt);
  border: 1px dashed var(--border);
  border-radius: 6px;
}

.skills-granted-subheading {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}
.skills-granted-subheading:not(:first-child) {
  margin-top: 1rem;
}

.decoration-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: var(--text);
}
.decoration-card:hover { border-color: var(--accent); }
.decoration-card img.material-icon,
.decoration-card .material-icon.item-mask-icon { width: 28px; height: 28px; flex: 0 0 auto; }

.decoration-card-name,
.decoration-card-skill {
  display: block;
  min-width: 0;
}
.decoration-card-name { font-weight: 600; font-size: 0.9rem; }
.decoration-card-skill { font-size: 0.78rem; color: var(--text-dim); }

.decoration-detail-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}
.decoration-detail-header img.material-icon,
.decoration-detail-header .material-icon.item-mask-icon { width: 42px; height: 42px; }
.decoration-detail-header h2 { margin: 0; flex: 1 1 auto; }
.decoration-detail-slot {
  color: var(--text-dim);
  font-size: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
}

.decoration-card.selected { border-color: var(--accent); background: rgba(124, 154, 92, 0.12); }

.armor-set-card { flex-direction: column; align-items: stretch; text-align: center; }
.armor-set-thumb {
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: var(--bg-panel);
  border-radius: 6px;
}
.armor-set-thumb-sm { width: 32px; height: 32px; object-fit: contain; flex: 0 0 auto; border-radius: 6px; background: var(--bg-panel); }

/* Wilds-only: a set that comes in both an alpha (a) and beta (ss) tier
   renders as one card, split in half at the bottom into two buttons -- same
   base gear, pick which skill loadout to open. */
.armor-set-pair-buttons {
  display: flex;
  margin-top: 0.6rem;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.armor-set-pair-buttons button {
  flex: 1 1 50%;
  padding: 0.45rem 0;
  background: var(--bg-panel-alt);
  color: var(--text);
  border: none;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
}
.armor-set-pair-buttons button:not(:last-child) { border-right: 1px solid var(--border); }
.armor-set-pair-buttons button:hover { background: var(--accent); color: var(--bg); }
/* Gamma is a strictly-stronger tier added later than alpha/beta -- a darker
   shade of the site's own moss green (vs. the neutral alpha/beta buttons)
   signals "this one's better" without standing out from the palette. */
.armor-set-pair-buttons button.gamma {
  background: #3d5a2a;
  color: var(--text);
  font-weight: 800;
}
.armor-set-pair-buttons button.gamma:hover {
  background: var(--accent);
  color: var(--bg);
}

.armor-mode-toggle {
  display: flex;
  flex: 0 0 auto;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.armor-mode-toggle button {
  padding: 0.55rem 0.9rem;
  background: var(--bg-panel);
  color: var(--text-dim);
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.armor-mode-toggle button + button { border-left: 1px solid var(--border); }
.armor-mode-toggle button.active { background: var(--accent); color: var(--bg); }
.armor-mode-toggle button:hover:not(.active) { background: var(--bg-panel-alt); }

.armor-palico-note {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 0 0 1rem;
}

.armor-set-detail-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
  text-align: center;
}
.armor-set-full-image { max-width: 320px; width: 100%; object-fit: contain; background: var(--bg-panel-alt); border-radius: 10px; }
.armor-set-detail-header h2 { margin: 0; }

.armor-piece-header { margin: 1.5rem 0 0.5rem; }
.armor-piece-divider { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }
.armor-piece-link { cursor: pointer; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; width: 100%; background: none; border: none; color: inherit; font: inherit; text-align: left; }

.deco-slots { display: inline-flex; gap: 0.2rem; vertical-align: middle; }
.deco-slot-icon { width: 18px; height: 18px; }

.mh-sharpness-bar {
  display: inline-block;
  position: relative;
  width: 7rem;
  max-width: 100%;
  height: 0.7rem;
  background: #0c0a08;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-top: 2px solid #8a8a8a;
  border-bottom: 2px solid #8a8a8a;
  border-radius: 3px;
  vertical-align: middle;
  overflow: hidden;
}
.mh-sharpness-seg { position: absolute; top: 0; bottom: 0; height: 100%; }
.mh-sharpness-seg.mh-sharpness-half { height: 50%; top: 0; bottom: auto; opacity: 0.75; }

.ammo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.8rem;
}
@media (max-width: 480px) {
  .ammo-grid { grid-template-columns: 1fr; }
}
.ammo-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.55rem;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
}
.ammo-chip-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ammo-chip-level { color: var(--text-dim); font-size: 0.75rem; flex: 0 0 auto; }
.ammo-chip-capacity { font-weight: 600; color: var(--accent); flex: 0 0 auto; }

.decoration-skills-list { grid-template-columns: 1fr; }
.decoration-skill-effect { color: var(--text-dim); font-size: 0.85rem; text-align: right; }

.weapons-type-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.6rem 0 1rem;
}
.weapon-type-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0.3rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.weapon-type-btn:first-child {
  width: auto;
  padding: 0 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
}
.weapon-type-btn:hover { border-color: var(--accent); }
.weapon-type-btn.active {
  background: var(--bg-panel-alt);
  border-color: var(--accent);
}
.weapon-type-btn:first-child.active { color: var(--accent); }
.weapon-type-icon { width: 100%; height: 100%; object-fit: contain; }

.decoration-materials-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.decoration-material-qty { color: var(--text-dim); font-size: 0.85rem; margin-left: auto; }

.decoration-materials-blocks {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.decoration-material-block { margin: 0; }
.decoration-material-block .gs-material-header { font-size: 0.95rem; }

.decoration-material-sources summary {
  cursor: pointer;
  list-style: none;
  color: var(--accent);
  font-size: 0.82rem;
  padding: 0.15rem 0;
}
.decoration-material-sources summary::-webkit-details-marker { display: none; }
.decoration-material-sources summary::after {
  content: "▾";
  margin-left: 0.35rem;
  font-size: 0.7rem;
}
.decoration-material-sources[open] summary::after { content: "â–´"; }
.decoration-material-sources .gs-source-row { margin-top: 0.4rem; }

@media (max-width: 560px) {
  .decorations-view { padding: 1rem 0.85rem; }
  .decorations-grid { grid-template-columns: 1fr; }
}

/* --- Weapon upgrade tree (SVG) --- */
.weapon-tree-svg { margin: 1.25rem 0 0.25rem; overflow-x: auto; padding-bottom: .45rem; }
.weapon-tree-svg svg { display: block; max-width: none; }
.weapon-tree-svg--compact { text-align: center; }
.weapon-tree-svg--compact svg { display: inline-block; text-align: left; }
.weapon-tree-node { cursor: pointer; }
.weapon-tree-node rect { transition: opacity 0.15s; }
.weapon-tree-node:hover rect { opacity: 0.82; }

/* --- Weapon cross-tree upgrade links --- */
.weapon-cross-line { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin: 0.4rem 0; }
.weapon-cross-link { display: inline-flex; align-items: center; gap: 0.35rem; cursor: pointer; }

.hz-edit-snippet-btn { margin-top: 0.85rem; padding: 0.45rem 0.7rem; border: 1px dashed var(--accent); border-radius: 0.4rem; background: transparent; color: var(--text-dim); cursor: pointer; }
.hz-edit-snippet-btn:hover { border-style: solid; color: var(--text); }
.hz-edit-snippet-btn:disabled { opacity: 0.6; cursor: default; }
.vecmon-admin-link { font-size: 1.45rem !important; line-height: 1; }
.page-view{max-width:1200px;margin:0 auto;padding:1.5rem}.toolbar{display:flex;gap:.75rem;flex-wrap:wrap;margin-top:1rem}.toolbar select,.toolbar input{min-height:2.4rem;padding:.4rem .7rem;border:1px solid var(--border,#777);border-radius:.35rem;background:var(--surface,#fff);color:inherit}.cards-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1rem;margin-top:1rem}.card{padding:1rem;border:1px solid var(--border,#777);border-radius:.5rem;background:var(--surface,#fff)}.card h2{font-size:1.05rem;margin:.35rem 0 .6rem}.card-kicker{font-size:.78rem;color:var(--accent,#b8860b);font-weight:700}.muted{opacity:.75}
.bow-stats-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.9rem}.bow-stats-layout h4{margin:.25rem 0 .5rem}@media(max-width:700px){.bow-stats-layout{grid-template-columns:1fr}}

/* Wilds mission board, shared visual language with MHFU/Rise quests. */
.quests-mode-toggle{display:flex;flex:0 0 auto;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;background:var(--bg-panel)}.quest-filter-btn{border:0;border-right:1px solid var(--border);padding:.55rem .85rem;background:transparent;color:var(--text-dim);font:600 .82rem inherit;cursor:pointer}.quest-filter-btn:last-child{border-right:0}.quest-filter-btn.active{background:var(--accent);color:var(--bg)}.quests-source-filter{display:flex;align-items:center;gap:.45rem}.quests-subtoggle{display:flex;flex-wrap:wrap;gap:.2rem}.quest-subfilter-btn{padding:.38rem .55rem;color:var(--text-dim);background:transparent;border:1px solid var(--border);border-radius:5px;font:600 .74rem inherit;cursor:pointer}.quest-subfilter-btn.active{color:var(--bg);border-color:var(--accent);background:var(--accent)}
.quest-card{align-items:center}.quest-card-copy{min-width:0;display:block}.quest-goal{display:flex;align-items:center;gap:.4rem;color:var(--text-dim);font-size:.76rem}.quest-goal>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.quest-goal--compact{margin:.12rem 0 .18rem}.quest-monster-icons{display:inline-flex;align-items:center;gap:.18rem;flex:0 0 auto}.quest-monster-icon,.quest-monster-icon-link{width:1.45rem;height:1.45rem;flex:0 0 1.45rem}.quest-monster-icon{display:block;object-fit:contain;filter:drop-shadow(0 1px 1px rgba(0,0,0,.55))}.quest-monster-icon-link{display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:transparent;border-radius:50%;cursor:pointer}.quest-goal-detail{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap}
.quest-ticket-icon{--quest-ticket-color:#b36cca;position:relative;display:inline-block;width:2.15rem;height:2.25rem;flex:0 0 2.15rem}.quest-ticket-icon--compact{width:1.62rem;height:1.7rem}.quest-ticket-icon--red{--quest-ticket-color:#d83b38}.quest-ticket-icon--green{--quest-ticket-color:#55a45b}.quest-ticket-icon--gray{--quest-ticket-color:#9297a0}.quest-ticket-icon--purple{--quest-ticket-color:#a96bc8}.quest-ticket-icon__paper{position:absolute;inset:0;border:1px solid color-mix(in srgb,var(--quest-ticket-color) 72%,#fff);border-radius:3px;background:var(--quest-ticket-color);box-shadow:inset 0 0 0 1px rgba(0,0,0,.22)}.quest-ticket-icon__seam{position:absolute;left:16%;right:16%;top:44%;border-top:1px dashed rgba(22,16,18,.65)}.quest-ticket-icon__fold{position:absolute;right:0;top:0;border-left:8px solid transparent;border-bottom:8px solid color-mix(in srgb,var(--quest-ticket-color) 40%,#fff)}.quest-type-line{margin:-.75rem 0 1rem}.quest-type-badge{display:inline-block;padding:.2rem .5rem;border-radius:999px;color:#fff;font-size:.76rem;font-weight:700}.quest-type-badge--red{background:#a92d2a}.quest-type-badge--green{background:#3c7b42}.quest-type-badge--gray{background:#656b75}.quest-type-badge--purple{background:#75468c}.quest-target-chip{display:inline-flex;align-items:center;gap:.35rem}.quest-target-link{display:inline-flex;align-items:center;gap:.35rem}.quest-target-icon{width:1.55rem;height:1.55rem;object-fit:contain;border-radius:50%;vertical-align:middle}

/* Exact universal quest-ticket geometry and palette from MHFU. */
.quest-ticket-icon{width:1.9rem;height:2rem;flex:0 0 auto;filter:drop-shadow(0 1px 1px rgba(0,0,0,.35))}.quest-ticket-icon--compact{width:1.62rem;height:1.7rem}.quest-ticket-icon__paper{inset:0 0 .08rem;background:var(--quest-ticket-color);border:1px solid rgba(22,19,17,.66);border-radius:.08rem;clip-path:polygon(0 0,100% 0,100% 78%,75% 100%,0 100%);box-shadow:none}.quest-ticket-icon__seam{top:.12rem;bottom:.15rem;left:41%;right:auto;border-top:0;border-left:1px dotted rgba(24,20,18,.8)}.quest-ticket-icon__fold{right:0;top:auto;bottom:.08rem;width:0;height:0;border-style:solid;border-width:0 0 .38rem .38rem;border-color:transparent transparent rgba(25,20,18,.44) transparent}.quest-type-badge{display:inline-flex;align-items:center;font-size:.74rem;letter-spacing:.03em}
