:root {
  --bg: var(--tg-theme-bg-color, #ffffff);
  --text: var(--tg-theme-text-color, #000000);
  --hint: var(--tg-theme-hint-color, #8e8e93);
  --button: var(--tg-theme-button-color, #2481cc);
  --secondary-bg: var(--tg-theme-secondary-bg-color, #f1f1f1);
  --section-bg: var(--tg-theme-section-bg-color, #ffffff);
  --section-header: var(--tg-theme-section-header-text-color, #6d6d71);
  --link: var(--tg-theme-link-color, #2481cc);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 16px;
  padding-bottom: 96px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.4;
}
h1 { margin: 0 0 8px; font-size: 1.25rem; }
#status { color: var(--hint); margin: 0 0 12px; }
a { color: var(--link); }

#list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  background: var(--section-bg);
  border-radius: 12px;
  overflow: hidden;
}
.def-row {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid var(--secondary-bg);
}
.def-row:last-child { border-bottom: none; }
.def-row label { display: block; cursor: pointer; }
.def-row input[type="checkbox"] {
  float: left;
  margin: 4px 10px 0 0;
  width: 18px;
  height: 18px;
  accent-color: var(--button);
}
.pos {
  display: inline-block;
  background: var(--secondary-bg);
  color: var(--section-header);
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 6px;
  margin-right: 4px;
  vertical-align: 1px;
}
.text { color: var(--text); }
.example { color: var(--hint); font-size: 0.9em; }
.more { font-size: 0.85em; white-space: nowrap; }
.trans-select {
  margin-top: 6px;
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--secondary-bg);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

#opts {
  background: var(--section-bg);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#opts label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
#opts input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--button); }
.tags-row { display: flex; align-items: center; gap: 8px; }
#tags {
  flex: 1;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--secondary-bg);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
