:root {
  color-scheme: light;
  --color-primary: #7657ff;
  --color-primary-dark: #5136c7;
  --color-accent: #f3bf5a;
  --color-heading: #201a33;
  --color-text: #3f3852;
  --color-muted: #706982;
  --color-surface: #fff;
  --color-surface-subtle: #f5f2fc;
  --color-page: #f5f3fa;
  --color-border: #e8e2f2;
  --color-danger: #b42318;
  --radius-small: 10px;
  --radius-card: 18px;
  --shadow-small: 0 8px 28px rgb(45 32 74 / 8%);
  --shadow-medium: 0 18px 48px rgb(45 32 74 / 14%);
  --content-width: 1080px;
  --nav-height: 64px;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4.5 6.25 8 9.75l3.5-3.5' stroke='%234b405f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

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

@keyframes page-content-enter {
  from { transform: translateY(8px); }
}

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

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

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--nav-height) + 32px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.overlay-scrollbar { display: none; }

@media (hover: hover) and (pointer: fine) {
  html { scrollbar-width: none; }

  html::-webkit-scrollbar,
  body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .overlay-scrollbar {
    position: fixed;
    z-index: 1800;
    top: 4px;
    right: 3px;
    bottom: 4px;
    display: block;
    width: 8px;
    pointer-events: none;
  }

  .overlay-scrollbar.is-hidden { opacity: 0; }

  .overlay-scrollbar-thumb {
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    min-height: 48px;
    background: rgb(79 70 96 / 42%);
    border-radius: 999px;
    cursor: grab;
    opacity: 0.68;
    pointer-events: auto;
    transition: background-color 160ms ease, opacity 160ms ease, width 160ms ease;
  }

  .overlay-scrollbar-thumb:hover,
  .overlay-scrollbar-thumb.is-dragging {
    width: 8px;
    background: rgb(81 54 135 / 68%);
    opacity: 1;
  }

  .overlay-scrollbar-thumb.is-dragging { cursor: grabbing; }
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  padding: calc(var(--nav-height) + 64px) 20px 28px;
  color: var(--color-text);
  background:
    radial-gradient(circle at 10% 0%, rgb(118 87 255 / 8%), transparent 26rem),
    var(--color-page);
  font-family: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  line-height: 1.6;
  animation: page-enter 240ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
  transition: opacity 160ms cubic-bezier(0.4, 0, 1, 1);
}

html.is-leaving body {
  opacity: 0;
}

a,
button {
  -webkit-tap-highlight-color: rgb(118 87 255 / 18%);
}

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

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
}

select::-ms-expand {
  display: none;
}

select.custom-select-native {
  position: absolute;
  width: 1px !important;
  height: 1px;
  min-height: 1px !important;
  margin: 0;
  padding: 0;
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}

.custom-select {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.custom-select-button {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
  color: var(--color-heading);
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 1px 0 rgb(42 30 74 / 5%);
  cursor: pointer;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.custom-select-button:hover,
.custom-select.is-open .custom-select-button {
  border-color: rgb(118 87 255 / 38%);
}

.custom-select-button:focus-visible {
  border-color: rgb(118 87 255 / 64%);
  box-shadow: 0 0 0 4px rgb(118 87 255 / 12%);
  outline: none;
}

.custom-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-icon {
  position: relative;
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--color-muted);
  transition: color 180ms ease, transform 220ms ease;
}

.custom-select-icon::before,
.custom-select-icon::after {
  position: absolute;
  top: 8px;
  width: 8px;
  height: 2px;
  background: currentColor;
  border-radius: 99px;
  content: "";
  transition: transform 220ms ease;
}

.custom-select-icon::before {
  left: 3px;
  transform: rotate(45deg);
}

.custom-select-icon::after {
  right: 2px;
  transform: rotate(-45deg);
}

.custom-select.is-open .custom-select-icon {
  color: var(--color-primary-dark);
  transform: rotate(180deg);
}

.custom-select-popover {
  position: absolute;
  z-index: 80;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  display: block;
  padding: 6px;
  background: rgb(255 255 255 / 98%);
  border: 1px solid rgb(118 87 255 / 18%);
  border-radius: 14px;
  box-shadow: 0 18px 38px rgb(45 32 74 / 16%);
}

.custom-select-popover[hidden] {
  display: none;
}

.custom-select-options {
  display: grid;
  gap: 4px;
  max-height: 240px;
  overflow: auto;
}

.custom-select-option {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  color: var(--color-heading);
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 650;
  line-height: 1.4;
  text-align: left;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.custom-select-option:hover,
.custom-select-option:focus-visible {
  color: var(--color-primary-dark);
  background: var(--color-surface-subtle);
  outline: none;
}

.custom-select-option:focus-visible {
  box-shadow: inset 0 0 0 2px rgb(118 87 255 / 18%);
}

.custom-select-option.is-selected {
  color: var(--color-primary-dark);
  background: #f1ecff;
}

.custom-select-option.is-selected::after {
  width: 8px;
  height: 13px;
  margin-right: 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(42deg);
}

.custom-select-option:disabled {
  color: #aaa2b7;
  cursor: not-allowed;
  opacity: 0.62;
}

.custom-select.is-disabled .custom-select-button {
  cursor: not-allowed;
  opacity: 0.72;
}

button[type="button"] {
  appearance: none;
  -webkit-appearance: none;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 2000;
  padding: 10px 14px;
  color: #fff;
  background: #241d3e;
  border-radius: var(--radius-small);
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  z-index: 1000;
  inset: 12px 20px auto;
}

.navbar-container {
  position: relative;
  display: flex;
  width: min(100%, 1120px);
  min-height: var(--nav-height);
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-inline: auto;
  padding: 8px 10px;
  color: #fff;
  background: rgb(24 18 43 / 88%);
  border: 1px solid rgb(255 255 255 / 11%);
  border-radius: 16px;
  box-shadow: 0 14px 38px rgb(16 10 31 / 24%);
  backdrop-filter: blur(18px) saturate(125%);
}

.navbar-container a {
  color: inherit;
  text-decoration: none;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding-right: 10px;
  font-size: 0.98rem;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.brand-mark {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  filter: drop-shadow(0 7px 12px rgb(118 87 255 / 28%));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  display: inline-flex;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border-radius: 11px;
  color: rgb(255 255 255 / 78%);
  font-weight: 650;
  line-height: 1;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: #fff;
  background: rgb(255 255 255 / 11%);
}

.nav-links a[aria-current="page"] {
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 6%);
}

.nav-links a:hover {
  transform: translateY(-1px);
}

.content-main,
.home-main {
  width: min(100%, var(--content-width));
  margin-inline: auto;
  animation: page-content-enter 240ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
  transition: transform 160ms cubic-bezier(0.4, 0, 1, 1);
}

html.is-leaving .content-main,
html.is-leaving .home-main,
html.is-leaving .site-footer {
  transform: translateY(-6px);
}

.content-main {
  min-height: 65vh;
}

.page-admin .content-main {
  width: min(100%, 1280px);
  min-height: auto;
}

h1 {
  margin: 0;
  color: var(--color-heading);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.16;
}

.page-heading {
  max-width: 720px;
  margin: 28px auto 32px;
  text-align: center;
}

.page-heading::before {
  display: block;
  width: 54px;
  height: 5px;
  margin: 0 auto 22px;
  background: linear-gradient(90deg, var(--color-primary), #b66bdf, var(--color-accent));
  border-radius: 99px;
  content: "";
}

.page-heading > p:last-child {
  margin: 15px 0 0;
  color: var(--color-muted);
  font-size: 1.05rem;
}

.page-kicker {
  margin: 0 0 8px;
  color: var(--color-primary-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.title-aside {
  display: inline-block;
  margin-left: 0.15em;
  color: var(--color-primary);
  font-size: 0.45em;
  font-weight: 750;
  letter-spacing: 0.08em;
  vertical-align: 0.42em;
}

.action-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0 0 30px;
}

.action-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  color: var(--color-primary-dark);
  background: rgb(255 255 255 / 72%);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  box-shadow: 0 5px 18px rgb(45 32 74 / 5%);
  font-weight: 700;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.action-links a:hover {
  border-color: rgb(118 87 255 / 45%);
  box-shadow: var(--shadow-small);
  transform: translateY(-2px);
}

.site-footer {
  display: flex;
  width: min(100%, var(--content-width));
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 54px auto 0;
  padding: 24px 4px 4px;
  color: var(--color-muted);
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
  transition: transform 160ms cubic-bezier(0.4, 0, 1, 1);
}

.footer-brand {
  color: var(--color-heading);
  font-weight: 800;
}

.custom-link {
  color: #7040c6;
  font-weight: 700;
  text-underline-offset: 0.18em;
}

.custom-link:hover {
  color: #9668db;
}

.text-red { color: #c40000; }
.text-green { color: #087b2c; }
.text-darkcyan { color: darkcyan; }
.text-lightseagreen { color: #147d77; }

.text-underline {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.loading-state {
  width: 100%;
  margin: 30px auto;
  color: var(--color-muted);
  text-align: center;
}

.error-state { color: var(--color-danger); }

/* Homepage */
.page-home {
  position: relative;
  isolation: isolate;
  padding: 0 24px 30px;
  color: #fff;
  background: #100d17;
}

.home-background {
  position: fixed;
  z-index: 0;
  top: 0;
  right: 0;
  bottom: auto;
  left: 0;
  height: 100vh;
  overflow: hidden;
  background: #100d17;
  pointer-events: none;
}

@supports (height: 100lvh) {
  .home-background { height: 100lvh; }
}

.home-background-layer {
  position: absolute;
  z-index: 0;
  inset: -1.5%;
  background-position: center;
  background-size: cover;
  filter: saturate(0.82) contrast(1.06);
  opacity: 0;
  transform: scale(1.015);
  transition: opacity var(--cover-transition-duration, 1400ms) ease-in-out;
  will-change: opacity;
}

.home-background-layer-default {
  background-image: url("assets/images/covers/01.webp");
}

.home-background-layer.is-active { opacity: 1; }

.home-background-overlay {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    radial-gradient(ellipse 52% 82% at 50% 54%, rgb(12 8 24 / 64%) 0%, rgb(14 9 26 / 48%) 42%, rgb(12 8 24 / 0%) 100%),
    linear-gradient(90deg, rgb(12 8 24 / 16%) 0%, rgb(10 7 20 / 20%) 50%, rgb(12 8 24 / 16%) 100%),
    linear-gradient(0deg, rgb(11 8 18 / 70%) 0%, transparent 48%, rgb(8 6 14 / 34%) 100%);
  opacity: 0.34;
  transition: opacity var(--cover-transition-duration, 1400ms) ease-in-out;
}

.home-main {
  position: relative;
  z-index: 1;
  display: block;
  padding-block: 126px 72px;
}

.home-hero {
  display: grid;
  min-height: calc(100vh - 198px);
  align-items: center;
  gap: clamp(40px, 7vw, 88px);
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.75fr);
}

.hero-copy {
  max-width: 670px;
}

.server-live-status {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 24px;
  padding: 8px 13px;
  color: rgb(255 255 255 / 84%);
  background: rgb(255 255 255 / 8%);
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #7ae8a4;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgb(122 232 164 / 11%), 0 0 14px rgb(122 232 164 / 65%);
}

.server-live-status[data-state="loading"] .status-dot,
.server-live-status[data-state="error"] .status-dot {
  background: #f3c867;
  box-shadow: 0 0 0 5px rgb(243 200 103 / 11%), 0 0 14px rgb(243 200 103 / 55%);
}

.server-live-status[data-state="offline"] .status-dot {
  background: #ff7a8a;
  box-shadow: 0 0 0 5px rgb(255 122 138 / 11%), 0 0 14px rgb(255 122 138 / 55%);
}

.live-status-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.live-status-item small {
  color: rgb(255 255 255 / 52%);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.live-status-item strong {
  color: #f4ce78;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.live-status-divider {
  width: 1px;
  height: 16px;
  background: rgb(255 255 255 / 15%);
}

.home-main h1 {
  color: #fff;
  font-size: clamp(3.4rem, 8vw, 6.8rem);
  letter-spacing: -0.065em;
  line-height: 0.96;
  text-shadow: 0 9px 40px rgb(0 0 0 / 45%);
}

.home-main h1 span {
  color: transparent;
  background: linear-gradient(100deg, #fff 4%, #e0bcff 48%, #f3c867 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

.home-tagline {
  max-width: 640px;
  margin: 28px 0 0;
  color: rgb(255 255 255 / 90%);
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  font-weight: 700;
  line-height: 1.85;
  text-shadow: 0 2px 4px rgb(0 0 0 / 80%), 0 5px 20px rgb(0 0 0 / 68%);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 34px 0 0;
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button i { flex: 0 0 auto; }

.button:disabled,
.button[data-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}

.button-primary {
  color: #1d1630;
  background: linear-gradient(135deg, #f6d079, #dba6ff);
  box-shadow: 0 14px 32px rgb(208 156 255 / 20%);
}

.button-primary:hover { box-shadow: 0 18px 40px rgb(208 156 255 / 30%); }

.button-secondary {
  color: #fff;
  background: rgb(255 255 255 / 8%);
  border-color: rgb(255 255 255 / 18%);
  backdrop-filter: blur(10px);
}

.button-secondary:hover {
  background: rgb(255 255 255 / 12%);
  border-color: rgb(255 255 255 / 28%);
}

.button-on-surface,
.account-actions .button-secondary,
.result-panel .button-secondary {
  color: var(--color-primary-dark);
  background: #fff;
  border-color: rgb(118 87 255 / 18%);
}

.button-on-surface,
.account-actions .button-secondary {
  box-shadow: var(--shadow-small);
}

.intro-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 27px;
}

.intro-links a {
  color: rgb(255 255 255 / 62%);
  font-size: 0.91rem;
  font-weight: 650;
  text-decoration: none;
  text-underline-offset: 4px;
  transition: color 180ms ease;
}

.intro-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.server-card {
  padding: 24px;
  background: linear-gradient(145deg, rgb(28 20 48 / 72%), rgb(19 15 31 / 62%));
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgb(0 0 0 / 32%);
  backdrop-filter: blur(18px) saturate(125%);
}

.server-card-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
}

.server-card-icon {
  display: grid;
  width: 47px;
  height: 47px;
  flex: 0 0 auto;
  place-items: center;
  color: #efca75;
  background: rgb(243 191 90 / 11%);
  border: 1px solid rgb(243 191 90 / 20%);
  border-radius: 14px;
}

.server-card-heading span:not(.server-card-icon) {
  display: block;
  color: rgb(255 255 255 / 56%);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.server-card-heading strong {
  display: block;
  margin-top: 2px;
  color: #fff;
  font-size: 1.02rem;
}

.feature-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.feature-list > div {
  display: grid;
  align-items: center;
  gap: 14px;
  padding: 12px 10px;
  border-radius: 13px;
  grid-template-columns: 24px 1fr;
  transition: background-color 180ms ease, transform 180ms ease;
}

.feature-list > div:hover {
  background: rgb(255 255 255 / 5%);
  transform: translateX(3px);
}

.feature-list > div > i {
  color: #c8a1ff;
  text-align: center;
  transition: color 180ms ease, transform 180ms ease;
}

.feature-list > div:hover > i {
  color: #dec8ff;
  transform: scale(1.08);
}

.feature-list strong,
.feature-list small { display: block; }
.feature-list strong { color: rgb(255 255 255 / 91%); }

.feature-list small {
  margin-top: 2px;
  color: rgb(255 255 255 / 49%);
  line-height: 1.45;
}

.home-intro-section {
  position: relative;
  isolation: isolate;
  scroll-margin-top: 112px;
  margin-top: 56px;
  padding-block: 96px 92px;
}

.home-intro-shell {
  position: relative;
  padding: 0;
}

.home-intro-heading {
  display: grid;
  gap: 10px;
  max-width: 820px;
  margin-bottom: 22px;
}

.home-intro-heading p {
  margin: 0;
  color: #d5adff;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.home-intro-heading h2 {
  margin: 0;
  max-width: 900px;
  color: #fff;
  font-size: clamp(2.15rem, 5vw, 4.8rem);
  letter-spacing: 0;
  line-height: 1.05;
  text-shadow: 0 8px 34px rgb(0 0 0 / 42%);
}

.home-intro-heading span {
  max-width: 760px;
  color: rgb(255 255 255 / 66%);
  font-size: clamp(0.98rem, 1.7vw, 1.16rem);
  font-weight: 650;
  line-height: 1.75;
  text-shadow: 0 4px 18px rgb(0 0 0 / 46%);
}

.home-intro-overview {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
}

.home-intro-statement,
.home-intro-status,
.home-intro-features article {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgb(28 20 48 / 72%), rgb(19 15 31 / 62%));
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 10px;
  box-shadow:
    0 24px 70px rgb(0 0 0 / 32%),
    inset 0 1px 0 rgb(255 255 255 / 9%);
  backdrop-filter: blur(18px) saturate(125%);
}

.home-intro-statement {
  padding: 24px;
}

.home-intro-label {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 12px;
  padding: 6px 9px;
  color: #f1cf78;
  background: rgb(243 191 90 / 10%);
  border: 1px solid rgb(243 191 90 / 16%);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.home-intro-statement > p {
  max-width: 760px;
  margin: 0;
  color: rgb(255 255 255 / 82%);
  font-size: clamp(1.1rem, 2vw, 1.42rem);
  font-weight: 720;
  line-height: 1.72;
}

.home-intro-principles {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-intro-principles div {
  padding: 14px;
  background: rgb(255 255 255 / 5%);
  border: 1px solid rgb(255 255 255 / 9%);
  border-radius: 8px;
}

.home-intro-principles strong,
.home-intro-principles span {
  display: block;
}

.home-intro-principles strong {
  color: #fff;
  font-size: 0.92rem;
}

.home-intro-principles span {
  margin-top: 5px;
  color: rgb(255 255 255 / 54%);
  font-size: 0.78rem;
  line-height: 1.55;
}

.home-intro-status {
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 22px;
  background:
    linear-gradient(145deg, rgb(38 27 66 / 68%), rgb(25 18 41 / 52%));
  border-color: rgb(214 187 255 / 16%);
  box-shadow:
    0 18px 48px rgb(12 7 25 / 24%),
    inset 0 1px 0 rgb(255 255 255 / 8%);
}

.home-intro-status .home-intro-label { margin-bottom: 0; }

.home-intro-status .home-intro-label {
  color: #ffe4a1;
  background: rgb(255 228 161 / 12%);
  border-color: rgb(255 228 161 / 20%);
}

.home-intro-status small {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #9df0bd;
  font-size: 0.76rem;
  font-weight: 800;
}

.home-intro-status small i { font-size: 0.48rem; }

.home-intro-status strong {
  display: block;
  margin-top: 10px;
  color: #fff;
  font-size: 1.35rem;
}

.home-intro-status > div > span {
  display: block;
  margin-top: 5px;
  color: #ffe28a;
  font-weight: 850;
}

.home-intro-status dl {
  display: grid;
  gap: 8px;
  margin: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-intro-status dl div {
  min-width: 0;
  padding: 10px;
  background: rgb(255 255 255 / 7%);
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 8px;
}

.home-intro-status dt {
  color: rgb(255 255 255 / 55%);
  font-size: 0.66rem;
  font-weight: 800;
}

.home-intro-status dd {
  margin: 3px 0 0;
  color: rgb(255 255 255 / 88%);
  font-size: 0.78rem;
  font-weight: 800;
}

.home-intro-features {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-intro-features article {
  padding: 18px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.home-intro-features article:hover {
  border-color: rgb(214 187 255 / 24%);
  box-shadow: 0 18px 44px rgb(12 7 25 / 24%);
  transform: translateY(-2px);
}

.home-intro-features i {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #d8b7ff;
  background: rgb(183 148 255 / 12%);
  border: 1px solid rgb(183 148 255 / 16%);
  border-radius: 8px;
}

.home-intro-features h3 {
  margin: 15px 0 0;
  color: #fff;
  font-size: 1rem;
}

.home-intro-features p {
  margin: 8px 0 0;
  color: rgb(255 255 255 / 56%);
  font-size: 0.84rem;
  line-height: 1.65;
}

.home-intro-features code {
  color: #e3c6ff;
  font: inherit;
  font-weight: 750;
}

.home-intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.page-home .site-footer {
  position: relative;
  z-index: 1;
  margin-top: 44px;
  color: rgb(255 255 255 / 52%);
  border-color: rgb(255 255 255 / 12%);
}

.page-home .footer-brand { color: rgb(255 255 255 / 86%); }

/* FAQ */
.faq-tools,
.announcement-tools {
  width: min(100%, 880px);
  margin: 0 auto 30px;
}

.faq-search {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 13px;
  padding: 0 19px;
  color: var(--color-primary);
  background: rgb(255 255 255 / 94%);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: var(--shadow-small);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.faq-search:focus-within {
  border-color: rgb(118 87 255 / 48%);
  box-shadow: 0 12px 34px rgb(74 49 135 / 13%);
}

.faq-search input {
  width: 100%;
  padding: 0;
  color: var(--color-heading);
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 1.02rem;
}

.faq-search input::placeholder { color: #9991aa; }

.faq-categories,
.announcement-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.faq-categories button,
.announcement-categories button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 6px 11px 6px 14px;
  color: var(--color-muted);
  background: rgb(255 255 255 / 72%);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.faq-categories button:hover,
.announcement-categories button:hover { transform: translateY(-1px); }

.faq-categories button span,
.announcement-categories button span {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  color: var(--color-muted);
  background: var(--color-surface-subtle);
  border-radius: 999px;
  font-size: 0.73rem;
  transition: background-color 180ms ease, color 180ms ease;
}

.faq-categories button[aria-pressed="true"],
.announcement-categories button[aria-pressed="true"] {
  color: #fff;
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.faq-categories button[aria-pressed="true"] span,
.announcement-categories button[aria-pressed="true"] span {
  color: #fff;
  background: rgb(255 255 255 / 17%);
}

.faq-result-count,
.announcement-result-count {
  margin: 12px 2px 0;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.faq-layout {
  display: grid;
  align-items: start;
  gap: 28px;
  grid-template-columns: 190px minmax(0, 1fr);
}

.faq-index {
  position: sticky;
  top: calc(var(--nav-height) + 34px);
  padding: 18px;
  background: rgb(255 255 255 / 68%);
  border: 1px solid var(--color-border);
  border-radius: 16px;
}

.faq-index-title {
  margin: 0 8px 10px;
  color: var(--color-heading);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.faq-index nav { display: grid; gap: 4px; }

.faq-index button {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  color: var(--color-muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font: inherit;
  font-size: 0.87rem;
  text-align: left;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.faq-index button small { opacity: 0.68; }

.faq-index button:hover,
.faq-index button.is-active {
  color: var(--color-primary-dark);
  background: var(--color-surface-subtle);
}

.faq-index button:hover { transform: translateX(2px); }

.faq {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.faq.is-empty::after {
  padding: 44px 20px;
  color: var(--color-muted);
  background: rgb(255 255 255 / 58%);
  border: 1px dashed #d6cde4;
  border-radius: var(--radius-card);
  content: "这里暂时空空如也";
  text-align: center;
}

.surface-interactive,
.faq-item,
.entry {
  overflow: hidden;
  background: rgb(255 255 255 / 92%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-small);
  transition: border-color 180ms ease, box-shadow 180ms ease, opacity 360ms ease, transform 360ms ease;
}

.surface-interactive:hover,
.faq-item:hover,
.entry:hover {
  border-color: rgb(118 87 255 / 24%);
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.faq-question {
  display: flex;
  width: 100%;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  color: var(--color-heading);
  background: transparent;
  border: 0;
  border-radius: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 1.08rem;
  font-weight: 750;
  line-height: 1.45;
  text-align: left;
}

.faq-question > span { min-width: 0; }

.faq-question > small {
  margin-left: auto;
  padding: 4px 8px;
  color: var(--color-primary-dark);
  background: var(--color-surface-subtle);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.faq-toggle-icon {
  position: relative;
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--color-primary-dark);
  background: var(--color-surface-subtle);
  border-radius: 9px;
  transition: background-color 180ms ease, transform 220ms ease;
}

.faq-toggle-icon::before,
.faq-toggle-icon::after {
  position: absolute;
  width: 13px;
  height: 2px;
  background: currentColor;
  border-radius: 99px;
  content: "";
  transition: opacity 180ms ease, transform 220ms ease;
}

.faq-toggle-icon::after { transform: rotate(90deg); }

.faq-question[aria-expanded="true"] .faq-toggle-icon {
  background: #ebe5fb;
  transform: rotate(180deg);
}

.faq-question[aria-expanded="true"] .faq-toggle-icon::after {
  opacity: 0;
  transform: rotate(90deg) scaleX(0);
}

.disclosure-region {
  overflow: hidden;
}

.faq-answer {
  margin: 0 22px 22px;
  padding: 16px 18px;
  color: #554d68;
  background: var(--color-surface-subtle);
  border-left: 4px solid var(--color-primary);
  border-radius: 4px 12px 12px 4px;
  line-height: 1.75;
}

/* Fun list */
.fun-intro {
  width: min(100%, 820px);
  margin: 0 auto 25px;
  padding: 17px 20px;
  color: var(--color-text);
  background: rgb(255 255 255 / 64%);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  font-size: 1rem;
  text-align: center;
}

.fun-intro strong { color: #b42318; }

.fun-list {
  position: relative;
  display: grid;
  gap: 24px;
}

.entry {
  position: relative;
  overflow: visible;
  padding: clamp(18px, 3vw, 28px);
}

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

.entry-overline {
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.entry-header h2 {
  margin: 5px 0 0;
  color: var(--color-heading);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.25;
}

.entry-header time {
  flex: 0 0 auto;
  padding: 6px 10px;
  color: var(--color-muted);
  background: var(--color-surface-subtle);
  border-radius: 999px;
  font-size: 0.9rem;
}

.entry-summary {
  margin: 18px 0 16px;
  color: #5d556f;
  line-height: 1.75;
}

.result-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}

.result-badges span {
  padding: 5px 9px;
  color: #8d3347;
  background: #fff0f2;
  border: 1px solid #f5d7dd;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 750;
}

.announcement-badges span {
  color: var(--color-primary-dark);
  background: #f4f0ff;
  border-color: #ddd4ed;
}

.announcement-badges .is-pinned {
  color: #8d3347;
  background: #fff0f2;
  border-color: #f5d7dd;
}

.entry-metadata {
  display: grid;
  gap: 10px;
  padding: 15px 17px;
  background: var(--color-surface-subtle);
  border-radius: 13px;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
}

.entry-metadata > div { min-width: 0; }

.entry-metadata span,
.entry-metadata strong { display: block; }

.entry-metadata span {
  color: var(--color-muted);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.entry-metadata strong {
  margin-top: 2px;
  overflow-wrap: anywhere;
  color: var(--color-heading);
  font-size: 0.91rem;
}

.entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 17px;
}

.entry-action {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  color: var(--color-primary-dark);
  background: #fff;
  border: 1px solid #ddd4ed;
  border-radius: 11px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.entry-action:hover {
  background: var(--color-surface-subtle);
  border-color: rgb(118 87 255 / 38%);
  transform: translateY(-1px);
}

.entry-action-chevron {
  margin-left: 2px;
  font-size: 0.7rem;
  transition: transform 220ms ease;
}

.entry-action[aria-expanded="true"] .entry-action-chevron { transform: rotate(180deg); }

.entry-story {
  margin-top: 18px;
  padding: 18px 20px;
  color: #554d68;
  background: var(--color-surface-subtle);
  border-left: 4px solid var(--color-primary);
  border-radius: 4px 12px 12px 4px;
  line-height: 1.75;
}

.entry-story h3 {
  margin: 0 0 10px;
  color: var(--color-heading);
  font-size: 1rem;
}

.announcement-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.image-container {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.image-thumbnail {
  position: relative;
  aspect-ratio: 16 / 10;
  min-height: 120px;
  padding: 0;
  overflow: hidden;
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: 13px;
  cursor: zoom-in;
}

.image-thumbnail::after {
  position: absolute;
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  color: #fff;
  background: rgb(25 18 41 / 72%);
  border-radius: 10px;
  content: "\f00e";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  opacity: 0;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -40%);
  transition: opacity 180ms ease, transform 180ms ease;
}

.image-thumbnail:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.image-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 120px;
  max-height: 210px;
  object-fit: cover;
  transition: transform 220ms ease;
}

.image-thumbnail:hover img { transform: scale(1.025); }

.image-lightbox {
  width: min(94vw, 1180px);
  max-width: none;
  max-height: 92vh;
  padding: 16px;
  overflow: visible;
  color: #fff;
  background: #14101e;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 18px;
  box-shadow: 0 30px 100px rgb(0 0 0 / 55%);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: none), (pointer: coarse) {
  a,
  button {
    -webkit-tap-highlight-color: transparent;
  }

  .faq-item:hover,
  .entry:hover {
    border-color: var(--color-border);
    box-shadow: var(--shadow-small);
    transform: none;
  }

  .entry-action:hover {
    background: #fff;
    border-color: #ddd4ed;
    transform: none;
  }

  .faq-categories button:hover,
  .faq-index button:hover {
    transform: none;
  }

  .image-thumbnail:hover::after { opacity: 0; }
  .image-thumbnail:hover img { transform: none; }
}

.image-lightbox.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.image-lightbox::backdrop {
  background: rgb(8 5 13 / 84%);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 180ms ease;
}

.image-lightbox.is-open::backdrop { opacity: 1; }

.image-lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 76px);
  margin: auto;
  border-radius: 11px;
  object-fit: contain;
}

.image-lightbox p {
  margin: 11px 45px 0;
  color: rgb(255 255 255 / 66%);
  font-size: 0.88rem;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  z-index: 1;
  top: -14px;
  right: -14px;
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  color: #fff;
  background: #2b223a;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 50%;
  cursor: pointer;
}

.has-reveal .faq-item,
.has-reveal .entry {
  opacity: 0;
  transform: translateY(18px);
}

.has-reveal .faq-item.is-visible,
.has-reveal .entry.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.has-reveal .faq-item.is-visible:hover,
.has-reveal .entry.is-visible:hover {
  transform: translateY(-2px);
}

.account-main {
  display: grid;
  max-width: 1080px;
  align-content: start;
  gap: 20px;
}

.result-main {
  min-height: calc(100svh - var(--nav-height) - 170px);
  align-content: center;
}

.account-main > .auth-panel {
  width: min(100%, 640px);
  margin-inline: auto;
}

.whitelist-layout {
  display: grid;
  align-items: start;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.44fr);
}

.apply-rules {
  margin-bottom: 28px;
}

.surface,
.auth-panel,
.side-panel,
.rules-reader,
.admin-panel,
.result-panel {
  animation: surface-enter 260ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
  background: rgb(255 255 255 / 88%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-small);
}

.surface-padded,
.auth-panel,
.side-panel,
.admin-panel,
.result-panel {
  padding: 24px;
}

.auth-panel h2,
.side-panel h2,
.admin-panel h2,
.result-panel h1 {
  margin: 0 0 18px;
  color: var(--color-heading);
  line-height: 1.25;
}

.stack-form {
  display: grid;
  gap: 15px;
}

.stack-form label,
.inline-form > *,
.rules-confirm > *,
.account-actions > *,
.hero-actions > *,
.tool-toolbar,
.tool-tabs > *,
.admin-toolbar,
.admin-tabs > * {
  animation: control-enter 220ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.stack-form label,
.inline-form label:not(.check-line) {
  display: grid;
  gap: 7px;
  color: var(--color-heading);
  font-weight: 700;
}

.stack-form input,
.stack-form select,
.stack-form .custom-select-button,
.password-field input,
.inline-form input,
.inline-form select,
.inline-form .custom-select-button {
  width: 100%;
  min-height: 52px;
  padding: 12px 13px;
  color: var(--color-heading);
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 1px 0 rgb(42 30 74 / 5%);
  font-weight: 500;
  line-height: 1.45;
}

.stack-form select,
.inline-form select {
  padding-right: 42px;
}

.stack-form .custom-select-button,
.inline-form .custom-select-button {
  padding: 12px 13px;
}

.stack-form input:focus,
.stack-form select:focus,
.stack-form .custom-select-button:focus-visible,
.password-field input:focus,
.inline-form input:focus,
.inline-form select:focus,
.inline-form .custom-select-button:focus-visible {
  border-color: rgb(118 87 255 / 64%);
  box-shadow: 0 0 0 4px rgb(118 87 255 / 12%);
  outline: none;
}

.password-field {
  position: relative;
  display: block;
  min-width: 0;
}

.password-field input {
  appearance: none;
  padding-right: 46px;
}

.password-field input::-ms-reveal,
.password-field input::-ms-clear {
  display: none;
}

.password-field input::-webkit-credentials-auto-fill-button {
  visibility: hidden;
  display: none !important;
  pointer-events: none;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  color: var(--color-muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle[aria-pressed="true"] {
  color: var(--color-primary-dark);
  background: rgb(118 87 255 / 9%);
}

.password-toggle:focus-visible {
  outline: 3px solid rgb(118 87 255 / 22%);
  outline-offset: 2px;
}

.password-toggle {
  transform: translateY(-50%);
}

.auth-switch,
.field-hint {
  margin: 16px 0 0;
  color: var(--color-muted);
}

.auth-switch a,
.inline-tool-link {
  color: var(--color-primary-dark);
  font-weight: 750;
}

.stack-form label small {
  color: var(--color-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.stack-form label small.field-hint,
.field-hint {
  font-weight: 400;
}

.optional-badge {
  color: var(--color-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.form-message {
  margin: 0 0 18px;
  padding: 11px 13px;
  color: #403225;
  background: #fff7e5;
  border: 1px solid #f3d796;
  border-radius: 12px;
}

.form-message[data-type="success"] {
  color: #155c3a;
  background: #e9f8ef;
  border-color: #bce8ca;
}

.form-message[data-type="error"] {
  color: var(--color-danger);
  background: #fff0ef;
  border-color: #f4c7c2;
}

.field-validation-popover {
  position: fixed;
  z-index: 1000;
  display: inline-flex;
  max-width: min(310px, calc(100vw - 24px));
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  color: #392a1d;
  background: #fff;
  border: 1px solid rgb(118 87 255 / 24%);
  border-radius: 11px;
  box-shadow: 0 14px 34px rgb(42 30 74 / 18%), 0 2px 9px rgb(42 30 74 / 12%);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  pointer-events: none;
}

.field-validation-popover[hidden] {
  display: none;
}

.field-validation-popover::before {
  position: absolute;
  left: 24px;
  width: 14px;
  height: 14px;
  background: #fff;
  border: 1px solid rgb(118 87 255 / 24%);
  border-right: 0;
  border-bottom: 0;
  content: "";
  transform: rotate(45deg);
}

.field-validation-popover[data-placement="bottom"]::before {
  top: -8px;
}

.field-validation-popover[data-placement="top"]::before {
  bottom: -8px;
  border: 0;
  border-right: 1px solid rgb(118 87 255 / 24%);
  border-bottom: 1px solid rgb(118 87 255 / 24%);
}

.field-validation-popover i {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #dc7d32, #d14970);
  border-radius: 8px;
  font-size: 0.88rem;
}

.whitelist-layout .auth-panel,
.whitelist-layout .side-panel {
  border-radius: 14px;
}

.whitelist-layout .auth-panel {
  padding: 24px 24px 26px;
}

.whitelist-layout .auth-panel h2,
.whitelist-layout .side-panel h2 {
  margin-bottom: 14px;
}

.whitelist-layout .stack-form {
  gap: 14px;
}

.whitelist-layout .stack-form label {
  gap: 10px;
}

.whitelist-layout .stack-form label > span {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  line-height: 1.35;
}

.whitelist-layout .stack-form label > .custom-select {
  display: block;
}

.whitelist-layout .stack-form input,
.whitelist-layout .stack-form select,
.whitelist-layout .stack-form .custom-select-button {
  min-height: 56px;
  padding-block: 12px;
  line-height: 1.45;
}

.whitelist-layout .stack-form select {
  padding-right: 42px;
}

.whitelist-layout .field-hint {
  margin: 0;
  min-height: 21px;
  line-height: 1.55;
}

.whitelist-layout .stack-form label:not(:has(> .field-hint))::after {
  display: block;
  min-height: 21px;
  content: "";
}

.whitelist-layout .stack-form label.is-optional input[type="file"] {
  background: rgb(245 242 252 / 70%);
}

.whitelist-layout [data-original-screenshot]:empty {
  display: none;
}

.whitelist-layout .inline-tool-link {
  width: fit-content;
  margin-top: 2px;
  line-height: 1.4;
}

.whitelist-layout .button {
  margin-top: 2px;
}

.rules-experience {
  display: grid;
  max-width: 860px;
  margin-inline: auto;
  align-items: start;
}

.rules-kicker {
  margin: 0 0 6px;
  color: rgb(255 255 255 / 62%);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rules-reader {
  overflow: hidden;
}

.rules-reader-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 26px 18px;
  background:
    linear-gradient(90deg, rgb(118 87 255 / 10%), transparent 64%),
    #fff;
  border-bottom: 1px solid var(--color-border);
}

.rules-reader-head h2 {
  margin: 0;
  color: var(--color-heading);
  font-size: 1.48rem;
}

.rules-reader-head .rules-kicker {
  color: var(--color-primary-dark);
}

.rules-scroll {
  overflow: visible;
  padding: 8px 26px 26px;
}

.rules-item {
  padding: 24px 0 26px;
  border-top: 1px solid var(--color-border);
  scroll-margin-top: 16px;
}

.rules-item:first-child {
  border-top: 0;
}

.rules-item h2 {
  margin: 0 0 13px;
  color: var(--color-heading);
  font-size: 1.34rem;
  line-height: 1.35;
}

.rules-category {
  width: fit-content;
  margin: 0 0 9px;
  padding: 3px 9px;
  color: var(--color-primary-dark);
  background: rgb(118 87 255 / 10%);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
}

.rules-answer {
  max-width: 74ch;
  color: var(--color-text);
}

.rules-confirm {
  display: grid;
  align-items: stretch;
  gap: 14px;
  padding: 16px 22px;
  background: #fbf9ff;
  border-top: 1px solid var(--color-border);
}

.rules-confirm .form-message {
  margin: 0;
}

.rules-confirm .check-line {
  min-height: 52px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 13px;
}

.check-line {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--color-heading);
  font-weight: 700;
  line-height: 1.25;
}

.check-line span {
  line-height: 1.25;
}

.check-line input {
  position: relative;
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  border: 2px solid #ddd5ef;
  border-radius: 6px;
  box-shadow: none;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.check-line input::after {
  position: absolute;
  top: 2px;
  left: 5px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  content: "";
  opacity: 0;
  transform: rotate(45deg) scale(0.75);
}

.check-line input:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.check-line input:checked::after {
  opacity: 1;
}

.check-line input:focus-visible {
  outline: 3px solid rgb(118 87 255 / 18%);
  outline-offset: 2px;
}

.account-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.account-overview {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 20px;
}

.account-main > .account-overview {
  width: 100%;
  margin-inline: 0;
}

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

.account-avatar,
.account-panel-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--color-primary-dark);
  background: rgb(118 87 255 / 10%);
  border: 1px solid rgb(118 87 255 / 16%);
}

.account-avatar {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  font-size: 1.3rem;
}

.account-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--color-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.account-identity strong {
  display: block;
  min-width: 0;
  color: var(--color-heading);
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

.account-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 18px;
}

.account-settings .auth-panel {
  min-width: 0;
}

.account-email,
.account-security {
  display: grid;
  align-content: start;
  gap: 18px;
}

.account-panel-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.account-panel-heading h2 {
  margin: 0 0 4px;
}

.account-panel-heading p {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.55;
}

.account-panel-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  font-size: 1rem;
}

.account-email-form {
  gap: 14px;
}

.account-email-form .button {
  width: 100%;
  min-height: 52px;
}

.account-security .inline-form {
  grid-template-columns: 1fr;
  align-items: stretch;
  margin-bottom: 0;
}

.account-security .inline-form .password-field {
  min-width: 0;
}

.account-security .inline-form .button {
  width: 100%;
  min-height: 52px;
}

.account-actions {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 10px;
  margin: 0;
}

.account-actions .button {
  width: 100%;
  min-height: 48px;
  padding-inline: 14px;
  max-width: none;
  flex: none;
}

.account-actions .button-secondary:hover {
  background: rgb(118 87 255 / 8%);
  border-color: rgb(118 87 255 / 34%);
}

.compact-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 19px;
  line-height: 1.55;
}

.compact-list small {
  color: var(--color-muted);
}

.inline-tool-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.result-panel {
  display: grid;
  min-height: 320px;
  align-content: center;
  justify-items: center;
  gap: 18px;
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

.account-main > .result-panel {
  width: min(100%, 620px);
  align-self: center;
}

.result-panel .hero-actions {
  display: flex;
  width: min(100%, 390px);
  justify-content: center;
  margin-inline: auto;
}

.result-panel .hero-actions .button {
  flex: 1 1 180px;
  max-width: 189px;
  width: 100%;
}

.result-icon {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  margin: 0 auto 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 50%;
  font-size: 2rem;
}

.tool-toolbar,
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
}

.page-admin > .form-message[data-admin-message] {
  position: fixed;
  top: calc(var(--nav-height) + 18px);
  left: 50%;
  z-index: 30;
  width: min(720px, calc(100vw - 32px));
  margin: 0;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 18px 46px rgb(45 32 74 / 16%);
  transform: translate(-50%, -8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.page-admin > .form-message[data-admin-message].is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.page-admin > .form-message[data-admin-message].is-hiding {
  opacity: 0;
  transform: translate(-50%, -6px);
}

.tool-tabs,
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-tabs span,
.admin-tabs span {
  display: inline-flex;
  min-width: 1.7em;
  height: 1.7em;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 0 6px;
  color: var(--color-primary-dark);
  background: rgb(118 87 255 / 10%);
  border-radius: 999px;
  font-size: 0.74rem;
  line-height: 1;
  vertical-align: middle;
}

.tool-tabs span:empty,
.admin-tabs span:empty {
  display: none;
}

.admin-logout {
  min-height: 46px;
}

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

.admin-refresh {
  min-height: 46px;
}

.tool-tabs button,
.admin-tabs button,
.tool-action,
.admin-action {
  min-height: 38px;
  padding: 8px 12px;
  color: var(--color-heading);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 750;
  white-space: nowrap;
  box-shadow: 0 0 0 rgb(45 32 74 / 0%);
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.tool-tabs button:hover,
.admin-tabs button:hover,
.tool-action:hover,
.admin-action:hover {
  border-color: rgb(118 87 255 / 28%);
  box-shadow: 0 10px 22px rgb(45 32 74 / 8%);
  transform: translateY(-1px);
}

.tool-tabs button:active,
.admin-tabs button:active,
.tool-action:active,
.admin-action:active {
  box-shadow: 0 5px 14px rgb(45 32 74 / 7%);
  transform: translateY(0);
}

.tool-action:disabled,
.admin-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
  transform: none;
}

.tool-tabs button[aria-selected="true"],
.admin-tabs button[aria-selected="true"],
.tool-action.primary,
.admin-action.primary {
  color: #fff;
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.tool-tabs button[aria-selected="true"] span,
.admin-tabs button[aria-selected="true"] span {
  color: #fff;
  background: rgb(255 255 255 / 18%);
}

.tool-action.danger,
.admin-action.danger {
  color: #fff;
  background: var(--color-danger);
  border-color: var(--color-danger);
}

.page-admin .admin-panel {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

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

.admin-panel-head h2 {
  margin: 0 0 5px;
}

.admin-panel-head p {
  margin: 0;
  color: var(--color-muted);
}

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

.admin-panel-actions .button-secondary {
  color: var(--color-primary-dark);
  background: #fff;
  border-color: rgb(118 87 255 / 18%);
  box-shadow: 0 8px 18px rgb(45 32 74 / 6%);
  backdrop-filter: none;
}

.admin-panel-actions .button-secondary:hover {
  background: #f8f5ff;
  border-color: rgb(118 87 255 / 32%);
}

.admin-filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(4, minmax(130px, 0.75fr)) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-filter-bar[data-admin-filter="accounts"] {
  grid-template-columns: minmax(260px, 2fr) repeat(2, minmax(140px, 0.8fr)) auto;
}

.admin-filter-bar[data-admin-filter="players"] {
  grid-template-columns: minmax(260px, 2fr) repeat(2, minmax(140px, 0.8fr)) auto;
}

.admin-search {
  position: relative;
  display: block;
}

.admin-search i {
  position: absolute;
  top: 50%;
  left: 14px;
  color: #8a829c;
  transform: translateY(-50%);
}

.admin-search input,
.admin-filter-bar select,
.admin-filter-bar .custom-select-button {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--color-heading);
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: none;
  font-weight: 500;
  line-height: 1.45;
}

.admin-search input {
  padding: 10px 14px 10px 40px;
}

.admin-filter-bar select {
  padding: 10px 38px 10px 12px;
  background-position: right 12px center;
}

.admin-filter-bar .custom-select-button {
  padding-right: 12px;
}

.admin-filter-bar .custom-select-popover {
  top: calc(100% + 6px);
  border-radius: 10px;
}

.admin-filter-bar .button-secondary {
  min-height: 44px;
  color: var(--color-primary-dark);
  background: #fff;
  border-color: rgb(118 87 255 / 18%);
  box-shadow: none;
  backdrop-filter: none;
}

.admin-filter-bar .button-secondary:hover {
  background: #f8f5ff;
  border-color: rgb(118 87 255 / 32%);
}

.admin-create-form {
  margin: 0 0 14px;
  padding: 14px;
  background: rgb(255 255 255 / 72%);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

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

.admin-record {
  display: grid;
  grid-template-columns: minmax(230px, 0.95fr) minmax(360px, 1.5fr) minmax(250px, 250px);
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.admin-record-top {
  min-width: 0;
}

.admin-record-title {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.admin-record-title strong,
.admin-record-subtitle,
.admin-meta-item strong,
.admin-detail-item dd {
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-record-title strong {
  color: var(--color-heading);
  font-size: 1rem;
  white-space: nowrap;
}

.admin-record-subtitle {
  margin: 4px 0 0;
  color: var(--color-muted);
  white-space: nowrap;
}

.admin-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  color: #4d465e;
  background: #f2eef9;
  border: 1px solid rgb(232 226 242 / 86%);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.admin-badge.success {
  color: #146c43;
  background: #eaf7ef;
  border-color: #caead6;
}

.admin-badge.warning {
  color: #815200;
  background: #fff4d6;
  border-color: #f3df9f;
}

.admin-badge.danger {
  color: #9f1c13;
  background: #fff0ed;
  border-color: #f0c9c3;
}

.admin-badge.muted {
  color: #665f72;
  background: #f4f1f8;
}

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

.admin-meta-item {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-meta-item span,
.admin-detail-item dt {
  color: var(--color-muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.admin-meta-item strong {
  color: var(--color-heading);
  font-size: 0.92rem;
  font-weight: 720;
  white-space: nowrap;
}

.admin-record-details {
  grid-column: 1 / 3;
  margin-top: -4px;
}

.admin-record-details summary {
  width: fit-content;
  color: var(--color-primary-dark);
  cursor: pointer;
  font-weight: 800;
}

.admin-detail-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 0;
}

.admin-detail-item {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-detail-item dd {
  margin: 0;
  color: var(--color-heading);
  overflow-wrap: anywhere;
}

.admin-detail-item a {
  color: var(--color-primary-dark);
  font-weight: 800;
}

.admin-record-attachment {
  min-width: 0;
  width: 100%;
}

.admin-record-attachment a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 3px 9px;
  min-height: 58px;
  padding: 10px 12px;
  color: var(--color-primary-dark);
  background: rgb(118 87 255 / 8%);
  border: 1px solid rgb(118 87 255 / 20%);
  border-radius: 8px;
  font-weight: 850;
  text-decoration: none;
}

.admin-record-attachment a:hover {
  background: rgb(118 87 255 / 13%);
  border-color: rgb(118 87 255 / 34%);
}

.admin-record-attachment i {
  grid-row: 1 / 3;
  font-size: 1.25rem;
}

.admin-record-attachment span,
.admin-record-attachment small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-record-attachment small {
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 750;
}

.admin-record-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
  width: 100%;
}

.tool-pagination,
.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin-top: 14px;
}

.tool-pagination-summary,
.admin-pagination-summary {
  color: var(--color-muted);
  font-weight: 500;
}

.tool-pagination-controls,
.admin-pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.tool-pagination-nav,
.admin-pagination-nav {
  display: inline-flex;
  gap: 8px;
}

.tool-pagination .tool-action,
.admin-pagination .admin-action {
  font-weight: 500;
}

.tool-pagination-jump,
.tool-pagination-jump label,
.admin-pagination-jump,
.admin-pagination-jump label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.tool-pagination-jump,
.admin-pagination-jump {
  margin: 0;
}

.tool-pagination-jump span,
.admin-pagination-jump span {
  color: var(--color-muted);
  font-weight: 500;
}

.tool-pagination-jump input,
.admin-pagination-jump input {
  width: 76px;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--color-heading);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-weight: 500;
  text-align: center;
}

.admin-empty {
  display: grid;
  align-content: center;
  justify-items: center;
  row-gap: 10px;
  min-height: 180px;
  color: var(--color-muted);
  background: rgb(255 255 255 / 72%);
  border: 1px dashed var(--color-border);
  border-radius: 8px;
}

.admin-empty i {
  font-size: 1.6rem;
}

.admin-empty p {
  margin: 0;
  font-weight: 750;
}

@media (max-width: 1180px) {
  .admin-filter-bar,
  .admin-filter-bar[data-admin-filter="accounts"],
  .admin-filter-bar[data-admin-filter="players"] {
    grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(130px, 0.7fr));
  }

  .admin-filter-bar .button {
    grid-column: auto;
  }

  .admin-record {
    grid-template-columns: minmax(220px, 0.9fr) minmax(300px, 1fr);
  }

  .admin-record-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .admin-record-attachment {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .admin-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-filter-bar,
  .admin-filter-bar[data-admin-filter="accounts"],
  .admin-filter-bar[data-admin-filter="players"] {
    grid-template-columns: 1fr;
  }

  .admin-record {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .admin-record-meta,
  .admin-detail-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-record-details,
  .admin-record-attachment,
  .admin-record-actions {
    grid-column: 1;
  }
}

@media (max-width: 520px) {
  .admin-record-meta,
  .admin-detail-list {
    grid-template-columns: 1fr;
  }

  .admin-record-actions,
  .tool-pagination-nav,
  .admin-pagination-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tool-pagination,
  .admin-pagination {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tool-pagination-controls,
  .admin-pagination-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tool-pagination-nav,
  .admin-pagination-nav {
    order: 1;
  }

  .tool-pagination-jump,
  .admin-pagination-jump {
    display: grid;
    grid-template-columns: 1fr auto;
    order: 2;
  }

  .tool-pagination-jump label,
  .admin-pagination-jump label {
    justify-content: start;
  }

  .admin-record-actions .admin-action,
  .tool-pagination-nav .tool-action,
  .admin-pagination-nav .admin-action,
  .tool-pagination-jump .tool-action,
  .admin-pagination-jump .admin-action {
    width: 100%;
  }

  .tool-pagination-summary,
  .admin-pagination-summary {
    text-align: center;
  }
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(190px, 1fr) minmax(160px, 0.85fr) auto auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.inline-form .password-field {
  min-width: 190px;
}

.inline-form .check-line {
  min-height: 46px;
  justify-content: center;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  white-space: nowrap;
}

.inline-form .button {
  min-height: 46px;
  white-space: nowrap;
}

.account-inline-form {
  grid-template-columns: minmax(220px, 1fr) minmax(200px, 0.9fr) auto auto;
}

.player-inline-form {
  grid-template-columns: minmax(150px, 0.9fr) minmax(220px, 1fr) minmax(190px, 0.95fr) auto auto;
}

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

.admin-panel table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  color: var(--color-heading);
}

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

.admin-panel th {
  color: var(--color-muted);
  font-size: 0.78rem;
  letter-spacing: 0;
  white-space: nowrap;
}

.admin-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 7px;
}

[hidden] { display: none !important; }

@media (max-width: 820px) {
  .home-hero {
    max-width: 680px;
    margin-inline: auto;
    grid-template-columns: 1fr;
  }

  .hero-copy { max-width: none; }

  .home-intro-overview,
  .home-intro-principles,
  .home-intro-features { grid-template-columns: 1fr; }

  .home-background-overlay {
    background:
      radial-gradient(ellipse 80% 72% at 50% 44%, rgb(12 8 24 / 72%) 0%, rgb(14 10 25 / 50%) 42%, rgb(12 8 24 / 0%) 100%),
      linear-gradient(90deg, rgb(12 8 24 / 70%) 0%, rgb(14 10 25 / 58%) 50%, rgb(12 8 24 / 70%) 100%),
      linear-gradient(0deg, rgb(11 8 18 / 78%), transparent 55%, rgb(8 6 14 / 40%));
  }

  .faq-layout { grid-template-columns: 1fr; }
  .faq-index { display: none; }

  .whitelist-layout,
  .account-overview,
  .account-dashboard,
  .account-settings,
  .rules-experience,
  .inline-form {
    grid-template-columns: 1fr;
  }

  .rules-confirm {
    grid-template-columns: 1fr;
  }

  .rules-confirm .form-message,
  .rules-confirm .check-line,
  .rules-confirm .button {
    grid-column: 1;
    grid-row: auto;
  }

  .admin-panel table,
  .admin-panel thead,
  .admin-panel tbody,
  .admin-panel tr,
  .admin-panel td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .admin-panel thead {
    display: none;
  }

  .admin-panel tr {
    padding: 14px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: 0 8px 22px rgb(45 32 74 / 6%);
  }

  .admin-panel tr + tr {
    margin-top: 12px;
  }

  .admin-panel td {
    display: grid;
    grid-template-columns: minmax(82px, 0.42fr) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 8px 0;
    border-bottom: 1px solid rgb(232 226 242 / 72%);
    overflow-wrap: anywhere;
  }

  .admin-panel td::before {
    color: var(--color-muted);
    content: attr(data-label);
    font-size: 0.78rem;
    font-weight: 800;
  }

  .admin-panel td:last-child {
    border-bottom: 0;
  }

  .admin-panel td.admin-actions {
    display: flex;
    flex-wrap: wrap;
    padding-top: 12px;
  }

  .admin-panel td.admin-actions::before {
    width: 82px;
    flex: 0 0 82px;
  }

  .admin-panel .table-wrap {
    overflow: visible;
  }
}

@media (max-width: 600px) {
  :root { --nav-height: 60px; }

  body {
    padding: calc(var(--nav-height) + 42px) 12px max(24px, calc(env(safe-area-inset-bottom) + 18px));
  }

  body.page-admin {
    padding-bottom: max(12px, calc(env(safe-area-inset-bottom) + 10px));
  }

  .site-header { inset: 8px 8px auto; }

  .navbar-container {
    gap: 6px;
    padding: 6px 7px;
    border-radius: 14px;
  }

  .brand {
    gap: 7px;
    padding-right: 0;
  }

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

  .brand-name { display: none; }

  .nav-links {
    flex: 1;
    justify-content: flex-end;
  }

  .nav-links a {
    width: 48px;
    height: 46px;
    min-height: 46px;
    padding: 8px;
    font-size: 1.05rem;
  }

  .nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .page-heading {
    margin-top: 10px;
    margin-bottom: 22px;
  }

  .page-heading::before { margin-bottom: 16px; }

  .page-home { padding-inline: 16px; }

  .home-main { padding-block: 112px 54px; }

  .home-hero { min-height: auto; }

  .home-main h1 { font-size: clamp(3.25rem, 18vw, 5rem); }

  .home-tagline br { display: none; }

  .hero-actions { flex-direction: column; }
  .account-main {
    gap: 14px;
  }

  .account-dashboard,
  .account-actions {
    gap: 12px;
    grid-template-columns: 1fr;
  }

  .account-overview {
    padding: 18px;
  }

  .account-panel-heading {
    gap: 10px;
  }

  .account-security .inline-form {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .account-security .inline-form .password-field,
  .account-email-form .button,
  .account-security .inline-form .button {
    width: 100%;
    min-width: 0;
  }

  .account-security .inline-form .button {
    justify-self: stretch;
  }

  .result-panel .hero-actions .button { max-width: none; }
  .hero-actions .button,
  .account-actions .button,
  .stack-form .button,
  .rules-confirm .button,
  .inline-form .button { width: 100%; }

  .intro-links { gap: 9px 18px; }

  .server-card { padding: 19px; }

  .home-intro-section {
    margin-top: 52px;
    padding-block: 58px 58px;
  }

  .home-intro-shell { padding: 0; }

  .home-intro-heading { margin-bottom: 18px; }

  .home-intro-status { padding: 18px; }

  .home-intro-status dl { grid-template-columns: 1fr 1fr; }

  .home-intro-actions { flex-direction: column; }

  .action-links { margin-bottom: 24px; }

  .faq-question { padding: 16px; }

  .faq-question > small { display: none; }

  .faq-answer { margin: 0 16px 16px; }

  .entry { padding: 17px; }

  .announcement-list {
    gap: 14px;
  }

  .entry-header { gap: 12px; }

  .announcement-entry .entry-header {
    align-items: stretch;
    flex-direction: column;
  }

  .announcement-entry .entry-header h2 {
    font-size: 1.18rem;
  }

  .entry-header time {
    align-self: flex-start;
    padding: 4px 7px;
    font-size: 0.76rem;
  }

  .entry-metadata { grid-template-columns: 1fr; }

  .announcement-entry .entry-summary {
    margin: 14px 0;
    line-height: 1.68;
  }

  .entry-actions { display: grid; grid-template-columns: 1fr; }
  .entry-action { width: 100%; }

  .announcement-entry .entry-story {
    margin-top: 14px;
    padding: 15px 16px;
  }

  .image-container { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .image-lightbox {
    width: calc(100vw - 20px);
    padding: 10px;
    border-radius: 14px;
  }

  .lightbox-close { top: 8px; right: 8px; }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-top: 28px;
    padding-inline: 4px;
    line-height: 1.35;
  }

  .page-admin .site-footer {
    margin-top: 18px;
  }

  .site-footer span {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .auth-panel,
  .side-panel,
  .admin-panel,
  .result-panel,
  .rules-reader-head,
  .rules-scroll {
    padding: 18px;
  }

  .rules-reader-head {
    align-items: stretch;
    flex-direction: column;
  }

  .rules-confirm { padding: 15px 18px; }
  .page-admin > .form-message[data-admin-message] {
    top: calc(var(--nav-height) + 14px);
    width: calc(100vw - 24px);
  }
  .tool-toolbar,
  .admin-toolbar { display: grid; grid-template-columns: 1fr; }

  .tool-toolbar-actions,
  .admin-toolbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
  }

  .tool-tabs,
  .admin-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .tool-tabs button,
  .admin-tabs button,
  .admin-logout,
  .admin-refresh { width: 100%; }

  .result-main {
    min-height: calc(100svh - var(--nav-height) - 128px);
  }
}

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

}
