:root {
  --parchment:      #FDFCF8;
  --parchment-warm: #F7F3EC;
  --parchment-sage: #F3F7F3;
  --binding:        #2C3E50;
  --ink:            #1A1A2E;
  --sage:           #7C9A7E;
  --sage-mist:      #D4E4D5;
  --brass:          #B59A7D;
  --brass-light:    #E8DDD0;
  --text-muted:     #7A7A8A;
  --divider:        rgba(26,26,46,0.08);
}

body {
  background: radial-gradient(circle at center top, #1e293b 0%, #0f172a 100%);
  color: var(--parchment);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.stationery {
  background-color: var(--parchment);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

.glass-nav {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card {
  background: rgba(253, 252, 248, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hover-lift {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 30px -5px rgba(0, 0, 0, 0.4), 0 15px 15px -5px rgba(0, 0, 0, 0.2);
}

.screenshot-frame {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 4px solid rgba(255,255,255, 0.1);
}

.serif { font-family: 'Cormorant Garamond', serif; }
.lora  { font-family: 'Lora', serif; }
.sans  { font-family: 'Montserrat', sans-serif; }

a { color: var(--sage); text-decoration: none; }
a:hover { text-decoration: underline; }

.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.section-head-rule {
  flex: 1;
  height: 1px;
  background: var(--brass);
  opacity: 0.3;
}

.highlight-block {
  background: var(--parchment-sage);
  border-left: 3px solid var(--sage);
  border-radius: 0 4px 4px 0;
  padding: 16px 20px;
}

.note-block {
  background: var(--parchment-warm);
  border-left: 3px solid var(--brass);
  border-radius: 0 4px 4px 0;
  padding: 16px 20px;
}

.warn-block {
  background: #FFF8F0;
  border-left: 3px solid #D4943A;
  border-radius: 0 4px 4px 0;
  padding: 16px 20px;
}

.toc-link {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--sage);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  transition: color 0.2s;
}
.toc-link:hover { color: var(--binding); }

.num-badge, .step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brass-light);
  border: 1px solid rgba(181,154,125,0.4);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  color: #8C7355;
  flex-shrink: 0;
  margin-top: 1px;
}

.perm-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 13px;
  border-radius: 999px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--brass-light);
  color: #8C7355;
  border: 1px solid rgba(181,154,125,0.3);
  white-space: nowrap;
}

.perm-row, .step-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--divider);
}
.perm-row:last-child, .step-row:last-child { border-bottom: none; }

.perm-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--parchment-warm);
  border: 1px solid rgba(181,154,125,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.05rem;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--parchment-warm);
  border: 1.5px solid var(--brass);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--brass);
}

.input-field {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(26, 26, 46, 0.2);
  padding: 12px 0;
  color: #1A1A2E;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.3s;
}
.input-field:focus {
  outline: none;
  border-bottom-color: var(--brass);
}
.input-field::placeholder {
  color: rgba(26, 26, 46, 0.4);
  font-weight: 300;
}
textarea.input-field {
  resize: vertical;
  min-height: 100px;
}
    
.spinner {
  border: 2px solid rgba(26, 26, 46, 0.1);
  border-left-color: var(--ink);
  border-radius: 50%;
  width: 1rem;
  height: 1rem;
  animation: spin 1s linear infinite;
  display: none;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation: fade-in 0.4s ease forwards; }
.disabled-btn { pointer-events: none; opacity: 0.7; }

@keyframes glow-pulse {
  0%,100% { filter: drop-shadow(0 0 2px rgba(181,154,125,0.4)); opacity:0.8; transform:scale(1); }
  50%      { filter: drop-shadow(0 0 14px rgba(181,154,125,0.7)); opacity:1; transform:scale(1.05); }
}
.sparkle { animation: glow-pulse 8s ease-in-out infinite; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card-in { animation: card-in 0.6s ease both; }

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 6px;
  background: var(--binding);
  color: var(--parchment);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: opacity 0.2s;
}
.store-btn:hover { opacity: 0.85; text-decoration: none; }

.code-pill {
  display: inline-block;
  font-family: 'Montserrat', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--binding);
  background: var(--brass-light);
  border: 1px solid rgba(181,154,125,0.5);
  border-radius: 4px;
  padding: 6px 16px;
}