/* 翼本工作台 */
:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --ink: #1a2332;
  --mist: #5c6d82;
  --line: rgba(26, 35, 50, 0.1);
  --lacquer: #b83334;
  --gold: #8f7348;
  --nav: #161f2b;
  --nav-text: #c9d2de;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
body.desk-body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans SC", "Noto Serif SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.desk-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}

/* 手机顶栏：桌面隐藏 */
.desk-mobile-bar {
  display: none;
}
.desk-nav-backdrop {
  display: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.desk-nav {
  background: var(--nav);
  color: var(--nav-text);
  padding: 1.1rem 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.desk-brand {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  color: #fff;
  text-decoration: none;
  padding: 0.35rem 0.45rem;
}
.desk-seal {
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  background: var(--lacquer);
  color: #fff;
  font-family: "ZCOOL XiaoWei", serif;
  font-size: 1.1rem;
}
.desk-brand strong {
  display: block;
  letter-spacing: 0.28em;
  font-size: 0.92rem;
}
.desk-brand em {
  display: block;
  font-style: normal;
  font-size: 0.72rem;
  color: rgba(201, 210, 222, 0.7);
  letter-spacing: 0.12em;
  margin-top: 0.15rem;
}

.desk-menu {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}

.desk-menu-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--nav-text);
  text-align: left;
  padding: 0.72rem 0.75rem;
  font: inherit;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  border-radius: 2px;
}
.desk-menu-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.desk-menu-item[hidden] { display: none; }
.desk-menu-item.is-active {
  background: rgba(184, 51, 52, 0.22);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--lacquer);
}
.desk-menu-item .ico {
  width: 1.35rem;
  text-align: center;
  opacity: 0.85;
  font-family: "Noto Serif SC", serif;
}
.desk-menu-item .badge {
  margin-left: auto;
  min-width: 1.2rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: var(--lacquer);
  color: #fff;
  font-size: 0.68rem;
  text-align: center;
}

.desk-nav-foot {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.desk-nav-foot a,
.desk-nav-foot button {
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: rgba(201, 210, 222, 0.75);
  background: transparent;
  border: 0;
  text-align: left;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  text-decoration: none;
}
.desk-nav-foot a:hover,
.desk-nav-foot button:hover { color: #fff; }

.desk-main {
  padding: 1.25rem 1.5rem 2rem;
  min-width: 0;
}

.desk-topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.1rem;
}
.desk-topbar h1 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: 1.45rem;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.desk-sub {
  margin: 0.35rem 0 0;
  color: var(--mist);
  font-size: 0.86rem;
}
.desk-userchip {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem 0.85rem;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 0.84rem;
}
.chip-bal { color: var(--lacquer); letter-spacing: 0.04em; }

.desk-panel { display: none; }
.desk-panel.is-active { display: block; animation: fade 0.35s var(--ease); }
@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.panel-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.btn, button.primary, button.ghost, button.danger {
  font: inherit;
  font-size: 0.84rem;
  letter-spacing: 0.1em;
  line-height: 1.2;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  box-sizing: border-box;
}
.btn-primary, button.primary {
  background: var(--lacquer);
  border-color: var(--lacquer);
  color: #fff;
}
.btn-ghost, button.ghost {
  background: transparent;
}
button.danger {
  color: var(--lacquer);
  border-color: rgba(184, 51, 52, 0.35);
  background: transparent;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.album-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1rem 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  transition: border-color 0.2s ease, box-shadow 0.25s ease;
}
.album-card:hover {
  border-color: rgba(184, 51, 52, 0.35);
  box-shadow: 0 10px 24px rgba(26, 35, 50, 0.06);
}
.album-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.album-card h3 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: 1.02rem;
  letter-spacing: 0.06em;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.album-badge {
  flex: 0 0 auto;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  padding: 0.18rem 0.45rem;
  border: 1px solid var(--line);
  color: var(--mist);
  background: #f5f7fa;
  line-height: 1.2;
}
.album-badge.is-live {
  color: var(--lacquer);
  border-color: rgba(184, 51, 52, 0.35);
  background: rgba(184, 51, 52, 0.06);
}
.album-badge.is-free {
  color: #2e7d4f;
  border-color: rgba(46, 125, 79, 0.35);
  background: rgba(46, 125, 79, 0.07);
}
.album-badge.is-expired {
  color: var(--lacquer);
  border-color: rgba(184, 51, 52, 0.5);
  background: rgba(184, 51, 52, 0.1);
  font-weight: 600;
}
.album-badge.is-expiring {
  color: #8a5a17;
  border-color: rgba(196, 152, 62, 0.5);
  background: rgba(228, 178, 88, 0.14);
}
.album-expiry-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid rgba(196, 152, 62, 0.45);
  border-left: 3px solid #c4983e;
  background: rgba(228, 178, 88, 0.1);
  color: #6b4a12;
  font-size: 0.82rem;
  line-height: 1.5;
}
.album-expiry-banner.is-expired {
  border-color: rgba(184, 51, 52, 0.4);
  border-left-color: var(--lacquer);
  background: rgba(184, 51, 52, 0.06);
  color: #8f2425;
}
.album-card .meta {
  color: var(--mist);
  font-size: 0.78rem;
  line-height: 1.5;
}
.album-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.35rem;
}
.album-actions.has-renew {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.album-act {
  appearance: none;
  margin: 0;
  min-width: 0;
  width: 100%;
  height: 2.05rem;
  padding: 0 0.2rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.album-act:hover:not(:disabled) {
  border-color: rgba(26, 35, 50, 0.28);
  background: #f7f8fb;
}
.album-act:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.album-act.is-primary {
  background: var(--lacquer);
  border-color: var(--lacquer);
  color: #fff;
}
.album-act.is-primary:hover:not(:disabled) {
  background: #9e2829;
  border-color: #9e2829;
}
.album-act.is-danger {
  color: var(--lacquer);
  border-color: rgba(184, 51, 52, 0.35);
}
.album-act.is-renew {
  color: #8a5a17;
  border-color: rgba(196, 152, 62, 0.55);
  background: rgba(228, 178, 88, 0.12);
}
.album-act.is-renew:hover:not(:disabled) {
  border-color: #c4983e;
  background: rgba(228, 178, 88, 0.22);
}
.album-act.is-on {
  border-color: rgba(184, 51, 52, 0.45);
  color: var(--lacquer);
  background: rgba(184, 51, 52, 0.06);
}
.album-share-wrap {
  position: relative;
  min-width: 0;
}
.album-share-wrap > .album-act {
  width: 100%;
}
.album-share-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.35rem);
  z-index: 20;
  min-width: 7.5rem;
  padding: 0.3rem;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(26, 35, 50, 0.12);
  display: grid;
  gap: 0.2rem;
}
.album-share-menu[hidden] {
  display: none !important;
}
.album-share-menu button {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.5rem 0.65rem;
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.album-share-menu button:hover {
  background: #f4f6f9;
}
.album-share-menu button.is-danger {
  color: var(--lacquer);
}

@media (max-width: 1200px) {
  .album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 兼容旧 actions 类（回收仓等） */
.album-card .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
}
.album-card .actions a {
  text-decoration: none;
  display: inline-flex;
  padding: 0;
  border: none;
  background: none;
  line-height: 0;
}
.album-card .actions button {
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  line-height: 1.2;
  padding: 0.4rem 0.75rem;
  min-width: 4.5em;
  min-height: 2rem;
  height: 2rem;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--line);
}
.album-card .actions .primary {
  background: var(--lacquer);
  border-color: var(--lacquer);
  color: #fff;
}
.album-card .actions .ghost {
  background: transparent;
  color: var(--ink);
}
.album-card .actions .danger {
  color: var(--lacquer);
  border-color: rgba(184, 51, 52, 0.35);
  background: transparent;
}

.info-card, .balance-hero {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1.2rem 1.3rem;
  margin-bottom: 0.9rem;
}
.info-card h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}
.info-row {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.5rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.info-row .k { color: var(--mist); }

.profile-form { display: grid; gap: 0.15rem; }
.profile-field {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.5rem;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.profile-field .k { color: var(--mist); }
.profile-field input {
  width: 100%;
  max-width: 22rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  color: inherit;
}
.profile-section {
  margin: 1rem 0 0.35rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--mist);
}
.profile-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
}

.balance-num {
  margin-top: 0.35rem;
  font-size: 2.4rem;
  color: var(--lacquer);
  letter-spacing: 0.06em;
  font-weight: 600;
  font-family: "Noto Serif SC", serif;
}

.msg-list { display: grid; gap: 0.65rem; }
.msg-item {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 0.9rem 1rem;
}
.msg-item.unread { border-left: 3px solid var(--lacquer); }
.msg-item h4 { margin: 0 0 0.3rem; font-size: 0.92rem; }
.msg-item p { margin: 0; color: var(--mist); font-size: 0.84rem; line-height: 1.5; }
.msg-item .time { margin-top: 0.45rem; font-size: 0.72rem; color: var(--mist); }

.empty-hint { color: var(--mist); font-size: 0.9rem; margin: 0.5rem 0; }
.muted { color: var(--mist); font-size: 0.82rem; }
.price { font-size: 1.45rem; color: var(--lacquer); letter-spacing: 0.06em; }

.msg {
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.9rem;
  font-size: 0.85rem;
  border: 1px solid transparent;
}
.msg.err {
  background: rgba(184, 51, 52, 0.08);
  border-color: rgba(184, 51, 52, 0.28);
  color: #8f2425;
}
.msg.ok {
  background: rgba(34, 140, 80, 0.08);
  border-color: rgba(34, 140, 80, 0.25);
  color: #1d6b3f;
}

.desk-dialog, .tpl-dialog, .preview-dialog, .frame-dialog {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  padding: 0;
  max-height: 90vh;
}
.desk-dialog { width: min(640px, 94vw); }
.trash-dialog { width: min(720px, 94vw); }
.tpl-dialog { width: min(920px, 94vw); }
.preview-dialog { width: min(980px, 96vw); }
.frame-dialog {
  width: min(1180px, 96vw);
  height: min(90vh, 900px);
  max-height: 92vh;
}
.desk-dialog::backdrop,
.tpl-dialog::backdrop,
.preview-dialog::backdrop,
.frame-dialog::backdrop {
  background: rgba(18, 24, 34, 0.48);
}

.desk-dialog-panel > header,
.tpl-panel > header,
.preview-panel > header,
.frame-panel > header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
.desk-dialog-panel h2,
.tpl-panel h2,
.preview-panel h2,
.frame-panel h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  font-family: "Noto Serif SC", serif;
}

.frame-panel {
  display: flex;
  flex-direction: column;
  height: min(90vh, 900px);
  max-height: 92vh;
}
.frame-panel iframe {
  flex: 1;
  width: 100%;
  border: 0;
  background: #0f1620;
  min-height: 0;
}

.trash-body {
  padding: 0.9rem 1.1rem 1.1rem;
  max-height: min(70vh, 560px);
  overflow: auto;
}
.trash-list {
  display: grid;
  gap: 0.65rem;
}
.trash-card {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  align-items: center;
  border: 1px solid var(--line);
  padding: 0.85rem 0.95rem;
  background: #fafbfc;
}
.trash-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-family: "Noto Serif SC", serif;
  letter-spacing: 0.06em;
}
.trash-card .meta {
  color: var(--mist);
  font-size: 0.78rem;
  line-height: 1.5;
}
.trash-card .actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.4rem;
}
.trash-card .actions button {
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  line-height: 1.2;
  padding: 0.4rem 0.75rem;
  min-width: 4.5em;
  min-height: 2rem;
  height: 2rem;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--line);
}
.trash-card .actions .primary {
  background: var(--lacquer);
  border-color: var(--lacquer);
  color: #fff;
}
.trash-card .actions .danger {
  color: var(--lacquer);
  border-color: rgba(184, 51, 52, 0.35);
  background: transparent;
}
.tpl-sub { margin: 0.35rem 0 0; font-size: 0.75rem; color: var(--mist); }

.create-choice-dialog { width: min(920px, 94vw); }
.create-choices {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
  padding: 1.2rem;
}
@media (max-width: 860px) {
  .create-choices { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .create-choices { grid-template-columns: 1fr; }
}
.create-choice {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  text-align: left;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fdfdfe 0%, #f6f7fa 100%);
  padding: 1.9rem 1.05rem 1.05rem;
  cursor: pointer;
  font: inherit;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.2s ease;
}
.create-choice:hover {
  border-color: var(--lacquer);
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(26, 35, 50, 0.12);
}
.create-choice .cc-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e9edf3;
  color: #3a4656;
  font-family: "Noto Serif SC", serif;
  font-size: 1.05rem;
  transition: background 0.25s ease, color 0.25s ease;
}
.create-choice:hover .cc-icon {
  background: var(--lacquer);
  color: #fff;
}
.create-choice strong {
  display: block;
  letter-spacing: 0.08em;
  font-family: "Noto Serif SC", serif;
  font-size: 1.02rem;
}
.create-choice .cc-desc { color: var(--mist); font-size: 0.82rem; line-height: 1.55; }
/* 免费创建：翠绿强调 */
.create-choice-free {
  border-color: rgba(46, 125, 79, 0.35);
  background: linear-gradient(180deg, #f5fbf7 0%, #ecf6f0 100%);
}
.create-choice-free:hover {
  border-color: #2e7d4f;
  box-shadow: 0 12px 26px rgba(46, 125, 79, 0.16);
}
.create-choice-free .cc-icon { background: #2e7d4f; color: #fff; }
.create-choice-free:hover .cc-icon { background: #256b42; }
.create-choice-free .cc-free-pill {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  background: #2e7d4f;
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(46, 125, 79, 0.3);
  animation: ccFreeFloat 2.4s ease-in-out infinite;
}
@keyframes ccFreeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
/* 高级模板：左上角价格角标（脉动 + 流光） */
.create-choice-pro .create-price-tag {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  background: var(--lacquer);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.22rem 0.65rem 0.22rem 0.5rem;
  border-radius: 0 0 0.6rem 0;
  box-shadow: 0 2px 6px rgba(184, 51, 52, 0.3);
  transform-origin: left top;
  animation: ccPricePulse 1.8s ease-in-out infinite;
}
.create-choice-pro .create-price-tag::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.55) 50%, transparent 60%);
  transform: translateX(-130%);
  animation: ccPriceShine 2.6s ease-in-out infinite;
}
@keyframes ccPricePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 2px 6px rgba(184, 51, 52, 0.25); }
  50% { transform: scale(1.07); box-shadow: 0 3px 14px rgba(184, 51, 52, 0.45); }
}
@keyframes ccPriceShine {
  0% { transform: translateX(-130%); }
  55%, 100% { transform: translateX(130%); }
}

.tpl-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: #f7f8fb;
}
.tpl-cat {
  font: inherit;
  font-size: 0.75rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--mist);
  padding: 0.35rem 0.65rem;
  cursor: pointer;
}
.tpl-cat.active, .tpl-cat:hover {
  color: var(--ink);
  border-color: var(--lacquer);
  background: rgba(184, 51, 52, 0.06);
}
.tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  padding: 1rem;
  overflow: auto;
  max-height: 58vh;
}
.tpl-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.5rem;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}
.tpl-card:hover { border-color: var(--lacquer); }
.tpl-card .swatch {
  height: 148px;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #0c121a;
  background-size: cover;
  background-position: center;
}
.tpl-card .tpl-cover-swatch .page-thumb-wrap {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  border-radius: 2px;
  pointer-events: none;
  flex-shrink: 0;
  align-self: center;
}
.tpl-card-body { display: flex; flex-direction: column; gap: 0.15rem; }
.tpl-card-body strong { font-size: 0.82rem; }
.tpl-card-body span { font-size: 0.72rem; color: var(--mist); }
.tpl-card-body em { font-style: normal; font-size: 0.68rem; color: var(--gold); }
.tpl-cat-banner {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.35rem 0 0.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.25rem;
}

.preview-panel { display: flex; flex-direction: column; max-height: 90vh; margin: 0; }
.preview-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  min-height: 0;
  flex: 1;
  height: min(72vh, 640px);
}
.preview-stage {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem;
  grid-template-rows: minmax(0, 1fr) 2rem;
  align-items: stretch;
  column-gap: 0.25rem;
  row-gap: 0.2rem;
  padding: 0.75rem 0.5rem 0.7rem;
  overflow: hidden;
  background: #edf0f4;
  border-right: 1px solid var(--line);
  min-height: 0;
}
.preview-nav {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  align-self: center;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.preview-nav:hover:not(:disabled) {
  border-color: var(--lacquer);
  color: var(--lacquer);
  background: #fff;
}
.preview-nav:disabled {
  opacity: 0.35;
  cursor: default;
}
.preview-nav-prev { grid-column: 1; grid-row: 1; justify-self: center; }
.preview-nav-next { grid-column: 3; grid-row: 1; justify-self: center; }
.preview-flip {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  align-self: stretch;
  padding: 0.35rem;
  box-sizing: border-box;
}
.preview-flip.is-single { justify-content: center; }
.preview-pager {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: center;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--mist);
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem 0;
  min-height: 1.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-page {
  border: 1px solid var(--line);
  overflow: visible;
  background: #fff;
  display: block;
  width: fit-content;
  margin: 0;
  line-height: 0;
  flex-shrink: 0;
  box-shadow: 0 10px 28px rgba(26, 35, 50, 0.08);
}
.preview-page-mount {
  display: block;
  line-height: 0;
}
.preview-page-mount .page-thumb-wrap {
  display: block;
}
.preview-page figcaption {
  display: none;
}
.preview-side {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #f7f8fb;
}
.preview-side label,
.preview-side select,
.preview-side button { width: 100%; }
.preview-side select {
  margin-top: 0.3rem;
  font: inherit;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
}
.preview-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
}
.preview-hint {
  font-size: 0.75rem;
  color: var(--mist);
  line-height: 1.45;
  margin: 0;
}

@media (max-width: 900px) {
  .desk-shell {
    grid-template-columns: 1fr;
    min-height: 100dvh;
  }

  .desk-mobile-bar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: 3.25rem;
    padding: 0.55rem 0.75rem;
    background: var(--nav);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .desk-menu-toggle {
    width: 2.4rem;
    height: 2.4rem;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .desk-menu-toggle-bars,
  .desk-menu-toggle-bars::before,
  .desk-menu-toggle-bars::after {
    display: block;
    width: 1.05rem;
    height: 1.5px;
    background: #fff;
    border-radius: 1px;
    position: relative;
  }
  .desk-menu-toggle-bars::before,
  .desk-menu-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
  }
  .desk-menu-toggle-bars::before { top: -5px; }
  .desk-menu-toggle-bars::after { top: 5px; }

  .desk-mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #fff;
    text-decoration: none;
    min-width: 0;
    flex: 1 1 auto;
  }
  .desk-mobile-brand .desk-seal {
    width: 1.7rem;
    height: 1.7rem;
    font-size: 0.9rem;
  }
  .desk-mobile-brand strong {
    font-size: 0.88rem;
    letter-spacing: 0.12em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .desk-mobile-bal {
    flex: 0 0 auto;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: #f0c2bb;
    max-width: 38%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .desk-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(8, 12, 18, 0.55);
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
  }
  .desk-nav-backdrop[hidden] {
    display: none !important;
  }

  .desk-nav {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    width: min(78vw, 280px);
    height: 100dvh;
    height: 100vh;
    padding: 1rem 0.85rem;
    flex-direction: column;
    flex-wrap: nowrap;
    transform: translateX(-105%);
    transition: transform 0.28s var(--ease);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.35);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.desk-nav-open .desk-nav {
    transform: translateX(0);
  }
  body.desk-nav-open {
    overflow: hidden;
  }

  .desk-menu {
    flex-direction: column;
    flex-wrap: nowrap;
    width: auto;
  }
  .desk-menu-item {
    flex: 0 0 auto;
    min-width: 0;
    width: 100%;
  }
  .desk-nav-foot {
    flex-direction: column;
    width: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .desk-main {
    padding: 0.9rem 0.85rem 1.5rem;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .desk-topbar {
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
  }
  .desk-topbar h1 {
    font-size: 1.2rem;
  }
  .desk-userchip {
    width: 100%;
    justify-content: space-between;
    font-size: 0.8rem;
  }

  .panel-actions {
    gap: 0.4rem;
    flex-wrap: nowrap;
  }
  .panel-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 0.6rem 0.55rem;
  }

  .album-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .preview-body { grid-template-columns: 1fr; height: auto; max-height: none; }
  .preview-stage {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    height: min(48vh, 420px);
    overflow: hidden;
  }
}

@media (max-width: 420px) {
  .desk-mobile-brand strong { letter-spacing: 0.06em; }
  .panel-actions .btn {
    min-width: 100%;
  }
}

/* —— 优惠券票面 —— */
.coupon-board {
  display: grid;
  gap: 0.9rem;
  max-width: 42rem;
}
.coupon-empty {
  display: grid;
  gap: 0.35rem;
  padding: 2.2rem 1.4rem;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
}
.coupon-empty strong {
  font-family: "Noto Serif SC", serif;
  font-size: 1.05rem;
  color: var(--ink);
}
.coupon-empty span {
  font-size: 0.84rem;
  color: var(--mist);
}
.coupon-ticket {
  position: relative;
}
.coupon-face {
  display: grid;
  grid-template-columns: 7.2rem minmax(0, 1fr) auto;
  align-items: stretch;
  min-height: 6.2rem;
  background-color: #fff;
  border: 1px solid rgba(184, 51, 52, 0.22);
  box-shadow: 0 8px 24px rgba(26, 35, 50, 0.06);
  overflow: hidden;
  /* 左右撕票圆缺口 */
  -webkit-mask:
    radial-gradient(circle 9px at 0 50%, transparent 98%, #000 100%),
    radial-gradient(circle 9px at 100% 50%, transparent 98%, #000 100%);
  mask:
    radial-gradient(circle 9px at 0 50%, transparent 98%, #000 100%),
    radial-gradient(circle 9px at 100% 50%, transparent 98%, #000 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.coupon-value {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  padding: 0.85rem 0.5rem;
  background: linear-gradient(160deg, #c43a3b 0%, #9e2829 100%);
  color: #fff;
  text-align: center;
}
.coupon-value::after {
  content: "";
  position: absolute;
  top: 0.55rem;
  bottom: 0.55rem;
  right: -1px;
  border-right: 1px dashed rgba(255, 255, 255, 0.55);
}
.coupon-value strong {
  font-family: "Noto Serif SC", serif;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}
.coupon-amount {
  display: inline-flex;
  align-items: baseline;
  gap: 0.05rem;
  line-height: 1;
}
.coupon-unit {
  font-style: normal;
  font-size: 0.85rem;
  opacity: 0.92;
}
.coupon-tag {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  opacity: 0.88;
}
.coupon-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.28rem;
  padding: 0.95rem 1rem;
  min-width: 0;
}
.coupon-body h4 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.coupon-meta,
.coupon-desc {
  margin: 0;
  font-size: 0.78rem;
  color: var(--mist);
  line-height: 1.45;
}
.coupon-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.coupon-action {
  display: flex;
  align-items: center;
  padding: 0.85rem 1rem 0.85rem 0.25rem;
}
.coupon-claim {
  appearance: none;
  border: 0;
  min-width: 4.6rem;
  padding: 0.55rem 1rem;
  background: var(--lacquer);
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), opacity 0.18s var(--ease);
}
.coupon-claim:hover:not(:disabled) {
  background: #9e2829;
  transform: translateY(-1px);
}
.coupon-claim:disabled {
  background: #d5dbe4;
  color: #7a8798;
  cursor: default;
  letter-spacing: 0.08em;
}
.coupon-ticket.is-claimed .coupon-value,
.coupon-ticket.is-soldout .coupon-value {
  background: linear-gradient(160deg, #8a96a6 0%, #6c7888 100%);
}
.coupon-ticket.is-claimed .coupon-face,
.coupon-ticket.is-soldout .coupon-face {
  border-color: var(--line);
}

@media (max-width: 640px) {
  .coupon-face {
    grid-template-columns: 5.6rem minmax(0, 1fr);
    grid-template-rows: auto auto;
  }
  .coupon-value {
    grid-row: 1 / span 2;
  }
  .coupon-value strong { font-size: 1.45rem; }
  .coupon-action {
    grid-column: 2;
    padding: 0 1rem 0.95rem;
    justify-content: flex-start;
  }
  .coupon-body { padding-bottom: 0.35rem; }
}

/* 鈥斺€?鎴戠殑浼氬憳 鈥斺€?*/
.member-tenant-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.member-tenant-chip {
  font: inherit;
  font-size: 0.82rem;
  padding: 0.32rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--mist);
  cursor: pointer;
}
.member-tenant-chip.is-active {
  background: var(--lacquer);
  border-color: var(--lacquer);
  color: #fff;
}
.member-table {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.member-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 0.9fr 0.8fr 0.6fr 0.9fr minmax(0, 1.35fr);
  gap: 0.5rem;
  align-items: center;
  padding: 0.72rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--ink);
}
.member-row:last-child { border-bottom: 0; }
.member-row.member-head {
  background: rgba(26, 35, 50, 0.04);
  font-size: 0.78rem;
  color: var(--mist);
}
.member-row span { min-width: 0; overflow-wrap: anywhere; }
.member-uid {
  font-style: normal;
  font-size: 0.74rem;
  color: var(--mist);
  margin-left: 0.35rem;
}
.member-total {
  margin: 0.6rem 0.2rem 0;
  font-size: 0.78rem;
  color: var(--mist);
}
.member-ops {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}
.btn-sm {
  font-size: 0.76rem;
  padding: 0.28rem 0.6rem;
}
.agent-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  margin-bottom: 0.85rem;
  font-size: 0.82rem;
  color: var(--mist);
}
.agent-card .ac-label {
  font-size: 0.78rem;
  color: var(--lacquer);
  font-weight: 600;
}
.agent-card strong {
  color: var(--ink);
}
.ma-body {
  display: grid;
  gap: 0.75rem;
  padding: 0.35rem 0 0.9rem;
}
.ma-field {
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--mist);
}
.ma-field .k { font-size: 0.78rem; }
.ma-field input,
.ma-field select {
  font: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 640px) {
  .member-row {
    grid-template-columns: minmax(0, 1.3fr) 0.8fr 0.7fr auto;
    grid-template-rows: auto auto;
  }
  .member-row span:nth-child(4),
  .member-row span:nth-child(5) { display: none; }
}
