/* /install — hướng dẫn cài PWA */
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800;900&family=Be+Vietnam+Pro:wght@500;600;700;800&display=swap");

:root {
  --ink: #1a1a2e;
  --muted: #5c5c72;
  --cream: #fff6f0;
  --primary: #8b7cf6;
  --primary-deep: #6f5ee8;
  --on-primary: #fff;
  --pastel-lilac: #e8e4ff;
  --pastel-pink: #ffd6e8;
  --pastel-sky: #d4eeff;
  --pastel-yellow: #fff3c4;
  --brand-100: #f0edff;
  --brand-200: #ddd6fe;
  --font: "Nunito", "Be Vietnam Pro", system-ui, sans-serif;
  --shadow: 0 20px 50px -28px rgba(109, 94, 232, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 90% 55% at 10% -10%, var(--pastel-yellow), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 0%, var(--pastel-pink), transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 100%, var(--pastel-sky), transparent 45%),
    radial-gradient(ellipse 50% 35% at 0% 80%, var(--pastel-lilac), transparent 40%),
    var(--cream);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }

.in {
  max-width: 28rem;
  margin: 0 auto;
  padding: 1rem 1rem 2.5rem;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.in-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .35rem 0 1.25rem;
}

.in-brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 800;
  font-size: 1.05rem;
}

.in-brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.in-head {
  text-align: center;
  margin-bottom: 1.35rem;
}

.in-head h1 {
  margin: 0 0 .45rem;
  font-size: clamp(1.55rem, 5.5vw, 1.85rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.in-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  font-size: .98rem;
}

.in-detect {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: .85rem auto 0;
  padding: .35rem .85rem;
  border-radius: 999px;
  background: rgba(255,255,255,.75);
  box-shadow: 0 0 0 1px var(--brand-200);
  font-size: .8rem;
  font-weight: 800;
  color: var(--primary-deep);
}

.in-card {
  background: #fff;
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  flex: 1;
}

.in-card-banner {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1.1rem 1.2rem;
  background: linear-gradient(135deg, var(--pastel-lilac), #f7f4ff);
}

.in-card-banner .ico {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 1rem;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px -8px rgba(109,94,232,.4);
  flex: none;
  color: var(--primary);
}

.in-card-banner .ico svg { width: 1.5rem; height: 1.5rem; }

.in-card-banner h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.2;
}

.in-card-banner p {
  margin: .2rem 0 0;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
}

.in-steps {
  padding: 1.15rem 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.in-step {
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  gap: .75rem;
  align-items: start;
}

.in-step-num {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  font-size: .85rem;
  display: grid;
  place-items: center;
  margin-top: .1rem;
}

.in-step-body p {
  margin: 0 0 .75rem;
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.45;
}

.in-step-body p strong { color: var(--primary-deep); }

.in-mock {
  border-radius: 1rem;
  background: #f8f7fc;
  border: 1px solid var(--brand-100);
  padding: .85rem;
  overflow: hidden;
}

.in-mock-bar {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .6rem;
  border-radius: .75rem;
  background: #fff;
  box-shadow: 0 2px 8px -4px rgba(0,0,0,.12);
  font-size: .72rem;
  font-weight: 700;
  color: #6b7280;
}

.in-mock-bar .url {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.in-mock-bar .install-ico {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: .4rem;
  background: var(--pastel-lilac);
  color: var(--primary-deep);
  display: grid;
  place-items: center;
  flex: none;
  animation: in-pulse 1.6s ease-in-out infinite;
}

.in-mock-bar .install-ico svg { width: .9rem; height: .9rem; }

.in-mock-dialog {
  margin-top: .75rem;
  background: #fff;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 10px 28px -16px rgba(26,26,46,.3);
  text-align: center;
}

.in-mock-dialog img {
  width: 3rem;
  height: 3rem;
  border-radius: .85rem;
  margin: 0 auto .55rem;
}

.in-mock-dialog .name {
  font-weight: 900;
  font-size: .95rem;
}

.in-mock-dialog .host {
  font-size: .75rem;
  color: #9ca3af;
  font-weight: 700;
  margin: .15rem 0 .85rem;
}

.in-mock-dialog .btns {
  display: flex;
  gap: .5rem;
  justify-content: center;
}

.in-mock-dialog .btns span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  height: 2.15rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: .85rem;
}

.in-mock-dialog .btns .cancel {
  background: #f3f4f6;
  color: #6b7280;
}

.in-mock-dialog .btns .ok {
  background: var(--primary);
  color: #fff;
}

.in-mock-share {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.in-mock-share .row {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .65rem .75rem;
  border-radius: .85rem;
  background: #fff;
  font-weight: 800;
  font-size: .88rem;
  box-shadow: 0 2px 8px -4px rgba(0,0,0,.1);
}

.in-mock-share .row.hi {
  outline: 2px solid var(--primary);
  background: color-mix(in srgb, var(--pastel-lilac) 55%, #fff);
  animation: in-pulse 1.6s ease-in-out infinite;
}

.in-mock-share .row .glyph {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: .5rem;
  background: var(--brand-100);
  display: grid;
  place-items: center;
  color: var(--primary-deep);
  flex: none;
}

.in-mock-share .row .glyph svg { width: 1rem; height: 1rem; }

.in-actions {
  margin-top: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.in-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  height: 3.1rem;
  border-radius: 999px;
  font-weight: 900;
  font-size: 1rem;
  transition: transform .2s, box-shadow .2s;
}

.in-btn:hover { transform: translateY(-2px); }

.in-btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--primary) 55%, transparent);
}

.in-btn-primary.is-ready {
  box-shadow: 0 14px 32px -8px color-mix(in srgb, var(--primary) 70%, transparent);
}

.in-btn-primary:disabled {
  opacity: .7;
  transform: none;
  cursor: wait;
}

.in-btn-ghost {
  background: rgba(255,255,255,.8);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--brand-200);
  border: 0;
  cursor: pointer;
  width: 100%;
  text-decoration: none;
  font-family: inherit;
}

.in-feedback {
  margin: .35rem 0 0;
  text-align: center;
  font-size: .85rem;
  font-weight: 700;
  color: var(--primary-deep);
  min-height: 1.2em;
}

.in-switch {
  margin-top: 1.35rem;
  text-align: center;
}

.in-switch-label {
  margin: 0 0 .55rem;
  font-size: .8rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.in-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem;
}

.in-tab {
  padding: .45rem .85rem;
  border-radius: 999px;
  background: rgba(255,255,255,.75);
  box-shadow: 0 0 0 1px var(--brand-100);
  font-weight: 800;
  font-size: .8rem;
  color: var(--muted);
  transition: background .2s, color .2s, box-shadow .2s;
}

.in-tab.is-active {
  background: var(--primary);
  color: #fff;
  box-shadow: none;
}

.in-back {
  margin-top: 1.5rem;
  text-align: center;
}

.in-back a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 800;
  color: var(--primary-deep);
  font-size: .95rem;
}

.in-back a:hover { text-decoration: underline; }

@keyframes in-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 35%, transparent); }
  50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary) 0%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
  .in-mock-bar .install-ico,
  .in-mock-share .row.hi { animation: none; }
  .in-btn:hover { transform: none; }
}

/* —— CTA lên đầu —— */
.in-actions--top {
  order: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .65rem;
}
.in-actions--top .in-detect {
  margin: .15rem auto 0;
}
.in-banner-cta {
  flex: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  padding: .55rem 1rem;
  box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--primary) 70%, transparent);
}
.in-banner-cta.is-ready,
.in-btn-primary.is-ready {
  animation: in-pulse 1.4s ease-in-out infinite;
}
.in-card-banner .min-w-0 { min-width: 0; flex: 1; }

/* —— Visual mocks  —— */
.in-step { position: relative; }
.in-step:not(.is-last)::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 2rem;
  bottom: -1.2rem;
  width: 1px;
  background: var(--brand-200);
}
.in-viz {
  border-radius: 1rem;
  border: 1px solid var(--brand-100);
  background: #f5f3ff;
  overflow: hidden;
}
.in-viz .pulse { animation: in-pulse 1.5s ease-in-out infinite; }
.in-viz-ios-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 4rem;
  padding: 0 .75rem .65rem;
  background: linear-gradient(180deg, transparent 30%, #ebe8ff);
}
.in-viz-ios-bar .ghost {
  width: 1.15rem; height: 1.15rem;
  border-radius: .35rem;
  background: rgba(100,100,120,.18);
}
.in-viz-ios-bar .share {
  width: 2rem; height: 2rem;
  margin-bottom: .15rem;
  border-radius: .65rem;
  background: var(--pastel-lilac);
  color: var(--primary);
  display: grid; place-items: center;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 30%, transparent);
}
.in-viz-ios-bar .share svg { width: 1.15rem; height: 1.15rem; }

.in-viz-menu {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: .35rem .5rem;
}
.in-viz-menu--right { margin-left: auto; width: 82%; box-shadow: 0 10px 24px -16px rgba(0,0,0,.25); }
.in-viz-menu .dim {
  display: flex; align-items: center; gap: .65rem;
  padding: .55rem .65rem; opacity: .4;
}
.in-viz-menu .dim .box {
  width: 1.15rem; height: 1.15rem; border-radius: .35rem; background: #c4c4d4;
}
.in-viz-menu .dim .box.sm { width: 1rem; height: 1rem; }
.in-viz-menu .dim .line {
  height: .45rem; width: 5rem; border-radius: 999px; background: #c4c4d4;
}
.in-viz-menu .dim .line.short { width: 3.5rem; }
.in-viz-menu .hi {
  display: flex; align-items: center; gap: .65rem;
  padding: .55rem .65rem;
  border-radius: .65rem;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 0 0 1px rgba(0,0,0,.05);
  color: var(--primary);
  font-size: .78rem;
  font-weight: 800;
}
.in-viz-menu .hi svg { width: 1.15rem; height: 1.15rem; flex: none; }
.in-viz-menu .hi span { color: var(--ink); }

.in-viz-sheet .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; padding: .75rem 1rem;
  background: #f3f4f6; border-bottom: 1px solid #e5e7eb;
  font-size: .85rem; font-weight: 700;
}
.in-viz-sheet .bar em { color: var(--primary); font-style: normal; font-weight: 900; }
.in-viz-sheet .row {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1rem; background: #fff;
}
.in-viz-sheet .row img {
  width: 3rem; height: 3rem; border-radius: .85rem;
  border: 1px solid #e5e7eb; object-fit: cover;
}
.in-viz-sheet .row b { display: block; font-size: .9rem; }
.in-viz-sheet .row small { color: #9ca3af; font-size: .72rem; font-weight: 700; }

.in-viz-chrome {
  display: flex; align-items: center; gap: .5rem;
  height: 3.5rem; padding: 0 .75rem;
}
.in-viz-chrome .omnibox {
  flex: 1; height: 2rem; border-radius: 999px;
  background: rgba(100,100,120,.1); border: 1px solid rgba(0,0,0,.06);
  display: flex; align-items: center; gap: .45rem; padding: 0 .7rem;
}
.in-viz-chrome .omnibox i {
  width: .7rem; height: .7rem; border-radius: 999px; background: rgba(100,100,120,.25);
}
.in-viz-chrome .omnibox span {
  height: .45rem; width: 5rem; border-radius: 999px; background: rgba(100,100,120,.2);
}
.in-viz-chrome .dots {
  width: 2rem; height: 2rem; border-radius: .65rem;
  background: var(--pastel-lilac); color: var(--primary);
  display: grid; place-items: center;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 30%, transparent);
}
.in-viz-chrome .dots svg { width: 1.15rem; height: 1.15rem; transform: rotate(90deg); }

.in-viz-dialog {
  margin: .5rem; padding: 1.1rem 1.15rem;
  border-radius: .85rem; background: #fff;
  box-shadow: 0 16px 40px -20px rgba(0,0,0,.35);
}
.in-viz-dialog h3 { margin: 0 0 .85rem; font-size: 1.05rem; font-weight: 800; }
.in-viz-dialog .row {
  display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem;
}
.in-viz-dialog .row img {
  width: 2.25rem; height: 2.25rem; border-radius: 999px; object-fit: cover;
}
.in-viz-dialog .row b { display: block; font-size: .88rem; }
.in-viz-dialog .row small { color: #9ca3af; font-size: .72rem; font-weight: 700; }
.in-viz-dialog .btns {
  display: flex; justify-content: flex-end; gap: 1.35rem;
  font-size: .88rem; font-weight: 800;
}
.in-viz-dialog .btns span { color: #9ca3af; }
.in-viz-dialog .btns em { color: var(--primary); font-style: normal; }

.in-viz-desk .bar {
  display: flex; align-items: center; gap: .5rem;
  margin: .65rem; padding: .45rem .65rem;
  border-radius: .75rem; background: #fff;
  box-shadow: 0 2px 8px -4px rgba(0,0,0,.12);
  font-size: .72rem; font-weight: 700; color: #6b7280;
}
.in-viz-desk .url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.in-viz-desk .plus {
  width: 1.4rem; height: 1.4rem; border-radius: .4rem;
  background: var(--pastel-lilac); color: var(--primary-deep);
  display: grid; place-items: center;
}
.in-viz-desk .plus svg { width: .9rem; height: .9rem; }
