/* KVIN — phone skin for the web app (my.html + app.html).
   Mirrors the native app: compact masthead, native-style cards, bottom tab bar
   with the elevated orange AT SHOP button. Everything is inside one media
   query so laptops keep the existing layout untouched. (2026-10-08) */
@media (max-width: 760px) {

  /* ---- header: logo left, account right; word tabs move to the bottom bar ---- */
  nav.myn { padding: 10px 16px; flex-wrap: nowrap; gap: 10px; }
  nav.myn .tab-words { display: none !important; }
  nav.myn .nav-link { display: none; }                 /* Log out lives in Profile on phones */
  nav.myn .mylogo img { width: 36px; height: 36px; border-radius: 10px; }
  .acctbar .tier-chip { display: inline-block !important; }

  /* room for the bottom bar */
  body { padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  footer, .site-foot { display: none; }

  /* ---- bottom tab bar (built by mobile.js) ---- */
  .mtab { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: space-around;
          background: #fff; border-top: 1px solid var(--border, #DCE7EF); padding: 10px 8px calc(8px + env(safe-area-inset-bottom, 0px));
          box-shadow: 0 -4px 12px rgba(0,43,76,.06); }
  .mtab a, .mtab button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: none; padding: 0; cursor: pointer; text-decoration: none; min-height: 44px; }
  .mtab svg { width: 22px; height: 22px; display: block; }
  .mtab .ml { font: 800 9px/1 'Hanken Grotesk', sans-serif; letter-spacing: 1.2px; color: transparent; }
  .mtab .on .ml { color: var(--green, #002B4C); }
  .mtab .md { width: 4px; height: 4px; border-radius: 999px; background: var(--orange, #F59E71); margin-top: -2px; opacity: 0; }
  .mtab .on .md { opacity: 1; }
  .mtab .mc { margin-top: -22px; }
  .mtab .mc .mcb { width: 54px; height: 54px; border-radius: 999px; background: var(--orange, #F59E71); border: 4px solid #fff; display: flex; align-items: center; justify-content: center;
                   box-shadow: 0 4px 12px rgba(245,158,113,.4); }
  .mtab .mc .mcb svg { width: 24px; height: 24px; }
  .mtab .mc .ml { color: var(--orange, #F59E71); }
  .mtab .mc.on .mcb { background: var(--green, #002B4C); box-shadow: 0 4px 12px rgba(0,43,76,.3); }
  .mtab .mc.on .ml { color: var(--green, #002B4C); }

  /* ---- my.html: Home, laid out like the app's Home ---- */
  body .shell { padding: 12px 16px 24px; }   /* body: beats my.html's own 34px laptop padding, which loads after this file (Kevin 2026-11-04: phone Home buttons too narrow) */
  body #kvSavRow { margin-left: 0; margin-right: 0; }   /* savings + rank cards span the full width too */
  .greet-row { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1.5px solid var(--green); }
  .greet .eyebrow { font-size: 10.5px; letter-spacing: 1.9px; }
  .greet h1 { font-size: 28px; line-height: 1.07; letter-spacing: -0.02em; margin-top: 8px; }
  .greet .sub { font-size: 14px; margin-top: 6px; }
  .plan-pill { background: #fff !important; color: var(--green) !important; border: 1px solid var(--border) !important; padding: 7px 11px !important; font-size: 10.5px !important; letter-spacing: .06em !important; gap: 6px !important; }
  .plan-pill .spark { width: 6px; height: 6px; }
  .grid { display: grid !important; grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important; gap: 12px !important; }
  .grid > * { grid-column: span 2 !important; min-width: 0; }
  .card { border-radius: 18px; padding: 16px; }
  .vehicle, a.card.vehicle { flex-direction: row !important; gap: 14px !important; align-items: center !important; }
  .vehicle .const { display: none; }
  .ring-wrap { width: 84px !important; height: 84px !important; }
  .ring-wrap svg { width: 84px !important; height: 84px !important; }
  .ring-num .n { font-size: 24px; }
  .ring-num .l { font-size: 8px; letter-spacing: .12em; }
  .v-info h2 { font-size: 20px; margin: 6px 0 2px; }
  .v-info .trim { font-size: 13px; }
  .mile-row { margin-top: 10px; gap: 8px; }
  .mile-chip { padding: 8px 12px; border-radius: 12px; }
  .mile-chip .mi { font-size: 18px; }
  .mile-btn { padding: 10px 12px; font-size: 11px; }
  .v-note { font-size: 12.5px; margin-top: 10px; }
  .saved .big { font-size: 40px; margin: 8px 0 4px; }
  .saved .foot { margin-top: 12px; }
  .sec-label { margin-top: 4px; font-size: 12px; }
  .team-box { grid-column: span 2 !important; border: 1.5px solid var(--green) !important; border-radius: 20px !important; padding: 12px !important; margin-top: 4px !important; box-shadow: none !important; background: #fff !important; }
  .team-head { margin-bottom: 10px; }
  .team-label { font-size: 12.5px; letter-spacing: 1.6px; }
  .team-grid { display: grid !important; grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important; gap: 10px !important; }
  .team-grid .action { grid-column: span 2 !important; gap: 12px; align-items: center; padding: 13px 14px; border-radius: 14px; }
  .team-grid .action .ico { width: 40px; height: 40px; border-radius: 12px; }
  .team-grid .action h3 { font-size: 15px; margin-bottom: 2px; }
  .team-grid .action p { font-size: 12px; line-height: 1.4; }
  .team-grid .action .go { display: none; }
  /* 1st = Scan: the orange hero action, like the app */
  .team-grid .action:nth-child(1) { background: var(--orange); border: none; color: var(--onOrange, #002B4C); }
  .team-grid .action:nth-child(1) .ico { background: rgba(0,43,76,.12) !important; }
  .team-grid .action:nth-child(1) .ico svg { stroke: #002B4C; }
  .team-grid .action:nth-child(1) p { color: rgba(0,43,76,.78); }
  /* 2nd + 3rd = Ask KVIN / Live advisor side by side */
  .team-grid .action:nth-child(2), .team-grid .action:nth-child(3) { grid-column: span 1 !important; flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px; }
  .team-grid .action:nth-child(2) { background: #FBE6DC; border: none; }
  .team-grid .action:nth-child(3) { background: #DDF3E8; border: none; }
  .team-grid .action:nth-child(2) .ico, .team-grid .action:nth-child(3) .ico { width: 34px; height: 34px; background: rgba(255,255,255,.7) !important; }
  .team-grid .action:nth-child(2) h3, .team-grid .action:nth-child(3) h3 { font-size: 13.5px; }
  .team-grid .action:nth-child(3) h3 { flex-wrap: wrap; gap: 6px; }
  /* 4th = game plan, outlined like the app */
  .team-grid .action:nth-child(4) { background: #FBE6DC; border: 1px solid var(--green); }
  .stat { grid-column: span 1 !important; padding: 14px; }
  .stat .v { font-size: 26px; margin: 8px 0 2px; }
  .stat .d { font-size: 11.5px; }
  .chart-card .bars { height: 120px; gap: 8px; }
  .donut-card { flex-direction: column; align-items: stretch; gap: 12px; }
  .donut-card svg { width: 120px; height: 120px; align-self: center; }
  .list-card h3 { font-size: 16px; }
  .kevin-note p { font-size: 13.5px; }

  /* ---- my.html on phones: EXACTLY the app's Home (Kevin 2026-10-08) ---- */
  .sec-label, .stat, .chart-card, .donut-card, .list-card { display: none !important; }
  nav.myn #planPill { margin: 0 auto; }
  .greet-row > #planPill { display: none; }
  .greet-row { border-bottom: 1.5px solid var(--green); padding-bottom: 12px; margin-bottom: 12px; }
  .vehicle, a.card.vehicle { background: transparent !important; border: none !important; padding: 0 4px 14px !important; border-bottom: 1px solid rgba(0,43,76,.12) !important; border-radius: 0 !important; box-shadow: none !important; flex-direction: row-reverse !important; }
  .vehicle .v-info .eyebrow { display: none; }
  .vehicle .v-info h2 { font-size: 15px; font-weight: 800; margin: 0 0 2px; }
  .vehicle .v-info .trim { font-size: 12.5px; }
  .vehicle .mile-row { margin-top: 8px; }
  .vehicle .v-note { margin-top: 8px; }
  .ring-wrap { width: 76px !important; height: 76px !important; }
  .ring-wrap svg { width: 76px !important; height: 76px !important; }
  .saved[data-empty="1"] { display: none !important; }
  .saved { background: transparent !important; border: none !important; padding: 6px 4px 14px !important; border-bottom: 1px dashed var(--border) !important; border-radius: 0 !important; }
  .saved .big { font-size: 56px; letter-spacing: -0.04em; }
  .kevin-note { background: transparent !important; border: none !important; border-top: 1px solid rgba(0,43,76,.12) !important; border-radius: 0 !important; padding: 16px 4px 0 !important; }
  .kevin-note p { font-size: 15px; line-height: 1.55; }

  /* ---- Home, matched to the native app screenshot (2026-10-12) ---- */
  nav.myn .avatar.m-profile { background: #fff; color: var(--green); border: 1.5px solid var(--border); width: 36px; height: 36px; }
  nav.myn #planPill { background: #fff !important; color: var(--green) !important; border: 1px solid var(--border) !important; padding: 7px 11px !important; font-size: 10.5px !important; letter-spacing: .06em !important; text-transform: uppercase; }
  .greet-row { flex-direction: row !important; align-items: flex-start !important; justify-content: space-between; gap: 12px; border-bottom: 1.5px solid var(--green); padding-bottom: 14px; margin-bottom: 14px; }
  .greet { flex: 1; min-width: 0; }
  .greet .eyebrow { font-size: 10.5px; letter-spacing: 1.9px; color: var(--teal); }
  .greet h1 { font-size: 28px; line-height: 1.07; margin-top: 8px; }
  .greet .sub { display: none; }
  .m-carline { font: 700 14.5px/1.3 'Hanken Grotesk'; color: var(--green); margin-top: 6px; }
  .m-ring { flex-shrink: 0; margin-top: 10px; }
  .m-ring .ring-wrap { width: 76px !important; height: 76px !important; }
  .m-ring .ring-wrap svg { width: 76px !important; height: 76px !important; }
  .m-ring .ring-num .n { font-size: 22px; } .m-ring .ring-num .l { font-size: 7.5px; }
  .vehicle, a.card.vehicle, .card.saved, .kevin-note { display: none !important; }
  .team-box { border: 1.5px solid var(--green) !important; border-radius: 20px !important; padding: 12px !important; box-shadow: none !important; background: #fff !important; }
  .team-head { margin-bottom: 10px; }
  .team-label { font-size: 12.5px; letter-spacing: 1.6px; } .team-sub { text-transform: none; letter-spacing: 0; font-size: 11px; font-weight: 600; }
  .team-grid .action.m-scan { grid-column: span 2 !important; background: var(--orange) !important; border: none !important; color: var(--onOrange, #002B4C); padding: 14px 16px !important; border-radius: 14px !important; align-items: center !important; box-shadow: 0 6px 18px rgba(245,158,113,.35); }
  .team-grid .action.m-scan .ico { width: 40px !important; height: 40px !important; background: rgba(255,255,255,.22) !important; border-radius: 12px; }
  .team-grid .action.m-scan h3 { font-size: 16px !important; color: #fff; } .team-grid .action.m-scan p { font-size: 11.5px !important; color: rgba(255,255,255,.88); }
  .team-grid .action.m-scan .m-arr, .m-plan .m-arr { margin-left: auto; color: #fff; display: flex; }
  .team-grid .action.m-scan, .action.m-plan { flex-wrap: nowrap !important; }
  .team-grid .action.m-scan > div:not(.ico), .action.m-plan > div:not(.ico) { flex: 1; min-width: 0; }
  #webHero, .pb { display: none !important; }
  .team-grid .action.m-ai, .team-grid .action.m-live { grid-column: span 1 !important; flex-direction: row !important; align-items: center !important; gap: 10px !important; padding: 13px 12px !important; border-radius: 12px !important; border: none !important; }
  .team-grid .action.m-ai { background: #FBE6DC !important; } .team-grid .action.m-live { background: #DDF3E8 !important; }
  .m-chip-av { width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--sand, #C0EBFF); }
  .m-chip-av.g { background: #fff; }
  .team-grid .action.m-ai h3, .team-grid .action.m-live h3 { font-size: 10.5px !important; letter-spacing: 1.4px; display: flex; align-items: center; gap: 5px; margin: 0 0 3px !important; }
  .team-grid .action.m-ai p, .team-grid .action.m-live p { font-size: 11px !important; }
  .m-dot { width: 6px; height: 6px; border-radius: 999px; display: inline-block; } .m-dot.o { background: var(--orange); } .m-dot.g { background: #1E8E5A; }
  .action.m-plan { grid-column: span 2 !important; display: flex !important; align-items: center !important; gap: 10px; padding: 13px 14px !important; border-radius: 12px !important; background: #FBE6DC !important; border: 1px solid var(--green) !important; margin-top: 10px; }
  .action.m-plan .ico { width: 40px !important; height: 40px !important; background: #fff !important; border-radius: 12px; }
  .action.m-plan h3 { font-size: 15px !important; margin-bottom: 2px !important; } .action.m-plan p { font-size: 11.5px !important; line-height: 1.4; }
  .action.m-plan .m-arr { color: var(--green); }
  .action.m-neg { grid-column: span 2 !important; display: block !important; background: var(--green) !important; color: #fff; border: none !important; border-radius: 18px !important; padding: 18px !important; margin-top: 12px; box-shadow: 0 6px 18px rgba(0,43,76,.25); }
  .action.m-neg .m-pill { display: inline-block; background: var(--orange); color: #002B4C; font: 800 9.5px/1 'Hanken Grotesk'; letter-spacing: .12em; padding: 6px 10px; border-radius: 999px; margin-bottom: 12px; }
  .action.m-neg h3 { font-size: 22px !important; line-height: 1.15; color: #fff; display: block; margin: 0 0 8px !important; }
  .action.m-neg p { font-size: 13.5px !important; line-height: 1.5; color: rgba(255,255,255,.88); } .action.m-neg p b { color: var(--orange); font-weight: 800; }
  .action.m-neg .m-stats { display: flex; gap: 26px; margin-top: 16px; }
  .action.m-neg .m-stats b { display: block; font: 900 26px/1 'Hanken Grotesk'; color: var(--orange); margin-bottom: 4px; }
  .action.m-neg .m-stats span { font: 800 9px/1 'Hanken Grotesk'; letter-spacing: .12em; color: rgba(255,255,255,.7); }

  .action.m-neg .m-cta { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; padding: 13px 16px; border-radius: 12px; background: var(--orange); color: #002B4C; font: 800 13px/1 'Hanken Grotesk'; letter-spacing: .08em; box-shadow: 0 4px 12px rgba(245,158,113,.4); }

  /* ---- chat, full screen like the app (2026-10-12) ---- */
  body[data-tab="ai"] nav.myn { display: none; }
  body[data-tab="ai"] .appwrap { padding: 0 !important; }
  body[data-tab="ai"] { padding-bottom: 0; }
  .m-chathead { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 8px; background: #fff; }
  .m-chatback img { width: 32px; height: 32px; border-radius: 9px; display: block; }
  .m-chatmast { display: inline-flex; align-items: center; gap: 6px; font: 800 10.5px/1 'Hanken Grotesk'; letter-spacing: 1.6px; color: var(--green); }
  .m-chatmenu { width: 32px; height: 32px; border-radius: 999px; border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--green); font-weight: 800; text-decoration: none; }
  #p-ai .chat-row { display: block; }
  #p-ai .chat { height: calc(100dvh - 78px - env(safe-area-inset-bottom, 0px)) !important; min-height: 0 !important; }
  #p-ai .price-banner { display: none !important; }
  #p-ai .chat { border: none; box-shadow: none; border-radius: 0; height: calc(100dvh - 172px); min-height: 420px; }
  #p-ai .chat-head { padding: 10px 14px 8px; }
  #p-ai .mode-tg { order: -1; width: 100%; margin: 0 0 10px; background: var(--recess); padding: 4px; }
  #p-ai .mode-tg button { padding: 10px 8px; font-size: 12px; letter-spacing: .5px; text-transform: uppercase; color: var(--green); }
  #p-ai .mode-tg button.on { background: var(--green); color: #fff; box-shadow: none; }
  #p-ai .mode-tg button.live-btn:not(.on) { color: var(--green); }
  #p-ai .chat-av.brand { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 2px 6px rgba(0,43,76,.12); }
  #p-ai .chat-nm { font-size: 14px; } #p-ai .chat-st { font-size: 11px; color: var(--mid); }
  #p-ai .chat-st .pip { background: var(--teal); animation: none; }
  .m-advisory { font: 500 italic 10.5px/1.35 'Hanken Grotesk'; color: var(--light); text-align: center; padding: 6px 18px; border-bottom: 1px solid var(--border); }
  #p-ai .thread { padding: 14px; gap: 10px; }
  #p-ai .b { font-size: 13.5px; line-height: 1.4; padding: 10px 14px; border-radius: 18px; }
  #p-ai .b.me { border-bottom-right-radius: 4px; }
  #p-ai .b.them { background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 4px; }
  .m-chips { display: flex; gap: 8px; overflow-x: auto; padding: 8px 12px 0; scrollbar-width: none; } .m-chips::-webkit-scrollbar { display: none; }
  .m-chips button { flex-shrink: 0; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: #fff; font: 700 11px/1 'Hanken Grotesk'; color: var(--green); }
  #p-ai .composer { align-items: center; gap: 4px; margin: 8px 12px 12px; padding: 6px 6px 6px 8px; border: 1px solid var(--border); border-radius: 22px; background: #fff; }
  #p-ai .composer .attach { width: 32px; height: 32px; border: none; background: none; font-size: 22px; color: var(--mid); border-radius: 999px; }
  #p-ai .composer input { border: none; background: none; padding: 8px 4px; font-size: 13.5px; }
  #p-ai .composer .send { width: 36px; height: 36px; padding: 0; border-radius: 999px; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(245,158,113,.45); }

  /* ---- garage, matched to the native app (2026-10-12) ---- */
  .m-gseg { display: flex; gap: 0; padding: 4px; border-radius: 999px; background: var(--recess); margin: 2px 0 16px; }
  .m-gseg button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 12px; border: none; border-radius: 999px; background: none; font: 800 11px/1 'Hanken Grotesk'; letter-spacing: .5px; color: var(--green); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-gseg button.on { background: var(--green); color: #fff; }
  .m-gseg .m-caret { font-weight: 700; opacity: .8; }
  #p-garage .gv-hero { display: none; }
  body.m-addcar #p-garage .gv-hero { display: block; }
  #p-garage .gv-form { padding: 18px 16px !important; }
  #garageList .veh-card { display: none; }
  #garageList .veh-card.m-gon { display: block; border: none; padding: 0 2px; margin: 0; background: transparent; }
  #garageList .veh-card .veh-head { justify-content: flex-end; }
  #garageList .veh-card .veh-head > div:first-child { display: none; }
  #garageList .veh-card .veh-del { border: none; color: var(--light); padding: 4px 0; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
  #garageList .veh-card .vt-tabs { margin: 0 0 16px; }
  #garageList .veh-card .mt-health { background: #fff; border: none; padding: 0; margin-top: 4px; }

  /* ---- negotiate: the hand-off button first, like the app ---- */
  #p-negotiate .neg-card { display: flex; flex-direction: column; }
  #p-negotiate #negHandoff { order: -1; width: 100%; margin: 4px 0 16px; padding: 15px; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }

  /* ---- app.html: panels sized for a phone ---- */
  .appwrap { padding: 12px 16px 24px !important; max-width: none; }
  .chat { height: calc(100dvh - 310px); min-height: 380px; border-radius: 20px; }
  body[data-tab="ai"] #webHero { margin-bottom: 10px; }
  .pb { padding: 12px 14px; }
  .pb .pb-main { font-size: 13px; }
  .gate { padding: 28px 18px; border-radius: 18px; }
  .gate h3 { font-size: 22px; }
  .shop-h { font-size: 24px; }
  /* Phone buttons fill the screen (Kevin 2026-11-04: "expand those to fit screen") */
  #p-shop .stile { padding: 18px 16px; min-height: 118px; }
  #p-shop .stile b { font-size: 18.5px; }
  #p-shop .stile .st-sub { font-size: 14px; }
  #p-shop .stile .st-ic { font-size: 28px; }
  #p-shop .shop.shop { margin: 0 -16px; border-radius: 0; padding: 24px 14px 18px; }   /* dark sheet edge to edge */
  #p-home .home-tile { padding: 16px 14px; min-height: max(118px, calc((100svh - 290px) / 3)); }   /* 3 rows reach the bottom bar */
  #p-home .home-tile .ht-ic { font-size: 30px; margin-bottom: auto; }
  #p-home .home-tile b { font-size: 16.5px; margin-top: 10px; }
  #p-home .home-tile span:last-child { font-size: 13.5px; }
  .chat-row > .ctx { display: none; }                  /* garage side panel is a laptop thing */
}

/* caption under the greeting while the health score is still building (mirrors #vNote) */
@media (max-width: 760px) {
  .m-ringcap { margin: 6px 0 0; font: 600 12.5px/1.4 'Hanken Grotesk'; color: var(--mid); }
  .m-ringcap[hidden] { display: none; }
}

/* two-word ring label ("BUILDING SCORE") must sit centered inside the 76–84px ring */
@media (max-width: 760px) {
  .ring-num .l, .m-ring .ring-num .l { font-size: 6.5px !important; letter-spacing: .1em; line-height: 1.15; text-align: center; max-width: 80%; white-space: normal; padding-left: .1em; }
}
