:root {
  --bg: #0a0b0d;
  --surface: #0f1012;
  --surface-strong: #131417;
  --card: #17191d;
  --ink: #f2f2f2;
  --muted: #8e8e93;
  --primary: #d4a373;
  --secondary: #8fceab;
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.04);
  --shadow: 0 22px 42px rgba(0, 0, 0, 0.42);
  --maxw: 1140px;
  --font-scale: 1;
}

body.theme-obsidian {
  --bg: #0a0b0d;
  --surface: #0f1012;
  --surface-strong: #131417;
  --card: #17191d;
  --ink: #f2f2f2;
  --muted: #8e8e93;
  --primary: #d4a373;
  --secondary: #8fceab;
}

body.theme-amber {
  --bg: #11100d;
  --surface: #181510;
  --surface-strong: #1f1b14;
  --card: #232017;
  --ink: #f4ede3;
  --muted: #b8a890;
  --primary: #efb36e;
  --secondary: #d9c28b;
}

body.theme-emerald {
  --bg: #0a1110;
  --surface: #0f1816;
  --surface-strong: #13201d;
  --card: #162522;
  --ink: #eaf5f2;
  --muted: #9db7b0;
  --primary: #8fceab;
  --secondary: #7ab9e6;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  font-size: calc(16px * var(--font-scale));
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 12%, rgba(212, 163, 115, 0.18), transparent 36%),
    radial-gradient(circle at 88% 18%, rgba(143, 206, 171, 0.14), transparent 32%),
    linear-gradient(145deg, #090a0c 0%, #0a0b0d 50%, #101216 100%);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 260ms ease, color 260ms ease;
}

body.font-small {
  --font-scale: 0.94;
}

body.font-normal {
  --font-scale: 1;
}

body.font-large {
  --font-scale: 1.08;
}

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation: none !important;
  transition-duration: 0s !important;
  scroll-behavior: auto !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 0.6px, transparent 0.6px);
  background-size: 3px 3px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), transparent 70%);
  opacity: 0.18;
  z-index: 0;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(85px);
  opacity: 0.34;
  z-index: 0;
}

.ambient-a {
  width: 380px;
  height: 380px;
  background: #d4a373;
  left: -140px;
  top: 26vh;
  animation: floatA 18s ease-in-out infinite;
}

.ambient-b {
  width: 420px;
  height: 420px;
  background: #8fceab;
  right: -150px;
  top: 8vh;
  animation: floatB 21s ease-in-out infinite;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: sticky;
  top: 0;
  backdrop-filter: blur(16px);
}

.profile-settings {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.settings-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.settings-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.settings-card p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
}

.settings-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  padding: 11px 12px;
}

.settings-preview {
  margin-top: 10px;
  color: #d7d7d9;
  font-size: 0.92rem;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  border-bottom: 1px solid var(--line-soft);
}

.ottoman-strip {
  max-width: var(--maxw);
  margin: -4px auto 10px;
  padding: 7px 20px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(212, 163, 115, 0.14), rgba(143, 206, 171, 0.08));
  color: #f2e4cf;
  font-family: "Playfair Display", "Cormorant Garamond", serif;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-align: center;
}

.ottoman-line {
  margin: 0 0 12px;
  color: #f0dfc6;
  font-family: "Playfair Display", "Cormorant Garamond", serif;
  font-size: clamp(1rem, 2.2vw, 1.28rem);
  line-height: 1.5;
  text-align: center;
  opacity: 0.9;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: 0.12em;
  font-weight: 800;
  font-size: 0.86rem;
}

.brand::before {
  content: "";
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex: 0 0 32px;
  background: center/cover no-repeat url("logo.svg");
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.3);
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.language-switcher-label {
  color: #d7d7db;
  font-size: 0.78rem;
  opacity: 0.9;
}

.language-switcher-select {
  border: 1px solid rgba(212, 163, 115, 0.48);
  background: linear-gradient(145deg, rgba(212, 163, 115, 0.2), rgba(212, 163, 115, 0.08));
  color: #f8eee4;
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 0.8rem;
  min-width: 116px;
}

body.lang-rtl {
  direction: rtl;
}

body.lang-rtl .top-nav {
  flex-direction: row-reverse;
}

.menu-toggle {
  display: none;
  border: 1px solid rgba(212, 163, 115, 0.48);
  background: linear-gradient(145deg, rgba(212, 163, 115, 0.28), rgba(212, 163, 115, 0.08));
  color: #f8eee4;
  border-radius: 999px;
  padding: 9px 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.menu-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(241, 191, 134, 0.66);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.top-nav {
  display: flex;
  gap: 18px;
}

.top-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.92rem;
  opacity: 0.75;
  padding: 8px 4px;
}

.top-nav .nav-logout {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 10px;
}

.top-nav a.nav-auth-btn {
  opacity: 1;
  padding: 6px 12px;
}

.top-nav a.nav-auth-btn.active {
  color: #e9f5ef;
  border-color: rgba(143, 206, 171, 0.72);
  box-shadow: 0 0 0 1px rgba(143, 206, 171, 0.22);
}

.top-nav a.active {
  opacity: 1;
  color: var(--primary);
}

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px 56px;
}

.hero {
  padding: 38px 0 10px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.hero-panel {
  background: linear-gradient(150deg, rgba(212, 163, 115, 0.08), rgba(143, 206, 171, 0.06));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel-title {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--secondary);
}

.metrics {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.metric {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.2);
}

.metric strong {
  display: block;
  font-size: 1.2rem;
  color: var(--primary);
}

.metric span {
  color: var(--muted);
  font-size: 0.85rem;
}

.quote {
  margin: 18px 0 0;
  color: #d6d6d8;
  line-height: 1.6;
}

.page-hero {
  padding: 34px 0 14px;
}

.page-hero h1 {
  margin: 8px 0 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.9rem, 6vw, 3.45rem);
  line-height: 1.1;
  max-width: 18ch;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  color: var(--secondary);
  font-weight: 700;
}

.hero h1 {
  margin: 14px 0 0;
  font-family: "Playfair Display", serif;
  font-weight: 700;
  line-height: 1.02;
  font-size: clamp(2.2rem, 8vw, 5rem);
  max-width: 12ch;
}

.hero h1 span {
  color: var(--primary);
}

.lead {
  margin-top: 18px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.75;
}

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

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border-radius: 14px;
  min-height: 44px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  overflow: hidden;
  isolation: isolate;
  backdrop-filter: blur(6px);
  transition: transform 200ms ease, box-shadow 220ms ease, border-color 200ms ease, background 220ms ease;
}

.btn::before {
  content: "";
  position: absolute;
  left: -42%;
  top: -120%;
  width: 34%;
  height: 340%;
  transform: rotate(18deg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0));
  opacity: 0;
  transition: left 320ms ease, opacity 240ms ease;
  z-index: -1;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn:hover::before {
  left: 128%;
  opacity: 1;
}

.btn:active {
  transform: translateY(0) scale(0.97);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(135deg, #ffd39f 0%, #efb36e 56%, #d18645 100%);
  color: #21150c;
  border-color: rgba(255, 227, 196, 0.58);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.24);
  box-shadow: 0 16px 32px rgba(212, 163, 115, 0.4), 0 0 0 1px rgba(255, 212, 160, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.btn-primary:hover {
  box-shadow: 0 18px 36px rgba(212, 163, 115, 0.46), 0 0 0 1px rgba(255, 212, 160, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.btn-ghost {
  border: 1px solid rgba(143, 206, 171, 0.38);
  color: #e9f5ef;
  background: linear-gradient(150deg, rgba(15, 24, 22, 0.94), rgba(20, 32, 29, 0.9));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-ghost:hover {
  border-color: rgba(143, 206, 171, 0.68);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(143, 206, 171, 0.18);
}

.btn-primary::after,
.btn-ghost::after,
.thread-share-btn::after,
.menu-toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.04)) border-box;
  mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.85;
}

.ticker {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.ticker-track {
  display: flex;
  gap: 22px;
  padding: 10px 18px;
  white-space: nowrap;
  animation: ticker 22s linear infinite;
}

.ticker-track span {
  color: var(--muted);
  font-size: 0.88rem;
}

.ticker-track strong {
  color: var(--secondary);
}

.section-title {
  margin-top: 38px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.section-title h2 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.45rem, 4vw, 2.2rem);
}

.section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.cards,
.list-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

.integration-code {
  margin-top: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: #f0e2cd;
  font-size: 0.84rem;
  line-height: 1.55;
  word-break: break-word;
}

.card,
.list-card {
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative;
}

.card::after,
.list-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  background: linear-gradient(150deg, rgba(212, 163, 115, 0.25), rgba(143, 206, 171, 0.2)) border-box;
  mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0.25;
  pointer-events: none;
}

.card h3,
.list-card h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
}

.card p,
.list-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.66;
}

.mini-meta {
  margin-top: 10px;
  color: #c5b294;
  font-size: 0.82rem;
}

.timeline {
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
}

.timeline-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.timeline-item {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 14px;
}

.timeline-item b {
  color: var(--primary);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.timeline-item p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.cta-banner {
  margin-top: 34px;
  border-radius: 20px;
  border: 1px solid var(--line);
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  background: linear-gradient(130deg, rgba(212, 163, 115, 0.11), rgba(143, 206, 171, 0.08));
}

.cta-banner h3 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 1.45rem;
}

.cta-banner p {
  margin: 8px 0 0;
  color: #d1d1d3;
}

.chip-row {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.83rem;
  color: #d8d8d8;
  background: rgba(255, 255, 255, 0.03);
}

.thread-list {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.thread-replies {
  margin-top: 8px;
  border-left: 2px solid rgba(143, 206, 171, 0.3);
  padding-left: 10px;
}

.thread-reply-item {
  margin: 0 0 6px;
  color: #d7d9dd;
  font-size: 0.86rem;
  line-height: 1.5;
}

.thread-reply-item.is-focused {
  border: 1px solid rgba(143, 206, 171, 0.6);
  border-radius: 10px;
  padding: 7px 8px;
  background: rgba(143, 206, 171, 0.08);
}

.thread-reply-quote {
  margin-top: 7px;
  margin-bottom: 7px;
  padding: 6px 8px;
  border-radius: 9px;
  display: grid;
  gap: 4px;
  border-left: 2px solid rgba(143, 206, 171, 0.5);
  background: rgba(11, 18, 16, 0.74);
}

.thread-reply-quote strong {
  font-size: 0.74rem;
  color: #c9efe0;
}

.thread-reply-quote span {
  font-size: 0.76rem;
  color: #bdd8cd;
}

.thread-reply-actions {
  display: inline-flex;
  gap: 6px;
  margin-left: 8px;
}

.thread-inline-action {
  border: 1px solid rgba(143, 206, 171, 0.34);
  background: rgba(10, 18, 16, 0.88);
  color: #dff6e9;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.72rem;
  cursor: pointer;
}

.thread-inline-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.thread-reply-form {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.thread-review-badge {
  display: inline-flex;
  margin: 8px 0 0;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(143, 206, 171, 0.35);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #dbf4e7;
  background: rgba(19, 35, 29, 0.54);
}

.thread-review-badge.is-pending_review {
  border-color: rgba(239, 179, 110, 0.55);
  color: #ffe7bd;
  background: rgba(70, 45, 18, 0.54);
}

.thread-review-badge.is-rejected {
  border-color: rgba(244, 122, 122, 0.58);
  color: #ffd8d8;
  background: rgba(70, 24, 24, 0.5);
}

.thread-review-note {
  margin: 10px 0 0;
  color: #d2ccb7;
  font-size: 0.82rem;
  line-height: 1.5;
}

.forum-controls {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 12px;
}

.forum-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.share-status {
  color: #cfd0d2;
  font-size: 0.9rem;
}

.forum-controls label {
  display: grid;
  gap: 8px;
  color: #d8d8d8;
  font-size: 0.9rem;
}

.control-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

.control-input:focus {
  border-color: rgba(212, 163, 115, 0.55);
  box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.16);
}

.auth-shell {
  margin-top: 20px;
  max-width: 620px;
}

.auth-card {
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
}

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

.auth-form.auth-error,
.auth-form.admin-auth-error {
  animation: adminAuthShake 320ms ease;
}

.control-input.auth-input-error,
.control-input.admin-input-error {
  border-color: rgba(228, 96, 96, 0.88);
  box-shadow: 0 0 0 3px rgba(228, 96, 96, 0.18);
}

.auth-status-error,
#admin-access-status.admin-status-error {
  color: #ff9e9e;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: #d9d9db;
  font-size: 0.92rem;
}

.auth-maintenance {
  margin-bottom: 14px;
  border: 1px solid rgba(239, 179, 110, 0.48);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(239, 179, 110, 0.16), rgba(209, 134, 69, 0.1));
  padding: 14px;
}

.auth-maintenance h3 {
  margin: 0;
  color: #ffe1be;
  font-size: 0.98rem;
}

.auth-maintenance p {
  margin: 8px 0 0;
  color: #f1e2d2;
  line-height: 1.55;
}

.auth-card a {
  color: var(--secondary);
  text-decoration: none;
}

.auth-form .btn.btn-ghost {
  justify-content: center;
}

.auth-cta-link,
.auth-cta-link:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(239, 179, 110, 0.62);
  background: linear-gradient(135deg, #ffd39f 0%, #efb36e 58%, #d18645 100%);
  color: #22150c;
  font-weight: 700;
  text-decoration: none;
}

.auth-cta-link:hover {
  border-color: rgba(255, 227, 196, 0.82);
  color: #1c1109;
}

@keyframes adminAuthShake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

.guest-info-banner {
  margin: 12px 0 8px;
  border: 1px solid rgba(236, 197, 97, 0.46);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(68, 47, 16, 0.5), rgba(39, 29, 12, 0.44));
  padding: 12px 14px;
}

.guest-info-banner p {
  margin: 0;
  color: #f3e7bf;
  font-size: 0.9rem;
  line-height: 1.5;
}

.guest-info-banner a {
  color: #ffe7a1;
  font-weight: 700;
  text-decoration: underline;
}

.member-quick-panel {
  margin: 12px 0 6px;
  border: 1px solid rgba(143, 206, 171, 0.36);
  border-radius: 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(17, 30, 27, 0.58), rgba(12, 20, 18, 0.46));
  display: grid;
  gap: 10px;
}

.member-quick-head {
  display: grid;
  gap: 4px;
}

.member-quick-title {
  margin: 0;
  color: #e6f6ee;
  font-weight: 700;
}

.member-quick-meta {
  margin: 0;
  font-size: 0.84rem;
  color: #b6d9c8;
}

.member-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-moderation-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.cookie-consent {
  position: fixed;
  inset: auto 16px 16px 16px;
  z-index: 30;
}

.cookie-consent-card {
  margin: 0 auto;
  max-width: 780px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(16, 18, 22, 0.96), rgba(24, 30, 36, 0.94));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.38);
  padding: 16px;
}

.cookie-consent-card h3 {
  margin: 0;
  color: #f4e8d8;
}

.cookie-consent-card p {
  margin: 8px 0 0;
  color: #d8d8dc;
  line-height: 1.55;
}

.cookie-consent-check {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d9e8de;
}

.cookie-consent-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 14px;
}

.cookie-policy-link-wrap {
  margin-top: 10px;
  color: #d4dbe2;
}

.cookie-policy-link-wrap a {
  color: var(--secondary);
  text-decoration: none;
}

.cookie-consent-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-manage-btn {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 28;
  border: 1px solid rgba(143, 206, 171, 0.45);
  border-radius: 999px;
  padding: 9px 14px;
  color: #e9f5ef;
  background: linear-gradient(145deg, rgba(15, 24, 22, 0.96), rgba(20, 32, 29, 0.92));
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.cookie-manage-btn:hover {
  border-color: rgba(143, 206, 171, 0.72);
}

.game-mode-toggle.is-active {
  border-color: rgba(255, 212, 103, 0.78);
  color: #fff6d7;
  background: linear-gradient(135deg, rgba(41, 33, 10, 0.96), rgba(54, 33, 11, 0.94));
  box-shadow: 0 0 0 1px rgba(255, 212, 103, 0.3), 0 10px 24px rgba(0, 0, 0, 0.35);
}

.game-mode-hud {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 29;
  min-width: 172px;
  border: 1px solid rgba(255, 212, 103, 0.44);
  border-radius: 14px;
  padding: 10px 12px;
  background: linear-gradient(145deg, rgba(22, 18, 8, 0.96), rgba(32, 20, 8, 0.94));
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.34);
}

.game-mode-hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.game-mode-hud strong {
  color: #fff4c8;
  font-size: 0.9rem;
}

.game-mode-hud span {
  color: #ffd56b;
  font-size: 0.78rem;
}

.game-mode-hud p {
  margin: 6px 0 0;
  color: #f1dfae;
  font-size: 0.78rem;
}

#game-mode-remaining {
  margin-top: 4px;
  color: #ffe39a;
  font-size: 0.72rem;
}

#game-mode-reset {
  margin-top: 2px;
  color: #d8c58f;
  font-size: 0.68rem;
}

#game-mode-next {
  margin-top: 2px;
  color: #e9d7a6;
  font-size: 0.68rem;
}

#game-mode-streak,
#game-mode-last {
  margin-top: 2px;
  color: #d8cda5;
  font-size: 0.66rem;
}

#game-mode-remaining.is-actionable {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(255, 226, 140, 0.66);
}

#game-mode-remaining.is-actionable:hover {
  color: #fff2c1;
}

#game-mode-remaining.is-actionable:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 212, 103, 0.4);
  border-radius: 6px;
}

#game-mode-remaining.is-done {
  color: #d9f2bd;
  text-decoration: none;
  cursor: default;
}

.game-mode-quests {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.game-quest-item {
  display: grid;
  gap: 4px;
}

.game-quest-item.is-done .game-quest-meta {
  color: #ffe7a7;
}

.game-quest-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #dacd9f;
}

.game-quest-state {
  font-size: 0.66rem;
  color: #d9c88d;
}

.game-quest-item.is-done .game-quest-state {
  color: #ffe39f;
}

.game-quest-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.game-quest-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #f2be55, #ffe28c);
  transition: width 220ms ease;
}

.game-quest-go {
  margin-top: 4px;
  justify-self: start;
  border: 1px solid rgba(255, 212, 103, 0.46);
  border-radius: 999px;
  background: rgba(55, 35, 12, 0.86);
  color: #ffe8ad;
  padding: 2px 8px;
  font-size: 0.66rem;
  cursor: pointer;
}

.game-quest-go:hover {
  border-color: rgba(255, 227, 150, 0.76);
  color: #fff2cb;
}

.profile-game-chip-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-game-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  color: #d8dde3;
  background: rgba(255, 255, 255, 0.04);
}

.profile-game-badge {
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.profile-game-badge.is-bronze {
  color: #f4d9ba;
  border-color: rgba(217, 150, 96, 0.5);
  background: rgba(71, 42, 22, 0.48);
}

.profile-game-badge.is-silver {
  color: #e4edf8;
  border-color: rgba(146, 169, 194, 0.58);
  background: rgba(39, 51, 67, 0.5);
}

.profile-game-badge.is-gold {
  color: #fff2be;
  border-color: rgba(236, 197, 97, 0.62);
  background: rgba(67, 54, 20, 0.56);
}

.profile-game-badge.is-elite {
  color: #fff4cf;
  border-color: rgba(255, 212, 103, 0.82);
  background: linear-gradient(135deg, rgba(64, 51, 16, 0.74), rgba(120, 67, 18, 0.52));
}

body.game-mode .ambient-a,
body.game-mode .ambient-b {
  filter: saturate(1.22) hue-rotate(8deg);
}

body.game-mode .site-header {
  border-bottom-color: rgba(255, 212, 103, 0.4);
}

body.game-mode .brand {
  text-shadow: 0 0 16px rgba(255, 212, 103, 0.28);
}

.thread-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: var(--surface-strong);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.thread-item.is-focused {
  border-color: rgba(212, 163, 115, 0.55);
  box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.18), var(--shadow);
}

.thread-item h3 {
  margin: 0;
  font-size: 1rem;
}

.thread-item p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.62;
}

.thread-meta {
  text-align: right;
  font-size: 0.82rem;
  color: #bbb;
}

.thread-actions {
  margin-top: 10px;
}

.thread-share-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(143, 206, 171, 0.34);
  background: linear-gradient(145deg, rgba(13, 20, 18, 0.94), rgba(20, 31, 29, 0.92));
  color: #e2f7ea;
  text-decoration: none;
  border-radius: 12px;
  min-height: 40px;
  padding: 8px 13px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.thread-share-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(143, 206, 171, 0.7);
  color: #f3fffa;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(143, 206, 171, 0.2);
}

.thread-share-btn:active {
  transform: translateY(0) scale(0.98);
}

.btn:focus-visible,
.thread-share-btn:focus-visible,
.menu-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(143, 206, 171, 0.3), 0 10px 24px rgba(0, 0, 0, 0.34);
}

.council-room-card {
  display: grid;
  gap: 10px;
}

.council-room-card.is-focused {
  border-color: rgba(212, 163, 115, 0.55);
  box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.18), var(--shadow);
}

.council-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.council-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: #d6d6d8;
  background: rgba(255, 255, 255, 0.03);
}

.council-pill.is-live {
  border-color: rgba(143, 206, 171, 0.56);
  color: #d8f4e5;
  background: rgba(143, 206, 171, 0.16);
}

.council-message-item h3 {
  color: #f0dfc8;
}

.council-message-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.council-reply-link {
  font-size: 0.76rem;
  color: #bdd8ca;
}

.council-reply-quote {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(143, 206, 171, 0.28);
  background: linear-gradient(145deg, rgba(10, 18, 16, 0.84), rgba(14, 24, 21, 0.78));
}

.council-reply-quote strong {
  font-size: 0.78rem;
  color: #d9f3e6;
}

.council-reply-quote p {
  margin: 6px 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #c7ddd3;
}

.council-reply-quote-actions {
  margin-top: 8px;
}

.council-message-item.is-focused {
  border-color: rgba(143, 206, 171, 0.7);
  box-shadow: 0 0 0 3px rgba(143, 206, 171, 0.2), var(--shadow);
}

.contact-split {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 16px;
}

.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.contact-card h2 {
  margin: 0 0 8px;
  font-size: 1.06rem;
}

.contact-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.contact-card a {
  color: var(--secondary);
  text-decoration: none;
}

.fake-form {
  display: grid;
  gap: 10px;
}

.fake-input {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  color: #d8d8d8;
  background: rgba(255, 255, 255, 0.02);
}

.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 20px 30px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px dashed var(--line);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 640ms ease, transform 640ms ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 620ms ease, transform 620ms ease;
}

.stagger.in > *:nth-child(1) {
  transition-delay: 60ms;
}

.stagger.in > *:nth-child(2) {
  transition-delay: 170ms;
}

.stagger.in > *:nth-child(3) {
  transition-delay: 280ms;
}

.stagger.in > *:nth-child(4) {
  transition-delay: 390ms;
}

.stagger.in > * {
  opacity: 1;
  transform: translateY(0);
}

@keyframes ticker {
  from {
    transform: translateX(0%);
  }
  to {
    transform: translateX(-18%);
  }
}

@keyframes floatA {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(14px, -18px, 0);
  }
}

@keyframes floatB {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-16px, 12px, 0);
  }
}

@media (max-width: 960px) {
  .hero-grid,
  .cards,
  .integration-grid,
  .list-grid,
  .timeline-grid,
  .contact-split,
  .forum-controls {
    grid-template-columns: 1fr;
  }

  .thread-item {
    grid-template-columns: 1fr;
  }

  .thread-meta {
    text-align: left;
  }

  .cta-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 900px) {
  .site-header {
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-block;
  }

  .top-nav {
    width: 100%;
    display: none;
    flex-direction: column;
    gap: 12px;
    background: rgba(15, 16, 18, 0.92);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
  }

  .top-nav.open {
    display: flex;
  }

  .site-footer {
    flex-direction: column;
  }

  .ottoman-strip {
    margin: 0 20px 10px;
    padding-inline: 12px;
  }

  .cookie-consent-actions {
    flex-direction: column;
  }

  .cookie-consent-grid {
    grid-template-columns: 1fr;
  }

}
