:root {
  --bg: #121212;
  --bg-soft: #1d1d1d;
  --bg-panel: #f8f4ee;
  --bg-panel-2: #f0e8dd;
  --bg-panel-dark: #241d1a;
  --ink: #231b17;
  --ink-soft: #655952;
  --ink-muted: #96877f;
  --line: #d4c7bb;
  --line-strong: #c1492f;
  --gold: #c88c3a;
  --gold-soft: #e6c085;
  --red: #b2351d;
  --red-deep: #7f2212;
  --white: #fffdf9;
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background:
    radial-gradient(circle at top, rgba(200, 140, 58, 0.16), transparent 30%),
    linear-gradient(180deg, #0f0f10 0%, #161413 24%, #201816 100%);
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 12%),
    radial-gradient(circle at 25% 18%, rgba(255, 255, 255, 0.04), transparent 20%);
  opacity: 0.7;
}

h1,
h2,
h3,
h4,
strong {
  font-family: Georgia, "Times New Roman", serif;
}

p,
li,
span,
input,
textarea,
select,
button,
th,
td {
  letter-spacing: 0.01em;
}

.page-shell {
  min-height: 100vh;
  position: relative;
  overflow-x: clip;
}

.ember-field {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
  mix-blend-mode: screen;
}

.ember {
  position: absolute;
  left: calc(var(--ember-origin-x) - (var(--ember-size) / 2));
  bottom: var(--ember-origin-y);
  width: var(--ember-size);
  height: var(--ember-size);
  border-radius: 999px;
  opacity: 0;
  background:
    radial-gradient(circle, rgba(255, 245, 222, 0.98) 0%, rgba(255, 199, 108, 0.95) 32%, rgba(198, 73, 33, 0.58) 68%, rgba(198, 73, 33, 0) 100%);
  box-shadow:
    0 0 14px rgba(255, 161, 76, 0.42),
    0 0 28px rgba(194, 73, 28, 0.18);
  filter: blur(var(--ember-blur));
  transform-origin: center;
  transform: translate3d(0, 0, 0) rotate(var(--ember-rotation)) scale(0.24);
  will-change: transform, opacity;
  animation:
    ember-rise var(--ember-duration) linear infinite,
    ember-flicker 2.6s ease-in-out infinite;
  animation-delay: var(--ember-delay), var(--ember-delay);
}

.ember::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 42%;
  width: calc(var(--ember-size) * 3.8);
  height: max(1px, calc(var(--ember-size) * 0.52));
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 230, 184, 0), rgba(255, 203, 122, 0.6), rgba(198, 73, 33, 0));
  transform: translateY(-50%) rotate(-16deg);
  transform-origin: right center;
  opacity: 0.32;
  filter: blur(calc(var(--ember-blur) + 0.22px));
}

.ember::after {
  content: "";
  position: absolute;
  inset: -38%;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(255, 236, 186, 0.95), rgba(255, 236, 186, 0) 72%);
  opacity: 0.75;
}

.ember--1 {
  animation-duration: calc(var(--ember-duration) * 1.08), 2.2s;
}

.ember--2 {
  animation-duration: calc(var(--ember-duration) * 0.92), 3s;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background:
    linear-gradient(180deg, rgba(14, 14, 15, 0.96), rgba(18, 18, 18, 0.92));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.22);
}

.site-header__inner {
  width: min(1240px, calc(100% - 32px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
}

.brand-mark__image {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.28));
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-kicker {
  color: rgba(255, 255, 255, 0.68);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

.brand-title {
  color: var(--white);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.header-user {
  position: relative;
  display: grid;
  justify-items: end;
  padding-bottom: 12px;
  margin-bottom: -12px;
}

.header-user::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  width: min(360px, calc(100vw - 32px));
  height: 18px;
}

.header-user__trigger {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.header-user__trigger:hover .header-user__name,
.header-user__trigger:focus-visible .header-user__name {
  color: var(--gold-soft);
}

.header-user__card {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(247, 239, 229, 0.98), rgba(236, 225, 210, 0.98));
  border: 1px solid rgba(212, 199, 187, 0.94);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 15;
}

.header-user:hover .header-user__card,
.header-user:focus-within .header-user__card {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.header-user__card-head {
  display: grid;
  gap: 4px;
}

.header-user__card-head strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.header-user__card-head span {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.header-user__details {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.header-user__detail {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(203, 188, 173, 0.92);
  color: var(--ink);
}

.header-user__detail-label {
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
}

.header-user__hint {
  margin: 14px 0 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.header-user__logout {
  margin-top: 14px;
  width: 100%;
}

.header-user__name {
  color: var(--white);
  font-size: 0.96rem;
  transition: color 140ms ease;
}

.header-user__meta {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
}

.page-inner {
  position: relative;
  z-index: 4;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.flash {
  margin-bottom: 18px;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  color: var(--white);
  box-shadow: var(--shadow);
}

.flash--notice {
  background: linear-gradient(135deg, #8f311c, #c65330);
}

.flash--error {
  background: linear-gradient(135deg, #692117, #a6352d);
}

.hero-stage {
  display: grid;
  gap: 22px;
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: rgba(255, 249, 242, 0.82);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 140ms ease, border-color 140ms ease, color 140ms ease;
}

.page-nav__link:hover,
.page-nav__link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(230, 192, 133, 0.46);
  color: var(--white);
}

.page-nav__link--active {
  color: #2d1f19;
  background: linear-gradient(180deg, #f7e9d6, #e7d0aa);
  border-color: rgba(231, 208, 170, 0.95);
}

.feature-card {
  --feature-art: none;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.95fr);
  gap: 22px;
  border-radius: calc(var(--radius-xl) + 2px);
  padding: 32px;
  background:
    linear-gradient(115deg, rgba(10, 10, 10, 0.9), rgba(29, 22, 19, 0.86) 52%, rgba(127, 34, 18, 0.76)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  color: var(--white);
  overflow: hidden;
  position: relative;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 75% 18%, rgba(255, 189, 103, 0.22), transparent 22%),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
  pointer-events: none;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--feature-art);
  background-size: cover;
  background-position: center;
  opacity: 0.28;
  transform: scale(1.03);
  filter: saturate(0.94) contrast(1.04);
  pointer-events: none;
}

.feature-card--loading {
  min-height: 260px;
  align-items: center;
}

.feature-card--entry {
  --feature-art: url("/assets/fantasy-scenes/castle-at-dusk.jpg");
}

.feature-card--dashboard {
  --feature-art: url("/assets/fantasy-scenes/castle-dragon-battle.jpg");
  grid-template-columns: 1fr;
}

.feature-card__content,
.feature-rail {
  position: relative;
  z-index: 2;
}

.feature-card--dashboard .feature-card__content {
  max-width: 74ch;
}

.feature-card h1 {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4.2rem);
  line-height: 0.95;
  max-width: 12ch;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
}

.feature-card__lead {
  max-width: 58ch;
  font-size: 1.04rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
}

.feature-badges,
.button-row,
.tag-row,
.split-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feature-badge,
.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
}

.feature-badge {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.tag-pill {
  color: #47271d;
  background: linear-gradient(180deg, #f6ede2, #ebdccd);
  border: 1px solid #d7c4af;
  line-height: 1.35;
}

.feature-rail {
  display: grid;
  gap: 14px;
}

.rail-card {
  border-radius: var(--radius-lg);
  padding: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.rail-card--compact {
  display: grid;
  gap: 4px;
  align-content: center;
}

.rail-card__title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: var(--gold-soft);
}

.rail-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.rail-metric {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.5rem;
  line-height: 1;
}

.rail-label {
  color: rgba(255, 255, 255, 0.72);
}

.panel h2,
.panel h3 {
  margin: 0;
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
}

.stat-card {
  border-radius: var(--radius-lg);
  padding: 22px;
  background: linear-gradient(180deg, rgba(248, 244, 238, 0.98), rgba(236, 226, 212, 0.98));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.stat-card strong {
  display: block;
  margin: 6px 0 8px;
  font-size: clamp(2.1rem, 4vw, 2.8rem);
  color: var(--red-deep);
}

.stat-card p {
  margin: 0;
  color: var(--ink-soft);
}

.stat-card__label,
.section-tag {
  display: inline-block;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.stat-card__label {
  color: var(--red);
}

.section-tag {
  margin-bottom: 12px;
  color: var(--gold-soft);
}

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

.content-grid--auth {
  align-items: start;
}

.panel {
  border-radius: var(--radius-xl);
  padding: 24px;
  background: linear-gradient(180deg, rgba(248, 244, 238, 1), rgba(241, 233, 222, 1));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

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

.panel--auth,
.panel--sidebar,
.panel--admin {
  align-self: stretch;
}

.panel__header {
  display: grid;
  gap: 2px;
  margin-bottom: 14px;
}

.panel__header .section-tag {
  color: var(--red);
}

.panel__intro,
.muted,
.list-card__meta {
  color: var(--ink-soft);
}

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

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

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

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #cbbcad;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(200, 140, 58, 0.32);
  border-color: var(--gold);
}

.button {
  appearance: none;
  border: 0;
  border-radius: 12px;
  min-height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: transform 140ms ease, filter 140ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.button--primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--red-deep), var(--red));
  box-shadow: 0 12px 30px rgba(127, 34, 18, 0.28);
}

.button--secondary {
  color: #4d2e20;
  background: linear-gradient(180deg, #f7e9d6, #e7d0aa);
  box-shadow: 0 12px 30px rgba(200, 140, 58, 0.2);
}

.button--danger {
  color: var(--white);
  background: linear-gradient(135deg, #762318, #b2351d);
  box-shadow: 0 12px 30px rgba(127, 34, 18, 0.22);
}

.info-list,
.list-stack {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.info-list li {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(140, 119, 102, 0.2);
}

.info-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.list-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(203, 188, 173, 0.9);
}

.list-card p {
  margin: 10px 0 8px;
}

.list-card__head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
}

.list-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.adventure-grid .list-card__actions {
  width: min(100%, 420px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  justify-content: center;
  gap: 10px;
  margin: 12px auto 0;
}

.adventure-grid .list-card__actions .button {
  width: 100%;
}

.adventure-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.adventure-side {
  display: grid;
  gap: 16px;
}

.adventure-calendar-card,
.adventure-form {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(203, 188, 173, 0.9);
}

.adventure-calendar-card {
  display: grid;
  gap: 14px;
  justify-items: center;
  align-content: center;
  text-align: center;
}

.adventure-calendar-card h3,
.adventure-form h3 {
  margin-top: 0;
  margin-bottom: 14px;
}

.adventure-calendar-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.adventure-calendar-card .button-row {
  width: min(100%, 320px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
  gap: 10px;
  margin: 0 auto;
}

.adventure-calendar-card .button {
  width: 100%;
}

.event-edit-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(140, 119, 102, 0.18);
}

.event-edit-form__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.event-edit-form__header strong {
  font-size: 1rem;
}

.council-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 18px;
  align-items: stretch;
}

.election-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.election-summary-card,
.council-side-note,
.election-card,
.election-stage {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(203, 188, 173, 0.9);
}

.election-summary-card strong {
  display: block;
  margin: 8px 0 10px;
  color: var(--red-deep);
  font-size: 1.1rem;
}

.election-summary-card p,
.council-side-note p {
  margin: 0;
  color: var(--ink-soft);
}

.council-side-note {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}

.council-side-note .rail-card__title,
.council-side-note .rail-list {
  margin-top: 0;
  margin-bottom: 0;
}

.election-summary-card__meta {
  margin-top: 10px;
  color: var(--ink-muted);
  font-size: 0.84rem;
}

.election-stage {
  display: grid;
  gap: 16px;
}

.election-stage--quiet {
  margin-bottom: 0;
}

.election-stage__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.election-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.election-card {
  display: grid;
  gap: 12px;
  background: linear-gradient(180deg, rgba(255, 251, 245, 0.92), rgba(239, 228, 211, 0.94));
}

.election-card--voted {
  border-color: rgba(200, 140, 58, 0.72);
  box-shadow: 0 10px 22px rgba(200, 140, 58, 0.16);
}

.election-card__head {
  display: grid;
  gap: 4px;
}

.election-card__head span {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.election-card__metrics {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 0.92rem;
}

.election-actions {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 8px;
  border-bottom: 1px solid rgba(140, 119, 102, 0.18);
  text-align: left;
}

th {
  font-size: 0.74rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.member-cell {
  display: grid;
  gap: 4px;
  min-width: 180px;
}

.member-cell strong {
  font-size: 0.98rem;
}

.member-cell__meta {
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.45;
}

.rank-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.rank-summary-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(203, 188, 173, 0.9);
}

.rank-summary-card strong {
  display: block;
  margin: 8px 0 10px;
  color: var(--red-deep);
  font-size: 1.1rem;
}

.rank-summary-card p {
  margin: 0;
  color: var(--ink-soft);
}

.rank-summary-card__label {
  display: inline-block;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
}

.rank-ladder {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.rank-card {
  --rank-panel-start: rgba(255, 255, 255, 0.58);
  --rank-panel-end: rgba(240, 232, 221, 0.94);
  --rank-crest-start: rgba(200, 140, 58, 0.24);
  --rank-crest-end: rgba(178, 53, 29, 0.94);
  --rank-accent: var(--red);
  --rank-glow: rgba(127, 34, 18, 0.14);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--rank-panel-start), var(--rank-panel-end));
  border: 1px solid rgba(203, 188, 173, 0.9);
  align-items: start;
  box-shadow: 0 14px 26px var(--rank-glow);
}

.rank-card--current {
  border-color: rgba(193, 73, 47, 0.65);
  box-shadow:
    0 0 0 1px rgba(193, 73, 47, 0.22),
    0 18px 34px var(--rank-glow);
}

.rank-card--next {
  border-color: rgba(200, 140, 58, 0.72);
}

.rank-card__crest-block {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.rank-card__crest {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--rank-crest-start), var(--rank-crest-end));
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.rank-card__sigil {
  color: var(--rank-accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  text-align: center;
  line-height: 1.35;
}

.rank-card__copy {
  display: grid;
  gap: 8px;
}

.rank-card__copy h3 {
  margin: 0;
}

.rank-card__copy p {
  margin: 0;
  color: var(--ink-soft);
}

.rank-card__state {
  color: var(--rank-accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}

.rank-card__threshold {
  color: var(--ink);
  font-weight: 700;
}

.rank-card__motto {
  font-style: italic;
  color: var(--rank-accent);
}

.rank-card__meta {
  color: var(--ink-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.achievement-panel {
  display: grid;
  gap: 24px;
}

.achievement-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.achievement-summary-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(203, 188, 173, 0.9);
  display: grid;
  gap: 8px;
}

.achievement-summary-card strong {
  font-size: 1.85rem;
  color: var(--red-deep);
}

.achievement-summary-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.achievement-summary-card__label {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}

.achievement-section {
  display: grid;
  gap: 16px;
}

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

.achievement-section__head h3 {
  margin: 0;
}

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

.achievement-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(250, 245, 237, 0.98), rgba(239, 229, 216, 0.98));
  border: 1px solid rgba(212, 199, 187, 0.94);
  box-shadow: 0 18px 34px rgba(24, 15, 12, 0.12);
  position: relative;
  overflow: hidden;
}

.achievement-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(200, 140, 58, 0.14), transparent 34%);
  pointer-events: none;
}

.achievement-card--earned {
  border-color: rgba(200, 140, 58, 0.54);
  box-shadow:
    0 18px 34px rgba(24, 15, 12, 0.12),
    0 0 0 1px rgba(200, 140, 58, 0.12) inset;
}

.achievement-card--hidden {
  background: linear-gradient(180deg, rgba(33, 27, 34, 0.98), rgba(53, 39, 45, 0.98));
  border-color: rgba(132, 105, 130, 0.45);
}

.achievement-card--hidden .achievement-card__copy p,
.achievement-card--hidden .achievement-card__details span:last-child {
  color: rgba(245, 235, 228, 0.82);
}

.achievement-card--hidden .achievement-card__label,
.achievement-card--hidden .achievement-card__eyebrow {
  color: rgba(224, 186, 115, 0.86);
}

.achievement-card--hidden h3 {
  color: var(--white);
}

.achievement-card--gold .achievement-card__icon-shell,
.achievement-card--mythic .achievement-card__icon-shell {
  box-shadow: 0 12px 24px rgba(200, 140, 58, 0.22);
}

.achievement-card__icon-shell {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: #7b291a;
  background: linear-gradient(180deg, rgba(250, 232, 204, 0.98), rgba(227, 197, 148, 0.96));
  border: 1px solid rgba(200, 140, 58, 0.32);
}

.achievement-card--hidden .achievement-card__icon-shell {
  color: #f4d89f;
  background: linear-gradient(180deg, rgba(86, 62, 85, 0.96), rgba(50, 35, 49, 0.98));
  border-color: rgba(160, 128, 164, 0.38);
}

.achievement-icon {
  width: 44px;
  height: 44px;
}

.achievement-card__copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.achievement-card__head {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
}

.achievement-card__head h3 {
  margin: 4px 0 0;
}

.achievement-card__eyebrow,
.achievement-card__label {
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
}

.achievement-card__copy p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.achievement-card__details {
  display: grid;
  gap: 10px;
}

.achievement-card__details div {
  display: grid;
  gap: 4px;
}

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

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

.admin-form {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(203, 188, 173, 0.9);
}

.admin-form h3,
.admin-banner h3 {
  margin-top: 0;
  margin-bottom: 14px;
}

.admin-banner {
  margin-top: 18px;
  border-radius: 18px;
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(48, 32, 27, 0.98), rgba(127, 34, 18, 0.92)),
    var(--bg-panel-dark);
}

.admin-banner .section-tag,
.admin-banner p {
  color: rgba(255, 255, 255, 0.82);
}

.debug-note {
  margin-top: 18px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 248, 236, 0.62);
  border: 1px dashed rgba(178, 53, 29, 0.38);
  display: grid;
  gap: 4px;
}

.debug-note strong {
  font-size: 2rem;
  letter-spacing: 0.08em;
  color: var(--red-deep);
}

.debug-note__label {
  color: var(--red);
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
}

.feature-rail--art {
  align-content: start;
}

.illustration-card {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 11, 12, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.illustration-card--wide {
  min-height: 220px;
}

.scene-card {
  position: relative;
  min-height: 100%;
}

.scene-illustration {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.scene-card__caption {
  position: absolute;
  inset: auto 16px 16px 16px;
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(16, 14, 15, 0.2), rgba(16, 14, 15, 0.84));
  color: rgba(255, 251, 245, 0.92);
  backdrop-filter: blur(6px);
}

.scene-card__caption strong {
  font-size: 1.05rem;
}

.scene-card__caption span:last-child {
  color: rgba(255, 249, 242, 0.74);
  line-height: 1.5;
  font-size: 0.9rem;
}

.scene-card__tag {
  display: inline-block;
  color: var(--gold-soft);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
}

.status-row,
.panel__actions,
.assignment-list,
.review-stack,
.review-grid {
  display: grid;
  gap: 14px;
}

.status-row {
  grid-template-columns: repeat(2, max-content);
  align-items: center;
  margin-bottom: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.status-pill--done {
  background: linear-gradient(180deg, #e4f0e6, #cadfce);
  color: #355841;
  border: 1px solid rgba(53, 88, 65, 0.18);
}

.status-pill--waiting {
  background: linear-gradient(180deg, #fff0dc, #efd8bc);
  color: #85512a;
  border: 1px solid rgba(133, 81, 42, 0.16);
}

.status-pill--live {
  background: linear-gradient(180deg, #f7dfdb, #efc3bc);
  color: #8f311c;
  border: 1px solid rgba(143, 49, 28, 0.18);
}

.status-pill--ghost {
  background: rgba(255, 255, 255, 0.52);
  color: var(--ink-soft);
  border: 1px solid rgba(140, 119, 102, 0.18);
}

.panel__aside-note {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.assignment-list {
  margin-top: 16px;
}

.assignment-card {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(203, 188, 173, 0.9);
}

.assignment-card .tag-pill {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.assignment-card__state {
  color: var(--ink-soft);
  font-size: 0.86rem;
  text-align: right;
}

.assignment-card__state--done {
  color: #355841;
  font-weight: 700;
}

.list-card--ritual strong {
  font-size: 1rem;
}

.list-card__meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 8px;
}

.review-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: start;
}

.review-form {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(203, 188, 173, 0.9);
  display: grid;
  gap: 14px;
}

.review-form__head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.review-form__head strong,
.review-form__head span {
  display: block;
}

.review-form__head span {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.star-rating {
  direction: rtl;
  display: inline-flex;
  gap: 4px;
  align-self: start;
}

.star-rating input {
  display: none;
}

.star-rating label {
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  color: #cfb89f;
  transition: transform 120ms ease, color 120ms ease;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
  color: #d18d2f;
}

.star-rating label:hover {
  transform: translateY(-1px);
}

@keyframes ember-rise {
  0% {
    transform: translate3d(0, 0, 0) rotate(var(--ember-rotation)) scale(0.18);
    opacity: 0;
  }

  4% {
    opacity: 0;
  }

  12% {
    opacity: var(--ember-opacity);
    transform: translate3d(calc(var(--ember-travel-x) * 0.18), calc(var(--ember-travel-y) * 0.16), 0)
      rotate(calc(var(--ember-rotation) - 4deg)) scale(0.48);
  }

  22% {
    opacity: calc(var(--ember-opacity) * 0.92);
    transform: translate3d(calc(var(--ember-travel-x) * 0.46), calc(var(--ember-travel-y) * 0.44), 0)
      rotate(calc(var(--ember-rotation) + 3deg)) scale(0.72);
  }

  32% {
    opacity: calc(var(--ember-opacity) * 0.78);
    transform: translate3d(calc(var(--ember-travel-x) * 0.76), calc(var(--ember-travel-y) * 0.8), 0)
      rotate(calc(var(--ember-rotation) + 9deg)) scale(var(--ember-scale-end));
  }

  42% {
    opacity: 0;
    transform: translate3d(var(--ember-travel-x), var(--ember-travel-y), 0)
      rotate(calc(var(--ember-rotation) + 14deg)) scale(calc(var(--ember-scale-end) * 1.04));
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--ember-travel-x), var(--ember-travel-y), 0)
      rotate(calc(var(--ember-rotation) + 14deg)) scale(calc(var(--ember-scale-end) * 1.04));
  }
}

@keyframes ember-flicker {
  0%,
  100% {
    filter: blur(var(--ember-blur)) brightness(0.92);
  }

  50% {
    filter: blur(var(--ember-blur)) brightness(1.24);
  }
}

@media (max-width: 1080px) {
  .ember-field {
    opacity: 0.72;
  }

  .ember:nth-child(2n) {
    display: none;
  }

  .feature-card,
  .content-grid,
  .stats-band,
  .admin-grid,
  .adventure-grid,
  .review-grid,
  .council-grid,
  .election-summary-grid,
  .achievement-summary-grid,
  .achievement-grid,
  .rank-summary-grid,
  .rank-ladder {
    grid-template-columns: 1fr;
  }

  .admin-banner,
  .site-header__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .header-user {
    justify-items: start;
  }

  .header-user__card {
    left: 0;
    right: auto;
  }
}

@media (max-width: 720px) {
  .ember-field {
    opacity: 0.58;
  }

  .page-inner,
  .site-header__inner {
    width: min(100% - 20px, 100%);
  }

  .feature-card,
  .panel,
  .stat-card {
    padding: 20px;
  }

  .feature-card h1 {
    font-size: 2.25rem;
  }

  .list-card__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .review-form__head,
  .event-edit-form__header,
  .election-stage__head,
  .achievement-card__head,
  .achievement-section__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .assignment-card {
    grid-template-columns: 1fr;
  }

  .assignment-card__state {
    text-align: left;
  }

  .status-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ember-field {
    display: none;
  }
}
