:root {
  color-scheme: light;
  --bg: #f3f6fb;
  --ink: #0f1729;
  --muted: #45536b;
  --surface: #ffffff;
  --surface-soft: #eef2f9;
  --border: #d7deea;
  --brand-a: #0b57d0;
  --brand-b: #0f87ff;
  --brand-c: #1fb6a6;
  --danger: #cb2d2d;
  --success: #0d8f65;
  --bg-top: #f6f8fc;
  --bg-bottom: #edf2f9;
  --bg-blob-a: #d7ecff;
  --bg-blob-b: #ffe6cc;
  --layer-a: #9ed2ff;
  --layer-b: #ffd9b8;
  --text-strong: #0f1729;
  --text-body: #22314c;
  --text-soft: #5c6d89;
  --text-link: #1c56b4;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-lg: 0 28px 50px -34px rgba(15, 24, 42, 0.45);
  --shadow-md: 0 14px 30px -24px rgba(15, 24, 42, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #080d14;
    --ink: #e9f1ff;
    --muted: #b6c4da;
    --surface: #0f1520;
    --surface-soft: #141d2c;
    --border: #253449;
    --brand-a: #3b82f6;
    --brand-b: #60a5fa;
    --brand-c: #2bc9a5;
    --danger: #ff8b8b;
    --success: #58d1ae;
    --bg-top: #050a11;
    --bg-bottom: #070d16;
    --bg-blob-a: #0d2743;
    --bg-blob-b: #111a2a;
    --layer-a: #133962;
    --layer-b: #18273d;
    --text-strong: #f0f5ff;
    --text-body: #d8e2f5;
    --text-soft: #a4b5cf;
    --text-link: #9fc2ff;
    --shadow-lg: 0 24px 48px -32px rgba(0, 0, 0, 0.88);
    --shadow-md: 0 14px 28px -24px rgba(0, 0, 0, 0.8);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f6fb;
  --ink: #0f1729;
  --muted: #45536b;
  --surface: #ffffff;
  --surface-soft: #eef2f9;
  --border: #d7deea;
  --brand-a: #0b57d0;
  --brand-b: #0f87ff;
  --brand-c: #1fb6a6;
  --danger: #cb2d2d;
  --success: #0d8f65;
  --bg-top: #f6f8fc;
  --bg-bottom: #edf2f9;
  --bg-blob-a: #d7ecff;
  --bg-blob-b: #ffe6cc;
  --layer-a: #9ed2ff;
  --layer-b: #ffd9b8;
  --text-strong: #0f1729;
  --text-body: #22314c;
  --text-soft: #5c6d89;
  --text-link: #1c56b4;
  --shadow-lg: 0 28px 50px -34px rgba(15, 24, 42, 0.45);
  --shadow-md: 0 14px 30px -24px rgba(15, 24, 42, 0.35);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #080d14;
  --ink: #e9f1ff;
  --muted: #b6c4da;
  --surface: #0f1520;
  --surface-soft: #141d2c;
  --border: #253449;
  --brand-a: #3b82f6;
  --brand-b: #60a5fa;
  --brand-c: #2bc9a5;
  --danger: #ff8b8b;
  --success: #58d1ae;
  --bg-top: #050a11;
  --bg-bottom: #070d16;
  --bg-blob-a: #0d2743;
  --bg-blob-b: #111a2a;
  --layer-a: #133962;
  --layer-b: #18273d;
  --text-strong: #f0f5ff;
  --text-body: #d8e2f5;
  --text-soft: #a4b5cf;
  --text-link: #9fc2ff;
  --shadow-lg: 0 24px 48px -32px rgba(0, 0, 0, 0.88);
  --shadow-md: 0 14px 28px -24px rgba(0, 0, 0, 0.8);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  font-family: "Plus Jakarta Sans", "Pretendard", "Apple SD Gothic Neo", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 8% 8%, var(--bg-blob-a) 0, transparent 31%),
    radial-gradient(circle at 88% 10%, var(--bg-blob-b) 0, transparent 28%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  transition: background 220ms ease, color 220ms ease;
}

.bg-layer {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  z-index: -2;
}

.bg-layer-a {
  width: 32vw;
  height: 32vw;
  left: -6vw;
  top: 16vh;
  background: var(--layer-a);
}

.bg-layer-b {
  width: 26vw;
  height: 26vw;
  right: -8vw;
  top: 44vh;
  background: var(--layer-b);
}

.topbar {
  max-width: 1320px;
  margin: 18px auto 0;
  padding: 0 20px;
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  grid-template-areas: "brand nav theme";
  align-items: center;
  gap: 12px;
}

.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
}

.brand-version {
  align-self: flex-end;
  padding-bottom: 2px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-soft);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(148deg, var(--brand-a), var(--brand-b));
  box-shadow: var(--shadow-md);
}

.top-actions {
  grid-area: nav;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.top-nav-links {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-theme {
  grid-area: theme;
  justify-self: end;
  display: inline-flex;
}

.theme-switch {
  position: relative;
  appearance: none;
  width: 76px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px;
  cursor: pointer;
  color: inherit;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.theme-switch:focus-visible {
  outline: none;
  border-color: #4f8cff;
  box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.22);
}

.theme-switch-icon {
  font-size: 0.88rem;
  line-height: 1;
  z-index: 1;
  user-select: none;
  color: color-mix(in srgb, var(--text) 68%, var(--muted));
  transition: opacity 180ms ease, color 180ms ease;
}

.theme-switch-icon-light {
  opacity: 0.95;
}

.theme-switch-icon-dark {
  opacity: 0.55;
}

.theme-switch-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--border) 76%, #ffffff);
  background: #f7fbff;
  transition: transform 180ms ease, background-color 220ms ease, border-color 220ms ease;
}

.theme-switch[data-theme-current="dark"] .theme-switch-thumb {
  transform: translateX(40px);
  background: #d4e1fb;
  border-color: #a8bad7;
}

.theme-switch[data-theme-current="dark"] .theme-switch-icon-dark {
  opacity: 0.95;
}

.theme-switch[data-theme-current="dark"] .theme-switch-icon-light {
  opacity: 0.55;
}

.user-menu-wrap {
  position: relative;
  margin-left: auto;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 90%, #f4f8ff);
  font-size: 0.92rem;
}

.user-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip-button {
  appearance: none;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.user-chip-button:hover {
  border-color: #9cb0cb;
}

.user-chip-button:focus-visible {
  outline: none;
  border-color: #2e6ed4;
  box-shadow: 0 0 0 4px rgba(46, 110, 212, 0.17);
}

.user-menu-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 260px;
  border: 1px solid #cfdbee;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  box-shadow: 0 16px 32px -20px rgba(12, 27, 52, 0.5);
  padding: 12px;
  z-index: 40;
}

.user-menu-message {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: #304a71;
}

.user-menu-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.user-menu-actions form {
  margin: 0;
}

.user-menu-actions .ghost-btn {
  width: 100%;
}

.user-avatar,
.user-fallback {
  width: 26px;
  height: 26px;
  border-radius: 50%;
}

.user-fallback,
.guild-fallback {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(148deg, #154390, #2272d8);
  font-weight: 700;
}

.shell {
  width: min(1320px, calc(100% - 24px));
  margin: 14px auto 32px;
  display: grid;
  gap: 14px;
}

.card {
  background: color-mix(in srgb, var(--surface) 92%, #fafdff);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  letter-spacing: -0.015em;
}

h2 {
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

h3 {
  margin-bottom: 8px;
}

.eyebrow {
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--text-link) 88%, #4f8cff);
}

.lead {
  color: var(--text-soft);
  line-height: 1.62;
}

.muted {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.mono {
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.primary-btn,
.ghost-btn {
  appearance: none;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 10px 14px;
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(145deg, var(--brand-a), var(--brand-b));
  box-shadow: 0 16px 28px -20px rgba(11, 87, 208, 0.85);
}

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

.ghost-btn {
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 86%, #ebf0f9);
  border-color: var(--border);
}

.ghost-btn:hover {
  border-color: #9cb0cb;
}

.ghost-btn.disabled,
.ghost-btn[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.45;
}

.ghost-btn.danger {
  color: var(--danger);
}

.flash {
  border: 1px solid;
  border-radius: 12px;
  padding: 11px 14px;
  font-weight: 600;
}

.flash-success {
  background: #ebfaf4;
  color: var(--success);
  border-color: #b9ecd8;
}

.flash-error {
  background: #fff1f1;
  color: #b02626;
  border-color: #f2cbcb;
}

.flash-info {
  background: #eef4ff;
  color: #1f4da8;
  border-color: #bfd4ff;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.hero-copy,
.hero-panel {
  background: color-mix(in srgb, var(--surface) 95%, #f8fbff);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.hero-copy {
  padding: 28px;
}

.hero-panel {
  padding: 18px 20px;
  width: min(340px, 100%);
  justify-self: end;
}

.panel-title {
  margin-bottom: 8px;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-panel ol {
  margin: 0;
  padding-left: 18px;
  line-height: 1.65;
  color: #304562;
}

.hero-actions {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.login-caption {
  font-size: 0.78rem;
  color: #556a88;
  white-space: nowrap;
}

.feature-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.feature-list li {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 92%, #f0f5ff);
  padding: 10px 12px;
}

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

.command-head {
  align-items: stretch;
}

.guild-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.guild-icon,
.guild-fallback {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  flex-shrink: 0;
}

.command-picker {
  min-width: min(430px, 100%);
  display: grid;
  gap: 10px;
  align-content: start;
}

.command-picker label {
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--text-body);
}

.command-picker select {
  appearance: none;
  border: 1px solid #b8c7dd;
  border-radius: 12px;
  padding: 11px 40px 11px 13px;
  min-height: 46px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, #ffffff), color-mix(in srgb, var(--surface-soft) 90%, #eef5ff));
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--text-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.command-picker select:focus-visible {
  outline: none;
  border-color: #2e6ed4;
  box-shadow: 0 0 0 4px rgba(46, 110, 212, 0.17);
}

.command-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.command-panels {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.command-group {
  display: none;
}

.command-group.panel-visible {
  display: grid;
  gap: 12px;
  animation: panel-in 220ms ease;
}

.command-panel {
  display: grid;
  gap: 12px;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.stack-form,
.grid-form {
  display: grid;
  gap: 12px;
  border: 1px solid #d2dcef;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f2f7ff 100%);
  padding: 14px;
}

.grid-form {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  align-items: start;
}

.grid-form > .form-foot,
.grid-form > button {
  grid-column: 1 / -1;
}

.grid-form > button {
  justify-self: start;
}

.stack-form input,
.stack-form select,
.grid-form input,
.grid-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #bccbdf;
  border-radius: 11px;
  padding: 10px 11px;
  font-size: 0.94rem;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

select,
option,
optgroup {
  color: var(--text-strong);
}

select option,
select optgroup {
  background-color: color-mix(in srgb, var(--surface) 98%, #ffffff);
}

.stack-form input::placeholder,
.grid-form input::placeholder {
  color: color-mix(in srgb, var(--text-soft) 88%, #8fa0bd);
}

.stack-form input:focus-visible,
.stack-form select:focus-visible,
.grid-form input:focus-visible,
.grid-form select:focus-visible {
  outline: none;
  border-color: #2e6ed4;
  box-shadow: 0 0 0 4px rgba(46, 110, 212, 0.16);
}

.stack-form label,
.grid-form label {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  min-width: 0;
}

.stack-form span,
.grid-form span {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-body);
}

.form-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.inline-form input {
  border: 1px solid #bccbdf;
  border-radius: 11px;
  padding: 10px 11px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
}

.inline-form input:focus-visible {
  outline: none;
  border-color: #2e6ed4;
  box-shadow: 0 0 0 4px rgba(46, 110, 212, 0.16);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.pager {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.pager-status {
  font-size: 0.88rem;
  color: var(--text-soft);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
}

th,
td {
  border-bottom: 1px solid var(--border);
  text-align: left;
  padding: 10px;
  font-size: 0.9rem;
}

th {
  background: color-mix(in srgb, var(--surface-soft) 75%, #f7f9fd);
  font-size: 0.8rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.metric-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface) 92%, #f1f6ff);
}

.metric-card span {
  display: block;
  color: var(--text-soft);
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.metric-card strong {
  font-size: 1.1rem;
}

.filter-row {
  display: flex;
  justify-content: flex-end;
}

.search-input {
  width: min(360px, 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}

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

.guild-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
}

.error-wrap {
  padding: 36px 24px;
}

.changelog-wrap {
  display: grid;
  gap: 14px;
}

.changelog-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.changelog-tab-btn {
  appearance: none;
  border: 1px solid #c2d0e5;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
  color: #214886;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.changelog-tab-btn:hover {
  border-color: #86a7d8;
}

.changelog-tab-btn.active,
.changelog-tab-btn[aria-selected="true"] {
  border-color: #2e6ed4;
  color: #fff;
  background: linear-gradient(145deg, var(--brand-a), var(--brand-b));
}

.changelog-tab-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(46, 110, 212, 0.16);
}

.changelog-panel {
  display: grid;
  gap: 12px;
}

.changelog-panel[hidden] {
  display: none !important;
}

.changelog-head .lead {
  margin-bottom: 0;
}

.changelog-empty {
  border: 1px dashed #bfd0ea;
  border-radius: 14px;
  background: linear-gradient(180deg, #fcfdff 0%, #f3f7ff 100%);
  padding: 14px;
  color: var(--text-soft);
}

.release-card {
  border: 1px solid #d2deef;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.release-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  border-bottom: 1px solid #dbe5f3;
  padding-bottom: 8px;
}

.release-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.release-date {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-soft);
  font-family: "IBM Plex Mono", "Consolas", monospace;
}

.release-section h3 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  color: var(--text-body);
}

.release-list,
.release-sublist {
  margin: 0;
  padding-left: 18px;
}

.release-list {
  display: grid;
  gap: 6px;
}

.release-list li {
  color: var(--text-body);
  line-height: 1.55;
}

.release-sublist {
  margin-top: 5px;
  display: grid;
  gap: 4px;
}

.release-sublist li {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.community-wrap {
  min-height: 220px;
}

.community-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.community-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.community-filter-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}

.community-filter-form label,
.community-editor-form label {
  display: grid;
  gap: 7px;
}

.community-filter-form input,
.community-filter-form select,
.community-editor-form input,
.community-editor-form textarea {
  width: 100%;
  border: 1px solid #bccbdf;
  border-radius: 11px;
  padding: 10px 11px;
  font-size: 0.94rem;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
}

.community-filter-form input:focus-visible,
.community-filter-form select:focus-visible,
.community-editor-form input:focus-visible,
.community-editor-form textarea:focus-visible {
  outline: none;
  border-color: #2e6ed4;
  box-shadow: 0 0 0 4px rgba(46, 110, 212, 0.16);
}

.community-editor-form {
  display: grid;
  gap: 12px;
}

.community-editor-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.checkbox-inline {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #1e3e73;
  background: #d9e8ff;
  border: 1px solid #c1d7fb;
}

.badge.soft {
  background: #eef4ff;
  color: #2e4e81;
}

.badge.danger {
  background: #ffe4e4;
  color: #8b1f1f;
  border-color: #f5c0c0;
}

.community-editor-form textarea {
  min-height: 160px;
  resize: vertical;
}

.community-empty {
  border: 1px dashed #bfd0ea;
  border-radius: 14px;
  background: linear-gradient(180deg, #fcfdff 0%, #f3f7ff 100%);
  padding: 14px;
}

.community-post-card {
  border: 1px solid #d2deef;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  padding: 14px;
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.community-post-card:last-of-type {
  margin-bottom: 0;
}

.community-post-notice {
  border-color: #e4bcbc;
  background: linear-gradient(180deg, #fff8f8 0%, #fff2f2 100%);
}

.community-post-head h3 {
  margin: 0 0 6px;
}

.community-post-head h3 a {
  color: var(--text-link);
  text-decoration: none;
}

.community-post-head h3 a:hover {
  text-decoration: underline;
}

.community-post-head .muted {
  margin: 0;
}

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

.community-tags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
}

.community-post-body {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.62;
  color: var(--text-body);
}

.community-thumb-wrap {
  display: inline-block;
  text-decoration: none;
}

.community-thumb {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border: 1px solid #c8d8f0;
  border-radius: 12px;
}

.community-post-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.community-post-foot .muted {
  margin: 0;
}

.community-post-foot-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.community-post-detail-body {
  margin: 6px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.68;
  color: var(--text-body);
}

.community-detail-image-wrap {
  margin-top: 4px;
}

.community-detail-image {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border: 1px solid #c8d8f0;
  border-radius: 14px;
  background: #f7fbff;
}

.community-comment-card {
  margin-top: 10px;
  border: 1px solid #d6e2f1;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
  background: #fff;
}

.community-comment-blinded {
  border-color: #e5c9c9;
  background: #fff5f5;
}

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

.community-pagination-pages {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.community-pagination .ghost-btn {
  width: auto;
}

.ghost-btn.active-page {
  border-color: #2e6ed4;
  color: #fff;
  background: linear-gradient(145deg, var(--brand-a), var(--brand-b));
}

.howto-wrap {
  display: grid;
  gap: 8px;
}

.markdown-body {
  color: var(--text-body);
  line-height: 1.68;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  margin-top: 0;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.markdown-body h1 {
  font-size: 1.55rem;
}

.markdown-body h2 {
  margin-top: 22px;
  font-size: 1.24rem;
  border-top: 1px solid #d9e3f2;
  padding-top: 14px;
}

.markdown-body h3 {
  margin-top: 14px;
  font-size: 1.03rem;
  color: var(--text-link);
}

.markdown-body p {
  margin: 0 0 10px;
}

.markdown-body ul,
.markdown-body ol {
  margin: 0 0 10px;
  padding-left: 20px;
}

.markdown-body li {
  margin-bottom: 5px;
}

.markdown-body code {
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 0.86em;
  background: #e9f1ff;
  color: #16458f;
  border-radius: 6px;
  padding: 1px 6px;
}

.markdown-body pre {
  margin: 0 0 12px;
  border: 1px solid #c7d6ed;
  border-radius: 12px;
  background: #0d1b34;
  padding: 12px;
  overflow: auto;
}

.markdown-body pre code {
  background: transparent;
  color: #eaf2ff;
  padding: 0;
}

.markdown-body blockquote {
  margin: 0 0 12px;
  border-left: 4px solid #8fb0de;
  background: #eff5ff;
  border-radius: 8px;
  padding: 10px 12px;
  color: #2d4e7f;
}

.markdown-body a {
  color: var(--text-link);
  text-decoration: none;
  font-weight: 700;
}

.markdown-body a:hover {
  text-decoration: underline;
}

.site-footer {
  margin-top: 24px;
  border-top: 1px solid #d4deee;
  background: linear-gradient(180deg, rgba(245, 248, 254, 0.96) 0%, rgba(238, 243, 252, 0.96) 100%);
}

.footer-shell {
  width: min(1320px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0 24px;
  display: grid;
  gap: 10px;
}

.footer-title {
  margin: 0;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-body);
}

.footer-subtitle {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-link);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.card,
.ghost-btn,
.primary-btn,
.stack-form,
.grid-form,
.search-input,
.user-chip,
.user-menu-pop,
.community-post-card,
.release-card,
.community-comment-card,
.site-footer,
.topbar,
.footer-links a {
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    color 220ms ease,
    box-shadow 220ms ease;
}

:root[data-theme="dark"] .brand-version {
  color: var(--text-soft);
}

:root[data-theme="dark"] .ghost-btn {
  color: var(--text-strong);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 95%, #172236) 0%, color-mix(in srgb, var(--surface-soft) 92%, #111b2c) 100%);
  border-color: #31445f;
}

:root[data-theme="dark"] .ghost-btn:hover {
  border-color: #4f6d96;
}

:root[data-theme="dark"] .theme-switch {
  border-color: #2f415c;
  background: #0b1422;
}

:root[data-theme="dark"] .theme-switch-thumb {
  background: #d4e1fb;
  border-color: #9fb2d2;
}

:root[data-theme="dark"] .theme-switch-icon-light {
  color: #8ea5c8;
}

:root[data-theme="dark"] .theme-switch-icon-dark {
  color: #d9e4fa;
}

:root[data-theme="dark"] .card,
:root[data-theme="dark"] .stack-form,
:root[data-theme="dark"] .grid-form,
:root[data-theme="dark"] .release-card,
:root[data-theme="dark"] .community-post-card,
:root[data-theme="dark"] .community-comment-card,
:root[data-theme="dark"] .community-empty,
:root[data-theme="dark"] .changelog-empty,
:root[data-theme="dark"] .feature-list li {
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 97%, #131d2e) 0%, color-mix(in srgb, var(--surface-soft) 94%, #0e1626) 100%);
  border-color: var(--border);
}

:root[data-theme="dark"] .site-footer {
  border-top-color: var(--border);
  background: linear-gradient(180deg, rgba(17, 24, 40, 0.95) 0%, rgba(12, 18, 31, 0.95) 100%);
}

:root[data-theme="dark"] .footer-title,
:root[data-theme="dark"] .footer-links a,
:root[data-theme="dark"] .markdown-body a {
  color: #b8d1ff;
}

:root[data-theme="dark"] .footer-subtitle,
:root[data-theme="dark"] .footer-meta,
:root[data-theme="dark"] .muted,
:root[data-theme="dark"] .lead {
  color: var(--text-soft);
}

:root[data-theme="dark"] .user-menu-pop {
  border-color: var(--border);
  background: linear-gradient(180deg, #151f31 0%, #0f1828 100%);
  box-shadow: 0 20px 36px -24px rgba(0, 0, 0, 0.8);
}

:root[data-theme="dark"] .user-menu-message {
  color: var(--text-body);
}

:root[data-theme="dark"] .flash-success {
  background: #103228;
  border-color: #2a7c61;
  color: #72dfba;
}

:root[data-theme="dark"] .flash-error {
  background: #35191b;
  border-color: #874042;
  color: #ff9a9a;
}

:root[data-theme="dark"] .flash-info {
  background: #172540;
  border-color: #395d96;
  color: #9bc3ff;
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] .search-input {
  color: var(--text-strong);
  border-color: #3f5677;
  background: linear-gradient(180deg, #111e31 0%, #0d1728 100%);
}

:root[data-theme="dark"] select option,
:root[data-theme="dark"] select optgroup {
  color: var(--text-strong);
  background: #0b1322;
}

:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
  color: #95a8c8;
}

:root[data-theme="dark"] .table-wrap {
  border-color: var(--border);
  background: #121a2c;
}

:root[data-theme="dark"] th {
  background: #121d30;
  color: #b2c7ea;
}

:root[data-theme="dark"] td {
  color: #d7e0f3;
}

:root[data-theme="dark"] .markdown-body code {
  background: #16243e;
  color: #d5e5ff;
}

:root[data-theme="dark"] .markdown-body blockquote {
  background: #111f35;
  border-left-color: #5a84ca;
  color: #d0def7;
}

:root[data-theme="dark"] .mono {
  color: #c3d2ed;
}

:root[data-theme="dark"] .hero-panel ol,
:root[data-theme="dark"] .login-caption,
:root[data-theme="dark"] .pager-status,
:root[data-theme="dark"] .release-date,
:root[data-theme="dark"] .release-sublist li,
:root[data-theme="dark"] .footer-meta,
:root[data-theme="dark"] .changelog-empty,
:root[data-theme="dark"] .community-post-head .muted {
  color: var(--text-soft);
}

:root[data-theme="dark"] .release-list li,
:root[data-theme="dark"] .community-post-body,
:root[data-theme="dark"] .community-post-detail-body,
:root[data-theme="dark"] .markdown-body,
:root[data-theme="dark"] .stack-form span,
:root[data-theme="dark"] .grid-form span,
:root[data-theme="dark"] .command-picker label,
:root[data-theme="dark"] .release-section h3 {
  color: var(--text-body);
}

:root[data-theme="dark"] .community-post-head h3 a,
:root[data-theme="dark"] .markdown-body h3,
:root[data-theme="dark"] .footer-links a {
  color: #aecdff;
}

:root[data-theme="dark"] .badge {
  color: #d5e4ff;
  background: #1a2f52;
  border-color: #33558a;
}

:root[data-theme="dark"] .badge.soft {
  color: #cbdfff;
  background: #203455;
}

:root[data-theme="dark"] .badge.danger {
  color: #ffc8c8;
  background: #3f1f2b;
  border-color: #714152;
}

.sr-only {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    width: 100%;
    justify-self: stretch;
  }
}

@media (max-width: 860px) {
  .split-grid,
  .metric-grid,
  .grid-form,
  .community-filter-form {
    grid-template-columns: 1fr;
  }

  .community-editor-row {
    grid-template-columns: 1fr;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand theme"
      "nav nav";
    align-items: start;
    row-gap: 10px;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  .top-nav-links {
    flex: 1 1 auto;
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .shell {
    width: calc(100% - 16px);
  }

  .topbar {
    padding: 0 10px;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    justify-items: stretch;
  }

  .top-nav-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .top-nav-links .ghost-btn {
    width: 100%;
    text-align: center;
    padding: 10px 8px;
    min-height: 42px;
  }

  .user-menu-wrap {
    margin-left: 0;
    justify-self: end;
    width: auto;
  }

  .card {
    padding: 16px;
    border-radius: 16px;
  }

  .brand-text {
    display: none;
  }

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

  .footer-shell {
    width: calc(100% - 16px);
  }

  .release-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .primary-btn,
  .ghost-btn {
    width: 100%;
    text-align: center;
  }

  .top-nav-links {
    grid-template-columns: 1fr;
  }

  .top-nav-links .ghost-btn {
    width: 100%;
  }

  .command-picker,
  .command-picker .ghost-btn {
    width: 100%;
  }

  .hero-actions {
    display: grid;
    width: 100%;
  }

  .community-pagination {
    justify-content: center;
  }

  .community-pagination-pages {
    justify-content: center;
  }

  .user-menu-wrap {
    justify-self: stretch;
    width: 100%;
  }

  .user-chip {
    width: 100%;
    justify-content: flex-start;
  }

  .user-menu-pop {
    left: 0;
    right: auto;
    width: 100%;
  }

  .login-caption {
    padding-left: 2px;
  }
}
