@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --background: #11100f;
  --surface: #181715;
  --surface-light: #201e1b;
  --text: #f3efe8;
  --muted: #aaa39a;
  --accent: #ff603d;
  --accent-soft: #ffb188;
  --profile-accent: #ff603d;
  --line: rgba(243, 239, 232, 0.13);
  --content-width: 1160px;
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

.portal-page {
  min-height: calc(100vh - 100px);
  padding-top: 104px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
}

@media (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .ninja-cursor-page,
  .ninja-cursor-page a,
  .ninja-cursor-page button,
  .ninja-cursor-page [role="button"] {
    cursor: url("/assets/konoha-cursor.svg") 16 16, auto;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: absolute;
  z-index: 3;
  display: grid;
  grid-template-areas:
    "brand actions"
    "navigation navigation";
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  row-gap: 12px;
  width: 100%;
  min-height: 104px;
  padding: 12px max(5.5vw, calc((100vw - var(--content-width)) / 2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(17, 16, 15, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.header-brand-group {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 23px;
}

.profile-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d3cec7;
  font-size: 11px;
  white-space: nowrap;
}

.profile-shortcut span {
  color: var(--accent-soft);
}

.brand-mark,
.join-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 96, 61, 0.72);
  border-radius: 50%;
  color: var(--accent-soft);
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
}

.brand-logo {
  border: 0;
  border-radius: 50%;
  object-fit: cover;
  overflow: hidden;
}

.brand-name {
  display: grid;
  gap: 3px;
}

.brand-name strong {
  max-width: 190px;
  overflow: hidden;
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  letter-spacing: 0.13em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-name small {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.19em;
}

.main-nav {
  grid-area: navigation;
  display: flex;
  justify-content: center;
  gap: 7px;
  color: #bcb5ac;
  font-size: 11px;
}

.main-nav a {
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  white-space: nowrap;
}

.main-nav a[aria-current="page"] {
  border-color: rgba(255, 96, 61, 0.3);
  background: rgba(255, 96, 61, 0.09);
  color: var(--accent-soft);
}

.main-nav a,
.site-footer > a:last-child {
  transition: color 160ms ease;
}

.main-nav a:hover,
.site-footer > a:last-child:hover {
  color: var(--accent-soft);
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 0 23px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  background: var(--accent);
  color: #1b100d;
  font-size: 12px;
  font-weight: 700;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover:not(.is-disabled) {
  transform: translateY(-2px);
  background: #ff795c;
}

.button-small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 11px;
}

.header-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 9px;
}

.login-button {
  border-color: rgba(243, 239, 232, 0.25);
  background: rgba(17, 16, 15, 0.48);
  color: var(--text);
}

.login-button:hover:not(.is-disabled) {
  border-color: var(--accent-soft);
  background: rgba(255, 177, 136, 0.1);
}

.header-account {
  min-width: 154px;
}

.header-avatar {
  width: 25px;
  height: 25px;
  border: 1px solid var(--accent-soft);
  border-radius: 50%;
  object-fit: cover;
}

[hidden] {
  display: none !important;
}

.button.is-disabled {
  cursor: not-allowed;
  border-color: rgba(255, 96, 61, 0.4);
  background: rgba(255, 96, 61, 0.12);
  color: #c99181;
}

.hero {
  position: relative;
  display: flex;
  min-height: 700px;
  align-items: center;
  overflow: hidden;
  padding: 150px max(9vw, calc((100vw - var(--content-width)) / 2));
  background:
    radial-gradient(ellipse at 79% 44%, rgba(161, 52, 33, 0.28), transparent 41%),
    linear-gradient(110deg, #121110 0%, #171310 52%, #241512 100%);
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: linear-gradient(90deg, #11100f 3%, rgba(17, 16, 15, 0.92) 37%, rgba(17, 16, 15, 0.3) 100%);
  content: "";
  pointer-events: none;
}

.hero-art {
  position: absolute;
  inset: 0 0 0 36%;
  background-image: url("/assets/community-banner.png");
  background-position: center;
  background-size: cover;
  opacity: 0.82;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(590px, 100%);
}

.eyebrow,
.section-kicker,
.stat-label,
.card-number,
.scroll-cue {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
  color: var(--accent-soft);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #79756f;
  box-shadow: 0 0 0 4px rgba(121, 117, 111, 0.13);
}

.status-dot.online {
  background: #82ce91;
  box-shadow: 0 0 0 4px rgba(130, 206, 145, 0.13);
}

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

h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
}

.hero h1 {
  margin-bottom: 22px;
  font-size: clamp(52px, 7vw, 88px);
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 0.99;
}

h1 span,
h2 em {
  color: var(--accent);
  font-style: normal;
}

.hero-copy,
.section-copy {
  max-width: 440px;
  color: #b7afa6;
  font-size: 14px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 27px;
  margin-top: 32px;
}

.text-link {
  color: #ddd6cf;
  font-size: 11px;
}

.text-link span {
  margin-left: 5px;
  color: var(--accent-soft);
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 65px;
  color: #928a81;
  font-size: 10px;
}

.note-rule {
  width: 31px;
  height: 1px;
  background: var(--accent);
}

.hero-stamp {
  position: absolute;
  z-index: 1;
  right: max(8vw, calc((100vw - var(--content-width)) / 2));
  bottom: 115px;
  display: grid;
  width: 134px;
  height: 134px;
  align-content: center;
  justify-items: center;
  border: 1px solid rgba(255, 177, 136, 0.45);
  border-radius: 50%;
  background: rgba(17, 16, 15, 0.3);
  color: var(--accent-soft);
  transform: rotate(-12deg);
}

.hero-stamp span {
  font-size: 8px;
  letter-spacing: 0.2em;
}

.hero-stamp strong {
  margin-top: 5px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  line-height: 1.05;
  text-align: center;
}

.hero-stamp i {
  position: absolute;
  top: 10px;
  right: 23px;
  font-size: 12px;
  font-style: normal;
}

.scroll-cue {
  position: absolute;
  z-index: 1;
  right: 5.5vw;
  bottom: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #918a82;
  font-size: 8px;
  writing-mode: vertical-rl;
}

.scroll-cue span {
  width: 1px;
  height: 37px;
  background: var(--accent);
}

.stats-section,
.experiences-section {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 112px 35px;
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 42px;
  color: #888078;
}

.section-kicker span {
  color: var(--accent);
}

.stats-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 50px;
}

.stats-heading .eyebrow,
.experience-heading .eyebrow,
.bot-copy .eyebrow,
.join-section .eyebrow {
  margin-bottom: 13px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(40px, 5vw, 62px);
  font-weight: 500;
  letter-spacing: -0.07em;
  line-height: 1.04;
}

.stats-heading .section-copy {
  max-width: 330px;
  margin-bottom: 5px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 54px;
  border: 1px solid var(--line);
}

.stat-card {
  position: relative;
  display: flex;
  min-height: 194px;
  flex-direction: column;
  justify-content: end;
  padding: 26px 25px 23px;
  border-right: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.023), transparent 70%);
}

.stat-card:last-child {
  border-right: 0;
}

.stat-icon,
.stat-symbol {
  position: absolute;
  top: 23px;
  right: 24px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent-soft);
  font-size: 15px;
}

.stat-icon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.stat-label {
  color: #9c948b;
  font-size: 8px;
}

.stat-value {
  margin: 7px 0 4px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 37px;
  font-weight: 500;
  letter-spacing: -0.06em;
}

.stat-foot {
  color: #877f76;
  font-size: 10px;
}

.stats-error {
  margin: 14px 0 0;
  color: var(--accent-soft);
  font-size: 11px;
}

.profile-section,
.leaderboards-section {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 78px 35px 100px;
}

.profile-intro,
.leaderboards-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 50px;
}

.profile-intro .section-copy,
.leaderboards-heading .section-copy {
  max-width: 360px;
  margin-bottom: 5px;
}

.profile-prompt,
.profile-panel {
  margin-top: 40px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(255, 96, 61, 0.09), transparent 50%),
    var(--surface);
}

.profile-prompt {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 25px;
}

.profile-prompt-mark {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 96, 61, 0.5);
  border-radius: 50%;
  color: var(--accent-soft);
  font-size: 20px;
}

.profile-prompt h3,
.profile-identity h3 {
  margin-bottom: 5px;
  font-size: 18px;
  font-weight: 500;
}

.profile-prompt p,
.profile-identity p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.profile-prompt .button {
  margin-left: auto;
  flex: 0 0 auto;
}

.profile-panel {
  padding: 28px;
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-bottom: 23px;
  border-bottom: 1px solid var(--line);
}

.profile-avatar {
  width: 54px;
  height: 54px;
  border: 2px solid var(--profile-accent);
  border-radius: 50%;
  background: var(--surface-light);
  object-fit: cover;
}

.profile-identity .eyebrow {
  margin-bottom: 4px;
  font-size: 8px;
}

.profile-identity .text-button {
  margin-left: auto;
}

.text-button {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
}

.profile-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding-top: 24px;
}

.profile-form label {
  display: grid;
  gap: 9px;
  color: #c9c1b8;
  font-size: 10px;
  font-weight: 600;
}

.profile-form input,
.profile-form textarea,
.profile-form select {
  width: 100%;
  min-height: 42px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  outline: none;
  background: #121110;
  color: var(--text);
  font: inherit;
  font-size: 11px;
}

.profile-form textarea {
  resize: vertical;
}

.profile-form input:focus,
.profile-form textarea:focus,
.profile-form select:focus {
  border-color: var(--profile-accent);
}

.profile-form label:nth-child(2) {
  grid-row: span 2;
}

.profile-form-footer {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.profile-form-footer span {
  color: var(--muted);
  font-size: 10px;
}

.profile-form-footer .button {
  min-height: 42px;
}

.profile-banner {
  display: block;
  width: 100%;
  max-height: 320px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-light);
  object-fit: cover;
}

.profile-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  margin-top: 24px;
}

.profile-image-form input[type="file"] {
  color: var(--muted);
  font-size: 11px;
}

.image-action-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.image-action-row .text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
}

.image-action-row .text-button:hover {
  color: var(--accent-soft);
}

.leaderboards-section {
  max-width: none;
  padding-right: max(35px, calc((100vw - var(--content-width)) / 2 + 35px));
  padding-left: max(35px, calc((100vw - var(--content-width)) / 2 + 35px));
  background: #171513;
}

.leaderboards-heading {
  max-width: var(--content-width);
  margin: 0 auto;
}

.leaderboards-grid {
  display: grid;
  max-width: var(--content-width);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin: 44px auto 0;
}

.leaderboard-card {
  min-width: 0;
  padding: 20px 19px 12px;
  border: 1px solid var(--line);
  background: #11100f;
}

.leaderboard-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.leaderboard-title > span {
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
}

.leaderboard-title h3 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 500;
}

.leaderboard-title p {
  margin: 0;
  color: #8e867e;
  font-size: 9px;
}

.leaderboard-title > b {
  margin-left: auto;
  color: var(--accent-soft);
  font-size: 17px;
  font-weight: 400;
}

.leaderboard-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard-entry {
  display: grid;
  min-width: 0;
  grid-template-columns: 19px 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 51px;
  border-bottom: 1px solid rgba(243, 239, 232, 0.07);
}

.leaderboard-entry:last-child {
  border-bottom: 0;
}

.leaderboard-rank {
  color: #817970;
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
}

.leaderboard-entry:nth-child(-n + 3) .leaderboard-rank {
  color: var(--profile-accent);
}

.leaderboard-avatar {
  width: 29px;
  height: 29px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-light);
  object-fit: cover;
}

.leaderboard-name {
  overflow: hidden;
  color: #e6e0d9;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-identity {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.leaderboard-bio {
  overflow: hidden;
  color: #8e867e;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-value {
  color: var(--profile-accent);
  font-size: 9px;
  text-align: right;
  white-space: nowrap;
}

.leaderboard-empty {
  padding: 22px 0;
  color: #8e867e;
  font-size: 10px;
  line-height: 1.6;
}

.leaderboards-note {
  max-width: var(--content-width);
  margin: 17px auto 0;
  color: #847c73;
  font-size: 9px;
  line-height: 1.6;
}

.leaderboards-section > .stats-error {
  max-width: var(--content-width);
  margin-right: auto;
  margin-left: auto;
}

.experiences-section {
  padding-top: 36px;
  padding-bottom: 124px;
}

.experience-heading {
  margin-bottom: 46px;
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.experience-card {
  position: relative;
  min-height: 286px;
  overflow: hidden;
  padding: 26px 25px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 95% 0%, rgba(255, 96, 61, 0.09), transparent 43%),
    var(--surface);
}

.card-number {
  color: #948c83;
  font-size: 8px;
}

.card-glyph {
  display: block;
  margin: 30px 0 19px;
  color: var(--accent);
  font-size: 30px;
}

.experience-card h3 {
  margin-bottom: 10px;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.experience-card p {
  max-width: 300px;
  margin-bottom: 0;
  color: #a9a198;
  font-size: 11px;
  line-height: 1.7;
}

.card-line {
  position: absolute;
  right: 25px;
  bottom: 25px;
  left: 25px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.56;
}

.bot-section {
  position: relative;
  display: grid;
  min-height: 520px;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  overflow: hidden;
  padding: 76px max(9vw, calc((100vw - var(--content-width)) / 2));
  background: #1a1715;
}

.bot-art {
  position: relative;
  display: grid;
  min-height: 360px;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(135, 49, 35, 0.48), transparent 63%);
}

.bot-art::before,
.bot-art::after {
  position: absolute;
  width: 255px;
  height: 255px;
  border: 1px solid rgba(255, 177, 136, 0.21);
  border-radius: 50%;
  content: "";
}

.bot-art::after {
  width: 195px;
  height: 195px;
  border-color: rgba(255, 96, 61, 0.45);
}

.bot-art img {
  position: relative;
  z-index: 1;
  width: min(440px, 94%);
  max-height: 330px;
  border: 1px solid rgba(255, 177, 136, 0.38);
  border-radius: 3px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.4);
  object-fit: cover;
}

.bot-art i,
.bot-art b {
  position: absolute;
  width: 360px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 177, 136, 0.55), transparent);
  transform: rotate(38deg);
}

.bot-art b {
  transform: rotate(-38deg);
}

.bot-copy {
  padding: 30px 0 30px 35px;
}

.bot-copy .section-kicker {
  margin-bottom: 35px;
}

.bot-copy .section-copy {
  max-width: 430px;
  margin: 21px 0 24px;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feature-tags span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: #c7bfb6;
  font-size: 9px;
}

.join-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 112px 24px 105px;
  background:
    radial-gradient(ellipse at 50% 95%, rgba(172, 58, 38, 0.2), transparent 55%),
    var(--background);
  text-align: center;
}

.join-mark {
  width: 49px;
  height: 49px;
  margin-bottom: 24px;
  font-size: 23px;
}

.join-section h2 {
  margin: 0 0 27px;
  font-size: clamp(44px, 6vw, 69px);
}

.join-foot {
  margin: 15px 0 0;
  color: #8e867e;
  font-size: 10px;
}

.portal-section {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 90px 35px;
}

.portal-section[hidden],
.portal-form[hidden],
.portal-grid[hidden] {
  display: none;
}

.portal-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 32px;
}

.portal-heading .eyebrow {
  margin-bottom: 13px;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 16px;
}

.portal-card,
.sponsor-card {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.portal-card h3 {
  margin-bottom: 20px;
}

.portal-card h4 {
  margin: 21px 0 8px;
  color: var(--accent-soft);
  font-size: 11px;
}

.portal-card p,
.sponsor-card .eyebrow {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

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

.portal-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.portal-form input,
.portal-form select,
.portal-form textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--background);
  color: var(--text);
  font: inherit;
}

.portal-form textarea {
  min-height: 80px;
  resize: vertical;
}

.portal-inline-form {
  display: flex;
  gap: 9px;
}

.portal-inline-form input {
  min-width: 0;
}

.portal-board-form {
  max-width: 700px;
  margin-bottom: 22px;
}

.portal-list {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.portal-member,
.portal-command,
.portal-post {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-light);
  font-size: 12px;
}

.portal-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: #292521;
}

.portal-item-main {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-member .text-button {
  padding: 5px;
  font-size: 10px;
}

.portal-post {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
}

.portal-post time {
  color: var(--muted);
  font-size: 10px;
}

.portal-post p {
  grid-column: 1 / -1;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.portal-command {
  align-items: flex-start;
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}

.portal-command code {
  min-width: 100px;
  color: var(--accent-soft);
}

.ticket-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-light);
}

.application-card {
  max-width: 760px;
  margin: 0 auto;
}

.application-review-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-light);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.application-review-heading,
.application-review-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.application-review-heading time {
  color: var(--muted);
  font-size: 10px;
}

.application-review-item p {
  margin: 0;
  white-space: pre-wrap;
}

.application-review-item > a {
  color: var(--accent-soft);
}

.application-review-actions {
  justify-content: flex-start;
  margin-top: 5px;
}

.application-review-actions .button {
  min-height: 34px;
  padding: 8px 12px;
}

.ticket-list-summary {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
}

.ticket-list-summary strong {
  color: var(--text);
  font-size: 13px;
}

.ticket-list-status {
  color: var(--accent-soft);
}

.ticket-detail-card {
  padding: clamp(18px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.ticket-detail-card h2 {
  margin: 30px 0 16px;
  font-size: clamp(24px, 4vw, 34px);
}

.ticket-detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.ticket-detail-meta div {
  display: grid;
  gap: 6px;
}

.ticket-detail-meta span {
  color: var(--muted);
  font-size: 10px;
}

.ticket-detail-meta strong {
  font-size: 13px;
}

.ticket-transcript {
  max-height: 70vh;
  overflow: auto;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #100f0e;
  color: #ddd6cf;
  font: 12px/1.7 "DM Sans", sans-serif;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ticket-messages {
  display: grid;
  max-height: 70vh;
  gap: 12px;
  overflow: auto;
  padding: 2px;
}

.ticket-message {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #100f0e;
}

.ticket-message-header {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
}

.ticket-message-header strong {
  color: var(--text);
}

.ticket-message-header time {
  margin-left: auto;
  font-size: 10px;
}

.ticket-message-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

.ticket-message-content,
.ticket-embed-description {
  margin: 12px 0 0;
  color: #ddd6cf;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ticket-attachment {
  display: inline-block;
  margin: 10px 10px 0 0;
  color: var(--accent-soft);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.ticket-embed {
  max-width: 620px;
  margin-top: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 5px;
  background: var(--surface-light);
}

.ticket-embed h4 {
  margin: 0;
  color: var(--accent-soft);
  font-size: 13px;
}

.ticket-embed-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 9px 14px;
  margin: 13px 0 0;
  font-size: 11px;
}

.ticket-embed-fields dt {
  color: var(--muted);
  font-weight: 600;
}

.ticket-embed-fields dd {
  margin: 3px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ticket-embed-author,
.ticket-embed-footer {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 10px;
}

.ticket-embed-footer {
  margin: 10px 0 0;
}

.ticket-media {
  display: block;
  max-width: 100%;
  max-height: 440px;
  margin-top: 12px;
  border-radius: 5px;
  object-fit: contain;
  object-position: left;
}

.ticket-thumbnail {
  display: block;
  max-width: min(100%, 220px);
  max-height: 220px;
  margin-top: 12px;
  border-radius: 5px;
  object-fit: contain;
  object-position: left;
}

.portal-empty,
.portal-auth-note,
.portal-status {
  color: var(--muted);
  font-size: 12px;
}

.portal-auth-note {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 7px;
}

.sponsor-card h2 {
  font-size: clamp(32px, 4vw, 48px);
}

.site-footer {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px max(5.5vw, calc((100vw - var(--content-width)) / 2));
  border-top: 1px solid var(--line);
}

.footer-brand .brand-mark {
  width: 35px;
  height: 35px;
  font-size: 17px;
}

.footer-brand .brand-name strong {
  font-size: 9px;
}

.footer-brand .brand-name small {
  font-size: 7px;
}

.site-footer p,
.site-footer > a:last-child {
  margin: 0;
  color: #8e867e;
  font-size: 9px;
}

.site-footer > a:last-child {
  letter-spacing: 0.12em;
}

@media (max-width: 800px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 8px;
    min-height: 98px;
    padding: 12px 24px 8px;
  }

  .main-nav {
    justify-content: flex-start;
    gap: 4px;
    width: calc(100vw - 48px);
    overflow-x: auto;
    scrollbar-width: none;
  }

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

  .main-nav a {
    padding: 6px 10px;
  }

  .header-brand-group {
    gap: 14px;
  }

  .hero {
    min-height: 660px;
    padding: 135px 8vw 100px;
  }

  .hero-art {
    inset: 12% -40% 0 12%;
  }

  .hero::after {
    background: linear-gradient(90deg, rgba(17, 16, 15, 0.98), rgba(17, 16, 15, 0.78) 58%, rgba(17, 16, 15, 0.28));
  }

  .hero-stamp {
    right: 8vw;
    bottom: 60px;
    width: 102px;
    height: 102px;
  }

  .hero-stamp strong {
    font-size: 11px;
  }

  .hero-note {
    margin-top: 47px;
  }

  .stats-section,
  .experiences-section,
  .profile-section,
  .portal-section {
    padding: 84px 24px;
  }

  .portal-page {
    padding-top: 98px;
  }

  .profile-intro,
  .leaderboards-heading,
  .portal-heading {
    align-items: start;
    flex-direction: column;
    gap: 18px;
  }

  .profile-prompt {
    align-items: start;
    flex-wrap: wrap;
    padding: 20px;
  }

  .profile-prompt .button {
    margin-left: 0;
  }

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

  .profile-form label:nth-child(2) {
    grid-row: auto;
  }

  .leaderboards-section {
    padding: 80px 24px;
  }

  .leaderboards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 34px;
  }

  .leaderboard-card {
    padding-right: 17px;
    padding-left: 17px;
  }

  .portal-card,
  .sponsor-card {
    padding: 19px;
  }

  .stats-heading {
    align-items: start;
    flex-direction: column;
    gap: 18px;
  }

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

  .stat-card:nth-child(2) {
    border-right: 0;
  }

  .stat-card:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

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

  .experience-card {
    min-height: 250px;
  }

  .bot-section {
    grid-template-columns: 1fr;
    padding: 50px 24px 75px;
  }

  .bot-art {
    min-height: 280px;
  }

  .bot-art img {
    max-height: 250px;
  }

  .bot-copy {
    padding: 12px 0 0;
  }

  .bot-copy .section-kicker {
    margin-bottom: 28px;
  }

  .site-footer {
    flex-wrap: wrap;
    padding: 18px 24px;
  }
}

@media (max-width: 480px) {
  .header-brand-group {
    gap: 8px;
  }

  .brand-name strong {
    max-width: 96px;
  }

  .brand-name small {
    display: none;
  }

  .profile-shortcut {
    gap: 3px;
    font-size: 9px;
  }

  .portal-section {
    padding: 68px 18px;
  }

  .portal-page {
    padding-top: 96px;
  }

  .portal-member {
    flex-wrap: wrap;
  }

  .portal-member .portal-item-main {
    flex-basis: calc(100% - 50px);
  }

  .portal-member .text-button {
    margin-left: 42px;
  }

  .site-header {
    min-height: 96px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .main-nav {
    width: calc(100vw - 32px);
  }

  .header-account {
    min-height: 36px;
    min-width: auto;
    gap: 7px;
    padding: 0 9px;
    font-size: 9px;
  }

  .header-avatar {
    width: 22px;
    height: 22px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  .hero {
    min-height: 620px;
    padding-right: 24px;
    padding-left: 24px;
  }

  .hero h1 {
    font-size: 58px;
  }

  .hero-copy {
    max-width: 340px;
    font-size: 12px;
  }

  .hero-actions {
    align-items: start;
    flex-direction: column;
    gap: 19px;
  }

  .hero-stamp {
    right: 22px;
    bottom: 28px;
  }

  .hero-note {
    max-width: 200px;
    margin-top: 34px;
    line-height: 1.5;
  }

  .section-kicker {
    margin-bottom: 30px;
  }

  h2 {
    font-size: 44px;
  }

  .stats-grid {
    margin-top: 34px;
  }

  .stat-card {
    min-height: 162px;
    padding: 18px 14px;
  }

  .stat-icon,
  .stat-symbol {
    top: 15px;
    right: 13px;
    width: 28px;
    height: 28px;
  }

  .stat-label {
    max-width: 100px;
    font-size: 7px;
    line-height: 1.5;
  }

  .stat-value {
    font-size: 31px;
  }

  .site-footer {
    justify-content: center;
    text-align: center;
  }

  .site-footer p {
    flex-basis: 100%;
  }
}

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