:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #667085;
  --paper: #f5fbf8;
  --panel: #ffffff;
  --line: #cfe1dc;
  --sun: #f6c445;
  --tomato: #ef6f6c;
  --blue: #277da1;
  --green: #3a9b7a;
  --violet: #5751a6;
  --mint: #e8f7ef;
  --sky: #e5f3fa;
  --aqua: #d7f2ed;
  --rose: #ffe8e5;
  --shadow: 0 20px 60px rgba(31, 41, 51, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

button {
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  font-weight: 800;
  min-height: 44px;
  padding: 0 18px;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

button:hover {
  box-shadow: 0 10px 24px rgba(31, 41, 51, 0.16);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

button:disabled:hover {
  box-shadow: none;
  transform: none;
}

button.secondary {
  background: var(--sky);
  color: var(--ink);
}

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

.app-header {
  align-items: center;
  background: rgba(245, 251, 248, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(207, 225, 220, 0.9);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 clamp(16px, 4vw, 48px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 10px;
  white-space: nowrap;
}

.brand span {
  display: inline-block;
  font-family: "League Spartan", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.72rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  transform: translateY(3px);
}

.brand-logo {
  display: block;
  height: 40px;
  width: 40px;
}

.top-nav {
  align-items: center;
  display: flex;
  gap: 8px;
}

.mobile-vote-link {
  display: none;
}

.nav-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  display: none;
  height: 40px;
  justify-content: center;
  min-height: 40px;
  padding: 0;
  position: relative;
  width: 40px;
}

.nav-toggle > span[aria-hidden="true"],
.nav-toggle > span[aria-hidden="true"]::before,
.nav-toggle > span[aria-hidden="true"]::after {
  background: currentColor;
  border-radius: 999px;
  content: "";
  display: block;
  height: 2px;
  position: absolute;
  transition: transform 160ms ease, opacity 160ms ease;
  width: 18px;
}

.nav-toggle > span[aria-hidden="true"] {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.nav-toggle > span[aria-hidden="true"]::before,
.nav-toggle > span[aria-hidden="true"]::after {
  left: 0;
  top: 0;
}

.nav-toggle > span[aria-hidden="true"]::before {
  transform: translateY(-6px);
}

.nav-toggle > span[aria-hidden="true"]::after {
  transform: translateY(6px);
}

.nav-toggle[aria-expanded="true"] > span[aria-hidden="true"] {
  transform: translate(-50%, -50%) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] > span[aria-hidden="true"]::before {
  opacity: 0;
  transform: translateY(0);
}

.nav-toggle[aria-expanded="true"] > span[aria-hidden="true"]::after {
  transform: rotate(90deg);
}

.top-nav a {
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 800;
  padding: 10px 12px;
}

.top-nav a:hover {
  background: var(--sky);
  color: var(--ink);
}

.top-nav a[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
}

.game-shell {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
  min-height: calc(100vh - 68px);
  padding: clamp(28px, 6vw, 72px) clamp(16px, 4vw, 48px);
}

.game-intro {
  margin: 0 auto;
  max-width: min(880px, 100%);
  text-align: left;
  width: 100%;
}

.game-intro h1 {
  margin: 8px 0 14px;
}

.pet-stage {
  display: grid;
  gap: clamp(18px, 3vw, 34px);
  grid-template-columns: 1fr;
  margin: 0 auto;
  max-width: min(880px, 100%);
}

.pet-media {
  background: #dbeee9;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 10;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.pet-media img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.daily-badge {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(31, 41, 51, 0.12);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  position: absolute;
  right: 16px;
  top: 16px;
}

.daily-badge span,
.kicker {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.daily-badge strong {
  color: var(--tomato);
  font-size: 0.88rem;
}

.game-panel,
.creator-form,
.preview-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.game-panel {
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(18px, 3vw, 28px);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 5.2rem);
  letter-spacing: 0;
  line-height: 0.94;
  margin: 10px auto 14px 0;
  max-width: 10em;
}

h2 {
  font-size: clamp(1.75rem, 3.2vw, 3.1rem);
  letter-spacing: 0;
  line-height: 1;
  margin-bottom: 0;
}

h3 {
  font-size: 1.28rem;
  line-height: 1.1;
  margin-bottom: 14px;
}

.pet-note {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 auto 0 0;
  max-width: 44rem;
}

.vote-heading {
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  line-height: 1.1;
  margin-bottom: 12px;
}

.choice-grid,
.mini-options {
  display: grid;
  gap: 10px;
}

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

.choice-button {
  align-items: center;
  background: var(--mint);
  border: 2px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 68px;
  padding: 13px 14px;
  text-align: left;
  width: 100%;
}

.choice-button:hover,
.choice-button:focus-visible {
  background: var(--sky);
  border-color: var(--blue);
}

.choice-button.selected {
  background: var(--aqua);
  border-color: var(--green);
}

.choice-button.correct {
  background: var(--mint);
  border-color: var(--green);
}

.choice-button.wrong {
  background: var(--rose);
  border-color: var(--tomato);
}

.choice-name {
  font-size: 1.08rem;
  font-weight: 900;
  min-width: 0;
  overflow-wrap: anywhere;
}

.choice-percent {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 0.88rem;
  font-weight: 900;
}

.vote-submit {
  justify-self: end;
  margin-top: 12px;
  min-width: 140px;
}

.hidden {
  display: none;
}

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

.result-panel {
  color: var(--muted);
  line-height: 1.45;
  margin-top: 12px;
  min-height: 0;
  padding: 0;
}

.result-panel strong {
  color: var(--ink);
}

.reveal-signup {
  background: var(--sky);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
}

.reveal-signup.hidden {
  display: none;
}

.reveal-signup p {
  color: var(--ink);
  font-weight: 850;
  line-height: 1.35;
  margin: 0;
}

.email-row {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.email-row input {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 44px;
  padding: 0 12px;
}

.email-row button {
  white-space: nowrap;
}

.signup-message {
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 850;
  min-height: 1.25em;
}

.signup-message.error {
  color: var(--tomato);
}

.reveal-signup.is-saved .email-row {
  display: none;
}

.yesterday-reveal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  grid-template-areas:
    "copy copy"
    "results photo"
    "archive archive";
  grid-template-columns: minmax(0, 1fr) minmax(170px, 220px);
  margin: 10px auto 0;
  max-width: min(880px, 100%);
  padding: clamp(18px, 3vw, 28px);
  width: 100%;
}

.reveal-copy {
  grid-area: copy;
}

.reveal-copy h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.5rem);
  margin: 8px 0 12px;
}

.reveal-copy p:last-child {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.reveal-copy strong {
  color: var(--ink);
}

.reveal-results {
  display: grid;
  gap: 8px;
  grid-area: results;
}

.reveal-detail-grid {
  display: contents;
}

.reveal-photo {
  aspect-ratio: 4 / 3;
  background: #dbeee9;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  max-width: 320px;
  max-height: 190px;
  overflow: hidden;
}

.yesterday-reveal .reveal-photo {
  grid-area: photo;
}

.reveal-photo img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.reveal-archive-link {
  color: var(--ink);
  font-weight: 850;
  grid-area: archive;
  justify-self: end;
}

.reveal-archive-link:hover {
  color: var(--blue);
}

.home-community {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  margin: 22px auto 0;
  max-width: min(880px, 100%);
  padding: clamp(18px, 3vw, 28px);
  width: 100%;
}

.home-community h2 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  margin: 0;
}

.home-community p:not(.kicker) {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.home-community-link {
  justify-self: start;
  margin-top: 4px;
  width: max-content;
}

.result-row {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.result-row span,
.result-row strong {
  font-weight: 900;
}

.result-row.correct span,
.result-row.correct strong {
  color: var(--green);
}

.result-meter {
  background: var(--sky);
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}

.result-meter span {
  background: var(--green);
  border-radius: inherit;
  display: block;
  height: 100%;
}

@media (min-width: 1100px) {
  .game-intro,
  .pet-stage,
  .home-community {
    max-width: min(1180px, 100%);
  }

  .yesterday-reveal,
  .archive-card {
    grid-template-areas:
      "copy results photo"
      ". archive archive";
    grid-template-columns: minmax(220px, 0.8fr) minmax(300px, 1fr) minmax(180px, 220px);
    max-width: min(1180px, 100%);
  }

  .yesterday-reveal .reveal-photo,
  .archive-card .reveal-photo {
    grid-column: auto;
    max-width: none;
  }

  .archive-grid {
    max-width: min(1180px, 100%);
  }
}

.site-footer {
  align-items: start;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  font-size: 0.86rem;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "social links"
    "copyright links";
  justify-items: start;
  padding: 18px clamp(16px, 4vw, 48px);
  text-align: left;
}

.site-footer p {
  grid-area: copyright;
  margin: 0;
}

.footer-social {
  align-items: center;
  display: flex;
  gap: 10px;
  grid-area: social;
}

.footer-links {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 7px;
  grid-area: links;
  justify-content: flex-end;
  text-align: right;
}

.site-footer a {
  font-weight: 500;
}

.site-footer a:hover,
.site-footer a[aria-current="page"] {
  color: var(--ink);
}

.social-link {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.social-link img {
  display: block;
  height: 18px;
  width: 18px;
}

.social-link:hover {
  background: var(--sky);
}

.legal-page {
  margin: 0 auto;
  max-width: 760px;
}

.legal-page h1 {
  margin-bottom: 12px;
}

.legal-page h2 {
  font-size: 1.25rem;
  margin: 30px 0 10px;
}

.legal-page p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.legal-page a {
  color: var(--blue);
  font-weight: 850;
}

.legal-updated {
  font-weight: 850;
}

.contact-shell {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  margin: 0 auto;
  max-width: 980px;
}

.contact-copy {
  margin: 0;
}

.contact-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.contact-form button {
  justify-self: start;
}

.archive-grid {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: min(880px, 100%);
}

.archive-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  grid-template-areas:
    "copy copy"
    "results photo"
    "button button";
  grid-template-columns: minmax(0, 1fr) minmax(170px, 220px);
  padding: clamp(18px, 3vw, 28px);
}

.archive-image-link {
  background: #dbeee9;
  display: block;
  grid-area: photo;
}

.archive-image-link img {
  transition: transform 180ms ease;
}

.archive-image-link:hover img {
  transform: scale(1.02);
}

.archive-copy {
  display: grid;
  gap: 10px;
  grid-area: copy;
}

.archive-copy h2 a:hover,
.text-link:hover {
  color: var(--blue);
}

.archive-meta,
.archive-clue {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.archive-clue strong {
  color: var(--ink);
}

.archive-results {
  margin: 0;
}

.text-link {
  color: var(--ink);
  font-weight: 900;
  justify-self: start;
}

.archive-reveal-link {
  display: flex;
  grid-area: button;
  justify-self: end;
  margin-top: 0;
  width: max-content;
}

.community-grid {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: min(1180px, 100%);
}

.community-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 auto 18px;
  max-width: min(1180px, 100%);
}

.community-filter button {
  background: var(--sky);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  min-height: 34px;
  padding: 8px 16px;
}

.community-filter button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.community-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  padding: clamp(18px, 3vw, 28px);
}

.community-card img {
  aspect-ratio: 4 / 3;
  background: #dbeee9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.community-card-image-link {
  display: block;
}

.community-card-image-link img {
  transition: transform 180ms ease;
}

.community-card-image-link:hover img {
  transform: scale(1.02);
}

.community-card-body {
  align-content: center;
  display: grid;
  gap: 10px;
}

.community-card-body h2 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  margin: 0;
}

.community-card-body h2 a:hover {
  color: var(--blue);
}

.community-card-poll {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding-top: 16px;
}

.community-card-poll h3 {
  font-size: 1.05rem;
  margin: 0;
}

.community-card-name-options {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.community-card-name-option {
  min-height: 42px;
}

.community-card-actions {
  align-items: start;
  display: grid;
  gap: 12px;
  justify-items: start;
}

.community-card-vote-link {
  justify-self: start;
  width: max-content;
}

.feed-actions {
  display: flex;
  justify-content: center;
  margin: 24px auto 0;
  max-width: min(1180px, 100%);
}

.feed-actions button {
  background: var(--ink);
  border-radius: 8px;
  color: var(--paper);
  min-height: 44px;
  padding: 0 18px;
}

.feed-actions button:hover {
  background: var(--blue);
}

.community-vote-help {
  margin-top: 6px;
}

.community-detail-shell {
  display: grid;
  gap: 22px;
  margin: 0 auto;
  max-width: min(1180px, 100%);
}

.community-detail-hero {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
}

.community-choice-grid {
  margin-top: 18px;
}

@media (min-width: 1100px) {
  .archive-grid {
    max-width: min(1180px, 100%);
  }

  .archive-heading,
  .submit-heading,
  .submit-workbench,
  .submit-actions {
    max-width: min(1180px, 100%);
  }

  .archive-card {
    grid-template-areas:
      "copy results photo"
      ". . button";
    grid-template-columns: minmax(220px, 0.8fr) minmax(300px, 1fr) minmax(180px, 220px);
  }

  .archive-card .reveal-photo {
    grid-column: auto;
    max-width: none;
  }
}

.pagination {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 24px auto 0;
  max-width: 1180px;
}

.pagination a,
.button-link {
  align-items: center;
  background: var(--ink);
  border-radius: 8px;
  color: var(--paper);
  display: inline-flex;
  font-weight: 900;
  min-height: 44px;
  padding: 0 16px;
}

.pagination a:hover,
.button-link:hover {
  background: var(--blue);
}

.pagination .pagination-page,
.pagination .pagination-arrow {
  border-radius: 8px;
  justify-content: center;
  min-width: 44px;
  padding: 0 12px;
}

.pagination .pagination-page.current {
  align-items: center;
  background: var(--sky);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  padding: 0 12px;
}

.pagination a[aria-disabled="true"] {
  background: var(--sky);
  color: var(--muted);
  pointer-events: none;
}

.pagination span {
  color: var(--muted);
  font-weight: 850;
}

.pet-detail {
  min-height: calc(100vh - 140px);
}

.pet-detail-shell {
  display: grid;
  gap: 22px;
  margin: 0 auto;
  max-width: 1180px;
}

.pet-detail-hero {
  align-items: stretch;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
}

.pet-detail-copy,
.pet-detail-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 30px);
}

.pet-detail-copy {
  align-content: center;
  display: grid;
  gap: 12px;
}

.pet-detail-copy h1 {
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  margin-bottom: 0;
}

.pet-detail-summary {
  color: var(--ink);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 850;
  line-height: 1.35;
  margin: 0;
}

.pet-detail-clue {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.pet-detail-photo {
  aspect-ratio: 4 / 3;
  background: #dbeee9;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin: 0;
  overflow: hidden;
}

.pet-detail-photo img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.pet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.secondary-link {
  background: var(--sky);
  color: var(--ink);
}

.pet-detail-card h2 {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  margin-bottom: 8px;
}

.community-share-card {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 1.15fr);
}

.community-share-copy {
  display: grid;
  gap: 8px;
}

.community-share-copy h2,
.community-share-copy p {
  margin: 0;
}

.community-share-copy p {
  color: var(--muted);
  line-height: 1.45;
}

.share-link-box {
  display: grid;
  gap: 10px;
}

.share-link-box a {
  background: var(--sky);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: block;
  font-weight: 850;
  overflow-wrap: anywhere;
  padding: 12px;
}

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

.pet-detail-results {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.pet-archive-text-link {
  color: var(--ink);
  display: inline-flex;
  font-weight: 500;
  justify-self: start;
  margin-top: 18px;
}

.pet-archive-text-link:hover {
  color: var(--blue);
}

.pet-neighbor-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.pet-nav-link {
  justify-content: center;
  min-width: 150px;
  text-align: center;
}

.community-arrow-link {
  align-items: center;
  border-radius: 50%;
  display: inline-flex;
  height: 46px;
  min-height: 46px;
  min-width: 46px;
  padding: 0;
  width: 46px;
}

.community-arrow-icon {
  display: block;
  flex: 0 0 auto;
  height: 24px;
  width: 24px;
}

.admin-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 auto 18px;
  max-width: 1180px;
}

.admin-toolbar p {
  color: var(--muted);
  margin: 0;
}

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

.admin-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

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

.admin-panel h2 {
  font-size: 1.25rem;
  margin-bottom: 14px;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-list.compact {
  gap: 8px;
}

.admin-pet-card,
.admin-item {
  background: var(--sky);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 12px;
}

.admin-pet-card {
  grid-template-columns: 130px minmax(0, 1fr);
}

.admin-pet-card img {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.admin-pet-card h3,
.admin-item h3 {
  font-size: 1.2rem;
  margin: 4px 0 8px;
}

.admin-pet-card p,
.admin-item p {
  color: var(--muted);
  line-height: 1.4;
  margin: 0 0 6px;
}

.admin-item {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) auto;
}

.admin-item.compact {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-toolbar form {
  margin: 0;
}

.admin-actions button {
  min-height: 36px;
  padding: 0 12px;
}

.admin-actions .button-link {
  min-height: 36px;
  padding: 0 12px;
}

.admin-empty {
  color: var(--muted);
  margin: 0;
}

.section-band {
  border-top: 1px solid var(--line);
  padding: clamp(28px, 6vw, 72px) clamp(16px, 4vw, 48px);
}

.section-band.alt {
  background: #eef8fb;
}

.page-shell {
  border-top: 0;
  min-height: calc(100vh - 150px);
}

.section-heading {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 auto 22px;
  max-width: 1180px;
}

.section-heading h1 {
  margin: 8px 0 0;
  max-width: 9.5em;
}

.section-copy {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  max-width: 28rem;
}

.submit-heading {
  align-items: start;
  display: grid;
  gap: 10px;
  max-width: min(880px, 100%);
}

.submit-heading h1 {
  max-width: none;
}

.submit-heading .section-copy {
  max-width: 760px;
}

.archive-heading {
  max-width: min(880px, 100%);
}

.workbench {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
  margin: 0 auto;
  max-width: 1180px;
}

.submit-workbench {
  grid-template-columns: minmax(0, 760px);
  justify-content: start;
  max-width: min(880px, 100%);
}

.creator-form {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.mode-selector {
  border: 0;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  width: min(100%, 430px);
}

.mode-selector label {
  align-items: center;
  background: var(--sky);
  border: 2px solid transparent;
  border-radius: 18px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font-size: 0.8rem;
  font-weight: 900;
  justify-content: center;
  line-height: 1.2;
  min-height: 38px;
  padding: 7px 10px;
  text-align: center;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.mode-selector input {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.mode-selector label:hover {
  border-color: var(--blue);
  box-shadow: 0 8px 20px rgba(31, 41, 51, 0.1);
  transform: translateY(-1px);
}

.mode-selector label:has(input:checked) {
  background: var(--aqua);
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}

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

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

.creator-form.is-name-mode .pet-type-field {
  order: -1;
}

.creator-form.is-name-mode .pronouns-field {
  order: 0;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 0.82rem;
  font-weight: 900;
  gap: 7px;
}

.field-hint {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.checkbox-field {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
  line-height: 1.45;
}

.checkbox-field input {
  height: 18px;
  margin: 0;
  min-height: 18px;
  padding: 0;
  width: 18px;
}

.checkbox-field span {
  color: var(--ink);
  font-weight: 700;
}

.checkbox-field.hidden {
  display: none;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  line-height: 1.45;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #98a2b3;
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(39, 125, 161, 0.18);
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--tomato);
}

.upload-box {
  align-items: center;
  background: var(--sky);
  border: 1px dashed rgba(39, 125, 161, 0.42);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: row;
  font-size: 1rem;
  gap: 12px;
  justify-content: center;
  min-height: 104px;
  overflow: hidden;
  position: relative;
}

.upload-box:has(input[aria-invalid="true"]) {
  border-color: var(--tomato);
}

.upload-box input {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

.upload-icon {
  align-items: center;
  background: var(--sun);
  border: 2px solid var(--ink);
  border-radius: 8px;
  display: inline-flex;
  font-size: 0;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.upload-icon::before,
.upload-icon::after {
  background: var(--ink);
  border-radius: 999px;
  content: "";
  height: 4px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
}

.upload-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.upload-text,
.upload-icon {
  position: relative;
  z-index: 1;
}

.upload-box.has-image {
  align-items: flex-end;
  background: var(--panel);
  border-style: solid;
  justify-content: flex-start;
  min-height: 220px;
  padding: 14px;
}

.upload-box.has-image .upload-preview-img {
  display: block;
}

.upload-box.has-image .upload-text {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(31, 41, 51, 0.16);
}

.upload-box.has-image .upload-icon {
  display: none;
}

.upload-box.has-image .upload-text {
  border-radius: 8px;
  font-weight: 900;
  padding: 8px 10px;
}

.upload-preview-img {
  display: none;
  height: 100%;
  inset: 0;
  object-fit: contain;
  position: absolute;
  width: 100%;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-actions {
  display: flex;
  justify-content: flex-end;
  margin: 18px auto 0;
  max-width: 1180px;
}

.submit-actions {
  display: grid;
  grid-template-columns: minmax(0, 760px);
  justify-content: start;
  max-width: min(880px, 100%);
}

.submit-actions button {
  justify-self: end;
}

.page-actions button {
  min-width: 160px;
}

@media (min-width: 1100px) {
  .submit-heading,
  .archive-heading,
  .submit-workbench,
  .submit-actions {
    max-width: min(1180px, 100%);
  }
}

.preview-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1fr);
  min-height: 380px;
  overflow: hidden;
}

.preview-card.text-only {
  grid-template-columns: 1fr;
  min-height: 0;
}

.preview-photo {
  background: #dceee9;
  min-height: 100%;
}

.preview-photo img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.preview-photo.placeholder {
  align-items: center;
  display: flex;
  justify-content: center;
}

.preview-photo.placeholder span {
  color: var(--muted);
  font-weight: 900;
}

.preview-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(18px, 4vw, 34px);
}

.preview-meta {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.preview-actions,
.generated-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.generated-header {
  gap: 12px;
}

.generated-header h3 {
  margin-bottom: 0;
}

.shuffle-button {
  background: var(--sun);
  color: var(--ink);
}

.shuffle-button:hover {
  background: #ffd867;
}

.generated-panel {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0;
  margin-top: 4px;
  padding-top: 18px;
}

.turnstile-box {
  min-height: 0;
}

.turnstile-box:empty {
  display: none;
}

.status-pill {
  align-self: flex-start;
  background: var(--sky);
  border-radius: 999px;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 900;
  margin-bottom: 14px;
  padding: 6px 10px;
  text-transform: uppercase;
}

.name-card .status-pill {
  background: #eceafd;
  color: var(--violet);
}

.mini-option {
  align-items: center;
  background: var(--sky);
  border-radius: 8px;
  display: flex;
  font-weight: 900;
  justify-content: space-between;
  min-height: 44px;
  padding: 10px 12px;
}

.mini-option.truth {
  background: var(--mint);
}

.lock-button {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--blue);
  display: inline-flex;
  flex: 0 0 auto;
  height: 34px;
  justify-content: center;
  min-height: 32px;
  padding: 0;
  width: 34px;
}

.lock-button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.lock-button.permanent-lock {
  cursor: default;
}

.lock-button.permanent-lock:hover {
  background: var(--ink);
  box-shadow: none;
}

.lock-button:hover {
  background: var(--sun);
  box-shadow: none;
}

.lock-icon {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

@media (max-width: 700px) {
  .app-header {
    align-items: center;
    gap: 12px;
    min-height: 62px;
    padding-bottom: 10px;
    padding-top: 10px;
  }

  .brand,
  .mobile-vote-link,
  .nav-toggle {
    position: relative;
    z-index: 12;
  }

  .mobile-vote-link {
    border-radius: 999px;
    color: var(--ink);
    display: inline-flex;
    font-size: 0.94rem;
    font-weight: 900;
    margin-left: auto;
    padding: 10px 6px;
  }

  body.nav-open .mobile-vote-link {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .top-nav {
    align-items: flex-start;
    background: rgba(245, 251, 248, 0.98);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: none;
    flex-direction: column;
    gap: 8px;
    height: 100vh;
    height: 100dvh;
    inset: 0;
    justify-content: flex-start;
    padding: 96px clamp(24px, 8vw, 42px) 40px;
    position: fixed;
    width: auto;
    z-index: 11;
  }

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

  .top-nav a {
    background: transparent;
    border-radius: 0;
    color: var(--ink);
    font-size: clamp(1.08rem, 6vw, 1.55rem);
    padding: 8px 0;
    text-align: left;
    width: 100%;
  }

  .top-nav a:hover,
  .top-nav a[aria-current="page"],
  .top-nav a[aria-current="page"]:hover {
    background: transparent;
    color: var(--blue);
  }
}

@media (max-width: 900px) {
  .game-shell {
    min-height: auto;
  }

  .yesterday-reveal {
    grid-template-areas:
      "copy"
      "results"
      "photo"
      "archive";
  }

  .archive-card {
    grid-template-areas:
      "copy"
      "results"
      "photo"
      "button";
    grid-template-columns: 1fr;
  }

  .pet-stage,
  .yesterday-reveal,
  .reveal-detail-grid,
  .pet-detail-hero,
  .community-detail-hero,
  .community-card,
  .community-detail-hero,
  .admin-grid,
  .contact-shell,
  .workbench,
  .preview-card {
    grid-template-columns: 1fr;
  }

  .admin-panel.wide {
    grid-column: auto;
  }

  .admin-item,
  .admin-pet-card {
    grid-template-columns: 1fr;
  }

  .pet-stage {
    min-height: 0;
  }

  .pet-media {
    aspect-ratio: 1 / 1;
    min-height: 0;
  }

  .game-panel {
    justify-content: flex-start;
  }

  h1 {
    font-size: clamp(2.4rem, 13vw, 4.2rem);
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .preview-photo {
    aspect-ratio: 16 / 11;
  }

  .pet-detail-copy {
    align-content: start;
  }

  .community-card {
    align-items: start;
  }

  .community-card img {
    aspect-ratio: 4 / 3;
    max-height: none;
  }

}

@media (max-width: 560px) {
  .brand {
    font-size: 0.98rem;
  }

  .choice-grid,
  .email-row,
  .field-row,
  .field-row.trio,
  .community-card-name-options,
  .mode-selector {
    grid-template-columns: 1fr;
  }

  .daily-badge {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .game-panel,
  .creator-form,
  .preview-body,
  .community-share-card,
  .pet-detail-copy,
  .pet-detail-card {
    padding: 16px;
  }

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

  .share-actions {
    justify-content: stretch;
  }

  .share-actions button {
    flex: 1 1 140px;
  }

  .pagination {
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .pet-neighbor-nav {
    grid-template-columns: 1fr;
  }

  .pagination a,
  .pagination span {
    justify-content: center;
    text-align: center;
  }

  .generated-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
