:root {
  --bg-stage: #e8e2d6;
  --bg-board: #d9d2c4;
  --bg-sidebar: #efeae0;
  --ink: #1a1a1a;
  --ink-soft: #4a4742;
  --line: rgba(26, 26, 26, 0.12);
  --yellow: #f0c84a;
  --black: #161616;
  --airmail: #c45c4a;
  --cream: #f7f3ea;
  --font-display: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --radius-frame: 18px;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: #c8bfb0;
  -webkit-font-smoothing: antialiased;
  display: grid;
  place-items: center;
  min-height: 100vh;
}

button,
a {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* —— Loader —— */
.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  justify-items: center;
  background: #f6f4ef;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* 画面里只有标题时：几何正中 */
.solo-title,
.loader__mark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: max-content;
  max-width: calc(100vw - 2rem);
  padding: 0 0.75rem;
  box-sizing: border-box;
}

.loader__mark {
  animation: loaderPulse 1.2s ease-in-out infinite alternate;
}

.loader__brand,
.solo-title__brand {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 8vw, 5rem);
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  margin: 0;
  text-align: center;
}

.loader__sub,
.solo-title__sub {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.82rem;
  letter-spacing: 0.28em;
  padding-right: 0.28em; /* 抵消字距，避免视觉偏左 */
  font-weight: 500;
  text-align: center;
}

.loader__pct {
  position: absolute;
  left: 2rem;
  bottom: 2rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
}

@keyframes loaderPulse {
  from { transform: translate(-50%, -50%) scale(0.98); opacity: 0.85; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* —— Stage / Board layout —— */
.stage {
  display: grid;
  grid-template-columns: minmax(210px, 22%) 1fr;
  gap: 0;
  width: min(1560px, calc(100vw - 24px));
  min-height: 820px;
  height: min(940px, max(820px, calc(100vh - 20px)));
  background:
    linear-gradient(#c9c0b3, #c9c0b3) padding-box,
    linear-gradient(180deg, #ece6dc, #b7aea1) border-box;
  border: 10px solid transparent;
  border-radius: 22px;
  padding: 8px;
  box-shadow:
    0 22px 48px rgba(50, 40, 20, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  overflow: hidden;
}

.sidebar {
  background: var(--bg-sidebar);
  border-radius: 20px 0 0 20px;
  border: 1px solid var(--line);
  border-right: none;
  padding: 1.15rem 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 0;
  overflow: hidden;
}

.sidebar__brand {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.sidebar__brand:hover,
.sidebar__brand[aria-expanded="true"] {
  opacity: 0.72;
}

.sidebar__tag {
  margin: 0.35rem 0 0;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.sidebar__status {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.sidebar__status-label {
  font-weight: 600;
}

.sidebar__status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2f9e5b;
  box-shadow: 0 0 0 0 rgba(47, 158, 91, 0.45);
  animation: pulseDot 1.8s ease-out infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(47, 158, 91, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(47, 158, 91, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 158, 91, 0); }
}

.sidebar__legend-title,
.sidebar__hint p:first-child,
.sidebar__connect {
  margin: 0 0 0.4rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar__legend ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar__legend li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.72rem;
  padding: 0.28rem 0;
  border-bottom: 1px dashed var(--line);
  color: var(--ink-soft);
}

.sidebar__hint p {
  margin: 0.15rem 0;
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.sidebar__manifesto {
  margin: auto 0 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.1rem, 1.6vw, 1.45rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.sidebar__foot {
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.qr-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.qr-block {
  width: 52px;
  height: 52px;
  padding: 0;
  border: none;
  display: block;
  background:
    repeating-linear-gradient(0deg, #222 0 2px, transparent 2px 6px),
    repeating-linear-gradient(90deg, #222 0 2px, transparent 2px 6px),
    #f4f0e8;
  background-blend-mode: multiply;
  background-size: auto, auto, auto;
  opacity: 0.85;
  cursor: zoom-in;
}

.qr-block.has-media {
  opacity: 1;
  background-blend-mode: normal;
  background-size: cover;
  background-position: center;
}

.qr-block--alt {
  background-color: #e8ddd0;
}

.sidebar__cta {
  margin: 0.25rem 0 0;
  font-size: 0.7rem;
  color: var(--ink-soft);
}

/* Board */
.board {
  position: relative;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 252, 245, 0.35), transparent 42%),
    var(--bg-board);
  border-radius: 0 12px 12px 0;
  border: 1px solid rgba(90, 80, 65, 0.18);
  overflow: visible;
}

.board__grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 50% 50%, #6d665c 1.7px, #4e4942 2.3px, transparent 2.5px);
  background-size: 26px 26px;
  /* 与 layoutBoard 洞心 (13+26n) 对齐 */
  background-position: 0 0;
  pointer-events: none;
  opacity: 0.55;
}

button.obj,
a.obj {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  overflow: visible;
}

.obj {
  --grid: 26px;
  position: absolute;
  left: calc(var(--px, 0.5) * 100% - var(--w) / 2 + var(--dcol, 0) * 26px);
  top: calc(var(--py, 0.2) * 100% - 7px + var(--drow, 0) * 26px);
  width: var(--w);
  overflow: visible;
  text-decoration: none;
  text-align: left;
  z-index: 2;
  transform-origin: 50% 7px;
  filter: drop-shadow(0 10px 14px rgba(40, 30, 15, 0.18));
}

.obj--file { z-index: 1; }
.obj--badge { z-index: 2; }
.obj:hover,
.obj:focus-visible {
  z-index: 6;
  outline: none;
}

/* Thumbtack — 圆心压在洞心，卡片顶边过圆心（一半在板上、一半在卡上） */
.peg {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 8;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #f7f3ec, #b0aaa0 52%, #5f5a52 100%);
  box-shadow:
    0 2px 3px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 0 0 1px rgba(40, 35, 28, 0.25);
  pointer-events: none;
}

.obj__sway {
  display: block;
  padding-top: 8px;
  transform-origin: 50% 0;
  transform: none;
  animation: none;
}

.obj:hover .obj__sway,
.obj:focus-visible .obj__sway,
.obj.is-gust .obj__sway {
  animation: none;
}

.hanger {
  display: none !important;
}

/* Object skins */
.obj--key { width: 124px; min-width: 124px; }
.obj--key .obj__body {
  width: 124px;
  min-height: 196px;
  padding: 0.95rem 0.75rem 0.85rem;
  background: #e1d9ce;
  border-radius: 12px;
  border: 1px solid rgba(90, 70, 50, 0.12);
  color: #2a2520;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  position: relative;
  z-index: 2;
}

.obj__arrow {
  margin-top: auto;
  font-size: 1.1rem;
}

.obj--file {
  width: 278px;
  min-width: 278px;
}

.obj--file .obj__body.sleeve {
  width: 278px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  position: relative;
  z-index: 2;
}

.sleeve__shell {
  display: block;
  position: relative;
  padding: 18px 16px 16px;
  border-radius: 16px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.22) 32%, rgba(186, 205, 220, 0.28) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 16px 30px rgba(40, 30, 15, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 0 0 1px rgba(120, 145, 165, 0.28),
    inset 0 0 0 8px rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(2px);
  overflow: hidden;
}

.sleeve__shell::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(90, 110, 130, 0.12);
  pointer-events: none;
  z-index: 2;
}

.sleeve__rivet {
  position: absolute;
  z-index: 4;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, #f7f4ee, #a8a297 55%, #5c574f);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 0 0 1px rgba(40, 35, 28, 0.2);
}

.sleeve__rivet--tl { top: 10px; left: 10px; }
.sleeve__rivet--tr { top: 10px; right: 10px; }
.sleeve__rivet--bl { bottom: 10px; left: 10px; }
.sleeve__rivet--br { bottom: 10px; right: 10px; }

.sleeve__glare {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(118deg, transparent 12%, rgba(255, 255, 255, 0.72) 28%, transparent 42%),
    linear-gradient(152deg, transparent 55%, rgba(255, 255, 255, 0.38) 66%, transparent 78%);
  mix-blend-mode: soft-light;
  opacity: 0.95;
}

.obj__paper {
  display: block;
  position: relative;
  z-index: 1;
  background: #fff;
  padding: 0.9rem 0.95rem 1rem;
  border-radius: 3px;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.05),
    0 10px 18px rgba(40, 30, 15, 0.1),
    inset 0 0 0 1px rgba(0, 0, 0, 0.03);
  transform: translateY(1px);
}

.obj__rule {
  display: block;
  width: 36px;
  height: 2px;
  margin: 0.45rem 0 0.55rem;
  background: #1a1a1a;
}

.obj--id {
  width: 248px;
  min-width: 248px;
}

.obj--id .obj__body.leather-badge {
  width: 248px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  position: relative;
  z-index: 2;
}

.leather-badge__frame {
  display: block;
  padding: 16px 14px 14px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.28), transparent 36%),
    radial-gradient(circle at 1px 1px, rgba(55, 45, 35, 0.22) 0.8px, transparent 1.1px),
    linear-gradient(155deg, #ddd8cf, #b4aea3 46%, #8f897e);
  background-size: auto, 4px 4px, auto;
  box-shadow:
    0 16px 28px rgba(40, 30, 15, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 0 0 1px rgba(50, 40, 30, 0.22);
  position: relative;
}

.leather-badge__frame::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 9px;
  border: 1.5px dashed rgba(45, 35, 25, 0.38);
  pointer-events: none;
  z-index: 2;
}

.leather-badge__frame::after {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  pointer-events: none;
  z-index: 2;
}

.leather-badge__window {
  display: block;
  position: relative;
  background: #f8f5ef;
  border-radius: 6px;
  padding: 0.75rem 0.8rem 0.7rem;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.35);
}

.id-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.id-zh {
  font-size: 0.62rem;
  line-height: 1.25;
  text-align: right;
  opacity: 0.72;
  font-weight: 600;
}

.id-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.7rem;
}

.id-arrow {
  font-size: 0.95rem;
  font-weight: 700;
}

.obj--badge {
  width: 208px;
  min-width: 208px;
  /* 不用暖棕投影，避免灰褐看起来偏红 */
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.16));
}

.obj--badge .obj__body {
  width: 208px;
  min-height: 168px;
  padding: 1.2rem 1.05rem 1.1rem;
  background: #BCB5A5;
  background-image: none;
  color: #2a2520;
  border-radius: 50% / 42%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.55rem;
  position: relative;
  z-index: 2;
}

.obj--airmail {
  width: 262px;
  min-width: 262px;
}

.obj--airmail .obj__body.stamp-card {
  width: 250px;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  position: relative;
  z-index: 2;
}

/* 样式 A：整张邮票外形四周半圆齿边，中间实心可读（无层 mask，无内框盖住上下） */
.stamp-card__face {
  display: block;
  position: relative;
  z-index: 1;
  color: #1a1a1a;
  border: none;
  border-radius: 0;
  padding: 0;
}

.stamp-card__face::before,
.stamp-card__face::after {
  display: none;
}

.stamp-card__face--a {
  /* 矢量 SVG：四边同一套向内半圆齿孔 */
  width: 250px;
  height: 170px;
  box-sizing: border-box;
  background: transparent;
  /* 轻阴影，避免糊进右/下齿孔里看起来像反齿 */
  filter: drop-shadow(0 4px 6px rgba(40, 30, 15, 0.14));
}

.stamp-card__svg {
  position: absolute;
  inset: 0;
  width: 250px;
  height: 170px;
  display: block;
  pointer-events: none;
  z-index: 0;
}

.stamp-card__svg path {
  stroke: rgba(40, 30, 15, 0.1);
  stroke-width: 0.6;
  paint-order: stroke fill;
}

.stamp-card__content {
  position: relative;
  z-index: 1;
  display: block;
  height: 100%;
  margin: 0;
  padding: 14px 16px 16px;
  box-sizing: border-box;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.stamp-card__content > * {
  position: relative;
  z-index: 1;
}

.stamp-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.contact-qr {
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  padding: 0;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background:
    repeating-conic-gradient(#222 0% 25%, #f4f0e8 0% 50%) 0 0 / 8px 8px;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  display: block;
}

.contact-qr__hint {
  position: absolute;
  inset: auto 0 0;
  font-size: 0.48rem;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 2px 0;
  background: rgba(22, 22, 22, 0.72);
  color: #fff;
}

.contact-qr.has-media .contact-qr__hint {
  opacity: 0;
}

.stamp-serial {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  color: rgba(26, 26, 26, 0.55);
  font-weight: 600;
}

.obj--note {
  width: 112px;
  min-width: 112px;
}

.obj--note .obj__body {
  width: 112px;
  min-height: 228px;
  padding: 1.2rem 0.7rem 0.9rem;
  background: #f8f5ee;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  position: relative;
  z-index: 2;
}

.tape {
  display: block;
  width: 56px;
  height: 18px;
  margin: 0 auto -8px;
  background: rgba(240, 200, 74, 0.7);
  transform: rotate(-8deg);
  position: relative;
  z-index: 1;
}

.obj__num {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.35;
}

.obj__num em,
.obj__title em,
.work-list em {
  font-style: normal;
  opacity: 0.7;
  font-weight: 500;
}

.obj__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
}

.obj__desc {
  font-size: 0.68rem;
  line-height: 1.4;
  color: inherit;
  opacity: 0.8;
}

.work-list {
  list-style: none;
  margin: 0.45rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.work-list li {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding-bottom: 0.28rem;
  border-bottom: 1px solid var(--line);
}

.swatch {
  width: 42px;
  height: 28px;
  border-radius: 3px;
  flex-shrink: 0;
}

.swatch--a { background: linear-gradient(135deg, #c4a574, #8b6914); }
.swatch--b { background: linear-gradient(135deg, #e07a5f, #3d405b); }
.swatch--c { background: linear-gradient(135deg, #81b29a, #f2cc8f); }
.swatch--d { background: linear-gradient(135deg, #ff6b9d, #c44569, #2d3436); }
.swatch--e { background: linear-gradient(135deg, #dfe6e9, #636e72); }

.thumb {
  width: 48px;
  height: 34px;
  border-radius: 3px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  background-size: cover;
  background-position: center;
}

.thumb--0 {
  background:
    linear-gradient(135deg, rgba(0,0,0,0.12), transparent),
    linear-gradient(40deg, #d7b07a 50%, #f3ead8 50%);
}
.thumb--1 {
  background:
    linear-gradient(120deg, #e07a5f 0 40%, #2f3e46 40% 70%, #f2cc8f 70%);
}
.thumb--2 {
  background:
    radial-gradient(circle at 30% 40%, #fff 0 12%, transparent 13%),
    linear-gradient(160deg, #c45c4a, #f4d6a5);
}
.thumb--3 {
  background:
    linear-gradient(45deg, #ffd6a5, #fd79a8 40%, #6c5ce7);
}
.thumb--4 {
  background:
    repeating-linear-gradient(90deg, #ece7dc 0 8px, #c8c2b6 8px 16px),
    linear-gradient(#8d99ae, #edf2f4);
}

.thumb.has-media {
  background-size: cover !important;
  background-position: center !important;
}

.list-del {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: #161616;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  padding: 0;
}

.owner-list-actions {
  margin-top: 0.85rem;
}

.owner-list-actions button {
  font: inherit;
  font-size: 0.78rem;
  padding: 0.45rem 0.75rem;
  border: 1px dashed rgba(26, 26, 26, 0.35);
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
}

body.is-owner .updates-list li,
body.is-owner .resume-grid li,
body.is-owner .skill-ovals figure {
  position: relative;
}

.id-row {
  display: flex;
  gap: 0.7rem;
  margin-top: 0.1rem;
  align-items: stretch;
}

.id-photo {
  width: 64px;
  height: 78px;
  background:
    linear-gradient(160deg, #8a8478, #4a463e);
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  background-size: cover;
  background-position: center;
  position: relative;
}

.id-photo:not(.has-media)::before {
  content: "证件照";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.72);
}

.id-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.7rem;
  justify-content: center;
}

.id-link {
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.pill-row span {
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(42, 37, 32, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.contact-lines {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin-top: 0.75rem;
  font-size: 0.72rem;
  padding-right: 0.25rem;
  padding-bottom: 0.85rem;
}

.barcode {
  margin-top: auto;
  height: 28px;
  background: repeating-linear-gradient(90deg, #111 0 2px, transparent 2px 4px, #111 4px 5px, transparent 5px 8px);
  opacity: 0.75;
}

/* —— Modals —— */
.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 26, 20, 0.45);
  backdrop-filter: blur(3px);
  cursor: pointer;
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(88vh, 720px);
  overflow: auto;
  background: #f7f3ea;
  border-radius: 16px;
  animation: modalIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  z-index: 2;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  line-height: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.modal__close--light {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.modal__panel--about {
  padding: 0;
  overflow: hidden;
  background: #e1d9ce;
  color: #2a2520;
}

.about-split__top {
  background: #e1d9ce;
  color: #2a2520;
  padding: 2.5rem 2.25rem 2.75rem;
  box-sizing: border-box;
}

.about-split__top h2 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.about-split__top p {
  margin: 0;
  max-width: none;
  line-height: 1.7;
  font-size: 0.98rem;
}

/* 登录后：拖右下角改文本框 / 弹窗大小 */
body.is-owner [data-box] {
  resize: both;
  overflow: auto;
  min-width: 180px;
  min-height: 100px;
  outline: 1px dashed rgba(196, 92, 74, 0.45);
  outline-offset: -1px;
}

body.is-owner .modal__panel[data-box] {
  width: min(920px, 100%);
  max-width: 96vw;
  max-height: none;
  min-width: 280px;
  min-height: 200px;
}

body.is-owner [data-box="aboutText"] {
  min-width: 220px;
  min-height: 140px;
  max-width: 100%;
}

/* 可移动文本框 + 黑色对齐参考线 */
.is-move-stage {
  position: relative;
}

.is-move-stage.has-moves .pill-row--free,
body.is-owner .is-move-stage .pill-row--free {
  display: contents;
}

.is-move-stage.has-moves,
body.is-owner .obj--badge .obj__body.is-move-stage {
  min-height: 168px;
}

.skill-ovals.is-move-stage {
  position: relative;
  min-height: 160px;
}

.align-guides {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  overflow: hidden;
}

.align-guide {
  position: absolute;
  background: #1a1a1a;
  pointer-events: none;
}

.align-guide--h {
  left: 0;
  right: 0;
  height: 1px;
}

.align-guide--v {
  top: 0;
  bottom: 0;
  width: 1px;
}

.is-movable {
  position: relative;
}

.move-handle {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 6;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #1a1a1a;
  color: #fff;
  font-size: 11px;
  line-height: 22px;
  cursor: grab;
  display: none;
}

body.is-owner .move-handle {
  display: block;
}

.move-handle:active,
.is-dragging .move-handle {
  cursor: grabbing;
}

.is-dragging {
  outline: 1px solid #1a1a1a !important;
  z-index: 8 !important;
}

.about-split__bottom,
.about-door {
  display: none;
}

.modal__panel--skills {
  background: #BCB5A5;
  color: #2a2520;
  padding: 2.5rem 1.75rem 2rem;
}

.modal__panel--skills h2 {
  margin: 0 0 1.75rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
}

.modal__panel--skills .modal__close--light {
  background: rgba(42, 37, 32, 0.1);
  color: #2a2520;
}

.skill-ovals {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}

.skill-ovals figure {
  margin: 0;
  text-align: center;
}

.oval {
  width: 100%;
  aspect-ratio: 3 / 4.2;
  border-radius: 50%;
  margin-bottom: 0.65rem;
  transition: transform 0.3s ease;
}

.skill-ovals figure:hover .oval {
  transform: scale(1.04);
}

.oval--1 { background: linear-gradient(160deg, #2d3436, #fdcb6e 40%, #636e72); }
.oval--2 { background: linear-gradient(160deg, #dfe6e9, #74b9ff 45%, #2d3436); }
.oval--3 { background: linear-gradient(160deg, #b2bec3, #fff 50%, #2d3436); }
.oval--4 { background: linear-gradient(160deg, #dfe6e9, #f0c84a 40%, #636e72); }
.oval--5 { background: linear-gradient(160deg, #636e72, #dfe6e9 55%, #2d3436); }

.skill-ovals figcaption {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.modal__panel--contact {
  background: transparent;
  box-shadow: none;
  overflow: visible;
  max-height: none;
}

.contact-accordion {
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
  height: 360px;
}

.acc-card {
  flex: 0.85;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  background: #efe8da;
  transition: flex 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  min-width: 0;
  padding: 0;
  border: none;
  cursor: pointer;
  text-align: inherit;
  color: inherit;
  font: inherit;
}

.acc-card.is-open {
  flex: 2.4;
}

.acc-card__face {
  flex: 1;
  display: grid;
  place-items: center;
  gap: 0.5rem;
  padding: 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.acc-card__label {
  display: block;
  padding: 0.65rem;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  background: rgba(0, 0, 0, 0.06);
}

.acc-card--wechat { background: #dfe8c8; }
.acc-card--red { background: #f0d0c8; }
.acc-card--city { background: #e8dfd0; }
.acc-card--phone,
.acc-card--email { background: #f3eee4; }

.fake-qr {
  width: 72px;
  height: 72px;
  background:
    repeating-conic-gradient(#222 0% 25%, #f4f0e8 0% 50%) 0 0 / 10px 10px;
}

.fake-qr--red {
  background:
    repeating-conic-gradient(#a33 0% 25%, #f8e8e4 0% 50%) 0 0 / 10px 10px;
}

.fake-qr--sm {
  width: 56px;
  height: 56px;
  margin-bottom: 0.5rem;
}

.city-stamp {
  width: 160px;
  aspect-ratio: 3 / 4;
  border: 2px dashed #8a6a4a;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: linear-gradient(160deg, #f5efe4, #e2d5c0);
  text-align: center;
  padding: 0.75rem;
}

.city-stamp__city {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
}

.city-stamp__en {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
}

.city-stamp__note {
  margin-top: 0.5rem;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.acc-icon {
  font-size: 1.75rem;
  font-family: var(--font-display);
}

.modal__panel--resume,
.modal__panel--updates {
  padding: 2.25rem;
}

.modal__panel--resume h2,
.modal__panel--updates h2 {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.resume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.resume-grid h3 {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.resume-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.resume-grid li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  line-height: 1.45;
}

.resume-note {
  margin: 1.5rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.updates-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.updates-list li {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.updates-list time {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
}

/* —— Works page —— */
body[data-page="works"] {
  background: #efeee9;
  color: var(--ink);
}

.works-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 2.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.works-brand {
  font-family: var(--font-display);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.works-nav {
  display: flex;
  gap: 1.75rem;
}

.works-nav a {
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.55;
}

.works-nav a.is-active,
.works-nav a:hover {
  opacity: 1;
}

.works-mail {
  text-decoration: none;
  font-size: 0.85rem;
  opacity: 0.7;
}

.works-hero {
  padding: 4.5rem 2.5rem 3rem;
  max-width: 42rem;
}

.works-hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}

.works-hero p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.works-list {
  padding: 0 2.5rem 3rem;
}

.work-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr 10rem 8rem;
  gap: 1rem;
  align-items: center;
  width: 100%;
  padding: 1.1rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  text-align: left;
  position: relative;
  transition: background 0.2s ease;
}

.work-row:last-child {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.work-row:hover {
  background: rgba(255, 255, 255, 0.45);
}

.work-row__year {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
}

.work-row__name {
  font-weight: 600;
  font-size: 1rem;
}

.work-row__cat,
.work-row__type {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.work-row__preview {
  position: absolute;
  right: 28%;
  top: 50%;
  transform: translateY(-50%) scale(0.92);
  width: 110px;
  height: 110px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 2;
}

.work-row:hover .work-row__preview {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.works-foot {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 1.5rem;
  padding: 2.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.works-foot p {
  margin: 0 0 0.35rem;
}

.works-foot__social a {
  display: block;
  text-decoration: none;
  margin: 0.25rem 0;
}

.works-foot__social a:hover {
  text-decoration: underline;
}

/* Project modal */
.modal__panel--project {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  width: min(1100px, 96vw);
  max-height: min(86vh, 680px);
  overflow: hidden;
  padding: 0;
  background: #fff;
}

.project-gallery {
  position: relative;
  background: #f3f1ec;
  padding: 1.5rem 2.5rem 1rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.gallery-main {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 280px;
}

.gallery-slide {
  width: min(100%, 520px);
  aspect-ratio: 4 / 3;
  border-radius: 8px;
}

.gallery-nav {
  position: absolute;
  top: 42%;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  font-size: 1.5rem;
  line-height: 1;
  z-index: 2;
}

.gallery-nav--prev { left: 0.75rem; }
.gallery-nav--next { right: 0.75rem; }

.gallery-thumbs {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.85rem 0 0.25rem;
}

.gallery-thumbs button {
  width: 52px;
  height: 52px;
  border-radius: 4px;
  flex-shrink: 0;
  border: 2px solid transparent;
  padding: 0;
  overflow: hidden;
}

.gallery-thumbs button.is-active {
  border-color: #c45c4a;
}

.project-side {
  background: #c45c4a;
  color: #fff;
  padding: 1.25rem 1.35rem 1.5rem;
  overflow: auto;
}

.project-side.is-alt {
  background: #2f3e46;
}

.project-side__tools {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}

.project-side__tools button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  font-size: 1.1rem;
}

.project-side__meta {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  opacity: 0.85;
}

.project-side h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.project-side__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.8rem;
}

.project-side__desc {
  margin: 1.15rem 0 0;
  font-size: 0.88rem;
  line-height: 1.65;
  opacity: 0.95;
}

/* Mobile shell: keep desktop pegboard, scale to fit */
.stage-shell {
  display: contents;
}

.landscape-toggle {
  display: none;
}

@media (max-width: 980px) {
  html,
  body[data-page="board"] {
    height: 100%;
    overflow: hidden;
  }

  body[data-page="board"] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.45rem 0.35rem 4.5rem;
    min-height: 100dvh;
    box-sizing: border-box;
  }

  .landscape-toggle {
    display: grid;
    place-items: center;
    position: fixed;
    right: 0.85rem;
    bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
    z-index: 30;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: #111;
    cursor: pointer;
    opacity: 0.85;
  }

  .landscape-toggle:hover,
  .landscape-toggle[aria-pressed="true"] {
    opacity: 1;
    color: #000;
  }

  .landscape-toggle[hidden] {
    display: none !important;
  }

  .landscape-toggle svg {
    display: block;
    background: transparent;
  }

  .stage-shell {
    display: block;
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
  }

  body[data-page="board"] .stage {
    /* fixed desktop composition; JS scales it into the shell */
    width: 1200px !important;
    min-width: 1200px;
    height: 800px !important;
    min-height: 800px !important;
    will-change: transform;
  }

  .sidebar__legend,
  .sidebar__hint {
    font-size: 0.62rem;
  }

  .sidebar__manifesto {
    font-size: 1.05rem;
  }

  .skill-ovals {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-accordion {
    height: auto;
    flex-direction: column;
  }

  .acc-card,
  .acc-card.is-open {
    flex: none;
    min-height: 120px;
  }

  .work-row {
    grid-template-columns: 3.5rem 1fr;
    grid-template-rows: auto auto;
  }

  .work-row__cat,
  .work-row__type {
    display: none;
  }

  .works-foot {
    grid-template-columns: 1fr 1fr;
  }

  .modal__panel--project {
    grid-template-columns: 1fr;
    max-height: 90vh;
  }

  .resume-grid {
    grid-template-columns: 1fr;
  }

  .works-top {
    flex-wrap: wrap;
    padding: 1rem;
  }

  .works-hero,
  .works-list,
  .works-foot {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .editor-bar--fab {
    right: 0.85rem;
    bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 980px) and (orientation: landscape) {
  body[data-page="board"] {
    padding: 0;
    justify-content: center;
  }

  .landscape-toggle {
    display: none !important;
  }

  .stage-shell {
    width: 100vw !important;
    max-width: 100vw;
  }
}

/* 竖屏点图标后的「横屏模式」：旋转完整装入 */
@media (max-width: 980px) {
  body[data-page="board"].is-force-landscape {
    padding: 0;
    overflow: hidden;
  }

  body[data-page="board"].is-force-landscape .brand-menu,
  body[data-page="board"].is-force-landscape .settings-panel {
    z-index: 50;
  }
}

.gallery-slide--media {
  width: min(100%, 520px);
  height: auto;
  max-height: 52vh;
  object-fit: contain;
  border-radius: 8px;
  background: #111;
}

.qr-block.has-media,
.id-photo.has-media,
.contact-qr.has-media {
  background-color: transparent;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(22, 18, 12, 0.62);
  cursor: pointer;
}

.lightbox__panel {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 1rem 1rem 0.85rem;
  background: #f7f3ea;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  text-align: center;
  max-width: min(92vw, 360px);
}

.lightbox__panel img {
  width: min(72vw, 280px);
  height: min(72vw, 280px);
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  display: block;
}

.lightbox__panel figcaption {
  margin-top: 0.65rem;
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.settings-fab {
  display: none !important;
}

.brand-menu {
  position: fixed;
  z-index: 1450;
  min-width: 220px;
  max-width: min(280px, calc(100vw - 1.5rem));
  padding: 0.4rem;
  border-radius: 14px;
  background: #f4f2ed;
  color: #1a1a1a;
  box-shadow: 0 14px 40px rgba(20, 16, 10, 0.22);
}

.brand-menu[hidden] {
  display: none !important;
}

/* 强制横屏时：菜单与洞板同向 */
.brand-menu.is-force-land {
  max-height: min(72vw, 420px);
  overflow: auto;
}

.settings-panel.is-force-land .settings-panel__card {
  transform: rotate(90deg);
  max-width: min(72vh, 420px);
  max-height: min(86vw, 640px);
}

.brand-menu__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.62rem 0.7rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.brand-menu__item:hover {
  background: rgba(0, 0, 0, 0.06);
}

.brand-menu__item svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  opacity: 0.85;
}

.brand-menu__sep {
  height: 1px;
  margin: 0.3rem 0.45rem;
  background: rgba(26, 26, 26, 0.1);
}

.settings-panel {
  position: fixed;
  inset: 0;
  z-index: 1400;
  background: rgba(22, 18, 12, 0.42);
  display: grid;
  place-items: center;
  padding: 0.85rem;
}

.settings-panel__card {
  width: min(420px, 100%);
  max-height: min(86vh, 720px);
  overflow: auto;
  background: #f7f3ea;
  color: #1a1a1a;
  border-radius: 18px;
  padding: 1rem 1rem 1.15rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.settings-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.settings-panel__head button {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  font-size: 1.2rem;
  cursor: pointer;
}

.settings-section {
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(26, 26, 26, 0.1);
}

.settings-section h3 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
}

.settings-muted {
  margin: 0.2rem 0 0.65rem;
  font-size: 0.78rem;
  color: #5a554c;
  line-height: 1.45;
}

.settings-muted[hidden],
#settingsStatus:empty {
  display: none;
}

.settings-form {
  display: grid;
  gap: 0.55rem;
}

.settings-form input,
.settings-actions button,
.settings-history__row button {
  font: inherit;
}

.settings-form input {
  border: 1px solid rgba(26, 26, 26, 0.16);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: #fff;
}

.settings-form button,
.settings-actions #settingsSave {
  border: none;
  border-radius: 999px;
  padding: 0.65rem 0.9rem;
  background: #161616;
  color: #f6f3ec;
  cursor: pointer;
  font-weight: 600;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.settings-actions .is-ghost {
  border: 1px solid rgba(26, 26, 26, 0.18);
  border-radius: 999px;
  padding: 0.6rem 0.85rem;
  background: transparent;
  cursor: pointer;
}

.settings-link {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.8rem;
  color: #5a554c;
}

.settings-history {
  display: grid;
  gap: 0.45rem;
}

.settings-history__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.settings-history__row strong {
  display: block;
  font-size: 0.8rem;
}

.settings-history__row span {
  font-size: 0.72rem;
  color: #5a554c;
}

.settings-history__row button {
  border: none;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: #161616;
  color: #fff;
  cursor: pointer;
  font-size: 0.75rem;
}

.editor-bar {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 1200;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: #161616;
  color: #f6f3ec;
  font-size: 0.8rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  max-width: calc(100vw - 1.5rem);
}

.editor-bar--fab {
  display: none !important;
}

.editor-bar a,
.editor-bar button {
  color: inherit;
  font: inherit;
  background: none;
  border: none;
  text-decoration: none;
}

.editor-bar #editorSave {
  text-decoration: none;
  background: #f0c84a;
  color: #161616;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
}

body.is-owner {
  padding-bottom: 4.5rem;
}

.is-editable {
  outline: 1px dashed rgba(196, 92, 74, 0.55);
  outline-offset: 2px;
  cursor: text;
}

.is-swappable {
  position: relative;
  cursor: pointer;
}

.is-swappable::after {
  content: "换图";
  position: absolute;
  inset: auto 4px 4px auto;
  font-size: 10px;
  letter-spacing: 0.08em;
  background: #161616;
  color: #fff;
  padding: 2px 6px;
  border-radius: 999px;
}

.editor-login {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: rgba(22, 22, 22, 0.45);
  display: grid;
  place-items: end center;
  padding: 1rem;
}

.editor-login__card {
  width: min(420px, 100%);
  background: #f6f3ec;
  color: #161616;
  border-radius: 18px;
  padding: 1.1rem;
  display: grid;
  gap: 0.6rem;
}

.editor-login__card input,
.editor-login__card button {
  font: inherit;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(22, 22, 22, 0.12);
}

.editor-login__card button[type="submit"] {
  background: #161616;
  color: #fff;
  border: none;
}

.gallery-empty {
  width: min(100%, 520px);
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  border: 1.5px dashed rgba(22, 22, 22, 0.2);
  background: repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 10px,
      rgba(22, 22, 22, 0.03) 10px,
      rgba(22, 22, 22, 0.03) 20px
    ),
    #faf8f3;
  display: grid;
  place-content: center;
  gap: 0.35rem;
  text-align: center;
  color: var(--ink-soft);
  padding: 1rem;
}

.gallery-empty p {
  margin: 0;
}

.gallery-empty p:first-child {
  font-weight: 700;
  color: var(--ink);
}

.gallery-thumbs button.is-video {
  position: relative;
}

.gallery-thumbs button.is-video::after {
  content: "▶";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.7rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.gallery-owner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.65rem 0 0.25rem;
}

.gallery-owner[hidden] {
  display: none !important;
}

.gallery-owner button {
  font: inherit;
  border: 1px solid rgba(22, 22, 22, 0.15);
  background: #161616;
  color: #fff;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
}

.gallery-owner #galleryDel {
  background: #fff;
  color: #161616;
}

@media (max-width: 720px) {
  .editor-bar {
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .obj__sway,
  .obj:hover .obj__sway,
  .obj.is-gust .obj__sway {
    animation: none;
  }
}
