* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(145deg, #f7f9fc 0%, #eef2f5 100%);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  padding: 2rem 1.5rem;
  color: #1e2a3e;
} 

.container {
  max-width: 1300px;
  margin: 0 auto;
}

.hero {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(2px);
  border-radius: 3rem;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 245, 215, 0.6);
}

.hero-text {
  font-size: 1.05rem;
  line-height: 1.55;
  color: #1e2f3f;
}

.hero-text p {
  margin-bottom: 1.2rem;
}

.hero-text .greeting {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #2b5876, #4e4376);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}

.hero-text .event-details {
  background: #fff0e0;
  display: inline-block;
  padding: 0.5rem 1.2rem;
  border-radius: 40px;
  font-weight: 600;
  margin: 0.5rem 0 0.8rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 2.5rem 0 2rem;
}

.card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 2rem;
  padding: 1.6rem 1.5rem 2rem;
  box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s;
  border: 1px solid rgba(255, 245, 200, 0.7);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 32px -14px rgba(0, 0, 0, 0.2);
}

.card h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  border-left: 5px solid #f4a261;
  padding-left: 1rem;
  color: #2c3e4e;
}

.form-group {
  margin-bottom: 1.2rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: #2c3e4e;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 1.2rem;
  border: 1px solid #d4dce4;
  background: #fff;
  font-size: 0.9rem;
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #f4a261;
  box-shadow: 0 0 0 3px rgba(244, 162, 97, 0.2);
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.checkbox-item input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
}

.checkbox-item label {
  margin-bottom: 0;
}

.extra-input {
  margin-top: 0.6rem;
  margin-left: 1rem;
}

.hidden {
  display: none;
}

button {
  background: #f4a261;
  border: none;
  color: #fff;
  font-weight: 700;
  padding: 0.8rem 1.5rem;
  border-radius: 2rem;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s;
  width: 100%;
  margin-top: 0.5rem;
  font-family: inherit;
}

button:hover {
  background: #e76f51;
  transform: scale(0.98);
}

/* —— Registration card: tabs (after global `button` so active/inactive colors always win) —— */
.card--dual-forms {
  padding: 0;
  overflow: visible;
}

.card--dual-forms .form-tabs {
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
  background: rgba(240, 242, 245, 0.85);
  border-bottom: 1px solid rgba(26, 32, 44, 0.08);
}

/* Higher specificity than plain `button` / `button:hover` */
.card--dual-forms .form-tabs > button.form-tab {
  flex: 1;
  position: relative;
  margin: 0;
  margin-top: 0;
  padding: 1rem 0.75rem 1.15rem;
  font-size: clamp(0.88rem, 2.1vw, 1.15rem);
  font-weight: 700;
  font-family: inherit;
  line-height: 1.35;
  border: none;
  border-radius: 1.35rem 1.35rem 0 0;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  background: #f0f2f5;
  color: #1a202c;
  width: auto;
  text-align: center;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.04);
  transform: none;
}

.card--dual-forms .form-tabs > button.form-tab:hover:not(.form-tab--active) {
  background: #e8eaef;
  color: #1a202c;
  transform: none;
}

.card--dual-forms .form-tabs > button.form-tab:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(243, 166, 106, 0.55);
  z-index: 1;
}

.card--dual-forms .form-tabs > button.form-tab.form-tab--active {
  background: #f3a66a;
  color: #fff;
  box-shadow: 0 3px 14px -4px rgba(243, 166, 106, 0.75);
  z-index: 2;
}

.card--dual-forms .form-tabs > button.form-tab.form-tab--active:hover {
  transform: none;
  background: #eda15e;
  color: #fff;
}

.card--dual-forms .form-tabs > button.form-tab.form-tab--active:focus {
  box-shadow:
    0 3px 14px -4px rgba(243, 166, 106, 0.75),
    inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.card--dual-forms .form-tabs > button.form-tab.form-tab--active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 9px solid #f3a66a;
  pointer-events: none;
  z-index: 3;
}

.card--dual-forms .form-tab__label {
  display: block;
}

.card--dual-forms .form-tab-panels {
  padding: 1.6rem 1.5rem 2rem;
}

.card--dual-forms .form-tab-panel.hidden {
  display: none;
}

/* Teacher name autocomplete (Supabase teachers.full_name) */
.teacher-autocomplete {
  position: relative;
}

.teacher-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 0.35rem;
  z-index: 20;
  background: #fff;
  border: 1px solid #d4dce4;
  border-radius: 1.2rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
  max-height: 240px;
  overflow-y: auto;
}

.teacher-suggestions.is-open:not([hidden]) {
  display: block;
}

.card--dual-forms .teacher-suggestions .teacher-suggestion-item {
  width: 100%;
  margin-top: 0;
  border-radius: 0;
  background: transparent;
  color: #1e2a3e;
  font-weight: 500;
  text-align: left;
  padding: 0.65rem 1rem;
  border: none;
  border-bottom: 1px solid #eef2f5;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: none;
}

.card--dual-forms .teacher-suggestions .teacher-suggestion-item:first-child {
  border-radius: 1.1rem 1.1rem 0 0;
}

.card--dual-forms .teacher-suggestions .teacher-suggestion-item:last-child {
  border-bottom: none;
  border-radius: 0 0 1.1rem 1.1rem;
}

.card--dual-forms .teacher-suggestions .teacher-suggestion-item:hover {
  background: #fff8f0;
  transform: none;
}

.hidden-link {
  display: none;
  margin-top: 1rem;
  background: #e9f5e9;
  padding: 0.8rem;
  border-radius: 2rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hidden-link.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.hidden-link a {
  font-weight: bold;
  color: #2a9d8f;
  text-decoration: none;
  font-size: 1.2rem;
}

.ticket-text {
  margin-bottom: 1rem;
}

.ticket-hint {
  font-size: 0.75rem;
  margin-top: 5px;
}

.photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
  justify-content: center;
}

.photo-item {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.1);
  background: #f0e7db;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remove-photo {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border-radius: 30px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}

.photo-drop-zone {
  margin-top: 0.5rem;
}

.photo-drop-zone .file-input-label {
  margin-top: 0;
}

.photo-drop-zone--active .file-input-label {
  background: #fff4e8;
  box-shadow: 0 0 0 2px rgba(244, 162, 97, 0.65);
}

.photo-drop-zone.memory-cloud--disabled,
.photo-drop-zone.memory-cloud--disabled .file-input-label {
  pointer-events: none;
  opacity: 0.62;
  cursor: not-allowed;
}

.photo-drop-zone.memory-cloud--disabled .photo-drop-hint {
  display: none;
}

.memory-cloud-locked-note {
  color: #2c3e4e;
  font-weight: 600;
}

.photo-drop-hint {
  margin-top: 0.45rem;
  margin-bottom: 0;
  font-size: 0.82rem;
  color: #5c6b7a;
  text-align: center;
  line-height: 1.35;
}

.file-input-label {
  background: #d9e2ec;
  padding: 0.7rem;
  text-align: center;
  border-radius: 2rem;
  cursor: pointer;
  display: inline-block;
  width: 100%;
  font-weight: 600;
  margin-top: 0.5rem;
}

#photoInput {
  display: none;
}

.photo-limit-note {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.attendees-section {
  margin-top: 2rem;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 2rem;
  padding: 1.8rem;
  box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 245, 200, 0.7);
}

.attendees-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  border-left: 5px solid #f4a261;
  padding-left: 1rem;
  color: #2c3e4e;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.filter-row label {
  font-weight: 600;
  margin: 0;
}

.filter-row select {
  width: auto;
  min-width: 150px;
}

.attendee-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.year-group {
  margin-bottom: 1rem;
}

.year-group h3 {
  font-size: 1.2rem;
  background: #f4e9dd;
  display: inline-block;
  padding: 0.2rem 1rem;
  border-radius: 2rem;
  margin-bottom: 0.6rem;
}

.attendee-names {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.attendee-badge {
  background: #eef2fa;
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1e4660;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.empty-message {
  color: #6c757d;
  font-style: italic;
  padding: 1rem 0;
}

.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #2c3e2f;
  color: #fff9ef;
  padding: 0.8rem 1.8rem;
  border-radius: 60px;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.8rem;
  color: #5c6f87;
  padding-top: 1.5rem;
}

.goose-controls {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.goose-controls__btn {
  width: auto;
  margin-top: 0;
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
  border-radius: 999px;
}

.goose-controls__hint {
  font-size: 0.8rem;
  color: #4f647d;
  font-weight: 600;
}

.goose {
  position: absolute;
  left: 0;
  top: 0;
  width: 120px;
  height: 120px;
  z-index: 1100;
  pointer-events: auto;
  user-select: none;
  transform: translate3d(-100px, -100px, 0);
  transition: transform 0.06s linear;
  transform-origin: center bottom;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.28));
  image-rendering: pixelated;
  touch-action: none;
  cursor: grab;
}

.goose-sprite {
  position: relative;
  width: 120px;
  height: 120px;
  transform-origin: center bottom;
  background-repeat: no-repeat;
  background-size: 480px 120px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.goose.goose--left .goose-sprite {
  transform: scaleX(-1);
}

.goose.goose--kicked .goose-sprite {
  filter: brightness(0.88);
}

.goose.goose--dragging {
  cursor: grabbing;
}

.goose.goose--anim-idle .goose-sprite {
  background-image: url("/img/goose/Idle.png");
  animation: none;
  background-size: auto 56px;
  background-position: center bottom;
}

.goose.goose--left.goose--anim-idle .goose-sprite {
  transform: scaleX(-1);
}

.goose.goose--anim-walk .goose-sprite {
  background-image: url("/img/goose/Walk.png");
  animation: gooseSpriteWalk 0.52s steps(4, end) infinite;
}

.goose.goose--anim-run .goose-sprite {
  background-image: url("/img/goose/Run.png");
  animation: gooseSpriteRun 0.34s steps(4, end) infinite;
}

.goose.goose--anim-flap .goose-sprite {
  background-image: url("/img/goose/Flap.png");
  animation: gooseSpriteFlap 0.42s steps(4, end) infinite;
}

.goose.goose--anim-caught .goose-sprite {
  background-image: url("/img/goose/Caught.png");
  background-size: auto 60px;
  background-position: center bottom;
  animation: gooseSpriteCaught 0.42s ease-in-out infinite;
}

.goose-footprint {
  position: absolute;
  z-index: 1050;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(90, 72, 52, 0.35);
  pointer-events: none;
  animation: gooseFadeOut 3.2s linear forwards;
}

.goose-bread {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1060;
  font-size: 24px;
  transform: translate3d(-100px, -100px, 0);
  pointer-events: none;
}

.goose-bread--falling {
  will-change: transform;
  transition: transform 1.7s cubic-bezier(0.2, 0.75, 0.22, 1);
}

.goose-cursor-decoy {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1200;
  font-size: 17px;
  transform: translate3d(-100px, -100px, 0);
  pointer-events: none;
  opacity: 0;
}

body.goose-cursor-stolen {
  cursor: none;
}

body.goose-cursor-stolen * {
  cursor: none !important;
}

@keyframes gooseFadeOut {
  0% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: scale(0.2);
  }
}

@keyframes gooseSpriteWalk {
  from { background-position: 0 0; }
  to { background-position: -480px 0; }
}

@keyframes gooseSpriteRun {
  from { background-position: 0 0; }
  to { background-position: -480px 0; }
}

@keyframes gooseSpriteFlap {
  from { background-position: 0 0; }
  to { background-position: -480px 0; }
}

@keyframes gooseSpriteWalkSm {
  from { background-position: 0 0; }
  to { background-position: -360px 0; }
}

@keyframes gooseSpriteRunSm {
  from { background-position: 0 0; }
  to { background-position: -360px 0; }
}

@keyframes gooseSpriteFlapSm {
  from { background-position: 0 0; }
  to { background-position: -360px 0; }
}

@keyframes gooseSpriteCaught {
  0% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}

@media (max-width: 950px) {
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  body {
    padding: 1rem;
  }

  .hero {
    padding: 1.5rem;
  }

  .filter-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .goose {
    width: 90px;
    height: 90px;
  }

  .goose-sprite {
    width: 90px;
    height: 90px;
    background-size: 360px 90px;
  }

  .goose.goose--anim-idle .goose-sprite {
    background-size: auto 44px;
  }

  .goose.goose--anim-walk .goose-sprite {
    animation: gooseSpriteWalkSm 0.52s steps(4, end) infinite;
  }

  .goose.goose--anim-run .goose-sprite {
    animation: gooseSpriteRunSm 0.34s steps(4, end) infinite;
  }

  .goose.goose--anim-flap .goose-sprite {
    animation: gooseSpriteFlapSm 0.42s steps(4, end) infinite;
  }

  .goose.goose--anim-caught .goose-sprite {
    background-size: auto 72px;
  }

  .goose-controls {
    gap: 0.45rem;
  }

  .goose-controls__btn {
    padding: 0.4rem 0.72rem;
    font-size: 0.82rem;
  }

  .goose-controls__hint {
    width: 100%;
    text-align: center;
    font-size: 0.76rem;
  }
}
