/* ══════════════════════════════════════════════════════════════
   "Find my level" — the level menu's "Not sure?" button and the test overlay.
   See level-test.js. Colours follow the six-level ramp used by
   .cg-level-option-code.lvl-* in home-calm.css.
   ══════════════════════════════════════════════════════════════ */

/* ─── Level menu extras (built by landing.js renderLevelPicker) ─── */
.cg-level-menu.lt-menu { width: 230px; max-height: calc(100vh - 110px); overflow-y: auto; }
.cg-level-find {
  display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 6px; padding: 12px;
  border: 0; border-radius: 12px; background: #fff2eb; color: #8c491a;
  font: 800 14px var(--cg-font-body); text-align: left; cursor: pointer;
}
.cg-level-find span { flex: 1; }

/* ─── Overlay ─── */
body.lt-lock { overflow: hidden; }
.lt { position: fixed; inset: 0; z-index: 1100; background: #fbf7f0; color: #2e2a26; font-family: var(--cg-font-body, 'Plus Jakarta Sans', system-ui, sans-serif); }
.lt[hidden] { display: none; }
.lt-panel {
  position: relative; height: 100%; max-width: 480px; margin: 0 auto;
  display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
}
.lt-head { display: flex; align-items: center; gap: 8px; }
.lt-tabs { flex: 1; display: flex; padding: 4px; border-radius: 14px; background: #f3ece1; }
.lt-tab { flex: 1; padding: 9px 0; border-radius: 10px; text-align: center; font: 800 13px var(--cg-font-body); color: rgba(46,42,38,.45); }
.lt-tab.now { background: #fff; color: #2e2a26; box-shadow: 0 2px 6px rgba(46,42,38,.08); }
.lt-tab.done { color: #1f6b67; }
.lt-x { flex: none; width: 40px; height: 40px; border: 0; border-radius: 999px; background: #f3ece1; color: rgba(46,42,38,.6); font: 800 16px system-ui; cursor: pointer; }
.lt-body { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; display: flex; flex-direction: column; padding: 14px 4px 8px; }
.lt-center { justify-content: center; }
.lt-kicker { font: 800 12px var(--cg-font-body); letter-spacing: .06em; color: rgba(46,42,38,.45); }
.lt-in { animation: lt-in .3s ease both; }
@keyframes lt-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Step 1 · card deck */
.lt-deck { position: relative; width: 100%; max-width: 330px; min-height: 300px; margin: 0 auto; }
.lt-deck-back { position: absolute; inset: 14px 14px -12px; border-radius: 26px; background: #fff; opacity: .6; transform: rotate(3deg); }
.lt-deck-front { position: relative; min-height: 300px; border-radius: 26px; background: #fff; box-shadow: 0 10px 28px rgba(46,42,38,.12); padding: 24px 22px; display: flex; flex-direction: column; justify-content: center; }
.lt-tf-text { margin: 12px 0 0; font: 800 20px/1.45 var(--cg-font-heading); }
.lt-tf-claim { margin-top: 18px; padding: 12px 14px; border-radius: 14px; background: #f3ece1; font: 800 16px/1.4 var(--cg-font-body); }
.lt-rbs { margin-top: 30px; display: flex; justify-content: center; gap: 22px; }
.lt-rbs > span { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lt-rb { width: 76px; height: 76px; border: 0; border-radius: 999px; background: #fff; box-shadow: 0 6px 18px rgba(46,42,38,.12); font: 900 26px system-ui; cursor: pointer; transition: background .15s, transform .1s; }
.lt-rb:active { transform: scale(.96); }
.lt-rb.f { color: #d0473a; } .lt-rb.t { color: #2f8f8a; }
.lt-rb.dk { width: 60px; height: 60px; margin-top: 8px; font-size: 20px; color: rgba(46,42,38,.5); }
.lt-rb.ok { background: #2f8f8a; color: #fff; } .lt-rb.bad { background: #d0473a; color: #fff; }
.lt-rbl { width: 76px; text-align: center; font: 800 12px var(--cg-font-body); color: rgba(46,42,38,.55); }

/* Step 2 · words: split screen */
.lt-ins { margin: 0 0 12px; text-align: center; font: 700 15px/1.45 var(--cg-font-body); color: rgba(46,42,38,.7); }
.lt-split { position: relative; flex: 1; min-height: 360px; display: flex; border-radius: 26px; overflow: hidden; }
.lt-half { flex: 1; padding: 14px 10px; transition: filter .2s; }
.lt-half.e { background: #e3f3f1; color: #1f6b67; }
.lt-half.h { background: #fff2eb; color: #8c491a; text-align: right; }
.lt-half.hot { filter: brightness(.95); }
.lt-half-t { font: 900 18px var(--cg-font-heading); }
.lt-half-n { font: 700 12px var(--cg-font-body); }
.lt-half-list { margin-top: 160px; }
.lt-mc { display: inline-block; padding: 4px 9px; margin: 3px 3px 0 0; border-radius: 99px; background: #fff; font: 800 12px var(--cg-font-body); }
.lt-word-row { position: absolute; left: 50%; top: 58px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; }
.lt-arw { width: 48px; height: 48px; border: 0; border-radius: 999px; color: #fff; font: 900 22px system-ui; cursor: pointer; }
.lt-arw.e { background: #2f8f8a; } .lt-arw.h { background: #c2571f; }
.lt-word { width: 150px; height: 150px; border-radius: 999px; background: #fff; box-shadow: 0 10px 26px rgba(46,42,38,.15); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10px; transition: transform .32s ease, opacity .32s ease; }
.lt-word.fly-l { transform: translateX(-160px) scale(.4); opacity: 0; }
.lt-word.fly-r { transform: translateX(160px) scale(.4); opacity: 0; }
.lt-word-n { font: 800 11px var(--cg-font-body); color: rgba(46,42,38,.45); }
.lt-word-t { font: 900 24px/1.15 var(--cg-font-heading); word-break: break-word; }
.lt-undo { align-self: center; margin-top: 10px; padding: 8px 14px; border: 0; background: none; font: 800 13px var(--cg-font-body); color: rgba(46,42,38,.55); cursor: pointer; }
.lt-undo.off, .lt-knob .off { opacity: .35; pointer-events: none; }

/* Step 3 · knob */
.lt-ttl { margin: 0; font: 900 22px/1.3 var(--cg-font-heading); }
.lt-knob-wrap { display: flex; align-items: center; gap: 20px; margin-top: 10px; padding-right: 12px; }
.lt-rows { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lt-row { height: 78px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 0 12px; border: 0; border-radius: 16px; background: none; text-align: left; cursor: pointer; color: #2e2a26; font: 700 13px/1.35 var(--cg-font-heading); transition: opacity .25s, background .25s; min-width: 0; }
.lt-row.mid { background: #fff; box-shadow: 0 6px 18px rgba(46,42,38,.1); font-size: 14.5px; }
.lt-row-t { max-width: 100%; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lt-row-t.one { display: block; white-space: nowrap; text-overflow: ellipsis; }
.lt-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 8px; font: 800 11px var(--cg-font-body); white-space: nowrap; }
.lt-trk { position: relative; flex: none; width: 44px; }
.lt-trk-ln { position: absolute; left: 19px; top: 39px; bottom: 39px; width: 6px; border-radius: 6px; background: linear-gradient(#e1eecc, #c2571f); }
.lt-stop { position: absolute; left: 16px; width: 12px; height: 12px; padding: 0; border: 2px solid rgba(46,42,38,.2); border-radius: 99px; background: #fff; transform: translateY(-50%); cursor: pointer; }
.lt-knob { position: absolute; left: -8px; width: 60px; height: 110px; padding: 4px 0; border: 3px solid #c2571f; border-radius: 30px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: space-between; transform: translateY(-50%); transition: top .25s; box-shadow: 0 6px 14px rgba(46,42,38,.18); z-index: 2; }
.lt-knob button { width: 44px; height: 30px; border: 0; border-radius: 99px; background: #f3ece1; font: 900 13px system-ui; cursor: pointer; }
.lt-knob b { font: 900 15px var(--cg-font-heading); color: #c2571f; }
.lt-foot { padding-top: 8px; }
.lt-btn { width: 100%; padding: 16px; border: 0; border-radius: 999px; background: #c2571f; color: #fff; font: 800 16px var(--cg-font-body); cursor: pointer; box-shadow: 0 8px 18px rgba(194,87,31,.25); }
.lt-link { display: block; margin: 4px auto 0; padding: 10px 14px; border: 0; background: none; font: 700 14px var(--cg-font-body); color: rgba(46,42,38,.55); text-decoration: underline; cursor: pointer; }
.lt-link.plain { text-decoration: none; font-weight: 800; font-size: 15px; }

/* Result */
.lt-result { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 8px; }
.lt-res-top { text-align: center; }
.lt-res-code { margin-top: 8px; font: 900 64px/1 var(--cg-font-heading); background: none !important; }
.lt-res-name { margin-top: 6px; font: 900 22px var(--cg-font-heading); }
.lt-card { margin-top: 34px; padding: 22px 16px 18px; border-radius: 20px; background: #fff; box-shadow: 0 2px 10px rgba(46,42,38,.05); }
.lt-bar { display: flex; gap: 4px; margin-top: 30px; }
.lt-seg-col { position: relative; flex: 1; text-align: center; }
.lt-here { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 4px; display: flex; flex-direction: column; align-items: center; font: 800 11px/14px var(--cg-font-body); color: #c2571f; white-space: nowrap; }
.lt-here i { width: 0; height: 0; margin-top: 3px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 7px solid #c2571f; }
.lt-seg { height: 14px; border-radius: 7px; background: rgba(46,42,38,.08); }
.lt-seg.past { background: #f6d9c8; } .lt-seg.now { background: #c2571f; }
.lt-seg-l { margin-top: 6px; font: 800 12px var(--cg-font-body); color: rgba(46,42,38,.45); }
.lt-seg-l.now { color: #c2571f; }
.lt-parts { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.lt-part-t { margin: 0 0 4px 2px; font: 700 11px var(--cg-font-body); color: rgba(46,42,38,.55); }
.lt-part-line { position: relative; height: 14px; border-radius: 7px; background: #fbf7f0; }
.lt-dot { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 99px; transform: translate(-50%, -50%); background: currentColor; }
.lt-res-btns { margin-top: 34px; }

/* Level colours (text colour drives the result code and part dots; chips get both) */
.lt-chip.lvl-a1 { background: #f0fae1; } .lvl-a1.lt-res-code, .lt-dot.lvl-a1, .lt-chip.lvl-a1 { color: #56633f; }
.lt-chip.lvl-a2 { background: #e1eecc; } .lvl-a2.lt-res-code, .lt-dot.lvl-a2, .lt-chip.lvl-a2 { color: #3d472b; }
.lt-chip.lvl-b1 { background: #fff2eb; } .lvl-b1.lt-res-code, .lt-dot.lvl-b1, .lt-chip.lvl-b1 { color: #8c491a; }
.lt-chip.lvl-b2 { background: #ffe1d0; } .lvl-b2.lt-res-code, .lt-dot.lvl-b2, .lt-chip.lvl-b2 { color: #643312; }
.lt-chip.lvl-c1 { background: #e6eef7; } .lvl-c1.lt-res-code, .lt-dot.lvl-c1, .lt-chip.lvl-c1 { color: #2f4a66; }
.lt-chip.lvl-c2 { background: #ece6f5; } .lvl-c2.lt-res-code, .lt-dot.lvl-c2, .lt-chip.lvl-c2 { color: #4a3a66; }

@media (prefers-reduced-motion: reduce) {
  .lt-in, .lt-word, .lt-knob { animation: none; transition: none; }
}
