/* Public Language site — a calm, readable, public reference page.
 * Deliberately NOT the authenticated admin shell. Unicode-safe typography,
 * touch-friendly controls, visible focus, responsive from phone up. */
:root {
  --bg: #faf8f4;
  --panel: #ffffff;
  --ink: #2b2620;
  --muted: #766e61;
  --line: #e6e0d5;
  --accent: #8a4b2f;
  --accent-dark: #6e3a23;
  --accent-soft: #f3e7df;
  font-size: 17px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "Noto Sans", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}
a { color: var(--accent-dark); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--accent);
  color: #fff; padding: 0.5rem 1rem; z-index: 10;
}
.skip-link:focus { left: 0; }

#site-header {
  padding: 0.7rem 1.2rem;
  border-bottom: 2px solid var(--accent);
  background: var(--panel);
}
#site-title { font-weight: 700; text-decoration: none; color: var(--ink); font-size: 1.05rem; }

main { max-width: 780px; margin: 0 auto; padding: 1.5rem 1.2rem 4rem; }

.hero { text-align: center; padding: 1.5rem 0 1rem; }
.hero h1 { margin: 0 0 0.4rem; font-size: 2rem; }
.hero.small { text-align: left; padding: 0.5rem 0 0.8rem; }
.hero.small h1 { font-size: 1.2rem; }
.home-link { text-decoration: none; color: var(--ink); }
.lede { color: var(--muted); max-width: 46ch; margin: 0 auto 1rem; }

.search { display: flex; gap: 0.6rem; max-width: 560px; margin: 1rem auto; }
.hero.small .search { margin: 0.6rem 0; }
.search input {
  flex: 1; font: inherit; font-size: 1.05rem;
  padding: 0.7rem 0.9rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); min-width: 0;
}
.search button, .pager button {
  font: inherit; font-weight: 600; color: #fff; background: var(--accent);
  border: none; border-radius: 10px; padding: 0.7rem 1.2rem; cursor: pointer;
  min-height: 44px;
}
.search button:hover, .pager button:hover:not(:disabled) { background: var(--accent-dark); }
.pager button:disabled { opacity: 0.45; cursor: default; }

.browse-links { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }
.chip {
  display: inline-block; padding: 0.45rem 1rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-dark);
  text-decoration: none; font-weight: 600;
}

.entry-list { list-style: none; margin: 1rem 0; padding: 0; }
.entry-row {
  display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; align-items: baseline;
  padding: 0.7rem 0.4rem; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
}
.entry-row:hover { background: var(--panel); }
.entry-row .dene { font-size: 1.15rem; font-weight: 600; min-width: 10rem; }
.entry-row .english { color: var(--ink); }
.row-meta { margin-left: auto; display: flex; gap: 0.4rem; align-items: center; }
.badge {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  padding: 0.1rem 0.55rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-dark);
}
.badge.audio { background: #e7efe8; color: #3c7a4e; }
.badge.kind { background: none; padding: 0; color: var(--muted); font-size: 0.85rem; }

.pager { display: flex; gap: 0.8rem; align-items: center; justify-content: center; margin: 1.4rem 0; }

.entry-detail { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.6rem; }
.entry-detail h2.dene { font-size: 2.2rem; margin: 0.2rem 0; overflow-wrap: anywhere; }
.english-big { font-size: 1.25rem; margin: 0.2rem 0 1rem; color: var(--ink); }
.recording-list { list-style: none; padding: 0; margin: 0.6rem 0; }
.recording { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; padding: 0.5rem 0; }
.recording audio { max-width: 100%; }
.rec-meta { color: var(--muted); font-size: 0.9rem; }

.muted { color: var(--muted); }
#site-footer {
  max-width: 780px; margin: 0 auto; padding: 1rem 1.2rem 2rem;
  color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line);
}
@media (max-width: 560px) {
  .hero h1 { font-size: 1.5rem; }
  .entry-row .dene { min-width: 100%; }
  .entry-detail { padding: 1.1rem; }
}
