:root {
  --bg: #f5f6f8;
  --bg-secondary: #eceef2;
  --surface: #ffffff;
  --surface-soft: #f8f9fa;
  --surface-hover: #f1f2f4;
  --text: #111111;
  --text-soft: #6d7178;
  --text-faint: #989da5;
  --line: #e3e5e8;
  --line-strong: #cdd1d6;
  --accent: #111111;
  --accent-text: #ffffff;
  --accent-soft: #eeeeee;
  --success: #30b867;
  --warning: #e9a825;
  --danger: #e54b4b;
  --blue: #3d7cff;
  --purple: #8557e8;
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.055);
  --shadow-md: 0 12px 34px rgba(0, 0, 0, 0.09);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.2);
  --radius-sm: 11px;
  --radius-md: 17px;
  --radius-lg: 24px;
  --header-height: 76px;
  --sidebar-width: clamp(220px, 20vw, 290px);
  --gui-scale: 1;
}

html[data-theme="dark"] {
  --bg: #161719;
  --bg-secondary: #1e2023;
  --surface: #222428;
  --surface-soft: #292b30;
  --surface-hover: #303339;
  --text: #f7f7f8;
  --text-soft: #aaaeb6;
  --text-faint: #747982;
  --line: #34373d;
  --line-strong: #4b4f57;
  --accent: #ffffff;
  --accent-text: #111111;
  --accent-soft: #32353a;
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 14px 38px rgba(0, 0, 0, 0.3);
}

html[data-theme="orange"] {
  --bg: #fff4e9;
  --bg-secondary: #ffe9d4;
  --surface: #fffaf5;
  --surface-soft: #fff1e4;
  --surface-hover: #ffe7ce;
  --text: #24170f;
  --text-soft: #7d6758;
  --text-faint: #a48d7a;
  --line: #ead5c0;
  --line-strong: #d5b898;
  --accent: #ff8a32;
  --accent-text: #17100b;
  --accent-soft: #ffe1c5;
}

html[data-theme="blue"] {
  --bg: #eef5ff;
  --bg-secondary: #e1ecff;
  --surface: #ffffff;
  --surface-soft: #f0f5ff;
  --surface-hover: #e8f0ff;
  --text: #101827;
  --text-soft: #617087;
  --text-faint: #8c9aaf;
  --line: #d8e2f0;
  --line-strong: #b9cae2;
  --accent: #3977e8;
  --accent-text: #ffffff;
  --accent-soft: #dce9ff;
}

html[data-theme="pink"] {
  --bg: #fff1f7;
  --bg-secondary: #ffe5f0;
  --surface: #fffafd;
  --surface-soft: #fff0f6;
  --surface-hover: #ffe6f1;
  --text: #25131c;
  --text-soft: #80616f;
  --text-faint: #aa8797;
  --line: #edd5df;
  --line-strong: #d9b5c5;
  --accent: #ed68a0;
  --accent-text: #ffffff;
  --accent-soft: #ffd9e9;
}

html[data-theme="retro"] {
  --bg: #eee7cf;
  --bg-secondary: #ddd2ae;
  --surface: #f8f1d7;
  --surface-soft: #ece3c4;
  --surface-hover: #e2d6ae;
  --text: #292814;
  --text-soft: #696642;
  --text-faint: #8e8961;
  --line: #cfc39b;
  --line-strong: #aaa073;
  --accent: #575429;
  --accent-text: #f9f4d9;
  --accent-soft: #dcd2a9;
}

html[data-theme="terminal"] {
  --bg: #050806;
  --bg-secondary: #07100a;
  --surface: #09110c;
  --surface-soft: #0c1710;
  --surface-hover: #102016;
  --text: #81ff9b;
  --text-soft: #53b968;
  --text-faint: #367c46;
  --line: #173d22;
  --line-strong: #256334;
  --accent: #71ff8d;
  --accent-text: #041006;
  --accent-soft: #12301a;
  --success: #71ff8d;
}

html[data-theme="midnight"] {
  --bg: #090d17;
  --bg-secondary: #0c1220;
  --surface: #111827;
  --surface-soft: #151e30;
  --surface-hover: #1b273d;
  --text: #eef4ff;
  --text-soft: #9cabca;
  --text-faint: #63718f;
  --line: #25314a;
  --line-strong: #3b4d70;
  --accent: #85a9ff;
  --accent-text: #07101e;
  --accent-soft: #182b51;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 28%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg) 58%, var(--bg-secondary) 130%);
  color: var(--text);
  font-family: Inter, ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
  font-size: 15px;
  overflow-x: hidden;
  zoom: var(--gui-scale);
  transition:
    background 220ms ease,
    color 220ms ease;
}

body.player-open,
body.account-open,
body.profile-open,
body.donation-open {
  overflow: hidden;
}

body.groupchat-open {
  overflow: hidden;
}

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

button {
  color: inherit;
  cursor: pointer;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

::selection {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
}

.access-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.access-card {
  width: min(420px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.access-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
  color: var(--danger);
  font-size: 1.65rem;
  font-weight: 1000;
}

.access-card h1 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 1000;
  letter-spacing: -0.04em;
}

.access-card p {
  margin: 12px auto 20px;
  color: var(--text-soft);
  line-height: 1.6;
}

.access-state {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
  color: var(--danger);
  font-size: 0.72rem;
  font-weight: 1000;
  letter-spacing: 0.08em;
}

.site-app {
  min-height: 100vh;
}

.top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
  background: color-mix(in srgb, var(--surface) 89%, transparent);
  backdrop-filter: blur(18px);
  transition:
    background 220ms ease,
    border-color 220ms ease;
}

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

.coffee-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.coffee-button:hover,
.coffee-button:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface-hover);
}

.coffee-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  color: var(--surface);
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
  font-size: clamp(1.85rem, 3vw, 2.65rem);
  font-weight: 1000;
  line-height: 1;
  letter-spacing: -0.08em;
  text-decoration: none;
  -webkit-text-stroke: 2.2px var(--text);
  paint-order: stroke fill;
  text-shadow: 1px 1px 0 var(--text);
  filter: drop-shadow(0 0 0.65px var(--text));
}

html[data-theme="dark"] .brand,
html[data-theme="terminal"] .brand,
html[data-theme="midnight"] .brand {
  color: var(--text);
  -webkit-text-stroke-color: color-mix(in srgb, var(--text) 25%, #000000);
  text-shadow: none;
}

.brand-letter {
  display: inline-block;
  transform-origin: center bottom;
  animation: letterWave 1.9s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.09s);
}

@keyframes letterWave {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }

  35% {
    transform: translateY(-5px) rotate(-2deg);
  }

  62% {
    transform: translateY(1px) rotate(1deg);
  }
}

.hero-metrics {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-version {
  display: block;
  margin-top: 12px;
  opacity: 0.7;
  color: var(--text-faint);
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.notification-wrap {
  position: relative;
}

.notification-button {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.notification-button:hover,
.notification-button[aria-expanded="true"] {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: var(--surface-soft);
  box-shadow: var(--shadow-md);
}

.notification-bell-icon {
  width: 21px;
  height: 21px;
  display: block;
  fill: none;
  stroke: var(--text);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--danger);
  color: #ffffff;
  font-size: 0.58rem;
  font-weight: 1000;
  line-height: 1;
}

.notification-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 520;
  width: min(360px, calc(100vw - 28px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 98%, transparent);
  box-shadow: var(--shadow-lg);
}

.notification-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 11px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.notification-tab {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 1000;
}

.notification-tab-badge {
  min-width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  padding: 0 4px;
  border-radius: 999px;
  background: #e34d5b;
  color: #ffffff;
  font-size: 0.58rem;
  font-weight: 1000;
  line-height: 1;
}

.notification-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.notification-panel {
  display: none;
}

.notification-panel.active {
  display: block;
}

.notification-list {
  max-height: 390px;
  display: grid;
  gap: 8px;
  overflow-y: auto;
}

.notification-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft);
}

.notification-message {
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.notification-message:hover,
.notification-message:focus-visible {
  border-color: var(--accent);
  background: var(--surface);
  outline: none;
  transform: translateY(-1px);
}

.notification-item .social-avatar {
  width: 42px;
  height: 42px;
}

.notification-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.notification-copy strong {
  overflow-wrap: anywhere;
  font-size: 0.78rem;
  line-height: 1.32;
}

.notification-copy small {
  color: var(--text-soft);
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1.35;
}

.notification-actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.announcement-mark {
  width: 42px;
  height: 42px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 1000;
}

.announcement-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notification-empty {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 128px;
  padding: 18px;
  color: var(--text-soft);
  text-align: center;
}

.notification-empty strong {
  color: var(--text);
  font-size: 0.84rem;
}

.notification-empty span {
  font-size: 0.68rem;
  font-weight: 800;
}

.hero-metric {
  min-width: 86px;
  min-height: 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.hero-metric span {
  color: var(--text-soft);
  font-size: 0.58rem;
  font-weight: 1000;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero-metric strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 1000;
  white-space: nowrap;
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 14%, transparent);
}

.status-dot.large {
  width: 13px;
  height: 13px;
}

.status-dot.status-no-issues {
  background: var(--success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 14%, transparent);
}

.status-dot.status-maintenance {
  background: var(--warning);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--warning) 14%, transparent);
}

.status-dot.status-blocked {
  background: var(--danger);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 14%, transparent);
}

.header-status.status-no-issues,
.header-status.status-maintenance,
.header-status.status-blocked {
  background: var(--surface);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 90;
  width: var(--sidebar-width);
  padding-top: var(--header-height);
  display: grid;
  grid-template-rows: 1fr auto;
  border-right: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.sidebar-profile-button {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 22%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 46%),
    var(--surface-soft);
  box-shadow: var(--shadow-sm);
  font-size: 0.82rem;
  font-weight: 1000;
  transition:
    transform 150ms ease,
    background 150ms ease,
    border-color 150ms ease;
}

.sidebar-profile-button:hover {
  transform: translateY(-1px) rotate(-4deg);
  border-color: var(--line-strong);
  background: var(--surface-hover);
}

.sidebar-profile-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-nav {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 15px;
  overflow-y: auto;
}

.sidebar-link {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--text-soft);
  font-weight: 900;
  text-align: left;
  transition:
    transform 150ms ease,
    background 150ms ease,
    color 150ms ease,
    border-color 150ms ease;
}

.sidebar-link:hover {
  transform: translateX(3px);
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--text);
}

.sidebar-link.active {
  background: var(--accent);
  color: var(--accent-text);
}

.sidebar-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  color: inherit;
}

.sidebar-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-link.active .sidebar-icon {
  background: color-mix(in srgb, var(--accent-text) 18%, transparent);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--line);
}

.sidebar-footer-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.sidebar-footer-status div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-footer-status span:not(.status-dot) {
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 800;
}

.sidebar-footer-status strong {
  font-size: 0.82rem;
}

.main-content {
  width: calc(100% - var(--sidebar-width));
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding: 112px 22px 70px;
}

.view {
  width: min(1180px, 100%);
  display: none;
  margin: 0 auto;
  animation: viewEnter 230ms ease;
}

.view.active {
  display: block;
}

@keyframes viewEnter {
  from {
    opacity: 0;
    transform: translateY(7px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-heading {
  min-height: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.page-heading > div:first-child {
  min-width: 0;
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 1000;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.page-heading h1,
.section-heading h2,
.settings-heading h2,
.minigame-stage-header h2 {
  margin: 0;
  font-weight: 1000;
  letter-spacing: -0.055em;
}

.page-heading h1 {
  font-size: clamp(2.15rem, 5vw, 3.8rem);
}

.page-heading p {
  max-width: 680px;
  margin: 9px 0 0;
  color: var(--text-soft);
  font-size: 0.98rem;
  line-height: 1.55;
}

.page-count {
  min-width: 92px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.page-count span {
  font-size: 1.25rem;
  font-weight: 1000;
}

.page-count small {
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-card {
  min-width: 0;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    transform 170ms ease,
    box-shadow 170ms ease,
    border-color 170ms ease;
}

.dashboard-card:hover {
  transform: translateY(-4px) rotate(-0.8deg);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.dashboard-card:nth-child(even):hover {
  transform: translateY(-4px) rotate(0.8deg);
}

.dashboard-card-top {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-label {
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 900;
}

.dashboard-value {
  display: block;
  margin-top: auto;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 1000;
  letter-spacing: -0.06em;
}

.dashboard-text-value {
  font-size: 1.55rem;
}

.dashboard-card p {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 10%, var(--surface));
  color: var(--success);
  font-size: 0.65rem;
  font-weight: 1000;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--success);
  animation: livePulse 1.6s ease-in-out infinite;
}

@keyframes livePulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 30%, transparent);
  }

  50% {
    box-shadow: 0 0 0 5px transparent;
  }
}

.large-status {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: auto;
}

.large-status strong {
  font-size: 1.45rem;
  font-weight: 1000;
  letter-spacing: -0.04em;
}

.home-section {
  margin-top: 34px;
}

.home-fox-wrap {
  display: flex;
  justify-content: center;
  margin: 6px 0 30px;
}

.home-fox-wrap img {
  width: min(570px, 88vw);
  height: auto;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.12));
}

.section-heading {
  margin-bottom: 14px;
}

.section-heading h2 {
  font-size: 1.55rem;
}

.blog-post {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow-anchor: none;
}

.blog-post h3 {
  margin: 0 0 10px;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.15;
}

.blog-post p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
  white-space: pre-line;
}

.blog-history {
  position: relative;
  display: block;
  margin-top: 26px;
  min-height: 1px;
  overflow-anchor: none;
}

.blog-history[hidden] {
  display: none;
}

.blog-history-window {
  position: absolute;
  inset: 0 0 auto;
  display: grid;
  gap: 26px;
  width: 100%;
  will-change: transform;
  overflow-anchor: none;
}

.blog-post-previous {
  background: color-mix(in srgb, var(--surface) 84%, var(--surface-soft));
}

.blog-empty {
  display: grid;
  place-items: center;
  min-height: 116px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  text-align: center;
}

.blog-empty span {
  font-weight: 1000;
}

.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.info-banner-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 0.82rem;
  font-weight: 1000;
}

.info-banner strong {
  font-size: 0.88rem;
}

.info-banner p {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 0.8rem;
  line-height: 1.45;
}

.primary-button,
.secondary-button,
.small-button,
.game-player-button,
.game-close {
  border-radius: 12px;
  font-weight: 1000;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease,
    color 150ms ease,
    border-color 150ms ease;
}

.primary-button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-text);
}

.primary-button:hover {
  transform: translateY(-2px) rotate(-0.7deg);
  box-shadow: var(--shadow-md);
}

.secondary-button {
  min-height: 39px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
}

.secondary-button:hover {
  transform: translateY(-1px);
  background: var(--surface-hover);
}

.small-button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.7rem;
}

.small-button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  color: var(--text);
}

.full-button {
  width: 100%;
}

.danger-button {
  color: var(--danger);
}

.search-box {
  width: min(430px, 100%);
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.search-box:focus-within {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.search-icon {
  color: var(--text-soft);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.social-shell {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
}

#view-social.active {
  height: calc(var(--scaled-viewport-height, 100dvh) - 142px);
  min-height: 430px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

#view-social .social-heading {
  margin-bottom: 14px;
}

.social-search-panel {
  position: relative;
  display: grid;
  gap: 10px;
}

.social-search-form,
.social-search-box {
  width: 100%;
}

.social-suggestions {
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.social-suggestion-empty {
  width: 100%;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.social-search-results {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.social-main {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  gap: 16px;
}

.social-contacts-panel,
.social-chat {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.social-contacts-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 0;
  overflow: hidden;
}

.social-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.social-panel-heading-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.social-create-group-button {
  min-height: 32px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.social-panel-heading span {
  font-size: 0.88rem;
  font-weight: 1000;
}

.social-panel-heading small {
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 800;
}

.social-contacts {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
  overflow-y: auto;
}

.social-person-card {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: transparent;
  text-align: left;
  transition:
    transform 150ms ease,
    background 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.social-person-card:hover,
.social-person-card.active {
  transform: translateY(-1px);
  border-color: var(--line);
  background: var(--surface-soft);
  box-shadow: var(--shadow-sm);
}

.social-person-card.compact {
  width: min(270px, 78vw);
  flex: 0 0 auto;
  background: var(--surface-soft);
}

.social-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    radial-gradient(circle at 26% 18%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 43%),
    var(--surface-soft);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 1000;
}

.social-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.social-person-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.social-person-info strong {
  overflow: hidden;
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-person-info small {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-action-chip {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 0.62rem;
  font-weight: 1000;
}

.social-empty,
.social-chat-empty,
.social-result-empty,
.social-message-empty {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 128px;
  padding: 18px;
  color: var(--text-soft);
  text-align: center;
}

.social-empty strong,
.social-chat-empty strong,
.social-result-empty strong {
  color: var(--text);
  font-size: 0.9rem;
}

.social-empty span,
.social-chat-empty span,
.social-result-empty span {
  max-width: 260px;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.4;
}

.social-chat {
  min-height: 0;
  overflow: hidden;
}

.social-chat-panel {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
}

.social-chat-header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 4%, var(--surface));
}

.social-chat-header .social-avatar {
  width: 48px;
  height: 48px;
}

.social-chat-title {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.social-chat-title strong {
  overflow: hidden;
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-chat-title span {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-messages {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  touch-action: pan-y;
}

.social-messages::before {
  content: "";
  margin-top: auto;
}

.social-message-row {
  width: fit-content;
  max-width: min(76%, 520px);
  display: grid;
  flex: 0 0 auto;
  gap: 5px;
  align-self: flex-start;
}

.social-message-row.mine {
  align-self: flex-end;
}

.social-messages > .social-message.mine {
  align-self: flex-end;
}

.social-messages > .social-message.theirs {
  align-self: flex-start;
}

.social-message-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  color: var(--text-soft);
}

.social-message-row.mine .social-message-identity {
  justify-content: flex-end;
}

.social-message-identity strong {
  overflow: hidden;
  font-size: 0.66rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-message-avatar {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 0.58rem;
  font-weight: 1000;
}

.social-message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.social-message {
  width: fit-content;
  max-width: 100%;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.social-message p {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.88rem;
  line-height: 1.42;
}

.social-message time {
  color: currentColor;
  font-size: 0.6rem;
  font-weight: 900;
  opacity: 0.62;
}

.social-message.mine {
  justify-self: end;
  border-bottom-right-radius: 5px;
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  background: var(--accent);
  color: var(--accent-text);
}

.social-message.theirs {
  justify-self: start;
  border-bottom-left-radius: 5px;
  background: var(--surface-soft);
  color: var(--text);
}
.mobile-nav-toggle { display: none; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); color: var(--text); cursor: pointer; }
.mobile-nav-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mobile-nav-backdrop[hidden] { display: none; }

.social-message.deleted { opacity: .7; }
.social-message.deleted p { font-style: italic; }
.social-message-reply { display: grid; gap: 2px; max-width: 100%; padding: 7px 9px; border-left: 3px solid currentColor; border-radius: 7px; background: color-mix(in srgb, currentColor 9%, transparent); text-align: left; }
.social-message-reply strong, .social-message-reply span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social-message-reply strong { font-size: .66rem; }
.social-message-reply span { font-size: .7rem; opacity: .85; }
.social-message-row.message-focused .social-message { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 32%, transparent), var(--shadow-sm); }

.social-message-menu[hidden], .social-compose-context[hidden] { display: none; }
.social-message-menu { position: fixed; z-index: 1500; width: 146px; display: grid; gap: 2px; padding: 5px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-lg); }
.social-message-menu button { width: 100%; padding: 9px 11px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: .78rem; font-weight: 800; text-align: left; cursor: pointer; }
.social-message-menu button:hover, .social-message-menu button:focus-visible { background: var(--surface-hover); outline: none; }
.social-message-menu button[data-message-action="delete"] { color: var(--danger); }

.social-compose-context { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 16px; padding: 9px 12px; border-left: 3px solid var(--accent); border-radius: 9px; background: var(--surface-soft); }
.social-compose-context > span { min-width: 0; display: grid; gap: 2px; }
.social-compose-context strong, .social-compose-context small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social-compose-context strong { color: var(--accent); font-size: .72rem; }
.social-compose-context small { color: var(--text-soft); font-size: .68rem; }
.social-compose-context button { width: 28px; height: 28px; flex: 0 0 auto; border: 0; border-radius: 50%; background: transparent; color: var(--text-soft); font-size: 1.25rem; line-height: 1; cursor: pointer; }
.social-compose-context button:hover { background: var(--surface-hover); color: var(--text); }

.social-typing {
  width: max-content;
  justify-self: end;
  display: flex;
  gap: 4px;
  margin: 0 16px 10px;
  padding: 9px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.social-typing span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--text-soft);
  animation: typingBounce 980ms ease-in-out infinite;
}

.social-typing span:nth-child(2) {
  animation-delay: 120ms;
}

.social-typing span:nth-child(3) {
  animation-delay: 240ms;
}

@keyframes typingBounce {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.42;
  }

  50% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.social-message-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 13px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.social-message-form input {
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  background: var(--surface-soft);
  color: var(--text);
}

.social-message-form input:focus {
  border-color: var(--accent);
}

.games-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.games-toolbar .search-box {
  flex: 1;
  width: auto;
}

#game-search-mode {
  min-height: 46px;
  padding: 0 34px 0 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  outline: 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
}

#game-search-mode:focus {
  border-color: var(--line-strong);
}

.ownership-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -8px 0 18px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--warning) 38%, var(--line));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--warning) 12%, var(--surface));
  box-shadow: var(--shadow-sm);
}

.ownership-notice strong {
  font-size: 0.9rem;
}

.ownership-notice span {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.games-grid {
  display: block;
  position: relative;
  min-height: 1px;
  overflow-anchor: none;
}

.games-grid-window {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  position: absolute;
  inset: 0 0 auto;
  will-change: transform;
  overflow-anchor: none;
}

.game-card {
  --game-tint: var(--accent);
  min-width: 0;
  display: grid;
  grid-template-rows: 190px 1fr;
  overflow-anchor: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--game-tint) 16%, var(--surface));
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  outline: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.game-card:hover {
  transform: translateY(-5px) rotate(-0.9deg);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.game-card:nth-child(even):hover {
  transform: translateY(-5px) rotate(0.9deg);
}

.game-preview {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--game-tint) 22%, var(--surface-soft));
}

.game-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.08));
}

.game-preview-fallback {
  --preview-title-size: 1.35rem;
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(92%, 540px);
  max-height: calc(100% - 30px);
  margin: auto;
  padding: 0 10px;
  color: #fff;
  font-size: var(--preview-title-size);
  font-weight: 1000;
  line-height: 1.04;
  text-align: center;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.78),
    0 8px 22px rgba(0, 0, 0, 0.5);
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.game-preview img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-preview.has-preview-image .game-preview-fallback {
  opacity: 0;
}

.game-preview.uses-placeholder-thumbnail img {
  opacity: 0.96;
}

.game-card-body {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 9px;
  padding: 15px;
}

.game-card-top {
  display: flex;
}

.game-category {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 0.65rem;
  font-weight: 1000;
}

.game-title {
  min-width: 0;
  margin: 0;
  font-size: 1.08rem;
  font-weight: 1000;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.game-description {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
}

.game-action {
  width: max-content;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 11px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 0.76rem;
  font-weight: 1000;
}

.empty-state {
  display: none;
  min-height: 280px;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 30px;
  text-align: center;
}

.empty-state.visible {
  display: grid;
}

.empty-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  margin-bottom: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.empty-state h2 {
  margin: 0;
  font-size: 1.15rem;
}

.empty-state p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.82rem;
}

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

.tool-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    transform 170ms ease,
    box-shadow 170ms ease,
    border-color 170ms ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.wide-tool-card {
  grid-column: 1 / -1;
}

.tool-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 20px;
}

.tool-icon {
  width: 45px;
  height: 45px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--surface-soft);
  font-size: 1rem;
  font-weight: 1000;
}

.tool-card-heading h2 {
  margin: 1px 0 4px;
  font-size: 1rem;
  font-weight: 1000;
}

.tool-card-heading p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.76rem;
  line-height: 1.4;
}

.calculator {
  display: grid;
  gap: 10px;
}

.calculator-history {
  min-height: 28px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.calculator-history button {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 0.62rem;
}

.calculator-history strong {
  color: var(--text);
}

.calculator-display-wrap {
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft);
}

#calculator-expression {
  min-height: 18px;
  color: var(--text-soft);
  font-size: 0.72rem;
  text-align: right;
}

#calculator-display {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 1000;
  text-align: right;
}

.calculator-mode-row,
.tool-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tool-chip {
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 900;
}

.tool-chip:hover,
.tool-chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
}

.calculator-buttons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.calculator-buttons button {
  min-height: 43px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
  transition:
    transform 100ms ease,
    background 120ms ease;
}

.calculator-buttons button:hover {
  background: var(--surface-hover);
}

.calculator-buttons button:active {
  transform: scale(0.95);
}

.calculator-buttons .calculator-equals {
  background: var(--accent);
  color: var(--accent-text);
}

.timer-display {
  margin: 12px 0 18px;
  font-variant-numeric: tabular-nums;
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 1000;
  letter-spacing: -0.055em;
  text-align: center;
}

.timer-display.timer-finished {
  animation: timerFlash 500ms ease-in-out 6;
}

@keyframes timerFlash {
  50% {
    color: var(--danger);
    transform: scale(1.03);
  }
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.lap-list {
  max-height: 240px;
  margin-top: 15px;
  overflow-y: auto;
}

.lap-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 15px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 0.72rem;
}

.lap-row span {
  color: var(--text-soft);
}

.lap-row small {
  color: var(--text-faint);
}

.lap-row.best strong {
  color: var(--success);
}

.lap-row.worst strong {
  color: var(--danger);
}

.time-inputs,
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

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

.time-inputs label,
.form-grid label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.time-inputs label span,
.form-grid label span {
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 800;
}

.time-inputs input,
.form-grid input,
.form-grid select,
.dice-builder input,
.todo-create input,
.todo-create select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: var(--surface-soft);
  color: var(--text);
}

.time-inputs input:focus,
.form-grid input:focus,
.form-grid select:focus,
.dice-builder input:focus,
.todo-create input:focus,
.todo-create select:focus {
  border-color: var(--accent);
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 11px 0;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 800;
}

.toggle-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}

.toggle-row > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-row strong {
  color: var(--text);
  font-size: 0.78rem;
}

.toggle-row small {
  color: var(--text-soft);
  font-size: 0.7rem;
}

.result-box {
  min-height: 54px;
  margin-top: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--text-soft);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.coin {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  margin: 5px auto 18px;
  border: 5px solid var(--line-strong);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, var(--surface), var(--surface-soft));
  box-shadow: var(--shadow-md);
  font-size: 2.6rem;
  font-weight: 1000;
  transform-style: preserve-3d;
}

.coin-flipping {
  animation: coinFlip 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes coinFlip {
  from {
    transform: rotateY(0) translateY(0);
  }

  45% {
    transform: rotateY(720deg) translateY(-15px);
  }

  to {
    transform: rotateY(1080deg) translateY(0);
  }
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 13px;
}

.mini-stats > div,
.text-stats > div,
.typing-stats > div,
.typing-results > div,
.reaction-stats > div,
.aim-stats > div,
.cps-stats > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}

.mini-stats span,
.text-stats span,
.typing-stats span,
.typing-results span,
.reaction-stats span,
.aim-stats span,
.cps-stats span {
  color: var(--text-soft);
  font-size: 0.62rem;
  font-weight: 800;
}

.mini-stats strong,
.text-stats strong,
.typing-stats strong,
.typing-results strong,
.reaction-stats strong,
.aim-stats strong,
.cps-stats strong {
  font-size: 0.88rem;
}

.history-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.history-strip span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 0.65rem;
  font-weight: 1000;
}

.history-strip .heads {
  color: var(--success);
}

.history-strip .tails {
  color: var(--blue);
}

.dice-builder {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 11px;
}

.dice-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 17px;
  padding: 14px;
  border-radius: 13px;
  background: var(--surface-soft);
}

.dice-total span {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 800;
}

.dice-total strong {
  font-size: 1.8rem;
}

.tool-textarea {
  width: 100%;
  min-height: 240px;
  resize: vertical;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  background: var(--surface-soft);
  color: var(--text);
  line-height: 1.55;
}

.tool-textarea:focus {
  border-color: var(--accent);
}

.text-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.minigame-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.minigame-leaderboards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.minigame-leaderboard-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px 17px 14px 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.minigame-leaderboard-card > strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.76rem;
}

.minigame-leaderboard-card ol,
.donation-leaderboard ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.minigame-leaderboard-card li,
.donation-leaderboard li {
  min-width: 0;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  font-size: 0.67rem;
  font-weight: 800;
}

.minigame-leaderboard-card li span:nth-child(2),
.donation-leaderboard li span:nth-child(2) {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.minigame-leaderboard-empty {
  color: var(--text-faint);
  font-size: 0.66rem;
  font-weight: 800;
}

.minigame-card {
  min-width: 0;
  min-height: 135px;
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 15px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition:
    transform 170ms ease,
    border-color 170ms ease,
    box-shadow 170ms ease;
}

.minigame-card:hover {
  transform: translateY(-4px) rotate(-0.6deg);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.minigame-card:nth-child(even):hover {
  transform: translateY(-4px) rotate(0.6deg);
}

.minigame-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: var(--surface-soft);
  font-size: 1.3rem;
  font-weight: 1000;
}

.minigame-card-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.minigame-card-content strong {
  font-size: 0.98rem;
}

.minigame-card-content small {
  color: var(--text-soft);
  font-size: 0.74rem;
  line-height: 1.4;
}

.minigame-stat {
  min-width: 76px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.minigame-stat small {
  color: var(--text-soft);
  font-size: 0.62rem;
  font-weight: 800;
}

.minigame-stat strong {
  font-size: 0.85rem;
}

.minigame-stage {
  margin-top: 4px;
}

.minigame-stage-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}

.minigame-stage-header h2 {
  font-size: 1.7rem;
}

.minigame-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.typing-toolbar,
.aim-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.typing-stats,
.typing-results,
.reaction-stats,
.aim-stats,
.cps-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.reaction-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.typing-passage {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--text-faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.75;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: none;
}

.typing-passage span {
  white-space: pre-wrap;
}

.typing-passage span.correct {
  color: var(--success);
}

.typing-passage span.incorrect {
  color: var(--danger);
  text-decoration: underline;
}

.typing-passage span.current {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 2px;
}

#typing-input {
  width: 100%;
  min-height: 105px;
  margin-top: 12px;
  resize: vertical;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  background: var(--surface);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

#typing-input:focus {
  border-color: var(--accent);
}

.typing-results {
  margin-top: 14px;
  margin-bottom: 0;
}

.reaction-area {
  width: 100%;
  min-height: 380px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-soft);
  transition:
    background 150ms ease,
    color 150ms ease,
    transform 100ms ease;
}

.reaction-area strong {
  font-size: clamp(1.8rem, 6vw, 3.8rem);
  font-weight: 1000;
}

.reaction-area span {
  color: var(--text-soft);
  font-size: 0.8rem;
}

.reaction-area.waiting {
  background: color-mix(in srgb, var(--warning) 10%, var(--surface));
}

.reaction-area.ready {
  background: var(--success);
  color: #ffffff;
}

.reaction-area.ready span {
  color: rgba(255, 255, 255, 0.8);
}

.reaction-area.early {
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
}

.reaction-history {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}

.reaction-history > span {
  display: flex;
  flex-direction: column;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.reaction-history small {
  color: var(--text-soft);
  font-size: 0.55rem;
}

.reaction-history strong {
  font-size: 0.72rem;
}

.aim-toolbar {
  align-items: flex-start;
}

.aim-stats {
  flex: 1;
  margin: 0;
}

.aim-arena {
  position: relative;
  height: min(560px, 58vh);
  min-height: 390px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at center, color-mix(in srgb, var(--accent) 4%, transparent), transparent 55%),
    var(--surface-soft);
  cursor: crosshair;
}

.aim-start {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 150px;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0 18px;
  border: 0;
  border-radius: 15px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 1000;
  transform: translate(-50%, -50%);
}

.aim-start strong {
  font-size: 1.3rem;
}

.aim-start span {
  font-size: 0.68rem;
}

.aim-target {
  position: absolute;
  z-index: 2;
  padding: 0;
  border: 4px solid var(--accent);
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--accent) 0 22%, transparent 23% 44%, var(--accent) 45% 60%, transparent 61%);
  box-shadow: 0 5px 14px color-mix(in srgb, var(--accent) 20%, transparent);
}

.aim-target:hover {
  transform: scale(1.05);
}

.aim-target.moving {
  animation: movingTarget 900ms ease-in-out infinite alternate;
}

@keyframes movingTarget {
  to {
    transform: translate(var(--move-x), var(--move-y));
  }
}

.cps-area {
  width: 100%;
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-soft);
  user-select: none;
}

.cps-area:active {
  transform: scale(0.997);
  background: var(--surface-hover);
}

.cps-area strong {
  font-size: clamp(2rem, 6vw, 4rem);
}

.cps-area span {
  color: var(--text-soft);
}

.notepad-layout {
  min-height: 650px;
  display: grid;
  grid-template-columns: 270px 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.save-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 800;
}

.save-indicator.saving .status-dot {
  background: var(--warning);
}

.notes-sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
}

.notes-sidebar-top {
  display: grid;
  gap: 10px;
  padding: 13px;
  border-bottom: 1px solid var(--line);
}

.compact-search {
  min-height: 40px;
  box-shadow: none;
}

.notes-list {
  min-height: 0;
  overflow-y: auto;
  padding: 8px;
}

.note-list-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 5px;
  padding: 11px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  text-align: left;
}

.note-list-item:hover {
  background: var(--surface-hover);
}

.note-list-item.active {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.note-list-item strong {
  overflow: hidden;
  font-size: 0.77rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-list-item span {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-list-item small {
  color: var(--text-faint);
  font-size: 0.59rem;
}

.note-editor {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.note-editor-toolbar {
  min-height: 59px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
}

#note-title {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-weight: 1000;
}

.note-toolbar-actions {
  display: flex;
  gap: 6px;
}

#note-content {
  width: 100%;
  min-height: 500px;
  resize: none;
  padding: 22px;
  border: 0;
  outline: 0;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.7;
}

.note-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.63rem;
  font-weight: 700;
}

.todo-dashboard {
  display: grid;
  gap: 14px;
}

.todo-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.todo-stats article {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.todo-stats span {
  color: var(--text-soft);
  font-size: 0.67rem;
  font-weight: 800;
}

.todo-stats strong {
  font-size: 1.45rem;
}

.todo-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 150px auto;
  gap: 9px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.todo-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

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

.todo-item {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.todo-item.completed {
  opacity: 0.6;
}

.todo-check,
.todo-delete {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.todo-check {
  color: var(--success);
  font-weight: 1000;
}

.todo-delete {
  color: var(--danger);
  font-size: 1.1rem;
}

.todo-item-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.todo-item-content strong {
  font-size: 0.82rem;
}

.todo-item.completed .todo-item-content strong {
  text-decoration: line-through;
}

.todo-item-content > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--text-soft);
  font-size: 0.62rem;
}

.todo-priority {
  padding: 3px 7px;
  border-radius: 999px;
  text-transform: capitalize;
}

.priority-high {
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
  color: var(--danger);
}

.priority-normal {
  background: var(--surface-soft);
}

.priority-low {
  background: color-mix(in srgb, var(--blue) 10%, var(--surface));
  color: var(--blue);
}

.settings-page-card {
  width: min(920px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.settings-section + .settings-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.settings-heading {
  margin-bottom: 14px;
}

.settings-heading h2 {
  font-size: 1.35rem;
}

.settings-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.settings-heading-row output {
  min-width: 58px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 1000;
  text-align: center;
}

.gui-scale-slider {
  width: 100%;
  accent-color: var(--accent);
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.theme-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  text-align: left;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.theme-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.theme-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.theme-preview {
  height: 57px;
  border-radius: 9px;
}

.theme-light-preview {
  background: linear-gradient(135deg, #ffffff 50%, #eceef1 50%);
}

.theme-dark-preview {
  background: linear-gradient(135deg, #202226 50%, #303238 50%);
}

.theme-orange-preview {
  background: linear-gradient(135deg, #fff3e5 50%, #ff9c50 50%);
}

.theme-blue-preview {
  background: linear-gradient(135deg, #eef5ff 50%, #4d82e7 50%);
}

.theme-pink-preview {
  background: linear-gradient(135deg, #fff0f6 50%, #ed78aa 50%);
}

.theme-retro-preview {
  background: linear-gradient(135deg, #f4edcf 50%, #77703c 50%);
}

.theme-terminal-preview {
  background: linear-gradient(135deg, #071009 50%, #71ff8d 50%);
}

.theme-midnight-preview {
  background: linear-gradient(135deg, #0b101c 50%, #1d3155 50%);
}

.theme-card > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.theme-card strong {
  font-size: 0.72rem;
}

.theme-card small {
  color: var(--text-soft);
  font-size: 0.6rem;
}

.profile-save-state {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 900;
}

.current-disguise {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.current-disguise-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft);
  font-size: 1.2rem;
  font-weight: 1000;
}

.current-disguise-icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 0 0.85px var(--text));
}

.current-disguise-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.current-disguise-info span {
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 800;
}

.current-disguise-info strong {
  font-size: 0.95rem;
}

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

.disguise-card {
  min-width: 0;
  min-height: 88px;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.disguise-card:hover {
  transform: translateY(-3px) rotate(-0.6deg);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.disguise-card.active {
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px var(--accent),
    var(--shadow-sm);
}

.disguise-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  background: var(--surface-soft);
  font-weight: 1000;
}

.disguise-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 0 0.85px var(--text));
}

.disguise-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.disguise-info strong,
.disguise-info small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.disguise-info strong {
  font-size: 0.82rem;
}

.disguise-info small {
  color: var(--text-soft);
  font-size: 0.66rem;
}

.executor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  min-height: 610px;
}

.executor-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.input-panel {
  grid-template-rows: auto 1fr auto;
}

.output-panel {
  grid-template-rows: auto 1fr;
}

.executor-panel-header {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px 9px 15px;
  border-bottom: 1px solid var(--line);
}

.executor-panel-header > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.executor-panel-header strong {
  font-size: 0.78rem;
}

.panel-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--text);
}

.panel-dot.output {
  background: var(--success);
}

#executor-input {
  width: 100%;
  min-height: 500px;
  resize: none;
  padding: 18px;
  border: 0;
  outline: 0;
  background: var(--surface-soft);
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  tab-size: 2;
}

.executor-actions {
  display: flex;
  justify-content: flex-end;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.executor-frame-wrap {
  min-width: 0;
  min-height: 0;
  background: #ffffff;
}

#executor-frame {
  width: 100%;
  height: 100%;
  min-height: 555px;
  border: 0;
  background: #ffffff;
}

.output-panel:fullscreen {
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
}

.profile-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 620;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(9px);
}

.profile-card-modal {
  --profile-card-color: var(--surface);
  position: relative;
  width: min(640px, 100%);
  min-height: 430px;
  display: flex;
  flex-direction: column;
  padding: 34px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--profile-body, var(--surface));
  box-shadow: var(--shadow-lg);
}

.profile-card-modal.owner-rainbow-outline {
  border-color: transparent;
}

.profile-card-modal.owner-rainbow-outline::after {
  content: "";
  position: absolute;
  inset: -3px;
  z-index: 5;
  padding: 3px;
  border-radius: calc(var(--radius-lg) + 3px);
  background: linear-gradient(90deg, #ff3b3b, #ff9f1c, #ffe733, #41d96b, #35b8ff, #725cff, #ef55cf, #ff3b3b, #ff9f1c, #ffe733, #41d96b, #35b8ff, #725cff, #ef55cf, #ff3b3b);
  background-size: 300% 100%;
  box-shadow: 0 0 16px rgba(114, 92, 255, 0.24);
  pointer-events: none;
  -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;
  animation: profileOwnerRainbow 5s linear infinite;
}

@keyframes profileOwnerRainbow {
  to { background-position: -150% 0; }
}

.profile-banner {
  position: absolute;
  inset: 0 0 auto;
  height: 158px;
  border-radius: 21px 21px 0 0;
  border-bottom: 1px solid var(--line);
  background-position: center;
  background-size: cover;
  pointer-events: none;
}

.profile-card-top,
.profile-about-field,
.profile-customize-wrap,
.profile-save-state {
  position: relative;
}

.profile-modal-close,
.profile-modal-menu-button { z-index: 2; }

.profile-card-avatar-button {
  outline: 4px solid var(--surface);
}

.profile-badge-foxxPlus {
  color: #fff;
  border-color: #9255cc;
  background: linear-gradient(120deg, #7953cc, #c166bd);
}

.profile-modal-menu-button {
  position: absolute;
  top: 16px;
  right: 60px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--text-soft);
}

.profile-modal-menu-button:hover,
.profile-modal-menu-button[aria-expanded="true"] {
  color: var(--text);
  background: var(--surface-hover);
}

.profile-modal-menu-button span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.profile-modal-menu {
  position: absolute;
  z-index: 4;
  top: 58px;
  right: 60px;
  width: 190px;
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px 16px 13px 17px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.profile-modal-menu > button {
  min-height: 35px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 0.75rem;
  font-weight: 900;
}

.profile-modal-menu > button:hover {
  background: var(--surface-hover);
}

.profile-modal-menu > button.danger-button {
  color: var(--danger);
}

.profile-badge-manager {
  display: grid;
  gap: 6px;
  margin-top: 3px;
  padding: 9px 8px 4px;
  border-top: 1px solid var(--line);
}

.profile-badge-manager > span {
  color: var(--text-soft);
  font-size: 0.62rem;
  font-weight: 1000;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-badge-manager label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7rem;
  font-weight: 850;
}

.profile-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--text-soft);
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.profile-modal-close:hover {
  color: var(--text);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.profile-modal-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.profile-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 30px;
  padding-right: 0;
}

.profile-card-identity {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.profile-card-avatar-button {
  position: relative;
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: var(--shadow-md);
}

.profile-card-avatar-button:disabled {
  cursor: default;
  opacity: 1;
}

.profile-card-avatar {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: inherit;
  background:
    radial-gradient(circle at 25% 20%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 45%),
    var(--surface-soft);
  color: var(--text);
  font-size: 2.7rem;
  font-weight: 1000;
  transition: filter 180ms ease;
}

.profile-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-edit-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.36);
  color: #ffffff;
  opacity: 0;
  transition: opacity 180ms ease;
}

.profile-edit-overlay svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-card-avatar-button:not(:disabled):hover .profile-edit-overlay,
.profile-card-avatar-button:not(:disabled):focus-visible .profile-edit-overlay {
  opacity: 1;
}

.profile-name-row {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 7px;
  margin-top: 17px;
}

.profile-display-name-field {
  position: relative;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 7px 3px 0;
  border-radius: 9px;
  transition: background 160ms ease;
}

.profile-display-name-field:hover,
.profile-display-name-field:focus-within {
  background: color-mix(in srgb, var(--text) 9%, transparent);
}

.profile-display-name-field input {
  width: min(170px, 100%);
  min-width: 0;
  padding: 2px 4px 2px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.12rem;
  font-weight: 1000;
}

.profile-display-name-field svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--text-soft);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.profile-badge {
  position: relative;
  isolation: isolate;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  font-size: 0.65rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.profile-badge-owner {
  border-color: transparent;
  background: linear-gradient(105deg, #ff3030, #ff9f1c, #ffe733, #41d96b, #35b8ff, #725cff, #ef55cf, #ff3030);
  background-size: 220% 100%;
  color: rgba(255, 255, 255, 0.7);
  mix-blend-mode: normal;
  animation: ownerBadgeShift 8s linear infinite;
}

.profile-badge-owner span {
  mix-blend-mode: difference;
}

.profile-badge-day1 {
  border-color: #7f1017;
  background: #ef3c45;
  color: #111111;
  animation: redBadgeOutline 4s ease-in-out infinite;
}

.profile-badge-topDonator {
  border-color: #145c32;
  background: linear-gradient(120deg, #43db78, #97ef82, #30b867);
  background-size: 180% 100%;
  color: #0d522b;
  animation: greenBadgeShift 5s ease-in-out infinite;
}

@keyframes ownerBadgeShift {
  to { background-position: 220% 0; }
}

@keyframes redBadgeOutline {
  0%, 100% { border-color: #761018; box-shadow: 0 0 0 1px rgba(118, 16, 24, 0.14); }
  50% { border-color: #b0232c; box-shadow: 0 0 0 1px rgba(176, 35, 44, 0.2); }
}

@keyframes greenBadgeShift {
  0%, 100% { background-position: 0 0; border-color: #0d572b; }
  50% { background-position: 100% 0; border-color: #287a3d; }
}

.profile-user-line {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 0.72rem;
}

.profile-user-line > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-user-line input {
  width: 98px;
  min-width: 0;
  height: 25px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 0.67rem;
}

.profile-user-line input:focus {
  border-color: var(--accent);
}

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

.profile-modal-field > span {
  color: var(--text-soft);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-modal-field input,
.profile-modal-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: var(--surface-soft);
  color: var(--text);
  transition: border-color 150ms ease, background 150ms ease;
}

.profile-modal-field input {
  min-height: 42px;
  padding: 0 12px;
}

.profile-modal-field textarea {
  min-height: 126px;
  resize: none;
  padding: 12px;
  line-height: 1.5;
}

.profile-about-me-display {
  min-height: 126px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.profile-about-me-display.editable {
  cursor: text;
  transition: border-color 150ms ease, background 150ms ease;
}

.profile-about-me-display.editable:hover,
.profile-about-me-display.editable:focus-visible {
  border-color: var(--accent);
  background: var(--surface);
  outline: none;
}

.profile-about-me-display.editable:empty::before {
  color: var(--muted);
  content: "Click to add something about yourself.";
}

.user-content-link {
  color: #2476d8;
  font-weight: 750;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.social-message.mine .user-content-link {
  color: #c7e3ff;
}

.user-content-link:hover {
  text-decoration-thickness: 2px;
}

.profile-modal-field input:focus,
.profile-modal-field textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
}

.profile-status-field {
  position: absolute;
  top: 25px;
  left: 240px;
  right: 42px;
}

.profile-about-field {
  width: min(470px, 100%);
  align-self: center;
  margin-top: 34px;
}

.profile-customize-wrap {
  position: relative;
  align-self: flex-start;
  margin-top: 14px;
}

.profile-customize-button {
  min-height: 34px;
}

.profile-color-picker {
  position: absolute;
  z-index: 3;
  bottom: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px 16px 13px 17px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.profile-color-picker > label {
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 900;
}

.profile-color-picker > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-color-picker > .profile-badge-manager {
  display: grid;
  align-items: stretch;
}

.profile-color-picker input[type="color"] {
  width: 58px;
  height: 34px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}

.profile-card-modal > .profile-save-state {
  margin-top: 12px;
  text-align: right;
}

.profile-card-modal.read-only .profile-display-name-field:hover,
.profile-card-modal.read-only .profile-display-name-field:focus-within {
  background: transparent;
}

.profile-card-modal.read-only .profile-display-name-field svg,
.profile-card-modal.read-only > .profile-save-state {
  display: none;
}

.profile-card-modal.read-only .profile-customize-wrap {
  display: none;
}

.profile-card-modal.read-only input,
.profile-card-modal.read-only textarea {
  cursor: default;
}

.profile-avatar-trigger {
  cursor: pointer;
}

.profile-avatar-trigger:hover {
  border-color: var(--line-strong);
}

.donation-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 630;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(9px);
}

.groupchat-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 660;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(9px);
}

.link-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(9px);
}

.link-confirm-modal {
  width: min(440px, 100%);
  display: grid;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.link-confirm-modal h2,
.link-confirm-modal p {
  margin: 0;
}

.link-confirm-modal p {
  max-height: 96px;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 0.76rem;
  line-height: 1.45;
  overflow: auto;
  overflow-wrap: anywhere;
}

.link-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.groupchat-modal {
  position: relative;
  width: min(520px, 100%);
  max-height: min(680px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 11px;
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.groupchat-modal h2,
.groupchat-modal p {
  margin: 0;
}

.groupchat-modal p {
  padding-right: 28px;
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.45;
}

.groupchat-selection-status {
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 900;
}

.groupchat-member-list {
  min-height: 130px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft);
  overflow-y: auto;
}

.groupchat-member-option {
  display: grid;
  grid-template-columns: auto 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}

.groupchat-member-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}

.groupchat-member-option .social-avatar {
  width: 40px;
  height: 40px;
}

.groupchat-member-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.groupchat-member-copy strong,
.groupchat-member-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.groupchat-member-copy strong {
  font-size: 0.82rem;
}

.groupchat-member-copy small {
  color: var(--text-soft);
  font-size: 0.66rem;
  font-weight: 800;
}

.groupchat-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.donation-modal {
  position: relative;
  width: min(430px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 22px 25px 21px 26px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.donation-modal h2 {
  margin: 5px 0 7px;
  font-size: 1.55rem;
}

.donation-modal > p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.8rem;
  line-height: 1.5;
}

.donation-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--text-soft);
}

.donation-modal-close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.donation-leaderboard {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px 17px 14px 18px;
  background: var(--surface-soft);
}

.donation-leaderboard > strong {
  font-size: 0.8rem;
}

.donation-leaderboard > span {
  color: var(--text-faint);
  font-size: 0.7rem;
  font-weight: 800;
}

.donation-continue {
  width: 100%;
  margin-top: 15px;
}

.site-app.account-locked {
  filter: blur(7px);
  pointer-events: none;
  user-select: none;
}

.account-gate {
  position: fixed;
  inset: 0;
  z-index: 650;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

.account-card {
  width: min(430px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 97%, transparent);
  box-shadow: var(--shadow-lg);
}

.account-card-top {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
}

.account-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 1000;
}

.account-card h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.account-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 14px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.account-tab {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 1000;
}

.account-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.account-form {
  display: none;
  gap: 12px;
}

.account-form.active {
  display: grid;
}

.account-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.account-form label span {
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 800;
}

.account-form input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: var(--surface-soft);
  color: var(--text);
}

.account-form input:focus {
  border-color: var(--accent);
}

.account-message {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.4;
}

.account-message[data-type="success"] {
  color: var(--success);
}

.game-view {
  min-height: calc(100vh - 182px);
}

.game-view-header {
  min-height: 72px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.game-player-heading {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.game-player-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.game-player-heading h1 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-player-actions {
  display: flex;
  gap: 8px;
}

.game-player-button {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  background: #292929;
  color: #ffffff;
  font-size: 0.7rem;
}

.game-close {
  min-height: 36px;
  padding: 0 14px;
  display: grid;
  place-items: center;
  border: 0;
  background: #ffffff;
  color: #111111;
  font-size: 0.7rem;
}

.game-view-frame {
  min-height: 520px;
  height: calc(100vh - 235px);
  display: grid;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 20px;
  background: #080808;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

#game-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #000000;
}

.game-view-frame:fullscreen {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #000000;
}

.game-view-frame:fullscreen #game-frame {
  border: 0;
  border-radius: 0;
}

.puzzle-help {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 470;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  color: var(--text);
  box-shadow: var(--shadow-md);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
  backdrop-filter: blur(14px);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.puzzle-help:hover, .puzzle-help[aria-expanded="true"] {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.puzzle-panel {
  position: fixed;
  right: 18px;
  bottom: 82px;
  z-index: 471;
  width: min(390px, calc(100vw - 36px));
  max-height: min(70vh, 530px);
  overflow: auto;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 97%, transparent);
  box-shadow: var(--shadow-lg);
  color: var(--text);
  backdrop-filter: blur(18px);
}
.puzzle-panel[hidden], .puzzle-form[hidden], .puzzle-history[hidden] { display: none; }
.puzzle-close {
  position: absolute;
  top: 11px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 1.2rem;
  line-height: 1;
}
.puzzle-progress {
  display: block;
  margin-bottom: 12px;
  color: var(--text-faint);
  font: 700 .68rem/1.2 ui-monospace, monospace;
  letter-spacing: .16em;
}
.puzzle-hint {
  margin: 0 18px 18px 0;
  color: var(--text);
  font-size: .91rem;
  line-height: 1.6;
}
.puzzle-hint strong { color: var(--accent); font-weight: 900; }
.puzzle-history {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 86px;
  margin: 0 0 14px;
  overflow: auto;
}
.puzzle-history span {
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text-soft);
  font: 650 .66rem/1.2 ui-monospace, monospace;
}
.puzzle-form { display: flex; gap: 8px; }
.puzzle-form input {
  min-width: 0;
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: var(--surface-soft);
  color: var(--text);
  font: 700 .88rem/1.3 ui-monospace, monospace;
  text-transform: uppercase;
}
.puzzle-form input:focus { border-color: var(--accent); }
.puzzle-form button {
  min-width: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 1.4rem;
  font-weight: 900;
}
.puzzle-wrong { animation: puzzleWrong 260ms ease; }
@keyframes puzzleWrong { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.puzzle-correct-flash {
  position: fixed;
  inset: 0;
  z-index: 650;
  pointer-events: none;
  background: color-mix(in srgb, var(--success) 32%, transparent);
  opacity: 0;
}
.puzzle-correct-flash.active { animation: puzzleCorrect 580ms ease-out forwards; }
@keyframes puzzleCorrect { 15% { opacity: .5; } 100% { opacity: 0; } }
.puzzle-carrier { position: relative; }
.puzzle-signal {
  position: absolute;
  right: 12px;
  bottom: 4px;
  z-index: 2;
  display: block;
  width: min(320px, 80%);
  height: 46px;
  color: var(--accent);
  pointer-events: none;
  opacity: .26;
  transition: opacity 250ms ease;
}
.puzzle-carrier:hover > .puzzle-signal { opacity: .58; }
.puzzle-signal svg { width: 100%; height: 100%; overflow: visible; }
.puzzle-signal line, .puzzle-signal circle, .puzzle-signal ellipse {
  stroke: currentColor;
  fill: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
}
.puzzle-signal circle[fill="none"], .puzzle-signal ellipse[fill="none"] { fill: none; }
.puzzle-signal-braille, .puzzle-signal-arms, .puzzle-signal-gray {
  width: 28px;
  height: 28px;
  right: 0;
  bottom: 0;
  opacity: .35;
}
.puzzle-signal-braille { right: auto; left: 8px; bottom: 22px; }
.puzzle-signal-arms { right: -1px; bottom: 0; }
.puzzle-signal-gray { right: -8px; bottom: -2px; }
.puzzle-signal-dots { right: auto; left: 64px; bottom: 7px; }
.puzzle-signal-ternary { right: 0; bottom: -13px; width: 100%; height: 20px; }
.puzzle-signal-runs { right: 0; bottom: -15px; width: 100%; height: 34px; }
.puzzle-signal-echo { right: 0; bottom: -16px; height: 25px; }
.puzzle-signal-route { width: 170px; height: 64px; right: 15px; bottom: -9px; }
.puzzle-signal-trifid { width: 190px; height: 100px; right: 14px; bottom: 6px; }
@media (max-width: 600px) {
  .puzzle-panel { right: 10px; bottom: 74px; width: calc(100vw - 20px); }
  .puzzle-help { right: 12px; bottom: 12px; }
  .puzzle-signal { max-width: 75%; }
}
@media (prefers-reduced-motion: reduce) {
  .puzzle-correct-flash.active { animation-duration: 300ms; }
  .puzzle-wrong { animation: none; }
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 55%, transparent);
  outline-offset: 3px;
}

html[data-animations="off"] *,
html[data-animations="off"] *::before,
html[data-animations="off"] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

html[data-wave="off"] .brand-letter {
  animation: none !important;
  transform: none !important;
}

html[data-tilt="off"] .dashboard-card:hover,
html[data-tilt="off"] .game-card:hover,
html[data-tilt="off"] .minigame-card:hover,
html[data-tilt="off"] .disguise-card:hover,
html[data-tilt="off"] .primary-button:hover,
html[data-tilt="off"] .menu-button:hover {
  transform: translateY(-3px);
}

html[data-theme="terminal"] body,
html[data-theme="terminal"] input,
html[data-theme="terminal"] textarea,
html[data-theme="terminal"] select,
html[data-theme="terminal"] button {
  font-family: "Courier New", monospace;
}

html[data-theme="retro"] body,
html[data-theme="retro"] input,
html[data-theme="retro"] textarea,
html[data-theme="retro"] select,
html[data-theme="retro"] button {
  font-family: "Trebuchet MS", Arial, sans-serif;
}

@media (max-width: 1060px) {
  .hero-metric {
    min-width: 76px;
    padding-inline: 10px;
  }

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

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

  .disguise-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .theme-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .wide-tool-card {
    grid-column: auto;
  }

  .executor-panel {
    min-height: 520px;
  }

  #executor-input {
    min-height: 430px;
  }

  #executor-frame {
    min-height: 470px;
  }
}

@media (max-width: 820px) {
  #view-social.active {
    height: calc(var(--scaled-viewport-height, 100dvh) - 132px);
    display: grid;
    overflow: hidden;
  }

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

  .notepad-layout {
    grid-template-columns: 220px 1fr;
  }

  .todo-create {
    grid-template-columns: 1fr 120px;
  }

  .todo-create #todo-date,
  .todo-create .primary-button {
    width: 100%;
  }

  .ownership-notice {
    align-items: flex-start;
    flex-direction: column;
  }

  .social-main {
    grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  }

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

@media (max-width: 700px) {
  :root {
    --sidebar-width: min(280px, calc(100vw - 56px));
  }

  .mobile-nav-toggle { display: grid; }
  .mobile-nav-backdrop { position: fixed; z-index: 80; inset: var(--header-height) 0 0; background: rgba(10, 10, 17, .45); }
  .sidebar { transform: translateX(-105%); transition: transform 200ms ease; }
  body.mobile-nav-open .sidebar { transform: translateX(0); }
  .main-content { width: 100%; margin-left: 0; }

  .top-header {
    grid-template-columns: 1fr auto;
    align-content: center;
    gap: 8px 12px;
    padding: 6px 14px;
  }

  .header-brand {
    flex-wrap: wrap;
    gap: 4px 10px;
  }

  .coffee-button {
    min-height: 28px;
    padding: 4px 7px;
    font-size: 0.65rem;
  }

  .brand {
    font-size: 1.9rem;
  }

  .games-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .games-toolbar .search-box,
  #game-search-mode {
    width: 100%;
  }

  .hero-metrics {
    gap: 6px;
  }

  .site-version {
    font-size: 0.62rem;
  }

  .notification-button {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .notification-popover {
    left: auto;
    right: 0;
  }

  .hero-metric {
    flex: 1;
    min-width: 0;
    min-height: 38px;
    padding: 6px 8px;
  }

  .hero-metric span {
    font-size: 0.5rem;
  }

  .hero-metric strong {
    gap: 5px;
    font-size: 0.72rem;
  }

  .header-status {
    display: none;
  }

  .main-content {
    padding: 98px 14px 54px;
  }

  .page-heading {
    min-height: 24px;
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 18px;
  }

  .page-heading h1 {
    font-size: 2.45rem;
  }

  .page-count {
    align-items: flex-start;
  }

  .dashboard-grid,
  .minigame-grid {
    grid-template-columns: 1fr;
  }

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

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

  .typing-stats,
  .typing-results,
  .aim-stats,
  .cps-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .typing-toolbar,
  .aim-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .reaction-area,
  .cps-area {
    min-height: 300px;
  }

  .notepad-layout {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .notes-sidebar {
    max-height: 280px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  #note-content {
    min-height: 430px;
  }

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

  .todo-create {
    grid-template-columns: 1fr;
  }

  .todo-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .game-view-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .game-view-frame {
    height: calc(100vh - 235px);
    min-height: 420px;
  }

  .game-view .game-player-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .social-heading {
    gap: 14px;
  }

  .social-suggestions {
    padding: 8px;
  }

  .social-message {
    max-width: 86%;
  }

  .social-message-row {
    max-width: 86%;
  }

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

@media (max-width: 520px) {
  .games-grid-window,
  .disguise-grid,
  .theme-grid {
    grid-template-columns: 1fr;
  }

  .game-card {
    grid-template-rows: 175px 1fr;
  }

  .dashboard-card {
    min-height: 160px;
  }

  .current-disguise {
    grid-template-columns: 48px 1fr;
  }

  .current-disguise .secondary-button {
    grid-column: 1 / -1;
  }

  .calculator-buttons {
    gap: 5px;
  }

  .calculator-buttons button {
    min-height: 39px;
    font-size: 0.7rem;
  }

  .time-inputs {
    grid-template-columns: repeat(3, 1fr);
  }

  .text-stats,
  .todo-stats {
    grid-template-columns: 1fr 1fr;
  }

  .minigame-card {
    grid-template-columns: 48px 1fr;
  }

  .minigame-leaderboards {
    grid-template-columns: 1fr;
  }

  .minigame-stat {
    grid-column: 2;
    align-items: flex-start;
  }

  .reaction-stats {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .note-editor-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .note-toolbar-actions {
    flex-wrap: wrap;
  }

  .profile-modal-backdrop {
    padding: 10px;
  }

  .profile-card-modal {
    min-height: 0;
    max-height: calc(100vh - 20px);
    padding: 26px 18px 22px;
    overflow-y: auto;
  }

  .profile-banner { height: 122px; }

  .profile-card-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
    padding-right: 0;
  }

  .profile-card-avatar-button {
    width: 92px;
    height: 92px;
  }

  .profile-card-avatar {
    font-size: 2.1rem;
  }

  .profile-display-name-field {
    margin-top: 12px;
  }

  .profile-display-name-field input {
    font-size: 0.92rem;
  }

  .profile-user-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .profile-user-line input {
    width: 88px;
  }

  .profile-status-field {
    top: 44px;
    left: 120px;
    right: 0;
  }

  .profile-about-field {
    margin-top: 24px;
  }

  .settings-page-card {
    padding: 18px;
  }

  .social-person-card {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .social-panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .social-create-group-button {
    width: 100%;
  }

  .social-person-card .social-action-chip {
    grid-column: 2;
    justify-self: start;
  }

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

  .groupchat-modal-backdrop {
    padding: 10px;
  }

  .groupchat-modal {
    max-height: calc(100vh - 20px);
    padding: 24px 18px 18px;
  }
}

/* Foxx+ appearance, polls, and messaging */
html[data-theme="custom"] {
  --bg: color-mix(in srgb, var(--custom-theme-one) 16%, #f4f5f8);
  --bg-secondary: color-mix(in srgb, var(--custom-theme-two) 20%, #e9ebf1);
  --surface: color-mix(in srgb, #ffffff 91%, var(--custom-theme-one));
  --surface-soft: color-mix(in srgb, #ffffff 82%, var(--custom-theme-two));
  --surface-hover: color-mix(in srgb, #ffffff 72%, var(--custom-theme-two));
  --text: #15131c;
  --text-soft: #6d6877;
  --text-faint: #96909f;
  --line: color-mix(in srgb, var(--custom-theme-one) 20%, #dfe1e7);
  --line-strong: color-mix(in srgb, var(--custom-theme-two) 35%, #c7cad2);
  --accent: var(--custom-theme-one);
  --accent-text: #ffffff;
  --accent-soft: color-mix(in srgb, var(--custom-theme-two) 19%, #ffffff);
}

html[data-theme="custom"] body {
  background:
    radial-gradient(circle at 10% 2%, color-mix(in srgb, var(--custom-theme-one) 32%, transparent), transparent 34%),
    radial-gradient(circle at 92% 15%, color-mix(in srgb, var(--custom-theme-two) 30%, transparent), transparent 38%),
    linear-gradient(145deg, var(--bg), var(--bg-secondary));
  background-attachment: fixed;
}

.theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings-heading p { margin: 7px 0 0; color: var(--text-soft); font-size: .8rem; }
.foxxplus-settings { position: relative; }
.foxxplus-setting-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px 18px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
.foxxplus-setting-card + .foxxplus-setting-card { margin-top: 12px; }
.foxxplus-setting-copy { display: grid; gap: 3px; }
.foxxplus-setting-copy small { color: var(--text-soft); font-size: .7rem; }
.compact-toggle { display: flex; align-items: center; gap: 7px; font-size: .72rem; font-weight: 900; }
.compact-toggle input { accent-color: var(--accent); }
.foxxplus-color-controls,
.foxxplus-theme-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; grid-column: 1 / -1; }
.color-field { display: grid; gap: 5px; color: var(--text-soft); font-size: .65rem; font-weight: 900; }
.color-field input { width: 54px; height: 38px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.rainbow-option { display: inline-flex; align-items: center; gap: 7px; }
.rainbow-option span { width: 13px; height: 13px; border-radius: 50%; background: conic-gradient(#ff3b3b, #ffe733, #41d96b, #35b8ff, #725cff, #ef55cf, #ff3b3b); }
.rainbow-option.active { border-color: #8557e8; box-shadow: 0 0 0 1px #8557e8; }
.foxxplus-theme-preview { grid-column: 1 / -1; height: 62px; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(135deg, var(--preview-one), var(--preview-two)); transition: background 180ms ease; }

.social-message { --message-fill: var(--surface-soft); }
.social-message.mine { --message-fill: var(--accent); }
.social-message.theirs { --message-fill: var(--surface-soft); }
.social-message.foxxplus-message-outline { border: 2px solid var(--message-outline-color, #8557e8); box-shadow: 0 0 0 1px color-mix(in srgb, var(--message-outline-color, #8557e8) 18%, transparent), var(--shadow-sm); }
.social-message.foxxplus-message-outline.rainbow { border-color: transparent; background: linear-gradient(var(--message-fill), var(--message-fill)) padding-box, linear-gradient(90deg, #ff3b3b, #ff9f1c, #ffe733, #41d96b, #35b8ff, #725cff, #ef55cf, #ff3b3b, #ff9f1c, #ffe733, #41d96b, #35b8ff, #725cff, #ef55cf, #ff3b3b) border-box; background-size: 100% 100%, 300% 100%; animation: messageRainbow 5s linear infinite; }
@keyframes messageRainbow { to { background-position: 0 0, -150% 0; } }
.social-message-image { width: min(360px, 62vw); max-height: 360px; border-radius: 11px; object-fit: cover; cursor: zoom-in; }

.social-message-input-wrap { position: relative; min-width: 0; }
.social-message-form .social-message-input-wrap > input { width: 100%; padding-right: 48px; }
.social-attachment-button { position: absolute; top: 50%; right: 7px; width: 30px; height: 30px; display: grid; place-items: center; padding: 0 0 2px; transform: translateY(-50%); border: 0; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 1.35rem; line-height: 1; transition: transform 150ms ease, background 150ms ease; }
.social-attachment-button:hover { transform: translateY(-50%) scale(1.06); }
.social-attachment-button.uploading { animation: attachmentPulse 850ms ease-in-out infinite; }
@keyframes attachmentPulse { 50% { opacity: .45; transform: translateY(-50%) scale(.92); } }
.social-send-button { width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--accent); color: var(--accent-text); box-shadow: var(--shadow-sm); transition: transform 150ms ease, box-shadow 150ms ease; }
.social-send-button:hover { transform: translateY(-1px) scale(1.04); box-shadow: var(--shadow-md); }
.social-send-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.blog-poll { display: grid; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.blog-poll-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.blog-poll-question { font-size: 1rem; line-height: 1.35; }
.blog-poll-stop { flex: 0 0 auto; }
.blog-poll-closed { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: var(--surface-hover); color: var(--text-soft); font-size: .64rem; font-weight: 1000; letter-spacing: .02em; }
.blog-poll-options { display: grid; gap: 8px; }
.blog-poll-option { position: relative; isolation: isolate; min-height: 46px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 13px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); text-align: left; }
.blog-poll-option-fill { position: absolute; inset: 0 auto 0 0; z-index: -1; background: color-mix(in srgb, var(--text-faint) 24%, transparent); transition: width 450ms cubic-bezier(.2,.8,.2,1); }
.blog-poll-option.selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.blog-poll-option:disabled { cursor: default; opacity: 1; }
.blog-poll-option > span:not(.blog-poll-option-fill), .blog-poll-option > strong { font-size: .78rem; font-weight: 900; }
.blog-poll-total { color: var(--text-soft); font-size: .68rem; font-weight: 850; }
.blog-poll-answer-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.blog-poll-answer-form input { min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; outline: 0; background: var(--surface-soft); color: var(--text); }
.blog-poll-answer-form input:focus { border-color: var(--accent); }
.blog-poll-answers { display: grid; gap: 8px; }
.blog-poll-answer { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 9px; padding: 9px 10px; border-radius: 12px; background: var(--surface-soft); }
.blog-poll-answer .social-avatar { width: 32px; height: 32px; }
.blog-poll-answer > span:last-child { display: grid; gap: 2px; min-width: 0; }
.blog-poll-answer strong { font-size: .72rem; }
.blog-poll-answer span span { color: var(--text-soft); font-size: .78rem; overflow-wrap: anywhere; }

.profile-badge-owner { overflow: hidden; border-color: transparent; background: #171717; color: #fff; animation: none; }
.profile-badge-owner::before { content: ""; position: absolute; inset: -110%; z-index: 0; background: conic-gradient(from 0deg, #ff3030, #ff9f1c, #ffe733, #41d96b, #35b8ff, #725cff, #ef55cf, #ff3030); animation: ownerBadgeSpin 5s linear infinite; }
.profile-badge-owner span { position: relative; z-index: 1; mix-blend-mode: normal; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
@keyframes ownerBadgeSpin { to { transform: rotate(1turn); } }
.profile-badge-day1 { background: linear-gradient(110deg, #d82934, #ff6870, #ef3c45, #d82934); background-size: 240% 100%; animation: dayOneBadgeShift 4s ease-in-out infinite; }
@keyframes dayOneBadgeShift { 0%, 100% { background-position: 0 0; border-color: #761018; box-shadow: 0 0 0 1px rgba(118,16,24,.14); } 50% { background-position: 100% 0; border-color: #c52b35; box-shadow: 0 0 9px rgba(239,60,69,.3); transform: translateY(-1px); } }

.profile-badge-azazel {
  min-height: 27px;
  grid-auto-flow: column;
  gap: 4px;
  padding: 3px 9px 3px 5px;
  overflow: visible;
  border-color: #ff4050;
  background: linear-gradient(120deg, #170003 0%, #5d050c 48%, #250003 100%);
  color: #fff2f3;
  box-shadow: inset 0 1px 0 rgba(255, 155, 162, .22), 0 0 5px rgba(255, 24, 43, .8), 0 0 13px rgba(255, 14, 35, .45);
  text-shadow: 0 1px 3px #170003, 0 0 7px rgba(255, 61, 75, .85);
  animation: azazelBadgeGlow 2.8s ease-in-out infinite;
}
.profile-badge-azazel::after {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: 0;
  border: 1px solid rgba(255, 48, 65, .72);
  border-radius: 9px;
  filter: blur(2px);
}
.profile-badge-azazel-icon {
  position: relative;
  z-index: 1;
  width: 25px;
  height: 20px;
  margin: -6px -1px -3px 0;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(255, 29, 47, .9));
}
.profile-badge-azazel span { position: relative; z-index: 1; }
@keyframes azazelBadgeGlow {
  0%, 100% { border-color: #f02b3c; box-shadow: inset 0 1px 0 rgba(255,155,162,.2), 0 0 4px rgba(255,24,43,.7), 0 0 10px rgba(255,14,35,.34); }
  50% { border-color: #ff7883; box-shadow: inset 0 1px 0 rgba(255,190,195,.3), 0 0 7px rgba(255,42,58,.96), 0 0 18px rgba(255,14,35,.62); }
}

@media (max-width: 620px) {
  .foxxplus-setting-card { grid-template-columns: 1fr; }
  .compact-toggle { justify-self: start; }
  .blog-poll-answer-form { grid-template-columns: 1fr; }
  .blog-poll-heading { align-items: flex-start; }
}

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

/* Social-first shell */
.top-header { border: 0; background: transparent; backdrop-filter: none; pointer-events: none; }
.top-header > * { pointer-events: auto; }
.header-copy, .header-status { display: none !important; }
.sidebar { top: 0; height: var(--scaled-viewport-height, 100vh); padding-top: calc(var(--header-height) - 8px); display: flex; flex-direction: column; }
.sidebar-nav { flex: 0 0 auto; max-height: 43%; overflow-y: auto; }
.sidebar-friends { position: relative; min-height: 170px; flex: 1 1 0; display: flex; flex-direction: column; margin: 12px 8px 6px; padding-top: 13px; border-top: 1px solid var(--line); overflow: hidden; }
.sidebar-friends-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 7px 9px; }
.sidebar-friends-heading > div { min-width: 0; display: grid; gap: 2px; }
.sidebar-friends-heading strong { font-size: .78rem; }
.sidebar-friends-heading small { overflow: hidden; color: var(--text-soft); font-size: .6rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-group-button { flex: 0 0 auto; width: 29px; height: 29px; display: grid; place-items: center; padding: 0 0 2px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); color: var(--accent); font-size: 1.15rem; font-weight: 900; }
.sidebar-friends .social-search-panel { position: relative; padding: 0 5px 7px; }
.sidebar-friends .social-search-box { min-height: 35px; }
.sidebar-friends .social-search-box input { font-size: .7rem; }
.sidebar-friends .social-suggestions, .sidebar-friends .social-search-results { position: absolute; z-index: 30; top: calc(100% - 3px); left: 5px; right: 5px; max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg); }
.sidebar-friends .social-contacts { min-height: 0; flex: 1 1 auto; display: grid; align-content: start; gap: 3px; overflow-y: auto; padding: 0 4px 8px; }
.sidebar-friends .social-person-card { position: relative; min-width: 0; grid-template-columns: 35px minmax(0, 1fr) auto; padding: 7px; border: 0; border-radius: 11px; background: transparent; box-shadow: none; }
.sidebar-friends .social-person-card:hover, .sidebar-friends .social-person-card.active { background: var(--surface-hover); }
.sidebar-friends .social-avatar { position: relative; z-index: 2; width: 35px; height: 35px; overflow: visible; }
.sidebar-friends .social-avatar img { border-radius: inherit; }
.sidebar-friends .social-person-info strong { font-size: .74rem; }
.sidebar-friends .social-person-info small { font-size: .58rem; }
.sidebar-friends .social-empty { min-height: 80px; font-size: .66rem; }
.presence-dot { position: absolute; right: -4px; bottom: -3px; z-index: 4; width: 11px; height: 11px; border: 2px solid var(--surface); border-radius: 50%; background: #93969e; box-shadow: 0 1px 4px rgba(0,0,0,.2); pointer-events: none; }
.presence-dot.online { background: #27b85b; }
.friend-unread-badge { min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 5px; border-radius: 999px; background: #ea3e50; color: #fff; font-size: .58rem; font-weight: 1000; }
.foxxplus-nav-button { position: relative; isolation: isolate; display: grid; place-items: center; min-height: 48px; margin: 3px 7px 12px; padding: 0 14px; border: 2px solid transparent; border-radius: 14px; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(90deg, #ff3b3b, #ffe733, #41d96b, #35b8ff, #725cff, #ef55cf, #ff3b3b) border-box; background-size: 100% 100%, 240% 100%; color: var(--text); font-weight: 1000; text-align: center; line-height: 1.2; box-shadow: 0 0 18px color-mix(in srgb, #8557e8 30%, transparent); animation: foxxPlusGlow 4s linear infinite; }
@keyframes foxxPlusGlow { to { background-position: 0 0, -240% 0; filter: hue-rotate(360deg); } }
.main-content { padding-top: calc(var(--header-height) + 18px); }
.community-layout { width: min(720px, 100%); display: grid; gap: 16px; margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
#view-home.active { min-height: calc(var(--scaled-viewport-height, 100vh) - var(--header-height) - 80px); display: grid; place-items: center; }
.weekly-question-card { width: min(660px, 100%); padding: clamp(22px, 5vw, 40px); border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-md); text-align: center; }
.weekly-question-eyebrow { color: var(--accent); font-size: .68rem; font-weight: 1000; letter-spacing: .18em; }
.weekly-question-card h1 { margin: 10px 0 0; color: var(--text); font-size: clamp(1.25rem, 3vw, 1.8rem); }
.weekly-question-text { margin: 20px auto 23px; max-width: 560px; color: var(--text); font-size: clamp(1.1rem, 3vw, 1.45rem); font-weight: 750; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.weekly-discussion-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 8px 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); color: var(--text); font-size: .78rem; font-weight: 900; cursor: pointer; transition: transform 160ms ease, background 160ms ease; }
.weekly-discussion-toggle:hover { transform: translateY(-2px); background: var(--surface-hover); }
.weekly-discussion-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.weekly-discussion { margin-top: 23px; padding-top: 19px; border-top: 1px solid var(--line); text-align: left; }
.weekly-answer-list { display: grid; gap: 10px; max-height: min(45vh, 370px); overflow-y: auto; padding: 2px 4px 8px 0; }
.weekly-answer-thread { min-width: 0; }
.weekly-answer-children { display: grid; gap: 9px; margin-top: 9px; }
.weekly-replies-toggle { display: inline-flex; align-items: center; gap: 5px; margin: 7px 0 0 13px; padding: 5px 7px; border: 0; border-radius: 8px; background: transparent; color: var(--accent); font-size: .7rem; font-weight: 900; cursor: pointer; }
.weekly-replies-toggle:hover { background: var(--accent-soft); }
.weekly-answer { padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.weekly-answer.pending { opacity: .7; }
.weekly-answer.reply { margin-left: 28px; border-left: 3px solid var(--accent); }
.weekly-answer-header { display: flex; align-items: center; gap: 9px; }
.weekly-answer-header .community-avatar { flex: 0 0 auto; width: 31px; height: 31px; }
.weekly-answer-header strong { color: var(--text); font-size: .76rem; }
.weekly-answer-header time { margin-left: auto; color: var(--text-soft); font-size: .65rem; white-space: nowrap; }
.weekly-answer p { margin: 8px 0 5px 40px; color: var(--text); font-size: .8rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.weekly-answer-reply { margin-left: 40px; padding: 3px 0; border: 0; background: none; color: var(--accent); font-size: .7rem; font-weight: 900; cursor: pointer; }
.weekly-answer-form { display: grid; gap: 9px; margin-top: 13px; }
.weekly-answer-form textarea { width: 100%; min-height: 72px; resize: vertical; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; outline: 0; background: var(--surface); color: var(--text); font: inherit; font-size: .8rem; }
.weekly-answer-form textarea:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.weekly-answer-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.weekly-answer-actions span { color: var(--text-soft); font-size: .7rem; }
.weekly-reply-context { width: fit-content; padding: 5px 9px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: .7rem; font-weight: 800; }
#view-global-chat.active { height: calc(var(--scaled-viewport-height, 100vh) - var(--header-height) - 40px); min-height: 360px; display: block; }
.global-chat-shell { height: 100%; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-md); }
.global-chat-shell .social-chat-panel { overflow: hidden; border-radius: inherit; grid-template-rows: auto 1fr auto auto auto; }
.global-chat-header { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.global-chat-symbol { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-size: 1.6rem; font-weight: 1000; }
.global-chat-shell .social-messages { padding: 22px 20px; background: color-mix(in srgb, var(--surface-soft) 58%, var(--surface)); }
.global-chat-shell .social-message-form { min-height: 72px; align-items: center; padding: 13px 16px; background: var(--surface); }
.global-chat-shell .social-message-form { grid-template-columns: minmax(0, 1fr) auto; }
.global-chat-shell .social-message-input-wrap { height: 46px; display: flex; align-items: center; }
.global-chat-shell .social-message-input-wrap > input { height: 46px; min-height: 46px; }
.global-compose-context { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; border-top: 1px solid var(--line); background: var(--surface-soft); color: var(--text-soft); font-size: .72rem; }
.global-compose-context[hidden] { display: none; }
.global-compose-context button { border: 0; background: none; color: var(--text); font-size: 1.2rem; cursor: pointer; }
.global-chat-status { min-height: 0; padding: 0 16px; color: var(--text-soft); font-size: .7rem; }
.global-chat-status:empty { display: none; }
.global-chat-shell .social-message-avatar { cursor: pointer; }
.global-load-earlier { align-self: center; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text-soft); font-size: .7rem; font-weight: 900; cursor: pointer; }
.global-load-earlier:hover { background: var(--surface-hover); color: var(--accent); }
.social-message-menu button[data-global-action="delete"] { color: var(--danger); }
@keyframes foxxQuickReveal { from { opacity: 0; transform: translateY(-6px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.social-message-menu:not([hidden]),
.notification-popover:not([hidden]),
.profile-modal-menu:not([hidden]),
.profile-color-picker:not([hidden]),
.social-search-results:not([hidden]),
.social-suggestions:not([hidden]),
.social-compose-context:not([hidden]),
.global-compose-context:not([hidden]),
.weekly-reply-context:not([hidden]) { animation: foxxQuickReveal 170ms cubic-bezier(.2,.8,.2,1) both; }
.groupchat-modal-backdrop:not([hidden]) .groupchat-modal,
.donation-modal-backdrop:not([hidden]) .donation-modal { animation: foxxQuickReveal 190ms cubic-bezier(.2,.8,.2,1) both; }
.post-composer, .community-post { border: 1px solid var(--line); border-radius: 19px; background: color-mix(in srgb, var(--surface) 95%, transparent); box-shadow: var(--shadow-sm); }
.post-composer { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 11px; padding: 17px; }
.community-avatar { width: 46px; height: 46px; display: grid; place-items: center; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 1000; }
.community-avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-composer textarea { min-height: 68px; resize: vertical; padding: 10px 4px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 1rem; line-height: 1.5; }
.post-composer textarea::placeholder { color: var(--text-faint); }
.post-composer-preview, .post-composer-actions { grid-column: 2; }
.post-composer-preview { position: relative; width: fit-content; max-width: 100%; }
.post-composer-preview img { max-height: 280px; border-radius: 14px; object-fit: contain; }
.post-composer-preview button { position: absolute; top: 7px; right: 7px; width: 29px; height: 29px; padding: 0; border: 0; border-radius: 50%; background: rgba(20,20,24,.72); color: #fff; font-size: 1.15rem; }
.post-composer-actions { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 11px; }
.post-image-button { width: 35px; height: 35px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.post-image-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
#post-composer-status { flex: 1; color: var(--text-soft); font-size: .68rem; font-weight: 800; }
.post-submit-button { min-width: 82px; }
.community-feed { display: grid; gap: 13px; }
.community-post { padding: 17px; }
.community-post.owner-liked-post { position: relative; border-color: transparent; }
.community-post.owner-liked-post::after { content: ""; position: absolute; inset: -2px; z-index: 1; padding: 2px; border-radius: 21px; background: linear-gradient(90deg, #ff3b3b, #ff9f1c, #ffe733, #41d96b, #35b8ff, #725cff, #ef55cf, #ff3b3b, #ff9f1c, #ffe733, #41d96b, #35b8ff, #725cff, #ef55cf, #ff3b3b); background-size: 300% 100%; pointer-events: none; -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; animation: profileOwnerRainbow 5s linear infinite; }
.community-post-visited { animation: communityPostFocus 1.8s ease-out; }
@keyframes communityPostFocus { 25% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 25%, transparent), var(--shadow-sm); } }
.community-identity { display: flex; align-items: center; gap: 10px; }
.community-identity > span { min-width: 0; display: grid; gap: 2px; }
.community-identity strong { font-size: .86rem; }
.community-identity time { color: var(--text-soft); font-size: .65rem; font-weight: 750; }
.community-identity.small .community-avatar { width: 30px; height: 30px; }
.community-identity.small strong { font-size: .7rem; }
.community-post > p { margin: 14px 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.community-post-image-button { display: block; width: 100%; margin-top: 13px; padding: 0; border: 0; border-radius: 15px; background: transparent; cursor: zoom-in; }
.community-post-image-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.community-post-image { display: block; width: 100%; max-height: 540px; border: 1px solid var(--line); border-radius: 15px; object-fit: contain; background: var(--surface-soft); }
.post-image-lightbox { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: clamp(18px, 5vw, 60px); background: rgba(12, 13, 23, .87); cursor: zoom-out; }
.post-image-lightbox[hidden] { display: none; }
.post-image-lightbox img { display: block; max-width: min(100%, 1250px); max-height: 90vh; border-radius: 14px; object-fit: contain; box-shadow: 0 18px 65px rgba(0,0,0,.4); cursor: default; }
.post-image-lightbox-close { position: absolute; top: 18px; right: 20px; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; background: rgba(0,0,0,.42); color: white; font-size: 2rem; line-height: 1; cursor: pointer; }
.community-post-actions { display: flex; gap: 8px; margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--line); }
.community-post-actions button { min-width: 62px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 11px; border: 0; border-radius: 10px; background: transparent; color: var(--text-soft); font-weight: 900; }
.community-post-actions button:hover { background: var(--surface-hover); color: var(--accent); }
.community-comments { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.community-comment-list { display: grid; gap: 8px; }
.community-comment { display: grid; gap: 7px; padding: 10px; border-radius: 12px; background: var(--surface-soft); }
.community-comment p { margin: 0 0 0 40px; color: var(--text-soft); font-size: .76rem; line-height: 1.45; }
.community-comment-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }
.community-comment-form input { min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; outline: 0; background: var(--surface); color: var(--text); }
.community-comment-form button { padding: 0 14px; border: 0; border-radius: 11px; background: var(--accent); color: var(--accent-text); font-weight: 900; }
.community-empty { padding: 32px; color: var(--text-soft); text-align: center; }
.community-empty strong, .community-empty span { display: block; }
#view-social { height: calc(var(--scaled-viewport-height, 100vh) - var(--header-height) - 36px); }
#view-social .social-chat { height: 100%; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#view-social .social-message-form { padding-bottom: 2px; }
.view-back-button { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text); font-size: 1.2rem; }
.foxxplus-page, .admin-page { width: min(960px, 100%); margin: 0 auto; }
.foxxplus-purchase-card { width: min(580px, 100%); display: grid; justify-items: center; gap: 16px; margin: 4vh auto; padding: 38px; border: 2px solid transparent; border-radius: 26px; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, #ff4f9a, #ffe733, #35b8ff, #725cff) border-box; box-shadow: 0 18px 50px color-mix(in srgb, #725cff 18%, transparent); text-align: center; }
.foxxplus-mark { font-size: 1rem; font-weight: 1000; letter-spacing: .16em; }
.foxxplus-purchase-card h1 { margin: 0; font-size: clamp(1.8rem, 5vw, 2.8rem); }
.foxxplus-price { display: flex; align-items: baseline; gap: 5px; margin: 0; }
.foxxplus-price strong { font-size: 2rem; }
.foxxplus-purchase-card ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; color: var(--text-soft); font-size: .78rem; }
.foxxplus-checkout-button { min-width: 230px; min-height: 50px; border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-text); font-weight: 1000; box-shadow: var(--shadow-md); }
.admin-page { display: grid; gap: 16px; }
.admin-heading, .admin-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-heading h1 { margin: 4px 0 0; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
.admin-stat-grid article, .admin-card { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.admin-stat-grid article { display: grid; gap: 7px; padding: 16px; }
.admin-stat-grid span, .admin-section-heading small { color: var(--text-soft); font-size: .68rem; font-weight: 800; }
.admin-stat-grid strong { font-size: 1.5rem; }
.admin-card { padding: 18px; }
.admin-section-heading > div { display: grid; gap: 3px; }
.admin-chart { height: 220px; display: grid; grid-template-columns: repeat(14, 1fr); align-items: end; gap: 7px; margin-top: 18px; }
.admin-chart-column { height: 100%; display: grid; grid-template-rows: 22px 1fr 18px; align-items: end; justify-items: center; gap: 4px; }
.admin-chart-column strong, .admin-chart-column small { font-size: .58rem; }
.admin-chart-column span { width: min(28px, 80%); min-height: 4px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 35%, var(--surface))); }
.admin-diagnostics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.admin-diagnostics article { display: grid; gap: 3px; padding: 12px; border-radius: 12px; background: var(--surface-soft); }
.admin-diagnostics span { color: var(--text-soft); font-size: .64rem; font-weight: 800; }
.admin-user-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.admin-user-list .social-person-card { grid-template-columns: 44px 1fr; opacity: 1; }
.admin-avatar-button { cursor: pointer; }
.foxxplus-display-name, .profile-name-gradient { background: linear-gradient(90deg, var(--name-color-one) 0%, var(--name-color-two) 25%, var(--name-color-one) 50%, var(--name-color-two) 75%, var(--name-color-one) 100%); background-size: 200% 100%; color: transparent !important; -webkit-background-clip: text; background-clip: text; animation: displayNameColor 4.8s linear infinite; }
.profile-name-gradient { position: absolute; left: 0; top: 50%; z-index: 1; display: none; max-width: calc(100% - 25px); overflow: hidden; transform: translateY(-50%); font-size: 1.12rem; font-weight: 1000; line-height: normal; white-space: nowrap; pointer-events: none; }
.profile-display-name-field.animated-display-name .profile-name-gradient { display: block; }
.profile-display-name-field.animated-display-name input { color: transparent !important; -webkit-text-fill-color: transparent; caret-color: var(--text); }
@keyframes displayNameColor { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.profile-name-trigger { cursor: pointer; }

@media (max-width: 900px) {
  .admin-stat-grid, .admin-diagnostics { grid-template-columns: repeat(2, 1fr); }
  .admin-user-list { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .top-header { background: color-mix(in srgb, var(--surface) 92%, transparent); }
  .sidebar { top: var(--header-height); height: calc(var(--scaled-viewport-height, 100vh) - var(--header-height)); padding-top: 8px; }
  .main-content { padding-top: calc(var(--header-height) + 12px); }
  .sidebar-friends { min-height: 190px; }
  .post-composer { grid-template-columns: 40px minmax(0, 1fr); padding: 13px; }
  .post-composer .community-avatar { width: 40px; height: 40px; }
  .community-post { padding: 14px; }
  .foxxplus-purchase-card { padding: 28px 18px; }
  .admin-chart { gap: 3px; overflow-x: auto; }
  .admin-chart-column { min-width: 24px; }
}

/* Interaction and icon polish */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text-soft) 48%, transparent) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { min-height: 36px; border: 3px solid transparent; border-radius: 999px; background: color-mix(in srgb, var(--text-soft) 48%, transparent); background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--text-soft) 70%, transparent); background-clip: padding-box; }

.sidebar-coffee-button { width: calc(100% - 24px); justify-content: center; margin: 0 12px 4px; }
.sidebar-nav { padding-top: 6px; }
.sidebar-group-button svg, .search-icon svg, .view-back-button svg, .profile-settings-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.search-icon { display: grid; place-items: center; }
.search-icon svg { width: 17px; height: 17px; }
.post-composer-preview button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.sidebar-link { position: relative; overflow: hidden; }
.sidebar-link::after { content: ""; position: absolute; top: 50%; right: 0; width: 4px; height: 0; border-radius: 4px 0 0 4px; background: var(--accent); transform: translateY(-50%); opacity: 0; transition: height 210ms cubic-bezier(.2,.8,.2,1), opacity 150ms ease; }
.sidebar-link.active { background: transparent; color: var(--text); }
.sidebar-link.active::after { height: 30px; opacity: 1; }
.sidebar-link.active .sidebar-icon { background: var(--accent-soft); color: var(--accent); }
.sidebar-link.active:hover { background: var(--surface-soft); }

.profile-settings-button { position: absolute; z-index: 4; top: 168px; right: 18px; width: 46px; height: 46px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-md); transition: transform 150ms ease, background 150ms ease, border-color 150ms ease; }
.profile-settings-button:hover { transform: translateY(-2px) rotate(12deg); border-color: var(--line-strong); background: var(--surface-hover); }
.profile-settings-button svg { width: 23px; height: 23px; }
.profile-follow-row { width: 100%; min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 7px; }
.profile-follow-button { min-width: 94px; min-height: 34px; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--accent-soft); color: var(--accent); font: inherit; font-size: .73rem; font-weight: 900; cursor: pointer; transition: transform 150ms ease, background 150ms ease, border-color 150ms ease; }
.profile-follow-button:hover { transform: translateY(-1px); border-color: var(--accent); background: var(--surface-hover); }
.profile-follow-button.following { border-color: var(--line); background: var(--surface-soft); color: var(--text-soft); }
.profile-follow-button:disabled { opacity: .65; cursor: wait; }
.profile-follower-count { color: var(--text-soft); font-size: .76rem; font-weight: 800; }
.profile-follower-count strong { color: var(--text); }
.profile-follow-button[hidden] { display: none; }

.community-post-actions button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 150ms ease, fill 150ms ease, color 150ms ease; }
.community-post-actions button:hover svg { transform: scale(1.08); }
.community-like-button.liked { color: #e63950; }
.community-like-button.liked svg { fill: #e63950; stroke: #e63950; animation: communityHeartPop 240ms cubic-bezier(.2,.9,.25,1.3); }
@keyframes communityHeartPop { 50% { transform: scale(1.24); } }
.community-comment.pending { opacity: .65; }
.community-post.pending { opacity: .78; }

#view-social { grid-template-rows: auto minmax(0, 1fr); }
#view-social.active { display: grid; }
#view-social .social-chat { height: 100%; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-md); }
#view-social .social-chat-panel { overflow: hidden; border-radius: inherit; }
#view-social .social-chat-header { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
#view-social .social-messages { padding: 22px 20px; background: color-mix(in srgb, var(--surface-soft) 58%, var(--surface)); }
#view-social .social-message-form { min-height: 72px; align-items: center; padding: 13px 16px; background: var(--surface); }
#view-social .social-message-input-wrap { height: 46px; display: flex; align-items: center; }
#view-social .social-message-form .social-message-input-wrap > input { height: 46px; min-height: 46px; }
#view-social .social-send-button { align-self: center; }

.account-settings-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.account-settings-details > div { min-width: 0; display: grid; gap: 4px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.account-settings-details span { color: var(--text-soft); font-size: .64rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.account-settings-details strong { overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.account-settings-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.account-settings-status { display: block; min-height: 1em; margin-top: 9px; color: var(--text-soft); font-weight: 800; }
.danger-button { color: var(--danger); }

@media (max-width: 700px) {
  body:has(#view-global-chat.active) .puzzle-help,
  body:has(#view-social.active) .puzzle-help { bottom: 100px; }
  .sidebar-coffee-button { width: calc(100% - 20px); margin: 5px 10px 6px; }
  #view-home.active { min-height: calc(var(--scaled-viewport-height, 100vh) - var(--header-height) - 36px); }
  .weekly-question-card { padding: 22px 16px; }
  .weekly-answer.reply { margin-left: 13px; }
  #view-global-chat.active { height: calc(var(--scaled-viewport-height, 100vh) - var(--header-height) - 28px); }
  .global-chat-shell .social-messages { padding: 16px 12px; }
  .global-chat-shell .social-message-form { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .profile-settings-button { top: 132px; right: 14px; width: 42px; height: 42px; }
  #view-social { height: calc(var(--scaled-viewport-height, 100vh) - var(--header-height) - 28px); }
  #view-social .social-message-form { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  #view-social .social-messages { padding: 16px 12px; }
}

@media (max-width: 460px) {
  .account-settings-details { grid-template-columns: 1fr; }
}

@media (max-height: 820px) and (min-width: 701px) {
  .sidebar-coffee-button { min-height: 30px; padding-block: 5px; }
  .sidebar-nav { gap: 2px; max-height: none; padding: 5px 11px; }
  .sidebar-link { min-height: 38px; gap: 9px; padding: 3px 9px; border-radius: 11px; font-size: .78rem; }
  .sidebar-icon { width: 29px; height: 29px; border-radius: 10px; }
  .sidebar-icon svg { width: 18px; height: 18px; }
  .foxxplus-nav-button { min-height: 40px; margin: 2px 4px 5px; }
  .sidebar-friends { min-height: 150px; margin-top: 6px; padding-top: 8px; }
  .sidebar-footer { padding: 8px 12px; }
  .sidebar-footer-status { gap: 8px; padding: 8px; }
}

@media (max-height: 660px) and (min-width: 701px) {
  .sidebar-footer-status { display: none; }
  .sidebar-footer { padding-block: 6px; }
}

@media (max-width: 700px) {
  .sidebar-coffee-button { width: calc(100% - 20px); margin: 0 10px 4px; }
  .sidebar-nav { gap: 2px; padding: 5px 8px; }
  .sidebar-link { min-height: 39px; gap: 5px; padding: 3px 5px; font-size: .7rem; }
  .sidebar-icon { width: 28px; height: 28px; border-radius: 9px; }
  .sidebar-icon svg { width: 18px; height: 18px; }
  .foxxplus-nav-button { min-height: 40px; margin: 2px 3px 5px; padding-inline: 7px; font-size: .68rem; }
  .sidebar-friends { min-height: 150px; margin-top: 5px; padding-top: 8px; }
  .sidebar-footer { padding: 7px; }
  .sidebar-footer-status { padding: 6px; }
}
