    :root {
      --accent: #f472b6;
      --accent-gradient: linear-gradient(135deg, #f472b6 0%, #fb7185 100%);
      --bg: #fffbfb;
      --card-bg: #ffffff;
      --text: #374151;
      --muted: #6b7280;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
    }

    body {
      font-family: 'Nunito', sans-serif;
      background: var(--bg);
      background-image: radial-gradient(#fed7aa 0.75px, transparent 0.75px), radial-gradient(#fbcfe8 0.75px, var(--bg) 0.75px);
      background-size: 30px 30px;
      background-position: 0 0, 15px 15px;
      color: var(--text);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: calc(16px + env(safe-area-inset-top)) 16px calc(40px + env(safe-area-inset-bottom));
      overflow-x: hidden;
      position: relative;
    }

    canvas#petals {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      pointer-events: none;
      z-index: 100;
    }

    /* Top control bar: Music on the left, Coupons on the right */
    .top-bar {
      position: fixed;
      top: calc(12px + env(safe-area-inset-top));
      left: 16px;
      right: 16px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      z-index: 50;
      pointer-events: none;
    }

    .vinyl-player, .wallet-btn {
      pointer-events: auto;
      background: rgba(255, 255, 255, 0.88);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      padding: 6px 14px 6px 8px;
      border-radius: 999px;
      box-shadow: 0 4px 15px rgba(0,0,0,0.06);
      cursor: pointer;
      border: 1px solid rgba(244, 114, 182, 0.25);
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--text);
      transition: transform 0.15s;
    }
    .vinyl-player:active, .wallet-btn:active { transform: scale(0.96); }

    .vinyl-disk {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: radial-gradient(circle, #111 25%, #333 30%, #111 60%, #444 80%, #111 100%);
      border: 2px solid #555;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .vinyl-disk::after {
      content: '';
      width: 8px;
      height: 8px;
      background: var(--accent);
      border-radius: 50%;
    }
    .vinyl-disk.spinning { animation: spin 3s linear infinite; }
    @keyframes spin { 100% { transform: rotate(360deg); } }

    .badge {
      background: #e11d48;
      color: #fff;
      font-size: 0.7rem;
      padding: 2px 7px;
      border-radius: 999px;
      font-weight: 800;
    }

    .container {
      width: 100%;
      max-width: 440px;
      text-align: center;
      z-index: 10;
      margin-top: 48px;
    }

    .love-timer {
      background: rgba(255, 255, 255, 0.88);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      padding: 10px 18px;
      border-radius: 20px;
      display: inline-block;
      margin-bottom: 16px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.04);
      border: 1px solid rgba(255,255,255,0.8);
      cursor: pointer;
    }
    .love-timer-label {
      font-size: 0.72rem;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      font-weight: 700;
      margin-bottom: 2px;
    }
    .love-timer-digits {
      font-size: 0.95rem;
      font-weight: 800;
      color: #e11d48;
    }

    .jar-wrapper {
      position: relative;
      width: 130px;
      height: 170px;
      margin: 0 auto 12px;
      cursor: pointer;
    }
    .jar-container {
      width: 100%;
      height: 100%;
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    .jar-container.shake { animation: jarShake 0.4s ease-in-out; }
    @keyframes jarShake {
      0%, 100% { transform: rotate(0deg); }
      25% { transform: rotate(-7deg) scale(1.04); }
      75% { transform: rotate(7deg) scale(1.04); }
    }
    .jar-lid {
      width: 78px;
      height: 15px;
      background: linear-gradient(180deg, #f1f5f9 0%, #cbd5e1 100%);
      border: 2px solid #94a3b8;
      border-radius: 9px;
      box-shadow: 0 3px 6px rgba(0,0,0,0.08);
      z-index: 3;
    }
    .jar-neck {
      width: 64px;
      height: 8px;
      background: rgba(255, 255, 255, 0.45);
      border-left: 2.5px solid #cbd5e1;
      border-right: 2.5px solid #cbd5e1;
      z-index: 2;
    }
    .jar-glass {
      width: 120px;
      height: 138px;
      background: linear-gradient(145deg, rgba(255,255,255,0.75) 0%, rgba(255,241,242,0.4) 100%);
      border: 3px solid rgba(226, 232, 240, 0.9);
      border-radius: 24px 24px 34px 34px;
      position: relative;
      backdrop-filter: blur(3px);
      -webkit-backdrop-filter: blur(3px);
      box-shadow: 0 15px 30px rgba(244, 114, 182, 0.18), inset 0 0 16px rgba(255,255,255,0.9);
      overflow: hidden;
    }
    .jar-glass::before {
      content: '';
      position: absolute;
      top: 10px;
      left: 10px;
      width: 10px;
      height: 65px;
      background: rgba(255, 255, 255, 0.65);
      border-radius: 8px;
      filter: blur(1px);
    }
    .paper-roll {
      position: absolute;
      width: 20px;
      height: 11px;
      border-radius: 5px;
      box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    }

    h1 {
      font-family: 'Caveat', cursive;
      font-size: 2.85rem;
      color: #1f2937;
      line-height: 1.1;
      margin-bottom: 2px;
    }
    p.subtitle {
      font-size: 0.9rem;
      color: var(--muted);
      margin-bottom: 16px;
    }

    .filter-pills {
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 16px;
    }
    .pill {
      background: rgba(255, 255, 255, 0.85);
      border: 1px solid #fed7aa;
      color: var(--muted);
      padding: 6px 13px;
      border-radius: 999px;
      font-size: 0.82rem;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s;
    }
    .pill.active {
      background: var(--text);
      color: #fff;
      border-color: var(--text);
    }

    .card-export-wrapper { padding: 4px; }
    .note-card {
      background: var(--card-bg);
      border-radius: 28px;
      padding: 34px 22px;
      box-shadow: 0 16px 35px -8px rgba(244, 114, 182, 0.25);
      border: 1px solid rgba(255,255,255,0.9);
      min-height: 200px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      position: relative;
    }
    .note-card.fly-in {
      animation: flyFromJar 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    @keyframes flyFromJar {
      0% { opacity: 0; transform: translateY(-25px) scale(0.92); }
      100% { opacity: 1; transform: translateY(0) scale(1); }
    }
    .category-tag {
      position: absolute;
      top: 16px;
      font-size: 0.78rem;
      font-weight: 800;
      color: #f472b6;
      text-transform: uppercase;
      letter-spacing: 1px;
    }
    .note-text {
      font-family: 'Caveat', cursive;
      font-size: 1.95rem;
      color: #111827;
      line-height: 1.35;
      margin: 10px 0 14px;
    }

    .card-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: center;
      margin-top: 14px;
    }
    .btn-secondary {
      background: #fdf2f8;
      border: 1px solid #fbcfe8;
      color: #db2777;
      padding: 8px 16px;
      border-radius: 999px;
      font-size: 0.82rem;
      font-weight: 700;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }
    .btn-secondary:active { transform: scale(0.96); }
    .btn-promise {
      background: linear-gradient(135deg, #10b981 0%, #059669 100%);
      color: #fff;
      border: none;
    }

    .btn-main {
      width: 100%;
      background: var(--accent-gradient);
      color: white;
      border: none;
      padding: 16px 26px;
      border-radius: 999px;
      font-size: 1.12rem;
      font-weight: 800;
      cursor: pointer;
      box-shadow: 0 10px 22px rgba(244, 114, 182, 0.4);
      margin-top: 18px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: transform 0.15s;
    }
    .btn-main:active { transform: scale(0.97); }
    .btn-main:disabled { background: #d1d5db; box-shadow: none; cursor: not-allowed; }

    .mode-switch {
      margin-top: 18px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-size: 0.84rem;
      color: var(--muted);
      cursor: pointer;
    }

    .reply-box {
      margin-top: 28px;
      background: rgba(255,255,255,0.75);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      padding: 18px;
      border-radius: 22px;
      border: 1px solid rgba(255,255,255,0.9);
      box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    }
    .reply-box h3 {
      font-family: 'Caveat', cursive;
      font-size: 1.55rem;
      color: var(--text);
      margin-bottom: 8px;
    }
    .reply-textarea {
      width: 100%;
      border: 1px solid #fed7aa;
      background: #fff;
      border-radius: 16px;
      padding: 12px 14px;
      font-family: 'Nunito', sans-serif;
      font-size: 0.95rem;
      resize: none;
      height: 70px;
      outline: none;
      user-select: text;
    }
    .btn-reply {
      margin-top: 8px;
      background: #1f2937;
      color: #fff;
      border: none;
      padding: 11px 20px;
      border-radius: 999px;
      font-size: 0.9rem;
      font-weight: 700;
      cursor: pointer;
      width: 100%;
    }

    /* Bottom sheet modal for coupons wallet */
    .sheet-overlay {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0, 0, 0, 0.45);
      backdrop-filter: blur(4px);
      z-index: 150;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s;
    }
    .sheet-overlay.active { opacity: 1; pointer-events: auto; }

    .bottom-sheet {
      position: fixed;
      left: 0; right: 0; bottom: 0;
      background: #ffffff;
      border-radius: 28px 28px 0 0;
      padding: 20px 18px calc(24px + env(safe-area-inset-bottom));
      max-height: 80vh;
      overflow-y: auto;
      z-index: 160;
      transform: translateY(100%);
      transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1);
      box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
    }
    .sheet-overlay.active .bottom-sheet { transform: translateY(0); }

    .sheet-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 16px;
    }
    .sheet-header h2 {
      font-family: 'Caveat', cursive;
      font-size: 2.2rem;
      color: #111827;
    }
    .btn-close {
      background: #f3f4f6;
      border: none;
      width: 34px;
      height: 34px;
      border-radius: 50%;
      font-size: 1.1rem;
      cursor: pointer;
      font-weight: 800;
    }

    .sheet-tabs {
      display: flex;
      gap: 8px;
      margin-bottom: 16px;
    }
    .sheet-tab {
      flex: 1;
      padding: 8px;
      border: 1px solid #e5e7eb;
      background: #f9fafb;
      border-radius: 12px;
      font-size: 0.82rem;
      font-weight: 700;
      color: var(--muted);
      cursor: pointer;
      text-align: center;
    }
    .sheet-tab.active {
      background: #111827;
      color: #fff;
      border-color: #111827;
    }

    .coupon-item {
      background: #fff;
      border: 1px solid #fbcfe8;
      border-radius: 18px;
      padding: 14px;
      margin-bottom: 10px;
      box-shadow: 0 4px 12px rgba(244, 114, 182, 0.1);
      text-align: left;
    }
    .coupon-item.done {
      border-color: #e5e7eb;
      background: #f9fafb;
      opacity: 0.85;
    }
    .coupon-title {
      font-size: 0.95rem;
      font-weight: 700;
      color: #1f2937;
      margin-bottom: 6px;
    }
    .coupon-meta {
      font-size: 0.75rem;
      color: var(--muted);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .btn-remind {
      background: #fdf2f8;
      border: 1px solid #f472b6;
      color: #db2777;
      padding: 4px 10px;
      border-radius: 999px;
      font-size: 0.72rem;
      font-weight: 800;
      cursor: pointer;
    }

    .toast {
      position: fixed;
      bottom: calc(20px + env(safe-area-inset-bottom));
      left: 50%;
      transform: translateX(-50%) translateY(100px);
      background: #111827;
      color: #fff;
      padding: 12px 24px;
      border-radius: 999px;
      font-size: 0.88rem;
      font-weight: 700;
      box-shadow: 0 10px 25px rgba(0,0,0,0.2);
      transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      z-index: 250;
      pointer-events: none;
      white-space: nowrap;
    }
    .toast.show { transform: translateX(-50%) translateY(0); }