/* ─────────────────────────────────────────────────────────────────────────────
   KinPella Skill Map V2 — the game-path design approved by the owner
   2026-11-25 (sample: kinpella-work/design-samples/skill-map-v2.png).
   Values are lifted from the sample: deep navy→violet band, one slim
   grade snap-row, subject pills, a "Jump back in" card, chunky cards on a
   dotted trail, slim bottom app nav. All classes are sm2- prefixed so the
   rest of the app (styles.css) is untouched.
   ───────────────────────────────────────────────────────────────────────────── */
.sm2-shell{background:#f4f5fb;color:#17244b;padding-bottom:44px;min-height:60vh}
.sm2-col{max-width:720px;margin:0 auto;padding:0 16px}

/* ── Premium band ─────────────────────────────────────────────────────────── */
.sm2-band{background:linear-gradient(135deg,#131f42 0%,#2c2a6e 58%,#6c57d8 130%);color:#fff;padding:15px 0 40px}
.sm2-eyebrow{font-size:11px;font-weight:800;letter-spacing:2.6px;color:#76e1d2}
.sm2-band h1{font-size:30px;line-height:1.12;font-weight:800;letter-spacing:-.8px;margin:6px 0 0;color:#fff}
.sm2-band h1 em{font-style:normal;color:#ffca71}
.sm2-search{margin-top:12px;background:#fff;border-radius:999px;height:44px;display:flex;align-items:center;gap:9px;padding:0 8px 0 16px;color:#8b96ad}
.sm2-search svg{flex:none}
.sm2-search input{flex:1;min-width:0;border:0;background:none;font-size:16px;font-weight:500;color:#17244b;height:100%}
.sm2-search input::placeholder{color:#8b96ad}
.sm2-search input:focus{outline:none}
.sm2-search input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none;display:none}
.sm2-search:focus-within{box-shadow:0 0 0 3px #76e1d2}
.sm2-search-clear{flex:none;border:0;background:#f2f4fa;color:#43536d;width:28px;height:28px;border-radius:50%;font-size:14px;font-weight:800;display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative}
.sm2-search-clear::after{content:"";position:absolute;inset:-8px;border-radius:50%}
.sm2-search input:placeholder-shown ~ .sm2-search-clear{display:none}

/* ── Jump back in (overlaps the band) ─────────────────────────────────────── */
.sm2-continue{margin:-28px 0 0;background:#fff;border:1.5px solid #e3e6f2;border-radius:20px;padding:11px 13px;display:flex;align-items:center;gap:11px;position:relative}
.sm2-ring{flex:none;position:relative;width:52px;height:52px}
.sm2-ring b{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:12.5px;font-weight:800;color:#6c57d8}
.sm2-cont-mid{flex:1;min-width:0}
.sm2-cont-label{font-size:10.5px;font-weight:800;letter-spacing:1.6px;color:#6c57d8}
.sm2-cont-skill{font-size:16px;font-weight:800;letter-spacing:-.2px;margin-top:2px;white-space:normal;overflow:visible;text-overflow:clip}
.sm2-cont-meta{font-size:12px;color:#718096;font-weight:600;margin-top:2px;white-space:normal;overflow:visible;text-overflow:clip}
.sm2-chips{display:flex;gap:5px;margin-top:6px;flex-wrap:wrap}
.sm2-chip{font-size:10.5px;font-weight:700;padding:3px 7px;border-radius:999px;background:#f2f4fa;color:#43536d;border:1px solid #e6e8f2;white-space:nowrap}
.sm2-chip.amber{background:#fff4dd;border-color:#ffe3ae;color:#8a5d00}
.sm2-go{flex:none;background:#6c57d8;color:#fff;font-size:13.5px;font-weight:800;padding:10px 14px;min-height:44px;border-radius:999px;border:0;cursor:pointer;font-family:inherit}

/* ── Picker rows ──────────────────────────────────────────────────────────── */
.sm2-picker{padding:11px 0 0}
.sm2-picker .sm2-cap{font-size:11px;font-weight:800;letter-spacing:1.8px;color:#8b96ad;margin:0 16px 7px}
.sm2-row{display:flex;gap:7px;overflow-x:auto;padding:2px 16px 4px;scroll-snap-type:x proximity;scrollbar-width:none;
  -webkit-mask-image:linear-gradient(90deg,#000 88%,transparent 100%);mask-image:linear-gradient(90deg,#000 88%,transparent 100%)}
.sm2-row::-webkit-scrollbar{display:none}
.sm2-g{flex:none;scroll-snap-align:start;min-width:44px;height:44px;padding:0 6px;display:flex;align-items:center;justify-content:center;background:#fff;border:1.5px solid #dfe3f0;border-radius:12px;font-size:13.5px;font-weight:700;color:#43536d;cursor:pointer;font-family:inherit}
.sm2-g.sel{background:#6c57d8;border-color:#6c57d8;color:#fff;font-weight:800}
.sm2-subjects{padding-top:10px}
.sm2-s{flex:none;scroll-snap-align:start;height:44px;padding:0 15px;display:flex;align-items:center;background:#fff;border:1.5px solid #dfe3f0;border-radius:999px;font-size:13.5px;font-weight:700;color:#43536d;cursor:pointer;font-family:inherit}
.sm2-s.sel{background:#17244b;border-color:#17244b;color:#fff;font-weight:800}

/* ── Game path ────────────────────────────────────────────────────────────── */
.sm2-trail-head{display:flex;align-items:center;gap:8px;padding:13px 16px 9px}
.sm2-trail-head .sm2-stop{width:22px;height:22px;flex:none;border-radius:50%;background:#0ea47a;color:#fff;font-size:12px;font-weight:800;display:flex;align-items:center;justify-content:center}
.sm2-trail-head h2{font-size:16.5px;font-weight:800;letter-spacing:-.3px;margin:0;color:#17244b}
.sm2-trail-head span{font-size:12px;font-weight:700;color:#8b96ad}
.sm2-path{padding:0 16px;position:relative}
.sm2-path:before{content:"";position:absolute;left:41px;top:8px;bottom:14px;border-left:3px dotted #c9cfeb}
.sm2-node{position:relative;display:flex;gap:12px;align-items:stretch;margin-bottom:9px}
.sm2-dot{flex:none;width:53px;display:flex;justify-content:center;padding-top:15px;position:relative;z-index:1}
.sm2-dot i{width:17px;height:17px;border-radius:50%;background:#fff;border:3.5px solid #6c57d8;display:block}
.sm2-node.done .sm2-dot i{background:#0ea47a;border-color:#0ea47a}
.sm2-node.next .sm2-dot i{border-color:#ffca71;background:#ffca71}
.sm2-body{flex:1;min-width:0}
.sm2-card{width:100%;background:#fff;border:1.5px solid #e3e6f2;border-radius:18px;padding:10px 13px;display:flex;align-items:center;gap:12px;cursor:pointer;font-family:inherit;text-align:left;color:#17244b}
.sm2-tile{flex:none;width:44px;height:44px;border-radius:14px;display:flex;align-items:center;justify-content:center;font-size:23px}
.sm2-t1{background:#efeaff}.sm2-t2{background:#e2f6f1}.sm2-t3{background:#fff1d6}
.sm2-mid{flex:1;min-width:0;display:block}
.sm2-mid h3{font-size:15.5px;font-weight:800;letter-spacing:-.2px;margin:0;color:#17244b;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:break-word}
.sm2-meta{display:block;font-size:11.5px;font-weight:700;color:#8b96ad;margin-top:2px;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:break-word}
.sm2-stars{font-size:12.5px;margin-top:3px;color:#f5a623;letter-spacing:1px;display:block}
.sm2-stars .off{color:#dfe3f0}
.sm2-state{font-size:12px;font-weight:700;color:#8b96ad;margin-top:3px;display:block}
.sm2-state.prog{color:#6c57d8}
.sm2-bar{height:6px;border-radius:99px;background:#eceef7;margin-top:6px;overflow:hidden;display:block}
.sm2-bar i{display:block;height:100%;background:#6c57d8;border-radius:99px}
.sm2-chev{flex:none;color:#b9c0d8;font-size:20px;font-weight:800}
.sm2-body .skill-detail{background:#fff;border:1.5px solid #e3e6f2;border-top:0;border-radius:0 0 18px 18px;margin-top:-9px;padding:16px 14px 12px;box-shadow:none}
.sm2-body .skill-detail .btn{max-width:100%;white-space:normal;text-align:center;line-height:1.4;min-height:44px}
.sm2-node.open .sm2-card{border-radius:18px 18px 0 0}

/* ── Search results / states ──────────────────────────────────────────────── */
.sm2-results-head{display:flex;align-items:baseline;gap:8px;padding:15px 16px 4px}
.sm2-results-head h2{font-size:16.5px;font-weight:800;letter-spacing:-.3px;margin:0;color:#17244b}
.sm2-results-head span{font-size:12px;font-weight:700;color:#8b96ad}
.sm2-empty{margin:8px 16px 0;background:#fff;border:1.5px solid #e3e6f2;border-radius:18px;padding:22px 16px;text-align:center;color:#43536d;font-weight:600;font-size:14.5px}
.sm2-loading{padding:26px 16px;text-align:center;color:#718096;font-weight:600}

/* ── Bottom app nav — REMOVED (owner 2026-11-28: the five-item tab row
   goes EVERYWHERE). The fixed .sm2-nav bar is gone from the Skills view
   and the hub; navigation lives in the hamburger menu. ────────────────── */

/* Large-type mode: grow the V2 type a step, like the rest of the app. */
body.large-type .sm2-band h1{font-size:34px}
body.large-type .sm2-mid h3{font-size:17.5px}
body.large-type .sm2-state,body.large-type .sm2-cont-meta{font-size:13.5px}
body.large-type .sm2-g,body.large-type .sm2-s{font-size:15px;height:44px}

/* ── Desktop pass (owner's correction, 2026-11-28): full width,
   organized — "the PC browser cover everything, from one side to
   the other side, there's no empty space." Band, picker and trail
   share ONE full-width layout with even padding; the grade/subject
   rows wrap instead of scrolling sideways; from 1440px the trail
   runs in two organized columns (order reads left to right). The
   search pill keeps a readable width inside the band. Phone
   unchanged. */
@media (min-width:768px) and (max-width:1023px){
  /* Fold band (reorg Wave 1): the trail leaves the 720px phone column —
     two card columns across the band; picker rows wrap instead of
     scrolling sideways. Phone (<768px) untouched. */
  .sm2-col{max-width:1180px}
  .sm2-row{flex-wrap:wrap;overflow-x:visible;scroll-snap-type:none;-webkit-mask-image:none;mask-image:none}
  .sm2-path{display:grid;grid-template-columns:1fr 1fr;gap:10px 28px}
  .sm2-path:before{display:none}
  .sm2-node{margin-bottom:0}
}
@media (min-width:1024px){
  .sm2-col{max-width:1280px}
  .sm2-wide{max-width:1280px;margin:0 auto}
  .sm2-picker .sm2-cap{margin-left:0;margin-right:0}
  .sm2-row{flex-wrap:wrap;overflow-x:visible;scroll-snap-type:none;-webkit-mask-image:none;mask-image:none;padding-left:0;padding-right:0}
  .sm2-trail-head{padding-left:0;padding-right:0}
  .sm2-path{padding-left:0;padding-right:0}
  .sm2-search{max-width:720px}
}
@media (min-width:1440px){
  .sm2-path{display:grid;grid-template-columns:1fr 1fr;gap:10px 28px}
  .sm2-path:before{display:none}
  .sm2-node{margin-bottom:0}
  /* the "jump back in" card takes the same measure as the search —
     one left rhythm line instead of a stretched banner */
  .sm2-continue{max-width:720px}
}
@media (min-width:2200px){
  .sm2-path{grid-template-columns:1fr 1fr 1fr}
}

/* ── Polish programme (2026-11-28): skill cards stop clustering ──────────
   On desktop the card's words huddled at the left while the chevron
   sat alone at the far right of a wide, empty row. The middle becomes
   a two-column grid: name + progress on the left; stars + state
   right-aligned against the chevron. The card's information now spans
   the card. Phone unchanged. */
@media (min-width:1024px){
  .sm2-mid{display:grid;grid-template-columns:minmax(120px,1fr) auto;column-gap:20px;align-items:center}
  .sm2-mid>*{min-width:0}
  .sm2-mid h3{grid-column:1;grid-row:1}
  .sm2-mid .sm2-meta{grid-column:1;grid-row:2}
  .sm2-mid .sm2-bar{grid-column:1;grid-row:3}
  .sm2-mid .sm2-stars{grid-column:2;grid-row:1;margin-top:0;text-align:right}
  .sm2-mid .sm2-state{grid-column:2;grid-row:2;margin-top:0;text-align:right;white-space:normal;max-width:160px}
}
