/* Base Styles */
body {
  margin: 0;
  padding: 0;
  background: #000;
  font-family: "Hiragino Kaku Gothic ProN", sans-serif;
  color: #eee;
  line-height: 1.5;
}

a {
  text-decoration: none !important;
  color: orange; /* or any color you prefer */
}

.spacer-20 {
  margin-top: -20px;
}

.spacer20 {
  height: 20px;
}

hr {
  margin: 1em auto;
  border: none;
  border-top: 1px solid #555; /* adjust color if needed */
  width: 90%;
}

.highlight {
  color: #b8860b; /* or any color like #facc15 (yellow-ish) */
  font-weight: bold;
}

.highlight_white {
  color: #fff;
  font-weight: 500;
}

.title-center {
  text-align: center;
  margin: 0.3em 0 0.5em 0; /* top, right, bottom, left */
  font-size: 1.2em;
  font-weight: 500;
  color: gainsboro;
}

/* Header */
.kw-header {
  text-align: center;
  padding: 10px 0;
}

.kw-logo {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.2em;
  font-size: 2.3rem;
  font-weight: 600;
  font-family: 'Marcellus', serif; /* or whatever you use */
  margin-bottom: 0.2em;
}

/* Color styles */
.kakishibu {
  color: #904012;  /* Wabi-sabi orange */
}

.sabi {
  color: #9f8672;  /* Soft brown-gray */
}

/* Optional: Make "World" slightly smaller */
.small {
  font-size: 0.7em;
  font-weight: 700;
  margin-left: 0.1em; /* tweak spacing if needed */
}

.voice-banner:hover {
  filter: brightness(1.05);
}

@media screen and (max-width: 420px) {
  .voice-banner {
    font-size: 1.1em;
    padding: 10px 12px;
  }
}

.kw-container-left {
  max-width: 430px; /* or whatever kw-container uses */
  margin: 0 auto;
  padding: 1.5em;
  text-align: left; /* override center alignment */
  font-size: 0.9rem; /* adjust font size */
}

/* Page Container */
.kw-container {
  max-width: 430px;
  margin: 0 10px 0 15px;
  padding: 8px;
}

    #combo-translation {
      font-size: 1.2em;
      color: #ccc;
      margin: 0.1em auto 0.3em auto !important; /* top, right, bottom, left */
      text-align: center;
      opacity: 0;
      transition: opacity 0.6s ease-in-out;
    }

/* Top Section: Kanji + Meaning Side-by-Side */
.kw-top {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
}

/* Kanji Block */
.kanji-left {
  padding: 0.2em 0.4em;
  text-align: center;
}

.kanji-left h1 {
  font-size: 4.5rem;
  line-height: 1;
  margin: 0.1em 0 0.3em;
	font-family: "KaiTi", "KaiTi SC", "楷体", serif;
	text-shadow: 1px 1px 2px #000;
}
.kanji-left p {
  font-size: 0.9rem;
  margin: 0.2em 0;
  line-height: 1.0;
}

.kanji-left img {
  transition: transform 0.3s ease;
}
.kanji-left img:hover {
  transform: scale(1.1);
}

/* Meaning Block */
.kanji-right {
  background: #000;
  border-radius: 6px;
  padding: 0.6em 0.3em 0.6em 0.1em; /* top, right, bottom, left */
  flex: 1;
}

.kanji-right h2 {
  font-size: 1.1rem;
  color: #7b8b4a;
  margin: 0 0 0.5em;
}

.kanji-right h2 + h2 {
  margin-top: 1em;
}

.kanji-right p,
.kanji-right ul {
  font-size: 0.95rem;
  margin: 0.2em 0;
  line-height: 1.4;
}

.kanji-right ul {
  margin: 0.3em 0 0 1em;
  padding: 0;
}

.kanji-right li {
  margin-bottom: 0.25em;
}

.kanji-right h2:nth-of-type(2) {
  margin-top: 1em;
}

/* Balanced ending for both columns */
.kanji-right p:last-of-type,
.kanji-left p:last-of-type {
  margin-bottom: 0.4em;  /* Light spacing to avoid tight feel */
}

/* Column Sizing */
.kanji-left,
.kanji-right {
  flex: 1 1 50%;
  max-width: 50%;
}
/* General Block Styling */
.kw-block {
  width: 100%;
  background: #000;
  margin: 0.3em 0;
  padding: 0.6em 0em;
}
.kw-block h2 {
  font-size: 1.05rem;
  color: #9f8672;
  margin: 0 0 0.4em;
}

.kw-duo .kw-block {
  flex: 1 1 49.5%;
}

.kw-block ul {
  padding-left: 0; /* Reduce from default (often 2em) */
  margin-left: 0;
  list-style-position: inside;
}
.kw-block li {
  padding-left: 0.2em; /* Optional: add a tiny space before text */
  text-indent: -0.5em; /* Helps align multi-line items neatly */
}

/* Two-Column Block Area */
.kw-duo {
  display: flex;
  gap: 5px;
  margin-bottom: 8px;
}
.kw-duo .kw-block {
  flex: 1;
  margin-top: 0em; /* or even 0 */
  padding: 10px 0px 6px 0px; /* top, right, bottom, left */
  font-size: 0.95rem;
}
.kw-duo h2 {
  font-size: 1rem;
  color: #c36d3c;
  margin-top: 0px;       /* <- add this */
  margin-bottom: 6px;
}

.kw-block#quiz-block {
  margin-top: -.8em;
}

#tap-text {
  color: #9f8672;
}

.kw-footer {
  text-align: center;
  font-size: 1em;
  color: #9f8e72; /* sabi tone */
  padding: 16px 12px;
  border-top: 1px solid #444;
  margin-top: 1.5em;
  line-height: 1.5;
  font-family: "Hiragino Kaku Gothic ProN", sans-serif;
}

.kw-footer a {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}

.kw-footer a:hover {
  text-decoration: underline;
}

.footer-kakishibu {
  color: #c36d3c;
  font-weight: 800;
}

.footer-sabi {
  color: #9f8672;
  font-size: 0.7em;
  font-weight: 600;
}

.compact-footer {
  margin-top: 0px !important; /* or whatever spacing looks best */
}

/* Accordion Block */
/* Container for whole page (elsewhere in your code) */
.kw-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 8px;
}

/* Accordion grid layout */
.accordion-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 0em;
}

/* Full-width override (e.g., for "Sentences") */
.accordion-block.full-width {
  grid-column: span 2;
}

  .accordion-block.full-width {
    grid-column: span 1;
  }
}

/* Accordion block styling */
.accordion-block {
  padding: 0;
  margin: 0.5em 0;
  border-radius: 6px;
  background-color: #000;
  overflow: hidden;
  width: 100%;
}

.accordion-label h2.accordion {
  font-size: 1.0rem;
  font-weight: bold;
  color: #ca952e;  /* kakishibu accent */
  padding: 10px 2px;
  margin: 0;
  border-bottom: 1px solid #333;
}

/* Hide checkbox (used for toggling) */
.accordion-toggle {
  display: none;
}

/* Label styling (heading) */
.accordion-label {
  display: block;
  font-size: 1.05rem;
  color: #ca952e;
  padding: 10px 2px;
  cursor: pointer;
  font-weight: bold;
}

/* Accordion section heading (like h2 with toggle hint) */
.accordion {
  margin: 0;
  font-size: 1.1rem;
  color: #ca952e;
}

/* Optional inline note */
.accordion-note-inline {
  font-size: 0.75em;
  color: #ccc;
  margin-left: 0;
}

/* Content section default state (collapsed) */
.accordion-content {
  max-width: 100%;
  width: 100%;
  padding: 0 !important;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  font-size: 0.9em;
	line-height: 1.6; /* Optional, improves readability slightly */
  color: #eee;
}

/* Expand when checkbox is checked */
.accordion-toggle:checked ~ .accordion-content {
  max-height: 1000px;
  padding: 10px 0px 12px;
}

/* Inside content styling */
.accordion-content ul {
  padding-left: 0; /* or 5px for a lighter indent */
  margin-left: 0;
  list-style-position: inside;
}

.accordion-content li {
  padding: 0; /* adds 5px left padding */
  margin: 0 0 4px 0;
}

.accordion-note-inline {
  display: block;
  font-size: 0.75em;
  color: #999;
  margin-top: 0.1em;
  font-weight: normal;
}

.kanji-tabs {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 2.5em 0 1em;
}

.kanji-tabs a {
  flex: 1;
  text-align: center;
  background-color: #313b12;
  color: antiquewhite;
  border-radius: 16px;
  padding: 0.45em 0.3em;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
  border: 1px solid #333;
}

.kanji-tabs a:hover {
  background-color: darkolivegreen;
  color: #000;
}

#related-kanji a {
  color: orange; /* or any color you prefer */
  text-decoration: none;
}

#related-kanji a:hover {
  color: wheat; /* optional: hover effect in kakishibu-orange */
  text-decoration: underline;
}

.voice-button-group {
  display: flex;
  gap: 10px;
  justify-content: center; /* or space-between if needed */
  margin-top: 12px;
  margin-bottom: 6px;
}

.voice-tab {
  font-weight: 600;
  font-size: 16px;           /* slightly smaller font */
  padding: 8px 16px;          /* tighter padding */
  text-align: center;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;       /* prevents wrapping */
  line-height: 1.2;
}

.voice-tab span.guide-label {
  font-size: 12px;       /* smaller Guide */
  font-weight: 500;   /* thinner Guide */
  color: #111;
}

.voice-tab.green {
  background-color: #4b591f;
  color: antiquewhite;
}

.voice-tab.orange {
  background-color: #7c5509;
  color: antiquewhite;
}

.voice-tab:hover {
  filter: brightness(1.2);
}

.voice-button-center {
  text-align: center;
  margin-top: 10px;
}

.slide-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 1.5em;
}

.kana-slideshow {
  display: flex;
  gap: 6px;
}

.kana-slideshow img {
  transition: opacity 0.5s ease;
}

.kanji-kana-line {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 1em 0 0.3em 0;  /* top, right, bottom, left */
}

.kanji-kana-line img {
  transition: opacity 0.5s ease;
}

/* Particles List */
    .category {
      margin-bottom: 2em;
    }
    .category h2 {
      font-size: 1.1em;
      color: olive;
      border-bottom: 1px solid #444;
      padding-bottom: 0.3em;
    }
    .particle-list {
      margin-top: 0.5em;
    }
    .particle-item {
      margin: 0.3em 0;
    }
    .particle {
      font-weight: bold;
      color: #7b8b4a;
    }
    .example {
      font-style: italic;
      color: #aaa;
    }

.accordion-content ul {
  text-align: left;
  font-size: 0.95rem;
  padding-left: 1.2em;
}

/* Kana List */
    .kana-grid-3col {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 1.2em;
      margin-top: 1em;
    }

    .kana-row {
      display: grid;
      grid-template-columns: repeat(11, auto);
      align-items: center;
      gap: 0.5em;
    }

    .kana-card {
      font-size: 1.2em;
      text-align: center;
    }

    .kana-img {
      width: 48px;
      height: 48px;
      object-fit: contain;
      border-radius: 6px;
      background: #000;
      padding: 4px;
      cursor: pointer;
    }

    .kana-label {
      font-weight: bold;
      font-size: 1.1em;
      text-align: center;
      color: #ca952e;
    }

    .kana-page-title {
      text-align: center;
      margin-top: 1em;
      font-size: 1.5em;
      font-weight: bold;
      color: #7b8b4a;
    }

    .kana-note {
      text-align: center;
      font-size: 1em;
      color: #aaa;
      margin-bottom: 1em;
    }

.kanji-tabs {
  display: flex;
  justify-content: center;
  gap: 0.2em;         /* consistent with kana */
  margin-top: 2em;
  margin-bottom: 0.5em;
}

.kanji-tabs a {
  background: #3a4420;
  color: bisque;
  padding: 0.4em 1.4em;
  border-radius: 10px;
  font-weight: normal;
  text-decoration: none;
  display: inline-block;
  flex: 1;              /* allow 3 equal-width buttons */
  text-align: center;
  max-width: 160px;     /* prevents them from being too wide */
}

.kanji-tabs a:hover {
  filter: brightness(1.1);
}

/* Special color for E-voice in kanji section */
.kanji-tabs .evoice-tab {
  background-color: #896011;  /* kakishibu orange */
  color: bisque;
}

.kanji-tabs--radicals {
  margin-top: 3em; /* or any value you like */
}

.k101-note {
  max-width: 380px;
  margin: 1em auto 0 auto;
  font-size: 1rem;
  color: #ceaa64;
  text-align: left;
  line-height: 1.7;
  font-weight: 400;
}

.k101w-note {
  max-width: 380px;
  margin: 1em auto 0 auto;
  font-size: 1rem;
  color: gainsboro;
  text-align: left;
  line-height: 1.7;
  font-weight: 400;
}

.expandable-note {
  font-size: 1rem;
  line-height: 1.7;
	text-align: left; 
  color: #ceaa64;
  max-width: 380px;
  margin: 2em auto;
}

.expand-toggle {
  display: block;
  margin-top: 0.5em;
  color: #fff;
  font-weight: 500;
  text-decoration: none;  /* ← remove underline */
  cursor: pointer;
}

.expand-toggle:hover {
  color: #ceaa64;
}

    .kana-page-title {
      text-align: center;
      margin: 0.3em 0 0.1em 0;
      font-size: 1.2em;
      font-weight: bold;
      color: bisque;
    }

.kana-tabs {
  display: flex;
  justify-content: center;  /* use center or flex-start for consistent gaps */
  flex-wrap: nowrap;
  gap: 0.4em;               /* consistent spacing between tabs */
  margin-top: 1.2em;
}

.kana-tabs a {
  flex: 0 0 auto;           /* prevent stretching */
  padding: 0.4em 0.8em;
  font-size: 0.95em;
  background-color: #3a4321;
  color: bisque;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.3s ease;
}

.kana-tabs a:last-child {
  padding-left: 1.2em;   /* slightly more space for ▶︎ */
  padding-right: 1.2em;
}

.kana-tabs a:hover {
  background-color: #444;
}

  .toggle-button {
    background-color: #4c5a21;
    color: bisque;
    border: none;
    padding: 6px 12px;
    font-size: 0.9em;
    cursor: pointer;
    margin: 6px auto;
    display: block;
    border-radius: 4px;
  }

.kanji-tabs--wide {
  width: 100%;
  justify-content: space-between;
  max-width: 430px;
  margin: 1.5em auto 0.8em;
}

.kanji-tabs.kanji-tabs--wide a {
  flex: 1;
  margin: 0 0.15em;
}