/* ===========================
   REN & AIKO — Private Dashboard
   Dark theme, rose/mauve accents
   =========================== */

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: #0a0a0f;
  color: #e8e4df;
  font-family: 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
.hidden { display: none !important; }

/* --- Password Gate --- */
.gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gate-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(8px) brightness(0.3);
}
.gate-card {
  position: relative;
  background: rgba(10, 10, 15, 0.9);
  border: 1px solid #2a1f3d;
  border-radius: 16px;
  padding: 48px 32px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  backdrop-filter: blur(20px);
}
.gate-title {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 6px;
  background: linear-gradient(135deg, #f5e6d3, #c782af);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}
.gate-welcome {
  font-size: 14px;
  color: #b8b0a8;
  margin-bottom: 4px;
}
.gate-prompt {
  font-size: 12px;
  color: #7f8c9b;
  margin-bottom: 24px;
}
.gate-form { display: flex; gap: 8px; }
.gate-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #2a1f3d;
  border-radius: 8px;
  padding: 10px 14px;
  color: #e8e4df;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
.gate-input:focus { border-color: #c782af; }
.gate-btn {
  background: #c782af;
  color: #0a0a0f;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.gate-btn:hover { opacity: 0.85; }
.gate-error {
  color: #e85d75;
  font-size: 12px;
  margin-top: 12px;
  min-height: 18px;
}
.gate.shake { animation: shake 0.4s ease-in-out; }

/* --- Dashboard Container --- */
.dashboard {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 40px;
}

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #1a1a2e;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo {
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 4px;
  text-decoration: none;
  background: linear-gradient(135deg, #f5e6d3, #c782af);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.header-nav { display: flex; gap: 20px; }
.header-nav a {
  color: #7f8c9b;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.2s;
}
.header-nav a:hover { color: #c782af; }
.header-nav a.active { color: #c782af; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #7f8c9b;
  font-size: 20px;
  cursor: pointer;
}

/* --- Sections --- */
.section {
  padding: 32px 24px;
  border-bottom: 1px solid #1a1a2e;
}
.section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  flex: 1;
  font-size: 11px;
  color: #c782af;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(199, 130, 175, 0.3), transparent);
}

/* --- Buttons --- */
.icon-btn {
  background: none;
  border: 1px solid #2a1f3d;
  color: #7f8c9b;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.icon-btn:hover { border-color: #c782af; color: #c782af; }
.action-btn {
  background: rgba(199, 130, 175, 0.1);
  border: 1px solid rgba(199, 130, 175, 0.3);
  color: #c782af;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.action-btn:hover { background: rgba(199, 130, 175, 0.2); }

/* --- Countdown --- */
.cd-label {
  font-size: 13px;
  color: #7f8c9b;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 16px;
}
.cd-timer {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.cd-unit {
  background: rgba(199, 130, 175, 0.08);
  border: 1px solid rgba(199, 130, 175, 0.2);
  border-radius: 10px;
  padding: 14px 8px;
  min-width: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cd-num {
  font-size: 34px;
  font-weight: 200;
  color: #f5e6d3;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.cd-text {
  font-size: 9px;
  color: #7f8c9b;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 6px;
}
.cd-tbd {
  text-align: center;
  color: #b8b0a8;
  font-style: italic;
  font-size: 15px;
}
.cd-reached {
  text-align: center;
  color: #c782af;
  font-size: 18px;
  letter-spacing: 2px;
}

/* --- Posts --- */
.post-card {
  background: rgba(26, 16, 40, 0.4);
  border: 1px solid #2a1f3d;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.post-card.archive-post {
  border-color: rgba(199, 130, 175, 0.3);
  background: rgba(26, 16, 40, 0.6);
}
.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.post-author {
  color: #c782af;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
}
.post-date {
  color: #7f8c9b;
  font-size: 11px;
}
.post-title {
  font-size: 18px;
  font-weight: 300;
  color: #f5e6d3;
  margin-bottom: 8px;
}
.post-body {
  font-size: 14px;
  color: #b8b0a8;
  line-height: 1.8;
  white-space: pre-wrap;
}
.post-image {
  margin-top: 12px;
  border-radius: 8px;
  overflow: hidden;
}

/* --- Timeline --- */
.tl-item {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}
.tl-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 20px;
}
.tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c782af;
  flex-shrink: 0;
}
.tl-line {
  width: 1px;
  flex: 1;
  background: #2a1f3d;
}
.tl-content { padding-bottom: 4px; }
.tl-date {
  font-size: 11px;
  color: #7f8c9b;
  letter-spacing: 1px;
  margin-bottom: 2px;
}
.tl-title {
  font-size: 15px;
  color: #f5e6d3;
  font-weight: 400;
}
.tl-desc {
  font-size: 13px;
  color: #7f8c9b;
  margin-top: 4px;
  line-height: 1.6;
}

/* --- Archive --- */
.archive-entry { margin-bottom: 24px; }
.archive-heading {
  font-size: 16px;
  font-weight: 300;
  color: #f5e6d3;
  margin-bottom: 4px;
}
.archive-desc {
  font-size: 13px;
  color: #7f8c9b;
  margin-bottom: 16px;
}
.archive-toggle {
  display: flex;
  margin-bottom: 16px;
  border: 1px solid #2a1f3d;
  border-radius: 8px;
  overflow: hidden;
  width: fit-content;
}
.toggle-btn {
  background: transparent;
  border: none;
  color: #7f8c9b;
  padding: 8px 20px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}
.toggle-btn.active {
  background: rgba(199, 130, 175, 0.15);
  color: #c782af;
}
.archive-view { display: none; }
.archive-view.active { display: block; }
.archive-frame {
  border: 1px solid #2a1f3d;
  border-radius: 12px;
  overflow: hidden;
  background: #0a0a0f;
}

/* --- Archive: Original Countdown Site Snapshot Styles --- */
.orig-hero {
  background: linear-gradient(180deg, #1a1028 0%, #0f0f1a 100%);
  padding: 40px 24px 28px;
  text-align: center;
  border-bottom: 1px solid #2a1f3d;
}
.orig-genre-tags { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }
.orig-genre-tag {
  background: rgba(199, 130, 175, 0.15);
  color: #c782af;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.orig-title {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 6px;
  margin-bottom: 4px;
  background: linear-gradient(135deg, #f5e6d3, #c782af);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.orig-subtitle {
  font-size: 12px;
  color: #7f8c9b;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.orig-badge {
  display: inline-block;
  border: 1px solid #c782af;
  color: #c782af;
  padding: 4px 16px;
  border-radius: 4px;
  font-size: 10px;
  letter-spacing: 2px;
}
.orig-countdown {
  padding: 28px 24px;
  text-align: center;
  background: linear-gradient(180deg, #0f0f1a, #0d1117);
}
.orig-cd-label {
  font-size: 10px;
  color: #7f8c9b;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.orig-cd-timer { display: flex; justify-content: center; gap: 10px; }
.orig-cd-unit {
  background: rgba(199, 130, 175, 0.08);
  border: 1px solid rgba(199, 130, 175, 0.2);
  border-radius: 8px;
  padding: 10px 6px;
  min-width: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.orig-cd-num { font-size: 26px; font-weight: 200; color: #f5e6d3; line-height: 1; }
.orig-cd-text {
  font-size: 8px;
  color: #7f8c9b;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 4px;
}
.orig-synopsis, .orig-characters, .orig-preview {
  padding: 28px 24px;
  border-top: 1px solid #1a1a2e;
}
.orig-section-header {
  font-size: 10px;
  color: #c782af;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 400;
}
.orig-synopsis-text {
  font-size: 13px;
  line-height: 1.8;
  color: #b8b0a8;
  font-style: italic;
}
.orig-char-card {
  background: rgba(26, 16, 40, 0.5);
  border: 1px solid #2a1f3d;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
}
.orig-char-img { background: #f5f0eb; overflow: hidden; }
.orig-char-info { padding: 14px; }
.orig-char-name { font-size: 18px; font-weight: 300; letter-spacing: 3px; margin-bottom: 2px; }
.orig-char-role {
  font-size: 10px;
  color: #c782af;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.orig-char-desc { font-size: 12px; color: #7f8c9b; line-height: 1.6; }
.orig-preview-panel { border-radius: 6px; overflow: hidden; margin-bottom: 12px; }
.orig-footer {
  padding: 24px;
  text-align: center;
  border-top: 1px solid #1a1a2e;
  color: #3a3a4a;
  font-size: 10px;
  letter-spacing: 1px;
}

/* Archive: Reveal Snapshot */
.orig-reveal {
  padding: 40px 24px 48px;
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
}
.orig-reveal-badge {
  font-size: 11px;
  color: #c782af;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.orig-reveal-cover {
  border: 2px solid #c782af;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: 0 0 40px rgba(199, 130, 175, 0.15);
}
.orig-reveal-message {
  font-size: 14px;
  line-height: 1.8;
  color: #b8b0a8;
  text-align: left;
}
.orig-reveal-sig {
  margin-top: 24px;
  font-size: 13px;
  color: #c782af;
  letter-spacing: 2px;
}

/* --- Modals --- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal.hidden { display: none; }
.modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}
.modal-box {
  position: relative;
  background: #0f0f1a;
  border: 1px solid #2a1f3d;
  border-radius: 16px;
  padding: 28px;
  max-width: 420px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.modal-head h3 {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 2px;
  color: #f5e6d3;
}
.modal-x {
  background: none;
  border: none;
  color: #7f8c9b;
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
}
.modal-x:hover { color: #e8e4df; }

/* --- Forms --- */
.form-label {
  display: block;
  font-size: 11px;
  color: #7f8c9b;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.optional { text-transform: none; letter-spacing: 0; font-style: italic; }
.form-input {
  display: block;
  width: 100%;
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #2a1f3d;
  border-radius: 8px;
  padding: 10px 12px;
  color: #e8e4df;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.form-input:focus { border-color: #c782af; }
.form-textarea { resize: vertical; min-height: 80px; }
.form-input[type="file"] { padding: 8px; }
select.form-input { appearance: none; cursor: pointer; }
.form-submit {
  display: block;
  width: 100%;
  background: #c782af;
  color: #0a0a0f;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity 0.2s;
}
.form-submit:hover { opacity: 0.85; }
.form-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- Loaders & States --- */
.loader {
  text-align: center;
  color: #7f8c9b;
  font-size: 13px;
  padding: 20px;
  font-style: italic;
}
.empty-msg {
  text-align: center;
  color: #7f8c9b;
  font-size: 13px;
  padding: 20px;
  font-style: italic;
}
.error-msg {
  text-align: center;
  color: #e85d75;
  font-size: 13px;
  padding: 12px;
}

/* --- Footer --- */
.footer {
  padding: 32px 24px;
  text-align: center;
  color: #3a3a4a;
  font-size: 11px;
  letter-spacing: 1px;
}
.footer-link {
  color: #7f8c9b;
  text-decoration: none;
  margin-top: 4px;
  display: inline-block;
}
.footer-link:hover { color: #c782af; }

/* --- Animations --- */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .header-nav { display: none; }
  .header-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.98);
    border-bottom: 1px solid #1a1a2e;
    padding: 16px 24px;
    gap: 12px;
  }
  .nav-toggle { display: block; }
  .cd-num { font-size: 26px; }
  .cd-unit { min-width: 56px; padding: 10px 6px; }
}

/* --- Saved Chats --- */
.chat-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid #2a1f3d;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.chat-card .post-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #b8b0a8;
  margin-bottom: 6px;
}
.chat-when {
  font-style: italic;
  font-size: 12px;
  color: #7f8c9b;
  margin-bottom: 12px;
}
.chat-images {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.chat-img {
  width: 100%;
  border-radius: 8px;
  cursor: zoom-in;
}
.chat-text {
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid #c782af;
  padding: 10px 12px;
  border-radius: 4px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: #e8e4df;
  margin-bottom: 12px;
}
.chat-notes {
  font-style: italic;
  font-size: 13px;
  color: #9a9289;
}
.chat-notes::before {
  content: 'Notes: ';
  color: #7f8c9b;
  font-style: normal;
}

/* --- Chat Dropzone --- */
.chat-dropzone {
  border: 2px dashed #2a1f3d;
  border-radius: 8px;
  padding: 20px 16px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 16px;
  outline: none;
}
.chat-dropzone:hover,
.chat-dropzone:focus,
.chat-dropzone.drag-over {
  border-color: #c782af;
  background: rgba(199, 130, 175, 0.06);
}
.chat-dropzone-hint {
  font-size: 12px;
  color: #7f8c9b;
  text-align: center;
  margin: 0 0 8px 0;
}
.chat-dropzone-hint:last-child {
  margin-bottom: 0;
}
.chat-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.chat-thumbs:empty { margin-top: 0; }
.chat-thumb {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #2a1f3d;
}
.chat-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.chat-thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(10, 10, 15, 0.85);
  color: #e8e4df;
  border: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.chat-thumb-remove:hover {
  background: #e85d75;
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}
.lightbox.hidden { display: none; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* --- Archive Tile --- */
.archive-tile {
  display: flex;
  gap: 14px;
  align-items: stretch;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid #2a1f3d;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 24px;
  transition: border-color 0.2s, background 0.2s;
}
.archive-tile:hover {
  border-color: #c782af;
  background: rgba(199, 130, 175, 0.06);
}
.archive-tile-thumb {
  flex: 0 0 auto;
  width: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1420;
}
.archive-tile-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.archive-tile-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.archive-tile-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 2px 0;
  color: #e8e4df;
}
.archive-tile-date {
  font-size: 12px;
  color: #7f8c9b;
  margin: 0 0 6px 0;
}
.archive-tile-desc {
  font-size: 13px;
  color: #b8b0a8;
  margin: 0 0 6px 0;
}
.archive-tile-cta {
  font-size: 13px;
  color: #c782af;
  font-weight: 600;
  align-self: flex-start;
}

/* --- Dedicated Page Chrome --- */
.page-header {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px;
}
.page-back {
  color: #b8b0a8;
  text-decoration: none;
  font-size: 14px;
}
.page-back:hover {
  color: #c782af;
}
.page-title {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 4px 20px;
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 4px;
  background: linear-gradient(135deg, #f5e6d3, #c782af);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-subtitle {
  max-width: 720px;
  margin: 0 auto 20px auto;
  padding: 0 20px;
  color: #7f8c9b;
  font-size: 13px;
}

/* --- Edit/Delete --- */
.post-card, .chat-card, .tl-item { position: relative; }

.edit-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: #7f8c9b;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  line-height: 1;
}
.edit-btn:hover {
  color: #c782af;
  background: rgba(199, 130, 175, 0.08);
}

.form-delete {
  background: transparent;
  color: #e85d75;
  border: 1px solid #e85d75;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 8px;
  transition: background 0.2s, color 0.2s;
}
.form-delete:hover {
  background: #e85d75;
  color: #0a0a0f;
}

.post-current-image {
  margin-bottom: 12px;
}
.post-current-image img {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 6px;
}
.post-remove-img {
  background: transparent;
  color: #e85d75;
  border: 1px solid #2a1f3d;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.post-remove-img:hover {
  border-color: #e85d75;
}

/* ============================================
   Feedback
   ============================================ */
.feedback-card {
  position: relative;
  background: var(--surface, #15151c);
  border: 1px solid var(--border, #2a2a3a);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.fb-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  opacity: 0.75;
  margin-bottom: 6px;
}
.fb-author { font-weight: 600; }
.fb-hearts {
  font-size: 22px;
  color: #ff7a8c;
  letter-spacing: 2px;
  margin: 4px 0 8px;
}
.fb-comment {
  white-space: pre-wrap;
  line-height: 1.5;
}

/* Heart picker (modal) */
.heart-picker {
  display: flex;
  gap: 8px;
  margin: 6px 0 14px;
}
.heart-btn {
  background: transparent;
  border: 1px solid #2a2a3a;
  color: #5a5a66;
  font-size: 28px;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s, transform 0.08s;
}
.heart-btn:hover { transform: translateY(-1px); }
.heart-btn.filled {
  color: #ff7a8c;
  border-color: #ff7a8c;
}

/* "New feature" glow on action buttons */
.action-btn.glow-new {
  position: relative;
  animation: glowNew 2.4s ease-in-out infinite;
}
@keyframes glowNew {
  0%, 100% {
    box-shadow:
      0 0 0 0 rgba(255,122,140,0.5),
      0 0 8px rgba(255,179,71,0.3);
  }
  50% {
    box-shadow:
      0 0 0 6px rgba(255,122,140,0),
      0 0 18px rgba(255,179,71,0.6),
      0 0 28px rgba(255,122,140,0.4);
  }
}

/* ============================================
   Stats footer
   ============================================ */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 32px 16px 24px;
}
.stats-footer {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
}
.stats-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 140px;
  gap: 6px;
}
.stats-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  background: #1b1b20;
}
.stats-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.stats-name { font-weight: 600; font-size: 15px; }
.stats-points {
  font-size: 13px;
  color: #ffb347;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.stats-rating {
  font-size: 13px;
  opacity: 0.78;
}
.footer-tagline {
  font-size: 12px;
  opacity: 0.7;
  text-align: center;
}

@media (max-width: 520px) {
  .stats-footer { flex-direction: column; gap: 18px; }
}

/* ============================================
   Avatar tiers (manga aura / energy)
   ============================================ */
.tier-0 {
  box-shadow: 0 0 0 2px #1b1b20, 0 0 0 3px #2a2a3a;
}
.tier-1 {
  box-shadow:
    0 0 0 2px #1b1b20,
    0 0 0 4px #d96b7c,
    0 0 8px rgba(217,107,124,0.35);
}
.tier-2 {
  box-shadow:
    0 0 0 2px #1b1b20,
    0 0 0 4px #d96b7c,
    0 0 14px rgba(217,107,124,0.5);
}
.tier-3 {
  box-shadow:
    0 0 0 2px #1b1b20,
    0 0 0 4px #d96b7c,
    0 0 20px rgba(217,107,124,0.65),
    0 0 0 7px rgba(255,179,71,0.5);
}
.tier-4 {
  box-shadow:
    0 0 0 2px #1b1b20,
    0 0 0 4px #ffb347,
    0 0 0 7px #d96b7c,
    0 0 22px rgba(217,107,124,0.7);
}
.tier-5 {
  box-shadow:
    0 0 0 2px #1b1b20,
    0 0 0 4px #ffb347,
    0 0 0 7px #d96b7c,
    0 0 26px rgba(255,179,71,0.65),
    0 0 44px rgba(217,107,124,0.4);
  animation: tierBreathe 3.6s ease-in-out infinite;
}
.tier-6 {
  box-shadow:
    0 0 0 2px #1b1b20,
    0 0 0 4px #ffb347,
    0 0 0 7px #d96b7c,
    0 0 0 10px rgba(255,179,71,0.5),
    0 0 30px rgba(255,179,71,0.7),
    0 0 56px rgba(217,107,124,0.5);
  animation: tierBreathe 3.2s ease-in-out infinite;
}
.tier-7 {
  box-shadow:
    0 0 0 2px #1b1b20,
    0 0 0 4px #ffb347,
    0 0 0 7px #d96b7c,
    0 0 0 11px #ffb347,
    0 0 36px rgba(255,179,71,0.85),
    0 0 72px rgba(217,107,124,0.55);
  animation: tierBreathe 2.8s ease-in-out infinite;
}
.tier-8 {
  box-shadow:
    0 0 0 2px #1b1b20,
    0 0 0 4px #ffb347,
    0 0 0 8px #d96b7c,
    0 0 0 12px #ffb347,
    0 0 44px rgba(255,179,71,0.95),
    0 0 80px rgba(217,107,124,0.7);
  animation: tierMax 3s linear infinite;
}

@keyframes tierBreathe {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.18); }
}
@keyframes tierMax {
  0%   { filter: brightness(1)    hue-rotate(0deg); }
  50%  { filter: brightness(1.22) hue-rotate(20deg); }
  100% { filter: brightness(1)    hue-rotate(0deg); }
}

/* ============================================
   Logout links
   ============================================ */
.logout-link {
  background: transparent;
  border: none;
  color: inherit;
  opacity: 0.55;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  padding: 4px 8px;
  letter-spacing: 0.02em;
  transition: opacity 0.15s, color 0.15s;
}
.logout-link:hover {
  opacity: 1;
  color: #d96b7c;
}

/* Header variant — sits between nav and burger */
#logout-header {
  margin-left: 8px;
}

/* Stats footer variant — small, low-key under the user's own card */
.logout-stats {
  font-size: 11px;
  margin-top: 4px;
  text-transform: lowercase;
  letter-spacing: 0.06em;
}

/* Tagline variant — inline with Reference link */
#logout-tagline {
  font-size: 12px;
  padding: 0 4px;
  vertical-align: baseline;
}

/* ===========================
   Our World — globe + visited-places map
   The celestial centerpiece: a glowing world the couple "claims" together.
   =========================== */

/* Progress readout — a keepsake line in the gate-title gradient */
.ow-progress {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 2px 0 16px;
  background: linear-gradient(135deg, #f5e6d3, #c782af);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ow-controls { margin-bottom: 14px; }

/* Drill-in toggle — a soft pill that lifts on hover */
.ow-toggle {
  background: rgba(199, 130, 175, 0.10);
  border: 1px solid #2a1f3d;
  color: #e8e4df;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-family: inherit;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.1s;
}
.ow-toggle:hover {
  background: rgba(199, 130, 175, 0.20);
  border-color: #c782af;
  box-shadow: 0 0 20px rgba(199, 130, 175, 0.25);
}
.ow-toggle:active { transform: translateY(1px); }

/* Stage shared by the globe and the US inset — atmosphere + depth, not a flat box */
.globe-wrap,
.us-inset {
  position: relative;
  width: 100%;
  border: 1px solid #2a1f3d;
  border-radius: 20px;
  overflow: hidden;
  /* layered: faint cream "stars", a mauve aurora at the top, deep space below */
  background:
    radial-gradient(1px 1px at 20% 30%, rgba(245, 230, 211, 0.20), transparent 60%),
    radial-gradient(1px 1px at 68% 18%, rgba(245, 230, 211, 0.16), transparent 60%),
    radial-gradient(1px 1px at 82% 64%, rgba(245, 230, 211, 0.14), transparent 60%),
    radial-gradient(1px 1px at 38% 78%, rgba(245, 230, 211, 0.12), transparent 60%),
    radial-gradient(130% 120% at 50% -10%, rgba(199, 130, 175, 0.16), transparent 55%),
    #07070b;
  box-shadow:
    0 0 60px rgba(199, 130, 175, 0.14),
    inset 0 0 80px rgba(0, 0, 0, 0.55);
}

.globe-canvas {
  position: relative; /* positioning context for click sparks (getScreenCoords) */
  width: 100%;
  height: 60vh;
  min-height: 360px;
  cursor: grab;
}
.globe-canvas:active { cursor: grabbing; }

/* Click reward — an expanding ripple ring that pulses out from the tap point */
.globe-ripple {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  box-sizing: border-box;
}
.globe-ripple.add {
  border: 2px solid rgba(199, 130, 175, 0.75);
  box-shadow: 0 0 12px rgba(199, 130, 175, 0.5);
  animation: rippleOut 0.85s ease-out forwards;
}
.globe-ripple.remove {
  border: 2px solid rgba(245, 230, 211, 0.65);
  animation: rippleOut 0.75s ease-out forwards;
}
@keyframes rippleOut {
  0%   { width: 6px; height: 6px; opacity: 0.95; }
  100% { width: 96px; height: 96px; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .globe-ripple { animation-duration: 0.01ms !important; opacity: 0 !important; }
}

/* Click reward — a tasteful spark that pops where you (un)claim a region */
.globe-spark {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 3;
  will-change: transform, opacity;
}
.globe-spark svg { display: block; width: 24px; height: 24px; fill: currentColor; }
.globe-spark.add {
  color: #d98ec0;
  filter: drop-shadow(0 0 7px rgba(199, 130, 175, 0.85)) drop-shadow(0 0 2px rgba(245, 230, 211, 0.5));
  animation: sparkAdd 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.globe-spark.remove {
  color: #f5e6d3;
  filter: drop-shadow(0 0 6px rgba(245, 230, 211, 0.8));
  animation: sparkRemove 0.85s ease-out forwards;
}
/* Claim: a heart that pops and floats up, joyful */
@keyframes sparkAdd {
  0%   { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
  22%  { transform: translate(-50%, -85%) scale(1.18); opacity: 1; }
  100% { transform: translate(-50%, -230%) scale(0.85); opacity: 0; }
}
/* Release: a sparkle that blooms then settles softly in place */
@keyframes sparkRemove {
  0%   { transform: translate(-50%, -50%) scale(0.6) rotate(-10deg); opacity: 0; }
  30%  { transform: translate(-50%, -50%) scale(1.15) rotate(6deg); opacity: 0.95; }
  100% { transform: translate(-50%, -50%) scale(0.5) rotate(-4deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .globe-spark { animation-duration: 0.01ms !important; opacity: 0 !important; }
}

/* Zoom controls — floating glass pills, top-right of the globe stage */
.globe-zoom {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2;
}
.globe-zoom-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #2a1f3d;
  background: rgba(10, 10, 15, 0.65);
  backdrop-filter: blur(4px);
  color: #f5e6d3;
  font-size: 22px;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.1s;
}
.globe-zoom-btn:hover {
  background: rgba(199, 130, 175, 0.25);
  border-color: #c782af;
  box-shadow: 0 0 16px rgba(199, 130, 175, 0.3);
}
.globe-zoom-btn:active { transform: translateY(1px); }

/* US drill-in map */
.us-inset { padding: 22px; }
.us-map { width: 100%; height: auto; display: block; }
.us-map path {
  stroke: #0a0a0f;
  stroke-width: 0.75;
  cursor: pointer;
  transition: fill 0.25s ease, filter 0.25s ease;
}
/* Unvisited: a place still waiting for us — it breathes a cream glow */
.us-map path.unvisited {
  fill: rgba(199, 130, 175, 0.13);
  animation: owGlow 3s ease-in-out infinite;
}
.us-map path:hover {
  fill: rgba(245, 230, 211, 0.55);
  filter: drop-shadow(0 0 8px rgba(245, 230, 211, 0.7));
}
/* Visited: claimed — solid mauve with a steady halo, no more pull to click */
.us-map path.visited {
  fill: #c782af;
  stroke: rgba(245, 230, 211, 0.5);
  filter: drop-shadow(0 0 6px rgba(199, 130, 175, 0.65));
  animation: none;
}

@keyframes owGlow {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(245, 230, 211, 0.18)); }
  50%      { filter: drop-shadow(0 0 8px rgba(245, 230, 211, 0.55)); }
}

/* Click reward on the US inset — a quick flash on the tapped state */
.us-map path.just-claimed { animation: stateClaim 0.6s ease-out; }
.us-map path.just-released { animation: stateRelease 0.6s ease-out; }
@keyframes stateClaim {
  0%   { filter: drop-shadow(0 0 2px rgba(199, 130, 175, 0.4)); }
  35%  { filter: drop-shadow(0 0 16px rgba(199, 130, 175, 0.95)) brightness(1.35); }
  100% { filter: drop-shadow(0 0 6px rgba(199, 130, 175, 0.6)); }
}
@keyframes stateRelease {
  0%   { filter: drop-shadow(0 0 2px rgba(245, 230, 211, 0.3)); }
  35%  { filter: drop-shadow(0 0 13px rgba(245, 230, 211, 0.85)) brightness(1.25); }
  100% { filter: drop-shadow(0 0 2px rgba(245, 230, 211, 0.18)); }
}

/* Destination pins (globe.gl htmlElements) — globe.gl centers this 0×0 wrapper
   on the coordinate; the dot sits exactly on the point, the name floats below. */
.globe-pin {
  position: relative;
  width: 0;
  height: 0;
  cursor: pointer;
}
.globe-pin-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease;
  /* globe.gl's html overlay defaults to pointer-events:none, which let taps
     fall straight through the pin to the globe — so clicking a pin did nothing.
     Re-enable it here so the pin receives the tap. */
  pointer-events: auto;
  cursor: pointer;
}
/* Finger-sized invisible hit area — the visible dot stays small (14px), but a
   40px target around it catches taps (a bare 14px dot is unhittable on touch). */
.globe-pin-dot::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}
/* Wishlist: a hollow beacon that pulses, asking to be reached */
.globe-pin.wish .globe-pin-dot {
  background: transparent;
  border: 2px solid #f5e6d3;
  box-shadow: 0 0 8px rgba(245, 230, 211, 0.7);
  animation: owPinPulse 2.2s ease-in-out infinite;
}
/* Visited: a filled, settled star */
.globe-pin.visited .globe-pin-dot {
  background: #c782af;
  border: 2px solid #f5e6d3;
  box-shadow: 0 0 12px rgba(199, 130, 175, 0.9);
}
.globe-pin:hover .globe-pin-dot { transform: translate(-50%, -50%) scale(1.4); }
/* Always-on name label — readable without hovering (key on touch) */
.globe-pin-label {
  position: absolute;
  left: 0;
  top: 10px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #f5e6d3;
  text-shadow: 0 1px 3px #000, 0 0 6px rgba(0, 0, 0, 0.95);
  pointer-events: none;
}

@keyframes owPinPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(245, 230, 211, 0.55); }
  50%      { box-shadow: 0 0 16px rgba(245, 230, 211, 0.95); }
}

/* Added-destinations list — under the map; focus a pin or cancel it */
.ow-dest-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ow-dest-empty {
  color: #8a8189;
  font-size: 13px;
  font-style: italic;
  padding: 6px 2px;
}
.ow-dest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid #2a1f3d;
  border-radius: 12px;
  background: rgba(199, 130, 175, 0.06);
}
.ow-dest-item.visited { background: rgba(199, 130, 175, 0.14); }
.ow-dest-name {
  flex: 1;
  text-align: left;
  background: none;
  border: none;
  color: #f5e6d3;
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  padding: 2px 0;
}
.ow-dest-name:hover { color: #c782af; text-decoration: underline; }
.ow-dest-badge {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c782af;
  border: 1px solid #2a1f3d;
  border-radius: 999px;
  padding: 2px 9px;
}
.ow-dest-item.visited .ow-dest-badge { color: #f5e6d3; border-color: #c782af; }
.ow-dest-cancel {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #2a1f3d;
  background: transparent;
  color: #b8b0a8;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ow-dest-cancel:hover {
  background: rgba(220, 90, 110, 0.18);
  border-color: #d9657a;
  color: #ffd9df;
}

/* Zoom-in place labels (HTML — crisp + haloed for clarity against the globe).
   globe.gl centers each on its coordinate and hides far-side ones automatically. */
.globe-label {
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px #000, 0 0 6px rgba(0, 0, 0, 0.95), 0 0 13px rgba(0, 0, 0, 0.8);
}
.globe-label.country { font-size: 13px; color: #f7ead8; }
.globe-label.state { font-size: 11px; color: #ecd9e6; font-weight: 500; }
.globe-label.poi { font-size: 10.5px; color: rgba(245, 230, 211, 0.9); font-weight: 500; }
.globe-label.poi::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 4px;
  border-radius: 50%;
  background: #c782af;
  vertical-align: middle;
  box-shadow: 0 0 5px rgba(199, 130, 175, 0.95);
}

/* Add-destination hint + globe load fallback */
.form-hint { font-size: 12px; color: #c782af; min-height: 16px; margin: 4px 0 8px; }
.ow-fallback { padding: 36px; text-align: center; color: #b8b0a8; line-height: 1.7; }

@media (max-width: 600px) {
  .globe-canvas { height: 52vh; min-height: 300px; }
  .us-inset { padding: 14px; }
  .ow-progress { font-size: 12px; letter-spacing: 1px; }
}
