/* ==========================================================================
   DeMemos — inner pages (Patient side, Family side, AI, Activities, About)
   ========================================================================== */

/* ---------- Page hero ---------- */
.page-hero {
  padding: clamp(48px, 7vw, 96px) 0 clamp(48px, 7vw, 90px);
  text-align: center;
}
.page-hero h1 { max-width: 16ch; margin: 0 auto 24px; font-size: clamp(2.5rem, 5.8vw, 4.6rem); }
.page-hero .lead {
  max-width: 60ch;
  margin: 0 auto 36px;
  font-size: clamp(1.08rem, 1.5vw, 1.22rem);
  color: var(--muted);
}
.page-hero-visual {
  position: relative;
  max-width: 960px;
  margin: clamp(48px, 7vw, 80px) auto 0;
  text-align: left;
}
.hero-glow {
  position: absolute;
  inset: 8% 6%;
  z-index: -1;
  background: var(--grad);
  filter: blur(80px);
  opacity: 0.38;
  animation: breathe 9s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(0.95); opacity: 0.3; }
  50% { transform: scale(1.04); opacity: 0.46; }
}
.page-hero-visual .hud-chip--a { top: -7%; left: -3%; }
.page-hero-visual .hud-chip--b { bottom: 10%; right: -4%; animation-delay: -3.5s; }
@media (max-width: 700px) {
  .page-hero-visual .hud-chip { display: none; }
}

/* ---------- Phones in groups ---------- */
.phone-pair { display: flex; justify-content: center; gap: 20px; }
.phone-pair .device--phone { width: 50%; max-width: 260px; }
.phone-pair .device--phone:nth-child(2) { margin-top: 60px; }

.phone-fan {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(12px, 3vw, 36px);
}
.phone-fan .device--phone { width: 30%; max-width: 270px; }
.phone-fan .device--phone:nth-child(2) { margin-top: -30px; z-index: 1; }
.phone-fan .device--phone:nth-child(1) { transform: rotate(-4deg); margin-top: 40px; }
.phone-fan .device--phone:nth-child(3) { transform: rotate(4deg); margin-top: 40px; }

@media (max-width: 640px) {
  .phone-fan .device--phone:nth-child(1),
  .phone-fan .device--phone:nth-child(3) { display: none; }
  .phone-fan .device--phone:nth-child(2) { width: 78%; margin-top: 0; }
  .phone-pair { flex-direction: column; align-items: center; gap: 28px; }
  .phone-pair .device--phone { width: 78%; }
  .phone-pair .device--phone:nth-child(2) { margin-top: 0; }
}

/* ---------- Patient side: media badges and the Talk button ---------- */
.media-tag {
  position: absolute;
  top: 6%;
  left: 5%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.6cqw 1.2cqw;
  font-family: var(--font-mono);
  font-size: clamp(8px, 1.5cqw, 12px);
  letter-spacing: 0.08em;
  color: #fff;
  background: rgba(10, 14, 28, 0.7);
}
.media-tag::before { content: ""; width: 0.9cqw; height: 0.9cqw; min-width: 6px; min-height: 6px; background: var(--pink); animation: blink 1.4s steps(2) infinite; }
.wave,
.slide-caption .wave {
  display: flex;
  align-items: center;
  gap: 0.5cqw;
  height: 5cqw;
  margin-top: 1.2cqw;
}
.wave i {
  width: 0.7cqw;
  min-width: 3px;
  height: 30%;
  background: linear-gradient(to top, var(--teal), var(--pink));
  animation: meter 1.6s ease-in-out infinite;
}
.wave i:nth-child(odd) { animation-delay: -0.4s; }
.wave i:nth-child(3n) { animation-delay: -0.9s; }
.wave i:nth-child(4n) { animation-delay: -1.2s; }

.talk-btn {
  position: absolute;
  right: 5%;
  bottom: 8%;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 1.4cqw;
  padding: 1.8cqw 3cqw;
  font-family: var(--font-display);
  font-size: clamp(11px, 2.6cqw, 22px);
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}
.talk-btn::before {
  content: "";
  width: 2.4cqw;
  height: 2.4cqw;
  min-width: 10px;
  min-height: 10px;
  background: var(--grad);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  animation: blink 1.6s steps(2) infinite;
}
.talk-btn small {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.8cqw);
  font-family: var(--font-mono);
  font-size: clamp(7px, 1.3cqw, 11px);
  font-weight: 500;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: #ff8cc6;
}

/* Conversation bubbles on a screen */
.convo {
  position: absolute;
  inset: auto 5% 8% 5%;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 1.4cqw;
}
.convo p {
  max-width: 70%;
  margin: 0;
  padding: 1.6cqw 2.2cqw;
  font-size: clamp(10px, 2.3cqw, 19px);
  line-height: 1.35;
  opacity: 0;
  animation: bubble 9s var(--ease) infinite;
}
.convo p b { display: block; font-family: var(--font-mono); font-size: 0.6em; letter-spacing: 0.1em; opacity: 0.75; }
.convo .ai { align-self: flex-start; color: #fff; background: rgba(10, 14, 28, 0.86); border-left: 3px solid var(--sky); }
.convo .me { align-self: flex-end; color: var(--ink); background: #fff; border-right: 3px solid var(--teal); animation-delay: 1.4s; }
.convo .ai + .me + .ai { animation-delay: 2.8s; }
@keyframes bubble {
  0% { opacity: 0; transform: translateY(10px); }
  8%, 85% { opacity: 1; transform: none; }
  100% { opacity: 0; }
}

/* PIN pad */
.pin-screen {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background: rgba(10, 14, 28, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.pin-box {
  width: 44%;
  padding: 3.5cqw;
  text-align: center;
  background: #fff;
  clip-path: polygon(2cqw 0, 100% 0, 100% calc(100% - 2cqw), calc(100% - 2cqw) 100%, 0 100%, 0 2cqw);
}
.pin-box strong { display: block; font-family: var(--font-display); font-size: 3cqw; color: var(--ink); }
.pin-box small { display: block; margin-bottom: 1.6cqw; font-size: 1.6cqw; color: var(--muted); }
.pin-dots { display: flex; justify-content: center; gap: 1.4cqw; margin-bottom: 2cqw; }
.pin-dots i {
  width: 1.8cqw;
  height: 1.8cqw;
  border: 2px solid var(--blue);
  animation: pin-fill 4s infinite;
}
.pin-dots i:nth-child(2) { animation-delay: 0.3s; }
.pin-dots i:nth-child(3) { animation-delay: 0.6s; }
.pin-dots i:nth-child(4) { animation-delay: 0.9s; }
@keyframes pin-fill {
  0%, 15% { background: transparent; }
  25%, 85% { background: var(--blue); }
  100% { background: transparent; }
}
.pin-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1cqw; }
.pin-keys span {
  padding: 1cqw 0;
  font-family: var(--font-display);
  font-size: 2.2cqw;
  color: var(--ink);
  background: #eef1f8;
}

/* ---------- Device quad (TV, laptop, tablet, phone) ---------- */
.quad {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 0.45fr;
  align-items: end;
  gap: clamp(14px, 2.4vw, 30px);
}
.quad figure { margin: 0; }
.quad > figure > figcaption { margin-top: 18px; text-align: center; font-size: 0.9rem; color: var(--muted); }
.quad > figure > figcaption b { display: block; font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.1em; color: var(--ink); text-transform: uppercase; }
.quad .device--tv { margin-bottom: 24px; }
.quad .device--laptop { margin-bottom: 14px; }
.quad .device--tablet { padding: 7px; border-radius: 12px; }
.quad .device--phone { padding: 5px; border-radius: 20px; }
.quad .device--phone .device-screen { border-radius: 15px; container-type: inline-size; }
.quad .device--phone::before { top: 9px; height: 8px; }
.quad .device--phone .slide-dots { display: none; }
@media (max-width: 860px) {
  .quad { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .quad .device--phone { max-width: 120px; margin: 0 auto; }
}

/* ---------- Avatars ---------- */
.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  font-size: 9.5px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  clip-path: polygon(25% 0, 100% 0, 100% 75%, 75% 100%, 0 100%, 0 25%);
}
.avatar.is-pink { background: linear-gradient(135deg, var(--pink), #ff8a5c); }
.avatar.is-sky { background: linear-gradient(135deg, var(--sky), var(--pink)); }

/* ---------- More Family side app screens ---------- */
.app-search {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 7px 9px;
  color: var(--muted);
  background: #f3f5fa;
}
.app-search svg { width: 11px; height: 11px; }
.app-tabs { display: flex; gap: 14px; margin-bottom: 10px; font-weight: 600; color: var(--muted); }
.app-tabs .is-on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--blue); padding-bottom: 3px; }
.app-section { margin: 4px 0 7px; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.app-greet { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.app-greet small { display: block; color: var(--muted); font-size: 9px; }
.app-greet b { font-family: var(--font-display); font-size: 14px; font-weight: 600; }
.app-greet .avatar { width: 30px; height: 30px; font-size: 11px; }

.app-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 6px;
  padding: 6px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}
.app-row img { width: 40px; height: 34px; flex: none; object-fit: cover; }
.app-row div { flex: 1; min-width: 0; }
.app-row b { display: block; font-size: 10.5px; font-weight: 600; }
.app-row small { color: var(--muted); font-size: 9px; }
.app-row .tag {
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.04em;
  color: var(--blue);
  background: var(--blue-soft);
}

.app-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 4px; }
.app-tile { padding: 10px; color: #fff; background: linear-gradient(135deg, var(--teal), var(--blue)); }
.app-tile b { display: block; font-size: 11px; }
.app-tile small { font-size: 8.5px; opacity: 0.9; }
.app-tile:nth-child(2) { background: linear-gradient(135deg, var(--pink), #ff8a5c); }
.app-tile:nth-child(3) { grid-column: 1 / -1; background: linear-gradient(100deg, var(--sky), var(--pink)); }

.app-media { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 9px; }
.app-media span {
  padding: 7px 4px;
  text-align: center;
  font-size: 9px;
  font-weight: 600;
  background: #f3f5fa;
}
.app-media span i { display: block; margin-bottom: 2px; font-style: normal; font-size: 13px; }
.app-media .is-on { color: #fff; background: var(--ink); }

.app-seg { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 9px; box-shadow: inset 0 0 0 1px var(--line); }
.app-seg span { padding: 6px; text-align: center; font-size: 9.5px; font-weight: 600; color: var(--muted); }
.app-seg .is-on { color: #fff; background: var(--blue); }

.app-slot {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  margin-bottom: 6px;
  padding: 8px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  border-left: 3px solid var(--teal);
}
.app-slot:nth-of-type(2) { border-left-color: var(--sky); }
.app-slot:nth-of-type(3) { border-left-color: var(--pink); }
.app-slot time { font-family: var(--font-mono); font-size: 10px; font-weight: 600; color: var(--ink); }
.app-slot b { display: block; font-size: 10.5px; }
.app-slot small { color: var(--muted); font-size: 8.5px; }

.app-bars { display: flex; align-items: flex-end; gap: 5px; height: 70px; margin-bottom: 4px; padding: 6px 0; }
.app-bars i { flex: 1; background: linear-gradient(to top, var(--teal), var(--sky)); }
.app-bars-x { display: flex; justify-content: space-between; margin-bottom: 10px; font-family: var(--font-mono); font-size: 7.5px; color: var(--muted); }
.app-theme { display: grid; grid-template-columns: 48px 1fr 26px; align-items: center; gap: 6px; margin-bottom: 5px; font-size: 9.5px; }
.app-theme i { height: 6px; background: #eef1f8; position: relative; }
.app-theme i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--v); background: var(--grad); }
.app-theme em { font-style: normal; font-family: var(--font-mono); font-size: 8.5px; color: var(--muted); text-align: right; }

.app-note {
  margin-bottom: 6px;
  padding: 8px 9px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}
.app-note header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.app-note header b { font-size: 10px; font-weight: 600; }
.app-note header small { margin-left: auto; color: var(--muted); font-size: 8.5px; }
.app-note p { margin: 0; font-size: 10px; color: var(--ink-2); }
.app-note.is-fav { box-shadow: inset 0 0 0 1px rgba(255, 79, 163, 0.35); border-left: 3px solid var(--pink); }

.app-notif {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--line);
}
.app-notif i {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  font-style: normal;
  font-size: 11px;
  color: var(--blue);
  background: var(--blue-soft);
}
.app-notif.is-ai i { color: #fff; background: linear-gradient(135deg, var(--sky), var(--pink)); }
.app-notif div { flex: 1; }
.app-notif b { display: block; font-size: 10.5px; font-weight: 500; }
.app-notif small { color: var(--muted); font-size: 9px; }
.app-notif.is-new b { font-weight: 700; }
.app-notif.is-new::after { content: ""; width: 6px; height: 6px; background: var(--pink); }

.app-profile { text-align: center; margin-bottom: 12px; }
.app-profile .avatar { width: 50px; height: 50px; margin-bottom: 6px; font-size: 17px; }
.app-profile b { display: block; font-family: var(--font-display); font-size: 13px; font-weight: 600; }
.app-profile small { color: var(--muted); font-size: 9px; }
.app-list { box-shadow: inset 0 0 0 1px var(--line); }
.app-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 10.5px;
}
.app-list div:last-child { border: 0; }
.app-list div::after { content: "›"; color: var(--muted); font-size: 13px; }
.app-list div.is-danger { color: #d0365b; }
.app-list div.is-danger::after { content: ""; }

.app--login { justify-content: center; text-align: center; background: linear-gradient(180deg, #e6fbfc 0%, #fff 50%, #f3eeff 100%); }
.app--login .logo-mark { width: 50px; height: 50px; margin: 0 auto 10px; }
.app--login h4 { margin: 0 0 2px; font-size: 18px; }
.app--login > small { display: block; margin-bottom: 18px; color: var(--muted); }
.app--login .app-field { text-align: left; }
.app-social { margin-top: 8px; padding: 9px; font-weight: 600; background: #fff; box-shadow: inset 0 0 0 1px var(--line-strong); }
.app-link { margin-top: 10px; color: var(--blue); font-size: 10px; font-weight: 600; }

.app--setup { background: linear-gradient(180deg, #f3eeff 0%, #fff 40%); }
.app-progress { display: flex; gap: 3px; margin-bottom: 14px; }
.app-progress i { flex: 1; height: 3px; background: #e3e7f0; }
.app-progress i.is-on { background: var(--grad); }
.app-step { font-family: var(--font-mono); color: var(--blue); font-size: 8.5px; letter-spacing: 0.1em; text-transform: uppercase; }
.app-q { margin: 4px 0 6px; font-family: var(--font-display); font-size: 16px; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
.app-hint { margin-bottom: 12px; color: var(--muted); font-size: 10px; }
.app-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 8px 9px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}
.app-option::before { content: ""; flex: none; width: 11px; height: 11px; box-shadow: inset 0 0 0 1.5px #b9c2d3; }
.app-option.is-on { background: var(--blue-soft); box-shadow: inset 0 0 0 1.5px var(--blue); font-weight: 600; }
.app-option.is-on::before { background: var(--blue); box-shadow: none; }

.app-toast {
  position: absolute;
  left: 50%;
  bottom: 18%;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  color: #fff;
  background: var(--night);
  transform: translateX(-50%);
  animation: toast 6s var(--ease) infinite;
}
.app-toast::before { content: "✓"; display: grid; place-items: center; width: 18px; height: 18px; color: var(--night); background: #8fe9ee; }
@keyframes toast {
  0%, 45% { opacity: 0; transform: translate(-50%, 12px); }
  55%, 90% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 0); }
}

/* ---------- Roles table ---------- */
.roles { max-width: 900px; margin: 0 auto; }
.roles table { width: 100%; border-collapse: collapse; }
.roles th,
.roles td { padding: 15px 20px; text-align: center; border-bottom: 1px solid var(--line); }
.roles th:first-child,
.roles td:first-child { text-align: left; }
.roles thead th { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); }
.roles tbody tr:last-child td { border-bottom: 0; }
.roles .yes { color: #00939b; font-weight: 700; }
.roles .no { color: #9fbfc2; }
@media (max-width: 600px) { .roles th, .roles td { padding: 12px 8px; font-size: 0.86rem; } }

/* ---------- Activities: tablet game screens ---------- */
.game {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 6%;
  padding: 6%;
  background: linear-gradient(135deg, #e9fbfc 0%, #fff 50%, #f5efff 100%);
}
.game-photo { height: 100%; overflow: hidden; }
.game-photo img { width: 100%; height: 100%; object-fit: cover; }
.game-q { margin-bottom: 8%; font-family: var(--font-display); font-size: 5.4cqw; font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; color: var(--ink); }
.game-options { display: grid; gap: 1.4cqw; }
.game-options span {
  padding: 2.2cqw;
  text-align: center;
  font-family: var(--font-display);
  font-size: 3.2cqw;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  box-shadow: inset 0 0 0 2px #dfe4ee;
}
.game-options .is-right { animation: right-answer 6s ease-in-out infinite; }
@keyframes right-answer {
  0%, 35% { color: var(--ink); background: #fff; box-shadow: inset 0 0 0 2px #dfe4ee; }
  45%, 90% { color: #fff; background: var(--blue); box-shadow: 0 0 0 4px rgba(61, 123, 255, 0.25), 0 12px 30px -8px rgba(61, 123, 255, 0.7); }
  100% { color: var(--ink); background: #fff; }
}
.game-bravo {
  position: absolute;
  left: 50%;
  top: 7%;
  z-index: 3;
  padding: 1.3cqw 3cqw;
  font-family: var(--font-display);
  font-size: 2.6cqw;
  font-weight: 600;
  white-space: nowrap;
  color: #fff;
  background: linear-gradient(100deg, var(--sky), var(--pink));
  transform: translateX(-50%);
  animation: bravo 6s var(--ease) infinite;
}
@keyframes bravo {
  0%, 42% { opacity: 0; transform: translate(-50%, -10px); }
  50%, 88% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; }
}

/* Music player */
.player {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 6%;
  padding: 6%;
  color: #fff;
  background: radial-gradient(circle at 20% 30%, rgba(0, 194, 203, 0.5), transparent 55%),
    radial-gradient(circle at 85% 80%, rgba(255, 79, 163, 0.5), transparent 55%), var(--night);
}
.player-art {
  position: relative;
  aspect-ratio: 1;
  background: conic-gradient(from 210deg, var(--teal), var(--blue), var(--sky), var(--pink), var(--teal));
  clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%);
  overflow: hidden;
}
.player-art::after {
  content: "♪";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12cqw;
  color: rgba(255, 255, 255, 0.9);
}
.player-info small { display: block; font-family: var(--font-mono); font-size: 1.6cqw; opacity: 0.7; letter-spacing: 0.1em; }
.player-info strong { display: block; margin: 6px 0 2px; font-family: var(--font-display); font-size: 5.6cqw; font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; }
.player-info span { font-size: 2.6cqw; opacity: 0.85; }
.player-bar { position: relative; height: 0.7cqw; min-height: 3px; margin: 10% 0 6px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
.player-bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--grad);
  animation: progress 20s linear infinite;
}
@keyframes progress { to { width: 100%; } }
.player-times { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 1.6cqw; opacity: 0.7; }
.player-controls { display: flex; align-items: center; justify-content: center; gap: 12%; margin-top: 8%; }
.player-controls span { font-size: 2.8cqw; opacity: 0.8; }
.player-controls .play {
  display: grid;
  place-items: center;
  width: 10cqw;
  height: 10cqw;
  color: var(--ink);
  background: #fff;
  opacity: 1;
  clip-path: polygon(22% 0, 78% 0, 100% 22%, 100% 78%, 78% 100%, 22% 100%, 0 78%, 0 22%);
}
.player-controls .play svg { width: 40%; height: 40%; }

.songs { margin: 22px 0 0; padding: 0; list-style: none; }
.songs li { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); }
.songs li::before {
  content: "♪";
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
}
.songs li:nth-child(2)::before { background: linear-gradient(135deg, var(--sky), var(--pink)); }
.songs li:nth-child(3)::before { background: linear-gradient(135deg, var(--pink), #ff8a5c); }
.songs b { display: block; color: var(--ink); font-weight: 600; }
.songs small { color: var(--muted); }
.fineprint { margin-top: 16px; font-size: 0.86rem; color: var(--muted); }

/* ---------- AI page ---------- */
/* Live camera "view" with a wireframe face and tracking readouts */
.cam {
  position: relative;
  aspect-ratio: 4 / 3;
  background: radial-gradient(circle at 50% 40%, #0b6a72, #03323a 70%);
  overflow: hidden;
  container-type: inline-size;
  clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
}
.cam svg.face {
  position: absolute;
  left: 50%;
  top: 53%;
  width: 46%;
  transform: translate(-50%, -50%);
  animation: head 8s ease-in-out infinite;
}
@keyframes head {
  0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
  25% { transform: translate(-46%, -51%) rotate(3deg); }
  60% { transform: translate(-54%, -49%) rotate(-4deg); }
}
.cam .track { animation: head-box 8s ease-in-out infinite; }
@keyframes head-box {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(4%, -1%); }
  60% { transform: translate(-4%, 1%); }
}
.cam-read {
  position: absolute;
  left: 4%;
  bottom: 5%;
  display: grid;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: clamp(9px, 2.2cqw, 13px);
  color: #8fe9ee;
}
.cam-read span b { color: #fff; font-weight: 500; }
.cam-rec {
  position: absolute;
  top: 5%;
  right: 4%;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: clamp(9px, 2cqw, 12px);
  color: #fff;
}
.cam-rec::before { content: ""; width: 8px; height: 8px; background: var(--pink); animation: blink 1.2s steps(2) infinite; }
.cam-note {
  position: absolute;
  top: 5%;
  left: 4%;
  font-family: var(--font-mono);
  font-size: clamp(8px, 1.8cqw, 11px);
  color: #8cc6c9;
}

/* Engine diagram: inputs → AI → outputs */
.engine {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(16px, 4vw, 48px);
}
.engine-col { display: grid; gap: 10px; }
.engine-col h4 {
  margin: 0 0 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8cc6c9;
}
.engine-item {
  position: relative;
  padding: 14px 16px;
  color: #dff7f7;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.engine-item b { display: block; color: #fff; font-weight: 600; }
.engine-item small { color: #8cc6c9; }
.engine-col--in .engine-item { border-left: 3px solid var(--teal); }
.engine-col--out .engine-item { border-right: 3px solid var(--pink); }
.engine-core {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(150px, 18vw, 210px);
  aspect-ratio: 1;
  text-align: center;
  color: #fff;
  background: #04363d;
  clip-path: polygon(22% 0, 78% 0, 100% 22%, 100% 78%, 78% 100%, 22% 100%, 0 78%, 0 22%);
}
.engine-core::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 0deg, var(--teal), var(--blue), var(--sky), var(--pink), var(--teal));
  opacity: 0.55;
  animation: spin 7s linear infinite;
}
.engine-core::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: #04363d;
  clip-path: polygon(22% 0, 78% 0, 100% 22%, 100% 78%, 78% 100%, 22% 100%, 0 78%, 0 22%);
}
.engine-core span { position: relative; z-index: 1; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; color: #8cc6c9; }
.engine-core b { display: block; font-family: var(--font-display); font-size: 2.6rem; letter-spacing: -0.03em; color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 860px) {
  .engine { grid-template-columns: 1fr; justify-items: center; }
  .engine-col { width: 100%; max-width: 480px; }
}

/* Theme chart */
.themes { padding: clamp(24px, 4vw, 40px); }
.themes h3 { margin-bottom: 4px; }
.themes > p { color: var(--muted); font-size: 0.95rem; }
.theme-row {
  display: grid;
  grid-template-columns: 110px 1fr 54px;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}
.theme-row i { position: relative; height: 10px; background: rgba(8, 50, 58, 0.08); }
.theme-row i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--v);
  background: var(--grad);
}
.theme-row em { font-style: normal; font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink); text-align: right; }

/* Roadmap */
.roadmap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 2px solid transparent;
  border-image: var(--grad) 1;
}
.roadmap > div { position: relative; padding: 30px 26px 0 0; }
.roadmap > div::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  width: 14px;
  height: 14px;
  background: var(--teal);
  transform: rotate(45deg);
}
.roadmap > div:nth-child(2)::before { background: var(--sky); }
.roadmap > div:nth-child(3)::before { background: var(--pink); }
.roadmap span { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; color: var(--link); }
.roadmap h3 { margin: 8px 0 10px; }
.roadmap p { color: var(--muted); margin: 0; }
@media (max-width: 760px) {
  .roadmap { grid-template-columns: 1fr; border-top: 0; border-left: 2px solid var(--sky); border-image: none; }
  .roadmap > div { padding: 0 0 30px 26px; }
  .roadmap > div::before { top: 4px; left: -8px; }
}

/* ---------- About ---------- */
.story {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.story-card { padding: clamp(28px, 4vw, 44px); }
.story-card .avatar { width: 60px; height: 60px; margin-bottom: 18px; font-size: 1.2rem; }
.story-card h3 { margin-bottom: 4px; }
.story-card .role { margin-bottom: 18px; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--link); }
.story-card p { color: var(--muted); }
.story-email { color: var(--ink); font-weight: 500; border-bottom: 1px solid var(--line-strong); transition: color 0.3s, border-color 0.3s; }
.story-email:hover { color: var(--link); border-color: var(--link); }
.story-copy p { font-size: 1.1rem; }
.story-copy h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
@media (max-width: 860px) { .story { grid-template-columns: 1fr; } }

.timeline { margin: 28px 0 0; padding: 0; list-style: none; border-left: 2px solid var(--line-strong); }
.timeline li { position: relative; margin: 0 0 22px; padding-left: 26px; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 7px;
  width: 12px;
  height: 12px;
  background: var(--grad);
  transform: rotate(45deg);
}
.timeline b { display: block; color: var(--ink); }
.timeline span { color: var(--muted); }

.faq { max-width: 840px; margin: 0 auto; }
.faq details { margin-bottom: 10px; }
.faq summary {
  position: relative;
  padding: 20px 60px 20px 24px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: #fff;
  background: var(--ink);
  transform: translateY(-50%);
  transition: transform 0.4s var(--ease), background 0.3s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); background: var(--blue); }
.faq details p { margin: 0; padding: 0 24px 22px; color: var(--muted); }
