:root {
  --bg1: #FFF3D6;
  --bg2: #C8F4E9;
  --bg3: #D6EFFF;
  --ink: #2B2440;
  --ink-soft: #5C5470;
  --paper: #FFFDF7;
  --paper-2: #FFF6E0;
  --orange: #FF7A3D;
  --orange-dark: #E85D25;
  --teal: #14B8A6;
  --teal-dark: #0D9488;
  --yellow: #FFC93C;
  --yellow-dark: #E8A800;
  --pink: #FF6FA5;
  --blue: #4FC3F7;
  --green: #6BCB77;
  --red: #FF5C5C;
  --wood: #A6683C;
  --wood-dark: #7A4A26;
  --wood-light: #C98B54;
  --border: #2B2440;
  --radius: 18px;
}

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

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  font-family: "Fredoka", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-image: url('/siteimages/background.png');
  background-size: cover;
  background-attachment: fixed;
  background-color: var(--bg1);
  color: var(--ink);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Fredoka", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }

/* ===== HEADER ===== */

header.site {
  background: var(--paper);
  border-bottom: 5px solid var(--border);
  padding: 14px 24px;
  position: sticky;
  top: 0;
  z-index: 20;
  overflow: visible;
}

header.site .inner {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header.site a.brand {
  color: var(--ink);
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

header.site a.brand .logo-block {
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
  animation: bob 2.4s ease-in-out infinite;
  filter: drop-shadow(2px 3px 0 rgba(43,36,64,0.25));
}

header.site nav a {
  color: var(--paper);
  text-decoration: none;
  margin-left: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  transition: all 0.18s;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--orange);
  border: 3px solid var(--border);
  box-shadow: 0 3px 0 var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
}

header.site .nav-icon {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  display: inline-block;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

header.site nav a:nth-child(2) { background: var(--teal); }

header.site nav a:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 var(--border);
}

header.site nav a:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 var(--border);
}

header.site .nav-dropdown {
  position: relative;
  display: inline-block;
}

header.site .nav-btn {
  color: var(--paper);
  background: var(--blue);
  border: 3px solid var(--border);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  box-shadow: 0 3px 0 var(--border);
  font-family: inherit;
  margin-left: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
}

header.site .nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 var(--border);
}

header.site .nav-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 var(--border);
}

header.site .dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--paper);
  border: 4px solid var(--border);
  border-radius: 18px;
  padding: 12px;
  min-width: 190px;
  box-shadow: 0 8px 0 var(--border), 0 8px 20px rgba(0,0,0,0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 999;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

header.site .nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

header.site .dropdown-menu a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  color: var(--paper);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.15s;
  background: var(--blue);
  border: 3px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 3px 0 var(--border);
  line-height: 1;
  flex: 1;
}

header.site .dropdown-menu .nav-icon {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

header.site .dropdown-menu a:hover {
  background: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 5px 0 var(--border);
}

header.site .dropdown-menu a:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 var(--border);
}

/* ===== MAIN ===== */

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 36px 20px 100px;
}

/* ===== BREADCRUMB ===== */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
  padding: 14px 18px;
  list-style: none;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 700;
  animation: floatUp 0.4s ease-out;
  background: var(--paper);
  border: 4px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 6px 0 var(--border);
}

.breadcrumb a,
.breadcrumb .current {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  border: 3px solid var(--border);
  text-decoration: none;
  background: var(--paper-2);
  color: var(--ink);
  transition: transform 0.15s ease, background 0.15s ease;
  font-weight: 700;
  font-size: 0.95rem;
}

.breadcrumb a:hover {
  transform: translateY(-2px) rotate(-1deg);
  background: var(--yellow);
}

.breadcrumb .separator {
  color: var(--ink-soft);
  font-weight: 900;
  opacity: 0.6;
}

.breadcrumb .current {
  background: var(--pink);
  color: var(--paper);
  font-weight: 800;
}

.crumb-icon { display: none; }

/* ===== PAGE TITLE ===== */

.title-container {
  background: var(--paper);
  border: 5px solid var(--border);
  border-radius: 24px;
  padding: 28px 24px;
  margin-bottom: 28px;
  box-shadow: 0 8px 0 var(--border);
  animation: floatUp 0.5s ease-out;
  display: flex;
  align-items: center;
  gap: 16px;
}

.title-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--blue) 100%);
  border: 4px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

main > h1 {
  font-size: 2.2rem;
  margin: 0;
  color: var(--ink);
  flex: 1;
}

/* ===== SEARCH BOX ===== */

.search {
  width: 100%;
  padding: 16px 20px;
  margin-bottom: 28px;
  background: var(--paper);
  border: 4px solid var(--border);
  border-radius: 999px;
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
  box-shadow: 0 6px 0 var(--border);
  font-weight: 600;
  transition: all 0.2s ease;
}

.search:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 8px 0 var(--border), 0 0 0 4px rgba(20, 184, 166, 0.2);
}

.search::placeholder {
  color: var(--ink-soft);
  opacity: 0.6;
}

/* ===== GRID & CARDS ===== */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  animation: floatUp 0.6s ease-out;
}

.card {
  background: var(--paper);
  border: 4px solid var(--border);
  border-radius: 18px;
  padding: 16px 12px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 0 var(--border);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-4px) rotate(-1deg);
  box-shadow: 0 10px 0 var(--border);
  border-color: var(--orange);
}

.card:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--border);
}

.card img {
  width: 56px;
  height: 56px;
  image-rendering: pixelated;
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.15));
  transition: transform 0.2s ease;
}

.card:hover img {
  transform: scale(1.12) rotate(-2deg);
}

.card .name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
  word-break: break-word;
  color: var(--ink);
}

/* ===== FOOTER ===== */

footer {
  background: var(--paper);
  border-top: 5px solid var(--border);
  padding: 24px;
  text-align: center;
  margin-top: 60px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
  main {
    padding: 24px 16px 70px;
  }

  main > h1 {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
  }

  .search {
    padding: 14px 16px;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  header.site nav a {
    padding: 8px 12px;
    font-size: 0.85rem;
    margin-left: 8px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
  }

  .card {
    padding: 12px 8px;
    gap: 8px;
  }

  .card img {
    width: 48px;
    height: 48px;
  }

  .card .name {
    font-size: 0.85rem;
  }
}
