:root {
  --bg: #101010;
  --panel: #e8e2c8;
  --panel-dark: #c8bd92;
  --ink: #151515;
  --muted: #554f42;
  --blue: #164d96;
  --blue-bright: #2b8cff;
  --green: #1f8a4c;
  --red: #a4332e;
  --line: #6d6147;
  --shadow: #070707;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Verdana, Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    #151515;
  background-size: 18px 18px;
}

body.intro-active {
  overflow: hidden;
  height: 100svh;
}

a {
  color: #063d9e;
  font-weight: 700;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page-shell {
  width: min(1120px, calc(100% - 24px));
  margin: 12px auto;
  border: 2px solid #050505;
  background: #b6aa7e;
  box-shadow: 0 0 0 4px #2d281d, 0 16px 30px var(--shadow);
  transition: opacity 0.45s ease, transform 0.55s ease;
}

.simple-page {
  margin-top: 18px;
}

.single-column {
  padding: 12px;
}

body.intro-active .page-shell,
body.intro-active .auth-shell {
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px);
}

body.video-docked .page-shell,
body.video-docked .auth-shell {
  opacity: 1;
  transform: translateY(0);
}

.top-strip,
.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  color: #d7f8ff;
  background: linear-gradient(#243c58, #102033);
  border-bottom: 1px solid #000;
  font-size: 12px;
}

.video-hero {
  position: relative;
  z-index: 20;
  display: grid;
  place-items: center;
  height: 100vh;
  height: 100svh;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: #000;
  border-bottom: 3px solid #000;
  cursor: pointer;
  transition: height 0.7s cubic-bezier(0.2, 0.85, 0.2, 1), min-height 0.7s cubic-bezier(0.2, 0.85, 0.2, 1);
}

.intro-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0.9;
  background: #000;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.16) 58%, rgba(0, 0, 0, 0.62));
  pointer-events: none;
}

.hero-brand {
  position: absolute;
  left: 34px;
  bottom: 42px;
  max-width: 520px;
  color: #f6f1d0;
  text-shadow: 2px 2px 0 #000, 0 0 12px #00b7ff;
  transition: transform 0.7s cubic-bezier(0.2, 0.85, 0.2, 1), bottom 0.7s cubic-bezier(0.2, 0.85, 0.2, 1);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 5px;
  color: #68ff9b;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 82px;
  line-height: 0.95;
}

.hero-brand p:last-child {
  max-width: 430px;
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: 700;
}

.hero-controls {
  position: absolute;
  right: 28px;
  bottom: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.enter-forum,
.sound-toggle {
  min-height: 38px;
  padding: 8px 14px;
  color: #fff;
  background: linear-gradient(#287bd0, #123e74);
  border: 1px solid #061d39;
  box-shadow: inset 1px 1px 0 #7fc4ff, 2px 2px 0 #060606;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.35s ease;
}

.enter-forum:hover,
.sound-toggle:hover {
  filter: brightness(1.12);
}

body.video-docked .video-hero {
  position: sticky;
  top: 0;
  height: 190px;
  min-height: 190px;
  cursor: default;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
}

body.banner-transitioning .video-hero {
  pointer-events: none;
}

body.video-docked .hero-brand {
  bottom: 20px;
  transform: translateY(0);
}

body.video-docked .hero-brand h1 {
  font-size: 46px;
}

body.video-docked .hero-brand p:last-child {
  margin-top: 5px;
}

body.video-docked .enter-forum {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

body.video-docked .hero-controls {
  right: 18px;
  bottom: 16px;
}

body.video-docked .sound-toggle {
  min-height: 32px;
  padding: 6px 10px;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: linear-gradient(#f7f0d2, #c3b175);
  border-top: 1px solid #fdf7df;
  border-bottom: 2px solid #4b412b;
}

.main-nav a {
  min-width: 112px;
  padding: 10px 14px;
  color: #101010;
  border-right: 1px solid #74663e;
  text-align: center;
}

.main-nav a:hover {
  background: #244f84;
  color: #fff;
  text-decoration: none;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 12px;
  padding: 12px;
}

.notice,
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: inset 0 1px 0 #fff8dc;
}

.notice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  margin-bottom: 12px;
  color: #fffbd9;
  background: linear-gradient(#8b2c2c, #571818);
  border-color: #2b0808;
}

.panel {
  margin-bottom: 12px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  color: #fff;
  background: linear-gradient(#2d6fad, #153c6b);
  border-bottom: 1px solid #07172b;
}

.panel-title h2 {
  margin: 0;
  font-size: 14px;
  text-transform: uppercase;
}

.panel-title span {
  font-size: 11px;
  color: #dcecff;
}

.news-post {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
}

.post-date {
  padding: 8px;
  color: #fff;
  background: #294d22;
  border: 1px solid #0e210a;
  text-align: center;
  font-weight: 700;
}

.news-post h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.news-post p {
  margin: 0;
  line-height: 1.5;
}

.forum-table {
  width: 100%;
}

.forum-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 72px 72px minmax(150px, 0.7fr);
  width: 100%;
  min-height: 64px;
  padding: 0;
  color: var(--ink);
  font: inherit;
  text-align: left;
  background: #f3ecd1;
  border: 0;
  border-bottom: 1px solid #978a65;
  cursor: pointer;
}

.forum-row:nth-child(odd):not(.forum-head) {
  background: #ded4aa;
}

.forum-row:hover:not(.forum-head),
.forum-row.active {
  background: #d7edff;
}

.forum-row > span {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 9px 10px;
  border-right: 1px solid #ad9f76;
}

.forum-row > span:not(:first-child) {
  align-items: center;
  text-align: center;
  font-weight: 700;
}

.forum-row small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.forum-head {
  min-height: auto;
  color: #f9f1cc;
  background: #51462d;
  cursor: default;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.forum-head > span {
  padding: 7px 10px;
  border-color: #302918;
}

.thread-list {
  padding: 10px;
}

.thread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px;
  gap: 10px;
  padding: 9px;
  border: 1px solid #a79970;
  background: #fff8dc;
}

.thread + .thread {
  margin-top: 8px;
}

.thread strong {
  display: block;
  margin-bottom: 4px;
}

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

.badge {
  align-self: center;
  justify-self: end;
  padding: 4px 7px;
  color: #fff;
  background: var(--green);
  border: 1px solid #0a3f20;
  font-size: 11px;
  font-weight: 700;
}

.sidebar .panel {
  background: #efe7c8;
}

.login-box,
.stats {
  padding-bottom: 10px;
}

.account-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 9px 10px 0;
}

.account-tab {
  min-height: 30px;
  border: 1px solid #5f5335;
  background: #d5c693;
  color: #171717;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.account-tab.active {
  color: #fff;
  background: #294d22;
}

.account-form {
  display: none;
}

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

.login-box label {
  display: block;
  margin: 10px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 34px;
  margin-top: 5px;
  padding: 7px 8px;
  border: 1px solid #5f5335;
  background: #fffbee;
  color: #111;
  font: inherit;
}

.pixel-button {
  min-height: 34px;
  padding: 7px 12px;
  color: #fff;
  background: linear-gradient(#287bd0, #123e74);
  border: 1px solid #061d39;
  box-shadow: inset 1px 1px 0 #7fc4ff, 2px 2px 0 #241f16;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.pixel-button:hover {
  filter: brightness(1.12);
}

.login-box .pixel-button {
  margin-left: 10px;
}

.account-status {
  margin: 10px 10px 0;
  padding: 7px;
  color: #fffbd9;
  background: #51462d;
  border: 1px solid #302918;
  font-size: 12px;
}

.push-settings,
.notifications-box {
  margin: 10px;
  padding: 8px;
  border: 1px solid #a79970;
  background: #fff8dc;
}

.push-settings small,
.notifications-box small,
.notifications-box span {
  display: block;
}

.notifications-box a {
  display: block;
  margin-top: 6px;
  padding: 6px;
  border: 1px solid #c1b27d;
  background: #f3ecd1;
}

.notifications-box a.unread {
  background: #d7edff;
}

#markNotificationsButton {
  display: block;
  width: calc(100% - 20px);
  margin: 8px 10px 10px;
  text-align: center;
}

#markNotificationsButton.hidden {
  display: none;
}

.tournament-list,
.race-list {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.tournament-card,
.race-card,
.round-block,
.league-summary {
  padding: 10px;
  border: 1px solid #9d8e62;
  background: #fbf4d7;
}

.tournament-card,
.race-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tournament-card h3,
.round-block h3 {
  margin: 0 0 6px;
}

.tournament-card p,
.league-summary p {
  margin: 4px 0;
}

.class-badge,
.result-status {
  display: inline-block;
  min-width: 28px;
  padding: 2px 6px;
  color: #fff;
  background: #1f5d98;
  border: 1px solid #0d3154;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.25);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.class-D { background: #59615a; }
.class-C { background: #4d7d41; }
.class-B { background: #2877a8; }
.class-A { background: #a47b20; }
.class-S1 { background: #9d2f7c; }
.class-S2 { background: #b4362d; }
.class-X { background: #222; }

.result-status {
  min-width: 76px;
}

.status-pending,
.status-oczekuje {
  background: #9c7620;
}

.status-approved,
.status-zatwierdzony,
.status-active,
.status-open {
  background: #188043;
}

.status-rejected,
.status-odrzucony,
.status-closed {
  background: #9a2626;
}

.status-planned {
  background: #1f5d98;
}

.status-finished {
  background: #51462d;
}

.table-wrap {
  overflow-x: auto;
}

.league-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff8dc;
}

.league-table th,
.league-table td {
  padding: 8px;
  border: 1px solid #9d8e62;
  text-align: left;
  vertical-align: top;
}

.league-table th {
  color: #fff;
  background: linear-gradient(#23649d, #143f6b);
}

.league-table .top-1 td {
  background: #fff0a8;
}

.league-table .top-2 td {
  background: #eeeeee;
}

.league-table .top-3 td {
  background: #efd1ad;
}

.result-actions {
  white-space: nowrap;
}

.round-block + .round-block {
  margin-top: 10px;
}

.server-list {
  margin: 0;
  padding: 8px 10px 10px;
  list-style: none;
}

.server-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dotted #766b4a;
}

.server-list strong {
  color: #fff;
  background: var(--green);
  padding: 2px 6px;
  font-size: 11px;
}

.shouts {
  max-height: 170px;
  overflow: auto;
  padding: 9px 10px;
  background: #fff8dc;
  border-bottom: 1px solid #978a65;
}

.shouts p {
  margin: 0 0 7px;
  line-height: 1.35;
}

.shout-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 7px;
  padding: 9px;
}

.shout-form input {
  margin: 0;
}

.emoji-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 6px 10px 0;
}

.emoji-row:empty {
  display: none;
}

.emoji-row button {
  min-width: 34px;
  min-height: 30px;
  padding: 4px 7px;
  border: 1px solid #8d7e55;
  background: #f3ecd1;
  cursor: pointer;
}

.emoji-button-image,
.inline-emoji {
  width: 22px;
  height: 22px;
  object-fit: cover;
  vertical-align: middle;
}

.emoji-button-image {
  display: block;
}

.inline-emoji {
  margin: 0 2px;
}

.mention {
  font-weight: 700;
  color: #064ba1;
}

.activity-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(32px, auto);
  gap: 7px;
  overflow: hidden;
  padding: 8px 10px;
}

.activity-item {
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid #c1b27d;
  background: #f3ecd1;
  font-size: 11px;
  line-height: 1.2;
  overflow: hidden;
}

.activity-item a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
}

.activity-item strong {
  display: inline-flex;
  align-items: center;
  max-width: 92px;
  padding: 1px 4px;
  color: #fff;
  background: #1f5a95;
  border: 1px solid #0c3156;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-item span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-item small {
  display: none;
}

.activity-list .empty-state {
  grid-column: 1 / -1;
}

.typing-status {
  min-height: 20px;
  margin: 0;
  padding: 0 10px 8px;
  color: #294d22;
  font-size: 12px;
  font-weight: 700;
}

.stats p {
  margin: 10px;
}

.footer {
  border-top: 2px solid #000;
  border-bottom: 0;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  transition: background-image 0.25s ease;
}

.auth-page.pope-bg {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.36)),
    url("/assets/papiez.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.auth-shell {
  width: min(520px, 100%);
}

.auth-card {
  margin: 0;
}

.guest-account {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px;
}

.auth-gate {
  margin: 12px;
}

.auth-gate-body {
  padding: 14px;
  background: #fff8dc;
}

.auth-gate-body p {
  margin: 8px 0 12px;
  line-height: 1.5;
}

.auth-gate-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 180px));
  gap: 10px;
}

.pixel-link {
  display: block;
  min-height: 34px;
  padding: 8px 12px;
  color: #fff;
  background: linear-gradient(#287bd0, #123e74);
  border: 1px solid #061d39;
  box-shadow: inset 1px 1px 0 #7fc4ff, 2px 2px 0 #241f16;
  font-weight: 700;
  text-align: center;
}

.pixel-link:hover {
  text-decoration: none;
  filter: brightness(1.12);
}

.hidden {
  display: none !important;
}

.panel-link {
  color: #fff;
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.global-shoutbox {
  margin: 12px;
}

#activityPanel {
  margin: 12px;
}

select,
textarea {
  width: 100%;
  margin-top: 5px;
  padding: 7px 8px;
  border: 1px solid #5f5335;
  background: #fffbee;
  color: #111;
  font: inherit;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

.stack-form {
  padding: 10px;
}

.stack-form label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
}

.form-note {
  margin: 10px 0 0;
  color: var(--muted);
}

.empty-state {
  margin: 0;
  padding: 16px;
  color: var(--muted);
  background: #fff8dc;
  border: 1px dashed #9a8b61;
  text-align: center;
}

.thread-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.thread {
  grid-template-columns: minmax(0, 1fr) auto;
}

.text-button {
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid #5f5335;
  background: #d5c693;
  color: #151515;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.text-button.danger {
  color: #fff;
  background: var(--red);
  border-color: #4a110f;
}

.thread-open-body {
  padding: 10px;
}

.forum-post {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid #a79970;
  background: #fff8dc;
}

.forum-post + .forum-post {
  margin-top: 10px;
}

.post-avatar,
.profile-avatar {
  width: 56px;
  height: 56px;
  border: 2px solid #302918;
  background: #d5c693;
  object-fit: cover;
}

.post-avatar.placeholder,
.profile-avatar.placeholder {
  display: grid;
  place-items: center;
  color: #fff;
  background: #294d22;
  font-weight: 700;
}

.post-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px dotted #9a8b61;
}

.post-rank {
  color: #fff;
  background: #294d22;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 700;
}

.post-body {
  white-space: pre-wrap;
  line-height: 1.5;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.75fr);
  gap: 12px;
  padding: 10px;
}

.admin-grid h3 {
  margin: 0 0 8px;
}

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

.admin-user {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid #a79970;
  background: #fff8dc;
}

.wide-admin-list {
  padding: 10px;
}

.admin-user-edit {
  grid-template-columns: minmax(140px, 1fr) minmax(120px, 1fr) 90px 80px 86px 72px auto;
}

.admin-user-edit label {
  margin: 0;
}

.mini-check {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 5px;
  align-items: center;
  font-weight: 700;
}

.mini-check input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}

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

.admin-settings-grid fieldset {
  margin: 0;
  padding: 10px;
  border: 1px solid #a79970;
  background: #fff8dc;
}

.admin-settings-grid legend {
  padding: 0 6px;
  font-weight: 700;
}

.settings-check-list {
  display: grid;
  gap: 7px;
}

.setting-check {
  margin: 0 !important;
}

.setting-number {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 90px;
  gap: 8px;
  align-items: center;
  margin: 0 !important;
}

.setting-number input {
  min-height: 30px;
  margin: 0;
}

.emoji-admin-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  padding: 10px;
}

.emoji-admin-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px;
  border: 1px solid #a79970;
  background: #fff8dc;
}

.emoji-admin-item img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border: 1px solid #302918;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.deploy-status {
  padding: 10px;
}

.deploy-stage-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 10px;
}

.deploy-stage {
  min-height: 42px;
  padding: 6px 4px;
  border: 1px solid #a79970;
  background: #efe2b8;
  text-align: center;
}

.deploy-stage strong,
.deploy-stage small,
.deploy-facts strong,
.deploy-facts small {
  display: block;
}

.deploy-stage small,
.deploy-facts small {
  margin-top: 2px;
  color: var(--muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.deploy-stage strong {
  font-size: 0.78rem;
  line-height: 1.1;
}

.deploy-stage small {
  font-size: 0.68rem;
  line-height: 1.1;
}

.deploy-stage.done {
  border-color: #3f7d46;
  background: #dff1cf;
}

.deploy-stage.active {
  border-color: #b77d12;
  background: #ffe08a;
  box-shadow: 0 0 0 2px rgba(183, 125, 18, 0.18);
}

.deploy-stage.error {
  border-color: #8e2d2d;
  background: #f6c9c0;
}

.deploy-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.deploy-facts article {
  padding: 8px;
  border: 1px solid #a79970;
  background: #fff8dc;
}

.deploy-facts .deploy-error {
  border-color: #8e2d2d;
  background: #f6c9c0;
}

@media (max-width: 780px) {
  .deploy-stage-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.deploy-log {
  max-height: 280px;
  overflow: auto;
  margin: 10px 0 0;
  padding: 10px;
  border: 1px solid #a79970;
  background: #1d1a14;
  color: #f7edc8;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.discord-admin {
  grid-column: 1 / -1;
}

.compact-form {
  padding: 0;
}

.discord-status {
  padding: 10px;
}

.discord-channel {
  padding: 8px;
  border: 1px solid #a79970;
  background: #fff8dc;
}

.discord-channel + .discord-channel {
  margin-top: 8px;
}

.discord-channel strong,
.discord-channel small {
  display: block;
}

.discord-channel small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.event-list {
  padding: 10px;
}

.user-stats-panel {
  margin: 0 12px 12px;
}

.user-stats-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  padding: 10px;
}

.event-item,
.user-stat-row {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid #a79970;
  background: #fff8dc;
}

.event-item + .event-item {
  margin-top: 8px;
}

.event-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.event-item strong,
.event-item small,
.user-stat-row strong,
.user-stat-row small {
  display: block;
}

.event-item small,
.user-stat-row small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.event-signups {
  margin-top: 6px;
  color: #294d22;
  font-weight: 700;
}

.user-stat-row {
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
}

.user-stat-avatar {
  width: 36px;
  height: 36px;
  border: 2px solid #302918;
  object-fit: cover;
  background: #d5c693;
}

.user-stat-avatar.placeholder {
  display: grid;
  place-items: center;
  color: #fff;
  background: #294d22;
  font-size: 11px;
  font-weight: 700;
}

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

.fun-stat {
  min-height: 72px;
  padding: 10px;
  border: 1px solid #a79970;
  background: #fff8dc;
}

.fun-stat strong,
.fun-stat small {
  display: block;
}

.fun-stat strong {
  font-size: 20px;
  color: #123e74;
}

.fun-stat small {
  margin-top: 6px;
  color: var(--muted);
}

.rank-table-wrap {
  overflow-x: auto;
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff8dc;
}

.rank-table th,
.rank-table td {
  padding: 9px 10px;
  border: 1px solid #a79970;
  text-align: left;
}

.rank-table th {
  color: #f9f1cc;
  background: #51462d;
  text-transform: uppercase;
  font-size: 11px;
}

.truth-check {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.truth-check input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
}

.profile-box {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 9px;
  margin: 10px;
  padding: 8px;
  border: 1px solid #a79970;
  background: #fff8dc;
}

.profile-page {
  padding: 12px;
  background: #fff8dc;
}

.profile-hero-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid #9d8e62;
  background: #fbf4d7;
  background-size: cover;
  background-position: center;
}

.profile-bg-asphalt {
  color: #fff8dc;
  background:
    linear-gradient(rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.42)),
    repeating-linear-gradient(135deg, #2b2b2b 0 16px, #3a3a3a 16px 32px);
}

.profile-bg-neon {
  color: #fff8dc;
  background:
    linear-gradient(120deg, rgba(10, 13, 35, 0.9), rgba(22, 65, 72, 0.85)),
    repeating-linear-gradient(90deg, rgba(0, 255, 198, 0.22) 0 2px, transparent 2px 26px);
}

.profile-bg-forest {
  color: #fff8dc;
  background:
    linear-gradient(rgba(20, 55, 30, 0.78), rgba(10, 30, 18, 0.78)),
    repeating-linear-gradient(45deg, #244329 0 18px, #335c32 18px 36px);
}

.profile-bg-garage {
  background:
    linear-gradient(rgba(255, 248, 220, 0.82), rgba(255, 248, 220, 0.82)),
    repeating-linear-gradient(0deg, #7d6b46 0 10px, #5e4c32 10px 20px);
}

.profile-hero-row h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.profile-hero-row p {
  margin: 4px 0;
}

.profile-big-avatar {
  width: 86px;
  height: 86px;
  border: 2px solid #302918;
  object-fit: cover;
  background: #d5c693;
}

.profile-big-avatar.placeholder {
  display: grid;
  place-items: center;
  color: #fff;
  background: #294d22;
  font-size: 24px;
  font-weight: 700;
}

.os-claim {
  padding: 8px;
  border: 1px dashed #9a8b61;
  background: #f3ecd1;
  color: #51462d;
  font-weight: 700;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 10px;
}

.profile-achievements {
  margin-top: 18px;
}

.achievement-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.profile-achievement,
.achievement-admin-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #a79970;
  background: #f3ecd1;
  align-items: flex-start;
}

.profile-achievement {
  align-items: center;
}

.profile-achievement .achievement-icon {
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #4b3922;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.achievement-info {
  display: grid;
  gap: 4px;
  flex: 1;
}

.achievement-info strong {
  display: block;
}

.achievement-date {
  color: var(--muted);
  font-size: 0.92rem;
}

.achievement-admin-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.profile-comments {
  margin-top: 12px;
}

.profile-comment {
  padding: 8px;
  border: 1px solid #a79970;
  background: #f3ecd1;
}

.profile-comment + .profile-comment {
  margin-top: 8px;
}

.profile-comment p {
  margin: 6px 0 0;
  white-space: pre-wrap;
}

.profile-box strong,
.profile-box small {
  display: block;
}

.profile-box small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.avatar-update {
  display: block;
  margin: 10px;
  font-weight: 700;
}

#logoutButton {
  margin-top: 0;
}

.shouts {
  max-height: 150px;
}

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

  .admin-settings-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 58px;
  }

  body.video-docked .hero-brand h1 {
    font-size: 38px;
  }

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

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

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

  .admin-user-edit {
    grid-template-columns: 1fr;
  }

  .forum-row {
    grid-template-columns: minmax(180px, 1fr) 58px 58px;
  }

  .forum-row > span:last-child,
  .forum-head > span:last-child {
    display: none;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: 100%;
    margin: 0;
    border-left: 0;
    border-right: 0;
  }

  .top-strip,
  .footer {
    flex-direction: column;
    gap: 4px;
  }

  .video-hero {
    min-height: 100vh;
    min-height: 100svh;
  }

  body.video-docked .video-hero {
    height: 150px;
    min-height: 150px;
  }

  .hero-brand {
    left: 14px;
    right: 14px;
    bottom: 16px;
  }

  h1 {
    font-size: 44px;
  }

  body.video-docked .hero-brand h1 {
    font-size: 31px;
  }

  .hero-brand p:last-child {
    font-size: 13px;
  }

  .hero-controls {
    right: 14px;
    bottom: 14px;
  }

  .main-nav a {
    flex: 1 1 50%;
    min-width: 0;
  }

  .activity-list {
    grid-template-columns: 1fr;
  }

  .news-post,
  .thread,
  .forum-post,
  .profile-hero-row {
    grid-template-columns: 1fr;
  }

  .auth-gate-actions {
    grid-template-columns: 1fr;
  }

  .forum-row {
    grid-template-columns: minmax(0, 1fr) 54px;
  }

  .forum-row > span:nth-child(3),
  .forum-head > span:nth-child(3) {
    display: none;
  }
}
