:root {
  --bg: #f6e4df;
  --bg-soft: rgba(255, 251, 249, 0.84);
  --surface: rgba(255, 252, 250, 0.96);
  --surface-strong: #fffdfb;
  --line: rgba(114, 38, 35, 0.16);
  --line-strong: rgba(114, 38, 35, 0.28);
  --text: #341616;
  --muted: #6d5a58;
  --accent: #b3262e;
  --accent-deep: #8f1821;
  --olive: #8d3a34;
  --road: #771d24;
  --road-stripe: #fbe7e0;
  --shadow: 0 24px 60px rgba(102, 26, 31, 0.16);
  --ui-border: rgba(74, 52, 49, 0.12);
  --ui-surface: rgba(255, 252, 250, 0.9);
  --ui-surface-strong: #fffdfb;
  --ui-shadow: 0 18px 40px rgba(61, 42, 38, 0.08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 999px;
  --community-panel-gap: 16px;
  --account-panel-fixed-height: 0px;
  --gathering-panel-fixed-height: 0px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

html[data-site-intro="play"] {
  overflow: hidden;
}

body {
  margin: 0;
  position: relative;
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(179, 38, 46, 0.2), transparent 28%),
    radial-gradient(circle at top right, rgba(141, 58, 52, 0.16), transparent 24%),
    linear-gradient(180deg, #fdf1ed 0%, var(--bg) 52%, #ecd1cb 100%);
  min-height: 100vh;
}

.site-intro {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 28px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 680ms ease, visibility 0s linear 680ms;
  background:
    radial-gradient(circle at top left, rgba(179, 38, 46, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(141, 58, 52, 0.14), transparent 24%),
    linear-gradient(
      180deg,
      rgba(253, 241, 237, 0.98) 0%,
      rgba(246, 228, 223, 0.98) 56%,
      rgba(236, 209, 203, 0.98) 100%
    );
  backdrop-filter: blur(10px);
}

.site-intro-inner {
  width: min(780px, 100%);
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.site-intro-eyebrow,
.site-intro-copy {
  margin: 0;
  color: var(--muted);
}

.site-intro-eyebrow {
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.78rem;
  opacity: 0;
  transform: translateY(10px);
}

.site-intro-title {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.24em;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 0.96;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text);
}

.site-intro-word {
  opacity: 0;
  transform: translate3d(0, 26px, 0) scale(0.98);
  filter: blur(10px);
}

.site-intro-road {
  position: relative;
  width: min(520px, 82vw);
  height: 22px;
  border-radius: 999px;
  background: rgba(119, 29, 36, 0.16);
  overflow: hidden;
  opacity: 0;
  transform: scaleX(0.94);
}

.site-intro-road-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d94952 0%, #b3262e 55%, #8f1821 100%);
  transform: scaleX(0);
  transform-origin: left center;
}

.site-intro-road-node {
  position: absolute;
  top: 50%;
  left: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff3ee;
  box-shadow:
    0 0 0 8px rgba(179, 38, 46, 0.18),
    0 12px 28px rgba(143, 24, 33, 0.18);
  transform: translate3d(-8px, -50%, 0) scale(0.8);
  opacity: 0;
}

.site-intro-copy {
  max-width: 34rem;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.7;
  opacity: 0;
  transform: translateY(12px);
}

html[data-site-intro="play"] .site-intro {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s, 0s;
}

html[data-site-intro="play"] .page-shell {
  opacity: 0;
  transform: translate3d(0, 26px, 0) scale(0.99);
  pointer-events: none;
}

html[data-site-intro="play"] .site-intro-eyebrow {
  animation: introFadeUp 700ms ease 180ms forwards;
}

html[data-site-intro="play"] .site-intro-word {
  animation: introWordReveal 980ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: calc(360ms + (var(--word-index) * 190ms));
}

html[data-site-intro="play"] .site-intro-road {
  animation: introFadeUp 700ms ease 1040ms forwards;
}

html[data-site-intro="play"] .site-intro-road-fill {
  animation: introRoadFill 1080ms cubic-bezier(0.2, 0.8, 0.2, 1) 1220ms forwards;
}

html[data-site-intro="play"] .site-intro-road-node {
  animation: introRoadNode 1080ms cubic-bezier(0.2, 0.8, 0.2, 1) 1220ms forwards;
}

html[data-site-intro="play"] .site-intro-copy {
  animation: introFadeUp 760ms ease 1820ms forwards;
}

.page-shell {
  transition: opacity 920ms ease, transform 1160ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes introFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes introWordReveal {
  from {
    opacity: 0;
    transform: translate3d(0, 26px, 0) scale(0.98);
    filter: blur(10px);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes introRoadFill {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@keyframes introRoadNode {
  0% {
    opacity: 0;
    transform: translate3d(-8px, -50%, 0) scale(0.8);
  }

  15% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    left: calc(100% - 22px);
    transform: translate3d(0, -50%, 0) scale(1);
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 100% 42px, 42px 100%;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 70%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(125deg, rgba(179, 38, 46, 0.06), transparent 34%),
    linear-gradient(305deg, rgba(119, 29, 36, 0.08), transparent 32%);
  z-index: 0;
}

.review-page main {
  position: relative;
  z-index: 1;
  margin-top: 32px;
}

.review-page .topbar-actions {
  justify-content: flex-end;
}

.review-page .hero {
  padding-bottom: 0;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.contact-launch-button {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 16;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #c3343d 0%, var(--accent-deep) 100%);
  color: #fff7f4;
  font: inherit;
  box-shadow: 0 24px 48px rgba(102, 26, 31, 0.22);
  cursor: pointer;
}

.contact-launch-button:hover {
  transform: translateY(-1px);
}

.contact-launch-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.contact-launch-icon svg {
  width: 18px;
  height: 18px;
}

.hero {
  position: relative;
  z-index: 1;
}

.hero {
  padding: 20px 0 8px;
  z-index: 4;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
  position: relative;
  z-index: 5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  color: inherit;
  text-decoration: none;
}

.brand:hover {
  opacity: 0.96;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff5f3;
  background: linear-gradient(135deg, #c3343d 0%, var(--accent-deep) 100%);
  box-shadow: var(--shadow);
}

.brand h1,
.section-heading h3 {
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
}

.brand h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  line-height: 0.95;
}

.eyebrow,
.panel-label,
.filter-title {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--muted);
}

.ghost-link,
.pill {
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease,
    border-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.ghost-link {
  font: inherit;
  color: var(--text);
  text-decoration: none;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  box-shadow: var(--ui-shadow);
  cursor: pointer;
}

.ghost-link:hover,
.pill:hover {
  transform: translateY(-1px);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topic-link {
  white-space: nowrap;
}

.nav-select,
.nav-search {
  display: flex;
  align-items: center;
}

.nav-select {
  gap: 10px;
  padding: 0 2px 0 10px;
}

.nav-select-label {
  font-size: 0.92rem;
  color: var(--muted);
  white-space: nowrap;
}

.year-menu-trigger,
.nav-search input {
  width: min(320px, 42vw);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
}

.year-menu-shell {
  position: relative;
}

.nav-select-native {
  display: none;
}

.year-menu-trigger {
  width: auto;
  min-width: 104px;
  border: 1px solid var(--ui-border);
  background: var(--ui-surface-strong);
  padding: 12px 35px 12px 15px;
  font: inherit;
  color: var(--text);
  box-shadow: var(--ui-shadow);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  position: relative;
  transition: border-color 180ms ease, transform 180ms ease;
}

.year-menu-trigger::after {
  content: "";
  position: absolute;
  right: 18px;
  top: calc(50% - 6px);
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.7;
}

.year-menu-trigger:hover,
.year-menu-trigger:focus-visible {
  border-color: var(--line-strong);
}

.year-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 252px;
  padding: 8px;
  border-radius: 20px;
  background: rgba(255, 252, 250, 0.96);
  border: 1px solid var(--ui-border);
  box-shadow: var(--ui-shadow);
  backdrop-filter: blur(18px);
  display: grid;
  grid-template-columns: minmax(128px, auto) minmax(88px, auto);
  gap: 8px;
  z-index: 12;
}

.year-menu-groups,
.year-menu-years {
  display: grid;
  gap: 6px;
  align-content: start;
}

.year-menu-years {
  min-width: 92px;
  padding-left: 8px;
  border-left: 1px solid rgba(74, 52, 49, 0.12);
}

.year-menu-group,
.year-menu-option {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  font: inherit;
  transition: background-color 180ms ease, transform 180ms ease, color 180ms ease;
}

.year-menu-group {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
}

.year-menu-group::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  opacity: 0.62;
}

.year-menu-group:hover,
.year-menu-group:focus-visible,
.year-menu-group.is-active,
.year-menu-option:hover,
.year-menu-option:focus-visible,
.year-menu-option.is-selected {
  background: rgba(179, 38, 46, 0.08);
  color: var(--text);
}

.year-menu-group.is-active,
.year-menu-option.is-selected {
  font-weight: 700;
}

.year-menu-group:hover,
.year-menu-group:focus-visible,
.year-menu-option:hover,
.year-menu-option:focus-visible {
  transform: translateY(-1px);
}

input {
  color: var(--muted);
  line-height: 1.75;
}

textarea,
select {
  color: var(--muted);
  line-height: 1.75;
}

.section-heading {
  padding: 8px 4px;
}

.section-heading h3 {
  margin: 8px 0 14px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.94;
  font-weight: 400;
}

input {
  width: 100%;
  padding: 15px 18px;
  border-radius: 16px;
  border: 1px solid var(--ui-border);
  background: var(--ui-surface-strong);
  font: inherit;
  box-shadow: var(--ui-shadow);
}

textarea,
select {
  width: 100%;
  padding: 15px 18px;
  border-radius: 16px;
  border: 1px solid var(--ui-border);
  background: var(--ui-surface-strong);
  font: inherit;
  box-shadow: var(--ui-shadow);
}

textarea {
  resize: vertical;
  min-height: 64px;
}

input:focus {
  outline: 2px solid rgba(83, 55, 51, 0.12);
  border-color: rgba(83, 55, 51, 0.24);
}

textarea:focus {
  outline: 2px solid rgba(83, 55, 51, 0.12);
  border-color: rgba(83, 55, 51, 0.24);
}

select:focus {
  outline: 2px solid rgba(83, 55, 51, 0.12);
  border-color: rgba(83, 55, 51, 0.24);
}

.data-status {
  margin: 8px 0 0;
  font-size: 0.95rem;
}

.data-status.is-warning {
  color: var(--accent-deep);
}

.data-status.is-error {
  color: #8b2f2f;
}

.community-section {
  position: relative;
  z-index: 1;
  margin-top: 88px;
}

.community-heading h3,
.panel-heading h4,
.community-panel h4 {
  margin: 8px 0 10px;
  font-size: clamp(1.55rem, 2.8vw, 2.1rem);
  font-weight: 500;
  line-height: 1.04;
}

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

.community-heading .eyebrow {
  font-size: 0.98rem;
  letter-spacing: 0.16em;
}

.discord-join-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(179, 38, 46, 0.18);
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  transition: transform 180ms ease, background-color 180ms ease;
}

.discord-join-link:visited {
  color: var(--text);
}

.discord-join-link:hover {
  transform: translateY(-1px);
  background: transparent;
}

.discord-join-link:focus-visible {
  outline: 2px solid rgba(179, 38, 46, 0.3);
  outline-offset: 3px;
}

.discord-join-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #5865f2;
  color: #fff;
  flex-shrink: 0;
}

.discord-join-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.gathering-panel-title {
  width: 100%;
  min-width: 0;
}

.gathering-panel-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gathering-panel-title-row h4 {
  margin-bottom: 0;
}

.community-copy,
.panel-copy,
.panel-empty,
.submission-meta,
.submission-detail,
.review-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.rich-text-field {
  display: grid;
  gap: 4px;
}

.submission-detail-label,
.modal-detail-label {
  margin: 0;
  color: var(--text);
}

.rich-text-content {
  color: var(--muted);
  line-height: 1.75;
}

.rich-text-content p {
  margin: 0 0 10px;
}

.rich-text-content p:last-child {
  margin-bottom: 0;
}

.modal-abstract a,
.modal-abstract a:visited,
.rich-text-content a,
.rich-text-content a:visited {
  color: var(--accent-deep);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
  word-break: break-word;
}

.modal-abstract strong,
.rich-text-content strong {
  color: var(--text);
  font-weight: 600;
}

.submit-panel-heading {
  margin-bottom: 10px;
}

.inline-copy-button {
  flex-shrink: 0;
  margin-left: auto;
}

.submit-panel-alert {
  color: #b3262e;
  font-weight: 600;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: var(--community-panel-gap);
  margin-top: 18px;
}

.community-side-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: var(--community-panel-gap);
  height: 100%;
  min-height: 0;
}

.community-heights-locked .community-side-column {
  grid-template-rows: var(--account-panel-fixed-height) var(--gathering-panel-fixed-height);
  height: calc(
    var(--account-panel-fixed-height) + var(--gathering-panel-fixed-height) + var(--community-panel-gap)
  );
}

.community-heights-locked .submit-panel {
  height: calc(
    var(--account-panel-fixed-height) + var(--gathering-panel-fixed-height) + var(--community-panel-gap)
  );
  overflow: auto;
}

.community-heights-locked .gathering-list {
  max-height: none;
}

.community-panel {
  padding: 14px 16px;
  border-radius: 28px;
  background: rgba(255, 252, 250, 0.84);
  border: 1px solid var(--ui-border);
  box-shadow: var(--ui-shadow);
  backdrop-filter: blur(16px);
  min-width: 0;
}

.account-panel,
.gathering-panel,
.submit-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.account-panel {
  overflow: auto;
}

.gathering-panel {
  min-height: 0;
  overflow: hidden;
}

.ranking-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text);
}

.ranking-table th,
.ranking-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(83, 55, 51, 0.1);
  text-align: left;
}

.ranking-table th {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}

.ranking-table tbody tr:last-child td {
  border-bottom: 0;
}

.ranking-table .panel-empty {
  text-align: center;
}

.wide-panel {
  grid-column: 1 / -1;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  position: relative;
}

.account-actions .ghost-link {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.menu-dropdown {
  position: relative;
  z-index: 6;
}

.menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.menu-trigger::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transform-origin: center;
  opacity: 0.7;
}

.menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 172px;
  padding: 8px;
  border-radius: 20px;
  background: rgba(255, 252, 250, 0.96);
  border: 1px solid var(--ui-border);
  box-shadow: var(--ui-shadow);
  backdrop-filter: blur(18px);
  display: grid;
  gap: 6px;
  z-index: 12;
  pointer-events: auto;
}

.menu-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  font: inherit;
  transition: background-color 180ms ease, transform 180ms ease;
}

.menu-item:hover {
  background: rgba(179, 38, 46, 0.08);
  transform: translateY(-1px);
}

.auth-switch,
.panel-heading,
.inline-actions,
.review-actions,
.submission-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-switch {
  justify-content: flex-start;
  margin: 10px 0 8px;
}

.pill,
.primary-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 248, 245, 0.9);
  border: 1px solid var(--ui-border);
  color: var(--text);
  box-shadow: var(--ui-shadow);
}

.pill.is-active,
.primary-button {
  color: #fff7f4;
  background: linear-gradient(135deg, #c3343d 0%, var(--accent-deep) 100%);
}

.primary-button {
  padding: 11px 16px;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.primary-button:disabled,
.pill:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.stack-form {
  display: grid;
  gap: 8px;
}

.stack-form label {
  display: grid;
  gap: 6px;
}

.submission-field {
  display: grid;
  gap: 6px;
}

.field-label {
  font-size: 0.92rem;
  color: var(--text);
}

.field-label-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field-label-row .field-label {
  margin: 0;
}

.info-popover-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(83, 55, 51, 0.22);
  background: rgba(255, 252, 250, 0.96);
  color: var(--accent-deep);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--ui-shadow);
}

.info-popover-trigger:focus-visible {
  outline: 2px solid rgba(83, 55, 51, 0.18);
  outline-offset: 2px;
}

.info-popover {
  width: min(760px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  border: none;
  background: transparent;
}

.info-popover:popover-open {
  position: fixed;
  inset: 18px auto auto 50%;
  margin: 0;
  transform: translateX(-50%);
}

.info-popover::backdrop {
  background: rgba(52, 22, 22, 0.08);
  backdrop-filter: blur(2px);
}

.info-popover-card {
  display: grid;
  gap: 12px;
  max-height: min(72vh, 560px);
  overflow: auto;
  padding: 20px 22px;
  border-radius: 22px;
  border: 1px solid rgba(83, 55, 51, 0.14);
  background: rgba(255, 250, 247, 0.98);
  color: var(--text);
  box-shadow: 0 24px 60px rgba(76, 45, 36, 0.2);
}

.info-popover-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.info-popover-title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.4;
}

.info-popover-intro {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.72;
}

.info-popover-list {
  margin: 0;
  padding-left: 1.3rem;
  display: grid;
  gap: 10px;
  font-size: 0.92rem;
  line-height: 1.72;
}

.info-popover-list li {
  padding-left: 0.1rem;
}

.info-popover-warning {
  color: var(--accent);
  font-weight: 600;
}

.info-popover-close {
  flex-shrink: 0;
}

.rich-text-editor-field {
  display: grid;
  gap: 6px;
}

.rich-text-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rich-text-tool {
  min-width: 34px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(83, 55, 51, 0.16);
  border-radius: 11px;
  background: rgba(255, 252, 250, 0.92);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  line-height: 1;
  box-shadow: var(--ui-shadow);
  cursor: pointer;
}

.rich-text-toolbar .rich-text-tool:first-child {
  font-weight: 700;
}

.rich-text-tool:hover {
  background: rgba(247, 242, 239, 0.96);
}

.rich-text-tool:focus-visible {
  outline: 2px solid rgba(83, 55, 51, 0.16);
  outline-offset: 2px;
}

.rich-text-tool:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.rich-text-link-editor {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(83, 55, 51, 0.14);
  background: rgba(247, 242, 239, 0.88);
  box-shadow: var(--ui-shadow);
}

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

.rich-text-link-field {
  display: grid;
  gap: 6px;
}

.rich-text-link-label {
  font-size: 0.82rem;
  color: var(--muted);
}

.rich-text-link-input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(83, 55, 51, 0.16);
  background: rgba(255, 252, 250, 0.96);
  color: var(--text);
  font: inherit;
}

.rich-text-link-input:focus {
  outline: 2px solid rgba(83, 55, 51, 0.12);
  border-color: rgba(83, 55, 51, 0.24);
}

.rich-text-link-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.rich-text-link-submit {
  min-width: 76px;
}

.inline-error {
  margin: 0;
  color: #8b2f2f;
  font-size: 0.9rem;
  line-height: 1.6;
}

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

.panel-feedback {
  min-height: 24px;
  margin: 6px 0 0;
  color: var(--accent-deep);
}

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

.review-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 12px;
}

.review-search-field {
  display: grid;
  gap: 6px;
}

.review-search-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gathering-list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  gap: 12px;
  margin-top: 6px;
  flex: 1;
  min-height: 0;
  max-height: min(48vh, 470px);
  overflow: auto;
  padding: 4px 4px 6px 0;
}

#gathering-feedback {
  min-height: 0;
  margin-top: 2px;
}

.submit-panel #submission-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.submit-panel #submission-form .submission-fields {
  display: grid;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.gathering-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--ui-border);
}

.submit-panel #submission-form .primary-button,
.gathering-panel #gathering-form .primary-button {
  width: 100%;
  min-height: 44px;
}

.submit-panel #submission-form .primary-button {
  margin-top: 0;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.pagination-text {
  color: var(--muted);
  font-size: 0.92rem;
}

.pagination-button {
  border: 1px solid var(--ui-border);
  background: rgba(255, 248, 245, 0.94);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  box-shadow: var(--ui-shadow);
}

.pagination-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.submission-card {
  padding: 12px 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(74, 52, 49, 0.08);
}

.submission-card h5 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.35;
}

.submission-header {
  align-items: flex-start;
}

.submission-status {
  flex-shrink: 0;
}

.status-pending {
  background: rgba(255, 242, 228, 0.94);
  color: #8a4e18;
}

.status-approved {
  background: rgba(234, 250, 236, 0.96);
  color: #275d31;
}

.status-revoked {
  background: rgba(242, 238, 255, 0.96);
  color: #5a4691;
}

.status-rejected {
  background: rgba(255, 232, 232, 0.98);
  color: #8b2f2f;
}

.submission-meta {
  margin-top: 4px;
  font-size: 0.92rem;
}

.submission-detail {
  margin-top: 6px;
}

.submission-detail-prewrap {
  white-space: pre-wrap;
  word-break: break-word;
}

.submission-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
}

.submission-note.status-approved {
  background: rgba(234, 250, 236, 0.92);
  border-color: rgba(39, 93, 49, 0.14);
  color: #275d31;
}

.submission-note.status-revoked {
  background: rgba(242, 238, 255, 0.96);
  border-color: rgba(90, 70, 145, 0.16);
  color: #5a4691;
}

.submission-note.status-rejected {
  background: rgba(255, 232, 232, 0.96);
  border-color: rgba(139, 47, 47, 0.16);
  color: #8b2f2f;
}

.submission-note strong {
  color: inherit;
}

.admin-note {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.admin-note textarea {
  min-height: 56px;
}

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

.review-actions .pill {
  background: rgba(255, 248, 245, 0.94);
}

.moderator-apply-box {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(74, 52, 49, 0.08);
}

.moderator-apply-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.94rem;
}

.moderator-apply-box .primary-button {
  width: min(220px, 100%);
  justify-self: center;
}

.moderator-apply-status {
  display: grid;
  gap: 8px;
}

.compact-submission-card {
  padding: 10px 12px;
  border-radius: 18px;
}

.compact-submission-card h5 {
  font-size: 1rem;
}

.panel-empty {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px dashed rgba(74, 52, 49, 0.12);
}

.gathering-list > .panel-empty {
  width: 100%;
}

.discussion-bubble {
  flex: 0 1 var(--bubble-width, 145px);
  width: min(100%, var(--bubble-width, 145px));
  max-width: 100%;
  border-radius: 26px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.96), rgba(255, 247, 242, 0.82) 62%),
    rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(74, 52, 49, 0.1);
  box-shadow: 0 14px 32px rgba(98, 62, 50, 0.12);
  overflow: hidden;
  animation: discussionBubbleFloat var(--bubble-duration, 7s) ease-in-out infinite;
  animation-delay: var(--bubble-delay, 0s);
}

.discussion-bubble.is-expanded {
  flex-basis: min(100%, 420px);
  width: min(100%, 420px);
  animation: none;
  box-shadow: 0 18px 40px rgba(98, 62, 50, 0.18);
}

.discussion-bubble-trigger {
  width: 100%;
  min-height: 96px;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 14px;
  text-align: left;
  font: inherit;
}

.discussion-bubble-trigger:hover {
  background: rgba(255, 255, 255, 0.24);
}

.discussion-bubble-trigger:focus-visible {
  outline: 2px solid rgba(176, 56, 64, 0.5);
  outline-offset: -3px;
}

.discussion-bubble-preview {
  display: block;
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: 0.02em;
  word-break: break-word;
}

.discussion-bubble-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.discussion-bubble-date {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.2;
}

.discussion-bubble-likes {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: calc(4px * var(--chat-like-scale, 1)) calc(8px * var(--chat-like-scale, 1));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(74, 52, 49, 0.08);
  color: var(--muted);
  font-size: calc(0.82rem * var(--chat-like-scale, 1));
  transform: scale(var(--chat-like-scale, 1));
  transform-origin: right center;
  transition: transform 220ms ease, font-size 220ms ease, padding 220ms ease;
}

.discussion-bubble-content {
  padding: 16px 20px 18px;
  display: grid;
  gap: 12px;
}

.discussion-bubble-meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.discussion-bubble-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.discussion-bubble-author {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.35;
  font-weight: 700;
}

.discussion-bubble-meta {
  margin-top: 4px;
  font-size: 0.9rem;
  color: var(--muted);
}

.discussion-bubble-full-text {
  margin: 0;
  line-height: 1.68;
  white-space: pre-wrap;
  word-break: break-word;
}

@keyframes discussionBubbleFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, var(--bubble-drift, -8px), 0);
  }
}

.chat-up-button {
  display: inline-flex;
  align-items: center;
  gap: calc(5px * var(--chat-like-scale, 1));
  padding: calc(7px * var(--chat-like-scale, 1)) calc(10px * var(--chat-like-scale, 1));
  border-radius: 999px;
  border: 1px solid var(--ui-border);
  background: rgba(255, 248, 245, 0.94);
  color: var(--text);
  box-shadow: var(--ui-shadow);
  cursor: pointer;
  font: inherit;
  font-size: calc(1rem * var(--chat-like-scale, 1));
  transform: scale(var(--chat-like-scale, 1));
  transform-origin: center;
  transition: background-color 180ms ease, transform 220ms ease, font-size 220ms ease,
    padding 220ms ease, gap 220ms ease;
}

.chat-up-button:hover {
  background: rgba(255, 229, 222, 0.96);
  transform: translateY(-1px) scale(var(--chat-like-scale, 1));
}

.chat-up-button.is-active {
  background: rgba(255, 232, 232, 0.98);
  color: var(--accent-deep);
}

.chat-up-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.chat-delete-button {
  border: 0;
  background: transparent;
  color: var(--accent-deep);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  padding: 0;
}

.chat-delete-button:hover {
  text-decoration: underline;
}

.chat-delete-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.pending-submissions-list {
  gap: 10px;
}

.pending-submission-item {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(74, 52, 49, 0.08);
  color: var(--text);
  line-height: 1.65;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(36, 28, 21, 0.48);
  backdrop-filter: blur(6px);
}

.modal-dialog {
  width: min(760px, 100%);
  max-height: min(85vh, 920px);
  overflow: auto;
  padding: 28px;
  border-radius: 28px;
  background: var(--surface-strong);
  border: 1px solid var(--ui-border);
  box-shadow: 0 32px 80px rgba(42, 30, 29, 0.18);
}

.ranking-modal-dialog {
  width: min(640px, 100%);
}

.modal-date,
.modal-abstract,
.modal-detail,
.modal-meta {
  color: var(--muted);
  line-height: 1.8;
}

.modal-date {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
}

.modal-title {
  margin: 10px 0 16px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 500;
}

.modal-abstract {
  margin: 0 0 18px;
}

.modal-abstract p {
  margin: 0 0 12px;
}

.modal-abstract p:last-child {
  margin-bottom: 0;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.modal-meta div {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--ui-border);
  background: rgba(247, 242, 239, 0.88);
}

.modal-meta dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.modal-meta dd {
  margin: 0;
  color: var(--text);
  font-weight: 500;
}

.modal-detail {
  padding-top: 18px;
  border-top: 1px solid var(--ui-border);
  display: grid;
  gap: 14px;
}

.modal-detail p {
  margin: 0 0 12px;
}

.modal-detail .rich-text-field {
  gap: 6px;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.modal-actions-centered {
  justify-content: center;
}

.modal-actions-centered .modal-danger {
  margin-right: 0;
}

.modal-danger {
  margin-right: auto;
  color: #8b2f2f;
  border-color: rgba(139, 47, 47, 0.26);
}

#modal-edit-feedback {
  margin-top: 14px;
}

#modal-edit-form {
  margin-top: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--ui-border);
}

.event-problem-modal-dialog {
  width: min(680px, 100%);
}

.reminder-modal-title {
  margin-bottom: 12px;
}

.reminder-modal-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.event-problem-note {
  margin: 4px 0 0;
}

.event-problem-history {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--ui-border);
}

.is-hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

  .community-heights-locked .community-side-column {
    grid-template-rows: auto auto;
    height: auto;
  }

  .community-heights-locked .submit-panel {
    height: auto;
    overflow: visible;
  }

  .community-heights-locked .gathering-list {
    max-height: min(48vh, 470px);
    overflow: auto;
  }
}

@media (max-width: 900px) {
  .contact-launch-button {
    right: 14px;
    bottom: 14px;
    padding: 11px 14px;
  }

  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 24px;
  }

  .menu-panel {
    left: 0;
    right: auto;
  }

  .nav-search input {
    width: 100%;
  }

  .year-menu-panel {
    right: 0;
  }

  .community-panel {
    padding: 14px;
  }

  .gathering-panel .panel-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .gathering-panel-title-row {
    flex-wrap: wrap;
    gap: 12px;
  }

  .discord-join-link {
    margin-left: 0;
  }

  .gathering-list {
    max-height: 240px;
    overflow: auto;
    padding-right: 0;
  }

  .discussion-bubble,
  .discussion-bubble.is-expanded {
    flex-basis: 100%;
    width: 100%;
  }

  .discussion-bubble-trigger {
    min-height: 88px;
  }

  .discussion-bubble-meta-row {
    flex-direction: column;
  }

  .discussion-bubble-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .submit-panel #submission-form .submission-fields {
    padding-right: 0;
  }

  .community-heights-locked .gathering-list {
    max-height: 240px;
  }

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

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

  .review-search-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .home-topbar-actions {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "search search search"
      "account topic year";
    gap: 14px 8px;
    align-items: end;
  }

  .nav-search {
    grid-area: search;
    width: 100%;
  }

  .account-actions {
    grid-area: account;
    width: 100%;
  }

  .topic-link {
    grid-area: topic;
    width: 100%;
  }

  .nav-select {
    grid-area: year;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .nav-select-label {
    display: none;
  }

  .year-menu-shell,
  .menu-dropdown {
    width: 100%;
  }

  .account-actions .ghost-link,
  .topic-link,
  .year-menu-trigger {
    width: 100%;
    min-width: 0;
    min-height: 62px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
  }

  .year-menu-trigger {
    padding-right: 32px;
  }

  .account-actions .ghost-link.is-hidden,
  .menu-dropdown.is-hidden {
    display: none;
  }
}
