.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 18px 64px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------------------------------------------------------------- header */
.top { position: sticky; top: 0; z-index: 50; background: var(--bg);
  padding-top: 12px; }

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;          /* keep the bar on one line */
}

.brand {
  font-weight: 700;
  font-size: 18px;
  color: var(--text) !important;
  text-decoration: none !important;
  white-space: nowrap;
  /* the brand absorbs tight space (truncating) so the nav/controls never wrap */
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand::before {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  margin-right: 8px;
  border-radius: 2px;
  background: var(--accent);
  vertical-align: middle;
}

.nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 0 0 auto; }
.nav a {
  color: var(--muted) !important;
  text-decoration: none !important;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 15px;
}
.nav a:hover { background: var(--chip); color: var(--text) !important; }
.nav a.active { color: var(--text) !important; font-weight: 600; }

.controls { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

/* language menu */
.langMenu { position: relative; }
.langMenu > summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--chip);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  user-select: none;
}
.langMenu > summary::-webkit-details-marker { display: none; }
.langMenu .langName { font-size: 14px; }
.langMenu[open] { z-index: 120; }
.langList {
  position: absolute;
  right: 0;
  margin-top: 6px;
  z-index: 120;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  min-width: 180px;
}
.langList a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text) !important;
  text-decoration: none !important;
}
.langList a:hover { background: var(--chip); }
.langList a.current { font-weight: 700; background: var(--accent-soft); }
.langList .flag { font-size: 18px; }

/* search */
.searchForm {
  display: flex;
  gap: 8px;
  padding: 14px 0 12px;
}
.searchBox { flex: 1; position: relative; }

/* autocomplete dropdown */
.suggest {
  display: none;
  position: absolute;
  left: 0; right: 0; top: calc(100% + 6px);
  z-index: 60;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 5px;
  max-height: 60vh;
  overflow-y: auto;
}
.suggest.open { display: block; }
.sugItem {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  cursor: pointer;
}
.sugItem.active { background: var(--row-hover); }
.sugLemma { font-weight: 650; white-space: nowrap; }
.sugPos { font-size: 12px; font-style: italic; color: var(--muted); white-space: nowrap; }
.sugGloss {
  color: var(--muted);
  margin-left: auto;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.searchForm input[type="text"] {
  width: 100%;
  padding: 11px 14px;
  font-size: 17px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--text);
}
.searchForm input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.searchForm button {
  padding: 0 20px;
  font-size: 16px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.searchForm button:hover { filter: brightness(1.06); }

/* ---------------------------------------------------------------- main */
main { flex: 1; padding-top: 18px; }

h1 { font-size: 30px; line-height: 1.2; margin: 14px 0 6px; }
h2 { font-size: 21px; font-weight: 650; margin: 30px 0 12px; }
h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 8px; }

.hero { text-align: center; padding: 26px 0 6px; }
.hero h1 { font-size: 34px; }
.stats { color: var(--muted); display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.stats .dot { opacity: .5; }
.prose .stats { justify-content: flex-start; }

.resultCount { margin: 4px 0 14px; }

/* home list tabs (random / most frequent) */
.homeLists { margin-top: 30px; }
.listTabs { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.listTab {
  border: 0;
  background: var(--chip);
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  padding: 7px 15px;
  border-radius: 999px;
  cursor: pointer;
}
.listTab:hover { background: var(--chip-hover); color: var(--text); }
.listTab.active { background: var(--accent); color: #fff; font-weight: 600; }
.shuffleBtn {
  margin-left: auto;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--chip);
  color: var(--text) !important;
  text-decoration: none !important;
  font-size: 17px;
}
.shuffleBtn:hover { background: var(--chip-hover); }
.homeLists[data-active="frequent"] .shuffleBtn { display: none; }

/* entry list */
.entryList { display: flex; flex-direction: column; gap: 2px; }
/* a class `display` would otherwise override the [hidden] attribute */
.entryList[hidden] { display: none; }
a.entry {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--text) !important;
  text-decoration: none !important;
  border: 1px solid transparent;
}
a.entry:hover { background: var(--row-hover); }
.entry-head { flex: 0 0 38%; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.entry .lemma { font-weight: 650; font-size: 18px; }
.entry .pos { font-size: 12px; color: var(--muted); font-style: italic; }
.entry .gloss { color: var(--muted); flex: 1; min-width: 0; }

.ranked { counter-reset: rank; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--text) !important;
  text-decoration: none !important;
  font-size: 15px;
}
.chip:hover { background: var(--chip-hover); }
.chipCount { font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------------- word */
.word { max-width: 680px; }
.wordHead { margin-bottom: 8px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.wordHead .lemma { font-size: 38px; margin: 8px 0 4px; }
.wordHead .starBtn { margin-left: auto; }

/* per-meaning header on multi-sense pages: headword repeated + its own star */
.senseHead { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; }
.senseHead .senseLemma { font-size: 26px; margin: 0; }
.senseHead .starBtn { margin-left: auto; transform: none; }
.audioBtn {
  flex: 0 0 auto;
  border: 0;
  background: var(--accent-soft);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* nudge down to sit centered against the lowercase headword */
  transform: translateY(5px);
}
/* filled play triangle, like the apps' play.fill in a circle */
.audioBtn::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 13px solid var(--accent);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-left: 3px;
}
.audioBtn:hover { filter: brightness(0.96); }
.audioBtn.playing { background: var(--accent); }
.audioBtn.playing::before { border-left-color: #fff; }

/* star / save toggle */
.starBtn {
  flex: 0 0 auto;
  border: 0;
  background: var(--accent-soft);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  color: var(--accent);
  transform: translateY(5px);
}
.starBtn::before { content: "\2606"; }      /* ☆ */
.starBtn.on::before { content: "\2605"; }    /* ★ */
.starBtn:hover { filter: brightness(0.96); }

/* nav saved-count badge */
.savedCount:not(:empty) {
  margin-left: 5px;
  font-size: 12px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 1px 6px;
}

/* generic buttons (saved/flashcards) */
.btn {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  font-family: inherit;
  font-size: 15px;
  background: var(--chip);
  color: var(--text);
  cursor: pointer;
}
.btn:hover { background: var(--chip-hover); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.06); background: var(--accent); }

/* saved list */
.savedBar { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 18px; }
.savedRow { display: flex; align-items: center; gap: 6px; }
.savedRow .entry { flex: 1; min-width: 0; }
/* the star sits inline in a list row here, not floated like on the word page */
.savedRow .starBtn { transform: none; width: 38px; height: 38px; font-size: 18px; }
.topicActions { margin: 12px 0 0; text-align: right; }
.unstarBtn {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: var(--accent);
  width: 38px;
  height: 38px;
  border-radius: 999px;
}
.unstarBtn::before { content: "\2605"; }     /* ★ */
.unstarBtn:hover { background: var(--chip); }

/* cookie notice */
.cookieBar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  background: var(--panel);
  border-top: 1px solid var(--panel-border);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.10);
  padding: 12px 16px;
  gap: 14px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.cookieBar.shown { display: flex; }
.cookieText { font-size: 14px; color: var(--text); max-width: 640px; }

/* add-to-list picker (word page, signed in) */
.listPicker {
  position: fixed;
  z-index: 200;
  min-width: 200px;
  max-width: 280px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
}
.listPickRow, .listPickNew {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.listPickRow:hover, .listPickNew:hover { background: var(--chip); }
.listPickRow::before { content: "\2606"; margin-right: 8px; color: var(--accent); }
.listPickRow.on::before { content: "\2605"; }
.listPickNew { color: var(--accent); border-top: 1px solid var(--panel-border); margin-top: 4px; }

/* account + lists */
.btn.small { padding: 5px 11px; font-size: 13px; }
.signinForm { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; max-width: 460px; }
.signinForm input[type="email"] {
  flex: 1; min-width: 200px;
  padding: 10px 13px; font-size: 16px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--input-bg); color: var(--text);
}
.signinForm input[type="email"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.formError { color: var(--accent); }
.signedIn { font-size: 18px; }
.accountActions { display: flex; gap: 10px; flex-wrap: wrap; }

.accountCta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--accent-soft); border-radius: 12px;
  padding: 14px 16px; margin: 4px 0 18px;
}
.accountBar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

.listCards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.listCard { display: flex; flex-direction: column; border: 1px solid var(--panel-border); border-radius: 12px; padding: 14px 16px; background: var(--panel); }
.listCardHead { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.listOpen { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0; cursor: pointer; font-size: 18px; font-weight: 650; color: var(--text); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listOpen:hover { color: var(--accent); }
.listRenameInput {
  font: inherit;
  font-size: 18px;
  font-weight: 650;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 2px 6px;
  background: var(--input-bg);
  color: var(--text);
}
.listRenameInput:focus { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.listCardHead .listRenameInput { flex: 1; width: auto; }
.listCount { color: var(--muted); font-size: 13px; }
.listActions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: auto; }

/* the "create" tile */
.listCardNew { padding: 0; border-style: dashed; }
.newTileBtn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  flex: 1;                       /* fill the whole tile so the hover fill matches it */
  width: 100%; min-height: 78px; padding: 14px 16px;
  border: 0; border-radius: 12px; background: transparent;
  color: var(--accent); font: inherit; font-size: 16px; font-weight: 650; cursor: pointer;
}
.newTileBtn:hover { background: var(--accent-soft); }
.newTileIcon { display: inline-flex; }
.listCardNew .listRenameInput { margin: 16px; width: auto; box-sizing: border-box; }

/* list editor */
.editorHead { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; }
.editorHead h2 { margin: 0; }
.addWord { position: relative; max-width: 460px; margin: 12px 0 18px; }
.addWordInput {
  font: inherit; font-size: 16px; width: 100%;
  padding: 10px 13px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--input-bg); color: var(--text);
}
.addWordInput:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.addWordMenu {
  display: none; position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px);
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,.16); overflow: hidden; max-height: 320px; overflow-y: auto;
}
.addWordMenu.open { display: block; }
.addWordRow {
  display: flex; align-items: baseline; gap: 10px; width: 100%; text-align: left;
  padding: 10px 13px; border: 0; background: transparent; cursor: pointer; color: var(--text);
}
.addWordRow:hover { background: var(--chip); }
.addWordRow .lemma { font-weight: 650; }
.addWordRow .gloss { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.iconBtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0;
  border: 1px solid var(--panel-border); border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.iconBtn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.iconBtn svg { display: block; }

/* account invitation at the bottom of /saved */
.accountInvite {
  margin-top: 28px; padding: 18px 18px 16px;
  border: 1px solid var(--panel-border); border-radius: 14px;
  background: var(--panel);
}
.accountInvite h2 { margin: 0 0 6px; font-size: 19px; }
.accountInvite .muted { margin: 0 0 14px; max-width: 560px; }
.passkeyBox { display: flex; flex-direction: column; gap: 4px; align-items: stretch; max-width: 360px; }
.passkeyBox .accountActions { margin: 0; }
/* two clear parts: create a new passkey (needs a name) vs. sign in with an
   existing one (no name needed). */
.pkCreateSection { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.pkLoginSection { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--panel-border); }
.pkHave { color: var(--muted); font-size: 14px; }

.btnDanger { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.btnDanger:hover { background: var(--accent-soft); }
.pkName {
  font: inherit; font-size: 16px;
  width: 100%; max-width: 320px;
  padding: 10px 13px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--input-bg); color: var(--text);
}
.pkName:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* flashcards */
.flash { max-width: 520px; margin: 10px auto; text-align: center; }
.flashTabs { display: inline-flex; gap: 4px; padding: 4px; margin: 0 auto 16px; background: var(--chip); border-radius: 999px; }
.flashTab { border: 0; background: transparent; padding: 7px 16px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 13px; color: var(--muted); }
.flashTab.active { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.flashLeft { text-align: center; margin: 0 0 14px; }
.flashCard {
  border: 1px solid var(--panel-border);
  background: var(--panel);
  border-radius: 16px;
  padding: 44px 24px;
  cursor: pointer;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.flashFront { font-size: 34px; font-weight: 700; }
/* Back + hint always occupy their space (visibility, not display) so the card
   height is unchanged when the answer is revealed. */
.flashBack { font-size: 22px; visibility: hidden; }
.flashCard.revealed .flashBack { visibility: visible; }
.flashHint { font-size: 13px; }
.flashCard.revealed .flashHint { visibility: hidden; }
.flashControls { display: flex; gap: 12px; justify-content: center; margin-top: 18px; }
.flashControls .btn { min-width: 120px; }
.wordMeta { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; color: var(--muted); }
.wordMeta .pos { font-style: italic; }
.wordMeta .ipa { font-family: "Charis SIL", "Doulos SIL", "Times New Roman", serif; }
.wordMeta .gram { font-size: 15px; }

.sense { scroll-margin-top: 130px; }
.sense.multi { padding-top: 22px; margin-top: 24px; border-top: 1px solid var(--panel-border); }
.sense.multi:first-of-type { padding-top: 0; margin-top: 6px; border-top: 0; }

/* sense table of contents (common page) */
.senseToc {
  margin: 12px 0 6px;
  padding: 12px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--panel);
}
.tocLabel {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: 6px;
}
.tocList { margin: 0; padding-left: 22px; }
.tocList li { margin: 3px 0; }
.tocList a { display: inline-flex; gap: 8px; align-items: baseline; }
.tocPos { font-style: italic; }
.tocGloss { color: var(--muted); }

/* sibling nav (single-sense page) */
.senseNav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 10px 0 4px; }
.allMeanings { font-size: 14px; }
.senseTabs { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.senseTab {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--chip);
  font-size: 14px;
  font-style: italic;
  color: var(--text) !important;
  text-decoration: none !important;
}
.senseTab.cur { background: var(--accent); color: #fff !important; }
a.senseTab:hover { background: var(--chip-hover); }

.posLink { text-decoration: none !important; }
.posLink:hover { text-decoration: underline !important; }

.block { margin: 22px 0; }
.block p { margin: 0; }
.muted-h { color: var(--muted); }

/* the primary translation sits in a soft accent card so it stands out */
.block.trans .transText {
  font-size: 22px;
  color: var(--text);
  margin: 0;
  background: var(--accent-soft);
  padding: 12px 16px;
  border-radius: 12px;
}

/* collapsible blocks (definition, inflections, translations) */
.collapseBlock { margin: 0; }
.collapseBlock > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin: 0 0 8px;
  user-select: none;
}
.collapseBlock > summary::-webkit-details-marker { display: none; }
.collapseBlock > summary::before {
  content: "";
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-left: 9px solid var(--muted);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  transition: transform .15s ease;
}
.collapseBlock[open] > summary::before { transform: rotate(90deg); }
.collapseBlock > summary:hover { color: var(--text); }

.origLabel {
  margin: 14px 0 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.paradigms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px 24px;
  margin-top: 14px;
}
.paradigm {
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 10px 14px 12px;
}
.paradigm h4 { margin: 0 0 7px; font-size: 14px; font-weight: 650; color: var(--accent); }
.paradigm table { border-collapse: collapse; width: 100%; font-size: 15px; }
.paradigm td, .paradigm th { padding: 4px 8px; text-align: left; vertical-align: top; }
.paradigm tr.cols th { color: var(--muted); font-weight: 600; font-size: 12px; }
.paradigm th.rl { color: var(--muted); font-weight: 500; white-space: nowrap; padding-right: 14px; }
.paradigm tbody tr:nth-child(even), .paradigm tr:nth-child(even) { background: var(--panel); }

.formList { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.formList li { display: flex; gap: 10px; font-size: 15px; }
.formList .fl { color: var(--muted); min-width: 90px; }
.formList .fv { font-weight: 500; }

.otherTrans {
  list-style: none;
  margin: 0;
  padding: 2px 14px;
  background: var(--panel);
  border-radius: 12px;
}
.otherTrans li {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--panel-border);
}
.otherTrans li:last-child { border-bottom: 0; }
.otherTrans .lng { color: var(--muted); flex: 0 0 110px; }

/* ---------------------------------------------------------------- list pages */
.listHead { margin-bottom: 8px; }

.sortBar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 18px; }
.sortLabel { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.sortOpt {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--text) !important;
  text-decoration: none !important;
  font-size: 14px;
}
.sortOpt:hover { background: var(--chip-hover); }
.sortOpt.cur { background: var(--accent); color: #fff !important; font-weight: 600; }
.pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 26px; }
.pagerBtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--chip); color: var(--text) !important;
  text-decoration: none !important; font-size: 22px;
}
.pagerBtn:hover { background: var(--chip-hover); }
.pagerPos { color: var(--muted); }

.empty { text-align: center; padding: 50px 0; }
.empty .big { font-size: 22px; margin: 0 0 6px; }

.statGrid {
  list-style: none;
  margin: 14px 0 8px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  max-width: 680px;
}
.statGrid li {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 14px 16px;
}
.statValue { display: block; font-size: 24px; font-weight: 700; }
.statIcon { font-size: 16px; margin-left: 6px; opacity: 0.75; vertical-align: middle; cursor: help; }
.statLabel { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }

.prose p { max-width: 680px; }
.prose ul { max-width: 680px; }
.prose li { margin: 6px 0; }
.appLinks a { margin-right: 4px; }

/* ---------------------------------------------------------------- footer */
.foot {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--panel-border);
  text-align: center;
  font-size: 14px;
}
.foot p { margin: 4px 0; }
.footDicts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  margin: 10px 0;
  font-size: 13px;
}
.footDicts a { color: var(--muted); }
.footDicts a.current { color: var(--text); font-weight: 600; }

.storeBadges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 0 0 14px; }
.storeBadge { display: inline-block; line-height: 0; }
.storeBadge img { height: 40px; width: auto; display: block; transition: transform .15s ease; }
.storeBadge:hover img { transform: scale(1.04); }
.prose .storeBadges { justify-content: flex-start; }

/* ---------------------------------------------------------------- mobile */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar { flex-wrap: wrap; }
  .brand { font-size: 17px; }
  .nav { order: 3; width: 100%; }
  .controls { margin-left: auto; }
  .entry-head { flex-basis: 46%; }
  .wordHead .lemma { font-size: 32px; }
  .paradigms { grid-template-columns: 1fr; }
}
