/* ==========================================================================
   拾叶 · 森林主题设计系统（v2，与 v1 的 dd- 体系完全隔离）
   --------------------------------------------------------------------------
   设计语言：晨雾浅色 · 纸张颗粒 · 有机留白 · 中文衬线 · 微风级动效
   零外部依赖：字体全部使用系统字体栈，纹理使用内联 SVG data URI
   ========================================================================== */

:root {
  /* —— 色板：晨雾森林 —— */
  --sy-paper: #f7f5ef;
  --sy-paper-2: #efede2;
  --sy-mist: #e6ebdd;
  --sy-mist-2: #dde4d2;
  --sy-moss: #3f5d45;
  --sy-moss-deep: #2f4634;
  --sy-fern: #5e7f62;
  --sy-sage: #93ac8c;
  --sy-sage-soft: #c3d1bc;
  --sy-leaf: #a9c4a2;
  --sy-sun: #c9a961;
  --sy-sun-soft: #e6d6ae;
  --sy-bark: #6b4f3a;
  --sy-ink: #28302a;
  --sy-ink-soft: #5b665b;
  --sy-ink-faint: #8a948a;
  --sy-danger: #a4483b;
  --sy-danger-soft: #f3e2dd;
  --sy-ok: #4a6b4a;

  /* —— 字号 —— */
  --sy-font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong,
    SimSun, "宋体", Georgia, serif;
  --sy-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --sy-font-hand: "Segoe Script", "Bradley Hand", "Snell Roundhand", "Comic Sans MS",
    cursive;

  /* —— 圆角 / 阴影 / 间距 —— */
  --sy-r-sm: 8px;
  --sy-r-md: 14px;
  --sy-r-lg: 22px;
  --sy-r-organic: 48% 52% 46% 54% / 54% 46% 52% 48%;

  --sy-shadow-soft: 0 1px 2px rgba(47, 70, 52, 0.04),
    0 8px 24px -12px rgba(47, 70, 52, 0.16);
  --sy-shadow-lift: 0 2px 4px rgba(47, 70, 52, 0.05),
    0 22px 48px -20px rgba(47, 70, 52, 0.28);
  --sy-shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.7);

  /* —— 纸张颗粒（内联 SVG，非外部请求）—— */
  --sy-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");

  color-scheme: light;
}

/* ============================== 基础 ============================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background-color: var(--sy-paper);
  color: var(--sy-ink);
  font-family: var(--sy-font-sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 纸张颗粒叠层：fixed + pointer-events:none，不干扰交互 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--sy-grain);
  background-size: 160px 160px;
  opacity: 0.5;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
}

#app {
  position: relative;
  z-index: 2;
  min-height: 100vh;
}

::selection {
  background: var(--sy-sun-soft);
  color: var(--sy-moss-deep);
}

/* ============================== 页面骨架 ============================== */

.sy-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 0 20px 72px;
  overflow-x: hidden;
}

.sy-shell {
  width: min(880px, 100%);
  margin: 0 auto;
}

/* —— 页头：极简，只有叶子标记 + 站名 + 一行手写英文 —— */
.sy-header {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 30px 0 8px;
}

.sy-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.sy-brand__mark {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--sy-mist) 0%, var(--sy-mist-2) 100%);
  box-shadow: var(--sy-shadow-soft), var(--sy-shadow-inset);
}

.sy-brand__name {
  font-family: var(--sy-font-serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--sy-moss-deep);
  line-height: 1.1;
}

.sy-brand__latin {
  display: block;
  margin-top: 3px;
  font-family: var(--sy-font-hand);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--sy-sage);
  text-transform: lowercase;
}

.sy-header__aside {
  margin-left: auto;
  font-family: var(--sy-font-hand);
  font-size: 13px;
  color: var(--sy-ink-faint);
  letter-spacing: 0.06em;
  text-align: right;
}

/* ============================== 主图：林间空地 ============================== */

.sy-hero {
  position: relative;
  width: 100%;
  margin-top: 10px;
  /* 9px 内边距 = 主图四周那圈米白边框；底部多留一点呼吸 */
  padding: 9px 9px 26px;
  border-radius: 30px;
  background: var(--sy-paper);
}

/* 主图是一个不可交互的背景层：树冠、光柱、地面、蕨叶都在这里 */
.sy-forest {
  position: absolute;
  /* 四周留 9px 米白边框：hero 的底色就是米白，露出这一圈 */
  inset: 9px;
  overflow: hidden;
  pointer-events: none;
  border-radius: 24px;
  box-shadow:
    0 0 0 1px rgba(147, 172, 140, 0.28),
    0 24px 60px -34px rgba(47, 70, 52, 0.5);
}

.sy-forest__sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(58% 52% at 2% 0%, rgba(104, 136, 98, 0.92) 0%, rgba(104, 136, 98, 0) 66%),
    radial-gradient(54% 48% at 99% 2%, rgba(96, 128, 92, 0.88) 0%, rgba(96, 128, 92, 0) 64%),
    radial-gradient(130% 62% at 50% 112%, rgba(126, 158, 114, 0.92) 0%, rgba(126, 158, 114, 0) 74%),
    radial-gradient(56% 50% at 50% 42%, rgba(249, 248, 235, 0.9) 0%, rgba(247, 246, 230, 0.4) 58%, rgba(247, 246, 230, 0) 80%),
    linear-gradient(180deg, #dbe8c8 0%, #e3edd4 44%, #d3e2c1 100%);
}

.sy-forest__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* 光柱缓慢漂移 */
.sy-forest__rays {
  transform-origin: 50% 0%;
  animation: sy-rays 26s ease-in-out infinite alternate;
  opacity: 0.85;
}

/* 光斑 */
.sy-mote {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 252, 235, 0.95), rgba(255, 252, 235, 0));
  animation: sy-drift 18s ease-in-out infinite;
  opacity: 0;
}
.sy-mote--1 { left: 18%; top: 30%; animation-delay: 0s; }
.sy-mote--2 { left: 42%; top: 18%; animation-delay: 3.4s; animation-duration: 22s; }
.sy-mote--3 { left: 68%; top: 34%; animation-delay: 6.1s; animation-duration: 20s; }
.sy-mote--4 { left: 82%; top: 52%; animation-delay: 9.3s; animation-duration: 24s; }
.sy-mote--5 { left: 28%; top: 58%; animation-delay: 12.6s; animation-duration: 19s; }

/* 飘落的叶子（极轻，只在边缘，不遮挡文字） */
.sy-leaf {
  position: absolute;
  transform-origin: 50% 50%;
  animation: sy-sway 11s ease-in-out infinite;
  opacity: 0.75;
}
.sy-leaf--a { left: 6%;  top: 12%; animation-delay: 0s; }
.sy-leaf--b { right: 7%; top: 20%; animation-delay: 1.8s; animation-duration: 13s; }
.sy-leaf--c { left: 14%; bottom: 26%; animation-delay: 3.2s; animation-duration: 15s; }
.sy-leaf--d { right: 13%; bottom: 18%; animation-delay: 5.6s; animation-duration: 12s; }

/* ============================== 主视觉文案 ============================== */

.sy-hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 34px 24px 8px;
}

.sy-hero__eyebrow {
  font-family: var(--sy-font-hand);
  font-size: 13px;
  letter-spacing: 0.28em;
  color: var(--sy-sage);
  text-transform: lowercase;
  margin: 0 0 14px;
}

.sy-hero__title {
  margin: 0;
  font-family: var(--sy-font-serif);
  font-size: clamp(30px, 5.4vw, 46px);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: 0.06em;
  color: var(--sy-moss-deep);
  text-wrap: balance;
}

.sy-hero__title em {
  font-style: normal;
  color: var(--sy-fern);
  /* 用底色高亮模拟「笔尖轻轻划过」 */
  background: linear-gradient(180deg, transparent 62%, var(--sy-sun-soft) 62%, var(--sy-sun-soft) 88%, transparent 88%);
  padding: 0 2px;
}

.sy-hero__sub {
  margin: 16px auto 0;
  max-width: 30em;
  font-size: 14.5px;
  line-height: 1.95;
  color: #3d4a3d;
  text-wrap: pretty;
}

/* ============================== 拖拽区：林间空地 ============================== */

.sy-clearing-wrap {
  position: relative;
  z-index: 2;
  margin: 26px auto 0;
  width: min(740px, 100%);
  padding: 0 12px;
}

/* 空地本身：有机圆角 + 内侧微光，像林中一块被光偏爱的空地 */
.sy-clearing {
  position: relative;
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 306px;
  padding: 48px 30px;
  cursor: pointer;
  border: 0;
  width: 100%;
  font-family: inherit;
  color: inherit;
  /* 中间保持绿色：比外围略深一档的绿，米白只做边框 */
  background:
    radial-gradient(116% 100% at 50% 0%, rgba(178, 205, 158, 0.88) 0%, rgba(158, 190, 137, 0.8) 58%, rgba(143, 178, 122, 0.76) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
  border-radius: var(--sy-r-organic);
  /* 米白描边 + 内侧柔和阴影 */
  box-shadow:
    inset 0 0 0 3px rgba(251, 247, 234, 0.96),
    inset 0 0 0 4.5px rgba(120, 152, 112, 0.22),
    inset 0 -34px 70px -38px rgba(47, 70, 52, 0.34),
    0 22px 54px -30px rgba(47, 70, 52, 0.42);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease, background 0.35s ease;
}

/* 虚线叶脉边界：一圈缓慢旋转的短划线，暗示「待放进来」 */
.sy-clearing::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: inherit;
  border: 1.5px dashed rgba(251, 247, 234, 0.9);
  animation: sy-rotate 90s linear infinite;
  pointer-events: none;
}

.sy-clearing:hover {
  transform: translateY(-2px);
  background:
    radial-gradient(116% 100% at 50% 0%, rgba(186, 213, 165, 0.92) 0%, rgba(165, 197, 143, 0.84) 58%, rgba(149, 184, 127, 0.8) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
  box-shadow:
    inset 0 0 0 3px rgba(255, 253, 245, 1),
    inset 0 0 0 4.5px rgba(96, 130, 88, 0.3),
    inset 0 -34px 70px -38px rgba(47, 70, 52, 0.36),
    0 30px 64px -32px rgba(47, 70, 52, 0.5);
}

.sy-clearing:focus-visible {
  outline: 2px solid var(--sy-fern);
  outline-offset: 6px;
}

.sy-clearing.is-over {
  background:
    radial-gradient(116% 100% at 50% 0%, rgba(196, 222, 174, 0.95) 0%, rgba(174, 206, 151, 0.88) 58%, rgba(156, 191, 133, 0.84) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02));
  box-shadow:
    inset 0 0 0 3.5px var(--sy-sun),
    inset 0 0 0 6px rgba(255, 253, 242, 0.85),
    inset 0 -34px 70px -38px rgba(47, 70, 52, 0.36),
    0 34px 70px -30px rgba(47, 70, 52, 0.52);
  transform: scale(1.008);
}

.sy-clearing.is-over::before {
  border-color: var(--sy-sun);
}

.sy-clearing__icon {
  width: 54px;
  height: 54px;
  opacity: 0.9;
}

.sy-clearing__label {
  font-family: var(--sy-font-serif);
  font-size: 21px;
  letter-spacing: 0.12em;
  /* 绿色底上用米白字，对比更强 */
  color: #fbf8ec;
  text-shadow: 0 1px 2px rgba(47, 70, 52, 0.45);
}

.sy-clearing__hint {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(251, 248, 236, 0.86);
  text-shadow: 0 1px 2px rgba(47, 70, 52, 0.35);
}

/* 空地外圈的「草叶」装饰 */
.sy-tuft {
  position: absolute;
  bottom: -6px;
  pointer-events: none;
  opacity: 0.55;
}
.sy-tuft--l { left: 2%; }
.sy-tuft--r { right: 2%; transform: scaleX(-1); }

/* ============================== 动作区 ============================== */

/*
 * 关键：主图 .sy-forest 是 position:absolute，会盖在所有「静态」兄弟元素上。
 * 因此 hero 内所有需要可见/可点的内容都必须 position:relative + z-index。
 */
.sy-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 26px;
}

.sy-btn {
  appearance: none;
  border: 1px solid var(--sy-sage-soft);
  background: rgba(255, 255, 255, 0.66);
  color: var(--sy-moss-deep);
  font-family: var(--sy-font-serif);
  font-size: 15px;
  letter-spacing: 0.09em;
  padding: 12px 26px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.sy-btn:hover:not(:disabled) {
  background: #fff;
  border-color: var(--sy-fern);
  transform: translateY(-1px);
  box-shadow: var(--sy-shadow-soft);
}

.sy-btn:active:not(:disabled) {
  transform: translateY(0);
}

.sy-btn:focus-visible {
  outline: 2px solid var(--sy-fern);
  outline-offset: 3px;
}

.sy-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sy-btn--primary {
  background: var(--sy-moss);
  border-color: var(--sy-moss);
  color: #fbfaf4;
  box-shadow: 0 10px 22px -14px rgba(47, 70, 52, 0.9);
}

.sy-btn--primary:hover:not(:disabled) {
  background: var(--sy-moss-deep);
  border-color: var(--sy-moss-deep);
}

.sy-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--sy-ink-soft);
  box-shadow: none;
}

.sy-btn--ghost:hover:not(:disabled) {
  background: rgba(147, 172, 140, 0.14);
  border-color: transparent;
}

.sy-btn--sm {
  font-family: var(--sy-font-sans);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  padding: 6px 13px;
}

/* ============================== 提示 / 状态 ============================== */

.sy-note {
  position: relative;
  z-index: 2;
  margin: 22px auto 0;
  max-width: 640px;
  padding: 13px 18px;
  border-radius: var(--sy-r-md);
  background: rgba(251, 247, 234, 0.9);
  border: 1px solid var(--sy-sage-soft);
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--sy-ink-soft);
}

.sy-note--warn {
  background: rgba(230, 214, 174, 0.26);
  border-color: var(--sy-sun-soft);
  color: #7a5f2c;
}

.sy-note--error {
  background: var(--sy-danger-soft);
  border-color: #e2c3bb;
  color: #7d3529;
}

.sy-note code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(147, 172, 140, 0.18);
  color: var(--sy-moss-deep);
}

/* ============================== 文件列表 ============================== */

/* 列表放在绿底上，需要抬到主图之上，并铺一层米白让文字更清楚 */
.sy-list {
  position: relative;
  z-index: 2;
  margin: 30px auto 6px;
  max-width: 720px;
  padding: 18px 20px 8px;
  border-radius: 18px;
  background: rgba(251, 247, 234, 0.82);
  border: 1px solid rgba(255, 253, 245, 0.9);
  box-shadow: 0 18px 44px -32px rgba(47, 70, 52, 0.45);
}

.sy-list__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 0 4px 12px;
  border-bottom: 1px solid rgba(147, 172, 140, 0.35);
}

.sy-list__title {
  font-family: var(--sy-font-serif);
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--sy-moss);
  margin: 0;
}

.sy-list__count {
  font-family: var(--sy-font-hand);
  font-size: 12.5px;
  color: var(--sy-ink-faint);
  margin-left: auto;
}

.sy-rows {
  display: flex;
  flex-direction: column;
}

.sy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 15px 4px;
  border-bottom: 1px solid rgba(147, 172, 140, 0.22);
  animation: sy-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sy-row__name {
  font-size: 14.5px;
  color: var(--sy-ink);
  word-break: break-all;
  line-height: 1.5;
}

.sy-row__meta {
  margin-top: 3px;
  font-size: 12px;
  color: var(--sy-ink-faint);
  letter-spacing: 0.02em;
}

.sy-row__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sy-row__size {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  color: var(--sy-ink-soft);
  white-space: nowrap;
}

/* 进度：一条会生长的细线，像叶脉 */
.sy-growth {
  position: relative;
  height: 3px;
  width: 96px;
  border-radius: 999px;
  background: rgba(147, 172, 140, 0.28);
  overflow: hidden;
}

.sy-growth__bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sy-leaf), var(--sy-fern));
  transition: width 0.25s ease;
}

.sy-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.sy-tag--ok {
  background: rgba(169, 196, 162, 0.3);
  color: var(--sy-ok);
}

.sy-tag--err {
  background: var(--sy-danger-soft);
  color: #8a3a2e;
}

/* 空状态 */
.sy-empty {
  padding: 46px 20px;
  text-align: center;
  color: var(--sy-ink-faint);
  font-family: var(--sy-font-serif);
  font-size: 14px;
  letter-spacing: 0.1em;
}

/* ============================== 弹窗 ============================== */

.sy-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(40, 48, 42, 0.42);
  backdrop-filter: blur(3px);
  animation: sy-fade 0.22s ease both;
}

.sy-modal {
  width: min(430px, 100%);
  padding: 34px 30px 28px;
  border-radius: var(--sy-r-lg);
  background: linear-gradient(180deg, #fdfcf7, #f7f5ef);
  box-shadow: 0 30px 80px -30px rgba(28, 38, 30, 0.6), var(--sy-shadow-inset);
  border: 1px solid rgba(255, 255, 255, 0.7);
  text-align: center;
  animation: sy-rise 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sy-modal__title {
  margin: 0;
  font-family: var(--sy-font-serif);
  font-size: 18px;
  letter-spacing: 0.16em;
  color: var(--sy-moss-deep);
}

.sy-modal__sub {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.9;
  color: var(--sy-ink-faint);
}

.sy-code {
  margin: 24px 0 18px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 600;
  letter-spacing: 0.22em;
  padding-left: 0.22em;
  color: var(--sy-moss-deep);
  user-select: all;
}

.sy-qr {
  margin: 22px auto 6px;
  width: fit-content;
  padding: 14px;
  border-radius: var(--sy-r-md);
  background: #fff;
  box-shadow: var(--sy-shadow-soft);
}

.sy-qr canvas {
  display: block;
  max-width: min(220px, 62vw);
  height: auto;
}

.sy-link {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 11px 14px;
  border-radius: var(--sy-r-sm);
  border: 1px solid var(--sy-sage-soft);
  background: rgba(255, 255, 255, 0.8);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12.5px;
  color: var(--sy-ink-soft);
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sy-modal .sy-actions {
  margin-top: 24px;
}

/* ============================== 表单 ============================== */

/* 隐藏的 file input：视觉隐藏但保持可被脚本 click() */
.sy-hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sy-field {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 13px 16px;
  border-radius: var(--sy-r-sm);
  border: 1px solid var(--sy-sage-soft);
  background: rgba(255, 255, 255, 0.78);
  font-family: inherit;
  font-size: 15px;
  color: var(--sy-ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sy-field::placeholder {
  color: var(--sy-ink-faint);
}

.sy-field:focus {
  border-color: var(--sy-fern);
  box-shadow: 0 0 0 3px rgba(94, 127, 98, 0.14);
}

.sy-field--code {
  text-align: center;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 22px;
  letter-spacing: 0.3em;
  padding-left: 0.3em;
}

/* ============================== 后台页 ============================== */

.sy-admin {
  width: min(940px, 100%);
  margin: 0 auto;
}

.sy-admin__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(147, 172, 140, 0.35);
}

.sy-admin__title {
  margin: 0;
  font-family: var(--sy-font-serif);
  font-size: 20px;
  letter-spacing: 0.14em;
  color: var(--sy-moss-deep);
}

.sy-admin__summary {
  font-size: 12.5px;
  color: var(--sy-ink-faint);
  margin-left: 2px;
}

.sy-admin__tools {
  margin-left: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* 搜索框：只收窄工具条里的输入框，登录卡片里的钥匙框保持整宽居中 */
.sy-admin__tools .sy-field {
  width: auto;
  margin-top: 0;
  min-width: 180px;
  padding: 9px 14px;
  font-size: 13.5px;
  border-radius: 999px;
}

.sy-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
}

.sy-table th {
  text-align: left;
  font-family: var(--sy-font-serif);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--sy-ink-faint);
  padding: 14px 12px 10px;
  border-bottom: 1px solid rgba(147, 172, 140, 0.35);
}

.sy-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(147, 172, 140, 0.2);
  font-size: 13.5px;
  color: var(--sy-ink-soft);
  vertical-align: middle;
}

.sy-table tbody tr {
  transition: background 0.2s ease;
}

.sy-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.55);
}

.sy-table .sy-row__name {
  font-size: 14px;
  color: var(--sy-ink);
}

.sy-login {
  max-width: 400px;
  margin: 68px auto 0;
  padding: 38px 32px 30px;
  border-radius: var(--sy-r-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(247, 245, 239, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--sy-shadow-lift);
  text-align: center;
}

/* 钥匙输入框：整宽撑满卡片内容区，文字居中，保证落在卡片中轴上 */
.sy-login .sy-field {
  width: 100%;
  margin-top: 22px;
  padding: 14px 18px;
  text-align: center;
  font-size: 15px;
  letter-spacing: 0.24em;
  border-radius: var(--sy-r-sm);
}

.sy-login .sy-field::placeholder {
  letter-spacing: 0.08em;
}

/* ============================== 页脚 ============================== */

.sy-footer {
  margin: 46px auto 0;
  text-align: center;
  font-size: 12px;
  line-height: 2.1;
  color: var(--sy-ink-faint);
  letter-spacing: 0.06em;
}

.sy-footer a {
  color: var(--sy-fern);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.sy-footer a:hover {
  border-bottom-color: var(--sy-sage);
}

.sy-footer__latin {
  font-family: var(--sy-font-hand);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  opacity: 0.75;
}

/* ============================== 拖拽全屏提示 ============================== */

.sy-dropveil {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 45%,
    rgba(233, 237, 221, 0.92) 0%,
    rgba(40, 48, 42, 0.55) 78%
  );
  animation: sy-fade 0.2s ease both;
}

.sy-dropveil__text {
  font-family: var(--sy-font-serif);
  font-size: clamp(20px, 4vw, 28px);
  letter-spacing: 0.22em;
  color: var(--sy-moss-deep);
  background: rgba(255, 255, 255, 0.9);
  padding: 18px 34px;
  border-radius: 999px;
  box-shadow: var(--sy-shadow-lift);
}

/* ============================== Toast ============================== */

.sy-toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 90;
  transform: translate(-50%, 8px);
  padding: 11px 22px;
  border-radius: 999px;
  background: rgba(47, 70, 52, 0.94);
  color: #f7f5ef;
  font-size: 13.5px;
  letter-spacing: 0.05em;
  box-shadow: 0 18px 40px -18px rgba(28, 38, 30, 0.85);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  max-width: min(90vw, 520px);
  text-align: center;
}

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

/* ============================== 动效 ============================== */

@keyframes sy-rays {
  0%   { transform: rotate(-2.6deg) scale(1.02); opacity: 0.7; }
  50%  { transform: rotate(0.6deg) scale(1.05); opacity: 0.92; }
  100% { transform: rotate(2.4deg) scale(1.02); opacity: 0.74; }
}

@keyframes sy-drift {
  0%   { transform: translate3d(0, 0, 0); opacity: 0; }
  12%  { opacity: 0.85; }
  50%  { transform: translate3d(26px, -34px, 0); opacity: 0.55; }
  88%  { opacity: 0.5; }
  100% { transform: translate3d(-14px, -68px, 0); opacity: 0; }
}

@keyframes sy-sway {
  0%   { transform: translate3d(0, 0, 0) rotate(-4deg); }
  50%  { transform: translate3d(9px, 12px, 0) rotate(6deg); }
  100% { transform: translate3d(0, 0, 0) rotate(-4deg); }
}

@keyframes sy-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes sy-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes sy-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* 尊重系统「减少动效」设置：关掉所有装饰性动画 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .sy-mote { opacity: 0 !important; }
}

/* ============================== 响应式 ============================== */

@media (max-width: 720px) {
  .sy-page {
    padding: 0 14px 56px;
  }

  .sy-header {
    padding-top: 20px;
  }

  .sy-header__aside {
    display: none;
  }

  .sy-brand__name {
    font-size: 22px;
  }

  .sy-hero__content {
    padding: 24px 8px 4px;
  }

  .sy-hero__sub {
    font-size: 13.5px;
  }

  .sy-clearing-wrap {
    padding: 0;
    margin-top: 22px;
  }

  .sy-clearing {
    min-height: 240px;
    padding: 34px 20px 40px;
  }

  .sy-clearing__icon {
    width: 44px;
    height: 44px;
  }

  .sy-clearing__label {
    font-size: 17px;
    letter-spacing: 0.08em;
  }

  .sy-clearing__hint {
    font-size: 12px;
    padding: 0 10px;
    line-height: 1.7;
  }

  .sy-row {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 10px;
  }

  .sy-row__size {
    display: none;
  }

  .sy-table th:nth-child(3),
  .sy-table td:nth-child(3) {
    display: none;
  }

  .sy-admin__tools {
    width: 100%;
    margin-left: 0;
  }

  .sy-admin__tools .sy-field {
    flex: 1 1 140px;
    min-width: 0;
  }

  .sy-login {
    margin-top: 42px;
    padding: 30px 22px 24px;
  }
}

@media (min-width: 1440px) {
  .sy-shell {
    width: min(920px, 100%);
  }
}
