
  :root {
    --rose: #C9707F;
    --rose-rgb: 201, 112, 127;
    --rose-light: #D98F9B;
    --rose-dark: #A8505F;
    --rose-soft: #F8D7DD;
    --pink-soft: #FDEBEE;
    --cream: #FFF8F1;
    --bg-a: #FDE3E8;
    --bg-b: #FBE6DC;
    --slate: #2F4F4F;
    --muted: #7A8A8A;
    --gold: #F2B01E;
    --sidebar-w: 260px;
    --radius: 20px;
    --shadow: 0 10px 30px rgba(var(--rose-rgb), .15);
    --bs-body-font-family: 'Poppins', system-ui, sans-serif;
    --bs-body-color: #2F4F4F;
  }

  html { scroll-behavior: smooth; }

  body {
    font-family: 'Poppins', system-ui, sans-serif;
    color: var(--slate);
    background:
      radial-gradient(circle at 12% 8%, var(--bg-a) 0, transparent 38%),
      radial-gradient(circle at 92% 88%, var(--bg-b) 0, transparent 40%),
      var(--cream);
    min-height: 100vh;
  }

  .text-rose { color: var(--rose) !important; }
  .modal-backdrop { --bs-backdrop-bg: #5b3a40; --bs-backdrop-opacity: .75; }
  .modal-content { border: 0; border-radius: var(--radius); background: var(--cream); box-shadow: 0 20px 60px rgba(91, 58, 64, .3); }
  .form-control, .form-select { border-radius: 12px; border-color: var(--rose-soft); background: #fff; }
  .form-control:focus, .form-select:focus { border-color: var(--rose); box-shadow: 0 0 0 .2rem rgba(var(--rose-rgb), .2); }
  .form-label { font-weight: 500; font-size: .85rem; margin-bottom: .3rem; }

  /* ---------- Buttons ---------- */
  .btn { border-radius: 12px; font-weight: 500; }
  .btn-love { background: linear-gradient(135deg, var(--rose-light), var(--rose)); color: #fff; border: 0; box-shadow: 0 6px 16px rgba(var(--rose-rgb), .35); }
  .btn-love:hover, .btn-love:focus { background: linear-gradient(135deg, var(--rose), var(--rose-dark)); color: #fff; transform: translateY(-1px); }
  .btn-love:disabled { opacity: .7; }
  .btn-outline-love { border: 1.5px solid var(--rose); color: var(--rose-dark); background: transparent; }
  .btn-outline-love:hover { background: var(--rose); color: #fff; }
  .btn-icon { background: transparent; border: 0; color: #fff; font-size: 1.25rem; width: 40px; height: 40px; }
  .btn-soft { background: var(--pink-soft); color: var(--rose-dark); border: 0; }
  .btn-soft:hover { background: var(--rose-soft); color: var(--rose-dark); }
  .btn-soft-danger { background: #fff0f0; color: #c0392b; border: 0; }
  .btn-soft-danger:hover { background: #ffdede; color: #a93226; }
  .btn-gacha-side { background: rgba(255, 255, 255, .2); color: #fff; border: 1px solid rgba(255, 255, 255, .5); }
  .btn-gacha-side:hover { background: #fff; color: var(--rose-dark); }

  /* ---------- PIN modal ---------- */
  .pin-dialog { max-width: 380px; }
  .pin-card { background: linear-gradient(180deg, #fff 0%, var(--pink-soft) 100%); }
  .pin-heart { font-size: 3rem; color: var(--rose); margin-bottom: .5rem; }
  .pin-input { letter-spacing: .5em; font-weight: 600; }
  .shake { animation: shake .4s; }
  @keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

  .heartbeat { animation: heartbeat 1.4s ease-in-out infinite; display: inline-block; }
  @keyframes heartbeat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.2); } 28% { transform: scale(1); } 42% { transform: scale(1.2); } 70% { transform: scale(1); } }

  /* ---------- Sidebar ---------- */
  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--rose-light) 0%, var(--rose) 55%, var(--rose-dark) 100%);
    color: #fff; z-index: 1040; display: flex; flex-direction: column; padding: 22px 16px;
    transition: transform .3s ease; box-shadow: 6px 0 30px rgba(var(--rose-rgb), .25);
  }
  .sidebar-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; padding: 4px 10px 22px; }
  .sidebar-brand i { font-size: 1.4rem; }
  .sidebar-nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
  .nav-item-link {
    display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, .92); text-decoration: none;
    padding: 11px 14px; border-radius: 14px; font-size: .92rem; font-weight: 500; transition: all .2s;
  }
  .nav-item-link i { width: 20px; text-align: center; }
  .nav-item-link:hover { background: rgba(255, 255, 255, .16); color: #fff; }
  .nav-item-link.active { background: var(--cream); color: var(--rose-dark); box-shadow: 0 6px 16px rgba(0, 0, 0, .12); }
  .sidebar-foot { padding-top: 12px; }

  .topbar {
    position: fixed; top: 0; left: 0; right: 0; height: 60px; z-index: 1030;
    background: linear-gradient(135deg, var(--rose-light), var(--rose)); color: #fff;
    display: flex; align-items: center; justify-content: space-between; padding: 0 12px;
    box-shadow: 0 4px 16px rgba(var(--rose-rgb), .3);
  }
  .topbar-title { font-weight: 600; }
  .sidebar-overlay { position: fixed; inset: 0; background: rgba(47, 79, 79, .45); z-index: 1035; opacity: 0; pointer-events: none; transition: opacity .3s; }
  .sidebar-overlay.show { opacity: 1; pointer-events: auto; }

  .main { margin-left: var(--sidebar-w); padding: 32px 36px 24px; min-height: 100vh; display: flex; flex-direction: column; }
  .main > .page-section { flex: 1; }

  @media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; padding: 78px 16px 20px; }
  }

  /* ---------- Page ---------- */
  .page-section { animation: fadeUp .45s ease both; }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  .page-head { margin-bottom: 24px; }
  .page-head h2 { font-weight: 700; margin-bottom: 2px; font-size: 1.7rem; }
  @media (max-width: 575.98px) { .page-head h2 { font-size: 1.4rem; } }

  .card { border: 0; border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; }
  .love-card { background: linear-gradient(135deg, #fff 0%, var(--pink-soft) 100%); }
  .countdown-card { background: linear-gradient(135deg, #fff 0%, var(--pink-soft) 100%); }

  .love-days { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  .love-days span {
    font-size: clamp(3rem, 8vw, 4.6rem); font-weight: 700; line-height: 1;
    background: linear-gradient(135deg, var(--rose), var(--rose-dark)); -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .love-days small { color: var(--muted); font-size: 1rem; }
  .love-ymd { color: var(--muted); font-size: .9rem; margin: 4px 0 8px; }

  .time-box { background: #fff; border-radius: 16px; padding: 10px 4px; box-shadow: 0 4px 14px rgba(var(--rose-rgb), .12); }
  .time-box b { display: block; font-size: 1.5rem; font-weight: 700; color: var(--rose-dark); line-height: 1.2; }
  .time-box small { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }

  .love-progress { height: 10px; border-radius: 10px; background: var(--rose-soft); }
  .love-progress .progress-bar { background: linear-gradient(90deg, var(--rose-light), var(--rose)); border-radius: 10px; transition: width .6s; }

  .badge-milestone { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; font-weight: 500; padding: 5px 10px; border-radius: 20px; margin: 0 6px 6px 0; background: var(--rose-soft); color: var(--rose-dark); }
  .badge-milestone i { color: var(--gold); }

  .cd-title { font-size: 1.25rem; font-weight: 600; }
  .empty-mini { color: var(--muted); font-size: .92rem; padding: 10px 0; }
  .empty-mini a { color: var(--rose-dark); font-weight: 500; }

  .stat-card {
    background: #fff; border: 0; border-radius: 18px; padding: 16px; box-shadow: var(--shadow);
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px; height: 100%; text-align: left; color: var(--slate);
  }
  .stat-card i { color: var(--rose); font-size: 1.15rem; margin-bottom: 6px; }
  .stat-card b { font-size: 1.2rem; font-weight: 700; word-break: break-word; }
  .stat-card small { color: var(--muted); font-size: .78rem; }
  .stat-gacha { background: linear-gradient(135deg, var(--rose-light), var(--rose)); color: #fff; cursor: pointer; transition: transform .2s; }
  .stat-gacha i, .stat-gacha small { color: #fff; }
  .stat-gacha:hover { transform: translateY(-3px) rotate(-1deg); }

  /* ---------- Profiles ---------- */
  .profile-card { overflow: hidden; height: 100%; }
  .profile-cover { height: 90px; background: linear-gradient(135deg, var(--rose-light), var(--rose)); }
  .profile-card.partner .profile-cover { background: linear-gradient(135deg, var(--rose-soft), var(--rose-light)); }
  .avatar { width: 96px; height: 96px; border-radius: 50%; border: 5px solid #fff; object-fit: cover; margin-top: -48px; background: var(--rose-soft); display: flex; align-items: center; justify-content: center; font-size: 2.2rem; color: var(--rose); box-shadow: 0 6px 18px rgba(var(--rose-rgb), .3); }
  .profile-row { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--rose-soft); font-size: .9rem; }
  .profile-row:last-child { border-bottom: 0; }
  .profile-row i { width: 20px; text-align: center; color: var(--rose); margin-top: 3px; }
  .profile-row .lbl { color: var(--muted); font-size: .75rem; display: block; }
  .motto-box { background: var(--pink-soft); border-radius: 14px; padding: 12px 14px; font-style: italic; font-size: .9rem; }

  /* ---------- Plan / checklist cards ---------- */
  .plan-card { height: 100%; transition: transform .2s; }
  .plan-card:hover { transform: translateY(-3px); }
  .plan-card .card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
  .cat-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--rose-soft); color: var(--rose-dark); font-size: .74rem; font-weight: 600; padding: 4px 10px; border-radius: 20px; align-self: flex-start; }
  .plan-title { font-weight: 600; font-size: 1.05rem; margin: 2px 0; }
  .plan-meta { color: var(--muted); font-size: .84rem; }
  .plan-meta i { width: 16px; color: var(--rose); }
  .when-badge { font-size: .7rem; font-weight: 600; padding: 3px 9px; border-radius: 20px; }
  .when-today { background: #e3f6ec; color: #1e8a54; }
  .when-late { background: #fff1d6; color: #b9770e; }
  .when-soon { background: #eef2f7; color: #5d6d7e; }
  .plan-actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; padding-top: 6px; }

  .empty-state { text-align: center; padding: 50px 16px; color: var(--muted); }
  .empty-state i { font-size: 2.6rem; color: var(--rose-soft); margin-bottom: 12px; display: block; }

  /* ---------- Timeline ---------- */
  .timeline { position: relative; padding-left: 38px; }
  .timeline::before { content: ''; position: absolute; left: 11px; top: 4px; bottom: 0; width: 3px; border-radius: 3px; background: linear-gradient(var(--rose-soft), var(--rose)); }
  .tl-item { position: relative; margin-bottom: 28px; animation: fadeUp .5s ease both; }
  .tl-dot { position: absolute; left: -38px; top: 16px; width: 26px; height: 26px; border-radius: 50%; background: var(--rose); color: #fff; font-size: .7rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 5px var(--cream); }
  .tl-card { overflow: hidden; }
  .tl-body { padding: 18px 20px 20px; }
  .tl-date { color: var(--muted); font-size: .8rem; }
  .tl-title { font-weight: 700; font-size: 1.2rem; margin: 2px 0 8px; }

  .media-grid { display: grid; gap: 4px; grid-template-columns: repeat(2, 1fr); }
  .media-grid.count-1 { grid-template-columns: 1fr; }
  .media-thumb { position: relative; display: block; padding: 0; border: 0; background: var(--rose-soft); overflow: hidden; aspect-ratio: 16 / 10; cursor: zoom-in; }
  .media-grid.count-1 .media-thumb { aspect-ratio: 16 / 8; }
  .media-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
  .media-thumb:hover img { transform: scale(1.05); }
  .media-thumb .zoom { position: absolute; right: 8px; bottom: 8px; background: rgba(0, 0, 0, .45); color: #fff; border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: .75rem; }
  .media-link { display: inline-block; font-size: .82rem; color: var(--rose-dark); margin-right: 12px; }

  .cost-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
  .cost-pill { background: var(--pink-soft); border-radius: 12px; padding: 7px 12px; font-size: .8rem; }
  .cost-pill b { display: block; font-size: .95rem; }
  .cost-diff { border-radius: 12px; padding: 7px 12px; font-size: .8rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
  .cost-diff.save { background: #e3f6ec; color: #1e8a54; }
  .cost-diff.over { background: #ffe9e9; color: #c0392b; }

  .review-box { border-radius: 16px; padding: 12px 14px; height: 100%; font-size: .88rem; }
  .review-box.u { background: #eaf3f3; }
  .review-box.p { background: var(--pink-soft); }
  .review-box .who { font-weight: 600; font-size: .85rem; margin-bottom: 2px; }
  .review-box .note { margin: 6px 0 0; color: #3d5a5a; white-space: pre-wrap; word-break: break-word; }
  .review-box .note.empty { color: var(--muted); font-style: italic; }
  .stars { color: var(--gold); font-size: .85rem; letter-spacing: 1px; }
  .stars .off { color: #e3d6d9; }

  /* ---------- Star input ---------- */
  .star-input { display: flex; gap: 4px; }
  .star-input button { background: transparent; border: 0; padding: 2px; font-size: 1.5rem; color: #d9c8cb; transition: transform .15s; line-height: 1; }
  .star-input button.on { color: var(--gold); }
  .star-input button:hover { transform: scale(1.2); }
  .review-form { border-radius: 16px; padding: 14px; }
  .review-form-user { background: #eaf3f3; }
  .review-form-partner { background: var(--pink-soft); }

  /* ---------- Gacha ---------- */
  .gacha-card { background: linear-gradient(180deg, #fff 0%, var(--pink-soft) 100%); }
  .gacha-icon { font-size: 3rem; color: var(--rose); margin-bottom: 10px; }
  .gacha-icon.spin { animation: spin .5s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .gacha-title { font-weight: 700; min-height: 2.4em; }
  .gacha-title.reveal { animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
  @keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
  .gacha-detail { color: var(--muted); font-size: .9rem; }

  /* ---------- Misc ---------- */
  .letter-paper { background: #fffdf7; border: 1px solid #f0e3c8; border-radius: 14px; padding: 22px; white-space: pre-wrap; font-size: .95rem; line-height: 1.8; box-shadow: inset 0 0 30px rgba(242, 176, 30, .08); }
  .app-footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 28px 0 6px; }
  #eggHeart { color: var(--rose); cursor: pointer; user-select: none; }
  #eggHeart.pulse { animation: heartbeat .6s; }
  .music-btn { position: fixed; right: 18px; bottom: 18px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: linear-gradient(135deg, var(--rose-light), var(--rose)); color: #fff; box-shadow: 0 8px 20px rgba(var(--rose-rgb), .45); z-index: 1030; font-size: 1.1rem; }
  .music-btn.playing i { animation: spin 3s linear infinite; }
  .music-btn.off { opacity: .65; }

  .toast { border: 0; border-radius: 14px; box-shadow: var(--shadow); }
  .toast.text-bg-love { background: var(--rose) !important; color: #fff; }

  /* ---------- Login: pilih peran ---------- */
  .role-btn {
    display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left;
    border: 2px solid var(--rose-soft); background: #fff; border-radius: 18px; padding: 14px 16px; color: var(--slate); transition: all .2s;
  }
  .role-btn i { grid-row: 1 / span 2; font-size: 1.4rem; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--pink-soft); color: var(--rose); }
  .role-btn span { font-weight: 600; font-size: 1.05rem; }
  .role-btn small { color: var(--muted); font-size: .76rem; }
  .role-btn:hover { border-color: var(--rose); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(var(--rose-rgb), .2); }
  .role-btn.role-user i { background: #e6f1f1; color: #3f7d7d; }

  /* ---------- Chip akun di sidebar ---------- */
  .me-chip { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .18); border-radius: 14px; padding: 8px 10px; }
  .me-avatar { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--rose); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .me-text { flex: 1; min-width: 0; line-height: 1.2; }
  .me-text small { display: block; font-size: .68rem; opacity: .85; }
  .me-text b { display: block; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .btn-icon-sm { background: transparent; border: 0; color: #fff; width: 32px; height: 32px; border-radius: 10px; }
  .btn-icon-sm:hover { background: rgba(255, 255, 255, .22); }

  /* ---------- Piringan hitam ---------- */
  .vinyl-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 1030; display: flex; align-items: center; gap: 10px; }
  .vinyl-title { max-width: 150px; font-size: .72rem; font-weight: 500; background: #fff; color: var(--slate); padding: 5px 10px; border-radius: 20px; box-shadow: var(--shadow); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateX(8px); transition: all .25s; pointer-events: none; }
  .vinyl-wrap:hover .vinyl-title, .vinyl-wrap.playing .vinyl-title { opacity: 1; transform: none; }
  .vinyl-next { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #fff; color: var(--rose-dark); box-shadow: var(--shadow); }
  .vinyl-next:hover { background: var(--rose-soft); }
  .vinyl { position: relative; width: 76px; height: 76px; border-radius: 50%; border: 0; padding: 0; background: transparent; cursor: pointer; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .35)); transition: transform .2s; }
  .vinyl:hover { transform: scale(1.06); }
  .vinyl-disc {
    position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background:
      radial-gradient(circle, transparent 0 34%, rgba(255, 255, 255, .06) 35% 36%, transparent 37% 46%, rgba(255, 255, 255, .06) 47% 48%, transparent 49% 60%, rgba(255, 255, 255, .05) 61% 62%, transparent 63%),
      conic-gradient(from 20deg, #1b1b1d, #343438 12%, #1b1b1d 25%, #2d2d31 40%, #1b1b1d 55%, #3a3a3f 70%, #1b1b1d 85%, #2d2d31);
    animation: vinylspin 3.2s linear infinite; animation-play-state: paused;
  }
  .vinyl-label { width: 34%; height: 34%; border-radius: 50%; background: radial-gradient(circle at 50% 50%, #fff 0 12%, transparent 13%), linear-gradient(135deg, var(--rose-light), var(--rose)); display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .95); font-size: .55rem; }
  .vinyl-label i { position: relative; top: 0; opacity: 0; }
  .vinyl-wrap.playing .vinyl-disc { animation-play-state: running; }
  @keyframes vinylspin { to { transform: rotate(360deg); } }
  .vinyl-spinner { position: absolute; inset: -4px; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--rose); opacity: 0; }
  .vinyl-wrap.loading .vinyl-spinner { opacity: 1; animation: vinylspin .8s linear infinite; }
  .vinyl-wrap.muted .vinyl::after { content: '\f6a9'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.25rem; text-shadow: 0 2px 6px rgba(0, 0, 0, .7); background: rgba(0, 0, 0, .38); border-radius: 50%; }

  /* ---------- Filter chip ---------- */
  .tl-filters { display: flex; flex-wrap: wrap; gap: 8px; }
  .chip { border: 1.5px solid var(--rose-soft); background: #fff; color: var(--slate); border-radius: 20px; padding: 5px 14px; font-size: .82rem; font-weight: 500; transition: all .2s; }
  .chip:hover { border-color: var(--rose); }
  .chip.active { background: var(--rose); border-color: var(--rose); color: #fff; }

  /* ---------- Statistik ---------- */
  .chart-box { position: relative; height: 300px; }

  /* ---------- Pengaturan ---------- */
  .set-card .set-title { font-weight: 600; font-size: 1.05rem; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
  .set-card .set-title i { width: 34px; height: 34px; border-radius: 10px; background: var(--pink-soft); color: var(--rose); display: inline-flex; align-items: center; justify-content: center; font-size: .95rem; }
  .preset-list { display: flex; flex-wrap: wrap; gap: 10px; }
  .swatch { display: flex; align-items: center; gap: 8px; border: 2px solid transparent; background: #fff; border-radius: 14px; padding: 6px 12px 6px 6px; font-size: .82rem; box-shadow: 0 4px 12px rgba(0, 0, 0, .06); }
  .swatch i { width: 26px; height: 26px; border-radius: 50%; display: inline-block; }
  .swatch.active { border-color: var(--slate); }
  .form-control-color { width: 52px; height: 38px; padding: 4px; }
  .song-box { background: var(--pink-soft); border-radius: 16px; padding: 12px 14px; }
  .song-cur { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
  .song-cur > i { color: var(--rose); }
  .song-name { flex: 1; min-width: 0; font-weight: 500; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .diag-list { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
  .diag-list li { padding: 8px 12px; border-radius: 12px; margin-bottom: 6px; background: var(--pink-soft); }
  .diag-list li.ok::before { content: "¸5  "; }
  .diag-list li.bad { background: #fde8e8; color: #7a1c1c; }
  .diag-list li.bad::before { content: "¼C  "; }
  .diag-list small { display: block; opacity: .85; margin-top: 2px; }
  .reel-loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); background: rgba(0,0,0,.55); color: #fff; padding: 8px 16px; border-radius: 999px; font-size: .85rem; z-index: 3; pointer-events: none; }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
  }

  /* ---------- Rekam Jejak: feed vertikal ala TikTok (tampilan bersih) ---------- */
  .review-form-mine { background: var(--pink-soft); }

  .feed-shell { max-width: 470px; margin: 0 auto; }
  .feed-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
  .feed-title { font-size: 1.3rem; font-weight: 700; margin: 0; }
  .feed-filter { height: 38px; min-width: 38px; padding: 0 12px; border-radius: 20px; border: 1.5px solid var(--rose-soft); background: #fff; color: var(--rose-dark); display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: .82rem; font-weight: 500; box-shadow: var(--shadow); }
  .feed-filter.on { background: var(--rose); border-color: var(--rose); color: #fff; }
  .feed-filter-menu { border: 0; border-radius: 14px; box-shadow: var(--shadow); padding: 6px; min-width: 190px; }
  .feed-filter-menu .dropdown-item { border-radius: 10px; font-size: .88rem; padding: 8px 12px; display: flex; align-items: center; gap: 8px; }
  .feed-filter-menu .dropdown-item.active { background: var(--rose); color: #fff; }

  .feed-wrap { position: relative; }
  .feed {
    height: calc(100vh - 150px); height: calc(100dvh - 150px);
    min-height: 460px; max-height: 900px;
    overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain;
    scrollbar-width: none; border-radius: 26px; background: #111; outline: none;
    box-shadow: 0 18px 50px rgba(var(--rose-rgb), .35);
  }
  .feed::-webkit-scrollbar { display: none; }

  .feed-nav { position: absolute; right: -58px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; }
  .feed-nav-btn { width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; color: var(--rose-dark); box-shadow: var(--shadow); }
  .feed-nav-btn:hover { background: var(--rose); color: #fff; }

  .feed-hint {
    position: absolute; left: 50%; top: 18px; transform: translateX(-50%); z-index: 3; pointer-events: none;
    background: rgba(0, 0, 0, .5); color: #fff; font-size: .75rem; padding: 5px 12px; border-radius: 20px;
    animation: hintBounce 1.6s ease-in-out infinite, hintOut .5s ease 4.5s forwards;
  }
  @keyframes hintBounce { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -6px); } }
  @keyframes hintOut { to { opacity: 0; visibility: hidden; } }

  .feed-empty {
    height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    padding: 30px; color: #fff; font-size: .95rem; line-height: 1.6;
    background: linear-gradient(160deg, var(--rose-light), var(--rose-dark));
  }
  .feed-empty i { font-size: 3rem; margin-bottom: 14px; opacity: .8; }

  .reel { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; color: #fff; background: #111; }

  /* Media: geser ke kanan untuk foto/video berikutnya */
  .reel-media { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
  .reel-media::-webkit-scrollbar { display: none; }
  .reel-slide { position: relative; flex: 0 0 100%; height: 100%; overflow: hidden; scroll-snap-align: center; background: #000; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .reel-blur { position: absolute; inset: -12%; width: 124%; height: 124%; object-fit: cover; filter: blur(28px) brightness(.55) saturate(1.2); }
  .reel-img, .reel-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
  .reel-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 5.5rem; color: rgba(255, 255, 255, .3); background: linear-gradient(160deg, var(--rose-light), var(--rose-dark)); }
  .slide-flash { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; background: rgba(0, 0, 0, .5); color: #fff; font-size: 1.6rem; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transform: scale(.8); }
  .slide-flash.show { animation: flashPop .7s ease; }
  @keyframes flashPop { 0% { opacity: 0; transform: scale(.8); } 25% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.1); } }
  .slide-ext { position: absolute; top: 14px; right: 14px; z-index: 2; border: 0; border-radius: 20px; padding: 5px 12px; font-size: .72rem; font-weight: 600; background: rgba(255, 255, 255, .92); color: var(--rose-dark); display: none; }
  .reel-slide.ext .slide-ext, .reel-slide.failed .slide-ext { display: inline-flex; align-items: center; gap: 5px; }
  .reel-slide.failed .reel-video { visibility: hidden; }

  .reel-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .3) 24%, rgba(0, 0, 0, 0) 46%); transition: opacity .3s; }
  .reel-dots { position: absolute; top: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; pointer-events: none; z-index: 2; transition: opacity .3s; }
  .reel-dots i { width: 16px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .4); }
  .reel-dots i.on { background: #fff; }

  .reel-info, .reel-rail { opacity: 0; transform: translateY(14px); transition: opacity .4s ease, transform .4s ease; }
  .reel.in-view .reel-info, .reel.in-view .reel-rail { opacity: 1; transform: none; }

  .reel-info { position: absolute; left: 16px; right: 80px; bottom: 18px; pointer-events: none; }
  .reel-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .74rem; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
  .reel-cat { background: rgba(255, 255, 255, .22); backdrop-filter: blur(6px); border-radius: 20px; padding: 3px 10px; font-weight: 600; }
  .reel-date { opacity: .95; }
  .reel-title { font-size: 1.35rem; font-weight: 700; margin: 6px 0 0; line-height: 1.25; text-shadow: 0 2px 10px rgba(0, 0, 0, .55); word-break: break-word; }

  .reel-rail { position: absolute; right: 10px; bottom: 18px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
  .rail-btn { display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; color: #fff; font-size: .68rem; font-weight: 600; padding: 0; text-shadow: 0 1px 5px rgba(0, 0, 0, .6); }
  .rail-btn i { position: relative; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; background: rgba(255, 255, 255, .22); backdrop-filter: blur(6px); transition: transform .15s; }
  .rail-btn:active i { transform: scale(.9); }
  .rail-btn.danger i { background: rgba(231, 76, 60, .7); }
  .rail-btn.needs-me i::after { content: ''; position: absolute; top: 2px; right: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--gold); border: 2px solid #222; }

  /* Mode menikmati: ketuk foto untuk menyembunyikan semua tampilan */
  .feed-wrap.clean .reel-info, .feed-wrap.clean .reel-rail, .feed-wrap.clean .reel-dots, .feed-wrap.clean .slide-ext { opacity: 0 !important; pointer-events: none; }
  .feed-wrap.clean .reel-shade { opacity: 0; }

  @media (max-width: 991.98px) {
    .feed-shell { max-width: none; }
    .feed { height: calc(100vh - 165px); height: calc(100dvh - 165px); border-radius: 20px; }
    .feed-nav { display: none; }
    /* beri ruang bagi piringan hitam di pojok kanan bawah */
    body[data-page="timeline"] .reel-rail { bottom: 92px; }
    body[data-page="timeline"] .vinyl-wrap { right: 12px; bottom: 12px; }
    body[data-page="timeline"] .vinyl { width: 64px; height: 64px; }
  }
  @media (max-width: 380px) { .reel-title { font-size: 1.15rem; } }

  /* ---------- Panel rating & kesan (ala komentar TikTok) ---------- */
  .cmt-backdrop { position: fixed; inset: 0; z-index: 1058; background: rgba(0, 0, 0, .3); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .cmt-backdrop.open { opacity: 1; pointer-events: auto; }
  .cmt-panel { position: fixed; z-index: 1059; background: #fff; display: flex; flex-direction: column; transition: transform .3s ease; box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); visibility: hidden; }
  .cmt-panel.open { transform: none !important; visibility: visible; }
  .cmt-grip { width: 42px; height: 4px; border-radius: 4px; background: #e3d6d9; margin: 8px auto 0; }
  .cmt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 12px 18px 4px; }
  .cmt-title { font-weight: 700; font-size: 1.05rem; word-break: break-word; }
  .cmt-sub { font-size: .76rem; color: var(--muted); }
  .cmt-close { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--pink-soft); color: var(--rose-dark); }
  .cmt-summary { display: flex; align-items: center; gap: 14px; padding: 8px 18px 12px; border-bottom: 1px solid #f3e3e6; }
  .cmt-avg { font-size: 2.4rem; font-weight: 700; line-height: 1; background: linear-gradient(135deg, var(--rose), var(--rose-dark)); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .cmt-list { flex: 1; overflow-y: auto; padding: 12px 18px; display: flex; flex-direction: column; gap: 14px; }
  .cmt-item { display: flex; gap: 10px; }
  .cmt-ava { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }
  .cmt-ava.user { background: #4f8f9a; }
  .cmt-ava.partner { background: var(--rose); }
  .cmt-body { flex: 1; min-width: 0; }
  .cmt-name { font-size: .82rem; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .cmt-name em { font-style: normal; font-weight: 400; color: var(--muted); }
  .cmt-body .stars { font-size: .78rem; }
  .cmt-text { margin: 3px 0 0; font-size: .9rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
  .cmt-text.empty { color: var(--muted); font-style: italic; }
  .cmt-form { border-top: 1px solid #f3e3e6; padding: 10px 18px calc(12px + env(safe-area-inset-bottom)); background: var(--cream); }
  .cmt-form-who { font-size: .76rem; font-weight: 600; margin-bottom: 4px; color: var(--rose-dark); }
  .cmt-input { display: flex; gap: 8px; align-items: flex-end; margin-top: 6px; }
  .cmt-input textarea { flex: 1; resize: none; border: 1.5px solid #eccfd4; border-radius: 16px; padding: 8px 12px; font-size: .9rem; background: #fff; max-height: 120px; }
  .cmt-input textarea:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 .2rem rgba(var(--rose-rgb), .2); }
  .cmt-send { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; border: 0; background: linear-gradient(135deg, var(--rose-light), var(--rose)); color: #fff; }
  .cmt-send:disabled { opacity: .6; }

  @media (min-width: 992px) {
    .cmt-backdrop { background: rgba(0, 0, 0, .12); }
    .cmt-panel { top: 0; right: 0; bottom: 0; width: 400px; transform: translateX(100%); border-radius: 22px 0 0 22px; box-shadow: -10px 0 40px rgba(0, 0, 0, .18); }
    .cmt-grip { display: none; }
    .cmt-head { padding-top: 22px; }
  }
  @media (max-width: 991.98px) {
    .cmt-panel { left: 0; right: 0; bottom: 0; max-height: 74vh; max-height: 74dvh; transform: translateY(100%); border-radius: 22px 22px 0 0; }
  }

  /* ---------- Edit kenangan: kelola foto/video ---------- */
  .media-edit { display: flex; flex-wrap: wrap; gap: 10px; }
  .me-item { position: relative; width: 92px; height: 92px; border-radius: 14px; overflow: hidden; background: var(--rose-soft); box-shadow: 0 4px 12px rgba(var(--rose-rgb), .2); }
  .me-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .me-item .me-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--rose); font-size: 1.6rem; }
  .me-badge { position: absolute; left: 6px; top: 6px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .62rem; padding: 2px 6px; border-radius: 10px; }
  .me-ctl { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 4px; background: linear-gradient(to top, rgba(0, 0, 0, .65), transparent); }
  .me-ctl button { width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--rose-dark); font-size: .65rem; padding: 0; }
  .me-ctl button.x { background: #e74c3c; color: #fff; }
  .me-ctl button:disabled { opacity: .35; }
  .me-item.up { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; font-size: .68rem; color: var(--rose-dark); text-align: center; padding: 6px; }
  .media-prog { height: 6px; margin-top: 10px; border-radius: 6px; background: var(--rose-soft); }
  .media-prog .progress-bar { background: linear-gradient(90deg, var(--rose-light), var(--rose)); }

  /* ---------- History perjalanan (di bawah Statistik) ---------- */
  .hist-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px dashed #f0d4d9; }
  .hist-row:last-child { border-bottom: 0; }
  .hist-date { text-align: center; background: var(--pink-soft); border-radius: 14px; padding: 6px 0; line-height: 1.1; }
  .hist-date b { display: block; font-size: 1.25rem; color: var(--rose-dark); }
  .hist-date small { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  .hist-title { font-weight: 600; word-break: break-word; }
  .hist-sub { font-size: .76rem; color: var(--muted); margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
  .hist-sub .stars { font-size: .72rem; }
  .hist-cost { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: .78rem; color: var(--muted); line-height: 1.4; white-space: nowrap; }
  .hist-cost .hc { display: flex; gap: 8px; align-items: baseline; }
  .hist-cost .hc small { font-size: .72rem; color: var(--muted); }
  .hist-cost b { color: var(--slate); font-size: .9rem; }
  .hist-diff { font-weight: 600; }
  .hist-diff.save { color: #1e8a54; }
  .hist-diff.over { color: #c0392b; }
  .hist-total { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: flex-end; padding-top: 14px; margin-top: 4px; border-top: 2px solid var(--rose-soft); font-size: .85rem; }
  @media (max-width: 575.98px) {
    .hist-row { grid-template-columns: 56px 1fr; }
    .hist-cost { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 6px 20px; }
    .hist-cost .hc { flex-direction: column; gap: 0; }
    .hist-total { justify-content: flex-start; }
  }

  /* ---------- Rekam Jejak: layar penuh & nonton murni ---------- */
  .feed-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .reel-title { color: #fff; }
  .feed-shell { position: relative; }
  .feed-top { position: absolute; top: 12px; right: 12px; margin: 0; z-index: 6; transition: opacity .3s; }
  .feed-filter { height: 36px; min-width: 36px; background: rgba(0, 0, 0, .38); border: 0; color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .feed-filter.on { background: var(--rose); color: #fff; }
  body[data-page="timeline"] .app-footer { display: none; }
  body[data-page="timeline"] #page-timeline { animation: none; }
  body[data-page="timeline"] .main { padding-top: 20px; padding-bottom: 20px; }
  .feed { height: calc(100vh - 40px); height: calc(100dvh - 40px); max-height: 940px; }

  /* ketuk layar sekali: semua tulisan & tombol hilang (piringan tinggal samar, tetap bisa diketuk) */
  body.feed-clean[data-page="timeline"] .feed-top,
  body.feed-clean[data-page="timeline"] .feed-nav,
  body.feed-clean[data-page="timeline"] .vinyl-title { opacity: 0 !important; pointer-events: none !important; }
  body.feed-clean[data-page="timeline"] .vinyl-wrap { opacity: .3; }
  body.feed-clean[data-page="timeline"] .feed-hint { display: none; }

  @media (max-width: 991.98px) {
    body[data-page="timeline"] .main { padding: 0; min-height: 0; }
    body[data-page="timeline"] .feed-shell { position: fixed; inset: 0; z-index: 1029; max-width: none; }
    body[data-page="timeline"] .feed { height: 100vh; height: 100dvh; max-height: none; min-height: 0; border-radius: 0; box-shadow: none; }
    body[data-page="timeline"] .topbar { background: linear-gradient(to bottom, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)); box-shadow: none; pointer-events: none; transition: opacity .3s; }
    body[data-page="timeline"] .topbar .btn-icon { pointer-events: auto; }
    body[data-page="timeline"] .topbar-title { visibility: hidden; }
    body.feed-clean[data-page="timeline"] .topbar { opacity: 0; }
    body.feed-clean[data-page="timeline"] .topbar .btn-icon { pointer-events: none; }
    /* judul lagu hanya muncul sebentar saat lagu berganti */
    body[data-page="timeline"] .vinyl-wrap:not(.flash) .vinyl-title { opacity: 0; }
  }


/* ===== Tambahan migrasi Cloudflare ===== */
.link-add textarea { font-size: .9rem; }
.pin-force-banner { border-radius: 16px; border: 0; background: rgba(var(--rose-rgb), .12); color: var(--rose-dark); }
.yt-slide iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
