/* --- Xuanji Tu --- */
:root {
  /* Five-colour scheme used by the Xuanji Tu SVG via CSS vars like var(--xuanji-red). */
  --xuanji-red: #c41e3a;
  --xuanji-black: #111111;
  --xuanji-blue: #1f5fbf;
  --xuanji-purple: #6a3fbf;
  --xuanji-yellow: #b88a00;
}


/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Fonts are declared dynamically in layouts/_dynamic_fonts.html.erb
   so adding a new font is just "drop file into app/assets/fonts".
   We only apply the selected font to .maincol/.han-tooltip (see bottom). */

:root {
  --han-font-primary: "WenJin Mincho";
  --han-font-fallback: "WenJin Mincho";
  --han-font-stack: "WenJin Mincho", serif;
}

/* --- Tools: Cangjie list/table ----------------------------------------- */
.cj-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.cj-table th,
.cj-table td {
  border: 1px solid rgba(0,0,0,0.12);
  padding: 6px 8px;
  vertical-align: middle;
  white-space: nowrap;
}

.cj-table thead th {
  background: rgba(0,0,0,0.04);
  position: sticky;
  top: 0;
}

.cj-char { font-size: 22px; text-align: center; }
.cj-cp { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.cj-code { white-space: normal; }
.cj-img { text-align: center; }


/* --- Han character tooltip (Yomitan-ish) --- */
.han-tooltip {
  position: fixed;
  z-index: 9999;
  width: 360px;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  overflow: auto;
  background: rgba(22, 22, 24, 0.98);
  color: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  box-shadow: 0 14px 50px rgba(0,0,0,0.38);
  padding: 12px;
}

.han-tooltip-head {
  cursor: move;
  user-select: none;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
}

.han-tooltip-char {
  font-size: 46px;
  line-height: 1;
  text-align: center;
}

.han-tooltip-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  opacity: 0.9;
}

.han-tooltip-actions { display: flex; gap: 6px; }

.han-tooltip-btn {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: inherit;
  border-radius: 10px;
  padding: 2px 8px;
  cursor: pointer;
}

.han-tooltip-btn.is-active {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.24);
}

.han-tooltip-tabs { display: flex; gap: 8px; margin: 10px 0; }

.han-tooltip-tab {
  flex: 1;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: inherit;
  cursor: pointer;
  font-size: 12px;
}

.han-tooltip-tab.is-active {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.22);
}

.han-tooltip-panel { display: none; font-size: 13px; line-height: 1.35; }
.han-tooltip-panel.is-active { display: block; }
.han-tooltip-panel ol { margin: 0; padding-left: 18px; }

.han-tooltip-foot { margin-top: 10px; font-size: 12px; opacity: 0.75; }

.muted { opacity: 0.75; }

/* --- Header layout: character + HanziWriter --- */
.char-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 12px;
}

.char-glyph {
  font-size: 4rem;
  line-height: 1;
  margin: 0;
}

/* Make it stack vertically on narrow screens */
@media (max-width: 600px) {
  .char-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --- HanziWriter widget --- */
.hw-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hanzi-writer-box {
  width: 120px;
  height: 120px;
}

.hw-fallback {
  margin-top: 8px;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* --- HKCards decomposition card widget --- */
.cj-card {
  padding: 8px;
  border-radius: 12px;
  margin-top: 6px;
}

.cjimg {
  display: block;
  height: auto;
}

.cjimg-small {
  width: 300px;
  max-width: 100%;
}

/* --- Small helper text used in the Variants section --- */
.variant-note {
  font-size: 0.9em;
  font-style: italic;
  opacity: 0.85;
}



/* --- Global header (site title + search) --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: 10px 16px;
}

/*
 * The header has three jobs:
 *   1. title + navigation
 *   2. dictionary search
 *   3. options + lunar date
 *
 * Grid lets those jobs move onto new rows without squeezing individual
 * navigation labels or the title into accidental vertical columns.
 */
.site-header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 32rem) max-content;
  grid-template-areas: "left center right";
  align-items: center;
  gap: 0.75rem 1rem;
  width: 100%;
  min-width: 0;
}

.site-header-left {
  grid-area: left;
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.5vw, 1.5rem);
  min-width: 0;
}

.site-title {
  flex: 0 0 auto;
  min-width: 0;
}

.site-title-link {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  color: inherit;
  font-family: "WenJin Mincho", serif;
  font-size: clamp(1rem, 1.25vw, 1.35rem);
  font-weight: 600;
  line-height: 1.05;
  text-decoration: none;
  white-space: nowrap;
}

.site-title-link:hover,
.site-title-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.site-title-part {
  display: inline;
}

.site-nav {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.9rem;
  min-width: 0;
}

.site-nav-link {
  flex: 0 0 auto;
  line-height: 1.2;
  opacity: 0.85;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav-link:hover,
.site-nav-link:focus-visible {
  opacity: 1;
  text-decoration: underline;
}

.site-header-center {
  grid-area: center;
  min-width: 0;
}

.site-search {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
}

.site-search-input {
  box-sizing: border-box;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.site-search-submit {
  flex: 0 0 auto;
}

.site-header-right {
  grid-area: right;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  min-width: 0;
}

/* GanZhi date */
.lunar-date {
  font-size: 0.9rem;
  opacity: 0.85;
  white-space: nowrap;
}

/* Medium screens: let the header use two rows instead of trailing off-screen. */
@media (max-width: 1180px) {
  .site-header-inner {
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-areas:
      "left left"
      "center right";
  }
}

/* Phones: each header job gets its own predictable row. */
@media (max-width: 700px) {
  .site-header {
    padding: 10px 12px;
  }

  .site-header-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "left"
      "center"
      "right";
    gap: 0.75rem;
  }

  .site-header-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    width: 100%;
  }

  /* Deliberate two-line logo: 泛亞漢文 / 語料庫. */
  .site-title-link {
    grid-auto-flow: row;
    grid-template-columns: max-content max-content;
    font-size: clamp(1rem, 5vw, 1.25rem);
    white-space: normal;
  }

  .site-title-part--corpus {
    grid-column: 1 / -1;
  }

  .site-nav,
  .site-search,
  .site-header-right {
    width: 100%;
  }

  .site-nav {
    gap: 0.45rem 0.85rem;
  }

  .site-header-right {
    justify-content: flex-start;
  }
}

/* --- Page shell: main content + right sidebar --- */
.page-shell {
  display: flex;
  align-items: flex-start;
}

.site-main {
  padding: 16px;
  flex: 1;
  min-width: 0; /* prevents overflow in flex layouts */
}

.site-rightbar {
  width: 280px;
  padding: 16px 16px 16px 0;
}

/* Keep the right bar visible while scrolling */
.rightbar-sticky {
  position: sticky;
  top: 72px; /* header height + a bit of breathing room */
}

/* Stack sidebar below main content on narrow screens */
@media (max-width: 920px) {
  .page-shell {
    flex-direction: column;
  }

  .site-rightbar {
    width: 100%;
    padding: 0 16px 16px 16px;
  }

  .rightbar-sticky {
    position: static;
  }
}

/* Screen-reader-only text (visually hidden, still accessible) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* --- Collapsible "Variant-specific definitions" --- */
.variant-defs {
  margin-top: 16px;
}

.variant-defs summary {
  cursor: pointer;
  font-weight: 600;
}

.variant-defs[open] summary {
  margin-bottom: 10px;
}


/* --- Right sidebar controls (romanisation / ruby / script) --- */
.rightbar-box {
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  padding: 12px;
}

.rightbar-box h3 {
  margin: 0 0 10px 0;
  font-size: 1.0rem;
}

.rightbar-section {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.rightbar-section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.rightbar-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0;
}

.rightbar-label {
  font-size: 0.92rem;
  opacity: 0.85;
}

.rightbar-select {
  width: 160px;
}

.rightbar-button {
  margin-top: 8px;
  padding: 6px 10px;
  width: 100%;
}

/* --- Ruby annotations ---
   Ruby layout across browsers is famously "a bit haunted".
   We do two simple, predictable modes:
   - horizontal: ruby text sits above the glyph, left-to-right
   - vertical: ruby text sits above the glyph, but the ruby itself stacks top-to-bottom
              (so long readings don't become wider than the character)

   NOTE: We anchor the <rt> with absolute positioning because the browser-native ruby
   layout can vary a lot and tends to jump around with big font sizes.
*/
.char-glyph ruby.ruby-annot {
  position: relative;
  display: inline-block;
}

.char-glyph ruby.ruby-annot rt {
  position: absolute;
  top: -20px;              /* requested offset (~20px) */
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.28em;
  font-style: italic;
  opacity: 0.9;
  line-height: 1;
  white-space: nowrap;
}

.char-glyph ruby.ruby-annot.ruby-vertical rt {
  writing-mode: vertical-rl;
  text-orientation: upright;
  white-space: normal;
}

.char-glyph ruby.ruby-annot.ruby-vertical.ruby-side-right rt {
  top: 0;
  left: calc(100% + 6px); /* right side of the glyph */
  transform: none;
}

.char-glyph ruby.ruby-annot.ruby-vertical.ruby-side-left rt {
  top: 0;
  left: -6px;             /* left side of the glyph */
  transform: translateX(-100%);
}

/* Han-script font switching
   The selected Han font is restricted by @font-face unicode-range so Latin
   letters/numerals keep the UI font even when applied to a container.

   Scope modes:
   - all: apply to main content + tooltip body
   - headwords: apply only to dictionary headwords + tooltip headword
*/
body.han-font-scope-all .maincol,
body.han-font-scope-all .han-tooltip {
  font-family: var(--han-font-stack, serif);
}

body.han-font-scope-headwords .char-glyph,
body.han-font-scope-headwords .han-tooltip-char {
  font-family: var(--han-font-stack, serif);
}

.han-font-warning {
  margin-top: 6px;
  font-size: 0.85em;
  opacity: 0.85;
}

.han-font-warning strong {
  font-weight: 600;
}

.han-font-warning code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
}

/* Xiangqi Minigame */

pre.xiangqi-board {
  line-height: 1;
  letter-spacing: 0;
  font-size: 22px;
  white-space: pre;
}

pre.xiangqi-board.theme-colour {
  font-family: "BabelStone Xiangqi Colour", "BabelStone Xiangqi";
}

pre.xiangqi-board.theme-mono {
  font-family: "BabelStone Xiangqi", "BabelStone Xiangqi Colour";
}

.xiangqi-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.xiangqi-toolbar .label {
  font-weight: 600;
}

.xiangqi-toolbar form {
  display: inline;
  margin: 0;
}

.xiangqi-toolbar button.active {
  outline: 2px solid currentColor;
}

.xq-grid {
  display: grid;
  grid-template-columns: 30px repeat(9, 40px);
  grid-auto-rows: 40px;
  align-items: center;
  justify-items: center;
  gap: 2px;
}

.xq-top-label, .xq-left-label {
  font-weight: 600;
  font-size: 14px;
}

.xq-cell {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid #999;
  font-size: 20px;
}

/* --- Pronunciation sub-sections (collapsible language families) --- */
.pronun-sections { margin: 0.25rem 0 1rem; }

.pronun-section {
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  padding: 6px 10px;
  margin: 8px 0;
  background: rgba(0,0,0,0.02);
}

.pronun-section > summary {
  cursor: pointer;
  list-style: none;
  display: grid;
  grid-template-columns: 0.9rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.pronun-section > summary::-webkit-details-marker { display: none; }

.pronun-section > summary::before,
.pronun-variety > summary::before {
  content: "▶";
  display: inline-block;
  font-size: 0.72em;
  line-height: 1;
  opacity: 0.72;
  transform-origin: center;
  transition: transform 120ms ease;
}

.pronun-section[open] > summary::before,
.pronun-variety[open] > summary::before {
  transform: rotate(90deg);
}

.pronun-section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pronun-section-count {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.15);
  font-weight: 500;
  opacity: 0.85;
}

.pronun-section-list { margin: 8px 0 0; padding-left: 22px; }

.pronun-tooltip {
  margin-left: 6px;
  cursor: help;
  font-size: 0.95em;
  opacity: 0.85;
}

/* --- Pronunciation varieties nested inside a language-family section --- */
.pronun-variety {
  margin: 8px 0 4px 12px;
  padding: 5px 8px;
  border-left: 3px solid rgba(0,0,0,0.12);
}

.pronun-variety > summary {
  cursor: pointer;
  list-style: none;
  display: grid;
  grid-template-columns: 0.9rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.pronun-variety > summary::-webkit-details-marker { display: none; }


.pronun-variety-meta {
  margin: 8px 0 4px 1.4rem;
  font-size: 0.9em;
  line-height: 1.45;
  opacity: 0.9;
}

.pronun-variety-meta p {
  margin: 0 0 4px;
}

.pronun-variety-references {
  margin: 6px 0 4px;
}

.pronun-variety-references > summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.pronun-reference-count {
  min-width: 1.25rem;
  padding: 0 5px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 999px;
  font-size: 0.8em;
  font-weight: 500;
  text-align: center;
}

.pronun-variety-references ol {
  margin: 6px 0 6px;
  padding-left: 1.4rem;
}

.pronun-variety-references li {
  margin: 0 0 4px;
}

.pronun-reference-label {
  font-weight: 600;
}

/* --- Xuanji Tu --- */
.xuanji-toolbar {
  margin: 0 0 12px;
}

.xuanji-variant a {
  margin-left: 8px;
  text-decoration: none;
}

.xuanji-variant a.active {
  font-weight: 700;
  text-decoration: underline;
}

.xuanji-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 12px 0 16px;
}

.xuanji-controls label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.xuanji-main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
}

.xuanji-gridwrap {
  overflow: auto;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

.xuanji-svg {
  display: block;
}

.xuanji-rect {
  fill: white;
  stroke: rgba(0,0,0,0.06);
}

.xuanji-text {
  font-family: var(--han-font-stack);
  font-size: 16px;
}

.xuanji-rect.is-active {
  stroke: rgba(0,0,0,0.6);
  stroke-width: 1.5;
}

.xuanji-rect.is-traced {
  fill: rgba(255, 230, 150, 0.6);
}

.xuanji-rect.is-manual {
  /* Manual selection highlight (blue). Keeps 五色 text visible. */
  stroke: rgba(31, 95, 191, 0.95);
  stroke-width: 2.4;
  fill: rgba(31, 95, 191, 0.18);
}

.xuanji-output pre {
  max-height: 70vh;
  overflow: auto;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.03);
  white-space: pre-wrap;
}

/* --- Collapsible rightbar --- */
body.rightbar-collapsed .page-shell {
  grid-template-columns: 1fr;
}

body.rightbar-collapsed .rightbar {
  display: none;
}

.rightbar-toggle {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
}

.rightbar-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
}

.rightbar-toggle.is-collapsed {
  opacity: 0.85;
}


/* Xuanji output: phoneticization lines (rendered under each extracted line). */
.xuanji-phon {
  opacity: 0.78;
  font-size: 0.92em;
}


/* --- Daily Shijing widget (home page) ---
   NOTE: Widget chrome uses the BEM class names from app.zip:
   .daily-shijing-card-header, .daily-shijing-card-link, etc.
   This block contains ONLY widget visuals (no positioning).
*/

.daily-shijing-card {
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  overflow: hidden;
  max-width: 520px;
}

/* Header strip */
.daily-shijing-card-header,
.daily-shijing-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 14px;
  border-bottom: 1px solid #efefef;
}

.daily-shijing-card-name,
.daily-shijing-label {
  font-weight: 700;
  font-size: 18px;
}

.daily-shijing-card-phase,
.daily-shijing-period {
  font-size: 14px;
  opacity: 0.75;
  white-space: nowrap;
}

/* Meta row (毛59 竹竿) */
.daily-shijing-card-meta {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 12px 14px 4px 14px;
}

.daily-shijing-card-mao {
  font-weight: 700;
  font-size: 18px;
}

.daily-shijing-card-title {
  font-size: 18px;
}

/* Categories (國風 · 衛風) */
.daily-shijing-card-cats,
.daily-shijing-group {
  padding: 0 14px 10px 14px;
  font-size: 14px;
  opacity: 0.85;
}

.daily-shijing-card-text,
.daily-shijing-text {
  padding: 0 14px 12px 14px;
}

.daily-shijing-card-text pre,
.daily-shijing-text pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  font-size: 16px;
  font-family: inherit;
}

/* Footer + button */
.daily-shijing-card-footer,
.daily-shijing-footer {
  padding: 10px 14px;
  border-top: 1px solid #efefef;
}

.daily-shijing-card-link,
.daily-shijing-open {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid #bdbdbd;
  border-radius: 10px;
  text-decoration: none;
}

.daily-shijing-card-link:hover,
.daily-shijing-open:hover {
  text-decoration: underline;
}

.daily-shijing-card-empty {
  padding: 12px 14px;
  opacity: 0.7;
}

/* Make the card shrink nicely on small screens */
@media (max-width: 900px) {
  .daily-shijing-card { max-width: 100%; }
}
/* --- Home page wrapping layout for Daily Shijing (float-right, text wraps) --- */
.home-hero {
  display: block !important; /* override any flex/grid home hero */
}

.home-hero::after {
  content: "";
  display: block;
  clear: both;
}

.home-hero-right {
  float: right;
  width: min(520px, 42%);
  margin: 0 0 1.5rem 2rem;
}

.home-hero-left {
  display: block !important;
}

@media (max-width: 900px) {
  .home-hero-right {
    float: none;
    width: 100%;
    margin: 0 0 1rem 0;
  }
}

/* --- Global site footer ------------------------------------------------ */
.site-footer {
  margin-top: 32px;
  border-top: 1px solid #e6e6e6;
  background: #fafafa;
  color: #222;
}

.site-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 16px 16px;
}

.site-footer-identity {
  max-width: 720px;
}

.site-footer-title,
.site-footer-summary {
  margin: 0;
}

.site-footer-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  font-family: "WenJin Mincho", serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.site-footer-title span {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
}

.site-footer-summary {
  margin-top: 6px;
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.82;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
}

.site-footer-link {
  color: inherit;
  font-size: 0.9rem;
  text-decoration: none;
}

.site-footer-link:hover,
.site-footer-link:focus-visible {
  text-decoration: underline;
}

.site-footer-meta {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 16px 16px;
  border-top: 1px solid #ededed;
  font-size: 0.78rem;
  line-height: 1.45;
  opacity: 0.72;
}

@media (max-width: 700px) {
  .site-footer-inner {
    flex-direction: column;
  }

  .site-footer-links {
    justify-content: flex-start;
  }
}

/* Ensure the header logo/title uses WenJin Mincho */
.site-title-link {
  font-family: "WenJin Mincho", serif;
}

