/* "The page of a book" — Claude Code 2026-11-09 (owner: "our dictionary background is not unique … consider eyes reading long").
   Every reading card (dictionary page, side panel, grammar, CEFR) becomes warm ivory paper with ink-navy text, gold hairlines and
   gold small-capital labels — one calm surface instead of four pastel boxes. Built for long reading: no pure white (less glare),
   no pure black (softer contrast, still ≥ 12:1), generous line height, no boxes inside boxes. Loaded last; remove the <link> to undo.
   
   Owner 2026-11-10: Added "Adjust bright light at reading UI" function on the Meaning row.
   Allows the reader to slide left/right to adjust the white/ivory reading background brightness to their liking.
   Designed with "a bit disappear scrolling key" — subtle, elegant, low-opacity slider that stays quiet until used. */

html[data-theme] body:not([data-route="home"]):not([data-route="myspace"]) .card {
  --surface: var(--reading-bg, #FBF7EE);
  --surface-warm: var(--reading-bg, #FAF5EA);
  --structure-bg: var(--reading-bg, #F7F1E4);
  --learner-bg: var(--reading-box-bg, #F6F0E3);
  --learner-label: #1F6B4F;
  --everyday-bg: var(--reading-box-bg, #F6F0E3);
  --everyday-label: #1F6B4F;
  --formal-bg: var(--reading-box-bg, #F6F0E3);
  --formal-label: #5B3F8C;
  --text: var(--reading-text, #262B3B);
  --text-2: var(--reading-sub, #5A5D69);
  --head: var(--reading-head, #1A2240);
  --icon: #8A6420;
  --metal: #B08A3A;
  --metal-text: #8A6420;
  --metal-line: rgba(176, 138, 58, .38);
  --metal-deep: #7A5A1C;
  --hi: #F6EEDB;
  --border: #E6D8B8;
  --hairline: #ECE1C9;
  --btn-a: #FFFDF8;
  --btn-b: #F1E7D2;
  --btn-ink: #1A2240;
  --nav-a: #2A3A66;
  --nav-b: #172345;
  --nav-ink: #FFF6DA;
  --focus: #8A6420;
  --track: #C5B48A;
  --thumb: #5A5D69;
  --chip-bg: var(--reading-box-bg, #F4ECDA);
  --progress-track: #EDE3CC;
  --progress-fill: #B08A3A;
  --card-edge: rgba(176, 138, 58, .45);
  --title-warm: var(--reading-head, #1A2240);
  color: var(--reading-text, var(--text));
  background-color: var(--reading-bg, #FBF7EE) !important;
  /* an extremely soft paper grain + adjustable warm reading glow at the top */
  background-image:
    radial-gradient(120% 60% at 50% 0%, var(--reading-glow, rgba(255, 252, 244, .9)), rgba(251, 247, 238, 0) 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45  0 0 0 0 .38  0 0 0 0 .25  0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") !important;
  border: 1px solid var(--reading-border, rgba(201, 162, 74, .55)) !important;
  border-top: 1px solid var(--reading-border, rgba(201, 162, 74, .85)) !important;
  box-shadow: inset 0 0 0 4px var(--reading-bg, rgba(251, 247, 238, 1)), inset 0 0 0 5px rgba(201, 162, 74, .22), 0 10px 28px rgba(0, 0, 0, .28) !important;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

/* ------------------------------------------------------------------ type for long reading */
#v-dict .card, #v-grammar .card { font-feature-settings: "kern", "liga"; -webkit-font-smoothing: antialiased; }
#v-dict .mean-row, #v-dict .mean-def { line-height: 1.28 !important; }
#v-dict .ex-row p, #v-dict .lvl-ex, #v-dict .st-ielts-sentence { line-height: 1.36 !important; }
#v-dict .tr-line, #v-dict .ex-row .tr-line { color: var(--reading-sub, #4E5260) !important; line-height: 1.35 !important; }

/* section labels: small gold capitals with a fine gold rule */
#v-dict .card .ecard-head h2 { color: #8A6420 !important; letter-spacing: .16em; }
#v-dict .card .ecard-head { border-bottom: 1px solid rgba(201, 162, 74, .35); padding-bottom: .45rem; }
#v-dict .card :is(.mean-count, .rel-count) { background: transparent !important; border: 1px solid rgba(176, 138, 58, .55) !important; color: #8A6420 !important; }

/* ============================================================
   Reading Light Slider on the Meaning row (owner 2026-11-10)
   "reader can slide left and right on the meaning row. design a bit disappear scroolng key"
   ============================================================ */
.ecard-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: -6px -4px -6px 0;
}
.ecard-head h2 {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
}
.ecard-head .reading-light {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-left: auto;
  margin-right: 6px;
  padding: 2px 4px;
  opacity: 0.35; /* "a bit disappear": quiet, unobtrusive by default */
  transition: opacity .25s ease;
  user-select: none;
  -webkit-user-select: none;
}
.ecard-head .reading-light:hover,
.ecard-head .reading-light:focus-within,
.ecard-head .reading-light.active {
  opacity: 0.95; /* smoothly illuminates when reader interacts */
}

.rl-track-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.rl-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 78px;
  height: 4px;
  border-radius: 999px;
  background: rgba(176, 138, 58, 0.32);
  outline: none;
  cursor: ew-resize;
  margin: 0 2px;
  transition: width .2s ease, background .2s ease;
}
.reading-light:hover .rl-slider,
.reading-light.active .rl-slider {
  width: 98px;
  background: rgba(176, 138, 58, 0.55);
}
/* Subtle scrolling key (slider thumb) */
.rl-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #FFFDF8;
  border: 1.5px solid rgba(176, 138, 58, 0.75);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.16);
  cursor: ew-resize;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.rl-slider::-webkit-slider-thumb:hover,
.rl-slider:active::-webkit-slider-thumb {
  transform: scale(1.22);
  background: #FFFFFF;
  border-color: #B08A3A;
  box-shadow: 0 2px 5px rgba(176, 138, 58, 0.35);
}
.rl-slider::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #FFFDF8;
  border: 1.5px solid rgba(176, 138, 58, 0.75);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.16);
  cursor: ew-resize;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.rl-slider::-moz-range-thumb:hover,
.rl-slider:active::-moz-range-thumb {
  transform: scale(1.22);
  background: #FFFFFF;
  border-color: #B08A3A;
  box-shadow: 0 2px 5px rgba(176, 138, 58, 0.35);
}

.rl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: none;
  color: #8A6420;
  cursor: pointer;
  border-radius: 50%;
  transition: transform .15s ease, color .15s ease;
}
.rl-btn:hover {
  color: #B08A3A;
  transform: scale(1.15);
}
.rl-btn .rl-ic {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.rl-badge {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 1px 6px;
  border-radius: 999px;
  background: #1A2240;
  color: #F6EEDB;
  font: 700 .6875rem/1.3 var(--sans, sans-serif);
  letter-spacing: .02em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  z-index: 10;
}
.reading-light.active .rl-badge,
.reading-light:hover .rl-badge {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* meanings: gold medallions, thin dividers — no grey box inside the card */
#v-dict .card li.mean {
  background: none !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important;
  border-bottom: 1px solid rgba(201, 162, 74, .28) !important; padding-left: 0 !important; padding-right: 0 !important;
}
#v-dict .card li.mean:last-child { border-bottom: 0 !important; }
#v-dict .card .mean-n {
  top: 4px !important;
  margin-top: 0 !important;
  background: radial-gradient(circle at 35% 30%, #FFF4D2 0%, #E6C26E 52%, #A97A2A 100%) !important; color: #2A1C05 !important;
  border: 1px solid #E9CF8E !important; box-shadow: inset 0 -1px 0 rgba(110, 74, 14, .35), 0 1px 3px rgba(80, 55, 10, .25) !important; text-shadow: none !important;
}
/* examples: an indented quotation with a gold rule, no box */
#v-dict .card li.ex-row { background: none !important; box-shadow: none !important; border: 0 !important; border-left: 0 !important; border-radius: 0 !important; }
#v-dict .card li.ex-row p b, #v-dict .card li.ex-row p strong { color: var(--reading-head, #1A2240); }
#v-dict .card .tr-box { background: var(--reading-box-bg, #F6F0E3) !important; border-color: rgba(176, 138, 58, .35) !important; }

/* forms, word family, origin: open sections with a gold rule, tiles as quiet paper chips */
#v-dict .card .ws-block { background: none !important; border: 0 !important; border-top: 1px solid rgba(201, 162, 74, .3) !important; border-radius: 0 !important; box-shadow: none !important; }
#v-dict .card .ws-block svg { background: transparent !important; color: #8A6420 !important; }
#v-dict .card .ws-tile, #v-dict .card .ws-block span[class=""] { background: var(--reading-box-bg, #F6F0E3) !important; border-color: rgba(176, 138, 58, .32) !important; }
/* Vertical accent lines: identical 3px thickness for blue/accent forms and gold example line */
.ws-block::before, #v-dict .card .ws-block::before, .word-story .ws-block::before { width: 3px !important; }

/* CEFR levels and grammar levels: one surface, the level shown by a coloured mark on the left */
#v-dict .card .reg-row { background: none !important; border: 0 !important; border-left: 3px solid #C9A24A !important; border-radius: 0 !important; border-bottom: 1px solid rgba(201, 162, 74, .2) !important; }
#v-dict .card .reg-row.b1 { border-left-color: #2E8A62 !important; }
#v-dict .card .reg-row.b2 { border-left-color: #3B6FB6 !important; }
#v-dict .card .reg-row.c1 { border-left-color: #8A5BB8 !important; }
#v-dict .card .reg-row.c2 { border-left-color: #A8344F !important; }
#v-dict .card .reg-row .k { background: transparent !important; }
#v-dict .card li.lvl-ex { background: none !important; box-shadow: none !important; }
#v-dict .card li.lvl-ex .lvl { background: transparent !important; }
#v-dict .card .st-ielts-box { background: none !important; border-color: rgba(201, 162, 74, .5) !important; }
#v-dict .card .st-ielts-card { background: var(--reading-box-bg, #FFFCF5) !important; border-color: rgba(201, 162, 74, .3) !important; box-shadow: none !important; }

/* the side-panel page and narrow phones: same paper, slightly smaller inner frame */
@media (max-width: 599px) {
  /* BrandHeader perfect mobile sizing */
  #brandHeader.brand-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
  }

  #brandHeader .brand {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  #brandHeader .brand img {
    width: 36px !important;
    height: auto !important;
    flex: none !important;
  }

  #brandHeader .brand .wm {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
  }

  #brandHeader .brand .wm-name {
    font-size: 20px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  #brandHeader .brand .wm-tag {
    font-size: 9.5px !important;
    letter-spacing: 0.12em !important;
    white-space: nowrap !important;
  }

  #brandHeader #langPick {
    flex: 0 0 auto !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
  }

  #brandHeader #langPick .ic {
    width: 12px !important;
    height: 12px !important;
  }

  html[data-theme] body:not([data-route="home"]):not([data-route="myspace"]) .card {
    box-shadow: inset 0 0 0 3px var(--reading-bg, rgba(251, 247, 238, 1)), inset 0 0 0 4px rgba(201, 162, 74, .2), 0 8px 22px rgba(0, 0, 0, .26) !important;
  }
  .rl-slider { width: 56px; }
  .reading-light:hover .rl-slider,
  .reading-light.active .rl-slider { width: 70px; }
}

/* ============================================================
   PREMIUM 10/10 UI/UX REFINEMENT (Desktop, Tablet, Mobile & Telegram Mini App)
   World-class English Dictionary Interface (CEFR A1–C2, IELTS, PTE)
   Preserving luxury navy-blue background, champagne-gold accents & ivory reading page.
   ============================================================ */

/* ------------------------------------------------------------ 1. Typography & Hierarchy Scale */
#v-dict .word-head h1, .word-head h1 {
  font: 600 clamp(36px, 4.4vw, 56px)/1.08 var(--serif-display, "Cormorant Garamond", Georgia, serif) !important;
  letter-spacing: -0.018em !important;
  color: var(--head, #FFF6DA) !important;
  margin: 0 !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

#v-dict #defPreview[hidden], #defPreview[hidden], .def-text[hidden] {
  display: none !important;
}

#v-dict .mean-def, .mean-def, #v-dict .def-text:not([hidden]), .def-text:not([hidden]) {
  font-family: var(--sans, "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif) !important;
  font-size: clamp(15.5px, 1.25vw, 17.5px) !important;
  font-weight: 700 !important;
  line-height: 1.28 !important;
  color: var(--reading-head, #1A2240) !important;
  margin: 0 !important;
  display: block !important;
  flex: 1 1 auto;
  min-width: 0;
  letter-spacing: -0.005em;
}

#v-dict .mean-def span[id^="defM"], .mean-def span[id^="defM"] {
  font-size: inherit !important;
  font-weight: 700 !important;
  color: var(--reading-head, #1A2240) !important;
  line-height: inherit !important;
}

#v-dict .ex-row p, .ex-row p {
  font-family: var(--sans, "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif) !important;
  font-size: clamp(15.5px, 1.25vw, 17.5px) !important;
  font-weight: 400 !important;
  line-height: 1.36 !important;
  color: var(--reading-text, #2D3345) !important;
  margin: 0 !important;
}

#v-dict .ex-row p b, #v-dict .ex-row p strong, .ex-row p b, .ex-row p strong, .ex-row p em {
  font-weight: 600 !important;
  color: #101930 !important;
}

#v-dict .card .ecard-head h2, .ecard-head h2,
#v-dict .card .ecard-head .sense, .ecard-toggle .sense {
  font-family: var(--sans, "Manrope", sans-serif) !important;
  font-size: clamp(15.5px, 1.25vw, 17.5px) !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #324360 !important;
  margin: 0 !important;
}

/* ------------------------------------------------------------ 2. Header & Metadata Spacing */
#v-dict .word-head, .word-head {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin-bottom: 14px !important;
}

.hw-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  flex: none !important;
}

.hw-l {
  display: flex !important;
  align-items: baseline !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  min-width: 0 !important;
}

.word-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  flex: none !important;
  margin-top: 0 !important;
  font-size: clamp(14px, 1.1vw, 16px) !important;
}

.word-meta .pos {
  font-size: clamp(14px, 1.1vw, 16px) !important;
  font-weight: 600 !important;
  color: rgba(245, 238, 220, 0.85) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.word-meta .ipa {
  font-family: var(--ipa, "Lucida Sans Unicode", "Segoe UI", sans-serif) !important;
  font-size: clamp(14.5px, 1.15vw, 16.5px) !important;
  color: #F3D58A !important;
  letter-spacing: 0.02em !important;
}

/* Grammar badges in header */
.gram-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
  background: rgba(243, 213, 138, 0.12) !important;
  border: 1px solid rgba(243, 213, 138, 0.35) !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  vertical-align: middle !important;
}

.gram-badge .gram-code {
  font-weight: 700 !important;
  color: #F3D58A !important;
}

.gram-badge .gram-full {
  font-weight: 500 !important;
  color: rgba(245, 238, 220, 0.9) !important;
}

/* Sense-specific grammar tag inside definitions */
.sense-gram {
  display: inline-flex !important;
  align-items: center !important;
  height: 22px !important;
  font: 600 11.5px/1 "Manrope", var(--sans, sans-serif) !important;
  color: #785517 !important;
  background: rgba(243, 213, 138, 0.2) !important;
  padding: 0 8px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(201, 162, 74, 0.45) !important;
  margin: 0 6px 0 0 !important;
  vertical-align: -2px !important;
  letter-spacing: 0.01em !important;
  flex: none !important;
}

/* Pronunciation button refinement */
.accent-group {
  display: inline-flex !important;
  gap: 8px !important;
  align-items: center !important;
}

.accent-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  min-height: 40px !important;
  height: 40px !important;
  padding: 0 14px 0 10px !important;
  border-radius: 999px !important;
  font: 600 clamp(13.5px, 1.1vw, 15.5px)/1 var(--sans, sans-serif) !important;
  color: #1A1305 !important;
  background: linear-gradient(180deg, #FFF0C4 0%, #E6C26E 52%, #B08A3A 100%) !important;
  border: 1px solid #F3D896 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
  cursor: pointer !important;
  transition: transform .15s ease, box-shadow .15s ease !important;
}

.accent-btn:hover {
  filter: brightness(1.06) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

.accent-btn:active {
  transform: translateY(1px) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.accent-btn .flag {
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) !important;
}

.accent-btn .ic {
  width: 16px !important;
  height: 16px !important;
  color: #382506 !important;
}

/* ------------------------------------------------------------ 3. Refined Search Bar */
.search {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  margin-bottom: 14px !important;
}

.search input {
  width: 100% !important;
  height: 52px !important;
  min-height: 52px !important;
  padding: 0 115px 0 46px !important;
  border-radius: 999px !important;
  font: 500 16px/1.2 var(--sans, sans-serif) !important;
  color: #FFFDF7 !important;
  background: rgba(15, 24, 46, 0.85) !important;
  border: 1px solid rgba(243, 213, 138, 0.35) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 2px rgba(0, 0, 0, 0.2) !important;
  outline: none !important;
  transition: border-color .2s ease, box-shadow .2s ease !important;
}

.search input:focus {
  border-color: #F3D58A !important;
  box-shadow: 0 4px 20px rgba(243, 213, 138, 0.25), 0 0 0 2px rgba(243, 213, 138, 0.3) !important;
}

.search .si {
  position: absolute !important;
  left: 16px !important;
  width: 20px !important;
  height: 20px !important;
  color: #E6C26E !important;
  pointer-events: none !important;
}

.search .s-actions {
  position: absolute !important;
  right: 6px !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.search .s-actions button {
  min-width: 36px !important;
  min-height: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  display: grid !important;
  place-items: center !important;
}

.search .s-go {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  border-radius: 50% !important;
  border: 1px solid #F3D896 !important;
  background: linear-gradient(180deg, #FFF0C4 0%, #E6C26E 52%, #B08A3A 100%) !important;
  color: #1D1505 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
  cursor: pointer !important;
  transition: transform .15s ease, filter .15s ease !important;
}

.search .s-go:hover {
  filter: brightness(1.08) !important;
  transform: scale(1.04) !important;
}

.search .s-mic, .search .s-clear {
  color: rgba(245, 238, 220, 0.7) !important;
}

.search .s-mic:hover, .search .s-clear:hover {
  color: #F3D58A !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

/* ------------------------------------------------------------ 4. Refined Jump Navigation Pills */
.section-nav.jump-pills, .jump-pills {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  gap: 8px !important;
  padding: 4px 0 14px 0 !important;
  margin-bottom: 12px !important;
}

.jump-pills::-webkit-scrollbar {
  display: none !important;
}

.jump-pills .jump-pill {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 18px !important;
  border-radius: 999px !important;
  font: 600 clamp(14px, 1.15vw, 16.5px)/1 var(--sans, sans-serif) !important;
  color: rgba(245, 238, 220, 0.88) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(243, 213, 138, 0.24) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18) !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all .18s ease !important;
}

.jump-pills .jump-pill:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(243, 213, 138, 0.45) !important;
  color: #FFFDF7 !important;
}

.jump-pills .jump-pill[aria-selected="true"],
.jump-pills .jump-pill[aria-current="true"] {
  background: linear-gradient(180deg, #F3D58A 0%, #D8A748 100%) !important;
  color: #1A1305 !important;
  border: 1px solid #F3D896 !important;
  font-weight: 700 !important;
  box-shadow: 0 3px 12px rgba(216, 167, 72, 0.38) !important;
}

.jump-pills .jump-pill .hash {
  opacity: 0.65 !important;
  font-weight: 700 !important;
}

.jump-pills .jump-pill[aria-selected="true"] .hash {
  opacity: 0.85 !important;
}

/* ------------------------------------------------------------ 5. Refined Definitions Panel */
#v-dict .card.entry-card.def,
.card.entry-card.def {
  border-radius: 18px !important;
  padding: 24px 28px !important;
  box-sizing: border-box !important;
  background-color: var(--reading-bg, #FBF7EE) !important;
  border: 1px solid rgba(201, 162, 74, 0.55) !important;
  box-shadow: inset 0 0 0 3px var(--reading-bg, #FBF7EE), inset 0 0 0 4px rgba(201, 162, 74, 0.22), 0 12px 34px rgba(10, 18, 36, 0.28) !important;
}

.ecard-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  border-bottom: 1px solid rgba(201, 162, 74, 0.35) !important;
  padding-bottom: 12px !important;
  margin-bottom: 16px !important;
}

.ecard-head h2 {
  flex: 0 1 auto !important;
}

.ecard-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-left: auto !important;
}

/* Meanings list & rows: compact space-saving spacing */
#v-dict .card li.mean {
  border-bottom: 1px solid rgba(201, 162, 74, 0.28) !important;
  padding: 10px 0 !important;
  list-style: none !important;
}

#v-dict .card li.mean:first-child {
  padding-top: 2px !important;
}

#v-dict .card li.mean:last-child {
  border-bottom: 0 !important;
  padding-bottom: 2px !important;
}

.mean-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
  margin: 0 0 5px 0 !important;
}

/* Gold numbered badge */
.mean-n {
  display: inline-grid !important;
  place-items: center !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  border-radius: 50% !important;
  font: 700 12px/1 "Manrope", var(--sans, sans-serif) !important;
  background: radial-gradient(circle at 35% 30%, #FFF5D6 0%, #E7C370 50%, #A97A2A 100%) !important;
  color: #261A05 !important;
  border: 1px solid #E9CF8E !important;
  box-shadow: 0 1px 3px rgba(80, 55, 10, 0.2) !important;
  vertical-align: -3px !important;
  margin: 0 6px 0 0 !important;
  position: static !important;
  flex: none !important;
}

/* Definition action buttons (audio & collapse toggle) */
.mean-acts {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: none !important;
}

.mean-toggle {
  display: grid !important;
  place-items: center !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  border: 1px solid rgba(176, 138, 58, 0.35) !important;
  background: rgba(255, 255, 255, 0.6) !important;
  color: #8A6420 !important;
  cursor: pointer !important;
  transition: transform .18s ease, background .15s ease !important;
}

.mean-toggle:hover {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: #B08A3A !important;
  color: #694C15 !important;
}

.mean-toggle .ic {
  width: 15px !important;
  height: 15px !important;
  transition: transform .2s ease !important;
}

.mean-toggle[aria-expanded="true"] .ic {
  transform: rotate(180deg) !important;
}

/* Speaker icons contrast enhancement */
.say-pair .say-one, .say {
  color: #8A6420 !important;
  opacity: 0.85 !important;
  transition: opacity .15s ease, transform .15s ease !important;
}

.say-pair .say-one:hover, .say:hover {
  opacity: 1 !important;
  transform: scale(1.12) !important;
}

/* ------------------------------------------------------------ 6. Example Sentences */
.mean-ex {
  list-style: none !important;
  padding: 2px 0 2px 14px !important;
  margin: 6px 0 6px 11px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  border-left: 3px solid rgba(201, 162, 74, 0.85) !important;
}

#v-dict .card li.ex-row,
.ex-row {
  position: relative !important;
  padding: 3px 44px 3px 0 !important;
  border: 0 !important;
  border-left: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  width: 100% !important;
  margin: 0 !important;
}

.ex-row > .say-pair {
  position: absolute !important;
  right: 6px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  opacity: 0.82 !important;
}

.ex-row > .say-pair:hover {
  opacity: 1 !important;
}

/* ------------------------------------------------------------ 7. Responsive & Mobile Optimization (390px, Telegram Mini App) */
html, body {
  overflow-x: clip !important;
  max-width: 100vw !important;
  box-sizing: border-box !important;
}

.app {
  padding-bottom: 120px !important;
  box-sizing: border-box !important;
  max-width: 100% !important;
  overflow-x: clip !important;
}

#v-dict {
  max-width: 100% !important;
  overflow-x: clip !important;
}

.pager {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.page {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.mean-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  gap: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.mean-def {
  min-width: 0 !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
}

.mean-acts {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
  margin-top: 2px !important;
}

@media (max-width: 599px) {
  #v-dict .word-head h1, .word-head h1 {
    font-size: clamp(28px, 8vw, 36px) !important;
  }

  .hw-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 6px !important;
    box-sizing: border-box !important;
  }

  .hw-l {
    gap: 8px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  .tr-switch {
    font-size: 13px !important;
    gap: 5px !important;
    padding: 0 2px !important;
    flex-shrink: 0 !important;
  }

  .tr-knob {
    width: 36px !important;
    height: 20px !important;
  }

  .tr-knob::after {
    width: 14px !important;
    height: 14px !important;
    top: 2px !important;
    left: 2px !important;
  }

  .tr-switch[aria-checked="true"] .tr-knob::after {
    transform: translateX(16px) !important;
  }

  #v-dict .card.entry-card.def,
  .card.entry-card.def {
    padding: 16px 14px 20px 14px !important;
    border-radius: 16px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .ecard-head {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px 8px !important;
    padding-bottom: 8px !important;
    margin-bottom: 12px !important;
  }

  .ecard-actions {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
  }

  .ecard-actions .gram .gram-txt {
    display: none !important;
  }

  .ecard-actions .gram {
    min-width: 34px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 5px !important;
    font-size: 12px !important;
  }

  .rl-slider {
    width: 36px !important;
  }

  .reading-light:hover .rl-slider,
  .reading-light.active .rl-slider {
    width: 48px !important;
  }

  #v-dict .card li.mean {
    padding: 8px 0 !important;
  }

  .mean-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 6px !important;
  }

  .mean-def {
    font-size: 15.5px !important;
    line-height: 1.26 !important;
  }

  .mean-n {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    font-size: 11.5px !important;
    margin: 0 !important;
  }

  .sense-gram {
    font-size: 11px !important;
    height: 20px !important;
    padding: 0 6px !important;
    margin: 0 !important;
  }

  .mean-acts {
    gap: 4px !important;
  }

  .mean-toggle {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
  }

  .mean-ex {
    padding-left: 12px !important;
    margin: 4px 0 6px 10px !important;
    gap: 5px !important;
    border-left: 3px solid rgba(201, 162, 74, 0.85) !important;
  }

  #v-dict .card li.ex-row,
  .ex-row {
    padding: 2px 36px 2px 0 !important;
    border-left: 0 !important;
  }

  #v-dict .ex-row p, .ex-row p {
    font-size: 15.5px !important;
    line-height: 1.34 !important;
  }

  .ex-row > .say-pair {
    right: 2px !important;
  }

  .word-meta {
    gap: 6px 8px !important;
    font-size: 13.5px !important;
  }

  .accent-btn {
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 10px 0 8px !important;
    font-size: 13px !important;
  }

  .accent-btn .flag {
    width: 17px !important;
    height: 17px !important;
  }

  .jump-pills .jump-pill {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 14px !important;
    font-size: 13.5px !important;
  }

  .search input {
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 92px 0 38px !important;
    font-size: 15px !important;
  }

  .search .s-go {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
  }
}

/* Telegram Mini App & iOS Safe Areas */
body {
  padding-top: max(8px, env(safe-area-inset-top));
  padding-bottom: max(96px, env(safe-area-inset-bottom));
}

/* ============================================================
   owner 2026-11-13 (Android phone photo of "agree": "search word change other best background and a bit increase font
   words search. relocate agree move up a bit. between meaning and 1 too space please compact it")
   ============================================================ */
/* word-page search box = Home's search (theme colour + calm gold edge) instead of a fixed navy; the word a little bigger */
html body #v-dict > .search-wrap form.search input {
  background: color-mix(in srgb, var(--btn-a, #2C4E62) 80%, #000) !important;
  border: 1.5px solid #C9AE76 !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 0 6px rgba(214, 184, 120, .12) !important;
  font: 600 17.5px/1.2 var(--sans, sans-serif) !important; color: #FFFDF7 !important; letter-spacing: .005em;
}
html body #v-dict > .search-wrap form.search input::placeholder { color: rgba(255, 253, 247, .72) !important; font-weight: 500; }
html body #v-dict > .search-wrap form.search input:focus { border-color: #E4CF95 !important; box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 0 0 3px rgba(214, 184, 120, .22) !important; }
/* headword a little higher: less space under the search box */
html body #v-dict > .search-wrap form.search { margin-bottom: 4px !important; }
/* Meanings header: ONE line on every phone (Android text scaling pushed the reading-light slider + [I/T] to a 2nd line =
   a big empty gap); the slider shrinks instead; tighter gap to meaning 1 */
#v-dict .ecard-head { flex-wrap: nowrap !important; margin-bottom: 6px !important; padding-bottom: 6px !important; }
#v-dict .ecard-head h2 { flex: 0 1 auto; min-width: 0; white-space: nowrap; }
#v-dict .ecard-head .ecard-actions { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: flex-end; flex-wrap: nowrap; }
#v-dict .ecard-head .ecard-actions .reading-light { flex: 0 1 auto; min-width: 0; overflow: hidden; margin-right: 2px; }
@media (max-width: 400px) { #v-dict .card .ecard-head h2 { letter-spacing: .1em; } }
/* 2026-11-14 (owner: "you can click but nothing, right?"): `.mean-ex { display: flex !important }` above beat the [hidden]
   rule, so the ⌃ key could never fold a meaning's examples — a hidden list now really hides (all devices) */
html body .mean .mean-ex[hidden], html body .mean-ex[hidden] { display: none !important; }
