@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
      --bg: #05030a;
      --card-bg: #050712;
      --border-soft: #251622;
      --accent: #fb923c;        --accent-strong: #f97316; --accent-red: #ef4444;    --text-main: #f9fafb;
      --text-muted: #9ca3af;
      --shadow-soft: 0 14px 35px rgba(0, 0, 0, 0.85);
      --radius-lg: 18px;
      --angle: 0deg; }

    @property --angle {
      syntax: "<angle>";
      initial-value: 0deg;
      inherits: false;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
    
    input, select, textarea, button {
      font-family: inherit;
    }

    body {
      font-family: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
      min-height: 100vh;
      background:
        radial-gradient(circle at top left, rgba(248, 113, 113, 0.18), transparent 55%),
        radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.22), transparent 55%),
        var(--bg);
      color: var(--text-main);
      padding: 32px 16px;
      display: flex;
      justify-content: center;
    }

    .page {
      width: 100%;
      max-width: 1120px;
    }

    .header {
      margin-bottom: 16px;
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      gap: 16px;
      flex-wrap: wrap;
    }

    .title-block {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .discord-invite {
      font-size: 0.78rem;
      color: var(--text-muted);
      letter-spacing: 0.02em;
      text-transform: uppercase;
    }

    .discord-invite a {
      color: #fdba74;
      text-decoration: none;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
    }

    .discord-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      height: 18px;
      margin-right: 8px;
      transform: translateY(2px);
    }

    .discord-icon svg {
      width: 100%;
      height: 100%;
      fill: currentColor;
    }

    .discord-invite a:hover {
      color: #ffedd5;
      text-shadow: 0 0 12px rgba(251, 146, 60, 0.8);
    }

    .page-subtitle {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 6px 10px;
      border-radius: 999px;
      background: rgba(15, 10, 20, 0.85);
      border: 1px solid rgba(251, 146, 60, 0.35);
      font-size: 0.8rem;
      color: var(--text-muted);
      width: fit-content;
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
    }

.page-subtitle a {
  color: #fdba74;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.page-subtitle a:hover {
  color: #ffedd5;
  text-shadow: 0 0 12px rgba(251, 146, 60, 0.8);
}

.page-subtitle .info-icon {
  margin: 0 4px;
}

    .page-title {
      font-size: 2rem;
      font-weight: 700;
      letter-spacing: 0.02em;
      background: linear-gradient(90deg, #fb923c, #f97316, #ef4444);
      
      -webkit-background-clip: text;
      
      -webkit-text-fill-color: transparent;
      position: relative;
      display: inline-block;
      padding-bottom: 4px;
    }

    .page-title::after {
      content: "";
      position: absolute;
      inset: 0;
      background: radial-gradient(circle, rgba(249,115,22,0.25), transparent 70%);
      filter: blur(22px);
      z-index: -1;
    }

    .page-title span {
      background: linear-gradient(90deg, #f97316, #fb923c);
      
      -webkit-background-clip: text;
      
      -webkit-text-fill-color: transparent;
      animation: titleGlow 3s ease-in-out infinite alternate;
    }

    @keyframes titleGlow {
      0% {
        opacity: 0.85;
        filter: drop-shadow(0 0 4px rgba(249,115,22,0.7));
      }
      100% {
        opacity: 1;
        filter: drop-shadow(0 0 10px rgba(251,146,60,0.9));
      }
    }

    .title-block p {
      font-size: 0.9rem;
      color: var(--text-muted);
    }

    .last-update {
      font-size: 0.78rem;
      color: var(--text-muted);
      opacity: 0.85;
    }

    .controls {
      display: flex;
      gap: 10px;
      align-items: center;
      flex-wrap: wrap;
    }

    .control-group {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 0.85rem;
      color: var(--text-muted);
    }

    .select {
      border-radius: 999px;
      border: 1px solid var(--border-soft);
      background: rgba(15, 10, 20, 0.95);
      padding: 6px 12px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 0.85rem;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
      transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
    }

    .select:hover {
      background: #050712;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.9);
      transform: translateY(-1px);
    }

    .select select {
      border: none;
      background: transparent;
      font: inherit;
      color: var(--text-main);
      cursor: pointer;
      outline: none;
    }

    .meta-bar {
      margin-bottom: 18px;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 8px;
    }

    .stats-strip {
      font-size: 0.8rem;
      color: var(--text-muted);
      opacity: 0.9;
    }

    .stats-strip strong {
      color: var(--text-main);
      font-weight: 600;
    }

    .search-row {
      display: flex;
      gap: 10px;
      width: 100%;
      align-items: center;
      justify-content: flex-start;
      flex-wrap: wrap;
    }

    .search-wrapper {
      flex: 1 1 220px;
      max-width: 280px;
    }

    .search-input {
      width: 100%;
      border-radius: 999px;
      border: 1px solid var(--border-soft);
      background: rgba(15, 10, 20, 0.95);
      padding: 7px 11px;
      font-size: 0.85rem;
      color: var(--text-main);
      outline: none;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
      transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    }

    .search-input::placeholder {
      color: #6b7280;
    }

    .search-input:focus {
      border-color: var(--accent-strong);
      background: #050712;
      box-shadow: 0 0 0 1px rgba(251, 146, 60, 0.45);
    }

    .sort-select {
      border-radius: 999px;
      border: 1px solid var(--border-soft);
      background: rgba(15, 10, 20, 0.95);
      padding: 7px 14px;
      font-size: 0.85rem;
      color: var(--text-main);
      cursor: pointer;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
      transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
      white-space: nowrap;
    }

    .sort-select:hover {
      background: #050712;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.9);
      transform: translateY(-1px);
    }

    .sort-select:active {
      transform: translateY(0);
    }

    .grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 20px;
    }

    .player-card {
      position: relative;
      border-radius: var(--radius-lg);
      border: 2px solid transparent; padding: 16px 18px 18px;
      box-shadow: var(--shadow-soft);
      display: flex;
      flex-direction: column;
      gap: 10px;
      animation: card-in 0.35s ease-out both;
      z-index: 0;

      background-image:
        radial-gradient(circle at top left, #0b0613, #020617),
        linear-gradient(var(--card-bg), var(--card-bg)),
        conic-gradient(
          from var(--angle),
          rgba(251,146,60,0.0) 0deg,
          rgba(251,146,60,0.0) 260deg,
          rgba(251,146,60,0.9) 280deg,
          rgba(239,68,68,0.9) 300deg,
          rgba(251,146,60,0.9) 320deg,
          rgba(251,146,60,0.0) 340deg,
          rgba(251,146,60,0.0) 360deg
        );
      background-origin: border-box;
      background-clip: padding-box, padding-box, border-box;
      animation: card-in 0.35s ease-out both, borderTrace 3.5s linear infinite;
    }

    @keyframes borderTrace {
      to {
        --angle: 360deg;
      }
    }

    .player-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.95);
    }

    @keyframes card-in {
      from {
        opacity: 0;
        transform: translateY(8px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .card-top {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: center;
      position: relative;
      z-index: 2;
    }

    .left-info {
      display: flex;
      gap: 10px;
      align-items: center;
    }

    .avatar {
      width: 40px;
      height: 40px;
      border-radius: 999px;
      background: radial-gradient(circle at 30% 20%, var(--accent), #111827);
      border: 1px solid rgba(248, 113, 113, 0.7);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 600;
      color: #ffedd5;
      font-size: 0.95rem;
    }

    .name-block {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .player-name {
      font-size: 0.98rem;
      font-weight: 600;
    }

    .player-id {
      font-size: 0.75rem;
      color: var(--text-muted);
      max-width: 170px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .rank-badge {
      align-self: flex-start;
      border-radius: 999px;
      padding: 4px 9px;
      font-size: 0.75rem;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: var(--text-muted);
      border: 1px solid rgba(55, 65, 81, 0.9);
      background: rgba(15, 15, 20, 0.95);
      position: relative;
      z-index: 2;
    }

    .rank-number {
      font-weight: 600;
      color: var(--text-main);
    }

    .medal {
      font-size: 0.85rem;
    }

    .player-card.rank-1 .rank-badge {
      border-color: #facc15;
      color: #facc15;
    }
    .player-card.rank-2 .rank-badge {
      border-color: #f97316;
      color: #fed7aa;
    }
    .player-card.rank-3 .rank-badge {
      border-color: #fb7185;
      color: #fecaca;
    }

    .main-skill-pill {
      align-self: flex-start;
      margin-top: 4px;
      padding: 4px 8px;
      border-radius: 999px;
      font-size: 0.75rem;
      border: 1px solid rgba(248, 113, 113, 0.7);
      background: rgba(24, 16, 12, 0.96);
      color: var(--text-muted);
      display: inline-flex;
      gap: 6px;
      align-items: baseline;
      position: relative;
      z-index: 2;
    }

    .main-skill-pill strong {
      color: var(--accent-strong);
      font-weight: 600;
    }

    .totals-row {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: center;
      padding: 8px 10px;
      border-radius: 12px;
      background: radial-gradient(circle at top left, #0b0613, #020617);
      border: 1px solid rgba(55, 65, 81, 0.95);
      font-size: 0.8rem;
      position: relative;
      z-index: 2;
    }

    .totals-main {
      display: flex;
      gap: 10px;
      align-items: baseline;
      flex-wrap: wrap;
    }

    .totals-main span {
      color: var(--text-muted);
    }

    .totals-main strong {
      color: var(--text-main);
      font-weight: 600;
      margin-left: 4px;
    }

    .score-highlight {
      font-size: 0.8rem;
      padding: 4px 8px;
      border-radius: 999px;
      background: rgba(24, 16, 12, 0.95);
      color: var(--accent-strong);
      border: 1px solid rgba(248, 113, 113, 0.85);
      white-space: nowrap;
    }

    .skills-block {
      margin-top: 2px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      position: relative;
      z-index: 2;
    }

    .skill-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 0.78rem;
      padding: 4px 6px;
      border-radius: 8px;
      background: rgba(15, 15, 20, 0.96);
      border: 1px solid rgba(31, 24, 30, 0.9);
    }

    .skill-name {
      color: var(--text-main);
      font-weight: 500;
    }

    .skill-meta {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 0.75rem;
      color: var(--text-muted);
      white-space: nowrap;
    }

    .skill-level {
      font-weight: 600;
      color: var(--accent-strong);
    }

    .skill-xp {
      font-variant-numeric: tabular-nums;
    }

    .skill-bar-track {
      position: relative;
      flex: 0 0 70px;
      height: 5px;
      border-radius: 999px;
      background: #111827;
      overflow: hidden;
      border: 1px solid rgba(31, 24, 30, 0.9);
    }

    .skill-bar-fill {
      position: absolute;
      inset: 0;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--accent), var(--accent-red));
      transform-origin: left center;
      transform: scaleX(0);
      animation: bar-grow 0.6s ease-out forwards;
    }

    @keyframes bar-grow {
      from {
        transform: scaleX(0);
      }
      to {
        transform: scaleX(var(--p, 0));
      }
    }

    @media (max-width: 640px) {
      body {
        padding: 20px 12px;
      }
      .page-title {
        font-size: 1.6rem;
      }
      .search-row {
        flex-direction: row;
      }
    }
  

.page { width: 100%; max-width: 1120px; }

.app-shell {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(37, 22, 34, 0.9);
  background: rgba(5, 7, 18, 0.92);
  overflow: hidden;
}

.app-topbar {
  padding: 18px 18px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-soft);
  background:
    radial-gradient(circle at top left, rgba(248, 113, 113, 0.12), transparent 55%),
    radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.16), transparent 55%),
    rgba(5, 7, 18, 0.65);
}

.page-title { font-size: 2rem; font-weight: 700; letter-spacing: 0.02em; }
.page-title, .page-title span { color: var(--text-main); }
@supports (-webkit-background-clip: text) {
  .page-title {
    background: linear-gradient(90deg, #fb923c, #f97316, #ef4444);
    
    -webkit-background-clip: text;
    
    -webkit-text-fill-color: transparent;
  }
  .page-title span {
    background: linear-gradient(90deg, #f97316, #fb923c);
    
    -webkit-background-clip: text;
    
    -webkit-text-fill-color: transparent;
    animation: titleGlow 3s ease-in-out infinite alternate;
  }
}

.meta { font-size: 0.9rem; color: var(--text-muted); margin-top: 4px; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.btn {
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(15, 10, 20, 0.95);
  padding: 8px 14px;
  font-size: 0.85rem;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease, opacity .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.btn:hover {
  background: #050712;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.9);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.danger { border-color: rgba(239,68,68,0.65); }
.btn.warn { border-color: rgba(251,146,60,0.7); }
.btn.secondary {
  border-color: rgba(148, 163, 184, 0.45);
  color: #e2e8f0;
  background: rgba(15, 18, 26, 0.95);
}
.btn.secondary:hover {
  background: rgba(12, 16, 26, 0.98);
  box-shadow: 0 10px 24px rgba(30, 41, 59, 0.35);
}
.btn.success {
  border-color: rgba(34,197,94,0.65);
  color: #bbf7d0;
  background: rgba(15, 20, 16, 0.95);
}
.btn.success:hover {
  background: rgba(10, 22, 16, 0.95);
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.28);
}

.app-body {
  display: grid;
  grid-template-columns: 215px 1fr;
  min-height: 680px;
}
@media (max-width: 920px) { .app-body { grid-template-columns: 1fr; } }

.side-nav {
  border-right: 1px solid var(--border-soft);
  padding: 14px;
  background: rgba(5, 7, 18, 0.55);
}
@media (max-width: 920px) {
  .side-nav { border-right: 0; border-bottom: 1px solid var(--border-soft); }
}

.nav-list { list-style: none; display: grid; gap: 10px; }
.nav-item {
  border-radius: 14px;
  border: 1px solid rgba(37, 22, 34, 0.95);
  background: rgba(15, 15, 20, 0.78);
  padding: 10px 12px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  position: relative;
  overflow: hidden;
}
.nav-item:hover { background: rgba(15, 15, 20, 0.95); box-shadow: 0 10px 24px rgba(0,0,0,0.65); transform: translateY(-1px); }
.nav-item.active { border-color: rgba(37, 22, 34, 0.95); }

.nav-item::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--nav-angle),
    transparent 0deg,
    transparent 230deg,
    rgba(251, 146, 60, 0.98) 260deg,
    rgba(239, 68, 68, 0.98) 300deg,
    rgba(251, 146, 60, 0.98) 330deg,
    transparent 360deg
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.nav-item:hover::after,
.nav-item.active::after {
  opacity: 1;
  animation: navTrace 2.4s linear infinite;
}

@keyframes navTrace {
  to { --nav-angle: 360deg; }
}

.nav-item .label { font-weight: 600; color: var(--text-main); font-size: .95rem; }
.nav-item.active .label::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 8px;
  border-right: 2px solid var(--accent-strong);
  border-bottom: 2px solid var(--accent-strong);
  vertical-align: middle;
  transform: rotate(-45deg);
  filter: drop-shadow(0 0 6px rgba(251, 146, 60, 0.6));
}
.nav-item .hint { color: var(--text-muted); font-size: .78rem; white-space: nowrap; }

.main { padding: 14px; }

.card {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(37, 22, 34, 0.95);
  padding: 0;
  box-shadow: var(--shadow-soft);
  background-image:
    radial-gradient(circle at top left, #0b0613, #020617),
    linear-gradient(var(--card-bg), var(--card-bg));
  overflow: hidden;
  margin-bottom: 14px;
}

.card-head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(37, 22, 34, 0.9);
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.card-head h2 { font-size: 1.05rem; font-weight: 650; margin: 0; }
.card-head .sub { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }
.card-body { padding: 14px 16px 16px; }

.new-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid rgba(249, 115, 22, 0.62);
  background:
    linear-gradient(120deg, rgba(251, 146, 60, 0.16), rgba(239, 68, 68, 0.1)),
    rgba(15, 10, 20, 0.96);
  color: #fdba74;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(249, 115, 22, 0.28);
  box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.12), 0 4px 12px rgba(0, 0, 0, 0.42);
  transform: translateY(-1px);
  animation: new-badge-pulse 2.2s ease-in-out infinite;
}

.new-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.65);
}

@keyframes new-badge-pulse {
  0%, 100% {
    transform: translateY(-1px) scale(1);
    border-color: rgba(249, 115, 22, 0.5);
    box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.1), 0 4px 12px rgba(0, 0, 0, 0.42);
  }
  50% {
    transform: translateY(-1px) scale(1.035);
    border-color: rgba(251, 146, 60, 0.9);
    box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.22), 0 0 0 1px rgba(251, 146, 60, 0.16), 0 8px 18px rgba(249, 115, 22, 0.28);
  }
}

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.field { grid-column: span 6; }
.field.wide { grid-column: span 12; }
@media (max-width: 920px) { .field { grid-column: span 12; } }

.grid.list-grid { grid-template-columns: 1fr; }
.grid.list-grid .field { grid-column: span 1; }

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: .78rem;
  color: var(--text-muted);
}

.disable-skill-field label {
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.disable-skills-grid {
  gap: 2px;
}

.disable-skill-sep-wrap {
  margin: 0;
}

.disable-skill-sep {
  margin: 0;
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  border-radius: 999px;
  border: 1px solid rgba(251, 146, 60, 0.6);
  background: rgba(15, 10, 20, 0.95);
  color: #fdba74;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: help;
  transform: translateY(-1px);
  position: relative;
}

.table-like td .info-icon {
  margin-left: 8px;
}

.info-tooltip {
  position: fixed;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(251, 146, 60, 0.55);
  background: rgba(8, 9, 18, 0.97);
  color: #fde68a;
  font-size: 0.75rem;
  line-height: 1.35;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.65);
  z-index: 99999;
  max-width: 320px;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.info-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.control, select.control, textarea.control {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: rgba(15, 10, 20, 0.95);
  padding: 9px 11px;
  font-size: 0.88rem;
  color: var(--text-main);
  outline: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.6);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.control-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.control-row .control { flex: 1 1 auto; }
.color-input {
  width: 42px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: rgba(15, 10, 20, 0.95);
  padding: 2px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.color-input::-webkit-color-swatch-wrapper { padding: 2px; }
.color-input::-webkit-color-swatch { border: 0; border-radius: 8px; }

.control[type="number"] {
  color-scheme: dark;
  padding-right: 12px;
}
.control[type="number"]::-webkit-inner-spin-button,
.control[type="number"]::-webkit-outer-spin-button {
  opacity: 0.85;
  filter: brightness(1.1);
}
.control:focus {
  border-color: var(--accent-strong);
  background: #050712;
  box-shadow: 0 0 0 1px rgba(251, 146, 60, 0.45);
}
textarea.control { min-height: 96px; resize: vertical; }

.slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-control {
  flex: 1 1 auto;
  width: 100%;
  accent-color: #f97316;
  cursor: pointer;
}

.slider-value {
  min-width: 46px;
  text-align: right;
  font-size: 0.82rem;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.small { font-size: .82rem; color: var(--text-muted); }
.hint-spacing { margin-bottom: 8px; }
.kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  font-size: .78rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(15, 10, 20, 0.95);
  color: var(--text-main);
}
.table-like td .kbd {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  padding-top: 4px;
  padding-bottom: 4px;
}

.notice {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(37, 22, 34, 0.95);
  background: rgba(15, 15, 20, 0.85);
  padding: 12px 14px;
  color: var(--text-muted);
  box-shadow: 0 10px 26px rgba(0,0,0,0.55);
}
.notice strong { color: var(--text-main); }
.notice.toast { margin-bottom: 12px; }
.notice.doublexp-info { margin-top: 10px; }
.schedule-list {
  list-style: none;
  margin-top: 8px;
  display: grid;
  gap: 4px;
  padding-left: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.notice.error {
  border-color: rgba(239, 68, 68, 0.85);
  background: rgba(127, 29, 29, 0.2);
  color: #fecaca;
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.2);
}

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background:
    radial-gradient(circle at top left, rgba(251, 146, 60, 0.18), transparent 55%),
    rgba(5, 7, 18, 0.78);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 100000;
}

.modal-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: min(420px, 92vw);
  border-radius: 18px;
  border: 1px solid rgba(251, 146, 60, 0.35);
  background:
    radial-gradient(circle at top left, rgba(251, 146, 60, 0.1), transparent 50%),
    rgba(9, 9, 18, 0.98);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.8);
  padding: 18px 18px 16px;
  position: relative;
  animation: modal-in 0.18s ease-out both;
}

.modal-sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.18), transparent 45%);
  pointer-events: none;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  position: relative;
}

.modal-message {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 16px;
  position: relative;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  position: relative;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

hr.sep { border: 0; border-top: 1px solid rgba(37, 22, 34, 0.9); margin: 12px 0; }

.table-like { width: 100%; border-collapse: collapse; }
.table-like th, .table-like td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(37, 22, 34, 0.9);
  vertical-align: middle;
  font-size: .86rem;
}
.table-like th { color: var(--text-muted); font-weight: 600; text-align: left; }
.table-like tr:hover td { background: rgba(15, 15, 20, 0.65); }

.diff-before { color: #fca5a5; }
.diff-after { color: #86efac; }
.diff-before, .diff-after {
  display: block;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.toggle { display: inline-flex; gap: 10px; align-items: center; }
.toggle input { width: 18px; height: 18px; accent-color: var(--accent-strong); }

.pill {
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.65);
  background: rgba(24, 16, 12, 0.95);
  color: var(--text-muted);
  padding: 4px 10px;
  font-size: .78rem;
  display: inline-flex; gap: 8px; align-items: center;
}
.pill .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--accent-strong); }


.toggle input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid var(--border-soft);
  background: rgba(15, 10, 20, 0.95);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.6);
  cursor: pointer;
  position: relative;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.toggle input[type="checkbox"]:hover {
  border-color: var(--accent);
}

.toggle input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 1px rgba(251,146,60,0.6);
}

.toggle input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #1a0f08;
}
.nav-item {
  --nav-angle: 0deg;
}

@property --nav-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
