/* ==========================================================================
   胜率制圣杯TRPG / GRAIL REGISTRY
   A dark reliquary of ink, parchment, crimson and old gold.
   ========================================================================== */

:root {
  --bg: #120f0d;
  --bg-soft: #171310;
  --panel: #1b1613;
  --panel-2: #221b17;
  --panel-3: #2a211b;
  --line: rgba(196, 162, 101, 0.16);
  --line-strong: rgba(196, 162, 101, 0.38);
  --paper: #ece2cf;
  --paper-dim: #cfc0a6;
  --muted: #948672;
  --faint: #6f6456;
  --gold: #c4a265;
  --gold-bright: #e0c48c;
  --gold-dim: #8d7547;
  --red: #8c1f2a;
  --red-bright: #b23a44;
  --red-wash: rgba(140, 31, 42, 0.16);
  --green: #7c9275;
  --blue: #7f96a3;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  --font-latin: "Times New Roman", "Noto Serif", serif;
  --max: 1240px;
  --header-h: 78px;
  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 45% at 12% -8%, rgba(140, 31, 42, 0.2), transparent 60%),
    radial-gradient(ellipse 55% 40% at 90% 2%, rgba(196, 162, 101, 0.08), transparent 55%),
    linear-gradient(180deg, #15110e 0%, var(--bg) 42%, #100d0b 100%);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

::selection {
  background: rgba(196, 162, 101, 0.28);
  color: #fff8ea;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #100d0b;
}
::-webkit-scrollbar-thumb {
  background: #3a2f25;
  border: 2px solid #100d0b;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-dim);
}

.page-grain {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

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

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

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

button {
  cursor: pointer;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 24px;
  z-index: 2000;
  padding: 10px 16px;
  background: var(--gold);
  color: #17110c;
  font-weight: 700;
}
.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 1px solid var(--gold-bright);
  outline-offset: 3px;
}

.container {
  width: min(var(--max), calc(100% - 64px));
  margin-inline: auto;
}

.container.narrow {
  width: min(860px, calc(100% - 64px));
}

.serif {
  font-family: var(--font-serif);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  font-family: var(--font-latin);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold-dim);
}
.eyebrow.centered {
  justify-content: center;
}
.eyebrow.centered::after {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold-dim);
}

.muted {
  color: var(--muted);
}
.gold {
  color: var(--gold);
}
.red {
  color: var(--red-bright);
}
.tiny {
  font-size: 12px;
}
.mono {
  font-family: ui-monospace, "Cascadia Mono", monospace;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid var(--line);
  background: rgba(18, 15, 13, 0.82);
  backdrop-filter: blur(16px) saturate(1.1);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.site-header.is-scrolled {
  background: rgba(16, 13, 11, 0.95);
  border-color: var(--line-strong);
}

.header-inner {
  width: min(1400px, calc(100% - 56px));
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 40px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  flex-shrink: 0;
}

.brand-mark {
  width: 43px;
  height: 43px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.15;
  color: var(--gold);
}
.brand-mark .thin {
  stroke: var(--gold-dim);
  stroke-width: 0.7;
}
.brand-mark .dot {
  fill: var(--gold);
  stroke: none;
}

.brand-words {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand-words strong {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.14em;
}
.brand-words em {
  margin-top: 3px;
  color: var(--gold-dim);
  font-family: var(--font-latin);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.34em;
}

.main-nav {
  display: flex;
  align-items: stretch;
  gap: 4px;
  height: 100%;
  margin-left: 22px;
}

.main-nav a {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 0 19px;
  color: var(--paper-dim);
  transition: color 0.2s ease;
}
.main-nav a span {
  font-size: 14px;
  letter-spacing: 0.12em;
}
.main-nav a em {
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.26em;
  transition: color 0.2s ease;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 19px;
  right: 19px;
  bottom: -1px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.main-nav a:hover,
.main-nav a.is-active {
  color: var(--gold-bright);
}
.main-nav a:hover em,
.main-nav a.is-active em {
  color: var(--gold-dim);
}
.main-nav a:hover::after,
.main-nav a.is-active::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.icon-button,
.menu-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--paper-dim);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}
.icon-button:hover,
.menu-button:hover {
  color: var(--gold-bright);
  border-color: var(--line);
  background: rgba(196, 162, 101, 0.05);
}

.auth-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-links .login-link {
  padding: 8px 12px;
  color: var(--paper-dim);
  font-size: 13px;
  letter-spacing: 0.08em;
}
.auth-links .login-link:hover {
  color: var(--gold-bright);
}

.user-menu {
  position: relative;
}
.user-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 4px 4px;
  border: 1px solid var(--line);
  background: transparent;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}
.user-trigger:hover {
  border-color: var(--line-strong);
  background: rgba(196, 162, 101, 0.05);
}
.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #3a2a21, #1a1411);
  color: var(--gold-bright);
  font-family: var(--font-serif);
  font-size: 14px;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-upload {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
}
.avatar-preview .avatar {
  width: 76px;
  height: 76px;
  font-size: 26px;
}
.avatar-upload-copy {
  display: grid;
  gap: 7px;
}
.avatar-upload-copy p {
  margin: 0;
  max-width: 380px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}
@media (max-width: 520px) {
  .avatar-upload {
    align-items: flex-start;
  }
  .avatar-preview .avatar {
    width: 62px;
    height: 62px;
  }
}
.avatar.frame-gold {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(196, 162, 101, 0.1);
}
.avatar.frame-crimson {
  border-color: var(--red-bright);
  background: radial-gradient(circle at 35% 25%, #3d1c20, #170e10);
  color: #e7b6b7;
  box-shadow: 0 0 0 2px rgba(178, 58, 68, 0.12);
}
.avatar.frame-ivory {
  border-color: #d9cdb9;
  background: radial-gradient(circle at 35% 25%, #3a352c, #171411);
  color: #f0e6d4;
}
.avatar.frame-laurel {
  border-color: #8fa37f;
  background: radial-gradient(circle at 35% 25%, #263126, #121610);
  color: #d2dfc4;
  box-shadow: 0 0 0 2px rgba(143, 163, 127, 0.1);
}
.frame-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.frame-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.frame-option:has(input:checked) {
  border-color: var(--gold);
  background: rgba(196, 162, 101, 0.055);
}
.frame-option:has(input:checked)::after {
  content: "✓";
  position: absolute;
  top: 7px;
  right: 10px;
  color: var(--gold);
  font-family: var(--font-sans);
  font-size: 11px;
}
.frame-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.frame-option .avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  font-size: 13px;
}
.frame-option > span:not(.avatar) {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  gap: 3px;
}
.frame-option > span:not(.avatar) strong {
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
}
.frame-option > span:not(.avatar) em {
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 7px;
  font-style: normal;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.user-trigger-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.user-trigger-text strong {
  max-width: 90px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-trigger-text em {
  margin-top: 2px;
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 7px;
  font-style: normal;
  letter-spacing: 0.2em;
}

.user-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 210px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  background: #1a1512;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: 0.18s ease;
}
.user-popover.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.user-popover-head {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.user-popover-head strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 15px;
}
.user-popover-head span {
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.14em;
}
.user-popover a,
.user-popover button {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  background: transparent;
  color: var(--paper-dim);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-align: left;
}
.user-popover a:hover,
.user-popover button:hover {
  background: rgba(196, 162, 101, 0.07);
  color: var(--gold-bright);
}
.user-popover .danger:hover {
  color: #e58a90;
}

.menu-button {
  display: none;
  gap: 5px;
}
.menu-button span {
  display: block;
  width: 18px;
  height: 1px;
  background: currentColor;
  transition: transform 0.25s ease;
}
.menu-button[aria-expanded="true"] span:first-child {
  transform: translateY(3px) rotate(45deg);
}
.menu-button[aria-expanded="true"] span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

.mobile-drawer {
  position: fixed;
  top: var(--header-h);
  right: 0;
  bottom: 0;
  z-index: 99;
  width: min(390px, 100%);
  padding: 34px 30px;
  background: #15110e;
  border-left: 1px solid var(--line);
  transform: translateX(102%);
  visibility: hidden;
  transition: transform 0.4s var(--ease), visibility 0.4s;
  overflow-y: auto;
}
.mobile-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}
.mobile-drawer nav {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.mobile-drawer nav a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-serif);
  font-size: 20px;
}
.mobile-drawer nav a em {
  color: var(--gold-dim);
  font-family: var(--font-latin);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.25em;
}
.mobile-auth {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}
.mobile-auth .btn {
  flex: 1;
}
.mobile-motto {
  margin-top: 48px;
  color: var(--faint);
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.16em;
}

/* ==========================================================================
   Buttons, tags, labels
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 11px 24px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--paper);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.2;
  transition: 0.22s ease;
}
.btn:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
  background: rgba(196, 162, 101, 0.06);
}
.btn.primary {
  border-color: var(--red);
  background: var(--red);
  color: #f7ead8;
}
.btn.primary:hover {
  border-color: var(--red-bright);
  background: var(--red-bright);
  color: #fff8eb;
}
.btn.gold {
  border-color: var(--gold);
  background: var(--gold);
  color: #1b130c;
}
.btn.gold:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: #140e08;
}
.btn.small {
  min-height: 36px;
  padding: 7px 15px;
  font-size: 11px;
  letter-spacing: 0.08em;
}
.btn.tiny-btn {
  min-height: 30px;
  padding: 5px 11px;
  font-size: 10px;
}
.btn.block {
  width: 100%;
}
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.btn .arrow {
  font-family: var(--font-latin);
  font-size: 16px;
  transition: transform 0.22s ease;
}
.btn:hover .arrow {
  transform: translateX(3px);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.16em;
}
.link-arrow::after {
  content: "→";
  font-size: 16px;
  transition: transform 0.22s ease;
}
.link-arrow:hover::after {
  transform: translateX(4px);
}
.link-arrow:hover {
  color: var(--gold-bright);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid rgba(196, 162, 101, 0.24);
  color: var(--paper-dim);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.5;
}
.tag.red {
  border-color: rgba(178, 58, 68, 0.4);
  color: #d98a90;
}
.tag.gold {
  border-color: rgba(196, 162, 101, 0.45);
  color: var(--gold-bright);
}
.tag.green {
  border-color: rgba(124, 146, 117, 0.45);
  color: #a3b59b;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: var(--font-latin);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}
.status.recruiting {
  color: var(--red-bright);
}
.status.ongoing {
  color: var(--gold);
}
.status.ended {
  color: var(--faint);
}
.status.accepted {
  color: var(--green);
}
.status.pending {
  color: var(--gold);
}
.status.declined {
  color: var(--faint);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  margin-top: 110px;
  border-top: 1px solid var(--line);
  background: rgba(12, 10, 8, 0.7);
}
.footer-inner {
  width: min(var(--max), calc(100% - 64px));
  margin-inline: auto;
  padding: 46px 0 40px;
  display: grid;
  grid-template-columns: 260px 1fr auto;
  gap: 48px;
  align-items: start;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-mark {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: var(--gold-dim);
  stroke-width: 1;
}
.footer-brand strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 0.12em;
}
.footer-brand span {
  display: block;
  margin-top: 3px;
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 8px;
  letter-spacing: 0.26em;
}
.footer-note {
  max-width: 540px;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.9;
  letter-spacing: 0.03em;
}
.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 9px;
  letter-spacing: 0.17em;
  white-space: nowrap;
}

/* ==========================================================================
   Home hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 690px;
  display: grid;
  align-items: center;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 30px;
  padding: 76px 0 54px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0, transparent calc(50% - 1px), var(--line) 50%, transparent calc(50% + 1px)),
    linear-gradient(180deg, transparent 92%, var(--line) 92%);
  opacity: 0.45;
  pointer-events: none;
}
.hero::after {
  content: "Ⅶ";
  position: absolute;
  top: 10px;
  right: 2%;
  color: transparent;
  -webkit-text-stroke: 1px rgba(196, 162, 101, 0.08);
  font-family: var(--font-latin);
  font-size: clamp(220px, 30vw, 410px);
  line-height: 1;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding-bottom: 18px;
}
.hero-copy .eyebrow {
  margin-bottom: 32px;
}
.hero h1 {
  max-width: 720px;
  font-family: var(--font-serif);
  font-size: clamp(48px, 5.6vw, 83px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.035em;
}
.hero h1 .line {
  display: block;
}
.hero h1 .gold {
  color: var(--gold-bright);
}
.hero h1 .stroke {
  color: transparent;
  -webkit-text-stroke: 1px rgba(224, 196, 140, 0.65);
}
.hero-lead {
  max-width: 470px;
  margin-top: 30px;
  padding-left: 20px;
  border-left: 1px solid var(--red);
  color: var(--paper-dim);
  font-size: 14px;
  line-height: 2;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}
.hero-signature {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 44px;
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 9px;
  letter-spacing: 0.2em;
}
.hero-signature::before {
  content: "";
  width: 44px;
  height: 1px;
  background: var(--gold-dim);
}

.sigil-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 560px;
  z-index: 1;
}
.sigil-stage::before {
  content: "";
  position: absolute;
  width: min(42vw, 510px);
  height: min(42vw, 510px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 31, 42, 0.16), transparent 66%);
  filter: blur(20px);
}
.grail-sigil {
  position: relative;
  width: min(40vw, 485px);
  height: auto;
  overflow: visible;
}
.sigil-ring-outer {
  transform-origin: 260px 260px;
  animation: orbit 90s linear infinite;
}
.sigil-ring-inner {
  transform-origin: 260px 260px;
  animation: orbit-reverse 64s linear infinite;
}
.sigil-runes {
  fill: var(--gold);
  font-family: var(--font-latin);
  font-size: 9px;
  letter-spacing: 0.28em;
}
.sigil-chalice {
  fill: none;
  stroke: var(--paper);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 16px rgba(196, 162, 101, 0.15));
}
.sigil-chalice .ruby {
  fill: var(--red);
  stroke: rgba(255, 200, 190, 0.4);
  stroke-width: 0.8;
}
.sigil-dot {
  fill: var(--gold);
}
.sigil-line {
  stroke: var(--gold-dim);
  stroke-width: 0.8;
}
.sigil-label {
  fill: var(--faint);
  font-family: var(--font-latin);
  font-size: 7.5px;
  letter-spacing: 0.34em;
}
.sigil-caption {
  position: absolute;
  right: -18px;
  bottom: 74px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 8px;
  letter-spacing: 0.24em;
  writing-mode: vertical-rl;
}
.sigil-caption::before {
  content: "";
  width: 1px;
  height: 42px;
  background: var(--gold-dim);
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}
@keyframes orbit-reverse {
  to {
    transform: rotate(-360deg);
  }
}

/* Stat band */

.stat-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(24, 19, 16, 0.38);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  position: relative;
  padding: 27px 30px 25px;
  border-right: 1px solid var(--line);
}
.stat:first-child {
  border-left: 1px solid var(--line);
}
.stat::before {
  content: attr(data-index);
  position: absolute;
  top: 14px;
  right: 16px;
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 8px;
  letter-spacing: 0.2em;
}
.stat-value {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-family: var(--font-latin);
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-value small {
  color: var(--gold-dim);
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.18em;
}
.stat-label {
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
}
.stat-label em {
  margin-left: 8px;
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 7px;
  font-style: normal;
  letter-spacing: 0.18em;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  padding: 88px 0 0;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 38px;
}
.section-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.section-index {
  padding-top: 5px;
  color: var(--red-bright);
  font-family: var(--font-latin);
  font-size: 11px;
  letter-spacing: 0.18em;
}
.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.3;
}
.section-head h2 span {
  color: var(--gold-dim);
}
.section-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.section-link {
  margin-bottom: 7px;
  flex-shrink: 0;
}

/* ==========================================================================
   Game cards
   ========================================================================== */

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

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 385px;
  padding: 27px 27px 23px;
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  background:
    linear-gradient(155deg, rgba(196, 162, 101, 0.045), transparent 34%),
    var(--panel);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s, background 0.35s;
  animation: rise 0.65s var(--ease) both;
  animation-delay: calc(var(--delay, 0) * 80ms);
}
.game-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--red), transparent 45%);
  opacity: 0.6;
}
.game-card::after {
  content: attr(data-index);
  position: absolute;
  right: 22px;
  bottom: 13px;
  color: rgba(196, 162, 101, 0.08);
  font-family: var(--font-latin);
  font-size: 58px;
  line-height: 1;
  letter-spacing: -0.06em;
  pointer-events: none;
}
.game-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  background:
    linear-gradient(155deg, rgba(196, 162, 101, 0.08), transparent 38%),
    var(--panel-2);
}
.game-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.game-card-kp {
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.06em;
}
.game-card h3 {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.01em;
}
.game-card:hover h3 {
  color: var(--gold-bright);
}
.game-card-sub {
  margin-top: 4px;
  color: var(--gold-dim);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.game-card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}
.game-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 16px;
}
.play-style-tag {
  color: var(--paper);
  border-color: rgba(140, 31, 42, 0.55);
  background: rgba(140, 31, 42, 0.14);
}
.game-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  margin-top: auto;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.5;
}
.meta-item svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--gold-dim);
  stroke-width: 1.4;
}
.meta-item strong {
  color: var(--paper-dim);
  font-weight: 400;
}

.seat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 17px;
}
.seat-pips {
  display: flex;
  gap: 4px;
}
.seat-pips i {
  display: block;
  width: 13px;
  height: 4px;
  background: #352b23;
}
.seat-pips i.on {
  background: var(--gold-dim);
}
.seat-pips i.full {
  background: var(--red);
}
.seat-count {
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 10px;
  letter-spacing: 0.1em;
}
.seat-count strong {
  color: var(--paper-dim);
  font-weight: 400;
}

/* ==========================================================================
   Resource rows
   ========================================================================== */

.resource-list {
  border-top: 1px solid var(--line);
}
.resource-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 20px 8px;
  border-bottom: 1px solid var(--line);
  transition: background 0.22s, padding 0.3s var(--ease);
}
.resource-row:hover {
  padding-left: 14px;
  padding-right: 14px;
  background: rgba(196, 162, 101, 0.035);
}
.file-badge {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 58px;
  border: 1px solid var(--line-strong);
  background: rgba(196, 162, 101, 0.04);
  color: var(--gold);
  font-family: var(--font-latin);
  font-size: 9px;
  letter-spacing: 0.08em;
}
.file-badge::before {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 11px;
  height: 11px;
  border-left: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: var(--bg);
}
.file-badge span {
  margin-top: 2px;
  color: var(--faint);
  font-size: 7px;
  letter-spacing: 0.12em;
}
.resource-row-main {
  min-width: 0;
}
.resource-row-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.resource-row-title h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.03em;
}
.resource-row:hover h3 {
  color: var(--gold-bright);
}
.resource-row-desc {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.resource-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 6px;
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.06em;
}
.resource-row-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.download-count {
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 9px;
  letter-spacing: 0.09em;
  white-space: nowrap;
}
.download-link {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.download-link svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}
.download-link:hover {
  color: var(--gold-bright);
}

/* ==========================================================================
   Forum preview
   ========================================================================== */

.forum-split {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 30px;
  align-items: start;
}
.topic-list {
  border-top: 1px solid var(--line);
}
.topic-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 17px 6px;
  border-bottom: 1px solid var(--line);
  transition: padding 0.25s var(--ease), background 0.2s;
}
.topic-row:hover {
  padding-left: 12px;
  padding-right: 12px;
  background: rgba(196, 162, 101, 0.035);
}
.topic-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold-dim);
  font-family: var(--font-serif);
  font-size: 12px;
}
.topic-row-main {
  min-width: 0;
}
.topic-row-title {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topic-row:hover .topic-row-title {
  color: var(--gold-bright);
}
.topic-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2px;
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.04em;
}
.topic-row-replies {
  min-width: 40px;
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 10px;
  text-align: right;
}
.topic-row-replies strong {
  display: block;
  color: var(--paper-dim);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.15;
}
.pin {
  color: var(--red-bright);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.announcement-panel {
  border: 1px solid var(--line);
  background: rgba(196, 162, 101, 0.025);
}
.announcement-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--gold);
  font-family: var(--font-latin);
  font-size: 9px;
  letter-spacing: 0.2em;
}
.announcement-item {
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.announcement-item:last-child {
  border-bottom: 0;
}
.announcement-item .tag {
  margin-bottom: 8px;
}
.announcement-item h4 {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
}
.announcement-item p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.85;
}
.announcement-item time {
  display: block;
  margin-top: 10px;
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 8px;
  letter-spacing: 0.08em;
}

/* ==========================================================================
   Page hero and breadcrumbs
   ========================================================================== */

.page-hero {
  position: relative;
  padding: 72px 0 46px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.page-hero::after {
  content: attr(data-index);
  position: absolute;
  right: 2%;
  bottom: -38px;
  color: transparent;
  -webkit-text-stroke: 1px rgba(196, 162, 101, 0.1);
  font-family: var(--font-latin);
  font-size: clamp(150px, 20vw, 260px);
  line-height: 1;
  pointer-events: none;
}
.page-hero .eyebrow {
  margin-bottom: 22px;
}
.page-hero h1 {
  position: relative;
  z-index: 1;
  font-family: var(--font-serif);
  font-size: clamp(42px, 5.5vw, 72px);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.03em;
}
.page-hero h1 span {
  color: var(--gold-dim);
}
.page-lead {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}
.page-hero-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 27px;
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 9px;
  letter-spacing: 0.14em;
}
.page-hero-meta strong {
  margin-left: 6px;
  color: var(--paper-dim);
  font-weight: 400;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 21px 0;
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.08em;
}
.breadcrumb a:hover {
  color: var(--gold);
}
.breadcrumb .sep {
  color: #4a3e32;
}
.breadcrumb .current {
  color: var(--paper-dim);
}

/* ==========================================================================
   Filters and search
   ========================================================================== */

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 32px;
}
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.chip {
  min-height: 36px;
  padding: 7px 15px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  transition: 0.2s;
}
.chip:hover {
  color: var(--paper);
  border-color: var(--line);
}
.chip.is-active {
  border-color: var(--gold-dim);
  background: rgba(196, 162, 101, 0.08);
  color: var(--gold-bright);
}
.chip span {
  margin-left: 6px;
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 8px;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  width: min(310px, 100%);
}
.search-field svg {
  position: absolute;
  left: 12px;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--faint);
  stroke-width: 1.5;
  pointer-events: none;
}
.search-field input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 37px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(244, 234, 214, 0.025);
  color: var(--paper);
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.search-field input::placeholder {
  color: var(--faint);
}
.search-field input:focus {
  border-color: var(--gold-dim);
  background: rgba(244, 234, 214, 0.045);
}

/* ==========================================================================
   Game detail
   ========================================================================== */

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 54px;
  align-items: start;
  padding-top: 43px;
}
.detail-main {
  min-width: 0;
}
.detail-titlebar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 31px;
  border-bottom: 1px solid var(--line);
}
.detail-titlebar h1 {
  font-family: var(--font-serif);
  font-size: clamp(33px, 4vw, 52px);
  font-weight: 500;
  line-height: 1.33;
  letter-spacing: -0.02em;
}
.detail-subtitle {
  margin-top: 7px;
  color: var(--gold-dim);
  font-family: var(--font-latin);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}
.detail-section {
  padding: 33px 0;
  border-bottom: 1px solid var(--line);
}
.detail-section h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  color: var(--gold);
  font-family: var(--font-latin);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.detail-section h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.prose {
  color: var(--paper-dim);
  font-size: 14px;
  line-height: 2.05;
  white-space: pre-wrap;
  word-break: break-word;
}
.prose p + p {
  margin-top: 12px;
}
.notice-box {
  padding: 20px 22px;
  border-left: 2px solid var(--red);
  background: var(--red-wash);
  color: var(--paper-dim);
  font-size: 13px;
  line-height: 1.95;
  white-space: pre-wrap;
}
.safety-box {
  padding: 20px 22px;
  border: 1px solid var(--line);
  background: rgba(196, 162, 101, 0.03);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
  white-space: pre-wrap;
}
.detail-roster {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.roster-member {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  background: rgba(196, 162, 101, 0.02);
}
.roster-member .avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}
.roster-member strong {
  display: block;
  font-size: 12px;
  font-weight: 400;
}
.roster-member span {
  display: block;
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.05em;
}
.empty-roster {
  padding: 28px;
  border: 1px dashed var(--line);
  color: var(--faint);
  font-size: 12px;
  text-align: center;
}

.dossier {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(160deg, rgba(196, 162, 101, 0.07), transparent 32%),
    var(--panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}
.dossier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 21px;
  border-bottom: 1px solid var(--line);
}
.dossier-head span:first-child {
  color: var(--gold);
  font-family: var(--font-latin);
  font-size: 9px;
  letter-spacing: 0.22em;
}
.dossier-seal {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--font-latin);
  font-size: 8px;
}
.dossier-body {
  padding: 23px 21px;
}
.dossier-seats {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.dossier-seats strong {
  font-family: var(--font-latin);
  font-size: 48px;
  font-weight: 400;
  line-height: 1;
}
.dossier-seats span {
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.05em;
}
.dossier-seat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-top: 15px;
}
.dossier-seat-grid i {
  height: 5px;
  background: #372c23;
}
.dossier-seat-grid i.on {
  background: var(--gold);
}
.dossier-seat-grid i.pending {
  background: var(--red);
  opacity: 0.6;
}
.dossier-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 4px;
}
.dossier-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.dossier-item dt {
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.06em;
}
.dossier-item dd {
  margin: 0;
  color: var(--paper-dim);
  font-size: 11px;
  line-height: 1.65;
  text-align: right;
}
.dossier-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 21px;
}
.dossier-note {
  margin-top: 14px;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.75;
  text-align: center;
}
.application-box {
  margin-top: 20px;
  padding: 14px;
  border: 1px solid rgba(196, 162, 101, 0.28);
  background: rgba(196, 162, 101, 0.05);
  font-size: 11px;
  line-height: 1.8;
}
.application-box strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
}
.application-box p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

/* Management */

.manage-panel {
  margin-top: 34px;
  border: 1px solid var(--line);
  background: rgba(196, 162, 101, 0.025);
}
.manage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}
.manage-head h3 {
  color: var(--gold);
  font-family: var(--font-latin);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
}
.application-list {
  padding: 0 18px;
}
.application-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.application-item:last-child {
  border-bottom: 0;
}
.application-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}
.application-person {
  display: flex;
  align-items: center;
  gap: 10px;
}
.application-person strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
.application-person span {
  display: block;
  color: var(--faint);
  font-size: 9px;
}
.application-message {
  margin-top: 8px;
  padding-left: 38px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  white-space: pre-wrap;
}
.application-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-left: 38px;
}

/* ==========================================================================
   Forms and modal
   ========================================================================== */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px 20px;
}
.form-grid .field.full {
  grid-column: 1 / -1;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.field label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--paper-dim);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.field label em {
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.12em;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(244, 234, 214, 0.025);
  color: var(--paper);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.field input,
.field select {
  height: 43px;
  padding: 0 12px;
}
.field textarea {
  min-height: 120px;
  padding: 11px 12px;
  line-height: 1.8;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--faint);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--gold-dim);
  background: rgba(244, 234, 214, 0.045);
}
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold-dim) 50%),
    linear-gradient(135deg, var(--gold-dim) 50%, transparent 50%);
  background-position: calc(100% - 16px) 19px, calc(100% - 11px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.field select option {
  background: #1b1613;
}
.field .hint {
  color: var(--faint);
  font-size: 10px;
  line-height: 1.7;
}
.form-error {
  padding: 10px 12px;
  border-left: 2px solid var(--red-bright);
  background: var(--red-wash);
  color: #e1a3a7;
  font-size: 11px;
  line-height: 1.7;
}
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}
.form-note {
  margin-right: auto;
  color: var(--faint);
  font-size: 10px;
}

.modal {
  width: min(620px, calc(100% - 32px));
  max-height: calc(100vh - 60px);
  padding: 0;
  border: 1px solid var(--line-strong);
  background: #191410;
  color: var(--paper);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
}
.modal::backdrop {
  background: rgba(8, 6, 5, 0.78);
  backdrop-filter: blur(4px);
}
.modal-inner {
  position: relative;
  padding: 35px 36px 32px;
  overflow-y: auto;
  max-height: calc(100vh - 60px);
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 33px;
  height: 33px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-latin);
  font-size: 25px;
  font-weight: 300;
  line-height: 1;
}
.modal-close:hover {
  color: var(--gold-bright);
}
.modal h2 {
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 500;
  line-height: 1.4;
}
.modal .modal-lead {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.modal .form-grid {
  margin-top: 25px;
}

/* ==========================================================================
   Resources page
   ========================================================================== */

.archive-layout {
  padding-top: 34px;
}
.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.archive-card {
  display: flex;
  gap: 19px;
  padding: 21px;
  border: 1px solid var(--line);
  background: rgba(196, 162, 101, 0.025);
  transition: border-color 0.25s, background 0.25s, transform 0.3s var(--ease);
}
.archive-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  background: rgba(196, 162, 101, 0.055);
}
.archive-card .file-badge {
  flex-shrink: 0;
}
.archive-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.archive-card h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.55;
}
.archive-card:hover h3 {
  color: var(--gold-bright);
}
.archive-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}
.archive-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: auto;
  padding-top: 13px;
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.05em;
}
.archive-meta strong {
  color: var(--paper-dim);
  font-weight: 400;
}
.archive-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}
.archive-footer .download-link {
  font-size: 10px;
}

.file-upload-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 112px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  background: rgba(196, 162, 101, 0.025);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.file-upload-zone:hover,
.file-upload-zone.has-file {
  border-color: var(--gold);
  background: rgba(196, 162, 101, 0.06);
}
.file-upload-zone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.file-upload-zone strong {
  display: block;
  margin-bottom: 4px;
  color: var(--paper-dim);
  font-weight: 400;
}
.file-upload-zone span {
  color: var(--faint);
  font-size: 9px;
}

/* ==========================================================================
   Forum page
   ========================================================================== */

.forum-layout {
  padding-top: 36px;
}
.forum-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.forum-content {
  min-width: 0;
}
.forum-rail {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding-top: 4px;
}
.forum-rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--gold-dim);
}
.forum-rail-head span {
  color: var(--gold);
  font-family: var(--font-latin);
  font-size: 10px;
  letter-spacing: 0.14em;
}
.forum-rail-head em {
  color: var(--faint);
  font-family: var(--font-sans);
  font-size: 9px;
  font-style: normal;
}
.forum-rail-nav {
  display: grid;
}
.forum-rail-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 14px 9px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  transition: 0.22s;
}
.forum-rail-link > span {
  display: grid;
  gap: 4px;
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.35;
}
.forum-rail-link i {
  color: var(--red-bright);
  font-family: var(--font-latin);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.12em;
}
.forum-rail-link small {
  display: none;
  color: var(--faint);
  font-family: var(--font-sans);
  font-size: 10px;
  line-height: 1.6;
}
.forum-rail-link em {
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 10px;
  font-style: normal;
}
.forum-rail-link:hover {
  border-color: var(--line-strong);
  color: var(--paper);
  background: rgba(196, 162, 101, 0.035);
}
.forum-rail-link.is-active {
  color: var(--gold-bright);
  border-left: 2px solid var(--gold);
  padding-left: 12px;
  background: linear-gradient(90deg, rgba(196, 162, 101, 0.1), transparent);
}
.forum-rail-link.is-active small {
  color: var(--muted);
}
.forum-rail-mobile {
  display: none;
}
.forum-rail-mobile > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  color: var(--gold-bright);
  font-family: var(--font-serif);
  font-size: 15px;
  cursor: pointer;
  list-style: none;
}
.forum-rail-mobile > summary::-webkit-details-marker {
  display: none;
}
.forum-rail-mobile > summary span {
  color: var(--faint);
  font-family: var(--font-sans);
  font-size: 10px;
}
.forum-rail-mobile > summary::after {
  content: "+";
  margin-left: auto;
  color: var(--gold);
  font-family: var(--font-latin);
  font-size: 15px;
}
.forum-rail-mobile[open] > summary::after {
  content: "−";
}
.forum-rail-mobile .forum-rail-head {
  margin-top: 16px;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 44px;
}
.category-card {
  display: flex;
  flex-direction: column;
  min-height: 142px;
  padding: 18px 17px;
  border: 1px solid var(--line);
  background: rgba(196, 162, 101, 0.02);
  transition: 0.25s;
}
.category-card:hover {
  border-color: var(--line-strong);
  background: rgba(196, 162, 101, 0.05);
  transform: translateY(-3px);
}
.category-index {
  color: var(--red-bright);
  font-family: var(--font-latin);
  font-size: 9px;
  letter-spacing: 0.14em;
}
.category-card h3 {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.45;
}
.category-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.7;
}
.category-counts {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  color: var(--muted);
  font-family: var(--font-latin);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.forum-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 38px;
  align-items: start;
}
.forum-aside {
  position: sticky;
  top: calc(var(--header-h) + 23px);
}
.aside-block {
  border-top: 1px solid var(--gold-dim);
  padding-top: 15px;
  margin-bottom: 30px;
}
.aside-block h3 {
  color: var(--gold);
  font-family: var(--font-latin);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
}
.aside-block p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
}

/* Topic detail */

.topic-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 48px;
  align-items: start;
  padding-top: 38px;
}
.topic-header {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.topic-header h1 {
  margin-top: 13px;
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.01em;
}
.topic-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
  margin-top: 17px;
  color: var(--faint);
  font-size: 10px;
}
.topic-byline strong {
  color: var(--paper-dim);
  font-weight: 400;
}
.post {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 25px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}
.post-author {
  padding-right: 15px;
  border-right: 1px solid var(--line);
}
.post-author .avatar {
  width: 38px;
  height: 38px;
  margin-bottom: 11px;
}
.post-author strong {
  display: block;
  font-size: 12px;
  font-weight: 400;
}
.post-author span {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 8px;
  letter-spacing: 0.05em;
}
.post-author em {
  display: inline-block;
  margin-top: 9px;
  padding: 2px 5px;
  border: 1px solid var(--line);
  color: var(--gold-dim);
  font-size: 8px;
  font-style: normal;
}
.post-content {
  min-width: 0;
}
.post-body {
  color: var(--paper-dim);
  font-size: 14px;
  line-height: 2.05;
  white-space: pre-wrap;
  word-break: break-word;
}
.post-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 8px;
  letter-spacing: 0.06em;
}
.reply-divider {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-top: 30px;
  color: var(--gold-dim);
  font-family: var(--font-latin);
  font-size: 9px;
  letter-spacing: 0.2em;
}
.reply-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.reply-form {
  margin-top: 26px;
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(196, 162, 101, 0.025);
}
.reply-form h3 {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 13px;
}
.reply-form textarea {
  min-height: 110px;
}
.reply-login {
  margin-top: 26px;
  padding: 22px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* ==========================================================================
   Auth
   ========================================================================== */

.auth-page {
  display: grid;
  grid-template-columns: 1fr 470px;
  min-height: calc(100vh - var(--header-h));
}
.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 65px 55px 50px;
  border-right: 1px solid var(--line);
  overflow: hidden;
}
.auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 40% 45%, rgba(140, 31, 42, 0.2), transparent 50%),
    repeating-linear-gradient(90deg, transparent 0, transparent 99px, rgba(196, 162, 101, 0.04) 99px, rgba(196, 162, 101, 0.04) 100px);
  pointer-events: none;
}
.auth-visual > * {
  position: relative;
  z-index: 1;
}
.auth-visual h1 {
  max-width: 480px;
  font-family: var(--font-serif);
  font-size: clamp(37px, 4.4vw, 61px);
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: -0.03em;
}
.auth-visual h1 em {
  color: var(--gold);
  font-style: normal;
}
.auth-visual p {
  max-width: 410px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 2;
}
.auth-quote {
  color: var(--faint);
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 0.09em;
}
.auth-quote::before {
  content: "「";
  color: var(--gold-dim);
}
.auth-quote::after {
  content: "」";
  color: var(--gold-dim);
}
.auth-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 58px 55px;
}
.auth-form-panel .eyebrow {
  margin-bottom: 15px;
}
.auth-form-panel h2 {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 500;
}
.auth-form-panel .auth-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 17px;
  margin-top: 30px;
}
.auth-switch {
  margin-top: 25px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 11px;
  text-align: center;
}
.auth-switch a {
  color: var(--gold);
}
.auth-switch a:hover {
  color: var(--gold-bright);
}
.demo-hint {
  margin-top: 19px;
  padding: 11px 13px;
  border: 1px dashed var(--line);
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 9px;
  letter-spacing: 0.04em;
  line-height: 1.9;
}
.demo-hint strong {
  color: var(--paper-dim);
  font-weight: 400;
}

/* ==========================================================================
   Profile / admin / about
   ========================================================================== */

.profile-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 45px;
  align-items: start;
  padding-top: 40px;
}
.profile-card {
  border: 1px solid var(--line-strong);
  background: var(--panel);
}
.profile-head {
  padding: 27px 22px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.profile-head .avatar {
  width: 66px;
  height: 66px;
  margin: 0 auto 13px;
  font-size: 24px;
}
.profile-head h2 {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 500;
}
.profile-head p {
  margin-top: 3px;
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 9px;
  letter-spacing: 0.08em;
}
.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.profile-stat {
  padding: 15px 10px;
  border-right: 1px solid var(--line);
  text-align: center;
}
.profile-stat:last-child {
  border-right: 0;
}
.profile-stat strong {
  display: block;
  font-family: var(--font-latin);
  font-size: 25px;
  font-weight: 400;
}
.profile-stat span {
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.08em;
}
.profile-body {
  padding: 20px 22px;
}
.profile-bio {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
  white-space: pre-wrap;
}
.profile-join {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 8px;
  letter-spacing: 0.1em;
}
.profile-main {
  min-width: 0;
}

.panel {
  border: 1px solid var(--line);
  background: rgba(196, 162, 101, 0.02);
}
.panel + .panel {
  margin-top: 22px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
}
.panel-head span {
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 8px;
  letter-spacing: 0.14em;
}
.panel-body {
  padding: 22px;
}
.panel-empty {
  padding: 42px 20px;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 28px;
}
.dash-stat {
  padding: 17px 15px;
  border: 1px solid var(--line);
  background: rgba(196, 162, 101, 0.03);
}
.dash-stat strong {
  display: block;
  font-family: var(--font-latin);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
}
.dash-stat span {
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.ledger th {
  padding: 10px 13px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-align: left;
  white-space: nowrap;
}
.ledger td {
  padding: 13px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  vertical-align: middle;
}
.ledger tr:last-child td {
  border-bottom: 0;
}
.ledger tr:hover td {
  background: rgba(196, 162, 101, 0.03);
}
.ledger .game-name {
  color: var(--paper-dim);
  font-family: var(--font-serif);
  font-size: 13px;
}
.ledger select {
  height: 30px;
  padding: 0 6px;
  border: 1px solid var(--line);
  background: #1a1512;
  color: var(--paper-dim);
  font-size: 10px;
}
.ledger .row-actions {
  display: flex;
  gap: 6px;
}
.table-scroll {
  overflow-x: auto;
}

.pending-list {
  display: flex;
  flex-direction: column;
}
.pending-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.pending-item:last-child {
  border-bottom: 0;
}
.pending-item h4 {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
}
.pending-item p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.75;
}
.pending-item .pending-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 5px;
  color: var(--faint);
  font-size: 9px;
}
.pending-actions {
  display: flex;
  gap: 6px;
}

.admin-forms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 22px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 370px;
  gap: 55px;
  padding-top: 40px;
}
.about-body h2 {
  margin-top: 38px;
  margin-bottom: 13px;
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 500;
}
.about-body h2:first-child {
  margin-top: 0;
}
.about-body p {
  margin-bottom: 13px;
  color: var(--paper-dim);
  font-size: 13px;
  line-height: 2.05;
}
.about-body ul {
  margin-top: 12px;
}
.about-body li {
  position: relative;
  padding: 6px 0 6px 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}
.about-body li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--gold-dim);
}
.about-side {
  border-top: 1px solid var(--gold-dim);
  padding-top: 18px;
}
.about-side h3 {
  color: var(--gold);
  font-family: var(--font-latin);
  font-size: 9px;
  letter-spacing: 0.2em;
}
.about-side dl {
  margin: 15px 0 0;
}
.about-side dt {
  margin-top: 15px;
  color: var(--paper-dim);
  font-size: 11px;
}
.about-side dd {
  margin: 3px 0 0;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.8;
}
.tech-list {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* ==========================================================================
   Search dialog, toast, states
   ========================================================================== */

.search-dialog {
  width: min(720px, calc(100% - 32px));
  margin-top: 13vh;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: #191410;
  color: var(--paper);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.75);
}
.search-dialog::backdrop {
  background: rgba(8, 6, 5, 0.8);
  backdrop-filter: blur(5px);
}
.search-box {
  padding: 0;
}
.search-head {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}
.search-head svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.5;
}
.search-head input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--paper);
  font-size: 15px;
  outline: none;
}
.search-head input::placeholder {
  color: var(--faint);
}
.search-head kbd {
  padding: 2px 5px;
  border: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 8px;
  letter-spacing: 0.08em;
}
.search-results {
  max-height: 55vh;
  padding: 10px;
  overflow-y: auto;
}
.search-hint {
  padding: 25px 15px;
  color: var(--faint);
  font-size: 11px;
  text-align: center;
}
.search-group-title {
  padding: 10px 12px 5px;
  color: var(--gold-dim);
  font-family: var(--font-latin);
  font-size: 8px;
  letter-spacing: 0.2em;
}
.search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid transparent;
}
.search-result:hover {
  border-color: var(--line);
  background: rgba(196, 162, 101, 0.05);
}
.search-result strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 400;
}
.search-result span {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 9px;
}
.search-result em {
  color: var(--gold-dim);
  font-family: var(--font-latin);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.toast-root {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(370px, calc(100% - 48px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid var(--line-strong);
  background: #1c1612;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  color: var(--paper-dim);
  font-size: 11px;
  line-height: 1.75;
  animation: toast-in 0.35s var(--ease) both;
  pointer-events: auto;
}
.toast::before {
  content: "";
  width: 2px;
  flex-shrink: 0;
  align-self: stretch;
  background: var(--gold);
}
.toast.error::before {
  background: var(--red-bright);
}
.toast.is-leaving {
  animation: toast-out 0.3s ease forwards;
}

.boot-screen {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--faint);
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 0.14em;
}
.boot-sigil {
  width: 42px;
  height: 42px;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  border-top-color: transparent;
  animation: orbit 1.2s linear infinite;
}

.page-loading {
  min-height: 55vh;
  display: grid;
  place-items: center;
}
.page-loading .boot-sigil {
  width: 34px;
  height: 34px;
}

.empty-state {
  padding: 65px 25px;
  border: 1px dashed var(--line);
  color: var(--faint);
  text-align: center;
}
.empty-state strong {
  display: block;
  margin-bottom: 7px;
  color: var(--paper-dim);
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
}
.empty-state p {
  font-size: 11px;
}

.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  max-width: 620px;
  margin-inline: auto;
  padding: 40px 0;
}
.error-page .error-code {
  color: var(--red-bright);
  font-family: var(--font-latin);
  font-size: 13px;
  letter-spacing: 0.25em;
}
.error-page h1 {
  margin-top: 13px;
  font-family: var(--font-serif);
  font-size: 44px;
  font-weight: 500;
}
.error-page p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}
.error-page .btn {
  margin-top: 25px;
}

.spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 1px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: orbit 0.7s linear infinite;
  vertical-align: -2px;
}

/* ==========================================================================
   Home extras, auth extras and small layout helpers
   ========================================================================== */

.announcement-strip {
  border-bottom: 1px solid var(--line);
  background: rgba(140, 31, 42, 0.08);
}
.announcement-strip .container {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 43px;
}
.strip-label {
  flex-shrink: 0;
  padding: 3px 8px;
  border: 1px solid rgba(178, 58, 68, 0.55);
  color: #d37e84;
  font-family: var(--font-latin);
  font-size: 7px;
  letter-spacing: 0.22em;
}
.strip-text {
  flex: 1;
  overflow: hidden;
  color: var(--paper-dim);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.strip-date {
  flex-shrink: 0;
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.page-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.cta-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: center;
  padding: 48px 52px;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 78% 30%, rgba(140, 31, 42, 0.22), transparent 48%),
    linear-gradient(135deg, #1c1612, #15110e);
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(196, 162, 101, 0.09);
  pointer-events: none;
}
.cta-band-copy {
  position: relative;
  z-index: 1;
  max-width: 590px;
}
.cta-band-copy .eyebrow {
  margin-bottom: 14px;
}
.cta-band h2 {
  font-family: var(--font-serif);
  font-size: clamp(29px, 3.6vw, 45px);
  font-weight: 500;
  line-height: 1.3;
}
.cta-band-copy > p:last-child {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}
.cta-band-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cta-band-actions .btn {
  min-width: 218px;
  justify-content: center;
}
.cta-band-number {
  position: absolute;
  right: 24px;
  bottom: -52px;
  color: transparent;
  -webkit-text-stroke: 1px rgba(196, 162, 101, 0.12);
  font-family: var(--font-serif);
  font-size: 220px;
  line-height: 1;
  pointer-events: none;
}

.auth-seal {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 40px;
  box-shadow:
    inset 0 0 0 6px #15110e,
    inset 0 0 0 7px rgba(196, 162, 101, 0.22);
}
.auth-seal + .auth-quote {
  margin-top: 18px;
}
.auth-view .site-footer {
  display: none;
}

.filter-result-note {
  margin: -16px 0 28px;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.03em;
}
.filter-result-note .link-arrow {
  margin-left: 12px;
}

.archive-footnote {
  margin-top: 38px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 10px;
  line-height: 1.9;
}

.form-panel {
  border: 1px solid var(--line-strong);
  background: var(--panel);
}
.form-panel .panel-body {
  padding: 28px;
}
.form-panel .panel-head {
  padding: 20px 28px;
}

.category-card.is-active {
  border-color: var(--gold-dim);
  background: linear-gradient(150deg, rgba(196, 162, 101, 0.09), rgba(196, 162, 101, 0.015));
}
.category-card.is-active h3 {
  color: var(--gold-bright);
}

@media (max-width: 960px) {
  .cta-band {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 38px 32px;
  }
  .cta-band-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .cta-band-actions .btn {
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .forum-rail-mobile .forum-rail-nav {
    grid-template-columns: 1fr;
  }
  .forum-rail-mobile .forum-rail-link {
    border-right: 0;
  }
  .forum-rail-link small {
    display: block;
  }
  .announcement-strip .container {
    gap: 12px;
  }
  .strip-date {
    display: none;
  }
  .cta-band {
    padding: 30px 24px;
  }
  .cta-band-number {
    font-size: 150px;
    right: -10px;
  }
}

.official-mark {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid rgba(196, 162, 101, 0.5);
  background: rgba(196, 162, 101, 0.1);
  color: var(--gold-bright);
  font-family: var(--font-sans);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.12em;
  line-height: 1.2;
  white-space: nowrap;
  vertical-align: middle;
}
.official-mark::before {
  content: "✦";
  font-size: 8px;
}
.official-mark.large {
  padding: 4px 9px;
  font-size: 10px;
  letter-spacing: 0.16em;
}
.detail-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.param-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.param-item {
  padding: 15px 17px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(196, 162, 101, 0.025);
}
.param-item span {
  display: block;
  margin-bottom: 7px;
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 9px;
  letter-spacing: 0.14em;
}
.param-item strong {
  color: var(--paper);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}
.applicant-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.applicant-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: rgba(196, 162, 101, 0.035);
  color: var(--paper-dim);
  font-size: 12px;
}
.applicant-chip .avatar {
  width: 24px;
  height: 24px;
  font-size: 10px;
}
.applicant-chip em {
  color: var(--gold);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.08em;
}
.applicant-chip.pending em {
  color: var(--faint);
}
.heading-count {
  margin-left: 2px;
  color: var(--faint);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
}
.section-hint {
  margin: -5px 0 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}
.dashboard-stats {
  grid-template-columns: repeat(6, 1fr);
}
.check-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.check-grid.class-grid {
  grid-template-columns: repeat(5, 1fr);
}
.check-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.check-option:hover {
  border-color: var(--line-strong);
}
.check-option:has(input:checked) {
  border-color: rgba(196, 162, 101, 0.48);
  background: rgba(196, 162, 101, 0.055);
}
.check-option input {
  width: 13px;
  height: 13px;
  accent-color: var(--gold);
}
.check-option span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.check-option b {
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 500;
}
.check-option em {
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 7px;
  font-style: normal;
  letter-spacing: 0.1em;
}
.exam-panel .panel-body {
  padding-top: 18px;
}
.exam-section {
  border-top: 1px solid var(--line);
}
.exam-section:first-of-type {
  border-top: 0;
}
.exam-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 17px;
  cursor: pointer;
  list-style: none;
}
.exam-section summary::-webkit-details-marker {
  display: none;
}
.exam-section summary::before {
  content: "+";
  margin-right: 10px;
  color: var(--gold-dim);
  font-family: var(--font-latin);
  font-size: 12px;
}
.exam-section[open] summary::before {
  content: "−";
}
.exam-section summary span {
  flex: 1;
}
.exam-section summary em {
  color: var(--faint);
  font-family: var(--font-sans);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.08em;
}
.exam-questions {
  display: grid;
  gap: 16px;
  padding: 0 0 22px 22px;
}
.exam-question {
  display: grid;
  gap: 8px;
}
.exam-question > span {
  color: #d9cdb9;
  font-size: 14px;
  line-height: 1.85;
}
.exam-question b {
  color: var(--gold);
  font-weight: 500;
}
.exam-question textarea {
  min-height: 82px;
  color: var(--paper);
  font-size: 13px;
}
.exam-answer-readonly {
  margin: 0;
  padding: 10px 12px;
  border-left: 1px solid var(--line-strong);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.75;
  white-space: pre-wrap;
}
.gm-answer-list {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}
.gm-answer-list > div {
  padding: 8px 10px;
  border-left: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.012);
}
.gm-answer-list span {
  color: var(--gold-dim);
  font-size: 9px;
  letter-spacing: 0.06em;
}
.gm-answer-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-wrap;
}

/* Play-style banner, recruitment brief and GM assessment */
.style-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 26px 0 0;
  padding: 24px 26px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 85% 20%, rgba(140, 31, 42, 0.22), transparent 46%),
    linear-gradient(120deg, rgba(196, 162, 101, 0.07), transparent 55%),
    var(--panel);
  overflow: hidden;
}
.style-banner::after {
  content: "Ⅶ";
  position: absolute;
  right: 25px;
  bottom: -24px;
  color: rgba(196, 162, 101, 0.06);
  font-family: var(--font-serif);
  font-size: 120px;
  line-height: 1;
}
.style-banner-mark {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(196, 162, 101, 0.45);
  border-radius: 50%;
  color: var(--gold-bright);
  font-family: var(--font-serif);
  font-size: 27px;
  box-shadow: inset 0 0 0 5px rgba(196, 162, 101, 0.04);
}
.style-banner-copy span {
  display: block;
  color: var(--gold-dim);
  font-family: var(--font-latin);
  font-size: 8px;
  letter-spacing: 0.22em;
}
.style-banner-copy strong {
  display: block;
  margin-top: 6px;
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 500;
}
.style-banner-copy strong em {
  margin-left: 6px;
  color: var(--gold-dim);
  font-family: var(--font-latin);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.14em;
}
.style-banner-copy p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}
.style-banner-rule {
  width: 70px;
  height: 1px;
  margin-left: auto;
  background: linear-gradient(90deg, transparent, var(--gold-dim));
  flex: 0 0 auto;
}
.style-banner.style-competitive { border-left: 2px solid var(--red-bright); }
.style-banner.style-narrative { border-left: 2px solid var(--gold); }
.style-banner.style-story { border-left: 2px solid #7c6650; }
.style-banner.style-social { border-left: 2px solid #6d7a6a; }

.brief-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.brief-grid > div {
  padding: 13px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.brief-grid span {
  display: block;
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 8px;
  letter-spacing: 0.16em;
}
.brief-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--paper-dim);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  word-break: break-word;
}
.qq-group-link {
  color: var(--gold-bright);
  text-decoration: none;
  border-bottom: 1px solid rgba(196, 162, 101, 0.35);
  transition: border-color 160ms ease, color 160ms ease;
}
.qq-group-link:hover {
  color: var(--paper);
  border-bottom-color: var(--gold);
}
.qq-group-link span {
  display: inline;
  margin-left: 4px;
  color: var(--gold);
  font-family: var(--font-latin);
  font-size: 8px;
  letter-spacing: 0.08em;
}
.recruit-box {
  margin-top: 18px;
  border: 1px dashed rgba(196, 162, 101, 0.26);
  background: rgba(0, 0, 0, 0.16);
}
.recruit-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 15px;
  border-bottom: 1px solid var(--line);
  color: var(--gold-dim);
  font-family: var(--font-latin);
  font-size: 8px;
  letter-spacing: 0.18em;
}
.recruit-template {
  margin: 0;
  padding: 18px 20px;
  max-height: 280px;
  overflow: auto;
  color: var(--paper-dim);
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1.95;
  white-space: pre-wrap;
  word-break: break-word;
}

.gm-flow-panel,
.gm-status-panel {
  margin-bottom: 22px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.gm-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.gm-flow-step {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 19px 16px 21px;
  border-right: 1px solid var(--line);
}
.gm-flow-step:last-child { border-right: 0; }
.gm-flow-step::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 2px;
  background: transparent;
}
.gm-flow-step.is-done::after { background: var(--gold-dim); }
.gm-flow-step.is-current { background: rgba(196, 162, 101, 0.045); }
.gm-flow-step.is-current::after { background: var(--red-bright); }
.gm-flow-index {
  color: var(--gold-dim);
  font-family: var(--font-latin);
  font-size: 9px;
  letter-spacing: 0.08em;
}
.gm-flow-step strong {
  display: block;
  color: var(--paper-dim);
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
}
.gm-flow-step strong em {
  display: block;
  margin-top: 3px;
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 7px;
  font-style: normal;
  letter-spacing: 0.12em;
}
.gm-flow-step p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}
.gm-status-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 24px 26px;
  border-bottom: 1px solid var(--line);
}
.gm-status-head h2 {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: 29px;
  font-weight: 500;
}
.gm-stage {
  margin-left: 8px;
  color: var(--gold-dim);
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.gm-status-pill {
  display: inline-block;
  padding: 4px 9px;
  border: 1px solid rgba(196, 162, 101, 0.4);
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.gm-status-pill.passed { border-color: rgba(109, 143, 104, 0.55); color: #9db993; }
.gm-status-pill.failed { border-color: rgba(178, 58, 68, 0.5); color: var(--red-bright); }
.gm-status-pill.submitted,
.gm-status-pill.applied,
.gm-status-pill.first,
.gm-status-pill.second,
.gm-status-pill.prep,
.gm-status-pill.third { border-color: rgba(196, 162, 101, 0.32); color: var(--gold-bright); }
.gm-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}
.gm-meta-grid > div {
  padding: 14px 20px;
  border-right: 1px solid var(--line);
}
.gm-meta-grid > div:last-child { border-right: 0; }
.gm-meta-grid span,
.gm-application-copy span {
  display: block;
  color: var(--faint);
  font-family: var(--font-latin);
  font-size: 8px;
  letter-spacing: 0.13em;
}
.gm-meta-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--paper-dim);
  font-size: 12px;
  font-weight: 500;
}
.gm-application-copy {
  padding: 18px 26px;
  border-bottom: 1px solid var(--line);
}
.gm-application-copy > div + div { margin-top: 15px; }
.gm-application-copy strong {
  display: block;
  margin-top: 5px;
  color: var(--paper-dim);
  font-size: 13px;
  font-weight: 500;
}
.gm-application-copy p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
}
.gm-status-panel > .btn {
  margin: 16px 26px 22px;
}
.gm-note {
  padding: 16px 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(140, 31, 42, 0.06);
}
.gm-note span {
  color: var(--red-bright);
  font-family: var(--font-latin);
  font-size: 8px;
  letter-spacing: 0.14em;
}
.gm-note p { margin-top: 5px; color: var(--paper-dim); font-size: 12px; line-height: 1.8; }
.gm-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}
.gm-timeline li {
  position: relative;
  padding: 0 0 18px 22px;
  border-left: 1px solid var(--line);
}
.gm-timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.gm-timeline li::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-dim);
}
.gm-timeline span { color: var(--faint); font-size: 9px; letter-spacing: 0.06em; }
.gm-timeline strong { display: block; margin-top: 4px; color: var(--paper-dim); font-size: 12px; font-weight: 500; }
.gm-timeline p { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.gm-apply-panel .panel-body { padding-top: 22px; }
.gm-admin-table { min-width: 820px; }
.gm-admin-table td { vertical-align: top; }
.gm-admin-detail { margin-top: 8px; max-width: 300px; }
.gm-admin-detail summary {
  color: var(--gold-dim);
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.06em;
}
.gm-admin-detail p { margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.gm-admin-actions { min-width: 150px; }
.gm-admin-actions .btn { margin: 0 4px 6px 0; }
.gm-admin-table select { min-width: 120px; }
.qq-group-link { color: var(--gold-bright); text-decoration: none; border-bottom: 1px solid rgba(196, 162, 101, .25); }
.qq-group-link:hover { color: var(--paper); border-bottom-color: var(--gold); }
.qq-group-link span { margin-left: 5px; color: var(--gold-dim); font-family: var(--font-latin); font-size: 8px; letter-spacing: .1em; white-space: nowrap; }

.survey-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
  align-items: start;
}
.survey-main > .panel + .panel { margin-top: 22px; }
.survey-aside > .panel + .panel { margin-top: 22px; }
.survey-state .panel-body { padding-top: 20px; }
.survey-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .12);
}
.survey-meta > div { padding: 13px 16px; border-right: 1px solid var(--line); }
.survey-meta > div:last-child { border-right: 0; }
.survey-meta span { display: block; color: var(--faint); font-family: var(--font-latin); font-size: 8px; letter-spacing: .12em; }
.survey-meta strong { display: block; margin-top: 5px; color: var(--paper-dim); font-size: 12px; font-weight: 500; }
.survey-badge {
  display: inline-block;
  padding: 4px 9px;
  border: 1px solid rgba(196, 162, 101, .38);
  color: var(--gold-bright);
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .08em;
}
.survey-badge.submitted { border-color: rgba(224, 196, 140, .55); }
.survey-badge.open { border-color: rgba(109, 143, 104, .6); color: #a9c49f; }
.survey-badge.closed { border-color: rgba(148, 134, 114, .4); color: var(--muted); }
.survey-badge.rejected { border-color: rgba(178, 58, 68, .5); color: var(--red-bright); }
.survey-note { margin-top: 16px; padding: 12px 14px; border-left: 2px solid var(--gold-dim); background: rgba(196, 162, 101, .05); color: var(--muted); font-size: 12px; line-height: 1.8; }
.survey-stat-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); }
.survey-stat-grid > div { padding: 15px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.survey-stat-grid > div:nth-child(2n) { border-right: 0; }
.survey-stat-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
.survey-stat-grid span { display: block; color: var(--faint); font-size: 9px; letter-spacing: .08em; }
.survey-stat-grid strong { display: block; margin-top: 4px; color: var(--paper); font-family: var(--font-serif); font-size: 26px; font-weight: 400; }
.survey-stat-grid em { display: block; margin-top: 2px; color: var(--faint); font-family: var(--font-latin); font-size: 7px; font-style: normal; letter-spacing: .1em; }
.survey-formula { margin-top: 14px; color: var(--faint); font-size: 9px; line-height: 1.8; }
.survey-result {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-top: 14px; padding: 13px 15px; border: 1px solid var(--line);
}
.survey-result span { font-size: 11px; color: var(--muted); }
.survey-result strong { color: var(--paper); font-family: var(--font-serif); font-size: 22px; font-weight: 400; }
.survey-result strong em { color: var(--faint); font-family: var(--font-sans); font-size: 10px; font-style: normal; }
.survey-result.passed { border-color: rgba(109, 143, 104, .45); }
.survey-result.passed span { color: #a9c49f; }
.survey-result.failed { border-color: rgba(178, 58, 68, .45); }
.survey-result.failed span { color: var(--red-bright); }
.survey-questions { display: grid; gap: 16px; margin-bottom: 22px; }
.survey-question {
  margin: 0;
  padding: 18px 18px 15px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .12);
}
.survey-question legend { padding: 0 6px; color: var(--paper-dim); font-family: var(--font-serif); font-size: 14px; line-height: 1.6; }
.survey-question legend b { color: var(--gold); font-family: var(--font-latin); font-size: 11px; font-weight: 400; }
.survey-prompt { margin: 3px 0 12px; color: var(--faint); font-size: 10px; line-height: 1.7; }
.survey-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.survey-option {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 9px 4px 8px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color .18s, background .18s;
}
.survey-option input { position: absolute; opacity: 0; pointer-events: none; }
.survey-option span { color: var(--paper-dim); font-family: var(--font-serif); font-size: 16px; }
.survey-option em { color: var(--faint); font-size: 8px; font-style: normal; }
.survey-option:hover { border-color: var(--gold-dim); }
.survey-option:has(input:checked) { border-color: var(--gold); background: rgba(196, 162, 101, .1); }
.survey-option:has(input:checked) span { color: var(--gold-bright); }
.survey-option:has(input:checked) em { color: var(--paper-dim); }
.survey-my-total { display: flex; align-items: baseline; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.survey-my-total span { color: var(--faint); font-size: 10px; letter-spacing: .1em; }
.survey-my-total strong { color: var(--gold-bright); font-family: var(--font-serif); font-size: 40px; font-weight: 400; }
.survey-my-total em { color: var(--faint); font-size: 11px; font-style: normal; }
.survey-answer-list { margin: 16px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.survey-answer-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.survey-answer-list span { color: var(--muted); font-size: 11px; }
.survey-answer-list strong { color: var(--paper-dim); font-size: 12px; font-weight: 500; white-space: nowrap; }
.survey-answer-list strong em { color: var(--faint); font-size: 9px; font-style: normal; }
.survey-feedback { margin-top: 16px; padding: 12px 14px; border-left: 2px solid var(--line-strong); color: var(--muted); font-size: 12px; line-height: 1.8; white-space: pre-wrap; }
.survey-rules p { color: var(--muted); font-size: 11px; line-height: 1.8; }
.survey-rules p + p { margin-top: 9px; }
.survey-entry-row { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.survey-entry-row .section-hint { margin: 5px 0 0; }
.jury-score-field { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.jury-score-field input { width: 56px; height: 26px; padding: 2px 5px; font-size: 10px; }
.jury-score-field .btn { margin: 0; }

@media (max-width: 1100px) {
  .survey-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
  .survey-meta { grid-template-columns: repeat(2, 1fr); }
  .survey-meta > div:nth-child(2n) { border-right: 0; }
}

@media (max-width: 820px) {
  .survey-layout { grid-template-columns: 1fr; }
  .survey-aside { order: 2; }
  .survey-options { grid-template-columns: repeat(2, 1fr); }
  .survey-meta { grid-template-columns: 1fr 1fr; }
  .survey-entry-row { flex-direction: column; align-items: flex-start; }
}


.conduct-section { margin-bottom: 38px; }
.conduct-list {
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.conduct-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.conduct-index {
  padding: 20px 0 0 20px;
  color: var(--gold-dim);
  font-family: var(--font-latin);
  font-size: 10px;
  letter-spacing: 0.1em;
  border-right: 1px solid var(--line);
}
.conduct-item > div { padding: 18px 24px 20px; }
.conduct-item h3 {
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
}
.conduct-item p { margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.85; }
.conduct-list.is-good .conduct-index { color: #9db993; }
.conduct-list.is-bad .conduct-index { color: var(--red-bright); }
.conduct-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin: 10px 0 30px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(140, 31, 42, 0.13), transparent 60%), var(--panel);
}
.conduct-footer p { color: var(--paper-dim); font-family: var(--font-serif); font-size: 16px; }
.footer-meta a { color: var(--gold-dim); transition: color 0.2s; }
.footer-meta a:hover { color: var(--gold-bright); }

@media (max-width: 1100px) {
  .gm-flow { grid-template-columns: repeat(3, 1fr); }
  .gm-flow-step:nth-child(3) { border-right: 0; }
  .gm-meta-grid { grid-template-columns: repeat(2, 1fr); }
  .gm-meta-grid > div:nth-child(2) { border-right: 0; }
  .brief-grid { grid-template-columns: repeat(2, 1fr); }
  .check-grid,
  .check-grid.class-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .style-banner { gap: 14px; padding: 18px; }
  .style-banner-mark { flex-basis: 48px; width: 48px; height: 48px; font-size: 22px; }
  .style-banner-copy strong { font-size: 18px; }
  .style-banner-rule { display: none; }
  .brief-grid { grid-template-columns: 1fr; }
  .check-grid,
  .check-grid.class-grid { grid-template-columns: repeat(2, 1fr); }
  .gm-flow { grid-template-columns: 1fr; }
  .gm-flow-step { border-right: 0; border-bottom: 1px solid var(--line); }
  .gm-status-head { flex-direction: column; padding: 18px; }
  .gm-meta-grid { grid-template-columns: 1fr; }
  .gm-meta-grid > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .gm-application-copy { padding: 16px 18px; }
  .gm-status-panel > .btn { margin: 14px 18px 18px; }
  .conduct-item { grid-template-columns: 42px 1fr; }
  .conduct-index { padding: 16px 0 0 13px; }
  .conduct-item > div { padding: 15px 16px 18px; }
  .conduct-footer { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
.page-enter {
  animation: fade-in 0.4s ease both;
}
.hero-copy > * {
  animation: rise 0.75s var(--ease) both;
}
.hero-copy > *:nth-child(1) {
  animation-delay: 0.05s;
}
.hero-copy > *:nth-child(2) {
  animation-delay: 0.12s;
}
.hero-copy > *:nth-child(3) {
  animation-delay: 0.19s;
}
.hero-copy > *:nth-child(4) {
  animation-delay: 0.26s;
}
.hero-copy > *:nth-child(5) {
  animation-delay: 0.33s;
}
.sigil-stage {
  animation: fade-in 1.2s ease 0.1s both;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1180px) {
  .header-inner {
    gap: 24px;
  }
  .main-nav a {
    padding: 0 13px;
  }
  .main-nav a::after {
    left: 13px;
    right: 13px;
  }
  .brand-words strong {
    font-size: 17px;
  }
  .hero {
    min-height: 620px;
  }
  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 36px;
  }
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1100px) {
  .forum-shell {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .forum-rail {
    display: none;
  }
  .forum-rail-mobile {
    display: block;
    margin-bottom: 26px;
  }
  .forum-rail-mobile .forum-rail-nav {
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--line);
  }
  .forum-rail-mobile .forum-rail-link {
    border-right: 1px solid var(--line);
  }
}

@media (max-width: 960px) {
  :root {
    --header-h: 68px;
  }
  .main-nav {
    display: none;
  }
  .menu-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .header-inner {
    width: calc(100% - 40px);
  }
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 60px;
  }
  .hero::before {
    background: linear-gradient(180deg, transparent 92%, var(--line) 92%);
  }
  .hero-copy {
    max-width: 680px;
  }
  .sigil-stage {
    min-height: 430px;
    margin-top: 20px;
  }
  .grail-sigil {
    width: min(65vw, 430px);
  }
  .sigil-stage::before {
    width: min(62vw, 430px);
    height: min(62vw, 430px);
  }
  .sigil-caption {
    right: 8vw;
    bottom: 40px;
  }
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .game-grid .game-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    min-height: 330px;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  .footer-meta {
    grid-column: 1 / -1;
    align-items: flex-start;
    flex-direction: row;
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .dossier {
    position: static;
  }
  .forum-split {
    grid-template-columns: 1fr;
  }
  .forum-main-grid {
    grid-template-columns: 1fr;
  }
  .forum-aside {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-side {
    max-width: 500px;
  }
  .archive-grid {
    grid-template-columns: 1fr;
  }
  .auth-page {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .auth-visual {
    display: none;
  }
  .auth-form-panel {
    width: min(520px, 100%);
    margin-inline: auto;
    padding: 55px 0 20px;
  }
  .topic-detail-layout {
    grid-template-columns: 1fr;
  }
  .topic-detail-layout > aside {
    display: none;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 14px;
  }
  .container,
  .container.narrow {
    width: calc(100% - 36px);
  }
  .footer-inner {
    width: calc(100% - 36px);
    grid-template-columns: 1fr;
    padding: 34px 0;
  }
  .header-inner {
    width: calc(100% - 28px);
  }
  .brand-mark {
    width: 38px;
    height: 38px;
  }
  .brand-words strong {
    font-size: 16px;
  }
  .brand-words em {
    font-size: 7px;
  }
  .auth-links .login-link {
    display: none;
  }
  .header-actions .auth-area {
    display: none;
  }
  .user-trigger-text {
    display: none;
  }
  .user-trigger {
    padding: 3px;
    border-color: transparent;
  }
  .header-actions {
    gap: 4px;
  }
  .hero {
    padding-top: 46px;
    padding-bottom: 35px;
  }
  .hero h1 {
    font-size: clamp(39px, 11vw, 58px);
  }
  .hero-lead {
    margin-top: 23px;
    font-size: 13px;
  }
  .hero-actions .btn {
    flex: 1;
    min-width: 145px;
  }
  .hero-signature {
    margin-top: 32px;
  }
  .sigil-stage {
    min-height: 250px;
    margin-top: 8px;
  }
  .grail-sigil {
    width: 235px;
  }
  .sigil-caption {
    display: none;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stat {
    border-bottom: 1px solid var(--line);
  }
  .stat:nth-child(2) {
    border-right: 0;
  }
  .stat:nth-child(3) {
    border-left: 1px solid var(--line);
  }
  .stat:nth-child(3),
  .stat:nth-child(4) {
    border-bottom: 0;
  }
  .stat-value {
    font-size: 34px;
  }
  .section {
    padding-top: 62px;
  }
  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 26px;
  }
  .section-title-wrap {
    display: block;
    width: 100%;
  }
  .section-index {
    display: block;
    margin-bottom: 7px;
    padding-top: 0;
  }
  .section-head h2 {
    font-size: 27px;
  }
  .section-index {
    padding-top: 6px;
  }
  .section-link {
    margin-left: 0;
  }
  .game-grid,
  .game-grid.two {
    grid-template-columns: 1fr;
  }
  .game-card {
    min-height: 340px;
  }
  .game-grid .game-card:last-child:nth-child(odd) {
    grid-column: auto;
  }
  .resource-row {
    grid-template-columns: 45px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
  }
  .file-badge {
    width: 42px;
    height: 51px;
  }
  .resource-row-actions {
    grid-column: 2;
    justify-content: space-between;
    margin-top: -5px;
  }
  .resource-row-desc {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .forum-aside {
    grid-template-columns: 1fr;
  }
  .page-hero {
    padding: 48px 0 34px;
  }
  .page-hero h1 {
    font-size: 40px;
  }
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }
  .chip-group {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }
  .chip {
    flex-shrink: 0;
  }
  .search-field {
    width: 100%;
  }
  .detail-layout {
    padding-top: 27px;
  }
  .detail-titlebar h1 {
    font-size: 32px;
  }
  .detail-roster {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .field.full {
    grid-column: auto;
  }
  .form-actions {
    flex-wrap: wrap;
  }
  .form-note {
    width: 100%;
    margin-bottom: 6px;
  }
  .modal-inner {
    padding: 29px 21px 24px;
  }
  .modal h2 {
    font-size: 23px;
  }
  .archive-card {
    padding: 17px;
    gap: 14px;
  }
  .category-grid {
    grid-template-columns: 1fr 1fr;
  }
  .category-card {
    min-height: 130px;
  }
  .topic-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }
  .topic-row-replies {
    display: none;
  }
  .post {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .post-author {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 0 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .post-author .avatar {
    width: 30px;
    height: 30px;
    margin: 0;
  }
  .post-author span {
    margin: 0;
  }
  .post-author em {
    margin: 0 0 0 auto;
  }
  .profile-layout {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .profile-card {
    max-width: none;
  }
  .dashboard-stats {
    grid-template-columns: 1fr 1fr;
  }
  .admin-forms {
    grid-template-columns: 1fr;
  }
  .pending-item {
    grid-template-columns: 1fr;
  }
  .pending-actions {
    justify-content: flex-start;
  }
  .auth-form-panel {
    padding-top: 44px;
  }
  .auth-form-panel .demo-hint {
    word-break: break-all;
  }
  .footer-meta {
    flex-direction: column;
  }
  .toast-root {
    right: 18px;
    bottom: 18px;
    width: calc(100% - 36px);
  }
}

@media (max-width: 430px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
  .detail-titlebar {
    flex-direction: column;
  }
  .detail-titlebar .status {
    order: -1;
  }
  .dossier-seat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .hero h1 {
    font-size: 38px;
  }
  .sigil-stage {
    min-height: 280px;
  }
  .check-grid,
  .check-grid.class-grid {
    grid-template-columns: 1fr;
  }
}

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

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