/* =========================================================
   SWUSTMC Skin — 西南科技大学 Minecraft 星空社皮肤站
   Design tokens
   ========================================================= */
:root {
  --ink: #0d1926;
  --ink-2: #122436;
  --ink-3: #1a3248;
  --navy: #2c4c66;
  --navy-deep: #1d3b52;
  --navy-soft: #35597a;
  --ice: #9cc3e6;
  --ice-soft: #dce8f3;
  --gold: #e8c97a;
  --gold-deep: #cfaa55;
  --paper: #f4f6f9;
  --paper-warm: #f7f5f1;
  --white: #ffffff;
  --text: #1b2a38;
  --muted: #66788a;
  --muted-2: #8b9aaa;
  --line: rgba(19, 43, 64, 0.12);
  --line-strong: rgba(19, 43, 64, 0.2);
  --danger: #b44b4b;
  --success: #3c7a5b;
  --shadow-sm: 0 2px 10px rgba(15, 32, 48, 0.05);
  --shadow-md: 0 14px 40px rgba(15, 32, 48, 0.09);
  --shadow-lg: 0 30px 80px rgba(9, 21, 34, 0.18);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STZhongsong", "SimSun", serif;
  --font-mono: "SFMono-Regular", "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --header-height: 76px;
  --content-width: 1200px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 12% 0%, rgba(156, 195, 230, 0.16), transparent 48%),
    radial-gradient(ellipse at 88% 18%, rgba(232, 201, 122, 0.09), transparent 42%),
    var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::selection,
::selection {
  background: rgba(232, 201, 122, 0.5);
  color: var(--ink);
}

img,
canvas,
svg {
  display: block;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

code,
pre {
  font-family: var(--font-mono);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

/* =========================================================
   Boot
   ========================================================= */
.boot-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background:
    radial-gradient(circle at 50% 30%, rgba(53, 89, 122, 0.55), transparent 55%),
    var(--ink);
  color: rgba(255, 255, 255, 0.8);
  transition: opacity 0.3s ease;
}

.boot-screen.is-done {
  opacity: 0;
}

.boot-badge {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 0 60px rgba(156, 195, 230, 0.35);
  animation: boot-pulse 2.4s ease-in-out infinite;
}

.boot-screen p {
  font-size: 14px;
  letter-spacing: 0.12em;
}

@keyframes boot-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 0 50px rgba(156, 195, 230, 0.28); }
  50% { transform: scale(1.035); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.32), 0 0 90px rgba(156, 195, 230, 0.45); }
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(13, 25, 38, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  color: rgba(255, 255, 255, 0.86);
}

.header-inner {
  width: min(1280px, calc(100% - 48px));
  height: var(--header-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding: 4px 0;
}

.brand-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
}

.brand-copy small {
  margin-top: 4px;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.48);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
  white-space: nowrap;
}

.nav-link .nav-icon {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.nav-link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  transform: translateX(-50%);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions .btn-primary {
  background: linear-gradient(135deg, #efd48e, var(--gold));
  border-color: transparent;
  color: #16283a;
  box-shadow: 0 8px 24px rgba(232, 201, 122, 0.18);
}

.header-actions .btn-primary:hover {
  background: linear-gradient(135deg, #f4dda2, #edd28d);
}

.header-login {
  color: rgba(255, 255, 255, 0.8);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  color: rgba(255, 255, 255, 0.8);
}

.user-menu {
  position: relative;
}

.site-header .mobile-toggle {
  display: none;
}

.user-menu summary {
  list-style: none;
}

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

.user-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 10px 5px 5px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.2s;
}

.user-summary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.user-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.user-chevron {
  width: 14px;
  height: 14px;
  transform: rotate(90deg);
  color: rgba(255, 255, 255, 0.5);
}

.user-menu[open] .user-chevron {
  transform: rotate(-90deg);
}

.user-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 250px;
  padding: 8px;
  border-radius: 16px;
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  z-index: 70;
}

.user-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.user-panel-head div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-panel-head strong {
  font-size: 14px;
}

.user-panel-head span {
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-panel a,
.user-panel button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
  text-align: left;
  transition: background 0.18s;
}

.user-panel a .icon,
.user-panel button .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.user-panel a:hover,
.user-panel button:hover {
  background: var(--paper);
}

.user-panel .menu-danger {
  color: var(--danger);
  border-top: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
  margin-top: 4px;
}

.user-panel .menu-danger .icon {
  color: var(--danger);
}

/* Avatars */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.avatar-xs { width: 22px; height: 22px; font-size: 10px; }
.avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.avatar-md { width: 42px; height: 42px; font-size: 16px; }
.avatar-xl { width: 92px; height: 92px; font-size: 34px; }

/* =========================================================
   Announcement
   ========================================================= */
.announcement-bar {
  background: linear-gradient(90deg, rgba(44, 76, 102, 0.06), rgba(232, 201, 122, 0.12), rgba(44, 76, 102, 0.06));
  border-bottom: 1px solid var(--line);
}

.announcement-inner {
  width: min(var(--content-width), calc(100% - 56px));
  margin: 0 auto;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.announcement-icon {
  color: var(--gold-deep);
  display: flex;
}

.announcement-inner p {
  flex: 1;
  margin: 0;
  font-size: 13px;
  color: var(--navy);
}

.announcement-inner .icon-btn {
  color: var(--muted);
}

/* =========================================================
   Layout / common
   ========================================================= */
.site-main {
  min-height: 60vh;
  padding-bottom: 88px;
}

.site-main:focus,
.site-main:focus-visible {
  outline: none;
}

.page-enter {
  animation: page-in 0.5s var(--ease) both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.section,
.page-head,
.library-layout,
.player-grid,
.upload-layout,
.profile-hero,
.profile-stats,
.profile-grid,
.plugin-host,
.notfound,
.page-error,
.page-loading,
.info-strip {
  width: min(var(--content-width), calc(100% - 56px));
  margin-left: auto;
  margin-right: auto;
}

.section {
  padding-top: 72px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding-top: 56px;
  margin-bottom: 34px;
}

.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin: 6px 0 12px;
}

.page-head > div > p:last-child {
  max-width: 640px;
  color: var(--muted);
  font-size: 14.5px;
}

.page-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding-bottom: 4px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(232, 201, 122, 0.14);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.2;
  margin: 8px 0 8px;
}

.section-head p:last-child {
  color: var(--muted);
  font-size: 14px;
  max-width: 560px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  border-bottom: 1px solid rgba(44, 76, 102, 0.25);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.text-link .icon {
  width: 14px;
  height: 14px;
}

.text-link:hover {
  color: var(--gold-deep);
  border-color: var(--gold);
}

.muted-text {
  color: var(--muted);
  font-size: 13px;
}

.dot-sep {
  margin: 0 4px;
  color: var(--muted-2);
}

.count-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(44, 76, 102, 0.07);
  color: var(--navy);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(44, 76, 102, 0.16);
  background: rgba(44, 76, 102, 0.06);
  color: var(--navy);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.role-chip.muted {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

.type-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(44, 76, 102, 0.08);
  color: var(--navy);
}

.type-pill.cape {
  background: rgba(232, 201, 122, 0.18);
  color: #8a6a1f;
}

.type-pill.muted {
  background: var(--paper);
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill.online {
  background: rgba(60, 122, 91, 0.1);
  color: var(--success);
}

.status-pill.offline {
  background: rgba(102, 120, 138, 0.1);
  color: var(--muted);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.online .status-dot {
  box-shadow: 0 0 0 3px rgba(60, 122, 91, 0.14);
}

.danger-text {
  color: var(--danger) !important;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 19px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s;
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--navy-soft), var(--navy-deep));
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: 0 10px 26px rgba(23, 48, 70, 0.18);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3f6488, #24465f);
  box-shadow: 0 14px 30px rgba(23, 48, 70, 0.23);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--line);
  color: var(--navy);
}

.btn-ghost:hover {
  background: #fff;
  border-color: var(--line-strong);
}

.btn-danger {
  background: linear-gradient(135deg, #c25a5a, #9e3f3f);
  color: #fff;
  box-shadow: 0 10px 24px rgba(158, 63, 63, 0.2);
}

.btn-hero-ghost {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.btn-hero-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-sm {
  padding: 8px 13px;
  font-size: 12px;
}

.btn-sm .icon {
  width: 14px;
  height: 14px;
}

.btn-lg {
  padding: 14px 24px;
  font-size: 14.5px;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  transition: background 0.18s, color 0.18s;
}

.icon-btn:hover {
  background: rgba(19, 43, 64, 0.07);
}

.icon-btn .icon {
  width: 18px;
  height: 18px;
}

.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-weight: 600;
  border-bottom: 1px solid rgba(44, 76, 102, 0.3);
}

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

/* =========================================================
   Forms
   ========================================================= */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.field > span {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.04em;
}

.field input,
.field select,
.field textarea,
.search-box input,
.picker-search input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.field textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.65;
}

.field input::placeholder,
.field textarea::placeholder,
.search-box input::placeholder {
  color: var(--muted-2);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-box input:focus,
.picker-search input:focus {
  outline: none;
  border-color: rgba(44, 76, 102, 0.5);
  box-shadow: 0 0 0 4px rgba(44, 76, 102, 0.08);
  background: #fff;
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.field-hint {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted-2);
}

.input-with-action {
  position: relative;
}

.input-with-action input {
  padding-right: 46px;
}

.field-action {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
}

.field-action:hover,
.field-action.is-active {
  background: var(--paper);
  color: var(--navy);
}

.field-action .icon {
  width: 16px;
  height: 16px;
}

.form-error {
  padding: 10px 13px;
  border-radius: 10px;
  background: rgba(180, 75, 75, 0.08);
  border: 1px solid rgba(180, 75, 75, 0.18);
  color: var(--danger);
  font-size: 12.5px;
  line-height: 1.5;
}

.switch-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}

.switch-field > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.switch-field strong {
  font-size: 13px;
  color: var(--navy);
}

.switch-field small {
  font-size: 11.5px;
  color: var(--muted-2);
  line-height: 1.5;
}

.switch-field input[type="checkbox"] {
  appearance: none;
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #dfe6ec;
  position: relative;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.switch-field input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 32, 48, 0.18);
  transition: transform 0.22s var(--ease);
}

.switch-field input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--navy-soft), var(--navy-deep));
  border-color: var(--navy);
}

.switch-field input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}

.segmented {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.segmented button {
  padding: 8px 18px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}

.segmented button.is-active {
  background: #fff;
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.18s;
}

.chip:hover {
  border-color: var(--line-strong);
  color: var(--navy);
}

.chip.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  box-shadow: 0 8px 18px rgba(29, 59, 82, 0.18);
}

.chip-divider {
  width: 1px;
  height: 20px;
  background: var(--line);
  margin: 0 4px;
}

.filter-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 250px;
  padding: 0 14px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
}

.search-box .icon {
  width: 16px;
  height: 16px;
  opacity: 0.65;
}

.search-box input {
  flex: 1;
  min-height: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none !important;
  font-size: 13px;
}

.select-box select {
  height: 44px;
  padding: 0 36px 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background-color: #fff;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  font-size: 12.5px;
  color: var(--navy);
  font-weight: 600;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 14px 0 18px;
  border-bottom: 1px solid var(--line);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 2px;
  color: var(--muted);
  font-size: 12.5px;
}

.list-meta-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
}

.list-meta-hint .icon {
  width: 14px;
  height: 14px;
  color: var(--gold-deep);
}

/* =========================================================
   Home hero
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 74% 22%, rgba(61, 105, 143, 0.42), transparent 46%),
    radial-gradient(ellipse at 12% 78%, rgba(232, 201, 122, 0.12), transparent 42%),
    linear-gradient(160deg, #0e1c2b 0%, #14293c 58%, #0f2131 100%);
  color: #fff;
}

.hero-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1.2px 1.2px at 26% 32%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(1.8px 1.8px at 42% 12%, rgba(232, 201, 122, 0.8), transparent),
    radial-gradient(1.2px 1.2px at 58% 28%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1.6px 1.6px at 71% 9%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1.2px 1.2px at 84% 22%, rgba(156, 195, 230, 0.9), transparent),
    radial-gradient(1.6px 1.6px at 92% 44%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1.2px 1.2px at 8% 54%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.4px 1.4px at 33% 62%, rgba(232, 201, 122, 0.6), transparent),
    radial-gradient(1.2px 1.2px at 66% 58%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1.6px 1.6px at 88% 72%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.2px 1.2px at 18% 86%, rgba(156, 195, 230, 0.6), transparent);
  animation: star-twinkle 7s ease-in-out infinite;
  pointer-events: none;
}

@keyframes star-twinkle {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.hero::before {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  right: -140px;
  top: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(156, 195, 230, 0.13), transparent 62%);
  pointer-events: none;
}

.hero-orbit {
  position: absolute;
  right: -60px;
  top: 40px;
  width: 680px;
  height: 680px;
  pointer-events: none;
  opacity: 0.5;
}

.hero-orbit span {
  position: absolute;
  border: 1px solid rgba(156, 195, 230, 0.14);
  border-radius: 50%;
}

.hero-orbit span:nth-child(1) { inset: 0; }
.hero-orbit span:nth-child(2) { inset: 80px; border-color: rgba(232, 201, 122, 0.12); }
.hero-orbit span:nth-child(3) { inset: 170px; border-color: rgba(156, 195, 230, 0.1); }

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(var(--content-width), calc(100% - 56px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.96fr 1.04fr;
  gap: 48px;
  align-items: center;
  padding: 78px 0 46px;
}

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

.hero-eyebrow {
  color: rgba(255, 255, 255, 0.52);
}

.hero-copy h1 {
  margin: 22px 0 22px;
  font-family: var(--font-display);
  font-size: clamp(42px, 5.2vw, 68px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: 0.02em;
}

.hero-copy h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #fff 10%, var(--gold) 55%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 500px;
  font-size: 15px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.66);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.hero .btn-primary {
  background: linear-gradient(135deg, #f1d795, var(--gold));
  color: #16283a;
  box-shadow: 0 16px 38px rgba(232, 201, 122, 0.2);
}

.hero .btn-primary:hover {
  background: linear-gradient(135deg, #f6e2b0, #edd18a);
  box-shadow: 0 18px 42px rgba(232, 201, 122, 0.28);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 30px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

.hero-points li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hero-points .icon {
  width: 14px;
  height: 14px;
  color: var(--gold);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 18px 0 30px;
}

.hero-viewer-frame {
  position: relative;
  width: min(440px, 100%);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.13);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(9, 21, 34, 0.45);
  box-shadow: 0 40px 100px rgba(4, 12, 21, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.hero-viewer-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 36%, rgba(156, 195, 230, 0.14), transparent 55%);
  pointer-events: none;
}

.hero-viewer-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px 0;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.45);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7fc6a1;
  box-shadow: 0 0 0 4px rgba(127, 198, 161, 0.12);
}

.hero-viewer-index {
  margin-left: auto;
  font-family: var(--font-mono);
}

.hero-viewer-stage {
  position: relative;
  height: 380px;
}

.hero-viewer {
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.hero-viewer.is-grabbing,
.viewer-canvas.is-grabbing {
  cursor: grabbing;
}

.hero-viewer-fallback {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-viewer-glow {
  position: absolute;
  left: 50%;
  bottom: 26px;
  width: 220px;
  height: 34px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(156, 195, 230, 0.22), transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}

.hero-viewer-meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-viewer-meta div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-viewer-meta span {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
}

.hero-viewer-meta strong {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.04em;
}

.hero-viewer-meta small {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.45);
}

.hero-viewer-meta .btn {
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.04);
}

.hero-viewer-meta .btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hero-badge {
  position: absolute;
  z-index: 3;
  left: -28px;
  top: 44%;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 40px rgba(4, 12, 21, 0.5);
  transform: translateY(-50%) rotate(-6deg);
}

.hero-note {
  position: absolute;
  right: 8px;
  bottom: 2px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(9, 21, 34, 0.55);
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  backdrop-filter: blur(8px);
}

.hero-note .icon {
  width: 13px;
  height: 13px;
  color: var(--gold);
}

.hero-stats {
  position: relative;
  z-index: 1;
  width: min(var(--content-width), calc(100% - 56px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.hero-stat {
  padding: 24px 20px 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stat:last-child {
  border-right: 0;
}

.hero-stat strong {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.hero-stat span {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.38);
  text-transform: uppercase;
}

/* =========================================================
   Skin cards / grids
   ========================================================= */
.skin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.skin-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s;
}

.skin-card:hover {
  transform: translateY(-5px);
  border-color: rgba(44, 76, 102, 0.22);
  box-shadow: var(--shadow-md);
}

.skin-card-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 260px;
  padding: 14px;
  border: 0;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(156, 195, 230, 0.24), transparent 58%),
    linear-gradient(180deg, #eef3f8, #e5ebf2);
  cursor: pointer;
  overflow: hidden;
}

.skin-card-preview::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 24px;
  width: 120px;
  height: 20px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(44, 76, 102, 0.18), transparent 70%);
  filter: blur(4px);
}

.skin-card-preview.is-cape {
  background:
    radial-gradient(ellipse at 50% 42%, rgba(232, 201, 122, 0.18), transparent 58%),
    linear-gradient(180deg, #f2f0ea, #e9e4da);
}

.skin-canvas {
  position: relative;
  z-index: 1;
  height: 232px;
  width: auto;
  max-width: 100%;
  image-rendering: pixelated;
  filter: drop-shadow(0 12px 16px rgba(20, 42, 63, 0.16));
  transition: transform 0.35s var(--ease);
}

.skin-card:hover .skin-canvas {
  transform: translateY(-4px) scale(1.02);
}

.skin-canvas.is-cape {
  height: 210px;
}

.corner-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(232, 201, 122, 0.9);
  color: #4a3a15;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.card-hover {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 16px;
  transform: translate(-50%, 8px);
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(13, 25, 38, 0.82);
  color: #fff;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  opacity: 0;
  transition: opacity 0.24s, transform 0.24s;
  backdrop-filter: blur(6px);
}

.skin-card:hover .card-hover {
  opacity: 1;
  transform: translate(-50%, 0);
}

.skin-card-body {
  padding: 15px 17px 17px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.skin-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.skin-card-title h3 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skin-card-body p {
  font-size: 11.5px;
  color: var(--muted-2);
}

.private-badge,
.type-tag {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(180, 75, 75, 0.09);
  color: var(--danger);
  font-size: 9.5px;
  font-weight: 700;
}

.type-tag {
  background: rgba(44, 76, 102, 0.07);
  color: var(--navy);
}

.skin-card.is-compact .skin-card-preview {
  height: 172px;
}

.skin-card.is-compact .skin-canvas {
  height: 150px;
}

.skin-card.is-compact .skin-card-body {
  padding: 12px 14px 14px;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 34px 0 8px;
}

.pager-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--navy);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.18s;
}

.pager-btn:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: #fff;
}

.pager-btn.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.pager-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pager-btn .icon {
  width: 15px;
  height: 15px;
}

.pager-next .icon {
  transform: none;
}

.pager-btn[aria-label="上一页"] .icon {
  transform: rotate(180deg);
}

.pager-gap {
  padding: 0 4px;
  color: var(--muted-2);
}

.pager-label {
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
}

/* =========================================================
   Features / join
   ========================================================= */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  position: relative;
  padding: 30px 26px 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(156, 195, 230, 0.16), transparent 50%),
    #fff;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(44, 76, 102, 0.1), rgba(156, 195, 230, 0.18));
  color: var(--navy);
  margin-bottom: 20px;
}

.feature-icon .icon {
  width: 22px;
  height: 22px;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 21px;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 13px;
  line-height: 1.85;
  color: var(--muted);
}

.feature-tag {
  display: inline-block;
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--muted-2);
}

.join-section {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  margin-top: 84px;
  padding: 52px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(ellipse at 90% 10%, rgba(156, 195, 230, 0.18), transparent 42%),
    radial-gradient(ellipse at 10% 90%, rgba(232, 201, 122, 0.1), transparent 40%),
    linear-gradient(150deg, #122436, #1a3248);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.join-section .eyebrow {
  color: rgba(255, 255, 255, 0.4);
}

.join-section h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.2vw, 40px);
  line-height: 1.25;
  margin: 10px 0 28px;
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step-list li {
  display: flex;
  gap: 18px;
}

.step-number {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--gold);
  opacity: 0.85;
}

.step-list strong {
  display: block;
  font-size: 14.5px;
  margin-bottom: 4px;
}

.step-list p {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.52);
  line-height: 1.7;
}

.join-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.join-section .btn-primary {
  background: linear-gradient(135deg, #f1d795, var(--gold));
  color: #16283a;
}

.join-section .btn-ghost {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.code-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(6, 16, 27, 0.55);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.code-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
}

.code-card-head .icon-btn {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.6);
  width: 30px;
  height: 30px;
}

.code-card-head .icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.code-dots {
  display: flex;
  gap: 5px;
}

.code-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.code-dots i:first-child { background: #c97a7a; }
.code-dots i:nth-child(2) { background: #c9b07a; }
.code-dots i:nth-child(3) { background: #7fb89a; }

.code-block {
  display: block;
  padding: 24px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--gold);
  word-break: break-all;
  overflow-x: auto;
}

.code-block.small {
  font-size: 11.5px;
  color: var(--navy);
  background: var(--paper);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--line);
}

.code-hint {
  padding: 0 20px 16px;
  font-size: 11.5px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.5);
}

.code-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.38);
  font-size: 9.5px;
  letter-spacing: 0.08em;
}

.code-foot span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.code-foot .icon {
  width: 13px;
  height: 13px;
  color: var(--gold);
}

/* =========================================================
   Auth
   ========================================================= */
.auth-page {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  min-height: calc(100vh - var(--header-height));
}

.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px clamp(36px, 6vw, 96px);
  background:
    radial-gradient(ellipse at 78% 18%, rgba(156, 195, 230, 0.2), transparent 46%),
    radial-gradient(ellipse at 12% 86%, rgba(232, 201, 122, 0.1), transparent 40%),
    linear-gradient(155deg, #0e1c2b, #173049 62%, #0f2131);
  color: #fff;
  overflow: hidden;
}

.auth-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.3px 1.3px at 18% 22%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1.1px 1.1px at 36% 12%, rgba(232, 201, 122, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 62% 26%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.1px 1.1px at 82% 16%, rgba(156, 195, 230, 0.8), transparent),
    radial-gradient(1.4px 1.4px at 74% 54%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.1px 1.1px at 22% 64%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.4px 1.4px at 88% 78%, rgba(232, 201, 122, 0.5), transparent);
  opacity: 0.8;
}

.auth-badge-wrap {
  position: relative;
  z-index: 1;
  margin-bottom: 40px;
}

.auth-badge {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 40px rgba(4, 12, 21, 0.5);
}

.auth-quote {
  position: relative;
  z-index: 1;
  max-width: 520px;
}

.auth-quote .eyebrow {
  color: rgba(255, 255, 255, 0.4);
}

.auth-quote h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.25;
  margin: 16px 0 20px;
  letter-spacing: 0.02em;
}

.auth-quote h1 span {
  color: var(--gold);
}

.auth-quote > p:last-child {
  font-size: 13.5px;
  line-height: 1.95;
  color: rgba(255, 255, 255, 0.58);
  max-width: 460px;
}

.auth-points {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.55);
  font-size: 12.5px;
}

.auth-points li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-points .icon {
  width: 15px;
  height: 15px;
  color: var(--gold);
}

.auth-back {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11.5px;
  letter-spacing: 0.06em;
}

.auth-back .icon {
  width: 14px;
  height: 14px;
  transform: rotate(180deg);
}

.auth-back:hover {
  color: #fff;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background:
    radial-gradient(ellipse at 18% 10%, rgba(156, 195, 230, 0.14), transparent 45%),
    var(--paper-warm);
}

.auth-card {
  width: min(440px, 100%);
  padding: 30px 32px 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

.auth-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  margin-bottom: 26px;
}

.auth-tabs button {
  flex: 1;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.18s;
}

.auth-tabs button.is-active {
  background: #fff;
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.auth-heading {
  margin-bottom: 22px;
}

.auth-heading h2 {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.3;
  margin: 6px 0 6px;
}

.auth-heading > p:last-child {
  font-size: 12.5px;
  color: var(--muted);
}

.auth-form form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form .btn-block {
  margin-top: 4px;
}

.auth-switch {
  margin-top: 20px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

.auth-footnote {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted-2);
}

.auth-closed {
  padding: 24px;
  border-radius: 14px;
  background: var(--paper);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.auth-closed .icon {
  width: 34px;
  height: 34px;
  margin: 0 auto 12px;
  color: var(--gold-deep);
}

/* =========================================================
   Player pages
   ========================================================= */
.info-strip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 28px;
  border-radius: 14px;
  border: 1px solid rgba(44, 76, 102, 0.12);
  background: rgba(44, 76, 102, 0.05);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.info-strip .icon {
  width: 16px;
  height: 16px;
  color: var(--navy);
  margin-top: 1px;
}

.player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(430px, 1fr));
  gap: 20px;
}

.player-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  min-height: 290px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.24s var(--ease), box-shadow 0.24s;
}

.player-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.player-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(156, 195, 230, 0.28), transparent 58%),
    linear-gradient(180deg, #edf2f7, #e2e9f0);
  overflow: hidden;
}

.player-skin-canvas {
  height: 250px;
  width: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 12px 16px rgba(20, 42, 63, 0.18));
}

.player-cape-canvas {
  position: absolute;
  right: 10px;
  bottom: 16px;
  height: 88px;
  width: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 6px 10px rgba(20, 42, 63, 0.2));
}

.player-model-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(13, 25, 38, 0.72);
  color: #fff;
  font-size: 9.5px;
  letter-spacing: 0.08em;
}

.player-empty-label {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--muted-2);
  white-space: nowrap;
}

.player-card-body {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 20px;
}

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

.player-card-head h3 {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.2;
}

.uuid-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.uuid-copy:hover {
  color: var(--navy);
}

.uuid-copy .icon {
  width: 12px;
  height: 12px;
}

.player-meta {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 20px;
}

.player-empty {
  grid-column: 1 / -1;
}

/* Appearance dialog */
.appearance-dialog {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.appearance-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.appearance-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 210px;
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(156, 195, 230, 0.25), transparent 58%),
    #e7edf3;
  overflow: hidden;
}

.appearance-preview.cape-preview {
  background:
    radial-gradient(ellipse at 50% 40%, rgba(232, 201, 122, 0.2), transparent 58%),
    #efece5;
}

.appearance-skin-canvas {
  height: 190px;
  width: auto;
  image-rendering: pixelated;
}

.appearance-cape-canvas {
  height: 150px;
  width: auto;
  image-rendering: pixelated;
}

.appearance-empty {
  color: var(--muted-2);
}

.appearance-empty .icon {
  width: 40px;
  height: 40px;
}

.appearance-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.appearance-info h3 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 4px 0 4px;
}

.appearance-info p {
  font-size: 12.5px;
  color: var(--muted);
}

.appearance-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.player-pick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  text-align: left;
  transition: all 0.18s;
}

.player-pick:hover {
  border-color: var(--navy);
  background: var(--paper);
}

.player-pick-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.player-pick-info small {
  color: var(--muted-2);
  font-size: 11px;
}

.player-pick > .icon {
  width: 16px;
  height: 16px;
  color: var(--muted-2);
}

/* =========================================================
   Closet
   ========================================================= */
.closet-toolbar {
  border-bottom: 0;
  padding-bottom: 10px;
}

.closet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.closet-actions .btn {
  padding: 7px 10px;
  font-size: 11px;
}

/* =========================================================
   Upload
   ========================================================= */
.upload-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 28px;
  align-items: start;
}

.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 430px;
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1.5px dashed rgba(44, 76, 102, 0.25);
  background:
    radial-gradient(ellipse at 50% 30%, rgba(156, 195, 230, 0.16), transparent 50%),
    rgba(255, 255, 255, 0.66);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.dropzone:hover,
.dropzone.is-dragging {
  border-color: var(--navy);
  background:
    radial-gradient(ellipse at 50% 30%, rgba(156, 195, 230, 0.24), transparent 55%),
    rgba(255, 255, 255, 0.9);
}

.dropzone.is-dragging {
  transform: scale(1.005);
}

.dropzone.has-file {
  border-style: solid;
  border-color: var(--line);
  cursor: default;
}

.dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.dropzone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(44, 76, 102, 0.09), rgba(156, 195, 230, 0.22));
  color: var(--navy);
  margin-bottom: 6px;
}

.dropzone-icon .icon {
  width: 30px;
  height: 30px;
}

.dropzone h2 {
  font-family: var(--font-display);
  font-size: 24px;
}

.dropzone p {
  font-size: 12px;
  color: var(--muted);
}

.dropzone .btn {
  margin-top: 12px;
  pointer-events: none;
}

.dropzone.has-file .dropzone-inner {
  flex-direction: row;
  gap: 28px;
  width: 100%;
  text-align: left;
}

.upload-preview-stage {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 360px;
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(156, 195, 230, 0.28), transparent 58%),
    #e9eff5;
}

.upload-preview-stage .upload-preview-canvas {
  height: 330px;
  width: auto;
  image-rendering: pixelated;
}

.upload-preview-stage .upload-preview-canvas.is-cape {
  height: 300px;
}

.upload-preview-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.upload-preview-copy strong {
  font-size: 16px;
  word-break: break-all;
}

.upload-preview-copy span {
  font-size: 12px;
  color: var(--muted);
}

.upload-preview-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 18px;
  margin-top: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  color: var(--muted);
}

.upload-preview-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.upload-preview-meta .icon {
  width: 14px;
  height: 14px;
  color: var(--success);
}

.upload-preview-meta .link-button {
  margin-left: auto;
  font-size: 12px;
}

.upload-guidelines {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.upload-guidelines article {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
}

.upload-guidelines article > span {
  color: var(--navy);
  margin-top: 2px;
}

.upload-guidelines article .icon {
  width: 17px;
  height: 17px;
}

.upload-guidelines strong {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}

.upload-guidelines p {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.65;
}

.upload-form-card {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}

.upload-form-head {
  padding-bottom: 4px;
}

.upload-form-head h2 {
  font-family: var(--font-display);
  font-size: 24px;
  margin-top: 4px;
}

.upload-server-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.upload-server-hint .icon {
  width: 13px;
  height: 13px;
}

.model-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.model-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.model-option-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: all 0.18s;
}

.model-option-body strong {
  font-size: 13px;
}

.model-option-body small {
  font-size: 10.5px;
  color: var(--muted-2);
}

.model-option input:checked + .model-option-body {
  border-color: var(--navy);
  background: rgba(44, 76, 102, 0.05);
  box-shadow: 0 0 0 3px rgba(44, 76, 102, 0.06);
}

/* =========================================================
   Profile
   ========================================================= */
.profile-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 42px;
  margin-top: 48px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(ellipse at 88% 12%, rgba(156, 195, 230, 0.2), transparent 44%),
    linear-gradient(140deg, #132638, #1d3b52);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 24px;
}

.profile-identity .avatar-xl {
  border: 3px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 30px rgba(4, 12, 21, 0.35);
}

.profile-identity .eyebrow {
  color: rgba(255, 255, 255, 0.4);
}

.profile-identity h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.15;
  margin: 6px 0 4px;
}

.profile-email {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.profile-tags {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.profile-hero .role-chip {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
}

.profile-hero .role-chip.muted {
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
}

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

.profile-hero .btn-ghost {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.profile-hero .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.profile-hero .danger-text {
  color: #f0b0b0 !important;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.profile-stat {
  padding: 20px 24px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-stat:last-child {
  border-right: 0;
}

.profile-stat strong {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
}

.profile-stat span {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.profile-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 20px;
  margin-top: 24px;
  align-items: start;
}

.profile-main,
.profile-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel {
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-sm);
}

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

.panel-head h2,
.panel-head h3 {
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 1.25;
  margin-top: 3px;
}

.panel-head.sub {
  margin-top: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.panel-lead {
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted);
}

.panel-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
}

.panel-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-list .icon {
  width: 14px;
  height: 14px;
  color: var(--success);
}

.panel-divider {
  height: 1px;
  margin: 22px 0 18px;
  background: var(--line);
}

.panel-subtitle {
  font-size: 13px;
  color: var(--navy);
  margin-bottom: 6px;
}

.copy-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  min-width: 0;
}

.copy-field code {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: var(--navy);
  word-break: break-all;
}

.shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shortcut-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 10px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--text);
  transition: background 0.18s;
}

.shortcut-list a:hover {
  background: var(--paper);
}

.shortcut-list a .icon:first-child {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.shortcut-list a .icon:last-child {
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: var(--muted-2);
}

.profile-uploads {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

.profile-uploads + .btn-block {
  margin-top: 18px;
}

/* =========================================================
   Admin
   ========================================================= */
.admin-shell {
  width: min(1320px, calc(100% - 48px));
  margin: 36px auto 0;
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.admin-side {
  position: sticky;
  top: calc(var(--header-height) + 22px);
  min-width: 0;
  padding: 26px 18px 20px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse at 80% 0%, rgba(156, 195, 230, 0.16), transparent 44%),
    linear-gradient(160deg, #122436, #1a3248);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.admin-side-head {
  padding: 0 8px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.admin-side-head .eyebrow {
  color: rgba(255, 255, 255, 0.38);
}

.admin-side-head h1 {
  font-family: var(--font-display);
  font-size: 27px;
  margin: 6px 0 6px;
}

.admin-side-head p:last-child {
  font-size: 11.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.45);
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 11px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  transition: all 0.18s;
}

.admin-nav a .icon {
  width: 17px;
  height: 17px;
  opacity: 0.7;
}

.admin-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.admin-nav a.is-active {
  background: rgba(232, 201, 122, 0.14);
  color: #fff;
  box-shadow: inset 2px 0 0 var(--gold);
}

.admin-nav a.is-active .icon {
  color: var(--gold);
  opacity: 1;
}

.admin-side-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.admin-side-foot a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
}

.admin-side-foot a:hover {
  color: #fff;
}

.admin-side-foot a .icon {
  width: 13px;
  height: 13px;
  transform: rotate(180deg);
}

.admin-side-foot span {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.06em;
}

.admin-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 2px 6px;
}

.admin-page-head h2 {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1.2;
  margin: 5px 0 4px;
}

.admin-page-head p:last-child {
  font-size: 12.5px;
  color: var(--muted);
}

.admin-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 4px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(44, 76, 102, 0.08);
  color: var(--navy);
}

.stat-icon .icon {
  width: 18px;
  height: 18px;
}

.stat-card > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.stat-card strong {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
  color: var(--navy);
}

.stat-card span {
  font-size: 11.5px;
  color: var(--muted);
}

.stat-card small {
  font-size: 10.5px;
  color: var(--muted-2);
}

.admin-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.mini-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mini-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 6px;
  border-radius: 10px;
}

.mini-row:hover {
  background: var(--paper);
}

.mini-row > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.mini-row strong {
  font-size: 12.5px;
}

.mini-row span {
  font-size: 10.5px;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-meta {
  flex: 0 0 auto;
}

.runtime-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.runtime-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.runtime-list > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.runtime-list dt {
  font-size: 11.5px;
  color: var(--muted);
  flex: 0 0 auto;
}

.runtime-list dd {
  font-size: 11.5px;
  color: var(--navy);
  text-align: right;
  word-break: break-all;
}

.runtime-list code {
  font-size: 10.5px;
}

.admin-recent-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.table-panel {
  padding: 6px 0 0;
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.data-table th {
  padding: 12px 18px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  background: rgba(244, 246, 249, 0.7);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: rgba(244, 246, 249, 0.6);
}

.table-actions-col {
  text-align: right !important;
}

.table-actions {
  text-align: right;
  white-space: nowrap;
}

.table-actions .btn {
  margin-left: 5px;
  padding: 6px 9px;
  font-size: 10.5px;
}

.table-actions .btn:first-child {
  margin-left: 0;
}

.table-actions .btn .icon {
  width: 13px;
  height: 13px;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.user-cell > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-cell strong {
  font-size: 12.5px;
}

.user-cell span {
  font-size: 10.5px;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.name-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.name-cell code {
  font-size: 9.5px;
  color: var(--muted-2);
}

.num-pair {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.texture-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
}

.texture-cell > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.texture-cell strong {
  font-size: 12.5px;
}

.texture-cell span {
  font-size: 10px;
  color: var(--muted-2);
}

.admin-thumb {
  width: 36px;
  height: 72px;
  image-rendering: pixelated;
  flex: 0 0 auto;
}

.admin-thumb.is-cape {
  width: 45px;
  height: 72px;
}

.admin-pager {
  padding-top: 18px;
}

/* Plugin admin */
.plugin-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
}

.plugin-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}

.plugin-card.has-error {
  border-color: rgba(180, 75, 75, 0.3);
}

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

.plugin-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.plugin-card-title h3 {
  font-family: var(--font-display);
  font-size: 21px;
}

.plugin-card-head p {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--muted);
}

.plugin-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--muted-2);
}

.plugin-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.plugin-chips code {
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 9.5px;
  color: var(--navy);
}

.plugin-error {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(180, 75, 75, 0.08);
  color: var(--danger);
  font-size: 10.5px;
}

.plugin-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.plugin-help {
  margin-top: 4px;
}

.scan-errors {
  grid-column: 1 / -1;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid rgba(180, 75, 75, 0.18);
  background: rgba(180, 75, 75, 0.05);
  font-size: 11px;
  color: var(--muted);
}

.scan-errors strong {
  display: block;
  margin-bottom: 6px;
  color: var(--danger);
  font-size: 12px;
}

.scan-errors p {
  margin-top: 3px;
}

.upload-button {
  position: relative;
  overflow: hidden;
}

.settings-layout {
  align-items: start;
}

/* =========================================================
   Plugin pages
   ========================================================= */
.plugin-host {
  padding-top: 28px;
}

.plugin-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 2px 22px;
  font-size: 11.5px;
  color: var(--muted);
}

.plugin-breadcrumb a:hover {
  color: var(--navy);
}

.plugin-breadcrumb .icon {
  width: 12px;
  height: 12px;
  color: var(--muted-2);
}

.plugin-version {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--muted-2);
}

.plugin-shell {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.plugin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.plugin-head h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.15;
  margin: 6px 0 6px;
}

.plugin-lead {
  max-width: 640px;
  font-size: 13px;
  color: var(--muted);
}

.plugin-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.plugin-loading {
  grid-column: 1 / -1;
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
}

.plugin-footnote {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--muted-2);
}

.plugin-footnote:empty {
  display: none;
}

.plugin-skin-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.plugin-info {
  margin-top: 8px;
}

/* Server status plugin */
.server-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

.server-summary-item {
  padding: 18px 20px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.server-summary-item:last-child {
  border-right: 0;
}

.server-summary-item span {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.server-summary-item strong {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--navy);
}

.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.server-card {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(156, 195, 230, 0.13), transparent 50%),
    rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}

.server-card.is-online {
  border-color: rgba(60, 122, 91, 0.24);
}

.server-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.server-latency {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted-2);
}

.server-card h3 {
  font-family: var(--font-display);
  font-size: 23px;
  margin: 14px 0 12px;
}

.server-address {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.server-address code {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-editor {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
}

.section-heading h2 {
  font-family: var(--font-display);
  font-size: 24px;
}

.section-heading p {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.server-editor-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
}

.server-editor-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr 100px auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.server-editor-row label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.server-editor-row label span {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
}

.server-editor-row input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
}

.server-editor-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* Plugin cards used by random-skin */
.plugin-card .skin-card-preview,
.plugin-skin-grid .skin-card-preview {
  height: 232px;
}

/* =========================================================
   Modal
   ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 17, 27, 0.6);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.24s ease, backdrop-filter 0.24s ease;
  overflow-y: auto;
}

.modal-overlay.is-open {
  opacity: 1;
}

.modal-overlay.is-closing {
  pointer-events: none;
  opacity: 0;
  backdrop-filter: blur(0);
}

.modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 40px 100px rgba(4, 12, 21, 0.4);
  transform: translateY(24px) scale(0.96);
  transform-origin: 50% 55%;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
}

.modal-overlay.is-open .modal {
  transform: none;
}

.modal-overlay.is-closing .modal {
  transform: translateY(16px) scale(0.97);
}

.modal-sm { width: min(440px, 100%); }
.modal-lg { width: min(980px, 100%); }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}

.modal-head h2 {
  font-family: var(--font-display);
  font-size: 21px;
}

.modal-head .icon-btn {
  color: var(--muted);
}

.modal-body {
  padding: 22px;
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: rgba(244, 246, 249, 0.6);
  flex: 0 0 auto;
}

.confirm-message {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

/* Texture detail */
.texture-detail {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
}

.detail-view {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(156, 195, 230, 0.24), transparent 58%),
    linear-gradient(160deg, #edf2f7, #e3eaf1);
  min-height: 460px;
  overflow: hidden;
}

.viewer-canvas {
  width: 100%;
  height: 400px;
  cursor: grab;
  touch-action: none;
}

.viewer-canvas.is-grabbing {
  cursor: grabbing;
}

.viewer-fallback {
  width: 100%;
  height: 400px;
  object-fit: contain;
}

.viewer-hint {
  text-align: center;
  padding: 0 12px 6px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}

.viewer-tools {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 12px 14px;
}

.viewer-tools .btn {
  background: rgba(255, 255, 255, 0.7);
}

.viewer-fallback-note {
  padding: 0 12px 14px;
  font-size: 10.5px;
  color: var(--muted-2);
  text-align: center;
}

.detail-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.detail-eyebrow {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.detail-info h2 {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.25;
  word-break: break-word;
}

.detail-owner {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.detail-owner span {
  margin-left: 4px;
  color: var(--muted-2);
}

.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 22px 0;
  padding: 18px;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.detail-meta > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-meta dt {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.detail-meta dd {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy);
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-actions .btn {
  justify-content: flex-start;
}

.detail-manage {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* Picker */
.texture-picker {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.picker-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
}

.picker-search .icon {
  width: 15px;
  height: 15px;
}

.picker-search input {
  flex: 1;
  min-height: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none !important;
  font-size: 12.5px;
}

.picker-count {
  font-size: 10.5px;
  color: var(--muted-2);
}

.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding: 2px;
}

.picker-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: center;
  transition: all 0.18s;
}

.picker-card:hover,
.picker-card.is-selected {
  border-color: var(--navy);
  background: rgba(44, 76, 102, 0.04);
}

.picker-card.is-selected {
  box-shadow: 0 0 0 3px rgba(44, 76, 102, 0.08);
}

.picker-card canvas {
  height: 130px;
  width: auto;
  image-rendering: pixelated;
}

.picker-card canvas[data-skin-type="cape"] {
  height: 110px;
}

.picker-card span {
  max-width: 100%;
  font-size: 11.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker-card small {
  font-size: 9.5px;
  color: var(--muted-2);
}

/* =========================================================
   Toast / loading / empty
   ========================================================= */
.toast-root {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 380px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(13, 25, 38, 0.94);
  color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 40px rgba(4, 12, 21, 0.35);
  font-size: 12.5px;
  line-height: 1.55;
  opacity: 0;
  transform: translate3d(14px, 18px, 0) scale(0.94);
  filter: blur(2px);
  transition:
    opacity 0.24s ease,
    transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.24s ease;
  pointer-events: auto;
  cursor: pointer;
  backdrop-filter: blur(10px);
  will-change: opacity, transform;
}

.toast.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

.toast.is-leaving {
  opacity: 0;
  transform: translate3d(10px, 12px, 0) scale(0.96);
  filter: blur(1px);
  transition-duration: 0.2s;
}

.toast-icon {
  display: flex;
  color: var(--ice);
  margin-top: 1px;
}

.toast-icon .icon {
  width: 16px;
  height: 16px;
}

.toast-success .toast-icon { color: #8fd0af; }
.toast-error .toast-icon { color: #e8a0a0; }
.toast-info .toast-icon { color: var(--gold); }

.toast-text {
  min-width: 0;
}

.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(44, 76, 102, 0.2);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex: 0 0 auto;
}

.btn .spinner {
  border-color: rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
}

.btn-ghost .spinner {
  border-color: rgba(44, 76, 102, 0.2);
  border-top-color: var(--navy);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 180px;
  padding: 32px;
  color: var(--muted);
  font-size: 12.5px;
}

.page-loading {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--muted);
  font-size: 12.5px;
}

.page-loading .spinner {
  width: 22px;
  height: 22px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 54px 24px;
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.55);
}

.empty-state.compact {
  padding: 28px 18px;
  border: 0;
  background: transparent;
}

.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(44, 76, 102, 0.07);
  color: var(--navy);
  margin-bottom: 14px;
}

.empty-icon .icon {
  width: 24px;
  height: 24px;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 21px;
  margin-bottom: 6px;
}

.empty-state p {
  max-width: 420px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 16px;
}

.empty-state .btn {
  margin-top: 4px;
}

.page-error,
.notfound {
  min-height: 52vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 20px;
}

.notfound-code {
  font-family: var(--font-display);
  font-size: clamp(80px, 16vw, 150px);
  line-height: 1;
  color: rgba(44, 76, 102, 0.12);
}

.notfound h1,
.page-error h1 {
  font-family: var(--font-display);
  font-size: 30px;
  margin: 8px 0 8px;
}

.notfound p,
.page-error p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 20px;
}

.page-error .empty-icon {
  width: 62px;
  height: 62px;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  position: relative;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(156, 195, 230, 0.13), transparent 44%),
    radial-gradient(ellipse at 90% 100%, rgba(232, 201, 122, 0.08), transparent 36%),
    linear-gradient(180deg, #0d1926, #0a141f);
  color: rgba(255, 255, 255, 0.55);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 8% 30%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 28% 64%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1.2px 1.2px at 48% 22%, rgba(232, 201, 122, 0.45), transparent),
    radial-gradient(1px 1px at 68% 52%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1.2px 1.2px at 86% 28%, rgba(156, 195, 230, 0.45), transparent);
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
  width: min(var(--content-width), calc(100% - 56px));
  margin: 0 auto;
  padding: 52px 0 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 32px;
}

.footer-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.footer-brand img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.footer-brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  color: rgba(255, 255, 255, 0.86);
  letter-spacing: 0.03em;
}

.footer-brand p {
  margin-top: 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.45);
  width: fit-content;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-links .icon {
  width: 12px;
  height: 12px;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  align-content: flex-start;
}

.footer-meta span {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  width: 100%;
}

.footer-meta code {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  padding: 6px 9px;
  word-break: break-all;
}

.footer-meta .btn {
  border-color: rgba(255, 255, 255, 0.12);
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
}

.footer-meta .btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.footer-copy {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.26);
}

.footer-copy a {
  color: rgba(255, 255, 255, 0.42);
}

.footer-copy a:hover {
  color: var(--gold);
}

/* Misc */
.noscript {
  padding: 20px;
  background: #1d3b52;
  color: #fff;
  text-align: center;
  font-size: 13px;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1120px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  .hero-viewer-frame {
    width: 100%;
  }
  .hero-badge {
    width: 88px;
    height: 88px;
  }
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .profile-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
  .player-grid {
    grid-template-columns: repeat(auto-fill, minmax(390px, 1fr));
  }
}

@media (max-width: 1020px) {
  .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-height);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 20px 18px;
    background: #0d1926;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(4, 12, 21, 0.4);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
  }
  .site-header.nav-open .main-nav {
    display: flex;
  }
  .nav-link {
    padding: 12px 14px;
    border-radius: 10px;
  }
  .site-header .mobile-toggle {
    display: inline-flex;
  }
  .header-actions {
    margin-left: 0;
  }
  .header-inner {
    gap: 14px;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-top: 56px;
  }
  .hero-copy {
    max-width: none;
  }
  .hero-visual {
    padding-bottom: 36px;
  }
  .hero-viewer-frame {
    max-width: 460px;
    margin: 0 auto;
  }
  .hero-orbit {
    right: 50%;
    transform: translateX(50%);
    top: 30px;
    width: 540px;
    height: 540px;
  }
  .join-section {
    grid-template-columns: 1fr;
    padding: 38px;
  }
  .auth-page {
    grid-template-columns: 1fr;
  }
  .auth-visual {
    min-height: 320px;
    padding: 42px 32px;
  }
  .auth-badge-wrap {
    margin-bottom: 22px;
  }
  .auth-badge {
    width: 74px;
    height: 74px;
  }
  .auth-quote h1 {
    font-size: 36px;
  }
  .auth-points {
    display: none;
  }
  .auth-back {
    margin-top: 20px;
  }
  .upload-layout {
    grid-template-columns: 1fr;
  }
  .upload-form-card {
    position: static;
  }
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .admin-shell {
    grid-template-columns: 200px minmax(0, 1fr);
    width: calc(100% - 32px);
    gap: 14px;
  }
  .admin-side {
    padding: 20px 12px 16px;
  }
  .admin-two-col {
    grid-template-columns: 1fr;
  }
  .texture-detail {
    grid-template-columns: 1fr;
  }
  .detail-view {
    min-height: 380px;
  }
  .viewer-canvas {
    height: 340px;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-meta {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .section,
  .page-head,
  .library-layout,
  .player-grid,
  .upload-layout,
  .profile-hero,
  .profile-stats,
  .profile-grid,
  .plugin-host,
  .notfound,
  .page-error,
  .page-loading,
  .info-strip,
  .hero-inner,
  .hero-stats {
    width: calc(100% - 32px);
  }
  .header-inner {
    width: calc(100% - 28px);
  }
  .hero-copy h1 {
    font-size: clamp(38px, 9vw, 54px);
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-stat:nth-child(2) {
    border-right: 0;
  }
  .hero-stat:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .join-section {
    padding: 28px 22px;
    margin-top: 54px;
  }
  .code-block {
    font-size: 11.5px;
    padding: 18px 16px;
  }
  .page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding-top: 36px;
  }
  .page-head-actions {
    padding-bottom: 0;
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .section {
    padding-top: 50px;
  }
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .toolbar-right {
    flex-direction: column;
    align-items: stretch;
  }
  .search-box {
    min-width: 0;
    width: 100%;
  }
  .list-meta-hint {
    display: none;
  }
  .skin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .skin-card-preview {
    height: 200px;
  }
  .skin-canvas {
    height: 176px;
  }
  .skin-canvas.is-cape {
    height: 168px;
  }
  .skin-card-body {
    padding: 12px 13px 14px;
  }
  .skin-card-title h3 {
    font-size: 13px;
  }
  .player-grid {
    grid-template-columns: 1fr;
  }
  .player-card {
    grid-template-columns: 150px 1fr;
    min-height: 250px;
  }
  .player-skin-canvas {
    height: 210px;
  }
  .profile-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px;
    margin-top: 32px;
  }
  .profile-identity {
    gap: 16px;
  }
  .avatar-xl {
    width: 70px;
    height: 70px;
    font-size: 26px;
  }
  .profile-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .profile-stat:nth-child(2) {
    border-right: 0;
  }
  .profile-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .auth-panel {
    padding: 32px 16px 48px;
  }
  .auth-card {
    padding: 24px 20px 22px;
  }
  .auth-visual {
    padding: 32px 22px;
    min-height: 280px;
  }
  .auth-quote h1 {
    font-size: 31px;
  }
  .auth-quote > p:last-child {
    font-size: 12px;
  }
  .form-grid.two {
    grid-template-columns: 1fr;
  }
  .dropzone {
    min-height: 340px;
  }
  .dropzone.has-file .dropzone-inner {
    flex-direction: column;
    text-align: center;
  }
  .upload-preview-stage {
    width: 160px;
    height: 300px;
  }
  .upload-preview-stage .upload-preview-canvas {
    height: 276px;
  }
  .admin-shell {
    grid-template-columns: 1fr;
    width: calc(100% - 24px);
  }
  .admin-side {
    position: static;
    overflow: hidden;
  }
  .admin-nav {
    flex-direction: row;
    flex-wrap: wrap;
    overflow: visible;
    padding: 12px 0;
    gap: 6px;
  }
  .admin-nav a {
    flex: 0 0 auto;
    padding: 8px 12px;
    white-space: nowrap;
  }
  .admin-side-head {
    padding-bottom: 14px;
  }
  .admin-side-foot {
    display: none;
  }
  .admin-page-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .data-table thead {
    display: none;
  }
  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }
  .data-table tr {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
  }
  .data-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 5px 0;
    border: 0;
    text-align: right;
  }
  .data-table td::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted-2);
    flex: 0 0 auto;
  }
  .data-table td[data-label="用户"],
  .data-table td[data-label="材质"],
  .data-table td[data-label="角色"] {
    text-align: left;
  }
  .data-table td[data-label="用户"]::before,
  .data-table td[data-label="角色"]::before {
    display: none;
  }
  .table-actions {
    justify-content: flex-end;
  }
  .user-cell,
  .texture-cell {
    min-width: 0;
  }
  .server-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  .server-summary-item:nth-child(2) {
    border-right: 0;
  }
  .server-summary-item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .server-editor-row {
    grid-template-columns: 1fr 1fr;
  }
  .server-editor-row .server-editor-port {
    grid-column: auto;
  }
  .server-editor-row > .btn {
    grid-column: 1 / -1;
    justify-self: end;
  }
  .plugin-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .plugin-admin-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 40px;
  }
  .footer-meta {
    grid-column: auto;
  }
  .modal-overlay {
    padding: 10px;
    align-items: flex-end;
  }
  .modal {
    max-height: calc(100vh - 20px);
    border-radius: 20px 20px 14px 14px;
  }
  .detail-meta {
    grid-template-columns: 1fr 1fr;
  }
  .picker-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 560px) {
  .header-actions .header-login {
    display: none;
  }
  .announcement-inner {
    min-height: 40px;
    padding: 7px 0;
  }
  .announcement-inner p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
  }
  .brand-copy small {
    display: none;
  }
  .brand-copy strong {
    font-size: 17px;
  }
  .brand-badge {
    width: 38px;
    height: 38px;
  }
  .header-inner {
    height: 66px;
  }
  :root {
    --header-height: 66px;
  }
  .hero-inner {
    padding-top: 42px;
  }
  .hero-copy h1 {
    font-size: 36px;
  }
  .hero-lead {
    font-size: 13.5px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .hero-points {
    gap: 8px 14px;
    font-size: 11px;
  }
  .hero-viewer-stage {
    height: 310px;
  }
  .hero-badge {
    display: none;
  }
  .hero-note {
    display: none;
  }
  .hero-stats {
    width: 100%;
  }
  .hero-stat {
    padding: 18px 16px 20px;
  }
  .hero-stat strong {
    font-size: 26px;
  }
  .skin-grid {
    gap: 10px;
  }
  .skin-card-preview {
    height: 176px;
    padding: 8px;
  }
  .skin-canvas {
    height: 156px;
  }
  .skin-canvas.is-cape {
    height: 148px;
  }
  .skin-card-body p {
    font-size: 10.5px;
  }
  .private-badge,
  .type-tag {
    display: none;
  }
  .page-head h1 {
    font-size: 32px;
  }
  .join-section {
    border-radius: 20px;
  }
  .join-actions {
    flex-direction: column;
  }
  .join-actions .btn {
    width: 100%;
  }
  .code-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .auth-quote h1 {
    font-size: 27px;
  }
  .auth-quote > p:last-child {
    display: none;
  }
  .auth-visual {
    min-height: 220px;
  }
  .auth-badge {
    width: 60px;
    height: 60px;
  }
  .player-card {
    grid-template-columns: 120px 1fr;
    min-height: 220px;
  }
  .player-skin-canvas {
    height: 170px;
  }
  .player-cape-canvas {
    height: 60px;
    right: 6px;
    bottom: 10px;
  }
  .player-card-body {
    padding: 16px 15px;
  }
  .player-card-head h3 {
    font-size: 20px;
  }
  .player-actions {
    padding-top: 12px;
  }
  .player-actions .btn {
    padding: 6px 9px;
    font-size: 10.5px;
  }
  .appearance-row {
    grid-template-columns: 100px 1fr;
    gap: 12px;
    padding: 12px;
  }
  .appearance-preview {
    min-height: 150px;
  }
  .appearance-skin-canvas {
    height: 140px;
  }
  .appearance-info h3 {
    font-size: 18px;
  }
  .profile-stats {
    grid-template-columns: 1fr 1fr;
  }
  .profile-stat {
    padding: 16px;
  }
  .profile-stat strong {
    font-size: 21px;
  }
  .panel {
    padding: 20px;
  }
  .admin-page-head h2 {
    font-size: 28px;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stat-card {
    padding: 16px;
  }
  .stat-card strong {
    font-size: 24px;
  }
  .admin-nav a span {
    font-size: 12px;
  }
  .plugin-head h1 {
    font-size: 32px;
  }
  .server-editor-row {
    grid-template-columns: 1fr;
  }
  .server-editor-row > .btn {
    grid-column: auto;
    justify-self: start;
  }
  .footer-inner {
    width: calc(100% - 32px);
  }
  .footer-brand img {
    width: 42px;
    height: 42px;
  }
  .picker-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .detail-view {
    min-height: 320px;
  }
  .viewer-canvas {
    height: 290px;
  }
  .detail-info h2 {
    font-size: 25px;
  }
  .detail-meta {
    padding: 14px;
  }
  .modal-body {
    padding: 16px;
  }
  .modal-head {
    padding: 15px 16px;
  }
  .modal-foot {
    padding: 12px 16px;
  }
  .toast-root {
    left: 12px;
    right: 12px;
    bottom: 12px;
    align-items: stretch;
  }
  .toast {
    max-width: none;
  }
}

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

/* user/role administration */
.user-panel-head em {
  font-style: normal;
  font-size: 10px;
  color: var(--muted-2);
  margin-top: 2px;
}

.role-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.role-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.role-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.role-name-cell > .role-dot {
  width: 10px;
  height: 10px;
  box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.1);
}

.role-name-cell > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.role-name-cell strong {
  font-size: 13px;
}

.role-name-cell span {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted-2);
}

.role-level {
  font-size: 12px;
  color: var(--navy);
}

.role-weight {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted-2);
}

.role-permission-count {
  font-size: 11.5px;
  color: var(--navy);
}

.role-check-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.role-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}

.role-check:hover {
  border-color: rgba(44, 76, 102, 0.35);
  background: var(--paper);
}

.role-check input {
  margin-top: 3px;
  accent-color: var(--navy);
}

.role-check-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 7px;
  min-width: 0;
}

.role-check-body strong {
  font-size: 12.5px;
}

.role-check-body small {
  flex-basis: 100%;
  font-size: 10px;
  color: var(--muted-2);
}

.permission-group {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.permission-group h4 {
  font-size: 12px;
  color: var(--navy);
  margin-bottom: 10px;
}

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

.permission-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
}

.permission-option input {
  margin-top: 3px;
  accent-color: var(--navy);
}

.permission-option span {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.permission-option strong {
  font-size: 11.5px;
}

.permission-option small {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--muted-2);
  word-break: break-all;
}

.permission-wildcard {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(232, 201, 122, 0.4);
  background: rgba(232, 201, 122, 0.12);
  color: var(--navy);
  font-size: 12.5px;
}

.permission-wildcard code {
  padding: 2px 7px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
}

.field input[type="color"] {
  min-height: 46px;
  padding: 5px;
  cursor: pointer;
}

.user-toolbar {
  align-items: center;
}

@media (max-width: 820px) {
  .role-check-list,
  .permission-grid {
    grid-template-columns: 1fr;
  }
  .role-name-cell {
    min-width: 0;
  }
}

/* =========================================================
   admin workspace
   ========================================================= */
body.is-admin {
  background: #f4f5f7;
}

body.is-admin .site-header,
body.is-admin #announcement-root,
body.is-admin .site-footer {
  display: none;
}

body.is-admin .site-main {
  width: 100%;
  max-width: none;
  padding-bottom: 0;
}

.yd-admin {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
  background: #f4f5f7;
  color: #1f2937;
}

.yd-admin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 18px 14px 14px;
  background: #fff;
  border-right: 1px solid #e5e7eb;
}

.yd-admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 18px;
  border-bottom: 1px solid #eef0f2;
}

.yd-admin-brand img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
}

.yd-admin-brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.yd-admin-brand strong {
  font-size: 15px;
  letter-spacing: 0.04em;
  color: #111827;
}

.yd-admin-brand small {
  margin-top: 3px;
  font-size: 8px;
  letter-spacing: 0.18em;
  color: #9ca3af;
}

.yd-admin-menu-label {
  margin: 16px 10px 8px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: #9ca3af;
}

.yd-admin-menu {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
}

.yd-admin-menu a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #4b5563;
  font-size: 13px;
  transition: background 0.16s, color 0.16s;
}

.yd-admin-menu a .icon {
  width: 17px;
  height: 17px;
  color: #6b7280;
}

.yd-admin-menu a:hover {
  background: #f5f6f8;
  color: #111827;
}

.yd-admin-menu a.is-active {
  background: #eef3f8;
  color: var(--navy);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--navy);
}

.yd-admin-menu a.is-active .icon {
  color: var(--navy);
}

.yd-admin-side-foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid #eef0f2;
}

.yd-admin-side-foot a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  font-size: 11.5px;
  color: #6b7280;
}

.yd-admin-side-foot a:hover {
  color: var(--navy);
}

.yd-admin-side-foot a .icon {
  width: 13px;
  height: 13px;
  transform: rotate(180deg);
}

.yd-admin-side-foot > span {
  padding: 0 8px;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: #9ca3af;
}

.yd-admin-workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #f4f5f7;
}

.yd-admin-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 60px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.yd-admin-breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: #9ca3af;
}

.yd-admin-breadcrumb strong {
  color: #111827;
  font-weight: 600;
}

.yd-admin-breadcrumb .icon {
  width: 12px;
  height: 12px;
}

.yd-admin-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.yd-admin-site-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  color: #4b5563;
  font-size: 12px;
}

.yd-admin-site-link:hover {
  background: #f5f6f8;
  color: #111827;
}

.yd-admin-site-link .icon {
  width: 14px;
  height: 14px;
}

.yd-admin-user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border: 1px solid #eef0f2;
  border-radius: 999px;
  background: #fafbfc;
}

.yd-admin-user-chip > span {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.yd-admin-user-chip strong {
  font-size: 12px;
  color: #111827;
}

.yd-admin-user-chip small {
  font-size: 9.5px;
  color: #9ca3af;
}

.yd-admin-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
}

.yd-admin-content .admin-page-head {
  padding-top: 0;
}

.yd-admin-content .admin-page-head h2 {
  font-size: 30px;
}

.yd-admin-content .panel,
.yd-admin-content .stat-card,
.yd-admin-content .plugin-card,
.yd-admin-content .server-card {
  background: #fff;
  border-color: #e5e7eb;
  box-shadow: none;
}

.yd-admin-content .panel {
  border-radius: 16px;
}

.yd-admin-content .stat-card {
  border-radius: 14px;
}

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

  .yd-admin-sidebar {
    position: static;
    height: auto;
    padding: 12px 14px;
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .yd-admin-brand {
    padding: 4px 4px 12px;
  }

  .yd-admin-menu-label,
  .yd-admin-side-foot {
    display: none;
  }

  .yd-admin-menu {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    overflow: visible;
    padding-top: 8px;
  }

  .yd-admin-menu a {
    flex: 0 0 auto;
    padding: 7px 10px;
    font-size: 12px;
  }

  .yd-admin-menu a.is-active {
    box-shadow: none;
  }

  .yd-admin-topbar {
    position: static;
    height: auto;
    min-height: 54px;
    padding: 8px 16px;
  }

  .yd-admin-site-link,
  .yd-admin-user-chip small {
    display: none;
  }


  .yd-admin-content {
    padding: 16px;
  }

  .yd-admin-content .admin-page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 560px) {
  .yd-admin-top-actions {
    gap: 6px;
  }

  .yd-admin-user-chip {
    padding: 3px;
    border: 0;
    background: transparent;
  }

  .yd-admin-user-chip > span {
    display: none;
  }

  .yd-admin-breadcrumb {
    font-size: 11.5px;
  }
}

@media (min-width: 901px) {
  .yd-admin-content .table-actions {
    flex-wrap: nowrap;
  }
}

@media (min-width: 901px) {
  .yd-admin-content .data-table td[data-label="部门"] {
    white-space: nowrap;
  }

  .yd-admin-content .data-table td[data-label="角色"] .role-chip-list {
    flex-wrap: nowrap;
  }
}

.yd-admin-content .data-table th,
.yd-admin-content .data-table td {
  padding: 11px 12px;
}

.yd-admin-content .table-panel {
  overflow-x: auto;
}

/* =========================================================
   Home hero image and launcher drag card
   ========================================================= */
.hero-banner {
  position: relative;
  width: 100%;
  max-width: 620px;
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at 50% 35%, rgba(156, 195, 230, 0.16), transparent 58%),
    rgba(9, 21, 34, 0.5);
  box-shadow: 0 40px 100px rgba(4, 12, 21, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.hero-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.hero-banner.is-placeholder {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
}

.hero-banner.is-placeholder img {
  width: 55%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 24px 46px rgba(4, 12, 21, 0.55));
}

.hero-auth-card {
  width: min(480px, 100%);
  margin-top: 26px;
  padding: 15px 17px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)), rgba(9, 21, 34, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: grab;
  user-select: none;
  transition: border-color 0.18s, transform 0.18s, opacity 0.18s;
}

.hero-auth-card:hover {
  border-color: rgba(232, 201, 122, 0.36);
}

.hero-auth-card:active {
  cursor: grabbing;
}

.hero-auth-card.is-dragging {
  opacity: 0.55;
  transform: scale(0.99);
}

.hero-auth-top {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.46);
}

.hero-auth-top .icon-btn {
  margin-left: auto;
  width: 30px;
  height: 30px;
  color: rgba(255, 255, 255, 0.6);
}

.hero-auth-top .icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.hero-auth-url {
  display: block;
  margin: 11px 0 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--gold);
  word-break: break-all;
}

.hero-auth-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  line-height: 1.65;
}

.hero-auth-hint .icon {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: var(--gold);
}

.join-section.is-single {
  grid-template-columns: 1fr;
}

.join-section.is-single .join-copy {
  max-width: 760px;
}

/* Admin hero image upload */
.banner-manager {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.banner-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 190px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0f2233;
}

.banner-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-thumb > span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(9, 21, 34, 0.72);
  color: #fff;
  font-size: 9px;
  letter-spacing: 0.06em;
}

.banner-thumb.is-placeholder {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 40%, #1b3a52, #0f2233);
}

.banner-thumb.is-placeholder img {
  width: 60%;
  height: auto;
  object-fit: contain;
}

.banner-controls {
  display: flex;
  flex: 1;
  min-width: 190px;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
}

.banner-controls .field-hint {
  margin: 0;
}

@media (max-width: 1020px) {
  .hero-banner {
    max-width: 560px;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .hero-auth-card {
    margin-top: 22px;
    padding: 14px;
  }
  .hero-auth-url {
    font-size: 11px;
  }
  .banner-thumb {
    width: 100%;
  }
}

/* Homepage carousel and multi-image admin list */
.hero-carousel {
  position: relative;
}

.hero-carousel-track {
  display: flex;
  height: 100%;
  will-change: transform;
  transition: transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.hero-carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
}

.hero-carousel-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-carousel-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(7, 17, 28, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  transform: translateX(-50%);
}

.hero-carousel-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
  transition: width 0.2s, background 0.2s;
}

.hero-carousel-dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

.hero-carousel-dot.is-active {
  width: 18px;
  background: var(--gold);
}

.banner-manager {
  flex-direction: column;
}

.banner-list {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.banner-thumb {
  width: 100%;
}

.banner-remove {
  position: absolute;
  z-index: 2;
  top: 6px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(9, 21, 34, 0.72);
  color: #fff;
  cursor: pointer;
  opacity: 0.82;
  transition: background 0.18s, opacity 0.18s;
}

.banner-remove:hover {
  background: #b44b4b;
  opacity: 1;
}

.banner-remove .icon {
  width: 13px;
  height: 13px;
}

.banner-index {
  z-index: 1;
}

.banner-controls {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}

.banner-controls .field-hint {
  flex-basis: 100%;
}

/* Direct user permissions and API keys */
.permission-picker {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  overflow: hidden;
}

.permission-picker summary {
  padding: 12px 14px;
  color: var(--navy);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.permission-picker summary span {
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 500;
}

.permission-picker .field-hint {
  margin: 0 14px 4px;
}

.permission-picker .permission-group {
  margin: 12px 14px;
}

.permission-option.is-inherited {
  opacity: 0.72;
  background: #f8fafc;
  cursor: default;
}

.permission-option.is-inherited em {
  font-style: normal;
  padding: 1px 5px;
  border-radius: 4px;
  background: #e8edf3;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 500;
}

.api-key-help .code-block {
  margin: 8px 0 14px;
}

.api-key-token .copy-field {
  margin: 14px 0;
}

.api-key-token .copy-field code {
  word-break: break-all;
}

.api-key-help {
  margin-top: 0;
}


/* Keep admin table columns stable at the right edge */
.yd-admin-content .data-table {
  table-layout: fixed;
}

.yd-admin-content .data-table th,
.yd-admin-content .data-table td {
  overflow: hidden;
}

.yd-admin-content .data-table td.table-actions {
  overflow: visible;
}

.yd-admin-content .user-table th:nth-child(1) { width: 24%; }
.yd-admin-content .user-table th:nth-child(2) { width: 20%; }
.yd-admin-content .user-table th:nth-child(3) { width: 13%; }
.yd-admin-content .user-table th:nth-child(4) { width: 9%; }
.yd-admin-content .user-table th:nth-child(5) { width: 9%; }
.yd-admin-content .user-table th:nth-child(6) { width: 25%; }

.yd-admin-content .role-table th:nth-child(1) { width: 31%; }
.yd-admin-content .role-table th:nth-child(2) { width: 15%; }
.yd-admin-content .role-table th:nth-child(3) { width: 12%; }
.yd-admin-content .role-table th:nth-child(4) { width: 10%; }
.yd-admin-content .role-table th:nth-child(5) { width: 7%; }
.yd-admin-content .role-table th:nth-child(6) { width: 8%; }
.yd-admin-content .role-table th:nth-child(7) { width: 17%; }

.yd-admin-content .player-table th:nth-child(1) { width: 20%; }
.yd-admin-content .player-table th:nth-child(2) { width: 17%; }
.yd-admin-content .player-table th:nth-child(3) { width: 10%; }
.yd-admin-content .player-table th:nth-child(4) { width: 17%; }
.yd-admin-content .player-table th:nth-child(5) { width: 13%; }
.yd-admin-content .player-table th:nth-child(6) { width: 23%; }

.yd-admin-content .texture-table th:nth-child(1) { width: 20%; }
.yd-admin-content .texture-table th:nth-child(2) { width: 8%; }
.yd-admin-content .texture-table th:nth-child(3) { width: 15%; }
.yd-admin-content .texture-table th:nth-child(4) { width: 9%; }
.yd-admin-content .texture-table th:nth-child(5) { width: 7%; }
.yd-admin-content .texture-table th:nth-child(6) { width: 15%; }
.yd-admin-content .texture-table th:nth-child(7) { width: 26%; }

.yd-admin-content .api-key-table th:nth-child(1) { width: 18%; }
.yd-admin-content .api-key-table th:nth-child(2) { width: 16%; }
.yd-admin-content .api-key-table th:nth-child(3) { width: 20%; }
.yd-admin-content .api-key-table th:nth-child(4) { width: 8%; }
.yd-admin-content .api-key-table th:nth-child(5) { width: 14%; }
.yd-admin-content .api-key-table th:nth-child(6) { width: 11%; }
.yd-admin-content .api-key-table th:nth-child(7) { width: 13%; }

@media (min-width: 821px) and (max-width: 1180px) {
  .yd-admin-content .data-table {
    min-width: 980px;
  }
}

/* Collapsible admin sidebar groups */
.yd-admin-menu-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.yd-admin-menu-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  margin: 12px 0 3px;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #9ca3af;
  font: inherit;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
}

.yd-admin-menu-label:hover {
  background: #f7f8fa;
  color: #6b7280;
}

.yd-admin-menu-label .group-chevron {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  opacity: 0.65;
  transform: rotate(90deg);
  transition: transform 0.18s ease;
}

.yd-admin-menu-group.is-collapsed .group-chevron {
  transform: rotate(0deg);
}

.yd-admin-menu-items {
  height: auto;
  overflow: hidden;
  opacity: 1;
  transition:
    height 0.26s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.18s ease;
}

.yd-admin-menu-items-inner {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.yd-admin-menu-group.is-collapsed .yd-admin-menu-items {
  height: 0;
  opacity: 0;
}

@media (max-width: 900px) {
  .yd-admin-menu-group,
  .yd-admin-menu-items,
  .yd-admin-menu-items-inner,
  .yd-admin-menu-group.is-collapsed .yd-admin-menu-items {
    display: contents;
  }

  .yd-admin-menu-items,
  .yd-admin-menu-group.is-collapsed .yd-admin-menu-items {
    height: auto;
    opacity: 1;
    visibility: visible;
  }

  .yd-admin-menu-label {
    display: none;
  }
}



/* Carousel arrows */
.hero-carousel-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(7, 17, 28, 0.58);
  color: #fff;
  cursor: pointer;
  opacity: 0.82;
  backdrop-filter: blur(8px);
  transform: translateY(-50%);
  transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.hero-carousel-arrow:hover {
  background: rgba(232, 201, 122, 0.94);
  border-color: rgba(232, 201, 122, 0.94);
  color: #16283a;
  opacity: 1;
}

.hero-carousel-arrow:active {
  transform: translateY(-50%) scale(0.94);
}

.hero-carousel-arrow:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.hero-carousel-arrow .icon {
  width: 17px;
  height: 17px;
}

.hero-carousel-arrow.is-prev {
  left: 14px;
}

.hero-carousel-arrow.is-prev .icon {
  transform: rotate(180deg);
}

.hero-carousel-arrow.is-next {
  right: 14px;
}

@media (max-width: 600px) {
  .hero-carousel-arrow {
    width: 36px;
    height: 36px;
  }
  .hero-carousel-arrow.is-prev {
    left: 10px;
  }
  .hero-carousel-arrow.is-next {
    right: 10px;
  }
}

/* My closet keeps the same 1200px content width as the page header. */
.closet-content {
  width: min(var(--content-width), calc(100% - 56px));
  margin: 0 auto;
}

.closet-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 360px));
  justify-content: center;
  align-items: start;
}

.closet-actions .btn {
  flex: 1 1 auto;
  justify-content: center;
}

@media (max-width: 820px) {
  .closet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }
}

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