:root {
  color-scheme: dark;
  font-family: "Trebuchet MS", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  background: #080b12;
  color: #eeeaff;
  --page: #080b12;
  --panel: #151a29;
  --panel-2: #101520;
  --field: #090d15;
  --card: #252b41;
  --line: #33394f;
  --line-soft: #242a3d;
  --text: #eeeaff;
  --muted: #a9b0cb;
  --accent: #98e5d9;
  --accent-ink: #071015;
  --purple: #b997ff;
  --pink: #ff8fa7;
  --radius: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 8% 0%, rgba(73, 54, 118, 0.34), transparent 32rem),
    radial-gradient(circle at 100% 4%, rgba(43, 86, 94, 0.34), transparent 36rem),
    var(--page);
}

body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
  color: var(--text);
  letter-spacing: 0;
}

a {
  color: inherit;
}

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

button,
.button-link,
input,
select,
textarea {
  font: inherit;
}

button,
.button-link {
  min-height: 39px;
  border: 1px solid rgba(122, 133, 166, 0.42);
  border-radius: var(--radius-sm);
  background: rgba(37, 43, 61, 0.88);
  color: var(--text);
  padding: 9px 15px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

button:hover,
button.active,
.button-link:hover {
  border-color: rgba(152, 229, 217, 0.72);
  background: rgba(48, 55, 79, 0.96);
}

.button-link.primary,
button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(65, 73, 104, 0.9);
  border-radius: var(--radius-sm);
  background: rgba(8, 12, 22, 0.86);
  color: var(--text);
  padding: 11px 13px;
  outline: none;
}

textarea {
  resize: vertical;
  line-height: 1.45;
  font-family: "Cascadia Code", Consolas, monospace;
}

input::placeholder,
textarea::placeholder {
  color: #7f88a9;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(152, 229, 217, 0.2);
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.muted {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.staff-shell * {
  scrollbar-color: rgba(152, 229, 217, 0.44) rgba(8, 12, 22, 0.44);
  scrollbar-width: thin;
}

.staff-shell *::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.staff-shell *::-webkit-scrollbar-track {
  background: rgba(8, 12, 22, 0.44);
}

.staff-shell *::-webkit-scrollbar-thumb {
  border: 2px solid rgba(8, 12, 22, 0.44);
  border-radius: 999px;
  background: rgba(152, 229, 217, 0.44);
}

.public-site {
  min-height: 100vh;
  padding: 0;
  background:
    linear-gradient(140deg, rgba(29, 39, 52, 0.42), rgba(8, 11, 18, 0.92) 46%, rgba(11, 18, 19, 0.96)),
    linear-gradient(180deg, #111722 0%, #080b12 58%, #07090d 100%);
}

.public-nav,
.public-main,
.staff-shell {
  margin: 0 auto;
  border: 1px solid var(--line);
  background: rgba(21, 26, 41, 0.96);
}

.public-nav,
.public-main {
  width: 100%;
  border-left: 0;
  border-right: 0;
}

.public-nav {
  min-height: 64px;
  border-top: 0;
  border-bottom-color: rgba(255, 232, 180, 0.12);
  border-radius: 0;
  padding: 12px clamp(18px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(8, 11, 17, 0.82);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.public-nav .brand,
.brand {
  color: #eeeaff;
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
}

.public-nav .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(255, 232, 180, 0.18), 0 12px 28px rgba(0, 0, 0, 0.28);
}

.public-nav nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.public-nav a {
  min-height: 36px;
  border: 1px solid rgba(255, 232, 180, 0.18);
  border-radius: 999px;
  background: rgba(19, 25, 34, 0.62);
  color: #eee8d9;
  padding: 8px 13px;
  text-decoration: none;
  line-height: 1;
}

.public-main {
  border-top: 0;
  border-bottom: 0;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
}

.public-hero {
  min-height: min(760px, calc(100vh - 64px));
  display: grid;
  align-items: center;
  padding: clamp(52px, 8vw, 92px) clamp(18px, 6vw, 96px);
  border-top: 0;
  border-bottom: 1px solid rgba(255, 232, 180, 0.14);
  background:
    linear-gradient(90deg, rgba(8, 11, 18, 0.92), rgba(8, 11, 18, 0.62) 48%, rgba(8, 11, 18, 0.78)),
    linear-gradient(180deg, rgba(8, 11, 18, 0.08), rgba(8, 11, 18, 0.56)),
    url("https://images.unsplash.com/photo-1607513746994-51f730a44832?auto=format&fit=crop&w=1800&q=80");
  background-position: center;
  background-size: cover;
  transition: background-image 420ms ease;
}

.public-hero.compact {
  min-height: min(620px, calc(100vh - 64px));
}

.privacy-public {
  min-height: calc(100vh - 64px);
  padding: clamp(42px, 5vw, 78px) clamp(18px, 4vw, 72px);
  background:
    linear-gradient(135deg, rgba(214, 173, 89, 0.13), transparent 32%),
    linear-gradient(180deg, rgba(20, 25, 34, 0.94), rgba(8, 10, 14, 0.98));
}

.privacy-content {
  width: min(100%, 1720px);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.privacy-content h1 {
  max-width: 760px;
  margin: 0 0 10px;
  color: #f5efe2;
  font-size: clamp(38px, 6vw, 72px);
}

.privacy-content article {
  border: 1px solid rgba(255, 232, 180, 0.16);
  border-radius: 14px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(28, 31, 38, 0.82), rgba(11, 13, 18, 0.86));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.privacy-content h2 {
  margin: 0 0 8px;
  color: #f1e8d5;
  font-size: 20px;
}

.privacy-content p {
  margin: 0;
  color: #cbc3b6;
}

.privacy-content article .button-link {
  margin-top: 14px;
}

.privacy-statement {
  display: grid;
  gap: 18px;
}

.statement-heading {
  display: grid;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 232, 180, 0.13);
}

.statement-heading .eyebrow,
.statement-heading h2,
.statement-heading p {
  margin: 0;
}

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

.statement-grid section {
  min-width: 0;
  border: 1px solid rgba(255, 232, 180, 0.12);
  border-radius: 12px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.12));
}

.statement-grid h3 {
  margin: 0 0 10px;
  color: #f5efe2;
  font-size: 17px;
}

.statement-grid p + p,
.statement-grid ul + p {
  margin-top: 10px;
}

.statement-grid ul {
  margin: 10px 0 0;
  padding-left: 19px;
  color: #cbc3b6;
}

.statement-grid li {
  margin: 6px 0;
  line-height: 1.55;
}

.hero-copy {
  max-width: 760px;
  padding: 24px 0;
}

.public-hero h1 {
  max-width: 820px;
  font-size: clamp(44px, 7.6vw, 88px);
  line-height: 0.96;
  margin-bottom: 16px;
  color: #fff5df;
  text-shadow: 0 16px 42px rgba(0, 0, 0, 0.58);
}

.lead {
  color: #e2dac9;
  font-size: clamp(17px, 1.45vw, 21px);
  line-height: 1.55;
  max-width: 660px;
}

.public-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.public-site .button-link {
  min-height: 44px;
  border-radius: 999px;
  border-color: rgba(255, 232, 180, 0.22);
  background: rgba(19, 25, 34, 0.74);
  color: #fff3d6;
  padding: 11px 18px;
}

.public-site .button-link.primary {
  border-color: #e9b85d;
  background: linear-gradient(180deg, #ffd07a, #d98c35);
  color: #1a1108;
  box-shadow: 0 18px 44px rgba(217, 140, 53, 0.2);
}

.public-band {
  padding: 44px clamp(18px, 6vw, 96px) 56px;
  background:
    linear-gradient(180deg, rgba(14, 19, 24, 0.98), rgba(10, 13, 18, 1));
}

.public-band h2 {
  margin-bottom: 18px;
  color: #fff3d6;
  font-size: clamp(28px, 4vw, 44px);
}

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

.public-grid article {
  min-height: 158px;
  border: 1px solid rgba(255, 232, 180, 0.12);
  border-radius: 8px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(37, 45, 44, 0.72), rgba(15, 21, 24, 0.9));
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2);
}

.public-grid h3 {
  margin-bottom: 10px;
  color: #f6dba6;
  font-size: 21px;
}

.public-grid p {
  color: #c8c0ad;
  line-height: 1.58;
}

.posts-section {
  padding: 46px clamp(18px, 6vw, 96px) 72px;
  background:
    linear-gradient(180deg, #0b0f15, #080a0e);
}

.tickets-public {
  min-height: calc(100vh - 78px);
  padding: 54px clamp(18px, 6vw, 96px) 72px;
  background:
    linear-gradient(180deg, rgba(14, 20, 18, 0.98), rgba(8, 10, 14, 1)),
    radial-gradient(circle at 80% 8%, rgba(233, 184, 93, 0.18), transparent 28rem);
}

.tickets-intro {
  max-width: 820px;
  margin-bottom: 28px;
  display: grid;
  gap: 14px;
}

.tickets-intro h1 {
  color: #fff3d6;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.95;
}

.ticket-public-grid {
  display: grid;
  grid-template-columns: 280px minmax(300px, 0.7fr) minmax(0, 1.3fr);
  gap: 18px;
}

.public-ticket-list-panel,
.public-ticket-form,
.public-ticket-chat {
  border: 1px solid rgba(255, 232, 180, 0.14);
  border-radius: var(--radius);
  background: rgba(18, 20, 24, 0.86);
  padding: 18px;
}

.public-ticket-list-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  max-height: calc(100vh - 220px);
  min-height: 520px;
  min-width: 0;
}

.public-ticket-list-panel .ticket-list {
  padding: 0;
}

.public-ticket-form {
  display: grid;
  gap: 12px;
  align-content: start;
}

.public-ticket-form label {
  display: grid;
  gap: 7px;
  color: #dfd5bd;
  font-weight: 800;
}

.public-ticket-form textarea {
  min-height: 160px;
}

.public-ticket-chat {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  max-height: calc(100vh - 220px);
  min-height: 520px;
  min-width: 0;
}

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

.posts-heading h2 {
  color: #fff3d6;
  font-size: clamp(28px, 4vw, 44px);
}

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

.post-card img {
  width: 100%;
  height: 148px;
  object-fit: cover;
  background: #090d15;
}

.post-card h3 {
  color: #6fd2ec;
  font-size: 21px;
}

.post-card p {
  color: #d8d2c4;
  line-height: 1.58;
}

.post-meta {
  color: #ff614f !important;
  font-weight: 800;
}

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: #d9d9d9;
}

.post-footer span:last-child {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  padding: 7px 10px;
}

.post-card {
  width: 100%;
  min-height: 318px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(18, 20, 24, 0.92);
  border: 1px solid rgba(255, 232, 180, 0.1);
  padding: 0;
  display: grid;
  align-content: start;
  text-align: left;
}

.post-card > div {
  padding: 16px 18px 18px;
  display: grid;
  gap: 10px;
}

.post-card > div > p:not(.post-meta) {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.post-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.post-modal-card {
  position: relative;
  width: min(980px, calc(100vw - 40px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid rgba(255, 232, 180, 0.2);
  border-radius: var(--radius);
  background: #151515;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.post-modal-card img {
  width: 100%;
  height: min(360px, 42vh);
  object-fit: cover;
}

.post-modal-copy {
  padding: clamp(22px, 4vw, 42px);
  display: grid;
  gap: 14px;
}

.post-modal-copy h3 {
  color: #00a6cf;
  font-size: clamp(32px, 5vw, 56px);
}

.post-body {
  white-space: pre-wrap;
  color: #ded8cc;
  line-height: 1.65;
}

.post-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.staff-shell {
  width: min(1640px, calc(100vw - 28px));
  min-height: calc(100vh - 28px);
  margin-top: 14px;
  margin-bottom: 14px;
  border-color: rgba(92, 102, 137, 0.42);
  border-radius: 18px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(18, 24, 43, 0.98) 0%, rgba(12, 18, 34, 0.98) 42%, rgba(9, 25, 31, 0.96) 100%),
    linear-gradient(180deg, #111827, #090d16);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
}

.staff-shell.auth-pending {
  grid-template-columns: minmax(0, 1fr);
}

.staff-shell.auth-pending .sidebar {
  display: none;
}

.sidebar {
  border-right: 1px solid rgba(77, 87, 120, 0.46);
  padding: 24px 18px;
  background:
    linear-gradient(180deg, rgba(15, 22, 39, 0.84), rgba(10, 15, 29, 0.72));
  backdrop-filter: blur(18px);
}

.sidebar .brand {
  margin-bottom: 22px;
  font-size: 28px;
}

.sidebar nav {
  display: grid;
  gap: 7px;
}

.nav {
  width: 100%;
  min-height: 42px;
  justify-content: flex-start;
  text-align: left;
  border-color: transparent;
  background: transparent;
  color: #c7cde4;
  padding: 10px 13px;
}

.nav:hover {
  border-color: rgba(152, 229, 217, 0.28);
  background: rgba(255, 255, 255, 0.05);
  color: #f4f1ff;
}

.nav.active {
  border-color: rgba(152, 229, 217, 0.46);
  background:
    linear-gradient(90deg, rgba(152, 229, 217, 0.18), rgba(255, 255, 255, 0.055));
  color: #f7fffd;
  box-shadow: inset 3px 0 0 var(--accent);
}

main {
  min-width: 0;
}

header {
  min-height: 92px;
  border-bottom: 1px solid rgba(77, 87, 120, 0.46);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background:
    linear-gradient(90deg, rgba(17, 24, 43, 0.72), rgba(12, 18, 34, 0.52));
  backdrop-filter: blur(18px);
}

header h1 {
  font-size: 29px;
  line-height: 1.1;
}

#status {
  color: var(--muted);
  margin-top: 8px;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.login {
  min-height: calc(100vh - 36px);
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-box {
  width: min(460px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid rgba(92, 102, 137, 0.58);
  border-radius: 18px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(20, 27, 45, 0.92), rgba(12, 17, 30, 0.92));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.nav,
.list button,
.post-actions button,
.posts-admin-header button,
.header-actions button,
.command-row button,
#save-config,
#refresh-logs {
  border-radius: var(--radius-sm);
}

.login-box h1 {
  font-size: 30px;
}

.view {
  display: none;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(16, 23, 39, 0.5), rgba(10, 15, 28, 0.34));
  min-height: calc(100vh - 120px);
  min-width: 0;
}

.view.active {
  display: grid;
  align-content: stretch;
}

.stream {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 180px);
  overflow: auto;
  padding-right: 6px;
}

.event {
  display: grid;
  grid-template-columns: 190px 210px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid rgba(72, 82, 116, 0.82);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  background:
    linear-gradient(180deg, rgba(39, 46, 69, 0.78), rgba(28, 35, 55, 0.78));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

.event:hover,
.punishment-row:hover,
.hero-slide-row:hover {
  border-color: rgba(152, 229, 217, 0.52);
  background: rgba(43, 52, 78, 0.88);
}

.event code {
  color: var(--accent);
  font-weight: 800;
}

.terminal {
  min-height: calc(100vh - 210px);
  max-height: calc(100vh - 210px);
  overflow: auto;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(65, 73, 104, 0.9);
  border-radius: var(--radius-sm);
  background: rgba(6, 10, 18, 0.9);
  color: #d8e2ff;
  white-space: pre-wrap;
  font-family: "Cascadia Code", Consolas, monospace;
}

.log-tools {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) 160px 140px 110px;
  gap: 10px;
  margin-bottom: 12px;
}

.replay-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 220px) minmax(180px, 220px) auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

#replays.view.active {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
}

#replays .replay-tools input,
#replays .replay-tools button {
  min-height: 42px;
}

.replay-list {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: calc(100vh - 220px);
  overflow: auto;
  padding-right: 6px;
}

.replay-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 0.9fr) minmax(160px, 220px);
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(72, 82, 116, 0.82);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  background:
    linear-gradient(180deg, rgba(39, 46, 69, 0.78), rgba(28, 35, 55, 0.78));
}

.replay-row.under-investigation {
  border-color: rgba(245, 158, 11, 0.82);
}

.replay-row > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.replay-actions {
  display: grid;
  gap: 8px;
}

.replay-actions .button-link,
.replay-actions button {
  width: 100%;
}

.investigation-toggle.active {
  border-color: rgba(245, 158, 11, 0.8);
  color: #fbbf24;
}

.review-command-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.review-command-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 12, 0.78);
}

.review-command-card {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid rgba(98, 116, 160, 0.72);
  border-radius: var(--radius-sm);
  padding: 18px;
  background: #101827;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
}

.review-command-card h2 {
  margin: 0 0 4px;
}

.review-command-card p {
  margin: 0;
  color: var(--muted);
}

.review-command-card textarea {
  width: 100%;
  min-height: 118px;
  font-family: var(--font-mono);
  resize: vertical;
}

.review-command-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.replay-row span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.custom-range {
  grid-template-columns: repeat(2, minmax(180px, 260px));
}

.log-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.75fr);
  gap: 14px;
  min-height: calc(100vh - 260px);
}

.log-events {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: calc(100vh - 260px);
  overflow: auto;
  padding-right: 6px;
}

.log-row {
  width: 100%;
  display: grid;
  grid-template-columns: 175px 170px 150px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid rgba(72, 82, 116, 0.82);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  background:
    linear-gradient(180deg, rgba(39, 46, 69, 0.78), rgba(28, 35, 55, 0.78));
  color: var(--text);
  text-align: left;
}

.log-row:hover,
.log-row.selected {
  border-color: var(--accent);
  background: rgba(42, 51, 74, 0.96);
}

.log-row code {
  color: var(--accent);
  font-weight: 800;
}

.log-time {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.json-panel {
  min-width: 0;
  border: 1px solid rgba(72, 82, 116, 0.82);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(21, 27, 43, 0.88), rgba(11, 16, 29, 0.9));
  overflow: hidden;
  align-self: start;
  position: sticky;
  top: 16px;
}

.json-panel-header {
  min-height: 48px;
  border-bottom: 1px solid rgba(77, 87, 120, 0.46);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.json-payload {
  max-height: calc(100vh - 320px);
  overflow: auto;
  margin: 0;
  padding: 14px;
  background: rgba(6, 10, 18, 0.76);
  color: #d8e2ff;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

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

.posts-admin {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
}

.site-admin {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(320px, 0.75fr);
  gap: 18px;
}

.punishment-panel {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
}

.duration-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.45fr) minmax(140px, 0.55fr);
  gap: 10px;
}

.ticket-shell {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  height: calc(100vh - 190px);
  min-height: 520px;
  min-width: 0;
}

.ticket-sidebar,
.ticket-chat {
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(72, 82, 116, 0.82);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(18, 25, 43, 0.78), rgba(10, 15, 28, 0.78));
  overflow: hidden;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.18);
}

.ticket-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid rgba(77, 87, 120, 0.46);
  background: rgba(255, 255, 255, 0.025);
}

.ticket-tools.archive-tools {
  grid-template-columns: minmax(0, 1.3fr) minmax(130px, 0.7fr);
}

.ticket-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  padding: 12px;
}

.ticket-row {
  width: 100%;
  display: grid;
  gap: 8px;
  text-align: left;
  justify-content: stretch;
  border: 1px solid rgba(72, 82, 116, 0.82);
  border-radius: var(--radius-sm);
  background: rgba(35, 42, 64, 0.76);
}

.ticket-row span {
  color: var(--muted);
}

.ticket-row.selected,
.ticket-row:hover {
  border-color: var(--accent);
  background: rgba(43, 52, 78, 0.96);
}

.ticket-row.severity-severe {
  border-left: 4px solid #ff5f6d;
}

.ticket-row.severity-moderate {
  border-left: 4px solid #ffd166;
}

.ticket-row.severity-lesser {
  border-left: 4px solid #74b9ff;
}

.ticket-chat {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
}

.ticket-chat-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid rgba(77, 87, 120, 0.46);
  background: rgba(255, 255, 255, 0.025);
}

.ticket-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  padding: 16px;
}

.ticket-message {
  display: grid;
  gap: 7px;
  max-width: 82%;
  border: 1px solid rgba(72, 82, 116, 0.82);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: rgba(35, 42, 64, 0.82);
}

.ticket-message.staff {
  justify-self: end;
  border-color: rgba(152, 229, 217, 0.5);
}

.ticket-message.system {
  justify-self: center;
  max-width: 92%;
  border-color: rgba(255, 232, 180, 0.25);
}

.ticket-message div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.ticket-message span {
  color: var(--muted);
  font-size: 13px;
}

.ticket-message p {
  white-space: pre-wrap;
  line-height: 1.45;
}

.ticket-reply {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid rgba(77, 87, 120, 0.46);
  background: rgba(255, 255, 255, 0.025);
}

.punishment-form {
  display: grid;
  gap: 12px;
  align-content: start;
}

.punishment-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.punishment-list {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: calc(100vh - 220px);
  overflow: auto;
  padding-right: 6px;
}

.punishment-row {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(72, 82, 116, 0.82);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  background: rgba(35, 42, 64, 0.78);
}

.punishment-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.punishment-title code {
  color: var(--accent);
  font-weight: 800;
}

.posts-admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.post-list {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: calc(100vh - 220px);
  overflow: auto;
  padding-right: 6px;
}

.post-admin-row {
  width: 100%;
  display: grid;
  gap: 6px;
  justify-content: stretch;
  text-align: left;
  border: 1px solid rgba(72, 82, 116, 0.82);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  background: rgba(35, 42, 64, 0.78);
}

.post-admin-row span {
  color: var(--muted);
}

.post-admin-row.selected,
.post-admin-row:hover {
  border-color: var(--accent);
  background: rgba(43, 52, 78, 0.96);
}

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

.post-editor label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
  align-items: center;
}

.upload-row input[type="file"] {
  min-height: 44px;
  padding: 9px 11px;
}

.hero-slide-list {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: calc(100vh - 220px);
  overflow: auto;
  padding-right: 6px;
}

.hero-slide-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) 100px;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(72, 82, 116, 0.82);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(35, 42, 64, 0.78);
}

.hero-slide-row img {
  width: 128px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #090d15;
}

.hero-slide-row div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.hero-slide-row span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-editor textarea {
  min-height: 96px;
}

.embed-panel {
  display: grid;
  grid-template-columns: minmax(360px, 0.72fr) minmax(260px, 0.28fr);
  gap: 18px;
  height: 100%;
  min-height: 0;
}

.embed-form {
  align-content: start;
  overflow: auto;
  padding-right: 6px;
}

.embed-two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.embed-preview {
  display: grid;
  align-content: start;
  gap: 14px;
}

.embed-preview h2 {
  margin: 0;
  font-size: 30px;
}

.embed-preview p {
  margin: 0;
}

.embed-example {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(214, 173, 89, 0.22);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.embed-example span {
  color: var(--muted);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 13px;
}

.post-editor,
.editor,
.config-grid,
.posts-admin,
.site-admin,
.embed-panel,
.log-layout {
  border-radius: var(--radius);
}

.config-grid > *,
.posts-admin > *,
.site-admin > *,
.embed-panel > *,
.punishment-panel > * {
  min-width: 0;
  border: 1px solid rgba(72, 82, 116, 0.7);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(18, 25, 43, 0.7), rgba(10, 15, 28, 0.7));
  padding: 16px;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.16);
}

.posts-admin > .post-editor,
.site-admin > .post-editor,
.config-grid > .editor {
  background:
    linear-gradient(180deg, rgba(22, 29, 49, 0.78), rgba(11, 16, 29, 0.78));
}

body.staff-shell {
  --page: #080808;
  --panel: #181818;
  --panel-2: #101010;
  --field: #090909;
  --card: #222222;
  --line: rgba(205, 168, 89, 0.42);
  --line-soft: rgba(205, 168, 89, 0.18);
  --text: #f2f0eb;
  --muted: #b8b4aa;
  --accent: #d6ad59;
  --accent-ink: #12100a;
  width: 100vw;
  min-height: 100vh;
  height: 100vh;
  margin: 0;
  border: 0;
  border-radius: 0;
  grid-template-columns: 282px minmax(0, 1fr);
  background:
    linear-gradient(135deg, #242424 0%, #151515 44%, #090909 100%);
  box-shadow: none;
}

body.staff-shell main {
  min-height: 0;
  height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.045), transparent 34%),
    linear-gradient(180deg, rgba(31, 31, 31, 0.92), rgba(12, 12, 12, 0.94));
}

body.staff-shell .sidebar {
  min-height: 100vh;
  border-right: 1px solid rgba(214, 173, 89, 0.36);
  padding: 28px 22px;
  background:
    linear-gradient(180deg, rgba(39, 39, 39, 0.96), rgba(16, 16, 16, 0.96));
}

body.staff-shell .eyebrow {
  color: #e7c879;
}

body.staff-shell .sidebar .brand {
  color: #f6f0df;
  font-size: 31px;
  margin-bottom: 28px;
}

body.staff-shell .sidebar nav {
  gap: 8px;
}

body.staff-shell .nav {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #c8c4ba;
  background: transparent;
}

body.staff-shell .nav:hover {
  border-color: rgba(214, 173, 89, 0.36);
  background: rgba(255, 255, 255, 0.055);
  color: #fff8e7;
}

body.staff-shell .nav.active {
  border-color: rgba(214, 173, 89, 0.78);
  background:
    linear-gradient(90deg, rgba(214, 173, 89, 0.24), rgba(255, 255, 255, 0.06));
  color: #fff6df;
  box-shadow: inset 3px 0 0 #d6ad59, 0 0 0 1px rgba(214, 173, 89, 0.08);
}

body.staff-shell header {
  min-height: 94px;
  border-bottom: 1px solid rgba(214, 173, 89, 0.3);
  background:
    linear-gradient(90deg, rgba(41, 41, 41, 0.96), rgba(22, 22, 22, 0.92));
}

body.staff-shell header h1 {
  color: #f7f2e7;
  font-size: 32px;
}

body.staff-shell button,
body.staff-shell .button-link,
body.staff-shell input,
body.staff-shell select,
body.staff-shell textarea {
  border-color: rgba(214, 173, 89, 0.34);
}

body.staff-shell button,
body.staff-shell .button-link {
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(58, 58, 58, 0.96), rgba(31, 31, 31, 0.96));
  color: #f2efe7;
}

body.staff-shell button:hover,
body.staff-shell button.active,
body.staff-shell .button-link:hover {
  border-color: rgba(232, 197, 117, 0.84);
  background:
    linear-gradient(180deg, rgba(72, 72, 72, 0.98), rgba(38, 38, 38, 0.98));
}

body.staff-shell button.primary,
body.staff-shell .button-link.primary {
  border-color: #e0bd68;
  background:
    linear-gradient(180deg, #e4c470, #ae7c2e);
  color: #171108;
  box-shadow: 0 12px 30px rgba(175, 124, 46, 0.22);
}

body.staff-shell input,
body.staff-shell select,
body.staff-shell textarea {
  background: rgba(8, 8, 8, 0.82);
  color: #f1efe8;
}

body.staff-shell input:focus,
body.staff-shell select:focus,
body.staff-shell textarea:focus {
  border-color: #e0bd68;
  box-shadow: 0 0 0 2px rgba(214, 173, 89, 0.18);
}

body.staff-shell .view {
  height: calc(100vh - 94px);
  min-height: 0;
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 38%),
    linear-gradient(180deg, rgba(27, 27, 27, 0.66), rgba(12, 12, 12, 0.54));
  overflow: hidden;
}

body.staff-shell .stream {
  max-height: calc(100vh - 146px);
}

body.staff-shell .ticket-shell {
  grid-template-columns: minmax(340px, 0.32fr) minmax(0, 1fr);
  height: calc(100vh - 146px);
  min-height: 0;
  gap: 18px;
}

body.staff-shell .ticket-sidebar,
body.staff-shell .ticket-chat,
body.staff-shell .json-panel,
body.staff-shell .config-grid > *,
body.staff-shell .posts-admin > *,
body.staff-shell .site-admin > *,
body.staff-shell .embed-panel > *,
body.staff-shell .punishment-panel > * {
  border: 1px solid rgba(214, 173, 89, 0.36);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(43, 43, 43, 0.82), rgba(18, 18, 18, 0.86));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

body.staff-shell .ticket-tools,
body.staff-shell .ticket-chat-header,
body.staff-shell .ticket-reply,
body.staff-shell .json-panel-header {
  border-color: rgba(214, 173, 89, 0.24);
  background: rgba(255, 255, 255, 0.035);
}

body.staff-shell .event,
body.staff-shell .log-row,
body.staff-shell .replay-row,
body.staff-shell .ticket-row,
body.staff-shell .ticket-message,
body.staff-shell .punishment-row,
body.staff-shell .post-admin-row,
body.staff-shell .hero-slide-row {
  border: 1px solid rgba(214, 173, 89, 0.28);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(50, 50, 50, 0.8), rgba(25, 25, 25, 0.84));
}

body.staff-shell .event:hover,
body.staff-shell .log-row:hover,
body.staff-shell .log-row.selected,
body.staff-shell .replay-row:hover,
body.staff-shell .ticket-row:hover,
body.staff-shell .ticket-row.selected,
body.staff-shell .punishment-row:hover,
body.staff-shell .post-admin-row:hover,
body.staff-shell .post-admin-row.selected,
body.staff-shell .hero-slide-row:hover {
  border-color: rgba(232, 197, 117, 0.78);
  background:
    linear-gradient(180deg, rgba(62, 62, 62, 0.9), rgba(31, 31, 31, 0.92));
}

body.staff-shell .ticket-row.severity-severe {
  border-color: rgba(255, 95, 109, 0.62);
  border-left: 5px solid #ff5f6d;
  background:
    linear-gradient(180deg, rgba(71, 38, 42, 0.86), rgba(29, 22, 23, 0.9));
}

body.staff-shell .ticket-row.severity-moderate {
  border-color: rgba(255, 209, 102, 0.62);
  border-left: 5px solid #ffd166;
  background:
    linear-gradient(180deg, rgba(70, 57, 31, 0.84), rgba(30, 27, 20, 0.9));
}

body.staff-shell .ticket-row.severity-lesser {
  border-color: rgba(116, 185, 255, 0.58);
  border-left: 5px solid #74b9ff;
  background:
    linear-gradient(180deg, rgba(35, 51, 69, 0.84), rgba(20, 26, 33, 0.9));
}

body.staff-shell .ticket-row.severity-severe:hover,
body.staff-shell .ticket-row.severity-severe.selected {
  border-color: rgba(255, 116, 128, 0.9);
  border-left-color: #ff5f6d;
}

body.staff-shell .ticket-row.severity-moderate:hover,
body.staff-shell .ticket-row.severity-moderate.selected {
  border-color: rgba(255, 218, 132, 0.9);
  border-left-color: #ffd166;
}

body.staff-shell .ticket-row.severity-lesser:hover,
body.staff-shell .ticket-row.severity-lesser.selected {
  border-color: rgba(139, 198, 255, 0.9);
  border-left-color: #74b9ff;
}

body.staff-shell .event code,
body.staff-shell .log-row code,
body.staff-shell .punishment-title code {
  color: #e7c879;
}

body.staff-shell .ticket-message.staff {
  border-color: rgba(232, 197, 117, 0.62);
  background:
    linear-gradient(180deg, rgba(67, 60, 43, 0.86), rgba(31, 29, 23, 0.9));
}

body.staff-shell .terminal,
body.staff-shell .json-payload {
  border-color: rgba(214, 173, 89, 0.3);
  background: rgba(5, 5, 5, 0.82);
}

body.staff-shell * {
  scrollbar-color: rgba(214, 173, 89, 0.56) rgba(9, 9, 9, 0.5);
}

body.staff-shell *::-webkit-scrollbar-track {
  background: rgba(9, 9, 9, 0.5);
}

body.staff-shell *::-webkit-scrollbar-thumb {
  border-color: rgba(9, 9, 9, 0.5);
  background: rgba(214, 173, 89, 0.56);
}

#post-body {
  min-height: 220px;
}

.post-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.post-options label {
  min-height: 44px;
}

.post-options input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
}

.post-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.list {
  display: grid;
  align-content: start;
  gap: 9px;
}

.editor {
  display: grid;
  gap: 11px;
}

#config-content {
  min-height: calc(100vh - 290px);
}

.command-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  margin-top: 12px;
}

#activity-list:empty::before,
#log-events:empty::before,
#console-output:empty::before {
  color: #7f88a9;
}

#activity-list:empty::before {
  content: "Waiting for audit events...";
}

#log-events:empty::before {
  content: "No in-game logs match the current filters.";
}

#console-output:empty::before {
  content: "Waiting for log output...";
}

@media (max-width: 1180px) {
  .statement-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .public-site {
    padding: 0;
  }

  .public-nav,
  .public-main,
  .staff-shell {
    width: 100%;
  }

  header {
    align-items: stretch;
    flex-direction: column;
  }

  .public-nav {
    min-height: 56px;
    padding: 10px 12px;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }

  .public-nav .brand {
    font-size: 22px;
    white-space: nowrap;
  }

  .public-nav nav,
  .header-actions,
  .public-actions {
    justify-content: flex-start;
  }

  .public-nav nav {
    flex: 1;
    justify-content: flex-end;
    gap: 6px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .public-nav nav::-webkit-scrollbar {
    display: none;
  }

  .public-nav a {
    min-height: 32px;
    padding: 7px 10px;
    font-size: 14px;
    white-space: nowrap;
  }

  .public-grid,
  .public-posts,
  .statement-grid,
  .staff-shell,
  .config-grid,
  .posts-admin,
  .punishment-panel,
  .site-admin,
  .embed-panel,
  .embed-two-column,
  .ticket-shell,
  .ticket-public-grid,
  .post-options,
  .upload-row,
  .duration-row,
  .hero-slide-row,
  .event,
  .replay-tools,
  .replay-row,
  .log-tools,
  .custom-range,
  .log-layout,
  .log-row {
    grid-template-columns: 1fr;
  }

  .staff-shell {
    margin-top: 10px;
    margin-bottom: 10px;
  }

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

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

  .view,
  header,
  .public-hero,
  .public-band {
    padding: 18px;
  }

  .public-hero {
    min-height: 540px;
    align-items: end;
    padding-top: 72px;
    padding-bottom: 36px;
  }

  .public-hero.compact {
    min-height: 420px;
  }

  .public-hero h1 {
    font-size: clamp(40px, 10vw, 60px);
  }

  .lead {
    font-size: 16px;
  }

  .posts-section {
    padding: 34px 18px 46px;
  }

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

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

  .ticket-shell {
    height: auto;
    min-height: 0;
  }

  .ticket-list {
    max-height: 260px;
  }

  .ticket-chat,
  .public-ticket-chat {
    min-height: 520px;
    max-height: 70vh;
  }

  .log-events,
  .json-payload {
    max-height: none;
  }

  .json-panel {
    position: static;
  }
}

@media (max-width: 520px) {
  .sidebar nav {
    grid-template-columns: 1fr;
    display: grid;
  }

  .brand,
  header h1,
  .login-box h1 {
    font-size: 26px;
  }

  .public-nav {
    gap: 8px;
  }

  .public-nav .brand {
    flex: 0 0 auto;
    font-size: 20px;
  }

  .public-nav nav {
    min-width: 0;
    justify-content: flex-start;
  }

  .public-nav a {
    font-size: 13px;
  }

  .public-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .public-posts {
    grid-template-columns: 1fr;
  }
}

body.staff-shell {
  width: 100vw !important;
  min-width: 0;
  max-width: none;
  min-height: 100vh;
  height: 100vh;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background:
    linear-gradient(135deg, #2a2a2a 0%, #171717 44%, #080808 100%) !important;
}

body.staff-shell .ticket-sidebar,
body.staff-shell .ticket-chat,
body.staff-shell .json-panel,
body.staff-shell .config-grid > *,
body.staff-shell .posts-admin > *,
body.staff-shell .site-admin > *,
body.staff-shell .punishment-panel > *,
body.staff-shell .login-box {
  border-color: rgba(224, 189, 104, 0.42);
}

@media (min-width: 861px) {
  body.staff-shell {
    grid-template-columns: 282px minmax(0, 1fr);
    overflow: hidden;
  }

  body.staff-shell .view {
    height: calc(100vh - 94px);
  }

  body.staff-shell .ticket-shell {
    height: calc(100vh - 146px);
  }
}

@media (max-width: 860px) {
  body.staff-shell {
    height: auto;
    min-height: 100vh;
    overflow: auto;
    display: block;
    background:
      linear-gradient(155deg, #2b2b2b 0%, #171717 48%, #070707 100%) !important;
  }

  body.staff-shell main {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  body.staff-shell .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 0;
    padding: 12px 12px 10px;
    border-right: 0;
    border-bottom: 1px solid rgba(214, 173, 89, 0.34);
    background:
      linear-gradient(180deg, rgba(30, 30, 30, 0.98), rgba(14, 14, 14, 0.96));
    backdrop-filter: blur(16px);
  }

  body.staff-shell .sidebar .eyebrow {
    margin-bottom: 4px;
    font-size: 11px;
  }

  body.staff-shell .sidebar .brand {
    margin-bottom: 10px;
    font-size: 24px;
  }

  body.staff-shell .sidebar nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  body.staff-shell .sidebar nav::-webkit-scrollbar {
    display: none;
  }

  body.staff-shell .nav {
    width: auto;
    min-width: max-content;
    min-height: 40px;
    padding: 9px 13px;
    scroll-snap-align: start;
    box-shadow: none;
  }

  body.staff-shell .nav.active {
    box-shadow: inset 0 -3px 0 #d6ad59, 0 0 0 1px rgba(214, 173, 89, 0.08);
  }

  body.staff-shell header {
    position: sticky;
    top: 107px;
    z-index: 15;
    min-height: 0;
    padding: 14px;
    gap: 12px;
    border-bottom-color: rgba(214, 173, 89, 0.26);
  }

  body.staff-shell header h1 {
    font-size: 26px;
  }

  body.staff-shell #status {
    margin-top: 4px;
  }

  body.staff-shell .header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  body.staff-shell #staff-user {
    grid-column: 1 / -1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.staff-shell .header-actions button,
  body.staff-shell .header-actions .button-link {
    width: 100%;
  }

  body.staff-shell .view {
    height: auto;
    min-height: calc(100vh - 214px);
    padding: 14px;
    overflow: visible;
  }

  body.staff-shell .ticket-shell {
    height: auto;
    min-height: 0;
    gap: 12px;
    grid-template-columns: 1fr;
  }

  body.staff-shell .ticket-sidebar,
  body.staff-shell .ticket-chat,
  body.staff-shell .json-panel,
  body.staff-shell .config-grid > *,
  body.staff-shell .posts-admin > *,
  body.staff-shell .site-admin > *,
  body.staff-shell .embed-panel > *,
  body.staff-shell .punishment-panel > * {
    border-radius: 12px;
  }

  body.staff-shell .ticket-tools,
  body.staff-shell .archive-tools,
  body.staff-shell .log-tools,
  body.staff-shell .custom-range,
  body.staff-shell .replay-tools,
  body.staff-shell .duration-row,
  body.staff-shell .upload-row,
  body.staff-shell .embed-two-column,
  body.staff-shell .post-options,
  body.staff-shell .command-row {
    grid-template-columns: 1fr;
  }

  body.staff-shell .ticket-list,
  body.staff-shell .post-list,
  body.staff-shell .hero-slide-list,
  body.staff-shell .punishment-list,
  body.staff-shell .replay-list {
    max-height: 42vh;
  }

  body.staff-shell .ticket-chat {
    min-height: min(620px, calc(100vh - 230px));
    max-height: none;
  }

  body.staff-shell .ticket-chat-header,
  body.staff-shell .posts-admin-header,
  body.staff-shell .json-panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  body.staff-shell .ticket-chat-header button,
  body.staff-shell .posts-admin-header button {
    width: 100%;
  }

  body.staff-shell .ticket-message {
    max-width: 100%;
  }

  body.staff-shell .ticket-message div {
    display: grid;
    gap: 4px;
  }

  body.staff-shell .ticket-reply {
    grid-template-columns: 1fr;
  }

  body.staff-shell .log-layout,
  body.staff-shell .config-grid,
  body.staff-shell .posts-admin,
  body.staff-shell .site-admin,
  body.staff-shell .punishment-panel,
  body.staff-shell .embed-panel {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  body.staff-shell .log-events,
  body.staff-shell .json-payload {
    max-height: 48vh;
  }

  body.staff-shell .log-row,
  body.staff-shell .event,
  body.staff-shell .replay-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body.staff-shell .log-time {
    overflow-wrap: anywhere;
  }

  body.staff-shell .embed-panel {
    height: auto;
  }

  body.staff-shell .embed-form {
    overflow: visible;
    padding-right: 0;
  }

  body.staff-shell #config-content,
  body.staff-shell .terminal {
    min-height: 44vh;
    max-height: 56vh;
  }
}

@media (max-width: 520px) {
  body.staff-shell .sidebar {
    padding: 10px;
  }

  body.staff-shell .sidebar .eyebrow {
    display: none;
  }

  body.staff-shell .sidebar .brand {
    font-size: 22px;
  }

  body.staff-shell header {
    top: 91px;
    padding: 12px;
  }

  body.staff-shell .view {
    min-height: calc(100vh - 190px);
    padding: 12px;
  }

  body.staff-shell .header-actions {
    grid-template-columns: 1fr;
  }

  body.staff-shell button,
  body.staff-shell .button-link,
  body.staff-shell input,
  body.staff-shell select,
  body.staff-shell textarea {
    min-height: 44px;
  }

  body.staff-shell .ticket-chat {
    min-height: min(560px, calc(100vh - 206px));
  }

  body.staff-shell .ticket-messages,
  body.staff-shell .ticket-list,
  body.staff-shell .log-events,
  body.staff-shell .json-payload {
    padding: 12px;
  }

  body.staff-shell .hero-slide-row {
    grid-template-columns: 1fr;
  }

  body.staff-shell .hero-slide-row img {
    width: 100%;
  }

  body.staff-shell .post-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
