/* FIXED VERSION
Only change: tableWrap direction set to LTR to avoid double RTL flip.
All other code unchanged.
*/

:root{
  --bg:#0b0f14; --card:#0f1520; --aacent:#d4af37; --text:#e8eef7; --muted:#a9b6c7;
  --line:#22324a; --panel:#0e1420; --chip:#152030; --chipLine:#263a58;
  --ok:#8dd18d; --warn:#ffd479;
}

/* Theme: default is dark. Add class "light" on body for light theme.
   Light theme reverses the palette: light background uses the current aacent tones,
   dark tones become text and surfaces. */
body.light{
  --bg:#e9d8a6;
  --card:#fff6dc;
  --aacent:#0b0f14;
  --text:#0b0f14;
  --muted:#22324a;
  --line:#c7b37a;
  --panel:#fff2cf;
  --chip:#fff2cf;
  --chipLine:#c7b37a;
  --ok:#1f7a1f;
  --warn:#8a5a00;
}

*{box-sizing:border-box}
body{
  margin:0; background:linear-gradient(180deg,var(--bg) 0%, var(--card) 100%); color:var(--text);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji";
}
header{padding:20px 16px;text-align:center;border-bottom:1px solid rgba(255,255,255,.06)}
h1{margin:6px 0 4px;font-size:22px;letter-spacing:.4px}
p.sub{margin:0;font-size:13px;color:var(--muted)}
.container{max-width:1100px;margin:0 auto;padding:20px}

.controls{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin-bottom:14px;align-items:center}
input[type="search"]{
  background:var(--panel);border:1px solid #1e2a3d;color:var(--text);
  padding:10px 12px;border-radius:10px;outline:none;min-width:260px
}
.btn{
  background:#132030;color:var(--text);border:1px solid var(--line);
  padding:10px 12px;border-radius:10px;cursor:pointer
}
.btn.primary{border-color:rgba(212,175,55,.35); box-shadow:inset 0 0 0 1px rgba(212,175,55,.08)}
.btn.ghost{background:transparent}
.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px; border-radius:999px; border:1px solid var(--line);
  background:rgba(19,32,48,.55); color:var(--muted); font-size:12px
}
.pill strong{color:var(--text);font-weight:600}
.divider{width:1px;height:28px;background:rgba(255,255,255,.08);display:none}
@media (min-width:720px){ .divider{display:block} }

.view{display:none}
.view.active{display:block}

/* TABLE VIEW */
.tableWrap{
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  background:rgba(15,21,32,.35);
  padding:14px;
}
.tableTitle{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; flex-wrap:wrap; margin-bottom:10px
}
.tableTitle h2{margin:0;font-size:14px;color:#e9d8a6;font-weight:700;letter-spacing:.3px}
.tableNote{font-size:12px;color:var(--muted)}
.namesTable{
  width:100%;
  border-collapse:separate;
  border-spacing:10px;
}
.cell{
  background:radial-gradient(120% 120% at 50% 0%, #13202f 0%, #0f1520 60%, #0b0f14 100%);
  border:1px solid #23344e;
  border-radius:14px;
  padding:12px 12px;
  cursor:pointer;
  transition:transform .08s ease, border-color .15s ease;
  box-shadow:inset 0 0 0 1px rgba(212,175,55,.06);
  user-select:none;
}
.cell:hover{transform:translateY(-1px); border-color:rgba(212,175,55,.45)}
.cell:active{transform:translateY(0px)}
.cellTop{display:flex; align-items:flex-start; justify-content:space-between; gap:10px}
.cellBadge{
  background:var(--chip); border:1px solid var(--chipLine);
  padding:3px 8px; border-radius:999px; font-size:12px; color:#cbd5e1
}
.cellHeb{
  font-family:"SBL Hebrew","Ezra SIL","Cardo","Noto Serif Hebrew","Frank Ruehl","David","Times New Roman",serif;
  font-size:42px; line-height:1; direction:rtl; letter-spacing:1px;
}
.cellName{margin-top:8px; font-size:13px; color:#cfe3ff}
.cellMeaning{margin-top:2px; font-size:12px; color:#e9d8a6; opacity:.95}
.cellMeta{margin-top:8px; font-size:11px; color:var(--muted); line-height:1.35}
.cellMark{
  margin-top:10px; font-size:11px; color:var(--muted)
}

/* CARDS VIEW */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}
.card{perspective:1000px; scroll-margin-top:18px}
.inner{position:relative;width:100%;height:560px;transform-style:preserve-3d;transition:transform .6s}
.card.flipped .inner{transform:rotateY(180deg)}
.face{
  position:absolute;inset:0;background:radial-gradient(120% 120% at 50% 0%, #13202f 0%, #0f1520 60%, #0b0f14 100%);
  border:1px solid #23344e;border-radius:16px;padding:16px;display:flex;flex-direction:column;justify-content:center;align-items:center;
  backface-visibility:hidden;box-shadow:0 10px 30px rgba(0,0,0,.25), inset 0 0 0 1px rgba(212,175,55,.08)
}
.back{transform:rotateY(180deg);padding:16px 14px;align-items:flex-start;overflow:auto}
.hebrew{
  font-family:"SBL Hebrew","Ezra SIL","Cardo","Noto Serif Hebrew","Frank Ruehl","David","Times New Roman",serif;
  font-size:210px;
  line-height:1; margin:6px 0 6px; letter-spacing:6px; direction:rtl; text-rendering:optimizeLegibility
}
.name{font-size:16px;color:#cfe3ff;margin-bottom:6px}
.meaning{font-size:16px;text-align:center;color:#e9d8a6;margin-bottom:6px}
.badge{
  position:absolute;top:10px;left:10px;background:var(--chip);border:1px solid var(--chipLine);
  padding:4px 8px;border-radius:999px;font-size:12px;color:#cbd5e1; display:flex; gap:8px; align-items:center
}
.badge .miniBtn{
  font-size:11px; padding:3px 8px; border-radius:999px; border:1px solid rgba(255,255,255,.18);
  background:rgba(0,0,0,.12); color:var(--text); cursor:pointer;
}
.badge .miniBtn:active{transform:translateY(1px)}
.fliphint{
  position:absolute;
  top:12px;
  left:50%;
  transform:translateX(-50%);
  font-size:11px;
  color:var(--muted);
  pointer-events:none;
  white-space:nowrap;
}

/* Play triangle button on front */
.playBtn{
  position:absolute; top:10px; right:10px;
  width:38px;height:38px;border-radius:12px;
  border:1px solid rgba(212,175,55,.35);
  background:rgba(19,32,48,.55);
  display:grid; place-items:center;
  cursor:pointer;
  box-shadow:inset 0 0 0 1px rgba(212,175,55,.08);
}
.playBtn:active{transform:translateY(1px)}
.playTri{
  width:0;height:0;
  border-top:8px solid transparent;
  border-bottom:8px solid transparent;
  border-left:13px solid #e9d8a6;
  margin-left:2px;
}
.playBtn.off{opacity:.35; cursor:not-allowed}
.playBtn.off .playTri{border-left-color:#cbd5e1}
.back h3{margin:10px 0 5px;font-size:14px;color:#e9d8a6}
.back p{margin:0 0 10px;font-size:14px;line-height:1.5}
.section{margin-bottom:4px}

.metaBox{
  width:100%;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.16);
  border-radius:14px;
  padding:10px 10px;
  margin-bottom:10px;
}
.metaGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px 10px;
  font-size:12px;
}
.metaItem{color:var(--muted); line-height:1.25}
.metaItem b{color:var(--text); font-weight:650}
.metaWide{grid-column:1/-1}
.noteBox{
  width:100%;
  border:1px solid rgba(212,175,55,.22);
  background:rgba(212,175,55,.06);
  border-radius:14px;
  padding:10px 10px;
  margin:6px 0 12px;
  color:#e9d8a6;
  font-size:12.5px;
  line-height:1.45;
}

.card.flash{
  outline:2px solid rgba(212,175,55,.7);
  outline-offset:4px;
  border-radius:18px;
}
mark{
  background:rgba(255,212,121,.22);
  color:var(--text);
  padding:0 2px;
  border-radius:4px;
}

footer{padding:20px;text-align:center;color:var(--muted);font-size:12px}
a{color:#a3d5ff;text-decoration:none}

.smallHelp{
  margin:10px auto 0;
  max-width:980px;
  font-size:12px;
  color:var(--muted);
  text-align:center;
  line-height:1.45;
}
kbd{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
  font-size:11px;
  padding:1px 6px;
  border:1px solid rgba(255,255,255,.16);
  border-bottom-color:rgba(255,255,255,.28);
  border-radius:6px;
  background:rgba(0,0,0,.18);
  color:var(--text);
}

/* Floating back-to-top */
.fab{
  position:fixed;
  right:14px;
  bottom:14px;
  z-index:9999;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.fab button{
  width:46px;height:46px;border-radius:16px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(19,32,48,.72);
  color:var(--text);
  cursor:pointer;
  box-shadow:0 10px 30px rgba(0,0,0,.25), inset 0 0 0 1px rgba(212,175,55,.08);
}
.fab button:active{transform:translateY(1px)}
.fab .up::before{
  content:"↑";
  font-size:18px;
  display:block;
  line-height:1;
}
.fab .home::before{
  content:"⌂";
  font-size:18px;
  display:block;
  line-height:1;
}
.fab button[disabled]{opacity:.35;cursor:not-allowed}

.foundation{
  margin:14px auto 16px;
  max-width:980px;
  border:1px solid rgba(212,175,55,.22);
  background:rgba(212,175,55,.06);
  border-radius:16px;
  padding:14px 14px;
}
.foundation h2{
  margin:0 0 8px;
  font-size:14px;
  color:#e9d8a6;
  letter-spacing:.25px;
}
.foundation p{
  margin:0 0 10px;
  font-size:13px;
  color:#e9d8a6;
  line-height:1.5;
}
.foundation .muted{
  color:rgba(232,238,247,.78);
}


.foundationToggle{
  display:flex;
  justify-content:space-between;
  align-items:center;
  cursor:pointer;
}
.foundationToggle button{
  background:transparent;
  border:1px solid rgba(212,175,55,.35);
  color:#e9d8a6;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  cursor:pointer;
}
.foundationContent{
  margin-top:8px;
  display:none;
}
.foundation.open .foundationContent{
  display:block;
}
.foundationPreview{
  font-size:13px;
  color:#e9d8a6;
  line-height:1.5;
}


/* ===== Foundation styling (user requested) ===== */
.foundation{
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.04);
}
.foundation h2{
  font-size:18px;
  font-weight:800;
  color:#ffffff;
  letter-spacing:.2px;
}
.foundationToggle button{
  color:#ffffff;
  border-color:rgba(255,255,255,.22);
}
.foundationPreview{
  font-size:11px;
  color:inherit;
  line-height:1.35;
  opacity:.9;
}
.foundationContent{
  color:inherit;
}
.foundationPre{
  margin:10px 0 0;
  color:inherit;
  font-family:inherit;
  font-size:13px;
  line-height:1.5;
  white-space:pre-wrap;
}
.foundationKeyTitle{
  margin:10px 0 6px;
  font-size:14px;
  font-weight:800;
  color:inherit;
}
.foundationKeyList{
  margin:0 0 8px 0;
  padding:0;
  color:inherit;
}
.foundationKeyList li{
  list-style:none;
  margin:4px 0;
  padding-left:14px;
  position:relative;
}
.foundationKeyList li::before{
  content:"›";
  position:absolute;
  left:0;
  color:#e9d8a6;
  font-weight:900;
}


/* Key points sizing: same as body text, just bold */
.foundationKeyList li{
  font-size:13px;
  font-weight:800;
  line-height:1.45;
}
.foundationKeyTitle{
  font-size:13px;
  font-weight:900;
}
.foundationKeyList li b{font-weight:900;}

/* =========================
   Modal (Foundation Info)
   ========================= */
.modalOverlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.62);
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:10000;
}
.modalOverlay.open{ display:flex; }

.modalCard{
  width:min(980px, 100%);
  max-height:min(82vh, 720px);
  background:rgba(15,21,32,.98);
  border:1px solid rgba(255,255,255,.14);
  border-radius:16px;
  box-shadow:0 20px 60px rgba(0,0,0,.5);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.modalHeader{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:12px 12px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.modalHeader h2{
  margin:0;
  font-size:14px;
  color:var(--text);
  letter-spacing:.2px;
}
.modalHeaderBtns{
  display:flex;
  gap:8px;
  align-items:center;
}

.modalBtn{
  background:rgba(19,32,48,.72);
  border:1px solid rgba(255,255,255,.14);
  color:var(--text);
  padding:8px 12px;
  border-radius:10px;
  cursor:pointer;
}
.modalBtn.primary{
  border-color:rgba(212,175,55,.35);
  box-shadow:inset 0 0 0 1px rgba(212,175,55,.08);
}
.modalBtn:active{ transform:translateY(1px); }

.modalBody{
  padding:14px 14px;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}

/* prevent background scroll while modal open */
body.modalOpen{
  overflow:hidden;
}


/* =========================================================
   DO NOT CHANGE — BACK SIDE CARD NUMBER POSITION
   Numeric indicator must stay TOP-LEFT.
   Audio button stays TOP-RIGHT.
   ========================================================= */
.back .badge{
  left: 10px;
  right: auto;
}


/* =========================
   Icon buttons (play/stop) in top controls
   ========================= */
.iconBtn{
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid rgba(212,175,55,.35);
  background:rgba(19,32,48,.55);
  display:grid;
  place-items:center;
  cursor:pointer;
  box-shadow:inset 0 0 0 1px rgba(212,175,55,.08);
}
.iconBtn:active{transform:translateY(1px)}

/* Stop square (hidden by default) */
.stopSq{
  width:14px;
  height:14px;
  background:#e9d8a6;
  border-radius:3px;
  display:none;
}

/* Toggle play/stop visuals */
.playBtn.playing .playTri,
.iconBtn.playing .playTri{display:none}
.playBtn.playing .stopSq,
.iconBtn.playing .stopSq{display:block}

/* Keep triangle visible by default */
.playBtn .playTri,
.iconBtn .playTri{display:block}


/* ===== Light theme overrides ===== */
body.light header{border-bottom:1px solid rgba(11,15,20,.12)}
body.light p.sub{color:rgba(11,15,20,.75)}
body.light .tableWrap{background:rgba(255,246,220,.75); border-color:rgba(11,15,20,.12)}
body.light input[type="search"]{
  background:var(--panel);
  border-color:rgba(11,15,20,.18);
  color:var(--text);
}
body.light input[type="search"]::placeholder{color:rgba(11,15,20,.55)}
body.light .btn{
  background:rgba(255,242,207,.9);
  border-color:rgba(11,15,20,.18);
  color:var(--text);
}
body.light .btn.ghost{background:transparent}
body.light .pill{
  background:rgba(255,242,207,.75);
  border-color:rgba(11,15,20,.18);
  color:rgba(11,15,20,.75);
}
body.light .pill strong{color:var(--text)}
body.light .namesTable{color:var(--text)}
body.light .cell{
  background:radial-gradient(120% 120% at 50% 0%, rgba(255,242,207,1) 0%, rgba(255,246,220,1) 60%, rgba(233,216,166,1) 100%);
  border-color:rgba(11,15,20,.18);
  box-shadow:inset 0 0 0 1px rgba(11,15,20,.05);
}
body.light .cellName{color:rgba(11,15,20,.9)}
body.light .cellMeaning{color:rgba(11,15,20,.85)}
body.light .cellMeta{color:rgba(11,15,20,.65)}
body.light .cellBadge{
  background:rgba(233,216,166,.55);
  border-color:rgba(11,15,20,.18);
  color:rgba(11,15,20,.85);
}
body.light .face{
  background:radial-gradient(120% 120% at 50% 0%, rgba(255,242,207,1) 0%, rgba(255,246,220,1) 60%, rgba(233,216,166,1) 100%);
  border-color:rgba(11,15,20,.18);
  box-shadow:0 10px 30px rgba(0,0,0,.12), inset 0 0 0 1px rgba(11,15,20,.05);
}
body.light .back h3{color:rgba(11,15,20,.9)}
body.light .back p{color:rgba(11,15,20,.85)}
body.light .meaning{color:rgba(11,15,20,.85)}
body.light .name{color:rgba(11,15,20,.9)}
body.light .badge{
  background:rgba(233,216,166,.55);
  border-color:rgba(11,15,20,.18);
  color:rgba(11,15,20,.85);
}
body.light .badge .miniBtn{
  border-color:rgba(11,15,20,.22);
  background:rgba(255,242,207,.75);
  color:rgba(11,15,20,.9);
}
body.light .fliphint{color:rgba(11,15,20,.55)}
body.light mark{
  background:rgba(11,15,20,.10);
  color:var(--text);
}
body.light .modalCard{
  background:rgba(255,246,220,.98);
  border-color:rgba(11,15,20,.14);
}
body.light .modalHeader{border-bottom:1px solid rgba(11,15,20,.12)}
body.light .modalBtn{
  background:rgba(255,242,207,.9);
  border-color:rgba(11,15,20,.18);
  color:var(--text);
}
body.light .iconBtn, body.light .playBtn{
  background:rgba(255,242,207,.9);
  border-color:rgba(11,15,20,.22);
}
body.light .playTri{border-left-color:rgba(11,15,20,.85)}
body.light .stopSq{background:rgba(11,15,20,.85)}
body.light footer{color:rgba(11,15,20,.65)}
body.light a{color:rgba(11,15,20,.85)}



/* === FIX: Force 3 cells per row in Table view (Android phone/WebView) === */
.namesTable td{
  width:12.5%;
  vertical-align:top;
}

@media (max-width:720px){
  .namesTable{border-spacing:8px;}
  .cell{padding:8px 8px;}
}

/* ===== Android WebView back-side fix (additive only) =====
   Android WebView sometimes shows the back face already scrolled, which makes the header rows
   (Letter / Name) look cut off. These rules ensure content starts below the badge and can scroll smoothly. */
.back{
  justify-content:flex-start;          /* override .face center alignment */
  padding-top:72px;                   /* leave space below the badge (slightly more for WebView) */
  scroll-padding-top:72px;            /* when focusing/scrolling, keep top content visible */
  -webkit-overflow-scrolling:touch;
}

body.light .noteBox{
  color: rgba(11,15,20,.88);
  border-color: rgba(11,15,20,.18);
  background: rgba(11,15,20,.06);
}



/* ===== 72 Names specific tweaks ===== */
.appTitle{
  margin:0;
  font-size:22px;
  letter-spacing:.4px;
  color:var(--text);
}
.tableWrap{
  /* existing lines... */

  overflow-x: auto;      /* enable horizontal scroll */
  overflow-y: hidden;
  direction: ltr;        /* RTL handled by JS column loop */
  -webkit-overflow-scrolling: touch;
}
.namesTable{ min-width:920px; } /* keeps 8 columns readable; horizontal scroll on small screens */
.cellHeb{
  font-size:30px;               /* 3-letter Names */
  letter-spacing:3px;
}
.hebrew{
  font-size:140px;              /* card front, 3-letter Names */
  letter-spacing:10px;
}
/* Tighten card height for long meditations without clipping */
.inner{ height:620px; }


.nameCell.disabled{
  opacity:.22;
  pointer-events:none;
}
.audioHint{
  margin-top:10px;
  font-size:12px;
  color:var(--muted);
}


/* =========================
   FIX: Equal table cell sizes (table view)
   Every table cell stays the same size regardless of text length.
   ========================= */
.cell{
  height:140px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

.cellTop{flex:0 0 auto}

.cellMeaning{
  flex:1 1 auto;
  margin-top:6px;
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}

/* Keep the hint line at the bottom */
.cellMark{flex:0 0 auto}


/* =========================
   Keyword colors (Purpose text)
   ========================= */
.kw{font-weight:800;}
.kw-love{color:#ff9aa2;}          /* light red */
.kw-health{color:#8ecbff;}        /* light blue */
.kw-energy{color:#9af5b3;}        /* light green */
.kw-soul{color:#ffffff;}          /* white */

/* Additional distinct colors */
.kw-fear{color:#d9b3ff;}          /* lavender */
.kw-abundance{color:#ffd479;}     /* gold */
.kw-conflict{color:#ffb36b;}      /* orange */
.kw-hatred{color:#ff6b6b;}        /* stronger red */
.kw-judgment{color:#a6d4ff;}      /* pale blue */
.kw-protection{color:#9fd7ff;}    /* sky */
.kw-miracle{color:#c7ff86;}       /* lime */
.kw-happiness{color:#ffeaa6;}     /* warm cream */
.kw-depression{color:#b0b7c3;}    /* gray */

/* Light theme: keep readable on cream background */
body.light .kw-love{color:#b00020;}
body.light .kw-health{color:#0b5fb8;}
body.light .kw-energy{color:#0d7a3d;}
body.light .kw-soul{color:#0b0f14;}
body.light .kw-fear{color:#6b2aa6;}
body.light .kw-abundance{color:#8a5a00;}
body.light .kw-conflict{color:#a04700;}
body.light .kw-hatred{color:#b00020;}
body.light .kw-judgment{color:#0b5fb8;}
body.light .kw-protection{color:#0b5fb8;}
body.light .kw-miracle{color:#0d7a3d;}
body.light .kw-happiness{color:#8a5a00;}
body.light .kw-depression{color:#3b4250;}
/* ===== Additional keyword colors ===== */
.kw-ego{color:#d48cff;}           /* magenta */
.kw-evil-eye{color:#7b4fe0;}      /* deep violet */
.kw-negativity{color:#9aa0a6;}    /* steel gray */
.kw-victory{color:#4caf50;}       /* emerald green */
.kw-addiction{color:#8d6e63;}     /* muted brown */
.kw-courage{color:#4dd0e1;}       /* cyan */
.kw-dark{color:#6d6d6d;}          /* charcoal */

/* Light theme overrides */
body.light .kw-ego{color:#6a1b9a;}
body.light .kw-evil-eye{color:#4527a0;}
body.light .kw-negativity{color:#455a64;}
body.light .kw-victory{color:#1b5e20;}
body.light .kw-addiction{color:#5d4037;}
body.light .kw-courage{color:#006064;}
body.light .kw-dark{color:#263238;}

/* ===== Guided Tour (ADD ONLY) ===== */

.guideOverlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.65);
  z-index:20000;
}

.guideTooltip{
  position:fixed;
  max-width:260px;
  background:#111;
  color:#fff;
  padding:12px;
  border-radius:12px;
  font-size:13px;
  z-index:20001;
}

.guideFocus{
  position:relative;
  z-index:20002 !important;
  outline:2px solid #d4af37;
  border-radius:12px;
}


/* =====================================================
   GUIDE + FEEDBACK BUTTON VISIBILITY (ADD ONLY)
   ===================================================== */

/* Base icon text */
#guideBtn,
#feedbackBtn{
  font-weight:800;
  font-size:16px;
  line-height:1;
}

/* DARK THEME */
body:not(.light) #guideBtn,
body:not(.light) #feedbackBtn{
  color:#e9d8a6;                  /* same gold tone */
}

/* LIGHT THEME */
body.light #guideBtn,
body.light #feedbackBtn{
  color:#0b0f14;                  /* dark text on cream */
}

/* Improve touch visibility */
#guideBtn:active,
#feedbackBtn:active{
  transform:translateY(1px);
}

/* ===== Guided Tour Tooltip (mobile-friendly) ===== */

.guideOverlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.65);
  z-index:20000;
}

.guideTooltip{
  position:fixed;
  z-index:20001;
  background:#111;
  color:#fff;
  padding:12px 14px;
  border-radius:14px;
  font-size:14px;
  line-height:1.35;

  /* ✅ this is the key phone fix */
  width:min(360px, calc(100vw - 24px));
  max-width:min(360px, calc(100vw - 24px));

  /* keep it readable */
  white-space:normal;
  word-break:normal;
}

.guideFocus{
  position:relative;
  z-index:20002 !important;
  outline:2px solid #d4af37;
  outline-offset:2px;
  border-radius:12px;
}
