:root {
  --bg: #f7f0df;
  --bg-accent: #f1d19b;
  --panel: rgba(255, 252, 246, 0.78);
  --panel-border: rgba(84, 51, 16, 0.12);
  --text: #24160b;
  --muted: #66513d;
  --gold: #dd8b1d;
  --gold-dark: #8d4f08;
  --red: #cb4953;
  --red-dark: #7a1921;
  --success: #157347;
  --danger: #a22331;
  --shadow: 0 22px 60px rgba(62, 38, 12, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100svh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.65), transparent 28%),
    radial-gradient(circle at bottom right, rgba(221, 139, 29, 0.22), transparent 25%),
    linear-gradient(135deg, var(--bg), #f4e3c4 45%, #f8f6ef);
}

@media (min-width: 921px) {
  body {
    overflow: hidden;
  }
}

.issue-report-link {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(84, 51, 16, 0.14);
  background: rgba(255, 252, 246, 0.68);
  color: var(--muted);
  font-size: 0.76rem;
  font: inherit;
  opacity: 0.58;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 24px rgba(62, 38, 12, 0.1);
  transition: opacity 140ms ease, transform 140ms ease, color 140ms ease;
  cursor: pointer;
}

.issue-report-link:hover,
.issue-report-link:focus-visible {
  opacity: 0.9;
  color: var(--text);
  transform: translateY(-1px);
}

.issue-report-open {
  overflow: hidden;
}

.issue-report-modal[hidden] {
  display: none;
}

.issue-report-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.issue-report-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(36, 22, 11, 0.34);
  backdrop-filter: blur(4px);
}

.issue-report-card {
  position: relative;
  z-index: 1;
  width: min(460px, calc(100% - 24px));
  margin: 10vh auto 0;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 252, 246, 0.96);
  box-shadow: var(--shadow);
}

.issue-report-head,
.issue-report-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.issue-report-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.issue-report-close,
.issue-report-cancel,
.issue-report-submit {
  border: 0;
  border-radius: 14px;
  font: inherit;
  cursor: pointer;
}

.issue-report-close {
  width: 36px;
  height: 36px;
  background: #efe7d6;
  color: var(--text);
}

.issue-report-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.issue-report-input {
  width: 100%;
  border: 1px solid rgba(84, 51, 16, 0.12);
  border-radius: 14px;
  padding: 11px 12px;
  font: inherit;
  color: var(--text);
  background: #fffdf8;
}

.issue-report-textarea {
  min-height: 140px;
  resize: vertical;
}

.issue-report-status {
  margin: 0;
  min-height: 1.2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.issue-report-cancel {
  padding: 10px 14px;
  background: #efe7d6;
  color: var(--text);
}

.issue-report-submit {
  padding: 10px 14px;
  background: linear-gradient(135deg, #1f7a52, #35a36d);
  color: #fff;
}

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

.app-shell {
  width: min(1480px, calc(100% - 24px));
  margin: 0 auto;
  min-height: 100svh;
  padding: 18px 0 16px;
}

.hero {
  margin-bottom: 16px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  line-height: 0.98;
}

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1.35fr) 280px;
  gap: 18px;
  align-items: start;
  min-height: calc(100svh - 112px);
}

.card-zone,
.panel-box {
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.card-zone {
  border-radius: 26px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.image-card {
  border-radius: 22px;
  overflow: hidden;
  background: #fffdf8;
  border: 1px solid rgba(84, 51, 16, 0.08);
  transform-origin: center;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.image-card.animate {
  animation: card-pop 360ms ease;
}

.image-frame {
  height: clamp(320px, 50svh, 560px);
  background: linear-gradient(180deg, rgba(221, 139, 29, 0.18), rgba(255, 255, 255, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

.empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.92), rgba(255, 248, 235, 0.94)),
    linear-gradient(180deg, rgba(255, 230, 184, 0.7), rgba(255, 245, 228, 0.94));
}

.hidden {
  display: none !important;
}

.empty-title {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 4vw, 2rem);
  font-weight: 700;
}

.empty-copy {
  margin: 0;
  max-width: 28rem;
  color: var(--muted);
  font-size: 1rem;
}

.current-title {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 249, 238, 0.96), rgba(247, 233, 203, 0.92));
  border: 1px solid rgba(84, 51, 16, 0.12);
  color: var(--gold-dark);
  text-align: center;
  font-size: clamp(0.98rem, 2vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 28px rgba(62, 38, 12, 0.08);
}

.remaining-counter {
  margin: 12px 0 0;
  text-align: center;
  color: var(--gold-dark);
  font-size: 0.86rem;
  font-weight: 700;
}

.feedback.success {
  color: var(--success);
}

.feedback.failure {
  color: var(--danger);
}

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

.premium-cluster {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: stretch;
  justify-items: stretch;
}

.vote-btn {
  border: 0;
  border-radius: 18px;
  padding: 13px 15px;
  color: #fffdf8;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, opacity 140ms ease;
}

.vote-btn:hover,
.vote-btn:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.vote-btn:disabled {
  cursor: default;
  opacity: 0.55;
  transform: none;
}

.vote-btn.cheese {
  background: linear-gradient(135deg, var(--gold), #f2b546);
}

.vote-btn.not-cheese {
  background: linear-gradient(135deg, var(--red), #ef6c77);
}

.vote-btn.premium {
  background: linear-gradient(135deg, #2a7048, #48a56f);
}

.vote-btn.premium.extra {
  background: linear-gradient(135deg, #0b5f78, #2c9fc3);
}

.premium-cluster .vote-btn {
  width: 100%;
}

.paypal-inline {
  width: 100%;
  padding: 8px 10px;
  border-radius: 16px;
  border: 1px solid rgba(21, 53, 122, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(239, 246, 255, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.paypal-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
}

.paypal-brand {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-style: italic;
  justify-content: center;
}

.paypal-logo {
  font-size: 1rem;
  line-height: 1;
}

.paypal-logo-blue {
  color: #169bd7;
}

.paypal-logo-navy {
  color: #15357a;
}

.paypal-button {
  min-height: 34px;
  margin-top: 6px;
}

.paypal-upcoming {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.paypal-placeholder-btn {
  width: 100%;
  max-width: none;
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #f2c469, #f5d68a);
  color: #694103;
  font: inherit;
  font-weight: 700;
  cursor: not-allowed;
}

.paypal-status {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.side-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.archive-panel {
  display: block;
  min-width: 0;
}

.winners-box {
  position: sticky;
  top: 18px;
  overflow: hidden;
  min-height: 0;
  padding: 14px;
  background:
    radial-gradient(circle at top left, rgba(255, 241, 207, 0.98), rgba(255, 252, 246, 0.84) 48%),
    linear-gradient(180deg, rgba(255, 231, 185, 0.82), rgba(255, 249, 240, 0.9));
}

.winners-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(221, 139, 29, 0.12), transparent 40%),
    radial-gradient(circle at bottom right, rgba(203, 73, 83, 0.12), transparent 32%);
  pointer-events: none;
}

.winners-head,
.winners-carousel,
.winners-meta {
  position: relative;
  z-index: 1;
}

.winners-head {
  margin-bottom: 14px;
}

.winners-label {
  margin: 0;
  color: var(--gold-dark);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.winners-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.32;
}

.winners-carousel {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
}

.winners-viewport {
  position: relative;
  min-height: 0;
  height: clamp(320px, 44svh, 500px);
  overflow: hidden;
}

.winners-track {
  display: flex;
  transition: transform 280ms ease;
  will-change: transform;
}

.winner-slide {
  flex: 0 0 100%;
}

.winner-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(84, 51, 16, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(250, 239, 215, 0.96)),
    #fffaf0;
  box-shadow: 0 18px 36px rgba(62, 38, 12, 0.14);
}

.winner-card::after {
  content: "";
  position: absolute;
  inset: auto -18% -28% auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(221, 139, 29, 0.22), transparent 70%);
  pointer-events: none;
}

.winner-badge-row {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  z-index: 1;
}

.winner-badge,
.winner-category {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(36, 22, 11, 0.72);
  color: #fff8eb;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.winner-category {
  background: rgba(141, 79, 8, 0.84);
}

.winner-card img {
  width: 100%;
  height: clamp(180px, 24svh, 240px);
  display: block;
  object-fit: cover;
  object-position: center;
  background: rgba(221, 139, 29, 0.12);
}

.winner-copy {
  position: relative;
  z-index: 1;
  padding: 14px 14px 16px;
}

.winner-copy p {
  margin: 0;
}

.winner-date {
  color: var(--red-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.winner-title {
  margin-top: 8px;
  font-size: 1.05rem;
  line-height: 1.05;
}

.winner-points {
  margin-top: 10px;
  color: var(--gold-dark);
  font-size: 0.95rem;
  font-weight: 700;
}

.winner-caption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.32;
}

.winners-nav {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff8ea, #efd5a3);
  color: var(--gold-dark);
  font-size: 1.4rem;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(62, 38, 12, 0.12);
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, opacity 140ms ease;
}

.winners-nav:hover,
.winners-nav:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.winners-nav:disabled {
  opacity: 0.42;
  cursor: default;
  transform: none;
  filter: none;
}

.winners-empty {
  min-height: 0;
  height: clamp(320px, 44svh, 500px);
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  border-radius: 24px;
  border: 1px dashed rgba(141, 79, 8, 0.28);
  background: rgba(255, 249, 240, 0.74);
  color: var(--gold-dark);
  text-align: center;
  font-weight: 700;
  line-height: 1.45;
}

.winners-meta {
  margin: 12px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.86rem;
}

.panel-box {
  border-radius: 26px;
  padding: 12px;
}

.upload-box {
  margin-top: 0;
}

.upload-toggle,
.upload-submit {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
}

.upload-toggle {
  background: #fff4d8;
  color: var(--gold-dark);
}

.moderation-toggle {
  margin-top: 10px;
}

.moderation-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  text-align: center;
  padding: 10px 12px;
  border-radius: 16px;
  background: #efe7d6;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.moderation-badge {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #a23137, #cf4f59);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
}

.upload-submit {
  background: linear-gradient(135deg, #1f7a52, #35a36d);
  color: #fff;
}

.upload-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.upload-input {
  width: 100%;
  border: 1px solid rgba(84, 51, 16, 0.12);
  border-radius: 14px;
  padding: 9px 11px;
  background: #fffdf8;
  color: var(--text);
}

.upload-status {
  margin: 0;
  min-height: 1.2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.moderation-panel {
  margin-top: 10px;
}

.moderation-shell {
  max-width: 1180px;
}

.moderation-page {
  display: block;
}

.moderation-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.moderation-toolbar .moderation-link {
  margin-top: 0;
  width: auto;
}

.moderation-reset-btn {
  border: 0;
  border-radius: 14px;
  padding: 11px 14px;
  background: linear-gradient(135deg, #a23137, #cf4f59);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.moderation-reset-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

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

.moderation-list {
  display: grid;
  gap: 10px;
}

.moderation-item {
  border: 1px solid rgba(84, 51, 16, 0.12);
  border-radius: 16px;
  padding: 10px;
  background: #fffdf8;
}

.moderation-item img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(221, 139, 29, 0.12);
}

.moderation-title {
  margin: 8px 0 4px;
  font-weight: 700;
}

.moderation-meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.moderation-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.moderation-btn {
  border: 0;
  border-radius: 12px;
  padding: 10px;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.moderation-btn.approve {
  background: linear-gradient(135deg, #1f7a52, #35a36d);
}

.moderation-btn.reject {
  background: linear-gradient(135deg, #a23137, #cf4f59);
}

.leader-label {
  margin: 0 0 6px;
  padding: 7px 9px;
  border-radius: 14px;
  background: rgba(221, 139, 29, 0.14);
  color: var(--gold-dark);
  text-align: center;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.leader-card {
  display: block;
}

.leader-card img {
  width: 100%;
  height: clamp(190px, 23svh, 250px);
  object-fit: contain;
  object-position: center center;
  border-radius: 18px;
  display: block;
  background: rgba(221, 139, 29, 0.15);
}

.leader-empty {
  min-height: clamp(190px, 23svh, 250px);
  margin: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(255, 228, 170, 0.9), rgba(221, 139, 29, 0.28)),
    rgba(221, 139, 29, 0.12);
  color: var(--gold-dark);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.leader-points {
  margin: 8px 0 0;
  text-align: center;
  color: var(--gold-dark);
  font-size: 0.84rem;
  font-weight: 700;
}

@keyframes card-pop {
  0% {
    transform: scale(0.98) rotate(-0.6deg);
  }
  50% {
    transform: scale(1.01) rotate(0.4deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

@media (max-width: 920px) {
  body {
    overflow: auto;
  }

  .app-shell {
    min-height: auto;
    padding: 10px 0;
  }

  .hero {
    margin-bottom: 12px;
  }

  .layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .archive-panel {
    order: 1;
  }

  .card-zone {
    order: 2;
  }

  .side-panel {
    order: 3;
  }

  .winners-box {
    position: static;
    height: auto;
  }

  .winners-viewport,
  .winners-empty {
    min-height: 360px;
    height: 360px;
  }

  .leader-card img {
    height: 200px;
  }

  .leader-empty {
    min-height: 200px;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 14px, 100%);
    min-height: auto;
    padding-top: 10px;
  }

  .hero {
    margin-bottom: 10px;
  }

  .card-zone {
    order: 1;
  }

  .archive-panel {
    order: 2;
  }

  .side-panel {
    order: 3;
  }

  .card-zone,
  .panel-box {
    border-radius: 20px;
  }

  .winners-carousel {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
  }

  .winners-nav {
    width: 36px;
    height: 36px;
  }

  .winner-card img {
    height: 200px;
  }

  .winners-viewport,
  .winners-empty {
    min-height: 320px;
  }

  .leader-card img {
    width: 100%;
    height: 170px;
  }

  .leader-empty {
    min-height: 170px;
    font-size: 0.95rem;
  }

  .image-frame {
    height: 52vh;
  }

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

  .premium-cluster {
    grid-template-columns: 1fr;
  }

  .paypal-inline {
    width: 100%;
  }

  .vote-btn {
    min-height: 52px;
  }

  .issue-report-link {
    right: 12px;
    bottom: 12px;
    padding: 7px 10px;
    font-size: 0.72rem;
  }
}
