:root {
  --night: #15111f;
  --night-deep: #0d0b14;
  --plum: #2d1d35;
  --plum-light: #4d2f50;
  --ink: #292139;
  --paper: #f0e2c2;
  --paper-light: #faf0d8;
  --paper-dark: #d6c292;
  --gold: #d5a954;
  --gold-light: #f2db96;
  --gold-dark: #9f7132;
  --burgundy: #71354a;
  --rust: #a85042;
  --moss: #406c5e;
  --blue: #58658f;
  --violet: #71618f;
  --lavender: #b8a8ca;
  --muted: #ada3b1;
  --muted-dark: #766b7c;
  --line: rgba(239, 218, 166, 0.2);
  --dark-line: rgba(52, 39, 53, 0.18);
  --serif: "STKaiti", "KaiTi", "FangSong", "Noto Serif SC", serif;
  --book: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
  --sans: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  --hand: "STKaiti", "KaiTi", "Microsoft YaHei", sans-serif;
  --shadow-dark: 0 35px 90px rgba(0, 0, 0, 0.36);
  --shadow-paper: 0 20px 40px rgba(36, 23, 34, 0.2);
  --shell: min(calc(100% - 72px), 1220px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--night-deep);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--paper);
  background:
    radial-gradient(circle at 75% 4%, rgba(105, 76, 125, 0.24), transparent 33rem),
    radial-gradient(circle at 13% 31%, rgba(46, 94, 79, 0.12), transparent 35rem),
    linear-gradient(180deg, #171220, #0f0d17 58%, #15101c);
  font-family: var(--sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  opacity: 0.75;
  background-image:
    radial-gradient(circle at 8% 14%, #f5e4b8 0 1px, transparent 1.5px),
    radial-gradient(circle at 72% 8%, #f5e4b8 0 1px, transparent 1.4px),
    radial-gradient(circle at 91% 37%, #f5e4b8 0 1px, transparent 1.5px),
    radial-gradient(circle at 28% 63%, #f5e4b8 0 1px, transparent 1.4px),
    radial-gradient(circle at 59% 84%, #f5e4b8 0 1px, transparent 1.3px);
  background-size: 330px 330px, 470px 470px, 540px 540px, 410px 410px, 610px 610px;
  pointer-events: none;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background: radial-gradient(circle at 50% 45%, transparent 0 48%, rgba(7, 6, 12, 0.52) 100%);
  pointer-events: none;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
}

img,
svg {
  display: block;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 4px;
}

::selection {
  color: var(--night-deep);
  background: var(--gold-light);
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.page-texture {
  position: fixed;
  inset: -30%;
  z-index: 30;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  animation: grain 0.35s steps(2) infinite;
}

.magic-dust {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.magic-dust::before,
.magic-dust::after {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  content: "";
  background: var(--gold-light);
  box-shadow:
    10vw 13vh 0 -2px rgba(244, 219, 151, 0.45),
    25vw 39vh 0 -2px rgba(244, 219, 151, 0.35),
    43vw 10vh 0 -2px rgba(244, 219, 151, 0.3),
    63vw 65vh 0 -2px rgba(244, 219, 151, 0.38),
    79vw 25vh 0 -2px rgba(244, 219, 151, 0.4),
    92vw 72vh 0 -2px rgba(244, 219, 151, 0.28);
  opacity: 0.6;
  animation: dust-drift 16s ease-in-out infinite alternate;
}

.magic-dust::after {
  top: 27%;
  left: 41%;
  scale: 0.6;
  opacity: 0.3;
  animation-delay: -8s;
  animation-duration: 21s;
}

.magic-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 17px max(32px, calc((100vw - 1220px) / 2));
  border-bottom: 1px solid rgba(229, 204, 146, 0.18);
  background:
    linear-gradient(180deg, rgba(20, 15, 29, 0.96), rgba(20, 15, 29, 0.84)),
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(229, 204, 146, 0.02) 47px);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.crest-link {
  display: flex;
  gap: 11px;
  align-items: center;
}

.crest-link img {
  width: 45px;
  height: 45px;
  filter: drop-shadow(0 0 13px rgba(218, 176, 89, 0.25));
}

.crest-link span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.crest-link strong {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.crest-link small {
  margin-top: 5px;
  color: var(--muted-dark);
  font-family: "Arial", sans-serif;
  font-size: 7px;
  letter-spacing: 0.2em;
}

.desk-nav {
  display: flex;
  gap: 30px;
  align-items: center;
}

.desk-nav a {
  position: relative;
  padding-block: 7px;
  color: #c6b9c7;
  font-size: 11px;
  transition: color 0.25s ease;
}

.desk-nav a::after {
  position: absolute;
  right: 50%;
  bottom: 0;
  left: 50%;
  height: 1px;
  content: "";
  background: var(--gold-light);
  transition:
    right 0.25s ease,
    left 0.25s ease;
}

.desk-nav a:hover,
.desk-nav a.is-current {
  color: var(--gold-light);
}

.desk-nav a:hover::after,
.desk-nav a.is-current::after {
  right: 0;
  left: 0;
}

.ink-button,
.paper-button,
.danger-button {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 8px 14px 8px 14px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition:
    translate 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.ink-button {
  color: #1d1626;
  border-color: #efcf81;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 50%),
    linear-gradient(135deg, #e8ca82, #b98239);
  box-shadow:
    0 5px 0 #78522a,
    0 13px 30px rgba(0, 0, 0, 0.23);
}

.ink-button:hover {
  translate: 0 -2px;
  box-shadow:
    0 7px 0 #78522a,
    0 18px 34px rgba(0, 0, 0, 0.27);
}

.ink-button span {
  font-family: var(--serif);
  font-size: 18px;
}

.ink-button.compact {
  min-height: 38px;
  padding-inline: 17px;
  font-size: 10px;
}

.ink-button.large {
  min-height: 55px;
  padding-inline: 28px;
  font-size: 13px;
}

.paper-button {
  color: var(--ink);
  border: 1px solid #8f7145;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent),
    var(--paper-light);
  box-shadow:
    0 4px 0 #8f7145,
    0 12px 24px rgba(0, 0, 0, 0.2);
}

.paper-button:hover {
  translate: 0 -2px;
}

.danger-button {
  min-height: 38px;
  border-color: rgba(170, 70, 69, 0.45);
  color: #b76c68;
  background: transparent;
  font-size: 9px;
}

.danger-button:hover {
  color: #e6aaa0;
  border-color: rgba(215, 116, 105, 0.6);
}

.paper-link {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  padding: 5px 0;
  border: 0;
  border-bottom: 1px solid rgba(219, 183, 112, 0.38);
  color: var(--gold-light);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.paper-link span {
  transition: translate 0.2s ease;
}

.paper-link:hover span {
  translate: 3px 0;
}

.paper-link.dark {
  color: var(--burgundy);
  border-color: rgba(94, 52, 63, 0.38);
}

.eyebrow {
  margin: 0;
  color: var(--gold-light);
  font-family: "Arial", sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.eyebrow > span {
  margin-right: 7px;
  font-family: var(--serif);
}

.hero-room {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(470px, 1.08fr);
  gap: 42px;
  align-items: center;
  min-height: 100svh;
  padding-top: 115px;
  padding-bottom: 75px;
}

.hero-copy {
  position: relative;
  z-index: 4;
}

.hero-copy h1 {
  max-width: 610px;
  margin: 21px 0 22px;
  font-family: var(--serif);
  font-size: clamp(58px, 6.2vw, 89px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-shadow: 0 8px 34px rgba(0, 0, 0, 0.28);
}

.hero-copy h1 span {
  display: block;
  color: transparent;
  background: linear-gradient(115deg, #f2d89a 10%, #e7bf6f 40%, #bb8b46 82%);
  background-clip: text;
  -webkit-background-clip: text;
  filter: drop-shadow(0 4px 0 rgba(75, 45, 24, 0.22));
}

.hero-lead {
  max-width: 530px;
  margin: 0;
  color: #c7bcc8;
  font-size: 14px;
  line-height: 1.95;
}

.hero-actions {
  display: flex;
  gap: 28px;
  align-items: center;
  margin-top: 36px;
}

.tiny-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-top: 37px;
  color: #8f8494;
  font-size: 8px;
}

.tiny-rules i {
  color: var(--gold);
  font-style: normal;
}

.castle-wrap {
  position: relative;
  width: min(100%, 690px);
  aspect-ratio: 0.94;
  margin-inline: auto;
}

.castle-glow {
  position: absolute;
  top: 10%;
  right: 7%;
  width: 55%;
  height: 55%;
  border-radius: 50%;
  background: rgba(139, 112, 155, 0.16);
  filter: blur(55px);
}

.castle-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 28px 28px rgba(0, 0, 0, 0.28));
}

.castle-card {
  position: absolute;
  z-index: 4;
}

.floating-card {
  width: 165px;
  padding: 15px 16px;
  border: 2px solid #806b4e;
  border-radius: 5px 11px 6px 13px;
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg, transparent 0 17px, rgba(107, 78, 50, 0.08) 18px),
    var(--paper);
  box-shadow: var(--shadow-paper);
}

.floating-card::before {
  position: absolute;
  top: 8px;
  right: 8px;
  bottom: 8px;
  left: 8px;
  border: 1px dashed rgba(116, 77, 49, 0.28);
  border-radius: 3px 7px 4px 9px;
  content: "";
}

.floating-card span,
.floating-card strong,
.floating-card i {
  position: relative;
  z-index: 1;
  display: block;
}

.floating-card span {
  color: var(--rust);
  font-size: 7px;
}

.floating-card strong {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 18px;
}

.floating-card i {
  margin-top: 9px;
  color: #8e7455;
  font-family: "Arial", sans-serif;
  font-size: 8px;
  font-style: normal;
  text-align: right;
}

.castle-card-one {
  top: 14%;
  left: 0;
  rotate: -7deg;
  animation: bob 7s ease-in-out infinite;
}

.castle-card-two {
  top: 32%;
  right: 0;
  rotate: 6deg;
  animation: bob 8s ease-in-out -2s infinite reverse;
}

.mascot-note {
  position: absolute;
  bottom: 2%;
  left: 2%;
  z-index: 5;
  display: flex;
  gap: 12px;
  align-items: center;
  animation: bob 6s ease-in-out -4s infinite;
}

.mascot-note p {
  margin: 0;
  padding: 10px 14px;
  border: 1px solid rgba(235, 209, 154, 0.3);
  border-radius: 14px 14px 14px 3px;
  color: #e6d8d0;
  background: rgba(31, 23, 39, 0.86);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  font-family: var(--hand);
  font-size: 11px;
  line-height: 1.5;
  backdrop-filter: blur(8px);
}

.mooncat {
  position: relative;
  order: 2;
  width: 66px;
  height: 66px;
  border: 3px solid #18131f;
  border-radius: 50% 50% 43% 43%;
  background:
    radial-gradient(circle at 35% 43%, #e2b85c 0 3px, transparent 4px),
    radial-gradient(circle at 64% 43%, #e2b85c 0 3px, transparent 4px),
    linear-gradient(145deg, #62517a, #30283e);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.12);
}

.mooncat .ear {
  position: absolute;
  top: -11px;
  width: 23px;
  height: 24px;
  border: 3px solid #18131f;
  background: #59476d;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.mooncat .ear.left {
  left: 3px;
  rotate: -15deg;
}

.mooncat .ear.right {
  right: 3px;
  rotate: 15deg;
}

.mooncat .face {
  position: absolute;
  top: 41px;
  left: 50%;
  width: 12px;
  height: 7px;
  translate: -50% 0;
}

.mooncat .face::before {
  display: block;
  width: 100%;
  height: 100%;
  border-bottom: 2px solid #e2b85c;
  border-radius: 50%;
  content: "";
}

.ribbon-divider {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  min-height: 77px;
  border-block: 1px solid rgba(219, 184, 111, 0.18);
  color: #c9b8c4;
  background: rgba(47, 30, 53, 0.44);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.1em;
}

.ribbon-divider i {
  width: 70px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.ribbon-divider span {
  color: var(--gold-light);
  font-size: 10px;
}

.collection-preview,
.rooms-section {
  padding-block: 120px;
}

.room-title-row {
  display: flex;
  gap: 36px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 45px;
}

.room-title-row h2 {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-size: clamp(38px, 4vw, 55px);
  font-weight: 700;
  line-height: 1.2;
}

.room-note {
  max-width: 330px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.9;
  text-align: right;
}

.preview-deck {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  align-items: start;
  padding-inline: 16px;
}

.mini-dream-card {
  position: relative;
  min-height: 430px;
  padding: 20px;
  border: 3px solid #6f543e;
  border-radius: 7px 17px 8px 19px;
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg, transparent 0 26px, rgba(80, 55, 38, 0.055) 27px),
    var(--paper);
  box-shadow:
    8px 11px 0 rgba(15, 11, 18, 0.22),
    var(--shadow-paper);
  transition:
    translate 0.28s ease,
    rotate 0.28s ease,
    box-shadow 0.28s ease;
}

.mini-dream-card::before {
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(105, 74, 48, 0.25);
  border-radius: 4px 12px 5px 14px;
  content: "";
  pointer-events: none;
}

.preview-deck .mini-dream-card:nth-child(1) {
  rotate: -2deg;
}

.preview-deck .mini-dream-card:nth-child(2) {
  translate: 0 24px;
  rotate: 1.2deg;
}

.preview-deck .mini-dream-card:nth-child(3) {
  rotate: 2.5deg;
}

.mini-dream-card:hover {
  z-index: 3;
  translate: 0 -11px;
  rotate: 0deg;
  box-shadow:
    10px 16px 0 rgba(15, 11, 18, 0.22),
    0 28px 50px rgba(0, 0, 0, 0.28);
}

.card-number {
  position: relative;
  z-index: 2;
  color: #856842;
  font-family: "Arial", sans-serif;
  font-size: 8px;
  letter-spacing: 0.14em;
}

.mini-card-art {
  position: relative;
  height: 166px;
  margin: 14px 0 17px;
  overflow: hidden;
  border: 2px solid rgba(79, 54, 39, 0.38);
  border-radius: 4px 11px 4px 12px;
  background: #1c222c;
}

.mini-card-art::after {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at 50% 40%, transparent 0 20%, rgba(9, 9, 15, 0.32) 100%);
}

.art-lowwhisper {
  background:
    radial-gradient(circle at 70% 20%, rgba(169, 212, 181, 0.25), transparent 22%),
    linear-gradient(145deg, #263b36, #11161d);
}

.little-house {
  position: absolute;
  bottom: 26px;
  left: 50%;
  width: 110px;
  height: 74px;
  border: 3px solid #a1b6a7;
  background: #1a2423;
  translate: -50% 0;
}

.little-house::before {
  position: absolute;
  top: -46px;
  left: -12px;
  width: 128px;
  height: 50px;
  border: 3px solid #a1b6a7;
  content: "";
  background: #1a2423;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.little-house::after {
  position: absolute;
  right: 17px;
  bottom: 0;
  width: 24px;
  height: 46px;
  border: 2px solid #d6b569;
  content: "";
  background: #120f12;
}

.little-moon {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #d6c28c;
  box-shadow: 0 0 24px rgba(214, 194, 140, 0.38);
}

.wisp {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94b9a1;
  box-shadow: 0 0 17px #94b9a1;
}

.wisp.one {
  top: 44px;
  left: 33px;
}

.wisp.two {
  right: 39px;
  bottom: 34px;
}

.art-oldphone {
  background:
    radial-gradient(circle at 57% 50%, rgba(221, 174, 87, 0.25), transparent 33%),
    #1b181d;
}

.phone-frame {
  position: absolute;
  top: 21px;
  left: 50%;
  display: grid;
  width: 66px;
  height: 122px;
  place-items: center;
  border: 3px solid #c9a96b;
  border-radius: 11px;
  background: #101014;
  translate: -50% 0;
  rotate: -7deg;
}

.phone-frame::after {
  position: absolute;
  bottom: 8px;
  width: 8px;
  height: 8px;
  border: 2px solid #c9a96b;
  border-radius: 50%;
  content: "";
}

.phone-frame i {
  color: #d9b66d;
  font-family: "Arial", sans-serif;
  font-size: 9px;
  font-style: normal;
}

.orbiting-star {
  position: absolute;
  top: 23px;
  right: 43px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d8bd7e;
  box-shadow: 0 0 13px #d8bd7e;
}

.art-finalbus {
  background:
    radial-gradient(circle at 70% 18%, rgba(111, 127, 183, 0.33), transparent 31%),
    linear-gradient(180deg, #26304b, #151721);
}

.bus-window {
  position: absolute;
  bottom: 42px;
  left: 50%;
  width: 160px;
  height: 57px;
  border: 3px solid #aeb8d5;
  background: #121722;
  translate: -50% 0;
}

.bus-window::before,
.bus-window::after {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  content: "";
  background: #56627f;
}

.bus-window::before {
  left: 37%;
}

.bus-window::after {
  right: 28%;
}

.bus-lamp {
  position: absolute;
  right: 50px;
  bottom: 109px;
  width: 19px;
  height: 22px;
  border: 2px solid #d3b873;
  border-radius: 50% 50% 4px 4px;
  background: #f0d491;
  box-shadow: 0 0 22px rgba(240, 212, 145, 0.58);
}

.bus-road {
  position: absolute;
  right: 18px;
  bottom: 19px;
  left: 18px;
  height: 3px;
  background: #7784a4;
}

.mini-card-copy {
  position: relative;
  z-index: 2;
}

.mini-card-copy small {
  color: var(--burgundy);
  font-size: 8px;
}

.mini-card-copy h3 {
  margin: 8px 0 10px;
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.15;
}

.mini-card-copy p {
  margin: 0;
  color: #625362;
  font-family: var(--book);
  font-size: 10px;
  line-height: 1.85;
}

.wax-mini {
  position: absolute;
  right: 22px;
  bottom: 19px;
  z-index: 3;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 2px solid #6e2734;
  border-radius: 50%;
  color: #e9c886;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.18), transparent 22%),
    #8d3546;
  box-shadow:
    0 4px 0 #4c1c28,
    0 8px 12px rgba(71, 21, 33, 0.23);
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.room-card {
  position: relative;
  min-height: 330px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(232, 202, 138, 0.2);
  border-radius: 18px 7px 18px 7px;
  background: rgba(37, 26, 44, 0.78);
  transition:
    translate 0.25s ease,
    border-color 0.25s ease;
}

.room-card::before {
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(234, 210, 160, 0.12);
  border-radius: 12px 4px 12px 4px;
  content: "";
}

.room-card:hover {
  z-index: 2;
  translate: 0 -7px;
  border-color: rgba(230, 197, 128, 0.42);
}

.room-card small,
.room-card h3,
.room-card p,
.room-go {
  position: relative;
  z-index: 2;
}

.room-card small {
  color: var(--gold);
  font-family: "Arial", sans-serif;
  font-size: 7px;
  letter-spacing: 0.16em;
}

.room-card h3 {
  margin: 16px 0 10px;
  font-family: var(--serif);
  font-size: 28px;
}

.room-card p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.85;
}

.room-go {
  position: absolute;
  bottom: 23px;
  left: 24px;
  color: var(--gold-light);
  font-size: 9px;
}

.room-icon {
  position: relative;
  display: grid;
  width: 108px;
  height: 120px;
  margin: 8px auto 22px;
  place-items: center;
}

.room-record {
  background:
    radial-gradient(circle at 50% 10%, rgba(143, 84, 79, 0.28), transparent 38%),
    rgba(48, 30, 43, 0.85);
}

.quill {
  color: var(--paper);
  font-family: var(--serif);
  font-size: 57px;
  rotate: -22deg;
  text-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.ink-drop {
  position: absolute;
  right: 20px;
  bottom: 14px;
  width: 28px;
  height: 34px;
  border-radius: 50% 50% 50% 8px;
  background: #6f3551;
  rotate: -38deg;
}

.room-archive {
  background:
    radial-gradient(circle at 50% 12%, rgba(188, 138, 59, 0.25), transparent 37%),
    rgba(48, 36, 29, 0.88);
}

.box-icon .box-lid,
.box-icon .box-body {
  position: absolute;
  left: 50%;
  translate: -50% 0;
}

.box-icon .box-lid {
  top: 26px;
  width: 81px;
  height: 22px;
  border: 3px solid #d2ad69;
  border-radius: 5px 5px 2px 2px;
  background: #75463b;
}

.box-icon .box-body {
  top: 46px;
  width: 72px;
  height: 56px;
  border: 3px solid #d2ad69;
  background: #5c3732;
}

.box-icon .box-seal {
  position: absolute;
  top: 59px;
  left: 50%;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #e2bd73;
  background: #4d2732;
  translate: -50% 0;
}

.room-atlas {
  background:
    radial-gradient(circle at 50% 12%, rgba(92, 103, 156, 0.35), transparent 38%),
    rgba(31, 33, 53, 0.86);
}

.telescope-icon span {
  position: absolute;
  top: 30px;
  left: 17px;
  width: 78px;
  height: 21px;
  border: 3px solid #b3b8dc;
  border-radius: 5px;
  background: #3d4669;
  rotate: -32deg;
}

.telescope-icon span::before {
  position: absolute;
  top: -8px;
  right: -12px;
  width: 25px;
  height: 31px;
  border: 3px solid #b3b8dc;
  border-radius: 4px;
  content: "";
  background: #53618b;
}

.telescope-icon i,
.telescope-icon i::after {
  position: absolute;
  bottom: 17px;
  left: 52px;
  width: 4px;
  height: 58px;
  content: "";
  background: #b3b8dc;
  transform-origin: top;
}

.telescope-icon i {
  rotate: 18deg;
}

.telescope-icon i::after {
  rotate: -39deg;
}

.room-lexicon {
  background:
    radial-gradient(circle at 50% 12%, rgba(76, 119, 101, 0.3), transparent 38%),
    rgba(29, 44, 41, 0.86);
}

.book-icon span {
  width: 83px;
  height: 67px;
  border: 3px solid #d6bc82;
  border-radius: 4px 12px 5px 12px;
  background: #2d4d44;
  box-shadow: inset 12px 0 rgba(16, 42, 35, 0.36);
}

.book-icon i {
  position: absolute;
  color: #d6bc82;
  font-size: 24px;
  font-style: normal;
}

.letter-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1.15fr);
  gap: 52px;
  align-items: center;
  padding: 110px 0 130px;
}

.letter {
  position: relative;
  padding: 60px 55px;
  border: 2px solid #94734d;
  border-radius: 4px 13px 4px 16px;
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(93, 63, 39, 0.055) 29px),
    var(--paper);
  box-shadow:
    12px 15px 0 rgba(11, 8, 14, 0.2),
    var(--shadow-paper);
  rotate: -1deg;
}

.letter::before {
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(120, 82, 51, 0.26);
  border-radius: 3px 9px 3px 12px;
  content: "";
}

.letter .eyebrow {
  color: var(--burgundy);
}

.letter h2 {
  margin: 20px 0 21px;
  font-family: var(--serif);
  font-size: clamp(37px, 4vw, 54px);
  line-height: 1.28;
}

.letter > p:not(.eyebrow) {
  max-width: 550px;
  margin: 0 0 28px;
  color: #665568;
  font-family: var(--book);
  font-size: 11px;
  line-height: 2;
}

.letter-stamp {
  position: absolute;
  top: 28px;
  right: 29px;
  display: block;
  width: 54px;
  min-height: 92px;
  padding: 7px 0;
  border: 2px dashed #9b584f;
  color: #9b584f;
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
  rotate: 4deg;
}

.letter-illustration {
  position: relative;
  height: 430px;
}

.open-book {
  position: absolute;
  right: 8%;
  bottom: 30px;
  width: 82%;
  height: 220px;
}

.page {
  position: absolute;
  bottom: 0;
  width: 50%;
  height: 100%;
  border: 2px solid #9b744b;
  background:
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(88, 58, 37, 0.07) 23px),
    var(--paper-light);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.25);
}

.left-page {
  left: 0;
  border-radius: 50% 3px 15px 9px;
  transform: perspective(600px) rotateY(8deg);
  transform-origin: right;
}

.right-page {
  right: 0;
  border-radius: 3px 50% 9px 15px;
  transform: perspective(600px) rotateY(-8deg);
  transform-origin: left;
}

.book-spine {
  position: absolute;
  bottom: -5px;
  left: 50%;
  z-index: 2;
  width: 17px;
  height: 214px;
  background: #5c3d37;
  translate: -50% 0;
}

.book-star {
  position: absolute;
  top: 43%;
  left: 50%;
  z-index: 3;
  color: var(--gold);
  font-size: 28px;
  font-style: normal;
  translate: -50% 0;
  animation: twinkle 2.8s ease-in-out infinite;
}

.candle {
  position: absolute;
  top: 14px;
  left: 13%;
  z-index: 3;
}

.candle .flame {
  position: absolute;
  top: -31px;
  left: 50%;
  width: 23px;
  height: 35px;
  border-radius: 50% 50% 50% 8px;
  background: linear-gradient(#f6e4a1, #d6883e);
  box-shadow: 0 0 35px rgba(240, 193, 90, 0.46);
  translate: -50% 0;
  rotate: 45deg;
  animation: flicker 1.7s ease-in-out infinite alternate;
}

.candle .wax {
  display: block;
  width: 32px;
  height: 126px;
  border: 2px solid #8b7250;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(90deg, #d8c190, #f0e0b7, #c6aa76);
}

.candle .holder {
  display: block;
  width: 70px;
  height: 17px;
  border: 2px solid #a48452;
  border-radius: 50%;
  background: #76573c;
  translate: -19px 0;
}

.ink-bottle {
  position: absolute;
  right: 3%;
  bottom: 19px;
  width: 66px;
  height: 68px;
  border: 3px solid #80674e;
  border-radius: 10px 10px 18px 18px;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.18), transparent 22%),
    #2b2131;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.23);
}

.ink-bottle::before {
  position: absolute;
  top: -18px;
  left: 50%;
  width: 33px;
  height: 21px;
  border: 3px solid #80674e;
  content: "";
  background: #49394a;
  translate: -50% 0;
}

.magic-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 30px 46px;
  border-top: 1px solid rgba(223, 190, 124, 0.16);
  color: var(--muted-dark);
  font-size: 8px;
}

.footer-crest {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #c8b7c5;
  font-family: var(--serif);
  font-size: 13px;
}

.footer-crest img {
  width: 30px;
  height: 30px;
}

.room-dock {
  display: none;
}

.subpage {
  padding-top: 140px;
}

.page-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.62fr);
  gap: 54px;
  align-items: end;
  margin-bottom: 54px;
}

.page-heading h1 {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-size: clamp(54px, 6.4vw, 88px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.page-heading > p {
  margin: 0;
  padding: 0 0 8px 24px;
  border-left: 1px solid rgba(225, 196, 132, 0.26);
  color: var(--muted);
  font-size: 11px;
  line-height: 2;
}

.record-workspace {
  display: grid;
  grid-template-columns: minmax(400px, 0.78fr) minmax(520px, 1.22fr);
  gap: 32px;
  align-items: stretch;
  margin-bottom: 110px;
}

.scriptorium-scene {
  position: relative;
  min-height: 790px;
  overflow: hidden;
  border: 1px solid rgba(227, 196, 133, 0.21);
  border-radius: 23px 7px 23px 7px;
  background:
    radial-gradient(circle at 50% 18%, rgba(120, 94, 139, 0.24), transparent 31%),
    linear-gradient(180deg, #20172a, #17111e);
  box-shadow: var(--shadow-dark);
}

.scriptorium-scene::before {
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(222, 191, 125, 0.13);
  border-radius: 16px 4px 16px 4px;
  content: "";
  pointer-events: none;
}

.arched-window {
  position: absolute;
  top: 54px;
  left: 50%;
  width: 68%;
  height: 420px;
  overflow: hidden;
  border: 8px solid #3a2c3e;
  border-radius: 48% 48% 2px 2px;
  background:
    radial-gradient(circle at 63% 21%, rgba(241, 217, 158, 0.18), transparent 13%),
    linear-gradient(180deg, #252044, #131523 72%);
  box-shadow:
    inset 0 0 55px rgba(10, 8, 16, 0.7),
    0 0 0 3px #806944;
  translate: -50% 0;
}

.window-moon {
  position: absolute;
  top: 51px;
  right: 47px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #ead8a5;
  box-shadow: 0 0 60px rgba(234, 216, 165, 0.35);
}

.window-star {
  position: absolute;
  color: #f2d897;
}

.window-star.s1 {
  top: 71px;
  left: 45px;
  font-size: 12px;
}

.window-star.s2 {
  top: 140px;
  right: 105px;
  font-size: 9px;
}

.window-cloud {
  position: absolute;
  height: 28px;
  border-radius: 50%;
  background: rgba(138, 127, 159, 0.19);
  filter: blur(8px);
}

.window-cloud.c1 {
  top: 201px;
  left: 18px;
  width: 170px;
}

.window-cloud.c2 {
  top: 270px;
  right: 1px;
  width: 128px;
}

.window-mullion {
  position: absolute;
  background: #3a2c3e;
}

.window-mullion.vertical {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 7px;
  translate: -50% 0;
}

.window-mullion.horizontal {
  top: 53%;
  right: 0;
  left: 0;
  height: 7px;
}

.writing-desk {
  position: absolute;
  right: 8%;
  bottom: 84px;
  left: 8%;
  height: 235px;
  border: 5px solid #17101a;
  border-radius: 7px 7px 2px 2px;
  background:
    linear-gradient(90deg, transparent 0 14%, rgba(227, 188, 112, 0.08) 15% 15.5%, transparent 16% 100%),
    linear-gradient(180deg, #5b3d39, #39262e);
  box-shadow:
    inset 0 8px rgba(239, 206, 140, 0.09),
    0 30px 40px rgba(0, 0, 0, 0.32);
}

.writing-desk::before {
  position: absolute;
  top: -12px;
  right: 5px;
  left: 5px;
  height: 14px;
  border-radius: 4px;
  content: "";
  background: #826047;
}

.desk-scroll {
  position: absolute;
  top: 51px;
  left: 15%;
  width: 47%;
  height: 120px;
  border: 2px solid #9d7d55;
  border-radius: 3px 9px 3px 10px;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(0deg, transparent 0 20px, rgba(88, 58, 37, 0.08) 21px);
  rotate: -5deg;
  box-shadow: 0 13px 20px rgba(0, 0, 0, 0.22);
}

.desk-scroll span {
  position: absolute;
  left: 18px;
  height: 1px;
  background: rgba(87, 57, 40, 0.25);
}

.desk-scroll span:nth-child(1) {
  top: 39px;
  width: 70%;
}

.desk-scroll span:nth-child(2) {
  top: 61px;
  width: 51%;
}

.desk-scroll span:nth-child(3) {
  top: 83px;
  width: 61%;
}

.floating-quill {
  position: absolute;
  top: 69px;
  left: 53%;
  color: #f1e5cc;
  font-family: var(--serif);
  font-size: 65px;
  filter: drop-shadow(0 7px 9px rgba(0, 0, 0, 0.3));
  rotate: -19deg;
  animation: quill-write 4.8s ease-in-out infinite;
}

.desk-lamp {
  position: absolute;
  top: -77px;
  right: 4%;
  width: 100px;
  height: 106px;
}

.lamp-shade {
  position: absolute;
  top: 0;
  left: 13px;
  width: 74px;
  height: 45px;
  border: 3px solid #17121a;
  border-radius: 50% 50% 6px 6px;
  background: #9b6c3f;
  clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%);
}

.lamp-light {
  position: absolute;
  top: 41px;
  left: 50%;
  width: 270px;
  height: 250px;
  background: radial-gradient(ellipse at 50% 0, rgba(246, 213, 133, 0.35), transparent 64%);
  translate: -50% 0;
  pointer-events: none;
}

.lamp-stem {
  position: absolute;
  top: 45px;
  left: 50%;
  width: 6px;
  height: 61px;
  background: #a88451;
  translate: -50% 0;
}

.lamp-stem::after {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 55px;
  height: 9px;
  border-radius: 50%;
  content: "";
  background: #8a6c45;
  translate: -50% 0;
}

.potion-bottle {
  position: absolute;
  right: 12%;
  bottom: 18px;
  width: 47px;
  height: 65px;
  border: 2px solid #947b59;
  border-radius: 8px 8px 46% 46%;
  background: rgba(105, 145, 120, 0.18);
}

.potion-bottle .cork {
  position: absolute;
  top: -17px;
  left: 50%;
  width: 23px;
  height: 20px;
  border-radius: 3px;
  background: #826846;
  translate: -50% 0;
}

.potion-bottle .liquid {
  position: absolute;
  right: 4px;
  bottom: 4px;
  left: 4px;
  height: 36px;
  border-radius: 4px 4px 36% 36%;
  background: linear-gradient(#6f9a7e, #355a4b);
  box-shadow: 0 0 18px rgba(111, 154, 126, 0.3);
}

.tiny-plant {
  position: absolute;
  bottom: 19px;
  left: 7%;
  width: 55px;
  height: 59px;
}

.tiny-plant span:nth-child(1) {
  position: absolute;
  right: 7px;
  bottom: 18px;
  width: 35px;
  height: 28px;
  border-radius: 50% 10% 50% 10%;
  background: #426756;
  rotate: -24deg;
}

.tiny-plant span:nth-child(2) {
  position: absolute;
  bottom: 19px;
  left: 6px;
  width: 30px;
  height: 24px;
  border-radius: 10% 50% 10% 50%;
  background: #577a61;
  rotate: 17deg;
}

.tiny-plant span:nth-child(3) {
  position: absolute;
  bottom: 0;
  left: 18px;
  width: 24px;
  height: 25px;
  border-radius: 2px 2px 7px 7px;
  background: #7a523a;
}

.scene-caption {
  position: absolute;
  right: 10%;
  bottom: 20px;
  left: 10%;
  color: #bfb2bf;
  text-align: center;
}

.scene-caption span {
  display: block;
  font-family: var(--hand);
  font-size: 12px;
}

.scene-caption small {
  color: #776c7a;
  font-size: 8px;
}

.parchment-form {
  position: relative;
  min-width: 0;
  padding: 48px 48px 40px;
  border: 2px solid #8f7049;
  border-radius: 5px 20px 5px 19px;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 8%, rgba(146, 90, 64, 0.1), transparent 24%),
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(91, 62, 39, 0.045) 29px),
    var(--paper);
  box-shadow:
    10px 13px 0 rgba(18, 12, 20, 0.25),
    var(--shadow-paper);
}

.parchment-form::before {
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(112, 79, 50, 0.23);
  border-radius: 3px 13px 3px 12px;
  content: "";
  pointer-events: none;
}

.parchment-pin {
  position: absolute;
  top: -13px;
  width: 25px;
  height: 25px;
  border: 2px solid #5f4238;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 27%, rgba(255, 255, 255, 0.32), transparent 21%),
    #8b3f49;
  box-shadow: 0 5px 0 rgba(65, 27, 33, 0.22);
}

.pin-left {
  left: 42px;
}

.pin-right {
  right: 42px;
}

.parchment-form form {
  position: relative;
  z-index: 2;
}

.form-chapter {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.chapter-mark {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  place-items: center;
  border: 1px solid rgba(91, 55, 61, 0.36);
  border-radius: 50%;
  color: var(--burgundy);
  font-family: var(--serif);
  font-size: 14px;
}

.form-chapter label,
.chapter-label {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
}

.form-chapter small {
  display: block;
  margin-top: 2px;
  color: #806e76;
  font-size: 8px;
  font-weight: 400;
}

.parchment-form input[type="text"],
.parchment-form textarea {
  width: 100%;
  border: 1px solid rgba(102, 71, 49, 0.33);
  border-radius: 5px 12px 5px 11px;
  color: var(--ink);
  background: rgba(255, 250, 234, 0.42);
  box-shadow: inset 0 2px 8px rgba(83, 57, 38, 0.07);
}

.parchment-form input[type="text"] {
  height: 47px;
  margin-top: 13px;
  padding: 0 15px;
  font-family: var(--hand);
  font-size: 14px;
}

.parchment-form input::placeholder,
.parchment-form textarea::placeholder {
  color: #9a887d;
}

.text-chapter {
  margin-top: 30px;
}

.textarea-wrap {
  position: relative;
  margin-top: 13px;
}

.parchment-form textarea {
  min-height: 235px;
  resize: vertical;
  padding: 20px 32px 20px 20px;
  font-family: var(--hand);
  font-size: 14px;
  line-height: 1.9;
}

.margin-star {
  position: absolute;
  right: 14px;
  bottom: 14px;
  color: rgba(112, 67, 77, 0.3);
  font-size: 18px;
}

.memory-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-top: 11px;
  color: #8a7778;
  font-size: 8px;
}

.memory-prompts button {
  padding: 4px 9px;
  border: 1px solid rgba(103, 69, 52, 0.3);
  border-radius: 999px;
  color: #6e5559;
  background: transparent;
  cursor: pointer;
  font-size: 8px;
}

.memory-prompts button:hover {
  color: var(--burgundy);
  border-color: rgba(112, 53, 69, 0.48);
}

.mood-chapter {
  margin-top: 30px;
}

.mood-choices {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-top: 14px;
}

.mood-token {
  position: relative;
  display: flex;
  min-height: 112px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 1px solid rgba(103, 69, 52, 0.28);
  border-radius: 10px 4px 11px 4px;
  background: rgba(255, 251, 237, 0.42);
  cursor: pointer;
  text-align: center;
  transition:
    translate 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.mood-token input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mood-token:hover {
  translate: 0 -3px;
  border-color: rgba(107, 58, 69, 0.48);
}

.mood-token:has(input:checked) {
  border-color: var(--burgundy);
  box-shadow:
    inset 0 0 0 2px rgba(112, 53, 69, 0.12),
    0 9px 18px rgba(88, 57, 42, 0.13);
}

.mood-symbol {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 7px;
  place-items: center;
  border-radius: 50%;
  color: #f1dfb0;
  background: #6d4352;
  font-family: var(--serif);
  font-size: 16px;
}

.mood-wonder .mood-symbol {
  background: #4e5c83;
}

.mood-free .mood-symbol {
  background: #42695e;
}

.mood-token strong {
  font-family: var(--serif);
  font-size: 14px;
}

.mood-token small {
  margin-top: 2px;
  color: #8d797e;
  font-size: 7px;
}

.record-submit-row {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin-top: 31px;
  padding-top: 24px;
  border-top: 1px dashed rgba(100, 68, 50, 0.25);
}

.record-submit-row p {
  max-width: 340px;
  margin: 0;
  color: #867173;
  font-size: 8px;
  line-height: 1.8;
}

.record-submit-row p span {
  color: var(--burgundy);
}

.card-dialog,
.archive-dialog {
  width: min(1000px, calc(100vw - 36px));
  max-height: calc(100svh - 34px);
  padding: 0;
  overflow: auto;
  border: 2px solid #9c7b4e;
  border-radius: 8px 25px 8px 25px;
  color: var(--paper);
  background:
    radial-gradient(circle at 65% 13%, rgba(107, 78, 125, 0.24), transparent 31%),
    #16111f;
  box-shadow: 0 50px 140px rgba(0, 0, 0, 0.7);
}

.card-dialog::backdrop,
.archive-dialog::backdrop {
  background: rgba(7, 5, 11, 0.88);
  backdrop-filter: blur(12px);
}

.card-dialog {
  padding: 42px 54px 48px;
}

.dialog-close {
  position: absolute;
  top: 17px;
  right: 19px;
  z-index: 10;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(228, 197, 134, 0.3);
  border-radius: 50%;
  color: var(--gold-light);
  background: #21182a;
  cursor: pointer;
  font-size: 21px;
}

.card-reveal-copy {
  text-align: center;
}

.card-reveal-copy h2 {
  margin: 12px 0 8px;
  font-family: var(--serif);
  font-size: 35px;
}

.card-reveal-copy > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.reveal-layout {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 50px;
  align-items: center;
  margin-top: 30px;
}

.flip-card {
  width: 380px;
  height: 540px;
  perspective: 1300px;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card.is-flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.dream-card-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 4px solid #79583e;
  border-radius: 9px 22px 10px 24px;
  backface-visibility: hidden;
  box-shadow:
    12px 15px 0 rgba(0, 0, 0, 0.25),
    0 27px 45px rgba(0, 0, 0, 0.3);
}

.dream-card-front {
  padding: 23px;
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg, transparent 0 24px, rgba(74, 51, 36, 0.06) 25px),
    var(--paper);
}

.dream-card-front::before {
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(101, 68, 45, 0.32);
  border-radius: 5px 15px 6px 17px;
  content: "";
}

.face-corner {
  position: absolute;
  z-index: 2;
  color: rgba(103, 63, 68, 0.48);
  font-size: 12px;
}

.top-left {
  top: 14px;
  left: 15px;
}

.bottom-right {
  right: 15px;
  bottom: 14px;
}

.dream-number {
  position: relative;
  z-index: 2;
  color: #8a6a47;
  font-family: "Arial", sans-serif;
  font-size: 8px;
  letter-spacing: 0.13em;
}

.generated-art {
  position: relative;
  height: 218px;
  margin: 16px 0 18px;
  overflow: hidden;
  border: 2px solid rgba(83, 57, 40, 0.36);
  border-radius: 5px 14px 5px 15px;
  background:
    radial-gradient(circle at 68% 23%, rgba(226, 199, 134, 0.32), transparent 19%),
    linear-gradient(145deg, #243139, #141421);
  transition: background 0.4s ease;
}

.generated-moon {
  position: absolute;
  top: 24px;
  right: 30px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #d9c28a;
  box-shadow: 0 0 30px rgba(217, 194, 138, 0.38);
}

.generated-door {
  position: absolute;
  bottom: 22px;
  left: 50%;
  width: 84px;
  height: 128px;
  border: 3px solid rgba(208, 193, 160, 0.55);
  border-radius: 43px 43px 2px 2px;
  background: #13131b;
  translate: -50% 0;
}

.generated-door::after {
  position: absolute;
  right: 15px;
  bottom: 50px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  content: "";
  background: var(--gold-light);
}

.generated-star {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e9cf89;
  box-shadow: 0 0 10px #e9cf89;
}

.generated-star.a {
  top: 39px;
  left: 38px;
}

.generated-star.b {
  top: 124px;
  right: 31px;
}

.generated-star.c {
  bottom: 38px;
  left: 24px;
}

.card-mood {
  position: relative;
  z-index: 2;
  margin: 0;
  color: var(--burgundy);
  font-size: 8px;
}

.dream-card-front h3 {
  position: relative;
  z-index: 2;
  margin: 8px 0 10px;
  padding-right: 40px;
  font-family: var(--serif);
  font-size: 29px;
  line-height: 1.18;
}

.card-excerpt {
  position: relative;
  z-index: 2;
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #665466;
  font-family: var(--book);
  font-size: 9px;
  line-height: 1.85;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.card-seal {
  position: absolute;
  right: 24px;
  bottom: 22px;
  z-index: 3;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 2px solid #612734;
  border-radius: 50%;
  color: #edcf8d;
  background:
    radial-gradient(circle at 33% 26%, rgba(255, 255, 255, 0.18), transparent 22%),
    #8d3546;
  box-shadow:
    0 5px 0 #4c1c28,
    0 10px 20px rgba(70, 26, 36, 0.3);
}

.card-date {
  position: absolute;
  bottom: 27px;
  left: 25px;
  color: #957e67;
  font-family: "Arial", sans-serif;
  font-size: 7px;
}

.dream-card-back {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 42px;
  color: var(--paper);
  background:
    radial-gradient(circle at 50% 42%, rgba(143, 109, 142, 0.24), transparent 39%),
    linear-gradient(145deg, #33233d, #1a1422);
  transform: rotateY(180deg);
}

.dream-card-back::before {
  position: absolute;
  inset: 13px;
  border: 1px dashed rgba(233, 205, 144, 0.22);
  border-radius: 5px 15px 6px 17px;
  content: "";
}

.back-kicker {
  color: var(--gold);
  font-family: "Arial", sans-serif;
  font-size: 7px;
  letter-spacing: 0.17em;
}

.dream-card-back h3 {
  margin: 12px 0 22px;
  font-family: var(--serif);
  font-size: 25px;
}

.back-symbols {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
}

.back-symbols span {
  padding: 7px 12px;
  border: 1px solid rgba(231, 203, 141, 0.25);
  border-radius: 999px;
  color: #dacbd4;
  font-size: 9px;
}

.back-message {
  margin: 39px 0 0;
  color: #a99cab;
  font-family: var(--hand);
  font-size: 11px;
  line-height: 1.9;
  text-align: center;
}

.back-sign {
  position: absolute;
  bottom: 25px;
  color: #78697e;
  font-family: "Arial", sans-serif;
  font-size: 6px;
  letter-spacing: 0.2em;
}

.reveal-actions {
  display: flex;
  gap: 13px;
  align-items: center;
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  z-index: 50;
  max-width: min(520px, calc(100% - 32px));
  padding: 12px 20px;
  border: 1px solid rgba(230, 199, 136, 0.36);
  border-radius: 9px 15px 9px 15px;
  color: #e7d9cc;
  background: rgba(33, 23, 41, 0.94);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.34);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  font-size: 9px;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

[hidden] {
  display: none !important;
}

.archive-toolbar {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding: 19px 23px;
  border: 1px solid rgba(226, 194, 128, 0.18);
  border-radius: 14px 5px 14px 5px;
  background: rgba(38, 25, 45, 0.62);
}

.archive-count {
  display: flex;
  gap: 13px;
  align-items: center;
}

.count-seal {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 2px solid #6a2938;
  border-radius: 50%;
  color: #ebcc89;
  background: #8a3547;
  box-shadow: 0 4px 0 #4c1c28;
  font-family: var(--serif);
  font-size: 15px;
}

.archive-count p {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.archive-count strong {
  color: #dfd1d7;
  font-size: 10px;
  font-weight: 500;
}

.archive-count small {
  color: var(--muted-dark);
  font-size: 7px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
}

.filter-chips button {
  padding: 6px 11px;
  border: 1px solid rgba(228, 196, 130, 0.16);
  border-radius: 999px;
  color: #a99baa;
  background: transparent;
  cursor: pointer;
  font-size: 8px;
}

.filter-chips button:hover,
.filter-chips button.is-active {
  color: #19131d;
  border-color: var(--gold-light);
  background: var(--gold-light);
}

.dream-box-stage {
  position: relative;
  padding: 78px 48px 46px;
  margin-top: 20px;
}

.box-back-lid {
  position: absolute;
  top: 13px;
  right: 4%;
  left: 4%;
  height: 155px;
  border: 4px solid #241617;
  border-radius: 20px 20px 5px 5px;
  background:
    linear-gradient(90deg, transparent 0 11%, rgba(231, 195, 123, 0.07) 11.5%, transparent 12% 88%, rgba(231, 195, 123, 0.06) 88.5%, transparent 89%),
    linear-gradient(180deg, #684139, #422a2c);
  box-shadow:
    inset 0 7px rgba(237, 203, 133, 0.09),
    0 30px 50px rgba(0, 0, 0, 0.22);
  transform: perspective(800px) rotateX(7deg);
  transform-origin: bottom;
}

.box-back-lid::before,
.box-back-lid::after {
  position: absolute;
  top: 15px;
  bottom: 15px;
  width: 6px;
  content: "";
  background: #a47a45;
  box-shadow: 0 0 0 2px #2d1b1c;
}

.box-back-lid::before {
  left: 20px;
}

.box-back-lid::after {
  right: 20px;
}

.lid-rune {
  position: absolute;
  top: 73px;
  color: rgba(234, 205, 137, 0.38);
  font-family: var(--serif);
  font-size: 15px;
}

.lid-rune:nth-child(1) {
  left: 31%;
}

.lid-rune:nth-child(2) {
  left: 50%;
  font-size: 22px;
  translate: -50% 0;
}

.lid-rune:nth-child(3) {
  right: 31%;
}

.velvet-interior {
  position: relative;
  min-height: 540px;
  padding: 95px 55px 82px;
  overflow: hidden;
  border: 5px solid #281719;
  border-radius: 8px 8px 20px 20px;
  background:
    radial-gradient(ellipse at 50% 0, rgba(241, 204, 133, 0.1), transparent 44%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 6px),
    #521f35;
  box-shadow:
    inset 0 0 80px rgba(19, 8, 17, 0.56),
    0 35px 80px rgba(0, 0, 0, 0.3);
}

.velvet-interior::before {
  position: absolute;
  inset: 15px;
  border: 1px solid rgba(235, 205, 139, 0.18);
  border-radius: 6px 6px 14px 14px;
  content: "";
  pointer-events: none;
}

.box-ribbon {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 48px;
  opacity: 0.42;
  background: linear-gradient(90deg, transparent, #9b7040, transparent);
}

.left-ribbon {
  left: 17%;
}

.right-ribbon {
  right: 17%;
}

.dream-shelf {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 19px;
  align-items: start;
}

.stored-card {
  position: relative;
  min-height: 390px;
  padding: 16px;
  border: 3px solid #715038;
  border-radius: 5px 15px 6px 18px;
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg, transparent 0 25px, rgba(96, 65, 42, 0.055) 26px),
    var(--paper-light);
  box-shadow:
    7px 10px 0 rgba(22, 10, 18, 0.25),
    0 22px 35px rgba(21, 7, 18, 0.28);
  cursor: pointer;
  transition:
    translate 0.25s ease,
    rotate 0.25s ease,
    box-shadow 0.25s ease;
}

.stored-card:nth-child(3n + 1) {
  rotate: -1.8deg;
}

.stored-card:nth-child(3n + 2) {
  translate: 0 21px;
  rotate: 1.2deg;
}

.stored-card:nth-child(3n) {
  rotate: 2deg;
}

.stored-card:hover {
  z-index: 4;
  translate: 0 -8px;
  rotate: 0;
  box-shadow:
    9px 14px 0 rgba(22, 10, 18, 0.25),
    0 30px 45px rgba(21, 7, 18, 0.35);
}

.stored-card::before {
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(105, 72, 48, 0.25);
  border-radius: 3px 10px 4px 13px;
  content: "";
  pointer-events: none;
}

.stored-card-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #846849;
  font-family: "Arial", sans-serif;
  font-size: 7px;
  letter-spacing: 0.1em;
}

.private-mark {
  display: flex;
  gap: 4px;
  align-items: center;
  color: var(--burgundy);
  font-family: var(--sans);
  font-size: 7px;
  letter-spacing: 0;
}

.stored-card-art {
  position: relative;
  height: 146px;
  margin: 13px 0 15px;
  overflow: hidden;
  border: 2px solid rgba(82, 55, 40, 0.38);
  border-radius: 4px 11px 4px 12px;
  background:
    radial-gradient(circle at 67% 23%, rgba(230, 205, 151, 0.28), transparent 21%),
    linear-gradient(145deg, var(--art-a, #283b39), var(--art-b, #15151e));
}

.stored-card-art::before {
  position: absolute;
  bottom: 21px;
  left: 50%;
  width: 75px;
  height: 80px;
  border: 2px solid rgba(224, 211, 177, 0.5);
  border-radius: 38px 38px 2px 2px;
  content: "";
  background: rgba(12, 11, 17, 0.5);
  translate: -50% 0;
}

.stored-card-art::after {
  position: absolute;
  top: 23px;
  right: 25px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  content: "";
  background: rgba(230, 207, 151, 0.8);
  box-shadow: 0 0 20px rgba(230, 207, 151, 0.28);
}

.stored-art-symbol {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  color: rgba(236, 220, 184, 0.7);
  font-family: var(--serif);
  font-size: 23px;
  translate: -50% -50%;
}

.stored-copy {
  position: relative;
  z-index: 2;
}

.stored-copy small {
  color: var(--burgundy);
  font-size: 7px;
}

.stored-copy h3 {
  margin: 7px 0 8px;
  padding-right: 28px;
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.18;
}

.stored-copy p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #695768;
  font-family: var(--book);
  font-size: 9px;
  line-height: 1.8;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.stored-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 13px;
}

.stored-tags span {
  padding: 4px 7px;
  border: 1px solid rgba(103, 69, 51, 0.25);
  border-radius: 999px;
  color: #78636e;
  font-size: 7px;
}

.stored-seal {
  position: absolute;
  right: 18px;
  bottom: 17px;
  z-index: 3;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid #642533;
  border-radius: 50%;
  color: #e7c883;
  background: #8a3547;
  box-shadow:
    0 4px 0 #491b26,
    0 8px 12px rgba(62, 22, 29, 0.24);
}

.stored-date {
  position: absolute;
  bottom: 20px;
  left: 18px;
  color: #947b64;
  font-family: "Arial", sans-serif;
  font-size: 6px;
}

.empty-box {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: min(410px, 80%);
  color: #dfc8d2;
  text-align: center;
  translate: -50% -50%;
}

.empty-box > span {
  color: var(--gold-light);
  font-size: 38px;
}

.empty-box h3 {
  margin: 10px 0 5px;
  font-family: var(--serif);
  font-size: 25px;
}

.empty-box p {
  margin: 0 0 20px;
  color: #b49cae;
  font-size: 9px;
}

.box-front {
  position: relative;
  height: 104px;
  margin: 0 2%;
  border: 5px solid #241517;
  border-radius: 3px 3px 15px 15px;
  background:
    linear-gradient(90deg, transparent 0 9%, rgba(232, 191, 118, 0.07) 9.5%, transparent 10% 90%, rgba(232, 191, 118, 0.06) 90.5%, transparent 91%),
    linear-gradient(180deg, #5c3935, #3e272b);
  box-shadow:
    inset 0 5px rgba(240, 204, 124, 0.08),
    0 22px 35px rgba(0, 0, 0, 0.23);
}

.box-front::before {
  position: absolute;
  top: 13px;
  right: 20px;
  bottom: 13px;
  left: 20px;
  border: 2px solid rgba(207, 165, 94, 0.32);
  border-radius: 3px 3px 9px 9px;
  content: "";
}

.box-plate {
  position: absolute;
  top: 24px;
  left: 50%;
  padding: 6px 22px;
  border: 1px solid #ad8248;
  color: #d7b778;
  font-family: "Arial", sans-serif;
  font-size: 7px;
  line-height: 1.5;
  letter-spacing: 0.18em;
  text-align: center;
  translate: -50% 0;
}

.box-clasp {
  position: absolute;
  top: 23px;
  right: 23%;
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 2px solid #b08548;
  border-radius: 50%;
  color: #e8c97f;
  background: #392528;
}

.box-foot {
  position: absolute;
  bottom: -19px;
  width: 73px;
  height: 22px;
  border: 3px solid #201418;
  border-radius: 0 0 5px 5px;
  background: #3c2527;
}

.foot-a {
  left: 11%;
}

.foot-b {
  right: 11%;
}

.box-note {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  margin: 30px 0 110px;
  color: var(--muted-dark);
  font-size: 8px;
}

.box-note-star {
  color: var(--gold);
  font-size: 15px;
}

.box-note p {
  max-width: 580px;
  margin: 0;
  text-align: center;
}

.box-note a {
  color: var(--gold-light);
  border-bottom: 1px solid rgba(226, 194, 127, 0.28);
}

.archive-dialog {
  width: min(1000px, calc(100vw - 36px));
  padding: 48px 54px;
}

.archive-dialog-inner {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 46px;
  align-items: center;
}

.archive-card-stage {
  position: relative;
  min-height: 450px;
}

.archive-card-preview {
  position: relative;
  height: 445px;
  padding: 22px;
  overflow: hidden;
  border: 4px solid #79583e;
  border-radius: 8px 18px 9px 20px;
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg, transparent 0 25px, rgba(91, 62, 40, 0.055) 26px),
    var(--paper);
  box-shadow:
    11px 14px 0 rgba(0, 0, 0, 0.24),
    0 26px 43px rgba(0, 0, 0, 0.3);
  rotate: -2deg;
}

.archive-card-preview::before {
  position: absolute;
  inset: 9px;
  border: 1px dashed rgba(105, 71, 47, 0.26);
  border-radius: 5px 12px 6px 14px;
  content: "";
}

.archive-card-preview .stored-card-art {
  height: 230px;
}

.archive-card-preview h3 {
  margin: 13px 0 8px;
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.16;
}

.archive-card-preview p {
  margin: 0;
  color: #6b5868;
  font-family: var(--book);
  font-size: 9px;
  line-height: 1.8;
}

.archive-detail .eyebrow {
  color: var(--gold);
}

.archive-detail h2 {
  margin: 12px 0 17px;
  font-family: var(--serif);
  font-size: 43px;
  line-height: 1.15;
}

.archive-full-text {
  margin: 0;
  color: #c2b4c2;
  font-family: var(--book);
  font-size: 11px;
  line-height: 2.05;
  white-space: pre-wrap;
}

.archive-symbol-list,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 21px;
}

.archive-symbol-list span,
.tag-row span {
  padding: 5px 10px;
  border: 1px solid rgba(224, 192, 127, 0.2);
  border-radius: 999px;
  color: #c8b9c7;
  font-size: 8px;
}

.archive-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(224, 191, 127, 0.16);
  color: var(--muted-dark);
  font-size: 8px;
}

.archive-meta strong {
  color: #b9a9b8;
  font-weight: 400;
}

.archive-actions {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-top: 28px;
}

.star-room {
  display: grid;
  grid-template-columns: 0.63fr 1.42fr 0.7fr;
  gap: 23px;
  align-items: stretch;
}

.star-room-copy,
.star-detail {
  padding: 31px 27px;
  border: 1px solid rgba(226, 195, 130, 0.18);
  border-radius: 18px 6px 18px 6px;
  background: rgba(34, 24, 42, 0.7);
}

.star-room-copy h2 {
  margin: 17px 0 19px;
  font-family: var(--serif);
  font-size: 35px;
  line-height: 1.25;
}

.star-room-copy > p:not(.eyebrow),
.star-detail > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.95;
}

.star-stats {
  display: flex;
  gap: 18px;
  margin-top: 31px;
}

.star-stats div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.star-stats strong {
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 24px;
}

.star-stats span {
  color: var(--muted-dark);
  font-size: 7px;
}

.star-room-copy > .paper-link {
  margin-top: 33px;
}

.observatory {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  border: 1px solid rgba(225, 194, 128, 0.24);
  border-radius: 50% 50% 28px 28px / 17% 17% 28px 28px;
  background:
    radial-gradient(circle at 50% 52%, rgba(83, 91, 142, 0.22), transparent 43%),
    linear-gradient(180deg, #1e1d37, #12121f);
  box-shadow:
    inset 0 0 90px rgba(10, 8, 17, 0.75),
    var(--shadow-dark);
}

.observatory::before {
  position: absolute;
  inset: 11px;
  border: 1px dashed rgba(227, 196, 130, 0.15);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.dome-rings {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.dome-rings span {
  position: absolute;
  top: 51%;
  left: 50%;
  border: 1px dashed rgba(206, 187, 150, 0.11);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.dome-rings span:nth-child(1) {
  width: 67%;
  height: 67%;
}

.dome-rings span:nth-child(2) {
  width: 45%;
  height: 45%;
}

.dome-rings span:nth-child(3) {
  width: 18%;
  height: 18%;
}

.constellation-canvas {
  position: absolute;
  top: 40px;
  right: 16px;
  bottom: 35px;
  left: 16px;
}

.constellation-canvas::before {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  content: "";
  background-image:
    radial-gradient(circle at 19% 25%, #e6d097 0 1px, transparent 1.3px),
    radial-gradient(circle at 72% 71%, #e6d097 0 1px, transparent 1.3px),
    radial-gradient(circle at 41% 84%, #e6d097 0 1px, transparent 1.2px),
    radial-gradient(circle at 85% 22%, #e6d097 0 1px, transparent 1.1px),
    radial-gradient(circle at 60% 44%, #e6d097 0 1px, transparent 1.2px);
  background-size: 170px 170px, 210px 210px, 250px 250px, 190px 190px, 160px 160px;
  pointer-events: none;
}

#constellationLines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.star-node {
  position: absolute;
  z-index: 3;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--gold-light);
  background: transparent;
  cursor: pointer;
  translate: -50% -50%;
  transition: scale 0.2s ease;
}

.star-node:hover,
.star-node.is-selected {
  scale: 1.24;
}

.star-node::before {
  display: block;
  width: 10px;
  height: 10px;
  border: 1px solid #ead392;
  border-radius: 50%;
  content: "";
  background: var(--node-color, var(--gold));
  box-shadow:
    0 0 8px var(--node-color, var(--gold)),
    0 0 23px var(--node-color, var(--gold));
}

.star-node::after {
  position: absolute;
  top: 40px;
  left: 50%;
  width: 112px;
  content: attr(data-title);
  color: rgba(231, 218, 205, 0.82);
  font-family: var(--serif);
  font-size: 8px;
  line-height: 1.4;
  text-align: center;
  translate: -50% 0;
}

.atlas-center-label {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border: 1px dashed rgba(229, 203, 144, 0.3);
  border-radius: 50%;
  color: rgba(234, 213, 170, 0.55);
  font-family: var(--serif);
  font-size: 10px;
  translate: -50% -50%;
}

.atlas-tick {
  position: absolute;
  z-index: 2;
  color: rgba(231, 206, 147, 0.41);
  font-family: "Arial", sans-serif;
  font-size: 7px;
}

.tick-n {
  top: 15px;
  left: 50%;
}

.tick-s {
  bottom: 15px;
  left: 50%;
}

.tick-e {
  top: 50%;
  right: 15px;
}

.tick-w {
  top: 50%;
  left: 15px;
}

.telescope {
  position: absolute;
  right: 4%;
  bottom: 22px;
  z-index: 2;
  width: 110px;
  height: 110px;
  opacity: 0.72;
}

.scope-tube {
  position: absolute;
  top: 30px;
  left: 5px;
  width: 83px;
  height: 20px;
  border: 2px solid #ae9367;
  border-radius: 4px;
  background: #46384d;
  rotate: -31deg;
}

.scope-lens {
  position: absolute;
  top: 15px;
  right: 4px;
  width: 27px;
  height: 33px;
  border: 2px solid #ae9367;
  border-radius: 3px;
  background: #33415d;
  rotate: -31deg;
}

.scope-leg {
  position: absolute;
  bottom: 4px;
  left: 52px;
  width: 2px;
  height: 57px;
  background: #ae9367;
  transform-origin: bottom;
}

.scope-leg.a {
  rotate: 20deg;
}

.scope-leg.b {
  rotate: -21deg;
}

.scope-base {
  position: absolute;
  bottom: 0;
  left: 31px;
  width: 42px;
  height: 5px;
  border-radius: 50%;
  background: #ae9367;
}

.map-legend {
  position: absolute;
  bottom: 18px;
  left: 22px;
  z-index: 2;
  display: flex;
  gap: 16px;
  color: #8f8397;
  font-size: 7px;
}

.map-legend span {
  display: flex;
  gap: 5px;
  align-items: center;
}

.legend-star {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.legend-line {
  width: 18px;
  border-top: 1px dashed #9f91b0;
}

.star-detail {
  display: flex;
  min-height: 350px;
  flex-direction: column;
}

.star-detail-seal {
  display: grid;
  width: 47px;
  height: 47px;
  margin-bottom: 37px;
  place-items: center;
  border: 1px solid rgba(227, 195, 128, 0.27);
  border-radius: 50%;
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 21px;
}

.star-detail h3 {
  margin: 12px 0 12px;
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.2;
}

.star-detail .paper-link {
  width: fit-content;
  margin-top: auto;
}

.constellation-notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 34px 0 117px;
}

.section-note-card {
  padding: 25px;
  border: 1px solid rgba(226, 194, 128, 0.15);
  border-radius: 12px 4px 12px 4px;
  background: rgba(37, 26, 44, 0.62);
}

.note-number {
  color: var(--gold);
  font-family: "Arial", sans-serif;
  font-size: 8px;
}

.section-note-card h3 {
  margin: 14px 0 8px;
  font-family: var(--serif);
  font-size: 21px;
}

.section-note-card p {
  margin: 0;
  color: var(--muted-dark);
  font-size: 9px;
  line-height: 1.85;
}

.lexicon-room {
  display: grid;
  grid-template-columns: 0.74fr 1.4fr 0.66fr;
  gap: 17px;
  align-items: stretch;
  margin-bottom: 55px;
}

.lexicon-book,
.lexicon-pages,
.symbol-detail {
  position: relative;
  border: 1px solid rgba(225, 193, 128, 0.18);
  background: rgba(34, 24, 41, 0.7);
}

.lexicon-book {
  overflow: hidden;
  padding: 38px 29px;
  border-radius: 19px 5px 19px 5px;
  background:
    radial-gradient(circle at 50% 13%, rgba(85, 129, 107, 0.18), transparent 34%),
    rgba(28, 42, 38, 0.78);
}

.lexicon-book::after {
  position: absolute;
  top: 18px;
  right: 19px;
  bottom: 18px;
  left: 19px;
  border: 1px dashed rgba(225, 193, 128, 0.14);
  border-radius: 13px 3px 13px 3px;
  content: "";
  pointer-events: none;
}

.book-cover-mark {
  position: relative;
  z-index: 2;
  display: grid;
  width: 74px;
  height: 74px;
  margin-bottom: 33px;
  place-items: center;
  border: 1px solid rgba(224, 192, 127, 0.25);
  border-radius: 50%;
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 30px;
}

.lexicon-book .eyebrow,
.lexicon-book h2,
.lexicon-book > p,
.symbol-search,
.symbol-total {
  position: relative;
  z-index: 2;
}

.lexicon-book h2 {
  margin: 17px 0 18px;
  font-family: var(--serif);
  font-size: 31px;
  line-height: 1.35;
}

.lexicon-book > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.9;
}

.symbol-search {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-top: 27px;
  padding: 10px 12px;
  border: 1px solid rgba(224, 193, 127, 0.19);
  border-radius: 8px 14px 8px 14px;
  background: rgba(11, 14, 18, 0.24);
}

.symbol-search span {
  color: var(--gold);
}

.symbol-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #ded1d9;
  background: transparent;
  font-size: 9px;
}

.symbol-search input::placeholder {
  color: #827989;
}

.symbol-total {
  display: flex;
  gap: 9px;
  align-items: baseline;
  margin-top: 23px;
}

.symbol-total strong {
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 34px;
}

.symbol-total span {
  color: var(--muted-dark);
  font-size: 8px;
}

.lexicon-pages {
  min-height: 520px;
  padding: 28px;
  border-radius: 5px 19px 5px 19px;
  background:
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(111, 83, 55, 0.055) 32px),
    var(--paper);
  box-shadow:
    10px 13px 0 rgba(0, 0, 0, 0.2),
    var(--shadow-paper);
  color: var(--ink);
}

.lexicon-pages::before {
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(102, 69, 46, 0.23);
  border-radius: 4px 13px 4px 12px;
  content: "";
  pointer-events: none;
}

.lexicon-page-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 13px;
  border-bottom: 1px dashed rgba(98, 65, 45, 0.24);
  font-family: var(--serif);
  font-size: 17px;
}

.lexicon-page-top small {
  color: #8a7479;
  font-family: var(--sans);
  font-size: 7px;
}

.symbol-card-grid {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.symbol-tile {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 9px 14px;
  border: 1px solid rgba(99, 65, 48, 0.24);
  border-radius: 8px 3px 9px 3px;
  color: var(--ink);
  background: rgba(255, 250, 234, 0.42);
  cursor: pointer;
  transition:
    translate 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.symbol-tile:hover,
.symbol-tile.is-selected {
  translate: 0 -3px;
  border-color: rgba(113, 54, 70, 0.47);
  background: rgba(255, 251, 236, 0.8);
}

.symbol-tile strong {
  font-family: var(--serif);
  font-size: 21px;
}

.symbol-tile small {
  color: #8b767c;
  font-size: 7px;
}

.lexicon-empty {
  color: #8d787d;
  font-family: var(--hand);
  font-size: 12px;
  text-align: center;
}

.symbol-detail {
  min-height: 520px;
  padding: 32px 26px;
  border-radius: 5px 19px 5px 19px;
}

.symbol-detail .detail-symbol {
  display: grid;
  width: 97px;
  height: 97px;
  margin: 31px 0 25px;
  place-items: center;
  border: 1px solid rgba(225, 194, 129, 0.25);
  border-radius: 50%;
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 43px;
}

.symbol-detail h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 31px;
}

.symbol-meaning {
  margin: 13px 0 30px;
  color: var(--muted);
  font-family: var(--hand);
  font-size: 12px;
  line-height: 1.9;
}

.symbol-related {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-top: 18px;
  border-top: 1px solid rgba(226, 194, 127, 0.16);
}

.symbol-related > span {
  margin-bottom: 3px;
  color: var(--muted-dark);
  font-size: 8px;
}

.symbol-related a {
  color: #dbc8b2;
  font-family: var(--serif);
  font-size: 14px;
}

.symbol-related a:hover {
  color: var(--gold-light);
}

.lexicon-footer-note {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  margin-bottom: 105px;
  padding: 22px;
  border-block: 1px solid rgba(226, 194, 128, 0.14);
  color: var(--muted);
}

.lexicon-footer-note > span {
  color: var(--gold);
  font-size: 18px;
}

.lexicon-footer-note p {
  margin: 0;
  font-family: var(--hand);
  font-size: 11px;
}

.lexicon-footer-note .paper-link {
  margin-left: 25px;
}

@keyframes grain {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(2%, -1%);
  }
  50% {
    transform: translate(-1%, 2%);
  }
  75% {
    transform: translate(1%, 1%);
  }
  100% {
    transform: translate(-2%, -1%);
  }
}

@keyframes dust-drift {
  from {
    translate: 0 0;
  }
  to {
    translate: 15px -25px;
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0) rotate(-0.3deg);
  }
  50% {
    transform: translateY(-12px) rotate(0.6deg);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.35;
    scale: 0.86;
  }
  50% {
    opacity: 1;
    scale: 1.16;
  }
}

@keyframes flicker {
  0% {
    scale: 0.92 1;
    opacity: 0.82;
  }
  100% {
    scale: 1.06 1.14;
    opacity: 1;
  }
}

@keyframes quill-write {
  0%,
  100% {
    transform: translate(0, 0) rotate(-19deg);
  }
  35% {
    transform: translate(-14px, 11px) rotate(-23deg);
  }
  70% {
    transform: translate(8px, -7px) rotate(-15deg);
  }
}

@media (max-width: 1120px) {
  .hero-room {
    grid-template-columns: minmax(0, 1fr) minmax(400px, 0.87fr);
    gap: 18px;
  }

  .castle-wrap {
    transform: scale(0.95);
  }

  .record-workspace {
    grid-template-columns: minmax(350px, 0.74fr) minmax(480px, 1.26fr);
  }

  .scriptorium-scene {
    min-height: 750px;
  }

  .parchment-form {
    padding: 42px 36px 34px;
  }

  .star-room {
    grid-template-columns: 0.67fr 1.25fr;
  }

  .star-detail {
    grid-column: 1 / -1;
    min-height: 0;
    display: grid;
    grid-template-columns: auto 0.8fr 1.3fr auto;
    gap: 22px;
    align-items: center;
  }

  .star-detail-seal {
    margin-bottom: 0;
  }

  .star-detail h3 {
    margin: 8px 0;
  }

  .star-detail .tag-row {
    margin-top: 0;
  }

  .star-detail .paper-link {
    margin-top: 0;
  }

  .lexicon-room {
    grid-template-columns: 0.78fr 1.3fr;
  }

  .symbol-detail {
    grid-column: 1 / -1;
    min-height: 0;
    display: grid;
    grid-template-columns: auto 0.8fr 1.3fr 1fr;
    gap: 24px;
    align-items: center;
  }

  .symbol-detail .eyebrow {
    display: none;
  }

  .symbol-detail .detail-symbol {
    margin: 0;
  }

  .symbol-detail h3 {
    font-size: 32px;
  }

  .symbol-meaning {
    margin: 0;
  }
}

@media (max-width: 900px) {
  :root {
    --shell: calc(100% - 40px);
  }

  .magic-header {
    padding-inline: 18px;
  }

  .desk-nav {
    display: none;
  }

  .hero-room {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 135px;
    padding-bottom: 60px;
  }

  .hero-copy {
    max-width: 680px;
  }

  .castle-wrap {
    width: min(100%, 680px);
    margin-top: 10px;
  }

  .preview-deck {
    gap: 18px;
  }

  .mini-dream-card {
    min-height: 385px;
    padding: 16px;
  }

  .mini-card-copy h3 {
    font-size: 23px;
  }

  .mini-card-art {
    height: 140px;
  }

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

  .letter-section {
    grid-template-columns: 1fr;
  }

  .letter-illustration {
    width: min(100%, 650px);
    margin-inline: auto;
  }

  .page-heading {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .page-heading > p {
    max-width: 620px;
  }

  .record-workspace {
    grid-template-columns: 1fr;
  }

  .scriptorium-scene {
    min-height: 610px;
    order: 2;
  }

  .parchment-form {
    order: 1;
  }

  .dream-box-stage {
    padding-inline: 30px;
  }

  .velvet-interior {
    padding-inline: 35px;
  }

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

  .archive-toolbar {
    flex-wrap: wrap;
  }

  .archive-toolbar .filter-chips {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    padding-top: 8px;
    border-top: 1px dashed rgba(224, 191, 124, 0.13);
  }

  .archive-dialog {
    padding: 48px 35px 38px;
  }

  .archive-dialog-inner {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 28px;
  }

  .star-room {
    grid-template-columns: 1fr;
  }

  .observatory {
    min-height: 620px;
  }

  .star-detail {
    display: block;
  }

  .star-detail-seal {
    margin-bottom: 24px;
  }

  .star-detail h3 {
    margin: 12px 0;
  }

  .star-detail .tag-row {
    margin-top: 18px;
  }

  .star-detail .paper-link {
    margin-top: 28px;
  }

  .lexicon-room {
    grid-template-columns: 1fr;
  }

  .lexicon-book,
  .lexicon-pages {
    min-height: 0;
  }

  .symbol-detail {
    display: block;
  }

  .symbol-detail .eyebrow {
    display: block;
  }

  .symbol-detail .detail-symbol {
    margin: 26px 0 20px;
  }

  .symbol-meaning {
    margin: 14px 0 25px;
  }

  .lexicon-footer-note {
    flex-wrap: wrap;
  }

  .room-dock {
    position: fixed;
    right: 14px;
    bottom: 12px;
    left: 14px;
    z-index: 22;
    display: flex;
    justify-content: space-around;
    padding: 9px 6px 8px;
    border: 1px solid rgba(227, 194, 128, 0.28);
    border-radius: 10px 18px 10px 18px;
    background: rgba(24, 17, 31, 0.94);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(15px);
  }

  .room-dock a {
    display: flex;
    min-width: 47px;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    color: #918697;
    font-size: 7px;
  }

  .room-dock a span {
    color: #c8b49d;
    font-size: 16px;
  }

  .room-dock a.is-current {
    color: var(--gold-light);
  }

  .magic-footer {
    padding-bottom: 92px;
  }
}

@media (max-width: 680px) {
  :root {
    --shell: calc(100% - 30px);
  }

  .magic-header {
    padding: 13px 14px;
  }

  .crest-link img {
    width: 38px;
    height: 38px;
  }

  .crest-link strong {
    font-size: 16px;
  }

  .crest-link small {
    font-size: 6px;
  }

  .ink-button.compact {
    min-height: 35px;
    padding-inline: 12px;
    font-size: 8px;
  }

  .hero-room {
    padding-top: 117px;
  }

  .hero-copy h1 {
    margin-top: 18px;
    font-size: clamp(46px, 14vw, 66px);
  }

  .hero-lead {
    font-size: 12px;
    line-height: 1.9;
  }

  .hero-actions {
    gap: 18px;
    margin-top: 28px;
  }

  .tiny-rules {
    gap: 7px;
    margin-top: 27px;
    font-size: 7px;
  }

  .castle-wrap {
    width: 110%;
    margin-left: -5%;
  }

  .floating-card {
    width: 126px;
    padding: 11px;
  }

  .floating-card strong {
    font-size: 14px;
  }

  .castle-card-one {
    left: 2%;
  }

  .castle-card-two {
    right: 2%;
  }

  .mascot-note {
    left: 5%;
  }

  .mooncat {
    width: 52px;
    height: 52px;
  }

  .mascot-note p {
    font-size: 9px;
  }

  .ribbon-divider {
    gap: 9px;
    min-height: 63px;
    font-size: 9px;
  }

  .ribbon-divider i {
    width: 25px;
  }

  .collection-preview,
  .rooms-section {
    padding-block: 80px;
  }

  .room-title-row {
    display: block;
    margin-bottom: 30px;
  }

  .room-title-row h2 {
    font-size: 37px;
  }

  .room-title-row .paper-link,
  .room-title-row > .room-note {
    display: inline-flex;
    margin-top: 17px;
    text-align: left;
  }

  .preview-deck {
    grid-template-columns: 1fr;
    gap: 25px;
    padding-inline: 4px;
  }

  .preview-deck .mini-dream-card:nth-child(2) {
    translate: 0;
  }

  .mini-dream-card {
    min-height: 420px;
  }

  .mini-card-art {
    height: 170px;
  }

  .mini-card-copy h3 {
    font-size: 29px;
  }

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

  .room-card {
    min-height: 270px;
  }

  .letter-section {
    padding-top: 70px;
  }

  .letter {
    padding: 48px 28px 38px;
  }

  .letter h2 {
    font-size: 35px;
  }

  .letter-stamp {
    top: 18px;
    right: 17px;
    width: 42px;
    min-height: 74px;
    font-size: 9px;
  }

  .letter-illustration {
    height: 310px;
  }

  .open-book {
    height: 175px;
  }

  .book-spine {
    height: 170px;
  }

  .candle .wax {
    height: 91px;
  }

  .magic-footer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 13px;
    padding-inline: 4px;
  }

  .magic-footer p {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
  }

  .page-heading {
    margin-bottom: 35px;
  }

  .page-heading h1 {
    font-size: 54px;
  }

  .page-heading > p {
    padding-left: 15px;
    font-size: 10px;
  }

  .parchment-form {
    padding: 38px 22px 26px;
  }

  .form-chapter label,
  .chapter-label {
    font-size: 17px;
  }

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

  .record-submit-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .scriptorium-scene {
    min-height: 480px;
  }

  .arched-window {
    top: 42px;
    width: 78%;
    height: 300px;
  }

  .writing-desk {
    bottom: 64px;
    height: 190px;
  }

  .floating-quill {
    font-size: 50px;
  }

  .scene-caption {
    bottom: 19px;
  }

  .card-dialog {
    width: calc(100vw - 14px);
    max-height: calc(100svh - 14px);
    padding: 36px 16px 27px;
  }

  .card-reveal-copy h2 {
    font-size: 29px;
  }

  .reveal-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    justify-items: center;
  }

  .flip-card {
    width: min(86vw, 370px);
    height: calc(min(86vw, 370px) * 1.42);
  }

  .reveal-actions {
    width: min(86vw, 370px);
  }

  .reveal-actions button {
    flex: 1;
  }

  .archive-toolbar {
    gap: 15px;
    align-items: flex-start;
  }

  .archive-toolbar > .paper-link {
    margin-left: auto;
  }

  .dream-box-stage {
    padding: 68px 5px 38px;
  }

  .box-back-lid {
    right: 1%;
    left: 1%;
  }

  .velvet-interior {
    padding: 84px 17px 58px;
  }

  .dream-shelf {
    grid-template-columns: 1fr;
    gap: 25px;
    padding-inline: 6px;
  }

  .stored-card:nth-child(n) {
    translate: 0;
    rotate: 0;
  }

  .stored-card {
    min-height: 410px;
  }

  .box-front {
    margin-inline: 0;
  }

  .box-clasp {
    right: 12%;
  }

  .box-note {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 80px;
    padding-inline: 12px;
  }

  .box-note p {
    text-align: left;
  }

  .archive-dialog {
    width: calc(100vw - 14px);
    max-height: calc(100svh - 14px);
    padding: 42px 20px 30px;
  }

  .archive-dialog-inner {
    grid-template-columns: 1fr;
    gap: 31px;
  }

  .archive-card-stage {
    min-height: 390px;
  }

  .archive-card-preview {
    height: 385px;
  }

  .archive-card-preview .stored-card-art {
    height: 184px;
  }

  .archive-detail h2 {
    font-size: 35px;
  }

  .archive-actions {
    flex-wrap: wrap;
  }

  .observatory {
    min-height: 500px;
    border-radius: 50% 50% 20px 20px / 13% 13% 20px 20px;
  }

  .constellation-canvas {
    top: 35px;
    right: 5px;
    bottom: 25px;
    left: 5px;
  }

  .star-node::after {
    width: 82px;
    font-size: 7px;
  }

  .telescope {
    display: none;
  }

  .constellation-notes {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 80px;
  }

  .star-stats {
    gap: 12px;
  }

  .star-stats strong {
    font-size: 20px;
  }

  .lexicon-pages {
    padding: 24px 17px;
  }

  .lexicon-footer-note {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 76px;
  }

  .lexicon-footer-note .paper-link {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Account interface and friendlier reading pass */
:root {
  --serif: "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  --book: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
  --sans: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
  --hand: "KaiTi", "Microsoft YaHei UI", sans-serif;
}

body {
  font-size: 16px;
}

input,
textarea,
button {
  font-size: 16px;
}

.eyebrow {
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: 0.12em;
}

.desk-nav {
  gap: 23px;
}

.desk-nav a {
  font-size: 14px;
}

.ink-button.compact {
  font-size: 13px;
}

.hero-lead,
.page-heading > p {
  font-size: 16px;
  line-height: 1.85;
}

.hero-lead {
  color: #d4c9d4;
}

.page-heading > p {
  color: #c4b8c6;
}

.tiny-rules,
.ribbon-divider,
.mini-card-copy small,
.room-card small,
.letter-stamp {
  font-size: 12px;
}

.mini-card-copy p,
.room-card p,
.room-note,
.star-room-copy > p,
.constellation-notes p,
.lexicon-book > p:not(.eyebrow),
.lexicon-footer-note p,
.box-note p,
.letter > p:not(.eyebrow) {
  font-size: 14px;
  line-height: 1.85;
}

.paper-link,
.room-go {
  font-size: 14px;
}

.form-chapter small,
.memory-prompts,
.record-submit-row p,
.scene-caption small {
  font-size: 13px;
  line-height: 1.7;
}

.memory-prompts button {
  min-height: 34px;
  padding-inline: 12px;
  font-size: 13px;
}

.mood-token {
  min-height: 126px;
}

.mood-token strong {
  font-size: 16px;
}

.mood-token small {
  margin-top: 4px;
  font-size: 12px;
}

.scene-caption span {
  font-size: 15px;
}

.parchment-form input[type="text"],
.parchment-form textarea {
  font-size: 16px;
}

.record-submit-row p {
  color: #766267;
}

.footer-crest {
  font-size: 15px;
}

.magic-footer {
  font-size: 12px;
  line-height: 1.7;
}

.room-dock a {
  font-size: 11px;
}

.archive-count p strong,
.filter-chips button,
.archive-count p small,
.stored-card-top,
.stored-copy small,
.stored-tags span,
.stored-date,
.private-mark {
  font-size: 12px;
}

.stored-copy p {
  font-size: 14px;
}

.box-note,
.archive-detail .archive-full-text,
.archive-actions,
.symbol-related,
.symbol-tile small,
.lexicon-page-top,
.map-legend,
.star-node::after {
  font-size: 13px;
}

.account-trigger {
  display: inline-flex;
  gap: 8px;
  min-height: 42px;
  max-width: 190px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(231, 198, 127, 0.4);
  border-radius: 999px;
  color: #e7cf9d;
  background: rgba(245, 224, 174, 0.06);
  cursor: pointer;
  font-size: 14px;
  transition:
    translate 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.account-trigger:hover {
  translate: 0 -2px;
  border-color: rgba(242, 219, 150, 0.72);
  background: rgba(245, 224, 174, 0.12);
}

.account-trigger.is-signed-in {
  color: var(--paper-light);
}

.account-icon {
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 18px;
}

.account-copy {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  gap: 11px;
  align-items: center;
}

.auth-dialog {
  width: min(1020px, calc(100vw - 34px));
  max-width: none;
  max-height: calc(100svh - 30px);
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(231, 198, 127, 0.48);
  border-radius: 22px 7px 22px 7px;
  color: var(--paper);
  background: #17121f;
  box-shadow: 0 38px 110px rgba(0, 0, 0, 0.62);
}

.auth-dialog::backdrop {
  background:
    radial-gradient(circle at 50% 25%, rgba(111, 80, 125, 0.2), transparent 36rem),
    rgba(8, 6, 12, 0.82);
  backdrop-filter: blur(7px);
}

.auth-dialog .dialog-close {
  z-index: 4;
  color: var(--ink);
  background: rgba(250, 240, 216, 0.82);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.86fr) minmax(470px, 1.14fr);
  min-height: 620px;
}

.auth-story {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  justify-content: center;
  padding: 64px 50px;
  border-right: 1px solid rgba(231, 198, 127, 0.23);
  background:
    radial-gradient(circle at 50% 20%, rgba(123, 100, 155, 0.34), transparent 43%),
    radial-gradient(circle at 20% 86%, rgba(65, 111, 95, 0.2), transparent 34%),
    linear-gradient(155deg, #281d34, #15111e);
}

.auth-story::before,
.auth-story::after {
  position: absolute;
  width: 160px;
  height: 160px;
  border: 1px dashed rgba(239, 214, 160, 0.14);
  border-radius: 50%;
  content: "";
}

.auth-story::before {
  top: -70px;
  right: -60px;
}

.auth-story::after {
  bottom: -90px;
  left: -45px;
  width: 220px;
  height: 220px;
}

.auth-moon {
  display: grid;
  width: 76px;
  height: 76px;
  margin-bottom: 30px;
  place-items: center;
  border: 1px solid rgba(238, 208, 143, 0.48);
  border-radius: 50%;
  color: var(--gold-light);
  background: rgba(245, 224, 174, 0.06);
  font-family: var(--serif);
  font-size: 38px;
  box-shadow: 0 0 54px rgba(221, 185, 112, 0.15);
}

.auth-story h2 {
  margin: 20px 0;
  font-size: clamp(34px, 3.5vw, 48px);
  line-height: 1.35;
  letter-spacing: -0.03em;
}

.auth-story > p:not(.eyebrow) {
  margin: 0;
  color: #cfc2d1;
  font-size: 15px;
  line-height: 1.9;
}

.auth-promises {
  display: grid;
  gap: 8px;
  margin-top: 34px;
  color: #e0c78e;
  font-size: 13px;
}

.auth-content {
  position: relative;
  padding: 52px 54px 42px;
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg, transparent 0 29px, rgba(96, 65, 42, 0.045) 30px),
    radial-gradient(circle at 82% 8%, rgba(148, 82, 65, 0.1), transparent 25%),
    var(--paper-light);
}

.auth-tabs {
  display: inline-flex;
  gap: 5px;
  margin-bottom: 42px;
  padding: 5px;
  border: 1px solid rgba(104, 70, 50, 0.22);
  border-radius: 999px;
  background: rgba(255, 250, 234, 0.5);
}

.auth-tabs button {
  min-height: 38px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  color: #77616b;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.auth-tabs button.is-active {
  color: #fff7e8;
  background: var(--burgundy);
  box-shadow: 0 6px 15px rgba(92, 47, 62, 0.19);
}

.auth-view > h3 {
  margin: 10px 0 28px;
  color: var(--ink);
  font-size: clamp(31px, 3.2vw, 43px);
  line-height: 1.3;
}

.auth-content .eyebrow {
  color: var(--burgundy);
}

.auth-view form {
  display: grid;
  gap: 18px;
}

.auth-view label {
  display: grid;
  gap: 7px;
  color: #4f3d4b;
  font-size: 14px;
  font-weight: 700;
}

.auth-view input {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid rgba(102, 71, 49, 0.34);
  border-radius: 7px 14px 7px 14px;
  color: var(--ink);
  background: rgba(255, 252, 241, 0.7);
  box-shadow: inset 0 2px 8px rgba(83, 57, 38, 0.06);
}

.auth-view input::placeholder {
  color: #a08e88;
}

.auth-submit {
  width: 100%;
  margin-top: 7px;
}

.auth-submit:disabled,
.logout-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.auth-error {
  min-height: 24px;
  margin: -3px 0 0;
  color: #9e3f4d;
  font-size: 13px;
  line-height: 1.6;
}

.auth-note {
  margin: -4px 0 0;
  color: #806d73;
  font-size: 12px;
}

.auth-switch {
  margin: 25px 0 0;
  color: #77636e;
  font-size: 13px;
}

.auth-switch button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(112, 53, 69, 0.38);
  color: var(--burgundy);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.account-identity {
  display: flex;
  gap: 19px;
  align-items: center;
  padding: 24px;
  border: 1px solid rgba(105, 70, 51, 0.2);
  border-radius: 13px 5px 13px 5px;
  background: rgba(255, 252, 240, 0.55);
}

.account-avatar {
  display: grid;
  width: 66px;
  height: 66px;
  flex: 0 0 66px;
  place-items: center;
  border-radius: 50%;
  color: var(--paper-light);
  background: linear-gradient(145deg, var(--plum-light), var(--burgundy));
  font-family: var(--serif);
  font-size: 31px;
}

.account-identity h3 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
}

.account-identity p {
  margin: 4px 0;
  color: #735e68;
  font-size: 14px;
}

.account-identity small {
  color: #87727a;
  font-size: 12px;
}

.account-actions {
  display: flex;
  gap: 13px;
  margin-top: 27px;
}

.logout-button {
  margin-top: 28px;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid rgba(131, 65, 72, 0.35);
  color: #8b4650;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
}

.home-empty-state {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  min-height: 310px;
  padding: 48px 55px;
  border: 1px dashed rgba(231, 198, 127, 0.31);
  border-radius: 20px 7px 20px 7px;
  background:
    radial-gradient(circle at 12% 50%, rgba(123, 100, 155, 0.24), transparent 24%),
    rgba(30, 23, 39, 0.72);
}

.home-empty-moon {
  display: grid;
  width: 116px;
  height: 116px;
  place-items: center;
  border: 1px solid rgba(234, 204, 138, 0.28);
  border-radius: 50%;
  color: var(--gold-light);
  background: rgba(238, 211, 151, 0.06);
  font-family: var(--serif);
  font-size: 58px;
  box-shadow: 0 0 65px rgba(213, 169, 84, 0.12);
}

.home-empty-state h3 {
  margin: 12px 0;
  font-family: var(--serif);
  font-size: clamp(27px, 3vw, 38px);
  line-height: 1.35;
}

.home-empty-state p:not(.eyebrow) {
  max-width: 650px;
  margin: 0 0 24px;
  color: #c9becb;
  font-size: 14px;
}

.generated-mini {
  animation: none;
}

.generated-mini-art {
  display: grid;
  place-items: center;
}

.generated-mini-symbol {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 1px solid rgba(246, 226, 179, 0.38);
  border-radius: 50%;
  color: #f5e4b7;
  background: rgba(17, 15, 25, 0.25);
  font-family: var(--serif);
  font-size: 32px;
  box-shadow: 0 0 38px rgba(241, 213, 148, 0.16);
}

.card-free {
  background: #4d3544;
}

.legacy-import {
  margin-top: 18px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1120px) {
  .desk-nav {
    gap: 15px;
  }

  .desk-nav a {
    font-size: 13px;
  }

  .account-trigger {
    max-width: 150px;
  }
}

@media (max-width: 820px) {
  .auth-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .auth-story {
    min-height: 250px;
    padding: 42px 34px;
    border-right: 0;
    border-bottom: 1px solid rgba(231, 198, 127, 0.23);
  }

  .auth-moon {
    width: 55px;
    height: 55px;
    margin-bottom: 18px;
    font-size: 28px;
  }

  .auth-story h2 {
    margin: 12px 0;
    font-size: 30px;
  }

  .auth-story > p:not(.eyebrow) {
    font-size: 13px;
  }

  .auth-promises {
    display: none;
  }

  .auth-content {
    padding: 40px 30px 34px;
  }

  .auth-tabs {
    margin-bottom: 30px;
  }
}

@media (max-width: 680px) {
  .desk-nav {
    display: none;
  }

  .header-actions .ink-button.compact {
    display: none;
  }

  .account-trigger {
    min-height: 38px;
    padding-inline: 11px;
    font-size: 12px;
  }

  .account-trigger .account-icon {
    font-size: 16px;
  }

  .hero-lead,
  .page-heading > p {
    font-size: 15px;
  }

  .tiny-rules {
    font-size: 11px;
  }

  .room-dock a {
    font-size: 11px;
  }

  .room-dock a span {
    font-size: 19px;
  }

  .auth-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100svh - 16px);
    border-radius: 15px 5px 15px 5px;
  }

  .auth-story {
    display: none;
  }

  .auth-content {
    padding: 44px 20px 28px;
  }

  .auth-dialog .dialog-close {
    top: 7px;
    right: 7px;
  }

  .auth-tabs {
    width: 100%;
  }

  .auth-tabs button {
    flex: 1;
  }

  .auth-view > h3 {
    font-size: 31px;
  }

  .account-actions {
    flex-direction: column;
  }

  .home-empty-state {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 32px 24px;
    text-align: center;
  }

  .home-empty-moon {
    width: 84px;
    height: 84px;
    margin-inline: auto;
    font-size: 42px;
  }

  .home-empty-state .ink-button {
    width: 100%;
  }

  .star-node::after {
    font-size: 11px;
  }
}

@font-face {
  font-family: "ZCOOL KuaiLe Local";
  src: url("./assets/fonts/zcool-kuaile-cn-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* Expressive type, richer feelings, and the public dream forum */
:root {
  --serif: "ZCOOL KuaiLe Local", "YouYuan", "Microsoft YaHei UI", sans-serif;
  --book: "ZCOOL KuaiLe Local", "YouYuan", "Microsoft YaHei UI", sans-serif;
  --sans: "ZCOOL KuaiLe Local", "YouYuan", "Microsoft YaHei UI", sans-serif;
  --hand: "ZCOOL KuaiLe Local", "KaiTi", "Microsoft YaHei UI", sans-serif;
}

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.82;
  letter-spacing: 0.015em;
}

button,
input,
textarea {
  font-family: var(--sans);
  font-size: 17px;
}

.crest-link strong {
  font-size: 21px;
}

.crest-link small {
  font-size: 9px;
}

.desk-nav {
  gap: 15px;
}

.desk-nav a {
  font-size: 15px;
}

.ink-button,
.paper-button,
.danger-button {
  min-height: 49px;
  font-size: 15px;
}

.ink-button.compact {
  min-height: 42px;
  font-size: 14px;
}

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.09em;
}

.hero-lead,
.page-heading > p {
  font-size: 18px;
  line-height: 1.85;
}

.tiny-rules,
.ribbon-divider {
  font-size: 13px;
}

.mini-card-copy small,
.room-card small,
.letter-stamp,
.font-note {
  font-size: 13px;
}

.mini-card-copy p,
.room-card p,
.room-note,
.star-room-copy > p,
.constellation-notes p,
.lexicon-book > p:not(.eyebrow),
.lexicon-footer-note p,
.box-note p,
.letter > p:not(.eyebrow) {
  font-size: 15px;
  line-height: 1.85;
}

.paper-link,
.room-go {
  font-size: 15px;
}

.form-chapter label,
.chapter-label {
  font-size: 21px;
}

.form-chapter small,
.memory-prompts,
.record-submit-row p,
.scene-caption small {
  font-size: 14px;
  line-height: 1.7;
}

.memory-prompts button {
  min-height: 37px;
  font-size: 14px;
}

.parchment-form input[type="text"],
.parchment-form textarea {
  font-size: 18px;
  line-height: 1.8;
}

.mood-token {
  min-height: 134px;
}

.mood-token strong {
  font-size: 17px;
}

.mood-token small {
  font-size: 13px;
  line-height: 1.55;
}

.mood-tender .mood-symbol {
  background: #8a5764;
}

.mood-longing .mood-symbol {
  background: #675487;
}

.mood-lonely .mood-symbol {
  background: #4b5e7b;
}

.mood-anger .mood-symbol {
  background: #8d4942;
}

.mood-shame .mood-symbol {
  background: #795e47;
}

.mood-comfort .mood-symbol {
  background: #58734f;
}

.mood-absurd .mood-symbol {
  background: #66507f;
}

.mood-numb .mood-symbol {
  background: #5b5965;
}

.scene-caption span {
  font-size: 16px;
}

.footer-crest {
  font-size: 16px;
}

.magic-footer {
  font-size: 13px;
}

.archive-count p strong,
.filter-chips button,
.archive-count p small,
.stored-card-top,
.stored-copy small,
.stored-tags span,
.stored-date,
.private-mark {
  font-size: 13px;
}

.stored-copy p {
  font-size: 15px;
}

.box-note,
.archive-detail .archive-full-text,
.archive-actions,
.symbol-related,
.symbol-tile small,
.lexicon-page-top,
.map-legend,
.star-node::after {
  font-size: 14px;
}

.room-dock a {
  font-size: 12px;
}

.room-dock a span {
  font-size: 20px;
}

.keyword-builder {
  margin-top: 18px;
  padding: 18px 18px 16px;
  border: 1px dashed rgba(102, 69, 52, 0.3);
  border-radius: 10px 4px 10px 4px;
  background: rgba(255, 251, 238, 0.38);
}

.keyword-heading {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.keyword-heading strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.keyword-heading small {
  display: block;
  margin-top: 2px;
  color: #806e76;
  font-size: 14px;
}

.keyword-heading > button,
.keyword-add button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(103, 69, 52, 0.3);
  border-radius: 999px;
  color: #6e5559;
  background: rgba(255, 250, 234, 0.45);
  cursor: pointer;
  font-size: 14px;
}

.keyword-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
  align-items: center;
  margin-top: 14px;
}

.keyword-placeholder {
  color: #947f80;
  font-size: 14px;
}

.keyword-chip {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(111, 63, 75, 0.35);
  border-radius: 999px;
  color: #6a3547;
  background: rgba(112, 53, 69, 0.08);
  cursor: pointer;
  font-size: 14px;
}

.keyword-chip:hover {
  color: #fff8e9;
  background: var(--burgundy);
}

.keyword-add {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.keyword-add input {
  min-width: 0;
  min-height: 42px;
  flex: 1;
  padding: 0 13px;
  border: 1px solid rgba(102, 71, 49, 0.3);
  border-radius: 6px 12px 6px 12px;
  color: var(--ink);
  background: rgba(255, 250, 234, 0.46);
}

.private-mark.is-public {
  color: #9cc9be;
}

.publish-dream.is-public {
  border-color: rgba(120, 157, 138, 0.58);
  color: #d5eee5;
  background: rgba(63, 101, 88, 0.45);
}

.room-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.room-forum {
  background:
    radial-gradient(circle at 50% 12%, rgba(159, 116, 132, 0.34), transparent 38%),
    rgba(52, 31, 43, 0.9);
}

.forum-icon {
  position: relative;
  display: grid;
  width: 94px;
  height: 82px;
  place-items: center;
  color: #edc984;
  font-size: 51px;
}

.forum-icon i {
  position: absolute;
  right: 5px;
  bottom: 4px;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 2px solid #f0d89e;
  border-radius: 50%;
  color: #fff1cf;
  background: #8c4057;
  font-size: 14px;
  font-style: normal;
}

.generated-mini {
  background:
    radial-gradient(circle at 70% 8%, color-mix(in srgb, var(--mini-accent) 45%, transparent), transparent 35%),
    linear-gradient(160deg, #2b2232, #17131e);
}

.forum-heading h1 {
  background: linear-gradient(110deg, #f4dda5, #e4b969 50%, #b47e51);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.forum-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 0.38fr);
  gap: 32px;
  align-items: start;
  margin-bottom: 105px;
}

.forum-main {
  min-width: 0;
}

.forum-toolbar {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 13px 15px;
  border: 1px solid rgba(229, 199, 137, 0.2);
  border-radius: 16px 5px 16px 5px;
  background: rgba(26, 20, 34, 0.72);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.17);
  backdrop-filter: blur(13px);
}

.forum-sort-tabs {
  display: flex;
  gap: 7px;
}

.forum-sort-tabs button {
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #b8aabb;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
}

.forum-sort-tabs button.is-active {
  color: #251b2c;
  border-color: #f0d389;
  background: linear-gradient(135deg, #efd18c, #c78e44);
  box-shadow: 0 5px 0 #76502a;
}

.forum-search {
  display: flex;
  min-width: 250px;
  min-height: 44px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(226, 197, 135, 0.25);
  border-radius: 999px;
  color: #d7c6d8;
  background: rgba(255, 255, 255, 0.045);
}

.forum-search span {
  margin-right: 8px;
  color: var(--gold-light);
  font-size: 22px;
}

.forum-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #f1e3c1;
  background: transparent;
  font-size: 15px;
}

.forum-search input::placeholder {
  color: #8f8197;
}

.forum-feed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  min-height: 350px;
}

.forum-dream-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 345px;
  flex-direction: column;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(229, 199, 137, 0.22);
  border-radius: 18px 6px 18px 6px;
  background:
    radial-gradient(circle at 100% 0, rgba(133, 93, 143, 0.24), transparent 37%),
    linear-gradient(155deg, rgba(42, 31, 51, 0.96), rgba(20, 16, 27, 0.98));
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.22);
  transition:
    translate 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.forum-dream-card::after {
  position: absolute;
  right: -45px;
  bottom: -58px;
  width: 150px;
  height: 150px;
  border: 1px dashed rgba(235, 210, 155, 0.12);
  border-radius: 50%;
  content: "";
}

.forum-dream-card:hover {
  translate: 0 -4px;
  border-color: rgba(238, 208, 142, 0.48);
  box-shadow: 0 23px 45px rgba(0, 0, 0, 0.28);
}

.forum-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.forum-card-author,
.forum-author {
  display: flex;
  gap: 10px;
  align-items: center;
}

.forum-author-moon,
.author-moon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid rgba(237, 208, 144, 0.34);
  border-radius: 50%;
  color: var(--gold-light);
  background: rgba(228, 194, 125, 0.08);
  font-size: 19px;
}

.forum-card-author div,
.forum-author div {
  display: flex;
  flex-direction: column;
}

.forum-card-author strong,
.forum-author strong {
  color: #f2e2bd;
  font-size: 15px;
}

.forum-card-author small,
.forum-author small {
  color: #978a9e;
  font-size: 13px;
}

.forum-card-number,
.forum-detail-number {
  color: #a999ad;
  font-size: 13px;
}

.forum-card-body {
  position: relative;
  z-index: 1;
  display: block;
  flex: 1;
  padding: 22px 0 15px;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.forum-card-mood {
  color: #d2ad69;
  font-size: 13px;
}

.forum-card-body h2 {
  margin: 8px 0 9px;
  color: #f3dfb1;
  font-size: clamp(26px, 2.5vw, 34px);
  line-height: 1.32;
}

.forum-card-body p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #c7b9ca;
  font-size: 15px;
  line-height: 1.8;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.forum-card-tags,
.forum-detail-tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.forum-card-tags span,
.forum-detail-tags span {
  padding: 4px 10px;
  border: 1px solid rgba(226, 196, 130, 0.22);
  border-radius: 999px;
  color: #cbb997;
  background: rgba(230, 201, 139, 0.05);
  font-size: 13px;
}

.forum-card-footer {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px dashed rgba(229, 199, 137, 0.16);
}

.resonance-button,
.forum-comment-button {
  display: inline-flex;
  min-height: 39px;
  gap: 6px;
  align-items: center;
  padding: 0 13px;
  border: 1px solid rgba(226, 197, 135, 0.26);
  border-radius: 999px;
  color: #d8c6d9;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  font-size: 14px;
}

.resonance-button span {
  color: #e9c579;
  font-family: Georgia, serif;
  font-size: 21px;
}

.resonance-button em,
.forum-comment-button em {
  color: #efd393;
  font-style: normal;
}

.resonance-button.is-resonated {
  color: #ffe9b5;
  border-color: rgba(231, 191, 104, 0.58);
  background: rgba(153, 91, 104, 0.35);
}

.resonance-button.large {
  min-height: 48px;
  padding-inline: 18px;
  font-size: 15px;
}

.forum-sidebar {
  position: sticky;
  top: 105px;
  display: grid;
  gap: 18px;
}

.dream-ranking-card,
.forum-guide-card {
  padding: 24px;
  border: 1px solid rgba(231, 199, 133, 0.24);
  border-radius: 18px 6px 18px 6px;
  background:
    radial-gradient(circle at 100% 0, rgba(116, 84, 131, 0.28), transparent 36%),
    rgba(29, 22, 38, 0.87);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.ranking-heading {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  justify-content: space-between;
}

.ranking-heading h2 {
  margin: 8px 0 0;
  color: #f1ddb0;
  font-size: 28px;
  line-height: 1.35;
}

.ranking-spark {
  color: var(--gold-light);
  font-size: 25px;
  animation: twinkle 3s ease-in-out infinite;
}

.dream-ranking {
  display: grid;
  gap: 0;
  margin: 19px 0 15px;
  padding: 0;
  list-style: none;
}

.dream-ranking li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px dashed rgba(226, 196, 130, 0.15);
}

.dream-ranking li:last-child {
  border-bottom: 0;
}

.ranking-number {
  grid-row: 1 / span 2;
  color: #c89d56;
  font-size: 14px;
}

.ranking-title {
  padding: 0;
  overflow: hidden;
  border: 0;
  color: #e7d7b6;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dream-ranking li small {
  color: #94869b;
  font-size: 13px;
}

.ranking-empty {
  display: block !important;
  color: #96889d;
  font-size: 14px;
}

.ranking-rule {
  margin: 0;
  color: #897c91;
  font-size: 13px;
  line-height: 1.7;
}

.forum-guide-card {
  color: #c7b9ca;
  background:
    radial-gradient(circle at 85% 10%, rgba(85, 117, 104, 0.24), transparent 36%),
    rgba(24, 28, 31, 0.88);
}

.guide-moon {
  color: var(--gold-light);
  font-size: 34px;
}

.forum-guide-card h3 {
  margin: 10px 0;
  color: #ead9b7;
  font-size: 23px;
}

.forum-guide-card p {
  margin: 0 0 15px;
  font-size: 14px;
  line-height: 1.8;
}

.forum-empty {
  grid-column: 1 / -1;
  display: grid;
  min-height: 360px;
  place-items: center;
  align-content: center;
  padding: 44px;
  border: 1px dashed rgba(232, 201, 137, 0.27);
  border-radius: 20px 6px 20px 6px;
  background:
    radial-gradient(circle at 50% 30%, rgba(112, 91, 138, 0.2), transparent 35%),
    rgba(25, 19, 33, 0.62);
  text-align: center;
}

.forum-empty-moon {
  color: var(--gold-light);
  font-size: 62px;
}

.forum-empty h2 {
  margin: 14px 0 8px;
  color: #efddb5;
  font-size: 34px;
}

.forum-empty p {
  max-width: 480px;
  margin: 0 0 24px;
  color: #bbaec0;
  font-size: 15px;
}

.forum-loading {
  grid-column: 1 / -1;
  display: grid;
  min-height: 300px;
  place-items: center;
  align-content: center;
  color: #b7a7ba;
}

.forum-loading span {
  color: var(--gold-light);
  font-size: 48px;
  animation: twinkle 1.8s ease-in-out infinite;
}

.forum-loading p {
  font-size: 15px;
}

.forum-dialog {
  width: min(900px, calc(100vw - 28px));
  max-width: none;
  max-height: calc(100svh - 26px);
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(111, 75, 49, 0.48);
  border-radius: 20px 7px 20px 7px;
  color: var(--ink);
  background: var(--paper-light);
  box-shadow: 0 38px 105px rgba(0, 0, 0, 0.62);
}

.forum-dialog::backdrop {
  background: rgba(8, 6, 12, 0.82);
  backdrop-filter: blur(8px);
}

.forum-dialog .dialog-close {
  color: var(--ink);
  background: rgba(250, 240, 216, 0.94);
}

.forum-detail {
  padding: 52px 58px 48px;
  background:
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(93, 64, 42, 0.045) 31px),
    radial-gradient(circle at 92% 4%, rgba(131, 76, 73, 0.1), transparent 25%);
}

.forum-detail-top {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.forum-detail .author-moon {
  border-color: rgba(110, 71, 58, 0.3);
  color: #7a3f4c;
  background: rgba(109, 62, 72, 0.08);
}

.forum-detail .forum-author strong {
  color: #573f50;
}

.forum-detail .forum-author small {
  color: #8b747c;
}

.forum-detail-mood {
  margin: 27px 0 7px;
  color: var(--burgundy);
  font-size: 15px;
}

.forum-detail h2 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.25;
}

.forum-detail-text {
  margin: 0 0 22px;
  color: #5e4b59;
  font-family: var(--sans);
  font-size: 19px;
  line-height: 1.95;
  white-space: pre-wrap;
}

.forum-detail-tags span {
  color: #694d55;
  border-color: rgba(110, 72, 55, 0.25);
  background: rgba(109, 68, 67, 0.06);
}

.forum-detail-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 26px 0 32px;
  padding-bottom: 25px;
  border-bottom: 1px dashed rgba(104, 69, 49, 0.24);
}

.forum-detail-actions .resonance-button {
  color: #6d4550;
  border-color: rgba(110, 62, 71, 0.35);
  background: rgba(112, 53, 69, 0.07);
}

.forum-detail-actions .resonance-button.is-resonated {
  color: #fff8e8;
  background: var(--burgundy);
}

.forum-detail-actions .resonance-button span {
  color: #8e4458;
}

.forum-detail-actions .resonance-button.is-resonated span {
  color: #f2ce8d;
}

.comment-total {
  color: #806b74;
  font-size: 14px;
}

.comments-heading {
  display: flex;
  gap: 20px;
  align-items: baseline;
  justify-content: space-between;
}

.comments-heading h3 {
  margin: 0;
  color: #4f3948;
  font-size: 28px;
}

.comments-heading small {
  color: #8d767d;
  font-size: 13px;
}

.comment-list {
  display: grid;
  gap: 12px;
  margin: 20px 0 24px;
}

.forum-comment {
  position: relative;
  padding: 16px 18px;
  border: 1px solid rgba(105, 70, 50, 0.18);
  border-radius: 10px 4px 10px 4px;
  background: rgba(255, 252, 241, 0.56);
}

.forum-comment-head {
  display: flex;
  gap: 15px;
  align-items: baseline;
  justify-content: space-between;
}

.forum-comment-head strong {
  color: #5c394b;
  font-size: 15px;
}

.forum-comment-head time {
  color: #98848a;
  font-size: 13px;
}

.forum-comment p {
  margin: 7px 42px 0 0;
  color: #604d57;
  font-size: 15px;
  line-height: 1.8;
}

.delete-comment {
  position: absolute;
  right: 14px;
  bottom: 12px;
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid rgba(127, 63, 71, 0.3);
  color: #9a5861;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
}

.comment-empty {
  margin: 0;
  padding: 22px;
  border: 1px dashed rgba(103, 69, 50, 0.24);
  border-radius: 9px;
  color: #856f77;
  text-align: center;
  font-size: 14px;
}

.comment-compose {
  padding-top: 22px;
  border-top: 1px dashed rgba(102, 69, 50, 0.25);
}

.comment-compose form {
  display: grid;
  gap: 10px;
}

.comment-compose label {
  color: #5b414e;
  font-size: 17px;
  font-weight: 700;
}

.comment-compose textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  padding: 14px;
  border: 1px solid rgba(102, 71, 49, 0.3);
  border-radius: 7px 13px 7px 13px;
  color: var(--ink);
  background: rgba(255, 253, 245, 0.72);
  font-size: 16px;
  line-height: 1.8;
}

.comment-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.comment-form-footer > span {
  color: #907b80;
  font-size: 13px;
}

.comment-form-footer b {
  font-weight: 400;
}

.comment-login-prompt {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border: 1px dashed rgba(105, 69, 50, 0.26);
  border-radius: 10px;
}

.comment-login-prompt p {
  margin: 0;
  color: #735e68;
  font-size: 14px;
}

.auth-content .account-actions {
  flex-wrap: wrap;
}

@media (max-width: 1200px) {
  .desk-nav {
    gap: 10px;
  }

  .desk-nav a {
    font-size: 14px;
  }

  .header-actions .ink-button.compact {
    display: none;
  }

  .room-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .forum-layout {
    grid-template-columns: 1fr;
  }

  .forum-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forum-feed {
    grid-template-columns: 1fr;
  }

  .room-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  body {
    font-size: 17px;
  }

  .eyebrow {
    font-size: 12px;
  }

  .desk-nav {
    display: none;
  }

  .hero-lead,
  .page-heading > p {
    font-size: 16px;
  }

  .room-grid,
  .forum-sidebar {
    grid-template-columns: 1fr;
  }

  .forum-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .forum-sort-tabs {
    width: 100%;
  }

  .forum-sort-tabs button {
    flex: 1;
  }

  .forum-search {
    min-width: 0;
  }

  .forum-dream-card {
    min-height: 330px;
    padding: 18px;
  }

  .forum-card-body h2 {
    font-size: 30px;
  }

  .forum-card-body p {
    font-size: 15px;
  }

  .forum-dialog {
    width: calc(100vw - 14px);
    max-height: calc(100svh - 14px);
  }

  .forum-detail {
    padding: 44px 20px 30px;
  }

  .forum-detail h2 {
    font-size: 37px;
  }

  .forum-detail-text {
    font-size: 17px;
  }

  .comments-heading,
  .comment-login-prompt {
    align-items: flex-start;
    flex-direction: column;
  }

  .comment-form-footer {
    gap: 12px;
    align-items: flex-start;
    flex-direction: column;
  }

  .comment-form-footer .ink-button,
  .comment-login-prompt .ink-button {
    width: 100%;
  }

  .keyword-heading {
    flex-direction: column;
  }

  .keyword-heading > button {
    width: 100%;
  }

  .keyword-add {
    flex-direction: column;
  }

  .keyword-add button {
    min-height: 42px;
  }

  .mood-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}



