:root {
  --ink: #16222a;
  --muted: #64727c;
  --paper: #fbf7ed;
  --panel: #fffdf6;
  --sidebar: rgba(255, 253, 246, 0.86);
  --line: #e6ddc9;
  --gold: #d9a441;
  --coral: #d96d56;
  --teal: #177f8f;
  --green: #4f8a57;
  --violet: #7561b8;
  --light-text: #ffffff;
  --shadow: 0 18px 50px rgba(28, 39, 42, 0.16);
  --motion-fast: 140ms ease;
  --motion-medium: 190ms ease;
}

[data-theme="dark"] {
  --ink: #eef6f4;
  --muted: #a9bbb7;
  --paper: #101819;
  --panel: #172325;
  --sidebar: rgba(23, 35, 37, 0.9);
  --line: #2d3d3d;
  --gold: #e1b65a;
  --coral: #e27961;
  --teal: #43b6c2;
  --green: #73ad78;
  --violet: #a493e3;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

[data-accent="rose"] {
  --teal: #d45c91;
}

[data-accent="red"] {
  --teal: #c55353;
}

[data-accent="green"] {
  --teal: #4f8a57;
}

[data-accent="violet"] {
  --teal: #7561b8;
}

[data-accent="gold"] {
  --teal: #b98728;
}

[data-theme="dark"][data-accent="rose"] {
  --teal: #ee83b4;
}

[data-theme="dark"][data-accent="red"] {
  --teal: #f07a73;
}

[data-theme="dark"][data-accent="green"] {
  --teal: #83c98b;
}

[data-theme="dark"][data-accent="violet"] {
  --teal: #b5a4f3;
}

[data-theme="dark"][data-accent="gold"] {
  --teal: #e1b65a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", Arial, sans-serif;
}

.guild-awakening {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #f8ffff;
  background:
    radial-gradient(circle at 50% 58%, rgba(67, 182, 194, 0.28), transparent 28%),
    radial-gradient(circle at 50% 50%, rgba(12, 255, 239, 0.16), transparent 42%),
    rgba(2, 10, 14, 0.92);
  animation: guild-awakening-fade 5600ms ease both;
}

.guild-awakening--closing {
  animation: guild-awakening-close 700ms ease both;
}

.guild-awakening__mist {
  position: absolute;
  inset: -20%;
  background:
    linear-gradient(115deg, transparent 0 32%, rgba(67, 182, 194, 0.18) 42%, transparent 52% 100%),
    linear-gradient(65deg, transparent 0 38%, rgba(225, 182, 90, 0.13) 46%, transparent 58% 100%);
  filter: blur(18px);
  animation: guild-awakening-mist 5.6s ease-in-out both;
}

.guild-awakening__seal {
  position: absolute;
  width: min(58vw, 520px);
  aspect-ratio: 1;
  border: 1px solid rgba(67, 182, 194, 0.45);
  border-radius: 50%;
  box-shadow:
    0 0 35px rgba(67, 182, 194, 0.35),
    inset 0 0 45px rgba(67, 182, 194, 0.16);
  animation: guild-awakening-seal 5.6s cubic-bezier(.2, .75, .2, 1) both;
}

.guild-awakening__seal span {
  position: absolute;
  inset: 11%;
  border: 1px solid rgba(225, 182, 90, 0.34);
  border-radius: 50%;
}

.guild-awakening__seal span:nth-child(2) {
  inset: 24%;
  border-style: dashed;
  transform: rotate(22deg);
}

.guild-awakening__seal span:nth-child(3) {
  inset: 37%;
  border-color: rgba(248, 255, 255, 0.28);
  box-shadow: 0 0 30px rgba(248, 255, 255, 0.22);
}

.guild-awakening__content {
  position: relative;
  z-index: 1;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .12em;
  animation: guild-awakening-text 5.2s ease both;
}

.guild-awakening__content h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(4rem, 14vw, 10rem);
  line-height: .85;
  text-shadow:
    0 0 14px rgba(67, 182, 194, 0.9),
    0 0 48px rgba(67, 182, 194, 0.45);
}

.guild-awakening__content p {
  margin: 1rem 0 0;
  color: rgba(248, 255, 255, 0.8);
  font-weight: 800;
}

.guild-awakening__eyebrow {
  margin-bottom: .65rem !important;
  color: var(--gold) !important;
  font-size: .78rem;
}

@keyframes guild-awakening-fade {
  0% { opacity: 0; }
  8%, 82% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes guild-awakening-close {
  to { opacity: 0; transform: scale(1.04); }
}

@keyframes guild-awakening-mist {
  0% { opacity: 0; transform: translateX(-12%) scale(1); }
  20%, 78% { opacity: 1; }
  100% { opacity: 0; transform: translateX(12%) scale(1.08); }
}

@keyframes guild-awakening-seal {
  0% { opacity: 0; transform: scale(.4) rotate(-28deg); }
  18% { opacity: 1; transform: scale(1) rotate(0deg); }
  76% { opacity: 1; transform: scale(1.08) rotate(18deg); }
  100% { opacity: 0; transform: scale(1.4) rotate(40deg); }
}

@keyframes guild-awakening-text {
  0% { opacity: 0; transform: translateY(20px) scale(.9); filter: blur(8px); }
  22%, 76% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
  100% { opacity: 0; transform: translateY(-16px) scale(1.04); filter: blur(5px); }
}

[hidden] {
  display: none !important;
}

[data-theme="dark"] body {
  color-scheme: dark;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  cursor: pointer;
}

a,
button,
input,
select,
textarea,
.metric,
.panel,
.member-card,
.guide-card,
.character-card,
.instance-card,
.service-card,
.application-card,
.profile-card,
.dashboard-event,
.sidebar,
.saved-set,
.payout-share-row,
.stat-plus-button {
  transition:
    background-color var(--motion-fast),
    border-color var(--motion-fast),
    box-shadow var(--motion-fast),
    color var(--motion-fast),
    opacity var(--motion-fast),
    transform var(--motion-fast);
}

.shell {
  width: min(1420px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  isolation: isolate;
  width: min(1420px, calc(100% - 32px));
  min-height: 560px;
  color: var(--light-text);
  border-radius: 0 0 28px 28px;
  background: #101819;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -10px;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(10, 21, 25, 0.88), rgba(10, 21, 25, 0.45), rgba(10, 21, 25, 0.15)),
    image-set(url("assets/guild-hero.webp") type("image/webp"), url("assets/guild-hero.png") type("image/png")) center / cover;
  transform: scale(1.015) translate3d(0, 0, 0);
  transform-origin: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, transparent 68%, rgba(10, 21, 25, 0.2));
  pointer-events: none;
}

.is-page-hidden .hero::before,
.is-hero-idle .hero::before {
  animation-play-state: paused;
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(18px, 4vw, 40px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(217, 164, 65, 0.22);
  font-weight: 800;
}

.brand small,
.eyebrow {
  display: block;
  color: inherit;
  opacity: 0.78;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.top-actions,
.hero-actions,
.section-head,
.compact {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-actions {
  animation: hero-actions-enter 760ms 140ms ease both;
}

.language-toggle {
  min-width: 86px;
  justify-content: center;
}

.flag-icon {
  display: inline-block;
  width: 28px;
  height: 18px;
  border: 1px solid color-mix(in srgb, var(--ink) 24%, transparent);
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  opacity: 0.45;
  transition: opacity 160ms ease, transform 160ms ease;
}

.flag-de {
  background: linear-gradient(to bottom, #000 0 33.33%, #dd0000 33.33% 66.66%, #ffce00 66.66% 100%);
}

.flag-gb {
  background:
    linear-gradient(27deg, transparent 42%, #fff 42% 48%, #c8102e 48% 52%, #fff 52% 58%, transparent 58%),
    linear-gradient(153deg, transparent 42%, #fff 42% 48%, #c8102e 48% 52%, #fff 52% 58%, transparent 58%),
    linear-gradient(to right, transparent 42%, #fff 42% 58%, transparent 58%),
    linear-gradient(to bottom, transparent 36%, #fff 36% 64%, transparent 64%),
    linear-gradient(to right, transparent 45%, #c8102e 45% 55%, transparent 55%),
    linear-gradient(to bottom, transparent 41%, #c8102e 41% 59%, transparent 59%),
    #012169;
}

.language-toggle[data-language="de"] .flag-de,
.language-toggle[data-language="en"] .flag-gb {
  opacity: 1;
  transform: translateY(-1px) scale(1.08);
}

.notification-button {
  position: relative;
}

.notification-button.has-unread::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 8px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--panel);
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.16);
}

.notification-badge {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  padding: 76px clamp(18px, 4vw, 44px) 92px;
  animation: hero-content-enter 520ms ease both;
}

.hero h1 {
  position: relative;
  display: inline-block;
  margin: 10px 0 16px;
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
  animation: hero-title-settle 720ms ease both;
}

.hero h1::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 10%, rgba(255, 255, 255, 0.55) 45%, transparent 70%);
  mix-blend-mode: soft-light;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-120%);
  animation: hero-title-sheen 1200ms 420ms ease-out both;
}

.hero p {
  max-width: 620px;
  color: color-mix(in srgb, var(--light-text) 88%, transparent);
  font-size: 1.08rem;
  line-height: 1.65;
}

.primary,
.secondary,
.danger,
.ghost,
.nav-item,
.back,
.icon-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 10px 15px;
  text-decoration: none;
  font-weight: 800;
}

.primary:hover,
.secondary:hover,
.danger:hover,
.ghost:hover,
.back:hover,
.icon-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(24, 31, 34, 0.14);
}

.primary:active,
.secondary:active,
.danger:active,
.ghost:active,
.back:active,
.icon-button:active {
  transform: translateY(0);
  box-shadow: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--teal) 82%, white);
  outline-offset: 3px;
}

.primary {
  color: var(--light-text);
  background: linear-gradient(135deg, var(--teal), color-mix(in srgb, var(--teal) 72%, var(--green)));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--teal) 28%, transparent);
}

.secondary {
  color: var(--ink);
  background: #f0d99d;
}

.danger {
  color: var(--light-text);
  background: #a53c3c;
}

[data-theme="dark"] .secondary {
  color: var(--ink);
  background: #244447;
  border: 1px solid #3b6265;
}

.ghost {
  color: var(--light-text);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  width: min(1420px, calc(100% - 32px));
  margin: 28px auto 72px;
}

.sidebar {
  position: sticky;
  top: 18px;
  align-self: start;
  display: grid;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--sidebar);
  box-shadow: 0 8px 30px rgba(29, 36, 38, 0.08);
}

.nav-group {
  display: grid;
  gap: 7px;
}

.nav-window {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--sidebar) 88%, var(--panel));
}

.nav-customize {
  margin-top: 4px;
}

.nav-label {
  padding: 0 4px 3px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

[data-theme="dark"] .sidebar {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
}

.nav-item {
  width: 100%;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  background: color-mix(in srgb, var(--sidebar) 82%, var(--teal));
  color: var(--teal);
}

.nav-item.locked::after {
  content: "Login";
  float: right;
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--ink);
  background: var(--gold);
  font-size: 0.72rem;
}

.nav-item.has-alert::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 7px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.16);
}

[data-theme="dark"] .nav-item.active,
[data-theme="dark"] .nav-item:hover {
  background: color-mix(in srgb, var(--sidebar) 72%, var(--teal));
}

.content {
  min-width: 0;
}

.item-shop-view {
  --shop-gold: #d9a441;
  --shop-red: #ef4444;
  --shop-emerald: #22c55e;
}

.item-shop-hero {
  align-items: end;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--gold) 42%, var(--line));
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--panel) 94%, var(--teal)), var(--panel));
}

.item-shop-grid,
.item-shop-section,
.item-shop-shop-shell,
.item-shop-watchlist {
  display: grid;
  gap: 18px;
}

.item-shop-watch-panel {
  margin-top: 18px;
}

.item-shop-watchlist {
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--gold) 36%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 92%, var(--paper));
}

.item-shop-watch-group {
  display: grid;
  gap: 10px;
}

.item-shop-watch-group .section-head {
  margin: 0;
}

.item-shop-watch-group h4 {
  margin: 0;
}

.item-shop-watch-group.has-available {
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--shop-red) 44%, var(--shop-gold));
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--panel) 88%, var(--shop-red)), var(--panel));
}

.item-shop-watch-stats,
.item-shop-tabs,
.item-shop-catalog-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.item-shop-watch-stats span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 82%, var(--panel));
  color: var(--muted);
}

.item-shop-watch-stats span.hot {
  border-color: color-mix(in srgb, var(--shop-red) 62%, var(--line));
  color: var(--shop-red);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--shop-red) 14%, transparent);
}

.item-shop-watch-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: 10px;
}

.item-shop-watch-item {
  position: relative;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 92px;
  padding: 14px 46px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 88%, var(--paper));
}

.item-shop-watch-item.available {
  border-color: color-mix(in srgb, var(--shop-red) 52%, var(--shop-gold));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--shop-red) 12%, transparent);
}

.item-shop-watch-item.unavailable {
  opacity: .82;
}

.item-shop-watch-image,
.item-shop-image {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--teal) 35%, var(--line));
  background:
    radial-gradient(circle, color-mix(in srgb, var(--teal) 36%, transparent), transparent 68%),
    color-mix(in srgb, var(--paper) 74%, var(--panel));
}

.item-shop-catalog-image.missing-image,
.item-shop-watch-image.missing-image,
.item-shop-image.missing-image {
  border-style: dashed;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--panel) 86%, var(--teal)), color-mix(in srgb, var(--paper) 92%, var(--panel)));
}

.item-shop-image-fallback {
  display: grid;
  width: 72%;
  height: 72%;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--teal) 42%, var(--line));
  border-radius: 8px;
  color: color-mix(in srgb, var(--teal) 60%, var(--ink));
  background:
    radial-gradient(circle, color-mix(in srgb, var(--teal) 24%, transparent), transparent 68%),
    color-mix(in srgb, var(--panel) 96%, var(--paper));
  font-size: .82rem;
  font-weight: 1000;
  letter-spacing: .04em;
}

.item-shop-watch-image {
  width: 66px;
  height: 66px;
  border-radius: 8px;
}

.item-shop-watch-image img {
  max-width: 56px;
  max-height: 56px;
  object-fit: contain;
}

.item-shop-watch-item h4 {
  margin: 0;
  max-width: 34rem;
  color: var(--ink);
  font-size: .98rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.item-shop-watch-item p {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: .82rem;
}

.item-shop-watch-item p span {
  display: inline-flex;
  min-height: 24px;
  padding: 0 9px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--paper) 70%, transparent);
  font-weight: 900;
}

.item-shop-watch-item p.live span:first-child {
  color: color-mix(in srgb, var(--shop-emerald) 74%, var(--ink));
  border-color: color-mix(in srgb, var(--shop-emerald) 58%, var(--line));
}

.item-shop-watch-copy {
  min-width: 0;
}

.item-shop-watch-action {
  display: flex;
  justify-content: flex-end;
  min-width: max-content;
}

.item-shop-watch-item .item-shop-favorite {
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
}

.item-shop-tabs {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 88%, var(--paper));
}

.item-shop-tab {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: color-mix(in srgb, var(--paper) 84%, var(--panel));
  font-weight: 900;
}

.item-shop-tab span {
  color: var(--muted);
  font-size: .8rem;
}

.item-shop-tab.active {
  border-color: var(--shop-gold);
  color: var(--ink);
  background: linear-gradient(135deg, color-mix(in srgb, var(--shop-gold) 86%, white), var(--shop-gold));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--shop-gold) 18%, transparent);
}

.item-shop-section {
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--shop-gold) 30%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 96%, var(--shop-gold)), var(--panel));
  box-shadow: 0 8px 30px rgba(29, 36, 38, 0.08);
}

.item-shop-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.item-shop-catalog-list {
  display: grid;
  gap: 8px;
}

.item-shop-catalog-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 94%, var(--paper));
}

.item-shop-catalog-row.favorite {
  border-color: color-mix(in srgb, var(--shop-gold) 64%, var(--line));
}

.item-shop-catalog-row.available {
  border-color: color-mix(in srgb, var(--shop-emerald) 48%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--panel) 91%, var(--shop-emerald)), var(--panel));
}

.item-shop-catalog-image {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--teal) 36%, var(--line));
  border-radius: 8px;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--teal) 30%, transparent), transparent 68%),
    color-mix(in srgb, var(--paper) 76%, var(--panel));
}

.item-shop-catalog-image img {
  max-width: 46px;
  max-height: 46px;
  object-fit: contain;
}

.item-shop-catalog-copy {
  min-width: 0;
}

.item-shop-catalog-copy h4 {
  margin: 0;
  overflow-wrap: anywhere;
}

.item-shop-catalog-copy p {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 6px 0 0;
}

.item-shop-catalog-copy span {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--paper) 76%, transparent);
  font-size: 0.78rem;
  font-weight: 900;
}

.item-shop-catalog-copy span.live {
  color: color-mix(in srgb, var(--shop-emerald) 76%, var(--ink));
  border-color: color-mix(in srgb, var(--shop-emerald) 58%, var(--line));
}

.item-shop-catalog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.item-shop-catalog-actions .item-shop-favorite {
  position: static;
}

.item-shop-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 12px;
  min-height: 100%;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, var(--shop-gold));
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 72px, color-mix(in srgb, var(--teal) 20%, transparent), transparent 42%),
    color-mix(in srgb, var(--panel) 90%, var(--paper));
  transition: transform var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-fast);
}

.item-shop-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--shop-gold) 68%, var(--line));
  box-shadow: 0 14px 36px rgba(29, 36, 38, 0.14);
}

.item-shop-card.favorite {
  border-color: var(--shop-gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--shop-gold) 22%, transparent);
}

.item-shop-card.available.favorite {
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--shop-red) 15%, transparent),
    0 16px 40px color-mix(in srgb, var(--shop-red) 18%, transparent);
}

.item-shop-card.unavailable {
  opacity: .82;
}

.item-shop-card.unavailable .item-shop-image {
  filter: grayscale(.85);
}

.item-shop-card.featured {
  grid-column: span 2;
}

.item-shop-card-top {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-height: 28px;
  padding-right: 40px;
}

.item-shop-section-pill,
.item-shop-discount {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 1000;
}

.item-shop-section-pill {
  border: 1px solid var(--line);
  color: var(--muted);
  background: color-mix(in srgb, var(--paper) 80%, var(--panel));
}

.item-shop-discount {
  color: white;
  background: linear-gradient(135deg, var(--shop-red), #b91c1c);
}

.item-shop-favorite {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--shop-gold) 70%, transparent);
  border-radius: 999px;
  color: var(--shop-gold);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  font-size: 1.08rem;
  font-weight: 1000;
  line-height: 1;
}

.item-shop-card.favorite .item-shop-favorite,
.item-shop-watch-item .item-shop-favorite {
  color: var(--ink);
  background: var(--shop-gold);
}

.item-shop-image {
  min-height: 136px;
  border-radius: 8px;
}

.item-shop-image img {
  max-width: 100%;
  max-height: 132px;
  object-fit: contain;
}

.item-shop-card h4 {
  margin: 0;
  overflow-wrap: anywhere;
}

.item-shop-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.item-shop-meta .tag.live {
  color: color-mix(in srgb, var(--shop-emerald) 70%, var(--ink));
  border-color: color-mix(in srgb, var(--shop-emerald) 60%, var(--line));
}

.item-shop-meta .tag.taler {
  border-color: color-mix(in srgb, var(--shop-gold) 68%, var(--line));
  color: var(--ink);
  background: color-mix(in srgb, var(--shop-gold) 28%, var(--panel));
}

.item-shop-open-link {
  justify-self: stretch;
  text-align: center;
}

.item-shop-catalog-panel {
  margin-top: 18px;
}

.item-shop-catalog-tools {
  align-items: stretch;
}

.item-shop-catalog-tools .stat-search {
  flex: 1 1 300px;
}

.filter-chip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 82%, var(--panel));
  font-weight: 900;
}

.filter-chip input {
  accent-color: var(--teal);
}

.item-shop-empty {
  padding: 22px;
  border-style: dashed;
}

@media (max-width: 760px) {
  .item-shop-hero {
    align-items: stretch;
  }

  .item-shop-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 12px;
  }

  .item-shop-tab {
    flex: 0 0 auto;
  }

  .item-shop-card.featured {
    grid-column: auto;
  }

  .item-shop-catalog-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .item-shop-catalog-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .item-shop-watch-item {
    grid-template-columns: 52px minmax(0, 1fr);
    padding-right: 14px;
  }

  .item-shop-watch-action {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .item-shop-watch-action > * {
    flex: 1;
  }

  .item-shop-catalog-tools {
    display: grid;
  }
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: view-enter var(--motion-medium) both;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
}

.content .eyebrow {
  color: var(--teal);
}

.metric-grid,
.member-grid,
.guide-grid,
.character-grid,
.service-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.service-group {
  display: grid;
  gap: 12px;
}

#serviceBoard {
  grid-template-columns: 1fr;
}

.service-group-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.service-filter-row {
  justify-content: flex-start;
  margin-bottom: 14px;
}

.service-info-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 16px;
  border-color: color-mix(in srgb, var(--line) 70%, var(--gold));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--panel) 88%, var(--teal)), var(--panel));
}

.service-info-panel p {
  margin: 0;
}

.service-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.service-summary-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 92%, var(--teal));
}

.service-summary-card .section-head {
  margin-bottom: 8px;
}

.service-summary-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-summary-card li {
  min-width: 0;
}

.service-summary-link {
  display: grid;
  width: 100%;
  min-height: 0;
  gap: 2px;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.service-summary-link:hover {
  color: var(--teal);
  transform: none;
  box-shadow: none;
}

.service-summary-more {
  width: fit-content;
  min-height: 0;
  margin-top: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
}

.service-summary-card span,
.service-summary-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-card-tags,
.service-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.service-meta-row {
  justify-content: space-between;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.service-card-actions {
  justify-content: flex-end;
}

.service-admin-delete {
  min-height: 30px;
  padding: 5px 9px;
  border-color: color-mix(in srgb, var(--danger) 42%, var(--line));
  border-radius: 999px;
  color: color-mix(in srgb, var(--danger) 70%, var(--ink));
  background: color-mix(in srgb, var(--panel) 90%, var(--danger));
  font-size: 0.76rem;
  letter-spacing: 0;
  white-space: nowrap;
}

.service-status-tag {
  background: color-mix(in srgb, var(--teal) 24%, transparent);
  border-color: color-mix(in srgb, var(--teal) 54%, var(--line));
}

.service-own-request {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--teal) 42%, var(--line));
  border-radius: 8px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 92%, var(--teal));
}

.service-own-request span:not(.tag) {
  min-width: min(260px, 100%);
  flex: 1;
}

.service-own-request button {
  min-height: 34px;
  padding: 7px 11px;
}

.upgraded-service-card {
  display: grid;
  gap: 12px;
  min-height: 224px;
}

.service-card-offer {
  border-color: color-mix(in srgb, var(--teal) 38%, var(--line));
}

.service-card-search {
  border-color: color-mix(in srgb, var(--green) 38%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--panel) 94%, var(--green)), var(--panel));
}

.upgraded-service-card h3 {
  margin-bottom: 4px;
}

.upgraded-service-card.highlight-jump {
  animation: service-jump-highlight 1.2s ease both;
}

.service-preview-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px dashed color-mix(in srgb, var(--teal) 58%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 90%, var(--teal));
}

.service-preview-card h4,
.service-preview-card p {
  margin: 0;
}

.metric,
.panel,
.member-card,
.guide-card,
.character-card,
.instance-card,
.service-card,
.application-card,
.profile-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(24, 31, 34, 0.07);
}

.metric {
  padding: 18px;
}

.dashboard-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-layout {
  display: grid;
  gap: 16px;
}

.dashboard-metric {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  border-color: color-mix(in srgb, var(--line) 76%, var(--teal));
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--panel) 92%, var(--teal)), var(--panel) 64%);
}

.dashboard-metric::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -34px;
  width: 92px;
  height: 92px;
  border: 1px solid color-mix(in srgb, var(--teal) 34%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--teal) 10%, transparent);
}

.metric span {
  color: var(--muted);
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 8px;
  color: var(--teal);
  font-size: 2rem;
}

.public-intro {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.dashboard-spotlight {
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  align-items: stretch;
  border-color: color-mix(in srgb, var(--teal) 42%, var(--line));
  background:
    radial-gradient(circle at 88% 12%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 28%),
    linear-gradient(135deg, color-mix(in srgb, var(--panel) 88%, var(--teal)), color-mix(in srgb, var(--panel) 96%, var(--gold)));
  box-shadow: 0 18px 42px rgba(24, 31, 34, 0.1);
}

.public-intro h3 {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.public-intro p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.6;
}

.dashboard-guest-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.dashboard-guest-actions a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

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

.dashboard-tool-card {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 9px;
  min-height: 132px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--teal));
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--panel) 88%, var(--teal)), color-mix(in srgb, var(--panel) 96%, var(--gold)));
  font-weight: 900;
  overflow: hidden;
  text-decoration: none;
  transition: transform var(--motion-fast), border-color var(--motion-fast), background var(--motion-fast);
}

.dashboard-tool-card::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -30px;
  width: 76px;
  height: 76px;
  border: 1px solid color-mix(in srgb, var(--gold) 32%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 10%, transparent);
}

.dashboard-tool-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--teal) 62%, var(--line));
  background: color-mix(in srgb, var(--panel) 84%, var(--teal));
}

.dashboard-tool-card span {
  color: var(--teal);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-tool-card strong {
  position: relative;
  z-index: 1;
  font-size: 1.05rem;
  line-height: 1.2;
}

.dashboard-tool-card small {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.dashboard-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.dashboard-link {
  display: grid;
  gap: 7px;
  min-height: 104px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, var(--teal));
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(24, 31, 34, 0.07);
}

.dashboard-link:hover {
  border-color: var(--teal);
  background: color-mix(in srgb, var(--panel) 92%, var(--teal));
}

.dashboard-link span {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.dashboard-link strong {
  align-self: end;
  line-height: 1.35;
}

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

.dashboard-panel {
  min-height: 260px;
  border-color: color-mix(in srgb, var(--line) 84%, var(--teal));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 93%, var(--teal)), var(--panel) 62%);
}

.dashboard-panel h3 {
  margin: 0;
}

.dashboard-panel-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
}

.dashboard-panel-title .eyebrow {
  margin-bottom: 3px;
}

.dashboard-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: color-mix(in srgb, var(--panel) 94%, var(--teal));
  text-align: left;
}

.dashboard-event:hover {
  border-color: var(--teal);
  background: color-mix(in srgb, var(--panel) 88%, var(--teal));
  box-shadow: 0 12px 24px rgba(24, 31, 34, 0.1);
  transform: translateY(-1px);
}

.dashboard-event div {
  display: grid;
  gap: 5px;
}

.dashboard-event span,
.dashboard-event small {
  color: var(--muted);
  font-weight: 800;
}

.dashboard-settings-dialog {
  width: min(560px, calc(100vw - 24px));
}

.dashboard-settings-list {
  display: grid;
  gap: 10px;
}

.dashboard-setting-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 94%, var(--teal));
}

.dashboard-setting-row strong {
  display: block;
}

.dashboard-setting-row small {
  color: var(--muted);
  font-weight: 800;
}

.dashboard-setting-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.dashboard-setting-actions button {
  min-width: 38px;
  padding: 8px 10px;
}

.panel,
.profile-card {
  padding: 20px;
}

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

.stack,
.notice-list,
.instance-list,
.application-list,
.tournament-list {
  display: grid;
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.rich-editor {
  display: grid;
  gap: 10px;
}

.rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rich-editor-toolbar button {
  min-height: 36px;
  padding: 8px 10px;
}

.rich-editor-area {
  min-height: 220px;
  max-height: 46vh;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 92%, var(--paper));
  line-height: 1.6;
  outline: none;
}

.rich-editor-area:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 20%, transparent);
}

.dashboard-news-body {
  display: grid;
  gap: 10px;
  line-height: 1.65;
}

.dashboard-news-body > :first-child {
  margin-top: 0;
}

.dashboard-news-body > :last-child {
  margin-bottom: 0;
}

.dashboard-news-body h2,
.dashboard-news-body h3 {
  margin: 4px 0 0;
}

.dashboard-news-body p,
.dashboard-news-body ul,
.dashboard-news-body ol {
  margin: 0;
}

.character-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(232, 243, 241, 0.55);
}

[data-theme="dark"] .character-form {
  background: rgba(32, 59, 62, 0.45);
}

.character-form button {
  align-self: end;
}

.wiki-toolbar {
  display: grid;
  gap: 14px;
  margin: 0 0 16px;
  padding: 14px;
  border-color: color-mix(in srgb, var(--line) 78%, var(--teal));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--panel) 94%, var(--teal)), var(--panel));
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 10px;
  align-items: center;
}

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

.advanced-filters {
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  padding-top: 8px;
}

.advanced-filters summary {
  width: fit-content;
  cursor: pointer;
  color: var(--teal);
  font-weight: 1000;
}

.advanced-filter-row {
  margin-top: 10px;
}

.stat-search {
  grid-column: span 2;
  min-width: 220px;
}

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

.segment {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 12px;
  color: var(--ink);
  background: var(--panel);
  font-weight: 800;
}

.segment.active,
.segment:hover {
  color: var(--light-text);
  background: var(--teal);
  border-color: color-mix(in srgb, var(--teal) 70%, var(--light-text));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--teal) 20%, transparent);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

input,
textarea,
select,
.search,
.number-filter {
  width: 100%;
  border: 1px solid #d9cfbb;
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fffaf0;
}

.stats-workbench {
  display: grid;
  gap: 16px;
}

.stats-start-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

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

.stats-start-panel h3,
.stats-start-panel p {
  margin: 0;
}

.stats-start-panel > div:first-child {
  display: grid;
  gap: 8px;
}

.stats-start-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.active-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.active-filter-row[hidden] {
  display: none;
}

.active-filter-chip {
  min-height: 30px;
  padding: 5px 9px;
  border-color: color-mix(in srgb, var(--teal) 55%, var(--line));
  color: var(--teal);
  background: color-mix(in srgb, var(--panel) 86%, var(--teal));
  font-size: 0.78rem;
  font-weight: 1000;
}

.active-filter-chip b {
  margin-left: 6px;
  color: var(--gold);
}

.stats-result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px 0;
}

.stats-result-footer p {
  margin: 0;
  font-weight: 900;
}

.compare-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, var(--teal));
  border-radius: 8px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 94%, var(--teal));
  font-weight: 900;
}

.compare-status::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--muted) 14%, transparent);
}

.compare-status[data-compare-state="ready"]::before,
.compare-status[data-compare-state="multi"]::before {
  background: var(--green);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 16%, transparent);
}

.compare-status[data-compare-state="partial"]::before {
  background: var(--gold);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 18%, transparent);
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select,
[data-theme="dark"] .search,
[data-theme="dark"] .number-filter {
  border-color: #385052;
  color: var(--ink);
  background: #111c1e;
}

textarea {
  resize: vertical;
}

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

.member-card,
.guide-card,
.character-card,
.instance-card,
.service-card,
.application-card {
  padding: 16px;
}

.guide-card {
  display: grid;
  gap: 12px;
  align-content: start;
  overflow: hidden;
}

.guide-card h3,
.guide-card p,
.guide-empty h3,
.guide-empty p {
  margin: 0;
}

.guide-card > p {
  color: var(--muted);
  line-height: 1.55;
}

.guide-image,
.guide-image-placeholder {
  display: grid;
  min-height: 150px;
  place-items: center;
  margin: -16px -16px 2px;
  color: var(--muted);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--teal) 20%, transparent), color-mix(in srgb, var(--panel-strong) 94%, black)),
    var(--panel-strong);
  background-position: center;
  background-size: cover;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.guide-empty {
  grid-column: 1 / -1;
  padding: 18px;
}

.member-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(560px, 100%);
}

.member-toolbar .search {
  min-width: 0;
}

.member-toolbar button {
  white-space: nowrap;
}

.member-filter-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr)) minmax(140px, auto) repeat(2, minmax(105px, 0.7fr)) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  border-color: color-mix(in srgb, var(--line) 82%, var(--teal));
  background: color-mix(in srgb, var(--panel) 94%, var(--teal));
}

.member-filter-panel .checkbox-line {
  min-height: 42px;
  align-items: center;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--paper) 78%, var(--panel));
  white-space: nowrap;
}

.member-filter-panel button {
  white-space: nowrap;
}

.member-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 176px;
  text-align: left;
}

.member-open {
  display: grid;
  gap: 8px;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  box-shadow: none;
  appearance: none;
}

.member-open:hover {
  color: var(--teal);
  transform: none;
  box-shadow: none;
}

.member-card-body {
  display: grid;
  gap: 4px;
}

.member-card-body h3,
.member-card-body p {
  margin: 0;
}

.member-card-body p {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-admin-menu {
  position: relative;
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  padding-top: 8px;
}

.member-admin-menu summary {
  width: fit-content;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  color: var(--teal);
  background: color-mix(in srgb, var(--panel) 88%, var(--teal));
  font-size: 0.78rem;
  font-weight: 1000;
  list-style: none;
}

.member-admin-menu summary::-webkit-details-marker {
  display: none;
}

.member-actions {
  display: grid;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 96%, var(--paper));
}

.member-actions button {
  display: grid;
  gap: 2px;
  justify-items: start;
  min-height: 0;
  width: 100%;
  padding: 8px 10px;
  border-radius: 7px;
  text-align: left;
}

.member-actions button span {
  font-size: .78rem;
  font-weight: 1000;
}

.member-actions button small {
  color: color-mix(in srgb, currentColor 70%, var(--muted));
  font-size: .68rem;
  font-weight: 800;
  line-height: 1.25;
}

.danger-tag {
  background: var(--danger);
  color: #fff;
}

.ban-list-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.ban-list {
  display: grid;
  gap: 10px;
}

.ban-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 92%, var(--danger));
}

.ban-list-row p,
.ban-list-row small {
  margin: 3px 0 0;
  color: var(--muted);
}

.ban-list-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.admin-log-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.admin-log-list {
  display: grid;
  gap: 12px;
}

.admin-log-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.admin-log-entry h3,
.admin-log-entry p {
  margin: 0;
}

.admin-log-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-log-entry pre {
  grid-column: 1 / -1;
  margin: 0;
  max-height: 180px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 92%, black);
  white-space: pre-wrap;
}

.avatar {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  color: var(--light-text);
  background: var(--teal);
  font-weight: 900;
}

.avatar-image {
  overflow: hidden;
}

.avatar-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-detail-avatar {
  width: 72px;
  height: 72px;
  font-size: 1.25rem;
}

.own-profile-card {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.own-profile-head {
  display: flex;
  gap: 16px;
  align-items: center;
}

.own-profile-head h2,
.own-profile-head p,
.profile-bio {
  margin: 0;
}

.member-detail-profile {
  display: grid;
  gap: 18px;
}

.member-detail-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, auto);
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--teal) 14%, transparent), transparent 55%),
    color-mix(in srgb, var(--panel-strong) 90%, black);
}

.member-detail-title {
  display: grid;
  gap: 8px;
}

.member-detail-title h2,
.member-detail-title p {
  margin: 0;
}

.member-main-highlight {
  display: grid;
  gap: 5px;
  border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line));
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--gold) 12%, transparent);
}

.member-main-highlight span,
.member-detail-stats small {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.member-main-highlight strong {
  color: var(--light-text);
  font-size: 1.1rem;
}

.member-main-highlight small {
  color: var(--muted);
  font-weight: 900;
}

.member-detail-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.member-detail-stats span,
.member-detail-bio {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--panel) 88%, black);
}

.member-detail-stats strong {
  display: block;
  color: var(--light-text);
  font-size: 1.25rem;
  line-height: 1.2;
}

.member-detail-stats small {
  display: block;
  margin-top: 4px;
  font-size: .76rem;
}

.member-detail-bio {
  display: grid;
  gap: 8px;
}

.member-detail-bio p,
.member-character-head {
  margin: 0;
}

.profile-editor {
  display: grid;
  gap: 18px;
}

.profile-avatar-editor {
  display: grid;
  grid-template-columns: 150px minmax(220px, 1fr);
  gap: 14px;
  align-items: end;
}

.profile-avatar-preview {
  width: 150px;
  min-height: 150px;
  border-radius: 50%;
}

.checkbox-line {
  display: flex;
  align-items: center;
  align-self: end;
  min-height: 42px;
  color: var(--text);
}

.checkbox-line input {
  width: auto;
}

.form-message {
  align-self: center;
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.form-message[data-tone="success"] {
  color: var(--green);
  animation: status-pop 260ms ease both;
}

.form-message[data-tone="error"] {
  color: #f87171;
  animation: status-pop 260ms ease both;
}

#contactDialogMessage:not(:empty) {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 10px 12px;
  border: 1px solid rgba(248, 113, 113, 0.38);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 88%, #ef4444);
  box-shadow: 0 -8px 18px rgba(0, 0, 0, 0.16);
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.privacy-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line));
  border-radius: 8px;
  color: var(--text);
  background: color-mix(in srgb, var(--panel) 90%, var(--gold));
  font-weight: 900;
}

.request-list {
  display: grid;
  gap: 12px;
}

.request-intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.45fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  border-color: color-mix(in srgb, var(--teal) 38%, var(--line));
  background:
    radial-gradient(circle at 96% 12%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 30%),
    linear-gradient(135deg, color-mix(in srgb, var(--panel) 90%, var(--teal)), var(--panel));
}

.request-intro-panel h3,
.request-intro-panel p {
  margin: 0;
}

.request-intro-panel h3 {
  margin-bottom: 8px;
}

.request-intro-steps {
  display: grid;
  gap: 8px;
}

.request-intro-steps span,
.request-meta-row span,
.application-meta-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 92%, var(--teal));
  font-size: 0.84rem;
  font-weight: 900;
}

.admin-request-intro {
  grid-template-columns: 1fr;
}

.request-row {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 94%, var(--teal));
}

.request-row > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.request-row .service-request-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.request-row .service-request-actions button {
  min-height: 34px;
  padding: 8px 12px;
}

.request-row p,
.request-row small {
  margin: 0;
}

.request-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 96%, var(--teal));
}

.admin-request-card,
.application-review-card {
  border-color: color-mix(in srgb, var(--line) 76%, var(--teal));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--panel) 94%, var(--teal)), var(--panel));
}

.request-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.request-summary-main {
  display: grid;
  gap: 4px;
}

.request-meta-row,
.application-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.request-message {
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 94%, black);
}

.request-admin-actions,
.application-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.request-actions {
  justify-content: flex-start;
}

.request-empty-state {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px dashed color-mix(in srgb, var(--teal) 52%, var(--line));
  border-radius: 8px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 92%, var(--teal));
}

.request-empty-state h3,
.request-empty-state p {
  margin: 0;
}

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-list.trash [data-open-notification],
.notification-list.trash [data-read-notification],
.notification-list.trash .tag {
  display: none;
}

.notification-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 95%, var(--teal));
}

.notification-card.unread {
  border-color: color-mix(in srgb, var(--teal) 72%, var(--line));
}

.notification-card.read {
  opacity: 0.74;
}

.notification-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.notification-card p,
.notification-card small {
  margin: 0;
}

.request-card header div {
  display: grid;
  gap: 4px;
}

.request-card span,
.request-card small {
  color: var(--muted);
  font-weight: 800;
}

.request-card p {
  margin: 0;
  line-height: 1.5;
}

.profile-character {
  position: relative;
  display: grid;
  gap: 12px;
  overflow: hidden;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.profile-character:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--teal) 54%, var(--line));
  box-shadow: 0 10px 28px rgba(29, 36, 38, 0.12);
}

[data-theme="dark"] .profile-character:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.profile-character header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
}

.profile-character header > div {
  min-width: 0;
}

.profile-character strong {
  display: block;
  overflow-wrap: anywhere;
}

.profile-character p {
  margin: 3px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.profile-character.main-character {
  border-color: color-mix(in srgb, var(--gold) 72%, var(--line));
  background: color-mix(in srgb, var(--panel) 92%, var(--gold));
}

.profile-character.guest-guild {
  border-style: dashed;
}

.main-character-ribbon {
  position: absolute;
  top: 10px;
  right: -30px;
  width: 112px;
  padding: 3px 0;
  transform: rotate(34deg);
  color: #34260a;
  background: var(--gold);
  font-size: 0.68rem;
  font-weight: 1000;
  text-align: center;
  text-transform: uppercase;
}

.character-level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 32px;
  border: 1px solid color-mix(in srgb, var(--teal) 54%, var(--line));
  border-radius: 999px;
  color: var(--teal);
  background: color-mix(in srgb, var(--paper) 78%, var(--teal));
  font-size: 0.82rem;
  font-weight: 1000;
  white-space: nowrap;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--light-text);
  background: var(--violet);
  font-size: 0.82rem;
  font-weight: 800;
}

.tag:is(a) {
  text-decoration: none;
}

.service-request-link:hover {
  filter: brightness(1.08);
}

.tag.gold {
  background: var(--gold);
  color: #34260a;
}

.guild-tag.main-guild {
  background: var(--teal);
}

.guild-tag.second-guild {
  color: #34260a;
  background: color-mix(in srgb, var(--gold) 74%, var(--teal));
}

.guild-tag.guest-guild {
  color: var(--ink);
  background: color-mix(in srgb, var(--muted) 18%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--muted) 45%, var(--line));
}

.character-actions {
  padding-top: 4px;
}

.character-empty {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 84%, var(--paper));
}

.tag.item-rarity {
  border: 1px solid var(--item-color, var(--gold));
  color: var(--item-text, #fff);
  background: color-mix(in srgb, var(--item-color, var(--gold)) 72%, #050505);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--item-color, var(--gold)) 55%, transparent);
}

[data-theme="dark"] .tag.gold {
  color: #fff7d8;
  background: #765b23;
}

.tag.green {
  background: var(--green);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.button-row .secondary.active {
  background: var(--teal);
  border-color: color-mix(in srgb, var(--teal) 70%, white);
  color: #fff;
}

.back {
  margin-bottom: 16px;
  color: var(--teal);
  background: #e8f3f1;
}

[data-theme="dark"] .back {
  background: #203b3e;
}

.instance-card header,
.tournament-card header,
.service-card header,
.application-card header,
.guide-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.application-card {
  display: grid;
  gap: 12px;
}

.application-own-card {
  border-color: color-mix(in srgb, var(--gold) 46%, var(--line));
  background:
    radial-gradient(circle at 94% 16%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 28%),
    var(--panel);
}

.application-admin-note {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 94%, var(--teal));
}

.application-admin-note label {
  display: grid;
  gap: 6px;
}

.application-admin-note textarea {
  min-height: 88px;
}

.application-empty-state {
  margin-top: 12px;
}

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

.instance-signup-detail {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

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

.instance-signup-detail h4 {
  margin: 8px 0 0;
}

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

.instance-card-hero {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.instance-card-hero h3,
.instance-card-hero p {
  margin: 0;
}

.instance-card-hero h3 {
  margin-top: 4px;
}

.instance-card-body {
  display: grid;
  grid-template-columns: minmax(170px, 0.35fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.instance-capacity,
.instance-meta-pill {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--panel-strong) 90%, var(--teal));
}

.instance-capacity {
  display: grid;
  align-content: space-between;
  gap: 12px;
}

.instance-capacity strong {
  display: block;
  color: var(--light-text);
  font-size: 1.45rem;
  line-height: 1.1;
}

.instance-capacity span,
.instance-meta-pill small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.instance-capacity i {
  display: block;
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 80%, black);
}

.instance-capacity b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

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

.instance-meta-pill {
  display: grid;
  gap: 4px;
}

.instance-meta-pill strong {
  color: var(--light-text);
  overflow-wrap: anywhere;
}

.instance-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.instance-template-panel {
  margin-bottom: 18px;
}

.instance-template-list {
  display: grid;
  gap: 10px;
}

.instance-template-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 95%, var(--teal));
}

.instance-template-row p,
.instance-template-row small {
  margin: 4px 0 0;
  color: var(--muted);
}

.instance-evaluation {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--gold) 42%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 93%, var(--gold));
}

.calendar-board {
  display: grid;
  gap: 16px;
}

.instance-calendar-day {
  display: grid;
  gap: 12px;
}

.calendar-board > .instance-calendar-day {
  display: none;
}

.instance-calendar-dialog {
  width: min(720px, calc(100vw - 24px));
}

.instance-calendar-month {
  display: grid;
  gap: 12px;
}

.instance-calendar-weekdays,
.instance-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.instance-calendar-weekdays span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.instance-calendar-cell {
  display: grid;
  position: relative;
  min-height: 92px;
  align-content: start;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: color-mix(in srgb, var(--panel) 96%, var(--teal));
  text-align: left;
}

.instance-calendar-cell:hover {
  border-color: color-mix(in srgb, var(--teal) 70%, var(--line));
}

.instance-calendar-cell.muted-month {
  opacity: 0.45;
}

.instance-calendar-cell.today {
  border-color: color-mix(in srgb, var(--gold) 72%, var(--line));
}

.instance-calendar-cell.selected {
  box-shadow: inset 0 0 0 2px var(--teal);
}

.instance-calendar-cell.has-entry {
  border-color: color-mix(in srgb, var(--green) 72%, white);
  background: linear-gradient(135deg, color-mix(in srgb, var(--panel) 72%, var(--green)), color-mix(in srgb, var(--panel) 90%, var(--teal)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 55%, transparent), 0 0 22px color-mix(in srgb, var(--green) 18%, transparent);
}

.instance-calendar-cell span {
  font-weight: 900;
}

.instance-calendar-cell strong {
  font-size: 0.86rem;
}

.instance-calendar-cell small {
  color: var(--muted);
  font-weight: 800;
}

.calendar-run-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 2px;
  border-radius: 999px;
  padding: 3px 7px;
  color: #fff;
  background: color-mix(in srgb, var(--green) 78%, black);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.instance-calendar-list {
  display: grid;
  gap: 10px;
}

.instance-calendar-entry {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 95%, var(--teal));
}

.instance-calendar-entry header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.instance-calendar-entry p {
  margin: 4px 0 0;
  color: var(--muted);
}

.instance-eval-form {
  align-items: end;
}

.instance-eval-preview {
  min-height: 140px;
}

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

.check-card {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 96%, var(--teal));
  font-weight: 900;
}

.check-card.review-suggested {
  border-color: color-mix(in srgb, var(--green) 66%, var(--line));
  background: color-mix(in srgb, var(--panel) 88%, var(--green));
}

.check-card.review-reserve {
  border-color: color-mix(in srgb, var(--gold) 66%, var(--line));
  background: color-mix(in srgb, var(--panel) 90%, var(--gold));
}

.check-card small {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.check-card input {
  width: auto;
}

.evaluation-list {
  display: grid;
  gap: 10px;
}

.evaluation-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 96%, var(--teal));
}

.evaluation-card p {
  margin: 4px 0;
}

.evaluation-card span {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.evaluation-shot {
  width: 118px;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background-position: center;
  background-size: cover;
}

.small-button {
  padding: 8px 10px;
}

.instance-history {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.instance-history li {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--panel) 88%, var(--gold));
}

.instance-history span,
.instance-history small {
  color: var(--muted);
  font-weight: 800;
}

.class-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 88%, var(--teal));
}

.class-group header {
  align-items: center;
  justify-content: flex-start;
}

.class-group strong {
  display: block;
}

.class-group span:not(.class-icon):not(.tag) {
  color: var(--muted);
  font-weight: 800;
}

.class-icon {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid rgba(245, 217, 106, 0.7);
  border-radius: 8px;
  color: #f5d96a;
  background: radial-gradient(circle at 30% 25%, rgba(245, 217, 106, 0.22), rgba(7, 14, 15, 0.96));
  font-size: 0.78rem;
  font-weight: 1000;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.weapon-class-icon img,
.discord-class-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  image-rendering: auto;
}

.class-member-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.class-member-list li {
  display: grid;
  gap: 3px;
  padding: 7px 9px;
  border: 1px solid rgba(62, 143, 134, 0.32);
  border-radius: 6px;
  color: var(--text);
  background: color-mix(in srgb, var(--panel) 82%, var(--teal));
  font-weight: 900;
}

.class-member-list li span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

#instanceSignupOptional {
  min-height: 0;
}

.optional-class-picker {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 94%, var(--teal));
}

.optional-class-picker .section-head {
  margin-bottom: 0;
}

.optional-class-setter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.optional-class-setter.hidden {
  display: none;
}

.optional-class-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.optional-class-tag button {
  display: inline-grid;
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--light-text);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.75rem;
}

#tournamentSignupOptional {
  min-height: 96px;
}

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

.role-slot {
  border: 1px dashed #d4b86f;
  border-radius: 8px;
  padding: 10px;
  background: #fff8df;
}

[data-theme="dark"] .role-slot {
  background: #1d2a27;
}

.tournament-card {
  display: grid;
  gap: 14px;
  border-color: color-mix(in srgb, var(--teal) 45%, var(--line));
}

.tournament-card-hero {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.tournament-card-hero h3,
.tournament-card-hero p,
.tournament-empty h3,
.tournament-empty p {
  margin: 0;
}

.tournament-card-hero h3 {
  margin-top: 4px;
}

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

.tournament-meta-pill {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: color-mix(in srgb, var(--panel-strong) 90%, var(--teal));
}

.tournament-meta-pill small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.tournament-meta-pill strong {
  color: var(--light-text);
  overflow-wrap: anywhere;
}

.tournament-empty {
  padding: 18px;
}

.tournament-match {
  display: grid;
  gap: 10px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--panel) 92%, var(--teal)), var(--panel));
}

.tournament-match .section-head {
  margin-bottom: 0;
}

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

.battle-plan {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--line) 80%, var(--teal));
}

.battle-assignments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.battle-collector-panel {
  display: grid;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line));
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--panel) 92%, var(--gold));
}

.battle-plan-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.battle-plan-subhead p,
.battle-plan-subhead strong {
  margin: 0;
}

.collector-assignments .battle-flag-card {
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
  background: color-mix(in srgb, var(--panel) 90%, var(--gold));
}

.battle-flag-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 94%, var(--teal));
}

.battle-flag-card header,
.battle-player-list li,
.battle-unassigned {
  display: flex;
  align-items: center;
  gap: 8px;
}

.battle-flag-card header {
  justify-content: space-between;
}

.battle-player-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.battle-player-list li {
  min-height: 34px;
  justify-content: space-between;
}

.battle-player-list li > span {
  display: grid;
  flex: 1;
  min-width: 0;
}

.battle-player-list small {
  color: var(--muted);
  font-weight: 800;
}

.battle-add-player {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 900;
}

.battle-unassigned {
  flex-wrap: wrap;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.payout-form {
  align-items: end;
}

.payout-result:empty {
  display: none;
}

.payout-result-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.payout-result-hero h3,
.payout-result-hero p,
.payout-empty-state h3,
.payout-empty-state p {
  margin: 0;
}

.payout-paid-status {
  min-width: 126px;
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line));
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--panel) 88%, var(--gold));
  text-align: center;
}

.payout-paid-status strong {
  display: block;
  color: var(--light-text);
  font-size: 1.2rem;
}

.payout-paid-status span,
.payout-meta-pill small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.payout-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.payout-meta-pill {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: color-mix(in srgb, var(--panel-strong) 90%, var(--teal));
}

.payout-meta-pill strong {
  color: var(--light-text);
  overflow-wrap: anywhere;
}

.payout-empty-state {
  display: grid;
  gap: 8px;
}

.payout-actions {
  justify-content: flex-start;
  margin-bottom: 12px;
}

.payout-history-card header span {
  color: var(--muted);
  font-weight: 800;
}

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

.payout-share-list.compact {
  margin-top: 12px;
}

.payout-share-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(80px, max-content) minmax(150px, max-content);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--panel) 94%, var(--teal)), var(--panel));
  text-align: left;
}

button.payout-share-row {
  cursor: pointer;
}

.payout-share-row.paid {
  border-color: color-mix(in srgb, var(--green) 70%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--panel) 82%, var(--green)), color-mix(in srgb, var(--panel) 94%, var(--green)));
}

.payout-share-row span {
  color: var(--muted);
  font-weight: 800;
}

.payout-share-row b {
  justify-self: end;
}

.payout-export {
  margin-top: 12px;
}

.payout-export textarea,
.payout-discord-box {
  width: 100%;
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
}

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

.payout-history-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--panel) 96%, var(--gold)), color-mix(in srgb, var(--panel) 98%, var(--teal)));
  box-shadow: 0 12px 28px rgba(24, 31, 34, 0.08);
}

.payout-history-card.published {
  border-color: color-mix(in srgb, var(--green) 62%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--panel) 90%, var(--green)), color-mix(in srgb, var(--panel) 98%, var(--teal)));
}

.member-payout-card {
  border-color: color-mix(in srgb, var(--green) 48%, var(--line));
}

.payout-history-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
}

.payout-history-card header div {
  display: grid;
  gap: 4px;
}

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

.payout-modal-card {
  width: min(720px, calc(100vw - 24px));
}

.payout-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.payout-modal-meta span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 94%, var(--teal));
  font-size: 0.85rem;
  font-weight: 900;
}

.payout-modal-list {
  display: grid;
  max-height: min(56vh, 560px);
  gap: 8px;
  overflow: auto;
}

.payout-modal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 95%, var(--teal));
}

.payout-modal-row.paid {
  border-color: color-mix(in srgb, var(--green) 66%, var(--line));
  background: color-mix(in srgb, var(--panel) 88%, var(--green));
}

.payout-modal-row small {
  color: var(--muted);
  font-weight: 800;
}

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

.stats-table-wrap {
  border-color: color-mix(in srgb, var(--line) 82%, var(--teal));
  box-shadow: 0 16px 34px rgba(24, 31, 34, 0.08);
}

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

.link-button:hover {
  color: var(--gold);
}

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

.stats-table {
  min-width: 780px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.stats-table th,
.stats-table td {
  padding: 10px 9px;
  vertical-align: middle;
}

.stats-table tbody tr {
  transition: background 140ms ease, box-shadow 140ms ease;
}

.stats-table tbody tr:hover {
  background: color-mix(in srgb, var(--panel) 88%, var(--teal));
}

.stats-table th:first-child,
.stats-table td:first-child {
  width: 36%;
}

.stats-table th:last-child,
.stats-table td:last-child {
  width: 58px;
  min-width: 58px;
}

.stats-table th:nth-last-child(1),
.stats-table th:nth-last-child(2),
.stats-table td:nth-last-child(1),
.stats-table td:nth-last-child(2) {
  width: 64px;
  min-width: 58px;
  text-align: center;
}

.stats-table th:nth-child(5),
.stats-table td:nth-child(5) {
  width: 82px;
  text-align: center;
}

.stats-table td:nth-child(2),
.stats-table td:nth-child(3) {
  white-space: nowrap;
}

.action-group-head,
.action-subheads th {
  text-align: center;
}

.action-subheads th {
  padding-top: 8px;
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

th {
  color: var(--teal);
  background: #eef8f6;
}

.sort-head {
  width: 100%;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  font: inherit;
  font-weight: 900;
}

.sort-head::after {
  content: " \2195";
  color: var(--muted);
}

.sort-head.active[data-direction="asc"]::after {
  content: " ↑";
  color: var(--gold);
}

.sort-head.active[data-direction="desc"]::after {
  content: " ↓";
  color: var(--gold);
}

[data-theme="dark"] th {
  background: #1d3436;
}

.thumb {
  display: grid;
  width: 64px;
  height: 42px;
  place-items: center;
  border-radius: 6px;
  color: var(--light-text);
  background: linear-gradient(135deg, var(--teal), var(--gold));
  font-size: 0.75rem;
  font-weight: 900;
}

.stat-name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.stat-item-link {
  display: inline-flex;
  max-width: 100%;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.stat-item-link:hover .rarity-name {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rarity-name {
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.stat-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  object-fit: contain;
  border: 1px solid #b89537;
  background: #050505;
}

.set-configurator {
  min-width: 0;
  margin-top: 0;
  border-color: color-mix(in srgb, var(--line) 70%, var(--gold));
  background: var(--panel);
}

.set-configurator.collapsed {
  border-color: color-mix(in srgb, var(--line) 84%, var(--teal));
}

.set-configurator.collapsed .saved-set-list,
.set-configurator.collapsed .set-grid,
.set-configurator.collapsed .set-summary {
  display: none;
}

.set-configurator .section-head.compact {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 12px;
}

.set-actions {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) repeat(5, minmax(108px, max-content));
  align-items: center;
  justify-content: start;
}

.set-actions input {
  width: 100%;
}

.stat-plus-button {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(67, 182, 194, 0.5);
  border-radius: 7px;
  color: var(--ink);
  background: color-mix(in srgb, var(--panel) 72%, var(--teal));
  font-size: 1.05rem;
  font-weight: 1000;
}

.stat-action-button {
  width: auto;
  min-width: 76px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.stat-plus-button:hover {
  color: var(--light-text);
  background: var(--teal);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--teal) 24%, transparent);
}

.stat-plus-button.selected {
  border-color: rgba(74, 222, 128, 0.72);
  color: #fff;
  background: #22c55e;
}

.stat-plus-button.selected::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #dcfce7;
}

.stat-action-button.selected::before {
  display: none;
}

.repeatable-board {
  display: grid;
  gap: 14px;
}

.repeatable-filter-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.repeatable-filter-panel .tag {
  margin-left: auto;
}

.repeatable-sort-toggle {
  min-width: 92px;
}

.repeatable-card,
.repeatable-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--teal) 10%, transparent), transparent 52%),
    color-mix(in srgb, var(--panel) 94%, black);
}

.repeatable-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.repeatable-card h3,
.repeatable-card p,
.repeatable-empty h3,
.repeatable-empty p {
  margin: 0;
}

.repeatable-card h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.repeatable-card-actions {
  justify-content: flex-end;
}

.repeatable-card-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.repeatable-meta-pill {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: color-mix(in srgb, var(--panel-strong) 90%, var(--teal));
}

.repeatable-meta-pill small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.repeatable-meta-pill strong {
  color: var(--light-text);
  overflow-wrap: anywhere;
}

.repeatable-prequest-preview {
  align-content: start;
}

.repeatable-prequest-preview strong {
  display: grid;
  gap: 3px;
}

.repeatable-prequest-preview em {
  color: var(--teal);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 1000;
}

.repeatable-detail {
  width: min(1100px, calc(100vw - 32px));
  max-height: min(86vh, 920px);
  overflow: auto;
}

#repeatableDetailDialog {
  width: min(1120px, calc(100vw - 24px));
}

#repeatableDetailDialog::backdrop {
  background: rgba(1, 10, 12, 0.72);
}

.repeatable-detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.repeatable-detail-hero h3,
.repeatable-detail-hero p {
  margin: 0;
}

.repeatable-detail-hero h3 {
  margin-top: 4px;
}

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

.repeatable-info-card,
.repeatable-prequest-detail,
.repeatable-notes {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 90%, var(--teal));
}

.repeatable-info-card strong,
.repeatable-prequest-detail strong,
.repeatable-notes strong {
  display: block;
  color: var(--teal);
  margin-bottom: 4px;
}

.repeatable-info-card span,
.repeatable-notes p {
  margin: 0;
  overflow-wrap: anywhere;
}

.repeatable-prequest-detail {
  margin-top: 10px;
}

.repeatable-prequest-detail .repeatable-list {
  columns: 2;
  column-gap: 28px;
}

.repeatable-prequest-detail .repeatable-list li {
  break-inside: avoid;
}

.repeatable-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
}

.repeatable-list li + li {
  margin-top: 4px;
}

.repeatable-media {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.repeatable-media figure,
.repeatable-media-empty {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.repeatable-media img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #050505;
}

.repeatable-media figcaption,
.repeatable-media-empty {
  padding: 10px;
  color: var(--muted);
  font-weight: 900;
}

.repeatable-media-empty {
  display: grid;
  min-height: 118px;
  place-items: center;
  border-style: dashed;
}

.feedback-panel {
  max-width: 900px;
}

.feedback-admin-summary,
.feedback-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.feedback-card {
  display: grid;
  gap: 12px;
}

.feedback-card h3,
.feedback-card p,
.feedback-admin-summary h2 {
  margin: 0;
}

.feedback-card select {
  min-width: 130px;
}

.tag.danger-soft {
  background: rgba(175, 55, 59, 0.26);
  color: #ffd7d7;
  border-color: rgba(175, 55, 59, 0.55);
}

.section-head.compact {
  margin-bottom: 12px;
}

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

.saved-set-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.saved-set-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--gold));
  border-radius: 8px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 96%, var(--teal));
}

.saved-set-empty strong {
  color: var(--ink);
}

.saved-set-empty span {
  font-size: 0.9rem;
  font-weight: 800;
}

.saved-set {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 90%, var(--gold));
}

.saved-set span {
  color: var(--muted);
  font-weight: 800;
}

.set-item {
  display: grid;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--teal));
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--panel) 91%, var(--teal));
}

.set-item header,
.set-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.set-controls select {
  max-width: 86px;
}

.set-controls .secondary,
.set-controls .danger {
  min-height: 32px;
  padding: 7px 9px;
  font-size: 0.84rem;
}

.set-item dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.set-item dl div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
}

.set-item dt {
  color: var(--muted);
  font-weight: 900;
}

.set-item dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.set-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.compare-status {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--teal) 42%, var(--line));
  border-radius: 8px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 92%, var(--teal));
  font-weight: 800;
  font-size: 0.9rem;
}

.muted {
  color: var(--muted);
}

.clean-list {
  padding-left: 20px;
  line-height: 1.7;
}

.timeline p {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
}

.timeline span {
  color: var(--gold);
  font-weight: 900;
}

.qa-list {
  display: grid;
  gap: 10px;
}

.qa-list p {
  margin: 0;
  line-height: 1.55;
}

.flat {
  margin-top: 12px;
}

.hidden {
  display: none !important;
}

.stat-detail {
  position: relative;
  isolation: isolate;
  width: min(380px, calc(100vw - 24px));
  max-height: min(820px, calc(100vh - 24px));
  overflow-y: auto;
  padding: 0;
  border: 0;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.stat-detail.compare-detail {
  width: min(1180px, calc(100vw - 24px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.compare-header {
  margin: 0 0 10px;
  padding-right: 34px;
  color: var(--text);
}

.compare-header h3 {
  margin: 0;
}

.compare-help {
  margin: 8px 0 0;
  font-size: 0.9rem;
}

.compare-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.compare-title-row .secondary {
  min-height: 34px;
  padding: 7px 12px;
}

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

.compare-grid.two-item-compare {
  grid-template-columns: minmax(300px, 1fr) auto minmax(300px, 1fr);
  align-items: start;
}

.compare-slot {
  display: grid;
  gap: 6px;
}

.compare-slot-label {
  justify-self: start;
  padding: 5px 9px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 1000;
  letter-spacing: 0;
  text-transform: uppercase;
}

.compare-slot-label.base {
  color: #dbeafe;
  background: rgba(96, 165, 250, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.65);
}

.compare-slot-label.target {
  color: #dcfce7;
  background: rgba(74, 222, 128, 0.16);
  border: 1px solid rgba(74, 222, 128, 0.65);
}

.compare-arrow {
  align-self: center;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--gold) 64%, var(--line));
  border-radius: 999px;
  color: var(--gold);
  background: color-mix(in srgb, var(--panel) 88%, var(--gold));
  font-size: 1.35rem;
  font-weight: 1000;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--gold) 16%, transparent);
}

.compare-deltas {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--gold) 42%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--panel) 92%, var(--gold)), var(--panel));
  color: var(--text);
}

.compare-deltas strong {
  display: block;
  margin-bottom: 4px;
  color: var(--gold);
}

.compare-deltas > p {
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 800;
}

.compare-deltas div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.compare-delta {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid currentColor;
  border-radius: 8px;
  font-weight: 900;
  background: color-mix(in srgb, var(--panel-strong) 90%, transparent);
}

.compare-delta strong,
.compare-delta b,
.compare-delta small {
  color: inherit;
}

.compare-delta b {
  font-size: 1.08rem;
}

.compare-delta small {
  font-weight: 800;
  opacity: 0.82;
}

.compare-delta.better {
  color: #4ade80;
}

.compare-delta.worse {
  color: #f87171;
}

@keyframes view-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modal-enter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes backdrop-enter {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes status-pop {
  0% {
    opacity: 0;
    transform: translateY(4px);
  }

  70% {
    opacity: 1;
    transform: translateY(-1px);
  }

  100% {
    transform: translateY(0);
  }
}

@keyframes service-jump-highlight {
  0%,
  100% {
    border-color: var(--line);
    box-shadow: 0 10px 28px rgba(24, 31, 34, 0.07);
  }

  34%,
  72% {
    border-color: color-mix(in srgb, var(--gold) 82%, var(--teal));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 48%, transparent), 0 16px 32px color-mix(in srgb, var(--gold) 18%, transparent);
  }
}

@keyframes hero-content-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-title-settle {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes hero-title-sheen {
  0% {
    opacity: 0;
    transform: translateX(-120%);
  }

  20%,
  72% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(120%);
  }
}

@keyframes hero-actions-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }

  .compare-grid.two-item-compare {
    grid-template-columns: 1fr;
  }

  .compare-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.detail-grid p {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(232, 243, 241, 0.45);
}

[data-theme="dark"] .detail-grid p {
  background: rgba(32, 59, 62, 0.45);
}

.detail-grid strong {
  flex: 0 0 150px;
  color: var(--teal);
}

.detail-grid span {
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.tooltip-close {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 26px;
  height: 26px;
  border: 1px solid #6f5a20;
  border-radius: 4px;
  color: #f5d96a;
  background: #050505;
  font-weight: 900;
}

.item-tooltip {
  border: 2px solid #b89537;
  background:
    linear-gradient(rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.94)),
    image-set(url("assets/guild-hero.webp") type("image/webp"), url("assets/guild-hero.png") type("image/png")) center / cover;
  color: #f4f0dc;
  font-family: Arial, sans-serif;
  font-size: 0.93rem;
  line-height: 1.18;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.item-tooltip h3 {
  margin: 0;
  padding: 4px 6px 3px;
  color: #f4f000;
  font-size: 0.98rem;
  line-height: 1.1;
}

.tooltip-meta {
  padding: 5px 6px;
  border-top: 1px solid rgba(184, 149, 55, 0.28);
  border-bottom: 1px solid rgba(184, 149, 55, 0.28);
}

.tooltip-meta p,
.tooltip-stats p,
.tooltip-status {
  margin: 0;
}

.tooltip-stats {
  padding: 6px;
}

.tooltip-stats p {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.tooltip-stats span {
  color: #f4f0dc;
}

.tooltip-stats strong {
  color: #ffffff;
}

.tooltip-stats em {
  color: #00ff39;
  font-style: normal;
}

.tooltip-stats b {
  color: #ffe247;
  font-weight: 900;
}

.tooltip-status {
  padding: 5px 6px 7px;
  color: #b7b7b7;
  border-top: 1px solid rgba(184, 149, 55, 0.22);
  font-size: 0.78rem;
}

.tooltip-status.exact {
  color: #d7f9cf;
}

.tooltip-status.estimated {
  color: #ffd9a3;
}

dialog {
  width: min(720px, calc(100% - 24px));
  border: 0;
  border-radius: 12px;
  padding: 0;
  background: transparent;
}

dialog[open] {
  animation: modal-enter var(--motion-medium) both;
}

#statDialog {
  width: fit-content;
  max-width: calc(100% - 24px);
}

#statDialog::backdrop {
  background: rgba(5, 9, 10, 0.86);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

dialog::backdrop {
  background: rgba(12, 18, 20, 0.6);
}

dialog[open]::backdrop {
  animation: backdrop-enter var(--motion-medium) both;
}

.dialog-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.icon-button {
  width: 42px;
  padding: 0;
  background: #f3ead8;
}

.icon-only {
  display: inline-grid;
  width: 42px;
  padding: 0;
  place-items: center;
  font-size: 1.05rem;
}

.design-dialog {
  width: min(520px, calc(100vw - 24px));
}

.confirm-dialog {
  width: min(500px, calc(100vw - 24px));
}

.confirm-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-line;
}

.confirm-actions {
  justify-content: flex-end;
}

.request-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

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

details.request-card [data-delete-contact-request] {
  display: none;
}

.ticket-chat {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.ticket-messages {
  display: grid;
  gap: 10px;
}

.ticket-message {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 92%, var(--teal));
}

.ticket-message.admin {
  background: color-mix(in srgb, var(--panel) 88%, var(--gold));
}

.ticket-message header,
.ticket-reply {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ticket-message p {
  margin: 0;
}

.ticket-reply textarea {
  min-height: 46px;
  resize: vertical;
}

.ticket-reply button {
  align-self: stretch;
}

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

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

.mode-choice,
.accent-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: color-mix(in srgb, var(--panel) 94%, var(--teal));
  font-weight: 900;
  text-align: left;
}

.accent-choice {
  justify-content: flex-start;
}

.accent-choice span {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--line) 78%, transparent);
}

.accent-swatch-teal {
  background: #177f8f;
}

.accent-swatch-rose {
  background: #d45c91;
}

.accent-swatch-red {
  background: #c55353;
}

.accent-swatch-green {
  background: #4f8a57;
}

.accent-swatch-violet {
  background: #7561b8;
}

.accent-swatch-gold {
  background: #d9a441;
}

.mode-choice.active,
.accent-choice.active {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 24%, transparent);
  transform: translateY(-1px);
}

.custom-accent {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(130px, 1fr) max-content;
  gap: 10px;
  align-items: end;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.custom-accent input[type="color"] {
  width: 100%;
  min-height: 44px;
  padding: 4px;
}

[data-theme="dark"] .icon-button {
  color: var(--ink);
  background: #253538;
}

.image-preview {
  display: grid;
  min-height: 160px;
  place-items: center;
  border: 1px dashed #d4b86f;
  border-radius: 8px;
  color: var(--muted);
  background: #fff8df center / cover;
  font-weight: 800;
}

.image-preview:focus {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

[data-theme="dark"] .image-preview {
  background-color: #1d2a27;
}

.app-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10050;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid rgba(75, 211, 225, 0.42);
  border-radius: 8px;
  background: rgba(14, 36, 36, 0.96);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
  color: var(--text);
  font-weight: 800;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

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

body[data-preview="repeatables"] {
  min-height: 100vh;
}

.preview-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.preview-list {
  display: grid;
  gap: 14px;
}

.preview-card {
  display: grid;
  gap: 12px;
}

.preview-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.preview-card h3 {
  margin: 0;
}

.preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-info {
  white-space: pre-wrap;
}

.preview-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.preview-toolbar .form-grid {
  grid-template-columns: 1fr 150px 150px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 820px), (update: slow) {
  .hero::before {
    animation: none;
    transform: none;
    will-change: auto;
  }
}

@media (max-width: 820px) {
  .hero {
    min-height: 500px;
  }

  .topbar,
  .section-head,
  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-actions > * {
    width: 100%;
    min-width: 0;
  }

  .profile-avatar-editor {
    grid-template-columns: 1fr;
  }

  .profile-avatar-preview {
    justify-self: center;
  }

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

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

  .two-column,
  .dashboard-spotlight,
  .dashboard-metrics,
  .dashboard-links,
  .public-info-grid,
  .request-intro-panel,
  .custom-accent,
  .form-grid,
  .character-form,
  .wiki-toolbar,
  .filter-row,
  .set-configurator .section-head.compact,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .stat-search {
    min-width: 0;
  }

  .set-actions {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .set-actions input,
  .set-actions button,
  .filter-row button {
    width: 100%;
  }

  .payout-share-row {
    grid-template-columns: 1fr;
  }

  .payout-share-row b {
    justify-self: start;
  }

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

  .evaluation-shot {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .preview-card__top,
  .preview-toolbar .form-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .service-info-panel,
  .service-meta-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .service-summary-grid {
    grid-template-columns: 1fr;
  }

  .stats-start-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats-start-actions {
    justify-content: flex-start;
  }

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

  .repeatable-card-actions {
    justify-content: flex-start;
  }

  .repeatable-detail-hero {
    flex-direction: column;
  }

  .repeatable-info-grid {
    grid-template-columns: 1fr;
  }

  .repeatable-prequest-detail .repeatable-list {
    columns: 1;
  }

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

  .instance-card-hero {
    flex-direction: column;
  }

  .tournament-card-hero {
    flex-direction: column;
  }

  .payout-result-hero {
    flex-direction: column;
  }

  .payout-paid-status {
    width: 100%;
    text-align: left;
  }

  .member-filter-panel {
    grid-template-columns: 1fr;
  }

  .member-detail-hero {
    grid-template-columns: 1fr;
    justify-items: start;
  }
}

@media (max-width: 520px) {
  .shell,
  .layout {
    width: min(100% - 20px, 1180px);
  }

  .hero h1 {
    font-size: 2.5rem;
  }

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

  .stats-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .stats-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  .stats-table thead {
    display: none;
  }

  .stats-table tbody,
  .stats-table tr,
  .stats-table td {
    display: block;
    width: 100%;
  }

  .stats-table tbody tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: color-mix(in srgb, var(--panel) 94%, black);
  }

  .stats-table th:first-child,
  .stats-table td:first-child,
  .stats-table th:last-child,
  .stats-table td:last-child,
  .stats-table th:nth-last-child(1),
  .stats-table th:nth-last-child(2),
  .stats-table td:nth-last-child(1),
  .stats-table td:nth-last-child(2),
  .stats-table th:nth-child(5),
  .stats-table td:nth-child(5) {
    width: auto;
    min-width: 0;
    text-align: left;
  }

  .stats-table td {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    border-bottom: 0;
    padding: 6px 0;
  }

  .stats-table td:first-child {
    display: block;
    padding-bottom: 10px;
  }

  .stats-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: .04em;
  }

  .stats-table td:first-child::before {
    display: none;
  }

  .stats-table .stat-action-button {
    justify-self: start;
    min-width: 112px;
  }
}
