/* ============================================================
 * 阿星 · 个人主页
 * 零依赖，零构建。所有颜色集中在 :root，想换风格只改这里。
 * ============================================================ */

:root {
  --accent: #ff7a45;
  --accent-2: #ffb020;
  --violet: #5b2a86;

  --ink: #1c1822;
  --ink-2: #57505f;
  --ink-3: #8d8597;
  --line: rgba(28, 24, 34, 0.12);
  --line-soft: rgba(28, 24, 34, 0.07);

  --win-bg: rgba(250, 248, 252, 0.94);
  --win-bg-solid: #faf8fc;
  --glass: rgba(20, 12, 34, 0.42);
  --glass-line: rgba(255, 255, 255, 0.16);

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, sans-serif;
  --font-serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --menubar-h: 34px;
  --radius-win: 12px;
  --shadow-win: 0 30px 70px -22px rgba(8, 4, 20, 0.6), 0 3px 10px rgba(8, 4, 20, 0.16);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: #160c2e;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; }

::selection { background: rgba(255, 122, 69, 0.3); }

/* ============================================================
 * 壁纸
 * ============================================================ */

.desktop {
  position: fixed;
  inset: var(--menubar-h) 0 0;
  overflow: hidden;
  background:
    radial-gradient(900px 620px at 82% 8%, rgba(122, 47, 95, 0.85), transparent 62%),
    radial-gradient(760px 520px at 12% 18%, rgba(255, 122, 69, 0.34), transparent 60%),
    radial-gradient(1100px 780px at 62% 108%, rgba(255, 122, 69, 0.3), transparent 66%),
    linear-gradient(158deg, #150b2b 0%, #22123d 38%, #3a1a5c 66%, #6a2a63 92%, #8c3352 100%);
}

/* 颗粒感，避免大面积渐变出现色带 */
.desktop::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* 壁纸上的大字 */
.wall-note {
  position: absolute;
  left: clamp(150px, 17vw, 260px);
  top: clamp(36px, 11vh, 128px);
  z-index: 1;
  max-width: 520px;
  color: #fff;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.35s ease;
}

/* 有窗口打开时，壁纸上的大字退到后面去 */
.desktop.has-wins .wall-note { opacity: 0.18; }

.wall-kicker {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.wall-name {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(52px, 9vw, 104px);
  line-height: 1.02;
  letter-spacing: 0.01em;
  text-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.wall-tagline {
  margin: 10px 0 0;
  font-size: clamp(15px, 1.6vw, 19px);
  letter-spacing: 0.24em;
  color: rgba(255, 255, 255, 0.72);
}

.wall-hint {
  margin: 26px 0 0;
  display: inline-block;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.42);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 12px;
}

/* ============================================================
 * 菜单栏
 * ============================================================ */

.menubar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--menubar-h);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 16px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 12.5px;
  background: rgba(18, 10, 30, 0.55);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-ic { width: 15px; height: 15px; color: var(--accent); }

.menu {
  display: inline-flex;
  gap: 2px;
}

.menu button {
  padding: 5px 10px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.78);
  transition: background 0.16s, color 0.16s;
}

.menu button:hover,
.menu button:focus-visible {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  outline: none;
}

.spacer { flex: 1; }

.menubar-status {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-mono);
}

.clock {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
 * 桌面图标
 * ============================================================ */

.desk-foot {
  position: absolute;
  right: 22px;
  bottom: 18px;
  z-index: 2;
  margin: 0;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.32);
  pointer-events: none;
  user-select: none;
}

.desk-icons {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 2;
  display: grid;
  gap: 4px;
  width: 96px;
}

.desk-icon {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 8px 4px 10px;
  border-radius: 10px;
  color: #fff;
  transition: background 0.16s;
}

.desk-icon:hover { background: rgba(255, 255, 255, 0.1); }
.desk-icon:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: -2px;
}
.desk-icon.is-open .icon-tile { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55); }

.icon-tile {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  color: #fff;
  box-shadow: 0 8px 18px -6px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.desk-icon:hover .icon-tile { transform: translateY(-2px); }
.icon-tile svg { width: 25px; height: 25px; }

.tile-about { background: linear-gradient(150deg, #6b7cff, #3f4fd0); }
.tile-works { background: linear-gradient(150deg, #ffb020, #f0703a); }
.tile-contact { background: linear-gradient(150deg, #24c486, #148a67); }
.tile-note { background: linear-gradient(150deg, #ffd166, #ff9f43); color: #6b3f00; }
.tile-share { background: linear-gradient(150deg, #8c6cff, #5b3fd0); }

.icon-label {
  font-size: 11.5px;
  line-height: 1.3;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  overflow-wrap: anywhere;
}

.icon-badge[hidden] { display: none; }

.icon-badge {
  position: absolute;
  top: 4px;
  right: 12px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* ============================================================
 * 窗口
 * ============================================================ */

.win-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.win {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 320px;
  min-height: 200px;
  background: var(--win-bg);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border-radius: var(--radius-win);
  box-shadow: var(--shadow-win), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  overflow: hidden;
  pointer-events: auto;
  animation: win-in 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
  will-change: transform;
  outline: none;
}

.win:focus,
.win:focus-visible { outline: none; }

@keyframes win-in {
  from { opacity: 0; transform: scale(0.97) translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.win.is-min { display: none; }

/* 最大化：铺满桌面（下面手机端会覆盖成留边） */
.win.is-max {
  inset: 0;
  width: auto;
  height: auto;
  border-radius: 0;
}

.win-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 39px;
  padding: 0 12px;
  flex: none;
  background: linear-gradient(rgba(255, 255, 255, 0.72), rgba(246, 243, 250, 0.5));
  border-bottom: 1px solid var(--line-soft);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.win-bar:active { cursor: grabbing; }
.win.is-max .win-bar { cursor: default; }

.win-title {
  flex: 1;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.traffic {
  display: flex;
  gap: 8px;
  flex: none;
  width: 58px;
}

.traffic button {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.09);
  transition: filter 0.14s;
}

.traffic button::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
}

.t-red { background: #ff5f57; }
.t-yellow { background: #febc2e; }
.t-green { background: #28c840; }
.traffic button:hover { filter: brightness(0.88); }

.win-body {
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.win-grip {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 52%, rgba(28, 24, 34, 0.16) 52%, rgba(28, 24, 34, 0.16) 62%, transparent 62%);
  touch-action: none;
}

.win.is-max .win-grip { display: none; }

/* ---------- 关于我 ---------- */

.about { padding: 26px 28px 30px; }

.about-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(150deg, #ff9a5a, #d0346a 60%, #6b2bb5);
  color: #fff;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 24px;
  box-shadow: 0 8px 20px -8px rgba(120, 30, 90, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  overflow: hidden;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.about-name {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.about-tag {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.12em;
}

.about-p { margin: 16px 0 0; font-size: 14px; line-height: 1.85; color: var(--ink-2); }
.about-p:first-of-type { margin-top: 22px; color: var(--ink); font-weight: 500; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-2);
  background: rgba(28, 24, 34, 0.05);
  border: 1px solid var(--line-soft);
}

.chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #24c486;
  box-shadow: 0 0 0 3px rgba(36, 196, 134, 0.18);
}

/* ---------- 作品 ---------- */

.works {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px 22px 26px;
}

.works-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.works-count {
  font-size: 12px;
  color: var(--ink-3);
  font-family: var(--font-mono);
}

/* 瀑布流：图有横有竖也不会留窟窿 */
.works-grid {
  column-width: 200px;
  column-gap: 14px;
}

.work {
  display: flex;
  flex-direction: column;
  break-inside: avoid;
  margin: 0 0 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line-soft);
  box-shadow: 0 6px 18px -12px rgba(28, 24, 34, 0.35);
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.18s;
}

.work:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -16px rgba(28, 24, 34, 0.45); }

.work-cover {
  position: relative;
  aspect-ratio: var(--ratio, 4 / 3);
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 34px;
  background: linear-gradient(150deg, #5b2a86, #ff7a45);
  overflow: hidden;
}

.work-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 有图但没链接的作品：hover 时给个“可放大”的暗示 */
.work-photo .work-cover::after {
  content: "↗";
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-family: var(--font);
  font-size: 13px;
  color: #fff;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s, transform 0.18s;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.work-photo:hover .work-cover::after { opacity: 0.9; transform: none; }

.work-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 11px 13px 14px;
}

.work-title {
  display: block;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.work-desc {
  display: block;
  margin: 5px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-3);
}

.work-tag {
  display: inline-block;
  align-self: flex-start;
  margin-top: 9px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--ink-2);
  background: rgba(28, 24, 34, 0.06);
}

.empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 200px;
  padding: 30px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
}

.empty-ic {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(28, 24, 34, 0.05);
  color: var(--ink-3);
  margin-bottom: 10px;
}

.empty-ic svg { width: 22px; height: 22px; }
.empty h3 { margin: 0; font-size: 15px; font-weight: 600; }
.empty p { margin: 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }

.empty code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(28, 24, 34, 0.07);
}

/* ---------- 联系 ---------- */

.contact { padding: 24px 26px 28px; }
.contact-lead { margin: 0 0 20px; font-size: 14px; line-height: 1.8; color: var(--ink-2); }

.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line-soft);
}

.contact-row + .contact-row { margin-top: 10px; }

.contact-label {
  flex: none;
  width: 42px;
  font-size: 12px;
  color: var(--ink-3);
}

.contact-value {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
  overflow-wrap: anywhere;
  user-select: all;
}

.copy-btn {
  flex: none;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12px;
  color: #fff;
  background: var(--ink);
  transition: opacity 0.16s, transform 0.16s;
}

.copy-btn:hover { opacity: 0.85; }
.copy-btn:active { transform: scale(0.96); }
.copy-btn.is-done { background: #24c486; }

.contact-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.contact-links a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  text-decoration: none;
  color: var(--ink-2);
  background: rgba(28, 24, 34, 0.05);
  border: 1px solid var(--line-soft);
  transition: background 0.16s;
}

.contact-links a:hover { background: rgba(28, 24, 34, 0.09); }

.contact-note {
  margin: 18px 0 0;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.7;
}

/* ---------- 便签 ---------- */

.note {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 26px 28px;
  background: linear-gradient(170deg, #fff6cf, #ffe9a8);
}

.note-quote {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.55;
  font-weight: 700;
  color: #6b4a00;
}

.note-foot {
  margin: 20px 0 0;
  font-size: 11.5px;
  color: rgba(107, 74, 0, 0.55);
  letter-spacing: 0.08em;
}

/* ============================================================
 * Dock
 * ============================================================ */

.dock {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 18px;
  background: rgba(24, 14, 38, 0.5);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid var(--glass-line);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.6);
}

.dock-item {
  position: relative;
  display: grid;
  justify-items: center;
  padding: 2px;
}

.dock-ic {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 6px 14px -8px rgba(0, 0, 0, 0.7);
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.dock-ic svg { width: 22px; height: 22px; }
.dock-item:hover .dock-ic { transform: translateY(-6px) scale(1.08); }
.dock-item:focus-visible { outline: none; }
.dock-item:focus-visible .dock-ic { box-shadow: 0 0 0 2px #fff; }

.dock-dot {
  width: 4px;
  height: 4px;
  margin-top: 4px;
  border-radius: 50%;
  background: transparent;
}

.dock-item.is-open .dock-dot { background: rgba(255, 255, 255, 0.85); }

.dock-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, 4px);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  white-space: nowrap;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s, transform 0.14s;
}

.dock-item:hover .dock-tip { opacity: 1; transform: translate(-50%, 0); }

.dock-sep {
  width: 1px;
  height: 34px;
  margin: 0 4px 6px;
  background: rgba(255, 255, 255, 0.18);
}

/* ============================================================
 * 锁屏
 * ============================================================ */

.lock {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  padding: 6vh 24px 8vh;
  color: #fff;
  background:
    radial-gradient(800px 560px at 78% 12%, rgba(122, 47, 95, 0.9), transparent 62%),
    radial-gradient(700px 500px at 14% 22%, rgba(255, 122, 69, 0.32), transparent 62%),
    linear-gradient(158deg, #150b2b 0%, #22123d 40%, #3a1a5c 68%, #6a2a63 94%, #8c3352 100%);
  transition: opacity 0.42s ease, visibility 0.42s;
}

.lock.is-gone { opacity: 0; visibility: hidden; }

.lock-top {
  text-align: center;
  align-self: start;
  padding-top: 3vh;
  font-variant-numeric: tabular-nums;
}

.lock-date {
  font-size: 15px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.66);
}

.lock-time {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: clamp(58px, 11vw, 96px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
}

.lock-user {
  align-self: center;
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 0;
  text-align: center;
}

.avatar-lg {
  width: 84px;
  height: 84px;
  font-size: 36px;
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.lock-name {
  margin: 14px 0 22px;
  font-size: 17px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.88);
}

.lock-enter {
  padding: 11px 30px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  transition: background 0.18s, transform 0.18s;
}

.lock-enter:hover { background: rgba(255, 255, 255, 0.24); transform: translateY(-1px); }
.lock-enter:active { transform: scale(0.98); }

.lock-hint {
  margin: 14px 0 0;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.4);
}

/* ============================================================
 * 提示条 / 无 JS
 * ============================================================ */

.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  z-index: 300;
  transform: translate(-50%, 12px);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  color: #fff;
  background: rgba(20, 12, 34, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

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

.noscript {
  position: fixed;
  inset: 0;
  z-index: 400;
  padding: 12vh 8vw;
  color: #fff;
  background: #1b1035;
  overflow: auto;
}

.noscript h1 { font-size: 40px; margin: 0 0 8px; }
.noscript p { font-size: 15px; line-height: 1.9; color: rgba(255, 255, 255, 0.75); }

/* ============================================================
 * 手机 / 窄屏：窗口变成整屏卡片，不做拖拽
 * ============================================================ */

@media (max-width: 740px) {
  :root { --menubar-h: 44px; }

  .menu { display: none; }
  .menubar { padding: 0 14px; gap: 10px; }
  .menubar-status { display: none; }

  .desktop { overflow: hidden; }

  .wall-note {
    top: 8vh;
    left: 22px;
    right: 22px;
  }

  .wall-name { font-size: clamp(44px, 13vw, 60px); }
  .wall-hint { display: none; }

  .desk-icons {
    left: 14px;
    right: 14px;
    top: auto;
    bottom: calc(18px + env(safe-area-inset-bottom));
    width: auto;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .desk-icon { padding: 10px 2px 8px; }
  .icon-tile { width: 46px; height: 46px; border-radius: 13px; }
  .icon-tile svg { width: 22px; height: 22px; }
  .icon-label { font-size: 10.5px; }
  .icon-badge { right: 6px; }

  .dock { display: none; }
  .desk-foot { display: none; }

  .win {
    position: fixed;
    top: calc(var(--menubar-h) + 10px);
    left: 8px;
    right: 8px;
    bottom: auto;
    max-height: calc(100dvh - var(--menubar-h) - 138px - env(safe-area-inset-bottom));
    min-width: 0;
    min-height: 0;
    border-radius: 16px;
    animation: sheet-in 0.26s cubic-bezier(0.2, 0.9, 0.3, 1);
  }

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

  .win-bar { cursor: default; height: 42px; }
  .win-bar:active { cursor: default; }
  .win-grip { display: none; }
  .win.is-max {
    top: calc(var(--menubar-h) + 10px);
    bottom: calc(120px + env(safe-area-inset-bottom));
    max-height: none;
    border-radius: 16px;
  }

  .about { padding: 22px 20px 26px; }
  .works { padding: 16px 16px 22px; }
  .works-grid { column-width: 150px; column-gap: 10px; }
  .work { margin-bottom: 10px; }
  .contact { padding: 20px 18px 22px; }
  .note { padding: 24px 22px; }
  .note-quote { font-size: 21px; }

  .toast { bottom: calc(140px + env(safe-area-inset-bottom)); }
}

@media (max-width: 380px) {
  .work-cover { font-size: 26px; }
  .contact-value { font-size: 13px; }
}

/* ============================================================
 * 无动画偏好
 * ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ============================================================
 * 图片灯箱
 * ============================================================ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 5vh 5vw;
  background: rgba(10, 6, 20, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s;
}

.lightbox.is-on { opacity: 1; visibility: visible; }

.lb-fig {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 14px;
  max-width: 100%;
}

.lb-fig img {
  max-width: min(1100px, 88vw);
  max-height: 74vh;
  border-radius: 8px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.85);
  object-fit: contain;
}

.lb-cap {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.6;
}

.lb-cap b { color: #fff; font-size: 14px; font-weight: 600; }

.lb-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 20px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.16s, transform 0.16s;
}

.lb-btn:hover { background: rgba(255, 255, 255, 0.22); }
.lb-btn[hidden] { display: none; }

.lb-close { top: 18px; right: 18px; font-size: 15px; }
.lb-prev { left: 22px; top: 50%; margin-top: -21px; }
.lb-next { right: 22px; top: 50%; margin-top: -21px; }

@media (max-width: 740px) {
  .lb-fig img { max-height: 68vh; }
  .lb-prev { left: 10px; }
  .lb-next { right: 10px; }
  .lb-cap { max-width: 78vw; }
}
