/* ==========================================================================
   THE CELESTIAL STORY - SCALLOPED LACE-DOILY & ORNAMENTAL FRAMES
   ========================================================================== */

:root {
  --doily-border-color: #D4AF37;
  --doily-border-subtle: rgba(197, 160, 89, 0.35);
  --doily-bg-cream: #FAF6F0;
  --doily-lace-pink: #F8EDE3;
}

/* --- Scalloped SVG Border Utilities --- */
.doily-frame {
  position: relative;
  background: var(--bg-card, #ffffff);
  border-radius: 20px;
  box-shadow: 0 12px 36px -8px rgba(70, 50, 30, 0.08), 0 0 0 1px rgba(197, 160, 89, 0.18);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: visible;
}

/* Lace Edge Effect using layered pseudo-elements and SVG backgrounds */
.doily-card {
  position: relative;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(197, 160, 89, 0.22);
  padding: 1.5rem;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.doily-card:hover {
  transform: translateY(-5px);
  border-color: rgba(197, 160, 89, 0.55);
  box-shadow: 0 18px 45px -10px rgba(197, 160, 89, 0.18), 0 4px 12px rgba(0,0,0,0.03);
}

/* Decorative Scalloped Doily Outline Badge */
.doily-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.1rem;
  background: linear-gradient(135deg, #FFFBF5 0%, #F6EDE3 100%);
  border: 1px dashed rgba(197, 160, 89, 0.6);
  border-radius: 999px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #8C6A28;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(197, 160, 89, 0.1);
}

/* Circular Scalloped Doily Frame (for avatars, crests, dish highlights) */
.doily-circle-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.doily-circle-container::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, #FAF2E8 30%, #F5E5D3 100%);
  border: 2px dashed rgba(197, 160, 89, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.8), 0 0 0 6px rgba(197, 160, 89, 0.25);
  z-index: 1;
}

.doily-circle-container > * {
  position: relative;
  z-index: 2;
}

/* Scalloped Hero Picture Frame */
.doily-hero-frame {
  position: relative;
  padding: 16px;
  background: linear-gradient(145deg, #FFFFFF 0%, #FAF4EB 100%);
  border-radius: 28px;
  border: 1px solid rgba(197, 160, 89, 0.3);
  box-shadow: 0 25px 60px -15px rgba(80, 50, 20, 0.15), 0 0 0 6px rgba(255, 255, 255, 0.85);
}

.doily-hero-frame::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 22px;
  border: 1px dashed rgba(197, 160, 89, 0.4);
  pointer-events: none;
}

/* Corner Filigree Flourish */
.doily-corner-tl,
.doily-corner-tr,
.doily-corner-bl,
.doily-corner-br {
  position: absolute;
  width: 28px;
  height: 28px;
  pointer-events: none;
  opacity: 0.75;
  background-size: contain;
  background-repeat: no-repeat;
}

.doily-corner-tl {
  top: 8px;
  left: 8px;
}
.doily-corner-tr {
  top: 8px;
  right: 8px;
  transform: scaleX(-1);
}
.doily-corner-bl {
  bottom: 8px;
  left: 8px;
  transform: scaleY(-1);
}
.doily-corner-br {
  bottom: 8px;
  right: 8px;
  transform: scale(-1);
}

/* SVG Lace Edge Divider */
.lace-divider {
  width: 100%;
  height: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 12' width='40' height='12' fill='%23C5A059' opacity='0.35'%3E%3Cpath d='M20 12 C14 12 11 4 0 4 L0 0 L40 0 L40 4 C29 4 26 12 20 12 Z'/%3E%3Ccircle cx='20' cy='6' r='1.2' fill='%23C5A059'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center;
  margin: 1.5rem 0;
}

/* Celestial Flourish Crest SVG */
.celestial-crest-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C5A059' stroke-width='1.5'%3E%3Cpath d='M12 2 L13.5 8.5 L20 10 L13.5 11.5 L12 18 L10.5 11.5 L4 10 L10.5 8.5 Z'/%3E%3Ccircle cx='12' cy='10' r='1.5' fill='%23C5A059'/%3E%3Cpath d='M6 18 L7 15 L10 16 Z' opacity='0.5'/%3E%3Cpath d='M18 18 L17 15 L14 16 Z' opacity='0.5'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  vertical-align: middle;
}

/* Scalloped Header Bar Banner */
.doily-banner {
  background: radial-gradient(circle at 50% 50%, #FAF3EB 0%, #F5E9DB 100%);
  border-top: 1px solid rgba(197, 160, 89, 0.25);
  border-bottom: 1px solid rgba(197, 160, 89, 0.25);
  position: relative;
}

.doily-banner::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 6' width='20' height='6' fill='%23FAF3EB'%3E%3Cpath d='M0 0 Q10 7 20 0 Z'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
}
