/* Shiba Dev — shared demo utilities (v=real3) */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
body { margin: 0; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid rgba(124, 108, 180, 0.65); outline-offset: 2px; }

/* Thin escape hatch */
.shiba-escape {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: rgba(255,255,255,0.92);
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  transition: background 0.2s, transform 0.2s;
}
.shiba-escape:hover { background: rgba(0,0,0,0.62); transform: translateY(-1px); }
.shiba-escape--light {
  color: rgba(17,17,17,0.85);
  background: rgba(255,255,255,0.78);
  border-color: rgba(17,17,17,0.1);
  box-shadow: 0 4px 16px rgba(17,17,17,0.08);
}
.shiba-escape--light:hover { background: rgba(255,255,255,0.95); }

.demo-concept-tag {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 9998;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  color: rgba(255,255,255,0.8);
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.demo-concept-tag--light {
  color: rgba(17,17,17,0.65);
  background: rgba(255,255,255,0.7);
  border-color: rgba(17,17,17,0.08);
}

.demo-toast {
  position: fixed; left: 50%; bottom: 1.25rem; z-index: 10000;
  transform: translateX(-50%) translateY(120%);
  padding: 0.7rem 1.1rem; border-radius: 12px;
  background: rgba(17,17,17,0.92); color: #fff;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.85rem; font-weight: 600;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  opacity: 0; pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), opacity 0.3s;
  max-width: min(90vw, 420px); text-align: center;
}
.demo-toast.is-visible { transform: translateX(-50%) translateY(0); opacity: 1; }

.bubble-typing {
  display: inline-flex; gap: 4px; align-items: center;
  padding: 0.7rem 0.9rem; border-radius: 14px;
}
.bubble-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: 0.45;
  animation: typing-dot 1s infinite ease-in-out;
}
.bubble-typing span:nth-child(2) { animation-delay: 0.15s; }
.bubble-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-dot {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

/* Hub */
.hub-page {
  font-family: Inter, "Noto Sans TC", system-ui, sans-serif;
  background: #FAF7F4; color: #111; min-height: 100vh;
}
.hub-page .wrap { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }
.hub-hero { padding: 3.5rem 0 1.5rem; }
.hub-hero h1 { margin: 0 0 0.5rem; font-size: clamp(1.6rem, 3.5vw, 2.2rem); letter-spacing: -0.03em; }
.hub-hero p { margin: 0; color: #5a524c; max-width: 52ch; line-height: 1.55; }
.hub-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin: 1.75rem 0 3rem;
}
.hub-card {
  display: flex; flex-direction: column; text-decoration: none;
  background: #fff; border: 1px solid rgba(17,17,17,0.08);
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(17,17,17,0.04), 0 14px 40px rgba(17,17,17,0.06);
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1), box-shadow 0.25s;
}
.hub-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(17,17,17,0.12); }
.hub-card img { aspect-ratio: 16/10; object-fit: cover; width: 100%; height: auto; }
.hub-card-body { padding: 1rem 1.1rem 1.15rem; }
.hub-card-body .badge {
  display: inline-flex; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.28rem 0.55rem; border-radius: 999px;
  background: rgba(245,214,198,0.7); color: #6B4A3A;
  margin-bottom: 0.45rem;
}
.hub-card-body h2 { margin: 0 0 0.25rem; font-size: 1.1rem; }
.hub-card-body p { margin: 0; font-size: 0.85rem; color: #5a524c; }
.hub-top {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  padding: 0.85rem 0; border-bottom: 1px solid rgba(17,17,17,0.08);
}
.hub-top a.brand {
  display: inline-flex; align-items: center; gap: 0.5rem;
  text-decoration: none; font-weight: 700;
}
.hub-top a.brand img { width: 28px; height: 28px; border-radius: 50%; }
.hub-top .spacer { margin-left: auto; }
.hub-footer { padding: 1.5rem 0 2.5rem; color: #8a8a8a; font-size: 0.8rem; }
.hub-footer a { color: #6B4A3A; font-weight: 600; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: #111; color: #fff;
  padding: 0.5rem 0.85rem; z-index: 10001; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }


/* Sticky-header offset for in-page anchors */
[id] { scroll-margin-top: 5.5rem; }

/* Shared modal */
.demo-modal {
  position: fixed; inset: 0; z-index: 10050;
  display: none; place-items: center; padding: 1.25rem;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(6px);
}
.demo-modal.is-open { display: grid; }
.demo-modal-card {
  width: min(520px, 100%); max-height: min(80vh, 640px); overflow: auto;
  background: #fff; color: #111; border-radius: 18px; padding: 1.5rem 1.4rem 1.35rem;
  box-shadow: 0 24px 60px rgba(0,0,0,0.28); position: relative;
}
.demo-modal-card h3 { margin: 0 0 0.5rem; font-size: 1.25rem; }
.demo-modal-card p { margin: 0 0 0.85rem; color: #5a524c; line-height: 1.55; font-size: 0.92rem; }
.demo-modal-close {
  position: absolute; top: 0.75rem; right: 0.85rem;
  border: none; background: transparent; font-size: 1.35rem; cursor: pointer; color: #888;
  width: 36px; height: 36px; border-radius: 10px;
}
.demo-modal-close:hover { background: rgba(0,0,0,0.06); color: #111; }
.demo-modal-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.demo-modal-actions button, .demo-modal-actions a {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.65rem 1rem; border-radius: 999px; border: none; cursor: pointer;
  font-weight: 700; font-size: 0.78rem; letter-spacing: 0.04em; text-decoration: none;
}


/* === Mobile polish (v=real3) === */
html, body { overflow-x: hidden; max-width: 100%; }
img, video, svg { max-width: 100%; height: auto; }
input, select, textarea, button { max-width: 100%; }
input, select, textarea { width: 100%; box-sizing: border-box; }

.demo-modal { padding: max(0.75rem, env(safe-area-inset-top)) 0.75rem max(0.75rem, env(safe-area-inset-bottom)); }
.demo-modal-card {
  width: min(520px, 100%);
  max-height: min(85vh, 640px);
  padding: 1.35rem 1.15rem 1.2rem;
  border-radius: 16px;
}
.demo-modal-close {
  width: 44px; height: 44px; top: 0.5rem; right: 0.5rem;
  display: inline-grid; place-items: center;
}
.demo-modal-actions button, .demo-modal-actions a { min-height: 44px; }

@media (max-width: 768px) {
  .hub-page .wrap { width: min(1080px, 100% - 1.5rem); }
  .hub-grid { grid-template-columns: 1fr; gap: 0.85rem; }
  .hub-hero { padding: 2rem 0 1rem; }
  .hub-top { gap: 0.5rem; }
  .hub-card-body { padding: 0.9rem 1rem 1rem; }
  .shiba-escape, .demo-concept-tag {
    top: max(8px, env(safe-area-inset-top));
  }
  .shiba-escape { left: max(8px, env(safe-area-inset-left)); }
  .demo-concept-tag { right: max(8px, env(safe-area-inset-right)); }
}

@media (max-width: 480px) {
  .hub-hero h1 { font-size: 1.45rem; }
  .demo-toast { max-width: calc(100vw - 1.5rem); font-size: 0.8rem; }
}

/* Shared floating chat → bottom sheet on small screens */
@media (max-width: 640px) {
  .lm-chat, .vx-ai, .au-concierge, .ai-rep, .helper,
  aside[id="demo-chat"], [data-chat-root] {
    left: 0.5rem !important;
    right: 0.5rem !important;
    bottom: max(0.5rem, env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-width: none !important;
    max-height: min(68vh, 520px) !important;
  }
}
