:root {
  --bg-top: #ffe48a;
  --bg-bottom: #fff4bf;
  --paper: #fffdf2;
  --ink: #1f1f22;
  --accent: #e11d2f;
  --accent-2: #ffd23f;
  --accent-3: #ffe176;
  --ink-soft: #3a3a40;
  --line: #191919;
  --ok: #0c7a43;
  --warn: #9d1422;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Nunito", "Avenir Next", "Trebuchet MS", sans-serif;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 12%, rgba(225, 29, 47, 0.15) 0%, transparent 26%),
    radial-gradient(circle at 92% 18%, rgba(255, 210, 63, 0.4) 0%, transparent 28%),
    radial-gradient(circle at 70% 44%, rgba(255, 225, 118, 0.32) 0%, transparent 24%),
    radial-gradient(circle at 50% 90%, rgba(0, 0, 0, 0.08) 0%, transparent 35%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  min-height: 100vh;
}

h1,
h2,
h3 {
  font-family: "Baloo 2", "Nunito", sans-serif;
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin-top: 0;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  color: #17171a;
  text-shadow: 2px 2px 0 rgba(255, 210, 63, 0.55);
}

h2 {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
}

h3 {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  border-bottom: 3px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 245, 198, 0.95), rgba(255, 255, 255, 0.96));
  backdrop-filter: blur(4px);
}

.brand {
  text-decoration: none;
  color: var(--accent);
  font-family: "Baloo 2", "Nunito", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 2px 2px 0 var(--accent-2);
}

.tagline {
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

nav {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

nav a,
.link-button {
  text-decoration: none;
  border: 2px solid var(--line);
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  color: var(--ink);
  background: #fff8cf;
  font-weight: 800;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

nav a:hover,
.link-button:hover {
  transform: translateY(-1px);
  background: var(--accent-2);
  color: #121214;
}

.link-button {
  cursor: pointer;
}

.inline-form {
  display: inline;
}

.page-shell {
  max-width: 1100px;
  margin: 1.2rem auto 2rem;
  padding: 0 1rem;
}

.hero {
  position: relative;
  overflow: hidden;
  border: 2px dashed var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 14% 18%, rgba(225, 29, 47, 0.08) 0%, transparent 32%),
    radial-gradient(circle at 84% 20%, rgba(255, 210, 63, 0.38) 0%, transparent 30%),
    rgba(255, 255, 255, 0.9);
  padding: 1.2rem;
  margin-bottom: 1rem;
  animation: riseIn 0.45s ease-out;
}

.welcome-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

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

.hop-list {
  display: grid;
  gap: 0.8rem;
}

.hop-row {
  width: 100%;
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.hop-row-content {
  flex: 1;
}

.hop-thumb {
  width: 112px;
  height: 84px;
  border-radius: 10px;
  border: 1px solid var(--line);
  object-fit: cover;
  flex: 0 0 auto;
}

.card {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--line);
  background: var(--paper);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.narrow {
  max-width: 500px;
  margin: 0 auto;
}

.button {
  display: inline-block;
  margin-top: 0.4rem;
  background: var(--accent-2);
  color: #151518;
  border: 2px solid #17171a;
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  transform-origin: center;
  transition: transform 0.2s ease, filter 0.18s ease;
}

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

.cta-pop {
  box-shadow: 0 4px 0 #17171a;
}

.cta-pop:hover {
  animation: ctaWiggle 0.34s ease-in-out 1;
}

.form-grid {
  display: grid;
  gap: 0.55rem;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.55rem;
  border: 2px solid #2d2d33;
  border-radius: 8px;
  font: inherit;
  font-size: 16px;
}

input:focus,
textarea:focus,
select:focus {
  outline: 3px solid rgba(225, 29, 47, 0.25);
  outline-offset: 1px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  overflow-x: auto;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 0.45rem;
  vertical-align: top;
}

.hero-image,
.extra-image {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin: 0.5rem 0;
}

.image-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem;
}

.clue-stack {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.clue-item {
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fffdf8;
  padding: 0.45rem 0.65rem;
}

.clue-item summary {
  cursor: pointer;
  font-weight: 700;
}

.notice {
  max-width: 1100px;
  margin: 0.8rem auto;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 1rem;
}

.notice-success {
  background: #e9f9ef;
  color: var(--ok);
}

.notice-error {
  background: #fff0f1;
  color: var(--warn);
}

.site-footer {
  border-top: 3px solid var(--line);
  padding: 1rem;
  text-align: center;
  font-size: 0.92rem;
  background: rgba(255, 248, 218, 0.96);
}

.mobile-bottom-nav {
  display: none;
}

.simple-list {
  padding-left: 1.2rem;
}

.admin-links {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.actions-cell {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  min-width: 220px;
}

.button-danger {
  background: #111111;
  color: #ffffff;
  border-color: #111111;
}

.helper {
  font-size: 0.9rem;
  opacity: 0.85;
}

.geo-block {
  margin-top: 0.4rem;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--line);
}

.geo-block .helper {
  margin: 0.2rem 0;
}

.geo-block a {
  margin-left: 0.35rem;
}

.location-picker {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem;
  background: #fffdf8;
  display: grid;
  gap: 0.35rem;
}

.compact-picker {
  max-height: 240px;
  overflow-y: auto;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.check-line input[type="checkbox"] {
  width: auto;
}

.location-list {
  display: grid;
  gap: 0.6rem;
}

.location-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem;
  background: #fffdf8;
  display: flex;
  gap: 0.6rem;
  justify-content: space-between;
  align-items: flex-start;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ctaWiggle {
  0% {
    transform: translateY(-1px) rotate(0deg) scale(1);
  }
  30% {
    transform: translateY(-2px) rotate(-1.2deg) scale(1.02);
  }
  65% {
    transform: translateY(-2px) rotate(1.2deg) scale(1.02);
  }
  100% {
    transform: translateY(-1px) rotate(0deg) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero,
  .cta-pop:hover {
    animation: none;
  }

  .button,
  nav a,
  .link-button {
    transition: none;
  }
}

@media (max-width: 720px) {
  body {
    padding-bottom: 72px;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  nav {
    width: 100%;
    flex-wrap: wrap;
  }

  nav a,
  .link-button {
    flex: 1 1 45%;
    text-align: center;
    min-height: 42px;
  }

  .page-shell {
    margin-top: 0.9rem;
    padding: 0 0.7rem;
  }

  .card {
    padding: 0.85rem;
  }

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

  .hop-row {
    flex-direction: column;
  }

  .hop-thumb {
    width: 100%;
    height: 170px;
  }

  .form-grid .button,
  .actions-cell .button {
    width: 100%;
    text-align: center;
  }

  .actions-cell {
    min-width: 0;
  }

  .actions-cell .inline-form {
    display: block;
    width: 100%;
  }

  .table thead {
    display: none;
  }

  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
    width: 100%;
  }

  .table tr {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.6rem;
    margin-bottom: 0.7rem;
    background: #fffdf8;
  }

  .table td {
    border: 0;
    padding: 0.35rem 0;
  }

  .table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    font-size: 0.84rem;
    margin-bottom: 0.2rem;
  }

  .mobile-bottom-nav {
    display: grid;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem;
    border-top: 2px solid var(--line);
    background: rgba(255, 245, 204, 0.97);
    backdrop-filter: blur(6px);
  }

  .mobile-bottom-nav a {
    text-decoration: none;
    text-align: center;
    color: var(--ink);
    font-weight: 800;
    border: 2px solid var(--line);
    border-radius: 10px;
    background: #fff8cf;
    padding: 0.55rem 0.35rem;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
