
:root{
  --bg:#06070a;
  --bg-elev:#0c1118;
  --text:#f5f7fb;
  --muted:rgba(255,255,255,.74);
  --line:rgba(255,255,255,.08);
  --line-strong:rgba(255,255,255,.14);
  --glass:rgba(14,20,30,.28);
  --glass-strong:rgba(16,23,35,.48);
  --dock:rgba(255,255,255,.14);
  --shadow:0 16px 34px rgba(0,0,0,.30);
  --shadow-strong:0 28px 60px rgba(0,0,0,.48);
  --accent:#0a84ff;
  --page-width:100%;
  --icon-size:66px;
  --icon-radius:18px;
    --grid-icon-size:64px;
  --grid-icon-radius:20px;
--safe-top:max(14px, env(safe-area-inset-top));
  --safe-bottom:max(16px, env(safe-area-inset-bottom));
}
:root[data-theme='light']{
  --bg:#dfe7f4;
  --bg-elev:#eef3fb;
  --text:#111827;
  --muted:rgba(17,24,39,.72);
  --line:rgba(255,255,255,.34);
  --line-strong:rgba(255,255,255,.55);
  --glass:rgba(255,255,255,.26);
  --glass-strong:rgba(255,255,255,.45);
  --dock:rgba(255,255,255,.4);
  --shadow:0 16px 38px rgba(15,23,42,.14);
  --shadow-strong:0 24px 54px rgba(15,23,42,.18);
  --accent:#007aff;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-behavior:smooth}
body{
  margin:0;
  min-height:100dvh;
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","Segoe UI",Roboto,"Noto Sans Thai","Helvetica Neue",Arial,sans-serif;
  background:
    radial-gradient(820px 420px at 16% 8%, rgba(30,96,255,.26), transparent 52%),
    radial-gradient(760px 420px at 84% 14%, rgba(255,122,0,.18), transparent 48%),
    radial-gradient(900px 580px at 50% 100%, rgba(0,0,0,.18), transparent 55%),
    linear-gradient(180deg, #0b1320 0%, #0c1a2a 28%, #0e1725 52%, #0a0e15 100%);
}
:root[data-theme='light'] body{
  background:
    radial-gradient(820px 420px at 16% 8%, rgba(0,122,255,.16), transparent 52%),
    radial-gradient(760px 420px at 84% 14%, rgba(255,149,0,.14), transparent 48%),
    radial-gradient(900px 580px at 50% 100%, rgba(255,255,255,.16), transparent 55%),
    linear-gradient(180deg, #d9e4f4 0%, #edf3fb 30%, #e3edf9 60%, #d8e4f1 100%);
}
img{display:block;max-width:100%}
a{color:inherit;text-decoration:none}
button{font:inherit}
.device-shell{
  position:relative;
  width:min(100%, 540px);
  min-height:100dvh;
  margin:0 auto;
  padding:var(--safe-top) 18px calc(220px + var(--safe-bottom));
  overflow:hidden;
}
.wallpaper-glow{position:absolute;border-radius:999px;filter:blur(40px);opacity:.7;pointer-events:none}
.wallpaper-glow-a{width:220px;height:220px;left:-40px;top:90px;background:rgba(80,142,255,.22)}
.wallpaper-glow-b{width:260px;height:260px;right:-90px;top:180px;background:rgba(255,143,54,.18)}
.chrome-float{
  position:relative;
  z-index:12;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:12px;
  padding:6px 6px 12px;
}

.chrome-left{display:flex;align-items:center;justify-content:flex-start;min-width:42px}
.chrome-center{display:flex;align-items:center;justify-content:center}
.chrome-right{display:flex;align-items:center;justify-content:flex-end}

.floating-logo,.circle-btn,.pill-btn{
  border:1px solid var(--line);
  background:var(--glass);
  backdrop-filter:blur(18px) saturate(180%);
  -webkit-backdrop-filter:blur(18px) saturate(180%);
  box-shadow:var(--shadow);
}
.floating-logo{
  width:42px;height:42px;border-radius:14px;display:grid;place-items:center;overflow:hidden;
}
.floating-logo img{width:100%;height:100%;object-fit:cover}

/* Topbar center logo polish */
.floating-logo{
  transform:translateZ(0);
}
.floating-logo::after{
  content:"";
  position:absolute;
  inset:-10px;
  border-radius:18px;
  background:transparent;
  pointer-events:none;
}
.floating-actions{display:flex;align-items:center;gap:8px;justify-content:flex-end}
.circle-btn,.pill-btn{
  height:42px;display:inline-flex;align-items:center;justify-content:center;color:var(--text);cursor:pointer;
}
.circle-btn{width:42px;border-radius:999px;padding:0}
.pill-btn{min-width:42px;padding:0 12px;border-radius:999px}
.circle-btn svg,.pill-btn svg{width:18px;height:18px;fill:currentColor}
.install-pill{background:rgba(10,132,255,.24);border-color:rgba(10,132,255,.28)}
:root[data-theme='dark'] .icon-sun{display:block}
:root[data-theme='dark'] .icon-moon{display:none}
:root[data-theme='light'] .icon-sun{display:none}
:root[data-theme='light'] .icon-moon{display:block}
.home-screen{position:relative;z-index:2;padding:8px 0 0}
.home-sections{display:flex;flex-direction:column;gap:18px;padding:0 6px 22px}
.home-section{position:relative}
.section-head{display:flex;align-items:center;justify-content:space-between;padding:0 0 12px}
.section-title{margin:0;font-size:13px;line-height:1.2;font-weight:700;letter-spacing:-.01em;color:rgba(255,255,255,.94);text-shadow:0 1px 10px rgba(0,0,0,.28)}
:root[data-theme='light'] .section-title{color:#122033;text-shadow:none}
.app-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:12px 8px;
  align-content:start;
  padding:4px 4px 6px;
}
.section-grid{padding-bottom:2px;}
.app-card{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:5px;
  min-width:0;
  text-align:center;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
  transform:translateZ(0);
  transition:transform .14s ease, opacity .14s ease;
}
.app-card:active{transform:scale(.94)}
.icon-wrap{
  width:var(--icon-size);
  height:var(--icon-size);
  border-radius:var(--icon-radius);
  overflow:hidden;
  display:grid;
  place-items:center;
  background:linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,.06));
  border:1px solid var(--line-strong);
  box-shadow:0 10px 24px rgba(0,0,0,.24);
}


/* ย่อเฉพาะเมนูย่อยในกริด (ไม่กระทบ Dock ล่าง) */
.app-grid .icon-wrap{
  width:var(--grid-icon-size);
  height:var(--grid-icon-size);
  border-radius:var(--grid-icon-radius);
}
.icon-image{width:100%;height:100%;object-fit:contain;border-radius:inherit;transform-origin:center center;will-change:transform}
.card-title{
  width:100%;
  max-width:92px;
  min-height:28px;
  font-size:11.5px;
  line-height:1.22;
  font-weight:600;
  letter-spacing:-.01em;
  color:#fff;
  text-shadow:0 1px 10px rgba(0,0,0,.45);
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
:root[data-theme='light'] .card-title{color:#122033;text-shadow:0 1px 8px rgba(255,255,255,.5)}
.dock-bar{
  position:fixed;
  left:50%;
  bottom:calc(14px + var(--safe-bottom));
  transform:translateX(-50%);
  z-index:8;
  width:min(calc(100% - 18px), 520px);
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:10px;
  padding:12px 12px 10px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:30px;
  background:var(--dock);
  box-shadow:0 22px 46px rgba(0,0,0,.44);
  backdrop-filter:blur(24px) saturate(180%);
  -webkit-backdrop-filter:blur(24px) saturate(180%);
}

/* เส้นแบ่งบาง ๆ เหนือ Dock ช่วยแยกพื้นที่คอนเทนต์กับแถบล่าง */
.dock-bar::before{
  content:"";
  position:absolute;
  left:16px;
  right:16px;
  top:-10px;
  height:1px;
  background:rgba(255,255,255,.08);
  pointer-events:none;
}
.dock-card{gap:7px}
.dock-icon-wrap{box-shadow:0 10px 22px rgba(0,0,0,.2)}
.install-inline-tip{
  position:fixed;
  left:50%;
  bottom:calc(142px + var(--safe-bottom));
  transform:translateX(-50%);
  z-index:7;
  width:min(calc(100% - 30px), 430px);
  padding:10px 14px;
  border-radius:18px;
  border:1px solid var(--line);
  background:var(--glass-strong);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  color:var(--muted);
  box-shadow:var(--shadow);
  font-size:13px;
}
.install-inline-tip strong{color:var(--text)}
.install-sheet-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:19}
.install-sheet{
  position:fixed;left:12px;right:12px;bottom:12px;z-index:20;max-width:520px;margin:0 auto;
  padding:10px 16px calc(18px + var(--safe-bottom));
  border-radius:28px;background:rgba(18,24,34,.88);border:1px solid var(--line);color:var(--text);
  backdrop-filter:blur(26px) saturate(180%);-webkit-backdrop-filter:blur(26px) saturate(180%);box-shadow:var(--shadow-strong)
}
:root[data-theme='light'] .install-sheet{background:rgba(255,255,255,.86)}
.sheet-handle{width:42px;height:5px;border-radius:999px;background:rgba(255,255,255,.32);margin:2px auto 12px}
.sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.sheet-head h2{margin:0;font-size:21px;letter-spacing:-.04em}
.sheet-close{width:38px;height:38px;border-radius:999px;border:1px solid var(--line);background:var(--glass);color:var(--text);cursor:pointer}
.sheet-body{color:var(--muted);font-size:15px;line-height:1.5}.sheet-lead{margin:0 0 10px}.sheet-steps{margin:0;padding-left:20px}.sheet-steps li+li{margin-top:8px}.sheet-note{margin:12px 0 0}
.sheet-open{overflow:hidden}
.is-hidden{display:none !important}
body.is-installed-app #installBtn,
body.is-installed-app #installHelpBtn,
body.is-installed-app #installInlineTip{display:none !important}
@media (hover:hover){
  .app-card:hover{transform:translateY(-2px)}
  .circle-btn:hover,.pill-btn:hover{transform:translateY(-1px)}
}


/* Mobile sticky glass topbar */
@media (max-width:600px){
  .chrome-float{
    position:sticky;
    top:0;
    z-index:12;

    /* safe-area + glass */
    padding:calc(var(--safe-top) - 6px) 10px 12px;
    margin:calc(-1 * var(--safe-top)) -8px 0;

    background:rgba(10,16,26,.46);
    border-bottom:1px solid rgba(255,255,255,.10);
    backdrop-filter:blur(20px) saturate(180%);
    -webkit-backdrop-filter:blur(20px) saturate(180%);
  }
  .chrome-float::after{
    content:"";
    position:absolute;
    left:0; right:0; bottom:-18px;
    height:18px;
    background:linear-gradient(180deg, rgba(10,16,26,.22), rgba(10,16,26,0));
    pointer-events:none;
  }
}



/* Fix: กันหัวข้อหมวด (เช่น 'ใช้บ่อย') ถูกตัดบนมือถือ */
@media (max-width:600px){
  .home-sections{padding-left:12px;padding-right:12px}
  .section-head{padding-left:2px;padding-right:2px}
}

@media (max-width:430px){
  .home-screen{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}

  .chrome-left{min-width:38px}
  .chrome-float{gap:10px;padding:calc(var(--safe-top) - 6px) 10px 10px;margin:calc(-1 * var(--safe-top)) -9px 0}

  :root{
  --icon-size:58px;
  --icon-radius:18px;
  --grid-icon-size:56px;
  --grid-icon-radius:18px;
}
  .device-shell{padding-inline:14px;padding-bottom:calc(160px + var(--safe-bottom))}
  .chrome-float{padding-inline:2px;padding-bottom:8px}
  .floating-logo{width:42px;height:42px;border-radius:14px}
  .circle-btn,.pill-btn{height:40px}
  .circle-btn{width:40px}
  .home-sections{gap:16px;padding-bottom:18px}
  .section-head{padding:0 12px 10px}
  .section-title{font-size:12px}
  .app-grid{gap:10px 7px;padding-inline:2px}
  .card-title{max-width:78px;font-size:10.5px;min-height:24px}
  .dock-bar{width:min(calc(100% - 14px), 520px);padding:10px 10px 8px;border-radius:26px;gap:8px}
  .install-inline-tip{bottom:calc(104px + var(--safe-bottom));font-size:12px}
}


/* ---- Patch: ensure layout not overridden by external CSS ---- */
.app-grid{display:grid}
.app-grid .app-card{display:flex}
.card-title{text-decoration:none}





.floating-logo:active{transform:scale(.96)}


/* Hide inline install tip on desktop (ลดข้อความเกิน/ทับ Dock) */
@media (min-width: 601px){
  #installInlineTip,
  .install-inline-tip{
    display:none !important;
  }
}


/* Fix v3: กันหัวข้อ 'ใช้บ่อย' ถูกตัดบนมือถือ (เพิ่ม padding ที่ section-head โดยตรง + กันการ clip ตัวอักษร) */
@media (max-width:600px){
  .section-head{
    padding-left:16px !important;
    padding-right:16px !important;
    overflow:visible !important;
  }
  .section-title{
    display:inline-block;
    padding-left:2px;
    letter-spacing:0; /* กันตัวอักษรชิดขอบจนโดนตัด */
  }
}


/* Fix v4: ตัวอักษรตัวแรกของหัวข้อ (เช่น 'ใช้บ่อย') ถูก clip เพราะ glyph overhang ชนขอบ + overflow ของ container */
@media (max-width:600px){
  /* ขยับข้อความเข้าในอีกนิด กันการโดนตัดตัวแรก */
  .section-title{
    padding-left:10px !important;
    margin-left:0 !important;
  }
  /* กันไว้ชั้นนอก เผื่ออุปกรณ์มี safe-area */
  .home-sections{
    padding-left:calc(12px + env(safe-area-inset-left)) !important;
    padding-right:calc(12px + env(safe-area-inset-right)) !important;
  }
}


/* Fix v5 (mobile): แก้ตัวอักษรหัวข้อโดนตัดบน iPhone
   สาเหตุหลักมักมาจาก parent มี overflow:hidden ทำให้ glyph ไทยที่มี overhang โดน clip */
@media (max-width:600px){
  .device-shell{
    overflow:visible !important; /* กัน clip ตัวอักษร */
  }
  /* เผื่อ safe-area + ดันคอนเทนต์เข้าด้านในให้ชัด */
  .home-sections{
    padding-left:calc(18px + env(safe-area-inset-left)) !important;
    padding-right:calc(18px + env(safe-area-inset-right)) !important;
  }
  .section-head{
    padding-left:0 !important;
    padding-right:0 !important;
  }
  .section-title{
    padding-left:0 !important;
    margin-left:0 !important;
    /* กัน overhang ด้วย text-shadow/outline ไม่ให้โดนตัด */
    text-shadow:0 1px 10px rgba(0,0,0,.28);
  }
}


/* ===== UX Polish Pack (Final) ===== */

/* Topbar: ลดความสูงลงนิด ให้พื้นที่คอนเทนต์มากขึ้น */
.chrome-float{
  padding-top:4px;
  padding-bottom:10px;
}
@media (max-width:600px){
  .chrome-float{
    padding-top:calc(var(--safe-top) - 10px) !important;
    padding-bottom:10px !important;
  }
}

/* Dock: premium ขึ้น (เงา/ขอบเบาลง) */
.dock-bar{
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 20px 44px rgba(0,0,0,.42);
}
:root[data-theme='light'] .dock-bar{
  border:1px solid rgba(15,23,42,.10);
  box-shadow:0 18px 40px rgba(15,23,42,.18);
}

/* ชื่อใต้ไอคอน: ทำความสูงให้เสมอกัน */
.card-title{
  line-height:1.22;
  min-height:30px;
}
@media (max-width:430px){
  .card-title{min-height:28px}
}

/* Install inline tip: กันชน Dock + แถบ Safari บน iPhone */
@media (max-width:600px){
  .install-inline-tip{
    bottom: calc(215px + var(--safe-bottom)) !important;
    width: min(calc(100% - 28px), 360px) !important;
    padding: 9px 12px !important;
    font-size: 12px !important;
  }
}

/* Accessibility: โฟกัสชัดขึ้น + เคลื่อนไหวน้อยลงตามระบบ */
:focus-visible{
  outline:2px solid rgba(10,132,255,.7);
  outline-offset:3px;
}
.app-card:focus-visible .icon-wrap,
.circle-btn:focus-visible,
.pill-btn:focus-visible{
  box-shadow:0 0 0 3px rgba(10,132,255,.28), var(--shadow);
}
@media (prefers-reduced-motion: reduce){
  *{scroll-behavior:auto !important}
  .app-card, .circle-btn, .pill-btn{transition:none !important}
}

/* ===== Dock Active State (Final) =====
   ใช้กับ class .is-active และ/หรือ aria-current="page" ที่ JS ใส่ให้ */
.dock-bar .dock-card{position:relative}
.dock-icon-wrap{position:relative}

.dock-bar .dock-card.is-active .dock-icon-wrap,
.dock-bar .dock-card[aria-current="page"] .dock-icon-wrap{
  outline:2px solid rgba(10,132,255,.70);
  box-shadow:0 0 0 4px rgba(10,132,255,.18), 0 12px 24px rgba(0,0,0,.22);
}

.dock-bar .dock-card.is-active .dock-icon-wrap::after,
.dock-bar .dock-card[aria-current="page"] .dock-icon-wrap::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-10px;
  width:6px;height:6px;
  border-radius:999px;
  transform:translateX(-50%);
  background:rgba(10,132,255,.95);
  box-shadow:0 0 0 4px rgba(10,132,255,.14);
}

.dock-bar .dock-card.is-active .card-title,
.dock-bar .dock-card[aria-current="page"] .card-title{
  color:rgba(255,255,255,.98);
}
:root[data-theme='light'] .dock-bar .dock-card.is-active .card-title,
:root[data-theme='light'] .dock-bar .dock-card[aria-current="page"] .card-title{
  color:#0b1220;
}

/* ล็อกแนวนอนแบบไม่ทำ sticky พัง (fallback) */
html, body{
  overflow-x: hidden;
}

/* ถ้ารองรับ clip ให้ใช้ clip แทน (เนียนกว่า) */
@supports (overflow: clip){
  html, body{ overflow-x: clip; }
}

/* ✅ สำคัญ: parent ของ sticky ต้องไม่ถูกกำหนด overflow hidden/auto/scroll */
.device-shell,
.home-screen{
  overflow: visible !important;
}

/* กัน element ที่ชอบดันกว้างเกินจอ */
.chrome-float,
.dock-bar,
.home-sections,
.app-grid{
  max-width: 100%;
}

/* ทำให้ topbar sticky บน desktop ด้วย (แบบไม่เพี้ยน) */
@media (min-width:601px){
  .chrome-float{
    position: sticky;
    top: 0;
    z-index: 12;

    /* ไม่ใช้ margin ติดลบแบบมือถือ */
    margin: 0;
    padding: 10px 16px 12px;

    /* glass เบา ๆ */
    background: rgba(10,16,26,.30);
    border-bottom: 1px solid rgba(255,255,255,.10);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
  }
}

.hero-search{
  position:sticky;
  top:calc(84px + env(safe-area-inset-top));
  z-index:6;
  margin:4px 0 14px;
}
.search-wrap{
  position:relative;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 14px;
  min-height:58px;
  border-radius:20px;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(17,24,39,.56);
  box-shadow:0 12px 30px rgba(0,0,0,.22);
  backdrop-filter:blur(16px) saturate(150%);
  -webkit-backdrop-filter:blur(16px) saturate(150%);
}
:root[data-theme='light'] .search-wrap{
  background:rgba(255,255,255,.78);
  border-color:rgba(16,24,40,.08);
}
.search-icon{width:20px;height:20px;fill:var(--muted);flex:0 0 auto}
.tool-search{
  flex:1 1 auto;
  min-width:0;
  background:transparent;
  border:0;
  outline:none;
  color:var(--text);
  font-size:15px;
  line-height:1.4;
}
.tool-search::placeholder{color:var(--muted)}
.clear-search{
  width:34px;height:34px;border-radius:999px;border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);color:var(--text);font-size:22px;line-height:1;cursor:pointer;flex:0 0 auto;
}
.search-empty-state{
  margin:10px 4px 0;
  padding:12px 14px;
  border-radius:16px;
  color:var(--muted);
  font-size:13px;
  text-align:center;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
}
.search-error{margin-top:18px}
.card-title-wrap{display:grid;gap:3px;justify-items:center}
.card-subtitle{
  width:100%;
  max-width:108px;
  font-size:10px;
  line-height:1.2;
  color:var(--muted);
  text-align:center;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.card-badge{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:20px;padding:0 8px;border-radius:999px;
  border:1px solid rgba(255,215,106,.22);
  background:rgba(255,215,106,.12);
  color:#ffd76a;font-size:10px;font-weight:700;letter-spacing:.01em;
}
.app-card{
  border-radius:24px;
  transition:transform .2s ease, opacity .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.app-card.is-match{
  transform:translateY(-3px);
  box-shadow:0 14px 30px rgba(255,200,80,.18);
  border-color:rgba(255,210,90,.45);
  background:rgba(255,210,90,.08);
}
.app-card.is-match .card-title{color:#ffd76a}
.app-card.is-dimmed{opacity:.36}
@media (prefers-reduced-motion: reduce){
  .app-card,.search-wrap{transition:none}
}

/* ===== v4 desktop compact dock + tighter desktop spacing ===== */
@media (min-width: 1024px){
  .device-shell{
    padding-bottom: 128px;
  }

  .home-sections{
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
    gap: 34px;
  }

  .app-grid{
    grid-template-columns: repeat(4, 150px);
    justify-content: center;
    gap: 22px 36px;
  }

  .app-grid .app-card{
    gap: 8px;
  }

  .app-grid .icon-wrap{
    width: 72px;
    height: 72px;
  }

  .card-title{
    max-width: 112px;
    font-size: 13px;
    min-height: 32px;
  }

  .card-subtitle{
    max-width: 120px;
    font-size: 11px;
  }

  .dock-bar{
    width: min(calc(100% - 32px), 760px);
    padding: 10px 18px 8px;
    border-radius: 26px;
    gap: 14px;
    bottom: 12px;
  }

  .dock-bar::before{
    left: 18px;
    right: 18px;
    top: -8px;
  }

  .dock-card{
    gap: 5px;
    padding: 0 4px;
  }

  .dock-card .icon-wrap,
  .dock-icon-wrap{
    width: 58px;
    height: 58px;
    border-radius: 18px;
    box-shadow: 0 8px 18px rgba(0,0,0,.18);
  }

  .dock-bar .card-title{
    max-width: 96px;
    min-height: 18px;
    font-size: 11.5px;
    line-height: 1.15;
  }

  .dock-bar .card-subtitle,
  .dock-bar .card-badge{
    display: none !important;
  }
}

@media (min-width: 1280px){
  .home-sections{
    max-width: 940px;
  }

  .app-grid{
    grid-template-columns: repeat(4, 148px);
    gap: 20px 34px;
  }

  .dock-bar{
    max-width: 720px;
    padding: 9px 16px 7px;
  }

  .dock-card .icon-wrap,
  .dock-icon-wrap{
    width: 54px;
    height: 54px;
  }

  .dock-bar .card-title{
    font-size: 11px;
  }
}


/* fuzzy search hint */
.app-card.is-fuzzy-match .card-title{ text-decoration-thickness: from-font; }


/* ===== v7 mobile dock compact + no subtitle/badge in dock ===== */
.dock-bar .card-subtitle,
.dock-bar .card-badge{
  display:none !important;
}

@media (max-width: 1023.98px){
  .device-shell{
    padding-bottom: calc(122px + var(--safe-bottom));
  }

  .dock-bar{
    width:min(calc(100% - 16px), 500px);
    padding:8px 10px 6px;
    border-radius:24px;
    gap:8px;
    bottom:calc(10px + var(--safe-bottom));
  }

  .dock-bar::before{
    left:14px;
    right:14px;
    top:-8px;
  }

  .dock-card{
    gap:4px;
    padding:0 2px;
  }

  .dock-card .icon-wrap,
  .dock-icon-wrap{
    width:58px;
    height:58px;
    border-radius:18px;
  }

  .dock-bar .card-title{
    max-width:84px;
    min-height:18px;
    font-size:11px;
    line-height:1.15;
  }
}

/* ===== PWA Pro ===== */
.pwa-update-bar{
  position:fixed;
  left:16px;
  right:16px;
  bottom:calc(env(safe-area-inset-bottom,0px) + 18px);
  z-index:1000;
}
.pwa-update-inner{
  max-width:720px;
  margin:0 auto;
  background:rgba(12,15,24,.92);
  color:#fff;
  border:1px solid rgba(255,255,255,.1);
  border-radius:18px;
  padding:14px 16px;
  box-shadow:0 20px 50px rgba(0,0,0,.28);
  backdrop-filter:blur(14px);
  display:flex;
  gap:14px;
  align-items:center;
  justify-content:space-between;
}
.pwa-update-text{font-size:14px; line-height:1.45; font-weight:600;}
.pwa-update-actions{display:flex; gap:10px; flex-wrap:wrap;}
.pwa-update-btn{
  appearance:none; border:0; border-radius:999px; padding:10px 14px;
  font:inherit; font-weight:700; background:rgba(255,255,255,.1); color:#fff; cursor:pointer;
}
.pwa-update-btn.is-primary{background:#fff; color:#111;}
@media (max-width: 680px){
  .pwa-update-inner{flex-direction:column; align-items:flex-start;}
  .pwa-update-actions{width:100%;}
}
