:root {
  --ink: #2c2638;
  --ink-soft: #5f566d;
  --accent: #d97757;
  --ga: .33;            /* 玻璃不透明度，由氛围滑条控制 */
  --gb: 18px;           /* 玻璃模糊 */
  --veil: .06;          /* 背景柔光 */
  --line: rgba(255, 255, 255, .62);
  --ok: #2f9e6a; --bad: #cf4b47;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --r: 22px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink); background: #efe8f2; -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* —— 背景插画（交叉淡入） —— */
.bg, .veil, .motes { position: fixed; inset: 0; }
.bg { z-index: -3; overflow: hidden; }
.layer {
  position: absolute; inset: 0; background-size: cover; background-position: 72% 35%;
  opacity: 0; transform: scale(1.05); transition: opacity 1.3s var(--ease), transform 10s linear;
}
.layer.on { opacity: 1; transform: scale(1); }
.veil {
  z-index: -2; pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,calc(var(--veil) + .16)) 0%, rgba(255,255,255,var(--veil)) 45%, rgba(255,255,255,0) 68%);
  transition: background .4s;
}
.motes { z-index: -1; pointer-events: none; overflow: hidden; }
.mote {
  position: absolute; bottom: -20px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.95), rgba(255,255,255,.3) 40%, transparent 70%);
  animation: rise linear infinite;
}
@keyframes rise { 0% { transform: translate(0,0); opacity: 0; } 15% { opacity: .9; } 100% { transform: translate(40px,-105vh); opacity: 0; } }

/* —— 玻璃 —— */
.glass {
  position: relative;
  background: rgba(255, 255, 255, var(--ga));
  border: 1px solid var(--line);
  border-radius: var(--r);
  backdrop-filter: blur(var(--gb)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--gb)) saturate(150%);
  box-shadow: 0 18px 50px rgba(70, 50, 80, .14), inset 0 1px 0 rgba(255,255,255,.75);
  transition: background .35s, backdrop-filter .35s;
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.42) 0%, rgba(255,255,255,0) 38%);
}
.glass > * { position: relative; }

/* —— 按钮 —— */
.btn {
  border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer; font-weight: 700; font-size: 14px;
  transition: transform .15s, box-shadow .2s, opacity .2s; white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary {
  color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 40%, transparent), inset 0 1px 0 rgba(255,255,255,.45);
}
.btn.ghost { background: rgba(255,255,255,.45); border: 1px solid var(--line); color: var(--ink); }
.btn.ghost:hover { background: rgba(255,255,255,.7); }
.btn.danger { background: rgba(207,75,71,.12); color: var(--bad); border: 1px solid rgba(207,75,71,.25); }
.small { font-size: 12px; color: var(--ink-soft); line-height: 1.6; }
.note { font-size: 12.5px; color: var(--ink-soft); line-height: 1.7; }
.err { font-size: 13px; color: var(--bad); min-height: 1em; }
.row { display: flex; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; }

/* —— 登录 —— */
.auth {
  position: fixed; left: clamp(16px, 8vw, 120px); top: 50%; transform: translateY(-50%);
  width: min(380px, calc(100vw - 32px)); padding: 30px 28px 22px; border-radius: 28px;
}
.eyebrow { font-size: 11px; letter-spacing: .3em; color: var(--ink-soft); }
.auth h1 {
  margin: 8px 0 20px; font-size: 30px; font-weight: 800;
  background: linear-gradient(100deg, var(--accent), #b064b8); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth form, .dlg form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--ink-soft); }
input:not([type=range]), select {
  width: 100%; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,.55); outline: none; transition: box-shadow .2s, background .2s;
}
input:not([type=range]):focus, select:focus { background: rgba(255,255,255,.85); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.auth .btn { margin-top: 4px; padding: 12px; }
.foot-note { margin-top: 14px; font-size: 11px; color: var(--ink-soft); text-align: right; }

/* —— 布局 —— */
.app { min-height: 100vh; padding: 28px clamp(16px, 3.4vw, 48px) 18px; display: flex; flex-direction: column; gap: 18px; }
.top { display: flex; justify-content: space-between; align-items: flex-start; max-width: 880px; }
.time { font-size: 64px; font-weight: 300; letter-spacing: .02em; line-height: 1; text-shadow: 0 2px 18px rgba(255,255,255,.8); }
.greet { margin-top: 8px; font-size: 15px; color: var(--ink-soft); text-shadow: 0 1px 10px rgba(255,255,255,.9); }
.grid { display: grid; grid-template-columns: minmax(0, 520px) 320px; gap: 18px; align-items: start; flex: 1; }
.col-a, .col-b { display: grid; gap: 16px; }
.panel { padding: 16px 16px 18px; }
.sec-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sec-title h2 { font-size: 15px; font-weight: 700; letter-spacing: .06em; }
.sec-title span { font-size: 12px; color: var(--ink-soft); }

/* 账号菜单 */
.account { position: relative; }
.chip { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; cursor: pointer; font-size: 14px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; background: var(--accent); }
.role { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.6); color: var(--ink-soft); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 160px; padding: 6px; border-radius: 16px; z-index: 10; display: grid; --ga: .72; }
.menu button { text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.menu button:hover { background: rgba(255,255,255,.7); }

/* 提问框 */
.ask { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px; border-radius: 999px 999px 26px 26px; }
.ask input { border-radius: 999px; padding: 12px 18px; font-size: 15px; background: rgba(255,255,255,.6); }
.ask .btn { padding: 12px 18px; }
.ask .hint { grid-column: 1 / -1; font-size: 11.5px; color: var(--ink-soft); padding: 0 14px 2px; }

/* AI 卡牌 */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; }
.card {
  position: relative; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; cursor: pointer;
  border: 2px solid rgba(255,255,255,.6); background: rgba(255,255,255,.3); padding: 0; text-align: left;
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(60,40,70,.18); }
.card.on { border-color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 55%, transparent), 0 12px 26px color-mix(in srgb, var(--c) 35%, transparent); }
.card img { width: 100%; height: 100%; object-fit: cover; object-position: 74% 25%; display: block; }
.card .ph {
  position: absolute; inset: 0; display: grid; place-items: start center; padding-top: 24%;
  background: radial-gradient(circle at 70% 25%, rgba(255,255,255,.75), transparent 55%), linear-gradient(160deg, color-mix(in srgb, var(--c) 35%, #fff), color-mix(in srgb, var(--c) 75%, #fff));
}
.card .ph b { font-size: 30px; color: #fff; text-shadow: 0 2px 10px color-mix(in srgb, var(--c) 70%, #000); font-weight: 800; }
.card .todo { position: absolute; top: 6px; left: 6px; font-size: 10px; padding: 1px 6px; border-radius: 999px; background: rgba(255,255,255,.7); color: var(--ink-soft); }
.card .meta {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 7px;
  background: linear-gradient(transparent, rgba(30,20,40,.55)); color: #fff;
}
.card .meta b { display: block; font-size: 13px; line-height: 1.2; }
.card .meta small { font-size: 10px; opacity: .85; }
.card .go {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; text-decoration: none; color: var(--ink);
  background: rgba(255,255,255,.8); opacity: 0; transition: opacity .2s, transform .2s;
}
.card:hover .go, .card.on .go, .card:focus-within .go { opacity: 1; }
.card .go:hover { transform: scale(1.12); }

/* 番茄钟 */
.presets { display: flex; gap: 6px; }
.presets button { border: 1px solid var(--line); background: rgba(255,255,255,.4); border-radius: 999px; padding: 2px 10px; font-size: 12px; cursor: pointer; }
.presets button.on { background: var(--accent); color: #fff; border-color: transparent; }
.timer-body { display: grid; grid-template-columns: 128px 1fr; gap: 16px; align-items: center; }
.ring { position: relative; width: 128px; height: 128px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: rgba(255,255,255,.35); stroke: rgba(255,255,255,.6); stroke-width: 8; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 326.7; transition: stroke-dashoffset .3s linear, stroke .6s; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 60%, transparent)); }
.timer.break .ring-fg { stroke: #49b48b; }
.ring-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-text b { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ring-text span { font-size: 12px; color: var(--ink-soft); letter-spacing: .2em; }
.timer-ctrl { display: grid; gap: 8px; }
.timer-ctrl .row .btn { flex: 1; padding: 8px; }

/* 花园 */
.garden-body { display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: center; }
.pot { width: 104px; height: 138px; }
.pot-svg { width: 100%; height: 100%; overflow: visible; }
.pot.grow .pot-svg { animation: grow .8s var(--ease); }
.pot.bloom .pot-svg { animation: bloom 1.2s var(--ease); filter: drop-shadow(0 0 14px rgba(255,220,240,.9)); }
@keyframes grow { 40% { transform: scale(1.06) translateY(-3px); } }
@keyframes bloom { 0% { transform: scale(.85); opacity: .4; } 60% { transform: scale(1.12); } }
.g-name { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.bar { height: 8px; border-radius: 8px; background: rgba(255,255,255,.5); overflow: hidden; border: 1px solid rgba(255,255,255,.7); }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #8ad8a8, #4fb37e); transition: width .8s var(--ease); }
.g-info .small { margin-top: 6px; }
.seeds { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.seeds button { border: 1px solid var(--line); background: rgba(255,255,255,.45); border-radius: 999px; padding: 1px 8px; font-size: 11.5px; cursor: pointer; }
.seeds button.on { background: #4fb37e; color: #fff; border-color: transparent; }
.shelf {
  margin-top: 12px; display: flex; gap: 2px; align-items: flex-end; min-height: 50px; padding: 6px 8px 0;
  border-bottom: 6px solid rgba(255,255,255,.75); border-radius: 0 0 6px 6px; overflow-x: auto;
  background: linear-gradient(transparent 70%, rgba(255,255,255,.25));
}
.shelf svg { width: 36px; height: 42px; flex: none; }
.shelf .empty { font-size: 12px; color: var(--ink-soft); padding-bottom: 8px; }
.shelf .more { font-size: 12px; color: var(--ink-soft); padding: 0 4px 10px; }

/* 白噪音 */
.mix { display: grid; grid-template-columns: 24px 36px 1fr; align-items: center; gap: 8px; color: var(--ink); font-size: 13px; padding: 3px 0; }
.ico { font-size: 16px; }

/* —— 滑条通用 —— */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; background: transparent; cursor: pointer; --p: 0%; }
input[type=range]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 6px;
  background: linear-gradient(90deg, var(--accent) var(--p), rgba(255,255,255,.55) var(--p));
  box-shadow: inset 0 1px 2px rgba(0,0,0,.08);
}
input[type=range]::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(255,255,255,.55); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--accent); }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5px; border-radius: 50%;
  background: #fff; border: 2px solid var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); }

/* —— 氛围滑条 —— */
.bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 858px; }
.atmos {
  display: flex; align-items: center; gap: 14px; padding: 10px 20px; border-radius: 999px; width: min(440px, 100%);
}
.a-end { font-size: 12px; letter-spacing: .2em; color: var(--ink-soft); white-space: nowrap; }
.a-track { position: relative; flex: 1; height: 28px; display: flex; align-items: center; }
#glass { position: relative; z-index: 1; }
#glass::-webkit-slider-runnable-track {
  height: 10px; border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.95) 100%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.35) 0 2px, transparent 2px 10px);
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: inset 0 0 8px rgba(255,255,255,.6), 0 0 18px rgba(255,255,255,.35);
}
#glass::-moz-range-track {
  height: 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,.8);
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.95));
}
#glass::-moz-range-progress { background: transparent; }
#glass::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%; border: 0;
  background: radial-gradient(circle at 35% 30%, #fff 0%, rgba(255,255,255,.85) 35%, color-mix(in srgb, var(--accent) 45%, #fff) 100%);
  box-shadow: 0 0 0 4px rgba(255,255,255,.35), 0 0 18px 4px rgba(255,255,255,.85), 0 0 34px 8px color-mix(in srgb, var(--accent) 35%, transparent);
  animation: breathe 3.2s ease-in-out infinite;
}
#glass::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%; border: 0;
  background: radial-gradient(circle at 35% 30%, #fff, color-mix(in srgb, var(--accent) 45%, #fff));
  box-shadow: 0 0 18px 4px rgba(255,255,255,.85);
}
@keyframes breathe { 50% { box-shadow: 0 0 0 7px rgba(255,255,255,.2), 0 0 26px 8px rgba(255,255,255,.9), 0 0 44px 12px color-mix(in srgb, var(--accent) 40%, transparent); } }
.a-track output {
  position: absolute; top: -24px; left: calc(var(--p) * 0.92 + 4%); transform: translateX(-50%);
  font-size: 11px; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.8); color: var(--ink-soft);
  opacity: 0; transition: opacity .25s; pointer-events: none;
}
.atmos:hover output, .atmos.drag output { opacity: 1; }
.atmos.drag { box-shadow: 0 0 0 1px rgba(255,255,255,.9), 0 0 40px rgba(255,255,255,.55), 0 18px 50px rgba(70,50,80,.14); }
.build { font-size: 12px; color: var(--ink-soft); text-shadow: 0 1px 8px rgba(255,255,255,.9); }

/* —— 对话框 —— */
.dlg {
  margin: auto; width: min(400px, calc(100vw - 32px)); padding: 22px; border-radius: 24px; color: var(--ink); --ga: .78;
}
.dlg.wide { width: min(760px, calc(100vw - 24px)); max-height: 86vh; overflow: auto; }
.dlg::backdrop { background: rgba(40, 30, 50, .25); backdrop-filter: blur(4px); }
.dlg h3 { font-size: 17px; margin-bottom: 4px; }
.dlg-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.tabs { display: flex; gap: 4px; background: rgba(255,255,255,.5); padding: 3px; border-radius: 999px; }
.tabs button { border: 0; background: none; padding: 5px 14px; border-radius: 999px; cursor: pointer; font-size: 13px; }
.tabs button.on { background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.x { margin-left: auto; border: 0; background: rgba(255,255,255,.6); width: 30px; height: 30px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.new-user { display: grid; grid-template-columns: 1fr 1.3fr auto auto; gap: 8px; margin-bottom: 6px; }
.table-wrap { overflow-x: auto; }
table.users { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0 12px; }
table.users th { text-align: left; font-weight: 600; color: var(--ink-soft); font-size: 12px; padding: 6px 8px; }
table.users td { padding: 8px; border-top: 1px solid rgba(255,255,255,.7); vertical-align: middle; }
table.users .acts { display: flex; gap: 6px; flex-wrap: wrap; }
table.users .acts .btn { padding: 4px 10px; font-size: 12px; font-weight: 600; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.7); }
.badge.admin { background: color-mix(in srgb, var(--accent) 18%, #fff); color: var(--accent); }
.badge.off { color: var(--bad); }
.reset { display: flex; gap: 6px; margin-top: 6px; }
.reset input { padding: 5px 10px; font-size: 12px; }
.logs { list-style: none; display: grid; gap: 2px; font-size: 12.5px; }
.logs li { display: grid; grid-template-columns: 128px 80px 96px 1fr auto; gap: 8px; padding: 7px 8px; border-radius: 8px; }
.logs li:nth-child(odd) { background: rgba(255,255,255,.4); }
.logs .fail { color: var(--bad); }
.logs .ip { color: var(--ink-soft); font-size: 11px; }

/* —— 提示 —— */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: 999px; font-size: 14px; color: var(--ink);
  background: rgba(255,255,255,.88); box-shadow: 0 12px 30px rgba(60,40,70,.18); transition: opacity .3s, transform .3s; z-index: 50;
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* —— 窄屏 —— */
@media (max-width: 960px) {
  .grid { grid-template-columns: 1fr; }
  .top, .bottom { max-width: none; }
  .veil { background: rgba(255,255,255,calc(var(--veil) + .08)); }
}
@media (max-width: 560px) {
  .app { padding-top: 18px; }
  .time { font-size: 48px; }
  .ask { border-radius: 24px; grid-template-columns: 1fr; }
  .new-user { grid-template-columns: 1fr 1fr; }
  .logs li { grid-template-columns: 1fr 1fr; }
  .chip #accName { display: none; }
  .layer { background-position: 70% 30%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ================= v0.4 布局：左栏 AI / 中栏 专注+声音 / 底部横跨的花台 ================= */
.app { padding-top: 22px; gap: 14px; }
.time { font-size: 56px; }
.grid { grid-template-rows: auto auto; row-gap: 16px; }
.shelf-panel { grid-column: 1 / -1; padding-bottom: 10px; }
.shelf-panel .sec-title { align-items: center; }
.shelf-panel .sec-title span { flex: 1; }
.btn.tiny { padding: 4px 12px; font-size: 12px; font-weight: 600; }

/* 声音面板 */
.music { display: grid; grid-template-columns: 38px 1fr; gap: 8px; align-items: center; margin-bottom: 6px; }
.play {
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; font-size: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 65%, #fff), var(--accent));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 40%, transparent), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .15s;
}
.play:active { transform: scale(.92); }
.play.on { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent), 0 6px 16px color-mix(in srgb, var(--accent) 40%, transparent); } }
.music select { padding: 8px 12px; border-radius: 12px; font-size: 14px; cursor: pointer; }
.noise-row { border-top: 1px dashed rgba(255,255,255,.75); margin-top: 6px; padding-top: 6px; }

/* 花台 */
.shelf {
  position: relative; display: flex; justify-content: space-around; align-items: flex-end; gap: 4px;
  min-height: 150px; padding: 0 6px; overflow-x: auto; overflow-y: visible;
}
.shelf::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 18px; height: 10px; border-radius: 6px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.55));
  box-shadow: 0 6px 14px rgba(80,60,90,.12), 0 0 18px rgba(255,255,255,.6);
}
.shelf .empty { align-self: center; font-size: 13px; color: var(--ink-soft); }
.shelf.drop-hint { outline: 2px dashed rgba(255,255,255,.95); outline-offset: -6px; border-radius: 16px; background: rgba(255,255,255,.15); }

.plant {
  position: relative; z-index: 1; flex: none; width: 96px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  display: flex; flex-direction: column; align-items: center; transition: transform .25s var(--ease), filter .25s;
}
.plant .plant-svg { width: 96px; height: 125px; overflow: visible; filter: drop-shadow(0 0 6px rgba(255,255,255,.75)) drop-shadow(0 6px 8px rgba(60,40,70,.12)); }
.plant .tag { font-size: 11px; color: var(--ink-soft); margin-top: -2px; padding: 0 8px; border-radius: 999px; background: rgba(255,255,255,.55); }
.plant:hover { transform: translateY(-4px); }
.plant:hover .plant-svg { filter: drop-shadow(0 0 10px rgba(255,255,255,.95)) drop-shadow(0 0 22px rgba(255,214,230,.8)) drop-shadow(0 8px 10px rgba(60,40,70,.14)); }
.plant .sway { transform-box: view-box; transform-origin: 50px 92px; animation: plantSway var(--sd, 4.2s) ease-in-out infinite alternate; }
@keyframes plantSway { from { transform: rotate(-2.2deg); } to { transform: rotate(2.2deg); } }

.plant-layer { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.plant-layer .plant { position: absolute; pointer-events: auto; width: 116px; }
.plant-layer .plant .plant-svg { width: 116px; height: 151px; }
.plant-layer .plant .tag { opacity: 0; transition: opacity .2s; }
.plant-layer .plant:hover .tag { opacity: 1; }
.plant.dragging { cursor: grabbing; z-index: 50; transform: scale(1.08) !important; transition: none; }
.plant.dragging .plant-svg { filter: drop-shadow(0 0 14px rgba(255,255,255,1)) drop-shadow(0 16px 18px rgba(60,40,70,.22)); }
.plant .home {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.85); font-size: 12px; opacity: 0; transition: opacity .2s; color: var(--ink-soft);
}
.plant-layer .plant:hover .home { opacity: 1; }

/* 特效档位 */
.fx-seg { display: flex; align-items: center; gap: 2px; padding: 4px 6px 4px 12px; border-radius: 999px; font-size: 12px; }
.fx-seg span { color: var(--ink-soft); margin-right: 4px; letter-spacing: .1em; }
.fx-seg button { border: 0; background: none; padding: 4px 10px; border-radius: 999px; cursor: pointer; font-size: 12px; }
.fx-seg button.on { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.08); color: var(--accent); font-weight: 700; }
.bottom { max-width: 858px; }
.atmos { width: min(380px, 100%); }

@media (max-width: 960px) {
  .shelf { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .plant { width: 84px; } .plant .plant-svg { width: 84px; height: 109px; }
  .plant-layer .plant { width: 96px; } .plant-layer .plant .plant-svg { width: 96px; height: 125px; }
}

/* 卡牌拖动排序 */
.card { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.card.lifted { position: fixed; z-index: 80; pointer-events: none; transform: rotate(-3deg) scale(1.06); box-shadow: 0 18px 36px rgba(50,30,60,.3); transition: none; }
.card.slot { border: 2px dashed rgba(255,255,255,.95); background: rgba(255,255,255,.25); box-shadow: none; }
.card.wiggle { animation: wiggle .4s ease-in-out infinite; }
@keyframes wiggle { 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }

/* 顶栏：时钟 | 氛围滑条 + 特效 | 账号 + 版本 */
.top { max-width: 858px; align-items: center; gap: 16px; }
.controls { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-left: auto; }
.controls .atmos { width: 340px; padding: 6px 18px; }
.controls .fx-seg { align-self: flex-end; }
.account { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; align-self: flex-start; }
.account .build { font-size: 11px; }
.menu { top: 44px; }
@media (max-width: 960px) {
  .top { flex-wrap: wrap; }
  .controls { order: 3; width: 100%; margin-left: 0; flex-direction: row; flex-wrap: wrap; }
  .controls .atmos { flex: 1; width: auto; min-width: 240px; }
  .controls .fx-seg { align-self: center; }
}

/* 防止花台/卡牌把栅格撑宽（手机上横向溢出） */
.grid > *, .col-a > *, .col-b > * { min-width: 0; }
.app { padding-bottom: 10px; }
.shelf { min-height: 140px; }
@media (max-width: 960px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .clock { flex: 1; }
  .account { order: 2; }
}
