.kodehead-page {
  --kh-max: 1380px;
  /* The workbench consumes the same Expressive roles as the phone preview. */
  --md3-primary: var(--m3-primary, #d8f36a);
  --md3-on-primary: var(--m3-on-primary, #172000);
  --md3-primary-container: var(--m3-primary-container, #3d4f00);
  --md3-on-primary-container: var(--m3-on-primary-container, #e4ffa0);
  --md3-surface: var(--m3-surface, #11140f);
  --md3-surface-container: var(--m3-surface-container, #1b2016);
  --md3-outline: var(--m3-outline, #8b9472);
  background: var(--ink);
}

.kodehead-page [hidden] { display: none !important; }

.kodehead-page h1,
.kodehead-page h2,
.kodehead-page h3,
.kodehead-page p,
.kodehead-page a,
.kodehead-page button,
.kodehead-page dt,
.kodehead-page dd {
  letter-spacing: 0;
}

.detail-header {
  background: rgba(9, 10, 10, 0.9);
  border-bottom: 1px solid rgba(233, 232, 226, 0.1);
}

.detail-home {
  display: flex;
  align-items: center;
  gap: 14px;
}

.kodehead-page .wordmark {
  font: 500 13px/1 var(--mono);
  letter-spacing: 0.13em;
}

.detail-back {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(233, 232, 226, 0.22);
  color: var(--paper);
  font: 400 20px/1 var(--mono);
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 120ms ease;
}

.detail-back:hover,
.detail-back:focus-visible {
  border-color: var(--lime);
  background: rgba(216, 243, 106, 0.09);
  color: var(--lime);
}

.detail-back:active { transform: translateX(-2px); }

.kodehead-main {
  position: relative;
  z-index: 1;
}

.kh-hero,
.product-facts,
.kh-features,
.kh-source,
.kh-community,
.kh-download,
.kh-contact {
  width: min(var(--kh-max), calc(100% - 48px));
  margin-inline: auto;
}

.kh-hero {
  min-height: 92dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.72fr);
  align-items: center;
  gap: 7vw;
  padding-block: 92px 56px;
}

.kh-hero-copy {
  max-width: 730px;
}

.kh-brandline {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  color: var(--paper);
  font: 500 12px/1 var(--mono);
}

.kh-brandline img {
  width: 42px;
  height: 42px;
}

.kodehead-page h1 {
  margin-bottom: 28px;
  font-size: 76px;
  line-height: 1.02;
}

.kodehead-page h1 em {
  color: var(--lime);
  font-style: normal;
}

.kh-hero-copy > p {
  max-width: 560px;
  margin: 0 0 34px;
  color: #b4b8b0;
  font-size: 16px;
  line-height: 1.8;
}

.kh-hero-actions,
.contact-actions,
.release-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.kh-hero-asset {
  justify-self: end;
  width: min(36vw, 520px);
  transform: translateY(18px);
  box-shadow: 24px 24px 0 rgba(216, 243, 106, 0.14);
}

.kh-hero-asset .particle-fallback { object-fit: contain; }

.product-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.product-facts > div {
  min-width: 0;
  padding: 24px 20px;
  border-left: 1px solid var(--line);
  transition: background-color 180ms ease;
}

.product-facts > div:first-child {
  border-left: 0;
}
.product-facts > div:hover { background: rgba(216, 243, 106, 0.055); }
.product-facts > div:hover dt { color: var(--lime); }

.product-facts dt {
  margin-bottom: 8px;
  color: var(--muted);
  font: 400 10px/1 var(--mono);
  text-transform: uppercase;
}

.product-facts dd {
  margin: 0;
  color: var(--paper);
  font: 500 14px/1.3 var(--mono);
}

.kh-features,
.kh-source,
.kh-community,
.kh-download,
.kh-contact {
  padding-block: 150px;
}

.kh-features,
.kh-community,
.kh-download { scroll-margin-top: 86px; }

.section-intro {
  max-width: 850px;
  margin-bottom: 74px;
}

.kodehead-page h2 {
  font-size: 62px;
  line-height: 1.06;
}

.section-intro > p {
  max-width: 520px;
  margin: 26px 0 0;
  color: #aeb3aa;
  font-size: 15px;
  line-height: 1.8;
}

.section-kicker {
  margin: 0 0 18px !important;
  color: var(--md3-primary) !important;
  font: 600 11px/1 var(--mono) !important;
  letter-spacing: .12em !important;
  text-transform: uppercase;
}

.kh-source { scroll-margin-top: 86px; }

.source-workbench {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--md3-outline) 42%, transparent);
  background: var(--md3-surface);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .24);
}

.source-filebar {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 8px;
  border-bottom: 1px solid rgba(233, 232, 226, .12);
  background: var(--md3-surface-container);
}

.source-filebar button,
.source-toolbar button { border: 0; cursor: pointer; }

.source-filebar button {
  flex: 0 0 auto;
  padding: 11px 16px;
  color: var(--muted);
  background: transparent;
  font: 500 12px/1 var(--mono);
}

.source-filebar button[aria-selected="true"] {
  color: var(--md3-on-primary);
  background: var(--md3-primary);
}

.source-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  color: var(--muted);
  font: 11px/1 var(--mono);
}

.source-toolbar i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--md3-primary);
  box-shadow: 0 0 0 4px rgba(216, 243, 106, .12);
}

.source-toolbar button {
  padding: 8px 12px;
  color: var(--md3-on-primary-container);
  background: var(--md3-primary-container);
  font: 600 11px/1 var(--mono);
}

.source-toolbar button.is-copied { color: var(--md3-on-primary); background: var(--md3-primary); }

.source-code {
  max-height: 430px;
  margin: 0;
  padding: 22px clamp(18px, 3vw, 32px) 30px;
  overflow: auto;
  color: #dbe8bd;
  background: #0b0e0a;
  font: 13px/1.75 var(--mono);
  tab-size: 4;
}

.source-code code { white-space: pre; }

.feature-ledger {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  column-gap: 8vw;
}

.feature-ledger article {
  min-height: 190px;
  padding: 28px 0 46px;
  border-top: 1px solid rgba(233, 232, 226, 0.24);
}

.feature-ledger article:nth-child(even) {
  transform: translateY(56px);
}

.feature-ledger h3,
.install-guidance h3 {
  margin-bottom: 16px;
  color: var(--lime);
  font: 500 13px/1 var(--mono);
}

.feature-ledger p,
.install-guidance p {
  max-width: 46ch;
  margin: 0;
  color: #b5bab0;
  font-size: 14px;
  line-height: 1.8;
}

.kh-community {
  width: 100%;
  padding-inline: max(24px, calc((100% - var(--kh-max)) / 2));
  background: #13140d;
}

.inline-command {
  margin-top: 24px;
  padding: 0 0 5px;
  border: 0;
  border-bottom: 1px solid var(--lime);
  background: transparent;
  color: var(--lime);
  font: 500 12px/1 var(--mono);
  cursor: pointer;
}

.retro-stage {
  position: relative;
  min-height: 500px;
  border: 1px solid rgba(233, 232, 226, 0.22);
  background: #1b1c15;
  overflow: hidden;
}

.retro-source,
.retro-output {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.retro-source {
  pointer-events: none;
}

.retro-output {
  z-index: 2;
  pointer-events: none;
}

.retro-stage[data-canvasui="ready"] .retro-fallback {
  opacity: 0;
}

.community-surface {
  min-height: 500px;
  width: 100%;
  padding: 26px clamp(20px, 4vw, 56px);
  background: #1b1c15;
}

.retro-content {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.feed-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.feed-heading h3 {
  font-size: 18px;
  font-weight: 500;
}

.feed-heading span {
  color: var(--muted);
  font: 400 11px/1 var(--mono);
}

.feed-list {
  display: grid;
}

.feed-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  min-height: 128px;
  padding: 22px clamp(16px, 2vw, 24px);
  border-bottom: 1px solid rgba(233, 232, 226, 0.12);
}

.feed-avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: #2b3400;
  background: var(--lime);
  font: 600 18px/1 var(--mono);
}

.feed-author {
  margin: 0 0 8px;
  color: var(--muted);
  font: 400 11px/1.3 var(--mono);
}

.feed-item h4 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
}

.feed-preview {
  max-width: 72ch;
  margin: 0;
  overflow: hidden;
  color: #aeb3aa;
  font-size: 13px;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-metrics {
  display: flex;
  gap: 16px;
  color: #949990;
  font: 400 11px/1 var(--mono);
  white-space: nowrap;
}

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

.feed-item.is-loading {
  grid-template-columns: 52px minmax(0, 1fr);
}

.skeleton-block {
  background: rgba(233, 232, 226, 0.1);
  animation: skeleton-pulse 1.4s ease-in-out infinite alternate;
}

.feed-item.is-loading .feed-avatar {
  color: transparent;
  background: rgba(233, 232, 226, 0.1);
}

.feed-skeleton-copy {
  display: grid;
  gap: 12px;
}

.feed-skeleton-copy span:first-child {
  width: 28%;
  height: 10px;
}

.feed-skeleton-copy span:nth-child(2) {
  width: 68%;
  height: 18px;
}

.feed-skeleton-copy span:last-child {
  width: 88%;
  height: 12px;
}

@keyframes skeleton-pulse {
  from { opacity: 0.38; }
  to { opacity: 0.9; }
}

.release-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.7fr);
  gap: 8vw;
  align-items: start;
}

.release-panel {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 4vw, 52px);
  border: 2px solid rgba(233, 232, 226, 0.26);
  background: #0c0e0d;
  box-shadow: 14px 14px 0 rgba(216, 243, 106, 0.1);
}

.release-channel,
.release-version-label {
  margin: 0;
  color: var(--muted);
  font: 400 11px/1 var(--mono);
  text-transform: uppercase;
}

.release-loading {
  display: grid;
  gap: 18px;
  margin-block: 48px auto;
}

.release-loading span {
  display: block;
  height: 18px;
  background: rgba(233, 232, 226, 0.1);
  animation: skeleton-pulse 1.4s ease-in-out infinite alternate;
}

.release-loading span:nth-child(1) { width: 35%; }
.release-loading span:nth-child(2) { width: 75%; }
.release-loading span:nth-child(3) { width: 52%; }

.release-content {
  margin-block: 48px auto;
}

.release-content strong {
  display: block;
  margin-block: 10px 22px;
  color: var(--lime);
  font: 500 72px/1 var(--mono);
}

.release-notes,
.release-error {
  max-width: 52ch;
  margin: 0;
  color: #b4b9af;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-line;
}

.release-error {
  margin-block: 58px auto;
}

.release-actions {
  margin-top: 30px;
}

[data-download-link][aria-disabled="true"] {
  cursor: wait;
  opacity: 0.66;
}

.install-guidance {
  display: grid;
}

.install-guidance article {
  padding: 24px 0 32px;
  border-top: 1px solid var(--line);
}

[data-kh-card] {
  --kh-pointer-x: 50%;
  --kh-pointer-y: 50%;
  --kh-rx: 0deg;
  --kh-ry: 0deg;
  --kh-shadow-x: 14px;
  --kh-shadow-y: 14px;
}

[data-kh-card="select"] {
  position: relative;
  isolation: isolate;
  padding-inline: 18px;
  cursor: pointer;
  outline: none;
  background: transparent;
  transition: background-color 180ms ease;
}

.feature-ledger [data-kh-card="select"],
.install-guidance [data-kh-card="select"] {
  padding-inline: 22px;
  border-top-color: transparent;
}

[data-kh-card="select"]::before {
  content: "";
  position: absolute;
  inset: -1px 0 auto;
  z-index: 0;
  height: 1px;
  background: rgba(233, 232, 226, 0.24);
  transition: height 180ms ease, background-color 180ms ease;
}

[data-kh-card="select"] > :not(.kh-card-reticle) {
  position: relative;
  z-index: 1;
}

[data-kh-card="select"]:hover,
[data-kh-card="select"]:focus-visible { background: rgba(216, 243, 106, 0.05); }

[data-kh-card="select"]:hover::before,
[data-kh-card="select"]:focus-visible::before {
  height: 3px;
  background: rgba(216, 243, 106, 0.72);
}

[data-kh-card="select"].is-kh-selected { background: rgba(216, 243, 106, 0.13); }
[data-kh-card="select"].is-kh-selected::before {
  height: 4px;
  background: var(--lime);
}

[data-kh-card="depth"] {
  position: relative;
  isolation: isolate;
  transform: rotateX(var(--kh-rx)) rotateY(var(--kh-ry)) translateZ(0);
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 180ms ease-out, border-color 180ms ease, box-shadow 180ms ease;
}

[data-kh-card="depth"]:hover,
[data-kh-card="depth"].is-kh-tracking {
  border-color: rgba(216, 243, 106, 0.68);
  box-shadow: var(--kh-shadow-x) var(--kh-shadow-y) 0 rgba(216, 243, 106, 0.18);
}

.kh-card-reticle {
  position: absolute;
  top: var(--kh-pointer-y);
  left: var(--kh-pointer-x);
  z-index: 4;
  width: 30px;
  height: 30px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 120ms ease;
}

.kh-card-reticle::before,
.kh-card-reticle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: rgba(216, 243, 106, 0.8);
  transform: translate(-50%, -50%);
}
.kh-card-reticle::before { width: 1px; height: 30px; }
.kh-card-reticle::after { width: 30px; height: 1px; }
.is-kh-tracking > .kh-card-reticle { opacity: 1; }

.feed-item:not(.is-loading) {
  transition: background-color 180ms ease, transform 180ms ease;
}
.feed-item:not(.is-loading):hover {
  background: rgba(216, 243, 106, 0.05);
  transform: translateX(6px);
}

.kh-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8vw;
}

.kh-contact h2 {
  font-size: 54px;
}

.contact-actions {
  justify-content: flex-end;
}

.kodehead-page :focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 4px;
}

.m3-drive-fab .material-symbols-rounded { font-size: 24px; }

@media (max-width: 980px) {
  .kodehead-page h1 { font-size: 60px; }
  .kodehead-page h2 { font-size: 50px; }
  .kh-hero { grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr); }
  .feature-ledger { column-gap: 6vw; }
  .release-layout { grid-template-columns: 1fr; }
  .kh-contact { grid-template-columns: 1fr; align-items: start; }
  .contact-actions { justify-content: flex-start; }
}

@media (max-width: 680px) {
  .kh-hero,
  .product-facts,
  .kh-features,
  .kh-download,
  .kh-contact {
    width: calc(100% - 32px);
  }

  .kh-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 34px;
    padding-block: 86px 48px;
  }

  .kodehead-page h1 { font-size: 44px; }
  .kodehead-page h2,
  .kh-contact h2 { font-size: 38px; }
  .kh-hero-copy > p { font-size: 14px; }
  .kh-hero-asset { justify-self: start; width: min(72vw, 280px); transform: none; }
  .product-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-facts > div:nth-child(3) { border-left: 0; }
  .product-facts > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .product-facts dd { font-size: 12px; }
  .kh-features,
  .kh-community,
  .kh-download,
  .kh-contact { padding-block: 104px; }
  .section-intro { margin-bottom: 50px; }
  .feature-ledger { grid-template-columns: 1fr; }
  .feature-ledger article { min-height: 0; }
  .feature-ledger [data-kh-card="select"],
  .install-guidance [data-kh-card="select"] { padding-inline: 18px; }
  .feature-ledger article:nth-child(even) { transform: none; }
  .retro-stage,
  .community-surface { min-height: 560px; }
  .community-surface { padding: 20px 16px; }
  .feed-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .feed-item { grid-template-columns: 42px minmax(0, 1fr); gap: 14px; padding-inline: 12px; }
  .feed-avatar { width: 42px; height: 42px; font-size: 15px; }
  .feed-metrics { grid-column: 2; }
  .feed-preview { max-width: 100%; }
  .release-panel { min-height: 430px; }
  .release-content strong { font-size: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  .kh-hero-asset { transform: none; }
  [data-kh-card="depth"] { transform: none !important; will-change: auto; }
  .skeleton-block,
  .release-loading span { animation: none; }
}

@media (hover: none) {
  .kh-card-reticle { display: none; }
  .feed-item:not(.is-loading):hover { transform: none; }
}

/* ── Compose interactive demos · Material 3 Expressive ── */
.kh-hero-phone {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.kh-phone-hint {
  margin: 0;
  color: rgba(233, 232, 226, 0.55);
  font: 400 12px/1.4 var(--mono);
  letter-spacing: 0.04em;
}

.kh-compose code {
  font: 500 0.92em/1.4 var(--mono);
  color: var(--lime);
}

/* Material Theme Builder export: seed #D8F36A · dark scheme */
.m3-phone {
  --m3-seed: #d8f36a;
  --m3-primary: #bfce7f;
  --m3-on-primary: #2b3400;
  --m3-primary-container: #404c0a;
  --m3-on-primary-container: #daea98;
  --m3-secondary: #c5caa8;
  --m3-secondary-container: #444930;
  --m3-tertiary: #a1d0c4;
  --m3-tertiary-container: #214e45;
  --m3-surface: #13140d;
  --m3-surface-dim: #13140d;
  --m3-surface-bright: #393a31;
  --m3-surface-container-lowest: #0e0f08;
  --m3-surface-container-low: #1b1c15;
  --m3-surface-container: #1f2019;
  --m3-surface-container-high: #2a2b23;
  --m3-surface-container-highest: #34352d;
  --m3-on: #e4e3d7;
  --m3-on-variant: #c7c8b8;
  --m3-outline: #919283;
  --m3-outline-variant: #46483c;
  --m3-like: #ffb4ab;
  --m3-large: 20px;
  --m3-small: 4px;
  --m3-gap: 2px;
  --m3-spring: cubic-bezier(0.2, 0, 0, 1);
  --m3-spring-emph: cubic-bezier(0.05, 0.7, 0.1, 1);
  --m3-font: "Roboto", "Noto Sans SC", "PingFang SC", "Segoe UI", sans-serif;
  position: relative;
  width: min(360px, 100%);
  height: 640px;
  border-radius: 36px;
  background: var(--m3-surface);
  border: 1px solid color-mix(in srgb, var(--m3-outline-variant) 70%, transparent);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 28px 70px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  color: var(--m3-on);
  font-family: var(--m3-font);
}

.m3-phone.tall { height: 680px; }

.m3-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px 4px;
  font: 600 12px/1 var(--m3-font);
  color: var(--m3-on);
}

.m3-status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}
.m3-status-icons i {
  display: block;
  height: 8px;
  border-radius: 2px;
  background: var(--m3-on);
  opacity: 0.85;
}
.m3-status-icons i:nth-child(1) { width: 14px; }
.m3-status-icons i:nth-child(2) { width: 10px; }
.m3-status-icons i:nth-child(3) { width: 18px; border-radius: 3px; }

.m3-topbar { padding: 10px 16px 12px; }

/* ContainedSearchBar 收缩态 */
.m3-search {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 20px;
  border: 0;
  border-radius: 28px;
  background: var(--m3-surface-container-high);
  color: var(--m3-on-variant);
  cursor: pointer;
  text-align: left;
  font: 500 16px/1 var(--m3-font);
  transition: background-color 220ms var(--m3-spring), transform 220ms var(--m3-spring-emph);
}
.m3-search:hover { background: var(--m3-surface-container-highest); }
.m3-search:active { transform: scale(0.985); }

.m3-search-icon {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
  position: relative;
  opacity: 0.9;
}
.m3-search-icon::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  background: currentColor;
  right: -6px;
  bottom: -3px;
  transform: rotate(45deg);
  border-radius: 1px;
}

.m3-feed {
  display: grid;
  gap: var(--m3-gap);
  padding: 0 16px 88px;
  height: calc(100% - 168px);
  overflow: auto;
  scrollbar-width: none;
}
.m3-feed::-webkit-scrollbar { display: none; }

.m3-post {
  background: var(--m3-surface-container-high);
  border-radius: var(--m3-small);
  padding: 16px;
  transition: transform 280ms var(--m3-spring-emph), background-color 220ms var(--m3-spring);
}
.m3-post.is-first {
  border-radius: var(--m3-large) var(--m3-large) var(--m3-small) var(--m3-small);
}
.m3-post.is-last {
  border-radius: var(--m3-small) var(--m3-small) var(--m3-large) var(--m3-large);
}
.m3-post.is-first.is-last { border-radius: var(--m3-large); }

.m3-post header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.m3-post header div { display: grid; gap: 2px; }
.m3-post header strong { font-size: 14px; font-weight: 600; }
.m3-post header small { color: var(--m3-on-variant); font-size: 12px; }
.m3-post h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.m3-post p {
  margin: 0;
  color: var(--m3-on-variant);
  font-size: 13px;
  line-height: 1.45;
}
.m3-post footer {
  margin-top: 14px;
  display: flex;
  gap: 16px;
  align-items: center;
  color: var(--m3-on-variant);
  font-size: 12px;
  font-weight: 500;
}

.m3-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--m3-primary-container);
  color: var(--m3-on-primary-container);
  font: 700 14px/1 var(--m3-font);
}
.m3-avatar.tone-2 {
  background: var(--m3-secondary-container);
  color: var(--m3-secondary);
}
.m3-avatar.tone-3 {
  background: color-mix(in srgb, var(--m3-tertiary) 28%, var(--m3-surface-container));
  color: var(--m3-tertiary);
}

.m3-like {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 4px 0;
  font: inherit;
}
.m3-like.is-on { color: var(--m3-like); }
.m3-like span {
  display: inline-block;
  transition: transform 320ms var(--m3-spring-emph);
}
.m3-like.is-on span { transform: scale(1.22); }

/* SectionPage and DrivePage keep their native layouts in the phone preview. */
.m3-feed.is-section-view,
.m3-feed.is-drive-view { display: block; padding-top: 8px; }
.m3-board-head,
.m3-drive-head,
.m3-drive-section { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.m3-board-head strong,
.m3-drive-head strong { font-size: 22px; }
.m3-board-head button,
.m3-drive-head button,
.m3-drive-section button { border: 0; background: var(--m3-surface-container-high); color: var(--m3-on); border-radius: 50%; width: 34px; height: 34px; }
.m3-board-group { margin: 0 0 16px; }
.m3-board-group > span { display: block; margin: 0 0 7px 4px; color: var(--m3-on-variant); font-size: 12px; font-weight: 600; }
.m3-board-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.m3-board-card { position: relative; min-height: 84px; padding: 13px; overflow: hidden; border-radius: 16px; background: var(--m3-surface-container-high); }
.m3-board-card.board-large { grid-column: span 2; min-height: 106px; background: var(--m3-primary-container); color: var(--m3-on-primary-container); }
.m3-board-card.board-ai { background: var(--m3-tertiary-container); color: var(--m3-on-primary-container); }
.m3-board-card.board-resource { background: var(--m3-secondary-container); color: var(--m3-on-primary-container); }
.m3-board-card.board-small { min-height: 62px; }
.m3-board-card b { display: block; margin-bottom: 5px; font-size: 14px; }.m3-board-card small { display: block; max-width: 85%; color: var(--m3-on-variant); font-size: 11px; line-height: 1.35; }.m3-board-card em { position: absolute; right: 12px; bottom: 8px; color: var(--m3-primary); font: 700 26px/1 var(--m3-font); font-style: normal; opacity: .8; }
.m3-drive-head { margin-bottom: 14px; }.m3-drive-head small { display: block; margin-top: 3px; color: var(--m3-on-variant); font-size: 12px; }
.m3-drive-quota { padding: 15px; margin-bottom: 12px; border-radius: 18px; background: var(--m3-primary-container); color: var(--m3-on-primary-container); }.m3-drive-quota > div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }.m3-drive-quota span { font-size: 12px; }.m3-drive-quota b { font-size: 18px; }.m3-drive-quota b small { font-size: 11px; opacity: .75; }.m3-drive-quota i { display: block; height: 7px; margin: 12px 0 10px; overflow: hidden; border-radius: 8px; background: color-mix(in srgb, var(--m3-on-primary-container) 24%, transparent); }.m3-drive-quota u { display: block; width: 24%; height: 100%; border-radius: inherit; background: var(--m3-primary); text-decoration: none; }.m3-drive-quota button { border: 0; padding: 7px 11px; border-radius: 16px; color: var(--m3-on-primary); background: var(--m3-primary); font-size: 11px; font-weight: 600; }
.m3-drive-chips { display: flex; gap: 5px; overflow: hidden; margin: 0 -2px 16px; white-space: nowrap; }.m3-drive-chips span, .m3-drive-chips b { padding: 7px 10px; border-radius: 14px; background: var(--m3-surface-container-high); color: var(--m3-on-variant); font-size: 10px; font-weight: 500; }.m3-drive-chips b { background: var(--m3-primary); color: var(--m3-on-primary); }
.m3-drive-section { margin-bottom: 7px; }.m3-drive-section strong { font-size: 15px; }.m3-drive-files { display: grid; gap: 3px; }.m3-drive-files > div { display: flex; align-items: center; gap: 10px; min-height: 53px; padding: 8px 10px; border-radius: 8px; background: var(--m3-surface-container-high); }.m3-drive-files > div:first-child { border-radius: 16px 16px 8px 8px; }.m3-drive-files > div:last-child { border-radius: 8px 8px 16px 16px; }.m3-drive-files i { width: 27px; height: 27px; border-radius: 8px; background: var(--m3-primary-container); }.m3-drive-files i.code { background: var(--m3-tertiary-container); }.m3-drive-files i.image { background: var(--m3-secondary-container); }.m3-drive-files b { display: grid; gap: 2px; flex: 1; font-size: 12px; }.m3-drive-files small { color: var(--m3-on-variant); font-size: 10px; font-weight: 400; }.m3-drive-files span { color: var(--m3-on-variant); }.m3-drive-fab { position: absolute; right: 18px; bottom: 88px; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; color: var(--m3-on-primary); background: var(--m3-primary); box-shadow: 0 5px 14px rgba(0,0,0,.25); font-size: 25px; }

/* ShortNavigationBar · expressive active pill */
.m3-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--m3-surface-container) 92%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--m3-outline-variant) 55%, transparent);
  backdrop-filter: blur(20px);
}
.m3-bottom button {
  border: 0;
  background: transparent;
  color: var(--m3-on-variant);
  min-height: 56px;
  cursor: pointer;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 0;
  font: 600 12px/1 var(--m3-font);
}
.m3-nav-pill {
  width: 64px;
  height: 32px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: transparent;
  transition:
    background-color 280ms var(--m3-spring),
    width 320ms var(--m3-spring-emph),
    transform 280ms var(--m3-spring-emph);
}
.m3-bottom button.is-active {
  color: var(--m3-on);
}
.m3-bottom button.is-active .m3-nav-pill {
  background: var(--m3-secondary-container);
  width: 72px;
  transform: scale(1.04);
}
.m3-bottom button.is-active .m3-nav-label {
  color: var(--m3-on);
  font-weight: 700;
}
.m3-nav-label { font-size: 12px; letter-spacing: 0.02em; }

.m3-nav-ico {
  width: 18px;
  height: 18px;
  display: block;
  background: currentColor;
  opacity: 0.92;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}
.m3-nav-ico.ico-home {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E");
}
.m3-nav-ico.ico-grid {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h7v7H4V4zm9 0h7v7h-7V4zM4 13h7v7H4v-7zm9 0h7v7h-7v-7z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h7v7H4V4zm9 0h7v7h-7V4zM4 13h7v7H4v-7zm9 0h7v7h-7v-7z'/%3E%3C/svg%3E");
}
.m3-nav-ico.ico-cloud {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M19.35 10.04A7.49 7.49 0 0 0 12 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 0 0 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M19.35 10.04A7.49 7.49 0 0 0 12 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 0 0 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z'/%3E%3C/svg%3E");
}
@font-face {
  font-family: 'Material Symbols Rounded';
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
  src: url('./assets/fonts/material-symbols-rounded.woff2') format('woff2');
}

.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: 400;
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'liga';
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.m3-nav-ico.material-symbols-rounded { width: 20px; height: 20px; background: none; mask: none; -webkit-mask: none; }
.m3-board-card em.material-symbols-rounded { font-family: 'Material Symbols Rounded'; font-size: 27px; font-weight: 400; font-style: normal; line-height: 1; font-feature-settings: 'liga'; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; }

.m3-search-overlay {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--m3-surface) 55%, transparent);
  display: grid;
  place-items: stretch;
  padding: 0;
  z-index: 5;
  animation: m3-fade-in 220ms var(--m3-spring);
}
.m3-search-page {
  margin-top: 0;
  height: 100%;
  border-radius: 0;
  background: var(--m3-surface);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  animation: m3-sheet-in 360ms var(--m3-spring-emph);
}
.m3-search-field {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 48px 16px 12px;
  background: var(--m3-surface-container);
}
.m3-search-field .m3-icon-btn.filled {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  background: var(--m3-surface-container-high);
  color: var(--m3-on);
  border: 0;
  cursor: pointer;
  font-size: 18px;
}
.m3-search-field input {
  flex: 1;
  min-height: 56px;
  border-radius: 28px;
  border: 0;
  background: var(--m3-surface-container-highest);
  color: var(--m3-on);
  padding: 0 20px;
  font: 500 16px/1 var(--m3-font);
}
.m3-search-results {
  display: grid;
  gap: var(--m3-gap);
  padding: 12px 16px 24px;
  align-content: start;
  background: var(--m3-surface);
}
.m3-hit {
  border: 0;
  text-align: left;
  background: var(--m3-surface-container-high);
  color: var(--m3-on);
  border-radius: var(--m3-small);
  min-height: 56px;
  padding: 0 16px;
  cursor: pointer;
  font: 500 14px/1.2 var(--m3-font);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 220ms var(--m3-spring-emph);
}
.m3-hit:active { transform: scale(0.985); }
.m3-hit.is-first { border-radius: var(--m3-large) var(--m3-large) var(--m3-small) var(--m3-small); }
.m3-hit.is-last { border-radius: var(--m3-small) var(--m3-small) var(--m3-large) var(--m3-large); }

.m3-file-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--m3-secondary-container);
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}
.m3-file-ico.folder { background: color-mix(in srgb, #8ab4ff 28%, var(--m3-surface-container)); }
.m3-file-ico.code { background: color-mix(in srgb, var(--m3-primary) 28%, var(--m3-surface-container)); }
.m3-file-ico.image { background: color-mix(in srgb, var(--m3-tertiary) 28%, var(--m3-surface-container)); }
.m3-file-ico.archive { background: color-mix(in srgb, #e0c3ff 28%, var(--m3-surface-container)); }

.kh-compose {
  width: min(var(--kh-max), calc(100% - 48px));
  margin: 0 auto 96px;
}

.compose-stage { display: grid; gap: 28px; }

.compose-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.compose-tabs button {
  border: 0;
  background: var(--m3-surface-container-high, #2b2930);
  color: var(--paper);
  min-height: 40px;
  padding: 0 18px;
  border-radius: 20px;
  cursor: pointer;
  font: 500 14px/1 var(--m3-font, "Roboto", sans-serif);
  transition: background-color 220ms cubic-bezier(0.2, 0, 0, 1), color 220ms cubic-bezier(0.2, 0, 0, 1), transform 220ms cubic-bezier(0.05, 0.7, 0.1, 1);
}
.compose-tabs button[aria-selected="true"] {
  background: #bfce7f;
  color: #2b3400;
  transform: scale(1.03);
}

.compose-panels { display: grid; }
.compose-panel {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
.compose-panel[hidden] { display: none !important; }
.compose-caption h3 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}
.compose-caption p {
  margin: 0;
  max-width: 38ch;
  color: rgba(233,232,226,.72);
  font-size: 17px;
  line-height: 1.55;
}

.m3-files-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 16px 10px;
  padding: 14px 16px;
  border-radius: var(--m3-large) var(--m3-large) var(--m3-small) var(--m3-small);
  background: var(--m3-surface-container-high);
}
.m3-files-header strong { font-size: 16px; font-weight: 600; }
.m3-icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--m3-on);
  cursor: pointer;
  font-size: 18px;
  transition: background-color 180ms var(--m3-spring);
}
.m3-icon-btn:hover { background: color-mix(in srgb, var(--m3-on) 8%, transparent); }
.m3-icon-btn .material-symbols-rounded { font-size: 21px; vertical-align: middle; }

.m3-files {
  display: grid;
  gap: var(--m3-gap);
  padding: 0 16px 18px;
  transition: gap 280ms var(--m3-spring);
}
.m3-files[data-layout="flow"] {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.m3-file {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 0;
  background: var(--m3-surface-container-high);
  color: var(--m3-on);
  text-align: left;
  padding: 14px 16px;
  border-radius: var(--m3-small);
  cursor: pointer;
  transition:
    border-radius 320ms var(--m3-spring-emph),
    transform 220ms var(--m3-spring-emph),
    outline-color 180ms var(--m3-spring);
}
.m3-files[data-layout="list"] .m3-file.is-first {
  border-radius: var(--m3-large) var(--m3-large) var(--m3-small) var(--m3-small);
}
.m3-files[data-layout="list"] .m3-file.is-last {
  border-radius: var(--m3-small) var(--m3-small) var(--m3-large) var(--m3-large);
}
.m3-files[data-layout="flow"] .m3-file {
  border-radius: var(--m3-large);
  min-height: 118px;
  flex-direction: column;
  align-items: flex-start;
}
.m3-file.is-selected {
  outline: 2px solid var(--m3-primary);
  outline-offset: 0;
}
.m3-file span { display: grid; gap: 4px; }
.m3-file b { font-size: 14px; font-weight: 600; }
.m3-file small { color: var(--m3-on-variant); font-size: 12px; }

.toolbar-demo .m3-post-body,
.ai-demo .m3-post-body {
  padding: 20px 20px 130px;
}
.m3-post-body h3 { margin: 0 0 10px; font-size: 22px; font-weight: 600; }
.m3-post-body p { margin: 0; color: var(--m3-on-variant); line-height: 1.5; }
.m3-post-body.dim { opacity: .55; }

/* HorizontalFloatingToolbar · CircleShape */
.m3-fabbar {
  position: absolute;
  left: 16px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px;
  width: max-content;
  max-width: calc(100% - 32px);
  border-radius: 999px;
  background: var(--m3-surface-container-highest);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition:
    width 360ms var(--m3-spring-emph),
    transform 280ms var(--m3-spring-emph),
    padding 280ms var(--m3-spring);
}
.m3-fabbar[data-mode="expanded"],
.m3-fabbar[data-mode="ai"] {
  left: 16px;
  right: 16px;
  width: auto;
  padding: 8px 8px 8px 12px;
}
.m3-fabbar[data-mode="ai"] { justify-content: flex-end; margin-left: auto; left: auto; width: min(320px, calc(100% - 32px)); }
.m3-fabbar[data-mode="expanded"] > button:not([data-fab-close]):not([data-fab-send]),
.m3-fabbar[data-mode="expanded"] > [data-fab-close] { display: none; }
.m3-fabbar[data-mode="expanded"] .m3-fab-input { display: flex !important; }
.m3-fabbar button {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: var(--m3-on);
  cursor: pointer;
  font-size: 18px;
  transition: background-color 180ms var(--m3-spring), color 180ms var(--m3-spring), transform 240ms var(--m3-spring-emph);
}
.m3-fabbar button:hover { background: color-mix(in srgb, var(--m3-on) 8%, transparent); }
.m3-fabbar button[aria-pressed="true"] { color: var(--m3-like); }
.m3-fabbar button .material-symbols-rounded { font-size: 22px; vertical-align: middle; }
.m3-fab-input {
  flex: 1;
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}
.m3-fab-input[hidden] { display: none !important; }
.m3-fab-input input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--m3-on);
  padding: 0 8px;
  font: 500 15px/1 var(--m3-font);
}
.m3-fab-input [data-fab-close] { flex: 0 0 40px; width: 40px; height: 40px; }
.m3-fab-input [data-fab-close] .material-symbols-rounded,
.m3-fab-input [data-fab-send] .material-symbols-rounded { font-size: 21px; }
.m3-fabbar[data-mode="ai"] > button:not([data-fab-send]):not([data-fab-ai]) { display: none; }
.m3-fabbar[data-mode="ai"] .m3-fab-input { display: flex !important; }
.m3-fabbar[data-mode="collapsed"] .m3-fab-input { display: none !important; }
.m3-fabbar [data-fab-send] {
  background: var(--m3-primary);
  color: var(--m3-on-primary);
}

.m3-toolbar-ai-sheet {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  z-index: 4;
  display: grid;
  gap: 8px;
  padding: 10px 14px 14px;
  border-radius: 24px;
  background: var(--m3-surface-container-highest);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
  transform: translateY(115%) scale(.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 360ms var(--m3-spring-emph), opacity 240ms var(--m3-spring);
}
.toolbar-demo.is-ai-chat .m3-toolbar-ai-sheet { transform: none; opacity: 1; pointer-events: auto; }
.toolbar-demo.is-ai-chat .m3-fabbar { transform: translateY(14px) scale(.92); opacity: .35; pointer-events: none; }
.m3-toolbar-ai-heading { display: flex; align-items: center; justify-content: space-between; }
.m3-toolbar-ai-heading strong { font-size: 16px; }.m3-toolbar-ai-heading button { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; color: var(--m3-on); background: transparent; }
.m3-toolbar-ai-sheet .m3-ai-bubble { padding: 9px 11px; font-size: 12px; }

.m3-blur-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  transition: backdrop-filter 320ms var(--m3-spring);
}
.ai-demo.is-ai-open .m3-blur-layer { backdrop-filter: blur(12px); }
.ai-demo .m3-status,
.ai-demo .m3-post-body { position: relative; z-index: 0; }

.m3-ai-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 18%;
  z-index: 2;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px 16px 88px;
  border-radius: 28px 28px 0 0;
  background: var(--m3-surface-container-low);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
  transform-origin: 50% 100%;
  transition:
    transform 360ms var(--m3-spring-emph),
    opacity 280ms var(--m3-spring),
    filter 280ms var(--m3-spring);
}
.m3-ai-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  margin: 4px auto 8px;
  background: var(--m3-outline-variant);
}
.m3-ai-tip {
  margin: 0 0 4px;
  color: var(--m3-on-variant);
  font-size: 12px;
}
.m3-ai-bubble {
  max-width: 92%;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.45;
}
.m3-ai-bubble.assistant {
  background: var(--m3-surface-container-highest);
  border-bottom-left-radius: 6px;
}
.m3-ai-bubble.user {
  justify-self: end;
  background: var(--m3-primary-container);
  color: var(--m3-on-primary-container);
  border-bottom-right-radius: 6px;
}
.m3-ai-controls {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  display: flex;
  gap: 8px;
}
.m3-ai-controls button {
  flex: 1;
  min-height: 44px;
  border: 0;
  border-radius: 22px;
  cursor: pointer;
  font: 600 13px/1 var(--m3-font);
  background: var(--m3-secondary-container);
  color: var(--m3-secondary);
}
.m3-ai-controls [data-ai-back] {
  background: var(--m3-primary);
  color: var(--m3-on-primary);
}
.ai-demo:not(.is-ai-open) .m3-ai-sheet {
  opacity: 0;
  transform: translateY(24%) scale(0.94);
  pointer-events: none;
}
.ai-demo.is-backing .m3-ai-sheet {
  opacity: 0.55;
  transform: scale(0.9) translateY(8%);
  filter: blur(1px);
}

@keyframes m3-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes m3-sheet-in {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 980px) {
  .compose-panel { grid-template-columns: 1fr; gap: 28px; }
  .compose-panel .m3-phone { margin-inline: auto; }
}

@media (max-width: 680px) {
  .kh-compose { width: calc(100% - 32px); }
  .m3-phone { height: 580px; }
  .m3-phone.tall { height: 620px; }
}

@media (prefers-reduced-motion: reduce) {
  .m3-search,
  .m3-like span,
  .m3-nav-pill,
  .m3-file,
  .m3-fabbar,
  .m3-ai-sheet,
  .compose-tabs button {
    transition: none !important;
    animation: none !important;
  }
}

/* ------------------------------------------------------------
   SKY
   The index has the black hole; the detail pages get a body of
   their own. The canvas is decorative, so the gradient under it
   is the whole no-WebGL story — the page never sits on bare ink.
   ------------------------------------------------------------ */
.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  contain: strict;
  background:
    radial-gradient(
      120% 90% at 78% 96%,
      rgba(87, 100, 33, 0.22) 0%,
      rgba(19, 20, 13, 0) 62%),
    radial-gradient(60% 50% at 20% 8%, rgba(199, 200, 184, 0.05) 0%, rgba(19, 20, 13, 0) 70%),
    var(--ink);
}
.sky[data-sky="station"] {
  background:
    radial-gradient(
      42% 34% at 74% 26%,
      rgba(199, 200, 184, 0.16) 0%,
      rgba(19, 20, 13, 0) 64%),
    radial-gradient(90% 70% at 12% 92%, rgba(87, 100, 33, 0.14) 0%, rgba(19, 20, 13, 0) 68%),
    var(--ink);
}
.sky-canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 900ms ease;
}
.sky[data-sky-state="ready"] .sky-canvas { opacity: 1; }
.sky[data-sky-state="fallback"] .sky-canvas { display: none; }

/* Keeps body copy off the brightest part of the sky without
   flattening the scene: the veil is heaviest where text is. */
.sky-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(19, 20, 13, 0.66) 0%,
    rgba(19, 20, 13, 0.24) 24%,
    rgba(19, 20, 13, 0.22) 64%,
    rgba(19, 20, 13, 0.54) 100%);
}

/* The body can be turned by hand, so the page needs the two states any
   draggable surface needs — and one line admitting it is draggable. */
html.sky-turning,
html.sky-turning body {
  cursor: grabbing;
  user-select: none;
}
.sky-hint {
  position: absolute;
  right: clamp(16px, 4vw, 44px);
  bottom: 20px;
  margin: 0;
  color: rgba(233, 232, 226, 0.34);
  font: 400 10px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity 600ms ease;
}
.sky-hint[data-seen] { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .sky-hint { transition: none; }
}

