:root {
  color-scheme: light;
  --ink: #111111;
  --paper: #fafafa;
  --card: #ffffff;
  --muted: #737373;
  --line: rgba(17, 17, 17, 0.1);
  --mint: #20c5a8;
  --green: #08806b;
  --sun: #ffcc4d;
  --coral: #ff5d5d;
  --blue: #2764ff;
  --shadow: rgba(0, 0, 0, 0.12);
  --soft-shadow: 0 18px 54px rgba(0, 0, 0, 0.08);
  --radius: 8px;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfffc 38%, #fffaf0 73%, #f5f5f5 100%);
}

body.creating { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; letter-spacing: 0; }

.shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 250, 250, 0.86);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand, .nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  font-size: 1.05rem;
  font-weight: 900;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: conic-gradient(from 200deg, #ffcc4d, #ff5d5d, #2764ff, #20c5a8, #ffcc4d);
  box-shadow: inset 0 0 0 6px #fff, 0 1px 10px var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.button, .nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font-weight: 800;
  padding: 0 14px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.button.primary {
  background: var(--ink);
  color: var(--card);
  border-color: var(--ink);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.button.sun {
  background: linear-gradient(135deg, #ffcc4d, #20c5a8);
  color: #111;
  border-color: rgba(17, 17, 17, 0.18);
  box-shadow: 0 14px 34px rgba(32, 197, 168, 0.16);
}

.button.ghost {
  background: rgba(18, 32, 29, 0.05);
}

.button.locked {
  background: rgba(18, 32, 29, 0.08);
  color: #697570;
  cursor: not-allowed;
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

.button:hover, .nav a:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

.button:active, .nav a:active { transform: translateY(0); }

main > section { display: none; }
body.mode-home #homeView,
body.mode-nsite #nsiteView,
body.mode-cms #crmView,
body.mode-target #targetView { display: block; }

.home-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.84fr) minmax(340px, 0.58fr);
  gap: clamp(22px, 5vw, 72px);
  align-items: center;
  padding: clamp(24px, 5vw, 58px) 0 54px;
}

.hero {
  min-height: calc(100vh - 128px);
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 0;
}

.hero-copy {
  animation: rise-in 0.62s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

h1, h2, h3, p { margin: 0; }

h1 {
  max-width: 620px;
  font-size: clamp(2.45rem, 6.5vw, 5rem);
  line-height: 0.96;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1;
}

.lead {
  max-width: 540px;
  margin-top: 14px;
  color: #454545;
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  font-weight: 560;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.proof-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: #333;
  padding: 0 10px;
  font-size: 0.82rem;
  font-weight: 820;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.045);
}

.proof-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(32, 197, 168, 0.13);
}

.flow-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
  max-width: 760px;
}

.flow-step {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.055);
}

.flow-step span {
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 930;
  text-transform: uppercase;
}

.flow-step strong {
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
}

.form {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 12% 4%, rgba(32, 197, 168, 0.16), transparent 30%),
    radial-gradient(circle at 92% 16%, rgba(255, 204, 77, 0.13), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.44));
}

label {
  display: grid;
  gap: 8px;
  color: #4a4a4a;
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-shell {
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius);
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, rgba(255, 204, 77, 0.34), rgba(39, 100, 255, 0.2), rgba(32, 197, 168, 0.25)) border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 30px rgba(0, 0, 0, 0.035);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.field-shell:focus-within {
  transform: translateY(-1px);
  border-color: rgba(39, 100, 255, 0.42);
  box-shadow: 0 0 0 4px rgba(39, 100, 255, 0.1), 0 18px 38px rgba(0, 0, 0, 0.08);
}

.owner-login-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.owner-login-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(32, 197, 168, 0.28);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 4% 0%, rgba(32, 197, 168, 0.18), transparent 38%),
    linear-gradient(135deg, rgba(32, 197, 168, 0.11), rgba(255, 204, 77, 0.12)),
    rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.045);
}

.owner-login-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 920;
  text-transform: uppercase;
}

.owner-login-title strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.owner-login-title strong::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: 0 0 0 5px rgba(32, 197, 168, 0.14);
}

.help-button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 940;
  line-height: 1;
}

.help-button:hover,
.help-button[aria-expanded="true"] {
  background: var(--ink);
  color: #fff;
}

.owner-help-box {
  display: none;
  gap: 9px;
  padding: 13px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 690;
  line-height: 1.45;
  text-transform: none;
}

.owner-help-box.show {
  display: grid;
}

.owner-help-box b {
  font-weight: 920;
}

.owner-help-box span {
  color: var(--muted);
}

.owner-login-note {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
  line-height: 1.35;
  text-transform: none;
}

.optional {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 720;
  text-transform: none;
}

input, textarea, select {
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  outline: none;
  font-weight: 650;
}

input, select {
  min-height: 50px;
  padding: 0 14px;
}

textarea {
  min-height: 132px;
  resize: vertical;
  padding: 13px 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#sourceUrls {
  font-size: 0.92rem;
  font-weight: 720;
}

input:focus, textarea:focus, select:focus {
  box-shadow: none;
}

input::placeholder, textarea::placeholder {
  color: #8c8c8c;
}

.status {
  min-height: 22px;
  color: var(--green);
  font-weight: 850;
}

.error { color: #a7362a; }

.credential-box {
  display: none;
  gap: 14px;
  padding: 18px;
  border-top: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
}

.credential-box.show { display: grid; }

.progress-card {
  display: none;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.progress-card.show { display: grid; }

.progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 850;
}

.progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
}

.progress-fill {
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2764ff, #20c5a8);
  transition: width 0.35s ease;
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.68), transparent);
  animation: shimmer 1.15s linear infinite;
}

.progress-steps {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 690;
}

.progress-steps span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-steps span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
}

.progress-steps span.done {
  color: var(--ink);
}

.progress-steps span.done::before {
  background: var(--green);
}

.result-card {
  display: none;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f7f7f7);
}

.result-card.show { display: grid; }

.result-head {
  display: grid;
  gap: 4px;
}

.result-head strong {
  font-size: 1.35rem;
  line-height: 1.05;
}

.result-head span {
  color: var(--muted);
  font-weight: 680;
}

.result-links {
  display: grid;
  gap: 10px;
}

.result-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.result-preview {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.06);
}

.result-preview:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.1);
}

.preview-shot {
  position: relative;
  min-height: 136px;
  background:
    linear-gradient(135deg, rgba(32, 197, 168, 0.18), rgba(255, 204, 77, 0.16)),
    #f8f8f8;
  overflow: hidden;
}

.preview-shot img {
  width: 100%;
  height: 136px;
  object-fit: cover;
  display: block;
}

.preview-shot.profile {
  display: grid;
  place-items: center;
  min-height: 136px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 204, 77, 0.24), transparent 34%),
    radial-gradient(circle at 78% 18%, rgba(32, 197, 168, 0.22), transparent 34%),
    linear-gradient(180deg, #111, #252525);
}

.profile-avatar-preview {
  width: 74px;
  height: 74px;
  border: 4px solid #fff;
  border-radius: 22px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.preview-body {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.preview-label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.preview-title {
  overflow: hidden;
  font-size: 1rem;
  font-weight: 940;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-url {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-action-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.change-profile-button {
  justify-content: center;
}

.result-qr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.result-qr-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.06);
}

.result-qr-card img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
}

.result-qr-copy {
  display: grid;
  gap: 4px;
  text-align: center;
}

.result-qr-copy strong {
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.result-qr-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qr-brand {
  min-height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #111;
  border-radius: 10px;
  background: #111;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.result-link {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.result-link.primary {
  background: #111;
  color: #fff;
  border-color: #111;
}

.result-link span:first-child {
  color: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.result-link strong {
  overflow: hidden;
  font-size: 1.03rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.more-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.more-button {
  width: 44px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
}

.owner-key {
  display: none;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.owner-key.show { display: grid; }

.secret {
  padding: 12px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.05);
  overflow-wrap: anywhere;
  font-weight: 860;
  color: var(--ink);
}

.link-list {
  display: grid;
  gap: 8px;
}

.link-list a {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.035);
}

.panel .link-list a {
  border-color: var(--line);
  background: rgba(18, 32, 29, 0.035);
}

.link-title {
  color: inherit;
  font-size: 0.77rem;
  font-weight: 930;
  text-transform: uppercase;
}

.link-url {
  overflow: hidden;
  color: inherit;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.identity-card img {
  width: 54px;
  height: 54px;
  border-radius: var(--radius);
  object-fit: cover;
  background: rgba(255, 255, 255, 0.1);
}

.identity-card strong,
.identity-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone {
  position: sticky;
  top: 18px;
  width: 100%;
  max-width: 430px;
  justify-self: center;
  min-height: 720px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 34px;
  background: #111;
  padding: 10px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.24);
  animation: phone-float 5s ease-in-out infinite;
}

.screen {
  position: relative;
  min-height: 698px;
  border-radius: 26px;
  overflow: hidden;
  background: var(--card);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}

.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 0 40%, rgba(255, 255, 255, 0.18) 50%, transparent 60% 100%);
  opacity: 0;
  transform: translateX(-70%);
}

.screen.switching::after {
  animation: phone-sheen 0.62s ease;
}

.screen-head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 180px;
  padding: 14px;
  background: #111;
  border-bottom: 1px solid var(--line);
  color: #fff;
  background-position: center;
  background-size: cover;
  transition: background-image 0.35s ease, filter 0.35s ease;
}

.screen-head::before,
.screen-head::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--hero-current, linear-gradient(135deg, #f6cf58, #20c5a8));
  background-position: var(--hero-position, center);
  background-size: cover;
}

.screen-head::after {
  z-index: 0;
  opacity: 0;
  background-image: var(--hero-next, var(--hero-current));
  transform: scale(1.035);
}

.screen-head > * {
  position: relative;
  z-index: 1;
}

.screen.transitioning .screen-head::before {
  animation: hero-drift-out 0.82s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.screen.transitioning .screen-head::after {
  animation: hero-drift-in 0.82s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.screen.transitioning .screen-head h2,
.screen.transitioning .screen-head p,
.screen.transitioning .avatar,
.screen.transitioning .profile-stats,
.screen.transitioning .profile-actions,
.screen.transitioning .story-row,
.screen.transitioning .screen-caption {
  animation: content-slide-in 0.54s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.screen.transitioning .avatar { animation-delay: 0.02s; }
.screen.transitioning .screen-head h2 { animation-delay: 0.05s; }
.screen.transitioning .screen-head p { animation-delay: 0.08s; }
.screen.transitioning .profile-stats { animation-delay: 0.1s; }
.screen.transitioning .profile-actions { animation-delay: 0.14s; }
.screen.transitioning .story-row { animation-delay: 0.18s; }
.screen.transitioning .screen-caption { animation-delay: 0.24s; }

.screen-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #111;
  padding: 0 9px;
  font-size: 0.72rem;
  font-weight: 850;
}

.avatar {
  width: 86px;
  height: 86px;
  margin-top: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    linear-gradient(135deg, #ffcc4d, #ff5d5d, #2764ff, #20c5a8);
  color: #fff;
  font-size: 2rem;
  font-weight: 950;
  border: 4px solid #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}

.screen-head h2 {
  margin-top: 12px;
  font-size: 1.65rem;
}

.screen-head p {
  max-width: 330px;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.94rem;
  font-weight: 650;
}

.screen-body {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px;
}

.screen-caption {
  min-height: 46px;
  color: #4d4d4d;
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.25;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.profile-stats strong,
.profile-stats span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-stats strong {
  font-size: 1.1rem;
  font-weight: 900;
}

.profile-stats span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 0 14px 14px;
}

.profile-action {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f1f1f1;
  color: var(--ink);
  font-weight: 850;
}

.profile-action.pay {
  background: #111;
  color: #fff;
  border-color: #111;
}

.profile-action.primary-tone {
  background: var(--slide-accent, #111);
  color: var(--slide-action-ink, #111);
  border-color: rgba(0, 0, 0, 0.12);
}

.story-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0 14px 14px;
  border-bottom: 1px solid var(--line);
}

.story {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  color: #555;
  font-size: 0.7rem;
  font-weight: 750;
  text-align: center;
}

.story span:first-child {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 1.2rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  perspective: 900px;
}

.post-grid img,
.post-grid .qr-tile,
.post-tile {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #eee;
  transition: transform 0.24s ease, filter 0.24s ease;
}

.post-grid img:hover,
.post-tile:hover {
  transform: scale(1.025);
  filter: saturate(1.08);
}

.post-tile {
  display: grid;
  align-content: end;
  min-width: 0;
  overflow: hidden;
  padding: 8px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.05;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.24);
  background:
    radial-gradient(circle at var(--x, 28%) var(--y, 26%), rgba(255, 255, 255, 0.72), transparent 0 14%, transparent 15%),
    linear-gradient(135deg, var(--a, #20c5a8), var(--b, #2764ff));
  background-position: center;
  background-size: cover;
}

.post-tile.light {
  color: #111;
  text-shadow: none;
}

.post-tile.image-tile {
  justify-content: start;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45);
}

.post-tile::before {
  content: "";
  width: 34px;
  height: 34px;
  align-self: start;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    42px 16px 0 rgba(255, 255, 255, 0.2),
    12px 58px 0 rgba(255, 255, 255, 0.16);
}

.post-tile.image-tile::before {
  display: none;
}

.screen.transitioning .post-tile,
.screen.transitioning .qr-tile {
  animation: tile-cascade 0.62s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.screen.transitioning #homeTile1 { animation-delay: 0.12s; }
.screen.transitioning #homeTile2 { animation-delay: 0.16s; }
.screen.transitioning .qr-tile { animation-delay: 0.2s; }
.screen.transitioning #homeTile3 { animation-delay: 0.24s; }
.screen.transitioning #homeTile4 { animation-delay: 0.28s; }
.screen.transitioning #homeTile5 { animation-delay: 0.32s; }

.qr-tile {
  display: grid;
  place-items: center;
  padding: 12px;
}

.qr-tile img {
  width: 86%;
  max-width: 110px;
  image-rendering: pixelated;
}

.slide-dots {
  position: absolute;
  right: 22px;
  bottom: 18px;
  display: flex;
  gap: 7px;
  z-index: 3;
}

.slide-dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.22);
  cursor: pointer;
  padding: 0;
  transition: width 0.2s ease, background 0.2s ease;
}

.slide-dot.active {
  width: 24px;
  background: var(--slide-accent, #111);
}

.slide-dot.active::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.48);
  transform-origin: left center;
  animation: dot-load 3.6s linear;
}

.qr-box {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(244, 186, 79, 0.12), rgba(91, 200, 183, 0.12)),
    #fff;
  overflow: hidden;
}

.qr-box img {
  width: min(74%, 260px);
  height: auto;
  image-rendering: pixelated;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.screen-action {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-weight: 900;
  background: rgba(18, 32, 29, 0.04);
  text-align: center;
}

.screen-action.zap { background: var(--sun); }
.screen-action.pay { background: var(--mint); }

.experience-button {
  width: min(520px, 100%);
  min-height: 62px;
  justify-self: start;
  border-color: #111;
  background:
    linear-gradient(135deg, #111, #2c2c2c);
  color: #fff;
  font-size: 1.02rem;
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.18);
  animation: rise-in 0.72s 0.16s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.experience-button::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sun), var(--mint));
  box-shadow: 0 0 0 6px rgba(255, 204, 77, 0.14);
}
