/**
 * The Kintsugi Mender — Journal, Display Shelf & Special Views
 * Muro Curing Pause, Wabi-Sabi Reflection, Hanko Stamp, Display Shelf, Letters Drawer, Title Screen
 */

/* ==========================================================================
   1. Muro Curing Box & Wabi-Sabi Journal View
   ========================================================================== */
.muro-view-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
}

.muro-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--space-sm);
}

.muro-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.muro-icon {
  width: 28px;
  height: 28px;
  color: var(--accent-gold-ink);
}

.muro-title {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text);
}

.muro-subtitle {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* 4-4-4 Tea & Lacquer Breath Orb */
.breath-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.breath-orb-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.breath-orb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle at 35% 35%, #fce29d 0%, var(--accent-gold) 70%, #8c6014 100%);
  box-shadow: 0 0 20px var(--kin-glow);
  transform-origin: center center;
}

.breath-orb.is-animating {
  animation: breathOrb 12s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.breath-phase-text {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.04em;
}

.breath-controls {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* Ruled Washi Notebook & Textarea */
.washi-notebook-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  width: 100%;
}

.journal-prompt-box {
  background: var(--surface-2);
  border-left: 3px solid var(--accent-gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  font-style: italic;
  line-height: var(--leading-normal);
  color: var(--text);
}

.washi-textarea-frame {
  position: relative;
  width: 100%;
}

#journal-textarea {
  width: 100%;
  min-height: 160px;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background-color: var(--surface);
  background-image: repeating-linear-gradient(
    transparent,
    transparent 31px,
    var(--border) 31px,
    var(--border) 32px
  );
  line-height: 32px;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: var(--text-base);
  resize: vertical;
  transition: border-color var(--transition-fast);
}

#journal-textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 1px var(--accent-gold);
}

/* 1-Tap Seed Phrase Chips */
.seed-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.seed-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: var(--text-xs);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.seed-chip:hover {
  background: var(--surface);
  border-color: var(--accent-gold);
  color: var(--text);
  transform: translateY(-1px);
}

.seed-chip:active {
  transform: scale(0.97);
}

/* 4 Emotional Seal Swatches */
.seal-selection-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
}

.seal-swatches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
}

.seal-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: var(--text-xs);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.seal-dot {
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
}

.seal-amber .seal-dot { background-color: var(--wabi-amber); }
.seal-mist .seal-dot { background-color: var(--wabi-mist); }
.seal-crimson .seal-dot { background-color: var(--wabi-crimson); }
.seal-indigo .seal-dot { background-color: var(--wabi-indigo); }

.seal-btn:hover {
  border-color: var(--accent-gold);
  color: var(--text);
}

.seal-btn.is-selected {
  border-color: var(--accent-gold);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--accent-gold);
}

.journal-save-status {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   1b. Reception Tea Ritual & Vessel Inspector 180°
   ========================================================================== */
.tea-ritual-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: var(--space-xs);
  margin-bottom: var(--space-xs);
}

.tea-ritual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.tea-ritual-title {
  font-family: var(--font-serif);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tea-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

@media (max-width: 480px) {
  .tea-grid {
    grid-template-columns: 1fr;
  }
}

.tea-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: left;
  cursor: pointer;
  min-height: 44px;
  transition: all var(--transition-fast);
}

.tea-btn:hover {
  background: var(--surface-2);
  border-color: var(--accent-gold);
  transform: translateY(-1px);
}

.tea-btn.is-poured {
  border-color: var(--accent-gold);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--accent-gold), 0 2px 8px rgba(196, 139, 32, 0.2);
}

.tea-btn-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--text-xs);
  color: var(--accent-gold-ink);
  display: flex;
  align-items: center;
  gap: 4px;
}

.tea-btn-kanji {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: normal;
}

.tea-btn-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.2;
}

@keyframes teaSteam {
  0% {
    opacity: 0.4;
    transform: translateY(0) scale(1);
  }
  50% {
    opacity: 0.95;
    transform: translateY(-3px) scale(1.06);
  }
  100% {
    opacity: 0.4;
    transform: translateY(0) scale(1);
  }
}

.tea-steam-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.875rem;
  color: var(--accent-gold-ink);
  font-weight: 600;
  animation: teaSteam 2.4s ease-in-out infinite;
}

#tea-ritual-response {
  background: var(--surface);
  border-left: 3px solid var(--accent-gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 8px 12px;
  font-family: var(--font-serif);
  font-size: var(--text-xs);
  font-style: italic;
  line-height: var(--leading-normal);
  color: var(--text);
  animation: fadeSlideUp 220ms ease-out;
}

/* Vessel Inspector 180° */
.vessel-inspector-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.vessel-inspect-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: var(--space-xs);
}

.vessel-inspect-title {
  font-family: var(--font-serif);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vessel-inspect-glaze-tag {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent-gold-ink);
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
}

.vessel-inspect-stage {
  position: relative;
  width: 100%;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 420px;
}

.vessel-inspect-svg-wrap {
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 280ms ease;
  transform-style: preserve-3d;
}

.vessel-inspect-svg-wrap svg {
  width: 130px;
  height: 130px;
  transition: transform 280ms ease;
  filter: drop-shadow(0 6px 12px rgba(36, 27, 20, 0.12));
}

.kiln-mark-sheet {
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  width: 100%;
  font-size: var(--text-xs);
  color: var(--text);
  line-height: var(--leading-normal);
  animation: fadeSlideUp 200ms ease-out;
}

.kiln-mark-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--accent-gold-ink);
  margin-bottom: 2px;
}

.kiln-mark-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.kiln-craft-note {
  font-size: 0.875rem;
  color: var(--text);
  font-style: italic;
  border-top: 1px dashed var(--border);
  padding-top: 4px;
}

.vessel-inspect-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.inspector-tilt-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

#inspector-tilt-range {
  flex: 1 1 90px;
  height: 6px;
  accent-color: var(--accent-gold);
  cursor: pointer;
}

/* ==========================================================================
   2. Delivery & Thank-You Note View
   ========================================================================== */
.delivery-card-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.thankyou-letter-card {
  position: relative;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl) var(--space-xl);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transform: rotate(-0.5deg);
  transition: transform var(--transition-normal);
}

.thankyou-letter-card:hover {
  transform: rotate(0deg);
}

.thankyou-date-badge {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
}

.thankyou-quote {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--text);
  font-style: italic;
}

.thankyou-signature {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--accent-gold-ink);
  text-align: right;
  padding-right: var(--space-xs);
  margin-top: var(--space-xs);
}

/* Red Japanese Hanko Stamp SVG & Hold-to-Stamp Zone */
.hanko-interactive-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px dashed var(--border);
  width: 100%;
}

.hanko-stamp-container {
  position: relative;
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hanko-stamp-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hanko-progress-ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
}

#hanko-progress-ring,
.hanko-progress-indicator {
  stroke: var(--hanko-red, #c13324);
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 40ms linear;
}

.hanko-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex: 1 1 200px;
}

.hanko-btn-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

#btn-hanko-stamp {
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.hanko-status-hint {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
  min-height: 16px;
}

.hanko-sealed-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--hanko-red, #c13324);
  background: var(--surface-2);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--hanko-red, #c13324);
  animation: fadeSlideUp 200ms ease-out;
}

.hanko-stamp-svg {
  width: 100%;
  height: 100%;
  opacity: 0;
  transform-origin: center center;
}

.hanko-stamp-svg.is-stamped {
  animation: hankoStamp 550ms cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

/* ==========================================================================
   3. Illuminated Display Shelf View (#shelf-view / #shelf-modal)
   ========================================================================== */
.shelf-stage-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  width: 100%;
}

.shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.shelf-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shelf-title {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--text);
}

.shelf-subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Wood Planks & Grid */
.shelf-plank-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
  width: 100%;
}

.shelf-plank {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: var(--space-md);
  padding: var(--space-md) var(--space-md) 18px;
  border-bottom: 12px solid var(--wood-grain);
  border-radius: 0 0 var(--radius-xs) var(--radius-xs);
  box-shadow: 0 10px 18px rgba(36, 27, 20, 0.22);
}

.shelf-plank::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--wood-border);
}

/* Vessel Display Card on Shelf */
.shelf-vessel-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.shelf-vessel-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-md);
}

.shelf-vessel-thumb {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shelf-vessel-name {
  font-family: var(--font-serif);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.shelf-vessel-day {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Shelf Filter Bar */
.shelf-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
  padding: 8px 12px;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.shelf-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.shelf-filter-btn,
.shelf-color-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  min-height: 28px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.shelf-filter-btn:hover,
.shelf-color-btn:hover {
  border-color: var(--accent-gold);
}

.shelf-filter-btn.is-active,
.shelf-color-btn.is-active {
  background: var(--accent-gold-tint);
  border-color: var(--accent-gold);
  color: var(--accent-gold-ink);
  font-weight: 600;
}

/* Vessel Detail Inspector Modal */
.shelf-detail-modal-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.shelf-detail-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

#shelf-detail-stage {
  position: relative;
  width: 240px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  border-radius: var(--radius-lg);
  user-select: none;
  transition: transform var(--transition-fast);
}

#shelf-detail-stage:focus-visible {
  box-shadow: 0 0 0 2px var(--accent-gold);
}

#shelf-detail-tilt {
  position: relative;
  width: 220px;
  height: 220px;
  transform-style: preserve-3d;
  transition: transform 120ms ease-out;
  --sheen-x: 50%;
  --sheen-y: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#shelf-detail-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: var(--radius-md);
  mix-blend-mode: overlay;
  background: radial-gradient(circle at var(--sheen-x, 50%) var(--sheen-y, 50%), rgba(255, 241, 184, 0.45) 0%, rgba(223, 169, 58, 0.15) 35%, transparent 70%);
  transition: opacity var(--transition-fast);
  opacity: 0.8;
  z-index: 2;
}

#shelf-stand-base {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 14px;
  border-radius: 3px;
  z-index: 1;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.28);
  transition: all var(--transition-fast);
}

.stand-rosewood {
  background: linear-gradient(180deg, #5c2c16 0%, #3a1a0c 100%);
  border-top: 1.5px solid #8c4a28;
}

.stand-tatami {
  background: repeating-linear-gradient(90deg, #9ca37d 0px, #9ca37d 3px, #7c855d 4px);
  border: 1px solid #5a6341;
  border-top: 2px solid #b5bd96;
}

.stand-slate {
  background: linear-gradient(180deg, #475569 0%, #1e293b 100%);
  border-top: 1.5px solid #94a3b8;
}

#shelf-detail-stage.is-chiming #shelf-detail-tilt {
  animation: stageChimePulse 450ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes stageChimePulse {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  30% {
    transform: scale(1.05);
    filter: brightness(1.25) drop-shadow(0 0 14px var(--accent-gold));
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

.shelf-stand-picker {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

.shelf-stand-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  min-height: 28px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.shelf-stand-btn:hover {
  border-color: var(--accent-gold);
}

.shelf-stand-btn.is-active {
  background: var(--accent-gold-tint);
  border-color: var(--accent-gold);
  color: var(--accent-gold-ink);
  font-weight: 600;
}

.shelf-detail-vessel-svg {
  width: 220px;
  height: 220px;
}

.shelf-detail-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.shelf-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

/* ==========================================================================
   4. Sensei Fumiko's Letters Drawer
   ========================================================================== */
.letters-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
}

.letter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.letter-item:hover {
  background: var(--surface-2);
  border-color: var(--accent-gold);
}

.letter-item.is-locked {
  opacity: 0.55;
  cursor: not-allowed;
}

.letter-item-left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.letter-envelope-icon {
  width: 24px;
  height: 24px;
  color: var(--accent-gold-ink);
}

.letter-item-title {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
}

.letter-item-day {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ==========================================================================
   5. Title Screen Landing Stage (#title-stage)
   ========================================================================== */
#title-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100dvh - 120px);
  padding: var(--space-xl) var(--space-md);
  gap: var(--space-xl);
}

.title-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  max-width: 580px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  box-shadow: var(--shadow-lg);
  animation: fadeSlideUp 400ms ease-out;
}

.title-crest {
  width: 56px;
  height: 56px;
  color: var(--accent-gold-ink);
  filter: drop-shadow(0 0 14px var(--kin-glow));
}

.title-main-heading {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: var(--leading-tight);
}

.title-sub-heading {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  font-style: italic;
  color: var(--text-muted);
  max-width: 440px;
}

.title-action-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
  max-width: 320px;
  margin-top: var(--space-sm);
}

.title-footer-notes {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 768px) {
  .shelf-detail-modal-body {
    grid-template-columns: 1fr;
  }

  .shelf-detail-preview {
    max-width: 280px;
    margin: 0 auto;
  }

  .muro-view-card {
    padding: var(--space-md);
  }

  .thankyou-letter-card {
    padding: var(--space-lg) var(--space-md);
  }

  .title-card {
    padding: var(--space-xl) var(--space-md);
  }
}

@media (prefers-reduced-motion: reduce) {
  #shelf-detail-tilt {
    transition: none !important;
  }
  #shelf-detail-stage.is-chiming #shelf-detail-tilt {
    animation: none !important;
  }
}
