:root {
  --bg-left: #163b5f;
  --bg-mid: #1d8aa0;
  --bg-right: #ffd166;
  --panel: #17304f;
  --panel-2: #1f4268;
  --nav: #142946;
  --nav-soft: #255a78;
  --primary: #1fb8b4;
  --primary-2: #ff8f5a;
  --primary-3: #ffd166;
  --info: #287bb6;
  --text: #fffaf0;
  --muted: #d9f2f0;
  --muted-2: #9fc8cf;
  --line: rgba(255, 250, 240, 0.12);
  --shadow: 0 16px 34px rgba(7, 24, 42, 0.38);
  --glow: 0 0 18px rgba(255, 143, 90, 0.44);
  --button-flow: linear-gradient(110deg, var(--primary) 0%, #63e1d4 28%, var(--primary-3) 56%, var(--primary-2) 78%, var(--primary) 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(115deg, rgba(16, 42, 74, 0.42), rgba(16, 42, 74, 0.08)),
    linear-gradient(110deg, #163b5f 0%, #1fb8b4 18%, #63e1d4 34%, #ffd166 53%, #ff8f5a 70%, #1fb8b4 86%, #163b5f 100%);
  background-size: 100% 100%, 320% 320%;
  animation: summer-page-flow 9.6s ease-in-out infinite;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.sky span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
  animation: float 9s ease-in-out infinite;
}

.sky span:nth-child(1) { left: 3%; top: 16%; animation-delay: -1s; }
.sky span:nth-child(2) { left: 12%; top: 70%; animation-delay: -3s; }
.sky span:nth-child(3) { left: 23%; top: 10%; animation-delay: -6s; }
.sky span:nth-child(4) { left: 35%; top: 42%; animation-delay: -2s; }
.sky span:nth-child(5) { left: 47%; top: 84%; animation-delay: -5s; }
.sky span:nth-child(6) { left: 56%; top: 18%; animation-delay: -7s; }
.sky span:nth-child(7) { left: 64%; top: 55%; animation-delay: -4s; }
.sky span:nth-child(8) { left: 76%; top: 31%; animation-delay: -8s; }
.sky span:nth-child(9) { left: 88%; top: 73%; animation-delay: -2s; }
.sky span:nth-child(10) { left: 97%; top: 46%; animation-delay: -6s; }
.sky span:nth-child(11) { left: 7%; top: 48%; animation-delay: -4s; }
.sky span:nth-child(12) { left: 18%; top: 33%; animation-delay: -7s; }
.sky span:nth-child(13) { left: 31%; top: 76%; animation-delay: -9s; }
.sky span:nth-child(14) { left: 42%; top: 23%; animation-delay: -3s; }
.sky span:nth-child(15) { left: 52%; top: 64%; animation-delay: -6s; }
.sky span:nth-child(16) { left: 61%; top: 39%; animation-delay: -1s; }
.sky span:nth-child(17) { left: 72%; top: 88%; animation-delay: -5s; }
.sky span:nth-child(18) { left: 83%; top: 13%; animation-delay: -8s; }
.sky span:nth-child(19) { left: 91%; top: 58%; animation-delay: -4s; }
.sky span:nth-child(20) { left: 98%; top: 90%; animation-delay: -7s; }

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0); opacity: 0.38; }
  50% { transform: translate3d(10px, -18px, 0); opacity: 0.9; }
}

@keyframes summer-page-flow {
  0% {
    background-position: 0% 0%, 0% 50%;
  }
  50% {
    background-position: 0% 0%, 100% 50%;
  }
  100% {
    background-position: 0% 0%, 0% 50%;
  }
}

@keyframes button-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  body,
  .brand,
  .avatar-button,
  .accent-line,
  .nav-button.active,
  .pill.active,
  .extra-link.active,
  .side-nav .nav-button.active,
  .primary-button,
  .access-switch button.active {
    animation: none;
  }
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  gap: 18px;
  min-height: 100vh;
  padding: 12px clamp(12px, 3.2vw, 54px) 28px;
}

.app-shell[hidden],
.auth-root[hidden],
.avatar-button[hidden] {
  display: none !important;
}

.auth-root {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  padding: clamp(18px, 4vw, 54px);
}

.auth-screen-active {
  overflow: hidden;
}

.auth-screen-active .sky {
  opacity: 0.86;
}

.rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.brand,
.nav-button,
.extra-link,
.pill,
.ghost-button {
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.brand {
  position: sticky;
  top: 12px;
  z-index: 12;
  display: grid;
  place-items: center;
  width: 96px;
  height: 60px;
  border-radius: 8px;
  background: var(--button-flow);
  background-size: 260% 260%;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: button-flow 9.6s ease-in-out infinite;
  transform: translateY(0);
  opacity: 1;
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 180ms ease, box-shadow 180ms ease;
  will-change: transform, opacity;
}

.brand.is-hidden {
  transform: translateY(calc(-100% - 20px));
  opacity: 0;
  pointer-events: none;
}

.brand:focus-visible,
.nav-button:focus-visible,
.extra-link:focus-visible,
.pill:focus-visible,
.ghost-button:focus-visible,
.form-field:focus {
  outline: 2px solid rgba(255, 247, 238, 0.82);
  outline-offset: 3px;
}

.brand-mark {
  display: block;
  width: 54px;
  height: 42px;
  background: url("assets/mcskill-logo-mark.png") center / contain no-repeat;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  margin-bottom: 22px;
  padding: 8px 20px 8px 14px;
  border-radius: 12px;
  background: rgba(48, 46, 70, 0.98);
  box-shadow: var(--shadow);
  transform: translateY(0);
  opacity: 1;
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 180ms ease, box-shadow 180ms ease;
  will-change: transform, opacity;
}

.topbar.is-hidden {
  transform: translateY(calc(-100% - 20px));
  opacity: 0;
  pointer-events: none;
}

.top-nav,
.tab-row,
.side-nav,
.button-row {
  display: flex;
  gap: 8px;
}

.top-nav {
  align-items: center;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-button,
.extra-link,
.pill {
  min-height: 28px;
  border-radius: 8px;
  padding: 7px 12px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.nav-button:hover,
.extra-link:hover,
.pill:hover,
.ghost-button:hover {
  transform: translateY(-1px);
  color: var(--text);
}

.nav-button.active,
.pill.active,
.extra-link.active,
.side-nav .nav-button.active {
  background: var(--button-flow);
  background-size: 260% 260%;
  color: var(--text);
  box-shadow: var(--glow);
  animation: button-flow 9.6s ease-in-out infinite;
}

.extra-link {
  flex: 0 0 auto;
  white-space: nowrap;
}

.topbar .nav-button,
.topbar .extra-link {
  min-height: 40px;
  padding: 10px 16px;
  font-size: 13px;
}

.side-nav {
  width: 96px;
  flex-direction: column;
  gap: 10px;
}

.side-nav .nav-button {
  display: grid;
  place-items: center;
  width: 96px;
  min-height: 48px;
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--nav);
  box-shadow: 0 10px 18px rgba(15, 12, 28, 0.36);
  line-height: 1.12;
  text-align: center;
  white-space: normal;
}

.content-panel {
  min-width: 0;
  max-width: 100%;
  min-height: calc(100vh - 112px);
  padding: clamp(16px, 1.7vw, 22px);
  border-radius: 12px;
  background: rgba(52, 49, 73, 0.98);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.page-head {
  margin-bottom: 20px;
}

.page-head h1 {
  margin: 12px 0 10px;
  font-size: clamp(26px, 2.35vw, 34px);
  line-height: 1.02;
  letter-spacing: 0;
  text-shadow: 3px 4px 0 rgba(107, 74, 55, 0.55);
}

.accent-line {
  width: 220px;
  max-width: 65vw;
  height: 4px;
  border-radius: 999px;
  background: var(--button-flow);
  background-size: 260% 260%;
  box-shadow: var(--glow);
  animation: button-flow 9.6s ease-in-out infinite;
}

.section {
  min-width: 0;
  margin-top: 22px;
}

.section h2 {
  margin: 0 0 13px;
  font-size: clamp(20px, 1.65vw, 25px);
}

.team-explain-section {
  margin-top: 18px;
}

.team-explain-section h3 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 17px;
}

.team-explain-tabs {
  margin: 0 0 14px;
}

.team-explain-page {
  margin-top: 8px;
}

.team-role-block {
  margin-top: 18px;
}

.team-role-block summary {
  width: fit-content;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.team-role-content {
  display: grid;
  gap: 14px;
}

.team-role-content h2 {
  margin: 0;
  font-size: clamp(28px, 2.1vw, 34px);
}

.team-role-content h3 {
  margin: 10px 0 0;
  font-size: clamp(20px, 1.55vw, 25px);
}

.team-role-content h4 {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.team-role-content > p,
.team-role-content .callout {
  margin: 0;
}

.dash-list,
.command-list,
.numbered-plain-list {
  display: grid;
  gap: 8px;
}

.dash-list p,
.command-list p,
.numbered-plain-list p {
  margin: 0;
}

.command-token {
  display: inline-block;
  border-radius: 4px;
  padding: 2px 7px;
  background: rgba(168, 51, 51, 0.72);
  color: #ffb7a8;
  font-weight: 900;
  box-shadow: 0 0 14px rgba(255, 90, 90, 0.16);
}

.section p,
.section li {
  color: var(--text);
  font-size: 14px;
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.callout {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  margin: 15px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(59, 56, 84, 0.72);
  box-shadow: 0 10px 26px rgba(16, 12, 28, 0.2);
}

.callout > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.top-nav,
.tab-row,
.side-nav {
  scrollbar-color: rgba(255, 247, 238, 0.36) transparent;
  scrollbar-width: thin;
}

.top-nav::-webkit-scrollbar,
.tab-row::-webkit-scrollbar,
.side-nav::-webkit-scrollbar {
  height: 6px;
}

.top-nav::-webkit-scrollbar-track,
.tab-row::-webkit-scrollbar-track,
.side-nav::-webkit-scrollbar-track {
  background: transparent;
}

.top-nav::-webkit-scrollbar-thumb,
.tab-row::-webkit-scrollbar-thumb,
.side-nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 247, 238, 0.28);
}

.callout.info {
  background: rgba(43, 93, 143, 0.92);
}

.callout.warning {
  background: rgba(59, 56, 84, 0.8);
}

.bulb {
  font-size: 20px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.rule-list {
  display: grid;
  gap: 13px;
  margin: 16px 0 0;
}

.rule-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 12px;
}

.rule-title {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 400;
  text-align: left;
}

.rule-title::before {
  content: "▶";
  flex: 0 0 auto;
  color: var(--text);
  font-size: 16px;
  line-height: 1;
}

.rule-item.open .rule-title::before {
  content: "▼";
}

.rule-title span {
  color: var(--text);
  font-weight: 600;
}

.rule-title strong {
  font-weight: 700;
}

.editable-generated-title strong[contenteditable] {
  min-width: 160px;
  border-radius: 7px;
  padding: 3px 5px;
  outline: none;
}

.editable-generated-title strong[contenteditable]:focus {
  background: rgba(31, 184, 180, 0.18);
  box-shadow: 0 0 0 2px rgba(31, 184, 180, 0.24);
}

.rule-body {
  display: none;
  margin-top: 11px;
}

.rule-item.open .rule-body {
  display: block;
}

.generated-rules-intro {
  padding: 0;
  background: transparent;
}

.generated-rule-section {
  margin: 0 0 36px;
}

.generated-rule-section:last-child {
  margin-bottom: 0;
}

.generated-rule-section > h2 {
  margin-top: 26px;
}

.generated-rules-intro .callout,
.section-note .callout,
.generated-rule-body .callout {
  margin: 16px 0 24px;
}

.section-note {
  margin: 0 0 18px;
}

.generated-rule-body {
  border-radius: 10px;
  padding: 12px 0 0;
  background: transparent;
}

.editable-generated-body[contenteditable="true"] {
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px;
  background: rgba(37, 31, 42, 0.14);
  outline: none;
}

.editable-generated-body[contenteditable="true"]:focus {
  border-color: rgba(31, 184, 180, 0.76);
  box-shadow: 0 0 0 3px rgba(31, 184, 180, 0.13);
}

.generated-rule-body p,
.section-note p,
.generated-rules-intro p {
  margin: 10px 0;
  font-weight: 400;
  line-height: 1.72;
}

.rule-subhead {
  margin: 14px 0 8px;
  color: var(--muted);
  font-size: 15px;
}

.rule-description-toggle {
  display: flex;
  align-items: center;
  min-height: 48px;
  margin: 12px 0;
  border-radius: 10px;
  padding: 0 18px;
  background: rgba(66, 63, 88, 0.86);
  box-shadow: 0 10px 20px rgba(16, 12, 28, 0.18);
}

.rule-example {
  margin: 14px 0;
  border-radius: 10px;
  padding: 16px 20px;
  background: rgba(37, 31, 42, 0.88);
  box-shadow: 0 12px 24px rgba(16, 12, 28, 0.18);
}

.rule-example h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 14px;
}

.rule-example.deny h3 {
  color: #ff8f5a;
}

.rule-example.allow h3 {
  color: #7df4d5;
}

.rule-example p {
  margin: 10px 0;
  line-height: 1.65;
}

.allow-text {
  color: #7df4d5;
}

.deny-text {
  color: #ffaf83;
}

.rule-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin: 10px 8px 4px 0;
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 900;
}

.rule-badge.allow {
  background: rgba(31, 184, 180, 0.18);
  color: #7df4d5;
}

.rule-badge.deny {
  background: rgba(255, 143, 90, 0.18);
  color: #ffaf83;
}

.rule-bullet {
  padding-left: 0;
  margin: 16px 0;
}

.kbd,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 5px;
  padding: 2px 8px;
  background: rgba(31, 184, 180, 0.26);
  color: #bafaf0;
  font-weight: 800;
}

.time-list {
  display: grid;
  gap: 8px;
  margin: 18px 0 10px;
}

.time-list p {
  margin: 0;
}

.rank-list {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}

.rank-list p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.rank-icon {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(0, 0, 0, 0.55);
  border-radius: 2px;
  background: linear-gradient(180deg, #2aa4f4, #0874bd);
  color: #ecfbff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

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

.dictionary-card {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 15px 14px;
  background: rgba(31, 24, 39, 0.72);
}

.dictionary-card h2 {
  margin: 0 0 30px;
  color: #ffbd4d;
  font-size: 18px;
}

.dictionary-row {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.dictionary-row:last-child {
  border-bottom: 0;
}

.support-step {
  margin: 18px 0 12px;
  font-size: 15px;
  font-weight: 900;
}

.toolbar-mock {
  display: inline-flex;
  overflow: hidden;
  margin: 8px 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(28, 29, 31, 0.85);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.toolbar-mock span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  color: #f3f3f3;
  font-weight: 900;
}

.toolbar-mock span:last-child {
  border-right: 0;
}

.forum-mock {
  width: min(900px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  padding: 15px;
  background: rgba(33, 33, 34, 0.86);
}

.mock-block {
  margin: 13px 0;
  border-radius: 4px;
  padding: 13px 16px;
  background: rgba(86, 86, 86, 0.72);
}

.mock-block p {
  margin: 8px 0;
}

.console-line {
  display: inline-block;
  border-radius: 2px;
  padding: 8px 12px;
  background: #101014;
  color: #82ff71;
  font-weight: 900;
}

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

.people-grid {
  grid-template-columns: repeat(auto-fill, 260px);
  align-items: start;
}

.person-card,
.mini-card,
.preview-card,
.login-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(31, 184, 180, 0.82), rgba(255, 143, 90, 0.86));
  box-shadow: 0 14px 26px rgba(7, 24, 42, 0.25);
}

.person-card {
  display: grid;
  position: relative;
  grid-template-columns: 62px 1fr;
  align-items: center;
  gap: 13px;
  width: 260px;
  height: 118px;
  padding: 15px;
  overflow: hidden;
}

.skin {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 6px;
  background:
    linear-gradient(#ffe8dc 0 35%, #d2b5a8 35% 48%, #f7d2c6 48% 72%, #8b4b28 72%),
    #f1d8ce;
  image-rendering: pixelated;
  background-size: cover;
  background-position: center;
}

.skin::before {
  content: "";
  width: 36px;
  height: 16px;
  background:
    linear-gradient(90deg, #fff 0 28%, #a77ade 28% 44%, #fff 44% 58%, #a77ade 58% 74%, #fff 74%);
}

.skin.custom-face::before,
.avatar-button span.custom-face::after,
.account-face-large.custom-face::after {
  display: none;
}

.person-card h3,
.mini-card h3,
.preview-card h3 {
  margin: 0 0 8px;
}

.person-card h3,
.person-card p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-card p,
.mini-card p,
.preview-card p {
  margin: 0;
  color: rgba(255, 247, 238, 0.82);
}

.mini-card {
  padding: 15px;
  background: rgba(59, 56, 84, 0.86);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.preview-card {
  overflow: hidden;
  background: rgba(59, 56, 84, 0.8);
}

.preview-card img,
.preview-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--nav);
}

.preview-card div {
  padding: 12px 14px 14px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: rgba(48, 46, 70, 0.66);
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 13px;
  text-transform: none;
}

.login-stage {
  display: grid;
  min-height: 500px;
  place-items: center;
}

.auth-root .login-stage {
  min-height: calc(100vh - clamp(36px, 8vw, 108px));
}

.login-card {
  width: min(600px, 100%);
  padding: 28px;
  background: rgba(52, 49, 73, 0.98);
}

.login-card h1 {
  margin: 0 0 20px;
  font-size: 34px;
  text-shadow: 3px 4px 0 rgba(107, 74, 55, 0.55);
}

.form-field {
  width: 100%;
  height: 46px;
  margin: 7px 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 0 18px;
  background: rgba(59, 56, 84, 0.86);
  color: var(--text);
}

.login-error {
  margin: -4px 0 14px;
  color: #ffb7a8;
  font-size: 13px;
  font-weight: 800;
}

.ghost-button,
.primary-button {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  font-weight: 900;
}

.primary-button {
  border: 0;
  background: var(--button-flow);
  background-size: 260% 260%;
  box-shadow: var(--glow);
  animation: button-flow 9.6s ease-in-out infinite;
}

.ghost-button {
  margin-top: 14px;
  background: var(--nav-soft);
}

.discord-button {
  margin-top: 22px;
  background: #5865f2;
}

.divider {
  margin: 24px 0 10px;
  color: var(--muted-2);
  text-align: center;
}

.avatar-button {
  position: fixed !important;
  right: 18px !important;
  bottom: 14px !important;
  z-index: 2147483647 !important;
  display: grid !important;
  place-items: stretch;
  width: 68px;
  height: 68px;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: var(--button-flow);
  background-size: 260% 260%;
  box-shadow: var(--shadow), 0 0 20px rgba(31, 184, 180, 0.28);
  animation: button-flow 9.6s ease-in-out infinite;
  isolation: isolate;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto;
  transform: translateZ(0);
}

.avatar-button span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, #3b2010 0 22%, #6e3515 22% 43%, #3b2010 43% 65%, #6e3515 65%),
    #8a4c23;
  image-rendering: pixelated;
  background-size: 100% 100%;
  background-position: center;
}

.avatar-button span::after {
  content: "";
  display: block;
  width: 100%;
  height: 37.5%;
  margin-top: 48%;
  background: linear-gradient(90deg, #f1d0c3 0 32%, #44d5d9 32% 50%, #f1d0c3 50% 66%, #44d5d9 66% 84%, #f1d0c3 84%);
}

.account-modal[hidden] {
  display: none;
}

.account-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: end end;
  padding: 24px;
  background: rgba(12, 10, 20, 0.44);
}

.account-card {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  background: rgba(52, 49, 73, 0.98);
  box-shadow: var(--shadow);
}

.account-card h2 {
  margin: 0 0 16px;
}

.account-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: var(--nav-soft);
  color: var(--text);
  cursor: pointer;
}

.account-profile {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.account-profile p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.account-face-large {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, #6c3a1c 0 20%, #925023 20% 42%, #6c3a1c 42% 66%, #925023 66%),
    #8a4c23;
  background-size: cover;
  image-rendering: pixelated;
}

.account-face-large::after {
  content: "";
  display: block;
  width: 64px;
  height: 22px;
  margin-top: 32px;
  background: linear-gradient(90deg, #f1d0c3 0 32%, #44d5d9 32% 50%, #f1d0c3 50% 66%, #44d5d9 66% 84%, #f1d0c3 84%);
}

.account-field {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.account-field input {
  width: 100%;
  height: 42px;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: rgba(59, 56, 84, 0.86);
  color: var(--text);
}

.account-actions,
.access-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}

.upload-control {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 10px;
  padding: 0 12px;
  background: var(--nav-soft);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}

.upload-control.compact {
  min-height: 46px;
}

.upload-control input {
  display: none;
}

.access-switch[hidden] {
  display: none;
}

.access-switch button,
.member-remove {
  border: 0;
  border-radius: 10px;
  background: var(--nav-soft);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}

.access-switch button.active {
  background: var(--button-flow);
  background-size: 260% 260%;
  box-shadow: var(--glow);
  animation: button-flow 9.6s ease-in-out infinite;
}

.team-access {
  display: inline-flex;
  margin: 0 0 14px;
  border-radius: 8px;
  padding: 9px 12px;
  background: rgba(59, 56, 84, 0.76);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.team-editor {
  display: grid;
  width: min(620px, 100%);
  grid-template-columns: 180px 180px 110px 110px;
  gap: 10px;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: rgba(48, 46, 70, 0.72);
  box-shadow: 0 12px 24px rgba(15, 12, 25, 0.22);
}

.team-editor .form-field {
  margin: 0;
}

.member-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
}

.violations-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
}

.violations-tops,
.violations-board {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(59, 56, 84, 0.72);
  box-shadow: 0 14px 30px rgba(16, 12, 28, 0.22);
}

.violations-tops {
  padding: 22px;
  max-height: calc(100vh - 170px);
  overflow: hidden;
}

.violations-tops h2 {
  margin: 0 0 16px;
}

.button-row.vertical {
  display: grid;
  gap: 12px;
}

.button-row.vertical .pill {
  width: 100%;
}

.top-player-list {
  display: grid;
  gap: 16px;
  margin-top: 24px;
  max-height: 650px;
  overflow: hidden;
}

.top-player {
  display: grid;
  justify-items: center;
  gap: 8px;
  border-radius: 14px;
  padding: 18px 14px;
  background: linear-gradient(135deg, rgba(117, 70, 89, 0.86), rgba(83, 67, 86, 0.94));
  box-shadow: 0 12px 24px rgba(15, 12, 25, 0.26);
}

.top-player strong {
  color: #ffd66c;
  font-weight: 900;
}

.top-player h3,
.top-player p {
  margin: 0;
}

.top-face {
  width: 82px;
  height: 82px;
  image-rendering: pixelated;
  background:
    linear-gradient(90deg, #15152f 0 28%, #3340d4 28% 52%, #a315db 52% 74%, #1b1a35 74%),
    #242444;
}

.top-face-blue {
  background:
    linear-gradient(90deg, #314557 0 25%, #6ba2bd 25% 58%, #26384a 58% 80%, #92c0d7 80%),
    #5b8299;
}

.top-face-dark {
  background:
    linear-gradient(90deg, #2c2c2a 0 28%, #111 28% 56%, #f0c082 56% 78%, #302b27 78%),
    #222;
}

.violations-board {
  padding: 28px;
}

.violations-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.violations-head h1 {
  margin: 0 0 14px;
  color: #ff7944;
  font-size: clamp(26px, 2.2vw, 34px);
}

.violation-search {
  width: min(430px, 100%);
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 0 16px;
  background: rgba(59, 56, 84, 0.76);
  color: var(--text);
}

.add-violation {
  width: auto;
  min-width: 170px;
  padding: 0 20px;
}

.status-strip {
  display: flex;
  gap: 26px;
  margin: 22px 0;
  border-radius: 8px;
  padding: 12px 16px;
  background: rgba(67, 64, 86, 0.7);
}

.status-strip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.status-dot {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: #5a5667;
}

.status-dot.approved {
  background: #18b879;
}

.status-dot.rejected {
  background: #d71438;
}

.violations-total {
  margin: 6px 0 18px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.violation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 16px;
}

.violation-card {
  border-radius: 10px;
  padding: 8px;
  background: rgba(71, 68, 90, 0.9);
}

.violation-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.violation-meta strong,
.violation-meta span {
  display: grid;
  place-items: center;
  min-height: 28px;
  border-radius: 5px;
  background: rgba(59, 56, 73, 0.94);
  font-size: 13px;
  font-weight: 900;
}

.violation-meta strong {
  grid-column: 1 / -1;
}

.violation-proof {
  display: grid;
  place-items: center;
  gap: 8px;
  width: 100%;
  min-height: 120px;
  margin: 8px 0;
  border: 0;
  border-radius: 6px;
  background: rgba(38, 37, 48, 0.95);
  color: var(--muted);
  cursor: pointer;
}

.violation-proof span {
  color: var(--text);
  font-size: 34px;
  line-height: 1;
}

.violation-card footer {
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 5px 0 8px;
  font-size: 11px;
}

.violation-card footer span {
  color: var(--muted);
}

.shop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
}

.shop-main {
  min-width: 0;
}

.shop-tabs {
  margin-bottom: 6px;
}

.shop-line {
  width: 240px;
  margin-bottom: 10px;
}

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

.shop-card {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: rgba(59, 56, 84, 0.82);
  box-shadow: 0 16px 28px rgba(18, 12, 28, 0.3);
  text-align: center;
}

.shop-card h3 {
  min-height: 40px;
  margin: 8px 0 4px;
  font-size: 14px;
}

.shop-card p {
  min-height: 32px;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.shop-card strong {
  margin: 0 0 10px;
  color: #39ff91;
  font-size: 16px;
}

.shop-badge {
  position: absolute;
  top: 10px;
  right: 14px;
  border-radius: 3px;
  padding: 2px 6px;
  background: #ff8b1f;
  color: #330e00;
  font-size: 9px;
  font-weight: 900;
}

.shop-art {
  position: relative;
  width: 76px;
  height: 72px;
  image-rendering: pixelated;
}

.case::before,
.book::before {
  content: "";
  position: absolute;
  inset: 10px 8px;
  border: 5px solid #d7d7d7;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.35), transparent 35%),
    linear-gradient(90deg, #6d7480, #2d3544);
  transform: rotate(-16deg);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.18);
}

.case::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 8px;
  width: 22px;
  height: 24px;
  border-radius: 4px;
  background: #e64535;
  box-shadow: -44px 4px 0 #d93632;
}

.case.neon::before { border-color: #b9f8ff; background: linear-gradient(90deg, #8529f2, #2bd7c4); }
.case.teal::before { border-color: #aafcff; background: linear-gradient(90deg, #4e2ac7, #40d4c2); }
.case.gold::before { border-color: #ffd86a; background: linear-gradient(90deg, #265ce7, #ffd36b); }
.case.goldplus::before { border-color: #ffdf79; background: linear-gradient(90deg, #13a5ff, #ffb43b); }
.case.blue::before { border-color: #b5cbff; background: linear-gradient(90deg, #2e54ff, #6452df); }
.case.red::before { border-color: #ffdd73; background: linear-gradient(90deg, #b31e55, #ffad36); }

.book::before {
  border-color: #91d4c8;
  background: linear-gradient(135deg, #2e9f64, #283b49);
}

.book.purple::before { border-color: #7ad3d2; background: linear-gradient(135deg, #7d28c9, #2d2d58); }
.book.red::before { border-color: #8ee5e2; background: linear-gradient(135deg, #c31f44, #2f4560); }

.logo-art::before,
.logo::before {
  content: "";
  position: absolute;
  inset: 8px 14px;
  border-top: 15px solid var(--primary-2);
  border-right: 15px solid var(--primary-2);
  transform: rotate(45deg);
  opacity: 0.85;
}

.pokemon::before,
.skin-art::before,
.kiwi::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f0c45e, #45413f);
}

.pokemon.zygarde::before { background: linear-gradient(135deg, #283927, #89d663 45%, #151515); }
.pokemon.bug::before { background: linear-gradient(135deg, #80e673, #e33a37 50%, #244d32); }
.pokemon.machine::before { background: linear-gradient(135deg, #9ee4ff, #29364b 50%, #d4a93c); }
.pokemon.trainer::before { background: linear-gradient(135deg, #f0c08f, #ffcd2c 50%, #20253f); }
.pokemon.pink::before { background: linear-gradient(135deg, #ff8fd7, #ffe0e9 52%, #7be0dd); }
.skin-art.pink::before { background: linear-gradient(135deg, #fff6c8, #ff95ad 50%, #b43758); }
.kiwi::before { border-radius: 50%; background: radial-gradient(circle, #f8f0a0 0 12%, #658f24 13% 45%, #2f4d1d 46%); }

.shop-cart {
  align-self: start;
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  background: rgba(59, 56, 84, 0.9);
  box-shadow: var(--shadow);
}

.shop-cart header,
.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shop-cart h2 {
  margin: 0;
}

.shop-cart header strong,
.cart-total strong {
  color: #39ff91;
}

.cart-empty {
  display: grid;
  min-height: 90px;
  place-items: center;
  color: var(--muted-2);
  font-weight: 800;
}

.cart-list {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.cart-row {
  position: relative;
  border-radius: 10px;
  padding: 12px 72px 12px 12px;
  background: rgba(69, 66, 89, 0.86);
}

.cart-row h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.cart-row p {
  margin: 0;
  color: #39ff91;
  font-weight: 900;
}

.cart-remove,
.cart-controls button {
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}

.cart-remove {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 26px;
  height: 26px;
}

.cart-controls {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 6px;
}

.cart-controls button {
  width: 28px;
  height: 28px;
  background: var(--nav-soft);
}

.cart-total {
  border-top: 1px solid var(--line);
  margin: 16px 0;
  padding-top: 16px;
  font-size: 18px;
  font-weight: 900;
}

.shop-modal[hidden] {
  display: none;
}

.shop-modal {
  position: fixed;
  inset: 0;
  z-index: 18;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.64);
}

.shop-order-card {
  width: min(450px, 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  background: rgba(59, 56, 84, 0.98);
  box-shadow: var(--shadow);
}

.shop-order-card h2 {
  margin: 0 0 10px;
}

.shop-order-card p {
  color: var(--muted);
}

.shop-order-card label {
  display: block;
  margin-top: 16px;
  font-weight: 800;
}

.shop-order-card textarea {
  width: 100%;
  min-height: 110px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  resize: vertical;
  background: rgba(59, 56, 84, 0.86);
  color: var(--text);
}

.shop-order-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 14px;
  }

  .rail {
    align-items: stretch;
    gap: 12px;
  }

  .brand {
    width: 100%;
  }

  .side-nav {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .side-nav .nav-button {
    min-width: 112px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }

  .top-nav,
  .tab-row {
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .top-nav .nav-button,
  .tab-row .pill {
    flex: 0 0 auto;
  }

  .extra-link {
    align-self: flex-start;
  }

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

  .violations-tops {
    max-height: none;
  }

  .top-player-list {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    max-height: none;
  }

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

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

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

  .shop-cart {
    order: -1;
  }
}

@media (max-width: 560px) {
  .app-shell,
  .workspace,
  .content-panel,
  .topbar {
    width: 100%;
    max-width: 100%;
  }

  .app-shell {
    max-width: 362px;
    margin: 0;
  }

  .content-panel {
    padding: 16px;
  }

  .page-head h1 {
    font-size: 26px;
    line-height: 1.12;
  }

  .callout {
    display: block;
    padding: 16px;
  }

  .bulb {
    display: inline-block;
    margin: 0 10px 8px 0;
  }

  .top-nav,
  .tab-row {
    gap: 8px;
  }

  .nav-button,
  .extra-link,
  .pill {
    padding: 8px 10px;
    font-size: 12px;
  }

  .person-card {
    grid-template-columns: 1fr;
    width: 100%;
    height: auto;
    min-height: 118px;
  }

  .team-editor,
  .account-actions,
  .access-switch {
    grid-template-columns: 1fr;
  }

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

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

  .shop-order-actions {
    grid-template-columns: 1fr;
  }

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

  .avatar-button {
    width: 58px;
    height: 58px;
  }
}
