:root {
  --ink: #11120f;
  --paper: #f3f4ef;
  --night: #08090b;
  --lime: #dcff43;
  --muted: #71746c;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--night);
}

body,
button {
  font-family: Inter, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button {
  color: inherit;
  touch-action: manipulation;
}

button:focus-visible {
  outline: 3px solid #739000;
  outline-offset: 2px;
}

.demo-stage {
  width: 100%;
  height: 100dvh;
  padding: 24px max(24px, calc((100vw - 1280px) / 2));
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(430px, 1.1fr);
  align-items: center;
  gap: clamp(40px, 8vw, 140px);
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 18%, rgba(102, 71, 255, 0.2), transparent 29rem),
    radial-gradient(circle at 12% 82%, rgba(220, 255, 67, 0.08), transparent 26rem),
    var(--night);
  color: #f7f8f2;
}

.demo-notes {
  height: min(860px, calc(100dvh - 48px));
  max-width: 560px;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 21px;
  font-style: italic;
  letter-spacing: -0.08em;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--lime);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
}

.notes-copy h1 {
  margin: 0;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: clamp(48px, 4.8vw, 76px);
  font-weight: 500;
  letter-spacing: -0.07em;
  line-height: 1.04;
}

.notes-copy > p:last-child {
  max-width: 500px;
  margin: 32px 0 0;
  color: #bbbdb7;
  font-size: 15px;
  line-height: 1.85;
}

.logic-list {
  display: grid;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.logic-list span {
  padding: 16px 0;
  display: flex;
  gap: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: #c8cac4;
  font-size: 13px;
}

.logic-list b {
  color: var(--lime);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 500;
}

.desktop-hint {
  margin: 0;
  color: #797d75;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.phone-frame {
  width: min(100%, 430px);
  height: min(860px, calc(100dvh - 48px));
  justify-self: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 38px;
  background: var(--paper);
  color: var(--ink);
  box-shadow:
    0 50px 120px rgba(0, 0, 0, 0.68),
    0 0 0 8px rgba(255, 255, 255, 0.025);
}

.mobile-feed {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  background: var(--paper);
}

.mobile-feed::-webkit-scrollbar {
  display: none;
}

.app-bar {
  min-height: 78px;
  padding: max(10px, env(safe-area-inset-top)) 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(17, 18, 15, 0.14);
  background: var(--paper);
}

.app-title {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.app-title span {
  color: #697000;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
}

.app-title strong {
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 22px;
}

.page-count {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #62655e;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.page-count i {
  width: 24px;
  height: 1px;
  background: #9da096;
}

.feed-post {
  border: 0;
  background: var(--paper);
}

.feed-divider {
  --divider-lag: 0px;
  --divider-tilt: 0deg;
  --divider-scale: 1;
  width: 100%;
  height: 44px;
  margin: -22px 0;
  position: relative;
  z-index: 8;
  border: 0;
  border-radius: 0;
  background: #000;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.34);
  transform:
    perspective(240px)
    translate3d(0, var(--divider-lag), 0)
    rotateX(var(--divider-tilt))
    scaleX(var(--divider-scale));
  transform-origin: center;
  will-change: transform;
}

.post-head {
  min-height: 70px;
  padding: 9px 14px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
}

.post-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(17, 18, 15, 0.24);
  border-radius: 50%;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.post-head h2 {
  margin: 0;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 19px;
}

.post-head p {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-mode {
  min-width: 44px;
  min-height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: var(--lime);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.depth-photo {
  width: 100%;
  aspect-ratio: 2 / 3;
  position: relative;
  overflow: hidden;
  background: #111;
  touch-action: pan-y pinch-zoom;
}

.depth-source,
.depth-canvas {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  inset: 0;
}

.depth-source {
  object-fit: cover;
}

.depth-canvas {
  z-index: 1;
  opacity: 0;
  transition: opacity 180ms ease-out;
}

.depth-canvas[data-ready="true"] {
  opacity: 1;
}

.depth-badge {
  min-height: 28px;
  padding: 0 9px;
  position: absolute;
  z-index: 5;
  left: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(5, 6, 7, 0.58);
  color: #fff;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.08em;
  backdrop-filter: blur(8px);
}

.depth-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(220, 255, 67, 0.16);
}

.post-body {
  min-height: 54px;
  padding: 0 10px 0 14px;
  display: grid;
  grid-template-columns: minmax(104px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.post-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  color: #666961;
  font-size: 9px;
}

.post-stats b {
  color: var(--ink);
  font-size: 13px;
}

.post-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.post-actions button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #555951;
  font-size: 12px;
  cursor: pointer;
}

.post-actions button:active {
  background: rgba(17, 18, 15, 0.06);
}

.post-actions button.active {
  color: #526600;
  font-weight: 700;
}

.feed-footer {
  min-height: 170px;
  padding: 36px 20px max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--ink);
  color: #fff;
}

.feed-footer span {
  color: var(--lime);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.feed-footer strong {
  max-width: 310px;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.35;
}

@media (max-width: 820px) {
  .demo-stage {
    display: block;
    padding: 0;
    background: var(--paper);
  }

  .demo-notes {
    display: none;
  }

  .phone-frame {
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-height: 720px) and (min-width: 821px) {
  .phone-frame,
  .demo-notes {
    height: calc(100dvh - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
