/* INPUT: 工作台、定价及内容页、灯位主题与材质、动效阶段；OUTPUT: 响应式页面、纸张卡片、私人灯板深夜托盘与可原位暂停的分档液态棱镜跨格光晕、典藏封面悬灯、Golden Sky 与灯笼仪式。
   POS: 全站设计令牌和动效样式；PROTOCOL: 修改后检查 public 和根目录 CLAUDE.md。 */
@font-face {
  font-family: 'Caveat';
  src: url('/caveat-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f8f7f2;
  --card: #fffef9;
  --ink: #193c35;
  --muted: #53665d;
  --edge: #d8ded3;
  --gold: #986728;
  --accent: #245d4d;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  font:
    16px/1.5 'Segoe UI',
    Arial,
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button,
select {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  background: none;
  border: 0;
}
a:hover,
button:hover {
  filter: brightness(0.95);
}
:focus-visible {
  outline: 3px solid #ae7425;
  outline-offset: 4px;
}
button:disabled {
  cursor: wait;
  opacity: 0.62;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
}
h2 {
  font-size: clamp(1.85rem, 3.2vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
}
.wrap {
  width: min(1380px, 92%);
  margin-inline: auto;
}
.mast {
  border-bottom: 1px solid var(--edge);
  background: #fbfaf5;
}
.mast-in {
  display: flex;
  align-items: center;
  gap: 35px;
  min-height: 82px;
}
.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  font: 600 1.4rem/1.07 var(--serif);
  letter-spacing: -0.05em;
}
.brand small {
  display: block;
  font:
    700 0.63rem/1.7 'Segoe UI',
    sans-serif;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.brand-mark {
  display: grid;
  place-content: center;
  position: relative;
  border-radius: 13px;
  background: #173f36;
  color: #f3d38f;
  width: 43px;
  height: 46px;
  font: 2.1rem/1 Georgia;
  transform: rotate(-3deg);
}
.brand-mark i {
  font: normal 0.72rem Georgia;
  position: absolute;
  right: 6px;
  top: 8px;
}
.mast nav {
  display: flex;
  align-self: stretch;
  align-items: center;
  gap: 30px;
  font-size: 0.9rem;
  font-weight: 550;
}
.mast .main-nav { margin-inline: auto; }
.mast .row { margin-left: auto; }
.mast nav a {
  position: relative;
}
html[data-route='studio'] .studio-link:after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 0;
  width: 22px;
  height: 2px;
  background: #ae843e;
}
.find-link,
.secondary,
.hero-button,
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  line-height: 1.3;
  font-weight: 650;
  border-radius: 8px;
}
.find-link,
.secondary {
  border: 1px solid #bdcabe;
  padding: 10px 17px;
  background: transparent;
  font-size: 0.9rem;
}
.find-link span {
  font: 1.5rem/1 Georgia;
}
.studio {
  display: grid;
  grid-template-columns: minmax(0, 1.68fr) minmax(335px, 1fr);
  gap: 24px;
  margin: 30px 0 39px;
}
.art-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 18px;
  min-height: 475px;
  background: #083f3c url('/evening.webp') center/cover;
  color: #fff7de;
  display: flex;
  align-items: flex-start;
}
.art-hero:before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #032f2ccc, transparent 74%);
}
.art-copy {
  padding: clamp(26px, 3vw, 52px);
  padding-top: clamp(36px, 4.2vw, 72px);
}
.kicker {
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.19em;
  line-height: 1.45;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-kicker {
  color: #fae7b1;
  letter-spacing: 0.21em;
}
.gold-star {
  color: #bb914b;
  font-size: 1.1rem;
  line-height: 1;
}
.hero-kicker .gold-star {
  color: #ffd896;
}
.art-hero h1 {
  font-size: clamp(3.15rem, 5.35vw, 6.1rem);
  line-height: 0.99;
  letter-spacing: -0.055em;
  margin: 20px 0 18px;
  text-shadow: 0 2px 12px #062a2b44;
}
.art-hero h1 em {
  color: #f6d698;
  font-weight: 400;
}
.art-hero p {
  font-size: clamp(0.97rem, 1.2vw, 1.12rem);
  line-height: 1.52;
  color: #f1f1df;
}
.hero-button {
  border: 1px solid #eadcb877;
  background: #0b3b35bd;
  color: #f7eed6;
  margin-top: 23px;
  padding: 10px 16px;
  font-size: 0.86rem;
}
.play {
  font-size: 1.05rem;
  color: #ffdc91;
}
.art-caption {
  position: absolute;
  bottom: 19px;
  left: clamp(26px, 3vw, 52px);
  font: italic 0.94rem var(--serif);
  letter-spacing: 0.025em;
  text-shadow: 0 1px 6px #000;
  background: #092f2ae6;
  padding: 4px 11px;
  border-radius: 4px;
}
.art-caption span {
  color: #f2cd7d;
}
.creator {
  border: 1px solid var(--edge);
  border-radius: 18px;
  background: var(--card);
  padding: clamp(23px, 2.1vw, 40px);
  box-shadow: 0 5px 18px #263c2c06;
}
.creator h2 {
  margin: 7px 0 5px;
}
.subhead,
.hint {
  color: var(--muted);
  line-height: 1.5;
}
.subhead {
  font-size: 0.95rem;
}
.creator form {
  margin-top: 18px;
}
.creator form > label,
.form-stack > label,
legend {
  font-weight: 620;
  font-size: 0.875rem;
}
.creator input:not([type]),
input[type='text'],
input[type='password'],
textarea,
select,
.creator input[name='name'] {
  width: 100%;
  border: 1px solid #cbd3c8;
  background: #fffefa;
  border-radius: 7px;
  padding: 10px 12px;
  min-height: 42px;
}
input::placeholder,
textarea::placeholder {
  color: #758078;
  font-weight: 400;
}
.creator input[name='name'] {
  margin: 5px 0 12px;
}
.creator fieldset,
.form-stack fieldset {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}
.creator legend,
.form-stack legend {
  padding: 0;
  margin: 0 0 6px;
}
.themes {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
}
.themes label {
  position: relative;
  cursor: pointer;
}
.themes input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.themes label > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 2px;
  font-size: 0.77rem;
  border: 1px solid var(--edge);
  border-radius: 7px;
}
.themes input:checked + span {
  border-color: var(--accent);
  background: #edf2e9;
  box-shadow: inset 0 0 0 0.5px var(--accent);
}
.themes input:focus-visible + span {
  outline: 3px solid #ae7425;
}
.swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}
.midnight {
  background: linear-gradient(135deg, #21344d 52%, #e5bb65 53%);
}
.emerald {
  background: linear-gradient(135deg, #176456 52%, #97b49a 53%);
}
.clay {
  background: linear-gradient(135deg, #ae6043 52%, #ecc6a5 53%);
}
.start-date {
  display: block;
  margin-top: 13px;
}
.start-date select {
  display: block;
  margin-top: 4px;
  font-size: 0.875rem;
  font-weight: 450;
  padding-left: 8px;
}
.check {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}
.creator .check {
  font-size: 0.8rem;
  font-weight: 450;
  margin: 9px 0;
}
.check input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}
.primary {
  color: #fffdf0;
  background: #1c5142;
  border: 1px solid #1c5142;
  padding: 12px 18px;
}
.primary span {
  font-size: 1.2rem;
  line-height: 1;
}
.wide {
  width: 100%;
}
.form-foot {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 8px;
}
.form-foot b {
  padding: 0 4px;
}
.section-top,
.row,
.board-toolbar,
.legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.section-top {
  justify-content: space-between;
}
.section-top h2 {
  margin: 5px 0;
}
.preview-section .subhead {
  margin: 0 0 18px;
}
.legend {
  font-size: 0.8rem;
  color: var(--muted);
  gap: 16px;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  border: 1px solid #83968b;
  border-radius: 50%;
}
.dot.lit {
  background: #cd9a46;
  border-color: #cd9a46;
}
.lantern-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.lantern-tile {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto minmax(78px, 1fr) auto;
  justify-items: center;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  min-height: 163px;
  padding: 13px 8px 10px;
  border: 1px solid #d9cfb7;
  border-radius: 14px 14px 7px 7px;
  color: #4d5546;
  background: #f7f1e3;
  transition: transform .18s, border-color .18s;
}
.lantern-tile:hover {
  transform: translateY(-2px);
  border-color: #a07b43;
}
.lantern-tile .night {
  font: 700 .74rem/1.4 'Segoe UI', sans-serif;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.tile-art {
  --lamp-size: 84px;
  position: relative;
  display: grid;
  place-items: center;
  align-self: stretch;
  width: 96px;
  max-width: 100%;
}
.tile-art > img {
  height: var(--lamp-size);
  width: min(100%, var(--lamp-size));
  object-fit: contain;
  filter: sepia(.34) saturate(.95) brightness(.90);
  opacity: .92;
}
.tile-seal {
  position: absolute;
  right: 0;
  bottom: 4px;
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 2px 3px #271b183d);
}
.lantern-tile small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 500 .92rem/1.35 var(--serif);
}
.lantern-tile .milestone {
  position: absolute;
  top: 33px;
  left: 5px;
  padding: 1px 5px;
  border: 1px solid #cdbb92;
  border-radius: 4px;
  background: #fff5db;
  color: #6a4b25;
  font: italic .7rem/1.4 var(--serif);
  transform: rotate(-5deg);
}
.lantern-tile:not([data-state='empty']) {
  color: #fff1d3;
  border-color: #63726a;
  background: radial-gradient(ellipse at 50% 58%, #765f37, var(--lamp-bg, #183d35) 72%);
}
.preview-section {
  padding-bottom: 36px;
}

.note-grid {
  display: grid;
  gap: 18px;
}
.note-card {
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 19px;
}
.note-card p {
  color: var(--muted);
}
#countdown,
.hint {
  font-size: 0.84rem;
}

.note-grid {
  grid-template-columns: repeat(4, 1fr);
}
.note-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.note-card button {
  align-self: flex-start;
  text-decoration: underline;
  color: var(--accent);
  margin-top: 12px;
  padding: 0;
}
.footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--edge);
  padding: 25px 0 42px;
  color: var(--muted);
  font-size: 0.85rem;
}
[hidden],
html[data-route='studio'] #workspace,
html[data-route='board'] #home {
  display: none !important;
}
#workspace {
  min-height: 68vh;
  padding-block: 30px 75px;
}
.board-cover {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  background: #113c38 url('/evening.webp') center 51% / cover;
  color: #fff4d7;
  border-radius: 17px;
  padding: 33px clamp(22px, 4vw, 65px);
}
.board-cover:before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #122d46f5, #193a37bb 55%, transparent);
}
[data-theme='emerald'] .board-cover:before {
  background: linear-gradient(90deg, #0c4a37f7, #123f33a8 55%, transparent);
}
[data-theme='clay'] .board-cover:before {
  background: linear-gradient(90deg, #6c3428f7, #613d32be 55%, transparent);
}
.board-cover h1,
.find-card h1 {
  font-size: clamp(2.5rem, 5.5vw, 5rem);
  letter-spacing: -0.055em;
  line-height: 1.1;
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.board-cover .kicker {
  color: #ecd09b;
}
.board-cover .row {
  margin-top: 16px;
}
.board-cover .primary {
  background: #f3dcac;
  color: #254239;
  border-color: transparent;
}
.board-cover .secondary {
  color: #fff0c8;
  border-color: #f6ecc29c;
  background: #10352ea8;
}
.board-toolbar {
  justify-content: space-between;
  margin: 22px 0 17px;
}
.board-toolbar h2 {
  font-size: 1.85rem;
}
.tools {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.board-cover .kicker, .letter-head .kicker { text-transform: uppercase; }
.board-cover h1 em { color: #f6d694; font-weight: inherit; }
.cover-progress {
  display: grid;
  width: min(235px, 100%);
  gap: 7px;
  margin-top: 18px;
}
.cover-progress label { font: 550 .95rem/1.3 'Segoe UI', sans-serif; }
.cover-progress progress {
  appearance: none;
  height: 6px;
  width: 100%;
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  color: #efca82;
  background: #ffffff40;
}
.cover-progress progress::-webkit-progress-bar { background: #ffffff40; }
.cover-progress progress::-webkit-progress-value { background: #efca82; border-radius: 20px; }
.cover-progress progress::-moz-progress-bar { background: #efca82; }
#workspace[data-role] .board-cover { background-image: url('/lantern-sky.webp'); background-position: center 72%; }
#workspace[data-role] .lantern-tile .tile-art::before {
  content: '';
  position: absolute;
  width: 1px;
  height: max(1px, calc((100% - var(--lamp-size)) / 2 + 2px));
  left: 50%;
  top: 0;
  background: #9a795277;
}

.lantern-tile:is([data-tier='deluxe'], [data-tier='special']) .tile-art { --lamp-size: 108px; width: 118px; }
.tile-art > :is(.special, .deluxe) { width: min(100%, var(--lamp-size)); }
.tile-art:has(> .special, > .deluxe) .tile-seal { width: 30px; height: 30px; }
.lantern-tile:not([data-state='empty']) .tile-art > :is(img, .special, .deluxe) {
  opacity: 1;
  filter: drop-shadow(0 0 7px var(--aura, #ffc87799));
}
#workspace[data-role='visitor'] .board-cover {
  padding-block: clamp(27px, 3.7vw, 55px);
  background-position: center 45%;
}
#workspace[data-role='visitor'] .board-cover h1 {
  max-width: min(80%, 880px);
  font-size: clamp(2.35rem, 4.7vw, 4.25rem);
}
#workspace[data-role='visitor'] .board-toolbar { margin: 25px 0 3px; }
#workspace[data-role='visitor'] .board-tools-note { margin: 5px 0 16px; }
.board-sharing { position: relative; }
.board-sharing summary, .style-link {
  color: var(--accent);
  font-size: .85rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.board-sharing > div {
  position: absolute;
  top: 100%;
  right: 0;
  width: max-content;
  z-index: 10;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: var(--card);
}
.find-card,
.panel {
  max-width: 560px;
  background: var(--card);
  margin: 24px auto;
  padding: clamp(20px, 4vw, 40px);
  border: 1px solid var(--edge);
  border-radius: 16px;
}
.find-card h1 {
  font-size: 2.5rem;
}
.find-card h2 {
  font-size: 1.6rem;
}
.form-stack {
  display: grid;
  gap: 13px;
  margin-top: 16px;
}
.form-stack label:not(.check) > input,
.form-stack label > textarea {
  display: block;
  margin-top: 5px;
}
.form-stack label textarea {
  resize: vertical;
  min-height: 95px;
}
.saved-link {
  display: block;
  padding: 8px 0;
  text-decoration: underline;
}
.long-text {
  overflow-wrap: anywhere;
}
.board-tools-note {
  margin: 12px 0;
  color: var(--muted);
  font-size: 0.88rem;
}
dialog {
  width: min(460px, calc(100% - 28px));
  max-height: min(92dvh, 850px);
  overflow: auto;
  border: 1px solid #cdcbb5;
  border-radius: 20px;
  background: #fcfaf2;
  padding: 0;
  color: var(--ink);
  box-shadow: 0 28px 100px #071b2560;
}
dialog::backdrop {
  background: #07251ed6;
  backdrop-filter: blur(5px);
}
#modal-content {
  padding: 28px;
}
/* 私人信笺使用整页印花纸背景，表单与封签仍按自然文流重排。 */
dialog:has(#fill-form) {
  width: min(452px, calc(100% - 24px));
  max-width: calc(100% - 16px);
  max-height: calc(100dvh - 20px);
  border: 1px solid #ac9873;
  border-radius: 13px;
  background: #fff9ec;
  overscroll-behavior: contain;
  box-shadow: 0 16px 46px #1b1b1866;
}
dialog:has(#fill-form)::backdrop {
  background: #29291c50;
  backdrop-filter: blur(.7px);
}
dialog:has(#fill-form) #modal-content {
  padding: 43px 43px 27px;
  background: #fffaed url('/letter-paper.webp') center / 100% 100% no-repeat;
}
dialog:has(#fill-form) .dismiss {
  right: 27px;
  top: 42px;
  width: 26px;
  height: 26px;
  color: #554b30;
  background: #fff9ebe8;
  font-size: 1.03rem;
}
.letter-head { text-align: center; }
.letter-head .kicker { justify-content: center; gap: 4px; font-size: .68rem; color: #785825; letter-spacing: .12em; }
.letter-head h2#modal-title {
  margin: 7px 0 3px;
  color: #193b30;
  font: 500 clamp(2rem, 3.3vw, 2.5rem)/1.13 var(--serif);
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}
.letter-prompt { color: #423922; font: 1rem/1.4 var(--serif); overflow-wrap: anywhere; }
#fill-form { gap: 12px; margin-top: 18px; color: #342d1d; }
#fill-form label, #fill-form legend { font-size: .91rem; font-weight: 550; }
#fill-form input[type='text'] {
  border: 1px solid #c6b795;
  border-radius: 5px;
  background: #f2ecdeba;
  padding: 7px 10px;
  min-height: 38px;
  font-weight: 400;
}
#fill-form :is(input,textarea)::placeholder { color: #6b6456; }
.note-caption { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 3px; }
.note-caption small { color: #6b604b; }
.ruled-sheet {
  --ruling: 24px;
  border: 1px solid #c8ba9d;
  border-radius: 6px;
  overflow: hidden;
  background: #fffbee99;
}
.ruled-sheet:focus-within { outline: 2px solid #9e783e; outline-offset: 1px; }
#fill-form textarea {
  display: block;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 4px 10px 0;
  min-height: 76px;
  height: 76px;
  resize: vertical;
  background: repeating-linear-gradient(transparent 0 23px, #c9bfa775 23px 24px) 0 2px / auto var(--ruling) local;
  font: 1.05rem/var(--ruling) var(--serif);
}
#fill-form textarea:focus-visible { outline: none; }
.idea-line { display: flex; justify-content: flex-end; padding: 0 8px 2px; }
.idea-link, .stamp span { font-family: 'Caveat', 'Segoe Print', cursive; }
.idea-link {
  padding: 1px 3px;
  font-size: 1.18rem;
  font-weight: 600;
  color: #614b24;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.idea-link span { color: #9a6e24; }
#fill-form .seal-picker legend { margin-bottom: 6px; }
.seal-picker legend span { font-weight: 400; }
#fill-form .signature-check {
  display: flex;
  gap: 6px;
  min-height: 27px;
  font-size: .84rem;
  font-weight: 450;
  line-height: 1.3;
}
.signature-check :is(input, svg) { flex: none; }
.signature-check input { margin: 0; accent-color: #6d5221; }
.signature-check svg { color: #7e622e; }
.seal-submit {
  width: 100%;
  min-height: 44px;
  border-radius: 26px;
  border: 1px solid #b89854;
  background: linear-gradient(106deg,#123d30 62%,#526440 86%,#897a49);
  font: 600 1.22rem/1.2 var(--serif);
  box-shadow: inset 0 0 0 1px #f8de9e66,0 3px 8px #6f58372b;
}
.seal-submit span { color: #ffdd94; }
.letter-foot { display: flex; justify-content: center; align-items: center; gap: 7px; min-height: 24px; }
.letter-foot .style-link { color: #384a39; text-underline-offset: 3px; }
.mini-lantern { position: relative; display: inline-grid; place-items: center; width: 25px; height: 26px; }
.mini-lantern > img { width: 19px; height: 25px; object-fit: contain; }
.mini-lantern > :is(.special,.deluxe) { width: 24px; height: 24px; }
.mini-seal { position: absolute; right: -2px; bottom: 0; width: 14px; height: 14px; }
.clue-art { display: block; object-fit: contain; }
.mini-seal .clue-art, .tile-seal .clue-art { width: 100%; height: 100%; }
#fill-conflict:empty { display: none; }
.fold .clue-art, .note-paper footer .clue-art { width: 32px; height: 32px; display: inline-block; vertical-align: middle; }
dialog h2 {
  font-size: 2rem;
  line-height: 1.12;
  margin: 7px 25px 7px 0;
}
dialog h3 {
  font-size: 1.35rem;
}
.dismiss {
  position: absolute;
  z-index: 5;
  right: 10px;
  top: 10px;
  border-radius: 50%;
  width: 31px;
  height: 31px;
  background: #f5f4ed;
  color: #24453a;
  font: 1.4rem/1 sans-serif;
  box-shadow: 0 0 0 1px #374c361a;
}
.stamp-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.stamp {
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: #493718;
}
.stamp .clue-art {
  width: min(100%, 72px);
  height: auto;
  aspect-ratio: 1;
  transition: filter .16s, transform .16s;
}
.stamp span { font-size: 1.22rem; line-height: 1.05; }
.stamp:hover { filter: none; }
.stamp:hover .clue-art { transform: translateY(-1px); }
.stamp[aria-pressed='true'] .clue-art {
  filter: drop-shadow(0 0 2px #b0852c) drop-shadow(0 0 5px #efbe50);
}
.stamp[aria-pressed='true'] span { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.count-row {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}
.text-btn,
.danger {
  padding: 3px 0;
  text-decoration: underline;
  font-weight: 600;
  font-size: 0.86rem;
}
.danger {
  color: #943e37;
}
.menu-stack {
  display: grid;
  gap: 9px;
  margin-top: 15px;
}
.private-code {
  display: block;
  background: #eaf0e5;
  padding: 11px;
  border-radius: 6px;
  font-size: 1.1rem;
  user-select: all;
}
.note-paper {
  background: #fffaf0;
  border: 1px solid #decfa7;
  border-radius: 9px;
  position: relative;
  padding: 22px 20px;
  margin: 12px 0;
  box-shadow: 0 3px 12px #78633113;
}
.note-paper p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 1.42rem/1.4 var(--serif);
}
.note-paper footer {
  margin-top: 9px;
  color: var(--gold);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.export-preview {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 48vh;
  margin: 12px auto;
  border-radius: 8px;
}
.hint-box {
  padding: 10px 12px;
  background: #edf1e8;
  border-radius: 6px;
  color: #425d4a;
  font-size: 0.88rem;
}
.poster-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
#toast {
  position: fixed;
  z-index: 30;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 17px;
  border-radius: 8px;
  background: #163c32;
  color: white;
  width: max-content;
  max-width: min(90vw, 550px);
  box-shadow: 0 6px 30px #0003;
  pointer-events: none;
}
#toast:empty {
  display: none;
}
dialog #toast {
  position: sticky;
  bottom: 8px;
  left: 0;
  transform: none;
  margin: 0 auto 8px;
  width: fit-content;
  max-width: 90%;
}
.ritual {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: 238px;
  background: #0b3230 url('/evening.webp') 15% 18%/260% auto;
  border-radius: 14px;
  display: grid;
  place-items: center;
  perspective: 650px;
  margin: -12px -12px 19px;
}
.ritual:before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 52%, #ffc46577, transparent 45%), #062d2cc2;
}
.ritual canvas,
.halo,
.charm,
.fold,
.seal-star {
  position: absolute;
}
.ritual canvas {
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}
.charm {
  width: 126px;
  height: 195px;
  filter: drop-shadow(0 0 14px #f6ac496e);
  transform-origin: 50% 0;
}
.charm i {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.charm img { height: 100%; width: 100%; object-fit: contain; }
.charm:has(.special, .deluxe) { width: 174px; height: 174px; }
.charm i > :is(.special, .deluxe) { width: 100%; }
.charm .cap {
  clip-path: inset(0 0 62%);
}
.charm .base {
  clip-path: inset(38% 0 0);
}
.halo {
  width: 138px;
  height: 138px;
  border: 1px solid #fdd68d7a;
  border-radius: 50%;
  opacity: 0;
}
.fold {
  z-index: 2;
  background: #f4dfb4;
  color: #8f663f;
  box-shadow: 0 2px 14px #f7da6b55;
  border: 1px solid #c59c5a;
  display: grid;
  place-items: center;
  width: 57px;
  height: 39px;
  border-radius: 3px;
  opacity: 0;
  font: 1.4rem Georgia;
}
.seal-star {
  color: #ffdc80;
  font-size: 2rem;
  opacity: 0;
}
.ritual.fill .charm {
  animation: catch-light 1.75s both;
}
.ritual.fill .fold {
  animation: fold-in 1.6s both;
}
.ritual.fill .halo {
  animation: ripple 1.1s 0.85s both;
}
.ritual.open .charm .whole { animation: illuminate-sculpture 1.85s ease-in-out both; }
@keyframes illuminate-sculpture {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  56% { transform: scale(1.035); filter: brightness(1.14); }
}
.ritual.open .charm .cap {
  animation: lift-cap 1.85s both;
}
.ritual.open .charm .base {
  animation: lower-glass 1.85s both;
}
.ritual.open .fold {
  animation: unfold 1.85s both;
}
.ritual.open .halo {
  animation: ripple 1.2s 0.55s both;
}
.ritual.open .seal-star {
  animation: seal-flash 1.4s both;
}
.after-ritual {
  animation: ink-appear 0.42s 0.95s backwards;
}
.ritual.open + .after-ritual {
  animation-delay: 1.05s;
}
@keyframes fold-in {
  0% {
    opacity: 0;
    transform: translate(-105px, 72px) rotate(-24deg) scale(1.3);
  }
  20% {
    opacity: 1;
  }
  55% {
    transform: translate(-28px, 0) rotate(8deg);
  }
  75%,
  100% {
    opacity: 0;
    transform: translate(2px, 7px) rotateY(74deg) scale(0.12);
  }
}
@keyframes catch-light {
  0%,
  45% {
    filter: grayscale(0.9) brightness(0.55);
    transform: rotate(-4deg);
  }
  66% {
    filter: brightness(1.6) drop-shadow(0 0 28px #ffb93e);
    transform: rotate(4deg);
  }
  82% {
    transform: rotate(-2deg);
  }
  100% {
    transform: rotate(0);
  }
}
@keyframes ripple {
  0% {
    opacity: 0;
    transform: scale(0.25);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(2.5);
  }
}
@keyframes lift-cap {
  0%,
  21% {
    transform: none;
  }
  65%,
  100% {
    transform: translateY(-21px) rotate(-8deg);
  }
}
@keyframes lower-glass {
  0%,
  21% {
    transform: none;
  }
  65%,
  100% {
    transform: translateY(20px);
    filter: brightness(0.78);
  }
}
@keyframes unfold {
  0%,
  28% {
    opacity: 0;
    transform: translateY(19px) scale(0.15) rotateX(75deg);
  }
  65% {
    opacity: 1;
    transform: translateY(-7px) scale(1.1) rotate(-7deg);
  }
  100% {
    opacity: 1;
    transform: translateY(-8px) scale(1.3) rotate(-3deg);
  }
}
@keyframes seal-flash {
  0%,
  22%,
  80%,
  100% {
    opacity: 0;
    transform: scale(0.3);
  }
  48% {
    opacity: 1;
    transform: scale(2.2);
  }
}
@keyframes ink-appear {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (min-width: 1500px) {
  .art-hero {
    min-height: 510px;
  }
}
@media (max-width: 1000px) {
  .wrap {
    width: 94%;
  }
  .studio {
    gap: 15px;
    grid-template-columns: minmax(0, 1.4fr) minmax(317px, 1fr);
  }
  .art-hero h1 {
    font-size: clamp(3rem, 5.8vw, 4.2rem);
  }
  .art-hero {
    background-position: 57% center;
  }
  .creator {
    padding: 20px;
  }
  .mast-in {
    gap: 16px;
  }
  .mast nav {
    gap: 18px;
  }
  .lantern-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .sample-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .note-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 760px) {
  .wrap {
    width: calc(100% - 32px);
  }
  .mast-in {
    min-height: 65px;
    justify-content: space-between;
  }
  .mast-in { gap: 8px; flex-wrap: wrap; padding-block: 7px; }
  .mast .main-nav { display: none; }
  .mast .row { flex-wrap: nowrap; gap: 6px; }
  .mast .find-link { min-height: 40px; white-space: nowrap; }
  .brand {
    font-size: 1.15rem;
  }
  .brand-mark {
    width: 36px;
    height: 39px;
    font-size: 1.7rem;
  }
  .brand small {
    font-size: 0.58rem;
  }
  .find-link {
    padding: 7px 10px;
    font-size: 0.8rem;
  }
  .studio {
    grid-template-columns: 1fr;
    margin: 17px 0 29px;
  }
  .art-hero {
    min-height: 322px;
    background-position: center 44%;
  }
  .art-copy {
    padding: 25px 21px;
  }
  .art-hero h1 {
    font-size: clamp(2.85rem, 8vw, 4.5rem);
    margin: 14px 0;
  }
  .art-hero p {
    font-size: 0.9rem;
  }
  .art-hero:before {
    background: linear-gradient(90deg, #052e2bd9, transparent 88%);
  }
  .art-caption {
    bottom: 12px;
    left: 20px;
    font-size: 0.76rem;
  }
  .hero-button {
    margin-top: 13px;
    font-size: 0.8rem;
  }
  .creator {
    padding: 20px;
  }
  .creator h2 {
    font-size: 2.2rem;
  }
  .creator form {
    margin-top: 13px;
  }
  .lantern-grid,
  .sample-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .lantern-tile {
    min-height: 137px;
  }
  .tile-art { --lamp-size: 67px; }
  .lantern-tile:is([data-tier='deluxe'], [data-tier='special']) .tile-art { --lamp-size: 85px; }
  .note-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .note-card {
    padding: 14px;
  }
  .section-top {
    align-items: start;
  }
  .section-top .legend {
    margin: 6px 0;
  }
  .board-cover {
    padding: 25px 17px;
  }
  .board-cover h1 {
    font-size: 2.5rem;
  }
  .board-toolbar {
    gap: 10px;
  }
  .footer {
    font-size: 0.8rem;
  }
  .board-toolbar h2 {
    font-size: 1.55rem;
  }
}
@media (max-width: 540px) {
  #workspace[data-role] { width: calc(100% - 28px); padding-top: 16px; }
  #workspace[data-role] .lantern-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  #workspace[data-role] .lantern-tile { min-height: 149px; }
  #workspace[data-role='visitor'] .board-cover { padding: 20px; }
  #workspace[data-role='visitor'] .board-cover:before {
    background: linear-gradient(90deg, #0c2528e8 0%, #132a2b95 72%, #132a2b35);
  }
  #workspace[data-role='visitor'][data-theme='clay'] .board-cover:before {
    background: linear-gradient(90deg, #572e24f5 0%, #542c259e 72%, #40251c35);
  }
  #workspace[data-role='visitor'] .board-cover h1 { max-width: 100%; margin-top: 12px; }
  .board-sharing summary { font-size: .8rem; }
  dialog:has(#fill-form) #modal-content { padding: 34px 27px 24px; }
  dialog:has(#fill-form) .dismiss { right: 17px; top: 45px; }
  .letter-head h2#modal-title { padding-inline: 10px; font-size: 2.05rem; }
  #fill-form { margin-top: 13px; gap: 9px; }
  .stamp-row { gap: 5px 2px; }
  .stamp .clue-art { width: min(100%, 61px); }
  .stamp span { font-size: 1.15rem; }
  #fill-form textarea { min-height: 66px; height: 66px; }
}
@media (max-width: 390px) {
  .wrap {
    width: calc(100% - 22px);
  }
  .note-grid {
    grid-template-columns: 1fr;
  }
  .art-copy {
    padding-inline: 16px;
  }
  .art-hero h1 {
    font-size: 2.65rem;
  }
  .art-hero {
    min-height: 311px;
  }
  .creator {
    padding: 16px;
  }
  .legend {
    gap: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .ritual canvas {
    display: none;
  }
}
[data-theme='clay'] { --lamp-bg: #56382e; }
[data-theme='midnight'] { --lamp-bg: #172d43; }
.reading {
  max-width: 870px;
  padding-block: 55px;
  min-height: 65vh;
}
.reading h1 {
  font-size: clamp(2.6rem, 6vw, 4.3rem);
  letter-spacing: -0.05em;
  line-height: 1.08;
  margin: 12px 0 26px;
}
.reading h2 {
  font-size: 1.65rem;
  margin: 22px 0 8px;
}
.reading p {
  margin: 12px 0 19px;
}
.reading p a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.reading .primary {
  margin-top: 18px;
}
.pricing-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pricing-free {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  align-items: baseline;
  padding: clamp(18px, 4vw, 30px);
  border-radius: 14px;
  background: #163e34;
  color: #fff9e7;
}
.pricing-free h2, .pricing-free p { margin: 0; }
.pricing-free strong { font: 1.8rem var(--serif); color: #f3d58d; }
.pricing-free p { grid-column: 1 / -1; }
.pricing-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 156px), 1fr));
  align-items: start;
  gap: 18px;
  list-style: none;
  margin: 12px 0 28px;
  padding: 0;
}
.pricing-gallery li { display: grid; gap: 4px; }
.pricing-gallery strong { font: 600 1.12rem/1.25 var(--serif); }
.pricing-gallery li > span:not([class]) { color: var(--muted); font-variant-numeric: tabular-nums; }
.pricing-gallery li > :first-child { margin-bottom: 6px; }
.pricing-gallery small { color: var(--muted); }
.footlinks a {
  display: inline-block;
  margin: 3px 12px 3px 0;
  font-size: 0.85rem;
}
.footer {
  gap: 12px;
  flex-wrap: wrap;
}
.reading .note-grid {
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}
.reading select {
  max-width: 230px;
}

/* 灯格、特效图集与纪念品共用正式灯板的尺寸和焦点样式。 */
.lantern-tile[data-state='ready'] { outline: 2px solid #cca753; outline-offset: -4px; }
[data-style='brass'] { --light-x: 0%; --aura: #e8b6629c; }
[data-style='mosaic'] { --light-x: 33.333%; --aura: #eba47582; }
[data-style='aurora'] { --light-x: 66.667%; --aura: #adcceba1; }
[data-style='palace'] { --light-x: 0%; --aura: #e9b378ab; --glow: #e9b378; --glow-soft: #f6d5a0; }
[data-style='moonlit'] { --light-x: 33.333%; --aura: #efe0adba; --glow: #efe0ad; --glow-soft: #fff5d6; }
[data-style='crystal'] { --light-x: 66.667%; --aura: #7ec5c899; --glow: #7ec5c8; --glow-soft: #b8eef0; }
[data-style='garden'] { --light-x: 100%; --aura: #8fc49790; --glow: #8fc497; --glow-soft: #cdebb8; }
[data-tier='deluxe'] { --light-y: 100%; }
[data-golden='true'] .lantern-tile[data-tier='classic'] { --light-x: 100%; }
.lamp-preview,
.lantern-tile:is([data-tier='special'], [data-tier='deluxe']),
[data-golden='true'] .lantern-tile:not([data-state='empty']) {
  border-color: #a19072;
  background-color: #122322;
  background-image: linear-gradient(to bottom, #06101159, transparent 30% 65%, #06101187), url('/lantern-light.webp');
  background-size: 100% 100%, 400% 200%;
  background-position: center, var(--light-x, 100%) var(--light-y, 0%);
}
.lamp-preview::after,
.lantern-tile:is([data-tier='special'], [data-tier='deluxe'])::after,
[data-golden='true'] .lantern-tile::after {
  content: '';
  position: absolute;
  inset: 7px;
  pointer-events: none;
  z-index: -1;
  border: 1px solid #ebc98961;
  border-radius: 48% 48% 3px 3px / 37% 37% 3px 3px;
}
.lantern-tile[data-tier='deluxe']::after { border-color: #ebd4a9a6; }
#workspace[data-golden='true'] .board-cover {
  background: #071b23 url('/golden-sky.webp') right bottom / cover no-repeat;
}
#workspace[data-golden='true'] .board-cover::before { background: linear-gradient(90deg, #07182070, transparent 75%); }
[data-golden='true'] .lantern-tile::after { inset: 4px; border-radius: 9px 9px 4px 4px; }
[data-golden='true'] .lantern-tile[data-state='empty'] {
  background: #f6f0e3;
  border-color: #c9ba98;
  color: #514636;
}
[data-golden='true'] .lantern-tile[data-state='empty'] .tile-art > img { opacity: .58; filter: sepia(.35); }

/* 私人灯板共用同一排日期。用明暗、灯体尺寸与拱框区分层次。 */
/* 根元素显式裁剪，使 body 的裁剪留在自身，边列光辉不会计入文档可滚宽度。 */
html[data-route='board']:has(#workspace[data-role]),
body:has(#workspace[data-role]) { overflow-x: clip; }
#workspace[data-role] .lantern-grid {
  padding: 16px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--lamp-bg, #183d35) 58%, #071016);
  border: 1px solid color-mix(in srgb, var(--lamp-bg, #183d35) 45%, #d6bf8f33);
  box-shadow: inset 0 1px 0 #ffffff12, 0 10px 28px #0a181e1a;
}
#workspace[data-golden='true'] .lantern-grid {
  background: #081822;
  border-color: #9e865c4d;
}
@media (max-width: 540px) {
  #workspace[data-role] .lantern-grid { padding: 10px; border-radius: 16px; }
}
#workspace .lantern-tile { grid-template-columns: minmax(0, 1fr); z-index: var(--spill-level, 0); }
#workspace .lantern-tile:is(:hover, :focus) { z-index: 6; }
#workspace:not([data-golden='true']) .lantern-tile[data-tier='classic'] {
  background: radial-gradient(ellipse at 50% 56%, #745b32, var(--lamp-bg, #183d35) 66%);
  border-color: #5a6a62;
  color: #fff2d6;
}
#workspace .lantern-tile[data-tier='classic']::after { content: none; }
#workspace .lantern-tile[data-tier='classic'] .tile-art > :is(img, .special) {
  filter: drop-shadow(0 0 6px #ffca7a78);
}
#workspace .lantern-tile[data-tier='classic'] .tile-seal { width: 32px; height: 32px; }

/* 同为黄铜图案时，只有实际送出的单灯享有付费格光晕。 */
#workspace .lantern-tile[data-tier='special'][data-style='brass'] {
  --spill-level: 1;
  --spill: var(--brass-reach, 24px);
  --spill-op: 0.28;
  --prism: conic-gradient(from 15deg, #ffd46b, #ff9d3b, #ffe79e, #e89b2d, #ffd46b);
  box-shadow: inset 0 0 18px #f5b94238, 0 0 10px #f5b94255, 0 3px 10px #1a140a3d;
  --arch-stroke: #ebc9895e;
  --material-light: drop-shadow(0 0 7px #e8b66294);
  border-color: #9e865c;
}
#workspace .lantern-tile[data-tier='special'][data-style='mosaic'] {
  --spill-level: 2;
  --spill: var(--mosaic-reach, 38px);
  --spill-op: 0.40;
  --prism: conic-gradient(from 20deg, #ff9a3c, #ff4f79, #4d8dff, #ffd15c, #ff9a3c);
  box-shadow: inset 0 0 24px #ff964f45, 0 0 14px #ff854766, 0 0 22px #5288ff44, 0 4px 14px #0d121648;
  --arch-stroke: #ecc68c75;
  --material-light: drop-shadow(0 0 6px #ffd49c99) drop-shadow(0 0 14px #eba47566);
  border-color: #b49263;
}
#workspace .lantern-tile[data-tier='special'][data-style='aurora'] {
  --spill-level: 3;
  --spill: var(--aurora-reach, 54px);
  --spill-op: 0.50;
  --prism: conic-gradient(from 10deg, #4be3ff, #8a6bff, #ff79d1, #49ffd8, #4be3ff);
  --prism-flow: radial-gradient(circle at 30% 34%, #6ef2ff88, transparent 44%),
    radial-gradient(circle at 72% 66%, #b282ff88, transparent 46%);
  box-shadow: inset 0 0 30px #8ccbff55, 0 0 16px #6bc4ff88, 0 0 26px #a875ff55, 0 6px 18px #0b162455;
  --arch-stroke: #c5dcf082;
  --material-light: drop-shadow(0 0 7px #e8f3ffb0) drop-shadow(0 0 18px #9bc4ee7a);
  border-color: #9eb9d4;
}
#workspace .lantern-tile[data-tier='special'] .tile-art > .special { filter: var(--material-light); }
#workspace .lantern-tile[data-tier='special']::after { border-color: var(--arch-stroke); }
#workspace .lantern-tile[data-tier='special']::after,
#workspace .lantern-tile[data-tier='deluxe']::after {
  inset: 7px;
  border-radius: 48% 48% 5px 5px / 36% 36% 5px 5px;
}
#workspace .lantern-tile[data-tier='deluxe'] {
  --spill-level: 4;
  --spill: var(--collector-reach, 66px);
  --spill-op: var(--collector-op, 0.62);
  color: #fff2da;
  background-color: #101919;
  background-image: linear-gradient(180deg, #08141791, #10151750 50%, #080d10c9), url('/lantern-light.webp');
  border-color: #cca96e;
}
#workspace .lantern-tile[data-tier='deluxe'][data-style='palace'] {
  --prism: conic-gradient(from 18deg, #ffcf4d, #ff6b3d, #ff70b8, #ffe580, #ff8c38, #e066ff, #ffcf4d);
  --prism-flow: radial-gradient(circle at 28% 32%, #ffe28599, transparent 42%),
    radial-gradient(circle at 72% 68%, #ff78b480, transparent 46%);
  box-shadow: inset 0 0 0 2px #1c1712, inset 0 0 36px #ffb84d55, 0 0 14px #ffae36aa, 0 0 25px #ff62a566, 0 8px 24px #1a140955;
}
#workspace .lantern-tile[data-tier='deluxe'][data-style='moonlit'] {
  --prism: conic-gradient(from 18deg, #ffe270, #6ecbff, #c278ff, #ff9ad5, #fff0a6, #6ecbff, #ffe270);
  --prism-flow: radial-gradient(circle at 30% 32%, #fff3b899, transparent 44%),
    radial-gradient(circle at 70% 68%, #9e8aff85, transparent 46%);
  box-shadow: inset 0 0 0 2px #1c1712, inset 0 0 36px #ffe69455, 0 0 14px #ffe17daa, 0 0 25px #9b7dff66, 0 8px 24px #1a140955;
}
#workspace .lantern-tile[data-tier='deluxe'][data-style='crystal'] {
  --prism: conic-gradient(from 25deg, #1ef0f5, #4d79ff, #d46bff, #ffca57, #1ef0f5, #a86bff, #1ef0f5);
  --prism-flow: radial-gradient(circle at 28% 34%, #2cf4fa99, transparent 44%),
    radial-gradient(circle at 72% 66%, #cf7aff88, transparent 46%);
  box-shadow: inset 0 0 0 2px #1c1712, inset 0 0 36px #3be8ee55, 0 0 14px #22e6edbb, 0 0 25px #b866ff77, 0 8px 24px #1a140955;
}
#workspace .lantern-tile[data-tier='deluxe'][data-style='garden'] {
  --prism: conic-gradient(from 20deg, #2be87a, #ffd24c, #1ee0e0, #8a7aff, #2be87a, #ffd24c, #2be87a);
  --prism-flow: radial-gradient(circle at 30% 32%, #3df28a99, transparent 44%),
    radial-gradient(circle at 70% 68%, #ffd86688, transparent 46%);
  box-shadow: inset 0 0 0 2px #1c1712, inset 0 0 36px #42e08455, 0 0 14px #34e07dbb, 0 0 25px #f5c84277, 0 8px 24px #1a140955;
}
#workspace .lantern-tile[data-tier='deluxe'] .tile-art > .deluxe {
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--glow-soft) 72%, transparent))
    drop-shadow(0 0 20px color-mix(in srgb, var(--glow) 52%, transparent));
}
#workspace .lantern-tile[data-tier='deluxe']::after {
  border: 3px double #d8b982ba;
  box-shadow: inset 0 0 16px color-mix(in srgb, var(--glow) 16%, transparent);
  /* 拱顶从灯体所在行起笔，日期独占第一行。 */
  grid-area: 2 / 1 / 4 / 2;
  inset: -2px -2px -4px;
}
#workspace .lantern-tile[data-tier='deluxe'] .tile-art {
  --lamp-size: 122px;
  width: min(100%, 135px);
}
#workspace .lantern-tile[data-tier='deluxe'] .tile-seal { right: 4px; }
/* 固定窗口负责边界与镂空，内部流光的位移不会改变光域。 */
#workspace .tile-spill {
  position: absolute;
  inset: calc(-1px - var(--spill));
  padding: var(--spill);
  z-index: 2;
  pointer-events: none;
  opacity: var(--spill-op);
  overflow: hidden;
  --spill-mask: radial-gradient(ellipse 50% 50%, #000 54%, rgb(0 0 0 / .64) 72%, rgb(0 0 0 / .22) 87%, transparent),
    linear-gradient(#000 0 0) content-box;
  -webkit-mask: var(--spill-mask);
  -webkit-mask-composite: source-out;
  mask: var(--spill-mask);
  mask-composite: subtract;
}
/* 静态构图只有原 B1 棱镜；流动时才生成错位的表层光斑。 */
#workspace .tile-spill::before,
#workspace .tile-spill::after {
  position: absolute;
  inset: -48%;
  pointer-events: none;
}
#workspace .tile-spill::before {
  content: '';
  background: var(--prism);
}
.frame-corners {
  --corner-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23d4b37c' d='m8 0 1.2 5.3 3.7-2.2-2.2 3.7L16 8l-5.3 1.2 2.2 3.7-3.7-2.2L8 16l-1.2-5.3-3.7 2.2 2.2-3.7L0 8l5.3-1.2-2.2-3.7 3.7 2.2Z'/%3E%3C/svg%3E");
  pointer-events: none;
  position: absolute;
  inset: 6px;
  background: var(--corner-star) top left, var(--corner-star) top right,
    var(--corner-star) bottom left, var(--corner-star) bottom right;
  background-size: 8px 8px;
  background-repeat: no-repeat;
}
#workspace .lantern-tile[data-tier='deluxe']:focus {
  outline: 3px solid #a87731;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: no-preference) {
  #workspace .lantern-tile[data-tier='deluxe']:focus .frame-corners {
    animation: locate-lantern 1.5s ease-out;
  }
  @keyframes locate-lantern { 0%, 45% { opacity: .35; } 76% { opacity: 1; } }
}

/* 有典藏留言才开辟封面展区。挂线在按钮范围内穿过上方留白，灯图复用原件。 */
.board-cover:has(.cover-lanterns) {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
  gap: clamp(14px, 3vw, 44px);
  align-items: center;
}
#workspace[data-role] .board-cover:has(.cover-lanterns) h1 { max-width: 100%; }
.cover-lanterns {
  display: flex;
  align-self: start;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(6px, 1.2vw, 18px);
  isolation: isolate;
}
.cover-lantern {
  --drop: 2px;
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  flex: 0 1 112px;
  min-width: 0;
  padding: var(--drop) 0 4px;
  border-radius: 6px;
  color: #fff1ce;
}
.cover-lantern:first-child { --drop: 19px; flex-basis: 156px; }
.cover-lantern:only-child { --drop: 3px; flex-basis: 182px; }
.cover-lantern:nth-child(3) { --drop: 30px; }
.cover-lantern::before {
  content: '';
  position: absolute;
  inset-block: -100px auto;
  height: calc(102px + var(--drop));
  width: 1px;
  left: 50%;
  background: #c7ad78a6;
  pointer-events: none;
}
.cover-lantern::after {
  content: '';
  pointer-events: none;
  position: absolute;
  z-index: -1;
  inset: var(--drop) -8% 14px;
  background: radial-gradient(ellipse closest-side, var(--aura), transparent);
  opacity: .45;
}
.cover-lantern > .deluxe { width: 100%; filter: drop-shadow(0 2px 6px #111919b3); }
.pendant-night {
  margin-top: 5px;
  font: 600 .75rem/1.5 'Segoe UI', sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-shadow: 0 1px 4px #050e14;
}
.cover-lantern:is(:hover, :focus-visible) .pendant-night { text-decoration: underline; text-underline-offset: 3px; }
.cover-lantern:focus-visible { outline-color: #ffdb9a; }
@media (max-width: 700px) {
  #workspace {
    --brass-reach: 14px; --mosaic-reach: 24px; --aurora-reach: 34px;
    --collector-reach: 40px; --collector-op: .54;
  }
  .board-cover:has(.cover-lanterns) { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .cover-lanterns { grid-row: 1; }
  .cover-lantern { flex-basis: 76px; }
  .cover-lantern:first-child { --drop: 8px; flex-basis: 100px; }
  .cover-lantern:only-child { flex-basis: 112px; }
  .cover-lantern:nth-child(3) { --drop: 15px; }
  #workspace .lantern-tile[data-tier='deluxe'] .tile-art { --lamp-size: 105px; width: min(100%, 117px); }
  #workspace[data-golden='true'][data-collectors] .board-cover::before {
    background: linear-gradient(0deg, #061a20dc, #07192379 55%, transparent 80%);
  }
}
.deluxe,
.special {
  display: inline-block;
  flex: none;
  width: 76px;
  max-width: 100%;
  aspect-ratio: 1;
  background-repeat: no-repeat;
}
.deluxe, .special {
  position: relative;
  background-image: var(--lamp-sheet);
  background-size: var(--lamp-cells);
  background-position: var(--frame);
}
.deluxe { --lamp-sheet: url('/deluxe-lanterns.webp'); --lamp-cells: 200% 200%; }
.special { --lamp-sheet: url('/special-lanterns.webp'); --lamp-cells: 300% 100%; }

/* 仅装饰灯体和投影。未点灯、免费灯、封签与文字均不参与持续动画。 */
.lamp-light, .lamp-glint { display: none; }
@media (prefers-reduced-motion: no-preference) {
  /* 后台保留原动画实例和当前相位，覆盖下方各灯型 animation 简写。 */
  #workspace[data-paused] .lantern-tile[data-glowing],
  #workspace[data-paused] .lantern-tile[data-glowing]::before,
  #workspace[data-paused] .lantern-tile[data-glowing]::after,
  #workspace[data-paused] .lantern-tile[data-glowing] *,
  #workspace[data-paused] .lantern-tile[data-glowing] *::before,
  #workspace[data-paused] .lantern-tile[data-glowing] *::after { animation-play-state: paused !important; }
  /* $2.99 黄铜：仅保留温和呼吸，不流动 */
  #workspace .lantern-tile[data-glowing][data-style='brass'] > .tile-spill {
    animation: spill-breathe 8s ease-in-out infinite;
  }
  /* $4.99 彩玻璃：单层暖彩漂移 */
  #workspace .lantern-tile[data-glowing][data-style='mosaic'] > .tile-spill::before {
    animation: fluid-drift-a 11s ease-in-out infinite;
  }
  #workspace .lantern-tile[data-glowing]:is([data-style='aurora'], [data-tier='deluxe']) > .tile-spill::after {
    content: '';
    background: var(--prism-flow);
    mix-blend-mode: screen;
  }
  /* $9.99 星光：双层月雾错拍流动 */
  #workspace .lantern-tile[data-glowing][data-style='aurora'] > .tile-spill::before {
    animation: fluid-drift-a 8.5s linear infinite;
  }
  #workspace .lantern-tile[data-glowing][data-style='aurora'] > .tile-spill::after {
    animation: fluid-drift-b 6s ease-in-out infinite alternate;
  }
  /* $19.99 典藏四款：双层宝石流光，主光顺转、辅光往返 */
  #workspace .lantern-tile[data-glowing][data-tier='deluxe'] > .tile-spill::before {
    animation: fluid-drift-a 7s linear infinite;
  }
  #workspace .lantern-tile[data-glowing][data-tier='deluxe'] > .tile-spill::after {
    animation: fluid-drift-b 4.8s ease-in-out infinite alternate;
  }
  /* 邻格错开相位，避免多张典藏同步齐动显机械 */
  #workspace .lantern-tile[data-glowing]:nth-child(3n) > .tile-spill::before { animation-delay: -2.3s; }
  #workspace .lantern-tile[data-glowing]:nth-child(3n + 1) > .tile-spill::before { animation-delay: -4.7s; }
  #workspace .lantern-tile[data-glowing]:nth-child(2n) > .tile-spill::after { animation-delay: -2.1s; }

  @keyframes fluid-drift-a {
    0%   { transform: translate3d(-2%, -1%, 0) rotate(0deg)   scale(1.03); }
    50%  { transform: translate3d(2%, 1.5%, 0) rotate(180deg) scale(1.08); }
    100% { transform: translate3d(-2%, -1%, 0) rotate(360deg) scale(1.03); }
  }
  @keyframes fluid-drift-b {
    0%   { transform: translate3d(7%, -5%, 0) rotate(0deg)    scale(1.00); opacity: .30; }
    50%  { transform: translate3d(-7%, 5%, 0) rotate(-145deg) scale(1.14); opacity: .78; }
    100% { transform: translate3d(5%, 6%, 0)  rotate(-290deg) scale(1.04); opacity: .38; }
  }
  @keyframes spill-breathe {
    0%, 100% { opacity: calc(var(--spill-op) * .84); }
    50% { opacity: var(--spill-op); }
  }
  [data-glowing] > .lamp-light {
    display: block;
    pointer-events: none;
    position: absolute;
    z-index: -1;
    inset: 15% 4%;
    overflow: hidden;
    border-radius: 45%;
    mask-image: radial-gradient(ellipse, #000 40%, transparent 75%);
  }
  .lamp-light::before, .lamp-light::after {
    content: '';
    position: absolute;
    inset: 0;
  }
  [data-glowing] > .lamp-light::before {
    background: radial-gradient(ellipse closest-side, #ffe3a8a6, #ffc57a66 40%, transparent 94%);
    animation: candle-breathe 4.8s ease-in-out infinite alternate;
  }
  /* 二档起让图稿中的彩玻璃、星雾或投影缓慢游动，边缘由软遮罩收住。 */
  [data-glowing]:is([data-tier='deluxe'], [data-style='mosaic'], [data-style='aurora']) > .lamp-light::after {
    background: url('/lantern-light.webp') var(--light-x) var(--light-y, 0%) / 400% 200% no-repeat;
    mix-blend-mode: screen;
    animation: projected-light var(--drift-time, 9s) ease-in-out infinite alternate;
  }
  [data-style='mosaic'] { --travel-x: 8%; --travel-y: -4%; --roll: 3deg; }
  [data-style='aurora'] { --travel-x: -11%; --travel-y: 4%; --roll: -4deg; --drift-time: 13s; }
  [data-style='palace'] { --travel-y: -6%; --light-zoom: 1.19; --glint-angle: 112deg; }
  [data-style='moonlit'] { --light-zoom: 1.25; --drift-time: 12s; --glint-angle: 150deg; }
  [data-style='crystal'] { --travel-x: 9%; --roll: -5deg; --glint-angle: 52deg; }
  [data-style='garden'] { --travel-y: -8%; --roll: 3deg; --glint-angle: 77deg; }

  /* 星灯的三颗针尖星光与典藏灯的外层光晕独立起伏。 */
  .lantern-tile[data-glowing][data-style='aurora'][data-tier='special']::before,
  .lantern-tile[data-glowing][data-tier='deluxe']::before {
    content: '';
    pointer-events: none;
    position: absolute;
    z-index: -1;
    inset: 17% 10%;
    background: radial-gradient(ellipse closest-side, transparent 46%, var(--aura) 64%, transparent 93%);
    animation: outer-halo 8s ease-in-out infinite alternate;
  }
  .lantern-tile[data-glowing][data-style='aurora'][data-tier='special']::before {
    background: radial-gradient(circle at 20% 39%, #ece6cf 0 1px, transparent 2px),
      radial-gradient(circle at 78% 27%, #e2edfa 0 1px, transparent 2px),
      radial-gradient(circle at 77% 66%, #c7d4e4 0 1px, transparent 2px);
  }
  /* 借用灯体本身的透明通道，金属反光始终落在器物轮廓内。 */
  [data-glowing] .lamp-glint {
    display: block;
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    mask: var(--lamp-sheet) var(--frame) / var(--lamp-cells) no-repeat;
  }
  [data-glowing] .lamp-glint::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(var(--glint-angle, 108deg), transparent 35%, #fff0cd99 50%, transparent 65%);
    animation: metal-glint 10s ease-in-out infinite;
  }
  [data-glowing][data-tier='deluxe'] .lamp-glint::after { animation-duration: 8.5s; }
  .lantern-tile:nth-child(3n) .lamp-light::before { animation-delay: -2.1s; }
  .lantern-tile:nth-child(3n + 1) .lamp-light::before { animation-delay: -1.2s; }
  @keyframes candle-breathe {
    from { transform: scale(.81); opacity: .32; }
    to { transform: scale(1.12); opacity: .78; }
  }
  @keyframes projected-light {
    from { transform: translate(0) scale(.96); opacity: .13; }
    to { transform: translate(var(--travel-x, 0%), var(--travel-y, 0%)) rotate(var(--roll, 0deg)) scale(var(--light-zoom, 1.1)); opacity: .68; }
  }
  @keyframes outer-halo {
    from { opacity: .17; transform: scale(.86); }
    to { opacity: .58; transform: scale(1.05); }
  }
  @keyframes metal-glint {
    0%, 26% { transform: translateX(-80%); opacity: 0; }
    41% { opacity: .56; }
    64%, 100% { transform: translateX(80%); opacity: 0; }
  }
}
.gift-line {
  color: #f4d89a;
  font-style: italic;
}
.note-paper {
  background-color: #fffaf0;
  background-image: repeating-linear-gradient(
    transparent 0 35px,
    #d9cdb8 35px 36px
  );
  background-position: 0 14px;
}
.note-paper p {
  font-family: 'Segoe Print', 'Bradley Hand', cursive;
  line-height: 36px;
}
.collection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr));
  gap: 10px;
  margin: 16px 0;
}
.collection-item {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  padding: 10px 6px;
  min-width: 0;
  color: var(--ink);
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: #fffaf0;
}
.collection-item:hover {
  border-color: #927744;
}
.lamp-preview {
  display: grid;
  position: relative;
  isolation: isolate;
  place-items: center;
  width: 100%;
  aspect-ratio: 1.1;
  border: 1px solid #ad9372;
  border-radius: 12px;
}
.lamp-preview > :is(.special, .deluxe) { width: 76%; filter: drop-shadow(0 0 7px var(--aura)); }
.collection-item > .lamp-preview { max-width: 130px; }
.product-preview > .lamp-preview { max-width: 265px; }

.product-preview {
  display: grid;
  place-items: center;
  background: #efe5ce;
  border-radius: 12px;
  padding: 15px;
}
.golden-preview {
  display: grid;
  width: min(100%, 180px);
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 4px;
  background: #f4ead5;
  border: 1px solid #bb9b63;
  border-radius: 6px;
}
.golden-preview > i { grid-column: 1 / -1; aspect-ratio: 4; background: #102329 url('/golden-sky.webp') center / cover; }
.golden-preview > span { display: grid; place-items: center; background: #112826; border: 1px solid #b39362; }
.golden-preview > span:last-child { background: #faf4e7; }
.golden-preview > span > :is(.special, img) { width: 100%; aspect-ratio: 1; object-fit: contain; }
.book-cover {
  display: grid;
  align-content: center;
  width: 78px;
  min-height: 90px;
  color: #f9ebcc;
  background: #29483e;
  border: 3px double #ccaa62;
  text-align: center;
  font:
    italic 14px Georgia,
    serif;
}
.eid-sky {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  height: clamp(190px, 45vh, 380px);
  border-radius: 12px;
  background: #12342e url('/evening.webp') center/cover;
}
.rising-lamp {
  position: absolute;
  left: var(--x);
  top: var(--to);
  width: 8%;
  height: 15%;
  animation: rise-lantern 3.4s var(--delay) both;
}
.rising-lamp :is(img, .special, .deluxe) {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@keyframes rise-lantern {
  from {
    transform: translateY(350px) scale(1.2);
    opacity: 0.3;
  }
  to {
    transform: translateY(0) scale(0.7);
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rising-lamp {
    animation: none;
  }
}
.recovery-keys {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.draft-links {
  margin: 12px 0;
}
#fill-conflict:not(:empty) {
  padding: 12px;
  border: 1px solid #a5844d;
  border-radius: 8px;
  background: #fff5de;
}
#modal details {
  margin-top: 16px;
}
.note-card a {
  display: inline-block;
  margin: 5px 8px 5px 0;
}
@media (max-width: 480px) {
  .mast-in .brand { gap: 6px; font-size: 1rem; }
  .mast-in .brand small { letter-spacing: .1em; font-size: .54rem; }
  .mast-in .find-link span { display: none; }
  .mast-in nav .find-link {
    padding: 6px;
    font-size: 0.83rem;
  }
}
