/* ===== 桌面模拟：纸底 + 方格 + 窗口 ===== */

:root {
  --paper: #f6f4ee;
  --ink: #1b1b1b;
  --muted: #6f6d67;
  --line: #1d1d1d;
  --pink: #ef8fa1;
  --gold: #e9b949;
  --blue: #5b9bd5;
  --white: #fffdf8;
  --mono: "Cascadia Mono", Consolas, "Courier New", monospace;
  --sans: "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --rail-w: 198px;
  --rail-pad-l: 28px;
  --rail-pad-r: 6px;
  --rail-gap: 16px;
  --bar-h: 60px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font: 16px/1.75 var(--sans);
  cursor: default;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(27, 27, 27, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 27, 27, .06) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }

/* 界面元素：不弹文字光标、不可选中，像系统而不是文档 */
.rail,
.taskbar,
.win-bar,
.win-btns,
.ico,
.tb-tab,
.album,
.links a,
.win-h,
.post-tag {
  user-select: none;
  -webkit-user-select: none;
}

.win-body { cursor: default; }

/* ---------- 开机动画 ---------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  background: var(--paper);
  background-image:
    linear-gradient(rgba(27, 27, 27, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 27, 27, .06) 1px, transparent 1px);
  background-size: 34px 34px;
  transition: opacity .45s ease, visibility .45s;
  animation: bootFallback 0s linear 6s forwards;
}

.boot.hide { opacity: 0; visibility: hidden; }

@keyframes bootFallback {
  to { opacity: 0; visibility: hidden; }
}

.boot-box { width: min(440px, 84vw); }

.boot-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.boot-name {
  font: 700 13px/1 var(--mono);
  letter-spacing: .34em;
}

.boot-sub {
  font: 600 10px/1 var(--mono);
  letter-spacing: .14em;
  color: var(--muted);
  white-space: nowrap;
}

.boot-track {
  height: 16px;
  border: 1.5px solid var(--line);
  background: var(--white);
  padding: 2px;
}

.boot-fill {
  height: 100%;
  width: 0;
  background: var(--pink);
  transition: width .1s linear;
}

.boot-line {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  font: 600 11px/1 var(--mono);
  letter-spacing: .14em;
  color: var(--muted);
}

/* ---------- 左侧图标 ---------- */
.rail {
  position: fixed;
  left: 0;
  top: 0;
  bottom: var(--bar-h);
  width: var(--rail-w);
  padding: 20px var(--rail-pad-r) 40px var(--rail-pad-l);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(8, min-content);
  grid-auto-flow: column;
  justify-items: center;
  align-content: start;
  row-gap: 20px;
  column-gap: var(--rail-gap);
  z-index: 2;
}

.ico {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  text-decoration: none;
  transition: opacity .3s ease, transform .32s cubic-bezier(.2, .7, .3, 1);
}

/* 开场：图标先藏起来，再一个个冒出来 */
.booting .ico {
  opacity: 0;
  transform: translateY(12px);
}

.booting .ico.in {
  opacity: 1;
  transform: none;
}

.ico-tile {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--c, #fff);
  color: var(--ink);
  font: 700 26px/1 var(--mono);
  line-height: 1;
  box-shadow: 2px 2px 0 rgba(27, 27, 27, .13);
  transition: transform .15s, box-shadow .15s;
}

.ico:hover .ico-tile {
  transform: translateY(-2px);
  box-shadow: 3px 4px 0 rgba(27, 27, 27, .18);
}

/* 头像个性的图标块 */
.ico-tile-img {
  padding: 0;
  overflow: hidden;
  background: var(--line);
}

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

.ico-label {
  font: 600 11.5px/1 var(--mono);
  letter-spacing: .12em;
  color: var(--ink);
}

.rail-foot {
  position: absolute;
  left: var(--rail-pad-l);
  width: calc((var(--rail-w) - var(--rail-pad-l) - var(--rail-pad-r) - var(--rail-gap)) / 2);
  bottom: 12px;
  text-align: center;
  font: 600 11px/1.7 var(--mono);
  letter-spacing: .1em;
  color: var(--muted);
}

.rail-foot span { display: block; }

/* ---------- 窗口舞台 ---------- */
.stage {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: var(--bar-h);
  overflow: hidden;
  z-index: 3;
  pointer-events: none;
}

.win {
  position: absolute;
  width: min(580px, calc(100% - 60px));
  background: var(--white);
  border: 1.5px solid var(--line);
  box-shadow: 3px 3px 0 rgba(27, 27, 27, .07);
  transition: box-shadow .15s, opacity .2s;
  pointer-events: auto;
  display: none;
}

.win.open { display: block; }
.win.dragging { box-shadow: 8px 10px 0 rgba(27, 27, 27, .18); }

@keyframes win-pop {
  0%   { transform: translateY(18px) scale(.94); opacity: 0; }
  100% { transform: none; opacity: 1; }
}

.win.pop { animation: win-pop .34s cubic-bezier(.2, .7, .3, 1) both; }

/* 激活 / 非激活 */
.win.is-active { box-shadow: 7px 7px 0 rgba(27, 27, 27, .17); }
.win:not(.is-active) { opacity: .8; }

.win .win-bar {
  background: #ce7689;
  transition: background .18s, color .18s;
}

.win.is-active .win-bar { background: var(--pink); }

.win .win-name { color: rgba(27, 27, 27, .58); }
.win.is-active .win-name { color: var(--ink); }

.win .win-btns button {
  background: rgba(255, 253, 248, .78);
  border-color: rgba(27, 27, 27, .42);
  color: rgba(27, 27, 27, .55);
  transition: background .12s, color .12s, transform .08s;
}

.win.is-active .win-btns button {
  background: var(--white);
  border-color: var(--line);
  color: var(--ink);
}

/* 悬停 / 按下：两种状态下都要有反馈 */
.win .win-btns button:hover {
  background: #ddd8ca;
  border-color: var(--line);
  color: var(--ink);
}

.win .win-btns button[data-close]:hover {
  background: #d9536b;
  border-color: var(--line);
  color: #fff;
}

.win .win-btns button:active {
  transform: translate(1px, 1px);
}

.win .win-body { background: var(--white); }

/* 拖动时压过一切 */
.win.dragging { box-shadow: 8px 10px 0 rgba(27, 27, 27, .2); }

/* 最大化：铺满舞台 */
.win.max {
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: flex;
  flex-direction: column;
}

.win.max .win-bar { flex: none; }

.win.max .win-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
}

/* 最小化：彻底收起（必须排在 max 之后） */
.win.min { display: none; }

#win-about { left: calc(var(--rail-w) + 30px); top: 24px; }
#win-photo { left: calc(var(--rail-w) + 66px); top: 46px; }
#win-set1  { left: calc(var(--rail-w) + 26px); top: 30px; }
#win-imas  { left: calc(var(--rail-w) + 120px); top: 60px; }
#win-blog  { left: calc(var(--rail-w) + 86px); top: 52px; }
#win-post  { left: calc(var(--rail-w) + 100px); top: 40px; }
#win-video { left: calc(var(--rail-w) + 110px); top: 66px; }
#win-link  { left: calc(var(--rail-w) + 150px); top: 70px; }

.win-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 9px 8px 11px;
  background: var(--pink);
  border-bottom: 1.5px solid var(--line);
  cursor: grab;
  user-select: none;
}

.win-bar:active { cursor: grabbing; }

.win-name {
  font: 700 11.5px/1 var(--mono);
  letter-spacing: .14em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win-btns { display: flex; flex: none; }

.win-btns button {
  width: 24px;
  height: 20px;
  margin-left: 5px;
  padding: 0;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font: 700 13px/1 var(--mono);
  cursor: pointer;
}

.win-btns button:hover { background: #ddd8ca; }

.win-body {
  padding: 16px 18px 20px;
  max-height: 58vh;
  overflow: auto;
}

/* ---------- 线构 R ---------- */
.sculpt {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(540px, 40vw);
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
  opacity: .92;
  filter: drop-shadow(0 0 26px rgba(239, 143, 161, .14));
  animation: sculpt-float 16s ease-in-out infinite;
}

.sculpt canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 760 / 820;
}

@keyframes sculpt-float {
  0%, 100% { transform: translate(-50%, -50%); }
  50%      { transform: translate(-50%, calc(-50% - 16px)); }
}

/* ---------- 控制台 ---------- */
#win-console {
  left: calc(var(--rail-w) + 150px);
  top: 92px;
  width: min(620px, calc(100% - 200px));
}

#win-console .win-body {
  background-color: rgba(8, 9, 12, .7);
  background-image: radial-gradient(circle, rgba(255, 185, 200, .16) 1px, transparent 1.4px);
  background-size: 20px 20px;
  -webkit-backdrop-filter: blur(10px) saturate(125%);
  backdrop-filter: blur(10px) saturate(125%);
  color: #d7dbe6;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: min(400px, 54vh);
  max-height: none;
  overflow: hidden;
}

.win.max #win-console .win-body { height: auto; }

.con-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: 10px 10px 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  font: 12px/1.55 var(--mono);
  white-space: pre-wrap;
  word-break: break-word;
}

.con-logo {
  margin: 0 0 12px;
  color: #ef8fa1;
  font: 12px/1.15 var(--mono);
  white-space: pre;
  overflow-x: auto;
}

.con-dim { color: #8f8f8f; }
.con-echo { color: #e9b949; }
.con-err { color: #d9536b; }

.con-line {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: #232323;
  border-top: 1px solid #3a3a3a;
}

.con-prompt {
  color: #ef8fa1;
  font: 12px/1 var(--mono);
  white-space: nowrap;
}

.con-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #e6e6e6;
  font: 12px/1.4 var(--mono);
  outline: none;
  padding: 0;
  caret-color: #ef8fa1;
}

.con-tab {
  flex: none;
  padding: 2px 7px;
  border: 1px solid #4a4a4a;
  background: transparent;
  color: #8f8f8f;
  font: 10px/1.4 var(--mono);
  cursor: pointer;
  user-select: none;
}

.con-tab:hover { background: #3a3a3a; color: #e6e6e6; }
.con-tab:active { transform: translate(1px, 1px); }

/* 控制台：外壳保持酒红配色，只有终端黑底做磨砂玻璃 */
#win-console {
  background: transparent;
  border-color: #14181f;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .35);
}

#win-console .win-bar {
  background: #4f222b;
  border-bottom-color: #14181f;
}

#win-console .win-name { color: #e8bcc4; }

#win-console.is-active .win-bar { background: #b8546a; }
#win-console.is-active .win-name { color: #ffffff; }

#win-console .win-btns button {
  background: #352027;
  border-color: #6d3540;
  color: #e8bcc4;
}

#win-console.is-active .win-btns button {
  background: #f7e9ec;
  border-color: #1d1d1d;
  color: #1b1b1b;
}

#win-console .win-btns button:hover {
  background: #6d3540;
  color: #ffffff;
}

#win-console .win-btns button[data-close]:hover {
  background: #d9536b;
  color: #ffffff;
}

/* 不跟普通窗口一起变淡 */
#win-console:not(.is-active) { opacity: 1; }

/* ---------- 窗口内元素 ---------- */
/* 文章大标题 */
.win-title {
  font: 700 21px/1.4 var(--sans);
  letter-spacing: 0;
  margin: 0 0 8px;
}

.win-h {
  font: 700 17px/1.4 var(--sans);
  letter-spacing: 0;
  margin: 22px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(27, 27, 27, .35);
}

.rule {
  border-top: 1px dashed rgba(27, 27, 27, .3);
  margin: 14px 0;
}

.dim { color: var(--muted); font-size: .92em; }

.about-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.about-ava {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--line);
}

.about-name { font: 700 24px/1.2 var(--sans); }

.about-meta {
  font: 600 10.5px/1 var(--mono);
  letter-spacing: .1em;
  color: var(--muted);
  margin-top: 6px;
}

.about-lines { font-size: 15.5px; line-height: 1.95; margin: 0; }

/* 相册卡片 */
.album {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: transform .15s, box-shadow .15s, background .15s;
}

.album:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 rgba(27, 27, 27, .16);
  background: #fff;
}

.album img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border: 1.5px solid var(--line);
  flex: none;
}

.album-meta strong { display: block; font: 600 15px/1.3 var(--sans); }
.album-meta em {
  display: block;
  font: 11.5px/1.4 var(--mono);
  font-style: normal;
  color: var(--muted);
  margin-top: 4px;
}

/* 照片：保持原始比例，点开看大图 */
.shots {
  columns: 3;
  column-gap: 8px;
  margin-top: 10px;
}

.shots img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 0 8px;
  border: 1.5px solid var(--line);
  break-inside: avoid;
  cursor: zoom-in;
  transition: filter .15s;
}

.shots img:hover { filter: brightness(1.06) contrast(1.02); }

.shots-2 { columns: 2; }

/* 文章列表 */
.post-list { list-style: none; margin: 0; padding: 0; }

.post-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(27, 27, 27, .3);
}

.post-list li:last-child { border-bottom: 0; }

.post-list a,
.post-list button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--ink);
  font: 15.5px/1.5 var(--sans);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.post-list a:hover,
.post-list button:hover { color: #d96b83; text-decoration: underline; }

.post-tag {
  font: 600 10.5px/1 var(--mono);
  letter-spacing: .08em;
  color: var(--muted);
  white-space: nowrap;
}

.dot-list { margin: 8px 0; padding-left: 18px; }
.dot-list li { margin: 4px 0; }

/* 视频卡片 */
.vcard {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  margin-bottom: 10px;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}

.vcard:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 rgba(27, 27, 27, .16);
}

.vthumb {
  width: 108px;
  height: 62px;
  flex: none;
  display: block;
  object-fit: cover;
  border: 1.5px solid var(--line);
  background: var(--line);
}

.vmeta { min-width: 0; }
.vmeta strong { display: block; font: 600 14px/1.45 var(--sans); }
.vmeta em {
  display: block;
  font: 11px/1.4 var(--mono);
  font-style: normal;
  color: var(--muted);
  margin-top: 5px;
}

/* 外链按钮 */
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.links a {
  display: inline-flex;
  padding: 8px 15px;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  font: 600 11.5px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: background .15s, transform .15s, box-shadow .15s;
}

.links a:hover {
  background: var(--gold);
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0 rgba(27, 27, 27, .16);
}

/* ---------- 任务栏 ---------- */
.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  background: var(--paper);
  border-top: 1.5px solid var(--line);
  z-index: 9999;
}

.tb-start {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 0 20px;
  background: var(--ink);
  color: #fff;
  font: 700 13px/1 var(--mono);
  letter-spacing: .16em;
}

.tb-tabs {
  flex: 1;
  display: flex;
  gap: 7px;
  padding: 0 12px;
  overflow: hidden;
}

.tb-tab {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font: 600 12px/1 var(--mono);
  letter-spacing: .1em;
  padding: 9px 14px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 2px 2px 0 rgba(27, 27, 27, .12);
  transition: background .15s, transform .1s, box-shadow .1s;
}

.tb-tab:hover { background: #ddd8ca; }
.tb-tab:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(27, 27, 27, .12); }

/* 当前正在操作的窗口，任务栏标签跟着亮，用该窗口自己的颜色 */
.tb-tab.is-active {
  background: var(--dot, var(--pink));
  border-color: var(--line);
  color: var(--ink);
  box-shadow: inset 0 2px 0 rgba(27, 27, 27, .16);
  transform: none;
}

.tb-tab.is-active:hover { background: var(--dot, var(--pink)); }

/* 最小化的窗口：按下去、虚化、带一个小色块 */
.tb-tab.is-min {
  background: rgba(27, 27, 27, .045);
  border-color: rgba(27, 27, 27, .4);
  border-style: solid;
  color: var(--muted);
  box-shadow: inset 0 2px 0 rgba(27, 27, 27, .13);
  transform: none;
}

.tb-tab.is-min::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  background: var(--dot, var(--gold));
  border: 1.5px solid rgba(27, 27, 27, .55);
}

.tb-tab.is-min:hover {
  background: #e4dfd2;
}

.tb-clock {
  padding: 0 20px;
  font: 600 13px/1 var(--mono);
  letter-spacing: .06em;
  white-space: nowrap;
}

/* ---------- 留言 ---------- */
.tb-msg {
  width: 40px;
  height: 34px;
  margin: 0 8px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font: 600 15px/1 var(--mono);
  cursor: pointer;
  flex: none;
  transition: background .12s, transform .1s;
}

.tb-msg:hover { background: #ddd8ca; }
.tb-msg:active { transform: translate(1px, 1px); }

.msg-pop {
  position: fixed;
  right: 118px;
  bottom: calc(var(--bar-h) + 8px);
  width: 268px;
  padding: 10px;
  background: var(--white);
  border: 1.5px solid var(--line);
  box-shadow: 4px 4px 0 rgba(27, 27, 27, .16);
  z-index: 10000;
  display: none;
}

.msg-pop.on { display: block; }

.msg-row { display: flex; align-items: center; gap: 8px; }
.msg-row + .msg-row { margin-top: 8px; }

.msg-input {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.3 var(--sans);
}

.msg-input:focus {
  outline: 2px solid var(--pink);
  outline-offset: 1px;
}

.msg-color {
  width: 36px;
  height: 32px;
  padding: 0;
  border: 1.5px solid var(--line);
  background: none;
  cursor: pointer;
  flex: none;
}

.msg-count {
  font: 600 10px/1 var(--mono);
  letter-spacing: .08em;
  color: var(--muted);
}

.msg-send {
  margin-left: auto;
  padding: 7px 14px;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font: 700 11px/1 var(--mono);
  letter-spacing: .1em;
  cursor: pointer;
}

.msg-send:hover { background: #ddd8ca; }
.msg-send:active { transform: translate(1px, 1px); }

/* ---------- 弹幕 ---------- */
.danmaku-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.dm {
  position: absolute;
  left: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  white-space: nowrap;
  opacity: .65;
  font: 700 17px/1.3 var(--sans);
  color: var(--dm-color, var(--ink));
  animation-name: dm-fly;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.dm::before {
  content: "";
  width: 11px;
  height: 11px;
  flex: none;
  background: var(--dm-color, var(--pink));
  border: 1.5px solid rgba(27, 27, 27, .55);
}

@keyframes dm-fly {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-100vw - 100%)); }
}

/* 弹幕列表按钮 */
.msg-side {
  margin-left: auto;
  padding: 7px 12px;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font: 700 11px/1 var(--mono);
  letter-spacing: .1em;
  cursor: pointer;
}

.msg-side:hover { background: #ddd8ca; }
.msg-side:active { transform: translate(1px, 1px); }

.msg-send { margin-left: 0; }

/* ---------- 右侧列表：弹幕 2/5，留言 3/5 ---------- */
.side {
  position: fixed;
  top: 0;
  right: 0;
  bottom: var(--bar-h);
  width: min(340px, 86vw);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-left: 1.5px solid var(--line);
  box-shadow: -4px 0 0 rgba(27, 27, 27, .08);
  transform: translateX(101%);
  transition: transform .28s cubic-bezier(.2, .7, .3, 1);
  z-index: 5000;
}

.side.on { transform: none; }

.dm-panel,
.note-panel {
  display: none;
  flex: 1 1 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.dm-panel.show,
.note-panel.show { display: flex; }

.side.both .dm-panel { flex: 2 1 0; }
.side.both .note-panel { flex: 3 1 0; border-top: 1.5px solid var(--line); }

.panel-bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px 9px 12px;
  background: var(--pink);
  border-bottom: 1.5px solid var(--line);
  font: 700 11.5px/1 var(--mono);
  letter-spacing: .14em;
}

.note-panel .panel-bar { background: var(--gold); }

.panel-x {
  width: 24px;
  height: 20px;
  padding: 0;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font: 700 13px/1 var(--mono);
  cursor: pointer;
}

.panel-x:hover { background: #d9536b; color: #fff; }

.panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* 长留言输入框 */
.note-pop { width: 320px; }

.msg-textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  padding: 8px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.5 var(--sans);
}

.msg-textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.dm-item-text { white-space: pre-wrap; }

.dm-empty {
  padding: 24px 14px;
  color: var(--muted);
  font: 600 11px/1.6 var(--mono);
  letter-spacing: .08em;
}

.dm-item {
  padding: 10px 14px 11px;
  border-top: 3px solid var(--c, var(--pink));
  border-bottom: 1px dashed rgba(27, 27, 27, .28);
  background: var(--white);
}

.dm-item-name {
  font: 700 11px/1 var(--mono);
  letter-spacing: .08em;
  color: var(--c, var(--ink));
}

.dm-item-text {
  margin-top: 7px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  word-break: break-word;
}

.dm-item-time {
  margin-top: 7px;
  font: 600 10px/1 var(--mono);
  letter-spacing: .08em;
  color: var(--muted);
}

/* ---------- 大图查看器 ---------- */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: none;
  place-items: center;
  padding: 26px;
  background: rgba(12, 12, 12, .9);
  cursor: zoom-out;
}

.viewer.on { display: grid; }

.viewer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 1.5px solid #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}

/* ---------- 窄屏：退化成竖排 ---------- */
@media (max-width: 820px) {
  body { overflow: auto; height: auto; }

  .rail {
    position: static;
    width: auto;
    bottom: auto;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1.5px solid var(--line);
    background: rgba(246, 244, 238, .92);
    backdrop-filter: blur(6px);
  }

  .rail-foot { display: none; }

  .stage {
    position: static;
    overflow: visible;
    padding: 16px 16px 92px;
  }

  .win {
    position: static;
    width: 100%;
    margin-bottom: 14px;
  }

  .win.max { height: auto !important; display: block; }

  .win-body { max-height: none; }

  .shots { columns: 2; }

  .tb-tabs { overflow-x: auto; }
}
