.hero .stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 0;
}

.hero {
  overflow: visible;
  padding-bottom: 28px;
}

.demo-phone {
  --bg: #fff7f2;
  --card: #ffffff;
  --ink: #2f2c38;
  --muted: #857e94;
  --line: #f1e7e2;
  --accent: #6a56c8;
  --mint: #e7f7f3;
  --mint-ink: #1d6b60;
  --rose: #ffb3c7;
  width: min(340px, 100%);
  height: min(640px, calc(100dvh - var(--header) - 132px));
  padding: 10px;
  border-radius: 40px;
  background: #1e2138;
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}

.demo-phone[data-theme="dark"] {
  --bg: #1c1e2e;
  --card: #252839;
  --ink: #f2effa;
  --muted: #a09db5;
  --line: #353950;
  --accent: #b794ff;
  --mint: #1f4a45;
  --mint-ink: #8fe3cf;
  --rose: #ff8fb1;
}

.demo-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 32px;
  background: var(--bg);
  color: var(--ink);
}

.demo-status,
.demo-tabs {
  flex: none;
}

.demo-status {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px 0;
  font-size: 12px;
  font-weight: 600;
}

.demo-viewport {
  position: relative;
  flex: 1;
  min-height: 0;
}

.demo-pane {
  position: absolute;
  inset: 0;
  overflow: auto;
  padding: 6px 14px 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    visibility 0s linear 0.28s;
  scrollbar-width: none;
}

.demo-pane::-webkit-scrollbar {
  display: none;
}

.demo-pane.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
}

.demo-phone .phone-name {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  color: var(--ink);
}

.demo-hello,
.demo-date,
.demo-muted {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.demo-date {
  margin: 4px 0 12px;
}

.demo-h2 {
  margin: 2px 0 12px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}

.demo-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(74, 74, 86, 0.06);
}

.demo-card + .demo-card,
.demo-chips,
.demo-duo,
.demo-ask,
.demo-replay {
  margin-top: 10px;
}

.demo-card-h {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-card-h em {
  color: var(--accent);
  font-style: normal;
  letter-spacing: 0;
  text-transform: none;
}

.demo-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-list li {
  display: flex;
  gap: 12px;
  align-items: center;
  max-height: 40px;
  padding: 7px 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  opacity: 1;
  transition:
    max-height 0.45s ease,
    opacity 0.35s ease,
    padding 0.45s ease;
}

.demo-list li:first-child {
  border-top: 0;
}

.demo-list time {
  min-width: 46px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.demo-list li.is-gone {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-color: transparent;
  opacity: 0;
}

.demo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.demo-chip,
.demo-choice,
.demo-tab,
.demo-ask,
.demo-replay,
.demo-switch,
.demo-theme button,
.demo-week button,
.demo-dot,
.demo-cal button {
  font: inherit;
  cursor: pointer;
}

.demo-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
}

.demo-chip:active {
  transform: scale(0.96);
}

.demo-chip[aria-pressed="true"] {
  border-color: transparent;
  background: var(--mint);
  color: var(--mint-ink);
}

.demo-chip[aria-pressed="true"]::before {
  content: "✓ ";
  font-weight: 600;
}

.demo-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.demo-duo .demo-card {
  margin: 0;
}

.demo-duo h3,
.demo-strong {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.demo-dots {
  display: flex;
  gap: 2px;
}

.demo-dot {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}

.demo-dot::after {
  content: "";
  width: 10px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.demo-dot[aria-checked="true"]::after,
.demo-dot.is-on::after {
  background: var(--accent);
  border-color: var(--accent);
}

.demo-ask {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  color: var(--ink);
  text-align: left;
  font-size: 14px;
}

.demo-ask svg,
.demo-tab svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.demo-ask svg {
  color: var(--accent);
  flex: none;
}

.demo-replay {
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.demo-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px 10px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.demo-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
}

.demo-tab[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}

.demo-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 12px;
}

.demo-week button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}

.demo-week button b {
  color: var(--ink);
  font-size: 14px;
}

.demo-week button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

.demo-week button[aria-pressed="true"] b {
  color: inherit;
}

.demo-event {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
}

.demo-event:first-child {
  border-top: 0;
}

.demo-event time {
  min-width: 46px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.demo-luma-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-luma-head .demo-h2 {
  margin: 0;
}

.demo-orb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c7b6ff, #ffc7d7 55%, #b7e3db);
}

.demo-chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.demo-bubble {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
}

.demo-bubble.is-user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
}

.demo-phone[data-theme="dark"] .demo-bubble.is-user {
  color: #1b1530;
}

.demo-bubble.is-luma {
  align-self: flex-start;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
}

.demo-typing {
  display: inline-flex;
  gap: 4px;
}

.demo-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.demo-choice {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.demo-choice.is-main {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
}

.demo-phone[data-theme="dark"] .demo-choice.is-main {
  color: #1b1530;
}

.demo-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.demo-cal span,
.demo-cal button {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 12px;
}

.demo-cal span {
  color: var(--muted);
  font-size: 10px;
}

.demo-cal button {
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--ink);
}

.demo-cal button.is-reg {
  background: var(--rose);
  color: #5a1230;
  font-weight: 600;
}

.demo-cal button.is-est {
  border-style: dashed;
  border-color: var(--rose);
}

.demo-cal button.is-today {
  border-style: solid;
  border-color: var(--accent);
  font-weight: 600;
}

.demo-cal button[aria-pressed="true"] {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.demo-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.demo-legend i {
  width: 10px;
  height: 10px;
  display: inline-block;
  margin-right: 4px;
  border-radius: 3px;
  vertical-align: -1px;
}

.demo-legend .is-reg {
  background: var(--rose);
}

.demo-legend .is-est {
  border: 1.5px dashed var(--rose);
}

.demo-legend .is-today {
  border: 1.5px solid var(--accent);
}

.demo-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.demo-you-name {
  font-size: 22px;
}

.demo-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #c7b6ff, #ffc7d7);
  color: #fff;
  font-weight: 600;
}

.demo-set {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
}

.demo-set:first-child {
  border-top: 0;
  padding-top: 0;
}

.demo-set small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.demo-switch {
  width: 44px;
  height: 26px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  position: relative;
}

.demo-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.demo-switch[aria-checked="true"] {
  background: var(--accent);
}

.demo-switch[aria-checked="true"]::after {
  transform: translateX(18px);
}

.demo-hint {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.demo-hint.is-off {
  opacity: 0;
  transform: translateY(-4px);
}

.demo-theme {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.demo-theme button {
  border: 0;
  border-radius: 999px;
  padding: 6px 14px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.demo-theme button[aria-pressed="true"] {
  background: var(--lavender-deep);
  color: #fff;
}

.demo-phone :focus-visible,
.demo-theme button:focus-visible {
  outline: 2px solid var(--accent, var(--lavender-deep));
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .hero .stage {
    margin-top: 8px;
  }

  .demo-phone {
    height: min(640px, calc(100dvh - 28px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .demo-pane,
  .demo-list li,
  .demo-chip,
  .demo-hint,
  .demo-switch::after,
  .demo-dot::after {
    transition: none;
    animation: none;
  }
}
