:root {
  --ivory: #fff8ea;
  --paper: #fffdf6;
  --linen: #f4e6c7;
  --gold: #b8892e;
  --gold-soft: #e4c574;
  --brown: #24140d;
  --mahogany: #5a1f16;
  --copper: #a85a2a;
  --green: #198447;
  --green-deep: #0f4f32;
  --red: #c62828;
  --blue: #1457a8;
  --white: #ffffff;
  --muted: #6f6258;
  --border: #dfc894;
  --line: rgba(90, 31, 22, 0.14);
  --shadow: 0 22px 55px rgba(36, 20, 13, 0.16);
  --shadow-soft: 0 12px 28px rgba(36, 20, 13, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--brown);
}

body {
  margin: 0;
  color: var(--brown);
  background:
    linear-gradient(90deg, rgba(20, 87, 168, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(25, 132, 71, 0.08), transparent 22rem),
    linear-gradient(180deg, var(--ivory), #f1dfb8 58%, #e7ca88);
  background-size: 44px 44px, auto, auto;
  font-family: Arial, Helvetica, sans-serif;
}

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

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

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

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

main {
  min-height: calc(100vh - 82px);
}

.site-footer {
  position: relative;
  overflow: hidden;
  border-top: 4px solid var(--gold);
  background:
    linear-gradient(115deg, rgba(90, 31, 22, 0.94), rgba(36, 20, 13, 0.98) 58%),
    var(--brown);
  color: rgba(255, 253, 246, 0.82);
}

.site-footer::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(228, 197, 116, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  pointer-events: none;
}

.footer-inner,
.footer-bottom {
  position: relative;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.7fr) minmax(220px, 0.68fr);
  gap: clamp(2rem, 4vw, 4rem);
  padding: 3.4rem 0 2.8rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  align-self: start;
  gap: 1rem;
}

.footer-logo {
  flex: 0 0 auto;
}

.footer-logo img {
  display: block;
  width: 104px;
  height: 104px;
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.32));
  transition: transform 180ms ease;
}

.footer-logo:hover img {
  transform: translateY(-3px);
}

.footer-brand strong {
  display: block;
  color: var(--white);
  font-size: 1.08rem;
  line-height: 1.35;
}

.footer-brand p {
  margin: 0.42rem 0 0;
  color: var(--gold-soft);
  font-size: 0.84rem;
  font-weight: 700;
}

.footer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(228, 197, 116, 0.24);
}

.footer-heading h2 {
  margin: 0;
  color: var(--white);
  font-size: 1rem;
}

.footer-heading a {
  color: var(--gold-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.footer-heading a:hover {
  color: var(--white);
}

.footer-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.72rem 1.35rem;
}

.footer-category-grid a {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr);
  align-items: start;
  gap: 0.52rem;
  color: rgba(255, 253, 246, 0.76);
  font-size: 0.78rem;
  line-height: 1.35;
  transition: color 150ms ease, transform 150ms ease;
}

.footer-category-grid a span {
  width: 7px;
  height: 7px;
  margin-top: 0.22rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 2px rgba(228, 197, 116, 0.16);
}

.footer-category-grid a:hover {
  color: var(--white);
  transform: translateX(3px);
}

.footer-contact h2 {
  margin: 0 0 1.1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(228, 197, 116, 0.24);
  color: var(--white);
  font-size: 1rem;
}

.footer-contact-list {
  display: grid;
  gap: 0.7rem;
}

.footer-contact-list a,
.footer-contact-list address {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
  margin: 0;
  color: rgba(255, 253, 246, 0.8);
  font-size: 0.78rem;
  font-style: normal;
  line-height: 1.45;
}

.footer-contact-list svg {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(228, 197, 116, 0.28);
  border-radius: 50%;
  padding: 0.42rem;
  color: var(--gold-soft);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.footer-contact-list strong,
.footer-contact-list small {
  display: block;
}

.footer-contact-list strong {
  overflow-wrap: anywhere;
  color: var(--white);
  font-size: 0.8rem;
}

.footer-contact-list small {
  margin-top: 0.08rem;
  color: var(--gold-soft);
  font-size: 0.68rem;
  font-weight: 700;
}

.footer-contact-list a {
  transition: color 150ms ease, transform 150ms ease;
}

.footer-contact-list a:hover {
  color: var(--white);
  transform: translateX(3px);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(228, 197, 116, 0.2);
  padding: 1.15rem 0 1.35rem;
  font-size: 0.76rem;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom strong {
  color: var(--gold-soft);
}

.footer-heart {
  color: #e04a3f;
  font-size: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 82px;
  padding: 0.65rem clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid rgba(184, 137, 46, 0.32);
  background: rgba(255, 253, 246, 0.9);
  box-shadow: 0 10px 28px rgba(36, 20, 13, 0.08);
  backdrop-filter: blur(18px);
}

.brand,
.top-nav,
.top-nav a,
.icon-link,
.button,
.admin-title,
.stat-line,
.result-head,
.country-chip,
.category-label,
.section-pill,
.socials a,
.result-panel .muted {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.72rem;
  min-width: 0;
}

.brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(90, 31, 22, 0.18));
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: var(--mahogany);
  font-size: 1rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.top-nav {
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-nav a,
.icon-link {
  position: relative;
  isolation: isolate;
  gap: 0.45rem;
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(184, 137, 46, 0.4);
  padding: 0.58rem 0.84rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 248, 234, 0.64)),
    rgba(255, 255, 255, 0.62);
  color: var(--mahogany);
  font-size: 0.9rem;
  font-weight: 850;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 8px 18px rgba(36, 20, 13, 0.06);
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.top-nav a:hover,
.icon-link:hover {
  transform: translateY(-2px);
  border-color: rgba(184, 137, 46, 0.72);
  background:
    linear-gradient(180deg, var(--white), rgba(255, 248, 234, 0.78)),
    var(--white);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 12px 24px rgba(36, 20, 13, 0.11);
}

.top-nav a:focus-visible,
.icon-link:focus-visible,
.button:focus-visible,
.share-button:focus-visible {
  outline: 3px solid rgba(184, 137, 46, 0.28);
  outline-offset: 3px;
}

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 3.5rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(250px, 0.65fr);
  align-items: center;
  gap: 2rem;
  min-height: 520px;
  padding: 2rem 0 2.4rem;
}

.hero-copy {
  position: relative;
  padding: 1rem 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  border: 1px solid rgba(184, 137, 46, 0.46);
  border-radius: 8px;
  padding: 0.3rem 0.68rem;
  background: rgba(255, 253, 246, 0.7);
  color: var(--green-deep);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1,
.page-title h1 {
  margin: 0.82rem 0 0;
  color: var(--mahogany);
  font-size: 4rem;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 760px;
}

.hero p,
.page-title p {
  margin: 1rem 0 0;
  max-width: 700px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.72;
}

.hero-emblem {
  position: relative;
  justify-self: center;
  display: grid;
  place-items: center;
  width: min(100%, 360px);
  aspect-ratio: 1;
  border: 1px solid rgba(184, 137, 46, 0.42);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255, 253, 246, 0.75), rgba(244, 230, 199, 0.48)),
    repeating-conic-gradient(from 0deg, rgba(184, 137, 46, 0.18) 0 7deg, transparent 7deg 14deg);
  box-shadow: var(--shadow);
}

.hero-logo {
  width: min(82%, 292px);
  height: auto;
  filter: drop-shadow(0 22px 24px rgba(36, 20, 13, 0.28));
}

.hero-stats,
.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.hero-stats {
  max-width: 580px;
  margin-top: 1.6rem;
}

.hero-stats div,
.admin-stats div {
  min-height: 92px;
  border: 1px solid rgba(184, 137, 46, 0.34);
  border-radius: 8px;
  padding: 0.85rem;
  background: rgba(255, 253, 246, 0.78);
  box-shadow: var(--shadow-soft);
}

.hero-stats svg {
  color: var(--green-deep);
  margin-bottom: 0.35rem;
}

.hero-stats strong,
.admin-stats strong {
  display: block;
  color: var(--mahogany);
  font-size: 1.65rem;
  line-height: 1;
}

.hero-stats span,
.admin-stats span {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-stats.compact {
  max-width: none;
  margin-top: 1.4rem;
}

.hero-stats.compact div {
  min-height: 86px;
}

.section-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.7rem 0 1rem;
}

.section-heading {
  margin: 0.45rem 0 0;
  color: var(--brown);
  font-size: 1.45rem;
  line-height: 1.15;
}

.section-pill {
  gap: 0.42rem;
  min-height: 38px;
  border: 1px solid rgba(25, 132, 71, 0.24);
  border-radius: 8px;
  padding: 0.5rem 0.76rem;
  background: rgba(25, 132, 71, 0.1);
  color: var(--green-deep);
  font-weight: 800;
  font-size: 0.86rem;
}

.category-grid,
.participant-grid,
.admin-grid,
.form-grid {
  display: grid;
  gap: 1rem;
}

.category-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.35rem;
}

.category-hero + .category-grid {
  margin-top: 1.35rem;
}

.participant-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.category-strip {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
}

.category-strip a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  border: 1px solid rgba(184, 137, 46, 0.34);
  border-radius: 8px;
  padding: 0.54rem 0.74rem;
  background: rgba(255, 253, 246, 0.76);
  color: var(--mahogany);
  font-size: 0.88rem;
  font-weight: 800;
}

.category-strip span {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--category-color, var(--green));
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin: 1rem 0 1.2rem;
  border: 1px solid rgba(184, 137, 46, 0.3);
  border-radius: 8px;
  padding: 0.82rem;
  background:
    linear-gradient(180deg, rgba(255, 253, 246, 0.86), rgba(255, 248, 234, 0.64)),
    rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-soft);
}

.filter-bar label {
  color: var(--mahogany);
  font-size: 0.88rem;
  font-weight: 900;
}

.category-select-bar .filter-control select {
  min-width: min(360px, 100%);
}

.filter-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.filter-control select {
  min-width: min(250px, 100%);
  min-height: 42px;
  border: 1px solid rgba(184, 137, 46, 0.42);
  border-radius: 8px;
  padding: 0 2.4rem 0 0.82rem;
  background:
    linear-gradient(180deg, var(--white), rgba(255, 248, 234, 0.76)),
    var(--white);
  color: var(--mahogany);
  font-weight: 850;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 7px 16px rgba(36, 20, 13, 0.06);
}

.filter-control select:focus-visible,
.filter-reset:focus-visible {
  outline: 3px solid rgba(184, 137, 46, 0.28);
  outline-offset: 3px;
}

.filter-reset {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid rgba(90, 31, 22, 0.18);
  border-radius: 8px;
  padding: 0 0.78rem;
  background: rgba(255, 255, 255, 0.62);
  color: var(--mahogany);
  font-size: 0.84rem;
  font-weight: 900;
}

.filter-reset:hover {
  border-color: rgba(184, 137, 46, 0.58);
  background: var(--white);
}

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

.card,
.admin-panel,
.login-box {
  border: 1px solid rgba(184, 137, 46, 0.32);
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.86);
  box-shadow: var(--shadow-soft);
}

.card {
  overflow: hidden;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(184, 137, 46, 0.65);
  box-shadow: var(--shadow);
}

.category-card,
.participant-body,
.admin-panel,
.login-box {
  padding: 1.05rem;
}

.category-card {
  position: relative;
  display: grid;
  min-height: 210px;
  align-content: space-between;
}

.category-accent {
  width: 54px;
  height: 6px;
  border-radius: 8px;
  background: var(--category-color, var(--green));
  box-shadow: 0 0 0 4px rgba(184, 137, 46, 0.1);
}

.category-label {
  gap: 0.35rem;
  width: fit-content;
  color: var(--green-deep);
  font-size: 0.78rem;
  font-weight: 800;
}

.category-card h2,
.participant-body h2,
.admin-panel h2 {
  margin: 0.75rem 0 0.38rem;
  color: var(--mahogany);
  font-size: 1.22rem;
  line-height: 1.2;
}

.category-card p,
.participant-body p,
.muted {
  color: var(--muted);
  line-height: 1.58;
}

.participant-body {
  display: grid;
  gap: 0.72rem;
}

.participant-body h2 {
  margin-bottom: 0;
}

.participant-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.participant-card {
  background: var(--paper);
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 420ms ease,
    transform 420ms ease,
    box-shadow 180ms ease;
}

.participant-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.participant-card:hover {
  box-shadow: 0 24px 52px rgba(36, 20, 13, 0.16);
}

.participant-media,
.detail-media {
  position: relative;
  overflow: hidden;
}

.participant-media-link {
  display: block;
  cursor: pointer;
}

.participant-media-link .participant-photo,
.participant-media-link .placeholder-photo {
  transition:
    transform 260ms ease,
    filter 260ms ease;
}

.participant-media-link:hover .participant-photo,
.participant-media-link:hover .placeholder-photo,
.participant-media-link:focus-visible .participant-photo,
.participant-media-link:focus-visible .placeholder-photo {
  transform: scale(1.035);
  filter: saturate(1.05);
}

.participant-media-link:focus-visible,
.participant-name-link:focus-visible {
  outline: 3px solid rgba(184, 137, 46, 0.34);
  outline-offset: 3px;
}

.participant-name-link {
  color: inherit;
  transition: color 160ms ease;
}

.participant-name-link:hover {
  color: var(--copper);
}

.participant-media::after,
.detail-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(36, 20, 13, 0.42));
  pointer-events: none;
}

.participant-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(184, 137, 46, 0.28), rgba(20, 87, 168, 0.12));
}

.placeholder-photo {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, rgba(25, 132, 71, 0.24), rgba(184, 137, 46, 0.24)),
    linear-gradient(180deg, var(--paper), var(--linen));
  color: var(--mahogany);
  font-size: 3rem;
  font-weight: 800;
}

.result-head {
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 0.2rem;
}

.result-head strong {
  color: var(--mahogany);
  font-size: 1.28rem;
}

.rank {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  border-radius: 50%;
  padding: 0 0.5rem;
  background: linear-gradient(135deg, var(--gold), var(--copper));
  color: var(--white);
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(90, 31, 22, 0.18);
}

.rank-floating {
  position: absolute;
  left: 0.85rem;
  top: 0.85rem;
  z-index: 2;
}

.country-chip {
  gap: 0.35rem;
  width: fit-content;
  border: 1px solid rgba(25, 132, 71, 0.22);
  border-radius: 8px;
  padding: 0.36rem 0.62rem;
  background: rgba(25, 132, 71, 0.09);
  color: var(--green-deep);
  font-weight: 800;
  font-size: 0.84rem;
}

.vote-total {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.gauge {
  height: 12px;
  overflow: hidden;
  border: 1px solid rgba(184, 137, 46, 0.24);
  border-radius: 999px;
  background: rgba(223, 200, 148, 0.42);
}

.gauge span {
  display: block;
  height: 100%;
  width: 0;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold-soft), var(--gold));
  transition: width 900ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.gauge.is-filled span {
  width: var(--percentage, 0%);
}

.button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: fit-content;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.68rem 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 45%),
    linear-gradient(135deg, var(--green), var(--green-deep));
  color: var(--white);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 12px 26px rgba(15, 79, 50, 0.24),
    0 2px 0 rgba(15, 79, 50, 0.34);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease,
    opacity 160ms ease;
}

.button-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: currentColor;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.share-button .button-icon,
.icon-link .button-icon {
  width: 1.72rem;
  height: 1.72rem;
  background: rgba(184, 137, 46, 0.16);
  color: var(--mahogany);
}

.button-icon-svg {
  width: 1.12rem;
  height: 1.12rem;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#icon-facebook path {
  fill: currentColor;
  stroke: none;
}

.primary-share .button-icon {
  background: rgba(255, 255, 255, 0.22);
  color: var(--white);
}

.is-copied .button-icon,
.is-sharing .button-icon,
.is-voting .button-icon {
  background: rgba(25, 132, 71, 0.18);
  color: var(--green-deep);
}

.button::after,
.primary-share::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: 7px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 38%);
  pointer-events: none;
}

.button:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 18px 34px rgba(15, 79, 50, 0.28),
    0 2px 0 rgba(15, 79, 50, 0.36);
}

.button:active {
  transform: translateY(0);
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.14),
    0 8px 18px rgba(15, 79, 50, 0.2);
}

.button.secondary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 45%),
    linear-gradient(135deg, var(--mahogany), var(--brown));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 12px 26px rgba(90, 31, 22, 0.22),
    0 2px 0 rgba(36, 20, 13, 0.32);
}

.button.vote-cta {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 45%),
    linear-gradient(135deg, var(--mahogany), var(--brown));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 12px 26px rgba(90, 31, 22, 0.24),
    0 2px 0 rgba(36, 20, 13, 0.34);
}

.button.vote-cta:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 18px 34px rgba(90, 31, 22, 0.28),
    0 2px 0 rgba(36, 20, 13, 0.36);
}

.button.vote-cta.is-voted,
.button.vote-cta.is-voted:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 45%),
    linear-gradient(135deg, rgba(90, 31, 22, 0.62), rgba(36, 20, 13, 0.72));
}

.button.danger {
  width: 42px;
  min-height: 42px;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 45%),
    linear-gradient(135deg, var(--red), #8f1717);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 10px 22px rgba(198, 40, 40, 0.18);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
  box-shadow: none;
}

.button.is-voted:disabled {
  opacity: 0.86;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2rem;
  align-items: start;
  margin-top: 1.2rem;
}

.detail-media {
  border: 1px solid rgba(184, 137, 46, 0.34);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.detail-media .participant-photo,
.detail-media .placeholder-photo {
  aspect-ratio: 3 / 4;
}

.detail-content {
  border: 1px solid rgba(184, 137, 46, 0.28);
  border-radius: 8px;
  padding: 1.25rem;
  background: rgba(255, 253, 246, 0.78);
  box-shadow: var(--shadow-soft);
}

.category-hero {
  margin-top: 1rem;
  border: 1px solid rgba(184, 137, 46, 0.3);
  border-left: 6px solid var(--category-color, var(--green));
  border-radius: 8px;
  padding: 1.35rem;
  background:
    linear-gradient(135deg, rgba(255, 253, 246, 0.92), rgba(244, 230, 199, 0.72)),
    linear-gradient(90deg, rgba(25, 132, 71, 0.1), transparent);
  box-shadow: var(--shadow-soft);
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.socials a {
  gap: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.48rem 0.75rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--mahogany);
  font-weight: 800;
}

.share-panel {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0;
  border: 1px solid rgba(184, 137, 46, 0.3);
  border-radius: 8px;
  padding: 0.95rem;
  background:
    linear-gradient(135deg, rgba(255, 253, 246, 0.86), rgba(244, 230, 199, 0.5)),
    linear-gradient(90deg, rgba(20, 87, 168, 0.05), transparent);
}

.share-panel h2 {
  margin: 0.5rem 0 0;
  color: var(--mahogany);
  font-size: 1.05rem;
  line-height: 1.2;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.share-button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 42px;
  border: 1px solid rgba(184, 137, 46, 0.42);
  border-radius: 8px;
  padding: 0.58rem 0.78rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 248, 234, 0.66)),
    rgba(255, 255, 255, 0.68);
  color: var(--mahogany);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 9px 18px rgba(36, 20, 13, 0.08);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.share-button.icon-only {
  width: 42px;
  min-width: 42px;
  padding: 0;
}

.share-button.icon-only .button-icon {
  margin: 0;
}

.share-button:hover {
  transform: translateY(-2px);
  border-color: rgba(184, 137, 46, 0.72);
  background:
    linear-gradient(180deg, var(--white), rgba(255, 248, 234, 0.74)),
    var(--white);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 13px 24px rgba(36, 20, 13, 0.12);
}

.share-button:active {
  transform: translateY(0);
}

.primary-share {
  border-color: transparent;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 45%),
    linear-gradient(135deg, var(--gold), var(--copper));
  color: var(--white);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 12px 24px rgba(168, 90, 42, 0.22),
    0 2px 0 rgba(90, 31, 22, 0.22);
}

.primary-share:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 45%),
    linear-gradient(135deg, var(--gold-soft), var(--copper));
}

.compact-share {
  display: inline-flex;
  gap: 0.46rem;
}

.compact-share .share-button {
  min-height: 38px;
  padding: 0.48rem 0.62rem;
  box-shadow: none;
}

.compact-share .share-button.icon-only {
  width: 40px;
  min-width: 40px;
  padding: 0;
}

.compact-share .primary-share {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 234, 0.7)),
    rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(184, 137, 46, 0.42);
  color: var(--mahogany);
  box-shadow: none;
}

.compact-share .primary-share .button-icon {
  background: rgba(184, 137, 46, 0.16);
  color: var(--mahogany);
}

.result-panel {
  display: grid;
  gap: 0.72rem;
  margin: 1rem 0;
  border: 1px solid rgba(184, 137, 46, 0.3);
  border-radius: 8px;
  padding: 0.95rem;
  background: rgba(244, 230, 199, 0.38);
}

.result-panel .result-head {
  margin: 0;
}

.result-panel .result-head span {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: var(--green-deep);
  font-weight: 900;
}

.result-panel .muted {
  gap: 0.35rem;
  margin: 0;
}

.vote-message {
  margin: 0.7rem 0 0;
  color: var(--mahogany);
  font-weight: 800;
}

.flash-shell {
  padding-bottom: 0;
}

.flash-message {
  border: 1px solid rgba(184, 137, 46, 0.34);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  background: rgba(255, 253, 246, 0.9);
  color: var(--mahogany);
  box-shadow: var(--shadow-soft);
  font-weight: 800;
}

.flash-message.success {
  border-color: rgba(25, 132, 71, 0.34);
  color: var(--green-deep);
}

.flash-message.warning {
  border-color: rgba(198, 40, 40, 0.28);
  color: var(--red);
}

.toast-stack {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 80;
  display: grid;
  gap: 0.7rem;
  width: min(380px, calc(100vw - 2rem));
  pointer-events: none;
}

.toast-message {
  transform: translateY(12px);
  opacity: 0;
  border: 1px solid rgba(184, 137, 46, 0.34);
  border-radius: 8px;
  padding: 0.88rem 1rem;
  background:
    linear-gradient(180deg, rgba(255, 253, 246, 0.96), rgba(255, 248, 234, 0.94)),
    var(--paper);
  color: var(--mahogany);
  box-shadow: 0 18px 44px rgba(36, 20, 13, 0.18);
  font-weight: 850;
  line-height: 1.35;
  transition:
    transform 220ms ease,
    opacity 220ms ease;
}

.toast-message.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.toast-message.success {
  border-color: rgba(25, 132, 71, 0.34);
  color: var(--green-deep);
}

.toast-message.warning,
.toast-message.error {
  border-color: rgba(198, 40, 40, 0.28);
  color: var(--red);
}

.login-page {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 82px);
  padding: 1rem;
}

.login-page > div {
  display: grid;
  justify-items: center;
  width: min(440px, 100%);
}

.login-box {
  width: 100%;
}

.field {
  display: grid;
  gap: 0.38rem;
}

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

.full {
  grid-column: 1 / -1;
}

.field label,
.field span {
  color: var(--brown);
  font-weight: 800;
  font-size: 0.88rem;
}

.field small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(184, 137, 46, 0.42);
  border-radius: 8px;
  padding: 0.66rem 0.76rem;
  background: rgba(255, 255, 255, 0.84);
  color: var(--brown);
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(184, 137, 46, 0.14);
}

.field textarea {
  min-height: 116px;
  resize: vertical;
}

.admin-title {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-stats {
  margin: 1rem 0;
}

.admin-stats div {
  display: grid;
  gap: 0.38rem;
}

.admin-stats svg {
  color: var(--green-deep);
}

.admin-list {
  display: grid;
  gap: 0.75rem;
}

.admin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
  align-items: center;
  border: 1px solid rgba(184, 137, 46, 0.28);
  border-radius: 8px;
  padding: 0.82rem;
  background: rgba(255, 249, 237, 0.7);
}

.admin-row strong {
  color: var(--mahogany);
}

.category-admin-row {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.admin-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.admin-edit {
  border-top: 1px solid rgba(184, 137, 46, 0.22);
  padding-top: 0.65rem;
}

.admin-edit summary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 38px;
  color: var(--mahogany);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 900;
  list-style: none;
}

.admin-edit summary::-webkit-details-marker {
  display: none;
}

.admin-edit summary .button-icon {
  width: 1.65rem;
  height: 1.65rem;
}

.admin-edit[open] summary {
  color: var(--copper);
}

.admin-edit-form {
  margin-top: 0.8rem;
  border-top: 1px dashed rgba(184, 137, 46, 0.3);
  padding-top: 0.85rem;
}

.admin-edit-form .button {
  justify-self: start;
}

.stat-line {
  gap: 0.6rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}

.stat-line span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.card-actions {
  display: grid;
  gap: 0.66rem;
  margin-top: 0.15rem;
}

.card-vote-action form,
.card-vote-action .button {
  width: 100%;
}

.card-vote-action .button {
  min-height: 46px;
}

.card-secondary-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(148px, auto);
  gap: 0.58rem;
  align-items: center;
}

.card-secondary-actions .icon-link {
  justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 0.48rem 0.64rem;
  box-shadow: none;
}

.card-secondary-actions .compact-share {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  flex-wrap: nowrap;
  width: 100%;
}

.card-secondary-actions .compact-share .share-button {
  width: 100%;
}

.card-tool-link,
.compact-share .share-button {
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.6fr);
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .participant-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero h1,
  .page-title h1 {
    font-size: 3rem;
  }

  .hero {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .site-header,
  .hero,
  .detail-layout,
  .admin-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    display: grid;
  }

  .top-nav {
    justify-content: stretch;
  }

  .top-nav a {
    flex: 1;
    justify-content: center;
  }

  .page-shell {
    width: min(100% - 1rem, 1180px);
    padding-top: 1.2rem;
  }

  .hero {
    gap: 1rem;
    padding-top: 0.5rem;
  }

  .hero h1,
  .page-title h1 {
    font-size: 2.35rem;
  }

  .hero-stats,
  .hero-stats.compact,
  .admin-stats {
    grid-template-columns: 1fr;
  }

  .hero-emblem {
    width: min(100%, 250px);
  }

  .section-title-row,
  .admin-title,
  .filter-bar {
    display: grid;
    align-items: start;
  }

  .filter-control,
  .filter-control select,
  .filter-reset {
    width: 100%;
  }

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

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

  .card-secondary-actions .compact-share {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .card-secondary-actions .compact-share .share-button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .footer-inner,
  .footer-bottom {
    width: min(100% - 1.5rem, 1180px);
  }

  .footer-inner {
    padding-top: 2.4rem;
  }

  .footer-brand {
    align-items: flex-start;
  }

  .footer-logo img {
    width: 78px;
    height: 78px;
  }

  .footer-category-grid {
    grid-template-columns: 1fr;
  }

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