:root {
  --paper: #05070b;
  --paper-strong: #0d131a;
  --panel: rgba(13, 19, 26, 0.72);
  --panel-strong: rgba(17, 25, 34, 0.9);
  --ink: #f4fff8;
  --muted: #9aa8a8;
  --line: rgba(184, 255, 44, 0.18);
  --green: #b8ff2c;
  --coral: #ff4f9a;
  --blue: #54d7ff;
  --yellow: #f7d65a;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.45), 0 0 42px rgba(184, 255, 44, 0.08);
  --display-font: "Oxanium", "Arial Black", "Segoe UI Black", "Noto Sans SC", sans-serif;
  --radius: 8px;
}

/* Kepler schedule teaser */
.schedule-section {
  padding: 70px 0 58px;
}

.schedule-heading h2 {
  max-width: 760px;
}

.schedule-teaser {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.74fr);
  gap: clamp(18px, 4vw, 42px);
  align-items: center;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(184, 255, 44, 0.11), rgba(84, 215, 255, 0.04)),
    var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.schedule-teaser::before {
  position: absolute;
  top: 0;
  right: clamp(20px, 4vw, 52px);
  left: clamp(20px, 4vw, 52px);
  height: 3px;
  content: "";
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.schedule-teaser-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  align-items: start;
}

.schedule-chip {
  display: inline-flex;
  width: fit-content;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(184, 255, 44, 0.2);
  border-radius: 999px;
  color: var(--green);
  background: rgba(184, 255, 44, 0.1);
  font-family: var(--display-font);
  font-size: 0.84rem;
  font-weight: 800;
}

.schedule-teaser h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display-font);
  font-size: clamp(2.15rem, 6vw, 4.5rem);
  line-height: 0.95;
}

.schedule-teaser p {
  max-width: 650px;
  margin: 0;
  color: rgba(244, 255, 248, 0.72);
  line-height: 1.85;
}

.schedule-feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule-feature-row span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 11px;
  border: 1px solid rgba(184, 255, 44, 0.14);
  border-radius: 999px;
  color: rgba(244, 255, 248, 0.82);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.84rem;
  font-weight: 800;
}

.schedule-preview {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(184, 255, 44, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.045);
}

.schedule-preview-line {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 14px;
  border: 1px solid rgba(184, 255, 44, 0.12);
  border-radius: 18px;
  background: rgba(5, 7, 11, 0.32);
}

.schedule-preview-line span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 16px rgba(84, 215, 255, 0.35);
}

.schedule-preview-line.is-done span {
  background: var(--green);
  box-shadow: 0 0 16px rgba(184, 255, 44, 0.35);
}

.schedule-preview-line strong {
  overflow-wrap: anywhere;
}

.schedule-preview-line em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
}

@media (max-width: 860px) {
  .schedule-teaser {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .schedule-section {
    padding: 54px 0 36px;
  }

  .schedule-teaser {
    border-radius: 22px;
  }

  .schedule-preview {
    padding: 12px;
    border-radius: 20px;
  }

  .schedule-preview-line {
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .schedule-preview-line em {
    grid-column: 2;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(118deg, transparent 0 18%, rgba(184, 255, 44, 0.08) 18.2% 18.45%, transparent 18.65% 100%),
    linear-gradient(138deg, transparent 0 66%, rgba(84, 215, 255, 0.1) 66.1% 66.32%, transparent 66.55% 100%),
    linear-gradient(90deg, rgba(184, 255, 44, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(84, 215, 255, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, #05070b 0%, #070b11 42%, #09070d 100%),
    var(--paper);
  background-size: auto, auto, 38px 38px, 38px 38px, auto, auto;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, transparent 0 49.75%, rgba(184, 255, 44, 0.1) 49.9% 50.1%, transparent 50.25% 100%),
    linear-gradient(180deg, transparent 0 72%, rgba(255, 79, 154, 0.08) 72.1% 72.25%, transparent 72.45% 100%),
    repeating-linear-gradient(180deg, transparent 0 7px, rgba(255, 255, 255, 0.018) 8px 9px);
  mix-blend-mode: screen;
  opacity: 0.74;
  animation: driftLines 16s ease-in-out infinite alternate;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(145deg, transparent 0 28%, rgba(184, 255, 44, 0.12) 28.05% 28.12%, transparent 28.2% 100%),
    linear-gradient(35deg, transparent 0 74%, rgba(84, 215, 255, 0.11) 74.05% 74.14%, transparent 74.22% 100%);
  opacity: 0.7;
}

body.intro-active {
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

.cursor-trail-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  width: var(--trail-size, 7px);
  height: var(--trail-size, 7px);
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(184, 255, 44, 0.92) 0 18%, rgba(84, 215, 255, 0.5) 42%, transparent 72%);
  box-shadow: 0 0 10px rgba(184, 255, 44, 0.24);
  mix-blend-mode: screen;
  opacity: 0;
  translate: -50% -50%;
  transform: translate3d(-999px, -999px, 0) scale(var(--trail-scale, 1));
  transition: opacity 180ms ease;
  will-change: transform, opacity;
}

.cursor-trail-dot.is-active {
  opacity: var(--trail-opacity, 0.42);
}

body.intro-active .topbar {
  opacity: 0;
  pointer-events: none;
}

[hidden] {
  display: none !important;
}

.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 32px;
  overflow: hidden;
  background:
    linear-gradient(120deg, transparent 0 40%, rgba(184, 255, 44, 0.12) 40.1% 40.3%, transparent 40.45% 100%),
    linear-gradient(90deg, rgba(184, 255, 44, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(84, 215, 255, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, #05070b, #080d13),
    var(--paper);
  background-size: auto, 38px 38px, 38px 38px, auto, auto;
  isolation: isolate;
}

.intro-screen::before,
.intro-screen::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.intro-screen::before {
  inset: 10vh 8vw;
  z-index: -1;
  border: 1px solid rgba(184, 255, 44, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 80px rgba(184, 255, 44, 0.1), inset 0 0 80px rgba(84, 215, 255, 0.06);
  animation: rotateRing 28s linear infinite;
}

.intro-screen::after {
  width: min(72vw, 760px);
  height: 1px;
  z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(184, 255, 44, 0.62), rgba(84, 215, 255, 0.4), transparent);
  transform: rotate(-18deg);
}

.intro-blur-text {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: min(960px, 100%);
  margin: 0;
  color: var(--green);
  font-family: var(--display-font);
  font-size: clamp(2.2rem, 7vw, 5.8rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.18;
  text-align: center;
  text-shadow: 0 0 18px rgba(184, 255, 44, 0.35), 0 0 62px rgba(84, 215, 255, 0.18);
}

.intro-blur-text span {
  display: inline-block;
  opacity: 0;
  filter: blur(12px);
  transform: translateY(-46px);
  will-change: transform, filter, opacity;
}

.intro-blur-text.is-visible span {
  animation: blurTextIn 720ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: var(--delay);
}

.intro-screen.is-leaving .intro-blur-text {
  animation: introTextOut 980ms cubic-bezier(0.55, 0, 0.2, 1) forwards;
}

.intro-screen.is-leaving {
  animation: introScreenOut 820ms ease 220ms forwards;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-shell {
  min-height: 100vh;
  overflow: hidden;
}

.topbar {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 20;
  display: flex;
  width: min(1120px, calc(100% - 32px));
  height: 62px;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(11, 17, 24, 0.82), rgba(12, 20, 26, 0.62));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  transform: translateX(-50%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display-font);
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  overflow: hidden;
  padding: 2px;
  border: 1px solid rgba(184, 255, 44, 0.36);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(184, 255, 44, 0.1);
  box-shadow: 0 0 22px rgba(184, 255, 44, 0.18);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
}

.topbar-session {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
}

.topbar-login,
.topbar-user {
  min-height: 36px;
  border: 1px solid rgba(184, 255, 44, 0.2);
  border-radius: 999px;
  background:
    linear-gradient(110deg, rgba(184, 255, 44, 0.1), rgba(84, 215, 255, 0.055)),
    rgba(10, 15, 21, 0.74);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.topbar-login {
  display: inline-flex;
  align-items: center;
  padding: 0 15px;
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 900;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.topbar-login::before {
  width: 7px;
  height: 7px;
  margin-right: 8px;
  content: "";
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(184, 255, 44, 0.5);
}

.topbar-login:hover,
.topbar-login:focus-visible {
  border-color: rgba(184, 255, 44, 0.42);
  background: rgba(184, 255, 44, 0.1);
  transform: translateY(-1px);
}

.topbar-user {
  display: grid;
  max-width: min(380px, 38vw);
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 6px 0 12px;
}

.topbar-user[hidden],
.topbar-login[hidden] {
  display: none;
}

.topbar-user span {
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 900;
  white-space: nowrap;
}

.topbar-user strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-logout {
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(255, 79, 154, 0.24);
  border-radius: 999px;
  color: #ffd7e5;
  background: rgba(255, 79, 154, 0.08);
  font-size: 0.76rem;
  font-weight: 900;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.topbar-logout:hover,
.topbar-logout:focus-visible {
  border-color: rgba(255, 79, 154, 0.48);
  background: rgba(255, 79, 154, 0.14);
  transform: translateY(-1px);
}

.nav-links a {
  position: relative;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 800;
  transition: color 180ms ease, background-color 180ms ease;
}

.nav-links a::after {
  position: absolute;
  right: 14px;
  bottom: 7px;
  left: 14px;
  height: 2px;
  content: "";
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--green);
  background: rgba(184, 255, 44, 0.08);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel-strong);
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
  transition: transform 180ms ease;
}

.nav-toggle.is-open span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle.is-open span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.section-band {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  scroll-margin-top: 96px;
}

.hero {
  display: grid;
  min-height: 86vh;
  align-items: center;
  grid-template-columns: minmax(0, 1.04fr) minmax(300px, 0.74fr);
  gap: clamp(30px, 6vw, 86px);
  padding: 116px 0 54px;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 18px;
  align-items: center;
  gap: 10px;
  color: var(--green);
  font-family: var(--display-font);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(184, 255, 44, 0.32);
}

.eyebrow::before {
  width: 38px;
  height: 2px;
  content: "";
  background: currentColor;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: clamp(32px, 3vw, 40px);
  color: var(--green);
  font-family: var(--display-font);
  font-size: clamp(4.2rem, 12vw, 8.4rem);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(184, 255, 44, 0.38), 0 18px 70px rgba(0, 0, 0, 0.52);
}

h2 {
  margin-bottom: 0;
  color: var(--ink);
  font-family: "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(2.15rem, 5.4vw, 4.15rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0;
  text-shadow: 0 0 18px rgba(84, 215, 255, 0.13);
}

.section-heading h2,
.changelog-panel h2 {
  display: block;
  width: 100%;
  max-width: 100%;
  padding-bottom: 0.08em;
  color: var(--ink);
  background: none;
  -webkit-text-fill-color: var(--ink);
}

.section-heading h2 {
  max-width: min(100%, 760px);
}

.section-heading h2 .scroll-reveal-word,
.changelog-panel h2 .scroll-reveal-word {
  min-height: 1.2em;
  color: inherit;
  background: none;
  -webkit-text-fill-color: currentColor;
}

.hero-text {
  max-width: 620px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-action,
.ghost-action,
.text-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.primary-action {
  gap: 8px;
  padding: 0 22px;
  border: 1px solid rgba(184, 255, 44, 0.3);
  color: #061006;
  background: linear-gradient(135deg, var(--green), #74ffde);
  box-shadow: 0 18px 46px rgba(184, 255, 44, 0.18), 0 0 0 1px rgba(184, 255, 44, 0.08);
}

.primary-action:hover,
.primary-action:focus-visible {
  box-shadow: 0 22px 58px rgba(184, 255, 44, 0.28), 0 0 28px rgba(84, 215, 255, 0.12);
  transform: translateY(-2px);
}

.ghost-action {
  padding: 0 20px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.ghost-action:hover,
.ghost-action:focus-visible {
  background: rgba(84, 215, 255, 0.1);
  transform: translateY(-2px);
}

.action-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #061006;
  background: var(--yellow);
}

.hero-panel {
  position: relative;
  display: grid;
  min-height: 460px;
  place-items: center;
}

.hero-panel::before,
.hero-panel::after {
  position: absolute;
  content: "";
  border: 1px solid var(--line);
  border-radius: 999px;
}

.hero-panel::before {
  width: min(92vw, 430px);
  aspect-ratio: 1;
  animation: rotateRing 22s linear infinite;
}

.hero-panel::after {
  width: min(74vw, 320px);
  aspect-ratio: 1;
  border-top-color: var(--coral);
  border-right-color: var(--blue);
  box-shadow: 0 0 52px rgba(84, 215, 255, 0.08);
  animation: rotateRing 13s linear infinite reverse;
}

.profile-disc {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(54vw, 220px);
  aspect-ratio: 1;
  place-items: center;
  padding: 8px;
  border: 1px solid rgba(184, 255, 44, 0.28);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(184, 255, 44, 0.1), rgba(84, 215, 255, 0.08));
  box-shadow: var(--shadow);
  animation: breathe 4.6s ease-in-out infinite;
}

.profile-disc img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.signal-card,
.quick-info {
  position: absolute;
  z-index: 3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.signal-card {
  top: 46px;
  left: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  animation: floatSmall 4.4s ease-in-out infinite;
}

.signal-card p {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
}

.signal-dot {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
}

.signal-dot::after {
  position: absolute;
  inset: -8px;
  content: "";
  border: 1px solid var(--green);
  border-radius: 50%;
  animation: pulse 1.8s ease-out infinite;
}

.quick-info {
  right: 0;
  bottom: 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  min-width: 252px;
  gap: 2px 14px;
  padding: 16px;
  animation: floatSmall 5s ease-in-out infinite 350ms;
}

.quick-info span {
  color: var(--muted);
  font-size: 0.82rem;
}

.quick-info strong {
  overflow-wrap: anywhere;
  color: var(--ink);
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  grid-row: 1 / span 2;
  grid-column: 2;
  place-items: center;
  align-self: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--green);
  background: rgba(184, 255, 44, 0.08);
  transition: transform 160ms ease, background-color 160ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: rgba(184, 255, 44, 0.14);
  transform: scale(1.06);
}

.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.qr-section,
.message-section {
  padding: 76px 0;
}

.qr-section {
  padding-bottom: 36px;
}

.section-heading {
  display: grid;
  justify-items: start;
  gap: 8px;
  margin-bottom: 30px;
}

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

.qr-stack {
  position: relative;
  width: 100%;
  overflow: visible;
  perspective: 1000px;
}

.scroll-stack-inner {
  position: relative;
  padding: clamp(22px, 5vh, 54px) 0 clamp(140px, 26vh, 240px);
}

.scroll-stack-card {
  --fold-progress: 1;
  --fold-card-height: 520px;
  --fold-frame-height: 390px;
  --fold-clip: 0%;
  --fold-frame-opacity: 1;
  --fold-frame-shift: 0px;
  --fold-frame-scale: 1;
  --fold-meta-opacity: 1;
  --fold-meta-shift: 0px;
  --fold-cover-opacity: 1;
  --fold-label-shift: -8px;
  --fold-line-scale: 1;
  --fold-card-opacity: 1;

  width: min(100%, 700px);
  height: var(--fold-card-height);
  min-height: 0;
  grid-template-columns: minmax(180px, 0.62fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(14px, 3vw, 28px);
  margin: 0 auto clamp(24px, 5vh, 42px);
  padding: clamp(14px, 2.6vw, 24px);
  overflow: hidden;
  opacity: var(--fold-card-opacity);
  backface-visibility: hidden;
  transform-origin: top center;
  transition: box-shadow 180ms ease, border-color 180ms ease;
  will-change: transform, filter, height, opacity;
}

.scroll-stack-card .qr-frame {
  width: min(100%, var(--fold-frame-height));
  height: var(--fold-frame-height);
  max-height: none;
  justify-self: center;
  opacity: var(--fold-frame-opacity);
  transform: translateY(var(--fold-frame-shift)) scale(var(--fold-frame-scale));
  transition: opacity 120ms linear, transform 120ms linear;
}

.scroll-stack-card .qr-meta {
  align-self: center;
  opacity: var(--fold-meta-opacity);
  transform: translateY(var(--fold-meta-shift));
  transition: opacity 120ms linear, transform 120ms linear;
}

.scroll-stack-card .qr-meta span {
  font-size: 0.9rem;
}

.scroll-stack-card .qr-meta strong {
  font-size: clamp(1.22rem, 3.2vw, 2.35rem);
  line-height: 1;
}

.scroll-stack-end {
  width: 100%;
  height: 1px;
}

.qr-card {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    var(--panel);
  box-shadow: var(--shadow);
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.qr-card::before {
  position: absolute;
  top: 0;
  right: 18px;
  left: 18px;
  height: 3px;
  content: "";
  border-radius: 0 0 999px 999px;
  background: var(--green);
  transform: scaleX(var(--fold-line-scale, 1));
  transform-origin: left;
}

.qr-card::after {
  position: absolute;
  inset: 0;
  z-index: 3;
  content: "";
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 0 33%,
    rgba(184, 255, 44, 0.24) 45%,
    transparent 58% 100%
  );
  opacity: 0;
  transform: translateX(-120%);
}

.qr-card-bilibili::before {
  background: #fb7299;
}

.qr-card-douyin::before {
  background: linear-gradient(90deg, var(--blue), var(--coral));
}

.qr-card-wechat::before {
  background: var(--green);
}

.qr-card-email {
  cursor: default;
}

.qr-card-email::before {
  background: var(--blue);
}

.qr-card:hover,
.qr-card.is-hovered,
.qr-card.is-revealed {
  border-color: rgba(184, 255, 44, 0.42);
  box-shadow: 0 30px 94px rgba(0, 0, 0, 0.5), 0 0 46px rgba(184, 255, 44, 0.13);
}

.qr-card.is-opening {
  animation: cardOpenGlow 760ms ease;
}

.qr-card.is-opening::after {
  animation: cardLightSweep 780ms ease forwards;
}

.qr-fold-label {
  position: absolute;
  top: clamp(18px, 4vw, 34px);
  left: clamp(18px, 4vw, 42px);
  z-index: 4;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(184, 255, 44, 0.22);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(10, 15, 21, 0.82);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24), 0 0 24px rgba(184, 255, 44, 0.08);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0;
  transform: translateY(var(--fold-label-shift));
  transition: opacity 120ms linear, transform 120ms linear;
}

.qr-card.is-revealed .qr-fold-label {
  opacity: 0;
  transform: translateY(-12px);
}

.qr-card:focus-visible {
  outline: 3px solid rgba(184, 255, 44, 0.26);
  outline-offset: 4px;
}

.qr-frame {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  padding: clamp(10px, 2.8vw, 14px);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(184, 255, 44, 0.1), rgba(84, 215, 255, 0.1)),
    var(--paper-strong);
  isolation: isolate;
}

.qr-frame::after {
  position: absolute;
  right: 10%;
  left: 10%;
  height: 2px;
  content: "";
  background: var(--green);
  box-shadow: 0 0 18px rgba(184, 255, 44, 0.6);
  transform: translateY(-150px);
  opacity: 0;
}

.qr-card:hover .qr-frame::after,
.qr-card.is-hovered .qr-frame::after,
.qr-card.is-revealed .qr-frame::after {
  animation: scanLine 1.35s ease-in-out;
}

.qr-card:hover .qr-frame,
.qr-card.is-hovered .qr-frame,
.qr-card.is-opening .qr-frame {
  animation: qrFrameOpen 620ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 3px;
  opacity: 0;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.2));
  transform: scale(0.98);
  transition: opacity 220ms ease, transform 240ms ease;
}

.qr-card:hover .qr-frame img,
.qr-card.is-hovered .qr-frame img,
.qr-card.is-revealed .qr-frame img {
  opacity: 1;
  transform: scale(1);
}

.qr-card:hover .qr-frame img,
.qr-card.is-hovered .qr-frame img,
.qr-card.is-opening .qr-frame img {
  animation: qrImageOpen 680ms cubic-bezier(0.18, 0.86, 0.3, 1) both;
}

.qr-card-bilibili:hover .qr-frame img,
.qr-card-bilibili.is-hovered .qr-frame img,
.qr-card-bilibili.is-revealed .qr-frame img {
  transform: scale(1);
}

.email-frame {
  align-content: center;
  gap: 18px;
  padding: clamp(20px, 5vw, 44px);
  background:
    linear-gradient(135deg, rgba(84, 215, 255, 0.18), rgba(184, 255, 44, 0.11)),
    var(--paper-strong);
}

.email-symbol {
  display: grid;
  width: clamp(86px, 18vw, 146px);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(84, 215, 255, 0.22);
  border-radius: 50%;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28), 0 0 28px rgba(84, 215, 255, 0.12);
  font-size: clamp(3rem, 10vw, 6.2rem);
  font-weight: 900;
  line-height: 1;
}

.email-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(54, 120, 255, 0.2);
  border-radius: 999px;
  color: var(--blue);
  background: rgba(84, 215, 255, 0.08);
  font-weight: 900;
  transition: background-color 180ms ease, transform 180ms ease;
}

.email-link:hover,
.email-link:focus-visible {
  background: rgba(84, 215, 255, 0.16);
  transform: translateY(-1px);
}

.qr-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 20px;
  border: 1px solid rgba(184, 255, 44, 0.16);
  border-radius: 6px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(10, 15, 21, 0.9), rgba(10, 15, 21, 0.68)),
    linear-gradient(135deg, rgba(184, 255, 44, 0.11), rgba(84, 215, 255, 0.11));
  backdrop-filter: blur(14px);
  opacity: var(--fold-cover-opacity);
  transition: opacity 220ms ease, transform 240ms ease, visibility 220ms ease, backdrop-filter 220ms ease;
}

.qr-cover span {
  color: var(--green);
  font-size: 0.92rem;
  font-weight: 900;
}

.qr-cover strong {
  max-width: 8em;
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  line-height: 1.25;
}

.qr-card.is-hovered .qr-cover,
.qr-card.is-revealed .qr-cover {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px) scale(0.96);
}

.qr-card.is-opening .qr-cover {
  animation: qrCoverLeave 360ms ease forwards;
}

.qr-card.is-opening .qr-meta {
  animation: qrMetaOpen 620ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.qr-meta {
  display: grid;
  gap: 4px;
}

.qr-meta span {
  color: var(--muted);
  font-size: 0.9rem;
}

.qr-meta strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 1.08rem;
}

.email-meta strong {
  font-size: clamp(1.2rem, 3.8vw, 2.9rem);
  line-height: 1.08;
}

.message-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(310px, 1fr);
  gap: 18px;
  align-items: start;
}

.message-content {
  display: grid;
  gap: 18px;
}

.message-content[hidden] {
  display: none;
}

.message-gate {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: 22px;
  align-items: end;
  overflow: hidden;
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid rgba(184, 255, 44, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(184, 255, 44, 0.1), transparent 34%),
    linear-gradient(120deg, rgba(84, 215, 255, 0.08), transparent 52%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.message-gate::before {
  position: absolute;
  top: 0;
  right: 18px;
  left: 18px;
  height: 3px;
  content: "";
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--green), var(--blue));
  box-shadow: 0 0 24px rgba(184, 255, 44, 0.24);
}

.message-gate-copy {
  display: grid;
  gap: 10px;
}

.message-gate-copy h3 {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(1.6rem, 4vw, 3.15rem);
  line-height: 0.98;
}

.message-gate-copy p:not(.eyebrow) {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.message-login-form {
  display: grid;
  gap: 12px;
}

.message-login-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.message-login-form input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(3, 7, 11, 0.76);
  outline: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.message-login-form input:focus {
  border-color: rgba(184, 255, 44, 0.72);
  box-shadow: 0 0 0 4px rgba(184, 255, 44, 0.12);
  transform: translateY(-1px);
}

.message-login-form input.is-verified {
  border-color: rgba(184, 255, 44, 0.86);
  box-shadow: 0 0 0 4px rgba(184, 255, 44, 0.12);
}

.login-hint {
  grid-column: 1 / -1;
  width: fit-content;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(255, 79, 154, 0.26);
  border-radius: 999px;
  color: #ffd7e5;
  background: rgba(255, 79, 154, 0.09);
  font-size: 0.88rem;
  font-weight: 800;
}

.login-hint[hidden] {
  display: none;
}

.login-hint.is-success {
  border-color: rgba(184, 255, 44, 0.28);
  color: var(--green);
  background: rgba(184, 255, 44, 0.08);
}

.message-session {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(184, 255, 44, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(110deg, rgba(184, 255, 44, 0.08), rgba(84, 215, 255, 0.05)),
    rgba(13, 19, 26, 0.74);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.message-session div {
  display: grid;
  gap: 3px;
}

.message-session span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.message-session strong {
  color: var(--ink);
  font-size: clamp(1rem, 2vw, 1.18rem);
  overflow-wrap: anywhere;
}

.message-form,
.message-list-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.message-form {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.message-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.message-form input:not([type="file"]),
.message-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(3, 7, 11, 0.72);
  outline: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.message-form input:not([type="file"]) {
  height: 48px;
  padding: 0 14px;
}

.message-form textarea {
  min-height: 150px;
  resize: vertical;
  padding: 13px 14px;
  line-height: 1.75;
}

.message-form input:focus,
.message-form textarea:focus {
  border-color: rgba(184, 255, 44, 0.72);
  box-shadow: 0 0 0 4px rgba(184, 255, 44, 0.12);
  transform: translateY(-1px);
}

.message-form input.is-verified {
  border-color: rgba(184, 255, 44, 0.86);
  box-shadow: 0 0 0 4px rgba(184, 255, 44, 0.12);
}

.identity-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(184, 255, 44, 0.24);
  border-radius: 999px;
  color: var(--green);
  background: rgba(184, 255, 44, 0.08);
  font-size: 0.88rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.identity-preview[hidden] {
  display: none;
}

.identity-preview::before {
  width: 8px;
  height: 8px;
  content: "";
  border-radius: 50%;
  background: currentColor;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.image-upload {
  position: relative;
}

.image-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-control {
  display: flex;
  min-height: 56px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px dashed rgba(184, 255, 44, 0.42);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(184, 255, 44, 0.06);
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.image-upload:focus-within .upload-control,
.image-upload:hover .upload-control {
  border-color: rgba(184, 255, 44, 0.72);
  background: rgba(184, 255, 44, 0.1);
  transform: translateY(-1px);
}

.upload-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: #061006;
  background: var(--green);
  font-size: 1.2rem;
  line-height: 1;
}

.image-preview {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.image-preview[hidden] {
  display: none;
}

.image-preview img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 5px;
}

#messageCount {
  color: var(--muted);
  font-size: 0.9rem;
}

.message-list-wrap {
  overflow: hidden;
}

.message-list-head {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

.message-list-head > div {
  display: grid;
  gap: 2px;
}

.message-list-head small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.message-date-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(184, 255, 44, 0.1);
  scrollbar-width: thin;
}

.date-tab {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(184, 255, 44, 0.14);
  border-radius: 999px;
  color: rgba(244, 255, 248, 0.76);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.85rem;
  font-weight: 900;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.date-tab:hover,
.date-tab:focus-visible {
  border-color: rgba(184, 255, 44, 0.34);
  color: var(--green);
  background: rgba(184, 255, 44, 0.08);
  transform: translateY(-1px);
}

.date-tab.is-active {
  border-color: rgba(184, 255, 44, 0.52);
  color: #061006;
  background: var(--green);
  box-shadow: 0 0 24px rgba(184, 255, 44, 0.18);
}

.text-button {
  min-height: 34px;
  padding: 0 12px;
  color: var(--green);
  background: rgba(184, 255, 44, 0.1);
}

.text-button:hover,
.text-button:focus-visible {
  background: rgba(184, 255, 44, 0.16);
  transform: translateY(-1px);
}

.message-list {
  display: grid;
  min-height: 290px;
  max-height: 520px;
  gap: 12px;
  overflow: auto;
  padding: 18px;
}

.empty-message {
  display: grid;
  min-height: 230px;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.message-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(184, 255, 44, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  animation: messageIn 280ms ease both;
}

.message-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.message-author {
  display: grid;
  gap: 3px;
}

.message-item strong {
  overflow-wrap: anywhere;
}

.message-nickname {
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.message-time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.82rem;
}

.message-item p {
  margin: 0;
  color: rgba(244, 255, 248, 0.88);
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.message-image {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid rgba(184, 255, 44, 0.12);
}

.footer {
  display: flex;
  width: min(1120px, calc(100% - 32px));
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer a {
  color: var(--green);
  font-weight: 800;
}

.footer-credit {
  flex: 1;
  min-width: 180px;
  text-align: center;
  color: rgba(154, 168, 168, 0.78);
  font-size: 0.86rem;
}

.version-note {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(184, 255, 44, 0.18);
  border-radius: 999px;
  color: rgba(244, 255, 248, 0.78);
  background: rgba(255, 255, 255, 0.05);
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.version-note:hover,
.version-note:focus-visible {
  border-color: rgba(184, 255, 44, 0.34);
  color: var(--green);
  background: rgba(184, 255, 44, 0.08);
  transform: translateY(-1px);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  max-width: min(320px, calc(100vw - 44px));
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #ffffff;
  background: #10161d;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.changelog-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
}

.changelog-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background:
    linear-gradient(115deg, rgba(184, 255, 44, 0.09), rgba(84, 215, 255, 0.08)),
    rgba(5, 7, 11, 0.78);
  backdrop-filter: blur(14px);
  animation: changelogFadeIn 220ms ease both;
}

.changelog-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  width: min(680px, 100%);
  max-height: min(760px, calc(100svh - 48px));
  min-height: min(560px, calc(100svh - 48px));
  overflow: hidden;
  padding: clamp(22px, 5vw, 42px) clamp(22px, 5vw, 42px) 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    var(--panel-strong);
  box-shadow: 0 36px 120px rgba(0, 0, 0, 0.58), 0 0 58px rgba(84, 215, 255, 0.08);
  animation: changelogPanelIn 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.changelog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.4rem;
  line-height: 1;
  transition: background-color 160ms ease, transform 160ms ease;
}

.changelog-close:hover,
.changelog-close:focus-visible {
  background: rgba(184, 255, 44, 0.12);
  transform: rotate(8deg) scale(1.04);
}

.changelog-date {
  margin: 12px 0 26px;
  color: var(--muted);
  font-size: 0.95rem;
}

.changelog-scroll {
  display: grid;
  min-height: 0;
  max-height: min(440px, calc(100svh - 300px));
  gap: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 8px 28px 0;
  scrollbar-color: rgba(184, 255, 44, 0.42) rgba(255, 255, 255, 0.06);
}

.changelog-scroll:focus-visible {
  outline: 2px solid rgba(184, 255, 44, 0.34);
  outline-offset: 4px;
}

.changelog-version {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(184, 255, 44, 0.14);
  border-radius: 6px;
  background: rgba(184, 255, 44, 0.06);
}

.changelog-version-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.changelog-version h3 {
  margin: 0;
  color: var(--green);
  font-family: var(--display-font);
  font-size: 1.18rem;
  line-height: 1.1;
}

.changelog-version time {
  flex: none;
  color: var(--muted);
  font-size: 0.88rem;
}

.changelog-version ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 1.2em;
  color: rgba(244, 255, 248, 0.88);
  line-height: 1.75;
}

.surprise-trigger {
  position: absolute;
  right: 18px;
  bottom: 14px;
  border: 0;
  color: rgba(184, 255, 44, 0.74);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 800;
  transition: color 160ms ease, transform 160ms ease;
}

.surprise-trigger:hover,
.surprise-trigger:focus-visible {
  color: var(--green);
  transform: translateY(-1px);
}

.surprise-message {
  position: absolute;
  right: 18px;
  bottom: 42px;
  max-width: min(360px, calc(100% - 36px));
  padding: 10px 12px;
  border: 1px solid rgba(184, 255, 44, 0.18);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(12, 18, 25, 0.95);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32), 0 0 22px rgba(184, 255, 44, 0.1);
  font-size: 0.86rem;
  font-weight: 900;
  animation: surprisePop 220ms ease both;
}

[data-animate] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 560ms ease, transform 560ms ease;
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-stack-card[data-animate],
.scroll-stack-card[data-animate].is-visible {
  opacity: var(--fold-card-opacity, 1);
}

[data-scroll-reveal] {
  --scroll-reveal-progress: 0;
  --scroll-reveal-presence: 0;
  --scroll-panel-progress: 0;
  --scroll-panel-presence: 0;
}

[data-scroll-reveal-text] {
  opacity: calc(0.06 + var(--scroll-reveal-presence) * 0.94);
  transform-origin: 0% 50%;
  transform: translateY(calc((1 - var(--scroll-reveal-progress)) * 34px))
    rotate(calc((1 - var(--scroll-reveal-progress)) * 6deg));
  transition: opacity 70ms linear, transform 70ms linear;
  will-change: opacity, transform;
}

.scroll-reveal-word {
  display: inline-block;
  opacity: calc(0.02 + var(--word-progress, 0) * 0.98);
  transform: translateY(calc((1 - var(--word-progress, 0)) * 26px))
    scale(calc(0.92 + var(--word-progress, 0) * 0.08));
  transition: opacity 70ms linear, transform 70ms linear;
  will-change: opacity, transform;
}

[data-scroll-reveal-panel] {
  opacity: calc(0.02 + var(--scroll-panel-presence) * 0.98);
  transform: translateY(calc((1 - var(--scroll-panel-progress)) * 72px))
    rotate(calc((1 - var(--scroll-panel-progress)) * 6deg))
    scale(calc(0.94 + var(--scroll-panel-progress) * 0.06));
  transform-origin: 0% 50%;
  transition: opacity 70ms linear, transform 70ms linear;
  will-change: opacity, transform;
}

.topbar[data-animate] {
  transform: translateX(-50%) translateY(22px);
}

.topbar[data-animate].is-visible {
  transform: translateX(-50%) translateY(0);
}

@keyframes driftLines {
  from {
    transform: translate3d(-18px, -12px, 0);
  }

  to {
    transform: translate3d(18px, 12px, 0);
  }
}

@keyframes rotateRing {
  to {
    transform: rotate(360deg);
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.035);
  }
}

@keyframes floatSmall {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  from {
    opacity: 0.82;
    transform: scale(0.72);
  }

  to {
    opacity: 0;
    transform: scale(1.58);
  }
}

@keyframes scanLine {
  0% {
    opacity: 0;
    transform: translateY(-160px);
  }

  18%,
  82% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(160px);
  }
}

@keyframes cardOpenGlow {
  0% {
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.4);
  }

  42% {
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.55), 0 0 0 6px rgba(184, 255, 44, 0.12), 0 0 48px rgba(184, 255, 44, 0.2);
  }

  100% {
    box-shadow: 0 30px 94px rgba(0, 0, 0, 0.5), 0 0 46px rgba(184, 255, 44, 0.13);
  }
}

@keyframes cardLightSweep {
  0% {
    opacity: 0;
    transform: translateX(-120%);
  }

  28% {
    opacity: 0.85;
  }

  100% {
    opacity: 0;
    transform: translateX(120%);
  }
}

@keyframes qrFrameOpen {
  0% {
    transform: translateY(14px) scale(0.96);
  }

  58% {
    transform: translateY(-4px) scale(1.015);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes qrImageOpen {
  0% {
    opacity: 0;
    filter: blur(10px) drop-shadow(0 12px 28px rgba(0, 0, 0, 0.24));
    transform: scale(0.96);
  }

  52% {
    opacity: 1;
    filter: blur(2px) drop-shadow(0 18px 34px rgba(0, 0, 0, 0.3));
    transform: scale(1);
  }

  100% {
    opacity: 1;
    filter: blur(0) drop-shadow(0 12px 28px rgba(0, 0, 0, 0.24));
    transform: scale(1);
  }
}

@keyframes qrCoverLeave {
  0% {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-18px) scale(0.94);
  }
}

@keyframes qrMetaOpen {
  0% {
    opacity: 0.38;
    transform: translateY(14px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes changelogFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes changelogPanelIn {
  from {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(18px) scale(0.97);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes surprisePop {
  from {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(8px) scale(0.96);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes blurTextIn {
  0% {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(-46px);
  }

  55% {
    opacity: 0.62;
    filter: blur(5px);
    transform: translateY(6px);
  }

  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes introTextOut {
  to {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(-38px) scale(0.96);
  }
}

@keyframes introScreenOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@media (max-width: 860px) {
  :root {
    --shadow: 0 16px 46px rgba(0, 0, 0, 0.34), 0 0 22px rgba(184, 255, 44, 0.05);
  }

  body::before {
    animation: none;
    opacity: 0.42;
  }

  body::after {
    opacity: 0.38;
  }

  .topbar {
    top: 10px;
    width: calc(100% - 20px);
    backdrop-filter: none;
  }

  .brand {
    flex: 0 0 auto;
  }

  .topbar-session {
    flex: 1 1 auto;
    justify-content: flex-end;
    margin-left: 8px;
  }

  .topbar-user {
    max-width: min(42vw, 230px);
  }

  .topbar-user span {
    display: none;
  }

  .topbar-user {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .nav-toggle {
    display: block;
    flex: 0 0 auto;
    margin-left: 8px;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: grid;
    width: min(230px, calc(100vw - 20px));
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(10, 15, 21, 0.96);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.44), 0 0 30px rgba(84, 215, 255, 0.08);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .nav-links.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-links a {
    border-radius: 6px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 116px;
  }

  .hero-panel {
    min-height: 390px;
  }

  .signal-card {
    top: 26px;
    left: 12px;
  }

  .quick-info {
    right: auto;
    bottom: 28px;
    left: 50%;
    width: min(280px, calc(100% - 28px));
    min-width: 0;
    translate: -50% 0;
  }

  .section-heading {
    display: grid;
    gap: 8px;
  }

  .qr-grid,
  .message-layout {
    grid-template-columns: 1fr;
  }

  .message-gate {
    grid-template-columns: 1fr;
  }

  .scroll-stack-card {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .scroll-stack-card .qr-frame {
    width: min(100%, var(--fold-frame-height));
  }

  .scroll-stack-card .qr-meta strong {
    font-size: clamp(1.55rem, 10vw, 3.3rem);
  }

  .message-form,
  .message-list-wrap,
  .qr-card,
  .quick-info {
    backdrop-filter: none;
  }

  .scroll-stack-card,
  .scroll-stack-card[data-animate],
  .scroll-stack-card[data-animate].is-visible {
    opacity: 1;
    filter: none !important;
  }
}

@media (max-width: 560px) {
  .section-band,
  .footer {
    width: min(100% - 24px, 1120px);
  }

  .section-band {
    scroll-margin-top: 78px;
  }

  .intro-screen {
    padding: 24px;
  }

  .intro-blur-text {
    font-size: clamp(2.35rem, 13vw, 4.6rem);
  }

  h1 {
    font-size: clamp(3.4rem, 20vw, 5.6rem);
    line-height: 0.95;
  }

  .hero {
    padding-bottom: 34px;
  }

  .hero-actions,
  .form-footer,
  .message-session,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-action,
  .ghost-action {
    width: 100%;
  }

  .topbar {
    padding: 0 8px 0 10px;
  }

  .brand {
    gap: 7px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .brand > span:last-child {
    max-width: 86px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-login {
    min-height: 32px;
    padding: 0 11px;
    font-size: 0.8rem;
  }

  .topbar-user {
    min-height: 32px;
    max-width: min(39vw, 178px);
    gap: 6px;
    padding: 0 5px 0 10px;
  }

  .topbar-user strong {
    font-size: 0.78rem;
  }

  .topbar-logout {
    min-height: 24px;
    padding: 0 7px;
    font-size: 0.72rem;
  }

  .hero-panel {
    min-height: 320px;
  }

  .profile-disc {
    width: min(52vw, 172px);
  }

  .quick-info {
    bottom: 16px;
  }

  .qr-section {
    padding: 52px 0;
  }

  .message-section {
    padding: 28px 0 46px;
  }

  .section-heading {
    margin-bottom: 18px;
  }

  .section-heading .eyebrow {
    margin-bottom: 10px;
  }

  .section-heading h2 {
    font-size: clamp(2rem, 10.8vw, 2.7rem);
    line-height: 1.15;
  }

  .message-form,
  .message-list {
    padding: 14px;
  }

  .message-gate {
    padding: 16px;
  }

  .message-gate-copy h3 {
    font-size: clamp(1.45rem, 8.5vw, 2.25rem);
  }

  .message-login-form input {
    height: 46px;
  }

  .message-list-head {
    min-height: 58px;
    padding: 10px 14px;
  }

  .message-date-tabs {
    padding: 10px 14px;
  }

  .date-tab {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.8rem;
  }

  .message-layout {
    gap: 14px;
  }

  .message-form {
    gap: 12px;
  }

  .message-form input:not([type="file"]) {
    height: 42px;
  }

  .message-form textarea {
    min-height: 112px;
  }

  .upload-control {
    min-height: 48px;
  }

  [data-scroll-reveal-panel] {
    transform: translateY(calc((1 - var(--scroll-panel-progress)) * 24px))
      scale(calc(0.98 + var(--scroll-panel-progress) * 0.02));
  }

  .scroll-stack-inner {
    padding: 18px 0 clamp(150px, 32vh, 250px);
  }

  .scroll-stack-card {
    margin-bottom: 32px;
  }

  .message-item header {
    display: grid;
    gap: 4px;
  }

  .message-time {
    flex: initial;
  }
}

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

  .scroll-stack-card {
    filter: none !important;
    transform: none !important;
  }

  .cursor-trail-dot {
    display: none;
  }
}

@media (pointer: coarse) {
  .cursor-trail-dot {
    display: none;
  }
}

/* Material Design 3 refresh - Ver 1.0 beta3 */
:root {
  --md-sys-color-primary: #b7f397;
  --md-sys-color-on-primary: #17380c;
  --md-sys-color-primary-container: #28511c;
  --md-sys-color-on-primary-container: #d3ffbb;
  --md-sys-color-secondary: #c1ccaf;
  --md-sys-color-on-secondary: #2b341f;
  --md-sys-color-secondary-container: #414b35;
  --md-sys-color-on-secondary-container: #dde8ca;
  --md-sys-color-tertiary: #a1d0d0;
  --md-sys-color-on-tertiary: #003737;
  --md-sys-color-tertiary-container: #1f4e4e;
  --md-sys-color-on-tertiary-container: #bcecec;
  --md-sys-color-error: #ffb4ab;
  --md-sys-color-on-error: #690005;
  --md-sys-color-error-container: #93000a;
  --md-sys-color-on-error-container: #ffdad6;
  --md-sys-color-background: #10140f;
  --md-sys-color-on-background: #e1e4d9;
  --md-sys-color-surface: #10140f;
  --md-sys-color-on-surface: #e1e4d9;
  --md-sys-color-surface-variant: #44483f;
  --md-sys-color-on-surface-variant: #c4c8bb;
  --md-sys-color-surface-container-lowest: #0b0f0a;
  --md-sys-color-surface-container-low: #181d16;
  --md-sys-color-surface-container: #1d211a;
  --md-sys-color-surface-container-high: #282c24;
  --md-sys-color-surface-container-highest: #33372f;
  --md-sys-color-outline: #8e9385;
  --md-sys-color-outline-variant: #44483f;
  --md-sys-shape-corner-small: 8px;
  --md-sys-shape-corner-medium: 12px;
  --md-sys-shape-corner-large: 16px;
  --md-sys-shape-corner-extra-large: 28px;
  --md-sys-shape-corner-extra-large-increased: 32px;
  --md-sys-shape-corner-full: 999px;
  --md-sys-motion-emphasized: cubic-bezier(0.2, 0, 0, 1);
  --md-sys-motion-decelerate: cubic-bezier(0.05, 0.7, 0.1, 1);
  --md-elevation-1: 0 1px 2px rgba(0, 0, 0, 0.28), 0 1px 3px 1px rgba(0, 0, 0, 0.16);
  --md-elevation-2: 0 2px 6px rgba(0, 0, 0, 0.26), 0 2px 8px 2px rgba(0, 0, 0, 0.16);
  --md-elevation-3: 0 4px 12px rgba(0, 0, 0, 0.28), 0 4px 18px 3px rgba(0, 0, 0, 0.18);
  --md-state-hover: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
  --md-state-focus: color-mix(in srgb, var(--md-sys-color-primary) 14%, transparent);
  --paper: var(--md-sys-color-background);
  --paper-strong: var(--md-sys-color-surface-container-low);
  --panel: color-mix(in srgb, var(--md-sys-color-surface-container) 86%, transparent);
  --panel-strong: var(--md-sys-color-surface-container-high);
  --ink: var(--md-sys-color-on-surface);
  --muted: var(--md-sys-color-on-surface-variant);
  --line: var(--md-sys-color-outline-variant);
  --green: var(--md-sys-color-primary);
  --blue: var(--md-sys-color-tertiary);
  --coral: #ffb1c8;
  --yellow: #f6d866;
  --shadow: var(--md-elevation-2);
  --radius: var(--md-sys-shape-corner-extra-large);
  --display-font: "Roboto Flex", "Oxanium", "Noto Sans SC", system-ui, sans-serif;
}

body {
  color: var(--md-sys-color-on-background);
  font-family: "Roboto Flex", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 8%, color-mix(in srgb, var(--md-sys-color-primary) 18%, transparent), transparent 32%),
    radial-gradient(circle at 86% 18%, color-mix(in srgb, var(--md-sys-color-tertiary) 16%, transparent), transparent 36%),
    linear-gradient(180deg, var(--md-sys-color-surface-container-lowest) 0%, var(--md-sys-color-background) 46%, #0c110d 100%);
  background-attachment: fixed;
}

body::before {
  background:
    linear-gradient(color-mix(in srgb, var(--md-sys-color-primary) 7%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--md-sys-color-tertiary) 6%, transparent) 1px, transparent 1px);
  background-size: 40px 40px;
  mix-blend-mode: normal;
  opacity: 0.28;
  animation: none;
}

body::after {
  background:
    linear-gradient(128deg, transparent 0 22%, color-mix(in srgb, var(--md-sys-color-primary) 18%, transparent) 22.1% 22.22%, transparent 22.34% 100%),
    linear-gradient(42deg, transparent 0 72%, color-mix(in srgb, var(--md-sys-color-tertiary) 18%, transparent) 72.1% 72.22%, transparent 72.34% 100%);
  opacity: 0.42;
}

.cursor-trail-dot {
  background: radial-gradient(circle, var(--md-sys-color-primary) 0 18%, var(--md-sys-color-tertiary) 48%, transparent 74%);
  box-shadow: 0 0 14px color-mix(in srgb, var(--md-sys-color-primary) 35%, transparent);
  opacity: 0;
}

.intro-screen {
  background:
    radial-gradient(circle at 50% 44%, color-mix(in srgb, var(--md-sys-color-primary-container) 58%, transparent), transparent 34%),
    linear-gradient(180deg, var(--md-sys-color-surface-container-lowest), var(--md-sys-color-surface));
}

.intro-blur-text {
  color: var(--md-sys-color-primary);
  font-family: var(--display-font);
  font-weight: 800;
  text-shadow: none;
}

.site-shell {
  background:
    linear-gradient(180deg, transparent, color-mix(in srgb, var(--md-sys-color-primary) 4%, transparent) 58%, transparent);
}

.section-band {
  width: min(1120px, calc(100% - 32px));
  scroll-margin-top: 104px;
}

.topbar {
  top: 16px;
  height: 72px;
  padding: 0 12px 0 18px;
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline-variant) 86%, transparent);
  border-radius: var(--md-sys-shape-corner-extra-large);
  background:
    linear-gradient(0deg, color-mix(in srgb, var(--md-sys-color-primary) 6%, transparent), transparent),
    color-mix(in srgb, var(--md-sys-color-surface-container) 94%, transparent);
  box-shadow: var(--md-elevation-2);
  backdrop-filter: blur(18px);
}

.brand {
  gap: 12px;
  color: var(--md-sys-color-on-surface);
  font-family: var(--display-font);
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border: 2px solid var(--md-sys-color-primary);
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-primary-container);
  box-shadow: none;
}

.nav-links a {
  min-height: 40px;
  padding: 9px 18px;
  border-radius: var(--md-sys-shape-corner-full);
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 700;
}

.nav-links a::after {
  display: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--md-sys-color-on-secondary-container);
  background: var(--md-sys-color-secondary-container);
}

.topbar-login,
.topbar-user {
  min-height: 40px;
  border: 0;
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-secondary-container);
  box-shadow: none;
}

.topbar-login {
  padding: 0 18px;
  color: var(--md-sys-color-on-secondary-container);
  font-size: 0.88rem;
  font-weight: 700;
}

.topbar-login::before {
  background: var(--md-sys-color-primary);
  box-shadow: none;
}

.topbar-login:hover,
.topbar-login:focus-visible,
.topbar-user:hover {
  background: color-mix(in srgb, var(--md-sys-color-secondary-container) 82%, var(--md-sys-color-primary));
  transform: translateY(-1px);
}

.topbar-user {
  padding: 0 6px 0 14px;
}

.topbar-user span {
  color: var(--md-sys-color-primary);
  font-weight: 700;
}

.topbar-user strong {
  color: var(--md-sys-color-on-secondary-container);
  font-weight: 700;
}

.topbar-logout {
  min-height: 30px;
  border: 0;
  color: var(--md-sys-color-on-error-container);
  background: var(--md-sys-color-error-container);
  font-weight: 700;
}

.topbar-logout:hover,
.topbar-logout:focus-visible {
  background: color-mix(in srgb, var(--md-sys-color-error-container) 84%, var(--md-sys-color-error));
}

.nav-toggle {
  border-radius: var(--md-sys-shape-corner-full);
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: var(--md-state-hover);
}

.hero {
  min-height: 88svh;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.78fr);
  gap: clamp(34px, 7vw, 92px);
  padding-top: 124px;
}

.eyebrow {
  min-height: 32px;
  margin-bottom: 18px;
  align-items: center;
  padding: 0 14px;
  border-radius: var(--md-sys-shape-corner-full);
  color: var(--md-sys-color-on-secondary-container);
  background: var(--md-sys-color-secondary-container);
  font-family: var(--display-font);
  font-size: 0.82rem;
  font-weight: 700;
  text-shadow: none;
}

.eyebrow::before {
  width: 8px;
  height: 8px;
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-primary);
}

h1 {
  margin-bottom: clamp(30px, 3.2vw, 44px);
  color: var(--md-sys-color-primary);
  font-family: var(--display-font);
  font-size: clamp(4.2rem, 12vw, 8rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: 0;
  text-shadow: none;
}

h2 {
  color: var(--md-sys-color-on-surface);
  font-family: var(--display-font);
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.12;
  text-shadow: none;
}

.section-heading h2,
.changelog-panel h2 {
  color: var(--md-sys-color-on-surface);
  -webkit-text-fill-color: var(--md-sys-color-on-surface);
}

.hero-text,
.message-gate-copy p:not(.eyebrow),
.message-item p,
.changelog-version ul {
  color: var(--md-sys-color-on-surface-variant);
}

.hero-text {
  margin-top: 8px;
  margin-bottom: 34px;
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  line-height: 1.85;
}

.primary-action,
.ghost-action,
.text-button,
.email-link,
.date-tab,
.version-note,
.surprise-trigger {
  border-radius: var(--md-sys-shape-corner-full);
  font-weight: 700;
  transition: background-color 220ms var(--md-sys-motion-emphasized), color 220ms var(--md-sys-motion-emphasized),
    border-color 220ms var(--md-sys-motion-emphasized), transform 220ms var(--md-sys-motion-emphasized),
    box-shadow 220ms var(--md-sys-motion-emphasized);
}

.primary-action {
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  color: var(--md-sys-color-on-primary);
  background: var(--md-sys-color-primary);
  box-shadow: none;
}

.primary-action:hover,
.primary-action:focus-visible {
  background: color-mix(in srgb, var(--md-sys-color-primary) 88%, var(--md-sys-color-on-primary));
  box-shadow: var(--md-elevation-1);
  transform: translateY(-1px);
}

.ghost-action,
.text-button,
.version-note,
.email-link {
  border: 1px solid var(--md-sys-color-outline);
  color: var(--md-sys-color-primary);
  background: transparent;
}

.ghost-action:hover,
.ghost-action:focus-visible,
.text-button:hover,
.text-button:focus-visible,
.version-note:hover,
.version-note:focus-visible,
.email-link:hover,
.email-link:focus-visible {
  color: var(--md-sys-color-primary);
  background: var(--md-state-hover);
  transform: translateY(-1px);
}

.action-icon,
.upload-icon {
  color: var(--md-sys-color-on-tertiary-container);
  background: var(--md-sys-color-tertiary-container);
}

.hero-panel {
  min-height: 500px;
}

.hero-panel::before,
.hero-panel::after {
  border-color: color-mix(in srgb, var(--md-sys-color-outline-variant) 72%, transparent);
  box-shadow: none;
}

.hero-panel::after {
  border-top-color: var(--md-sys-color-primary);
  border-right-color: var(--md-sys-color-tertiary);
}

.profile-disc {
  width: min(54vw, 240px);
  padding: 10px;
  border: 1px solid var(--md-sys-color-outline-variant);
  background: var(--md-sys-color-surface-container-high);
  box-shadow: var(--md-elevation-2);
}

.signal-card,
.quick-info,
.message-gate,
.message-session,
.message-form,
.message-list-wrap,
.qr-card,
.changelog-panel,
.toast {
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-extra-large);
  background:
    linear-gradient(0deg, color-mix(in srgb, var(--md-sys-color-primary) 5%, transparent), transparent),
    var(--md-sys-color-surface-container);
  box-shadow: var(--md-elevation-1);
}

.signal-card,
.quick-info {
  backdrop-filter: blur(12px);
}

.quick-info {
  min-width: min(300px, 78vw);
  padding: 16px 18px;
}

.quick-info span,
.message-session span,
.message-list-head small,
#messageCount,
.message-time,
.qr-meta span,
.changelog-date,
.changelog-version time,
.footer,
.footer-credit {
  color: var(--md-sys-color-on-surface-variant);
}

.quick-info strong,
.message-session strong,
.message-item strong,
.qr-meta strong {
  color: var(--md-sys-color-on-surface);
}

.icon-button {
  border-color: var(--md-sys-color-outline-variant);
  color: var(--md-sys-color-primary);
  background: var(--md-sys-color-surface-container-high);
}

.icon-button:hover,
.icon-button:focus-visible {
  background: var(--md-state-hover);
}

.message-section,
.qr-section {
  padding: 86px 0;
}

.message-gate {
  padding: clamp(22px, 4vw, 34px);
}

.message-gate::before,
.qr-card::before {
  right: 28px;
  left: 28px;
  height: 4px;
  border-radius: 0 0 var(--md-sys-shape-corner-full) var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-primary);
  box-shadow: none;
}

.message-gate-copy h3 {
  color: var(--md-sys-color-on-surface);
  font-family: var(--display-font);
  font-weight: 800;
  line-height: 1.08;
}

.message-login-form label,
.message-form label {
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 600;
}

.message-login-form input,
.message-form input:not([type="file"]),
.message-form textarea {
  border: 1px solid transparent;
  border-radius: var(--md-sys-shape-corner-small);
  color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-surface-container-highest);
  caret-color: var(--md-sys-color-primary);
}

.message-login-form input:focus,
.message-login-form input.is-verified,
.message-form input:focus,
.message-form textarea:focus,
.message-form input.is-verified {
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--md-sys-color-primary) 18%, transparent);
  transform: none;
}

.login-hint,
.identity-preview {
  border: 0;
  border-radius: var(--md-sys-shape-corner-full);
  color: var(--md-sys-color-on-error-container);
  background: var(--md-sys-color-error-container);
}

.login-hint.is-success,
.identity-preview {
  color: var(--md-sys-color-on-primary-container);
  background: var(--md-sys-color-primary-container);
}

.message-form,
.message-list-wrap {
  padding: 0;
  overflow: hidden;
}

.message-form {
  padding: 22px;
}

.upload-control {
  border: 1px dashed var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-medium);
  color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-surface-container-high);
}

.image-upload:hover .upload-control,
.image-upload:focus-within .upload-control {
  border-color: var(--md-sys-color-primary);
  background: var(--md-state-hover);
}

.image-preview,
.message-item,
.changelog-version {
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-large);
  background: var(--md-sys-color-surface-container-high);
}

.message-list-head,
.message-date-tabs {
  border-color: var(--md-sys-color-outline-variant);
}

.date-tab {
  min-height: 36px;
  border: 0;
  color: var(--md-sys-color-on-secondary-container);
  background: var(--md-sys-color-secondary-container);
}

.date-tab:hover,
.date-tab:focus-visible {
  color: var(--md-sys-color-on-secondary-container);
  background: color-mix(in srgb, var(--md-sys-color-secondary-container) 84%, var(--md-sys-color-primary));
}

.date-tab.is-active {
  color: var(--md-sys-color-on-primary);
  background: var(--md-sys-color-primary);
  box-shadow: none;
}

.message-list {
  min-height: 320px;
  padding: 18px;
}

.message-image {
  border-color: var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
}

.qr-section {
  padding-bottom: 52px;
}

.scroll-stack-inner {
  padding: clamp(28px, 5vh, 56px) 0 clamp(96px, 18vh, 160px);
}

.scroll-stack-card {
  --fold-card-height: 500px;
  --fold-frame-height: 352px;
  width: min(100%, 760px);
  grid-template-columns: minmax(190px, 0.62fr) minmax(0, 1fr);
  margin-bottom: clamp(20px, 4vh, 34px);
  padding: clamp(18px, 3vw, 28px);
}

.qr-card {
  cursor: pointer;
  background:
    linear-gradient(0deg, color-mix(in srgb, var(--md-sys-color-primary) 4%, transparent), transparent),
    var(--md-sys-color-surface-container);
}

.qr-card:hover,
.qr-card.is-hovered,
.qr-card.is-revealed {
  border-color: color-mix(in srgb, var(--md-sys-color-primary) 48%, var(--md-sys-color-outline-variant));
  box-shadow: var(--md-elevation-3);
}

.qr-fold-label {
  border: 0;
  border-radius: var(--md-sys-shape-corner-full);
  color: var(--md-sys-color-on-secondary-container);
  background: var(--md-sys-color-secondary-container);
  box-shadow: none;
  font-weight: 700;
}

.qr-frame {
  border-radius: var(--md-sys-shape-corner-large);
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent), transparent 42%),
    var(--md-sys-color-surface-container-high);
}

.qr-frame img {
  border-radius: var(--md-sys-shape-corner-medium);
}

.qr-cover {
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-large);
  background:
    linear-gradient(0deg, color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent), transparent),
    color-mix(in srgb, var(--md-sys-color-surface-container-high) 92%, transparent);
}

.qr-cover span {
  color: var(--md-sys-color-primary);
}

.qr-cover strong {
  color: var(--md-sys-color-on-surface);
  font-weight: 800;
}

.email-frame {
  background:
    radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--md-sys-color-tertiary) 22%, transparent), transparent 52%),
    var(--md-sys-color-surface-container-high);
}

.email-symbol {
  border: 0;
  color: var(--md-sys-color-on-tertiary-container);
  background: var(--md-sys-color-tertiary-container);
  box-shadow: none;
}

.footer {
  min-height: 92px;
}

.footer a {
  color: var(--md-sys-color-primary);
}

.version-note {
  min-height: 40px;
  padding: 0 18px;
}

.changelog-backdrop {
  background: color-mix(in srgb, var(--md-sys-color-scrim, #000000) 64%, transparent);
  backdrop-filter: blur(10px);
}

.changelog-panel {
  width: min(760px, 100%);
  grid-template-rows: auto auto auto minmax(0, 1fr);
  border-radius: var(--md-sys-shape-corner-extra-large-increased);
  background: var(--md-sys-color-surface-container-high);
  box-shadow: var(--md-elevation-3);
}

.changelog-close {
  border: 0;
  color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-surface-container-highest);
}

.changelog-close:hover,
.changelog-close:focus-visible {
  background: var(--md-state-hover);
  transform: rotate(8deg);
}

.changelog-scroll {
  scrollbar-color: var(--md-sys-color-primary) var(--md-sys-color-surface-container);
}

.changelog-version h3 {
  color: var(--md-sys-color-primary);
  font-family: var(--display-font);
}

.surprise-trigger {
  color: var(--md-sys-color-primary);
}

.surprise-message {
  border: 0;
  border-radius: var(--md-sys-shape-corner-full);
  color: var(--md-sys-color-on-tertiary-container);
  background: var(--md-sys-color-tertiary-container);
  box-shadow: var(--md-elevation-2);
}

.toast {
  color: var(--md-sys-color-inverse-on-surface, #f1f0ec);
  background: var(--md-sys-color-inverse-surface, #e1e4d9);
}

[data-animate] {
  transition: opacity 500ms var(--md-sys-motion-decelerate), transform 500ms var(--md-sys-motion-decelerate);
}

[data-scroll-reveal-text],
.scroll-reveal-word,
[data-scroll-reveal-panel] {
  transition: opacity 90ms linear, transform 90ms linear;
}

@media (max-width: 860px) {
  .topbar {
    height: 64px;
    border-radius: var(--md-sys-shape-corner-large);
  }

  .nav-links {
    border-color: var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-large);
    background: var(--md-sys-color-surface-container-high);
    box-shadow: var(--md-elevation-2);
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 112px;
  }

  .hero-panel {
    min-height: 380px;
  }

  .scroll-stack-card {
    --fold-card-height: auto;
    --fold-frame-height: min(76vw, 320px);
    width: min(100%, 620px);
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .section-band,
  .footer {
    width: min(100% - 24px, 1120px);
  }

  .topbar {
    width: calc(100% - 20px);
    padding: 0 8px 0 10px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .topbar-session {
    margin-left: 6px;
  }

  .hero {
    padding-bottom: 46px;
  }

  h1 {
    font-size: clamp(3.6rem, 19vw, 5.5rem);
  }

  .hero-text {
    margin-bottom: 24px;
  }

  .primary-action,
  .ghost-action {
    min-height: 48px;
  }

  .message-section,
  .qr-section {
    padding: 54px 0;
  }

  .message-gate,
  .message-form {
    padding: 18px;
  }

  .message-list {
    padding: 14px;
  }

  .scroll-stack-inner {
    padding-bottom: 96px;
  }

  .scroll-stack-card {
    margin-bottom: 28px;
    border-radius: var(--md-sys-shape-corner-extra-large);
  }

  .scroll-stack-card .qr-meta strong {
    font-size: clamp(1.2rem, 8.5vw, 2.65rem);
  }

  .footer {
    gap: 12px;
    text-align: center;
  }

  .changelog-panel {
    min-height: min(620px, calc(100svh - 32px));
    padding: 24px 20px 58px;
  }
}

/* Material Design 3 polish - media player, footer, direct QR display */
.topbar-user {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 6px;
  padding: 4px 5px 4px 14px;
  white-space: nowrap;
}

.topbar-user span,
.topbar-user strong,
.topbar-logout {
  display: inline-flex;
  height: 32px;
  align-items: center;
  line-height: 1;
}

.topbar-user span {
  padding: 0 2px;
  font-size: 0.78rem;
}

.topbar-user strong {
  min-width: 0;
  max-width: min(220px, 22vw);
  overflow: hidden;
  font-size: 0.92rem;
  text-overflow: ellipsis;
}

.topbar-logout {
  padding: 0 12px;
}

.music-player {
  top: 38px;
  left: 8px;
  display: grid;
  min-width: min(320px, 72vw);
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border: 0;
  border-radius: var(--md-sys-shape-corner-extra-large);
  background:
    linear-gradient(0deg, color-mix(in srgb, var(--md-sys-color-tertiary) 12%, transparent), transparent),
    var(--md-sys-color-surface-container-high);
  box-shadow: var(--md-elevation-2);
}

.music-player .signal-dot {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 8px;
  height: 8px;
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-primary);
  box-shadow: none;
}

.music-toggle {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: var(--md-sys-shape-corner-full);
  color: var(--md-sys-color-on-primary);
  background: var(--md-sys-color-primary);
  box-shadow: none;
  font-size: 1rem;
  font-weight: 800;
  transition: background-color 220ms var(--md-sys-motion-emphasized), transform 220ms var(--md-sys-motion-emphasized);
}

.music-toggle:hover,
.music-toggle:focus-visible {
  background: color-mix(in srgb, var(--md-sys-color-primary) 88%, var(--md-sys-color-on-primary));
  transform: translateY(-1px);
}

.music-player.is-playing .music-toggle {
  color: var(--md-sys-color-on-tertiary-container);
  background: var(--md-sys-color-tertiary-container);
}

.music-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.music-copy p,
.signal-card.music-player p {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
}

.music-copy strong {
  overflow: hidden;
  color: var(--md-sys-color-on-surface);
  font-family: var(--display-font);
  font-size: 1rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-copy small {
  color: var(--md-sys-color-primary);
  font-size: 0.76rem;
  font-weight: 700;
}

.footer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.footer > span:first-child {
  justify-self: start;
}

.footer .version-note {
  justify-self: center;
}

.footer > a {
  justify-self: end;
}

.changelog-credit {
  width: fit-content;
  max-width: 100%;
  margin: -12px 0 20px;
  padding: 8px 14px;
  border-radius: var(--md-sys-shape-corner-full);
  color: var(--md-sys-color-on-secondary-container);
  background: var(--md-sys-color-secondary-container);
  font-size: 0.88rem;
  font-weight: 700;
}

.qr-card {
  cursor: default;
}

.qr-cover {
  display: none;
}

.qr-frame img,
.qr-card:hover .qr-frame img,
.qr-card.is-hovered .qr-frame img,
.qr-card.is-revealed .qr-frame img,
.qr-card-bilibili:hover .qr-frame img,
.qr-card-bilibili.is-hovered .qr-frame img,
.qr-card-bilibili.is-revealed .qr-frame img {
  opacity: 1;
  filter: none;
  transform: scale(1);
}

.qr-card:hover .qr-frame,
.qr-card.is-hovered .qr-frame,
.qr-card.is-opening .qr-frame,
.qr-card:hover .qr-frame img,
.qr-card.is-hovered .qr-frame img,
.qr-card.is-opening .qr-frame img {
  animation: none;
}

.qr-frame::after {
  display: none;
}

.qr-meta {
  gap: 10px;
}

.qr-link-button {
  display: inline-flex;
  width: fit-content;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: var(--md-sys-shape-corner-full);
  color: var(--md-sys-color-on-primary);
  background: var(--md-sys-color-primary);
  font-size: 0.9rem;
  font-weight: 800;
  transition: background-color 220ms var(--md-sys-motion-emphasized), transform 220ms var(--md-sys-motion-emphasized);
}

.qr-link-button:hover,
.qr-link-button:focus-visible {
  color: var(--md-sys-color-on-primary);
  background: color-mix(in srgb, var(--md-sys-color-primary) 88%, var(--md-sys-color-on-primary));
  transform: translateY(-1px);
}

@media (max-width: 860px) {
  .topbar-user {
    max-width: min(43vw, 240px);
  }

  .topbar-user strong {
    max-width: min(145px, 24vw);
  }

  .music-player {
    top: 22px;
    left: 10px;
    min-width: min(300px, calc(100% - 20px));
  }
}

@media (max-width: 560px) {
  .topbar-user {
    max-width: min(39vw, 178px);
    gap: 4px;
    padding: 3px 4px 3px 10px;
  }

  .topbar-user span {
    display: none;
  }

  .topbar-user strong {
    max-width: min(98px, 22vw);
    font-size: 0.78rem;
  }

  .topbar-logout {
    height: 28px;
    padding: 0 8px;
    font-size: 0.72rem;
  }

  .music-player {
    position: relative;
    top: auto;
    left: auto;
    z-index: 4;
    align-self: start;
    justify-self: center;
    width: min(100%, 300px);
  }

  .footer {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .footer > span:first-child,
  .footer .version-note,
  .footer > a {
    justify-self: center;
  }

  .qr-link-button {
    width: 100%;
  }
}

/* Material Design 3 polish - topbar login alignment and direct email card */
.topbar-session {
  display: inline-flex;
  align-items: center;
}

.topbar-user {
  display: inline-grid;
  height: 48px;
  min-height: 48px;
  grid-template-columns: auto minmax(0, auto) auto;
  align-items: center;
  column-gap: 8px;
  padding: 4px 5px 4px 8px;
  box-sizing: border-box;
  line-height: 1;
}

.topbar-user span,
.topbar-user strong,
.topbar-logout {
  align-self: center;
  margin: 0;
  line-height: 1;
}

.topbar-user span {
  display: inline-grid;
  height: 32px;
  place-items: center;
  padding: 0 10px;
  border-radius: var(--md-sys-shape-corner-full);
  color: var(--md-sys-color-on-primary-container);
  background: color-mix(in srgb, var(--md-sys-color-primary-container) 78%, transparent);
  font-size: 0.78rem;
  font-weight: 800;
}

.topbar-user strong {
  display: inline-grid;
  height: 32px;
  max-width: min(230px, 23vw);
  place-items: center;
  overflow: hidden;
  color: var(--md-sys-color-on-secondary-container);
  font-size: 0.94rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-logout {
  display: inline-grid;
  height: 32px;
  min-height: 32px;
  place-items: center;
  padding: 0 13px;
  border-radius: var(--md-sys-shape-corner-full);
}

.qr-card-email.scroll-stack-card {
  display: grid;
  height: clamp(156px, calc(var(--fold-card-height) * 0.72), 236px);
  grid-template-columns: 1fr;
  align-items: stretch;
  padding: clamp(16px, 2.8vw, 24px);
  cursor: pointer;
}

.qr-card-email .qr-fold-label {
  top: clamp(18px, 4vw, 34px);
  left: clamp(18px, 4vw, 42px);
}

.email-direct {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  margin-inline: clamp(18px, 4vw, 42px);
  padding: 44px clamp(18px, 5vw, 44px) 24px;
  border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 16%, transparent);
  border-radius: calc(var(--md-sys-shape-corner-extra-large) - 6px);
  color: var(--md-sys-color-on-surface);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--md-sys-color-primary) 10%, transparent), transparent 46%),
    color-mix(in srgb, var(--md-sys-color-surface-container-high) 86%, transparent);
  text-decoration: none;
  transition: border-color 200ms var(--md-sys-motion-emphasized), background-color 200ms var(--md-sys-motion-emphasized), transform 200ms var(--md-sys-motion-emphasized);
}

.email-direct span {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.92rem;
  font-weight: 700;
}

.email-direct strong {
  overflow-wrap: anywhere;
  color: var(--md-sys-color-on-surface);
  font-size: clamp(1.42rem, 4.8vw, 2.45rem);
  font-style: normal;
  font-weight: 850;
  line-height: 1.08;
}

.email-direct em {
  width: fit-content;
  margin-top: 6px;
  padding: 8px 14px;
  border-radius: var(--md-sys-shape-corner-full);
  color: var(--md-sys-color-on-primary-container);
  background: var(--md-sys-color-primary-container);
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 800;
}

.qr-card-email:hover .email-direct,
.qr-card-email:focus-within .email-direct {
  border-color: color-mix(in srgb, var(--md-sys-color-primary) 46%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--md-sys-color-primary) 16%, transparent), transparent 52%),
    color-mix(in srgb, var(--md-sys-color-surface-container-high) 92%, transparent);
  transform: translateY(-1px);
}

@media (max-width: 860px) {
  .topbar-user {
    max-width: min(48vw, 290px);
  }

  .topbar-user strong {
    max-width: min(150px, 24vw);
  }
}

@media (max-width: 560px) {
  .topbar-user {
    height: 42px;
    min-height: 42px;
    max-width: min(42vw, 184px);
    column-gap: 5px;
    padding: 3px 4px 3px 8px;
  }

  .topbar-user span {
    display: none;
  }

  .topbar-user strong {
    height: 30px;
    max-width: min(106px, 23vw);
    font-size: 0.78rem;
  }

  .topbar-logout {
    height: 30px;
    min-height: 30px;
    padding: 0 9px;
    font-size: 0.72rem;
  }

  .qr-card-email.scroll-stack-card {
    height: clamp(148px, calc(var(--fold-card-height) * 0.84), 220px);
  }

  .email-direct {
    margin-inline: 0;
    padding: 42px 18px 20px;
  }

  .email-direct strong {
    font-size: clamp(1.24rem, 7vw, 1.76rem);
  }
}

/* Keep contact stack edges aligned while the cards still unfold vertically. */
.qr-stack[data-scroll-reveal-panel] {
  transform: translateY(calc((1 - var(--scroll-panel-progress)) * 28px));
  transform-origin: center top;
}

/* Ver 1.0 beta4 - launch polish */
.footer {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.footer-identity {
  display: inline-flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  justify-self: start;
}

.footer .icp-link {
  color: color-mix(in srgb, var(--md-sys-color-on-surface-variant) 84%, var(--md-sys-color-primary));
  font-weight: 700;
  text-decoration: none;
}

.footer .icp-link:hover,
.footer .icp-link:focus-visible {
  color: var(--md-sys-color-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.changelog-credit {
  display: inline-flex;
  width: auto;
  max-width: min(100%, 720px);
  align-items: center;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.qr-card-email.scroll-stack-card {
  height: var(--fold-card-height);
  grid-template-columns: minmax(180px, 0.62fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(14px, 3vw, 28px);
  padding: clamp(18px, 3vw, 28px);
}

.qr-card-email .qr-fold-label {
  top: clamp(18px, 4vw, 34px);
  left: clamp(18px, 4vw, 42px);
}

.qr-card-email .email-direct {
  position: relative;
  display: flex;
  width: min(100%, var(--fold-frame-height));
  height: var(--fold-frame-height);
  max-height: none;
  justify-self: center;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: clamp(28px, 4vw, 44px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 18%, var(--md-sys-color-outline-variant));
  border-radius: var(--md-sys-shape-corner-large);
  background:
    radial-gradient(circle at 22% 24%, color-mix(in srgb, var(--md-sys-color-primary) 18%, transparent), transparent 40%),
    linear-gradient(135deg, color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent), transparent 58%),
    var(--md-sys-color-surface-container-high);
  opacity: var(--fold-frame-opacity);
  transform: translateY(var(--fold-frame-shift)) scale(var(--fold-frame-scale));
  transition:
    opacity 120ms linear,
    transform 120ms linear,
    border-color 200ms var(--md-sys-motion-emphasized),
    background-color 200ms var(--md-sys-motion-emphasized);
}

.qr-card-email .email-direct::before {
  position: absolute;
  inset: auto 22px 22px auto;
  content: "MAIL";
  color: color-mix(in srgb, var(--md-sys-color-primary) 28%, transparent);
  font-family: var(--display-font);
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.8;
  pointer-events: none;
}

.qr-card-email .email-direct span,
.qr-card-email .email-direct strong,
.qr-card-email .email-direct em {
  position: relative;
  z-index: 1;
}

.qr-card-email .email-direct span {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.94rem;
  font-weight: 800;
}

.qr-card-email .email-direct strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--md-sys-color-on-surface);
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 850;
  line-height: 1.08;
}

.qr-card-email .email-direct em {
  width: fit-content;
  margin-top: 4px;
  padding: 9px 15px;
  border-radius: var(--md-sys-shape-corner-full);
  color: var(--md-sys-color-on-primary-container);
  background: var(--md-sys-color-primary-container);
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 800;
}

.qr-card-email .email-meta {
  align-self: center;
  gap: 12px;
  opacity: 1;
  transform: none;
}

.qr-card-email .email-meta strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: clamp(1.34rem, 3vw, 2.15rem);
  line-height: 1.12;
}

.qr-card-email .email-meta .qr-link-button {
  margin-top: 4px;
}

.qr-card-email:hover .email-direct,
.qr-card-email:focus-within .email-direct {
  border-color: color-mix(in srgb, var(--md-sys-color-primary) 48%, var(--md-sys-color-outline-variant));
  background:
    radial-gradient(circle at 22% 24%, color-mix(in srgb, var(--md-sys-color-primary) 24%, transparent), transparent 42%),
    linear-gradient(135deg, color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent), transparent 58%),
    var(--md-sys-color-surface-container-high);
}

@media (max-width: 860px) {
  .qr-card-email.scroll-stack-card {
    grid-template-columns: 1fr;
  }

  .qr-card-email .email-direct {
    width: min(100%, var(--fold-frame-height));
    height: var(--fold-frame-height);
  }

  .qr-card-email .email-meta {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .footer-identity {
    justify-content: center;
  }

  .changelog-credit {
    display: flex;
    width: 100%;
  }

  .qr-card-email .email-direct {
    width: 100%;
    min-height: 190px;
    padding: 28px 20px;
  }

  .qr-card-email .email-direct strong {
    font-size: clamp(1.18rem, 6.6vw, 1.65rem);
  }

.qr-card-email .email-meta strong {
    font-size: clamp(1.18rem, 7vw, 1.7rem);
  }
}

/* Toast - top slide notice, tuned for the dark Material 3 theme. */
.toast {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: auto;
  bottom: auto;
  left: 50%;
  z-index: 120;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: min(520px, calc(100vw - 28px));
  min-height: 48px;
  padding: 10px 18px 10px 12px;
  border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 34%, var(--md-sys-color-outline-variant));
  border-radius: var(--md-sys-shape-corner-full);
  color: var(--md-sys-color-on-surface);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--md-sys-color-primary) 16%, transparent), transparent 58%),
    color-mix(in srgb, var(--md-sys-color-surface-container-highest, var(--md-sys-color-surface-container-high)) 92%, #000);
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.34),
    0 0 34px color-mix(in srgb, var(--md-sys-color-primary) 18%, transparent);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -28px) scale(0.98);
  transition:
    opacity 220ms var(--md-sys-motion-decelerate, cubic-bezier(0, 0, 0.2, 1)),
    transform 260ms var(--md-sys-motion-emphasized, cubic-bezier(0.2, 0, 0, 1));
  backdrop-filter: blur(18px) saturate(1.2);
}

.toast::before {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: var(--md-sys-shape-corner-full);
  color: var(--md-sys-color-on-primary-container);
  background: var(--md-sys-color-primary-container);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--md-sys-color-primary) 18%, transparent);
  content: "i";
  font-family: var(--display-font);
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

@media (max-width: 560px) {
  .toast {
    top: max(12px, env(safe-area-inset-top));
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    min-height: 46px;
    padding-right: 14px;
    border-radius: var(--md-sys-shape-corner-extra-large);
    font-size: 0.9rem;
  }
}

/* Mobile polish after live-device checks. */
@media (max-width: 560px) {
  .topbar {
    top: max(10px, env(safe-area-inset-top));
    display: grid;
    height: 70px;
    grid-template-columns: minmax(0, 1fr) auto 54px;
    gap: 8px;
    padding: 0 10px;
    border-radius: 22px;
  }

  .brand {
    min-width: 0;
    gap: 8px;
  }

  .brand > span:last-child {
    overflow: hidden;
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
  }

  .topbar-session {
    min-width: 0;
    margin-left: 0;
    justify-self: end;
  }

  .topbar-login {
    min-height: 38px;
    padding: 0 14px;
    font-size: 0.82rem;
  }

  .topbar-user {
    height: 44px;
    min-height: 44px;
    max-width: 156px;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 6px;
    padding: 4px 5px 4px 12px;
  }

  .topbar-user span {
    display: none;
  }

  .topbar-user strong {
    height: 32px;
    max-width: 76px;
    justify-content: start;
    font-size: 0.82rem;
    line-height: 1;
  }

  .topbar-logout {
    height: 34px;
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .nav-toggle {
    width: 48px;
    height: 48px;
    justify-self: end;
  }

  .hero {
    padding-top: 96px;
  }

  .hero-panel {
    min-height: 590px;
    align-content: start;
    padding-top: 86px;
  }

  .music-player {
    top: 0;
    left: 50%;
    width: min(100% - 36px, 330px);
    min-width: 0;
    transform: translateX(-50%);
  }

  .profile-disc {
    width: min(70vw, 280px);
    margin-top: 118px;
  }

  .quick-info {
    right: 50%;
    bottom: 54px;
    width: min(100% - 42px, 330px);
    min-width: 0;
    transform: translateX(50%);
    animation: none;
  }

  .quick-info strong {
    max-width: 220px;
    font-size: 1.02rem;
    line-height: 1.2;
  }

  .qr-card.scroll-stack-card {
    overflow: visible;
  }

  .qr-card-douyin.scroll-stack-card,
  .qr-card-bilibili.scroll-stack-card,
  .qr-card-wechat.scroll-stack-card {
    min-height: 600px;
  }

  .scroll-stack-card .qr-frame {
    width: min(100%, 300px);
    height: min(76vw, 300px);
  }

  .scroll-stack-card .qr-meta {
    width: 100%;
  }

  .scroll-stack-card .qr-meta strong {
    font-size: clamp(1.5rem, 10vw, 2.45rem);
    line-height: 1.08;
  }

  .qr-link-button {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    font-size: 0.98rem;
  }

  .qr-card-email.scroll-stack-card {
    min-height: 500px;
  }

  .qr-card-email .email-direct {
    min-height: 220px;
  }

  .footer {
    display: grid;
    width: min(100% - 28px, 1120px);
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 12px;
    padding: 20px 0 max(18px, env(safe-area-inset-bottom));
    text-align: center;
  }

  .footer-identity {
    display: grid;
    justify-items: center;
    gap: 4px;
  }

  .footer .icp-link {
    white-space: nowrap;
    font-size: 0.82rem;
  }

  .footer .version-note {
    max-width: min(100%, 340px);
    white-space: normal;
    line-height: 1.35;
  }

  .footer > a {
    justify-self: center;
  }

  .changelog-panel {
    width: min(100% - 28px, 680px);
    max-height: calc(100svh - 42px);
    min-height: 0;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
    padding: 22px 18px 24px;
    border-radius: 28px;
  }

  .changelog-panel h2 {
    font-size: clamp(2.05rem, 12vw, 3.25rem);
    line-height: 1.05;
  }

  .changelog-close {
    top: 18px;
    right: 18px;
    width: 46px;
    height: 46px;
  }

  .changelog-date {
    margin: 8px 0 12px;
    font-size: 0.98rem;
    line-height: 1.45;
  }

  .changelog-credit {
    width: 100%;
    margin: 0 0 12px;
    padding: 9px 12px;
    justify-content: center;
    text-align: center;
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .changelog-scroll {
    max-height: none;
    padding: 0 4px 18px 0;
    gap: 12px;
  }

  .changelog-version {
    padding: 16px;
  }

  .changelog-version-head {
    align-items: start;
    gap: 8px;
  }

  .changelog-version h3 {
    font-size: 1.2rem;
  }

  .changelog-version ul {
    padding-left: 1.1em;
    font-size: 0.98rem;
    line-height: 1.65;
  }
}

/* Mobile flow fix after real-device screenshots: keep the avatar page inside the viewport. */
@media (max-width: 560px) {
  html,
  body,
  .site-shell {
    overflow-x: clip;
  }

  .hero {
    overflow: hidden;
  }

  .hero-panel {
    display: flex;
    min-height: auto;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 8px 0 46px;
    overflow: visible;
  }

  .hero-panel::before,
  .hero-panel::after {
    top: 90px;
    left: 50%;
    translate: -50% 0;
    transform-origin: center;
  }

  .hero-panel::before {
    width: min(96vw, 390px);
  }

  .hero-panel::after {
    width: min(78vw, 310px);
  }

  .music-player {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    z-index: 5;
    width: min(100% - 24px, 340px);
    min-width: 0;
    margin: 0 auto 2px;
    transform: none;
    translate: 0 0;
  }

  .profile-disc {
    width: min(74vw, 304px);
    margin: 0 auto;
    transform: none;
  }

  .quick-info {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    z-index: 6;
    width: min(100% - 28px, 340px);
    min-width: 0;
    margin: -4px auto 0;
    transform: none;
    translate: 0 0;
  }

  .quick-info strong {
    max-width: none;
  }

  .changelog-modal {
    align-items: center;
    padding: max(12px, env(safe-area-inset-top)) 0 max(12px, env(safe-area-inset-bottom));
  }

  .changelog-panel {
    width: min(calc(100vw - 32px), 680px);
    max-height: calc(100dvh - 32px);
    min-height: 0;
    grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
    padding: 20px 16px 18px;
    overflow: hidden;
  }

  .changelog-panel > .eyebrow {
    grid-row: 1;
  }

  .changelog-panel h2 {
    grid-row: 2;
    max-width: 100%;
    font-size: clamp(2rem, 10vw, 2.65rem);
    line-height: 1;
  }

  .changelog-date {
    grid-row: 3;
    font-size: 0.92rem;
  }

  .changelog-credit {
    display: block;
    grid-row: 4;
    max-width: 100%;
    margin: 0 0 12px;
    overflow-wrap: anywhere;
  }

  .changelog-scroll {
    grid-row: 5;
    min-height: 0;
    padding-right: 2px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .changelog-version {
    padding: 14px;
  }

  .changelog-version-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
  }

  .changelog-version h3 {
    font-size: clamp(1.15rem, 7vw, 1.5rem);
  }

  .changelog-version time {
    font-size: 0.92rem;
    white-space: nowrap;
  }

  .changelog-version ul {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .surprise-trigger {
    position: relative;
    right: auto;
    bottom: auto;
    grid-row: 6;
    justify-self: end;
    margin-top: 10px;
    padding: 0 4px;
    font-size: 0.9rem;
  }
}
