:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #617080;
  --line: #d9e2ec;
  --paper: #f5f7f9;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-soft: rgba(251, 252, 253, 0.88);
  --input-bg: rgba(255, 255, 255, 0.96);
  --page-scrim: rgba(245, 247, 249, 0.58);
  --sidebar-bg: #172026;
  --sidebar-text: #eef5f3;
  --sidebar-muted: #b9c6c3;
  --sidebar-active: #243139;
  --sidebar-line: #3b4d56;
  --accent: #2f6f73;
  --accent-strong: #224f52;
  --gold: #b8860b;
  --rose: #a43d4f;
  --blue: #3767a6;
  --info-bg: #e7effa;
  --info-text: #244d80;
  --success-bg: #e9f6f2;
  --success-text: #1f6a50;
  --warning-bg: #fff3cd;
  --warning-text: #6b4a00;
  --danger-bg: #f8e8ec;
  --danger-text: #8f3043;
  --purple-bg: #f4edf7;
  --purple-text: #684174;
  --result-bg: #172026;
  --result-text: #ffffff;
  --result-muted: #b9c6c3;
  --drop-bg: #f7fbfc;
  --shadow: 0 18px 50px rgba(31, 41, 51, 0.12);
}

body[data-theme="night"] {
  color-scheme: dark;
  --ink: #edf4f2;
  --muted: #a7b8c2;
  --line: #32444d;
  --paper: #10171c;
  --panel: rgba(24, 34, 41, 0.9);
  --panel-soft: rgba(32, 44, 52, 0.88);
  --input-bg: rgba(18, 27, 33, 0.96);
  --page-scrim: rgba(5, 10, 14, 0.68);
  --sidebar-bg: #0b1116;
  --sidebar-text: #f0f7f5;
  --sidebar-muted: #9db0ad;
  --sidebar-active: #1c2a32;
  --sidebar-line: #34474f;
  --accent: #58a6a9;
  --accent-strong: #78c2c5;
  --gold: #d0a441;
  --rose: #c85b70;
  --blue: #82aee6;
  --info-bg: #1d3450;
  --info-text: #b8d7ff;
  --success-bg: #183a32;
  --success-text: #a9e8d4;
  --warning-bg: #43350e;
  --warning-text: #f4d47a;
  --danger-bg: #482230;
  --danger-text: #f2b3c1;
  --purple-bg: #352540;
  --purple-text: #dfc0ed;
  --result-bg: #080d11;
  --result-text: #ffffff;
  --result-muted: #a7b8c2;
  --drop-bg: #152129;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(var(--page-scrim), var(--page-scrim)),
    url("assets/everquest-background.png.jpg") center / cover fixed,
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
}

.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  box-shadow: 18px 0 40px rgba(0, 0, 0, 0.2);
  height: 100vh;
  overflow-y: auto;
  position: sticky;
  top: 0;
}

.brand-block {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: block;
  object-fit: cover;
  object-position: center;
  background: var(--sidebar-active);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.brand-block h1,
.topbar h2,
.panel h3 {
  margin: 0;
}

.brand-block h1,
.topbar h2,
.action-band h3,
.page-intro h3,
.panel h3,
.rules-copy h4 {
  background: linear-gradient(180deg, #ffe58a 0%, #d8a62d 42%, #7a4a08 100%);
  background-clip: text;
  color: transparent;
  font-family: "Cinzel Decorative", "Cinzel", "Trajan Pro", Georgia, serif;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
  -webkit-background-clip: text;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.42), 0 0 12px rgba(216, 166, 45, 0.28);
}

.brand-block h1 {
  font-size: 1.26rem;
}

.brand-block p {
  margin: 4px 0 0;
  color: var(--sidebar-muted);
  line-height: 1.35;
  font-size: 0.92rem;
}

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

.nav-link {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--sidebar-text);
  font-family: "Cinzel Decorative", "Cinzel", "Trajan Pro", Georgia, serif;
  font-weight: 900;
  letter-spacing: 0;
  text-align: left;
  padding: 12px 14px;
  border-radius: 8px;
}

.nav-link:hover,
.nav-link.active {
  background: var(--sidebar-active);
  border-color: var(--sidebar-line);
}

.main-panel {
  padding: 28px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 800;
}

.topbar h2 {
  font-size: 2rem;
}

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

.account-menu {
  position: relative;
}

.account-status {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  font-size: 0.84rem;
  font-weight: 800;
  list-style: none;
  min-height: 42px;
  padding: 0 12px;
  user-select: none;
}

.account-status::-webkit-details-marker {
  display: none;
}

.account-status::after {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  content: "";
  margin-left: 10px;
}

.account-menu[open] .account-status {
  background: var(--input-bg);
  color: var(--ink);
}

.account-menu-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
  min-width: 190px;
  padding: 10px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
}

.account-menu-panel .ghost-button,
.account-menu-panel .file-button,
.account-menu-panel .role-badge {
  justify-content: center;
  width: 100%;
}

select {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 42px;
  padding: 0 10px;
  background: var(--input-bg);
}

.role-badge,
.role-chip {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 30px;
  padding: 4px 10px;
  white-space: nowrap;
}

.role-badge {
  background: var(--success-bg);
  color: var(--accent-strong);
}

.role-badge[data-role="guest"],
.role-chip[data-role="guest"] {
  background: var(--panel-soft);
  color: var(--muted);
}

.role-badge[data-role="member"],
.role-chip[data-role="member"] {
  background: var(--info-bg);
  color: var(--info-text);
}

.role-badge[data-role="administrator"],
.role-chip[data-role="administrator"] {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.action-band,
.page-intro {
  background: var(--panel);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px;
}

.action-band h3,
.page-intro h3 {
  margin: 0;
  font-size: 1.25rem;
}

.action-band p,
.page-intro p {
  color: var(--muted);
  line-height: 1.5;
  margin: 6px 0 0;
  max-width: 760px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-actions .action-band {
  margin-bottom: 0;
}

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

.presence-panel {
  align-content: start;
  display: grid;
}

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

.presence-meter {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 16px;
}

.presence-meter span {
  color: var(--muted);
  font-weight: 800;
}

.presence-meter strong {
  font-size: 2rem;
}

.guest-meter {
  background: var(--panel-soft);
}

.member-meter {
  background: var(--info-bg);
}

.metric-card,
.panel {
  background: var(--panel);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 20px;
}

.metric-card span,
.panel-heading span,
.roll-result span,
.empty-state span {
  color: var(--muted);
  font-size: 0.9rem;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 2.1rem;
}

.content-grid,
.split-layout,
.auction-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

#rosterView .split-layout {
  grid-template-columns: minmax(0, 1fr);
}

#accountView > .split-layout {
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 0.72fr) minmax(260px, 1fr);
}

.content-grid .panel:last-child {
  grid-column: 1 / -1;
}

.class-mains-panel {
  grid-column: 1 / -1;
}

.guild-counts-panel {
  grid-column: 1 / -1;
}

.panel {
  padding: 18px;
  min-width: 0;
}

.rules-panel {
  max-width: 980px;
}

.calendar-panel {
  min-height: calc(100vh - 150px);
}

.calendar-embed {
  min-height: 650px;
}

.calendar-embed iframe {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 650px;
  width: 100%;
}

.login-notes {
  margin-top: 18px;
}

.login-secondary {
  margin-top: 18px;
}

.account-summary-combo,
.account-character {
  align-items: center;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  padding: 12px;
}

.account-summary-combo {
  align-items: stretch;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
}

.account-card {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.account-card div,
.account-character span {
  display: grid;
  gap: 3px;
}

.account-card span,
.account-character small {
  color: var(--muted);
}

.account-character-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
}

.account-character,
.account-auction {
  justify-content: space-between;
}

.account-auctions-panel {
  margin-top: 18px;
}

.account-character-panel,
.member-accounts-panel {
  margin-top: 18px;
}

#accountView .account-character-panel {
  margin-top: 0;
}

.account-auction-list {
  display: grid;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 6px;
}

.account-auction {
  align-items: center;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  padding: 12px;
}

.account-auction span:first-child {
  display: grid;
  gap: 3px;
}

.account-auction small {
  color: var(--muted);
}

.messages-panel {
  min-height: 420px;
}

.message-list {
  display: grid;
  gap: 12px;
  max-height: 560px;
  overflow-y: auto;
  padding-right: 6px;
}

.message-item {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.message-header,
.message-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.message-item p {
  line-height: 1.45;
  margin: 0;
}

.message-item small,
.message-reply small {
  color: var(--muted);
}

.message-reply {
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.member-account-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
}

.member-account-item {
  align-items: center;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.member-account-item div {
  display: grid;
  gap: 4px;
}

.member-account-item small,
.member-account-item span {
  color: var(--muted);
}

.account-character .avatar {
  height: 38px;
  width: 38px;
}

.avatar-preview {
  align-items: center;
  border-right: 1px solid var(--line);
  display: flex;
  gap: 14px;
  padding-right: 14px;
}

.avatar-preview-frame {
  border: 1px solid var(--line);
  border-radius: 50%;
  height: 96px;
  overflow: hidden;
  position: relative;
  width: 96px;
}

.avatar-preview-frame .avatar {
  border: 0;
  border-radius: 0;
  height: 100%;
  width: 100%;
}

.avatar-preview span {
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 1200px) {
  .account-summary-combo {
    grid-template-columns: 1fr;
  }

  .avatar-preview {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    justify-content: flex-start;
    padding-bottom: 14px;
    padding-right: 0;
  }
}

.rules-copy {
  display: grid;
  gap: 14px;
}

.rules-copy p {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0;
}

.rules-copy h4 {
  border-top: 1px solid var(--line);
  font-size: 1.05rem;
  margin: 8px 0 0;
  padding-top: 18px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-actions {
  align-items: center;
  display: flex;
  gap: 12px;
}

.form-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

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

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--input-bg);
}

textarea {
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 130px;
  padding: 11px 12px;
  resize: vertical;
  width: 100%;
}

input[type="range"] {
  accent-color: var(--accent);
  padding: 0;
}

select:disabled,
input:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

input:focus {
  outline: 3px solid rgba(47, 111, 115, 0.18);
  border-color: var(--accent);
}

.compact-input {
  max-width: 220px;
}

.primary-button,
.ghost-button,
.primary-link,
.ghost-link,
.danger-button,
.text-button {
  border-radius: 8px;
  border: 1px solid transparent;
  min-height: 42px;
  padding: 0 14px;
  font-weight: 800;
}

.primary-button {
  color: #fff;
  background: var(--accent);
}

.primary-link {
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  padding: 0 16px;
  text-decoration: none;
  white-space: nowrap;
}

.primary-button:hover,
.primary-link:hover {
  background: var(--accent-strong);
}

.ghost-button,
.ghost-link {
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  background: var(--input-bg);
  border-color: var(--line);
  text-decoration: none;
  padding: 0 14px;
  white-space: nowrap;
}

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

.text-button {
  background: transparent;
  color: var(--blue);
  padding: 0;
}

.file-button input,
.drop-zone input {
  display: none;
}

.table-wrap {
  overflow: auto;
}

.roster-panel {
  max-height: calc(100vh - 190px);
  overflow-y: auto;
}

.roster-panel .table-wrap {
  max-height: calc(100vh - 285px);
  overflow: auto;
}

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

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

.player-name {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}

.avatar {
  border: 1px solid var(--line);
  border-radius: 50%;
  flex: 0 0 auto;
  height: 34px;
  object-fit: cover;
  transform-origin: center;
  width: 34px;
}

.avatar-fallback {
  align-items: center;
  background: var(--panel-soft);
  color: var(--muted);
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 900;
  justify-content: center;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dkp-pill,
.class-pill,
.status-pill,
.link-pill {
  display: inline-flex;
  min-width: 48px;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-weight: 800;
}

.dkp-pill {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.class-pill {
  background: var(--info-bg);
  color: var(--info-text);
}

.status-pill[data-status="active"] {
  background: var(--success-bg);
  color: var(--success-text);
}

.status-pill[data-status="inactive"] {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.link-pill {
  background: var(--purple-bg);
  color: var(--purple-text);
}

.luck-pill {
  background: linear-gradient(135deg, #39ff14, #00e5ff, #ff4fd8);
  border-radius: 999px;
  color: #071b03;
  font-weight: 900;
  padding: 6px 10px;
}

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

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ghost-button.bid-open-active,
.ghost-button.bid-open-active:disabled {
  background: #39ff14;
  border-color: #20bf00;
  color: #071b03;
  opacity: 1;
}

.ghost-button.bid-closed-active,
.ghost-button.bid-closed-active:disabled {
  background: #d92525;
  border-color: #a91515;
  color: #ffffff;
  opacity: 1;
}

.icon-button {
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  border-radius: 8px;
}

.tooltip-button {
  position: relative;
}

.tooltip-button::after {
  background: #111827;
  border-radius: 8px;
  bottom: calc(100% + 10px);
  box-shadow: var(--shadow);
  color: #ffffff;
  content: attr(data-tooltip);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  max-width: 240px;
  opacity: 0;
  padding: 8px 10px;
  pointer-events: none;
  position: absolute;
  right: 0;
  text-align: left;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  width: max-content;
  z-index: 20;
}

.tooltip-button:hover::after,
.tooltip-button:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.stack-list,
.class-grid,
.activity-feed,
.ticket-ranges,
.history-list,
.log-results {
  display: grid;
  gap: 10px;
}

#topPlayers,
#luckiestWinners {
  max-height: 240px;
  overflow-y: auto;
  padding-right: 6px;
}

.activity-feed {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
}

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

.class-count {
  align-items: center;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  min-height: 46px;
  padding: 10px 12px;
}

.class-count span {
  color: var(--muted);
  font-weight: 800;
}

.class-count strong {
  font-size: 1.25rem;
}

.class-count.is-empty {
  opacity: 0.58;
}

.stack-item,
.activity-item,
.range-item,
.history-item,
.log-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}

.stack-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.activity-item small,
.history-item small,
.log-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.bidder-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 12px;
}

.bidder-list legend {
  color: var(--muted);
  font-weight: 800;
  padding: 0 6px;
}

.field-help {
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 12px;
  font-size: 0.9rem;
}

#bidderChecklist {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.checkbox-line,
.bidder-option {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 650;
}

.checkbox-line input,
.bidder-option input {
  width: 18px;
  height: 18px;
}

.range-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.range-item strong {
  color: var(--accent-strong);
}

.roll-result {
  margin-top: 16px;
  padding: 20px;
  border-radius: 8px;
  background: var(--result-bg);
  color: var(--result-text);
  overflow: hidden;
}

.roll-result strong {
  display: block;
  margin-top: 8px;
  font-size: 1.7rem;
}

.roll-result .rainbow-winner {
  animation: rainbow-shift 2.5s linear infinite;
  background: linear-gradient(90deg, #ff1744, #ff9100, #ffee00, #39ff14, #00e5ff, #7c4dff, #ff4fd8, #ff1744);
  background-size: 300% 100%;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 3.4rem;
  line-height: 1.05;
  position: relative;
  text-align: center;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.28);
  z-index: 1;
}

.roll-result .rainbow-winner::before,
.roll-result .rainbow-winner::after {
  animation: confetti-burst 1.4s ease-out infinite;
  background-image:
    radial-gradient(circle at 50% 18%, #ff1744 0 3px, transparent 4px),
    radial-gradient(circle at 82% 50%, #ff1744 0 3px, transparent 4px),
    radial-gradient(circle at 50% 82%, #ff1744 0 3px, transparent 4px),
    radial-gradient(circle at 18% 50%, #ff1744 0 3px, transparent 4px),
    radial-gradient(circle at 50% 18%, #ff9100 0 3px, transparent 4px),
    radial-gradient(circle at 82% 50%, #ff9100 0 3px, transparent 4px),
    radial-gradient(circle at 50% 82%, #ff9100 0 3px, transparent 4px),
    radial-gradient(circle at 18% 50%, #ff9100 0 3px, transparent 4px),
    radial-gradient(circle at 50% 18%, #ffee00 0 3px, transparent 4px),
    radial-gradient(circle at 82% 50%, #ffee00 0 3px, transparent 4px),
    radial-gradient(circle at 50% 82%, #ffee00 0 3px, transparent 4px),
    radial-gradient(circle at 18% 50%, #ffee00 0 3px, transparent 4px),
    radial-gradient(circle at 50% 18%, #39ff14 0 3px, transparent 4px),
    radial-gradient(circle at 82% 50%, #39ff14 0 3px, transparent 4px),
    radial-gradient(circle at 50% 82%, #39ff14 0 3px, transparent 4px),
    radial-gradient(circle at 18% 50%, #39ff14 0 3px, transparent 4px),
    radial-gradient(circle at 50% 18%, #00e5ff 0 3px, transparent 4px),
    radial-gradient(circle at 82% 50%, #00e5ff 0 3px, transparent 4px),
    radial-gradient(circle at 50% 82%, #00e5ff 0 3px, transparent 4px),
    radial-gradient(circle at 18% 50%, #00e5ff 0 3px, transparent 4px),
    radial-gradient(circle at 50% 18%, #7c4dff 0 3px, transparent 4px),
    radial-gradient(circle at 82% 50%, #7c4dff 0 3px, transparent 4px),
    radial-gradient(circle at 50% 82%, #7c4dff 0 3px, transparent 4px),
    radial-gradient(circle at 18% 50%, #7c4dff 0 3px, transparent 4px);
  background-position: 8% 72%, 16% 24%, 24% 58%, 33% 14%, 40% 76%, 48% 32%, 56% 62%, 65% 18%, 73% 74%, 82% 38%, 90% 66%, 96% 22%, 12% 42%, 28% 84%, 45% 8%, 60% 88%, 76% 10%, 88% 52%, 6% 16%, 36% 48%, 52% 20%, 70% 46%, 84% 86%, 98% 72%;
  background-repeat: no-repeat;
  background-size: 16px 16px, 14px 14px, 18px 18px, 15px 15px, 17px 17px, 16px 16px, 14px 14px, 18px 18px, 15px 15px, 17px 17px, 16px 16px, 14px 14px, 18px 18px, 15px 15px, 17px 17px, 16px 16px, 14px 14px, 18px 18px, 15px 15px, 17px 17px, 16px 16px, 14px 14px, 18px 18px, 15px 15px;
  content: "";
  inset: -44px -70px;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 56%, 79% 91%, 50% 70%, 21% 91%, 32% 56%, 2% 35%, 39% 35%);
  opacity: 0.85;
  pointer-events: none;
  position: absolute;
  z-index: -1;
}

.roll-result .rainbow-winner::after {
  animation-delay: 0.35s;
  background-position: 6% 18%, 14% 68%, 22% 36%, 31% 88%, 39% 28%, 47% 78%, 55% 12%, 64% 58%, 72% 24%, 81% 82%, 89% 44%, 97% 14%, 10% 86%, 26% 10%, 43% 68%, 58% 38%, 74% 92%, 86% 6%, 4% 52%, 34% 22%, 50% 84%, 68% 8%, 82% 64%, 94% 48%;
}

@keyframes rainbow-shift {
  from {
    background-position: 0% 50%;
  }

  to {
    background-position: 300% 50%;
  }
}

@keyframes confetti-burst {
  0% {
    opacity: 0;
    transform: scale(0.6) translateY(18px);
  }

  35% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: scale(1.25) translateY(-26px);
  }
}

.roll-result p {
  color: var(--result-muted);
  margin: 8px 0 0;
}

.history-panel {
  margin-top: 18px;
}

.discord-command-grid {
  display: grid;
  gap: 12px;
}

.discord-results {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 6px;
}

.discord-result {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.drop-zone {
  border: 2px dashed #9cb4bd;
  border-radius: 8px;
  padding: 22px;
  background: var(--drop-bg);
  color: var(--ink);
}

.drop-zone span {
  color: var(--muted);
  font-weight: 500;
}

.danger-panel p {
  color: var(--muted);
  line-height: 1.5;
}

.empty-state {
  display: grid;
  gap: 4px;
  place-items: center;
  min-height: 128px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
  padding: 20px;
}

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

  .sidebar {
    position: static;
  }

  .nav-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .nav-link {
    text-align: center;
  }

  .metrics-grid,
  .dashboard-actions,
  .content-grid,
  .split-layout,
  .auction-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .main-panel,
  .sidebar {
    padding: 18px;
  }

  .brand-block {
    grid-template-columns: 46px 1fr;
  }

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

  .topbar,
  .action-band,
  .page-intro,
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-list {
    grid-template-columns: 1fr 1fr;
  }

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