/* Word page stylesheet: every word page in every language (dictsearch*.tpl).
   SOURCE OF TRUTH. Edit here; templates read this file (inline mode) or link it
   from the CDN (WORD_ASSETS_FROM_CDN). See common/word_asset.tpl.
   After an edit: upload to S3 static/css/word-page.css and INVALIDATE
   /css/word-page.css BEFORE deploying -- CloudFront ignores ?v=.
   Image URLs stay relative (../images/...): correct on the CDN, and rewritten
   to the CDN host when inlined. */

/* ===== Word page (was common/word_styles.tpl) ===== */
/* ── Search result page ── */
.ds-page { background: #fff; padding-bottom: 16px; min-height: 40vh; --ds-head-grad: linear-gradient(90deg, #181481 0%, #3B0E6A 100%); }

/* Hero search bar */
.ds-hero {
  background: var(--hkd-grad, linear-gradient(117deg, #03054F 0%, #680AC1 100%));
  padding: 28px 0 24px;
}
/* The design's search row is as wide as the page, not a narrow centred box. */
.ds-hero .lang-search-wrap { max-width: none; margin: 0; }
.ds-hero .hkd-search-row { gap: 14px; margin-bottom: 0; }
.ds-hero .hkd-search-ipt { height: 54px; border: 0; border-radius: 12px; padding-left: 52px; font-size: 1rem; box-shadow: none; }
.ds-hero .hkd-search-ico { left: 18px; width: 20px; height: 20px; }
.ds-hero .hkd-search-btn { height: 54px; min-width: 137px; padding: 0 28px; border-radius: 12px; font-size: 1rem; font-weight: 700; }

/* Sticky search. The script puts it directly under whatever is pinned above it -- the site header from 992px up, the
   download dock below that -- so it never covers either of them. */
#sticky-anchor { height: 0; }
#sticky.stick {
  position: fixed; top: 0; left: 0; z-index: 999; width: 100%;
  background: var(--hkd-grad, linear-gradient(117deg, #03054F 0%, #680AC1 100%));
  padding: 8px 16px; box-shadow: 0 4px 20px rgba(0,0,0,.18);
}
/* Pinned, the bar is slimmer than in the hero, so header + search + tabs together do not eat the screen. */
#sticky.stick .hkd-search-ipt, #sticky.stick .hkd-search-btn { height: 44px; }
#sticky.stick .lang-search-wrap { max-width: 640px; margin: 0 auto; }

/* From 992px the site header stays pinned, like on every other page. site-chrome.css switches that off on pages that pin
   their own search bar at top:0; here the bars are placed UNDER the header instead, so it is switched back on. Layers: the
   header keeps its own 1000 (so its menus are never hidden behind the bars at 999 and 900), and all of it stays under
   Bootstrap's modals (1040/1050), so the login pop-up is never covered by a pinned bar. */
@media (min-width: 992px) { body:has(#sticky-anchor) .hkd-topnav { position: sticky; } }

/* Result container */
.ds-result-wrap { padding-top: 24px; }

/* Section heading */
.ds-section-head {
  font-family: var(--hkd-font-disp, 'Space Grotesk', sans-serif);
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--hkd-muted-fg, #6b7280);
  margin: 28px 0 12px; padding-bottom: 6px;
  border-bottom: 1px solid var(--hkd-border, #e2e5ec);
}

/* Word card (exact match) */
.ds-word-card {
  background: var(--hkd-card, #fff);
  border: 1px solid var(--hkd-border, #e2e5ec);
  border-radius: 1.25rem;
  box-shadow: 0 4px 24px -4px rgba(var(--hkd-primary-rgb, 94, 68, 228), .08);
  overflow: hidden; margin-bottom: 16px;
}
.ds-word-card__head {
  background: var(--ds-head-grad, linear-gradient(90deg, #181481 0%, #3B0E6A 100%));
  padding: 20px 24px 16px;
}
.ds-word-card__label {
  font-size: .72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: rgba(255,255,255,.8); margin-bottom: 6px;
}

.ds-lang-switch { margin-top:.75rem; display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; }
.ds-lang-switch__label { font-size:.82rem; color:rgba(255,255,255,.75); }
.ds-lang-switch__select { font-size:.9rem; padding:.35rem .6rem; border-radius:.5rem; border:1px solid rgba(255,255,255,.25); background:rgba(255,255,255,.12); color:#fff; max-width:100%; }
.ds-lang-switch__select option { color:#111; }
.ds-lang-switch__list { display:flex; flex-wrap:wrap; gap:.4rem; list-style:none; padding:0; margin:.4rem 0 0; }
.ds-lang-switch__list a { color:#fff; font-size:.82rem; text-decoration:underline; }
.ds-word-card__word {
  font-family: var(--hkd-font-disp, 'Space Grotesk', sans-serif);
  font-size: clamp(1.6rem, 4vw, 2.25rem); font-weight: 700;
  color: #fff; line-height: 1.1; margin: 0;
}
.ds-word-card__body { padding: 20px 24px; }

/* Pronunciation buttons */
.ds-pron-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.ds-pron-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 9999px; cursor: pointer;
  background: var(--hkd-bg, #f7f8fa); border: 1px solid var(--hkd-border, #e2e5ec);
  font-size: 1rem; color: var(--hkd-muted-fg, #6b7280);
  transition: background .18s, border-color .18s, box-shadow .18s;
  user-select: none;
}
.ds-pron-btn svg { width: 12px; height: 12px; flex-shrink: 0; stroke: currentColor; }
.ds-pron-btn:hover { background: rgba(var(--hkd-primary-rgb, 94, 68, 228), .08); border-color: var(--hkd-primary, #6c5ce7); color: var(--hkd-primary, #6c5ce7); box-shadow: 0 2px 8px rgba(var(--hkd-primary-rgb, 94, 68, 228), .12); }
.ds-ipa { font-size: .875rem; color: var(--hkd-muted-fg, #6b7280); margin-bottom: 10px; }
.ds-hi-trans { font-size: .875rem; color: var(--hkd-muted-fg, #6b7280); margin-bottom: 16px; }

/* Meaning items */
.ds-meaning-list { list-style: none; padding: 0; margin: 0; }
.ds-meaning-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--hkd-border, #e2e5ec);
}
.ds-meaning-item:last-child { border-bottom: none; }
.ds-meaning-row { display: flex; align-items: flex-start; gap: 12px; }
.ds-meaning-num {
  font-size: .75rem; font-weight: 700; color: var(--hkd-primary, #6c5ce7);
  min-width: 22px; padding-top: 3px;
}
.ds-meaning-body { flex: 1; min-width: 0; }
.ds-meaning-hin {
  font-family: var(--hkd-font-disp, 'Space Grotesk', sans-serif);
  font-size: 1.1rem; font-weight: 700;
  color: var(--hkd-primary, #6c5ce7); text-decoration: none !important;
}
.ds-meaning-hin:hover { color: var(--hkd-accent, #f5a623); }
.ds-meaning-eng {
  font-family: var(--hkd-font-disp, 'Space Grotesk', sans-serif);
  font-size: 1.05rem; font-weight: 600;
  color: var(--hkd-fg, #1a1a2e); text-decoration: none !important;
}
.ds-meaning-eng:hover { color: var(--hkd-primary, #6c5ce7); }
.ds-meaning-gram { font-size: .8125rem; color: var(--hkd-muted-fg, #6b7280); font-style: italic; margin-left: 6px; }
.ds-meaning-trans { font-size: .875rem; color: var(--hkd-muted-fg, #6b7280); margin-top: 2px; }
.ds-meaning-trans a { color: var(--hkd-muted-fg, #6b7280); text-decoration: none !important; }
.ds-meaning-trans a:hover { color: var(--hkd-primary, #6c5ce7); }
.ds-example {
  margin-top: 8px; padding: 8px 12px;
  border-left: 3px solid var(--hkd-primary, #6c5ce7);
  background: rgba(var(--hkd-primary-rgb, 94, 68, 228), .04);
  border-radius: 0 6px 6px 0;
  font-size: .875rem; color: var(--hkd-fg, #1a1a2e); line-height: 1.6;
}
.ds-example__label { font-weight: 600; font-size: .75rem; color: var(--hkd-muted-fg, #6b7280); margin-bottom: 2px; }
.ds-pron-inline {
  display: inline-flex; align-items: center; margin-left: 8px;
  cursor: pointer; color: var(--hkd-muted-fg, #6b7280); vertical-align: middle;
}
.ds-pron-inline:hover { color: var(--hkd-primary, #6c5ce7); }

/* Nearby card */
.ds-nearby-card {
  background: var(--hkd-card, #fff);
  border: 1px solid var(--hkd-border, #e2e5ec);
  border-radius: 1rem; padding: 20px 24px; margin-bottom: 12px;
  box-shadow: 0 2px 12px -2px rgba(var(--hkd-primary-rgb, 94, 68, 228), .06);
}
.ds-nearby-pair { font-size: 1rem; line-height: 1.5; }
.ds-nearby-pair .ds-hin { font-weight: 700; color: var(--hkd-primary, #6c5ce7); text-decoration: none !important; }
.ds-nearby-pair .ds-eng { font-weight: 600; color: var(--hkd-fg, #1a1a2e); text-decoration: none !important; }
.ds-nearby-pair .ds-gram { font-size: .8125rem; color: var(--hkd-muted-fg, #6b7280); font-style: italic; }
.ds-nearby-pair .ds-eq { color: var(--hkd-muted-fg, #6b7280); margin: 0 6px; }

/* Def / content card */
.ds-def-card {
  background: var(--hkd-card, #fff);
  border: 1px solid var(--hkd-border, #e2e5ec);
  border-radius: 1rem; padding: 20px 24px; margin-bottom: 16px;
  box-shadow: 0 2px 12px -2px rgba(var(--hkd-primary-rgb, 94, 68, 228), .06);
}
.ds-def-card ul { padding-left: 20px; margin: 8px 0 0; }
.ds-def-card li { font-size: .9375rem; color: var(--hkd-fg, #1a1a2e); line-height: 1.7; margin-bottom: 6px; }

/* Chips */
.ds-chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ds-chip {
  display: inline-block; padding: 5px 14px;
  border-radius: 9999px; font-size: .8125rem; font-weight: 500;
  text-decoration: none !important; transition: background .18s, color .18s;
}
.ds-chip--syn { background: rgba(var(--hkd-primary-rgb, 94, 68, 228), .1); color: var(--hkd-primary, #6c5ce7); border: 1px solid rgba(var(--hkd-primary-rgb, 94, 68, 228), .2); }
.ds-chip--syn:hover { background: var(--hkd-primary, #6c5ce7); color: #fff; }
.ds-chip--ant { background: hsla(0,70%,55%,.08); color: #c0392b; border: 1px solid hsla(0,70%,55%,.2); }
.ds-chip--ant:hover { background: #c0392b; color: #fff; }

/* No result */
.ds-no-result {
  background: var(--hkd-card, #fff); border: 1px solid var(--hkd-border, #e2e5ec);
  border-radius: 1.25rem; padding: 36px 32px; text-align: center; margin-bottom: 20px;
}
.ds-no-result__icon { font-size: 2.5rem; margin-bottom: 12px; }
.ds-no-result__title { font-family: var(--hkd-font-disp, 'Space Grotesk', sans-serif); font-size: 1.2rem; font-weight: 700; color: var(--hkd-fg, #1a1a2e); margin-bottom: 8px; }
.ds-no-result__sub { font-size: .9375rem; color: var(--hkd-muted-fg, #6b7280); }

/* Usage items */
.ds-usage-item { padding: 10px 0; border-bottom: 1px solid var(--hkd-border, #e2e5ec); font-size: .9375rem; line-height: 1.65; }
.ds-usage-item:last-child { border-bottom: none; }
.ds-wiki-card { display: flex; gap: 20px; margin-top: 12px; align-items: flex-start; }
.ds-wiki-card img { width: 140px; height: 140px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.ds-wiki-card__text { font-size: .9375rem; line-height: 1.7; color: var(--hkd-fg, #1a1a2e); }

/* SEO block */
.ds-seo-block {
  background: var(--hkd-card, #fff); border: 1px solid var(--hkd-border, #e2e5ec);
  border-radius: 1rem; padding: 20px 24px; margin-top: 24px;
  font-size: .875rem; color: var(--hkd-muted-fg, #6b7280); line-height: 1.75;
}
.ds-seo-block h4 { font-size: .9375rem; font-weight: 700; color: var(--hkd-fg, #1a1a2e); margin-bottom: 8px; }

/* Popular words */
.ds-popular-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* Autocomplete */
#acWords {
  border: 1px solid var(--hkd-border, #e2e5ec); background: var(--hkd-card, #fff);
  border-radius: 0 0 .75rem .75rem; overflow: auto;
  box-shadow: 0 8px 24px -4px rgba(0,0,0,.12);
}
.ac-word { padding: 10px 16px; font-size: .9375rem; color: var(--hkd-fg, #1a1a2e); cursor: pointer; border-bottom: 1px solid var(--hkd-border, #e2e5ec); }
.ac-word:last-child { border-bottom: none; }
.ac-word:hover { background: rgba(var(--hkd-primary-rgb, 94, 68, 228), .06); color: var(--hkd-primary, #6c5ce7); }

/* Tabs (Meaning / Definition / Sentence) -- a segmented control on the white page, directly under the header and above
   the word card, like the app's own tabs. Every section stays rendered and the tabs only scroll to it: hiding panels
   would pull the meanings out of what crawlers weigh, and this page lives on search.
   Pinned by a class rather than position:sticky, because the shared header sets body{overflow-x:hidden !important}:
   that makes body a scroll container, and a sticky child then pins itself to something that never scrolls. */
.ds-jump-wrap { margin-top: 20px; }
/* The pinned bar must be exactly as tall as the resting one: the script measures the resting height and uses it to land a
   clicked section under the bars. So the padding and the (transparent) border live on .ds-jump in both states. The margin
   sits on the wrap, not inside it, so the height the script reserves is the bar's alone. */
.ds-jump { padding: 8px 0; border-bottom: 1px solid transparent; }
.ds-jump-wrap + .ds-result-wrap { padding-top: 8px; }
.ds-jump__inner {
  display: inline-flex; gap: 4px; max-width: 100%; padding: 6px; border-radius: 16px; overflow-x: auto;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  background: #F1F5F9; box-shadow: inset 0 0 0 1px #E2E8F0;
}
.ds-jump__inner::-webkit-scrollbar { display: none; }
.ds-jump.stick {
  position: fixed; left: 0; right: 0; z-index: 900;
  background: #fff; border-bottom: 1px solid var(--hkd-border, #e2e5ec);
  box-shadow: 0 6px 16px -10px rgba(15, 23, 42, .35);
}
/* Realign the tabs with .container once the bar spans the whole viewport. */
.ds-jump.stick .ds-jump__row { margin: 0 auto; padding: 0 15px; }
@media (min-width: 768px)  { .ds-jump.stick .ds-jump__row { width: 750px; } }
@media (min-width: 992px)  { .ds-jump.stick .ds-jump__row { width: 970px; } }
@media (min-width: 1200px) { .ds-jump.stick .ds-jump__row { width: 1170px; } }
/* The pinned search bar otherwise keeps the form's bottom margin, which is dead
   space once fixed -- and the tabs park directly beneath it. */
#sticky.stick .hkd-search-row { margin-bottom: 0; }
.ds-jump__pill {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 32px; border-radius: 10px; white-space: nowrap; cursor: pointer;
  font-size: .75rem; font-weight: 600; line-height: 1; color: #64748B; background: transparent;
  text-decoration: none !important; transition: background .18s, color .18s;
}
.ds-jump__pill:hover { color: #0F172A; background: rgba(15, 23, 42, .05); }
.ds-jump__pill.is-active { background: #fff; color: var(--hkd-primary-dark, #1D4ED8); font-weight: 700; box-shadow: 0 2px 8px -2px rgba(15, 23, 42, .22); }
.ds-jump__pill.is-active::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #10B981; }
#meaning-section, #word_definitions, #sentences { scroll-margin-top: 16px; }

/* Part of speech badge */
.ds-pos {
  display: inline-block; vertical-align: middle; margin-left: 8px;
  padding: 2px 9px; border-radius: 9999px;
  font-size: .6875rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: rgba(var(--hkd-primary-rgb, 94, 68, 228), .1); color: var(--hkd-primary, #6c5ce7);
}
.ds-pos--lead { display: table; margin-left: 0; margin-bottom: 8px; }

/* Example sentences -- held in one section of their own instead of nailed to a
   single gloss, because the stored example often illustrates another sense. */
.ds-keymeanings { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ds-keymeanings__lbl { font-size: .75rem; font-weight: 600; color: var(--hkd-muted-fg, #6b7280); margin-right: 2px; }
.ds-keymeanings a {
  padding: 4px 12px; border-radius: 9999px; font-size: .8125rem; font-weight: 600;
  background: rgba(var(--hkd-primary-rgb, 94, 68, 228), .08); color: var(--hkd-primary, #6c5ce7);
  border: 1px solid rgba(var(--hkd-primary-rgb, 94, 68, 228), .18); text-decoration: none !important;
  transition: background .18s, color .18s;
}
.ds-keymeanings a:hover { background: var(--hkd-primary, #6c5ce7); color: #fff; }
.ds-sent-list { display: grid; gap: 10px; margin-top: 14px; }
.ds-sent {
  border: 1px solid var(--hkd-border, #e2e5ec); border-radius: .75rem;
  padding: 12px 16px; background: var(--hkd-card, #fff);
  transition: border-color .18s, box-shadow .18s;
}
.ds-sent:hover { border-color: rgba(var(--hkd-primary-rgb, 94, 68, 228), .35); box-shadow: 0 2px 12px -4px rgba(var(--hkd-primary-rgb, 94, 68, 228), .22); }
.ds-sent__primary { font-size: .9375rem; line-height: 1.65; color: var(--hkd-fg, #1a1a2e); }
.ds-sent__primary mark { background: rgba(var(--hkd-primary-rgb, 94, 68, 228), .14); color: var(--hkd-primary, #6c5ce7); font-weight: 700; padding: 0 2px; border-radius: 3px; }
.ds-sent__secondary { font-size: .9375rem; line-height: 1.75; color: var(--hkd-muted-fg, #6b7280); margin-top: 5px; }
.ds-sent-note { font-size: .75rem; font-style: italic; color: var(--hkd-muted-fg, #6b7280); margin-top: 14px; }

@media (max-width: 767px) {
  .ds-hero { padding: 16px 0 18px; }
  .ds-hero .hkd-search-row { gap: 10px; }
  .ds-hero .hkd-search-ipt { height: 48px; padding-left: 46px; }
  .ds-hero .hkd-search-ico { left: 15px; }
  .ds-hero .hkd-search-btn { height: 48px; min-width: 105px; padding: 0 18px; font-size: .9375rem; }
  .ds-jump__inner { display: flex; width: 100%; }
  .ds-jump__pill { flex: 1 1 0; padding: 0 8px; font-size: .8125rem; }
  .ds-word-card__head { padding: 16px 18px 12px; }
  .ds-word-card__body { padding: 14px 18px; }
  .ds-nearby-card { padding: 14px 16px; }
  .ds-wiki-card { flex-direction: column; }
  .ds-wiki-card img { width: 100%; height: auto; }
  .ds-jump.stick .ds-jump__row { padding: 0 12px; }
  .ds-sent { padding: 10px 14px; }
}

/* ===== App promos and ad slot (was common/promo_styles.tpl) ===== */
/* ── Two columns from 992px: results on the left, the app card on the right ── */
.ds-grid { display: block; }
.ds-side { display: none; }
@media (min-width: 992px) {
  .ds-grid { display: grid; grid-template-columns: minmax(0, 1fr) 312px; column-gap: 24px; align-items: start; }
  /* Stretch to the grid row so the card has a column to travel down; it stops where the column ends, so it can never
     reach the full-width sections below. (The card's own pinning is further down, after its base rule.) */
  .ds-side { display: block; align-self: stretch; }
}

/* ── Sidebar app card ── */
.ds-appcard {
  position: relative; overflow: hidden; border-radius: 24px; padding: 28px 12px 12px; text-align: center; color: #fff;
  font-family: 'Plus Jakarta Sans', var(--hkd-font-body, sans-serif);
  background: url('../images/app-promo/doodle-white.webp') 0 0 / 400px 200px repeat,
              linear-gradient(180deg, #3034EC 0%, #2A39CC 52%, #173597 100%);
  box-shadow: 0 24px 44px -28px rgba(23, 53, 151, .6);
}
.ds-appcard__t { margin: 0; font-size: 26px; line-height: 32px; font-weight: 500; letter-spacing: 0; color: #fff; }
.ds-appcard__t strong { display: block; font-weight: 800; color: #FFC60C; }
/* Only the top of the phone shows: the white panel covers the rest, as in the design. */
.ds-appcard__phone {
  width: 180px; height: 194px; margin: 22px auto 0; overflow: hidden; padding: 5px 5px 0;
  border-radius: 26px 26px 0 0; background: #0B1120; box-shadow: 0 0 0 1px rgba(255, 255, 255, .16);
}
.ds-appcard__phone img { display: block; width: 100%; height: auto; border-radius: 21px 21px 0 0; }
.ds-appcard__panel { background: #fff; color: #122342; border-radius: 20px; padding: 16px 12px 12px; }
.ds-appcard__stats { display: flex; justify-content: center; gap: 22px; text-align: left; }
.ds-appcard__stat { display: flex; align-items: center; gap: 7px; }
.ds-appcard__stat svg { width: 30px; height: 30px; flex: none; }
.ds-appcard__num { display: block; font-size: 24px; line-height: 26px; font-weight: 800; color: var(--hkd-primary, #2563EB); }
.ds-appcard__lbl { display: block; font-size: 11.85px; line-height: 14px; font-weight: 600; color: #64748B; white-space: nowrap; }
.ds-appcard__trust {
  margin: 10px 0 0; padding: 9px 10px; border-radius: 999px; background: #F2F6FF; border: 1px solid #DDE8FF;
  font-size: 11.85px; line-height: 18px; font-weight: 600; color: #122342;
}
.ds-appcard__trust b { color: #1769F5; font-weight: 800; }
.ds-appcard__stores { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 10px; }
.ds-appcard__stores a { display: block; line-height: 0; border-radius: 8px; transition: transform .18s ease; }
.ds-appcard__stores a:hover { transform: translateY(-2px); }
.ds-appcard__stores img { display: block; height: 40px; width: auto; }
/* Pinned while the results scroll past. --ds-card-top is set by the page script to "bottom of whatever is pinned" + 16px;
   the fallback is a typical stack. Written AFTER the base rule above, which says position:relative. */
@media (min-width: 992px) {
  .ds-appcard { position: sticky; top: var(--ds-card-top, 224px); }
  /* A window too short for the whole card drops the phone picture; one too short even for that leaves the card unpinned. */
  .ds-appcard.is-compact .ds-appcard__t { margin-bottom: 22px; }
  .ds-appcard.is-compact .ds-appcard__phone { display: none; }
  .ds-appcard.is-free { position: static; }
}

/* ── Phone bar: the same invitation for screens too narrow for the sidebar ── */
.ds-appbar {
  position: relative; display: block; overflow: hidden; margin: 0 0 16px; padding: 12px 12px 12px 92px; min-height: 131px;
  border-radius: 12px; color: #fff; font-family: 'Plus Jakarta Sans', var(--hkd-font-body, sans-serif);
  background: url('../images/app-promo/doodle-white.webp') 0 0 / 400px 200px repeat,
              linear-gradient(135deg, #3034EC 0%, #2A39CC 55%, #2237B8 100%);
}
@media (min-width: 992px) { .ds-appbar { display: none; } }
.ds-appbar__phone {
  position: absolute; left: 14px; top: 14px; bottom: 0; width: 68px; overflow: hidden; padding: 4px 3px 0;
  border-radius: 16px 16px 0 0; background: #0B1120; box-shadow: 0 0 0 1px rgba(255, 255, 255, .16);
}
.ds-appbar__phone img { display: block; width: 100%; height: auto; border-radius: 13px 13px 0 0; }
/* Scales with the screen so the heading fits on ONE line from about 375px up (the design draws it on one line); narrower
   phones break between the two phrases. */
.ds-appbar__t { margin: 0; font-size: clamp(13.5px, 3.9vw, 18px); line-height: 1.25; font-weight: 800; color: #fff; }
/* Each phrase is kept whole, so the two sit on one line when there is room and otherwise break between them. */
.ds-appbar__t span { white-space: nowrap; }
.ds-appbar__t .y { color: #FFC60C; }
.ds-appbar__s { margin: 6px 0 10px; font-size: 11.5px; line-height: 16px; font-weight: 500; color: rgba(255, 255, 255, .95); }
.ds-appbar__s i { font-style: normal; white-space: nowrap; }
@media (max-width: 400px) { .ds-appbar__s { font-size: 11px; line-height: 15px; } }
/* On the narrowest phones the picture gives up a few pixels so the text keeps two lines. */
@media (max-width: 380px) {
  .ds-appbar { padding-left: 80px; }
  .ds-appbar__phone { left: 12px; width: 58px; }
}
.ds-appbar__btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 36px; max-width: 320px; border-radius: 10px;
  background: #FFC601; color: #1a1a2e !important; font-size: 14px; font-weight: 800; text-decoration: none !important;
}
.ds-appbar__btn svg { width: 16px; height: 16px; }

/* Dock: once the bar has scrolled away, a slim version stays pinned at the top of a phone screen. The script switches it on
   just as the search bar would reach the top, and pins the search bar and the tabs underneath it. */
.ds-appdock { display: none; }
@media (max-width: 991px) {
  .ds-appdock {
    position: fixed; top: 0; left: 0; right: 0; z-index: 999; height: 44px; padding: 6px 12px;
    display: flex; align-items: center; gap: 10px; color: #fff; font-family: 'Plus Jakarta Sans', var(--hkd-font-body, sans-serif);
    background: linear-gradient(135deg, #3034EC 0%, #2A39CC 55%, #2237B8 100%); box-shadow: 0 4px 14px -6px rgba(2, 3, 40, .55);
    transform: translateY(-100%); visibility: hidden;
  }
  .ds-appdock.is-on { transform: none; visibility: visible; }
}
.ds-appdock__icon { flex: none; width: 30px; height: 30px; border-radius: 8px; }
.ds-appdock__t { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 12px; line-height: 14px; font-weight: 700; color: #fff; }
.ds-appdock__t span { white-space: nowrap; }
.ds-appdock__t .y { color: #FFC60C; }
.ds-appdock__btn {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 9px;
  background: #FFC601; color: #1a1a2e !important; font-size: 13px; font-weight: 800; text-decoration: none !important; white-space: nowrap;
}
.ds-appdock__btn svg { width: 14px; height: 14px; }

/* ── Closing call-to-action ── */
.ds-ctawrap { padding: 56px clamp(16px, 4vw, 64px) 72px; background: #fff; }
.ds-cta {
  position: relative; overflow: hidden; max-width: 1372px; margin: 0 auto; min-height: 385px; border-radius: 24px;
  display: flex; align-items: center; padding: 48px 56px 48px 80px; color: #fff;
  font-family: 'Plus Jakarta Sans', var(--hkd-font-body, sans-serif);
  background: radial-gradient(60% 90% at 30% 0%, rgba(79, 70, 229, .30) 0%, rgba(79, 70, 229, 0) 70%),
              linear-gradient(90deg, #0C0559 0%, #6109BA 100%);
  box-shadow: 0 30px 48px -20px rgba(30, 58, 138, .18);
}
.ds-cta__txt { position: relative; z-index: 1; max-width: 560px; }
.ds-cta__kicker { margin: 0; font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #FFC228; }
.ds-cta__title { margin: 12px 0 0; font-size: 40px; line-height: 48px; font-weight: 800; letter-spacing: -.02em; color: #fff; text-wrap: balance; }
.ds-cta__sub { margin: 12px 0 0; max-width: 520px; font-size: 16px; line-height: 24px; color: #CBD5E1; }
.ds-cta__stores { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.ds-cta__stores a { display: block; line-height: 0; border-radius: 12px; transition: transform .18s ease, box-shadow .18s ease; }
.ds-cta__stores a:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(0, 0, 0, .55); }
.ds-cta__stores img { display: block; height: 64px; width: auto; }
.ds-cta__note { display: flex; align-items: center; gap: 10px; margin: 26px 0 0; font-size: 12px; line-height: 16px; color: #CBD5E1; }
.ds-cta__note svg { flex: none; color: #34D399; }
.ds-cta__img { position: absolute; right: clamp(24px, 7vw, 120px); bottom: 0; width: 337px; height: auto; max-width: 34%; }
@media (max-width: 991px) {
  .ds-cta { padding: 40px 28px; min-height: 0; text-align: center; justify-content: center; }
  .ds-cta__txt { max-width: 560px; }
  .ds-cta__sub { margin-left: auto; margin-right: auto; }
  .ds-cta__stores { justify-content: center; }
  .ds-cta__note { justify-content: center; text-align: left; }
  .ds-cta__img { display: none; }
}
@media (max-width: 599px) {
  .ds-ctawrap { padding: 36px 14px 44px; }
  .ds-cta { padding: 30px 16px 26px; border-radius: 16px; }
  .ds-cta__title { font-size: clamp(22px, 6.4vw, 26px); line-height: 1.22; margin-top: 8px; }
  .ds-cta__sub { font-size: 14px; line-height: 21px; margin-top: 8px; }
  .ds-cta__stores { gap: 10px; margin-top: 20px; }
  .ds-cta__stores img { height: 42px; }
  .ds-cta__note { align-items: flex-start; margin-top: 20px; font-size: 11px; line-height: 15px; }
}
@media (max-width: 359px) { .ds-cta__stores img { height: 38px; } }

/* ── Banner-ad slot. What shows (see promo_adslot.tpl): Google's ad, labelled; or, when Google has nothing, our own QR banner on
   wide screens and nothing at all on phones, so a blocked or empty slot leaves neither a label nor a gap. The small-screen slot
   sits after the meanings and the wide one above the example sentences; each shows only at the widths its creative sizes fit. ── */
.ds-slot { margin: 22px auto; text-align: center; }
.ds-slot[hidden] { display: none !important; }
/* Google's script is blocked or dead: every slot goes, except one that has already switched to our own banner. */
.ds-noads .ds-slot:not(.is-fallback) { display: none !important; }
.ds-slot--d { display: none; }
@media (min-width: 992px) { .ds-slot--d { display: block; } .ds-slot--m { display: none; } }
/* Under 350px a 320px banner does not fit inside the page margins; promo_adslot.tpl requests nothing there, so hide the shell too. */
@media (max-width: 349px) { .ds-slot--m { display: none; } }
.ds-slot__lbl { display: block; visibility: hidden; margin-bottom: 6px; font-size: 10px; line-height: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #94A3B8; }
/* Invisible (but holding its space, so nothing shifts) until the page script knows what filled the slot: "Advertisement" is only
   ever said over a real ad (is-ad). Our own banner (is-own, also the ?adpreview=1 images) never carries it. */
.ds-slot.is-ad .ds-slot__lbl { visibility: visible; }
.ds-slot.is-own .ds-slot__lbl { display: none; }
/* Nothing here crops, rounds or recolours the ad itself: Google's programs do not allow publishers to alter how an ad looks,
   so the box only reserves room (released as soon as an ad renders, see promo_adslot.tpl) and centres it. */
.ds-slot__box { display: block; width: fit-content; max-width: 100%; min-height: 90px; margin: 0 auto; }
/* The ?adpreview=1 images are our own artwork, so those keep rounded corners. */
.ds-slot__box--own { display: block; line-height: 0; border-radius: 14px; overflow: hidden; }
.ds-slot--m .ds-slot__box { min-height: 100px; }
.ds-slot__box img { display: block; max-width: 100%; height: auto; }
/* Wide screens, nothing from Google: our own QR banner, a first-party image (also what ?adpreview=1 shows). It is 970px wide and
   shrinks with the page, so the 940px column at 992-1199px gets the same banner, 3% smaller. Our own artwork, so the corners may be
   rounded. Hidden by default (the hidden attribute too, so an old stylesheet cached beside this markup cannot show an empty link). */
.ds-slot__own { display: none; width: 970px; max-width: 100%; margin: 0 auto; line-height: 0; border-radius: 14px; overflow: hidden; }
.ds-slot__own[hidden] { display: none !important; }
.ds-slot.is-fallback .ds-slot__own { display: block; }
.ds-slot.is-fallback .ds-slot__box { display: none; }
.ds-slot__own img { display: block; width: 100%; height: auto; }
