/* =========================================================
   Flank for Windows · 产品宣传页
   便签栏的设计与动效以 src/features/dock/DockView.vue 为基准。
   ========================================================= */

/* 站酷快乐体 2016：取自 public/fonts，用作页面的中文展示字体 */
@font-face {
  font-family: "ZCOOL Happy";
  src: url("fonts/zcool-happy-2016.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root {
  /* 品牌色：取自 Flank 标志的流动渐变 */
  --brand-teal: #5dd3c8;
  --brand-blue: #5891e8;
  --brand-purple: #a98be0;
  --brand-pink: #ff9eb5;
  --brand-coral: #ff8a5c;
  --brand-gold: #ffd56e;
  --brand-gradient: linear-gradient(#354b40, #354b40);
  --brand-gradient-wide: linear-gradient(#728676, #728676);
  --brand-ink: #405747;

  /* 便签纸色：与项目 noteColorService 的 HSL 一致 */
  --note-lemon: #ffe57a;
  --note-peach: #ffb8a7;
  --note-rose: #f5b8cd;
  --note-lilac: #d8c1ff;
  --note-sky: #aed6ff;
  --note-mint: #a9e5d1;

  --surface: #fbfaf9;
  --surface-2: #f5f3ef;
  --surface-3: #eeece7;
  --ink: #171614;
  --ink-2: #5c5850;
  --ink-3: #8c877d;
  --line: rgba(23, 22, 20, 0.1);
  --line-strong: rgba(23, 22, 20, 0.18);
  --radius: 18px;
  --radius-lg: 26px;
  --shell: 1240px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-back: cubic-bezier(0.34, 1.42, 0.52, 1);
  /* 快乐体统一中英文与控件；系统字体仅用于加载失败或缺字回退。 */
  --font: "ZCOOL Happy", "Microsoft YaHei", sans-serif;
  --font-display: var(--font);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 展示字体只有常规字重；标题保持 500，避免浏览器合成粗体后笔画糊连。 */
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; font-weight: 500; font-family: var(--font-display); }
.btn, .brand-name, .stat b, .kicker, .step-index, .soon-pill,
.footer-title, .scene-copy h3, .step-body b { font-family: var(--font-display); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select, code, kbd { font-family: var(--font); }
kbd {
  padding: 2px 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #fff;
  color: var(--ink-2);
  font-size: 0.86em;
}
code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface-3);
  font-size: 0.88em;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  background: var(--ink);
  color: #fff;
}
.skip-link:focus { left: 0; }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: scale .28s var(--ease-out), box-shadow .28s var(--ease-out),
    background-color .28s ease, border-color .28s ease;
}
.btn-sm { height: 38px; padding: 0 18px; font-size: 14px; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 16px; }
.btn-icon { width: 18px; height: 18px; }

.btn-primary {
  background-color: #354b40;
  color: #fff;
  box-shadow: 0 3px 5px rgba(36, 49, 40, 0.12), inset 0 1px rgba(255,255,255,.12);
}
.btn-primary:hover {
  box-shadow: 0 7px 14px -6px rgba(36, 49, 40, 0.28);
}


.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
}
.btn-ghost:hover { background-color: #fdfdf9; }

/* ---------------- Header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 74px;
  background: rgba(251, 250, 249, 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.site-header.is-scrolled {
  background: rgba(251, 250, 249, 0.9);
  border-bottom-color: var(--line-strong);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 32px;
  height: 32px;
  display: block;
  border-radius: 9px;
}
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.brand-mark-lg { width: 46px; height: 46px; border-radius: 13px; }
.brand-name { font-size: 18px; font-weight: 500; letter-spacing: -0.03em; }

.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a {
  position: relative;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.16s ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -6px;
  height: 1.5px;
  background: var(--brand-gradient);
  transition: right 0.24s var(--ease-out);
}
.site-nav a:hover::after { right: 0; }

/* ---------------- Hero ---------------- */

.hero { padding: 76px 0 0; overflow: hidden; }
.hero-copy { max-width: 820px; margin: 0 auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 6px 14px 6px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-gradient-wide);
  box-shadow: 0 0 0 3px rgba(114, 134, 118, 0.12);
}

.hero h1 {
  font-size: clamp(40px, 6.6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 620;
}
.hero h1 .line { display: block; }
.hero h1 .muted {
  color: #667466;
}

.lede {
  max-width: 620px;
  margin: 22px auto 0;
  color: var(--ink-2);
  font-size: clamp(15px, 1.5vw, 17.5px);
  line-height: 1.72;
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.hero-meta { margin-top: 16px; color: var(--ink-3); font-size: 13px; }

/* ---------------- Showcase / scene ---------------- */

.showcase { margin: 54px auto 0; }

.scene {
  position: relative;
  height: var(--scene-h, 600px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 16% 10%, rgba(255, 158, 181, 0.2), transparent 32%),
    radial-gradient(circle at 82% 76%, rgba(88, 161, 232, 0.24), transparent 40%),
    linear-gradient(135deg, #1a1530 0%, #23204a 46%, #141229 100%);
  box-shadow: 0 50px 90px -46px rgba(23, 17, 40, 0.6),
    inset 0 1px rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  isolation: isolate;

  /* 便签栏尺寸（对齐 dockLayout 的 medium / regular 档） */
  --rail: 104px;
  --tab-width: 86px;
  --tab-margin: -48px;
  --spine: 42px;
  --title-width: 36px;
  --note-height: 126px;
  --title-size: 16px;
  --note-gap: 2px;
  --note-margin-top: -16px;
  --action-btn: 26px;
  --action-icon: 14px;
  --action-gap: 7px;
  --action-edge: 6px;
  --action-spine: 7px;
  --list-target: 490px;
}
.scene::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.07'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.scene-bar {
  position: relative;
  z-index: 2;
  height: 38px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 15, 24, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-size: 12.5px;
}
.scene-dots { display: inline-flex; gap: 6px; }
.scene-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
}
.scene-bar-title { color: rgba(255, 255, 255, 0.66); font-weight: 500; }
.scene-bar-right { margin-left: auto; color: rgba(255, 255, 255, 0.5); }

.scene-copy {
  position: absolute;
  z-index: 1;
  left: clamp(24px, 4vw, 56px);
  top: clamp(52px, 12%, 96px);
  max-width: 46%;
  user-select: none;
}
.scene-tag {
  display: inline-block;
  margin-bottom: 18px;
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.66);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.scene-copy h3 {
  font-size: clamp(22px, 3vw, 38px);
  line-height: 1.22;
  letter-spacing: -0.035em;
  color: rgba(255, 255, 255, 0.94);
}

.scene-hint {
  position: absolute;
  z-index: 3;
  left: clamp(24px, 4vw, 56px);
  bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 12.5px;
  transition: opacity 0.4s ease, transform 0.4s var(--ease-out);
}
.scene-hint kbd {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}
.scene-hint.is-hidden { opacity: 0; transform: translateY(6px); }

/* ---------------- Stats ---------------- */

.stats { padding: 60px 0 8px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 22px 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { text-align: center; }
.stat b {
  display: block;
  font-size: clamp(20px, 2.4vw, 27px);
  font-weight: 620;
  letter-spacing: -0.035em;
}
.stat span { color: var(--ink-3); font-size: 13px; }

/* ---------------- Sections ---------------- */

.section { padding: 96px 0; }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head-left { margin: 0; text-align: left; }
.kicker {
  margin-bottom: 14px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.kicker-light { color: rgba(255, 255, 255, 0.5); }
.section h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.14;
  letter-spacing: -0.04em;
}
.section-sub { margin-top: 16px; color: var(--ink-2); font-size: 16px; line-height: 1.72; }

/* ---------------- Features ---------------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  position: relative;
  padding: 28px 26px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: box-shadow 0.28s var(--ease-out), border-color 0.28s ease;
}
.card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 24px 48px -32px rgba(23, 22, 20, 0.5);
}
.card-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
}
.card-icon svg { width: 21px; height: 21px; }
.card h3 { font-size: 18.5px; letter-spacing: -0.025em; }
.card p { margin-top: 10px; color: var(--ink-2); font-size: 14.6px; line-height: 1.7; }

.soon-pill {
  position: absolute;
  top: 24px;
  right: 24px;
  padding: 4px 10px;
  border: 1px solid #deddd2;
  border-radius: 999px;
  background: #f2f1e9;
  color: var(--brand-ink);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.03em;
}

/* ---------------- Interactions ---------------- */

.interactions { background: var(--surface-2); border-block: 1px solid var(--line); }
.interaction-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 56px;
  align-items: center;
}
.interaction-copy h2 { margin-bottom: 16px; }

.steps { list-style: none; margin: 32px 0 0; padding: 0; }
.step { border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step button {
  width: 100%;
  padding: 18px 4px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: padding-left 0.24s var(--ease-out);
}
.step:hover button { padding-left: 10px; }
.step-index {
  flex: 0 0 auto;
  padding-top: 2px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: color 0.2s ease;
}
.step-body b {
  display: block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.step-body span {
  display: block;
  margin-top: 5px;
  color: var(--ink-2);
  font-size: 14.4px;
  line-height: 1.68;
}
.step.is-active .step-index { color: var(--brand-ink); }
.step.is-active button { padding-left: 10px; }

.interaction-stage .scene { --scene-h: 580px; }

/* ---------------- Privacy (legacy layout base) ---------------- */

.privacy-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
  padding: 54px clamp(28px, 5vw, 64px);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, #1f1733 0%, #28224a 52%, #16122a 100%);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 40px 80px -46px rgba(23, 17, 40, 0.7);
}
.privacy-panel h2 { color: #fff; }
.privacy-panel p { margin-top: 16px; color: rgba(255, 255, 255, 0.62); line-height: 1.78; }

.privacy-list { list-style: none; margin: 28px 0 0; padding: 0; }
.privacy-list li {
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.privacy-list li:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.privacy-list b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.privacy-list span { display: block; margin-top: 4px; color: rgba(255, 255, 255, 0.55); font-size: 14px; line-height: 1.7; }

.privacy-visual { text-align: center; }
.privacy-visual p { margin-top: 24px; font-size: 12.5px; letter-spacing: 0.04em; }
.privacy-stack {
  position: relative;
  height: 240px;
  display: grid;
  place-items: center;
}
.privacy-note {
  position: absolute;
  width: 132px;
  height: 158px;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: -14px 16px 34px rgba(0, 0, 0, 0.34), inset 0 1px rgba(255, 255, 255, 0.6);
  /* Card movement is owned by GSAP, not layout animation. */
}
.privacy-note:nth-child(1) { transform: rotate(-9deg) translate(-46px, 6px); }
.privacy-note:nth-child(2) { transform: rotate(4deg) translate(0, -10px); animation-delay: -2.3s; }
.privacy-note:nth-child(3) { transform: rotate(11deg) translate(48px, 4px); animation-delay: -4.6s; }


/* ---------------- FAQ ---------------- */

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(0, 1.32fr);
  gap: 56px;
  align-items: start;
}
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-right: 1.6px solid var(--ink-3);
  border-bottom: 1.6px solid var(--ink-3);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.24s var(--ease-out);
}
.faq-item[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq-item p { margin-top: 12px; color: var(--ink-2); font-size: 15px; line-height: 1.78; }

/* ---------------- Download ---------------- */

.download-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 52px clamp(28px, 5vw, 60px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fff, var(--surface-2));
  box-shadow: 0 40px 80px -50px rgba(23, 22, 20, 0.5);
}
.download-copy h2 { font-size: clamp(26px, 3.2vw, 38px); }
.download-copy p { margin-top: 14px; max-width: 520px; color: var(--ink-2); }
.download-meta { color: var(--ink-3) !important; font-size: 13.5px; }
.download-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }
.download-buttons { display: flex; flex-wrap: wrap; gap: 12px; }

/* 系统切换：自动识别设备，也允许手动纠正 */
.platform-switch {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
}
.platform-switch button {
  height: 34px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.platform-switch button:hover { color: var(--ink); }
.platform-switch button.is-active { background: var(--ink); color: #fff; }

/* ---------------- Footer ---------------- */

.site-footer { border-top: 1px solid var(--line); padding: 44px 0 52px; }
.footer-inner { display: flex; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand .footer-title { font-size: 14.5px; font-weight: 500; letter-spacing: -0.02em; }
.footer-brand .footer-sub { color: var(--ink-3); font-size: 13px; }

/* =========================================================
   Dock · 便签栏
   结构、尺寸与动效对齐 src/features/dock/DockView.vue：
   Rest（只留纸边）→ Fan（按距离放大）→ Expanded（展开卡片）。
   项目已移除拖拽换边，这里同样没有拖拽把手。
   ========================================================= */

.dock-rail {
  position: absolute;
  z-index: 20;
  top: 50%;
  right: 0;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  /* 用独立的 translate 属性做垂直居中，把 transform 留给 GSAP 的 x 动画 */
  translate: 0 -50%;
  perspective: 700px;
}
.scene.dock-left .dock-rail { left: 0; right: auto; align-items: flex-start; }

/* 便签列表：只显示纸的引导条，其余溢出到屏幕外 */
.note-list-shell {
  position: relative;
  width: 100%;
  height: var(--list-target);
  flex: 0 0 var(--list-target);
  overflow: hidden;
}
.note-list {
  width: 100%;
  height: 100%;
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--note-gap, 2px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-width: none;
  mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 16px), transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 16px), transparent 100%);
}
.note-list::-webkit-scrollbar { display: none; }
.scene.dock-left .note-list { align-items: flex-start; }

.note-tab {
  position: relative;
  width: var(--tab-width, 86px);
  height: var(--note-height, 126px);
  flex: 0 0 var(--note-height, 126px);
  margin-right: var(--tab-margin, -48px);
  padding: 0;
  border: 0;
  color: #302c2e;
  background: transparent;
  cursor: pointer;
  transform-origin: right center;
  rotate: var(--tilt, 0deg);
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}
.note-tab + .note-tab { margin-top: var(--note-margin-top, -16px); }
.scene.dock-left .note-tab {
  margin-right: 0;
  margin-left: var(--tab-margin, -48px);
  transform-origin: left center;
}
.note-tab:nth-child(1) { --tilt: -1.8deg; z-index: 1; }
.note-tab:nth-child(2) { --tilt: 0.9deg; z-index: 2; }
.note-tab:nth-child(3) { --tilt: -1.1deg; z-index: 3; }
.note-tab:nth-child(4) { --tilt: 1.25deg; z-index: 4; }
.note-tab:nth-child(5) { --tilt: -1.35deg; z-index: 5; }
.note-tab:nth-child(n + 6) { --tilt: -1deg; }
.note-tab.nearest,
.note-tab.active,
.note-tab:hover,
.note-tab.note-sort-chosen { z-index: 12; }

/* 拖拽排序：与项目 SortableJS 的类名一致 */
.note-list.sorting { cursor: grabbing; }
.note-tab.note-sort-chosen .paper {
  transform: scale(1.04);
  filter: brightness(1.055);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}
.note-tab.note-sort-ghost { opacity: 0.18; }
.note-tab.note-sort-drag .paper {
  filter: brightness(1.065);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

/* 纸面：静止时无投影，靠边缘本身产生层次；悬停时提亮 */
.paper {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: block;
  border-radius: 18px 0 0 18px;
  background: var(--paper);
  transition: filter 0.2s ease, transform 0.2s var(--ease-out), box-shadow 0.24s var(--ease-out);
}
.note-tab:hover .paper,
.note-tab.nearest .paper { filter: brightness(1.045); }
.scene.dock-left .paper { border-radius: 0 18px 18px 0; }
.paper::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.3), transparent 40%, rgba(60, 45, 30, 0.05));
  pointer-events: none;
}
/* 对折虚线：静止时始终留在屏幕外 */
.paper::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 9px;
  bottom: 9px;
  right: calc(100% - var(--spine, 42px));
  border-right: 1px dashed rgba(72, 58, 43, 0.2);
}

.title {
  font-family: var(--font-display);
  position: absolute;
  z-index: 3;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: var(--title-width, 36px);
  display: grid;
  place-items: center;
  writing-mode: vertical-rl;
  text-orientation: upright;
  color: rgba(47, 42, 43, 0.86);
  font-size: var(--title-size, 16px);
  font-weight: 500;
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}
.scene.dock-left .title { left: auto; right: 0; }

/* 快捷操作：在纸的右侧（溢出区），停留 1 秒后浮出 */
.quick-actions {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  right: var(--action-edge, 6px);
  left: calc(var(--spine, 42px) + var(--action-spine, 7px));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--action-gap, 7px);
  opacity: 0;
  transform: translateX(7px) scale(0.92);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.22s var(--ease-out);
}
.scene.dock-left .quick-actions {
  left: var(--action-edge, 6px);
  right: auto;
  transform: translateX(-7px) scale(0.92);
}
.note-tab.actions .quick-actions { opacity: 1; transform: none; }
.quick-actions button {
  width: var(--action-btn, 26px);
  height: var(--action-btn, 26px);
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: rgba(52, 45, 44, 0.63);
  background: transparent;
  pointer-events: none;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, transform 0.2s var(--ease-out);
}
.note-tab.actions .quick-actions button { pointer-events: auto; }
.quick-actions svg {
  width: var(--action-icon, 14px);
  height: var(--action-icon, 14px);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.quick-actions button:hover { color: #fff; }
.quick-actions button:first-child:hover { background: #5b92e8; }
.quick-actions button:last-child:hover { background: #ef6262; }

/* 便签栏操作：位于便签列表下方，悬停便签栏时按 GSAP 时间轴浮现 */
.rail-controls {
  position: relative;
  z-index: 30;
  width: 100%;
  padding-top: 10px;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.scene.dock-left .rail-controls { align-items: flex-start; }
/* 无 GSAP 时的降级：靠类名直接显示 */
.dock-rail.controls-visible .rail-controls { opacity: 1; visibility: visible; }
.rail-controls .separator {
  position: absolute;
  z-index: 2;
  top: 4px;
  right: 0;
  width: 40px;
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
}
.scene.dock-left .rail-controls .separator { right: auto; left: 0; }
.rail-controls > button {
  position: relative;
  width: 40px;
  height: 40px;
  margin: 0 0 6px 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(24, 26, 31, 0.88);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  cursor: pointer;
  pointer-events: auto;
  transition: color 0.18s ease, border-color 0.18s ease, box-shadow 0.2s var(--ease-out);
}
.rail-controls > button > svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s var(--ease-out);
}
.rail-controls > button:hover { color: #fff; }
.rail-controls > button:hover > svg { transform: scale(1.16); }
.rail-controls > button:active > svg { transform: scale(0.94); }
.adaptive-control.selected {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14), 0 7px 22px rgba(0, 0, 0, 0.3),
    inset 0 0 14px rgba(255, 255, 255, 0.1);
}
.adaptive-control.selected > svg { transform: scale(1.12); }
.rail-controls > button[data-control="add"].selected > svg { transform: rotate(45deg) scale(1.06); }

.screen-compact .paper { border-radius: 15px 0 0 15px; }
.screen-compact.scene.dock-left .paper { border-radius: 0 15px 15px 0; }

/* ---------------- 便签卡片（Expanded） ---------------- */

.note-panel {
  position: absolute;
  z-index: 25;
  top: 50%;
  right: calc(var(--rail, 104px) + 8px);
  width: min(360px, calc(100% - var(--rail, 104px) - 40px));
  height: min(430px, 76%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 20px;
  color: #2c2930;
  background: var(--panel-paper, #ffe57a);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.36), inset 0 1px rgba(255, 255, 255, 0.66);
  /* 同样把 transform 留给 GSAP（x / rotation） */
  translate: 0 -50%;
  transform-origin: right 42%;
  opacity: 0;
  visibility: hidden;
}
.scene.dock-left .note-panel {
  right: auto;
  left: calc(var(--rail, 104px) + 8px);
  transform-origin: left 42%;
}
.note-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.26), transparent 26%, rgba(107, 73, 25, 0.05));
}
.panel-toolbar {
  position: relative;
  z-index: 1;
  height: 58px;
  padding: 0 14px 0 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(70, 55, 30, 0.11);
}
.panel-title {
  font-family: var(--font-display);
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #29262b;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.panel-toolbar span {
  flex: 0 0 auto;
  color: rgba(45, 39, 34, 0.5);
  font-size: 11px;
  font-weight: 600;
}
.panel-close {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: rgba(40, 35, 31, 0.58);
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
.panel-close:hover { background-color: rgba(255, 255, 255, 0.38); }
.panel-close svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.panel-preview {
  position: relative;
  z-index: 1;
  height: calc(100% - 58px);
  padding: 16px 20px 24px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(70, 55, 30, 0.22) transparent;
}
.panel-body { color: #363139; font-size: 15.5px; line-height: 1.85; overflow-wrap: anywhere; }
.panel-body h1, .panel-body h2, .panel-body h3 { margin: 16px 0 6px; line-height: 1.3; }
.panel-body h1 { font-size: 20px; }
.panel-body h2 { font-size: 18px; }
.panel-body h3 { font-size: 16px; }
.preview-paragraph { min-height: 1.7em; margin: 2px 0; }
.preview-task, .preview-list-item { display: flex; align-items: flex-start; gap: 9px; margin: 5px 0; }
.preview-list-dot {
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  margin: 10px 5px 0 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.58;
}
.preview-check {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 6px;
  padding: 0;
  display: grid;
  box-sizing: border-box;
  place-items: center;
  border: 1.6px solid rgba(54, 48, 53, 0.48);
  border-radius: 6px;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.preview-check:hover { border-color: #3d985c; }
.preview-check.is-checked { border-color: #3d985c; background: #4cab69; }
.preview-check.is-checked::after { content: "✓"; font-size: 12px; font-weight: 800; line-height: 1; }
.preview-task.is-done .preview-task-copy { opacity: 0.55; text-decoration: line-through; }
.panel-body blockquote {
  margin: 8px 0;
  padding-left: 12px;
  border-left: 3px solid rgba(54, 48, 53, 0.3);
  color: rgba(54, 48, 53, 0.72);
}
.panel-body code { padding: 2px 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.28); font-size: 0.9em; }

/* ---------------- 新建便签（速记） ---------------- */

.create-backdrop {
  position: absolute;
  z-index: 28;
  inset: 38px 0 0;
  display: grid;
  place-items: center end;
  padding: 20px calc(var(--rail, 104px) + 8px) 20px 20px;
  background: rgba(8, 10, 18, 0.34);
  backdrop-filter: blur(10px) saturate(0.95);
  -webkit-backdrop-filter: blur(10px) saturate(0.95);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}
.create-backdrop.is-open { opacity: 1; visibility: visible; }
.scene.dock-left .create-backdrop {
  place-items: center start;
  padding: 20px 20px 20px calc(var(--rail, 104px) + 8px);
}
.create-dialog {
  position: relative;
  width: min(340px, calc(100% - 140px));
  height: min(430px, 86%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 20px;
  color: #2c2930;
  background: var(--create-paper, #ffe57a);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.38), inset 0 1px rgba(255, 255, 255, 0.68);
  transform-origin: right center;
  transition: background 0.24s ease;
}
.create-bar {
  position: relative;
  z-index: 1;
  height: 50px;
  flex: 0 0 50px;
  padding: 0 12px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(70, 55, 30, 0.11);
}
.create-label { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.create-label b { font-size: 13px; }
.autosave-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(45, 39, 34, 0.58);
  font-size: 11px;
  font-weight: 650;
}
.autosave-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(45, 39, 34, 0.28);
}
.autosave-status[data-state="saving"]::before {
  background: #4e7fc9;
  animation: autosave-pulse 0.7s ease-in-out infinite alternate;
}
.autosave-status[data-state="saved"]::before { background: #3e9b5d; }
@keyframes autosave-pulse { to { opacity: 0.35; transform: scale(0.72); } }

.color-palette { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.color-swatch {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px rgba(49, 42, 35, 0.16);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.color-swatch.is-selected {
  box-shadow: 0 0 0 2px rgba(43, 38, 35, 0.7), 0 0 0 4px rgba(255, 255, 255, 0.45);
  /* Selection uses a ring; hover/press scale remains independent. */
}

.create-title, .create-body {
  position: relative;
  z-index: 1;
  width: 100%;
  border: 0;
  outline: 0;
  resize: none;
  color: #29262b;
  background: transparent;
  font-family: inherit;
}
.create-title {
  height: 62px;
  flex: 0 0 62px;
  padding: 16px 18px 8px;
  font-size: 23px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.035em;
}
.create-title::placeholder { color: rgba(45, 39, 34, 0.4); }
.create-body {
  flex: 1;
  min-height: 0;
  padding: 4px 18px 16px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.8;
  scrollbar-width: thin;
  scrollbar-color: rgba(70, 55, 30, 0.28) transparent;
}
.markdown-bar {
  position: relative;
  z-index: 1;
  min-height: 48px;
  flex: 0 0 48px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(70, 55, 30, 0.1);
  background: rgba(255, 255, 255, 0.12);
}
.format-tools { display: flex; align-items: center; gap: 4px; }
.format-btn {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: rgba(43, 38, 42, 0.66);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 750;
}
.format-btn:hover { color: #29242a; background: rgba(255, 255, 255, 0.36); }
.format-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.markdown-hint { color: rgba(45, 39, 34, 0.5); font-size: 10.5px; white-space: nowrap; }

/* ---------------- Toast ---------------- */

.toast {
  position: absolute;
  z-index: 40;
  left: 50%;
  bottom: 24px;
  padding: 9px 14px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 12.5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  background: rgba(18, 18, 24, 0.72);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
}
.toast.is-open { opacity: 1; visibility: visible; }

/* ---------------- Reveal（渐进增强） ---------------- */

/* GSAP owns reveal transforms; no CSS transition on the same properties. */

/* ---------------- Responsive ---------------- */

@media (max-width: 1080px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .interaction-layout { grid-template-columns: 1fr; gap: 40px; }
  .faq-layout { grid-template-columns: 1fr; gap: 32px; }
  .privacy-panel { grid-template-columns: 1fr; gap: 24px; }
  .privacy-visual { order: -1; }
  .privacy-stack { height: 170px; }
  .privacy-note { width: 104px; height: 124px; }
}

@media (max-width: 880px) {
  .site-nav { display: none; }
  .scene { --scene-h: 620px !important; }
  .scene-copy { max-width: 58%; top: 46px; }
  .scene { --rail: 88px; --tab-width: 74px; --tab-margin: -40px; --spine: 36px; --title-width: 32px; --note-height: 110px; --title-size: 14px; --action-btn: 22px; --action-icon: 12px; }
  .note-panel { width: min(320px, calc(100% - 120px)); }
  .create-backdrop { padding: 16px 100px 16px 16px; }
  .scene.dock-left .create-backdrop { padding: 16px 16px 16px 100px; }
}

@media (max-width: 620px) {
  .section { padding: 68px 0; }
  .shell { padding: 0 18px; }
  .hero { padding-top: 48px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .feature-grid { grid-template-columns: 1fr; }
  .scene { --scene-h: 560px !important; }
  .scene-copy h3 { font-size: 20px; }
  .scene-hint { display: none; }
  .scene { --rail: 76px; --tab-width: 64px; --tab-margin: -34px; --spine: 31px; --title-width: 27px; --note-height: 96px; --title-size: 13px; --action-btn: 20px; --action-icon: 11px; --action-gap: 5px; }
  .note-panel { width: calc(100% - 100px); height: min(360px, 70%); }
  .create-backdrop { padding: 12px 88px 12px 12px; }
  .scene.dock-left .create-backdrop { padding: 12px 12px 12px 88px; }
  .create-dialog { width: calc(100% - 104px); }
  .download-panel { padding: 32px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
