  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&display=swap');

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --bg: #0d0b12;
    --gold: #f5c842;
    --white: #ffffff;
  }

  body {
    background: var(--bg);
    font-family: 'Inter', system-ui, sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }

  header {
    text-align: center;
    padding: 14px 20px 0;
    z-index: 200;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(13,11,18,0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }

  header h1 {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: clamp(1.1rem, 2.5vw, 1.85rem);
    font-weight: 900;
    color: var(--white);
    letter-spacing: 0.02em;
    line-height: 1.1;
  }

  header h1 span { color: var(--gold); }

  header p {
    font-size: clamp(0.65rem, 1.2vw, 0.82rem);
    color: rgba(255,255,255,0.85);
    margin-top: 4px;
    letter-spacing: 0.04em;
  }

  canvas {
    display: block;
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
  }

  /* ── FA Heart nodes rendered as DOM elements overlaid on canvas ── */
  #hearts-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
  }

  .heart-node {
    position: fixed;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: all;
    cursor: pointer;
    transition: transform 0.15s;
    /* Reset browser button defaults */
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
    /* Keyboard focus ring */
    border-radius: 6px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
  }
  .heart-node:hover  { transform: translate(-50%, -50%) scale(1.25); }
  .heart-node:focus  { transform: translate(-50%, -50%) scale(1.2); }
  .heart-node:focus-visible {
    outline: 3px solid #f5c842;
    outline-offset: 6px;
    border-radius: 8px;
  }
  .heart-node:focus:not(:focus-visible) { outline: none; }
  .heart-node .fa-heart {
    filter: drop-shadow(0 0 6px currentColor);
    transition: filter 0.2s;
  }
  .heart-node:hover .fa-heart,
  .heart-node:focus .fa-heart {
    filter: drop-shadow(0 0 14px currentColor);
  }
  .heart-node .node-label {
    font-size: 0.62rem;
    font-weight: 600;
    color: #ffffff;
    margin-top: 4px;
    text-align: center;
    max-width: 90px;
    line-height: 1.2;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
    pointer-events: none;
  }
  .heart-node.pending .fa-heart { opacity: 0.45; }
  .heart-node.pending .node-label { color: #ffffff; }

  /* Skip-to-content link for screen readers */
  #skip-link {
    position: fixed;
    top: -100px;
    left: 16px;
    background: #f5c842;
    color: #0d0b12;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 9999;
    text-decoration: none;
    transition: top 0.2s;
  }
  #skip-link:focus { top: 16px; }

  /* Keyboard nav hint */
  #kb-hint {
    position: fixed;
    bottom: 50px;
    left: 16px;
    font-size: 0.62rem;
    color: rgba(255,255,255,0.4);
    z-index: 10;
    pointer-events: none;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.04em;
  }

  /* ── Tooltip ── */
  #tooltip {
    position: fixed;
    background: rgba(13,11,18,0.97);
    border: 1.5px solid rgba(245,200,66,0.5);
    border-radius: 12px;
    padding: 12px 16px;
    max-width: 270px;
    pointer-events: none;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  }
  #tooltip.visible { opacity: 1; }
  #tooltip .tt-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 5px;
  }
  #tooltip .tt-desc {
    font-size: 0.78rem;
    line-height: 1.5;
    color: #ffffff;
  }
  #tooltip .tt-ripple {
    font-size: 0.72rem;
    margin-top: 7px;
    color: rgba(255,255,255,0.85);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 6px;
  }
  #tooltip .tt-read {
    font-size: 0.7rem;
    color: rgba(245,200,66,0.8);
    margin-top: 6px;
    font-weight: 600;
  }
  #tooltip .tt-pending {
    font-size: 0.72rem;
    color: rgba(255,160,80,0.8);
    margin-top: 5px;
    font-style: italic;
  }

  /* ── Legend ── */
  #legend {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 14px;
    z-index: 200;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 20px;
    background: rgba(13,11,18,0.97);
    border-top: 1px solid rgba(255,255,255,0.07);
    backdrop-filter: blur(10px);
  }
  .legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.62rem;
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
  }
  .legend-item i { font-size: 0.75rem; }

  /* ── Modals shared base ── */
  .modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5,4,10,0.82);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: flex-start;
    justify-content: center;
    padding-top: var(--header-h, 80px);
    padding-bottom: var(--footer-h, 44px);
    overflow-y: auto;
    box-sizing: border-box;
  }
  .modal-overlay.open { display: flex; animation: fadeInModal 0.25s ease; }
  @keyframes fadeInModal { from { opacity:0; } to { opacity:1; } }

  .modal-card {
    background: #13111d;
    border: 1.5px solid rgba(245,200,66,0.3);
    border-radius: 20px;
    padding: 32px 30px 28px;
    width: min(60vw, 900px);
    position: relative;
    box-shadow: 0 24px 64px rgba(0,0,0,0.7);
    max-height: none;
    overflow-y: visible;
    animation: slideUp 0.28s ease;
    margin: 16px auto;
  }
  @keyframes slideUp { from { transform: translateY(24px); opacity:0; } to { transform: translateY(0); opacity:1; } }

  .modal-close {
    position: absolute;
    top: 14px; right: 16px;
    background: rgba(255,255,255,0.07);
    border: none;
    color: rgba(255,255,255,0.85);
    font-size: 1rem;
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, color 0.2s;
  }
  .modal-close:hover { background: rgba(255,255,255,0.15); color: #fff; }

  /* ── Submission Form Modal ── */
  #modal-heart-icon {
    font-size: 2rem;
    color: #FF6B8A;
    text-align: center;
    margin-bottom: 8px;
    animation: heartbeat 1.6s ease infinite;
    line-height: 1;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  @keyframes heartbeat {
    0%,100% { opacity: 1; }
    14% { opacity: 0.7; }
    28% { opacity: 1; }
    42% { opacity: 0.8; }
    70% { opacity: 1; }
  }

  #story-modal .modal-card h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin-bottom: 5px;
  }
  .modal-sub {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.85);
    text-align: center;
    margin-bottom: 18px;
    line-height: 1.5;
  }

  .form-row { margin-bottom: 1.5rem; }
  .form-row label {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ffffff;
    margin-bottom: 5px;
  }
  .char-count { font-weight: 400; color: #ffffff; }

  .form-row input,
  .form-row select,
  .form-row textarea {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1.5px solid rgba(255,255,255,0.5);
    border-radius: 10px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.84rem;
    padding: 10px 13px;
    outline: none;
    resize: none;
    transition: border-color 0.2s, background 0.2s;
  }
  .form-row input:focus,
  .form-row select:focus,
  .form-row textarea:focus {
    border-color: rgba(245,200,66,0.55);
    background: rgba(245,200,66,0.04);
  }
  .form-row select option { background: #13111d; }

  .approval-notice {
    background: rgba(245,200,66,0.08);
    border: 1px solid rgba(245,200,66,0.2);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.72rem;
    color: rgba(245,200,66,1);
    margin-bottom: 14px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    line-height: 1.5;
  }
  .approval-notice i { margin-top: 1px; flex-shrink: 0; }

  #modal-submit {
    width: 100%;
    margin-top: 4px;
    padding: 12px;
    background: #ffcece/*#f5c842*/;
    color: #0d0b12;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  }
  #modal-submit:hover { background: #ffd84d; box-shadow: 0 6px 20px rgba(245,200,66,0.35); }
  #modal-submit:active { opacity: 0.9; }
  #modal-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }


  /* ── Email field error state ─────────────────────────────── */
  #f-email.email-error {
    background-color: #2d0a0a;
    border-color: #ff9999 !important;
    box-shadow: 0 0 0 2px rgba(255,153,153,0.35);
    outline: none;
  }
  .email-error-msg {
    display: none;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    font-size: 0.78rem;
    color: #ffcece;
    font-family: 'Inter', sans-serif;
  }
  .email-error-msg i {
    font-size: 0.82rem;
    color: #ffcece;
    flex-shrink: 0;
  }

  #modal-success { text-align: center; padding: 20px 0 8px; display: none; }
  #modal-success .success-heart { font-size: 3rem; color: #4caf50; animation: heartbeat 1.4s ease infinite; margin-bottom: 10px; }
  #modal-success p { color: #fff; font-size: 1rem; font-weight: 600; }
  #modal-success .success-sub { color: rgba(255,255,255,0.85); font-size: 0.8rem; font-weight: 400; margin-top: 4px; }

  /* ── Full Story Modal ── */
  #story-read-modal .modal-card { width: min(600px, 94vw); }
  #story-read-modal .story-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  #story-read-modal .story-header-heart { font-size: 1.6rem; }
  #story-read-modal .story-header-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
  }
  #story-read-modal .story-header-info .story-cat {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    opacity: 0.7;
  }
  #story-read-modal .story-body {
    font-size: 0.88rem;
    line-height: 1.75;
    color: #ffffff;
    margin-bottom: 16px;
    white-space: pre-wrap;
  }
  #story-read-modal .story-ripple-section {
    background: rgba(245,200,66,0.07);
    border-left: 3px solid rgba(245,200,66,0.5);
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
    margin-bottom: 14px;
  }
  #story-read-modal .story-ripple-section .ripple-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(245,200,66,0.7);
    margin-bottom: 4px;
  }
  #story-read-modal .story-ripple-section p {
    font-size: 0.83rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.55;
  }
  #story-read-modal .story-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(245,200,66,0.85);
    font-size: 0.8rem;
    text-decoration: none;
    border: 1px solid rgba(245,200,66,0.3);
    border-radius: 8px;
    padding: 6px 12px;
    transition: background 0.2s, color 0.2s;
  }
  #story-read-modal .story-link a:hover {
    background: rgba(245,200,66,0.1);
    color: #f5c842;
  }

  /* ════════════════════════════════════
     ADMIN PANEL
  ════════════════════════════════════ */



  /* ════════════════════════════════════════════════════════
     NAV + ABOUT PANEL + FOOTER
  ════════════════════════════════════════════════════════ */

  /* Top-left nav button */
  /* About btn now lives inline in the header toggle row */
  .vtb-about {
    color: #f5c842 !important;
    border-bottom-color: transparent !important;
  }
  .vtb-about i { color: #f5c842; }
  .vtb-about:hover { color: rgba(245,200,66,0.75) !important; }
  .vtb-about[aria-expanded="true"] {
    color: #f5c842 !important;
    border-bottom-color: #f5c842 !important;
  }
  .vtb-divider {
    display: inline-block;
    width: 1px;
    height: 16px;
    background: rgba(255,255,255,0.15);
    margin: 0 4px;
    align-self: center;
  }
  .vtb-label {
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.3);
    padding: 0 4px 0 6px;
    align-self: center;
    white-space: nowrap;
  }
  #about-btn:hover, #about-btn:focus-visible {
    background: rgba(245,200,66,0.12);
    border-color: rgba(245,200,66,0.6);
    outline: none;
  }

  /* About panel — slides in from left */
  #about-panel {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: min(520px, 100vw);
    height: 100vh;
    background: #0f0d19;
    border-right: 1.5px solid rgba(245,200,66,0.2);
    z-index: 2500;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: 12px 0 48px rgba(0,0,0,0.5);
    animation: slideInLeft 0.28s ease;
  }
  #about-panel.open { display: flex; }
  @keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
  }

  #about-panel::-webkit-scrollbar { width: 4px; }
  #about-panel::-webkit-scrollbar-track { background: transparent; }
  #about-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }

  .about-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: sticky;
    top: 0;
    background: #0f0d19;
    z-index: 1;
  }
  .about-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .about-header-title i { color: #f5c842; }
  .about-header-title h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
  }
  #about-close-btn {
    background: rgba(255,255,255,0.07);
    border: none;
    color: #fff;
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.95rem;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
  }
  #about-close-btn:hover { background: rgba(255,255,255,0.15); }

  /* Hero band */
  .about-hero {
    background: linear-gradient(135deg, rgba(245,200,66,0.1) 0%, rgba(167,139,250,0.08) 100%);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 28px 22px 24px;
    text-align: center;
  }
  .about-hero-quote {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f5c842;
    line-height: 1.4;
    margin-bottom: 8px;
    font-style: italic;
  }
  .about-hero-attr {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  /* Body content */
  .about-body { padding: 22px; flex: 1; }

  .about-section { margin-bottom: 26px; }
  .about-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #f5c842;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
  }
  .about-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(245,200,66,0.2);
  }

  .about-bio {
    font-size: 0.85rem;
    line-height: 1.75;
    color: #fff;
  }
  .about-bio p { margin-bottom: 12px; }
  .about-bio p:last-child { margin-bottom: 0; }

  /* Stats row */
  .about-stats {
    display: flex;
    gap: 0;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
  }
  .about-stat {
    flex: 1;
    padding: 14px 8px;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.08);
  }
  .about-stat:last-child { border-right: none; }
  .about-stat-num {
    font-size: 1.1rem;
    font-weight: 800;
    color: #f5c842;
    line-height: 1;
    margin-bottom: 4px;
  }
  .about-stat-lbl {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: rgba(255,255,255,0.6);
  }

  /* Link cards */
  .about-links { display: flex; flex-direction: column; gap: 8px; }
  .about-link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 11px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    cursor: pointer;
  }
  .about-link-card:hover, .about-link-card:focus-visible {
    background: rgba(245,200,66,0.07);
    border-color: rgba(245,200,66,0.3);
    transform: translateX(4px);
    outline: none;
  }
  .about-link-card .alc-icon {
    width: 36px; height: 36px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
  }
  .about-link-card .alc-text { flex: 1; }
  .about-link-card .alc-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
  }
  .about-link-card .alc-sub {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.55);
  }
  .about-link-card .alc-arrow {
    color: rgba(255,255,255,0.3);
    font-size: 0.75rem;
  }

  /* Social follow section */
  .about-follow-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #f5c842;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
  }
  .about-follow-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(245,200,66,0.2);
  }
  .follow-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 24px;
  }
  .follow-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: opacity 0.15s, transform 0.15s;
    border: none;
    cursor: pointer;
  }
  .follow-btn:hover, .follow-btn:focus-visible {
    opacity: 0.88;
    transform: translateY(-2px);
    outline: 2px solid rgba(255,255,255,0.3);
    outline-offset: 2px;
  }
  .follow-btn.tiktok   { background: linear-gradient(135deg, #F62755, #377280); color: #fff; }
  .follow-btn.instagram { background: linear-gradient(135deg,#f9ce34,#ee2a7b,#6228d7); color: #fff; }
  .follow-btn.threads  { background: linear-gradient(135deg, #000, #333); color: #fff; }
  .follow-btn.facebook { background: linear-gradient(135deg, #0f50a4, #1877f2); color: #fff; }
  .follow-btn.linktree { background: linear-gradient(135deg, #116123, #39a552); color: #fff; }

  /* About panel footer */
  .about-footer {
    padding: 18px 22px;
    border-top: 1px solid rgba(255,255,255,0.07);
    text-align: center;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
  }
  .about-footer a {
    color: rgba(245,200,66,0.7);
    text-decoration: none;
  }
  .about-footer a:hover { color: #f5c842; }


  /* ════════════════════════════════════════════════════════
     VIEW TOGGLE BUTTON
  ════════════════════════════════════════════════════════ */
  #view-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    padding: 0 0 0;
    margin-top: 8px;
  }
  .vtb-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.18s, border-color 0.18s;
    margin-bottom: -1px;
  }
  .vtb-option.active {
    color: #f5c842;
    border-bottom-color: #f5c842;
  }
  .vtb-option:hover:not(.active) { color: rgba(255,255,255,0.75); }
  .vtb-option:focus-visible {
    outline: 2px solid #f5c842;
    outline-offset: 2px;
  }

  /* ════════════════════════════════════════════════════════
     CARD VIEW OVERLAY
  ════════════════════════════════════════════════════════ */
  #card-view {
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    top: 0;   /* will be set by JS after header measures */
    z-index: 100;
    background: #0d0b12;
    flex-direction: column;
    overflow: hidden;
  }
  #card-view.active { display: flex; }

  #card-view-inner {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 80px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
  }
  #card-view-inner::-webkit-scrollbar { width: 5px; }
  #card-view-inner::-webkit-scrollbar-track { background: transparent; }
  #card-view-inner::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 4px; }

  /* Category group headers */
  .card-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 32px 0 14px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }
  .card-group-title:first-child { margin-top: 0; }
  .card-group-title i { font-size: 0.85rem; }
  .card-group-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: currentColor;
    opacity: 0.2;
  }

  /* Card grid */
  .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
  }

  /* Individual story card */
  .story-flip-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 14px;
    padding: 18px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.18s, background 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    font-family: 'Inter', sans-serif;
    /* reset button */
    width: 100%;
    background-clip: padding-box;
    outline: none;
  }
  .story-flip-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.4);
  }
  .story-flip-card:focus-visible {
    outline: 2px solid #f5c842;
    outline-offset: 3px;
  }
  .story-flip-card.pending-card {
    opacity: 0.5;
    cursor: default;
  }
  .story-flip-card.pending-card:hover { transform: none; box-shadow: none; }

  .sfc-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
  }
  .sfc-heart-name {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .sfc-heart { font-size: 1.1rem; }
  .sfc-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
  }
  .sfc-badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 3px 8px;
    border-radius: 20px;
    flex-shrink: 0;
    margin-top: 2px;
  }
  .sfc-cat {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    opacity: 0.75;
    margin-top: 2px;
  }
  .sfc-synopsis {
    font-size: 0.8rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.82);
    flex: 1;
  }
  .sfc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.07);
    margin-top: auto;
  }
  .sfc-ripple-preview {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.4;
    flex: 1;
    margin-right: 8px;
    /* clamp to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .sfc-ripple-preview i { color: rgba(245,200,66,0.6); margin-right: 4px; }
  .sfc-read-btn {
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(245,200,66,0.8);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }
  .story-flip-card:not(.pending-card):hover .sfc-read-btn { color: #f5c842; }

  /* Pending pill */
  .pending-pill {
    background: rgba(245,200,66,0.1);
    color: rgba(245,200,66,0.7);
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 9px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }

  /* Card view search/filter bar */
  #card-filter-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(13,11,18,0.95);
    backdrop-filter: blur(8px);
    padding: 14px 0 10px;
    margin-bottom: 4px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
  }
  /* Search field always full-width on mobile */
  @media (max-width: 767px) {
    #card-filter-bar {
      gap: 6px;
    }
    #card-search {
      flex: 0 0 100%;   /* own line */
      min-width: 0;
    }
    .cat-filter-btn {
      flex: 1 1 auto;   /* buttons share the row below, wrapping as needed */
      justify-content: center;
      font-size: 0.6rem;
      padding: 5px 8px;
    }
    #card-count {
      width: 100%;
      text-align: right;
    }
  }
  #card-search {
    flex: 1;
    min-width: 180px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 9px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    padding: 8px 13px 8px 36px;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.35)' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
    transition: border-color 0.2s;
  }
  #card-search:focus { border-color: rgba(245,200,66,0.5); }
  #card-search::placeholder { color: rgba(255,255,255,0.3); }

  .cat-filter-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.55);
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    white-space: nowrap;
  }
  .cat-filter-btn.active {
    border-color: currentColor;
    color: #fff;
    background: rgba(255,255,255,0.06);
  }
  .cat-filter-btn:focus-visible { outline: 2px solid #f5c842; outline-offset: 2px; }

  #card-count {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
    padding: 0 4px;
  }


  /* ── Submission receipt in success modal ── */
  .success-email-note {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    background: rgba(245,200,66,0.08);
    border: 1px solid rgba(245,200,66,0.2);
    border-radius: 8px;
    padding: 8px 12px;
    margin: 10px 0;
    line-height: 1.5;
    text-align: left;
  }
  .success-email-note i { color: #f5c842; margin-right: 5px; }
  .success-email-note strong { color: #f5c842; }

  .success-receipt {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 12px;
    margin: 12px 0 10px;
    text-align: left;
    width: 100%;
  }
  .receipt-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: rgba(245,200,66,0.7);
    margin-bottom: 10px;
  }
  .receipt-row {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.75rem;
    line-height: 1.45;
  }
  .receipt-field {
    flex-shrink: 0;
    width: 70px;
    color: rgba(255,255,255,0.45);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.62rem;
    padding-top: 1px;
    letter-spacing: 0.04em;
  }
  .receipt-val {
    color: #fff;
    flex: 1;
    word-break: break-word;
  }
  .receipt-close-btn {
    margin-top: 4px;
    padding: 9px 24px;
    background: rgba(245,200,66,0.15);
    color: #f5c842;
    border: 1px solid rgba(245,200,66,0.3);
    border-radius: 9px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    width: 100%;
  }
  .receipt-close-btn:hover { background: rgba(245,200,66,0.25); }
  .receipt-close-btn:focus-visible { outline: 2px solid #f5c842; outline-offset: 3px; }


  @media (max-width: 1024px) {
    .modal-card {
      width: min(80vw, 900px);
    }
  }
  @media (max-width: 600px) {
    .modal-card {
      width: 94vw;
      padding: 24px 18px 20px;
      margin: 8px auto;
    }
    .modal-overlay {
      padding-top: var(--header-h, 70px);
    }
  }


  #f-story {
    resize: vertical;
    min-height: 120px;
  }


  /* ── Spam protection checkboxes ── */
  .spam-check-row { margin-top: 4px; }
  .spam-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
  }
  .spam-option {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    background: rgba(255,255,255,0.05);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.82rem;
    color: #fff;
    font-weight: 500;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
  }
  .spam-option:hover {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.2);
  }
  .spam-option input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #f5c842;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
  }
  .spam-option:has(input:checked) {
    border-color: rgba(245,200,66,0.5);
    background: rgba(245,200,66,0.08);
    color: #f5c842;
  }


  @media (max-width: 480px) {
    .vtb-label { display: none; }
    .vtb-option { padding: 6px 10px; font-size: 0.65rem; }
  }
