/* qrmenia-theme.css — the redesign layer from the 2026-10-24 design brief.
 *
 * The export styles everything inline, so this sheet overrides by matching the
 * browser-normalised inline styles (e.g. "background: rgb(198, 90, 58)") and
 * the classes qrmenia-theme.js adds (qm-*). Removing this file and its script
 * tag returns the app to the export's own look, which is the point: the
 * redesign is a layer, not a rewrite.
 */
:root {
  --qm-primary: #C65A3A;          /* the brand's own terracotta (the owner preferred it to teal) */
  --qm-primary-hover: #A8452C;
  --qm-primary-tint: rgba(198, 90, 58, 0.10);
  --qm-primary-soft: #F5E3DB;
  --qm-ink: #1E2124;
  --qm-muted: #6B6F76;
  --qm-surface: #FFFFFF;
  --qm-canvas: #FFFFFF;
  --qm-border: rgba(30, 33, 36, 0.08);
  --qm-danger: #B42318;
  --qm-shadow: 0 1px 2px rgba(30, 33, 36, 0.05), 0 6px 16px -10px rgba(30, 33, 36, 0.28);
  --qm-radius: 16px;
}

/* ---- canvas and cards: lighter, consistent elevation ---- */
.qm-shell .qscroll [style*="box-shadow"]:not(.qm-keep-shadow) { box-shadow: var(--qm-shadow) !important; }

/* ---- header: the bell + globe group overflowed a 375 px phone by 18 px ---- */
.qm-head-row { min-width: 0; gap: 10px !important; }
.qm-head-row > :first-child { min-width: 0; flex: 1 1 auto; }
.qm-head-row > :last-child { flex: 0 0 auto; }
.qm-head-row > :last-child button:not(.qm-wx-chip) { width: 44px !important; height: 44px !important; }

/* ---- home order: search first, then partner Stories, then quick access ---- */
.qm-home { display: flex !important; flex-direction: column; }
.qm-home > * { flex: none; min-width: 0; }
.qm-hide { display: none !important; }

/* Prominent search */
.qm-search { padding-top: 6px !important; }
.qm-search [style*="cursor: pointer"] { font-size: 15px !important; }
.qm-search > :first-child {
  box-sizing: border-box; min-height: 52px; border-radius: var(--qm-radius) !important;
  border: 1px solid var(--qm-border) !important; background: var(--qm-surface) !important;
}

/* Section headings: one size everywhere */
.qm-home [style*="font-family: \"Instrument Serif\""][style*="font-size: 2"] { font-size: 22px !important; }

/* Quick access: 5 per row, 44 px+ targets, short labels */
.qm-quick { row-gap: 16px !important; }
.qm-quick > button { min-height: 76px; }
.qm-tile-new > span:first-child { width: 52px; height: 52px; border-radius: 17px; display: flex; align-items: center; justify-content: center; box-shadow: rgba(32, 33, 36, 0.4) 0 8px 18px -12px; }
.qm-tile-new > span:last-child { font-size: 11px; font-weight: 600; color: rgb(74, 69, 62); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- floating assistant button: smaller, tucked above the menu ---- */
.qm-fab {
  width: 48px !important; height: 48px !important; border-radius: 16px !important;
  bottom: calc(96px + env(safe-area-inset-bottom)) !important;
  inset-inline-end: 16px !important;
  box-shadow: 0 8px 20px -8px rgba(198, 90, 58, 0.55) !important;
}
.qm-fab svg { width: 22px; height: 22px; }

/* ---- bottom menu: clear active state, safe area ---- */
.qm-nav { padding-bottom: env(safe-area-inset-bottom) !important; background: rgba(255, 255, 255, 0.94) !important; }
.qm-nav button { min-height: 52px; }

/* ---- place sheet: never under the floating Back button, actions always visible ---- */
.qm-sheet { box-sizing: border-box; max-height: calc(100% - 112px) !important; overflow-y: auto !important; overscroll-behavior: contain; }
/* Directions: the one primary action, pinned to the bottom of the sheet. */
.qm-sheet .qm-sticky-primary {
  position: sticky; bottom: 0; z-index: 2;
  /* A band of the sheet colour all round, so content scrolling under it never shows through. */
  box-shadow: 0 0 0 14px rgb(250, 247, 242), 0 -24px 16px -4px rgb(250, 247, 242) !important;
  margin-bottom: 2px;
}
.qm-share {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(32, 33, 36, 0.1);
  background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--qm-ink); font: inherit;
}
.qm-share:active { transform: scale(0.96); }
.qm-shell .qm-sheet .qm-primary-btn { background: var(--qm-primary) !important; color: #fff !important; }
.qm-shell .qm-sheet .qm-primary-btn svg { stroke: #fff; }
.qm-shell .qm-sheet .qm-secondary-btn { background: #fff !important; color: var(--qm-ink) !important; border: 1px solid var(--qm-border) !important; }

/* ---- small text: nothing below 11.5 px ---- */
.qm-shell [style*="font-size: 10px"],
.qm-shell [style*="font-size: 10.5px"],
.qm-shell [style*="font-size: 11px"] { font-size: 11.5px !important; }

@media (prefers-reduced-motion: reduce) {
  .qm-shell * { animation: none !important; transition: none !important; }
}


/* The sheet scrolls as a whole now, so the description needs no scroll of its own. */
.qm-sheet [style*="max-height: 30vh"] { max-height: none !important; overflow: visible !important; }

/* ---- weather: small chip under the language button, 7-day sheet ---- */
.qm-head-group { flex-wrap: wrap !important; justify-content: flex-end; max-width: 112px; row-gap: 8px !important; }
.qm-head-group .qm-wx-chip { margin-inline-start: auto; }
.qm-wx-chip {
  direction: ltr; unicode-bidi: isolate; width: auto !important; height: auto !important;
  display: flex; align-items: center; gap: 4px; min-height: 32px; box-sizing: border-box;
  border: 1px solid rgba(32, 33, 36, 0.08); background: #fff; border-radius: 16px; padding: 4px 11px;
  cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--qm-ink); white-space: nowrap;
  box-shadow: 0 6px 14px -10px rgba(32, 33, 36, 0.5);
}
.qm-wx-overlay {
  position: absolute; inset: 0; z-index: 330; background: rgba(20, 17, 14, 0.42);
  display: flex; align-items: flex-end; animation: qmfade .2s;
}
.qm-wx-sheet {
  width: 100%; box-sizing: border-box; max-height: calc(100% - 112px); overflow-y: auto;
  background: var(--qm-canvas); border-radius: 28px 28px 0 0;
  padding: 14px 20px calc(24px + env(safe-area-inset-bottom)); animation: qmup .28s;
}
.qm-wx-handle { width: 42px; height: 5px; border-radius: 5px; background: rgba(32, 33, 36, 0.14); margin: 0 auto 14px; }
.qm-wx-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.qm-wx-title { flex: 1; font-family: 'Instrument Serif', serif; font-size: 22px; color: var(--qm-ink); }
.qm-wx-x { border: none; background: rgba(32, 33, 36, 0.07); width: 36px; height: 36px; border-radius: 50%; font-size: 15px; cursor: pointer; color: var(--qm-ink); }
.qm-wx-list { display: flex; flex-direction: column; gap: 8px; }
.qm-wx-row {
  display: grid; grid-template-columns: 1.25fr 40px 1.5fr auto; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--qm-border); border-radius: 14px; padding: 11px 14px;
}
.qm-wx-day b { display: block; font-size: 14px; color: var(--qm-ink); }
.qm-wx-day span, .qm-wx-desc span { display: block; font-size: 12px; color: var(--qm-muted); margin-top: 2px; }
.qm-wx-icon { font-size: 24px; text-align: center; }
.qm-wx-desc { font-size: 13px; color: var(--qm-ink); }
.qm-wx-temp { text-align: end; font-size: 14px; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.qm-wx-temp b { color: var(--qm-ink); }
.qm-wx-temp span { color: var(--qm-muted); margin-inline-start: 6px; }
@keyframes qmfade { from { opacity: 0; } to { opacity: 1; } }
@keyframes qmup { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- ad spot (where the weather + exchange cards were) ---- */
.qm-ad {
  display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--qm-ink);
  background: #F5E3DB; border: 1.5px dashed rgba(198, 90, 58, 0.45); border-radius: 20px;
  padding: 16px 18px; min-height: 92px; box-sizing: border-box; position: relative; overflow: hidden;
}
.qm-ad:active { transform: scale(0.99); }
.qm-ad-ic {
  flex: none; width: 48px; height: 48px; border-radius: 15px; background: #C65A3A; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.qm-ad-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.qm-ad-txt b { font-size: 16px; font-weight: 800; color: #A8452C; }
.qm-ad-txt > span { font-size: 12.5px; line-height: 1.45; color: #4A453E; }
.qm-ad-txt em { align-self: flex-start; font-style: normal; font-size: 12px; font-weight: 700; color: #C65A3A; direction: ltr; unicode-bidi: isolate; }
.qm-ad[data-mode="banner"] { padding: 0; border: none; background: #fff; min-height: 0; aspect-ratio: 3 / 1; }
.qm-ad[data-mode="banner"] img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qm-ad-tag {
  position: absolute; top: 8px; inset-inline-end: 8px; background: rgba(20, 17, 14, 0.55); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 10px;
}

/* ---- 3D tile icons (assets/icons3d) over the export's line icons ---- */
.qm-ico-wrap { position: relative; overflow: hidden; background: #fff !important; }
.qm-ico-wrap > svg { visibility: hidden; }
.qm-ico-wrap > .qm-ico { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.qm-fx-row { grid-template-columns: 40px 1fr auto !important; }
.qm-fx-note { font-size: 12px; color: var(--qm-muted); margin-top: 12px; line-height: 1.5; }

/* ---- pure white canvas (owner, 2026-10-24): the export's cream #FAF7F2
 * backgrounds and the faint terracotta mountains behind the greeting ---- */
html, body { background: #fff !important; }
.qm-shell, .qm-shell [style*="background: rgb(250, 247, 242)"], [style*="background: rgb(250, 247, 242)"] { background: #fff !important; }
.qm-shell [style*="border: 2.5px solid rgb(250, 247, 242)"], .qm-shell [style*="border: 2px solid rgb(250, 247, 242)"] { border-color: #fff !important; }
.qm-shell svg[viewBox="0 0 404 120"] { display: none !important; }
.qm-shell [style*="rgb(239, 233, 224)"][style*="radial-gradient"] { background: #fff !important; }

/* ---- home hero: Mother Armenia + Ararat over Yerevan, fading to white
 * (owner's image, 2026-10-24), in place of the hidden mountain outline.
 * It starts behind the empty 59 px status-bar strip above the scroll area
 * and continues behind the greeting; cropped to the right so Ararat sits
 * behind the header and the statue does not collide with the logo. ---- */
.qm-shell > div:first-child:has(+ .qm-home),
.qm-shell div:has(> svg[viewBox="0 0 404 120"]) {
  background-image: url('assets/home-hero.jpg');
  background-repeat: no-repeat;
  background-size: auto 320px;
  background-position: right 0 top 0;
}
.qm-shell div:has(> svg[viewBox="0 0 404 120"]) { background-position: right 0 top -59px; }
.qm-shell > div:first-child:has(+ .qm-home) { background-position: right 0 top var(--qm-hero-y, 0px); }

/* ---- Profile → Delete account (under Sign out) and its confirmation ---- */
.qm-del-btn {
  margin-top: 10px; background: none; border: none; padding: 12px 16px; cursor: pointer;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--qm-danger); text-decoration: underline;
  text-underline-offset: 3px; align-self: center;
}
.qm-del-body { font-size: 14px; line-height: 1.6; color: var(--qm-ink); margin: 4px 0 10px; }
.qm-del-email { font-size: 13px; font-weight: 700; color: var(--qm-ink); background: #F4F4F5; border-radius: 10px; padding: 8px 12px; margin: 0 0 10px; word-break: break-all; }
.qm-del-note { font-size: 12px; line-height: 1.55; color: var(--qm-muted); margin: 0 0 8px; }
.qm-del-msg { font-size: 13px; font-weight: 700; color: var(--qm-ink); margin: 0 0 8px; min-height: 1px; }
.qm-del-yes, .qm-del-no {
  display: block; width: 100%; border-radius: 14px; padding: 15px; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer;
}
.qm-del-yes { background: var(--qm-danger); color: #fff; border: none; margin-top: 6px; }
.qm-del-yes:disabled { opacity: 0.6; cursor: default; }
.qm-del-no { background: #fff; color: var(--qm-ink); border: 1px solid var(--qm-border); margin-top: 10px; }

/* More sheet (home tiles moved out of the grid) and the shortened events row */
.qm-more-tile > span:first-child { width: 52px; height: 52px; border-radius: 17px; display: flex; align-items: center; justify-content: center; }
.qm-more-group { font-size: 13px; font-weight: 800; color: var(--qm-muted); margin: 14px 2px 8px; }
.qm-more-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 6px; }
.qm-more-item { background: none; border: none; cursor: pointer; font-family: inherit; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 4px 0; }
.qm-more-item > span:first-child { position: relative; overflow: hidden; width: 52px; height: 52px; border-radius: 17px; display: flex; align-items: center; justify-content: center; box-shadow: rgba(32, 33, 36, 0.4) 0 8px 18px -12px; }
.qm-more-item > span:last-child { font-size: 11.5px; font-weight: 600; color: var(--qm-ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qm-ev-short > :nth-child(n+4) { display: none !important; }

/* Paid placements drawn by qrmenia-offers.js */
.qmo-hidden { display: none !important; }
.qmo-sec[data-k="banner"] { padding: 18px 22px 0; }
.qmo-banners { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 20px; }
.qmo-banners::-webkit-scrollbar { display: none; }
.qmo-banner { position: relative; flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 2 / 1; border: none; padding: 0; border-radius: 20px; overflow: hidden; cursor: pointer; background: #2E6F57; font-family: inherit; text-align: start; }
.qmo-banner-img, .qmo-banner-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.qmo-banner-cap { position: absolute; inset-inline: 0; bottom: 0; padding: 30px 16px 13px; background: linear-gradient(transparent, rgba(0,0,0,.62)); color: #fff; display: flex; flex-direction: column; gap: 2px; }
.qmo-banner-cap b { font-size: 16px; font-weight: 800; }
.qmo-banner-cap span { font-size: 12.5px; opacity: .9; }
.qmo-tag { position: absolute; top: 10px; inset-inline-start: 10px; background: rgba(0,0,0,.45); color: #fff; font-style: normal; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.qmo-dots { display: flex; justify-content: center; gap: 5px; margin-top: 8px; }
.qmo-dots i { width: 6px; height: 6px; border-radius: 6px; background: rgba(32,33,36,.18); transition: width .2s; }
.qmo-dots i.on { width: 16px; background: #C65A3A; }
.qmo-head { padding: 26px 22px 12px; }
.qmo-head h2 { margin: 0; font-family: 'Instrument Serif', serif; font-size: 24px; font-weight: 400; color: #202124; }
.qmo-row { display: flex; gap: 12px; overflow-x: auto; padding: 0 22px 6px; scrollbar-width: none; }
.qmo-row::-webkit-scrollbar { display: none; }
.qmo-deal, .qmo-feat { flex: none; border: 1px solid rgba(32,33,36,.06); background: #fff; border-radius: 18px; overflow: hidden; padding: 0; cursor: pointer; font-family: inherit; text-align: start; box-shadow: 0 12px 28px -20px rgba(32,33,36,.5); }
.qmo-deal { width: 168px; }
.qmo-deal-img { position: relative; height: 112px; background: #F1ECE4; }
.qmo-deal-img img, .qmo-feat-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qmo-off { position: absolute; top: 8px; inset-inline-start: 8px; background: #C4272E; color: #fff; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 9px; }
.qmo-deal-body, .qmo-feat-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; }
.qmo-deal-body b, .qmo-feat-body b { font-size: 13.5px; font-weight: 800; color: #202124; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qmo-sub, .qmo-feat-body span { font-size: 11.5px; color: #8A8177; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qmo-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.qmo-price s { font-size: 11.5px; color: #9A9086; }
.qmo-price strong { font-size: 14px; color: #2E6F57; }
.qmo-timer { margin-top: 4px; font-size: 11.5px; font-weight: 700; color: #C65A3A; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; text-align: start; }
.qmo-feat { width: 220px; }
.qmo-feat-img { height: 124px; background: #F1ECE4; }
.qmo-off-inline { align-self: flex-start; margin-top: 4px; font-style: normal; background: #F5E3DB; color: #C65A3A; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 8px; }
.qmo-banner.qmo-logo { background: #fff; border: 1px solid rgba(32,33,36,.07); box-shadow: 0 14px 30px -22px rgba(32,33,36,.55); }
.qmo-banner.qmo-logo .qmo-banner-img { inset: 26px 0 62px; width: auto; height: auto; display: flex; align-items: center; justify-content: center; }
.qmo-banner.qmo-logo .qmo-banner-img img { position: static; width: 62%; height: 100%; object-fit: contain; }
.qmo-banner.qmo-logo .qmo-banner-cap { background: none; color: #202124; padding: 0 16px 13px; align-items: center; text-align: center; }
.qmo-banner.qmo-logo .qmo-banner-cap span { color: #6B6459; opacity: 1; }
.qmo-banner.qmo-logo .qmo-tag { background: rgba(32,33,36,.08); color: #6B6459; }
