/* =======================
   YLEISET
   ======================= */
body {
  margin: 0;
  font-family: Georgia, serif;
  text-align: center;
  background: #000;
  color: #C23D96;           /* pinkki leipäteksti */
}

a, a:visited {
  color: #33F;              /* sininen linkki */
  text-decoration: underline;
}
a:hover { color: #66F; }

/* =======================
   NAVI (desktop, vapaa leveys)
   ======================= */
nav {
  display: flex;
  justify-content: center;  /* keskittää koko rivin */
  gap: 0;                   /* ei välejä ellei halua */
  margin: 20px auto 60px;
}
nav a {
  display: inline-block;
}
nav a img {
  height: 50px;   /* lukittu korkeus */
  width: auto;    /* leveys oman kuvan mukaan */
  display: block;
}

/* =======================
   HAHMOT (thumb-grid)
   ======================= */
.grid {
  margin: 0 auto;
  text-align: center;
  font-size: 0;
}
.grid a {
  display: inline-block;
  vertical-align: bottom;
  margin: 6px;
  font-size: 0;
}
.grid img {
  height: 200px;
  width: auto;
  display: block;
}
.row-break {
  display: block;
  width: 100%;
  height: 0;
}

/* =======================
   HAHMO-SIVUJEN NUOLINAVI
   ======================= */
.char-nav {
  max-width: 800px;
  margin: 0 auto 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  padding: 0 12px;
}
.char-nav .arrow {
  height: 60px;
  width: auto;
  display: block;
  cursor: pointer;
}

/* =======================
   TEOKSET ja TEKIJÄ
   ======================= */
.container {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  margin: 60px auto;
  max-width: 1200px;
}
.container img {
  height: 600px;
  width: auto;
  display: block;
}
.text-box {
  height: 600px;
  width: 100%;
  max-width: 260px;
  background: #000;
  color: #C23D96;
  padding: 20px;
  box-sizing: border-box;
  text-align: left;
  line-height: 1.5;
  font-family: Georgia, serif;
  overflow: visible; /* ei turhaa scrollbarria */
}
.text-box a {
  color: #005EFF;
  text-decoration: underline;
}

/* =======================
   VALIKKO-NAPPI
   ======================= */
/* Desktopissa piilossa */
.menu-toggle {
  display: none !important;
}

/* =======================
   MOBIILI ≤ 900px
   ======================= */
@media (max-width: 900px) {
  /* Näytä valikkokuva nappina mobiilissa */
  .menu-toggle {
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    margin: 10px auto;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
  }
  .menu-toggle img {
    height: 28px;   /* säädä kuvan koko tähän */
    width: auto;
    display: block;
  }

  /* Piilotetaan navi oletuksena */
  #nav-toggle ~ nav { display: none; }
  /* Kun checkbox on päällä → näytä navi */
  #nav-toggle:checked ~ nav { display: grid; }

  /* Mobiilin navin asettelu */
  nav {
    grid-template-columns: 1fr;
    max-width: 100%;
    margin: 10px auto 20px;
  }
  nav a img {
    width: 50%;
    height: auto;
    margin: 0 auto;
  }

  /* Hahmot mobiilissa */
  .grid {
    padding: 0 12px;
    text-align: center;
  }
  .grid a {
    display: block;
    margin: 12px auto;
  }
  .grid img {
    width: 50%;
    height: auto;
    margin: 0 auto;
  }
  .row-break { display: none; }

  /* Teokset ja Tekijä mobiilissa */
  .container {
    flex-direction: column;
    align-items: center;
  }
  .container img {
    height: auto;
    width: 100%;
    max-width: 900px;
  }
  .text-box {
    max-width: none;
    width: 90%;
    height: auto;
    overflow: visible;
  }

  /* Nuolinavi mobiilissa */
  .char-nav { max-width: 100%; gap: 20px; }
}
