/* =========================================================
   THE SOLIS ARCHIVE • DANIELLE MARSH (NEWJEANS)
   Art Direction: "Sunlit Editorial Archive & Keepsake Atelier"
   ========================================================= */

:root {
  --bg-black: #07080a;
  --bg-deep: #0e0e13;
  --bg-card: #14141c;
  --bg-card-hover: #1b1c26;
  --bg-modal: #0f1016;
  
  --gold-primary: #f5be38;
  --gold-light: #fde8b7;
  --gold-amber: #d9822b;
  --gold-antique: #b88628;
  --gold-dim: #7a5818;
  --gold-glow: rgba(245, 190, 56, 0.26);
  --gold-border: rgba(245, 190, 56, 0.35);

  --solar-glow: radial-gradient(circle, rgba(245, 190, 56, 0.15) 0%, transparent 70%);
  
  --text-pure: #ffffff;
  --text-ivory: #fdfbf7;
  --text-secondary: #b8b3a7;
  --text-muted: #787368;
  
  --font-serif-display: 'Cinzel Decorative', 'Cormorant Garamond', serif;
  --font-serif-body: 'Cormorant Garamond', Georgia, serif;
  --font-cursive: 'Pinyon Script', cursive;
  --font-sans: 'Montserrat', sans-serif;
  
  --ease-royal: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: all 0.55s var(--ease-royal);

  /* Safe Area Boundary Insets for Responsive Viewports */
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* Reset & Base Settings */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-black);
  color: var(--text-ivory);
  font-family: var(--font-serif-body);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-antique) var(--bg-black);
}

/* Custom Sleek Luxury Scrollbar (Root Viewport) */
html::-webkit-scrollbar,
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

html::-webkit-scrollbar-track,
::-webkit-scrollbar-track {
  background: var(--bg-black);
}

html::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-antique), var(--gold-primary), var(--gold-amber));
  border-radius: 999px;
  border: 2px solid var(--bg-black);
  transition: background 0.3s ease;
}

html::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--gold-primary), var(--gold-light), var(--gold-primary));
  box-shadow: 0 0 10px var(--gold-glow);
}

html::-webkit-scrollbar-corner,
::-webkit-scrollbar-corner {
  background: var(--bg-black);
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: visible; /* Prevents body from becoming an independent duplicate scroll container */
  background: radial-gradient(circle at 50% 15%, #181418 0%, var(--bg-black) 75%);
  color: var(--text-ivory);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Prevent blue highlight blocks on drag or tap for decorative elements */
::selection {
  background: transparent;
  color: inherit;
}

::-moz-selection {
  background: transparent;
  color: inherit;
}

/* Explicitly enable text selection for all textboxes and form fields */
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

input::selection, textarea::selection {
  background: rgba(245, 190, 56, 0.45) !important;
  color: #ffffff !important;
}

input::-moz-selection, textarea::-moz-selection {
  background: rgba(245, 190, 56, 0.45) !important;
  color: #ffffff !important;
}

/* Allow fans to select and copy letters and editorial prose */
.reader-prose,
.parchment-prose,
.editorial-prose,
.card-message {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

.reader-prose::selection,
.parchment-prose::selection,
.editorial-prose::selection,
.card-message::selection {
  background: rgba(245, 190, 56, 0.35);
  color: #ffffff;
}


img {
  -webkit-user-drag: none;
  user-select: none;
}

/* Hard Lock on Entry Screen: Completely prevents background scroll before entering */
html.is-locked,
body.is-locked {
  overflow: hidden !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  overscroll-behavior: none !important;
}

/* Modal Open: Locks background scroll cleanly without collapsing document height */
body.modal-open {
  overflow: hidden !important;
}

/* Ambient Canvas */
#ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.7;
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* =========================================================
   LANGUAGE SWITCHER WIDGET
   ========================================================= */
.lang-control {
  position: fixed;
  top: 2rem;
  left: 2rem;
  z-index: 100;
}

.lang-pill {
  display: flex;
  align-items: center;
  background: rgba(18, 17, 22, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--gold-border);
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
  gap: 0.35rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: var(--transition-smooth);
}

.lang-pill:hover {
  border-color: var(--gold-primary);
  box-shadow: 0 0 18px var(--gold-glow);
}

.lang-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.lang-btn:hover {
  color: var(--text-pure);
}

.lang-btn.is-active {
  background: rgba(245, 190, 56, 0.2);
  color: var(--gold-light);
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
}

.lang-sep {
  color: var(--gold-dim);
  font-size: 0.7rem;
  user-select: none;
}

/* Korean Typography Enhancements */
html[lang="ko"] body {
  font-family: 'Noto Serif KR', var(--font-serif-body);
  word-break: keep-all;
}

html[lang="ko"] .portal-title,
html[lang="ko"] .hero-title,
html[lang="ko"] .collection-title,
html[lang="ko"] .editorial-heading,
html[lang="ko"] .modal-title,
html[lang="ko"] .card-title {
  font-family: 'Noto Serif KR', var(--font-serif-display);
  font-weight: 600;
}

/* Decouple letter and card messages from global Korean font reset */
.card-message,
.reader-prose,
.bloom-card-message,
.reader-message-body,
.card-quote,
html[lang="ko"] .card-message,
html[lang="ko"] .reader-prose,
html[lang="ko"] .bloom-card-message,
html[lang="ko"] .reader-message-body,
html[lang="ko"] .card-quote,
body.lang-ko .card-message,
body.lang-ko .reader-prose,
body.lang-ko .bloom-card-message,
body.lang-ko .reader-message-body,
body.lang-ko .card-quote,
.lang-ko .card-message,
.lang-ko .reader-prose,
.lang-ko .bloom-card-message,
.lang-ko .reader-message-body,
.lang-ko .card-quote {
  font-family: 'Cormorant Garamond', 'Cinzel', 'Nanum Myeongjo', 'Noto Serif KR', serif !important;
  font-style: italic;
}

/* =========================================================
   AUDIO CONTROLLER WIDGET
   ========================================================= */
.audio-control {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 100;
}

.audio-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(18, 17, 22, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--gold-border);
  padding: 0.5rem 1.15rem 0.5rem 0.65rem;
  border-radius: 999px;
  color: var(--text-ivory);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.audio-btn:hover {
  background: rgba(28, 25, 34, 0.9);
  border-color: var(--gold-primary);
  box-shadow: 0 0 20px var(--gold-glow);
}

.audio-disc {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, #36291a 20%, #17151a 75%);
  border: 1px solid var(--gold-antique);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--gold-primary);
  transition: transform 1s linear;
}

.audio-btn.is-playing .audio-disc {
  animation: spinRecord 5s linear infinite;
}

@keyframes spinRecord {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.audio-details {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.audio-status {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.audio-sub {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.sound-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 14px;
}

.sound-bars span {
  width: 2px;
  background-color: var(--gold-primary);
  border-radius: 2px;
  height: 4px;
  transition: height 0.2s;
}

.audio-btn.is-playing .sound-bars span:nth-child(1) { animation: soundWave 0.9s infinite alternate 0.1s; }
.audio-btn.is-playing .sound-bars span:nth-child(2) { animation: soundWave 0.9s infinite alternate 0.35s; }
.audio-btn.is-playing .sound-bars span:nth-child(3) { animation: soundWave 0.9s infinite alternate 0.2s; }
.audio-btn.is-playing .sound-bars span:nth-child(4) { animation: soundWave 0.9s infinite alternate 0.45s; }

@keyframes soundWave {
  0% { height: 3px; }
  100% { height: 14px; }
}

/* =========================================================
   THE SOLAR GATEWAY / PORTAL
   ========================================================= */
.portal-screen {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: radial-gradient(circle at center, #1b1610 0%, #08070a 70%);
  transition: opacity 1.2s var(--ease-royal), transform 1.2s var(--ease-royal), visibility 1.2s;
  padding: 5rem 1.5rem 3rem 1.5rem;
  padding-top: max(5rem, calc(4rem + env(safe-area-inset-top, 0px)));
  padding-bottom: max(3rem, calc(2rem + env(safe-area-inset-bottom, 0px)));
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
}

.portal-screen::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.portal-screen.is-unlocked {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.06);
  pointer-events: none;
}

.portal-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 720px;
  width: 100%;
  margin: auto 0;
  position: relative;
}

.portal-house-tag {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  color: var(--gold-light);
  margin-bottom: 0.85rem;
  opacity: 0.9;
}

.portal-title {
  font-family: var(--font-serif-display);
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--text-pure);
  text-shadow: 0 0 35px rgba(245, 190, 56, 0.2);
  margin-bottom: 0.6rem;
  line-height: 1.2;
}

.portal-subtitle em {
  font-family: var(--font-serif-body);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 2.25rem;
}

/* Solar Rings & Astrolabe */
.portal-emblem-wrap {
  position: relative;
  width: 250px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.celestial-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.ring-outer.solar-corona {
  width: 230px;
  height: 230px;
  border: 1px dashed rgba(245, 190, 56, 0.45);
  animation: rotateClockwise 35s linear infinite;
  box-shadow: 0 0 30px rgba(245, 190, 56, 0.12);
}

.ring-inner.solar-astrolabe {
  width: 180px;
  height: 180px;
  border: 1px solid rgba(245, 190, 56, 0.25);
  animation: rotateCounterClockwise 25s linear infinite;
}

@keyframes rotateClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes rotateCounterClockwise {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

/* Center Solar Wax Seal */
.seal-medallion.solar-seal {
  position: relative;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: radial-gradient(circle, #f9c755 0%, #c88828 60%, #684210 100%);
  border: 2px solid #fef3d4;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 40px rgba(245, 190, 56, 0.55), inset 0 0 15px rgba(0, 0, 0, 0.6);
  transition: transform 0.4s var(--ease-royal), box-shadow 0.4s ease;
  outline: none;
}

.seal-medallion.solar-seal:hover, .seal-medallion.solar-seal:focus-visible {
  transform: scale(1.1);
  box-shadow: 0 0 55px rgba(254, 232, 178, 0.75), inset 0 0 10px rgba(0, 0, 0, 0.35);
}

.seal-relief {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #382405;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.45), -1px -1px 0 rgba(0, 0, 0, 0.4);
}

.seal-sunflower {
  font-size: 1.15rem;
  line-height: 1;
  margin-top: 2px;
  filter: drop-shadow(0 0 4px rgba(245, 190, 56, 0.6));
}

.seal-initials {
  font-family: var(--font-serif-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

/* Prompt */
.portal-prompt {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  cursor: default;
  pointer-events: none;
}

.prompt-main {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--gold-light);
  animation: breatheGlow 3s ease-in-out infinite alternate;
}

.prompt-sub {
  font-family: var(--font-sans);
  font-size: 0.64rem;
  letter-spacing: 0.25em;
  color: var(--text-muted);
}

@keyframes breatheGlow {
  0% { opacity: 0.65; text-shadow: 0 0 0 rgba(245, 190, 56, 0); }
  100% { opacity: 1; text-shadow: 0 0 18px rgba(245, 190, 56, 0.55); }
}

/* =========================================================
   MAIN ARCHIVE SANCTUARY
   ========================================================= */
.archive-main {
  opacity: 0;
  display: none;
  transition: opacity 1.4s var(--ease-royal);
}

.archive-main.is-visible {
  opacity: 1;
  display: block;
}

/* =========================================================
   HERO PALACE SOLARIUM
   ========================================================= */
.palace-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem;
  background-color: #07080a;
  background-image: 
    radial-gradient(ellipse at center, rgba(38, 26, 15, 0.35) 0%, rgba(7, 8, 10, 0.9) 85%),
    url('assets/images/palace_hero.jpg');
  background-size: cover;
  background-position: center 30%;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 8, 10, 0.6) 0%, rgba(7, 8, 10, 0.92) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
}

.hero-collection-tag {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  color: var(--gold-primary);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: var(--font-serif-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-pure);
  line-height: 1.15;
  margin-bottom: 1.75rem;
  text-shadow: 0 4px 35px rgba(0, 0, 0, 0.85);
}

.hero-poetic-quote {
  font-family: var(--font-serif-body);
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 720px;
  margin: 0 auto 2.25rem auto;
}

/* Dual-Action Hero Navigation Row */
.hero-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.15rem;
  margin: 0 auto 3rem auto;
  max-width: 600px;
  width: 100%;
}

.hero-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.65rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  outline: none;
  text-decoration: none;
}

.hero-action-btn .btn-text {
  letter-spacing: inherit;
}

.hero-action-btn .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-primary);
  line-height: 1;
}

.hero-action-btn .btn-icon svg {
  display: block;
}

.hero-action-btn .btn-arrow {
  font-family: inherit;
  font-size: 1.05rem;
  line-height: 1;
  transition: transform 0.25s ease;
}

.hero-action-btn:hover .btn-arrow {
  transform: translateX(3px);
}

.hero-btn-secondary {
  background: rgba(18, 20, 26, 0.45);
  border: 1px solid rgba(229, 169, 59, 0.28);
  color: var(--text-secondary);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-btn-secondary:hover {
  background: rgba(229, 169, 59, 0.1);
  border-color: rgba(229, 169, 59, 0.6);
  color: var(--text-pure);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.hero-btn-primary {
  background: linear-gradient(135deg, rgba(34, 25, 16, 0.85) 0%, rgba(18, 14, 10, 0.95) 100%);
  border: 1px solid #e5a93b;
  color: var(--gold-light);
  box-shadow: 0 4px 20px rgba(229, 169, 59, 0.18), inset 0 1px 0 rgba(255, 235, 175, 0.15);
}

.hero-btn-primary:hover {
  border-color: #ffd768;
  color: var(--text-pure);
  background: linear-gradient(135deg, rgba(46, 33, 20, 0.92) 0%, rgba(26, 19, 13, 0.98) 100%);
  box-shadow: 0 0 24px rgba(229, 169, 59, 0.42), 0 4px 24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 235, 175, 0.3);
  transform: translateY(-1px);
}

.hero-action-btn:focus-visible {
  outline: 2px solid var(--gold-primary);
  outline-offset: 3px;
}

@media (max-width: 480px) {
  .hero-actions-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 0 0.5rem;
    margin-top: 20px;
    margin-bottom: 1.5rem;
  }

  .hero-action-btn {
    width: 100%;
    max-width: 240px;
    padding: 8px 14px;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    border-radius: 999px;
    gap: 0.45rem;
  }

  .hero-action-btn .btn-icon svg {
    width: 14px;
    height: 14px;
  }

  .hero-action-btn .btn-arrow {
    font-size: 0.75rem;
  }

  .scroll-indicator,
  .explore-atelier-indicator {
    display: none !important;
  }
}

.scroll-indicator {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--gold-light);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transition: var(--transition-smooth);
}

.scroll-indicator:hover {
  color: var(--text-pure);
  transform: translateY(3px);
}

.scroll-arrow {
  font-size: 1.2rem;
  animation: floatDown 2s infinite ease-in-out;
}

@keyframes floatDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* =========================================================
   EDITORIAL STORY / THE ART OF WARMTH
   ========================================================= */
.editorial-story {
  padding: 9rem 0 6rem 0;
  position: relative;
  background: linear-gradient(180deg, var(--bg-black) 0%, var(--bg-deep) 50%, var(--bg-black) 100%);
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 5rem;
  align-items: center;
}

/* Framed Portrait with Fine Archival Mounts */
.story-portrait-frame {
  position: relative;
  padding: 1rem;
  background: rgba(20, 20, 28, 0.65);
  border: 1px solid rgba(245, 190, 56, 0.22);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
}

.corner-accent {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--gold-primary);
  pointer-events: none;
}

.corner-accent.tl { top: -2px; left: -2px; border-top: 2px solid; border-left: 2px solid; }
.corner-accent.tr { top: -2px; right: -2px; border-top: 2px solid; border-right: 2px solid; }
.corner-accent.bl { bottom: -2px; left: -2px; border-bottom: 2px solid; border-left: 2px solid; }
.corner-accent.br { bottom: -2px; right: -2px; border-bottom: 2px solid; border-right: 2px solid; }

.portrait-photo-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.portrait-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s var(--ease-royal);
  filter: brightness(0.92) contrast(1.05);
}

.story-portrait-frame:hover .portrait-photo-wrap img {
  transform: scale(1.03);
}

.portrait-caption {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  color: var(--gold-primary);
  text-align: center;
  margin-top: 0.9rem;
}

/* Editorial Typography */
.story-text-column {
  padding-left: 1rem;
}

.editorial-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  color: var(--gold-light);
  display: block;
  margin-bottom: 1rem;
}

.editorial-heading {
  font-family: var(--font-serif-display);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 400;
  line-height: 1.25;
  color: var(--text-pure);
  margin-bottom: 2rem;
}

.editorial-prose {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.85;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  margin-bottom: 2.5rem;
}

.prose-lead {
  font-size: 1.35rem;
  font-style: italic;
  color: var(--text-ivory);
  line-height: 1.6;
}

.story-signature-block {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(245, 190, 56, 0.2);
  padding-top: 1.5rem;
  max-width: 320px;
}

.signature-name {
  font-family: var(--font-cursive);
  font-size: 2.8rem;
  color: var(--gold-light);
  line-height: 1;
}

.signature-role {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.25rem;
}

/* Interlude Break */
.story-break-interlude {
  text-align: center;
  margin-top: 8rem;
  padding: 2rem 0;
}

.interlude-quote {
  font-family: var(--font-serif-body);
  font-size: 1.75rem;
  font-style: italic;
  color: var(--text-pure);
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.interlude-sub {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: var(--gold-primary);
}

/* =========================================================
   THE SOLIS COLLECTION GALLERY
   ========================================================= */
.royal-collection {
  padding: 6rem 0 10rem 0;
  position: relative;
}

.collection-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 4rem auto;
}

.collection-prefix {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  color: var(--gold-primary);
  display: block;
  margin-bottom: 0.75rem;
}

.collection-title {
  font-family: var(--font-serif-display);
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-pure);
  margin-bottom: 1rem;
}

.collection-lead {
  font-family: var(--font-serif-body);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* Exhibition View Switcher Pill */
.collection-view-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(18, 18, 26, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(245, 190, 56, 0.25);
  border-radius: 999px;
  padding: 0.35rem;
  gap: 0.4rem;
}

.view-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition-smooth);
}

.view-btn .view-icon {
  font-size: 0.85rem;
  color: var(--gold-primary);
}

.view-btn:hover {
  color: var(--text-pure);
}

.view-btn.is-active {
  background: rgba(245, 190, 56, 0.18);
  color: var(--gold-light);
  border: 1px solid var(--gold-primary);
  box-shadow: 0 0 15px var(--gold-glow);
}

/* =========================================================
   MODE 1: ASYMMETRIC SALON WALL (DEFAULT UNIQUE PLACEMENT)
   ========================================================= */
.view-salon .collection-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4rem 2.5rem;
  align-items: start;
}

/* 12-Column Grid Spans */
.view-salon .span-4 { grid-column: span 4; }
.view-salon .span-5 { grid-column: span 5; }
.view-salon .span-6 { grid-column: span 6; }
.view-salon .span-7 { grid-column: span 7; }
.view-salon .span-8 { grid-column: span 8; }

/* Staggered Vertical Offsets (Salon Hanging) */
.view-salon .offset-none { margin-top: 0; }
.view-salon .offset-down-sm { margin-top: 2.5rem; }
.view-salon .offset-down-md { margin-top: 5rem; }
.view-salon .offset-down-lg { margin-top: 7rem; }
.view-salon .offset-up-sm { margin-top: -2.5rem; }

/* Aspect Ratios tailored for each piece */
.portrait-tall .card-img-container { aspect-ratio: 9 / 13; }
.portrait-classic .card-img-container { aspect-ratio: 3 / 4; }
.portrait-square .card-img-container { aspect-ratio: 1 / 1; }
.landscape-wide .card-img-container { aspect-ratio: 16 / 9; }
.landscape-gentle .card-img-container { aspect-ratio: 16 / 11; }

/* =========================================================
   MODE 2: THE PROMENADE (HORIZONTAL RUNWAY CAROUSEL)
   ========================================================= */
.view-promenade .collection-grid {
  display: flex;
  gap: 2.5rem;
  overflow-x: auto;
  padding: 3rem 1.5rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-primary) rgba(20, 20, 28, 0.6);
}

.view-promenade .collection-grid::-webkit-scrollbar {
  height: 6px;
}

.view-promenade .collection-grid::-webkit-scrollbar-track {
  background: rgba(18, 18, 24, 0.8);
  border-radius: 999px;
}

.view-promenade .collection-grid::-webkit-scrollbar-thumb {
  background: var(--gold-primary);
  border-radius: 999px;
  box-shadow: 0 0 10px var(--gold-glow);
}

.view-promenade .archive-card {
  flex: 0 0 380px;
  scroll-snap-align: center;
  margin-top: 0 !important;
}

.view-promenade .card-img-container {
  aspect-ratio: 3 / 4 !important;
}

/* =========================================================
   CARD DETAIL STYLING (CURATOR MARGINALIA & CORNERS)
   ========================================================= */
.archive-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid rgba(245, 190, 56, 0.2);
  padding: 1.15rem;
  cursor: pointer;
  transition: transform 0.5s var(--ease-royal), box-shadow 0.5s var(--ease-royal), border-color 0.5s ease;
  overflow: hidden;
}

.archive-card:hover, .archive-card:focus-visible {
  transform: translateY(-8px);
  background: var(--bg-card-hover);
  border-color: var(--gold-primary);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8), 0 0 25px var(--gold-glow);
  outline: none;
}

/* Card Top Bar with Korean Tag & Monogram Badge */
.card-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(245, 190, 56, 0.12);
}

.card-korean-tag {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--gold-antique);
}

.card-badge {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: rgba(14, 14, 20, 0.9);
  backdrop-filter: blur(4px);
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold-light);
}

/* Image Container */
.card-img-container {
  position: relative;
  overflow: hidden;
  margin-bottom: 1.25rem;
  background: #000;
}

.card-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.75s var(--ease-royal), filter 0.75s ease;
  filter: brightness(0.9) contrast(1.05);
}

.archive-card:hover .card-img-container img {
  transform: scale(1.05);
  filter: brightness(1) contrast(1.08);
}

.card[data-id="elegance"] img,
.archive-card[data-id="elegance"] .card-img-container img,
.archive-card[data-id="5"] .card-img-container img {
  object-fit: cover;
  object-position: center 15%;
}

.card-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(0, 0, 0, 0.75) 100%);
  pointer-events: none;
}

.card-curator-stamp {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--gold-light);
  background: rgba(10, 10, 14, 0.7);
  backdrop-filter: blur(6px);
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  border: 1px solid rgba(245, 190, 56, 0.2);
}

/* Card Meta Content */
.card-meta {
  display: flex;
  flex-direction: column;
}

.card-serial {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  color: var(--gold-primary);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.card-title {
  font-family: var(--font-serif-display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-pure);
  margin-bottom: 0.45rem;
  letter-spacing: 0.04em;
}

.card-desc {
  font-family: var(--font-serif-body);
  font-size: 0.98rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* =========================================================
   IMMERSIVE EXHIBITION MODAL
   ========================================================= */
.exhibition-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s;
  padding: 1.5rem;
}

.exhibition-modal.is-active {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.94);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.modal-window {
  position: relative;
  z-index: 10;
  max-width: 980px;
  width: 100%;
  background: var(--bg-modal);
  border: 1px solid var(--gold-border);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.92), 0 0 40px var(--gold-glow);
  padding: 2.5rem;
  transform: scale(0.96);
  transition: transform 0.45s var(--ease-royal);
}

.exhibition-modal.is-active .modal-window {
  transform: scale(1);
}

.modal-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--gold-primary);
  pointer-events: none;
}

.modal-corner.tl { top: -2px; left: -2px; border-top: 2px solid; border-left: 2px solid; }
.modal-corner.tr { top: -2px; right: -2px; border-top: 2px solid; border-right: 2px solid; }
.modal-corner.bl { bottom: -2px; left: -2px; border-bottom: 2px solid; border-left: 2px solid; }
.modal-corner.br { bottom: -2px; right: -2px; border-bottom: 2px solid; border-right: 2px solid; }

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(245, 190, 56, 0.3);
  background: rgba(20, 20, 28, 0.65);
  color: var(--gold-light);
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-close-btn:hover {
  background: var(--gold-primary);
  color: var(--bg-black);
  border-color: var(--gold-primary);
}

.modal-content-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.modal-visual-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #000;
  overflow: hidden;
  border: 1px solid rgba(245, 190, 56, 0.25);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
}

.modal-visual-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-info-column {
  display: flex;
  flex-direction: column;
}

.modal-initial-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--gold-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 1.25rem;
  background: rgba(245, 190, 56, 0.1);
}

.modal-serial {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  color: var(--gold-primary);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.modal-title {
  font-family: var(--font-serif-display);
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--text-pure);
  line-height: 1.2;
}

.modal-divider {
  width: 50px;
  height: 1px;
  background: var(--gold-primary);
  margin: 1.25rem 0;
  opacity: 0.6;
}

.modal-description {
  font-family: var(--font-serif-body);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.modal-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.modal-nav-btn {
  background: transparent;
  border: 1px solid var(--gold-border);
  color: var(--gold-light);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-nav-btn:hover {
  background: var(--gold-primary);
  color: var(--bg-black);
  border-color: var(--gold-primary);
}

.modal-counter {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.modal-shortcut-hint {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* =========================================================
   EPILOGUE / SUNSET ATELIER
   ========================================================= */
.archive-epilogue {
  padding: 10rem 0 5rem 0;
  background: linear-gradient(180deg, var(--bg-black) 0%, #040507 100%);
  text-align: center;
  border-top: 1px solid rgba(245, 190, 56, 0.15);
}

.epilogue-inner {
  max-width: 720px;
  margin: 0 auto;
}

.epilogue-seal {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.epilogue-seal-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  filter: drop-shadow(0 4px 18px rgba(245, 190, 56, 0.45));
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.epilogue-seal-img:hover {
  transform: scale(1.1) rotate(6deg);
}

.epilogue-tag {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  color: var(--gold-antique);
  margin-bottom: 1.2rem;
}

.epilogue-title {
  font-family: var(--font-serif-display);
  font-size: clamp(2.8rem, 5vw, 4.4rem);
  font-weight: 400;
  color: var(--text-pure);
  line-height: 1.15;
}

.epilogue-cursive {
  font-family: var(--font-cursive);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  color: var(--gold-light);
  margin-top: -0.5rem;
  margin-bottom: 2.5rem;
}

.epilogue-statement {
  font-family: var(--font-serif-body);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

/* Fan Curator / X Account Badge */
.curator-profile-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 3.5rem;
  padding: 0 1rem;
}

.curator-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: linear-gradient(135deg, rgba(28, 22, 17, 0.85) 0%, rgba(14, 12, 10, 0.95) 100%);
  border: 1px solid rgba(245, 190, 56, 0.3);
  border-radius: 40px;
  padding: 0.85rem 1.6rem 0.85rem 0.95rem;
  text-decoration: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 20px rgba(245, 190, 56, 0.08);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 540px;
  width: 100%;
  text-align: left;
}

.curator-card:hover {
  border-color: rgba(245, 190, 56, 0.75);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.85), 0 0 35px rgba(245, 190, 56, 0.25);
  transform: translateY(-3px) scale(1.015);
}

.curator-avatar-frame {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #f5be38 0%, #b8860b 50%, #4a3608 100%);
  box-shadow: 0 4px 14px rgba(245, 190, 56, 0.35);
}

.curator-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  background: #111;
}

.curator-sparkle {
  position: absolute;
  bottom: -3px;
  right: -5px;
  font-size: 0.85rem;
  filter: drop-shadow(0 0 4px rgba(245, 190, 56, 0.85));
}

.curator-details {
  flex-grow: 1;
  min-width: 0;
}

.curator-top-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.15rem;
}

.curator-role {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-antique);
}

.curator-x-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  opacity: 0.9;
}

.curator-id-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  line-height: 1.2;
}

.curator-name {
  font-family: var(--font-serif-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-pure);
  letter-spacing: 0.02em;
}

.curator-handle {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--gold-light);
  opacity: 0.95;
}

.curator-bio {
  font-family: var(--font-serif-body);
  font-size: 0.86rem;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 0.2rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.curator-cta {
  flex-shrink: 0;
}

.curator-cta-text {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  padding: 0.42rem 0.9rem;
  border-radius: 20px;
  background: rgba(245, 190, 56, 0.1);
  border: 1px solid rgba(245, 190, 56, 0.22);
  transition: all 0.3s ease;
  display: inline-block;
  white-space: nowrap;
}

.curator-card:hover .curator-cta-text {
  background: var(--gold-primary);
  color: #0c0a08;
  border-color: var(--gold-primary);
  transform: translateX(3px);
  box-shadow: 0 0 15px rgba(245, 190, 56, 0.45);
}

@media (max-width: 600px) {
  .curator-card {
    flex-direction: column;
    text-align: center;
    border-radius: 20px;
    padding: 1.5rem 1.25rem;
    gap: 0.9rem;
  }
  .curator-top-line,
  .curator-id-row {
    justify-content: center;
  }
  .curator-bio {
    white-space: normal;
  }
}

/* =========================================================
   GATEWAY TO THE SUNFLOWER WISH GARDEN (garden.html)
   ========================================================= */
.garden-gateway-section {
  padding: 2.5rem 0 4rem 0;
  position: relative;
  z-index: 10;
}

.garden-gateway-card {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  padding: 1.8rem 2.4rem;
  background: radial-gradient(circle at 15% 50%, rgba(245, 190, 56, 0.12) 0%, rgba(16, 17, 24, 0.85) 70%);
  border: 1px solid rgba(245, 190, 56, 0.35);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text-ivory);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(245, 190, 56, 0.15);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.garden-gateway-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.garden-gateway-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold-primary);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 35px var(--gold-glow);
}

.garden-gateway-card:hover::before {
  opacity: 1;
}

.gateway-bloom-icon {
  font-size: 2.8rem;
  filter: drop-shadow(0 2px 10px rgba(245, 190, 56, 0.5));
  animation: gentlePulse 3s infinite ease-in-out alternate;
  flex-shrink: 0;
}

.gateway-text-content {
  flex-grow: 1;
}

.gateway-eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-antique);
  margin-bottom: 0.25rem;
}

.gateway-title {
  font-family: var(--font-serif-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-pure);
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.gateway-desc {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.5;
}

.gateway-arrow {
  font-size: 1.6rem;
  color: var(--gold-primary);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.garden-gateway-card:hover .gateway-arrow {
  transform: translateX(6px);
}

@media (max-width: 640px) {
  .garden-gateway-card {
    padding: 1.4rem 1.2rem;
    gap: 1.2rem;
  }
  .gateway-bloom-icon {
    font-size: 2.2rem;
  }
  .gateway-title {
    font-size: 1.2rem;
  }
  .gateway-desc {
    font-size: 0.85rem;
  }
}

.epilogue-footer-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  border-top: 1px solid rgba(245, 190, 56, 0.1);
  padding-top: 2.5rem;
}

.back-to-top {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-light);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.back-to-top:hover {
  color: var(--text-pure);
  transform: translateY(-3px);
}

.copyright-note {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

/* Portal Keepsake: Sleek Frosted-Gold Pill Button */
.portal-tribute-wrap {
  margin-top: 1.15rem;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 10;
}

.portal-tribute-btn {
  background: rgba(22, 17, 13, 0.72);
  border: 1px solid rgba(245, 190, 56, 0.45);
  color: var(--gold-light);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45rem 1.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), 0 0 12px rgba(245, 190, 56, 0.2);
  transition: all 0.3s ease;
}

.portal-tribute-btn:hover {
  background: rgba(45, 34, 22, 0.85);
  border-color: rgba(245, 190, 56, 0.8);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.7), 0 0 20px rgba(245, 190, 56, 0.4);
}

.portal-tribute-btn:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

.portal-tribute-text {
  display: inline-block;
  line-height: 1;
}

/* Modal 3D Floating Envelope Stage & Reveal Transition */
.tribute-modal-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tribute-envelope-stage {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4.5rem 1.5rem 1.5rem;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: visible !important;
}

.tribute-modal-container.is-active:not(.letter-revealed) .tribute-envelope-stage {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  animation: envelopeModalGlideIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tribute-modal-container.letter-revealed .tribute-envelope-stage {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-24px) scale(0.92);
  position: absolute;
}

@keyframes envelopeModalGlideIn {
  0% {
    opacity: 0;
    transform: translateY(28px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.envelope-stage-close {
  position: absolute;
  top: 1rem;
  right: 0.5rem;
  z-index: 15;
  background: rgba(90, 60, 20, 0.08);
  border: 1px solid rgba(191, 160, 104, 0.4);
  color: #3b2a1a;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  transition: all 0.25s ease;
}

.envelope-stage-close:hover {
  background: rgba(90, 60, 20, 0.16);
  border-color: #bfa068;
  color: #1e150d;
  transform: scale(1.05);
}

/* Modal Envelope Wrapper & Responsive Geometry */
.portal-envelope-wrapper,
.modal-envelope-wrapper {
  margin: 0;
  display: flex;
  justify-content: center;
  position: relative;
  overflow: visible !important;
  --env-w: 240px;
  --env-h: 142px;
  --env-flap-h: 82px;
  --seal-size: 54px;
}

@media (max-width: 640px) {
  .portal-envelope-wrapper,
  .modal-envelope-wrapper {
    --env-w: min(82vw, 210px);
    --env-h: calc(var(--env-w) * 0.59);
    --env-flap-h: calc(var(--env-w) * 0.35);
    --seal-size: 50px;
  }
}

@media (max-width: 480px) {
  .portal-envelope-wrapper,
  .modal-envelope-wrapper {
    --env-w: min(82vw, 185px);
    --env-h: calc(var(--env-w) * 0.59);
    --env-flap-h: calc(var(--env-w) * 0.35);
    --seal-size: 48px;
  }
}

.portal-sealed-envelope {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  outline: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  overflow: visible !important;
}

.portal-sealed-envelope:focus-visible .envelope-body {
  outline: 2px solid var(--gold-light);
  outline-offset: 4px;
}

.envelope-body {
  position: relative;
  width: var(--env-w);
  height: var(--env-h);
  perspective: 900px;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: visible !important;
}

.portal-sealed-envelope:hover .envelope-body,
.portal-sealed-envelope:focus-visible .envelope-body {
  transform: translateY(-3px) scale(1.02);
}

.portal-sealed-envelope:hover .envelope-deckled-edge {
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.72), 0 0 26px rgba(245, 190, 56, 0.35);
}

.portal-sealed-envelope:not(.is-opening):hover .envelope-wax-seal,
.portal-sealed-envelope:not(.is-opening):focus-visible .envelope-wax-seal {
  transform: translate(-50%, -50%) rotate(4deg) scale(1.06) translateZ(9px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.85), 0 0 20px rgba(245, 190, 56, 0.45);
}

/* Aged rustic deckled edges and vignette drop shadow */
.envelope-deckled-edge {
  position: absolute;
  inset: -3px;
  border-radius: 6px 8px 7px 6px / 7px 6px 8px 6px;
  background: radial-gradient(circle at 50% 50%, rgba(245, 215, 165, 0.2) 0%, rgba(95, 60, 25, 0.4) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 0 14px rgba(112, 70, 32, 0.35);
  pointer-events: none;
  z-index: 1;
  transform: translateZ(0px);
  transition: box-shadow 0.38s ease;
}

/* Back interior parchment wall with faint cursive script */
.envelope-back-wall {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  overflow: hidden;
  z-index: 2;
  background: linear-gradient(135deg, #f2e2c8 0%, #e2cba1 50%, #cfaa76 100%);
  box-shadow: inset 0 0 22px rgba(105, 68, 32, 0.3);
  transform: translateZ(0px);
}

.envelope-script-texture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.85;
}

/* Folded letter sheet tucked inside the pocket */
.envelope-letter-sheet {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 8px;
  height: calc(var(--env-h) - 22px);
  border-radius: 2px;
  background: linear-gradient(180deg, #fbf4e2 0%, #f4e8cb 100%);
  border: 1px solid #d4be94;
  box-shadow: 0 -2px 8px rgba(90, 60, 20, 0.15);
  z-index: 3;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform: translateZ(2px);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  opacity: 1;
  will-change: transform;
  transition: transform 0.58s cubic-bezier(0.22, 1, 0.36, 1);
}

.envelope-sheet-heading {
  width: 36%;
  height: 4px;
  background: rgba(115, 83, 50, 0.35);
  border-radius: 2px;
  margin-bottom: 2px;
}

.envelope-sheet-line {
  width: 100%;
  height: 2px;
  background: repeating-linear-gradient(180deg, transparent, transparent 8px, rgba(115, 83, 50, 0.28) 8px, rgba(115, 83, 50, 0.28) 10px);
  border-radius: 1px;
}

.envelope-sheet-line.short {
  width: 58%;
}

.envelope-sheet-line.medium {
  width: 82%;
}

/* Overlapping triangular side and bottom front folds */
.envelope-pocket-front {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  clip-path: polygon(0 0, 50% 48%, 100% 0, 100% 100%, 0 100%);
  background: linear-gradient(to top, #d8bc92 0%, #e4cca9 60%, #ecdbbf 100%);
  filter: drop-shadow(0 -3px 5px rgba(45, 25, 10, 0.2));
  box-shadow: inset 0 -1px 3px rgba(85, 52, 22, 0.35);
  transform: translateZ(4px);
}

/* Top triangular folding flap */
.envelope-top-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--env-flap-h);
  display: block;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: linear-gradient(180deg, #edd7b4 0%, #ddc094 85%, #d1ae7f 100%);
  transform-origin: top;
  transform-style: preserve-3d;
  transform: translateZ(6px);
  will-change: transform;
  transition: transform 0.62s cubic-bezier(0.4, 0, 0.2, 1), z-index 0.01s linear 0.3s;
  filter: drop-shadow(0 4px 8px rgba(35, 18, 8, 0.42));
  z-index: 5;
}

.envelope-flap-crease {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(70, 40, 15, 0.25);
}

/* Glossy 3D Crimson Wax Seal */
.envelope-wax-seal {
  position: absolute;
  top: var(--env-flap-h);
  left: 50%;
  width: var(--seal-size);
  height: var(--seal-size);
  min-width: 48px;
  min-height: 48px;
  transform: translate(-50%, -50%) translateZ(8px);
  z-index: 6;
  border-radius: 49% 51% 52% 48% / 51% 48% 52% 49%;
  background: radial-gradient(circle at 34% 30%, #db293d 0%, #a81322 45%, #6a0711 85%, #42040b 100%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.75), inset 0 2px 3px rgba(255, 230, 200, 0.45), inset 0 -3px 6px rgba(55, 0, 8, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  transition: transform 0.62s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.38s ease, opacity 0.38s ease;
}

.wax-seal-relief {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--seal-size) - 14px);
  height: calc(var(--seal-size) - 14px);
  border-radius: 50%;
  border: 1.2px solid rgba(255, 220, 160, 0.55);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.65), 0 1px 2px rgba(255, 255, 255, 0.2);
}

.wax-seal-crest {
  color: rgba(255, 225, 170, 0.9);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.85));
}

/* Prompt Hint Pill below Envelope */
.envelope-label-hint {
  margin-top: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
  background: rgba(22, 17, 13, 0.68);
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(245, 190, 56, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: all 0.3s ease;
}

.portal-sealed-envelope:hover .envelope-label-hint {
  background: rgba(38, 28, 18, 0.85);
  border-color: rgba(245, 190, 56, 0.75);
  color: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.65), 0 0 14px rgba(245, 190, 56, 0.3);
}

.envelope-hint-icon {
  font-size: 0.68rem;
  color: var(--gold);
}

/* 3D Unfolding and Reveal Sequence States */
.portal-sealed-envelope.is-opening .envelope-top-flap {
  transform: rotateX(180deg) translateZ(0px);
  background: #e8d7b3;
  box-shadow: inset 0 -4px 12px rgba(115, 83, 50, 0.25);
  z-index: 1;
  filter: drop-shadow(0 -4px 8px rgba(35, 18, 8, 0.3));
}

.portal-sealed-envelope.is-opening .envelope-wax-seal {
  transform: translate(-50%, calc(-50% - 2 * var(--env-flap-h))) rotate(-8deg) translateZ(0px);
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65), 0 0 16px rgba(219, 41, 61, 0.35);
  z-index: 1;
}

.portal-sealed-envelope.is-opening .envelope-letter-sheet {
  transform: translateY(-56px) translateZ(2px);
  opacity: 1;
  z-index: 2;
}

.portal-sealed-envelope.is-opening .envelope-pocket-front {
  transform: translateZ(4px);
  z-index: 3;
}

/* Revealed Vintage Aged Parchment Letter Window */
.tribute-modal-container:not(.letter-revealed) .tribute-letter-window {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.tribute-modal-container.letter-revealed .tribute-letter-window {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
  animation: letterWindowExpand 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes letterWindowExpand {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.94);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tribute-letter-window {
  background: radial-gradient(circle at 50% 45%, #fbf4df 0%, #f6e9c8 70%, #ebd7ab 100%);
  border: 1px solid #c4a97b;
  outline: 1px dashed rgba(160, 120, 60, 0.35);
  outline-offset: -7px;
  border-radius: 8px;
  box-shadow: inset 0 0 55px rgba(139, 94, 38, 0.22), inset 0 0 12px rgba(100, 65, 20, 0.28), 0 25px 60px rgba(0, 0, 0, 0.6);
  color: #2c2219;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 620px;
  max-height: 84vh;
  max-height: 84dvh;
  display: flex;
  flex-direction: column;
}

.tribute-header {
  background: transparent;
  border-bottom: 1px solid rgba(191, 160, 104, 0.35);
  position: relative;
  z-index: 2;
  padding: 1.8rem 2.2rem 1.1rem;
  text-align: center;
  flex-shrink: 0;
}

.tribute-badge {
  background: rgba(191, 160, 104, 0.2);
  border: 1px solid #a8864a;
  color: #42301c;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.24rem 0.75rem;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 0.65rem;
}

.tribute-title {
  color: #3b2a1a;
  font-family: var(--font-serif-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.tribute-subtitle {
  color: #3b2a1a;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
}

.tribute-scroll-body,
.tribute-letter-body {
  color: #2c2219;
  font-family: var(--font-serif-body, 'Cinzel', serif);
  font-size: 0.95rem;
  line-height: 1.8;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 1.6rem 2.2rem;
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  scrollbar-width: thin;
  scrollbar-color: #bfa068 rgba(244, 232, 203, 0.5);
}

.tribute-scroll-body::-webkit-scrollbar,
.tribute-letter-body::-webkit-scrollbar {
  width: 6px;
}

.tribute-scroll-body::-webkit-scrollbar-track,
.tribute-letter-body::-webkit-scrollbar-track {
  background: transparent;
}

.tribute-scroll-body::-webkit-scrollbar-thumb,
.tribute-letter-body::-webkit-scrollbar-thumb {
  background: #bfa068;
  border-radius: 4px;
}

@media (max-width: 640px) {
  .tribute-letter-window {
    max-height: 82vh;
    max-height: 82dvh;
    width: 92vw;
    margin: auto;
    border-radius: 8px;
  }
  .tribute-header {
    padding: 1.4rem 1.4rem 0.9rem;
  }
  .tribute-title {
    font-size: 1.35rem;
  }
  .tribute-scroll-body {
    padding: 1.1rem 1.25rem;
    font-size: 0.9rem;
    line-height: 1.68;
  }
  .tribute-notice-card,
  .tribute-notice-box {
    padding: 0.9rem 1rem;
    margin: 1rem 0;
  }
  .tribute-footer {
    padding: 0.8rem 1.2rem 1.1rem;
  }
}

.tribute-greeting {
  font-family: var(--font-serif-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e150d;
  margin-bottom: 0.85rem;
  letter-spacing: 0.02em;
}

.tribute-text {
  margin-bottom: 0.95rem;
  color: #2c2219;
}

/* Inlaid Archival Vellum Notice Box */
.tribute-notice-card,
.tribute-notice-box {
  background: rgba(235, 215, 175, 0.45);
  border: 1px dashed #9e7b44;
  border-radius: 8px;
  color: #382818;
  padding: 1.05rem 1.2rem;
  margin: 1.25rem 0;
  box-shadow: inset 0 1px 4px rgba(120, 85, 45, 0.08), 0 2px 8px rgba(90, 60, 25, 0.04);
  position: relative;
}

.tribute-notice-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.tribute-notice-title {
  color: #382818;
  font-family: var(--font-serif-display);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tribute-notice-icon {
  color: #825a24;
  font-size: 0.78rem;
}

.tribute-notice-msg {
  color: #382818;
  font-family: var(--font-serif-body, 'Cinzel', serif);
  font-size: 0.88rem;
  line-height: 1.68;
  margin: 0;
}

.tribute-signoff-wrap {
  margin-top: 1.35rem;
  padding-top: 0.6rem;
}

.tribute-signoff-lead {
  font-style: italic;
  color: #3b2a1a;
  font-size: 0.92rem;
  margin-bottom: 0.25rem;
}

.tribute-signoff-team {
  font-family: var(--font-serif-display);
  font-weight: 700;
  font-size: 0.98rem;
  color: #1e150d;
  letter-spacing: 0.03em;
}

.tribute-footer {
  border-top: 1px solid rgba(191, 160, 104, 0.35);
  background: transparent;
  padding: 1rem 2rem 1.4rem;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

/* Vintage Parchment Seal Action Button */
.tribute-close-btn,
.tribute-confirm-btn {
  background: #422f1d;
  color: #f7edd4;
  border: 1px solid #735332;
  padding: 0.5rem 1.4rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none;
}

.tribute-close-btn:hover,
.tribute-confirm-btn:hover {
  background: #5a4027;
  box-shadow: 0 0 12px rgba(115, 83, 50, 0.4);
  color: #ffffff;
}

.tribute-close-btn:focus-visible,
.tribute-confirm-btn:focus-visible {
  outline: 2px solid #735332;
  outline-offset: 2px;
}

/* Top-Right Close Button in Vintage Stationery Theme */
#tribute-letter-modal .tribute-close-icon-btn,
#tribute-letter-modal .tribute-close-icon,
#tribute-letter-modal .terms-close-btn,
#tribute-letter-modal .modal-close-btn {
  display: none !important;
}

/* Reduced Motion Accessibility Fallback */
@media (prefers-reduced-motion: reduce) {
  .portal-sealed-envelope.is-opening .envelope-top-flap,
  .portal-sealed-envelope.is-opening .envelope-wax-seal,
  .portal-sealed-envelope.is-opening .envelope-letter-sheet,
  .envelope-body,
  .envelope-top-flap,
  .envelope-wax-seal,
  .envelope-letter-sheet,
  .tribute-envelope-stage,
  .tribute-letter-window {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

.portal-legal-bar {
  margin-top: 1.5rem;
  max-width: 580px;
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.38rem 0.95rem;
  background: rgba(18, 14, 11, 0.55);
  border: 1px solid rgba(245, 190, 56, 0.2);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  animation: fadeInPortalDisclaimer 1.2s ease 0.2s backwards;
}

@keyframes fadeInPortalDisclaimer {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.terms-trigger-btn {
  background: none;
  border: none;
  color: var(--gold-light);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  transition: var(--transition-smooth);
}

.terms-trigger-btn svg {
  color: var(--gold-primary);
  opacity: 0.85;
}

.terms-trigger-btn:hover {
  color: #fff;
  text-shadow: 0 0 10px var(--gold-glow);
}

.portal-legal-sep {
  color: rgba(245, 190, 56, 0.3);
  font-size: 0.55rem;
}

.portal-disclaimer-credit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(235, 230, 220, 0.42);
}

.inspiration-author {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(235, 230, 220, 0.48);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.02em;
}

.inspiration-handle {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
}

.inspiration-handle svg {
  display: inline-block;
  opacity: 0.75;
  flex-shrink: 0;
}

.inspiration-sep {
  opacity: 0.35;
  font-size: 0.5rem;
}

.epilogue-terms-wrap {
  margin: 0.35rem 0 0 0;
}

.terms-link-text {
  background: none;
  border: none;
  color: rgba(235, 230, 220, 0.45);
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  transition: var(--transition-smooth);
}

.terms-link-text:hover {
  color: var(--gold-light);
}

.plant-terms-hint {
  margin-top: 0.85rem;
  font-size: 0.72rem;
  color: rgba(235, 230, 220, 0.6);
  font-family: var(--font-sans);
  text-align: center;
  line-height: 1.4;
}

.plant-terms-link {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: var(--gold-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.plant-terms-link:hover {
  color: var(--gold-light);
  opacity: 1;
}

/* =========================================================
   TERMS & CONDITIONS SANCTUARY MODAL
   ========================================================= */
.terms-window {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 620px;
  max-height: 84vh;
  max-height: 84dvh;
  display: flex;
  flex-direction: column;
  background: #121017;
  border: 1px solid rgba(245, 190, 56, 0.35);
  border-radius: 16px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 0 0 40px rgba(245, 190, 56, 0.15);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.4s var(--ease-royal);
  overflow: hidden;
}

.garden-modal-overlay.is-active .terms-window,
.modal-overlay.is-active .terms-window {
  transform: translateY(0) scale(1);
}

.terms-close-btn {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 5;
  line-height: 1;
}

.terms-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.terms-header {
  padding: 2rem 2.2rem 1.2rem;
  border-bottom: 1px solid rgba(245, 190, 56, 0.15);
  text-align: center;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(245, 190, 56, 0.06) 0%, transparent 100%);
}

.terms-badge {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
  background: rgba(245, 190, 56, 0.12);
  border: 1px solid rgba(245, 190, 56, 0.28);
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 0.6rem;
}

.terms-title {
  font-family: var(--font-serif-display);
  font-size: 1.6rem;
  color: var(--text-pure);
  margin-bottom: 0.35rem;
}

.terms-subtitle {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}

.terms-scroll-body {
  padding: 1.5rem 2.2rem;
  overflow-y: auto;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  line-height: 1.65;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 190, 56, 0.3) transparent;
}

.terms-scroll-body::-webkit-scrollbar {
  width: 6px;
}

.terms-scroll-body::-webkit-scrollbar-thumb {
  background: rgba(245, 190, 56, 0.3);
  border-radius: 999px;
}

.terms-section {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.terms-sec-title {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.terms-sec-title svg {
  color: var(--gold-primary);
  flex-shrink: 0;
}

.terms-section p {
  font-family: var(--font-serif-body);
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0;
}

.terms-list {
  padding-left: 1.25rem;
  margin: 0.25rem 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.terms-list li {
  font-family: var(--font-serif-body);
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.terms-footer {
  padding: 1.2rem 2.2rem;
  border-top: 1px solid rgba(245, 190, 56, 0.15);
  background: rgba(14, 12, 18, 0.95);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.terms-confirm-btn {
  background: linear-gradient(135deg, #f5be38 0%, #d9822b 100%);
  color: #121008;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.75rem 1.6rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.terms-confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(245, 190, 56, 0.4);
}


.epilogue-inspiration-credit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(235, 230, 220, 0.42);
  margin-top: -0.35rem;
  margin-bottom: 0.25rem;
}

/* =========================================================
   RESPONSIVE DESIGN & ADAPTIVE LAYOUT
   ========================================================= */
@media (max-width: 1024px) {
  .view-salon .collection-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem 2rem;
  }
  
  .view-salon .span-4,
  .view-salon .span-5,
  .view-salon .span-6,
  .view-salon .span-7,
  .view-salon .span-8 {
    grid-column: span 1;
  }

  .view-salon .landscape-wide {
    grid-column: span 2;
  }

  .view-salon .offset-down-md,
  .view-salon .offset-down-lg {
    margin-top: 2rem;
  }
  
  .view-salon .offset-up-sm {
    margin-top: 0;
  }
}

@media (max-width: 960px) {
  .story-grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }
  
  .story-portrait-frame {
    max-width: 480px;
    margin: 0 auto;
  }

  .modal-content-split {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .modal-visual-frame {
    max-height: 50vh;
  }
  
  .modal-window {
    padding: 1.75rem;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 1rem;
  }

  /* Fixed Top Controls: Aligned and Compact with Safe-Area support */
  .lang-control {
    top: max(0.75rem, env(safe-area-inset-top, 0.75rem));
    left: max(0.75rem, env(safe-area-inset-left, 0.75rem));
  }

  .lang-pill {
    height: 32px;
    padding: 0 0.5rem;
    gap: 0.3rem;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
  }

  .lang-btn {
    font-size: 0.65rem;
    padding: 0.2rem 0.45rem;
  }

  .audio-control {
    top: max(0.75rem, env(safe-area-inset-top, 0.75rem));
    right: max(0.75rem, env(safe-area-inset-right, 0.75rem));
  }

  .audio-btn {
    height: 32px;
    padding: 0 0.65rem 0 0.45rem;
    gap: 0.45rem;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
  }

  .audio-disc {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }

  .audio-details {
    display: none;
  }

  /* Portal Entry Screen Responsive Fit */
  .portal-screen {
    padding: 4.5rem 1rem 2rem 1rem;
    padding-top: max(4.5rem, calc(3.6rem + env(safe-area-inset-top, 0px)));
    padding-bottom: max(2rem, calc(1.5rem + env(safe-area-inset-bottom, 0px)));
  }

  .portal-inner {
    max-width: 100%;
    width: 100%;
  }

  .portal-house-tag {
    font-size: 0.62rem;
    letter-spacing: 0.24em;
    margin-bottom: 0.35rem;
  }

  .portal-title {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
    line-height: 1.18;
  }

  .portal-subtitle em {
    font-size: clamp(0.92rem, 3.6vw, 1.1rem);
    margin-bottom: 1.35rem;
    line-height: 1.45;
    padding: 0 0.25rem;
  }

  .portal-emblem-wrap {
    width: 170px;
    height: 170px;
    margin-bottom: 1.35rem;
  }

  .ring-outer.solar-corona {
    width: 155px;
    height: 155px;
  }

  .ring-inner.solar-astrolabe {
    width: 124px;
    height: 124px;
  }

  .seal-medallion.solar-seal {
    width: 76px;
    height: 76px;
  }

  .seal-initials {
    font-size: 1.2rem;
  }

  .seal-sunflower {
    font-size: 0.92rem;
  }

  .prompt-main {
    font-size: 0.72rem;
    letter-spacing: 0.22em;
  }

  .prompt-sub {
    font-size: 0.56rem;
    letter-spacing: 0.16em;
  }

  .portal-legal-bar {
    margin-top: 1rem;
    padding: 0.3rem 0.75rem;
    gap: 0.4rem;
  }

  .terms-window {
    max-height: 90vh;
    max-height: 90dvh;
    border-radius: 12px;
  }
  .terms-header {
    padding: 1.4rem 1.2rem 1rem;
  }
  .terms-title {
    font-size: 1.3rem;
  }
  .terms-scroll-body {
    padding: 1.2rem 1.2rem;
    gap: 1.2rem;
  }
  .terms-footer {
    padding: 1rem 1.2rem;
  }
  .terms-confirm-btn {
    width: 100%;
    text-align: center;
  }

  /* Portal Secret Note Token: flows naturally below disclaimer without overlapping */
  .corner-portal {
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    margin: 1rem auto 0.5rem auto !important;
    align-self: center !important;
  }

  /* Hero Section Mobile */
  .palace-hero {
    min-height: 100vh;
    min-height: 100dvh;
    padding: max(5.5rem, calc(4.5rem + env(safe-area-inset-top, 0px))) 1.25rem 3rem 1.25rem;
  }

  .hero-collection-tag {
    font-size: 0.65rem;
    letter-spacing: 0.22em;
    margin-bottom: 0.85rem;
  }

  .hero-title {
    font-size: clamp(2.2rem, 8.5vw, 3.6rem);
    letter-spacing: 0.05em;
    line-height: 1.15;
    margin-bottom: 1.15rem;
  }

  .hero-poetic-quote {
    font-size: clamp(1.05rem, 4.2vw, 1.35rem);
    line-height: 1.6;
    margin-bottom: 1.75rem;
  }

  .corner-hero {
    position: absolute !important;
    bottom: 1.25rem !important;
    right: 1.25rem !important;
    margin: 0 !important;
  }

  /* Story Section Mobile */
  .editorial-story {
    padding: 4.5rem 0 3.5rem 0;
  }

  .story-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .story-portrait-frame {
    max-width: 320px;
    margin: 0 auto;
    width: 100%;
    padding: 0.75rem;
  }

  .story-text-column {
    padding-left: 0;
    text-align: center;
  }

  .editorial-eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.25em;
    margin-bottom: 0.75rem;
  }

  .editorial-heading {
    font-size: clamp(1.85rem, 6.8vw, 2.6rem);
    margin-bottom: 1.25rem;
    line-height: 1.25;
  }

  .editorial-prose {
    font-size: 1.05rem;
    line-height: 1.75;
    gap: 1rem;
    margin-bottom: 2rem;
    text-align: left;
  }

  .story-signature {
    text-align: center;
    margin-top: 1.5rem;
  }

  /* Collection Gallery Mobile */
  .collection-section {
    padding: 4.5rem 0 3.5rem 0;
  }

  .collection-header {
    margin-bottom: 2rem;
  }

  .collection-title {
    font-size: clamp(1.95rem, 7.5vw, 2.8rem);
    margin-bottom: 0.65rem;
  }

  .collection-desc {
    font-size: clamp(0.95rem, 3.8vw, 1.15rem);
  }

  .collection-view-controls {
    margin-top: 1.25rem;
  }

  .view-switcher-pill {
    padding: 0.25rem 0.35rem;
  }

  .view-btn {
    font-size: 0.65rem;
    padding: 0.35rem 0.65rem;
  }

  .corner-gallery {
    margin-left: 0.5rem;
  }

  .view-salon .collection-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .view-salon .landscape-wide {
    grid-column: span 1;
  }

  .view-salon [class*="offset-"] {
    margin-top: 0 !important;
  }

  .archive-card {
    min-height: 400px;
    border-radius: 4px;
  }

  .card-meta-top {
    padding: 0.85rem 1rem;
  }

  .card-korean-tag {
    font-size: 0.72rem;
  }

  .card-bottom-info {
    padding: 1.5rem 1.15rem 1.15rem 1.15rem;
  }

  .card-curator-stamp {
    font-size: 0.56rem;
    letter-spacing: 0.12em;
  }

  .card-title {
    font-size: 1.35rem;
  }

  .card-description {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .view-promenade .archive-card {
    flex: 0 0 85vw;
  }

  /* Modals Mobile */
  .exhibition-modal,
  .note-modal,
  .secret-note-popup {
    padding: max(1rem, env(safe-area-inset-top, 1rem)) 0.75rem max(1rem, env(safe-area-inset-bottom, 1rem)) 0.75rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    align-items: flex-start;
  }

  .modal-window {
    margin: auto 0;
    padding: 1.5rem 1.15rem;
    max-height: calc(100dvh - 2.5rem);
    overflow-y: auto;
  }

  .modal-content-split {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .modal-visual-frame {
    max-height: 42vh;
  }

  .note-letter-window {
    margin: auto 0;
    padding: 2.25rem 1.25rem 1.5rem 1.25rem;
    max-height: calc(100dvh - 2.5rem);
    overflow-y: auto;
  }

  .secret-popup-card {
    margin: auto 0;
    padding: 2.25rem 1.25rem 1.5rem 1.25rem;
    max-height: calc(100dvh - 2.5rem);
    overflow-y: auto;
  }
}

/* Compact Height Screen Handling (e.g. iPhone SE: 375x667, Android with URL bar) */
@media (max-height: 720px) {
  .portal-screen {
    padding-top: max(3.8rem, calc(3rem + env(safe-area-inset-top, 0px)));
    padding-bottom: 1.5rem;
  }

  .portal-subtitle em {
    margin-bottom: 1rem;
  }

  .portal-emblem-wrap {
    width: 145px;
    height: 145px;
    margin-bottom: 1rem;
  }

  .ring-outer.solar-corona {
    width: 135px;
    height: 135px;
  }

  .ring-inner.solar-astrolabe {
    width: 108px;
    height: 108px;
  }

  .seal-medallion.solar-seal {
    width: 68px;
    height: 68px;
  }

  .seal-initials {
    font-size: 1.1rem;
  }

  .seal-sunflower {
    font-size: 0.85rem;
  }

  .portal-disclaimer {
    margin-top: 0.85rem;
    padding: 0.5rem 0.75rem;
  }
}

/* =========================================================
   LITTLE CORNERS FOR DANIELLE (THE SUNLIT BUREAU)
   ========================================================= */
.archive-sanctuary {
  padding: 8rem 0 7rem 0;
  position: relative;
  background: radial-gradient(circle at 50% 30%, rgba(245, 190, 56, 0.05) 0%, transparent 70%),
              linear-gradient(180deg, var(--bg-black) 0%, #0d0c0a 50%, var(--bg-black) 100%);
  border-top: 1px solid rgba(245, 190, 56, 0.15);
  border-bottom: 1px solid rgba(245, 190, 56, 0.15);
}

.sanctuary-inner {
  position: relative;
  z-index: 2;
}

.sanctuary-crest {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0.55rem 1.4rem;
  background: rgba(245, 190, 56, 0.08);
  border: 1px solid rgba(245, 190, 56, 0.3);
  border-radius: 50px;
  box-shadow: 0 0 25px rgba(245, 190, 56, 0.15);
}

.crest-icon {
  color: var(--gold-primary);
  display: inline-block;
  vertical-align: middle;
}

.crest-dot {
  color: var(--gold-antique);
  font-size: 0.9rem;
  line-height: 1;
  opacity: 0.65;
}

/* Pocket of Sunshine Dispenser Button */
.pocket-sunshine-wrap {
  margin: 2.75rem auto 4.5rem auto;
  display: flex;
  justify-content: center;
}

.pocket-sunshine-btn {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.15rem 2.4rem;
  background: linear-gradient(135deg, rgba(245, 190, 56, 0.14) 0%, rgba(22, 19, 16, 0.9) 100%);
  border: 1px solid rgba(245, 190, 56, 0.45);
  border-radius: 60px;
  color: var(--text-pure);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.55), 0 0 20px rgba(245, 190, 56, 0.12);
}

.pocket-sunshine-btn:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: var(--gold-primary);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75), 0 0 35px rgba(245, 190, 56, 0.3);
  background: linear-gradient(135deg, rgba(245, 190, 56, 0.22) 0%, rgba(32, 28, 22, 0.95) 100%);
}

.pocket-sparkle {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulseGold 2s infinite ease-in-out;
}

.pocket-text-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.pocket-title {
  font-family: var(--font-serif-display);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: var(--gold-light);
}

.pocket-sub {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-top: 0.2rem;
}

.pocket-envelope-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  transition: transform 0.3s ease;
}

.pocket-sunshine-btn:hover .pocket-envelope-icon {
  transform: rotate(12deg) scale(1.18);
  color: var(--gold-primary);
}

/* Keepsake Bureau Notes Grid */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 1rem;
}

.note-card {
  position: relative;
  background: linear-gradient(145deg, rgba(28, 24, 20, 0.94) 0%, rgba(16, 14, 12, 0.98) 100%);
  border: 1px solid rgba(245, 190, 56, 0.22);
  border-radius: 4px;
  padding: 2.4rem 2rem 1.85rem 2rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
}

/* Subtle organic tilt angles for tactile keepsake feel */
.note-card:nth-child(1) { transform: rotate(-0.8deg); }
.note-card:nth-child(2) { transform: rotate(1deg); }
.note-card:nth-child(3) { transform: rotate(-1.2deg); }
.note-card:nth-child(4) { transform: rotate(0.9deg); }
.note-card:nth-child(5) { transform: rotate(-0.6deg); }
.note-card:nth-child(6) { transform: rotate(1.1deg); }

.note-card:hover {
  transform: translateY(-8px) scale(1.02) rotate(0deg) !important;
  border-color: rgba(245, 190, 56, 0.65);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.8), 0 0 35px rgba(245, 190, 56, 0.22);
}

.note-card-pin {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0%, #f5be38 45%, #7e5a08 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

.note-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.note-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-primary);
}

.note-card-tag {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  padding: 0.2rem 0.65rem;
  background: rgba(245, 190, 56, 0.08);
  border: 1px solid rgba(245, 190, 56, 0.22);
  border-radius: 20px;
}

.note-card-title {
  font-family: var(--font-serif-display);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-pure);
  line-height: 1.3;
  margin-bottom: 0.85rem;
}

.note-card-preview {
  font-family: var(--font-serif-body);
  font-size: 0.98rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.note-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.1rem;
  border-top: 1px dashed rgba(245, 190, 56, 0.2);
}

.note-card-serial {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.note-card-prompt {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: var(--gold-light);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: transform 0.3s ease;
}

.note-card:hover .note-card-prompt {
  transform: translateX(4px);
  color: var(--text-pure);
}

/* =========================================================
   NOTE READER MODAL
   ========================================================= */
.note-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.note-modal.is-active {
  opacity: 1;
  pointer-events: auto;
}

.note-letter-window {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 640px;
  background: radial-gradient(circle at 50% 10%, #201a14 0%, #120f0d 100%);
  border: 1px solid rgba(245, 190, 56, 0.45);
  box-shadow: 0 25px 75px rgba(0, 0, 0, 0.9), 0 0 50px rgba(245, 190, 56, 0.16);
  border-radius: 4px;
  padding: 3.5rem 3rem 3rem 3rem;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.note-modal.is-active .note-letter-window {
  transform: translateY(0) scale(1);
}

.parchment-gold-pin {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #f5be38 45%, #7a5808 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
}

.note-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  color: var(--gold-light);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.note-close-btn:hover {
  color: var(--text-pure);
  transform: rotate(90deg);
}

.parchment-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.parchment-icon {
  font-size: 2.2rem;
}

.parchment-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.parchment-serial {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-primary);
}

.parchment-tag {
  font-family: var(--font-serif-body);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.parchment-title {
  font-family: var(--font-serif-display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-pure);
  line-height: 1.25;
  margin-bottom: 1.25rem;
}

.parchment-divider {
  width: 60px;
  height: 1px;
  background: var(--gold-primary);
  margin-bottom: 2rem;
}

.parchment-prose {
  font-family: var(--font-serif-body);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.85;
  color: rgba(245, 245, 250, 0.92);
  white-space: pre-line;
  margin-bottom: 2.5rem;
  font-style: normal;
}

.parchment-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(245, 190, 56, 0.2);
}

.parchment-wax-seal {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #df9930 0%, #a45812 70%, #683005 100%);
  border: 1px solid rgba(245, 190, 56, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 1px 3px rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.parchment-datestamp {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

@media (max-width: 992px) {
  .notes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .notes-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .pocket-sunshine-btn {
    padding: 1rem 1.75rem;
    gap: 1rem;
    width: 100%;
    justify-content: center;
  }

  .note-letter-window {
    padding: 2.5rem 1.75rem 2rem 1.75rem;
  }
}

/* =========================================================
   SECRET CORNER TOKENS & SILENT ADMIRER WHISPERS
   ========================================================= */
.secret-corner-token {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 16, 13, 0.72);
  border: 1px solid rgba(245, 190, 56, 0.35);
  border-radius: 999px;
  height: 34px;
  min-width: 34px;
  padding: 0 0.55rem;
  color: var(--gold-light);
  cursor: pointer;
  transition: all 0.4s var(--ease-royal);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 10px rgba(245, 190, 56, 0.15);
  z-index: 15;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.secret-corner-token:hover,
.secret-corner-token:focus-visible {
  background: rgba(35, 27, 19, 0.95);
  border-color: var(--gold-primary);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7), 0 0 22px rgba(245, 190, 56, 0.45);
  transform: scale(1.08);
}

.corner-token-icon {
  font-size: 0.95rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Subtle & Hidden at rest: label unfolds gracefully on hover/focus */
.corner-token-label {
  font-family: var(--font-serif-body);
  font-style: italic;
  font-size: 0.75rem;
  color: var(--gold-light);
  letter-spacing: 0.04em;
  white-space: nowrap;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-width 0.45s var(--ease-royal), opacity 0.35s ease, margin-left 0.35s ease;
  margin-left: 0;
}

.secret-corner-token:hover .corner-token-label,
.secret-corner-token:focus-visible .corner-token-label {
  max-width: 140px;
  opacity: 1;
  margin-left: 0.35rem;
}

.corner-token-pulse {
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  border: 1px solid var(--gold-primary);
  opacity: 0;
  animation: tokenBreathing 3.5s infinite ease-out;
  pointer-events: none;
}

@keyframes tokenBreathing {
  0% { transform: scale(0.95); opacity: 0.75; }
  50% { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(0.95); opacity: 0; }
}

/* Individual corner placements */
.corner-portal {
  position: relative;
  bottom: auto;
  right: auto;
  margin: 1.25rem auto 0.5rem auto;
  align-self: center;
}

/* Note 2: Hidden in the bottom-right corner of the grand solarium */
.corner-hero {
  position: absolute;
  bottom: 2.5rem;
  right: 2.5rem;
  z-index: 15;
}

/* Note 3: Pinned as a dried flower charm to the portrait frame */
.corner-portrait {
  position: absolute;
  top: -12px;
  right: -12px;
  z-index: 15;
}

/* Note 4: Tucked neatly beside the collection chapter prefix */
.collection-prefix-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.corner-gallery {
  position: relative;
  margin: 0;
}

/* Note 5: Tucked gently into the epilogue footer */
.corner-epilogue {
  position: relative;
  margin: 1.25rem auto 0 auto;
  align-self: center;
}

/* Secret Note Popup */
.secret-note-popup {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.secret-note-popup.is-active {
  opacity: 1;
  pointer-events: auto;
}

.secret-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 8, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.secret-popup-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  background: radial-gradient(circle at 50% 10%, #241c14 0%, #100d0b 100%);
  border: 1px solid rgba(245, 190, 56, 0.5);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 45px rgba(245, 190, 56, 0.22);
  border-radius: 4px;
  padding: 2.85rem 2.25rem 2.25rem 2.25rem;
  transform: translateY(15px) scale(0.95);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.secret-note-popup.is-active .secret-popup-card {
  transform: translateY(0) scale(1);
}

.secret-pin {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0%, #f5be38 45%, #7a5808 100%);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.8);
}

.secret-close-btn {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--gold-light);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.secret-close-btn:hover {
  color: var(--text-pure);
  transform: rotate(90deg);
}

.secret-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.secret-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-primary);
}

.secret-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.secret-card-badge {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-primary);
}

.secret-card-loc {
  font-family: var(--font-serif-body);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.secret-card-body {
  font-family: var(--font-serif-body);
  font-size: 1.15rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 2rem;
}

.secret-card-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px dashed rgba(245, 190, 56, 0.25);
}

.secret-card-signoff {
  font-family: var(--font-serif-body);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--gold-light);
}

.secret-tracker {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .secret-popup-card {
    padding: 2.25rem 1.25rem 1.5rem 1.25rem;
  }
}

/* =========================================================
   POWERPUFF GIRL DANIELLE WEB SHIMEJI (DESKTOP COMPANION)
   ========================================================= */
.shimeji-container {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  pointer-events: none;
  z-index: 990;
  overflow: hidden;
}

.shimeji-mascot {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 128px;
  height: 128px;
  pointer-events: auto;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  will-change: transform;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
  transition: filter 0.25s ease;
}

.shimeji-mascot:hover {
  filter: drop-shadow(0 8px 18px rgba(245, 190, 56, 0.45));
}

.shimeji-mascot:active,
.shimeji-mascot.is-dragged {
  cursor: grabbing;
  filter: drop-shadow(0 14px 25px rgba(245, 190, 56, 0.65));
}

.shimeji-mascot.is-dismissing {
  animation: shimejiPoof 0.4s ease forwards;
}

@keyframes shimejiPoof {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
  100% { transform: scale(0); opacity: 0; }
}

.shimeji-sprite {
  width: 100%;
  height: 100%;
  display: block;
  transform-origin: center center;
  image-rendering: auto;
  pointer-events: none;
}

/* Speech Bubble */
.shimeji-speech-bubble {
  position: absolute;
  bottom: 95%;
  left: 50%;
  margin-left: -110px;
  width: 220px;
  background: rgba(18, 14, 10, 0.95);
  border: 1px solid var(--gold-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 20px rgba(245, 190, 56, 0.35);
  color: var(--text-ivory);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  pointer-events: none;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: bubblePop 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Speech bubble flipped below mascot when near top/ceiling */
.shimeji-speech-bubble.is-below {
  bottom: auto;
  top: 92%;
  animation: bubblePopDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.shimeji-speech-bubble.is-below::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: var(--gold-primary);
}

.shimeji-speech-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: var(--arrow-x, 50%);
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--gold-primary);
}

.shimeji-speech-bubble.is-fading {
  opacity: 0;
  transform: translateY(-8px);
}

@keyframes bubblePop {
  0% { transform: scale(0.6) translateY(10px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes bubblePopDown {
  0% { transform: scale(0.6) translateY(-10px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* Sparkle & Heart Particles */
.shimeji-particle {
  position: fixed;
  pointer-events: none;
  z-index: 1005;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 6px rgba(245, 190, 56, 0.75));
  animation: particleBurst 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes particleBurst {
  0% { transform: translate(0, 0) scale(0.5); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(1.25); opacity: 0; }
}

/* Floating Summon Toggle Button (Bottom-Left) */
.shimeji-toggle-btn {
  position: fixed;
  bottom: 1.75rem;
  left: 1.75rem;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(18, 15, 12, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--gold-border);
  border-radius: 999px;
  padding: 0.42rem 0.95rem 0.42rem 0.75rem;
  color: var(--gold-light);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: var(--transition-smooth);
}

.shimeji-toggle-btn:hover {
  background: rgba(30, 24, 18, 0.95);
  border-color: var(--gold-primary);
  box-shadow: 0 0 18px var(--gold-glow);
  transform: translateY(-2px);
}

.shimeji-toggle-btn.is-active {
  background: rgba(245, 190, 56, 0.18);
  border-color: var(--gold-primary);
  color: #fff;
  box-shadow: 0 0 14px var(--gold-glow);
}

.shimeji-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  line-height: 1;
}

@media (max-width: 640px) {
  .shimeji-mascot {
    width: 80px;
    height: 80px;
  }

  .shimeji-speech-bubble {
    width: 175px;
    margin-left: -87.5px;
    font-size: 0.68rem;
    padding: 0.45rem 0.65rem;
    bottom: 92%;
  }

  .shimeji-toggle-btn {
    bottom: max(1rem, env(safe-area-inset-bottom, 1rem));
    left: max(1rem, env(safe-area-inset-left, 1rem));
    padding: 0.35rem 0.75rem;
    font-size: 0.68rem;
  }
}

/* Star of Hope: Flower Selector Styling */
.flower-option[data-flower="star"]:hover,
.flower-type-option[data-flower="star"]:hover,
#flower-type-star:hover {
  border-color: #c084fc;
}

.flower-option[data-flower="star"].active,
.flower-option[data-flower="star"].is-selected,
.flower-type-option[data-flower="star"].active,
.flower-type-option[data-flower="star"].is-selected,
#flower-type-star.active {
  border-color: #c084fc;
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.35);
  background: rgba(192, 132, 252, 0.14);
}

.flower-option[data-flower="star"] .flower-type-icon,
.flower-option[data-flower="star"] svg,
.flower-type-option[data-flower="star"] .flower-type-icon,
.flower-type-option[data-flower="star"] svg,
#flower-type-star .flower-type-icon,
#flower-type-star svg,
[data-flower="star"] .flower-icon {
  color: #c084fc !important;
  fill: currentColor;
}

.flower-option[data-flower="star"] .flower-title,
.flower-type-option[data-flower="star"] .flower-title {
  color: #f5f3ff;
}

.flower-option[data-flower="star"] .flower-subtitle,
.flower-type-option[data-flower="star"] .flower-subtitle {
  color: rgba(245, 243, 255, 0.75);
}

.flower-option[data-flower="star"].active .flower-subtitle,
.flower-type-option[data-flower="star"].active .flower-subtitle {
  color: rgba(233, 213, 255, 0.95);
}
