/* Components: Cards, Modals, Forms, and Interactive Elements */

/* THOUGHT CARD */
.thought-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.thought-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-hover);
}

.thought-card-number {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
}

.thought-card-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.thought-card-preview {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.6;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.thought-card-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.thought-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}

.thought-card-date {
  font-size: 0.74rem;
  color: var(--text-tertiary);
  font-weight: 400;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.thought-card-read-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-style: italic;
  font-weight: 400;
  transition: color var(--transition-fast);
}

.thought-card-arrow {
  width: 13px;
  height: 13px;
  color: var(--text-tertiary);
  transition: all var(--transition-base);
}

.thought-card:hover .thought-card-read-hint {
  color: var(--text-primary);
}

.thought-card:hover .thought-card-arrow {
  color: var(--text-primary);
  transform: translateX(3px);
}

.thought-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  flex-wrap: wrap;
}

.thought-card.has-kholif-fav {
  border-color: rgba(180, 83, 9, 0.25);
  background: linear-gradient(180deg, rgba(254, 243, 199, 0.15) 0%, var(--bg-card) 60%);
}

.thought-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.thought-card-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.kholif-fav-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  color: #B45309;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  padding: 2px 7px;
  border-radius: var(--radius-xl);
  letter-spacing: 0.02em;
}

.pill.pill-kholif-fav {
  border-color: #FDE68A;
  color: #B45309;
  background: #FFFBEB;
}

.pill.pill-kholif-fav:hover {
  background: #FEF3C7;
  border-color: #F59E0B;
  color: #92400E;
}

.pill.pill-kholif-fav.active {
  background: #B45309;
  color: #FFFFFF;
  border-color: #B45309;
}

.thought-card-category {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* NOTES (GUESTBOOK) */
.notes-section {
  background: var(--bg-secondary);
}

.note-form-container {
  max-width: 680px;
  margin: 0 auto 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.note-form-container:focus-within {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.note-form-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.note-form-message {
  position: relative;
}

.note-form-message textarea {
  min-height: 90px;
  padding-bottom: 28px;
}

.char-count {
  position: absolute;
  right: 12px;
  bottom: 8px;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  pointer-events: none;
  transition: color var(--transition-fast);
}

.char-count.near-limit {
  color: #D97706;
  font-weight: 500;
}

.char-count.at-limit {
  color: #D4534B;
  font-weight: 600;
}

.note-form-feedback {
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  line-height: 1.5;
  border: 1px solid transparent;
}

.note-form-feedback.is-error {
  background: #FDF2F2;
  border-color: rgba(212, 83, 75, 0.3);
  color: #B93830;
}

.note-form-feedback.is-success {
  background: #F0F9F4;
  border-color: rgba(75, 155, 107, 0.3);
  color: #2E7D52;
}

.btn-send-note {
  align-self: flex-start;
}

.notes-info {
  max-width: 800px;
  margin: 0 auto 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.notes-count {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  font-family: var(--font-serif);
}

.notes-max {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  font-style: italic;
}

.notes-grid {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.note-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: visible;
  transform-origin: top center;
  perspective: 1000px;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Tekstur lipatan kertas surat di bagian atas kartu */
.note-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(139, 157, 175, 0.15), rgba(139, 157, 175, 0.35), rgba(139, 157, 175, 0.15));
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

/* Segel Lilin Vintage Mini (Wax Seal Stamp) */
.note-wax-seal {
  position: absolute;
  top: -8px;
  right: 18px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #B94A42, #7F2620 70%, #5C1914 100%);
  box-shadow: 0 3px 8px rgba(92, 25, 20, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.35), inset 0 -1px 2px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  cursor: pointer;
  transform: rotate(-8deg);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  user-select: none;
}

.note-wax-seal .wax-seal-symbol {
  font-size: 0.62rem;
  color: #FEE2E2;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
  font-weight: 700;
  line-height: 1;
}

[data-theme="dark"] .note-wax-seal {
  background: radial-gradient(circle at 35% 35%, #D4534B, #9E2A23 70%, #6E1A14 100%);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.25);
}

/* Animasi Buka Lipatan Kertas (Paper Unfold) saat disentuh / hover */
.note-card:hover,
.note-card.is-unfolded {
  transform: translateY(-5px) rotateX(2deg) scale(1.015);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  border-color: var(--border-hover);
}

.note-card:hover .note-wax-seal,
.note-card.is-unfolded .note-wax-seal {
  transform: rotate(12deg) scale(1.12);
  box-shadow: 0 5px 14px rgba(92, 25, 20, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.note-card.note-owner {
  border-left: 3px solid var(--accent);
  background: #FCFCFA;
}

.note-card.note-pinned {
  border-color: rgba(217, 119, 6, 0.38);
  background: linear-gradient(180deg, rgba(254, 243, 199, 0.35) 0%, var(--bg-card) 60%);
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.06);
}

[data-theme="dark"] .note-card.note-pinned {
  border-color: rgba(245, 158, 11, 0.38);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.1) 0%, var(--bg-card) 65%);
}

.note-pinned-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #B45309;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  margin-bottom: -2px;
}

[data-theme="dark"] .note-pinned-badge {
  color: #FCD34D;
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.32);
}

.note-pinned-badge .pin-svg-icon {
  flex-shrink: 0;
  transform: rotate(12deg);
}

.note-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.note-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  background: #8B9DAF;
}

.note-avatar[data-color="0"] { background: #8B9DAF; }
.note-avatar[data-color="1"] { background: #A08B9D; }
.note-avatar[data-color="2"] { background: #8BAF9D; }
.note-avatar[data-color="3"] { background: #AF9F8B; }
.note-avatar[data-color="4"] { background: #9D8BAF; }
.note-avatar[data-color="5"] { background: #7C98A6; }

.note-sender-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.note-sender-name {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.note-owner-badge {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(139, 157, 175, 0.12);
  padding: 2px 8px;
  border-radius: var(--radius-xl);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.note-time {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-weight: 300;
}

.note-message {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  font-weight: 300;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  max-height: 155px;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-hover) transparent;
}

.note-message::-webkit-scrollbar {
  width: 4px;
}

.note-message::-webkit-scrollbar-track {
  background: transparent;
}

.note-message::-webkit-scrollbar-thumb {
  background-color: var(--border-hover);
  border-radius: 4px;
}

/* ── Reaksi Emoji Instan di Kartu Catatan (🤍, ✨, ☕) ── */
.note-reactions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.note-reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 400;
  cursor: pointer;
  user-select: none;
  transition: all 0.18s ease;
}

.note-reaction-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-card);
  transform: translateY(-1px);
}

.note-reaction-btn:active {
  transform: scale(0.94);
}

.note-reaction-btn.reacted {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--text-primary);
  font-weight: 500;
}

.reaction-emoji {
  font-size: 0.85rem;
  line-height: 1;
}

.reaction-count {
  font-size: 0.72rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 680px) {
  .notes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .note-form-container {
    padding: 20px;
  }
  .note-reaction-btn {
    padding: 3px 7px;
    font-size: 0.68rem;
  }
}

/* MODALS */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(250, 250, 248, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  padding: 20px;
  overflow-y: auto;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  position: relative;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-slow), opacity var(--transition-base);
  opacity: 0;
}

.modal-overlay.open .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
  z-index: 10;
}

.modal-close:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* ── Thought Detail Modal ── */
.thought-detail-modal {
  max-width: 680px;
  padding: 64px 56px;
}

.modal-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 16px;
  pointer-events: none;
}

.modal-nav-btn {
  pointer-events: all;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.modal-nav-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.modal-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.thought-detail-body {
  text-align: center;
}

.thought-detail-number {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}

.thought-detail-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 32px;
}

.thought-detail-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.9;
  font-weight: 300;
  font-style: italic;
  max-width: 520px;
  margin: 0 auto 32px;
  white-space: pre-line;
}

.thought-detail-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.thought-detail-date {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  font-weight: 300;
}

.thought-detail-category {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1px solid var(--accent-light);
  border-radius: var(--radius-xl);
}

.modal-kholif-fav-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #B45309;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  padding: 4px 12px;
  border-radius: var(--radius-xl);
}

.thought-detail-author {
  font-size: 0.95rem;
  color: var(--text-tertiary);
  font-weight: 300;
  font-style: italic;
}

/* ── Aksi Modal Detail (Salin & Favorit) ── */
.thought-detail-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.btn-modal-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-xl);
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}

.btn-modal-action:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--bg-card);
  transform: translateY(-1px);
}

.btn-modal-action.liked {
  color: #D4534B;
  background: #FDF2F2;
  border-color: rgba(212, 83, 75, 0.25);
}

.btn-modal-action.liked svg {
  fill: #D4534B;
  stroke: #D4534B;
}

.card-favorite-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast), transform var(--transition-fast);
  margin-right: auto;
}

.card-favorite-btn:hover {
  color: #D4534B;
  transform: scale(1.15);
}

.card-favorite-btn.liked {
  color: #D4534B;
}

.card-favorite-btn.liked svg {
  fill: #D4534B;
  stroke: #D4534B;
}

/* FORM MODAL */
.form-modal {
  max-width: 520px;
  padding: 48px 40px;
}

.form-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  line-height: 1.5;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 157, 175, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-tertiary);
  font-weight: 300;
}

.form-group select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239B9B9B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* RESPONSIVE COMPONENTS */
@media (max-width: 768px) {
  /* Kartu Pemikiran di Tablet/HP */
  .thought-card {
    padding: 20px 18px;
    gap: 10px;
    border-radius: var(--radius-sm);
  }

  .thought-card-title {
    font-size: 1.04rem;
  }

  .thought-card-preview {
    font-size: 0.84rem;
  }

  /* Form & Catatan Pengunjung di HP */
  .note-form-container {
    padding: 22px 18px;
    margin-bottom: 24px;
    border-radius: var(--radius-md);
  }

  .form-group {
    margin-bottom: 12px;
  }

  .form-group label {
    font-size: 0.78rem;
    margin-bottom: 4px;
  }

  .form-group input,
  .form-group textarea {
    padding: 9px 12px;
    font-size: 0.84rem;
  }

  .btn-submit-note {
    padding: 9px 22px;
    font-size: 0.84rem;
  }

  .notes-grid {
    gap: 12px;
  }

  .note-card {
    padding: 16px 14px;
    gap: 8px;
    border-radius: var(--radius-sm);
  }

  .note-sender {
    font-size: 0.82rem;
  }

  .note-message {
    font-size: 0.84rem;
    line-height: 1.55;
  }

  /* Modal Baca Lengkap */
  .thought-detail-modal {
    padding: 38px 22px 24px;
    border-radius: var(--radius-md);
    max-height: 85vh;
  }

  .thought-detail-title {
    font-size: 1.35rem;
    line-height: 1.35;
  }

  .thought-detail-body {
    font-size: 0.92rem;
    line-height: 1.7;
  }

  .form-modal {
    padding: 32px 20px;
  }

  .modal-nav {
    position: static;
    transform: none;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 0;
  }

  .modal-nav-btn {
    position: static;
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 480px) {
  .thought-card {
    padding: 16px 14px;
    gap: 8px;
  }

  .thought-card-number {
    font-size: 0.7rem;
  }

  .thought-card-title {
    font-size: 0.98rem;
  }

  .thought-card-preview {
    font-size: 0.8rem;
    line-height: 1.5;
  }

  .kholif-fav-badge {
    font-size: 0.6rem;
    padding: 2px 6px;
  }

  .thought-detail-modal {
    padding: 32px 16px 20px;
  }

  .thought-detail-title {
    font-size: 1.2rem;
  }

  .thought-detail-body {
    font-size: 0.86rem;
    line-height: 1.65;
  }

  .modal-close {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    font-size: 1.15rem;
  }
}

/* QUICK COPY, BOOKMARK BADGE & SCROLL TO TOP */
.thought-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.thought-card-meta-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.card-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
}

.card-copy-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-card);
  transform: translateY(-1px);
}

.card-copy-btn.copied {
  background: #ECFDF5;
  border-color: #A7F3D0;
  color: #047857;
  font-weight: 500;
}

.saved-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(212, 83, 75, 0.14);
  color: #D4534B;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1;
}

.pill.active .saved-count-badge {
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
}

/* ── Floating Scroll to Top Button (Muncul otomatis saat scroll > 500px) ── */
.scroll-to-top-btn {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  color: var(--text-primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.94);
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.28s ease,
              background-color 0.2s ease,
              border-color 0.2s ease;
}

.scroll-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.scroll-to-top-btn:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
  transform: translateY(-3px) scale(1.03);
}

@media (max-width: 768px) {
  .scroll-to-top-btn {
    right: 16px;
    bottom: 18px;
    width: 38px;
    height: 38px;
  }

  .card-copy-btn {
    padding: 3px 8px;
    font-size: 0.65rem;
  }
}

/* DARK MODE OVERRIDES (CHARCOAL) */
[data-theme="dark"] .thought-card.has-kholif-fav {
  border-color: rgba(245, 158, 11, 0.32);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, var(--bg-card) 65%);
}

[data-theme="dark"] .kholif-fav-badge,
[data-theme="dark"] .modal-kholif-fav-badge {
  color: #FCD34D;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.32);
}

[data-theme="dark"] .pill.pill-kholif-fav {
  color: #FCD34D;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.28);
}

[data-theme="dark"] .pill.pill-kholif-fav:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.45);
  color: #FDE68A;
}

[data-theme="dark"] .pill.pill-kholif-fav.active {
  background: #D97706;
  color: #FFFFFF;
  border-color: #D97706;
}

[data-theme="dark"] .note-card.note-owner {
  background: #262623;
}

[data-theme="dark"] .note-form-feedback.is-error {
  background: rgba(212, 83, 75, 0.14);
  border-color: rgba(212, 83, 75, 0.35);
  color: #F87171;
}

[data-theme="dark"] .note-form-feedback.is-success {
  background: rgba(75, 155, 107, 0.14);
  border-color: rgba(75, 155, 107, 0.35);
  color: #6EE7B7;
}

[data-theme="dark"] .modal-overlay {
  background: rgba(12, 12, 11, 0.72);
}

[data-theme="dark"] .btn-modal-action.liked {
  color: #F87171;
  background: rgba(212, 83, 75, 0.16);
  border-color: rgba(248, 113, 113, 0.32);
}

[data-theme="dark"] .card-copy-btn.copied {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.35);
  color: #6EE7B7;
}

[data-theme="dark"] .scroll-to-top-btn {
  background: rgba(34, 34, 32, 0.92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .scroll-to-top-btn:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
}

/* 1. WIDGET "SEDANG MENDENGARKAN" (SPOTIFY NOW PLAYING REAL-TIME) */
.spotify-now-playing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 26px;
  max-width: 100%;
}

.spotify-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px 8px 8px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  max-width: 420px;
}

.spotify-pill:hover {
  border-color: rgba(29, 185, 84, 0.45);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.spotify-cover-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(29, 185, 84, 0.12);
  color: #1DB954;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: visible;
}

.spotify-album-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: block;
}

.spotify-cover-fallback {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(29, 185, 84, 0.18), rgba(29, 185, 84, 0.06));
  color: #1DB954;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.spotify-now-playing.is-offline .spotify-cover-fallback {
  background: var(--bg-secondary);
  color: var(--text-tertiary);
}

.spotify-mini-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-card);
  color: #1DB954;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
}

.spotify-now-playing.is-offline .spotify-mini-badge {
  color: var(--text-tertiary);
}

.spotify-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.spotify-status-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.spotify-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1DB954;
  box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.22);
  flex-shrink: 0;
  animation: spotifyLivePulse 2s ease-in-out infinite;
}

.spotify-now-playing.is-offline .spotify-live-dot {
  background: #9ca3af;
  box-shadow: none;
  animation: none;
}

@keyframes spotifyLivePulse {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.18);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(29, 185, 84, 0.34);
  }
}

.spotify-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
  margin-left: 2px;
}

.spotify-eq span {
  display: block;
  width: 2px;
  background: #1DB954;
  border-radius: 2px;
  animation: spotifyEqBounce 1.1s ease-in-out infinite;
}

.spotify-eq span:nth-child(1) {
  height: 4px;
  animation-delay: 0s;
}

.spotify-eq span:nth-child(2) {
  height: 9px;
  animation-delay: 0.22s;
}

.spotify-eq span:nth-child(3) {
  height: 6px;
  animation-delay: 0.45s;
}

.spotify-now-playing.is-offline .spotify-eq {
  display: none;
}

@keyframes spotifyEqBounce {
  0%, 100% {
    transform: scaleY(0.45);
  }
  50% {
    transform: scaleY(1.1);
  }
}

.spotify-track-line {
  font-size: 0.84rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 310px;
}

.spotify-track-line strong {
  font-weight: 600;
  color: var(--text-primary);
}

.spotify-track-sep {
  margin: 0 4px;
  color: var(--text-tertiary);
}

/* 2. MODAL KARTU PEMIKIRAN HARI INI (TAROT / AFFIRMATION STYLE) */
.daily-card-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 400px;
  padding: 16px;
  transform: translateY(16px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .daily-card-stage {
  transform: translateY(0) scale(1);
}

.daily-modal-close {
  position: absolute;
  top: -8px;
  right: 4px;
  z-index: 20;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.tarot-scene {
  position: relative;
  width: 100%;
  max-width: 350px;
  height: 470px;
  perspective: 1300px;
}

/* Tumpukan Kartu di Belakang (Deck Stack) */
.tarot-deck-stack {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform-style: preserve-3d;
  z-index: 1;
}

.tarot-deck-card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background: #1C1B19;
  color: #EAE6DF;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
  will-change: transform;
}

.tarot-deck-card .tarot-back-border {
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.03), transparent 65%);
}

/* Posisi Tumpukan Kartu Saat Diam di Belakang Kartu Utama */
.deck-card-1 {
  transform: translate3d(-7px, 6px, -18px) rotate(-2.4deg) scale(0.975);
  opacity: 0.92;
}

.deck-card-2 {
  transform: translate3d(7px, 9px, -34px) rotate(2.2deg) scale(0.955);
  opacity: 0.84;
}

.deck-card-3 {
  transform: translate3d(-4px, 13px, -50px) rotate(-1.3deg) scale(0.935);
  opacity: 0.72;
}

.deck-card-4 {
  transform: translate3d(5px, 16px, -66px) rotate(1.5deg) scale(0.915);
  opacity: 0.6;
}

.tarot-card {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 5;
  transform-style: preserve-3d;
  transition: transform 0.78s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
  will-change: transform;
}

.tarot-card.is-flipped {
  transform: translate3d(0, -4px, 16px) rotateY(180deg);
}

/* ── Animasi Mengacak Tumpukan Kartu (Riffle Cut + Tarot Fan + Square Up) ── */
.tarot-scene.is-shuffling .tarot-card {
  transition: none;
  animation: shuffleMainCard 1.15s cubic-bezier(0.32, 0, 0.24, 1) forwards;
}

.tarot-scene.is-shuffling .deck-card-1 {
  transition: none;
  animation: shuffleDeckCard1 1.15s cubic-bezier(0.32, 0, 0.24, 1) forwards;
}

.tarot-scene.is-shuffling .deck-card-2 {
  transition: none;
  animation: shuffleDeckCard2 1.15s cubic-bezier(0.32, 0, 0.24, 1) forwards;
}

.tarot-scene.is-shuffling .deck-card-3 {
  transition: none;
  animation: shuffleDeckCard3 1.15s cubic-bezier(0.32, 0, 0.24, 1) forwards;
}

.tarot-scene.is-shuffling .deck-card-4 {
  transition: none;
  animation: shuffleDeckCard4 1.15s cubic-bezier(0.32, 0, 0.24, 1) forwards;
}

@keyframes shuffleMainCard {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
  20% {
    transform: translate3d(-66px, -14px, 24px) rotate(-13deg) scale(0.97);
  }
  42% {
    transform: translate3d(62px, 10px, -14px) rotate(11deg) scale(0.96);
  }
  66% {
    /* Mekar seperti kipas kartu tarot (tengah) */
    transform: translate3d(0, -18px, 32px) rotate(0deg) scale(1.02);
  }
  84% {
    transform: translate3d(-8px, 4px, 8px) rotate(-2deg) scale(0.99);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
}

@keyframes shuffleDeckCard1 {
  0% {
    transform: translate3d(-7px, 6px, -18px) rotate(-2.4deg) scale(0.975);
  }
  20% {
    transform: translate3d(68px, -10px, 10px) rotate(14deg) scale(0.96);
  }
  42% {
    transform: translate3d(-60px, 12px, 18px) rotate(-12deg) scale(0.97);
  }
  66% {
    /* Kipas kiri 1 */
    transform: translate3d(-44px, -6px, 12px) rotate(-10deg) scale(0.97);
  }
  84% {
    transform: translate3d(12px, 4px, -12px) rotate(3deg) scale(0.975);
  }
  100% {
    transform: translate3d(-7px, 6px, -18px) rotate(-2.4deg) scale(0.975);
  }
}

@keyframes shuffleDeckCard2 {
  0% {
    transform: translate3d(7px, 9px, -34px) rotate(2.2deg) scale(0.955);
  }
  20% {
    transform: translate3d(-48px, 18px, -12px) rotate(-9deg) scale(0.95);
  }
  42% {
    transform: translate3d(52px, -18px, 22px) rotate(13deg) scale(0.96);
  }
  66% {
    /* Kipas kanan 1 */
    transform: translate3d(44px, -6px, 6px) rotate(10deg) scale(0.97);
  }
  84% {
    transform: translate3d(-10px, 7px, -24px) rotate(-3deg) scale(0.96);
  }
  100% {
    transform: translate3d(7px, 9px, -34px) rotate(2.2deg) scale(0.955);
  }
}

@keyframes shuffleDeckCard3 {
  0% {
    transform: translate3d(-4px, 13px, -50px) rotate(-1.3deg) scale(0.935);
  }
  20% {
    transform: translate3d(42px, 20px, -26px) rotate(8deg) scale(0.94);
  }
  42% {
    transform: translate3d(-44px, -16px, -8px) rotate(-10deg) scale(0.95);
  }
  66% {
    /* Kipas kiri jauh */
    transform: translate3d(-82px, 12px, -14px) rotate(-19deg) scale(0.94);
  }
  84% {
    transform: translate3d(6px, 10px, -40px) rotate(2deg) scale(0.94);
  }
  100% {
    transform: translate3d(-4px, 13px, -50px) rotate(-1.3deg) scale(0.935);
  }
}

@keyframes shuffleDeckCard4 {
  0% {
    transform: translate3d(5px, 16px, -66px) rotate(1.5deg) scale(0.915);
  }
  20% {
    transform: translate3d(-32px, -20px, -36px) rotate(-7deg) scale(0.92);
  }
  42% {
    transform: translate3d(36px, 18px, -28px) rotate(9deg) scale(0.93);
  }
  66% {
    /* Kipas kanan jauh */
    transform: translate3d(82px, 12px, -22px) rotate(19deg) scale(0.94);
  }
  84% {
    transform: translate3d(-6px, 14px, -54px) rotate(-2deg) scale(0.92);
  }
  100% {
    transform: translate3d(5px, 16px, -66px) rotate(1.5deg) scale(0.915);
  }
}

.tarot-card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.18);
}

/* Sisi Belakang Kartu (Tarot Back) */
.tarot-card-back {
  background: #181715;
  color: #EAE6DF;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
}

.tarot-back-border {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(234, 230, 223, 0.2);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  background: radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.04), transparent 65%);
  outline: 1px dashed rgba(234, 230, 223, 0.1);
  outline-offset: -5px;
}

.tarot-back-emblem {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #EAE6DF;
  margin-bottom: 2px;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.tarot-card:hover .tarot-back-emblem {
  transform: translateY(-1px);
}

.tarot-back-brand {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.tarot-back-sub {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(234, 230, 223, 0.65);
}

.tarot-back-hint {
  position: absolute;
  bottom: 22px;
  font-size: 0.72rem;
  color: rgba(234, 230, 223, 0.55);
  font-style: italic;
}

/* Sisi Depan Kartu (Isi Kutipan) */
.tarot-card-front {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 14px;
  transform: rotateY(180deg);
}

.tarot-front-inner {
  width: 100%;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(139, 157, 175, 0.05) 0%, transparent 45%);
}

.tarot-front-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tarot-badge {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #D97706;
}

[data-theme="dark"] .tarot-badge {
  color: #FCD34D;
}

.tarot-category {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}

.tarot-front-body {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  overflow-y: auto;
  max-height: 310px;
  padding: 6px 2px;
}

.tarot-number {
  font-family: var(--font-serif);
  font-size: 0.82rem;
  color: var(--text-tertiary);
  letter-spacing: 0.08em;
}

.tarot-title {
  font-family: var(--font-serif);
  font-size: 1.32rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-primary);
}

.tarot-text {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text-secondary);
  font-weight: 300;
  white-space: pre-line;
}

.tarot-front-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  font-size: 0.76rem;
  color: var(--text-tertiary);
}

.tarot-author {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text-secondary);
}

.daily-card-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-daily-action {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-daily-action:hover {
  border-color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-daily-action.liked {
  color: #D4534B;
  border-color: rgba(212, 83, 75, 0.35);
  background: #FDF2F2;
}

[data-theme="dark"] .btn-daily-action.liked {
  color: #F87171;
  background: rgba(212, 83, 75, 0.16);
}

/* 3. FLOATING AMBIENT SOUND / LO-FI PLAYER */
.ambient-player-widget {
  position: fixed;
  left: 24px;
  bottom: 26px;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ambient-toggle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  color: var(--text-primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

[data-theme="dark"] .ambient-toggle-btn {
  background: rgba(34, 34, 32, 0.92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.ambient-toggle-btn:hover {
  border-color: var(--text-primary);
  transform: translateY(-2px);
}

.ambient-toggle-btn.playing {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.ambient-toggle-btn .ambient-eq-bars {
  display: none;
  align-items: flex-end;
  gap: 2.5px;
  height: 14px;
}

.ambient-toggle-btn.playing .ambient-icon-idle {
  display: none;
}

.ambient-toggle-btn.playing .ambient-eq-bars {
  display: inline-flex;
}

.ambient-eq-bars span {
  display: block;
  width: 2.2px;
  background: currentColor;
  border-radius: 2px;
  animation: ambientWave 1.2s ease-in-out infinite;
}

.ambient-eq-bars span:nth-child(1) {
  height: 6px;
  animation-delay: 0s;
}

.ambient-eq-bars span:nth-child(2) {
  height: 13px;
  animation-delay: 0.2s;
}

.ambient-eq-bars span:nth-child(3) {
  height: 8px;
  animation-delay: 0.4s;
}

.ambient-eq-bars span:nth-child(4) {
  height: 11px;
  animation-delay: 0.15s;
}

@keyframes ambientWave {
  0%, 100% {
    transform: scaleY(0.35);
  }
  50% {
    transform: scaleY(1.05);
  }
}

.ambient-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 400;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  transition: all 0.25s ease;
  opacity: 0.85;
}

[data-theme="dark"] .ambient-mode-pill {
  background: rgba(34, 34, 32, 0.9);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.38);
}

.ambient-player-widget:hover .ambient-mode-pill,
.ambient-player-widget.is-playing .ambient-mode-pill {
  opacity: 1;
  color: var(--text-primary);
}

.ambient-mode-pill:hover {
  border-color: var(--text-primary);
  transform: translateY(-1px);
}

.ambient-mode-emoji {
  font-size: 0.85rem;
  line-height: 1;
}

@media (max-width: 768px) {
  .ambient-player-widget {
    left: 14px;
    bottom: 18px;
    gap: 6px;
  }

  .ambient-toggle-btn {
    width: 38px;
    height: 38px;
  }

  .ambient-mode-pill {
    padding: 5px 10px;
    font-size: 0.68rem;
  }

  .spotify-pill {
    padding: 8px 14px 8px 10px;
    max-width: 280px;
  }

  .spotify-track-line {
    font-size: 0.76rem;
    max-width: 195px;
  }

  .tarot-scene {
    max-width: 310px;
    height: 430px;
  }

  .tarot-title {
    font-size: 1.15rem;
  }

  .tarot-text {
    font-size: 0.82rem;
  }
}

/* PESAN RAHASIA & STATUS CATATAN DITUTUP */
.note-privacy-option {
  margin: 12px 0 16px;
  display: flex;
  align-items: center;
}

.note-privacy-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 0.84rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.note-privacy-label:hover {
  color: var(--text-primary);
}

.note-privacy-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  border-radius: 4px;
}

.note-privacy-text {
  line-height: 1.4;
}

/* WIDGET ANTI-BOT CLOUDFLARE TURNSTILE */
.note-turnstile-wrap {
  margin: 6px 0 16px;
  display: flex;
  justify-content: flex-start;
  min-height: 42px;
}

.cf-turnstile-widget {
  min-height: 42px;
}

.notes-closed-notice {
  max-width: 800px;
  margin: 0 auto 32px;
  background: var(--bg-card);
  border: 1px solid rgba(212, 83, 75, 0.25);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.notes-closed-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.notes-closed-title {
  display: block;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-family: var(--font-serif);
}

.notes-closed-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.note-private-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #B45309;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

[data-theme="dark"] .note-private-badge {
  color: #FCD34D;
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.32);
}

.note-card.note-private {
  border-left: 3px solid #F59E0B;
  background: linear-gradient(180deg, rgba(254, 243, 199, 0.2) 0%, var(--bg-card) 60%);
}

[data-theme="dark"] .note-card.note-private {
  border-left-color: #F59E0B;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, var(--bg-card) 60%);
}

/* ── Tombol Aksi Kartu Pemikiran (Fokus, Story IG, Salin) ── */
.card-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

[data-theme="dark"] .card-action-pill {
  background: rgba(255, 255, 255, 0.04);
}

.card-action-pill:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.card-action-pill:active {
  transform: translateY(0);
}

.card-focus-btn:hover svg {
  color: var(--accent);
}

.card-story-btn:hover svg {
  color: #E1306C;
}

/* MODE FOKUS BACA (READING FOCUS) */
body.reading-focus-active {
  overflow: hidden;
}

.reading-focus-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.reading-focus-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.focus-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 18, 24, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

[data-theme="dark"] .focus-backdrop {
  background: rgba(6, 8, 12, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.focus-close-btn {
  position: absolute;
  top: 24px;
  right: 28px;
  z-index: 10002;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.focus-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.focus-spotlight-card {
  position: relative;
  z-index: 10001;
  max-width: 620px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 44px 40px 36px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45), 0 0 100px rgba(255, 255, 255, 0.08);
  transform: scale(0.96) translateY(12px);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.32s ease;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.reading-focus-overlay.is-active .focus-spotlight-card {
  transform: scale(1) translateY(0);
}

.focus-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.focus-card-category {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: rgba(139, 157, 175, 0.12);
  padding: 4px 12px;
  border-radius: 999px;
}

.focus-card-number {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-tertiary);
  font-family: var(--font-serif);
}

.focus-card-title {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  margin: 0;
}

.focus-card-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-secondary);
  font-weight: 300;
  white-space: pre-line;
}

.focus-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 6px;
}

.focus-card-date {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.focus-card-author {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.focus-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.btn-focus-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-focus-action:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
  transform: translateY(-1px);
}

/* TEMPLATE GENERATOR STORY IG 9:16 (1080x1920) */
.story-export-wrapper {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1080px;
  height: 1920px;
  overflow: hidden;
  z-index: -9999;
  pointer-events: none;
  background: #F9F8F6;
}

.story-canvas-card {
  width: 1080px;
  height: 1920px;
  box-sizing: border-box;
  background: #F9F8F6;
  padding: 110px 100px;
  display: flex;
  flex-direction: column;
  position: relative;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

.story-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1.5px solid rgba(139, 157, 175, 0.32);
  border-radius: 36px;
  padding: 90px 80px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.95) 0%, rgba(249, 248, 246, 0.95) 100%);
}

.story-top-badge {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.story-site-tag {
  font-size: 22px;
  letter-spacing: 0.28em;
  font-weight: 600;
  color: #7B8893;
  text-transform: uppercase;
}

.story-category-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  line-height: 1;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: #2D3748;
  background: rgba(139, 157, 175, 0.15);
  padding: 9px 22px 9px calc(22px + 0.14em);
  border-radius: 999px;
  text-transform: uppercase;
  box-sizing: border-box;
}

.story-center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: auto 0;
  width: 100%;
}

.story-quote-mark {
  font-family: 'Newsreader', 'Playfair Display', Georgia, serif;
  font-size: 150px;
  line-height: 0.7;
  color: rgba(139, 157, 175, 0.28);
  margin: 0 auto 24px auto;
  text-align: center;
}

.story-quote-title {
  font-family: 'Newsreader', 'Playfair Display', Georgia, serif;
  font-size: 58px;
  font-weight: 600;
  line-height: 1.3;
  color: #1A202C;
  margin: 0 auto 36px auto;
  letter-spacing: -0.01em;
  text-align: center;
  max-width: 820px;
}

.story-quote-text {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 32px;
  font-weight: 300;
  line-height: 1.85;
  color: #4A5568;
  white-space: pre-line;
  margin: 0 auto 44px auto;
  max-height: 820px;
  overflow: hidden;
  text-align: center;
  max-width: 820px;
}

.story-author-line {
  font-family: 'Newsreader', 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 34px;
  color: #718096;
  text-align: center;
  margin: 0 auto;
}

.story-bottom-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-top: 36px;
  border-top: 1.5px solid rgba(139, 157, 175, 0.22);
}

.story-watermark {
  font-family: 'Newsreader', 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #8C9BAE;
}

.story-date-tag {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: #A0AEC0;
}

@media (max-width: 600px) {
  .focus-spotlight-card {
    padding: 30px 20px 24px;
    border-radius: 16px;
  }

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

  .focus-card-body {
    font-size: 0.95rem;
    line-height: 1.75;
  }

  .focus-close-btn {
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
  }

  .thought-card-actions {
    flex-wrap: wrap;
    gap: 6px;
  }

  .card-action-pill {
    padding: 3px 8px;
    font-size: 0.7rem;
  }
}

/* SAKELAR LAMPU MEJA / JAM 2 PAGI */
.desk-lamp-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  user-select: none;
}

.desk-lamp-btn:hover {
  border-color: #F59E0B;
  color: #D97706;
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.desk-lamp-btn.is-lamp-on {
  background: #FEF3C7;
  border-color: #F59E0B;
  color: #B45309;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.5), inset 0 0 4px rgba(245, 158, 11, 0.2);
}

[data-theme="dark"] .desk-lamp-btn.is-lamp-on {
  background: rgba(245, 158, 11, 0.18);
  border-color: #F59E0B;
  color: #FCD34D;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.4);
}

.desk-lamp-mobile-bar {
  width: 34px;
  height: 34px;
}

.mobile-lamp-toggle.is-lamp-on {
  border-color: #F59E0B;
  background: rgba(245, 158, 11, 0.12);
}

.mobile-lamp-toggle.is-lamp-on .mobile-theme-toggle-pill {
  background: #F59E0B;
  color: #FFFFFF;
}

/* OVERLAY MODE LAMPU MEJA (CURSOR SPOTLIGHT) */
.spotlight-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  background: radial-gradient(
    circle 280px at var(--spot-x, 50vw) var(--spot-y, 50vh),
    rgba(255, 248, 225, 0.03) 0%,
    rgba(24, 20, 16, 0.55) 48%,
    rgba(10, 10, 14, 0.94) 82%,
    rgba(6, 6, 9, 0.985) 100%
  );
}

body.desk-lamp-active .spotlight-overlay {
  opacity: 1;
}

.spotlight-hint {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 18, 24, 0.9);
  color: #FEF3C7;
  border: 1px solid rgba(245, 158, 11, 0.35);
  backdrop-filter: blur(8px);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 16px rgba(245, 158, 11, 0.2);
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.5s ease;
  white-space: nowrap;
}

body.desk-lamp-active {
  background-color: #060609 !important;
}

body.desk-lamp-active .navbar {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Layar Istirahat Website (Maintenance Mode Screen)
   ========================================================================== */
body.site-maintenance-active {
  overflow: hidden !important;
}

.site-maintenance-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: var(--bg-primary, #0D0E12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 1;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.site-maintenance-overlay.fading-out {
  opacity: 0;
  visibility: hidden;
}

.site-maintenance-card {
  max-width: 520px;
  width: 100%;
  text-align: center;
  padding: 44px 32px;
  background: var(--bg-card, #16181F);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.45);
  animation: fadeIn 0.4s ease-out;
}

.site-maintenance-pulse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  margin-bottom: 22px;
}

.site-maintenance-pulse .pulse-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #EF4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
  animation: maintenancePulse 2s infinite cubic-bezier(0.45, 0, 0.55, 1);
}

@keyframes maintenancePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.site-maintenance-title {
  font-family: var(--font-serif, "Playfair Display", Georgia, serif);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary, #FFFFFF);
  margin-bottom: 14px;
  line-height: 1.3;
}

.site-maintenance-desc {
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary, #A1A1AA);
  margin-bottom: 22px;
}

.site-maintenance-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary, #A1A1AA);
  background: var(--bg-secondary, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.site-maintenance-footer {
  font-family: var(--font-serif, "Playfair Display", Georgia, serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-tertiary, #71717A);
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.06));
  padding-top: 18px;
}


