html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

:root {
  --bg-main: #111111;
  --bg-card: #1a1a1a;
  --bg-tile: #333333;
  --bg-modal: #ffffff;

  --text-main: #ffffff;
  --text-muted: #cccccc;
  --text-dark: #000000;

  --accent-green: #2ecc71;
  --accent-yellow: #f1c40f;
  --accent-blue: #1b73e8;
  --accent-wrong: #444444;

  --border-subtle: #333333;

  --caret-space: 28px;

}

body.light-theme {
  --bg-main: #f4f5f7;
  --bg-card: #ffffff;
  --bg-tile: #e6e8eb;
  --bg-modal: #ffffff;

  --text-main: #111111;
  --text-muted: #555555;
  --text-dark: #000000;

  --accent-green: #2ecc71;
  --accent-yellow:  #f1c40f;
  --accent-blue: #1b73e8;
  --accent-wrong: #d6d9dd;

  --border-subtle: #d0d3d8;
}

body.light-theme .wrong {
  color: #000000
}

body {
  background: var(--bg-main);
  color: var(--text-main);
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-family: "Inter Tight", sans-serif;
  font-weight: 400;
  overflow-x: hidden;
}


.landing-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    position: fixed;
    inset: 0;
    background: #111;

    z-index: 9998;
    text-align: center;
}

.landing-screen,
.landing-screen * {
  color: #ffffff !important;
}

.landing-title {
    font-size: 48px;
    margin-bottom: 10px;
    font-weight: 700;
}

.landing-subtitle {
    font-size: 18px;
    opacity: 0.8;
    margin-bottom: 30px;
    margin-top: 0px;
    margin-bottom: 0px;
}


.landing-play-btn {
    padding: 14px 40px;
    font-size: 22px;
    font-weight: 600;
    border-radius: 40px;
    margin-top: 30px;
    border: none;
    cursor: pointer;
    background: #2ecc71;
    color: black;
}

/* Center the whole hero block (title + subtitle + search) */
.hero {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;              /* centers the entire block */
    display: flex;
    flex-direction: column;
    align-items: center;         /* centers children horizontally */
    text-align: center;
}


/* ---------------------------------------------------
      FIXED HEADBAND (like Spotle)
--------------------------------------------------- */
.top-buttons {
    position: fixed;
    top: 0;
    right: 0;
    left: 0; /* ensures full width */
    width: 100%;
    height: 55px;

    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;

    padding: 0 20px;
    background: #111; /* matches site background */
    z-index: 9999;

    box-sizing: border-box;
}

/* Ensure page content is not hidden under fixed bar */
body {
  padding-top: 70px;
}

.lang-menu {
    position: absolute;
    top: 60px;
    right: 20px;

    background: #f5f6f7;
    color: black;
    border-radius: 10px;

    max-height: 300px;       /* ← limit vertical space */
    overflow-y: auto;        /* ← enable scrolling */
    overflow-x: hidden;      /* optional: hide horizontal scroll */

    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    font-size: 15px;
    z-index: 20000;
    scroll-behavior: smooth;
}


.lang-menu div {
    padding: 10px 15px;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-menu div:hover {
    background: #eee;
}

.lang-menu .fi {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    flex-shrink: 0;
}

.lang-label {
    white-space: nowrap;
}

.title {
  text-align: center;
  font-size: 40px;
  margin-top: 15px;
  font-weight: bold;
}

.subtitle {
    text-align: center;
    font-size: 25px;
    color: white;          /* soft grey text */
    margin-top: 0px;    /* pull it closer to the title */
    margin-bottom: 25px;  /* spacing before search bar */
    font-weight: 300;     /* light/clean look */
}

/* MENU DROPDOWN */
.info-menu {
  position: absolute;
  top: 60px;
  right: 20px;
  background: #f5f6f7;
  color: black;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  min-width: 240px;
  z-index: 20000;
}

.info-menu div {
  padding: 12px 16px;
  cursor: pointer;
}

.info-menu div:hover {
  background: #eee;
}

.info-footer {
  font-size: 13px;
  opacity: 0.7;
  cursor: default;
}

/* ---------------------------------------------------
   SPOTLE-STYLE MENU SHEET
--------------------------------------------------- */
.menu-sheet {
  position: fixed;
  top: 55px; /* same height as .top-buttons */
  left: 0;
  width: 100%;
  z-index: 15000;

  transform: translateY(-20px);
  opacity: 0;
  pointer-events: none;

  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-sheet.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.menu-sheet-content {
  max-width: 420px;
  margin: 0 0 0 20px;
  background: #f5f6f7;
  color: black;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  padding: 10px 0;
}

.menu-sheet-content > div {
  padding: 14px 18px;
  font-size: 16px;
  cursor: pointer;
}

.menu-sheet-content > div:hover {
  background: #e9eaeb;
}

/* FAQ ACCORDION */
.faq-item {
  margin-top: 12px;
}

.faq-question {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  cursor: pointer;
}

.faq-answer {
  display: none;
  margin-left: 0px;
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.45;
  padding: 0 8px;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-item.open .faq-question i {
  transform: rotate(90deg);
}

/* Menu button only: move to left */
#menuBtn {
  position: absolute;
  left: 20px;
  color: inherit;
}

/* ---------------------------------------------------
   SPOTLE-STYLE FULLSCREEN MODAL
--------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.65);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 20000; /* above the top-buttons */
}

.hidden {
  display: none !important;
}

.modal-content {
  background: white;
  color: #000;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  border-radius: 12px;
  padding: 15px;
  position: relative;
  overflow-y: auto;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  flex-direction: column;
  align-items: center;
}

.modal-content h2 {
  margin-top: 2px;
  text-align: center;
  font-size: 22px;
  font-weight: 500;
}

/* Fine control of line spacing inside Rules modal */


.modal-content h3,
.modal-content p.rules-text {
    margin-top: 6px !important;
    margin-bottom: 6px !important;
    line-height: 1.4;
}

/* -------------------------------------
   FINAL MODAL FLIP ANIMATION
------------------------------------- */

/* Initial hidden state */
.modal-content.flip {
  transform: rotateY(90deg);
  opacity: 0;
}

/* Animate into view */
.modal-content.flip.show {
  animation: flipIn 0.6s ease-out forwards;
}

@keyframes flipIn {
  0% {
    transform: rotateY(90deg);
    opacity: 0;
  }
  60% {
    transform: rotateY(-10deg);
    opacity: 1;
  }
  100% {
    transform: rotateY(0deg);
    opacity: 1;
  }
}

/* Needed for 3D depth */
.modal-overlay {
  perspective: 1200px;
}


/* Close icon */
.close-btn {
  position: sticky;
  top: 0px;
  right: 0px;
  margin-left: auto;
  display: block;
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
}

.close-btn i {
  font-size: 28px;
}

/* Content formatting */
.modal-inner h2 {
  margin-top: 8px;
  font-size: 30px;
  margin-bottom: 8px;
}

.modal-inner ul {
  padding-left: 20px;
  font-size: 16px;
}

.modal-inner li {
  margin: 10px 0;
}

.rules-illustration {
  margin-top: 12px;
  text-align: center;
}

.rules-illustration img {
  width: 100%;
  max-width: 420px;
  border-radius: 10px;
  background: transparent;
}

.rules-examples {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 12px;
  text-align: center;
  justify-items: center;
}

.rules-example {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* FIXED HEIGHT IMAGE SLOT */
.rules-example-img {
  height: 90px;              /* ← THIS controls consistency */
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Image scales inside the slot */
.rules-example-img img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
  background: transparent;
}

.rules-example-label {
  margin-top: 6px;
  font-size: 16px;
  opacity: 1;
}

/* REALM MAP */
/* Base realm appearance */
.realm-map g.realm {
  color: #444;              /* ← controls fill */
}

.realm-map g.realm path {
  stroke: #222;
  stroke-width: 1;
  cursor: pointer;
  transition: color 0.2s;
}

.realm-map-container {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;   /* ← THIS controls B */
}

/* Hover */
.realm-map g.realm:hover {
  color: #777;
}

/* Active (selected) */
.realm-map g.realm.active {
  color: #2ecc71;           /* ← GREEN */
}

.realm-map {
  width: 100%;
  height: 300px;                 /* 🔥 MAIN CONTROL FOR A & B */
  display: block;                /* remove inline SVG gap */
}

.realm-label {
  width: 100%;
  text-align: center;     /* ← center text */
  font-weight: 700;
  margin-bottom: 0px;
  color: white;
}

/* ---------------------------------------------------
   Reveal tile and décompte
--------------------------------------------------- */

.modal-btn {
    padding: 12px 20px;
    width: auto;
    text-align: center;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    color: white;

    display: block;         /* treat button as a block */
    align-self: center;     /* also centers if parent is flex */
}

.botw-btn {
    background-color: #1b73e8; 
    border: none;
    margin: 0 auto; 
    margin-top: 4px;
}

.share-btn {
  background-color: #2ecc71; 
  border: none;
  margin: 6px auto 0 auto;
}

.next-birdle-timer {
    margin-top: 8px;
    margin-bottom: 0px;
    font-size: 18px;
    text-align: center;
    font-weight: 600;
}

/* ---------------------------------------------------
   RULES ATTRIBUTES GRID (Spotle Style)
--------------------------------------------------- */
.rules-attribute-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 20px;
}

.rules-attr-tile {
  height: 55px;
  background: #222;
  color: white;
  border-radius: 10px;
  text-align: center;
  font-size: 16px;
  cursor: pointer;
  border: 2px solid #333;
  transition: 0.2s;
  white-space: nowrap;

  /* FIX CENTERING */
  display: flex;
  justify-content: center;
  align-items: center;
}

.rules-attr-tile:hover {
  background: #333;
}

.rules-attr-tile.active {
  background: #444;
  border-color: #666;
}

/* Expanded detail section */
.rules-details {
  font-size: 15px;
  margin-top: 15px;
  background: #111;
  padding: 18px;
  border-radius: 12px;
  color: white;
  border: 2px solid #333;
}

.rule-detail-buttons {
  display: flex;
  justify-content: center;   /* centers buttons horizontally */
  gap: 10px;
  margin-top: 15px;
}

.rule-button {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  color: white;
  text-align: center;

  height: 45px;
  width: 70px;     /* <— use width instead of max-width + flex */
  
  display: flex;
  justify-content: center;
  align-items: center;
}

.rule-button.incorrect {
  background: #555;
}

.rule-button.partial {
  background: #b8a50a;
}

.rule-button.correct {
  background: #2ecc71;
}

/* -------------------------------------
   ICON BUTTON (restart, help, language)
--------------------------------------- */
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f5f6f7;
  color: black;
  border: 0px solid black;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  padding: 0;
}

.icon-btn i {
  font-size: 26px;
  color: inherit;
}

.icon-btn:hover {
  background: #e8e8e8;
}

/* Language icon specifically */
.lang-btn i {
  font-size: 26px;
}

#langIcon {
  width: 24px;
  height: 18px;
  border-radius: 3px;
}

/* -------------------------------
   STANDARD BUTTON (unchanged)
-------------------------------- */
.btn-standard {
  background: white;
  color: black;
  padding: 0 22px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  height: 45px;
  display: flex;
  align-items: center;
}

/* Input + layout */
.input-row {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Score banner */
.score-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;

  margin: 8px auto 0 auto;
  color: #000;
}

.score-line {
  font-weight: 700;
  font-size: 18px;
  text-align: center;
}

.score-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.score-actions-label {
  font-weight: 700;
  font-size: 18px;
}

.score-action-btn {
  width: 32px;
  height: 32px;
}

.score-action-btn i {
  font-size: 16px;
}

#toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

#toast.show {
  opacity: 1;
}


/* Search block layout */
#search-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.status-text {
  text-align: center;
  font-size: 16px;
  font-weight: 300;
}

.rules-panel {
  background: #222;
  padding: 20px;
  border-radius: 10px;
  margin: 20px;
  font-size: 13px;
}

/* -------------------------------------
   MATCH LEGEND (always visible)
------------------------------------- */
.match-legend{
  width: 100%;
  max-width: 350px;
  margin: 50px auto 50px auto;
  text-align: center;
}

.legend-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 6px;
}

.legend-tile {
  padding: 10px 6px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
}

/* Reuse existing tile colors */
.legend-tile.wrong {
  background: var(--accent-wrong);
}

.legend-tile.partial {
  background: var(--accent-yellow);
}

.legend-tile.correct {
  background: var(--accent-green);
}

.legend-text {
  font-size: 14px;
  opacity: 0.85;
  font-weight: 400;
}


/* Bird names */
.bird-name-display {
  margin-bottom: 10px;
  width: 100%;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.bird-name-display .common-name {
  font-size: 16px;
  font-weight: 350;
  color: white;
}

.bird-name-display .scientific-name {
  font-size: 16px;
  font-weight: 350;
  font-style: italic;
  color: white;
  opacity: 1;
}

body.light-theme .bird-name-display,
body.light-theme .bird-name-display .common-name,
body.light-theme .bird-name-display .scientific-name {
  color: var(--text-main);
}

/* Guess rows */
.guess-row {
  background: #1A1A1A;
  padding: 15px;
  border-radius: 15px;
  margin: 15px auto;
  max-width: 500px;
  width: 100%;
}

body.light-theme .guess-row {
  background: var(--bg-card);
}

.reveal-row {
  background: #2ECC71;
  color: black;
}

body.light-theme .reveal-row {
  background: var(--bg-card);
  color: var(--text-main);
}

body.light-theme .reveal-title {
  color: var(--text-main);
}

/* Container layout */
.guess-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  gap: 10px;
}

/* Image */
.image-section {
  position: relative;
  width: 100%;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0;
  height: fit-content;
}

.bird-photo {
  width: 100%;
  max-width: 350px;
  border-radius: 10px;
  height: auto;
  display: block;
}

.bird-iframe {
  width: 100%;
  max-width: 350px;
  height: 380px;            /* 🔥 IMPORTANT */
  max-height: none;        /* 🔥 CRITICAL */
  border: none;
  border-radius: 10px;
  display: block;
  overflow: hidden;
}

/* Info button */

.image-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.image-wrapper .info-toggle {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 20;
    bottom: 5px;
    right: 5px;
    background: none;
    color: white;
    border: #1A1A1A;
    border-radius: 50%;
   width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    
}



.info-toggle i {
  font-size: 22px;
}

.extra-info {
  background: #1a1a1a;
  color: #eee;
  padding: 4px;
  border-radius: 10px;
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.2;
}

.extra-info p {
  margin: 0;
}

.info-link {
  color: lightgrey !important;
  font-weight: normal !important;
  text-decoration: none !important;
}

.info-link:hover {
  text-decoration: underline;
  opacity: 0.75;
}

/* Disable info icon + credits panel (credits now in embed) */
.image-wrapper .info-toggle,
.extra-info {
  display: none !important;
}

/* Tile grids */
.tile-grids-wrapper {
  width: 450px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.grid-top,
.grid-bottom {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 8px;
}


.grid-bottom {
  margin-top: 8px;
}

/* Tiles */
.tile {
  padding: 10px;
  border-radius: 8px;
  min-height: 70px;
  background: var(--bg-tile);
  color: var(--text-main);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  
}

.tile-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.attr-label {
  font-weight: 400;
  font-size: 16px;
}

.attr-value {
  font-weight: 400;
  margin-top: 4px;
  font-size: 16px;
}

/* Tile colors */
.correct { background: var(--accent-green) !important; }
.partial { background: var(--accent-yellow) !important; }
.wrong { background: var(--accent-wrong) !important; }


/* Reveal box */
.reveal-box {
  margin-top: 30px;
  background: #2ECC71;
  padding: 20px;
  border-radius: 15px;
  color: black;
  font-weight: bold;
  text-align: center;
}

.reveal-row {
  background: #1a1a1a;
  color: #1a1a1a;
}

.reveal-tile {
  background: #2ECC71 !important;
  color: white;
  border: none;
}

.reveal-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 12px;
  color: white;
}

/* The input itself */
#guessInput {
    width: 500px;
    max-width: 80vw;            /* responsive */
    height: 50px;
    padding: 0 16px;
     border: 1px solid var(--border-subtle);
    outline: none;
    border-radius: 25px;
    font-size: 16px;
    background: white;
    color: #000;
    display: block;
    margin: 0 auto;             /* centers inside container */
}

/* Placeholder text ("Type or scroll...") */
#guessInput::placeholder {
  color: #333;   /* darker gray */
  opacity: 1;       /* prevent browser dimming */
}

/* Browser compatibility */
#guessInput::-webkit-input-placeholder {
  color: #333;
}

#guessInput::-moz-placeholder {
  color: #333;
}

#guessInput:-ms-input-placeholder {
  color: #333;
}

#guessInput:focus {
  border-color: white;
}

/* Dice button inside input */
.input-icon-btn {
    position: absolute;
    right: 12px;        /* distance from right of input */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    color: #333;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-icon-btn:hover i {
    color: #222;
}

/* -------------------------------------
   DICE CLICK ANIMATION
------------------------------------- */
.input-icon-btn.animate {
  animation: diceRoll 0.45s ease-out;
}

@keyframes diceRoll {
  0% {
    transform: translateY(-50%) scale(1) rotate(0deg);
  }
  30% {
    transform: translateY(-50%) scale(0.9) rotate(90deg);
  }
  60% {
    transform: translateY(-50%) scale(1.05) rotate(180deg);
  }
  100% {
    transform: translateY(-50%) scale(1) rotate(360deg);
  }
}

/* Autocomplete */
.autocomplete-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  overflow: visible !important;
}

/* Left search icon */
.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #333;
  pointer-events: none;
}

/* Push text so it doesn't overlap the icon */
#guessInput {
  padding-left: 44px; /* space for search icon */
}

/* The dropdown aligned perfectly under the input */
.autocomplete-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;            /* align with the input */
    right: 0;           /* stretch to input width */
    transform: none;    /* remove problematic centering */

    width: 100%;
    max-width: none;    /* ensures full input width */
    
    background: white;
    color: black;
    max-height: 250px;
    overflow-y: auto;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    z-index: 9999;
    display: none;
}
.autocomplete-item {
  padding: 10px;
  cursor: pointer;
  font-size: 16px;
  text-align: left;
}

.autocomplete-item:hover {
  background: #eee;
}

.highlight {
  background: lightpink;
  font-weight: 600;
}

.autocomplete-item.active {
  background: lightgrey;
  font-weight: 600;
}

/* Greyed-out disabled search bar */
#guessInput.disabled {
  background-color: #555 !important;
  color: #999 !important;
  border: none;
  cursor: not-allowed;
  pointer-events: none;
}

#status.disabled {
    color: #777;   /* greyed-out text */
}

.autocomplete-list.disabled {
  display: none !important;
}

/* Hide scrollbar on desktop */
@media (hover: hover) and (pointer: fine) {
    ::-webkit-scrollbar {
        width: 0px;
        background: transparent;
    }

    body {
        scrollbar-width: none;   /* Firefox */
    }
}

/* Header: does not reserve space for caret */
.bird-header {
  position: relative;
  width: 100%;
  text-align: center;
  margin-bottom: 6px;
  box-sizing: border-box;
}

/* Caret: overlay, does NOT affect layout */
.collapse-btn {
  position: absolute;
  left: 10px;             /* adjust to taste */
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;             /* sits above */
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-main);
}

.collapse-btn i {
  font-size: 18px;
}

/* Collapsible content wrapper */
.bird-details {
  width: 100%;
}

/* Collapsed state */
.guess-row.collapsed .bird-details {
  display: none;
}



/* -------------------------------------
   MOBILE LAYOUT
-------------------------------------- */
@media (max-width: 600px) {

  .title {
    font-size: 32px;
  }

  .btn-standard {
    padding: 0 14px;
    height: 40px;
    font-size: 14px;
  }

  #search-block {
    width: 100%;
    padding: 10px 0;
    align-items: center;
    margin: 0 auto;
  }

  .autocomplete-container {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
  }

  #guessInput {
    width: 80vw;
    max-width: 360px;
    height: 40px;
    font-size: 16px;
    padding: 0 0px 0 44px;
    border-radius: 25px;
    margin: 0 auto;
  }

  .autocomplete-list {
    max-width: 360px;
    width: 100%;
  }

  .autocomplete-item {
    font-size: 14px;
    padding: 10px
  }

  #status {
    width: 350px;
    text-align: center;
    font-size: 16px;
    font-weight: 300;
  }

  .guess-row {
    width: 100%;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    padding: 15px;
    align-items: stretch;
  }

  .guess-container {
    max-width: 360px;
  }

  .image-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

  .bird-details {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

  .bird-photo {
    width: 260px;
    height: auto;
  }

  .tile-grids-wrapper {
    width: 98%;
    max-width: 360px;
  }

  .grid-top,
  .grid-bottom {
    width: 100%;
  }

  .bird-name-display .common-name,
  .bird-name-display .scientific-name {
    font-size: 16px;
  }

  .tile .attr-label,
  .tile .attr-value {
    font-size: 14px !important;
    line-height: 1.2;
  }

  .tile {
    padding: 8px;
    min-height: 60px;
  }

    .rules-example img {
    height: 60px;
  }

  .realm-map {
    height: 140px;   /* 🔥 smaller height for mobile */
  }

  .realm-map-container {
    margin-top: 6px;
    margin-bottom: 6px;
  }
}



@media (max-width: 480px) {
  .menu-sheet-content {
    margin-left: 12px;
    margin-right: 12px;
    max-width: none;
  }
}