/* ============================================================
   IMGGEN ATELIER · 冰蓝浅色玻璃质感 / 天光渐变 / 蓝调光晕
   ============================================================ */

:root {
  --bg-top: #f4f8fd;
  --bg-mid: #e9f1fa;
  --bg-low: #dfeaf7;
  --ink: #1a2940;
  --ink-2: #4f6078;
  --ink-3: #8595ac;
  --accent: #2f7fd9;        /* 主蓝 */
  --accent-bright: #4aa3f7;
  --accent-2: #1f66c2;      /* 深一档，用于文字 */
  --accent-soft: rgba(74, 163, 247, 0.12);
  --hairline: rgba(26, 41, 64, 0.09);
  --hairline-2: rgba(26, 41, 64, 0.16);
  --line-soft: #d9e5f3;
  --glass: linear-gradient(160deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.42));
  --danger: #d95c4f;
  --ok: #3d9a68;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow-card: 0 30px 60px -30px rgba(23, 62, 110, 0.28), 0 2px 8px -2px rgba(23, 62, 110, 0.06);
  --font-ui: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: Georgia, "Times New Roman", "STZhongsong", "SimSun", serif;
  --font-mono: "Cascadia Mono", Consolas, "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html { scrollbar-color: rgba(26, 41, 64, .22) transparent; }

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 480px at 50% -8%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 45%, var(--bg-low) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(74, 163, 247, 0.25); color: var(--ink); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(26, 41, 64, .18); border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

button { font-family: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font-family: inherit; color: var(--ink); }

/* ---------------- 背景层：蓝调光晕 + 噪点 ---------------- */

.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(120px); will-change: transform; }
.aurora i:nth-child(1) {
  width: 52vw; height: 52vw; left: -14vw; top: -20vw; opacity: .55;
  background: radial-gradient(circle, rgba(116, 170, 240, 0.75), transparent 64%);
  animation: drift1 26s ease-in-out infinite alternate;
}
.aurora i:nth-child(2) {
  width: 46vw; height: 46vw; right: -12vw; top: 16vh; opacity: .5;
  background: radial-gradient(circle, rgba(142, 205, 240, 0.65), transparent 64%);
  animation: drift2 33s ease-in-out infinite alternate;
}
.aurora i:nth-child(3) {
  width: 44vw; height: 44vw; left: 24vw; bottom: -20vw; opacity: .45;
  background: radial-gradient(circle, rgba(167, 178, 246, 0.6), transparent 64%);
  animation: drift3 39s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(7vw, 5vh) scale(1.1); } }
@keyframes drift2 { to { transform: translate(-5vw, -6vh) scale(1.06); } }
@keyframes drift3 { to { transform: translate(4vw, -7vh) scale(1.12); } }

.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='0.12'/></svg>");
}

/* ---------------- 毛玻璃卡（带高光边） ---------------- */

.glass {
  position: relative;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--r-lg);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* ---------------- 顶栏 ---------------- */

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px;
  background: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.55));
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px -18px rgba(23, 62, 110, 0.25);
}

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

.brand-mark {
  width: 12px; height: 12px;
  background: linear-gradient(135deg, #4aa3f7, #1f66c2);
  transform: rotate(45deg); border-radius: 2.5px;
  box-shadow: 0 0 0 4px rgba(74, 163, 247, 0.18), 0 4px 12px rgba(31, 102, 194, 0.45);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name {
  font-family: var(--font-display); font-size: 17px; letter-spacing: .12em;
  background: linear-gradient(120deg, #1f66c2, #2f9de0 60%, #38bdf8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-name em { font-style: italic; }
.brand-sub { font-size: 10px; letter-spacing: .5em; color: var(--ink-3); }

.conn { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); letter-spacing: .08em; }
.conn .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); transition: background .3s, box-shadow .3s; }
.conn.on .dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(61, 154, 104, 0.18); }
.conn.off .dot { background: var(--danger); box-shadow: 0 0 0 3px rgba(217, 92, 79, 0.18); }

.top-meta { display: inline-flex; align-items: center; gap: 16px; }

/* ---- Linux DO 登录 ---- */

.login-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 18px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .1em;
  color: #fff;
  background: linear-gradient(135deg, #3f96f0, #1f66c2);
  box-shadow: 0 8px 20px -8px rgba(31, 102, 194, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.login-btn:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 12px 26px -8px rgba(31, 102, 194, 0.75); }
.login-btn svg { flex: none; opacity: .92; }

.user-area { display: inline-flex; align-items: center; gap: 10px; }
.uavatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #4aa3f7, #1f66c2);
  box-shadow: 0 0 0 3px rgba(74, 163, 247, 0.22);
  flex: none;
}
.uinfo { display: inline-flex; align-items: center; gap: 7px; max-width: 200px; }
.uname { font-size: 13px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.utl {
  flex: none; padding: 2px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em;
  color: var(--accent-2); background: rgba(74, 163, 247, 0.14);
  border: 1px solid rgba(74, 163, 247, 0.3);
}
.ulink { font-size: 12px; color: var(--ink-3); letter-spacing: .05em; transition: color .2s; }
.ulink:hover { color: var(--danger); }

/* ---------------- 生图排行榜 ---------------- */

.board-list { display: flex; flex-direction: column; gap: 10px; }

.brow {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 12px 28px -20px rgba(23, 62, 110, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  animation: fade .3s ease both;
}
.brow.me {
  border-color: rgba(74, 163, 247, 0.55);
  box-shadow: 0 12px 30px -14px rgba(31, 102, 194, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.brank {
  width: 36px; flex: none; text-align: center;
  font-size: 15px; font-weight: 800; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.brank.top1, .brank.top2, .brank.top3 { font-size: 20px; }

.bavatar { flex: none; }
.brow .uavatar { width: 36px; height: 36px; font-size: 14px; }

.binfo { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.bname {
  font-size: 14px; font-weight: 700; color: var(--ink);
  display: inline-flex; align-items: center; gap: 7px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bname .utl { flex: none; }
.bmeta { font-size: 11px; color: var(--ink-3); letter-spacing: .04em; }

.blast {
  margin-left: auto; flex: none;
  font-size: 11.5px; color: var(--ink-3); letter-spacing: .03em; white-space: nowrap;
}

.bcount {
  flex: none; min-width: 84px; text-align: right;
  font-family: var(--font-display); font-size: 21px; font-weight: 800;
  background: linear-gradient(120deg, #1f66c2, #2f9de0 60%, #38bdf8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}

/* ---------------- 顶部导航 ---------------- */

.topnav {
  display: flex; gap: 4px;
  background: rgba(26, 41, 64, 0.07);
  border-radius: 999px; padding: 4px;
}
.nav-item {
  padding: 7px 20px; border-radius: 999px;
  font-size: 13px; letter-spacing: .06em; color: var(--ink-2);
  transition: color .25s, background .25s, box-shadow .25s;
}
.nav-item:hover { color: var(--ink); }
.nav-item.active {
  background: #fff; color: var(--accent-2); font-weight: 700;
  box-shadow: 0 4px 14px -6px rgba(31, 102, 194, 0.45);
}

/* ---------------- 视图切换 ---------------- */

.view { display: none; }
.view.active { display: block; animation: fade .3s ease both; }

/* ---------------- 图库独立页 ---------------- */

.glayout { max-width: 1280px; margin: 0 auto; padding: 100px 32px 48px; }
.glhead { margin-bottom: 18px; }
.gtitle {
  font-family: var(--font-display); font-weight: 400; font-size: 26px; letter-spacing: .18em;
  background: linear-gradient(120deg, #1f66c2, #2f9de0 65%, #38bdf8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gsub { margin-top: 6px; font-size: 13px; color: var(--ink-2); letter-spacing: .04em; }
.glayout .gallery-chips { margin: 18px 0 8px; }

.gsearch { margin-top: 14px; max-width: 520px; }
.gsearch input {
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 14px;
  box-shadow: inset 0 1px 3px rgba(23, 62, 110, 0.05);
  transition: border-color .3s, box-shadow .3s;
}
.gsearch input::placeholder { color: var(--ink-3); }
.gsearch input:focus {
  outline: none;
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 3px rgba(74, 163, 247, 0.16);
}

.gcount {
  margin: 2px 2px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-3);
}

/* ---------------- 主布局 ---------------- */

.layout {
  max-width: 1280px; margin: 0 auto;
  padding: 92px 32px 48px;
  display: grid; grid-template-columns: 400px minmax(0, 1fr);
  gap: 30px; align-items: start;
}

/* ---------------- 创作面板 ---------------- */

.composer {
  position: sticky; top: 92px;
  padding: 28px 26px 24px;
  display: flex; flex-direction: column; gap: 20px;
}

.composer-title { display: flex; align-items: baseline; gap: 12px; }
.composer-title .cn {
  font-family: var(--font-display); font-size: 24px; letter-spacing: .3em;
  background: linear-gradient(120deg, #1f66c2, #2f9de0 65%, #38bdf8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.composer-title .en { font-size: 10px; letter-spacing: .4em; color: var(--ink-3); }

.field { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.field.grow { flex: 1; }

.label { font-size: 11px; letter-spacing: .24em; color: var(--accent-2); font-weight: 600; }
.label span { margin-left: 8px; letter-spacing: .3em; color: var(--ink-3); font-weight: 400; }

textarea {
  width: 100%; min-height: 108px; resize: vertical;
  background: transparent; border: 0; border-bottom: 1px solid var(--hairline);
  padding: 6px 2px 12px; font-size: 15px; line-height: 1.7;
  transition: border-color .3s;
}
textarea::placeholder { color: var(--ink-3); }
textarea:focus { outline: none; border-bottom-color: var(--accent-bright); }

.hint-row { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); letter-spacing: .06em; }

.select-wrap { position: relative; }
.select-wrap::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px;
  border-right: 1px solid var(--ink-2); border-bottom: 1px solid var(--ink-2);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
select {
  width: 100%; appearance: none; -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.8); border: 1px solid var(--line-soft);
  border-radius: var(--r-sm); padding: 11px 34px 11px 14px; font-size: 14px;
  cursor: pointer; transition: border-color .3s, box-shadow .3s;
}
select:hover { border-color: #b9cfe9; }
select:focus { outline: none; border-color: var(--accent-bright); box-shadow: 0 0 0 3px rgba(74, 163, 247, 0.16); }
select option { background: #fff; color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 14px; border-radius: 999px; font-size: 12px; letter-spacing: .08em;
  border: 1px solid var(--line-soft); color: var(--ink-2);
  background: rgba(255, 255, 255, 0.65);
  transition: all .25s;
}
.chip:hover { border-color: #b9cfe9; color: var(--ink); }
.chip.on {
  border-color: rgba(74, 163, 247, 0.65); color: var(--accent-2);
  background: linear-gradient(135deg, #e7f2ff, #d8eaff);
  box-shadow: 0 4px 14px -6px rgba(47, 127, 217, 0.45);
}

.stepper {
  display: inline-flex; align-items: center; gap: 4px;
  align-self: flex-start;
  border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.75); overflow: hidden;
}
.stepper button { width: 34px; height: 38px; font-size: 16px; color: var(--ink-2); transition: color .2s, background .2s; }
.stepper button:hover { color: var(--accent-2); background: rgba(74, 163, 247, 0.08); }
.stepper span { min-width: 30px; text-align: center; font-family: var(--font-mono); font-size: 14px; }

/* CTA：蓝色渐变主按钮 */
.cta {
  position: relative; overflow: hidden;
  margin-top: 4px; padding: 16px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #56aaf5, #2f7fd9 55%, #1f66c2);
  color: #ffffff; font-size: 14px; font-weight: 700; letter-spacing: .4em;
  text-shadow: 0 1px 2px rgba(13, 51, 96, 0.25);
  box-shadow: 0 16px 34px -14px rgba(31, 102, 194, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform .25s, box-shadow .25s, opacity .25s;
}
.cta:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 20px 42px -14px rgba(31, 102, 194, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.cta:active:not(:disabled) { transform: translateY(0); }
.cta:disabled { opacity: .7; cursor: wait; filter: saturate(.65); }
.cta::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .5) 50%, transparent 58%);
  transform: translateX(-130%);
}
.cta:hover:not(:disabled)::after { animation: shine .9s ease; }
@keyframes shine { to { transform: translateX(130%); } }

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

.stage { min-width: 0; }

.stage-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 4px 0 16px;
}
.stage-head h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: 20px; letter-spacing: .18em; color: var(--ink);
}
.stage-head h2::after {
  content: ""; display: block; width: 46px; height: 2px; margin-top: 7px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-bright), rgba(74, 163, 247, 0));
}
.stage-head h2 span { margin-left: 10px; font-size: 10px; letter-spacing: .4em; color: var(--ink-3); font-family: var(--font-ui); }
.stage-head + .stage-head, .latest + .stage-head { margin-top: 34px; }
.retain-hint { margin-left: 14px; margin-right: auto; font-size: 11px; letter-spacing: .06em; color: var(--ink-3); }

.ghost {
  padding: 6px 14px; font-size: 12px; letter-spacing: .1em; color: var(--ink-2);
  border: 1px solid var(--line-soft); border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  transition: all .25s;
}
.ghost:hover { color: var(--accent-2); border-color: rgba(74, 163, 247, 0.55); background: #fff; }

.latest { min-height: 200px; }

/* 最新作品卡片 */
.latest-card { animation: rise .5s ease both; }
.latest-card figure { margin: 0; }
.latest-img {
  display: block; max-width: 100%; max-height: 62vh;
  margin: 0 auto; border-radius: var(--r-lg);
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: #fff;
  box-shadow: 0 30px 60px -28px rgba(23, 62, 110, 0.4), 0 4px 14px -6px rgba(23, 62, 110, 0.15);
  opacity: 0; transition: opacity .7s ease;
}
.latest-img.loaded { opacity: 1; }

.meta-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 14px; padding: 0 2px;
}
.badge {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em;
  padding: 4px 11px; border: 1px solid var(--line-soft); border-radius: 999px;
  color: var(--ink-2); background: rgba(255, 255, 255, 0.72); white-space: nowrap;
}
.badge.accent {
  color: var(--accent-2); border-color: rgba(74, 163, 247, 0.45);
  background: linear-gradient(135deg, #eaf4ff, #dcedff);
}
.meta-bar .spacer { flex: 1; }
.meta-actions { display: flex; gap: 8px; }

/* 骨架屏 */
.skeleton {
  max-width: 520px; padding: 18px;
  animation: rise .4s ease both;
}
.skeleton .shimmer {
  aspect-ratio: 1 / 1; border-radius: var(--r-md);
  background: linear-gradient(100deg, #e4edf8 40%, #f6f9fd 50%, #e4edf8 60%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}
.skel-meta {
  display: flex; align-items: center; gap: 14px;
  margin-top: 14px; font-size: 12px; color: var(--ink-2); letter-spacing: .1em;
}
.skel-meta .pct {
  min-width: 52px; font-family: var(--font-mono); font-size: 17px;
  color: var(--accent-2); letter-spacing: .04em;
}
.skel-meta .bar {
  flex: 1; height: 4px; border-radius: 2px;
  background: rgba(26, 41, 64, 0.08); overflow: hidden;
}
.skel-meta .bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent-bright), var(--accent-2));
  border-radius: 2px; transition: width .5s ease;
}
.skel-meta span:last-child { font-family: var(--font-mono); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* 空状态 */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 70px 0 60px; text-align: center;
  border: 1px dashed #c3d5ea; border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.35);
}
.empty .big { font-family: var(--font-display); font-size: 30px; letter-spacing: .3em; color: var(--ink-2); }
.empty .big em {
  font-style: italic;
  background: linear-gradient(120deg, #1f66c2, #38bdf8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.empty .small { font-size: 13px; color: var(--ink-3); letter-spacing: .1em; }

/* 画廊网格 */
.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.thumb {
  position: relative; overflow: hidden; border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.95); background: #fff;
  box-shadow: 0 12px 28px -16px rgba(23, 62, 110, 0.35);
  cursor: zoom-in; animation: rise .5s ease both;
  transition: box-shadow .3s, transform .3s;
}
.thumb:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 40px -18px rgba(31, 102, 194, 0.45);
}
.thumb img {
  width: 100%; height: 190px; object-fit: cover; display: block;
  opacity: 0; transition: opacity .6s ease, transform .6s ease;
}
.thumb img.loaded { opacity: 1; }
.thumb:hover img { transform: scale(1.05); }
.thumb .ov {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 30px 12px 10px; font-size: 12px; color: #eef4fb;
  background: linear-gradient(transparent, rgba(9, 22, 40, 0.88));
  opacity: 0; transition: opacity .3s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.thumb:hover .ov { opacity: 1; }
.thumb .cnt {
  position: absolute; top: 9px; right: 9px;
  font-family: var(--font-mono); font-size: 10px;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.85); border: 1px solid rgba(255, 255, 255, 0.9);
  color: var(--ink-2);
}
.thumb .del {
  position: absolute; top: 9px; left: 9px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.94); border: 1px solid var(--line-soft);
  color: var(--ink-2); font-size: 13px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .25s, color .2s, border-color .2s, transform .2s;
}
.thumb:hover .del { opacity: 1; }
.thumb .del:hover { color: var(--danger); border-color: rgba(217, 92, 79, 0.6); transform: scale(1.08); }

/* ---------------- 灵感图库 ---------------- */

.gallery-chips { margin: -6px 0 16px; }

.pgrid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.pcard {
  position: relative; overflow: hidden;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.95); background: #fff;
  box-shadow: 0 12px 28px -16px rgba(23, 62, 110, 0.35);
  cursor: pointer; animation: rise .5s ease both;
  transition: box-shadow .3s, transform .3s;
}
.pcard:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px -18px rgba(31, 102, 194, 0.45);
}
.pcard img {
  width: 100%; height: 195px; object-fit: cover; display: block;
  opacity: 0; transition: opacity .6s ease, transform .5s ease;
}
.pcard img.loaded { opacity: 1; }
.pcard:hover img { transform: scale(1.04); }

.pcap { padding: 12px 14px 14px; }
.ptitle {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 5px;
}
.ptitle .pcat {
  font-family: var(--font-mono); font-size: 10px; font-weight: 400;
  padding: 2px 8px; border-radius: 999px;
  color: var(--accent-2); border: 1px solid rgba(74, 163, 247, 0.4);
  background: linear-gradient(135deg, #eaf4ff, #dcedff);
}
.pprompt {
  font-size: 12px; line-height: 1.65; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 40px;
}
.puse {
  display: inline-block; margin-top: 9px;
  font-size: 11px; letter-spacing: .06em; color: var(--accent-2);
  opacity: 0; transform: translateY(3px);
  transition: opacity .25s, transform .25s;
}
.pcard:hover .puse { opacity: 1; transform: none; }

/* ---------------- 灯箱 ---------------- */

.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(228, 238, 249, 0.88);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  animation: fade .25s ease both;
}
.lightbox[hidden] { display: none; }

.lb-body { display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: min(92vw, 900px); }
.lb-body img {
  max-width: 92vw; max-height: 64vh;
  border-radius: var(--r-md); border: 1px solid rgba(255, 255, 255, 0.95);
  background: #fff;
  box-shadow: 0 40px 80px -30px rgba(23, 62, 110, 0.5);
}
.lb-info { width: 100%; padding: 16px 20px; border-radius: var(--r-md); }
.lb-prompt { font-size: 14px; line-height: 1.7; color: var(--ink); margin-bottom: 10px; }
.lb-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.lb-actions { display: flex; gap: 10px; }

.lb-close {
  position: absolute; top: 22px; right: 30px;
  font-size: 30px; color: var(--ink-2); transition: color .2s, transform .2s;
}
.lb-close:hover { color: var(--ink); transform: rotate(90deg); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 44px; color: var(--ink-2); padding: 20px; line-height: 1;
  transition: color .2s;
}
.lb-nav:hover { color: var(--accent-2); }
.lb-nav.prev { left: 18px; }
.lb-nav.next { right: 18px; }

/* ---------------- Toast ---------------- */

.toasts {
  position: fixed; right: 26px; bottom: 26px; z-index: 120;
  display: flex; flex-direction: column; gap: 10px; max-width: 380px;
}
.toast {
  padding: 13px 18px; font-size: 13px; line-height: 1.6;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.94); border: 1px solid var(--line-soft);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px -18px rgba(23, 62, 110, 0.4);
  border-left: 2px solid var(--accent);
  color: var(--ink);
  animation: rise .35s ease both;
}
.toast.err { border-left-color: var(--danger); }
.toast.ok { border-left-color: var(--ok); }
.toast .sub { display: block; margin-top: 4px; font-size: 11px; color: var(--ink-3); }

/* ---------------- 页脚 ---------------- */

.foot {
  max-width: 1280px; margin: 0 auto; padding: 26px 32px 40px;
  display: flex; align-items: center; gap: 16px;
  font-size: 11px; letter-spacing: .3em; color: var(--ink-3);
}
.foot i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-soft), transparent); }

/* ---------------- 动画与响应式 ---------------- */

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

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; padding: 84px 20px 48px; }
  .glayout { padding: 84px 20px 48px; }
  .topnav { order: 3; width: 100%; justify-content: center; margin-top: 10px; }
  .topbar { flex-wrap: wrap; }
  .composer { position: static; }
  .brand-sub { display: none; }
  .lb-nav { display: none; }
}
