/* Mobile quick navigation; shown on browsing pages and Scan, never inside editors. */
.bottom-nav{display:none}
@media(max-width:650px){
  body:is([data-route=home],[data-route=categories],[data-route=rooms],[data-route=products],[data-route=product],[data-route=favorites],[data-route=projects],[data-route=camera],[data-route=login],[data-route=register]) .bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:40;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding:6px 4px calc(6px + env(safe-area-inset-bottom));background:#fffffff5;border-top:1px solid var(--line);box-shadow:0 -4px 16px #2f3a2f10;backdrop-filter:blur(12px)}
  body:is([data-route=home],[data-route=categories],[data-route=rooms],[data-route=products],[data-route=product],[data-route=favorites],[data-route=projects],[data-route=camera],[data-route=login],[data-route=register]){padding-bottom:calc(64px + env(safe-area-inset-bottom))}
  body:is([data-route=home],[data-route=categories],[data-route=rooms],[data-route=products],[data-route=product],[data-route=favorites],[data-route=projects],[data-route=camera],[data-route=login],[data-route=register]) #toast{bottom:calc(80px + env(safe-area-inset-bottom))}
  .bottom-nav>a,.bottom-nav>a:first-child{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:48px;border-radius:10px;color:#6b7a70;font-size:10px;text-decoration:none}
  .bottom-nav svg{width:22px;height:22px}
  .bottom-nav a[aria-current=page]{color:#8b5cf6;font-weight:600}
  .bottom-nav a:focus-visible{outline:2px solid #c8102e;outline-offset:-2px}
}

/* Tahap 5: category tabs, collection tabs, compact collections, login sheet. */
.category-tabs,.collection-tabs{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin:0 0 18px}
.category-tabs>a,.collection-tabs>a,.category-tabs>a:first-child,.collection-tabs>a:first-child{display:inline-flex;flex:none;padding:8px 14px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);font-size:12px;text-decoration:none}
.category-tabs a[aria-current=page],.collection-tabs a[aria-current=page]{background:#253b30;border-color:#253b30;color:#fff}
.template-badge{position:absolute;top:14px;left:14px;z-index:1;padding:5px 10px;border-radius:999px;background:#fbfaf4eb;color:#304135;font-size:11px;font-weight:500}
.project-new{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:180px;border:1px dashed #bfc6b3;border-radius:8px;color:var(--muted);font-size:13px;text-decoration:none}
.project-new span{font-size:28px;line-height:1}
.auth-alt{font-size:12px;color:var(--muted);margin-top:14px}
.auth-alt .text-button{font-size:12px}
@media(max-width:650px){
  .collection-page .page-heading{margin-bottom:20px;gap:12px}
  .collection-page .page-heading h1{font-size:26px;line-height:1.2}
  .collection-page .page-heading .eyebrow{display:none}
  .collection-page:has(.project-new) .page-heading>.button{display:none}
  .collection-page .project-grid,.collection-page .wishlist-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .collection-page .project-info{padding:10px}
  .collection-page .project-info h2{font-size:14px;margin-bottom:4px;overflow-wrap:anywhere}
  .collection-page .project-info p{font-size:11px;line-height:1.5}
  .collection-page .project-estimate{font-size:11px;margin:6px 0 8px}
  .collection-page .project-actions{flex-wrap:wrap;gap:6px}
  .collection-page .project-actions .button{padding:7px 10px;font-size:11px}
  .collection-page .project-new{min-height:0;aspect-ratio:3/4}
  .collection-page .wishlist-card{padding:12px}
  .collection-page .wishlist-chip{height:70px;margin-bottom:10px}
  .collection-page .wishlist-card .favorite-toggle{right:18px;top:18px}
  .collection-page .wishlist-card .button{padding:7px 10px;font-size:11px}
  #auth-dialog{margin:auto 0 0;width:100vw;max-width:100vw;max-height:92dvh;border-radius:20px 20px 0 0;border:0}
  #auth-dialog .auth{border-radius:20px 20px 0 0}
  #auth-dialog .auth-form{padding:26px 20px calc(22px + env(safe-area-inset-bottom))}
  #auth-dialog .auth-form:before{content:'';display:block;width:38px;height:4px;border-radius:2px;background:#d5ddce;margin:-12px auto 16px}
}
