    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      font-family: "Nunito", Arial, Helvetica, sans-serif;
      -webkit-tap-highlight-color: transparent;
    }

    html {
      touch-action: manipulation;
      -webkit-text-size-adjust: 100%;
      text-size-adjust: 100%;
      overscroll-behavior: none;
    }

    input,
    textarea,
    select,
    button,
    a,
    .photo-item,
    .love-request-option {
      touch-action: manipulation;
    }

    input,
    textarea {
      -webkit-user-select: text;
      -khtml-user-select: text;
      -moz-user-select: text;
      -ms-user-select: text;
      user-select: text;
    }

    :root {
      --bg: #fffafc;
      --card: rgba(255, 255, 255, 0.9);
      --card-solid: #ffffff;
      --text-main: #5e3b45;
      --text-soft: #7d6168;
      --pink: #e85d8b;
      --pink-light: #ff8bb0;
      --pink-dark: #9d4562;
      --pink-soft: #ffe4ee;
      --line: rgba(226, 165, 186, 0.28);
      --shadow: rgba(var(--pink-rgb), 0.18);
      --grid-size: 32px;
      --time-deco: rgba(var(--pink-rgb), 0.14);
      --radial-1: rgba(255, 217, 232, 0.8);
      --radial-2: rgba(255, 221, 210, 0.7);
      --pink-rgb: 232, 93, 139;
      --bg-gradient: linear-gradient(135deg, #ee9ca7, #ffdde1);
    }

    body.dark {
      --bg: #000000;
      --card: rgba(13, 10, 11, 0.82);
      --card-solid: #0d0a0b;
      --text-main: #ffe8f0;
      --text-soft: #e5c5d0;
      --pink: #e54b73; /* Hồng neon đậm sắc nét */
      --pink-light: #ff8bb0; /* Hồng neon trung tính */
      --pink-dark: #b22d4f; /* Hồng đậm tối ưu tương phản với chữ trắng */
      --pink-soft: #25181b;
      --line: rgba(229, 75, 115, 0.13); /* Đổi độ rõ caro thành 0.13 */
      --shadow: rgba(0, 0, 0, 0.85);
      --time-deco: rgba(229, 75, 115, 0.12); /* Giờ đôi đổi thành màu hồng tối mờ ảo, không sáng quá */
      --radial-1: rgba(229, 75, 115, 0.08);
      --radial-2: rgba(0, 0, 0, 0.95);
      --pink-rgb: 229, 75, 115;
      --bg-gradient: linear-gradient(135deg, #050505 0%, #0c0809 100%);
      --caption-bg: linear-gradient(135deg, #ff758c 0%, #b22d4f 100%);
    }

    /* 1. Theme: Giao diện Sáng (gradient #ffdde1 -> #ffa1af) */
    body.theme-1 {
      --bg: #fff5f6;
      --card: rgba(255, 255, 255, 0.86);
      --card-solid: #ffffff;
      --text-main: #5c2a32;
      --text-soft: #8c4e57;
      --pink: #d35069;
      --pink-light: #ffdde1;
      --pink-dark: #d35069; /* Sử dụng chung tông màu hồng đậm của nút nhắn tin làm chuẩn */
      --pink-soft: #fff0f2;
      --line: rgba(211, 80, 105, 0.13); /* Đổi độ rõ caro thành 0.13 */
      --shadow: rgba(211, 80, 105, 0.08);
      --time-deco: rgba(211, 80, 105, 0.16);
      --radial-1: rgba(255, 221, 225, 0.9);
      --radial-2: rgba(255, 238, 240, 0.8);
      --pink-rgb: 211, 80, 105;
      --bg-gradient: linear-gradient(135deg, #ffdde1 0%, #ffa1af 100%);
      --caption-bg: linear-gradient(135deg, #ff758c 0%, #d35069 100%);
    }

    /* 2. Theme: Giao diện Tối (Bảo lưu các giá trị của body.dark) */
    body.theme-2 {
      --bg: #000000;
      --card: rgba(13, 10, 11, 0.82);
      --card-solid: #0d0a0b;
      --text-main: #ffe8f0;
      --text-soft: #e5c5d0;
      --pink: #e54b73;
      --pink-light: #ff8bb0;
      --pink-dark: #b22d4f;
      --pink-soft: #25181b;
      --line: rgba(229, 75, 115, 0.13);
      --shadow: rgba(0, 0, 0, 0.85);
      --time-deco: rgba(229, 75, 115, 0.12);
      --radial-1: rgba(229, 75, 115, 0.08);
      --radial-2: rgba(0, 0, 0, 0.95);
      --pink-rgb: 229, 75, 115;
      --bg-gradient: linear-gradient(135deg, #050505 0%, #0c0809 100%);
      --caption-bg: linear-gradient(135deg, #ff758c 0%, #b22d4f 100%);
    }

    /* Pink Neon Glow adjustments for Dark Mode (Đồng bộ phát sáng màu hồng) */
    body.dark .lock-card,
    body.dark .event-card,
    body.dark .lockluv-panel,
    body.dark .chat-popup,
    body.dark .calendar-card,
    body.dark .flower-card,
    body.dark .photobooth-card,
    body.dark .lockluv-history-card {
      border: 1px solid rgba(255, 139, 176, 0.3) !important;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.85), 0 0 15px rgba(255, 139, 176, 0.18) !important;
    }

    body.dark .btn-main,
    body.dark .unlock-btn,
    body.dark .lockluv-history-btn,
    body.dark .lockluv-refresh-btn,
    body.dark .streak-btn {
      box-shadow: 0 0 12px rgba(255, 139, 176, 0.3) !important;
      border: 1px solid rgba(255, 139, 176, 0.35) !important;
    }

    body.dark .lockluv-history-btn,
    body.dark .lockluv-refresh-btn {
      background: rgba(255, 139, 176, 0.12) !important;
      color: #ffffff !important;
    }

    body.dark h1 {
      background: linear-gradient(135deg, #ff8bb0 20%, #ffc5d5 100%) !important;
      -webkit-background-clip: text !important;
      -webkit-text-fill-color: transparent !important;
    }

    body.dark .subtitle {
      color: #ffe0ea !important;
    }

    body.dark .love-pill {
      color: var(--pink-light) !important;
    }

    body.dark .lockluv-history-btn:hover,
    body.dark .lockluv-refresh-btn:hover {
      background: rgba(255, 139, 176, 0.22) !important;
      border-color: rgba(255, 139, 176, 0.5) !important;
      box-shadow: 0 0 15px rgba(255, 139, 176, 0.35) !important;
    }

    body.dark .btn-main:hover,
    body.dark .unlock-btn:hover {
      box-shadow: 0 0 18px rgba(255, 139, 176, 0.5) !important;
    }

    body.dark input:focus,
    body.dark textarea:focus {
      border-color: var(--pink) !important;
      box-shadow: 0 0 8px rgba(255, 139, 176, 0.4) !important;
      outline: none !important;
    }

    body {
      -webkit-touch-callout: none;
      -webkit-user-select: none;
      -khtml-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      user-select: none;
      overscroll-behavior: none;
      width: 100%;
      min-height: 100vh;
      min-height: 100dvh;
      overflow-y: auto;
      overflow-x: hidden;
      color: var(--text-main);
      display: flex;
      align-items: flex-end;
      justify-content: center;
      padding: 18px 18px 0 18px;
      background-color: var(--bg);
      background-image:
        linear-gradient(to right, var(--line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--line) 1px, transparent 1px),
        var(--bg-gradient);
      background-size:
        var(--grid-size) var(--grid-size),
        var(--grid-size) var(--grid-size),
        cover;
      transition: all 0.5s ease-in-out;
    }

    body::before {
      display: none;
    }

    button {
      font-family: "Nunito", Arial, Helvetica, sans-serif;
    }

    .ui-svg-icon {
      width: 1em;
      height: 1em;
      display: block;
      color: var(--pink);
      fill: currentColor;
      stroke: none;
      filter: drop-shadow(0 2px 3px rgba(var(--pink-rgb), 0.12));
      pointer-events: none;
      flex: 0 0 auto;
    }

    .ui-svg-icon path,
    .ui-svg-icon rect,
    .ui-svg-icon circle,
    .ui-svg-icon line,
    .ui-svg-icon polyline,
    .ui-svg-icon polygon {
      fill: currentColor;
      stroke: none;
    }

    .ui-svg-icon.fill-soft {
      fill: currentColor;
      fill-opacity: 1;
    }

    /* Nền sáng/trắng: icon màu hồng */
    .mode-btn .ui-svg-icon,
    .music-note-btn .ui-svg-icon,
    .love-heart .ui-svg-icon,
    .calendar-nav-btn .ui-svg-icon,
    .modal-nav .ui-svg-icon,
    .calendar-close .ui-svg-icon,
    .flower-close .ui-svg-icon,
    .photobooth-close .ui-svg-icon,
    .photobooth-theme-close .ui-svg-icon,
    .love-request-close .ui-svg-icon,
    .photobooth-fab .ui-svg-icon,
    .chat-fab .ui-svg-icon,
    .photo-manage-cancel .ui-svg-icon,
    .photo-manage-delete .ui-svg-icon,
    .photo-crop-cancel .ui-svg-icon,
    .love-request-option .ui-svg-icon {
      color: var(--pink) !important;
    }

    /* Nền hồng/gradient hồng: icon trắng để tương phản */
    .unlock-btn .ui-svg-icon,
    .music-play-btn .ui-svg-icon,
    .love-request-fab .ui-svg-icon,
    .love-request-send .ui-svg-icon,
    .photobooth-primary .ui-svg-icon,
    .photobooth-save .ui-svg-icon,
    .photo-manage-replace .ui-svg-icon,
    .photo-crop-confirm .ui-svg-icon,
    .photo-add-plus .ui-svg-icon,
    .love-request-option.selected .ui-svg-icon {
      color: #ffffff !important;
      filter: drop-shadow(0 1px 1px rgba(141, 52, 77, 0.18));
    }

    .love-request-option:hover:not(:disabled) .ui-svg-icon,
    .music-control-btn:hover .ui-svg-icon,
    .music-control-btn:active .ui-svg-icon {
      color: #ffffff !important;
    }

    body.dark .ui-svg-icon {
      color: var(--pink-light);
    }

    body.dark .unlock-btn .ui-svg-icon,
    body.dark .music-play-btn .ui-svg-icon,
    body.dark .love-request-fab .ui-svg-icon,
    body.dark .love-request-send .ui-svg-icon,
    body.dark .photobooth-primary .ui-svg-icon,
    body.dark .photobooth-save .ui-svg-icon,
    body.dark .photo-manage-replace .ui-svg-icon,
    body.dark .photo-crop-confirm .ui-svg-icon,
    body.dark .photo-add-plus .ui-svg-icon,
    body.dark .love-request-option.selected .ui-svg-icon {
      color: #ffffff !important;
    }

    .mode-btn .ui-svg-icon { width: 18px; height: 18px; }
    .music-note-btn .ui-svg-icon { width: 25px; height: 25px; }
    .doodle .ui-svg-icon { width: 1em; height: 1em; }
    .close-btn .ui-svg-icon,
    .calendar-close .ui-svg-icon,
    .flower-close .ui-svg-icon,
    .photobooth-close .ui-svg-icon,
    .photobooth-theme-close .ui-svg-icon,
    .love-request-close .ui-svg-icon { width: 18px; height: 18px; margin: auto; }
    .modal-nav .ui-svg-icon,
    .calendar-nav-btn .ui-svg-icon { width: 20px; height: 20px; margin: auto; }
    .photo-add-plus .ui-svg-icon {
      width: 30px;
      height: 30px;
      color: #fff;
    }
    .photo-manage-icon .ui-svg-icon,
    .photobooth-icon .ui-svg-icon,
    .love-request-icon .ui-svg-icon,
    .flower-big .ui-svg-icon,
    .lock-icon .ui-svg-icon { width: 52%; height: 52%; margin: auto; }
    .calendar-heart-icon .ui-svg-icon { width: 23px; height: 23px; color: var(--pink); }
    .pull-refresh-arrow .ui-svg-icon { width: 17px; height: 17px; }
    .love-request-send .ui-svg-icon { width: 16px; height: 16px; color: #fff; }

    button .ui-svg-icon,
    .love-heart .ui-svg-icon,
    .lock-icon .ui-svg-icon,
    .flower-big .ui-svg-icon,
    .photobooth-icon .ui-svg-icon,
    .love-request-icon .ui-svg-icon,
    .photo-manage-icon .ui-svg-icon,
    .photo-add-plus .ui-svg-icon {
      width: 1em;
      height: 1em;
    }

    body.dark .ui-svg-icon {
      color: var(--pink-light);
    }

    .love-request-option .ui-svg-icon {
      width: 18px;
      height: 18px;
    }

    .love-request-option {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
    }



    /* =========================================================
      LOADING SCREEN
      Màn hình chờ trước khi vào trang chính.
      Nội dung hiển thị sẽ được chỉnh trong CONFIG.loading ở phần script.
    ========================================================= */

    .loading-screen {
      position: fixed;
      inset: 0;
      z-index: 2000;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 18px;
      background-color: var(--bg);
      background-image:
        linear-gradient(to right, var(--line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--line) 1px, transparent 1px),
        radial-gradient(circle at top left, rgba(255, 217, 232, 0.9), transparent 32%),
        radial-gradient(circle at bottom right, rgba(255, 221, 210, 0.82), transparent 32%);
      background-size:
        var(--grid-size) var(--grid-size),
        var(--grid-size) var(--grid-size),
        auto,
        auto;
      transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s ease;
    }

    .loading-screen.hidden {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transform: scale(1.03);
    }

    html.skip-loading-screen .loading-screen,
    html.skip-initial-loading .loading-screen {
      display: none !important;
      opacity: 0 !important;
      visibility: hidden !important;
      pointer-events: none !important;
    }

    .loading-card {
      width: min(430px, 100%);
      min-height: 260px;
      position: relative;
      overflow: hidden;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 34px 26px;
      border-radius: 30px;
      background: rgba(255, 255, 255, 0.82);
      border: 1.5px solid rgba(255, 255, 255, 0.68);
      box-shadow:
        0 24px 70px rgba(var(--pink-rgb), 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.74);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
    }

    body.dark .loading-card {
      background: rgba(38, 31, 40, 0.82);
      border-color: rgba(255, 255, 255, 0.16);
      box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }

    .loading-card::before,
    .loading-card::after {
      content: "";
      position: absolute;
      width: 66px;
      height: 16px;
      top: 18px;
      background: rgba(255, 229, 162, 0.62);
      border-radius: 7px;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    }

    .loading-card::before {
      left: 24px;
      transform: rotate(-8deg);
    }

    .loading-card::after {
      right: 24px;
      transform: rotate(8deg);
    }

    .loading-icon {
      width: 76px;
      height: 76px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      margin-bottom: 18px;
      color: var(--pink);
      font-size: 38px;
      background:
        radial-gradient(circle at 30% 25%, #ffffff, transparent 34%),
        linear-gradient(135deg, #ffe1ec, #ffffff);
      border: 1px solid rgba(var(--pink-rgb), 0.16);
      box-shadow: 0 16px 34px rgba(var(--pink-rgb), 0.18);
      animation: loadingBeat 1.5s ease-in-out infinite;
    }


    /* Logo hiển thị trên màn hình splash/loading */
    .loading-logo {
      width: 94px;
      height: 94px;
      object-fit: contain;
      display: block;
      margin: 0 auto 18px;
      filter: drop-shadow(0 12px 24px rgba(var(--pink-rgb), 0.22));
      animation: loadingBeat 1.5s ease-in-out infinite;
      transform-origin: center;
    }

    @media (max-width: 600px) {
      .loading-logo {
        width: 78px;
        height: 78px;
        margin-bottom: 15px;
      }
    }

    .loading-eyebrow {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      color: var(--pink);
      background: var(--card-solid);
      border: 1px solid rgba(237, 154, 183, 0.28);
      border-radius: 999px;
      padding: 8px 14px;
      margin-bottom: 12px;
      font-size: 12px;
      font-weight: 900;
      letter-spacing: 1.3px;
      text-transform: uppercase;
      box-shadow: 0 10px 24px rgba(var(--pink-rgb), 0.12);
    }

    .loading-title {
      color: var(--pink-dark);
      font-size: clamp(25px, 5vw, 36px);
      line-height: 1.12;
      font-weight: 900;
      letter-spacing: -0.7px;
      margin-bottom: 10px;
    }

    .loading-text {
      max-width: 330px;
      color: var(--text-soft);
      font-size: 14px;
      line-height: 1.6;
      font-weight: 800;
      margin-bottom: 20px;
    }

    .loading-progress {
      width: min(280px, 100%);
      height: 12px;
      padding: 3px;
      border-radius: 999px;
      background: rgba(var(--pink-rgb), 0.11);
      border: 1px solid rgba(var(--pink-rgb), 0.13);
      overflow: hidden;
      box-shadow: inset 0 2px 8px rgba(var(--pink-rgb), 0.08);
    }

    .loading-progress span {
      display: block;
      height: 100%;
      width: 0%;
      border-radius: inherit;
      background: linear-gradient(135deg, var(--pink-light), var(--pink));
      transition: width 0.65s ease;
    }

    .loading-percent {
      color: var(--pink-dark);
      font-size: 18px;
      font-weight: 900;
      margin-top: 14px;
      min-height: 24px;
    }

    .outside-times {
      position: fixed;
      inset: 0;
      z-index: 1;
      pointer-events: none;
      user-select: none;
      overflow: hidden;
    }

    .outside-time {
      position: absolute;
      color: var(--time-deco);
      font-weight: 900;
      line-height: 1;
      white-space: nowrap;
      opacity: 0.95;
      filter: blur(0.15px);
      letter-spacing: -1.5px;
      pointer-events: auto;
      cursor: default;
      transition: color 0.45s ease, filter 0.45s ease, transform 0.45s ease, opacity 0.7s ease;
    }

    .outside-time.is-changing {
      opacity: 0.12;
      transform: translateY(-2px) rotate(var(--rotate, 0deg)) scale(0.92);
    }

    .outside-time::after {
      content: attr(data-message);
      position: absolute;
      left: 50%;
      bottom: calc(100% + 18px);
      transform: translateX(-50%) translateY(8px) scale(0.92);
      opacity: 0;
      pointer-events: none;
      color: var(--pink);
      background: rgba(255, 255, 255, 0.92);
      border: 1px solid rgba(var(--pink-rgb), 0.16);
      border-radius: 999px;
      padding: 8px 13px;
      font-size: 13px;
      font-weight: 900;
      letter-spacing: 0;
      line-height: 1;
      white-space: nowrap;
      box-shadow: 0 14px 30px rgba(141, 52, 77, 0.14);
      backdrop-filter: blur(10px);
      transition: 0.45s ease;
    }

    .outside-time::before {
      content: "";
      position: absolute;
      left: 50%;
      bottom: calc(100% + 5px);
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.92);
      box-shadow:
        -10px 9px 0 rgba(255, 255, 255, 0.78),
        -17px 17px 0 rgba(255, 255, 255, 0.56);
      opacity: 0;
      transform: translateX(-50%) translateY(6px) scale(0.9);
      pointer-events: none;
      transition: 0.45s ease;
    }

    .outside-time:hover {
      color: rgba(var(--pink-rgb), 0.18);
      filter: blur(0px);
      transform: translateY(-2px) rotate(var(--rotate, 0deg));
    }

    .outside-time:hover::after,
    .outside-time:hover::before {
      opacity: 1;
      transform: translateX(-50%) translateY(0) scale(1);
    }

    body.dark .outside-time {
      opacity: 0.75;
    }

    body.dark .outside-time::after {
      background: rgba(255, 255, 255, 0.95);
      color: var(--pink);
      border-color: rgba(255, 255, 255, 0.5);
    }

    body.dark .outside-time::before {
      background: rgba(255, 255, 255, 0.95);
      box-shadow:
        -10px 9px 0 rgba(255, 255, 255, 0.78),
        -17px 17px 0 rgba(255, 255, 255, 0.56);
    }

    .outside-time.o1  { font-size: 34px; top: 7%;   left: 2.5%;  --rotate: -11deg; transform: rotate(-11deg); }
    .outside-time.o2  { font-size: 58px; top: 15%;  left: 7%;    --rotate: 7deg; transform: rotate(7deg); }
    .outside-time.o3  { font-size: 26px; top: 27%;  left: 3.5%;  --rotate: -5deg; transform: rotate(-5deg); }
    .outside-time.o4  { font-size: 46px; top: 39%;  left: 8%;    --rotate: 12deg; transform: rotate(12deg); }
    .outside-time.o5  { font-size: 32px; top: 53%;  left: 2%;    --rotate: -9deg; transform: rotate(-9deg); }
    .outside-time.o6  { font-size: 64px; top: 66%;  left: 6%;    --rotate: 6deg; transform: rotate(6deg); }
    .outside-time.o7  { font-size: 24px; top: 82%;  left: 3%;    --rotate: -13deg; transform: rotate(-13deg); }
    .outside-time.o8  { font-size: 42px; top: 90%;  left: 10%;   --rotate: 9deg; transform: rotate(9deg); }

    .outside-time.o9  { font-size: 52px; top: 6%;   right: 5%;   --rotate: 10deg; transform: rotate(10deg); }
    .outside-time.o10 { font-size: 28px; top: 18%;  right: 2.5%; --rotate: -8deg; transform: rotate(-8deg); }
    .outside-time.o11 { font-size: 66px; top: 30%;  right: 7%;   --rotate: 6deg; transform: rotate(6deg); }
    .outside-time.o12 { font-size: 34px; top: 45%;  right: 3%;   --rotate: -12deg; transform: rotate(-12deg); }
    .outside-time.o13 { font-size: 48px; top: 58%;  right: 8%;   --rotate: 8deg; transform: rotate(8deg); }
    .outside-time.o14 { font-size: 26px; top: 72%;  right: 2%;   --rotate: -6deg; transform: rotate(-6deg); }
    .outside-time.o15 { font-size: 60px; top: 82%;  right: 6%;   --rotate: 11deg; transform: rotate(11deg); }

    .outside-time.o16 { font-size: 22px; top: 11%;  left: 16%;   --rotate: 8deg; transform: rotate(8deg); }
    .outside-time.o17 { font-size: 24px; top: 76%;  left: 17%;   --rotate: -10deg; transform: rotate(-10deg); }
    .outside-time.o18 { font-size: 23px; top: 23%;  right: 17%;  --rotate: 12deg; transform: rotate(12deg); }
    .outside-time.o19 { font-size: 25px; top: 68%;  right: 16%;  --rotate: -7deg; transform: rotate(-7deg); }

    .anniversary {
      width: min(1220px, 100%);
      min-height: calc(100vh - 18px);
      min-height: calc(100dvh - 18px);
      height: auto;
      background: var(--card);
      backdrop-filter: blur(16px);
      border: 1.5px solid rgba(255, 255, 255, 0.45);
      border-bottom: none;
      border-radius: 30px 30px 0 0;
      box-shadow: 0 24px 70px var(--shadow);
      overflow: visible;
      position: relative;
      display: flex;
      flex-direction: column;
      z-index: 2;
      isolation: isolate;
    }

    .top-left {
      position: absolute;
      top: 18px;
      left: 18px;
      z-index: 10;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .top-actions {
      position: absolute;
      top: 18px;
      right: 18px;
      z-index: 10;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .love-pill {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 8px;
      background: var(--card-solid);
      color: var(--pink-dark);
      border: 1px solid rgba(var(--pink-rgb), 0.22);
      border-radius: 999px;
      padding: 8px 12px 8px 10px;
      font-size: 14px;
      font-weight: 900;
      white-space: nowrap;
      box-shadow: 0 10px 24px rgba(var(--pink-rgb), 0.12);
      cursor: pointer;
      transition: 0.25s ease;
      position: relative;
      z-index: 2;
      width: 142px; /* Chiều rộng cố định ban đầu trên desktop */
      box-sizing: border-box;
    }

    #loveCounter {
      display: inline-block;
      width: auto;
      max-width: 16ch;
      text-align: left;
      transform-origin: left center;
      transition: opacity 0.22s ease;
    }

    #loveCounter.is-switching {
      opacity: 0;
      transform: translateY(3px) scale(0.78);
      filter: blur(8px);
      letter-spacing: 0.9px;
    }

    .love-pill {
      overflow: hidden;
    }

    .love-pill::after {
      content: "";
      position: absolute;
      inset: -18px;
      opacity: 0;
      pointer-events: none;
      background:
        radial-gradient(circle at 18% 48%, rgba(var(--pink-rgb), 0.42) 0 2px, transparent 3px),
        radial-gradient(circle at 32% 24%, rgba(255, 139, 176, 0.38) 0 2px, transparent 3px),
        radial-gradient(circle at 52% 68%, rgba(var(--pink-rgb), 0.34) 0 2px, transparent 3px),
        radial-gradient(circle at 72% 30%, rgba(255, 193, 212, 0.46) 0 2px, transparent 3px),
        radial-gradient(circle at 86% 58%, rgba(var(--pink-rgb), 0.35) 0 2px, transparent 3px);
      filter: blur(0.2px);
      transform: scale(0.72);
    }

    .love-pill.is-counter-switching::after {
      animation: lovePillDissolve 0.78s ease both;
    }

    .love-pill.is-weather-mode {
      border-color: rgba(var(--pink-rgb), 0.22);
      box-shadow: 0 10px 24px rgba(var(--pink-rgb), 0.12);
    }

    .love-pill:hover {
      transform: translateY(-2px);
      box-shadow: 0 14px 30px rgba(var(--pink-rgb), 0.18);
    }

    .love-heart {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      background: linear-gradient(135deg, #ffe1ec, #ffffff);
      color: var(--pink);
      border: 1px solid rgba(var(--pink-rgb), 0.16);
      font-size: 15px;
      line-height: 1;
      animation: tinyHeartBeat 1.8s ease-in-out infinite;
      transition: opacity 0.24s ease, color 0.24s ease, background 0.24s ease, border-color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
      flex: 0 0 auto;
    }

    .love-heart.is-switching {
      opacity: 0;
    }

    .love-heart.is-love {
      animation: tinyHeartBeat 1.8s ease-in-out infinite;
    }

    .love-heart.is-weather {
      color: var(--pink);
      background:
        radial-gradient(circle at 28% 22%, #ffffff, transparent 34%),
        linear-gradient(135deg, #ffe1ec, #ffffff 58%, #fff5f9);
      border-color: rgba(var(--pink-rgb), 0.16);
      box-shadow: 0 9px 20px rgba(var(--pink-rgb), 0.12);
      animation: weatherIconFloat 2.6s ease-in-out infinite;
    }

    .love-heart svg {
      width: 16px;
      height: 16px;
      display: block;
      color: currentColor;
      stroke: currentColor;
      fill: none;
      stroke-width: 2.2;
      stroke-linecap: round;
      stroke-linejoin: round;
      pointer-events: none;
    }

    .weather-cloud-svg {
      filter: drop-shadow(0 5px 9px rgba(var(--pink-rgb), 0.16));
    }

    /* =========================================================
      HIỆU ỨNG MƯA THEO THỜI TIẾT
      - Lớp mưa nằm ngoài background, thấp hơn khung nội dung chính.
      - Khi API thời tiết báo đang mưa, JavaScript sẽ tự bật lớp này.
    ========================================================= */
    .weather-rain-layer {
      position: fixed;
      inset: -18vh 0 0 0;
      z-index: 1;
      pointer-events: none;
      overflow: hidden;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.7s ease, visibility 0.7s ease;
    }

    .weather-rain-layer.show {
      opacity: 1;
      visibility: visible;
    }

    .weather-rain-drop {
      position: absolute;
      top: -20vh;
      left: var(--x, 50%);
      width: var(--rain-width, 1.7px);
      height: var(--rain-length, 56px);
      border-radius: 999px;
      background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        rgba(255, 193, 212, var(--rain-opacity, 0.78)),
        rgba(var(--pink-rgb), var(--rain-opacity, 0.78))
      );
      box-shadow: 0 0 13px rgba(var(--pink-rgb), 0.22);
      transform: translate3d(0, 0, 0) rotate(12deg);
      animation: weatherRainFall var(--rain-duration, 1.8s) linear infinite;
      animation-delay: var(--rain-delay, 0s);
      will-change: transform;
    }

    .weather-rain-layer.is-heavy .weather-rain-drop {
      box-shadow: 0 0 18px rgba(var(--pink-rgb), 0.28);
    }

    body.dark .weather-rain-drop {
      background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        rgba(255, 193, 212, var(--rain-opacity, 0.82)),
        rgba(255, 139, 176, var(--rain-opacity, 0.82))
      );
    }

    @keyframes weatherRainFall {
      from {
        transform: translate3d(0, -12vh, 0) rotate(12deg);
      }
      to {
        transform: translate3d(var(--rain-drift, -48px), 124vh, 0) rotate(12deg);
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .weather-rain-layer {
        display: none;
      }
    }


    .mode-btn {
      background: var(--card-solid);
      color: var(--pink-dark);
      border: 1px solid rgba(var(--pink-rgb), 0.22);
      border-radius: 999px;
      font-weight: 800;
      box-shadow: 0 10px 24px rgba(var(--pink-rgb), 0.12);
      padding: 10px 13px;
      font-size: 16px;
      cursor: pointer;
      transition: 0.2s ease;
    }

    .mode-btn:hover {
      transform: translateY(-2px);
    }

    .music-note-btn {
      position: absolute;
      top: 80px;
      right: 42px;
      z-index: 10;
      width: 26px;
      height: 26px;
      border: none;
      border-radius: 0;
      display: grid;
      place-items: center;
      color: #f2b84a;
      background: transparent;
      box-shadow: none;
      font-size: 24px;
      line-height: 1;
      font-weight: 900;
      cursor: pointer;
      text-shadow: 0 8px 18px rgba(210, 148, 36, 0.28);
      animation: musicNoteFloat 5s ease-in-out infinite;
      transition: color 0.24s ease, filter 0.24s ease;
    }

    .music-note-btn:hover {
      color: #f0a83c;
      filter: drop-shadow(0 10px 14px rgba(210, 148, 36, 0.32));
    }

    .music-note-btn:focus-visible {
      outline: 3px solid rgba(242, 184, 74, 0.28);
      outline-offset: 3px;
      border-radius: 12px;
    }

    .music-note-btn.is-playing {
      animation: musicNoteDance 1.35s ease-in-out infinite;
    }

    body.dark .music-note-btn {
      color: #ffd45f;
      background: transparent;
      border: none;
      box-shadow: none;
      text-shadow: 0 8px 18px rgba(0, 0, 0, 0.34);
    }

    .eyebrow.music-player-panel {
      width: var(--music-panel-width, 188px);
      min-width: var(--music-panel-width, 188px);
      max-width: var(--music-panel-width, 188px);
      height: var(--music-panel-height, 36px);
      min-height: var(--music-panel-height, 36px);
      max-height: var(--music-panel-height, 36px);
      padding: 4px 9px;
      gap: 0;
      justify-content: center;
      text-transform: none;
      letter-spacing: 0;
      overflow: visible;
      animation: musicPanelSwapIn 0.26s ease;
    }

    .music-panel-controls {
      width: 100%;
      height: 100%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      position: relative;
      overflow: visible;
    }

    .music-control-btn {
      width: 23px;
      height: 23px;
      border: 1px solid rgba(var(--pink-rgb), 0.14);
      border-radius: 50%;
      display: grid;
      place-items: center;
      color: var(--pink-dark);
      background:
        radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.96), transparent 34%),
        rgba(var(--pink-rgb), 0.075);
      box-shadow:
        0 5px 12px rgba(var(--pink-rgb), 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.78);
      font-size: 13px;
      line-height: 1;
      font-weight: 900;
      cursor: pointer;
      transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    }

    .music-control-btn:hover {
      transform: translateY(-1px) scale(1.05);
      color: #ffffff;
      background: linear-gradient(135deg, var(--pink-light), var(--pink));
      box-shadow: 0 8px 16px rgba(var(--pink-rgb), 0.2);
    }

    .music-control-btn:focus-visible {
      outline: 3px solid rgba(var(--pink-rgb), 0.16);
      outline-offset: 2px;
    }

    .music-prev-btn,
    .music-next-btn {
      font-size: 19px;
      padding-bottom: 2px;
    }

    .music-play-btn {
      width: 26px;
      height: 26px;
      color: #ffffff;
      background: linear-gradient(135deg, var(--pink-light), var(--pink));
      border-color: rgba(var(--pink-rgb), 0.34);
      box-shadow:
        0 9px 18px rgba(var(--pink-rgb), 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.38);
      font-size: 10px;
    }

    .music-volume-wrap {
      position: relative;
      height: 24px;
      min-width: 47px;
      padding: 2px 4px 2px 2px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 3px;
      border-radius: 999px;
      background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.9), transparent 38%),
        rgba(var(--pink-rgb), 0.07);
      border: 1px solid rgba(var(--pink-rgb), 0.12);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    }

    .music-volume-btn {
      width: 19px;
      height: 19px;
      border: none;
      background: transparent;
      box-shadow: none;
      font-size: 12px;
    }

    .music-volume-btn:hover {
      transform: scale(1.05);
      color: var(--pink-dark);
      background: rgba(255, 255, 255, 0.62);
      box-shadow: none;
    }

    .music-heartbeat {
      width: 18px;
      height: 14px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 2px;
      opacity: 0.58;
      transform-origin: center bottom;
      pointer-events: none;
    }

    .music-heartbeat span {
      width: 2px;
      height: 5px;
      border-radius: 999px;
      background: linear-gradient(180deg, var(--pink-light), var(--pink));
      transform-origin: center bottom;
      animation: musicHeartBeat 1.08s ease-in-out infinite;
      animation-play-state: paused;
    }

    .music-heartbeat span:nth-child(1) { height: 4px; animation-delay: 0s; }
    .music-heartbeat span:nth-child(2) { height: 8px; animation-delay: 0.12s; }
    .music-heartbeat span:nth-child(3) { height: 12px; animation-delay: 0.22s; }
    .music-heartbeat span:nth-child(4) { height: 7px; animation-delay: 0.34s; }
    .music-heartbeat span:nth-child(5) { height: 10px; animation-delay: 0.46s; }

    .eyebrow.music-player-panel.is-music-playing .music-heartbeat {
      opacity: 0.94;
    }

    .eyebrow.music-player-panel.is-music-playing .music-heartbeat span {
      animation-play-state: running;
    }

    .music-volume-slider {
      position: absolute;
      left: 50%;
      top: calc(100% + 9px);
      width: 96px;
      height: 34px;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 10px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.96);
      border: 1px solid rgba(var(--pink-rgb), 0.18);
      box-shadow: 0 12px 28px rgba(141, 52, 77, 0.14);
      opacity: 0;
      pointer-events: none;
      transform: translateX(-50%) translateY(-6px) scale(0.94);
      transition: 0.22s ease;
    }

    .music-volume-wrap.show .music-volume-slider {
      opacity: 1;
      pointer-events: auto;
      transform: translateX(-50%) translateY(0) scale(1);
    }

    .music-volume-slider input {
      width: 76px;
      accent-color: var(--pink);
      cursor: pointer;
    }

    body.dark .music-control-btn {
      background: rgba(255, 255, 255, 0.08);
      color: #ffe8f0;
      border-color: rgba(255, 255, 255, 0.13);
      box-shadow: none;
    }

    body.dark .music-control-btn:hover,
    body.dark .music-play-btn {
      color: #ffffff;
      background: linear-gradient(135deg, var(--pink-light), var(--pink));
    }

    body.dark .music-volume-wrap {
      background: rgba(255, 255, 255, 0.08);
      border-color: rgba(255, 255, 255, 0.12);
      box-shadow: none;
    }

    body.dark .music-volume-btn:hover {
      color: #ffe8f0;
      background: rgba(255, 255, 255, 0.1);
    }

    body.dark .music-heartbeat span {
      background: linear-gradient(180deg, #ffc1d4, var(--pink-light));
    }

    body.dark .music-volume-slider {
      background: rgba(255, 255, 255, 0.96);
      border-color: rgba(255, 255, 255, 0.62);
    }

    .calendar-popup {
      position: fixed;
      inset: 0;
      z-index: 121;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 18px;
      background: rgba(61, 43, 43, 0.38);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }

    .calendar-popup.active {
      display: flex;
    }

    .calendar-card {
      width: min(420px, 100%);
      min-height: 520px;
      background: var(--card-solid);
      border: 1px solid rgba(245, 198, 214, 0.72);
      border-radius: 30px;
      padding: 22px;
      position: relative;
      box-shadow: 0 24px 80px rgba(61, 43, 43, 0.22);
      animation: popIn 0.25s ease;
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    .calendar-card::before {
      content: "";
      position: absolute;
      width: 60px;
      height: 15px;
      top: 18px;
      left: 22px;
      background: rgba(255, 229, 162, 0.62);
      border-radius: 6px;
      transform: rotate(-8deg);
    }

    .calendar-close {
      position: absolute;
      top: 12px;
      right: 12px;
      width: 38px;
      height: 38px;
      border: none;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.95);
      color: #8d344d;
      font-size: 27px;
      line-height: 1;
      cursor: pointer;
      z-index: 2;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
      transition: 0.25s ease;
    }

    .calendar-close:hover {
      transform: scale(1.06) rotate(8deg);
    }

    .calendar-title {
      color: var(--pink-dark);
      font-size: 25px;
      font-weight: 900;
      text-align: center;
      margin: 12px 42px 18px;
      line-height: 1.15;
    }

    .calendar-subtitle {
      color: var(--text-soft);
      text-align: center;
      font-size: 13px;
      font-weight: 800;
      margin-bottom: 16px;
      line-height: 1.45;
    }

    .calendar-meet-countdown {
      width: fit-content;
      max-width: 100%;
      margin: -4px auto 12px;
      padding: 7px 12px;
      color: var(--pink-dark);
      background: rgba(255, 255, 255, 0.72);
      border: 1px solid rgba(var(--pink-rgb), 0.14);
      border-radius: 999px;
      font-size: 12px;
      line-height: 1.25;
      font-weight: 900;
      text-align: center;
      box-shadow: 0 8px 18px rgba(var(--pink-rgb), 0.08);
    }

    body.dark .calendar-meet-countdown {
      background: rgba(255, 255, 255, 0.94);
      color: var(--pink);
      border-color: rgba(255, 255, 255, 0.6);
    }

    .calendar-month-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 12px;
      padding: 10px;
      background: var(--pink-soft);
      border: 1px solid rgba(var(--pink-rgb), 0.13);
      border-radius: 20px;
    }

    .calendar-nav-btn {
      width: 38px;
      height: 38px;
      border: none;
      border-radius: 50%;
      background: var(--card-solid);
      color: var(--pink-dark);
      font-size: 24px;
      font-weight: 900;
      line-height: 1;
      cursor: pointer;
      box-shadow: 0 8px 18px rgba(219, 140, 170, 0.12);
      transition: 0.2s ease;
    }

    .calendar-nav-btn:hover {
      transform: translateY(-2px) scale(1.04);
    }

    .calendar-month-label {
      color: var(--pink-dark);
      font-size: 16px;
      font-weight: 900;
      text-align: center;
      flex: 1;
    }

    .calendar-weekdays,
    .calendar-days {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 7px;
    }

    .calendar-days {
      grid-template-rows: repeat(6, 1fr);
      min-height: 306px;
    }

    .calendar-weekday {
      color: var(--pink);
      font-size: 12px;
      font-weight: 900;
      text-align: center;
      padding: 5px 0;
    }

    .calendar-day {
      aspect-ratio: 1 / 1;
      display: grid;
      place-items: center;
      border-radius: 14px;
      color: var(--text-main);
      background: rgba(var(--pink-rgb), 0.055);
      border: 1px solid rgba(var(--pink-rgb), 0.08);
      font-size: 13px;
      font-weight: 900;
      position: relative;
    }

    .calendar-day.empty {
      background: transparent;
      border-color: transparent;
    }

    .calendar-day.today {
      color: var(--text-main);
      background: rgba(var(--pink-rgb), 0.055);
      border: 1px solid rgba(var(--pink-rgb), 0.08);
      box-shadow: none;
    }

    .calendar-day.meet-date {
      color: var(--text-main);
      background: rgba(var(--pink-rgb), 0.055);
      border: 1px solid rgba(var(--pink-rgb), 0.08);
      box-shadow: none;
    }

    .calendar-day.meet-date::before {
      content: "";
      position: absolute;
      inset: 5px;
      border: 1.25px solid rgba(var(--pink-rgb), 0.58);
      border-radius: 50%;
      pointer-events: none;
      transition: 0.22s ease;
    }

    .calendar-day.meet-date.today {
      color: var(--text-main);
      background: rgba(var(--pink-rgb), 0.055);
      border: 1px solid rgba(var(--pink-rgb), 0.08);
      box-shadow: none;
    }

    .calendar-day.meet-date:hover::before,
    .calendar-day.meet-date:focus-visible::before {
      border-color: rgba(var(--pink-rgb), 0.82);
    }

    body.dark .calendar-day.meet-date {
      color: var(--text-main);
      background: rgba(var(--pink-rgb), 0.055);
      border: 1px solid rgba(var(--pink-rgb), 0.08);
    }

    body.dark .calendar-day.meet-date::before {
      border-color: rgba(255, 139, 176, 0.68);
    }

    .calendar-day.flower-date {
      color: #e63946;
      cursor: pointer;
      background: rgba(230, 57, 70, 0.055);
      border-color: rgba(230, 57, 70, 0.12);
    }

    .calendar-day.flower-date.today {
      color: #e63946;
      background: rgba(230, 57, 70, 0.055);
      border-color: rgba(230, 57, 70, 0.12);
      box-shadow: none;
    }

    .calendar-day.flower-date:hover {
      transform: translateY(-2px) scale(1.04);
      border-color: rgba(230, 57, 70, 0.28);
      box-shadow: 0 10px 20px rgba(230, 57, 70, 0.12);
    }

    .calendar-day.flower-date:focus-visible {
      outline: 3px solid rgba(230, 57, 70, 0.18);
      outline-offset: 2px;
    }

    .calendar-heart-icon {
      color: #e63946;
      font-size: 25px;
      line-height: 1;
      font-weight: 900;
      display: inline-block;
      transform: translateY(1px);
      text-shadow: 0 8px 16px rgba(230, 57, 70, 0.18);
      transition: 0.24s ease;
    }

    .calendar-day.flower-date:hover .calendar-heart-icon,
    .calendar-day.flower-date:focus-visible .calendar-heart-icon {
      transform: translateY(1px) scale(1.12);
    }

    .calendar-wish {
      position: absolute;
      left: var(--wish-left, 50%);
      top: var(--wish-top, 50%);
      bottom: auto;
      z-index: 18;
      width: var(--wish-width, min(330px, calc(100% - 32px)));
      min-height: 76px;
      color: var(--pink-dark);
      background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.98), transparent 35%),
        radial-gradient(circle at 90% 18%, rgba(255, 228, 238, 0.96), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 245, 250, 0.98));
      border: 1.5px solid rgba(var(--pink-rgb), 0.18);
      border-radius: 30px;
      padding: 14px 18px 14px 14px;
      display: flex;
      align-items: center;
      gap: 12px;
      text-align: left;
      box-shadow:
        0 20px 48px rgba(141, 52, 77, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      opacity: 0;
      pointer-events: none;
      overflow: visible;
      transform: translate(-50%, calc(-100% - 22px)) translateY(12px) scale(0.94);
      transform-origin: var(--wish-tail-left, 50%) 100%;
      transition: opacity 0.26s ease, transform 0.32s cubic-bezier(0.2, 1.35, 0.35, 1);
    }

    .calendar-wish::before {
      content: "";
      position: absolute;
      left: var(--wish-tail-left, 50%);
      bottom: -13px;
      width: 15px;
      height: 15px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.98);
      border: 1px solid rgba(var(--pink-rgb), 0.13);
      box-shadow:
        10px 11px 0 -4px rgba(255, 255, 255, 0.96),
        18px 20px 0 -7px rgba(255, 255, 255, 0.9);
      transform: translateX(-50%);
      pointer-events: none;
    }

    .calendar-wish::after {
      content: "♡";
      position: absolute;
      right: 17px;
      top: 10px;
      color: rgba(var(--pink-rgb), 0.44);
      font-size: 14px;
      line-height: 1;
      pointer-events: none;
    }

    .calendar-wish.show {
      opacity: 1;
      transform: translate(-50%, calc(-100% - 22px)) translateY(0) scale(1);
    }

    .calendar-wish-icon {
      width: 42px;
      height: 42px;
      flex: 0 0 42px;
      display: grid;
      place-items: center;
      color: #e63946;
      background:
        radial-gradient(circle at 28% 22%, #ffffff, transparent 32%),
        linear-gradient(135deg, #ffe8ef, #ffffff);
      border: 1px solid rgba(230, 57, 70, 0.13);
      border-radius: 50%;
      font-size: 21px;
      line-height: 1;
      box-shadow: 0 12px 24px rgba(230, 57, 70, 0.12);
      animation: calendarWishBeat 1.8s ease-in-out infinite;
      position: relative;
      z-index: 1;
    }

    .calendar-wish-content {
      position: relative;
      z-index: 1;
      min-width: 0;
    }

    .calendar-wish-label {
      color: var(--pink);
      font-size: 10px;
      line-height: 1.1;
      font-weight: 900;
      letter-spacing: 1px;
      text-transform: uppercase;
      margin-bottom: 5px;
    }

    .calendar-wish-message {
      color: var(--pink-dark);
      font-size: 13.5px;
      font-weight: 900;
      line-height: 1.38;
    }


    body.dark .calendar-card {
      background: var(--card-solid);
      border-color: rgba(255, 255, 255, 0.14);
    }

    body.dark .calendar-nav-btn {
      background: #ffffff;
      color: var(--pink);
    }

    body.dark .calendar-wish {
      background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.98), transparent 35%),
        radial-gradient(circle at 90% 18%, rgba(255, 232, 241, 0.98), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 241, 247, 0.98));
      color: var(--pink);
      border-color: rgba(255, 255, 255, 0.72);
      box-shadow:
        0 18px 44px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }

    body.dark .calendar-wish::before {
      background: rgba(255, 255, 255, 0.98);
      border-color: rgba(255, 255, 255, 0.62);
      box-shadow:
        10px 11px 0 -4px rgba(255, 255, 255, 0.96),
        18px 20px 0 -7px rgba(255, 255, 255, 0.9);
    }

    body.dark .calendar-wish-message,
    body.dark .calendar-wish-label {
      color: var(--pink);
    }

    .doodle {
      position: absolute;
      z-index: 0;
      pointer-events: none;
      user-select: none;
      animation: floaty 5s ease-in-out infinite;
      opacity: 0.9;
    }

    /* BÔNG HOA BÊN DƯỚI SỐ NGÀY YÊU
       Đây là bông hoa nhỏ đang chuyển động dưới ô đếm ngày yêu.
       Người yêu bạn bấm vào bông hoa này thì popup nhận hoa sẽ hiện ra. */

    .flower-trigger {
      pointer-events: auto;
      cursor: pointer;
      border: none;
      background: transparent;
      line-height: 1;
      padding: 0;
      transition: 0.25s ease;
      z-index: 12;
    }

    .flower-trigger:hover {
      transform: translateY(-3px) scale(1.18) rotate(-8deg);
      filter: drop-shadow(0 10px 16px rgba(var(--pink-rgb), 0.2));
    }

    .flower-trigger:focus-visible {
      outline: 3px solid rgba(var(--pink-rgb), 0.2);
      border-radius: 50%;
    }

    .doodle-1 {
      /* Muốn dời bông hoa dưới số ngày yêu thì chỉnh top/left ở đây */
      top: 82px;
      left: 34px;
      font-size: 26px;
      color: var(--pink);
    }

    .doodle-2 {
      top: 26px;
      left: 120px;
      font-size: 22px;
      color: #f2b84a;
      animation-delay: 0.9s;
    }

    .doodle-3 {
      right: 96px;
      bottom: 34px;
      font-size: 22px;
      color: #92c9ff;
      animation-delay: 1.2s;
    }

    .flower-popup {
      position: fixed;
      inset: 0;
      z-index: 120;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 18px;
      background: rgba(61, 43, 43, 0.38);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }

    .flower-popup.active {
      display: flex;
    }

    .flower-card {
      width: min(390px, 100%);
      background: var(--card-solid);
      border: 1px solid rgba(245, 198, 214, 0.72);
      border-radius: 30px;
      padding: 28px 24px 24px;
      text-align: center;
      position: relative;
      box-shadow: 0 24px 80px rgba(61, 43, 43, 0.22);
      animation: flowerZoomIn 0.32s ease;
      overflow: hidden;
    }

    .flower-card::before {
      content: "";
      position: absolute;
      width: 60px;
      height: 15px;
      top: 18px;
      left: 22px;
      background: rgba(255, 229, 162, 0.62);
      border-radius: 6px;
      transform: rotate(-8deg);
    }

    .flower-big {
      width: 132px;
      height: 132px;
      margin: 10px auto 16px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      color: #f28cab;
      background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.95), transparent 42%),
        linear-gradient(135deg, #fff0f6, #ffffff);
      border: 1px solid rgba(var(--pink-rgb), 0.14);
      box-shadow:
        0 18px 42px rgba(var(--pink-rgb), 0.16),
        inset 0 1px 0 rgba(255,255,255,0.86);
      font-size: 78px;
      line-height: 1;
      animation: flowerBreath 1.6s ease-in-out infinite;
    }

    .flower-message {
      color: var(--pink-dark);
      font-size: 21px;
      line-height: 1.35;
      font-weight: 900;
      margin: 0 auto 8px;
      max-width: 310px;
    }

    .flower-submessage {
      color: var(--text-soft);
      font-size: 14px;
      font-weight: 800;
      line-height: 1.55;
    }

    .flower-close {
      position: absolute;
      top: 12px;
      right: 12px;
      width: 38px;
      height: 38px;
      border: none;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.95);
      color: #8d344d;
      font-size: 27px;
      line-height: 1;
      cursor: pointer;
      z-index: 2;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
      transition: 0.25s ease;
    }

    .flower-close:hover {
      transform: scale(1.06) rotate(8deg);
    }

    body.dark .flower-card {
      background: var(--card-solid);
      border-color: rgba(255, 255, 255, 0.14);
    }

    body.dark .flower-big {
      background: #ffffff;
      color: var(--pink);
    }

    @keyframes flowerZoomIn {
      from { opacity: 0; transform: scale(0.24) translateY(-26px) rotate(-10deg); }
      to { opacity: 1; transform: scale(1) translateY(0) rotate(0deg); }
    }

    @keyframes flowerBreath {
      0%, 100% { transform: scale(1) rotate(-3deg); }
      50% { transform: scale(1.06) rotate(3deg); }
    }

    @keyframes calendarWishBeat {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.08); }
    }

    .hero {
      text-align: center;
      padding: 30px 210px 18px 210px;
      position: relative;
      z-index: 2;
      flex: 0 0 auto;
    }

    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 12px;
      letter-spacing: 1.5px;
      text-transform: uppercase;
      color: var(--pink);
      margin-bottom: 10px;
      font-weight: 900;
      background: var(--card-solid);
      border: 1px solid rgba(237, 154, 183, 0.28);
      padding: 8px 14px;
      border-radius: 999px;
      box-shadow: 0 10px 24px rgba(var(--pink-rgb), 0.12);
      min-width: var(--music-panel-width, 188px);
      min-height: 36px;
      justify-content: center;
      transition: opacity 0.22s ease, transform 0.22s ease, width 0.22s ease, height 0.22s ease;
    }

    .eyebrow.music-switching {
      opacity: 0;
      transform: translateY(-4px) scale(0.96);
    }

    h1 {
      font-size: clamp(26px, 3.8vw, 46px);
      line-height: 1.1;
      background: linear-gradient(135deg, var(--pink) 20%, var(--pink-dark) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      margin-bottom: 10px;
      letter-spacing: -1px;
      font-weight: 900;
      cursor: default;
      opacity: 1;
      transition:
        opacity 0.55s ease,
        transform 0.28s ease,
        filter 0.28s ease;
      display: inline-block;
    }

    h1:hover {
      transform: translateY(-2px) scale(1.015);
      filter: drop-shadow(0 8px 16px rgba(var(--pink-rgb), 0.16));
    }

    h1.title-fading {
      opacity: 0;
    }

    .mode-toast {
      position: absolute;
      top: 62px;
      right: 18px;
      z-index: 12;
      max-width: 245px;
      color: var(--pink-dark);
      background: var(--card-solid);
      border: 1px solid rgba(var(--pink-rgb), 0.18);
      border-radius: 999px;
      padding: 10px 14px;
      font-size: 13px;
      font-weight: 900;
      line-height: 1.2;
      box-shadow: 0 14px 32px rgba(141, 52, 77, 0.14);
      opacity: 0;
      pointer-events: none;
      transform: translateY(-8px) scale(0.96);
      transition: 0.28s ease;
      white-space: nowrap;
    }

    .mode-toast.show {
      opacity: 1;
      transform: translateY(0) scale(1);
    }

    body.dark .mode-toast {
      background: #ffffff;
      color: var(--pink);
      border-color: rgba(255, 255, 255, 0.72);
    }

    .subtitle {
      font-size: 21px;
      color: var(--text-soft);
      max-width: 720px;
      margin: auto;
      line-height: 1.5;
      font-weight: 800;
    }

    /* ============================================================
       LOCKLUV PANEL
    ============================================================ */
    .lockluv-panel {
      display: grid;
      grid-template-columns: 2fr 3fr;
      gap: 16px;
      margin: 0 auto 16px;
      max-width: 1000px;
      width: calc(100% - 36px);
      border-radius: 28px;
      background: var(--card);
      border: 1.5px solid rgba(var(--pink-rgb), 0.28);
      box-shadow: 0 10px 30px rgba(var(--pink-rgb), 0.08);
      overflow: hidden;
      min-height: 200px;
      padding: 16px;
      align-items: stretch;
    }

    .lockluv-camera-wrap {
      position: relative;
      background: transparent;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      padding: 0;
      box-sizing: border-box;
      width: 100%;
    }

    .lockluv-video-inner {
      position: relative;
      width: 100%;
      aspect-ratio: 1 / 1;
      border-radius: 20px;
      overflow: hidden;
      background: var(--pink-soft);
      border: none;
      box-shadow: none;
    }

    /* Retro camera viewfinder corner marks for Lockluv */
    .lockluv-video-inner::before {
      content: "";
      position: absolute;
      inset: 12px;
      border: 1.2px solid rgba(255, 255, 255, 0.25);
      pointer-events: none;
      z-index: 5;
      border-radius: 12px;
      background: 
        linear-gradient(to right, #ffffff 12px, transparent 12px) 0 0,
        linear-gradient(to bottom, #ffffff 12px, transparent 12px) 0 0,
        linear-gradient(to left, #ffffff 12px, transparent 12px) 100% 0,
        linear-gradient(to bottom, #ffffff 12px, transparent 12px) 100% 0,
        linear-gradient(to right, #ffffff 12px, transparent 12px) 0 100%,
        linear-gradient(to top, #ffffff 12px, transparent 12px) 0 100%,
        linear-gradient(to left, #ffffff 12px, transparent 12px) 100% 100%,
        linear-gradient(to top, #ffffff 12px, transparent 12px) 100% 100%;
      background-repeat: no-repeat;
      background-size: 12px 12px;
      opacity: 0;
      transition: opacity 0.3s;
    }

    .lockluv-video-inner:has(.lockluv-video.ready)::before {
      opacity: 0.85;
      animation: cameraPulse 2s infinite ease-in-out;
    }

    .lockluv-video-inner .lockluv-camera-grid {
      position: absolute;
      inset: 0;
      z-index: 4;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.3s;
    }

    .lockluv-video-inner:has(.lockluv-video.ready) .lockluv-camera-grid {
      opacity: 0.68;
    }

    .lockluv-video {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      opacity: 0;
      /* Warm soft color filter for flattering skin tones */
      filter: brightness(1.04) contrast(0.95) saturate(1.05);
    }

    .lockluv-video.ready {
      opacity: 1;
      transition: filter 0.25s ease-in-out, opacity 0.3s;
    }

    .lockluv-video.flipping {
      filter: blur(12px) brightness(1.04) contrast(0.95) saturate(1.05);
    }

    .lockluv-video.mirrored {
      transform: scaleX(-1);
    }

    .lockluv-flash-screen {
      position: absolute;
      inset: 0;
      background: #ffffff;
      z-index: 6;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.12s ease-out;
    }

    .lockluv-flash-screen.active {
      opacity: 1;
      transition: none;
    }

    .lockluv-video-placeholder {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      background: var(--pink-soft);
      pointer-events: none;
    }

    .lockluv-placeholder-content {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 16px;
      gap: 10px;
      box-sizing: border-box;
      width: 100%;
    }

    .lockluv-placeholder-icon {
      width: 30px;
      height: 30px;
      color: rgba(var(--pink-rgb), 0.55);
      transition: color 0.3s ease;
    }

    body.dark .lockluv-placeholder-icon {
      color: rgba(255, 255, 255, 0.4);
    }

    #lockluvPlaceholderText {
      font-size: 13px;
      font-weight: 600;
      color: var(--pink-dark);
      opacity: 0.85;
      line-height: 1.55;
      max-width: 220px;
      font-family: inherit;
      transition: color 0.3s ease;
    }

    body.dark #lockluvPlaceholderText {
      color: rgba(255, 255, 255, 0.8);
    }

    .lockluv-video.ready ~ .lockluv-video-placeholder { opacity: 0; }

    .lockluv-viewer-overlay {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      background: var(--pink-soft) !important;
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
      cursor: pointer;
      z-index: 10;
    }

    body.dark .lockluv-viewer-overlay {
      background: #25181b !important;
    }

    .lockluv-viewer-overlay[hidden] { display: none; }

    .lockluv-viewer-overlay svg {
      width: 44px;
      height: 44px;
      color: var(--pink);
      opacity: 0.95;
    }

    /* Blur & Lock Lockluv feed + history photos for Viewer */
    body.viewer-mode .lockluv-feed-img,
    body.viewer-mode .lockluv-history-grid img {
      filter: blur(14px) contrast(0.85) !important;
      pointer-events: none !important;
      cursor: default !important;
    }

    body.viewer-mode .lockluv-feed-caption {
      filter: blur(6px) !important;
      user-select: none !important;
      pointer-events: none !important;
    }

    .lockluv-flash {
      position: absolute;
      inset: 0;
      background: white;
      opacity: 0;
      pointer-events: none;
      z-index: 20;
    }

    .lockluv-flash.show {
      animation: lockluvFlashAnim 0.45s ease forwards;
    }

    @keyframes lockluvFlashAnim {
      0%   { opacity: 0.95; }
      100% { opacity: 0; }
    }

    .lockluv-cam-controls {
      position: absolute;
      bottom: 14px;
      left: 0;
      right: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 16px;
      z-index: 8;
      background: transparent;
    }

    .lockluv-ctrl-btn {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      border: 1px solid rgba(255, 255, 255, 0.25);
      background: rgba(0, 0, 0, 0.48);
      color: #ffffff;
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      display: grid;
      place-items: center;
      cursor: pointer;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
      transition: all 0.2s ease;
      -webkit-tap-highlight-color: transparent;
    }

    .lockluv-ctrl-btn svg {
      width: 12px;
      height: 12px;
      display: block;
      color: currentColor;
    }

    .lockluv-ctrl-btn:hover {
      background: rgba(0, 0, 0, 0.65);
      transform: scale(1.08);
      border-color: rgba(255, 255, 255, 0.4);
    }

    .lockluv-ctrl-btn:active {
      transform: scale(0.92);
    }

    .lockluv-ctrl-btn.active {
      background: var(--pink);
      color: #ffffff;
      border-color: var(--pink);
      box-shadow: 0 4px 12px rgba(var(--pink-rgb), 0.35);
    }

    .lockluv-capture-btn {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: #ffffff;
      border: 4px solid rgba(255, 255, 255, 0.32);
      cursor: pointer;
      display: grid;
      place-items: center;
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
      transition: all 0.2s ease;
      -webkit-tap-highlight-color: transparent;
      padding: 0;
      background-clip: padding-box;
    }

    .lockluv-capture-btn:hover {
      transform: scale(1.08);
      border-color: rgba(255, 255, 255, 0.45);
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
    }

    .lockluv-capture-btn:active {
      transform: scale(0.92);
    }

    .lockluv-capture-btn:disabled {
      opacity: 0.4;
      cursor: not-allowed;
      transform: none !important;
    }

    .lockluv-send-bar {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      padding: 10px 10px 12px;
      display: flex;
      align-items: center;
      gap: 7px;
      background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
      z-index: 9;
      animation: slideUpFadeIn 0.25s ease;
    }

    .lockluv-send-bar[hidden] { display: none; }

    @keyframes slideUpFadeIn {
      from { transform: translateY(12px); opacity: 0; }
      to   { transform: translateY(0); opacity: 1; }
    }

    .lockluv-caption-input {
      flex: 1;
      background: rgba(255,255,255,0.15);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      border: 1px solid rgba(255,255,255,0.28);
      border-radius: 20px;
      padding: 8px 12px;
      color: white;
      font-size: 12px;
      font-family: inherit;
      font-weight: 600;
      outline: none;
    }

    .lockluv-caption-input::placeholder { color: rgba(255,255,255,0.5); }
    .lockluv-caption-input:focus {
      border-color: rgba(255,182,212,0.6);
      background: rgba(255,255,255,0.22);
    }

    .lockluv-send-btn {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      border: none;
      background: var(--pink);
      color: white;
      display: grid;
      place-items: center;
      cursor: pointer;
      transition: transform 0.15s ease, background 0.15s ease;
      flex-shrink: 0;
    }

    .lockluv-send-btn svg { width: 16px; height: 16px; }
    .lockluv-send-btn:hover { background: var(--pink-dark); transform: scale(1.07); }
    .lockluv-send-btn:active { transform: scale(0.93); }

    .lockluv-retake-btn {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      border: none;
      background: rgba(255,255,255,0.18);
      color: white;
      font-size: 14px;
      cursor: pointer;
      display: grid;
      place-items: center;
      flex-shrink: 0;
      transition: background 0.15s ease;
    }

    .lockluv-retake-btn:hover { background: rgba(255,255,255,0.3); }

    /* --- Feed --- */
    .lockluv-feed-wrap {
      display: flex;
      flex-direction: column;
      padding: 0;
      min-height: 0;
      border-left: none;
    }

    .lockluv-feed-header {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      margin-top: -2px;
      margin-bottom: 4px;
      padding: 0 4px;
      flex-shrink: 0;
      grid-column: 1 / -1;
    }

    .lockluv-feed-label {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .lockluv-label-text {
      font-size: 30px;
      font-weight: 900;
      letter-spacing: -0.5px;
      background: linear-gradient(135deg, var(--pink) 20%, var(--pink-dark) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      text-transform: none;
      transform: translateY(4px);
      display: inline-block;
      line-height: 1;
    }

    body.dark .lockluv-label-text {
      background: linear-gradient(135deg, #ff8bb0 20%, #ffc5d5 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .lockluv-feed-label svg {
      color: var(--pink-dark);
      flex-shrink: 0;
    }

    body.dark .lockluv-feed-label svg {
      color: #ff8bb0;
    }

    .lockluv-history-btn {
      display: flex;
      align-items: center;
      gap: 4px;
      padding: 4px 8px;
      border-radius: 16px;
      border: 1px solid rgba(157, 69, 98, 0.22);
      background: rgba(255, 255, 255, 0.4);
      color: var(--pink-dark);
      font-size: 10.5px;
      font-weight: 700;
      font-family: inherit;
      cursor: pointer;
      transition: background 0.18s ease, border-color 0.18s ease;
      white-space: nowrap;
    }

    .lockluv-history-btn svg { width: 13px; height: 13px; }
    .lockluv-history-btn:hover {
      background: rgba(255, 255, 255, 0.65);
      border-color: rgba(157, 69, 98, 0.38);
    }

    .lockluv-refresh-btn {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      border: 1px solid rgba(157, 69, 98, 0.22);
      background: rgba(255, 255, 255, 0.4);
      color: var(--pink-dark);
      display: grid;
      place-items: center;
      cursor: pointer;
      transition: transform 0.3s ease, background 0.18s ease;
    }

    .lockluv-refresh-btn svg { width: 13px; height: 13px; }
    .lockluv-refresh-btn:hover { background: rgba(255, 255, 255, 0.65); }
    .lockluv-refresh-btn.spinning svg { animation: spinOnce 0.5s ease; }

    @keyframes spinOnce {
      from { transform: rotate(0deg); }
      to   { transform: rotate(360deg); }
    }

    .lockluv-feed-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      grid-template-rows: repeat(2, 1fr);
      gap: 12px;
      flex: 1;
      min-height: 0;
    }

    .lockluv-feed-item {
      position: relative;
      border-radius: 16px;
      overflow: hidden;
      background: rgba(var(--pink-rgb), 0.07);
      border: 1px solid rgba(var(--pink-rgb), 0.12);
      cursor: pointer;
      width: 100%;
      aspect-ratio: 1 / 1;
      transition: transform 0.18s ease, box-shadow 0.18s ease;
      box-sizing: border-box;
    }

    .lockluv-feed-item:hover {
      transform: scale(1.03);
      box-shadow: 0 8px 20px rgba(141, 52, 77, 0.18);
    }

    .lockluv-feed-item.empty-slot {
      border: 1.5px dashed rgba(var(--pink-rgb), 0.45);
      background: rgba(255, 255, 255, 0.22);
      cursor: default;
      display: flex;
      align-items: center;
      justify-content: center;
      box-sizing: border-box;
    }

    .lockluv-feed-item.empty-slot:hover {
      transform: none;
      box-shadow: none;
    }


    .lockluv-feed-item.new-item {
      animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    @keyframes popIn {
      from { transform: scale(0.7); opacity: 0; }
      to   { transform: scale(1); opacity: 1; }
    }

    .lockluv-feed-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .lockluv-feed-time {
      position: absolute;
      top: 6px;
      left: 6px;
      font-size: 9.5px;
      font-weight: 700;
      color: #ffffff;
      background: rgba(0, 0, 0, 0.45);
      padding: 2px 7px;
      border-radius: 9px;
      backdrop-filter: blur(2px);
      -webkit-backdrop-filter: blur(2px);
      letter-spacing: 0.2px;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
      z-index: 2;
    }

    .lockluv-feed-caption {
      position: absolute;
      bottom: 6px;
      left: 50%;
      transform: translateX(-50%);
      background: var(--caption-bg);
      color: #ffffff;
      border-radius: 12px;
      padding: 4px 10px;
      font-size: 11px;
      font-weight: 700;
      line-height: 1.25;
      text-align: center;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      text-overflow: ellipsis;
      width: max-content;
      max-width: 90%;
      word-break: break-word;
      box-shadow: 0 2px 8px rgba(var(--pink-rgb), 0.35);
      z-index: 2;
    }

    .lockluv-feed-delete {
      position: absolute;
      top: 6px;
      right: 6px;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      border: 1px solid rgba(255, 255, 255, 0.2);
      background: rgba(0, 0, 0, 0.5);
      color: white;
      font-size: 10px;
      font-weight: bold;
      cursor: pointer;
      display: grid;
      place-items: center;
      transition: all 0.2s ease;
      z-index: 3;
      line-height: 1;
    }
    .lockluv-feed-delete:hover {
      background: rgba(0, 0, 0, 0.7);
      transform: scale(1.08);
    }

    .timeline-photo-delete {
      position: absolute;
      top: 6px;
      right: 6px;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      border: 1px solid rgba(255, 255, 255, 0.25);
      background: rgba(0, 0, 0, 0.55);
      color: white;
      font-size: 10px;
      font-weight: bold;
      cursor: pointer;
      display: grid;
      place-items: center;
      z-index: 5;
      line-height: 1;
      transition: all 0.2s ease;
    }
    .timeline-photo-delete:hover {
      background: rgba(0, 0, 0, 0.75);
      transform: scale(1.1);
    }

    .lockluv-empty {
      grid-column: 1 / -1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      color: var(--text-soft);
      font-size: 12px;
      font-weight: 600;
      opacity: 0.65;
      padding: 24px 0;
    }

    .lockluv-empty svg { width: 32px; height: 32px; opacity: 0.45; }

    /* Fake Blur Locked Photo Cards for Viewer Mode */
    .lockluv-feed-item.fake-blur-lock {
      position: relative;
      overflow: hidden;
      border-radius: 16px;
      border: 1px solid rgba(var(--pink-rgb), 0.15);
      background: var(--card-solid);
      cursor: not-allowed;
      aspect-ratio: 1;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .fake-blur-bg {
      position: absolute;
      inset: 0;
      background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
      filter: blur(14px);
      transform: scale(1.2);
      opacity: 0.65;
    }

    body.dark .fake-blur-bg {
      background: linear-gradient(135deg, #4f2f3c 0%, #2b1d24 100%);
      opacity: 0.85;
    }

    .lockluv-lock-icon {
      position: relative;
      z-index: 2;
      width: 32px;
      height: 32px;
      background: rgba(255, 255, 255, 0.9);
      border-radius: 50%;
      display: grid;
      place-items: center;
      color: var(--pink-dark);
      box-shadow: 0 4px 12px rgba(var(--pink-rgb), 0.25);
    }

    body.dark .lockluv-lock-icon {
      background: rgba(0, 0, 0, 0.7);
      color: var(--pink-light);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    }

    .lockluv-lock-icon svg {
      width: 15px;
      height: 15px;
    }

    /* --- History Popup --- */
    .lockluv-history-popup {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      height: 100dvh;
      z-index: 1200;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(0,0,0,0.48);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      padding: 16px;
      box-sizing: border-box;
    }

    .lockluv-history-popup[hidden] { display: none; }

    .lockluv-history-card {
      background: var(--card-solid);
      border-radius: 24px;
      border: 1px solid rgba(241, 194, 211, 0.45);
      box-shadow: 0 28px 60px rgba(141, 52, 77, 0.18);
      width: min(700px, 100%);
      max-height: calc(100vh - 40px);
      max-height: calc(100dvh - 40px);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      animation: popInHistory 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
      margin: auto;
    }

    @keyframes popInHistory {
      from { transform: scale(0.88); opacity: 0; }
      to   { transform: scale(1); opacity: 1; }
    }

    .lockluv-history-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 18px 20px 14px;
      border-bottom: 1px solid rgba(var(--pink-rgb), 0.12);
      font-size: 14px;
      font-weight: 800;
      color: var(--pink-dark);
      flex-shrink: 0;
    }

    .lockluv-history-close {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      border: none;
      background: rgba(var(--pink-rgb), 0.1);
      color: var(--pink-dark);
      font-size: 14px;
      cursor: pointer;
      display: grid;
      place-items: center;
      transition: background 0.15s;
    }

    .lockluv-history-close:hover { background: rgba(var(--pink-rgb), 0.2); }

    .lockluv-history-body {
      overflow-y: auto;
      flex: 1;
      padding: 16px 18px 20px;
    }

    .lockluv-history-body::-webkit-scrollbar { width: 6px; }
    .lockluv-history-body::-webkit-scrollbar-thumb {
      background: var(--pink-light);
      border-radius: 999px;
    }

    .lockluv-history-month-group { margin-bottom: 20px; }

    .lockluv-history-month-label {
      font-size: 11px;
      font-weight: 800;
      color: var(--pink);
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: 10px;
    }

    .lockluv-history-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
    }

    .lockluv-history-item {
      position: relative;
      border-radius: 14px;
      overflow: hidden;
      aspect-ratio: 1;
      cursor: pointer;
      background: rgba(var(--pink-rgb), 0.07);
      border: 1px solid rgba(var(--pink-rgb), 0.12);
      transition: transform 0.18s ease;
    }

    .lockluv-history-item:hover { transform: scale(1.04); }

    .lockluv-history-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }



    body.dark .lockluv-panel {
      background: #332026;
      border-color: rgba(255, 139, 176, 0.4);
    }

    body.dark .lockluv-feed-wrap { border-left: none; }
    
    body.dark .lockluv-history-card {
      background: linear-gradient(160deg, rgba(38,31,40,0.98), rgba(49,37,50,0.98));
    }

    @media (max-width: 700px) {
      .lockluv-panel {
        grid-template-columns: 1fr;
        margin: 0 10px 12px;
        border-radius: 20px;
        padding: 12px;
        gap: 12px;
        max-width: none;
        width: auto;
      }
      .lockluv-feed-header {
        align-items: flex-end;
      }
      .lockluv-camera-wrap { min-height: auto; }
      .lockluv-feed-wrap {
        border-left: none;
        border-top: none;
        padding: 0;
      }
      .lockluv-feed-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 8px;
      }
      .lockluv-feed-grid .lockluv-feed-item:nth-child(n+5) {
        display: none;
      }
      .lockluv-placeholder-icon {
        width: 28px;
        height: 28px;
      }
      .lockluv-placeholder-content {
        transform: translateY(-20px);
      }
      #lockluvPlaceholderText {
        font-size: 13px;
        max-width: 200px;
        line-height: 1.5;
        font-weight: 600;
      }
      .lockluv-cam-controls {
        gap: 28px;
        bottom: 18px;
      }
      .lockluv-capture-btn {
        width: 54px;
        height: 54px;
        border-width: 4px;
      }
      .lockluv-ctrl-btn {
        width: 34px;
        height: 34px;
      }
      .lockluv-ctrl-btn svg {
        width: 14px;
        height: 14px;
      }
      .lockluv-send-bar {
        padding: 8px 10px 10px;
        gap: 8px;
      }
      .lockluv-caption-input {
        padding: 8px 12px;
        font-size: 14px;
      }
      .lockluv-send-btn {
        width: 36px;
        height: 36px;
      }
      .lockluv-send-btn svg {
        width: 16px;
        height: 16px;
      }
      .lockluv-retake-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
      }
      .lockluv-label-text {
        font-size: 22px;
        transform: translateY(2px);
      }
    }

    @media (max-width: 420px) {
      .lockluv-panel { margin: 0 8px 10px; border-radius: 18px; }
    }

    .content {
      flex: 1;
      min-height: 0;
      display: flex;
      justify-content: center;
      padding: 0 18px 0;
      position: relative;
      z-index: 2;
    }

    .content-panel {
      flex: 1;
      min-height: 0;
      display: grid;
      grid-template-columns: 0.44fr 1.96fr;
      background: var(--card-solid);
      border-radius: 24px 24px 0 0;
      border: 1px solid rgba(241, 194, 211, 0.45);
      border-bottom: none;
      box-shadow:
        0 16px 42px rgba(141, 52, 77, 0.11),
        inset 0 0 0 1px rgba(255, 255, 255, 0.28);
      overflow: hidden;
      max-width: 1000px;
      width: 100%;
    }

    .timeline-wrap {
      min-height: 0;
      position: relative;
      padding: 14px;
      overflow-y: auto;
      overflow-x: hidden;
      border-right: 1px solid rgba(241, 194, 211, 0.35);
    }

    body.dark .timeline-wrap {
      background:
        linear-gradient(180deg, rgba(38, 31, 40, 0.96), rgba(49, 37, 50, 0.96));
    }

    body.dark .content-panel {
      border-color: rgba(241, 194, 211, 0.2);
    }

    body.dark .timeline-wrap {
      border-right-color: rgba(241, 194, 211, 0.15);
    }

    .timeline-wrap::-webkit-scrollbar {
      width: 7px;
    }

    .timeline-wrap::-webkit-scrollbar-thumb {
      background: var(--pink-light);
      border-radius: 999px;
    }

    .timeline {
      position: relative;
      display: grid;
      grid-template-columns: 1fr;
      gap: 9px;
      padding: 0;
    }

    .time-btn {
      position: relative;
      border: 1px solid rgba(var(--pink-rgb), 0.13);
      background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 35%),
        linear-gradient(135deg, rgba(255,255,255,0.97), rgba(255,239,247,0.94));
      text-align: left;
      padding: 12px 10px 12px 42px;
      cursor: pointer;
      color: var(--text-main);
      transition: 0.25s ease;
      width: 100%;
      min-height: 52px;
      border-radius: 18px;
      box-shadow:
        0 9px 18px rgba(var(--pink-rgb), 0.09),
        inset 0 1px 0 rgba(255,255,255,0.78);
      overflow: hidden;
      font-size: 14px;
      font-weight: 900;
    }

    .time-btn-icon {
      position: absolute;
      left: 11px;
      top: 50%;
      transform: translateY(-50%);
      width: 24px;
      height: 24px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      background: rgba(var(--pink-rgb), 0.1);
      border: 1px solid rgba(var(--pink-rgb), 0.12);
      transition: 0.25s ease;
      color: var(--pink-dark);
    }

    .time-btn-icon .ui-svg-icon {
      width: 13px;
      height: 13px;
      display: block;
      color: inherit !important;
      fill: currentColor;
      filter: none !important;
    }

    .time-btn::after {
      content: "";
      position: absolute;
      right: -18px;
      bottom: -18px;
      width: 52px;
      height: 52px;
      border-radius: 50%;
      background: rgba(var(--pink-rgb), 0.08);
      transition: 0.25s ease;
    }

    body.dark .time-btn {
      background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 38%),
        linear-gradient(135deg, rgba(49, 39, 51, 0.98), rgba(61, 42, 52, 0.95));
      color: #ffe8f0;
      border-color: rgba(255, 255, 255, 0.1);
      box-shadow:
        0 10px 22px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255,255,255,0.06);
    }

    body.dark .time-btn-icon {
      background: rgba(255, 255, 255, 0.08);
      border-color: rgba(255, 255, 255, 0.12);
      color: var(--pink);
    }

    .time-btn:hover {
      transform: translateY(-3px) rotate(-0.6deg);
      background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.95), transparent 35%),
        linear-gradient(135deg, #ffffff, #ffe6f0);
      color: var(--pink-dark);
      box-shadow: 0 16px 28px rgba(var(--pink-rgb), 0.16);
    }

    body.dark .time-btn:hover {
      background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.16), transparent 38%),
        linear-gradient(135deg, rgba(70, 48, 60, 0.98), rgba(84, 49, 64, 0.96));
      color: #ffffff;
    }

    .time-btn.active {
      transform: translateY(-3px) rotate(0deg);
      background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.95), transparent 36%),
        linear-gradient(135deg, var(--pink-light), var(--pink));
      color: #ffffff;
      border-color: rgba(var(--pink-rgb), 0.45);
      box-shadow:
        0 16px 30px rgba(var(--pink-rgb), 0.26),
        0 0 0 5px rgba(var(--pink-rgb), 0.08);
    }

    .time-btn.active .time-btn-icon {
      background: #ffffff;
      color: var(--pink);
      border-color: rgba(255, 255, 255, 0.78);
      box-shadow: 0 8px 16px rgba(141, 52, 77, 0.12);
    }

    .time-btn.active::after {
      background: rgba(255, 255, 255, 0.18);
      transform: scale(1.25);
    }

    body.dark .time-btn.active {
      background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.28), transparent 36%),
        linear-gradient(135deg, var(--pink-light), var(--pink));
      color: #ffffff;
      border-color: rgba(255, 255, 255, 0.2);
      box-shadow:
        0 18px 34px rgba(0, 0, 0, 0.28),
        0 0 0 5px rgba(255, 139, 176, 0.14);
    }

    body.dark .time-btn.active .time-btn-icon {
      background: #ffffff;
      color: var(--pink);
    }

    .event-card {
      min-height: 0;
      position: relative;
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    .event-card::after {
      display: none;
    }

    .event-tape-logout {
      position: absolute;
      width: 62px;
      height: 16px;
      top: 14px;
      right: 22px;
      z-index: 12;
      padding: 0;
      border: none;
      border-radius: 6px;
      background: rgba(255, 225, 160, 0.58);
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.035);
      transform: rotate(8deg);
      cursor: pointer;
      appearance: none;
      -webkit-appearance: none;
      -webkit-tap-highlight-color: transparent;
      transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    }

    .event-tape-logout:hover {
      transform: rotate(8deg) translateY(-2px) scale(1.04);
      background: rgba(255, 225, 160, 0.78);
      box-shadow: 0 8px 16px rgba(141, 52, 77, 0.1);
    }

    .event-tape-logout:active {
      transform: rotate(8deg) scale(0.96);
    }

    .event-tape-logout:focus-visible {
      outline: 3px solid rgba(var(--pink-rgb), 0.22);
      outline-offset: 3px;
    }

    .month-info {
      padding: 30px 26px 8px;
      flex: 0 0 auto;
      position: relative;
      z-index: 3;
    }

    .event-date {
      color: var(--pink);
      font-size: 13px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 1.2px;
      margin-bottom: 6px;
    }

    .event-title {
      font-size: clamp(20px, 2.4vw, 30px);
      font-weight: 900;
      color: var(--pink-dark);
      margin-bottom: 8px;
      line-height: 1.15;
    }

    .event-text {
      color: var(--text-soft);
      line-height: 1.5;
      font-size: 14.5px;
      font-weight: 700;
    }

    .photo-grid {
      flex: 1;
      min-height: 0;
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 14px;
      padding: 14px 48px 26px;
      position: relative;
      z-index: 2;
      align-content: center;
      justify-content: center;
      max-width: 760px;
      width: 100%;
      margin: 0 auto;
    }

    .photo-item {
      position: relative;
      width: 100%;
      aspect-ratio: 1 / 1;
      overflow: hidden;
      cursor: pointer;
      border-radius: 18px;
      background: #fff4f8;
      border: 1px solid rgba(240, 190, 209, 0.72);
      box-shadow:
        0 12px 24px rgba(141, 52, 77, 0.11),
        inset 0 0 0 1px rgba(255,255,255,0.35);
      transition: 0.26s ease;
      isolation: isolate;
    }

    .photo-item:hover {
      transform: translateY(-5px) scale(1.022);
      box-shadow: 0 20px 36px rgba(180, 92, 123, 0.18);
      z-index: 10;
    }

    .photo-item::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 2;
      background: linear-gradient(to bottom, rgba(0,0,0,0.02), rgba(0,0,0,0.25));
      pointer-events: none;
    }

    .photo-item::after {
      content: "✦";
      position: absolute;
      top: 8px;
      right: 8px;
      z-index: 4;
      width: 24px;
      height: 24px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      background: rgba(255, 255, 255, 0.88);
      color: #f0a83c;
      font-size: 11px;
      box-shadow: 0 8px 18px rgba(0,0,0,0.08);
    }

    .photo-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      background: #f8dbe3;
      transition: 0.35s ease;
    }

    .photo-item:hover img {
      transform: scale(1.05);
    }

    .photo-caption {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 4;
      color: #fff;
      font-weight: 900;
      padding: 22px 9px 9px;
      font-size: 12px;
      line-height: 1.2;
      background: linear-gradient(transparent, rgba(0,0,0,0.62));
      text-shadow: 0 2px 10px rgba(0,0,0,0.3);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .image-fallback {
      width: 100%;
      height: 100%;
      display: none;
      place-items: center;
      text-align: center;
      color: var(--pink-dark);
      font-size: 14px;
      font-weight: 900;
      background:
        linear-gradient(to right, rgba(var(--pink-rgb), 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(var(--pink-rgb), 0.08) 1px, transparent 1px),
        var(--pink-soft);
      background-size: 22px 22px;
    }

    .photo-item.image-error img {
      display: none;
    }

    .photo-item.image-error .image-fallback {
      display: grid;
    }

    .heart {
      position: absolute;
      right: 20px;
      bottom: 15px;
      font-size: 24px;
      opacity: 0.78;
      animation: pulse 1.6s infinite;
      pointer-events: none;
      color: var(--pink);
      z-index: 8;
    }

    .modal {
      position: fixed;
      inset: 0;
      background: rgba(61, 43, 43, 0.45);
      backdrop-filter: blur(10px);
      display: none;
      align-items: center;
      justify-content: center;
      padding: 18px;
      z-index: 99;
    }

    .modal.active {
      display: flex;
    }

    .modal-content {
      width: min(620px, 100%);
      max-height: calc(100vh - 36px);
      background: var(--card-solid);
      border-radius: 26px;
      overflow: hidden;
      position: relative;
      border: 1px solid rgba(245, 198, 214, 0.72);
      box-shadow: 0 24px 80px rgba(61, 43, 43, 0.22);
      animation: popIn 0.25s ease;
      display: flex;
      flex-direction: column;
    }

    .modal-photo-wrap {
      position: relative;
      touch-action: pan-y;
      width: 100%;
      height: min(62vh, 540px);
      flex: 0 0 auto;
      display: grid;
      place-items: center;
      overflow: hidden;
      background:
        linear-gradient(to right, rgba(var(--pink-rgb), 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(var(--pink-rgb), 0.06) 1px, transparent 1px),
        var(--pink-soft);
      background-size: 24px 24px;
    }

    .modal-content img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: block;
      background: transparent;
      transition: transform 0.28s ease;
      cursor: zoom-in;
      user-select: none;
    }

    .modal-content img.zoomed {
      transform: scale(1.42);
      cursor: zoom-out;
    }

    .modal-content img.image-error-modal {
      display: none;
    }

    .modal-image-fallback {
      position: absolute;
      inset: 0;
      display: none;
      place-items: center;
      color: var(--pink-dark);
      font-weight: 900;
      background:
        linear-gradient(to right, rgba(var(--pink-rgb), 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(var(--pink-rgb), 0.08) 1px, transparent 1px),
        #fff2f7;
      background-size: 24px 24px;
    }

    .modal-image-fallback.show {
      display: grid;
    }

    .modal-counter {
      position: absolute;
      left: 50%;
      bottom: 12px;
      transform: translateX(-50%);
      z-index: 4;
      color: #8d344d;
      background: rgba(255, 255, 255, 0.94);
      border: 1px solid rgba(var(--pink-rgb), 0.16);
      border-radius: 999px;
      padding: 7px 12px;
      font-size: 13px;
      font-weight: 900;
      box-shadow: 0 10px 24px rgba(61, 43, 43, 0.12);
      backdrop-filter: blur(10px);
      pointer-events: none;
    }

    .modal-nav {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      z-index: 5;
      width: 46px;
      height: 46px;
      border: none;
      border-radius: 50%;
      display: grid;
      place-items: center;
      background: rgba(255, 255, 255, 0.92);
      color: #8d344d;
      font-size: 38px;
      line-height: 1;
      cursor: pointer;
      box-shadow: 0 10px 26px rgba(61, 43, 43, 0.15);
      transition: 0.22s ease;
    }

    .modal-nav:hover {
      transform: translateY(-50%) scale(1.08);
      background: #ffffff;
      color: var(--pink);
    }

    .modal-nav:focus-visible {
      outline: 3px solid rgba(var(--pink-rgb), 0.24);
    }

    .modal-prev {
      left: 14px;
    }

    .modal-next {
      right: 14px;
    }

    body.dark .modal-counter,
    body.dark .modal-nav {
      background: rgba(255, 255, 255, 0.96);
      color: var(--pink);
    }

    .modal-info {
      padding: 18px 24px 22px;
    }

    .modal-date {
      color: var(--pink);
      font-size: 13px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 1.2px;
      margin-bottom: 6px;
    }

    .modal-info h3 {
      font-size: clamp(24px, 4vw, 36px);
      font-weight: 900;
      color: var(--pink-dark);
      margin-bottom: 8px;
      line-height: 1.1;
    }

    .modal-info p {
      color: var(--text-soft);
      line-height: 1.65;
      font-size: 15px;
      font-weight: 700;
    }

    .close-btn {
      position: absolute;
      top: 14px;
      right: 14px;
      width: 42px;
      height: 42px;
      border: none;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.95);
      color: #8d344d;
      font-size: 30px;
      line-height: 1;
      cursor: pointer;
      z-index: 3;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
      transition: 0.25s ease;
    }

    .close-btn:hover {
      transform: scale(1.06) rotate(8deg);
    }

    .lock-screen {
      position: fixed;
      inset: 0;
      z-index: 999;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(135deg, #e9939f, #d35069);
      background-size: 44px 44px, 44px 44px, 100% 100%;
      transition: 0.35s ease;
      overflow: hidden;
    }

    /* Aurora Glow Blobs behind the Glass Card */
    .lock-screen::before {
      content: "";
      position: absolute;
      width: 450px;
      height: 450px;
      background: radial-gradient(circle, rgba(255, 228, 230, 0.45) 0%, rgba(255, 228, 230, 0) 70%);
      top: 15%;
      right: 20%;
      border-radius: 50%;
      z-index: 1;
      filter: blur(40px);
      animation: floatBlob1 15s infinite alternate ease-in-out;
      pointer-events: none;
    }

    .lock-screen::after {
      content: "";
      position: absolute;
      width: 400px;
      height: 400px;
      background: radial-gradient(circle, rgba(255, 253, 231, 0.3) 0%, rgba(255, 253, 231, 0) 70%);
      bottom: 10%;
      left: 15%;
      border-radius: 50%;
      z-index: 1;
      filter: blur(50px);
      animation: floatBlob2 18s infinite alternate ease-in-out;
      pointer-events: none;
    }

    @keyframes floatBlob1 {
      0% { transform: translate(0, 0) scale(1); }
      100% { transform: translate(50px, -30px) scale(1.15); }
    }

    @keyframes floatBlob2 {
      0% { transform: translate(0, 0) scale(1); }
      100% { transform: translate(-40px, 40px) scale(1.1); }
    }

    body.dark .lock-screen {
      background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(135deg, #b5546a, #8d3648);
      background-size: 44px 44px, 44px 44px, 100% 100%;
    }

    .lock-screen.hidden {
      opacity: 0;
      pointer-events: none;
      transform: scale(1.03);
    }

    /* Landing Welcome Layout (Sleek Glass Card on Desktop, Borderless on Mobile) */
    .lock-landing {
      width: min(1150px, 94vw);
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid rgba(255, 255, 255, 0.18);
      border-radius: 40px;
      padding: 65px 75px;
      display: flex;
      align-items: center !important;
      justify-content: space-between !important;
      gap: 60px;
      z-index: 10;
      backdrop-filter: blur(25px);
      -webkit-backdrop-filter: blur(25px);
      box-shadow:
        0 35px 90px rgba(121, 41, 59, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
      transition: all 0.3s ease;
    }

    .lock-landing-left {
      flex: 1 !important;
      display: flex;
      flex-direction: column;
      align-items: flex-start !important;
      text-align: left !important;
    }

    .lock-landing-right {
      flex: 1 !important;
      display: flex;
      justify-content: center !important;
      align-items: center;
      margin-right: 50px !important;
    }

    .lock-landing-logo {
      font-size: clamp(85px, 12vw, 140px) !important;
      font-weight: 800 !important;
      line-height: 0.95 !important;
      background: linear-gradient(135deg, #ffffff 40%, #ffc5d5 100%) !important;
      -webkit-background-clip: text !important;
      -webkit-text-fill-color: transparent !important;
      letter-spacing: -3px !important;
      margin-bottom: 34px !important;
      filter: drop-shadow(0 12px 24px rgba(121, 41, 59, 0.25));
      padding-right: 0.12em !important;
    }

    .lock-landing-login-btn {
      border: 1.5px solid rgba(255, 255, 255, 0.5);
      background: rgba(255, 255, 255, 0.08);
      color: #ffffff;
      padding: 9px 26px !important;
      border-radius: 999px;
      font-size: 14px !important;
      font-weight: 700;
      letter-spacing: 0.5px;
      cursor: pointer;
      transition: all 0.25s ease;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    }

    .lock-landing-login-btn:hover {
      background: #ffffff;
      color: #d35069 !important;
      border-color: #ffffff;
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(211, 80, 105, 0.2) !important;
    }

    .lock-landing-login-btn:active {
      transform: translateY(0);
    }

    .lock-landing-heart-container {
      width: min(390px, 100%);
      aspect-ratio: 1/1;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .lock-landing-heart {
      width: 120%;
      height: 120%;
      object-fit: contain;
      filter: drop-shadow(0 20px 45px rgba(0, 0, 0, 0.18));
      animation: floatHeart 4.5s ease-in-out infinite;
      transition: all 0.3s ease;
    }

    .lock-landing-heart-container:hover .lock-landing-heart {
      animation: beatHeart 0.9s ease-in-out infinite !important;
      cursor: pointer;
    }

    @keyframes floatHeart {
      0% { transform: translateY(0) rotate(0deg); }
      50% { transform: translateY(-10px) rotate(1deg); }
      100% { transform: translateY(0) rotate(0deg); }
    }

    @keyframes beatHeart {
      0% {
        transform: scale(1.0) rotate(0deg);
        filter: drop-shadow(0 20px 45px rgba(0, 0, 0, 0.18));
      }
      25% {
        transform: scale(1.08) rotate(1.5deg);
        filter: drop-shadow(0 25px 50px rgba(255, 139, 176, 0.5));
      }
      40% {
        transform: scale(1.03) rotate(-1deg);
        filter: drop-shadow(0 22px 48px rgba(255, 139, 176, 0.35));
      }
      55% {
        transform: scale(1.11) rotate(1deg);
        filter: drop-shadow(0 28px 55px rgba(255, 139, 176, 0.6));
      }
      100% {
        transform: scale(1.0) rotate(0deg);
        filter: drop-shadow(0 20px 45px rgba(0, 0, 0, 0.18));
      }
    }

    /* Passcode Modal Overlay */
    .lock-card-wrapper {
      position: fixed;
      inset: 0;
      z-index: 1000;
      background: rgba(43, 31, 35, 0.45);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      animation: fadeInWrapper 0.3s ease;
    }

    @keyframes fadeInWrapper {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    .lock-card-wrapper[hidden] {
      display: none !important;
    }

    .lock-card-close {
      position: absolute;
      top: 15px;
      right: 18px;
      background: transparent;
      border: none;
      font-size: 26px;
      font-weight: 700;
      color: rgba(255, 255, 255, 0.72) !important;
      cursor: pointer;
      line-height: 1;
      padding: 4px;
      transition: all 0.2s ease;
      z-index: 5;
    }

    .lock-card-close:hover {
      color: #ffffff !important;
      transform: scale(1.15);
    }

    /* Mobile Styles: Centered glass card with single line title */
    @media (max-width: 600px) {
      .lock-landing {
        flex-direction: column-reverse;
        gap: 20px;
        padding: 35px 20px;
        width: 90vw;
        border-radius: 30px;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.16) !important;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        align-items: center !important;
        justify-content: center !important;
      }
      .lock-landing-left {
        align-items: center !important;
        text-align: center !important;
      }
      .lock-landing-logo {
        font-size: clamp(38px, 10vw, 52px) !important;
        letter-spacing: -2px !important;
        margin-bottom: 20px !important;
        line-height: 1.0 !important;
      }
      .lock-landing-heart-container {
        width: min(210px, 70%);
      }
      .lock-landing-heart {
        width: 100%;
        height: 100%;
      }
      .lock-landing-right {
        justify-content: center !important;
        margin-right: 0 !important;
      }
      .lock-card-wrapper {
        align-items: center;
        padding: 12px;
      }
      .lock-card-wrapper .lock-card {
        transform: translateY(0);
        margin: 0;
      }
    }

    .lock-card {
      width: min(390px, 100%);
      background: linear-gradient(135deg, #e9939f, #d35069) !important;
      border: 1px solid rgba(255, 255, 255, 0.35) !important;
      border-radius: 32px;
      padding: 38px 28px 30px;
      text-align: center;
      box-shadow:
        0 30px 70px rgba(121, 41, 59, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
      position: relative;
      overflow: visible;
      backdrop-filter: blur(24px);
      -webkit-backdrop-filter: blur(24px);
      animation: zoomInCard 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    @keyframes zoomInCard {
      from { transform: scale(0.9) translateY(15px); opacity: 0; }
      to { transform: scale(1) translateY(0); opacity: 1; }
    }

    body.dark .lock-card {
      background: linear-gradient(135deg, #c7667c, #9d485b) !important;
      border-color: rgba(255, 255, 255, 0.2) !important;
      box-shadow:
        0 25px 65px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    }

    .lock-card::before,
    .lock-card::after {
      display: none !important;
    }

    .lock-head {
      position: relative;
      z-index: 1;
      margin-bottom: 22px;
      text-align: center;
    }

    .lock-icon {
      font-size: 40px;
      margin-bottom: 12px;
      display: flex;
      justify-content: center;
      animation: pulseHeart 2.2s infinite ease-in-out;
    }

    @keyframes pulseHeart {
      0% { transform: scale(1); filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.2)); }
      50% { transform: scale(1.08); filter: drop-shadow(0 6px 14px rgba(255, 255, 255, 0.4)); }
      100% { transform: scale(1); filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.2)); }
    }

    .lock-icon svg {
      color: #ffffff !important;
      fill: #ffffff !important;
    }

    .lock-card h2 {
      color: #ffffff !important;
      font-size: 22px;
      margin-bottom: 6px;
      font-weight: 900;
      line-height: 1.1;
      letter-spacing: -0.5px;
    }

    .lock-card p {
      display: none !important;
    }

    .code-wrap {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      position: relative;
      z-index: 2;
      margin: 20px 0 14px;
    }

    .code-input {
      width: 56px;
      height: 56px;
      border-radius: 18px;
      border: 2px solid rgba(255, 255, 255, 0.3) !important;
      background: rgba(255, 255, 255, 0.18) !important;
      color: #ffffff !important;
      -webkit-text-fill-color: #ffffff !important;
      font-size: 26px !important;
      font-weight: 900 !important;
      text-align: center;
      outline: none !important;
      box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
      transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
      padding: 0;
      line-height: 56px;
      caret-color: transparent;
      appearance: none;
      -webkit-appearance: none;
    }

    .code-input::selection {
      background: transparent;
    }

    .code-input:focus {
      border-color: #ffffff !important;
      background: rgba(255, 255, 255, 0.35) !important;
      transform: scale(1.08) translateY(-2px) !important;
      box-shadow:
        0 12px 24px rgba(0, 0, 0, 0.15),
        0 0 0 5px rgba(255, 255, 255, 0.2) !important;
    }

    body.dark .code-input {
      background: rgba(255, 255, 255, 0.12) !important;
      border-color: rgba(255, 255, 255, 0.25) !important;
      color: #ffffff !important;
      -webkit-text-fill-color: #ffffff !important;
    }

    body.dark .code-input:focus {
      background: rgba(255, 255, 255, 0.22) !important;
    }

    .unlock-btn {
      border: none;
      background: #ffffff !important;
      color: #d35069 !important;
      border-radius: 999px;
      padding: 10px 32px !important;
      font-size: 14px !important;
      font-weight: 900;
      cursor: pointer;
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12) !important;
      transition: all 0.24s cubic-bezier(0.4, 0, 0.2, 1) !important;
      white-space: nowrap;
      width: auto !important;
      min-width: 160px !important;
      margin: 16px auto 0 !important;
      display: inline-block !important;
      letter-spacing: 0.5px;
    }

    body.dark .unlock-btn {
      color: #b5546a !important;
    }

    .unlock-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18) !important;
      filter: brightness(1.05);
    }

    .unlock-btn:active {
      transform: translateY(0);
    }

    .hint-wrap {
      position: relative;
      z-index: 5;
      display: flex;
      flex-direction: column;
      align-items: center;
      margin: 6px 0 16px;
      gap: 6px;
    }

    .hint-btn {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      border: 1.5px solid rgba(255, 255, 255, 0.4) !important;
      background: rgba(255, 255, 255, 0.15) !important;
      color: #ffffff !important;
      font-size: 13px;
      font-weight: 900;
      cursor: pointer;
      display: grid;
      place-items: center;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
      transition: all 0.24s ease !important;
    }

    body.dark .hint-btn {
      background: rgba(255, 255, 255, 0.1) !important;
      color: #ffffff !important;
      border-color: rgba(255, 255, 255, 0.25) !important;
    }

    .hint-btn:hover {
      transform: scale(1.1) rotate(360deg) !important;
      color: #d35069 !important;
      background: #ffffff !important;
      border-color: transparent !important;
    }

    body.dark .hint-btn:hover {
      color: #b5546a !important;
    }

    .hint-text {
      position: absolute;
      top: 36px;
      left: 50%;
      width: min(280px, calc(100vw - 40px));
      color: #d35069 !important;
      font-size: 13px;
      line-height: 1.5;
      font-weight: 700;
      opacity: 0;
      pointer-events: none;
      transform: translateX(-50%) translateY(-6px) scale(0.96);
      transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
      background: var(--card-solid);
      border: 1.5px solid rgba(var(--pink-rgb), 0.18);
      border-radius: 16px;
      padding: 10px 14px;
      box-shadow: 0 15px 35px rgba(var(--pink-rgb), 0.16);
      text-align: center;
    }

    .hint-text::before {
      content: "";
      position: absolute;
      top: -6px;
      left: 50%;
      width: 10px;
      height: 10px;
      background: var(--card-solid);
      border-left: 1.5px solid rgba(var(--pink-rgb), 0.18);
      border-top: 1.5px solid rgba(var(--pink-rgb), 0.18);
      transform: translateX(-50%) rotate(45deg);
    }

    body.dark .hint-text {
      background: var(--card-solid);
      border-color: rgba(255, 255, 255, 0.12);
      box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
      color: #ff8bb0 !important;
    }

    body.dark .hint-text::before {
      background: var(--card-solid);
      border-color: rgba(255, 255, 255, 0.12);
    }

    .hint-text.show {
      opacity: 1;
      pointer-events: auto;
      transform: translateX(-50%) translateY(0) scale(1);
    }

    .lock-error {
      min-height: 20px;
      color: #ffffff;
      font-size: 13.5px;
      font-weight: 800;
      position: relative;
      z-index: 1;
      text-align: center;
      margin-top: 12px;
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    }





    /* =========================================================
      NÚT GỬI YÊU CẦU CHO ANH
      Người yêu bấm chọn nhu cầu, web gửi thông báo sang Telegram qua Worker.
    ========================================================= */
    .love-request-fab {
      position: fixed;
      right: 22px;
      bottom: 22px;
      z-index: 32;
      border: none !important;
      display: inline-flex;
      align-items: center;
      justify-content: flex-start;
      gap: 8px;
      min-height: 46px;
      min-width: 145px;
      padding: 11px 18px;
      color: #ffffff !important;
      background-color: var(--pink) !important;
      background: linear-gradient(135deg, var(--pink-light), var(--pink)) !important;
      border-radius: 999px;
      font-size: 13.5px;
      font-weight: 900;
      cursor: pointer;
      box-shadow: 0 18px 38px rgba(var(--pink-rgb), 0.28);
      transition: 0.24s ease;
      overflow: hidden !important;
    }

    .love-request-fab::after {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 0%;
      background: rgba(255, 255, 255, 0.38);
      z-index: 0;
      pointer-events: none;
      transition: width 0.12s ease-out;
    }

    .love-request-fab.holding::after {
      width: 100%;
      transition: width 2.0s linear;
    }

    .love-request-fab * {
      position: relative;
      z-index: 1;
    }

    .love-request-fab:hover {
      transform: translateY(-3px) scale(1.03);
      box-shadow: 0 22px 46px rgba(var(--pink-rgb), 0.34);
    }

    .love-request-fab span {
      display: inline-block;
      line-height: 1;
    }

    .love-request-popup {
      position: fixed;
      inset: 0;
      z-index: 130;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 18px;
      background: rgba(61, 43, 43, 0.42);
      backdrop-filter: blur(13px);
      -webkit-backdrop-filter: blur(13px);
    }

    .love-request-popup.active {
      display: flex;
    }

    .love-request-card {
      width: min(430px, 100%);
      background: var(--card-solid);
      border: 1px solid rgba(245, 198, 214, 0.72);
      border-radius: 30px;
      padding: 26px 22px 22px;
      position: relative;
      text-align: center;
      box-shadow: 0 24px 80px rgba(61, 43, 43, 0.24);
      animation: popIn 0.25s ease;
      overflow: hidden;
    }

    .love-request-card::before {
      content: "";
      position: absolute;
      width: 62px;
      height: 15px;
      top: 18px;
      left: 22px;
      background: rgba(255, 229, 162, 0.62);
      border-radius: 6px;
      transform: rotate(-8deg);
    }

    .love-request-close {
      position: absolute;
      top: 12px;
      right: 12px;
      width: 38px;
      height: 38px;
      border: none;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.95);
      color: #8d344d;
      font-size: 27px;
      line-height: 1;
      cursor: pointer;
      z-index: 2;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
      transition: 0.25s ease;
    }

    .love-request-close:hover {
      transform: scale(1.06) rotate(8deg);
    }

    .love-request-icon {
      width: 76px;
      height: 76px;
      margin: 10px auto 13px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      color: var(--pink);
      background:
        radial-gradient(circle at 30% 25%, #ffffff, transparent 34%),
        linear-gradient(135deg, #ffe1ec, #ffffff);
      border: 1px solid rgba(var(--pink-rgb), 0.16);
      box-shadow: 0 16px 34px rgba(var(--pink-rgb), 0.18);
      font-size: 36px;
      animation: tinyHeartBeat 1.8s ease-in-out infinite;
    }

    .love-request-card h2 {
      color: var(--pink-dark);
      font-size: 25px;
      font-weight: 900;
      line-height: 1.15;
      margin-bottom: 16px;
    }

    .love-request-card p {
      color: var(--text-soft);
      font-size: 13.5px;
      line-height: 1.5;
      font-weight: 800;
      margin: 0 auto 16px;
      max-width: 330px;
    }

    .love-request-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      margin-bottom: 13px;
    }

    .love-request-option {
      border: 1px solid rgba(var(--pink-rgb), 0.15);
      background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.95), transparent 38%),
        linear-gradient(135deg, rgba(255,255,255,0.98), rgba(255,239,247,0.94));
      color: var(--pink-dark);
      border-radius: 18px;
      min-height: 52px;
      padding: 11px 10px;
      font-size: 13px;
      font-weight: 900;
      cursor: pointer;
      box-shadow: 0 10px 20px rgba(var(--pink-rgb), 0.1);
      transition: 0.22s ease;
    }

    .love-request-option:hover:not(:disabled) {
      transform: translateY(-2px);
      background: linear-gradient(135deg, var(--pink-light), var(--pink));
      color: #ffffff;
      box-shadow: 0 16px 28px rgba(var(--pink-rgb), 0.2);
    }

    .love-request-option:disabled {
      opacity: 0.62;
      cursor: wait;
    }

    .love-request-option.selected {
      background: linear-gradient(135deg, var(--pink-light), var(--pink));
      color: #ffffff;
      border-color: rgba(var(--pink-rgb), 0.42);
      box-shadow:
        0 16px 28px rgba(var(--pink-rgb), 0.22),
        0 0 0 5px rgba(var(--pink-rgb), 0.09);
      transform: translateY(-2px);
    }

    .love-request-note {
      width: 100%;
      min-height: 78px;
      resize: none;
      outline: none;
      border: 1.5px solid rgba(var(--pink-rgb), 0.18);
      border-radius: 20px;
      padding: 12px 14px;
      color: var(--pink-dark);
      background: rgba(255, 255, 255, 0.86);
      box-shadow: inset 0 2px 8px rgba(var(--pink-rgb), 0.06);
      font-size: 16px;
      line-height: 1.45;
      font-weight: 800;
      margin-bottom: 10px;
    }

    .love-request-note:focus {
      border-color: var(--pink);
      box-shadow:
        0 0 0 5px rgba(var(--pink-rgb), 0.1),
        inset 0 2px 8px rgba(var(--pink-rgb), 0.06);
    }

    .love-request-send {
      width: fit-content;
      min-width: 138px;
      min-height: 38px;
      border: none;
      border-radius: 999px;
      padding: 9px 15px;
      color: #ffffff;
      background: linear-gradient(135deg, var(--pink-light), var(--pink));
      font-size: 12.8px;
      line-height: 1;
      font-weight: 900;
      cursor: pointer;
      box-shadow: 0 10px 22px rgba(var(--pink-rgb), 0.17);
      transition: 0.22s ease;
      margin: 1px auto 9px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
    }

    .love-request-send:hover:not(:disabled) {
      transform: translateY(-2px);
      box-shadow: 0 18px 34px rgba(var(--pink-rgb), 0.26);
    }

    .love-request-send:disabled {
      opacity: 0.55;
      cursor: not-allowed;
      transform: none;
      box-shadow: none;
    }

    .love-request-status {
      min-height: 22px;
      color: var(--pink-dark);
      font-size: 13px;
      font-weight: 900;
      line-height: 1.35;
    }

    body.dark .love-request-card {
      background: var(--card-solid);
      border-color: rgba(255, 255, 255, 0.14);
    }

    body.dark .love-request-close,
    body.dark .love-request-icon,
    body.dark .love-request-note {
      background: #ffffff;
      color: var(--pink);
    }

    body.dark .love-request-option {
      background: #ffffff;
      color: var(--pink);
      border-color: rgba(255, 255, 255, 0.72);
    }

    body.dark .love-request-option.selected {
      background: linear-gradient(135deg, var(--pink-light), var(--pink));
      color: #ffffff;
    }

    @media (max-width: 600px) {
      .love-request-fab {
        right: 12px;
        bottom: 12px;
        min-height: 44px;
        padding: 10px 13px;
        font-size: 12px;
        box-shadow: 0 14px 30px rgba(var(--pink-rgb), 0.24);
      }

      .love-request-popup {
        padding: 10px;
      }

      .love-request-popup.note-keyboard-mode {
        top: 0;
        right: 0;
        bottom: auto;
        left: 0;
        height: var(--love-request-viewport-height, 100dvh);
        align-items: flex-end;
        padding-top: 10px;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        transform: translateY(var(--love-request-viewport-top, 0px));
      }

      .love-request-popup.note-keyboard-mode .love-request-card {
        max-height: calc(var(--love-request-viewport-height, 100dvh) - 24px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
      }

      .love-request-card {
        width: min(330px, 100%);
        border-radius: 24px;
        padding: 21px 15px 17px;
      }

      .love-request-card::before {
        width: 48px;
        height: 12px;
        top: 13px;
        left: 18px;
      }

      .love-request-close {
        top: 9px;
        right: 9px;
        width: 32px;
        height: 32px;
        font-size: 23px;
      }

      .love-request-icon {
        width: 62px;
        height: 62px;
        font-size: 30px;
        margin-bottom: 10px;
      }

      .love-request-card h2 {
        font-size: 20px;
      }

      .love-request-card p {
        font-size: 12.3px;
        margin-bottom: 13px;
      }

      .love-request-grid {
        gap: 8px;
      }

      .love-request-option {
        min-height: 47px;
        border-radius: 15px;
        padding: 9px 7px;
        font-size: 12px;
      }

      .love-request-note {
        min-height: 68px;
        border-radius: 17px;
        padding: 10px 12px;
        font-size: 16px;
      }

      .love-request-send {
        min-width: 128px;
        min-height: 36px;
        padding: 8.5px 13px;
        font-size: 12.2px;
        margin-bottom: 8px;
      }
    }


    /* =========================================================
      PHOTOBOOTH MINI
      Chụp 4 tấm ngay trong web. Ảnh chỉ nằm trên máy người mở web,
      không tự gửi đi đâu và không lưu vĩnh viễn.
    ========================================================= */
    .photobooth-fab {
      position: fixed;
      right: 22px;
      bottom: 82px;
      z-index: 32;
      border: none;
      display: inline-flex;
      align-items: center;
      justify-content: flex-start;
      gap: 8px;
      min-height: 46px;
      min-width: 145px;
      padding: 11px 18px;
      color: var(--pink-dark);
      background: rgba(255, 255, 255, 0.94);
      border: 1px solid rgba(var(--pink-rgb), 0.22);
      border-radius: 999px;
      font-size: 13.5px;
      font-weight: 900;
      cursor: pointer;
      box-shadow: 0 16px 34px rgba(var(--pink-rgb), 0.18);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      transition: 0.24s ease;
    }

    .photobooth-fab:hover {
      transform: translateY(-3px) scale(1.03);
      box-shadow: 0 20px 42px rgba(var(--pink-rgb), 0.25);
    }

    .photobooth-popup {
      position: fixed;
      inset: 0;
      z-index: 131;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 18px;
      background: rgba(61, 43, 43, 0.42);
      backdrop-filter: blur(13px);
      -webkit-backdrop-filter: blur(13px);
    }

    .photobooth-popup.active {
      display: flex;
    }

    .photobooth-card {
      width: min(470px, 100%);
      max-height: calc(100vh - 36px);
      max-height: calc(100dvh - 36px);
      overflow-y: auto;
      background: var(--card-solid);
      border: 1px solid rgba(245, 198, 214, 0.72);
      border-radius: 30px;
      padding: 24px 20px 20px;
      position: relative;
      text-align: center;
      box-shadow: 0 24px 80px rgba(61, 43, 43, 0.24);
      animation: popIn 0.25s ease;
    }

    .photobooth-card::before {
      content: "";
      position: absolute;
      width: 62px;
      height: 15px;
      top: 18px;
      left: 22px;
      background: rgba(255, 229, 162, 0.62);
      border-radius: 6px;
      transform: rotate(-8deg);
    }

    .photobooth-close {
      position: absolute;
      top: 12px;
      right: 12px;
      width: 38px;
      height: 38px;
      border: none;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.95);
      color: #8d344d;
      font-size: 27px;
      line-height: 1;
      cursor: pointer;
      z-index: 2;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
      transition: 0.25s ease;
    }

    .photobooth-close:hover {
      transform: scale(1.06) rotate(8deg);
    }

    .photobooth-steps {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 8px;
      margin: 8px auto 24px;
      padding: 6px;
      background: rgba(var(--pink-rgb), 0.05);
      border-radius: 999px;
      border: 1px solid rgba(var(--pink-rgb), 0.08);
      max-width: 320px;
    }
    
    body.dark .photobooth-steps {
      background: rgba(255, 255, 255, 0.04);
      border-color: rgba(255, 255, 255, 0.06);
    }

    .photobooth-step {
      padding: 6px 12px;
      font-size: 11.5px;
      font-weight: 800;
      color: var(--text-soft);
      border-radius: 999px;
      transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      display: flex;
      align-items: center;
      gap: 4px;
      cursor: pointer;
      user-select: none;
    }

    .photobooth-step:hover:not(.active) {
      background: rgba(var(--pink-rgb), 0.08);
      color: var(--pink);
    }

    .photobooth-step.active {
      background: var(--pink);
      color: #ffffff;
      box-shadow: 0 4px 10px rgba(var(--pink-rgb), 0.25);
    }

    .photobooth-icon {
      width: 64px;
      height: 64px;
      margin: 8px auto 10px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      color: var(--pink);
      background:
        radial-gradient(circle at 30% 25%, #ffffff, transparent 34%),
        linear-gradient(135deg, #ffe1ec, #ffffff);
      border: 1px solid rgba(var(--pink-rgb), 0.16);
      box-shadow: 0 14px 28px rgba(var(--pink-rgb), 0.16);
      font-size: 30px;
      animation: tinyHeartBeat 1.8s ease-in-out infinite;
    }

    .photobooth-card h2 {
      color: var(--pink-dark);
      font-size: 24px;
      font-weight: 900;
      line-height: 1.15;
      margin-bottom: 15px;
    }

    .photobooth-subtitle {
      color: var(--text-soft);
      font-size: 13px;
      line-height: 1.45;
      font-weight: 800;
      margin: 0 auto 14px;
      max-width: 350px;
    }

    .photobooth-stage {
      position: relative;
      width: min(330px, 100%);
      aspect-ratio: 3 / 4;
      margin: 0 auto 13px;
      border-radius: 24px;
      overflow: hidden;
      background:
        linear-gradient(to right, rgba(var(--pink-rgb), 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(var(--pink-rgb), 0.06) 1px, transparent 1px),
        var(--pink-soft);
      background-size: 24px 24px;
      border: 2px solid rgba(var(--pink-rgb), 0.3);
      box-shadow:
        0 14px 32px rgba(var(--pink-rgb), 0.12),
        inset 0 0 0 1px rgba(255,255,255,0.35);
      isolation: isolate;
      transition: border-color 0.3s ease, box-shadow 0.3s ease;
    }

    .photobooth-stage.active {
      border-color: var(--pink);
      box-shadow: 
        0 0 0 4px rgba(var(--pink-rgb), 0.15),
        0 14px 32px rgba(141, 52, 77, 0.18);
    }

    /* Retro camera viewfinder corner marks */
    .photobooth-stage::before {
      content: "";
      position: absolute;
      inset: 14px;
      border: 1.2px solid rgba(255, 255, 255, 0.25);
      pointer-events: none;
      z-index: 5;
      border-radius: 14px;
      background: 
        linear-gradient(to right, #ffffff 12px, transparent 12px) 0 0,
        linear-gradient(to bottom, #ffffff 12px, transparent 12px) 0 0,
        linear-gradient(to left, #ffffff 12px, transparent 12px) 100% 0,
        linear-gradient(to bottom, #ffffff 12px, transparent 12px) 100% 0,
        linear-gradient(to right, #ffffff 12px, transparent 12px) 0 100%,
        linear-gradient(to top, #ffffff 12px, transparent 12px) 0 100%,
        linear-gradient(to left, #ffffff 12px, transparent 12px) 100% 100%,
        linear-gradient(to top, #ffffff 12px, transparent 12px) 100% 100%;
      background-repeat: no-repeat;
      background-size: 13px 13px;
      opacity: 0;
      transition: opacity 0.4s ease;
    }

    .photobooth-stage.active::before {
      opacity: 0.85;
      animation: cameraPulse 2s infinite ease-in-out;
    }

    @keyframes cameraPulse {
      0% { opacity: 0.48; }
      50% { opacity: 0.88; }
      100% { opacity: 0.48; }
    }

    .photobooth-camera-grid {
      position: absolute;
      inset: 14px;
      pointer-events: none;
      z-index: 4;
      border-radius: 14px;
      overflow: hidden;
      opacity: 0;
      transition: opacity 0.4s ease;
    }
    
    .photobooth-stage.active .photobooth-camera-grid {
      opacity: 0.68;
    }

    .grid-line {
      position: absolute;
      background: rgba(255, 255, 255, 0.28);
      box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
    }

    .grid-line.horizontal-1 {
      top: 33.33%;
      left: 0;
      width: 100%;
      height: 1px;
    }

    .grid-line.horizontal-2 {
      top: 66.66%;
      left: 0;
      width: 100%;
      height: 1px;
    }

    .grid-line.vertical-1 {
      left: 33.33%;
      top: 0;
      width: 1px;
      height: 100%;
    }

    .grid-line.vertical-2 {
      left: 66.66%;
      top: 0;
      width: 1px;
      height: 100%;
    }

    .camera-center-dot {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      width: 32px;
      height: 32px;
      border: 1px solid rgba(255, 255, 255, 0.4);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .camera-center-dot::after {
      content: "";
      width: 4px;
      height: 4px;
      background: #ffffff;
      border-radius: 50%;
    }

    .photobooth-video {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: none;
      transform: scaleX(-1);
      background: #fff4f8;
    }

    .photobooth-video.ready {
      display: block;
    }

    .photobooth-placeholder {
      position: absolute;
      inset: 0;
      z-index: 1;
      display: grid;
      place-items: center;
      padding: 22px;
      color: var(--pink-dark);
      font-size: 13px;
      line-height: 1.45;
      font-weight: 900;
      text-align: center;
    }

    .photobooth-video.ready + .photobooth-placeholder {
      display: none;
    }

    .photobooth-countdown {
      position: absolute;
      inset: 0;
      z-index: 3;
      display: none;
      place-items: center;
      color: #ffffff;
      font-size: clamp(58px, 20vw, 118px);
      font-weight: 900;
      text-shadow: 0 12px 34px rgba(61, 43, 43, 0.38);
      pointer-events: none;
    }

    .photobooth-countdown.show {
      display: grid;
      animation: photoCountdownPop 0.72s ease;
    }

    .photobooth-flash {
      position: absolute;
      inset: 0;
      z-index: 20 !important;
      background: #ffffff;
      opacity: 0;
      pointer-events: none;
    }

    .photobooth-flash.show {
      animation: photoFlash 0.34s ease;
    }

    .photobooth-actions,
    .photobooth-save-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: center;
      gap: 8px;
      margin: 0 auto 12px;
    }

    .photobooth-save-actions {
      margin: 4px auto 10px;
    }

    .photobooth-primary,
    .photobooth-secondary,
    .photobooth-save {
      min-height: 38px;
      border: none;
      border-radius: 999px;
      padding: 9px 14px;
      font-size: 12.7px;
      font-weight: 900;
      cursor: pointer;
      transition: 0.22s ease;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      white-space: nowrap;
    }

    .photobooth-primary,
    .photobooth-save {
      color: #ffffff;
      background: linear-gradient(135deg, var(--pink-light), var(--pink));
      box-shadow: 0 10px 22px rgba(var(--pink-rgb), 0.18);
    }

    .photobooth-save {
      min-height: 36px;
      padding: 9px 16px;
      font-size: 12.5px;
    }

    .photobooth-secondary {
      color: var(--pink-dark);
      background: rgba(255, 255, 255, 0.92);
      border: 1px solid rgba(var(--pink-rgb), 0.18);
      box-shadow: 0 8px 18px rgba(var(--pink-rgb), 0.1);
    }

    .photobooth-primary:hover:not(:disabled),
    .photobooth-secondary:hover:not(:disabled),
    .photobooth-save:hover:not(:disabled) {
      transform: translateY(-2px);
    }

    .photobooth-primary:disabled,
    .photobooth-secondary:disabled,
    .photobooth-save:disabled {
      opacity: 0.54;
      cursor: not-allowed;
      transform: none;
      box-shadow: none;
    }

    .photobooth-strip-preview {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 9px;
      width: min(230px, 100%);
      margin: 0 auto 15px;
      background: #1b171c; /* warm dark film roll color */
      padding: 18px 12px;
      border-radius: 12px;
      position: relative;
      box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }

    .photobooth-strip-preview::before,
    .photobooth-strip-preview::after {
      content: "";
      position: absolute;
      top: 0;
      bottom: 0;
      width: 6px;
      background-image: repeating-linear-gradient(
        to bottom,
        #fffafc 0px,
        #fffafc 5px,
        transparent 5px,
        transparent 14px
      );
      background-size: 6px 14px;
      opacity: 0.65;
    }
    
    body.dark .photobooth-strip-preview::before,
    body.dark .photobooth-strip-preview::after {
      background-image: repeating-linear-gradient(
        to bottom,
        #19141a 0px,
        #19141a 5px,
        transparent 5px,
        transparent 14px
      );
    }
    
    .photobooth-strip-preview::before {
      left: 3px;
    }
    
    .photobooth-strip-preview::after {
      right: 3px;
    }

    .photobooth-thumb {
      aspect-ratio: 1 / 1.16;
      border-radius: 6px;
      display: grid;
      place-items: center;
      overflow: hidden;
      color: rgba(255, 255, 255, 0.35);
      background: rgba(0, 0, 0, 0.45);
      border: 3px solid #ffffff;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
      font-size: 18px;
      font-weight: 900;
      position: relative;
      transition: all 0.4s ease;
    }

    .photobooth-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      animation: photoDevelop 1.2s ease-out forwards;
    }

    @keyframes photoDevelop {
      from {
        filter: grayscale(1) contrast(1.5) brightness(0.2);
        opacity: 0.3;
      }
      to {
        filter: none;
        opacity: 1;
      }
    }

    .photobooth-status {
      min-height: 20px;
      color: var(--pink-dark);
      font-size: 12.8px;
      line-height: 1.35;
      font-weight: 900;
    }

    .photobooth-canvas {
      display: none;
    }


    .photobooth-theme-popup {
      position: fixed;
      inset: 0;
      z-index: 136;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 18px;
      background: rgba(61, 43, 43, 0.36);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }

    .photobooth-theme-popup.active {
      display: flex;
    }

    .photobooth-theme-card {
      width: min(560px, 100%);
      position: relative;
      overflow: hidden;
      padding: 23px 18px 18px;
      border-radius: 28px;
      background: rgba(255, 255, 255, 0.96);
      border: 1px solid rgba(245, 198, 214, 0.78);
      box-shadow: 0 24px 76px rgba(61, 43, 43, 0.24);
      text-align: center;
      animation: popIn 0.25s ease;
    }

    .photobooth-theme-card::before {
      content: "";
      position: absolute;
      width: 58px;
      height: 14px;
      top: 16px;
      left: 20px;
      background: rgba(255, 229, 162, 0.66);
      border-radius: 6px;
      transform: rotate(-8deg);
    }

    .photobooth-theme-close {
      position: absolute;
      top: 10px;
      right: 10px;
      width: 34px;
      height: 34px;
      border: none;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.96);
      color: #8d344d;
      font-size: 25px;
      line-height: 1;
      cursor: pointer;
      z-index: 2;
      box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
      transition: 0.22s ease;
    }

    .photobooth-theme-close:hover {
      transform: scale(1.06) rotate(8deg);
    }

    .photobooth-theme-title {
      color: var(--pink-dark);
      font-size: 22px;
      line-height: 1.15;
      font-weight: 900;
      margin: 6px 40px 6px;
    }

    .photobooth-theme-subtitle {
      color: var(--text-soft);
      font-size: 12.5px;
      line-height: 1.4;
      font-weight: 800;
      margin: 0 auto 14px;
      max-width: 310px;
    }

    .photobooth-theme-grid {
      display: grid !important;
      grid-template-columns: repeat(2, 1fr) !important;
      gap: 16px !important;
      max-height: 52dvh;
      overflow-y: auto;
      padding: 10px 4px;
      width: 100%;
    }

    .photobooth-theme-option {
      min-height: unset !important;
      height: auto !important;
      display: flex !important;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      padding: 12px 10px !important;
      border: none !important;
      border-radius: 20px;
      cursor: pointer;
      background: transparent !important;
      box-shadow: none !important;
      transition: 0.24s ease;
      color: var(--pink-dark);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-weight: 900;
    }

    .photobooth-theme-option:hover:not(:disabled) {
      transform: translateY(-4px) scale(1.03);
      border-color: transparent !important;
      box-shadow: none !important;
    }

    .photobooth-theme-option:active:not(:disabled) {
      transform: translateY(-1px) scale(0.98);
    }

    .photobooth-theme-option:disabled {
      opacity: 0.55;
      cursor: wait;
      transform: none;
    }

    .theme-mini-preview {
      width: 100%;
      height: 230px;
      border-radius: 14px;
      position: relative;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 6px;
      background: transparent !important;
      border: none !important;
      box-shadow: none !important;
    }

    body.dark .theme-mini-preview {
      background: transparent !important;
      border-color: transparent !important;
    }

    .theme-mini-img-exact {
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
      border-radius: 6px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
      display: block;
    }

    /* Loading Spinner for dynamic render */
    .theme-mini-loading {
      display: grid;
      place-items: center;
      width: 100%;
      height: 100%;
    }

    .theme-mini-spinner {
      width: 20px;
      height: 20px;
      border: 2.5px solid rgba(var(--pink-rgb), 0.2);
      border-top-color: var(--pink);
      border-radius: 50%;
      animation: miniSpin 0.7s linear infinite;
    }

    @keyframes miniSpin {
      to { transform: rotate(360deg); }
    }

    .photobooth-theme-name {
      font-size: 12px;
      line-height: 1.18;
    }

    body.dark .photobooth-theme-card {
      background: var(--card-solid);
      border-color: rgba(255, 255, 255, 0.14);
    }

    body.dark .photobooth-theme-close {
      background: #ffffff;
      color: var(--pink);
      border-color: rgba(255, 255, 255, 0.65);
    }

    body.dark .photobooth-theme-option {
      background: transparent !important;
      color: var(--pink);
      border-color: transparent !important;
      box-shadow: none !important;
    }

    body.dark .photobooth-fab,
    body.dark .photobooth-close,
    body.dark .photobooth-icon,
    body.dark .photobooth-secondary {
      background: #ffffff;
      color: var(--pink);
      border-color: rgba(255, 255, 255, 0.62);
    }

    body.dark .photobooth-card {
      background: var(--card-solid);
      border-color: rgba(255, 255, 255, 0.14);
    }



    @keyframes photoCountdownPop {
      from { opacity: 0; transform: scale(0.72); }
      45% { opacity: 1; transform: scale(1.08); }
      to { opacity: 0.92; transform: scale(1); }
    }

    @keyframes photoFlash {
      0% { opacity: 0; }
      18% { opacity: 0.9; }
      100% { opacity: 0; }
    }

    @media (max-width: 600px) {
      .photobooth-fab {
        right: 12px;
        bottom: 66px;
        min-height: 42px;
        padding: 9px 12px;
        font-size: 12px;
      }

      .photobooth-popup {
        padding: 10px;
      }

      .photobooth-card {
        width: min(340px, 100%);
        border-radius: 24px;
        padding: 20px 14px 16px;
      }

      .photobooth-card::before {
        width: 48px;
        height: 12px;
        top: 13px;
        left: 18px;
      }

      .photobooth-close {
        top: 9px;
        right: 9px;
        width: 32px;
        height: 32px;
        font-size: 23px;
      }

      .photobooth-icon {
        width: 56px;
        height: 56px;
        font-size: 27px;
      }

      .photobooth-card h2 {
        font-size: 20px;
      }

      .photobooth-subtitle {
        font-size: 12.3px;
      }

      .photobooth-stage {
        width: min(270px, 100%);
        border-radius: 20px;
      }

      .photobooth-strip-preview {
        gap: 5px;
      }

      .photobooth-thumb {
        border-radius: 11px;
      }

      .photobooth-theme-popup {
        padding: 10px;
      }

      .photobooth-theme-card {
        width: min(360px, 100%);
        border-radius: 23px;
        padding: 20px 13px 15px;
      }

      .photobooth-theme-title {
        font-size: 19px;
        margin-inline: 34px;
      }

      .photobooth-theme-grid {
        gap: 7px;
      }

      .photobooth-theme-option {
        min-height: unset !important;
        height: auto !important;
        border-radius: 16px;
        padding: 9px 5px;
      }

      .theme-mini-preview {
        width: 100%;
        height: 165px;
        border-radius: 14px;
        padding: 6px;
      }

      .theme-mini-title {
        font-size: 6.5px;
      }

      .theme-mini-date {
        font-size: 5.2px;
      }

      .theme-mini-photos {
        gap: 3px;
        margin-top: 5px;
      }

      .theme-mini-photo {
        border-radius: 6px;
      }

      .photobooth-theme-name {
        font-size: 11px;
      }
    }

    @keyframes musicPanelSwapIn {
      from { opacity: 0; transform: translateY(-4px) scale(0.96); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }

    @keyframes musicNoteFloat {
      0%, 100% { transform: translateY(0px) rotate(-4deg); }
      50% { transform: translateY(-6px) rotate(6deg); }
    }

    @keyframes musicNoteDance {
      0%, 100% { transform: translateY(0px) scale(1) rotate(-5deg); }
      50% { transform: translateY(-5px) scale(1.12) rotate(8deg); }
    }

    @keyframes musicHeartBeat {
      0%, 100% { transform: scaleY(0.42); opacity: 0.5; }
      18% { transform: scaleY(1.15); opacity: 1; }
      36% { transform: scaleY(0.62); opacity: 0.72; }
      56% { transform: scaleY(1.35); opacity: 1; }
      78% { transform: scaleY(0.48); opacity: 0.58; }
    }

    @keyframes loadingBeat {
      0%, 100% { transform: scale(1) rotate(0deg); }
      50% { transform: scale(1.1) rotate(5deg); }
    }

    @keyframes loadingMove {
      0% { transform: translateX(-90%); }
      50% { transform: translateX(72%); }
      100% { transform: translateX(190%); }
    }

    @keyframes tinyHeartBeat {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.12); }
    }

    @keyframes weatherIconFloat {
      0%, 100% { transform: translateY(0) rotate(-4deg) scale(1); }
      45% { transform: translateY(-2px) rotate(5deg) scale(1.08); }
      70% { transform: translateY(1px) rotate(-2deg) scale(0.98); }
    }

    @keyframes lovePillDissolve {
      0% {
        opacity: 0;
      }
      50% {
        opacity: 1;
      }
      100% {
        opacity: 0;
      }
    }

    @keyframes pulse {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.12); }
    }

    @keyframes popIn {
      from { opacity: 0; transform: scale(0.96) translateY(12px); }
      to { opacity: 1; transform: scale(1) translateY(0); }
    }

    @keyframes floaty {
      0%, 100% { transform: translateY(0px) rotate(0deg); }
      50% { transform: translateY(-6px) rotate(4deg); }
    }

    @keyframes shake {
      0%, 100% { transform: translateX(0); }
      20% { transform: translateX(-8px); }
      40% { transform: translateX(8px); }
      60% { transform: translateX(-6px); }
      80% { transform: translateX(6px); }
    }

    .shake {
      animation: shake 0.35s ease;
    }

    

    /* =========================================================
      ✅ MOBILE CSS ĐÃ GOM GỌN
      Các chỉnh sửa responsive được nhóm theo breakpoint để dễ bảo trì.
      - <=900px: tablet/mobile lớn
      - <=600px: điện thoại
      - <=360px: điện thoại nhỏ
    ========================================================= */
    @media (max-width: 900px) {
body {
        padding: 10px;
      }

      body::before {
        left: 28px;
      }

      .outside-time {
        opacity: 0.45;
      }

      .outside-time::after {
        font-size: 12px;
      }

      .anniversary {
        height: calc(100vh - 20px);
        height: calc(100dvh - 20px);
        border-radius: 22px;
      }

      .top-left {
        top: 12px;
        left: 12px;
        gap: 6px;
      }

      .top-actions {
        top: 12px;
        right: 12px;
        gap: 7px;
      }

      .love-pill {
        font-size: 13.5px;
        padding: 7px 10px 7px 8px;
        width: 136px;
        justify-content: flex-start;
        gap: 6px;
      }

      .love-heart {
        width: 25px;
        height: 25px;
        font-size: 13px;
      }


      .mode-btn {
        padding: 8px 10px;
        font-size: 15px;
      }

      .calendar-card {
        min-height: 500px;
        border-radius: 26px;
        padding: 20px 16px 18px;
      }

      .calendar-title {
        font-size: 23px;
      }

      .calendar-weekdays,
      .calendar-days {
        gap: 5px;
      }

      .calendar-day {
        border-radius: 12px;
        font-size: 12px;
      }

      .mode-toast {
        top: 54px;
        right: 12px;
        max-width: 220px;
        font-size: 12px;
      }

      .hero {
        padding: 58px 16px 12px;
      }

      h1 {
        font-size: 30px;
      }

      .subtitle {
        font-size: 18px;
        line-height: 1.45;
      }

      .content {
        padding: 0 10px 10px;
      }

      .content-panel {
        grid-template-columns: 1fr;
        gap: 0;
        max-width: none;
      }

      .timeline-wrap {
        max-height: 112px;
        padding: 12px;
        border-right: none;
        border-bottom: 1px solid rgba(241, 194, 211, 0.35);
      }

      .timeline {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 8px;
      }

      .timeline::-webkit-scrollbar {
        height: 6px;
      }

      .timeline::-webkit-scrollbar-thumb {
        background: var(--pink-light);
        border-radius: 999px;
      }

      .time-btn {
        min-width: 96px;
        min-height: 50px;
        padding: 13px 12px 13px 40px;
      }

      .event-title {
        font-size: 22px;
      }

      .event-text {
        font-size: 13px;
      }

      .month-info {
        padding: 24px 16px 6px;
      }

      .photo-grid {
        padding: 10px 18px 16px;
        gap: 12px;
        max-width: none;
      }

      .photo-item {
        border-radius: 16px;
      }

      .photo-caption {
        font-size: 11px;
        padding: 20px 8px 8px;
      }

      .doodle-3 {
        display: none;
      }


      .timeline-wrap {
        overflow: hidden;
      }

      .timeline {
        padding: 4px 4px 9px;
        scroll-padding-inline: 12px;
      }

      .time-btn,
      .time-btn:hover,
      .time-btn.active {
        transform: none !important;
      }

      .time-btn.active {
        box-shadow:
          0 10px 22px rgba(var(--pink-rgb), 0.2),
          inset 0 1px 0 rgba(255, 255, 255, 0.58);
      }

      .time-btn.active::after {
        transform: none;
      }
    }

    @media (max-width: 600px) {
.modal {
        padding: 12px;
      }

      .modal-content {
        border-radius: 22px;
      }

      .modal-photo-wrap {
        height: 54vh;
      }

      .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 32px;
      }

      .modal-prev {
        left: 10px;
      }

      .modal-next {
        right: 10px;
      }

      .modal-counter {
        bottom: 10px;
        font-size: 12px;
      }

      .modal-info {
        padding: 16px 18px 20px;
      }



      .loading-card {
        min-height: 280px;
        padding: 30px 22px;
        border-radius: 26px;
      }

      .loading-icon {
        width: 68px;
        height: 68px;
        font-size: 34px;
      }

      .loading-title {
        font-size: 28px;
      }

      .loading-text {
        font-size: 13px;
      }

      .eyebrow {
        display: inline-flex;
        margin-bottom: 8px;
        min-width: var(--music-panel-width, 188px);
        min-height: var(--music-panel-height, 36px);
      }

      .eyebrow.music-player-panel {
        display: inline-flex;
        margin-bottom: 8px;
      }

      .music-control-btn {
        width: 22px;
        height: 22px;
      }

      .music-play-btn {
        width: 24px;
        height: 24px;
      }

      .music-volume-slider {
        width: 90px;
      }

      .hero {
        padding-top: 52px;
      }

      h1 {
        font-size: 28px;
        margin-bottom: 6px;
      }

      .subtitle {
        display: none;
      }


      .outside-times {
        display: none;
      }

      .photo-grid {
        gap: 9px;
        padding: 8px 12px 14px;
      }

      .code-input {
        width: 48px;
        height: 54px;
        font-size: 24px;
      }

      .lock-card {
        width: min(335px, 100%);
        padding: 22px;
      }

      .lock-card h2 {
        font-size: 25px;
      }

      .hint-text {
        width: 235px;
      }


      body {
        align-items: flex-start;
        justify-content: flex-start;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 8px 8px 0 8px;
      }

      body::before {
        display: none;
      }

      .anniversary {
        width: 100%;
        min-height: calc(100vh - 8px) !important;
        min-height: calc(100dvh - 8px) !important;
        height: auto;
        overflow: visible;
        border-radius: 20px 20px 0 0 !important;
        border-bottom: none !important;
      }

      .top-left {
        top: 10px;
        left: 10px;
        max-width: calc(100% - 165px);
      }

      .top-actions {
        top: 10px;
        right: 10px;
        gap: 5px;
      }

      .top-actions .mode-btn {
        width: 34px;
        height: 34px;
        font-size: 14px;
      }

      .top-actions .streak-btn {
        width: auto !important;
        height: 34px;
        border-radius: 17px !important;
        padding: 0 8px !important;
        gap: 4px;
        font-size: 13px;
      }

      .top-actions .streak-icon {
        font-size: 15px !important;
        width: auto !important;
        height: auto !important;
      }

      .love-pill {
        gap: 5px;
        width: 110px;
        padding: 6px 9px 6px 7px;
        font-size: 13px;
        justify-content: flex-start;
      }

      .love-heart {
        width: 23px;
        height: 23px;
        font-size: 12px;
        flex: 0 0 auto;
      }

      .mode-btn {
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        padding: 0;
        font-size: 15px;
      }

      .music-note-btn {
        top: 62px;
        right: 28px;
        width: 22px;
        height: 22px;
        font-size: 20px;
      }

      .mode-toast {
        top: 54px;
        right: 10px;
        max-width: calc(100vw - 20px);
        border-radius: 18px;
        white-space: normal;
        text-align: center;
      }

      .hero {
        padding: 66px 14px 8px;
      }

      h1 {
        font-size: clamp(21px, 7vw, 26px);
        line-height: 1.12;
        margin-bottom: 0;
        letter-spacing: -0.5px;
      }

      .doodle-1 {
        top: 50px;
        left: 22px;
        font-size: 22px;
      }

      .doodle-2 {
        top: 50px;
        left: 96px;
        font-size: 17px;
        opacity: 0.72;
      }

      .content {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 0 8px 0;
        min-height: auto;
      }

      .content-panel {
        flex: 1;
        min-height: 0;
      }

      .timeline-wrap {
        max-height: none;
        padding: 8px;
        border-right: none;
        border-bottom: 1px solid rgba(241, 194, 211, 0.35);
        border-radius: 0;
      }

      .timeline {
        gap: 8px;
        padding-bottom: 5px;
      }

      .time-btn {
        min-width: 86px;
        min-height: 42px;
        padding: 10px 10px 10px 34px;
        border-radius: 14px;
        font-size: 12px;
      }

      .time-btn-icon {
        left: 8px;
        width: 21px;
        height: 21px;
      }
      .time-btn-icon .ui-svg-icon {
        width: 11px;
        height: 11px;
      }

      .event-card {
        overflow: hidden;
      }

      .event-card::after {
        display: none;
      }

      .event-tape-logout {
        width: 48px;
        height: 12px;
        top: 10px;
        right: 16px;
        border-radius: 5px;
      }

      .month-info {
        padding: 18px 14px 4px;
      }

      .event-date {
        font-size: 11.5px;
        margin-bottom: 4px;
      }

      .event-title {
        font-size: 19px;
        line-height: 1.16;
        margin-bottom: 6px;
      }

      .event-text {
        font-size: 12.5px;
        line-height: 1.42;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
      }

      .photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 8px 10px 14px;
        align-content: start;
      }

      .photo-item {
        border-radius: 14px;
      }

      .photo-caption {
        font-size: 10px;
        padding: 18px 7px 7px;
      }

      .heart {
        display: none;
      }

      .lock-screen {
        padding: 12px;
        align-items: center;
      }

      .lock-card {
        width: min(330px, 100%);
        padding: 20px 16px;
        border-radius: 24px;
      }

      .lock-head {
        padding-top: 14px;
        margin-bottom: 14px;
      }

      .lock-icon {
        font-size: 36px;
      }

      .lock-card h2 {
        font-size: 23px;
      }

      .code-wrap {
        gap: 7px;
      }

      .code-input {
        width: 46px;
        height: 52px;
        border-radius: 14px;
        font-size: 23px;
      }

      .modal {
        padding: 8px;
        align-items: center;
      }

      .modal-content {
        width: 100%;
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: 20px;
      }

      .modal-photo-wrap {
        height: min(48vh, 420px);
        height: min(48dvh, 420px);
      }

      .modal-info {
        padding: 14px 16px 16px;
      }

      .modal-info h3 {
        font-size: 22px;
      }

      .modal-info p {
        font-size: 13px;
        line-height: 1.45;
      }

      .close-btn {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
        font-size: 28px;
      }

      .calendar-popup,
      .flower-popup {
        padding: 10px;
      }

      .calendar-card {
        width: min(350px, 100%);
        min-height: auto;
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
        overflow-y: auto;
        border-radius: 24px;
        padding: 18px 14px 16px;
      }

      .calendar-title {
        font-size: 22px;
        margin: 10px 40px 14px;
      }

      .calendar-month-bar {
        padding: 8px;
        border-radius: 16px;
        margin-bottom: 9px;
      }

      .calendar-nav-btn {
        width: 34px;
        height: 34px;
        font-size: 22px;
      }

      .calendar-month-label {
        font-size: 14px;
      }

      .calendar-weekdays,
      .calendar-days {
        gap: 4px;
      }

      .calendar-days {
        min-height: 252px;
      }

      .calendar-day {
        border-radius: 10px;
        font-size: 11.5px;
      }

      .flower-card {
        width: min(340px, 100%);
        border-radius: 24px;
        padding: 24px 20px 22px;
      }

      .flower-big {
        width: 112px;
        height: 112px;
        font-size: 64px;
        margin-bottom: 14px;
      }

      .flower-message {
        font-size: 18px;
      }


      .top-left {
        top: 8px;
        left: 8px;
        max-width: calc(100% - 92px);
      }

      .top-actions {
        top: 8px;
        right: 8px;
        gap: 5px;
      }

      .love-pill {
        gap: 5px;
        padding: 5px 8px 5px 6px;
        font-size: 10.5px;
        box-shadow: 0 8px 18px rgba(var(--pink-rgb), 0.1);
      }

      .love-heart {
        width: 21px;
        height: 21px;
        font-size: 11px;
      }

      .mode-btn {
        width: 34px;
        height: 34px;
        font-size: 14px;
        box-shadow: 0 8px 18px rgba(var(--pink-rgb), 0.1);
      }

      .hero {
        padding: 58px 12px 16px;
      }

      h1 {
        font-size: clamp(20px, 6.3vw, 24px);
        line-height: 1.12;
      }

      .doodle-1 {
        top: 46px;
        left: 20px;
        font-size: 20px;
      }

      .doodle-2 {
        top: 46px;
        left: 86px;
        font-size: 15px;
      }

      .content {
        padding: 0 8px 10px;
      }

      .timeline-wrap {
        padding: 8px;
      }

      .event-card {
        margin-top: 0;
      }

      .month-info {
        padding: 20px 14px 6px;
      }

      .mode-toast {
        top: 48px;
        right: 8px;
        left: auto;
        max-width: min(245px, calc(100vw - 16px));
        padding: 8px 11px;
        font-size: 11.5px;
        line-height: 1.28;
        border-radius: 16px;
        box-shadow: 0 10px 24px rgba(141, 52, 77, 0.12);
      }

      .calendar-popup,
      .flower-popup {
        padding: 8px;
      }

      .calendar-card {
        width: min(318px, 100%);
        min-height: auto;
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
        padding: 15px 11px 13px;
        border-radius: 21px;
      }

      .calendar-card::before {
        width: 48px;
        height: 12px;
        top: 13px;
        left: 18px;
      }

      .calendar-close,
      .flower-close {
        top: 9px;
        right: 9px;
        width: 32px;
        height: 32px;
        font-size: 23px;
      }

      .calendar-title {
        font-size: 19px;
        margin: 8px 36px 11px;
      }

      .calendar-month-bar {
        padding: 6px;
        gap: 7px;
        border-radius: 14px;
        margin-bottom: 7px;
      }

      .calendar-nav-btn {
        width: 30px;
        height: 30px;
        font-size: 20px;
      }

      .calendar-month-label {
        font-size: 13px;
      }

      .calendar-meet-countdown {
        margin: -2px auto 8px;
        padding: 6px 10px;
        font-size: 10.8px;
      }

      .calendar-weekday {
        font-size: 10.5px;
        padding: 3px 0;
      }

      .calendar-weekdays,
      .calendar-days {
        gap: 3px;
      }

      .calendar-days {
        min-height: 214px;
      }

      .calendar-day {
        border-radius: 9px;
        font-size: 10.8px;
      }

      .calendar-heart-icon {
        font-size: 22px;
      }

      .calendar-day.meet-date::before {
        inset: 4px;
        border-width: 1.1px;
      }


      .calendar-wish {
        width: var(--wish-width, min(292px, calc(100% - 22px)));
        min-height: 66px;
        border-radius: 22px;
        padding: 11px 13px 11px 10px;
        gap: 9px;
        transform: translate(-50%, calc(-100% - 20px)) translateY(10px) scale(0.94);
      }

      .calendar-wish.show {
        transform: translate(-50%, calc(-100% - 20px)) translateY(0) scale(1);
      }

      .calendar-wish::before {
        bottom: -12px;
        width: 13px;
        height: 13px;
        box-shadow:
          9px 10px 0 -4px rgba(255, 255, 255, 0.96),
          16px 17px 0 -7px rgba(255, 255, 255, 0.9);
      }

      .calendar-wish-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        font-size: 18px;
      }

      .calendar-wish-label {
        font-size: 9px;
        letter-spacing: 0.75px;
        margin-bottom: 4px;
      }

      .calendar-wish-message {
        font-size: 12.4px;
        line-height: 1.36;
      }

      .flower-card {
        width: min(310px, 100%);
        border-radius: 21px;
        padding: 20px 17px 18px;
      }

      .flower-card::before {
        width: 48px;
        height: 12px;
        top: 13px;
        left: 18px;
      }

      .flower-big {
        width: 92px;
        height: 92px;
        font-size: 54px;
        margin: 6px auto 12px;
      }

      .flower-message {
        font-size: 16px;
        line-height: 1.35;
        max-width: 250px;
        margin-bottom: 4px;
      }

      .flower-submessage {
        font-size: 12px;
        line-height: 1.45;
      }


      .doodle-1 {
        top: 13px;
        left: calc(50% - 18px);
        font-size: 20px;
        z-index: 11;
      }

      .doodle-2 {
        top: 13px;
        left: calc(50% + 14px);
        font-size: 15px;
        opacity: 0.78;
        z-index: 11;
      }


      .subtitle {
        display: block;
        width: auto;
        max-width: min(340px, 100%);
        margin: 3px auto 0;
        padding: 0;
        color: var(--pink-dark);
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
        font-size: 16px;
        line-height: 1.4;
        font-weight: 900;
      }

      body.dark .subtitle {
        color: var(--pink);
        background: transparent;
        border: none;
        box-shadow: none;
      }

      /* ✅ MOBILE LOGIN: sau loading card nằm giữa, chỉ đẩy lên khi người dùng bấm nhập mã */
      .lock-screen {
        align-items: center;
        justify-content: center;
        overflow-y: auto;
        padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
        min-height: 100vh;
        min-height: 100dvh;
      }

      .lock-card {
        width: min(318px, 100%);
        margin: 0;
        padding: 18px 15px 16px;
        border-radius: 22px;
        transition: margin 0.24s ease, transform 0.24s ease;
      }

      .lock-screen.keyboard-mode {
        align-items: center;
      }

      .lock-screen.keyboard-mode .lock-card {
        margin-top: 0;
        margin-bottom: 0;
        transform: translateY(-18px);
      }

      .lock-head {
        padding-top: 12px;
        margin-bottom: 12px;
      }

      .lock-icon {
        font-size: 32px;
        margin-bottom: 6px;
      }

      .lock-card h2 {
        font-size: 21px;
        margin-bottom: 6px;
      }

      .lock-card p {
        font-size: 12.5px;
        line-height: 1.42;
      }

      .code-wrap {
        gap: 6px;
        margin: 12px 0 9px;
      }

      .code-input {
        width: 43px;
        height: 48px;
        border-radius: 13px;
        font-size: 22px;
      }

      .hint-wrap {
        margin: 2px 0 11px;
      }

      .hint-btn {
        width: 28px;
        height: 28px;
      }

      .unlock-btn {
        padding: 11px 16px;
      }

      .lock-error {
        margin-top: 8px;
        font-size: 12px;
      }

      /* ✅ MOBILE IMAGE POPUP: thu nhỏ để không tràn viền trên màn hình điện thoại */
      .modal {
        padding: 14px;
        align-items: center;
      }

      .modal-content {
        width: min(342px, calc(100vw - 28px));
        max-height: calc(100vh - 36px);
        max-height: calc(100dvh - 36px);
        border-radius: 19px;
      }

      .modal-photo-wrap {
        height: min(38vh, 292px);
        height: min(38dvh, 292px);
      }

      .modal-info {
        padding: 12px 14px 14px;
      }

      .modal-date {
        font-size: 11px;
        margin-bottom: 4px;
      }

      .modal-info h3 {
        font-size: 20px;
        line-height: 1.12;
        margin-bottom: 6px;
      }

      .modal-info p {
        font-size: 12.5px;
        line-height: 1.42;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
      }

      .modal-nav {
        width: 34px;
        height: 34px;
        font-size: 27px;
      }

      .modal-prev {
        left: 8px;
      }

      .modal-next {
        right: 8px;
      }

      .modal-counter {
        bottom: 8px;
        padding: 6px 10px;
        font-size: 11px;
      }

      .close-btn {
        top: 8px;
        right: 8px;
        width: 34px;
        height: 34px;
        font-size: 25px;
      }

    }

    @media (max-width: 360px) {
.hero {
        padding-top: 62px;
      }

      h1 {
        font-size: 21px;
      }

      .love-pill {
        font-size: 10.5px;
        padding-right: 8px;
      }

      .mode-btn {
        width: 35px;
        height: 35px;
      }

      .time-btn {
        min-width: 80px;
        font-size: 11.5px;
      }

      .event-title {
        font-size: 18px;
      }

      .event-text {
        -webkit-line-clamp: 2;
      }

      .code-input {
        width: 42px;
        height: 50px;
      }


      .top-left {
        max-width: calc(100% - 84px);
      }

      .love-pill {
        font-size: 10px;
        padding: 5px 7px 5px 6px;
      }

      .mode-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
      }

      .hero {
        padding-top: 56px;
        padding-bottom: 14px;
      }


      .calendar-card {
        width: min(300px, 100%);
      }

      .calendar-days {
        min-height: 198px;
      }

      .flower-card {
        width: min(295px, 100%);
      }


      .doodle-1 {
        top: 12px;
        left: calc(50% - 16px);
        font-size: 18px;
      }

      .doodle-2 {
        top: 12px;
        left: calc(50% + 11px);
        font-size: 14px;
      }

      .lock-card {
        width: min(296px, 100%);
        padding: 16px 13px 14px;
      }

      .lock-screen.keyboard-mode .lock-card {
        margin-top: 0;
        transform: translateY(-14px);
      }

      .lock-card h2 {
        font-size: 20px;
      }

      .code-input {
        width: 39px;
        height: 46px;
        font-size: 21px;
      }

      .modal {
        padding: 12px;
      }

      .modal-content {
        width: min(312px, calc(100vw - 24px));
        max-height: calc(100vh - 28px);
        max-height: calc(100dvh - 28px);
      }

      .modal-photo-wrap {
        height: min(35vh, 245px);
        height: min(35dvh, 245px);
      }

      .modal-info h3 {
        font-size: 18px;
      }

      .modal-info p {
        -webkit-line-clamp: 2;
      }

      /* Force match sizes for top row buttons on small screens */
      .love-pill {
        font-size: 11.5px !important;
        width: 108px !important;
        gap: 7px !important;
        padding: 5px 10px 5px 7px !important;
      }
      .top-actions .streak-btn {
        font-size: 11.5px !important;
      }
    }

    @media (hover: none) and (pointer: coarse) {
.time-btn:hover {
        transform: none !important;
      }
    }



    /* =========================================================
      ✅ PHOTO ONLY MODE
      - Grid chỉ còn ảnh, không caption / icon trang trí.
      - Popup ảnh chỉ hiện ảnh gốc trong khung style của web.
    ========================================================= */
    .photo-item::before,
    .photo-item::after,
    .photo-caption,
    .heart,
    .modal-counter,
    .modal-info {
      display: none !important;
    }

    .photo-item {
      cursor: zoom-in;
    }

    .modal-content {
      width: min(860px, calc(100vw - 36px));
      max-height: calc(100vh - 36px);
      max-height: calc(100dvh - 36px);
      padding: 10px;
      border-radius: 28px;
      background: var(--card-solid);
      overflow: hidden;
      border: 1px solid rgba(245, 198, 214, 0.72);
    }

    .modal-photo-wrap {
      height: min(82vh, 760px);
      height: min(82dvh, 760px);
      border-radius: 22px;
      background:
        linear-gradient(to right, rgba(var(--pink-rgb), 0.045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(var(--pink-rgb), 0.045) 1px, transparent 1px),
        #fff7fa;
      background-size: 24px 24px;
    }

    body.dark .modal-photo-wrap {
      background:
        linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        #211a23;
    }

    .modal-content img {
      object-fit: contain;
      border-radius: 18px;
      cursor: default;
      transition: transform 0.12s cubic-bezier(0.1, 0.8, 0.3, 1);
      will-change: transform;
      transform-origin: center center;
    }

    .modal-nav {
      background: rgba(255, 255, 255, 0.86);
    }

    @media (max-width: 600px) {
      .modal-content {
        width: min(360px, calc(100vw - 24px));
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        padding: 8px;
        border-radius: 22px;
      }

      .modal-photo-wrap {
        height: min(78vh, 620px);
        height: min(78dvh, 620px);
        border-radius: 18px;
      }
    }


    /* =========================================================
      ✅ PHOTO HEART EFFECT MODE
      Bấm ảnh chỉ hiện hiệu ứng thả tim ảo, không mở popup ảnh.
    ========================================================= */
    .photo-item {
      cursor: pointer !important;
      overflow: hidden;
    }

    .photo-item.love-tapped {
      animation: photoLoveTap 0.42s ease;
    }

    .photo-love-pop,
    .photo-love-mini,
    .photo-love-ripple {
      position: absolute;
      left: var(--love-x, 50%);
      top: var(--love-y, 50%);
      pointer-events: none;
      z-index: 8;
    }

    .photo-love-pop {
      color: #ffffff;
      font-size: 54px;
      line-height: 1;
      text-shadow:
        0 8px 26px rgba(141, 52, 77, 0.38),
        0 0 18px rgba(var(--pink-rgb), 0.55);
      transform: translate(-50%, -50%) scale(0.28) rotate(-8deg);
      animation: photoHeartPop 0.86s cubic-bezier(0.17, 0.9, 0.27, 1.28) forwards;
    }

    .photo-love-mini {
      color: rgba(255, 255, 255, 0.96);
      font-size: 18px;
      line-height: 1;
      text-shadow: 0 6px 16px rgba(141, 52, 77, 0.28);
      transform: translate(-50%, -50%) scale(0.6);
      animation: photoMiniHeart 0.78s ease forwards;
      animation-delay: var(--delay, 0s);
    }

    .photo-love-ripple {
      width: 84px;
      height: 84px;
      border-radius: 50%;
      border: 1.5px solid rgba(255, 255, 255, 0.86);
      box-shadow: 0 0 22px rgba(var(--pink-rgb), 0.24);
      transform: translate(-50%, -50%) scale(0.2);
      animation: photoLoveRipple 0.62s ease-out forwards;
    }

    body.dark .photo-love-pop,
    body.dark .photo-love-mini {
      text-shadow:
        0 8px 26px rgba(0, 0, 0, 0.45),
        0 0 18px rgba(255, 139, 176, 0.58);
    }

    @keyframes photoLoveTap {
      0%, 100% { transform: scale(1); }
      42% { transform: scale(0.985); }
      70% { transform: scale(1.025); }
    }

    @keyframes photoHeartPop {
      0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.28) rotate(-8deg);
        filter: blur(1px);
      }
      22% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.08) rotate(5deg);
        filter: blur(0);
      }
      62% {
        opacity: 1;
        transform: translate(-50%, -62%) scale(0.96) rotate(-2deg);
      }
      100% {
        opacity: 0;
        transform: translate(-50%, -92%) scale(0.72) rotate(8deg);
      }
    }

    @keyframes photoMiniHeart {
      0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.4);
      }
      22% {
        opacity: 0.95;
      }
      100% {
        opacity: 0;
        transform:
          translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -42px)))
          scale(0.9)
          rotate(var(--rotate, 0deg));
      }
    }

    @keyframes photoLoveRipple {
      0% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(0.2);
      }
      100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.18);
      }
    }



    /* =========================================================
      ✅ MUSIC PANEL FIX KHÔNG PHÁ LAYOUT
      - Giữ layout panel nhạc như bản ổn định trước đó.
      - Trên mobile: không để hover/focus bị kẹt sáng sau khi bấm.
      - Volume slider được ưu tiên nhận thao tác cảm ứng.
      - Icon loa đổi sang SVG màu hồng theo tone web.
    ========================================================= */
    .music-panel-controls,
    .music-volume-wrap,
    .music-volume-slider {
      overflow: visible;
    }

    .music-volume-wrap.show {
      z-index: 60;
    }

    .music-volume-wrap.show .music-volume-slider {
      z-index: 80;
      pointer-events: auto;
    }

    .music-volume-slider,
    .music-volume-slider input {
      touch-action: pan-x;
    }

    .music-volume-btn {
      color: var(--pink) !important;
    }

    .music-volume-btn svg {
      width: 14px;
      height: 14px;
      display: block;
      stroke: currentColor;
      fill: none;
      stroke-width: 2.2;
      stroke-linecap: round;
      stroke-linejoin: round;
      pointer-events: none;
    }

    body.dark .music-volume-btn {
      color: var(--pink-light) !important;
    }

    @media (hover: none) and (pointer: coarse) {
      .music-control-btn,
      .music-volume-btn {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
      }

      .music-control-btn:hover,
      .music-volume-btn:hover {
        transform: none;
        color: var(--pink-dark);
        background:
          radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.96), transparent 34%),
          rgba(var(--pink-rgb), 0.075);
        box-shadow:
          0 5px 12px rgba(var(--pink-rgb), 0.1),
          inset 0 1px 0 rgba(255, 255, 255, 0.78);
      }

      .music-volume-btn:hover {
        color: var(--pink) !important;
        background: transparent;
        box-shadow: none;
      }

      .music-play-btn:hover {
        color: #ffffff;
        background: linear-gradient(135deg, var(--pink-light), var(--pink));
        box-shadow:
          0 9px 18px rgba(var(--pink-rgb), 0.22),
          inset 0 1px 0 rgba(255, 255, 255, 0.38);
      }

      .music-control-btn:active {
        transform: translateY(-1px) scale(1.05);
        color: #ffffff;
        background: linear-gradient(135deg, var(--pink-light), var(--pink));
        box-shadow: 0 8px 16px rgba(var(--pink-rgb), 0.2);
      }

      .music-volume-btn:active {
        color: var(--pink) !important;
        background: rgba(255, 255, 255, 0.62);
        box-shadow: none;
      }

      body.dark .music-control-btn:hover,
      body.dark .music-volume-btn:hover {
        background: rgba(255, 255, 255, 0.08);
        color: #ffe8f0;
        border-color: rgba(255, 255, 255, 0.13);
        box-shadow: none;
      }

      body.dark .music-volume-btn:hover,
      body.dark .music-volume-btn:active {
        color: var(--pink-light) !important;
      }

      body.dark .music-play-btn:hover,
      body.dark .music-control-btn:active {
        color: #ffffff;
        background: linear-gradient(135deg, var(--pink-light), var(--pink));
      }
    }


    /* =========================================================
      ✅ MORNING PUSH AUTO AFTER UNLOCK
      Giữ logic bật thông báo nhưng ẩn nút chuông để giao diện giống bản cũ.
      iOS vẫn cần thao tác người dùng, nên quyền thông báo sẽ được hỏi sau khi nhập đúng mật khẩu.
    ========================================================= */
    #morningNotifyBtn {
      display: none !important;
    }


  

    /* =========================================================
      ✅ PHOTO GRID 15 Ô + NÚT THÊM - BẢN GIỮ KHOẢNG CÁCH CŨ
      - Dùng flex-wrap để 3 cột luôn có khoảng cách đều, không bị dính/đè nhau.
      - Mặc định mỗi tháng có 15 ô: 14 ô ảnh + ô thứ 15 là dấu +.
      - Bấm dấu + sẽ tạo thêm ô ảnh tiếp theo và dời dấu + xuống cuối.
      - Nếu nhiều ảnh quá khung thì cuộn trong vùng ảnh.
    ========================================================= */
    .photo-grid {
      display: flex !important;
      flex-wrap: wrap !important;
      align-content: flex-start !important;
      justify-content: flex-start !important;
      gap: 14px !important;
      overflow-y: auto !important;
      overflow-x: hidden !important;
      -webkit-overflow-scrolling: touch;
      padding: 14px 48px 34px !important;
      max-width: 860px !important;
      width: 100% !important;
      margin: 0 auto !important;
      scroll-behavior: smooth;
    }

    .photo-grid::-webkit-scrollbar {
      width: 7px;
    }

    .photo-grid::-webkit-scrollbar-thumb {
      background: var(--pink-light);
      border-radius: 999px;
    }

    .photo-grid::-webkit-scrollbar-track {
      background: transparent;
    }

    .event-card {
      overflow: hidden !important;
    }

    .photo-item {
      flex: 0 0 calc((100% - 28px) / 3) !important;
      max-width: calc((100% - 28px) / 3) !important;
      aspect-ratio: 1 / 1 !important;
    }

    .photo-add-item {
      display: grid !important;
      place-items: center !important;
      opacity: 0.48;
      filter: saturate(0.72);
      border: 1.8px dashed rgba(var(--pink-rgb), 0.24) !important;
      background:
        linear-gradient(to right, rgba(var(--pink-rgb), 0.055) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(var(--pink-rgb), 0.055) 1px, transparent 1px),
        rgba(255, 244, 248, 0.74) !important;
      background-size: 24px 24px, 24px 24px, auto;
      color: var(--pink-dark);
      font: inherit;
      padding: 0;
      cursor: pointer !important;
    }

    .photo-add-item:hover,
    .photo-add-item:focus-visible,
    .photo-add-item:active {
      opacity: 1;
      filter: saturate(1);
      transform: translateY(-3px) scale(1.018);
      border-color: rgba(var(--pink-rgb), 0.56) !important;
      box-shadow: 0 16px 30px rgba(180, 92, 123, 0.14);
    }

    @media (hover: none) and (pointer: coarse) {
      .photo-add-item:active {
        opacity: 0.9;
      }
    }

    .photo-add-item.is-locked {
      opacity: 0.3 !important;
      filter: saturate(0.2) grayscale(0.5) !important;
      cursor: not-allowed !important;
      border-color: rgba(120, 120, 120, 0.3) !important;
    }
    .photo-add-item.is-locked:hover,
    .photo-add-item.is-locked:focus-visible,
    .photo-add-item.is-locked:active {
      transform: none !important;
      box-shadow: none !important;
      opacity: 0.3 !important;
      border-color: rgba(120, 120, 120, 0.3) !important;
    }

    .photo-add-content {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-weight: 900;
      pointer-events: none;
    }

    .photo-add-plus {
      width: 54px;
      height: 54px;
      display: grid;
      place-items: center;
      border-radius: 50%;
      color: #ffffff;
      background: linear-gradient(135deg, var(--pink-light), var(--pink));
      font-size: 38px;
      line-height: 1;
      box-shadow: 0 14px 28px rgba(var(--pink-rgb), 0.22);
    }

    .photo-add-text {
      color: var(--pink-dark);
      font-size: 14px;
      line-height: 1.2;
    }

    .photo-empty-remove-btn {
      position: absolute;
      top: 8px;
      right: 8px;
      z-index: 14;
      width: 28px;
      height: 28px;
      display: none;
      place-items: center;
      border: none;
      border-radius: 50%;
      color: #ffffff;
      background: linear-gradient(135deg, var(--pink-light), var(--pink));
      box-shadow: 0 8px 18px rgba(141, 52, 77, 0.18);
      font-size: 22px;
      line-height: 1;
      font-weight: 900;
      cursor: pointer;
      transition: transform 0.18s ease, box-shadow 0.18s ease;
      -webkit-tap-highlight-color: transparent;
    }

    .photo-empty-remove-btn:hover {
      transform: translateY(-1px) scale(1.08);
      box-shadow: 0 12px 24px rgba(141, 52, 77, 0.24);
    }

    .photo-empty-remove-btn:focus-visible {
      outline: 3px solid rgba(var(--pink-rgb), 0.22);
      outline-offset: 2px;
    }

    .photo-item.image-error .photo-empty-remove-btn {
      display: grid;
    }

    .photo-item.is-uploading .photo-empty-remove-btn,
    .photo-item.is-deleting .photo-empty-remove-btn {
      display: none;
    }

    body.dark .photo-empty-remove-btn {
      color: #ffffff;
      background: linear-gradient(135deg, var(--pink-light), var(--pink));
      box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
    }

    @media (max-width: 600px) {
      .photo-empty-remove-btn {
        top: 6px;
        right: 6px;
        width: 24px;
        height: 24px;
        font-size: 19px;
      }
    }

    .photo-item.image-error {
      cursor: pointer !important;
    }

    .photo-item.image-error .image-fallback {
      display: grid !important;
      transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .photo-item.image-error:hover .image-fallback {
      opacity: 0.82;
      transform: scale(0.98);
    }

    .photo-item.is-uploading {
      pointer-events: none;
      opacity: 0.88;
    }

    .photo-item.is-uploading::after {
      content: "Đang tải " attr(data-progress) "%";
      position: absolute;
      inset: 0;
      z-index: 9;
      display: grid;
      place-items: center;
      color: #ffffff;
      background: rgba(0, 0, 0, 0.5);
      font-size: 13.5px;
      font-weight: 900;
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
    }

    body.dark .photo-item.is-uploading::after {
      background: rgba(0, 0, 0, 0.6);
    }

    /* SKELETON LOADER FOR LAZY LOADING PHOTOS */
    .photo-item.skeleton-pulse {
      background: linear-gradient(90deg, var(--bg-soft) 25%, rgba(var(--pink-rgb), 0.08) 50%, var(--bg-soft) 75%);
      background-size: 200% 100%;
      animation: skeletonPulse 1.6s infinite linear;
    }
    
    body.dark .photo-item.skeleton-pulse {
      background: linear-gradient(90deg, var(--bg-soft) 25%, rgba(255, 255, 255, 0.04) 50%, var(--bg-soft) 75%);
      background-size: 200% 100%;
    }

    @keyframes skeletonPulse {
      0% {
        background-position: 200% 0;
      }
      100% {
        background-position: -200% 0;
      }
    }
    .photo-item.is-deleting {
      pointer-events: none;
      overflow: hidden;
      animation: photoDeleteFadeOut 280ms cubic-bezier(.4, 0, .2, 1) forwards !important;
    }

    .photo-item.is-deleting::after {
      display: none !important;
      content: none !important;
    }

    @keyframes photoDeleteFadeOut {
      0% {
        opacity: 1;
        transform: scale(1);
        max-width: 100%;
      }
      65% {
        opacity: 0;
        transform: scale(0.92);
      }
      100% {
        opacity: 0;
        transform: scale(0.88);
      }
    }

    .photo-item.is-newly-added {
      animation: photoUploadFadeIn 420ms cubic-bezier(.2, .8, .2, 1) both !important;
      transform-origin: center;
    }

    @keyframes photoUploadFadeIn {
      0% {
        opacity: 0;
        transform: scale(0.9) translateY(8px);
      }
      65% {
        opacity: 1;
        transform: scale(1.025) translateY(0);
      }
      100% {
        opacity: 1;
        transform: scale(1) translateY(0);
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .photo-item.is-deleting {
        animation-duration: 80ms !important;
      }

      .photo-item.is-newly-added {
        animation-duration: 100ms !important;
      }
    }

    .photo-item.has-photo {
      cursor: pointer !important;
    }

    .photo-item.has-photo::after {
      content: "⋯";
      position: absolute;
      top: 8px;
      right: 8px;
      z-index: 8;
      width: 28px;
      height: 28px;
      display: grid;
      place-items: center;
      color: var(--pink-dark);
      background: rgba(255, 255, 255, 0.9);
      border: 1px solid rgba(var(--pink-rgb), 0.16);
      border-radius: 999px;
      font-size: 18px;
      line-height: 1;
      font-weight: 900;
      box-shadow: 0 8px 18px rgba(141, 52, 77, 0.12);
      opacity: 0;
      transform: translateY(-2px) scale(0.92);
      transition: 0.2s ease;
      pointer-events: none;
    }

    .photo-item.has-photo:hover::after {
      opacity: 1;
      transform: translateY(0) scale(1);
    }

    @media (hover: none) and (pointer: coarse) {
      .photo-item.has-photo::after {
        opacity: 0.92;
        transform: none;
      }
    }

    body.dark .photo-add-item {
      background: rgba(255, 255, 255, 0.08) !important;
      border-color: rgba(255, 139, 176, 0.36) !important;
    }

    body.dark .photo-add-text {
      color: #ffe8f0;
    }

    @media (max-width: 900px) {
      .photo-grid {
        gap: 12px !important;
        padding: 10px 18px 26px !important;
        max-width: none !important;
      }

      .photo-item {
        flex-basis: calc((100% - 24px) / 3) !important;
        max-width: calc((100% - 24px) / 3) !important;
      }
    }

    @media (max-width: 600px) {
      .photo-grid {
        gap: 7px !important;
        padding: 8px 8px 22px !important;
      }

      .photo-item {
        flex-basis: calc((100% - 14px) / 3) !important;
        max-width: calc((100% - 14px) / 3) !important;
        border-radius: 12px !important;
      }

      .photo-add-plus {
        width: 40px;
        height: 40px;
        font-size: 30px;
      }

      .photo-add-text {
        display: none;
      }
    }


    /* =========================================================
      ✅ PHOTO MANAGE LONG PRESS MENU
      - Bấm ô trống: up ảnh.
      - Giữ ảnh: mở menu Thay ảnh / Xoá ảnh.
      - Bấm ảnh thường: vẫn hiện hiệu ứng thả tim.
    ========================================================= */
    .photo-item {
      -webkit-touch-callout: none;
      user-select: none;
    }

    .photo-item.is-long-pressing {
      transform: translateY(-2px) scale(0.985) !important;
      box-shadow: 0 18px 34px rgba(180, 92, 123, 0.2) !important;
    }

    .photo-manage-backdrop {
      position: fixed;
      inset: 0;
      z-index: 2600;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 18px;
      background: rgba(61, 43, 43, 0.38);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      animation: photoManageFadeIn 0.18s ease both;
    }

    .photo-manage-card {
      width: min(360px, 100%);
      position: relative;
      overflow: hidden;
      padding: 24px 18px 18px;
      border-radius: 28px;
      text-align: center;
      color: var(--text-main);
      background: rgba(255, 255, 255, 0.96);
      border: 1.5px solid rgba(245, 198, 214, 0.72);
      box-shadow: 0 24px 80px rgba(61, 43, 43, 0.24);
      animation: photoManagePop 0.2s ease both;
    }

    .photo-manage-card::before {
      content: "";
      position: absolute;
      width: 58px;
      height: 14px;
      top: 14px;
      left: 20px;
      background: rgba(255, 229, 162, 0.66);
      border-radius: 6px;
      transform: rotate(-8deg);
    }

    body.dark .photo-manage-card {
      background: var(--card-solid);
      border-color: rgba(255, 255, 255, 0.14);
    }

    .photo-manage-icon {
      width: 66px;
      height: 66px;
      display: grid;
      place-items: center;
      margin: 8px auto 12px;
      border-radius: 50%;
      color: var(--pink);
      background:
        radial-gradient(circle at 30% 25%, #ffffff, transparent 34%),
        linear-gradient(135deg, #ffe1ec, #ffffff);
      border: 1px solid rgba(var(--pink-rgb), 0.16);
      box-shadow: 0 14px 28px rgba(var(--pink-rgb), 0.16);
      font-size: 30px;
    }

    .photo-manage-title {
      color: var(--pink-dark);
      font-size: 23px;
      line-height: 1.15;
      font-weight: 900;
      margin-bottom: 7px;
    }

    .photo-manage-text {
      max-width: 285px;
      margin: 0 auto 16px;
      color: var(--text-soft);
      font-size: 13px;
      line-height: 1.45;
      font-weight: 800;
    }

    .photo-manage-actions {
      display: grid;
      gap: 9px;
    }

    .photo-manage-btn {
      width: 100%;
      min-height: 44px;
      border: none;
      border-radius: 999px;
      padding: 11px 14px;
      font-size: 13.5px;
      font-weight: 900;
      cursor: pointer;
      transition: 0.2s ease;
    }

    .photo-manage-btn:hover:not(:disabled) {
      transform: translateY(-2px);
    }

    .photo-manage-replace {
      color: #ffffff;
      background: linear-gradient(135deg, var(--pink-light), var(--pink));
      box-shadow: 0 12px 24px rgba(var(--pink-rgb), 0.18);
    }

    .photo-manage-delete {
      color: #c83d63;
      background: rgba(var(--pink-rgb), 0.085);
      border: 1px solid rgba(var(--pink-rgb), 0.16);
    }

    .photo-manage-delete:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    .photo-manage-cancel {
      color: var(--pink-dark);
      background: rgba(255, 255, 255, 0.92);
      border: 1px solid rgba(var(--pink-rgb), 0.14);
    }

    body.dark .photo-manage-cancel,
    body.dark .photo-manage-delete {
      background: #ffffff;
      color: var(--pink);
      border-color: rgba(255, 255, 255, 0.62);
    }

    @keyframes photoManageFadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    @keyframes photoManagePop {
      from { opacity: 0; transform: scale(0.96) translateY(12px); }
      to { opacity: 1; transform: scale(1) translateY(0); }
    }

    @media (max-width: 600px) {
      .photo-manage-backdrop {
        align-items: center;
        justify-content: center;
        padding: 16px;
      }

      .photo-manage-card {
        width: min(340px, 100%);
        border-radius: 24px;
        padding: 22px 15px 15px;
        margin: auto;
      }
    }


    /* ✅ PHOTO FULL VIEW MODE
      - Bấm vào ảnh để xem lớn.
      - Bấm nền tối hoặc vùng trống quanh ảnh để đóng.
      - Giữ ảnh để mở menu thay / xoá như cũ.
    */
    .modal.active {
      cursor: zoom-out;
    }

    .modal-content,
    .modal-content * {
      cursor: auto;
    }

    .modal-photo-wrap {
      cursor: zoom-out;
    }

    .modal-photo-wrap img,
    .modal-nav,
    .close-btn {
      cursor: pointer;
    }


    /* ✅ FULL VIEW FIX
      - Ảnh mở lớn sẽ giữ đúng tỉ lệ gốc, không bị ép thành ô vuông.
      - Mobile thu nhỏ lại một chút để không tràn màn hình.
    */
    .modal {
      padding: 28px !important;
    }

    .modal-content {
      width: auto !important;
      max-width: calc(100vw - 56px) !important;
      max-height: calc(100dvh - 56px) !important;
      padding: 10px !important;
      display: block !important;
      overflow: visible !important;
      background: var(--card-solid);
    }

    .modal-photo-wrap {
      width: auto !important;
      height: auto !important;
      max-width: calc(100vw - 76px) !important;
      max-height: calc(100dvh - 86px) !important;
      display: flex !important;
      align-items: center;
      justify-content: center;
      overflow: visible !important;
      border-radius: 22px;
    }

    .modal-content img {
      width: auto !important;
      height: auto !important;
      max-width: min(1080px, calc(100vw - 76px)) !important;
      max-height: calc(100dvh - 96px) !important;
      object-fit: contain !important;
      display: block;
      border-radius: 18px;
      transform: none !important;
    }

    @media (max-width: 600px) {
      .modal {
        padding: 18px !important;
      }

      .modal-content {
        max-width: calc(100vw - 44px) !important;
        max-height: 74dvh !important;
        padding: 7px !important;
        border-radius: 20px !important;
      }

      .modal-photo-wrap {
        max-width: calc(100vw - 58px) !important;
        max-height: 68dvh !important;
        border-radius: 16px !important;
      }

      .modal-content img {
        max-width: calc(100vw - 58px) !important;
        max-height: 68dvh !important;
        border-radius: 14px !important;
      }

      .modal-nav {
        width: 32px !important;
        height: 32px !important;
        font-size: 25px !important;
      }
    }


    /* ✅ PHOTO CROP BEFORE UPLOAD
      - Mỗi lần up/thay ảnh sẽ mở khung crop vuông.
      - Kéo ảnh để canh, kéo thanh zoom để chỉnh vừa ô vuông.
    */
    .photo-crop-backdrop {
      position: fixed;
      inset: 0;
      z-index: 2700;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 18px;
      background: rgba(61, 43, 43, 0.42);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      animation: photoManageFadeIn 0.18s ease both;
    }

    .photo-crop-card {
      width: min(520px, 100%);
      max-height: calc(100vh - 36px);
      max-height: calc(100dvh - 36px);
      overflow-y: auto;
      position: relative;
      padding: 24px 18px 18px;
      border-radius: 30px;
      text-align: center;
      background: rgba(255, 255, 255, 0.96);
      border: 1.5px solid rgba(245, 198, 214, 0.72);
      box-shadow: 0 24px 80px rgba(61, 43, 43, 0.24);
      animation: photoManagePop 0.2s ease both;
    }

    .photo-crop-card::before {
      content: "";
      position: absolute;
      width: 58px;
      height: 14px;
      top: 14px;
      left: 20px;
      background: rgba(255, 229, 162, 0.66);
      border-radius: 6px;
      transform: rotate(-8deg);
    }

    body.dark .photo-crop-card {
      background: var(--card-solid);
      border-color: rgba(255, 255, 255, 0.14);
    }

    .photo-crop-title {
      color: var(--pink-dark);
      font-size: 23px;
      line-height: 1.15;
      font-weight: 900;
      margin: 6px 42px 7px;
    }

    .photo-crop-help {
      max-width: 390px;
      margin: 0 auto 14px;
      color: var(--text-soft);
      font-size: 13px;
      line-height: 1.45;
      font-weight: 800;
    }

    .photo-crop-stage {
      width: fit-content;
      max-width: 100%;
      margin: 0 auto 14px;
      position: relative;
      border-radius: 22px;
      overflow: hidden;
      background:
        linear-gradient(to right, rgba(var(--pink-rgb), 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(var(--pink-rgb), 0.08) 1px, transparent 1px),
        #fff4f8;
      background-size: 22px 22px;
      border: 1px solid rgba(var(--pink-rgb), 0.16);
      box-shadow: 0 16px 34px rgba(var(--pink-rgb), 0.15);
      touch-action: none;
    }

    .photo-crop-canvas {
      display: block;
      max-width: 100%;
      cursor: grab;
      touch-action: none;
      user-select: none;
    }

    .photo-crop-canvas:active {
      cursor: grabbing;
    }

    .photo-crop-frame {
      position: absolute;
      inset: 0;
      pointer-events: none;
      box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.92);
    }

    .photo-crop-frame::before,
    .photo-crop-frame::after {
      content: "";
      position: absolute;
      inset: 33.333% 0 auto 0;
      height: 1px;
      background: rgba(255, 255, 255, 0.72);
      box-shadow: 0 calc(var(--crop-size, 360px) / 3) 0 rgba(255, 255, 255, 0.72);
    }

    .photo-crop-frame::after {
      inset: 0 auto 0 33.333%;
      width: 1px;
      height: auto;
      box-shadow: calc(var(--crop-size, 360px) / 3) 0 0 rgba(255, 255, 255, 0.72);
    }

    .photo-crop-controls {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      max-width: 360px;
      margin: 0 auto 15px;
      color: var(--pink-dark);
      font-size: 13px;
      font-weight: 900;
    }

    .photo-crop-zoom {
      width: min(240px, 100%);
      accent-color: var(--pink);
      cursor: pointer;
    }

    .photo-crop-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 9px;
    }

    .photo-crop-btn {
      min-height: 44px;
      border: none;
      border-radius: 999px;
      padding: 11px 14px;
      font-size: 13.5px;
      font-weight: 900;
      cursor: pointer;
      transition: 0.2s ease;
    }

    .photo-crop-btn:hover:not(:disabled) {
      transform: translateY(-2px);
    }

    .photo-crop-confirm {
      color: #ffffff;
      background: linear-gradient(135deg, var(--pink-light), var(--pink));
      box-shadow: 0 12px 24px rgba(var(--pink-rgb), 0.18);
    }

    .photo-crop-cancel {
      color: var(--pink-dark);
      background: rgba(255, 255, 255, 0.92);
      border: 1px solid rgba(var(--pink-rgb), 0.14);
    }

    body.dark .photo-crop-cancel {
      background: #ffffff;
      color: var(--pink);
      border-color: rgba(255, 255, 255, 0.62);
    }

    @media (max-width: 600px) {
      .photo-crop-backdrop {
        align-items: center;
        padding: 10px;
      }

      .photo-crop-card {
        width: 100%;
        border-radius: 24px;
        padding: 21px 14px 14px;
      }

      .photo-crop-title {
        font-size: 20px;
        margin-inline: 36px;
      }

      .photo-crop-help {
        font-size: 12.4px;
      }

      .photo-crop-stage {
        border-radius: 18px;
      }

      .photo-crop-actions {
        grid-template-columns: 1fr;
      }
    }


  

    /* ✅ FULL VIEW FIX V2
      - Khung xem ảnh luôn cố định dạng chữ nhật để bấm qua lại không bị nhảy size.
      - Ảnh bên trong giữ đúng tỉ lệ gốc bằng object-fit: contain.
      - Nút trái/phải chỉ đi qua những ô đã có ảnh, không đi qua ô "Chưa có ảnh".
    */
    .modal {
      padding: 24px !important;
      align-items: center !important;
      justify-content: center !important;
    }

    .modal-content {
      width: min(620px, calc(100vw - 72px)) !important;
      height: min(420px, calc(100dvh - 96px)) !important;
      max-width: none !important;
      max-height: none !important;
      padding: 10px !important;
      border-radius: 26px !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      overflow: hidden !important;
      background: var(--card-solid) !important;
    }

    .modal-photo-wrap {
      width: 100% !important;
      height: 100% !important;
      max-width: none !important;
      max-height: none !important;
      border-radius: 20px !important;
      overflow: hidden !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      position: relative !important;
      background:
        linear-gradient(to right, rgba(var(--pink-rgb), 0.045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(var(--pink-rgb), 0.045) 1px, transparent 1px),
        #fff7fa !important;
      background-size: 24px 24px !important;
    }

    body.dark .modal-photo-wrap {
      background:
        linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        #211a23 !important;
      background-size: 24px 24px !important;
    }

    .modal-content img {
      width: 100% !important;
      height: 100% !important;
      max-width: none !important;
      max-height: none !important;
      object-fit: contain !important;
      display: block !important;
      border-radius: 16px !important;
      transform: none !important;
      background: transparent !important;
    }

    .modal-nav {
      top: 50% !important;
      transform: translateY(-50%) !important;
      width: 38px !important;
      height: 38px !important;
      font-size: 30px !important;
      z-index: 8 !important;
    }

    .modal-nav:hover {
      transform: translateY(-50%) scale(1.06) !important;
    }

    .modal-prev {
      left: 12px !important;
    }

    .modal-next {
      right: 12px !important;
    }

    .close-btn {
      top: 10px !important;
      right: 10px !important;
      width: 36px !important;
      height: 36px !important;
      font-size: 26px !important;
      z-index: 9 !important;
    }

    @media (max-width: 600px) {
      .modal {
        padding: 18px !important;
      }

      .modal-content {
        width: min(300px, calc(100vw - 56px)) !important;
        height: min(380px, 62dvh) !important;
        padding: 8px !important;
        border-radius: 22px !important;
      }

      .modal-photo-wrap {
        border-radius: 17px !important;
      }

      .modal-content img {
        border-radius: 13px !important;
      }

      .modal-nav {
        width: 30px !important;
        height: 30px !important;
        font-size: 24px !important;
      }

      .modal-prev {
        left: 8px !important;
      }

      .modal-next {
        right: 8px !important;
      }

      .close-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 23px !important;
      }
    }

    @media (max-width: 360px) {
      .modal-content {
        width: min(286px, calc(100vw - 44px)) !important;
        height: min(352px, 60dvh) !important;
      }
    }


    /* ✅ FULL VIEW NO FRAME V3
      - Không dùng khung/card chữ nhật nữa.
      - Bấm ảnh: ảnh nổi lớn lên đúng tỉ lệ gốc.
      - Bấm nền/không gian ngoài ảnh để đóng.
      - Ẩn nút X, giữ mũi tên nếu đang xem nhiều ảnh đã upload.
    */
    .modal {
      padding: 32px !important;
      align-items: center !important;
      justify-content: center !important;
      background: rgba(61, 43, 43, 0.48) !important;
      backdrop-filter: blur(14px) !important;
      -webkit-backdrop-filter: blur(14px) !important;
      cursor: zoom-out !important;
    }

    .modal-content {
      width: auto !important;
      height: auto !important;
      max-width: none !important;
      max-height: none !important;
      padding: 0 !important;
      margin: 0 !important;
      border: none !important;
      border-radius: 0 !important;
      background: transparent !important;
      box-shadow: none !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      overflow: visible !important;
    }

    .modal-photo-wrap {
      width: auto !important;
      height: auto !important;
      max-width: none !important;
      max-height: none !important;
      padding: 0 !important;
      border: none !important;
      border-radius: 0 !important;
      background: transparent !important;
      box-shadow: none !important;
      overflow: visible !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      position: relative !important;
      cursor: zoom-out !important;
    }

    body.dark .modal-photo-wrap {
      background: transparent !important;
    }

    .modal-content img {
      width: auto !important;
      height: auto !important;
      max-width: min(820px, calc(100vw - 96px)) !important;
      max-height: min(76dvh, 720px) !important;
      object-fit: contain !important;
      display: block !important;
      border-radius: 18px !important;
      background: transparent !important;
      box-shadow: 0 28px 90px rgba(61, 43, 43, 0.36) !important;
      transform: none !important;
      cursor: default !important;
    }

    .close-btn {
      display: none !important;
    }

    .modal-nav {
      width: 40px !important;
      height: 40px !important;
      font-size: 31px !important;
      z-index: 12 !important;
      background: rgba(255, 255, 255, 0.9) !important;
      color: #8d344d !important;
      box-shadow: 0 12px 30px rgba(61, 43, 43, 0.22) !important;
      cursor: pointer !important;
    }

    .modal-prev {
      left: -58px !important;
    }

    .modal-next {
      right: -58px !important;
    }

    @media (max-width: 600px) {
      .modal {
        padding: 24px !important;
      }

      .modal-content img {
        max-width: calc(100vw - 56px) !important;
        max-height: 66dvh !important;
        border-radius: 14px !important;
        box-shadow: 0 22px 64px rgba(61, 43, 43, 0.32) !important;
      }

      .modal-nav {
        width: 32px !important;
        height: 32px !important;
        font-size: 25px !important;
      }

      .modal-prev {
        left: -18px !important;
      }

      .modal-next {
        right: -18px !important;
      }
    }

    @media (max-width: 360px) {
      .modal-content img {
        max-width: calc(100vw - 44px) !important;
        max-height: 62dvh !important;
      }
    }



    /* =========================================================
      ✅ LIVE REFRESH + PULL TO RELOAD APP
      - Chuyển tháng sẽ tự tải lại ảnh Cloudflare mới nhất.
      - Kéo cả trang xuống từ đầu app để tải lại web app giống Facebook.
    ========================================================= */
    .pull-refresh-indicator {
      position: fixed;
      top: env(safe-area-inset-top, 0px);
      margin-top: -50px;
      left: 50%;
      z-index: 3200;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-width: 148px;
      min-height: 38px;
      padding: 9px 14px;
      border-radius: 999px;
      color: var(--pink-dark);
      background: rgba(255, 255, 255, 0.94);
      border: 1px solid rgba(var(--pink-rgb), 0.18);
      box-shadow: 0 14px 34px rgba(141, 52, 77, 0.16);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      font-size: 13px;
      line-height: 1;
      font-weight: 900;
      opacity: 0;
      pointer-events: none;
      transform: translateX(-50%) translateY(0) scale(0.85);
      transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1), transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
      will-change: transform, opacity;
    }

    body.is-page-pulling .pull-refresh-indicator {
      opacity: 1;
      transform: translateX(-50%) translateY(var(--app-pull-distance, 0px)) scale(1);
      transition: opacity 0.12s ease, transform 0s !important;
    }

    .pull-refresh-indicator.ready {
      box-shadow: 0 14px 38px rgba(var(--pink-rgb), 0.3);
      border-color: rgba(var(--pink-rgb), 0.4);
    }

    .pull-refresh-indicator.loading {
      opacity: 1;
      transform: translateX(-50%) translateY(72px) scale(1) !important;
      transition: transform 0.32s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s ease !important;
    }

    body.app-pull-reset .pull-refresh-indicator {
      opacity: 0;
      transform: translateX(-50%) translateY(0) scale(0.85);
      transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1), transform 0.28s cubic-bezier(0.22, 1, 0.36, 1) !important;
    }

    .pull-refresh-indicator.show {
      opacity: 1;
      transform: translateX(-50%) translateY(68px) scale(1);
    }

    .pull-refresh-indicator .pull-refresh-arrow {
      display: inline-block;
      color: var(--pink);
      font-size: 17px;
      line-height: 1;
      transition: transform 0.18s ease;
    }

    .pull-refresh-indicator.ready .pull-refresh-arrow {
      transform: rotate(180deg);
    }

    .pull-refresh-indicator.loading .pull-refresh-arrow {
      animation: pullRefreshSpin 0.78s linear infinite;
    }

    body.dark .pull-refresh-indicator {
      background: rgba(255, 255, 255, 0.96);
      color: var(--pink);
      border-color: rgba(255, 255, 255, 0.55);
      box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
    }

    @keyframes pullRefreshSpin {
      to { transform: rotate(360deg); }
    }

    .anniversary,
    .outside-times {
      will-change: transform;
      transform: translate3d(0, 0, 0);
      backface-visibility: hidden;
      -webkit-backface-visibility: hidden;
    }

    body.is-page-pulling .anniversary,
    body.is-page-pulling .outside-times {
      transform: translate3d(0, var(--app-pull-distance, 0px), 0);
      transition: none !important;
    }

    body.app-pull-reset .anniversary,
    body.app-pull-reset .outside-times {
      transform: translate3d(0, 0, 0);
      transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1) !important;
    }


    .permission-mini-popup {
      position: fixed;
      z-index: 5000;
      max-width: min(250px, calc(100vw - 24px));
      padding: 9px 13px;
      border-radius: 14px;
      color: #ffffff;
      background: rgba(104, 55, 73, 0.96);
      border: 1px solid rgba(255, 255, 255, 0.22);
      box-shadow: 0 14px 34px rgba(61, 43, 43, 0.28);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      font-size: 12.5px;
      line-height: 1.3;
      font-weight: 900;
      text-align: center;
      pointer-events: none;
      opacity: 0;
      transform: translate(-50%, calc(-100% - 10px)) scale(0.9);
      transform-origin: 50% 100%;
      transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.2, 1.25, 0.35, 1);
    }

    .permission-mini-popup::after {
      content: "";
      position: absolute;
      left: 50%;
      bottom: -6px;
      width: 11px;
      height: 11px;
      background: rgba(104, 55, 73, 0.96);
      border-right: 1px solid rgba(255, 255, 255, 0.18);
      border-bottom: 1px solid rgba(255, 255, 255, 0.18);
      transform: translateX(-50%) rotate(45deg);
    }

    .permission-mini-popup.show {
      opacity: 1;
      transform: translate(-50%, calc(-100% - 10px)) scale(1);
    }

    .permission-mini-popup.below {
      transform: translate(-50%, 10px) scale(0.9);
      transform-origin: 50% 0%;
    }

    .permission-mini-popup.below.show {
      transform: translate(-50%, 10px) scale(1);
    }

    .permission-mini-popup.below::after {
      top: -6px;
      bottom: auto;
      border: none;
      border-left: 1px solid rgba(255, 255, 255, 0.18);
      border-top: 1px solid rgba(255, 255, 255, 0.18);
    }

    @media (max-width: 600px) {
      .permission-mini-popup {
        max-width: min(220px, calc(100vw - 20px));
        padding: 8px 11px;
        border-radius: 13px;
        font-size: 12px;
      }
    }

    body.viewer-mode .photo-add-item,
    body.viewer-mode .photo-empty-remove-btn,
    body.viewer-mode .photo-item.has-photo::after,
    .viewer-locked-control:not(.love-request-fab) {
      opacity: 0.75 !important;
      filter: grayscale(0.1) saturate(0.8) !important;
      cursor: not-allowed !important;
    }

    /* Nút Gửi yêu cầu vẫn hiển thị rõ để đồng bộ giao diện,
       nhưng quyền truy cập bên trong vẫn bị chặn với viewer. */
    body.viewer-mode .love-request-fab,
    body.viewer-mode .love-request-fab.viewer-locked-control {
      opacity: 1 !important;
      filter: none !important;
      cursor: pointer !important;
      background: linear-gradient(135deg, var(--pink), var(--pink-dark)) !important;
      color: #ffffff !important;
      box-shadow: 0 14px 30px rgba(var(--pink-rgb), 0.3) !important;
    }

    body.viewer-mode .love-request-fab .ui-svg-icon,
    body.viewer-mode .love-request-fab.viewer-locked-control .ui-svg-icon {
      color: #ffffff !important;
    }

    body.viewer-mode .photo-item.has-photo::after {
      opacity: 0.5 !important;
      transform: none !important;
    }

    .viewer-locked-popup .love-request-option,
    .viewer-locked-popup .love-request-note,
    .viewer-locked-popup .love-request-send {
      opacity: 0.42 !important;
      filter: grayscale(0.18) saturate(0.58) !important;
      cursor: not-allowed !important;
    }

    .viewer-locked-popup .love-request-option:hover,
    .viewer-locked-popup .love-request-send:hover {
      transform: none !important;
      box-shadow: none !important;
    }

    /* ✅ MOBILE FLOATING ACTIONS GỌN HƠN
      - Mobile chỉ hiện icon cho Photobooth và Gửi yêu cầu.
      - Nút tròn, được nâng lên để không dính mép dưới/safe area.
    */
    @media (max-width: 600px) {
      .love-request-fab,
      .photobooth-fab {
        right: 14px !important;
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        min-height: 46px !important;
        padding: 0 !important;
        gap: 0 !important;
        border-radius: 50% !important;
        font-size: 20px !important;
      }

      .love-request-fab {
        bottom: calc(26px + env(safe-area-inset-bottom)) !important;
      }

      .photobooth-fab {
        bottom: calc(82px + env(safe-area-inset-bottom)) !important;
      }

      .love-request-fab span:nth-child(2),
      .photobooth-fab span:nth-child(2) {
        display: none !important;
      }

      .love-request-fab span:first-child,
      .photobooth-fab span:first-child {
        display: grid;
        place-items: center;
        width: 100%;
        height: 100%;
        line-height: 1;
      }
    }

  
    /* Không hiển thị ô ảnh trống hoặc ảnh không tồn tại. */
    .photo-item.image-error {
      display: none !important;
    }

    /* Đồng bộ nền không dùng hiệu ứng loading/nhấp nháy. */
    .photo-grid.syncing,
    .photo-grid.syncing .photo-item,
    .photo-grid.syncing img {
      animation: none !important;
      transition: none !important;
    }

    /* =========================================================
      PHOTOBOOTH LAYOUT PICKER + THEME CAROUSEL
    ========================================================= */
    .photobooth-layout-step,
    .photobooth-camera-step {
      width: 100%;
    }

    .photobooth-layout-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
      margin-top: 16px;
    }

    .photobooth-layout-option {
      min-height: 205px;
      border: 1.5px solid rgba(240, 190, 209, 0.45);
      border-radius: 20px;
      padding: 14px 10px 10px 10px;
      color: var(--text-main);
      background: #fffdf9;
      box-shadow: 0 10px 24px var(--shadow);
      cursor: pointer;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 12px;
      font: inherit;
      transition: all 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    
    body.dark .photobooth-layout-option {
      background: #2b222d;
      border-color: rgba(255, 255, 255, 0.08);
      color: var(--text-main);
    }

    .photobooth-layout-option:hover {
      transform: translateY(-5px) scale(1.04) rotate(-1.2deg);
      border-color: var(--pink);
      box-shadow: 0 16px 36px var(--shadow);
    }
    
    .photobooth-layout-option:nth-child(2n):hover {
      transform: translateY(-5px) scale(1.04) rotate(1.2deg);
    }

    .photobooth-layout-option:active {
      transform: translateY(-1px) scale(0.98);
    }

    .photobooth-layout-option strong {
      font-size: 12px;
      line-height: 1.25;
      font-weight: 900;
    }

    .photobooth-layout-preview {
      width: 104px;
      height: 136px;
      padding: 8px;
      border-radius: 16px;
      display: grid;
      gap: 5px;
      background:
        linear-gradient(to right, rgba(var(--pink-rgb), 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(var(--pink-rgb), 0.08) 1px, transparent 1px),
        #fff3f8;
      background-size: 14px 14px;
      border: 1px solid rgba(var(--pink-rgb), 0.14);
      box-shadow: inset 0 1px 0 #fff;
    }

    .photobooth-layout-preview i {
      display: block;
      border-radius: 7px;
      background: linear-gradient(135deg, #ffc1d4, var(--pink));
      box-shadow: inset 0 0 0 2px rgba(255,255,255,.55);
    }

    .layout-vertical2 {
      grid-template-columns: 1fr;
      grid-template-rows: repeat(2, 1fr);
    }

    .layout-grid6,
    .layout-grid8 {
      grid-template-columns: repeat(2, 1fr);
    }

    .layout-grid6 { grid-template-rows: repeat(3, 1fr); }
    .layout-grid8 { grid-template-rows: repeat(4, 1fr); }

    .photobooth-camera-header {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      margin: 2px 0 14px 0;
    }

    .photobooth-layout-current {
      color: var(--pink-dark);
      font-size: 12px;
      font-weight: 900;
    }

    .photobooth-layout-back {
      min-height: 34px;
      padding: 7px 11px;
      font-size: 11.5px;
    }

    .photobooth-strip-preview.layout-vertical2 {
      grid-template-columns: 1fr;
      width: min(150px, 100%);
    }

    .photobooth-strip-preview.layout-grid6,
    .photobooth-strip-preview.layout-grid8 {
      grid-template-columns: repeat(2, 1fr);
      width: min(270px, 100%);
    }

    .photobooth-strip-preview.layout-vertical2 .photobooth-thumb {
      aspect-ratio: 1 / 1;
    }

    .photobooth-strip-preview.layout-grid6 .photobooth-thumb,
    .photobooth-strip-preview.layout-grid8 .photobooth-thumb {
      aspect-ratio: 4 / 3;
    }

    .photobooth-theme-card {
      width: min(690px, 100%);
    }

    .photobooth-theme-subtitle {
      display: none !important;
    }

    .photobooth-theme-carousel {
      position: relative;
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 14px;
    }

    .photobooth-theme-grid {
      display: grid !important;
      grid-template-columns: repeat(2, 1fr) !important;
      gap: 16px !important;
      max-height: 52dvh;
      overflow-y: auto;
      padding: 10px 4px;
      width: 100%;
    }

    .photobooth-theme-option {
      width: 100% !important;
      flex: none !important;
      min-width: 0;
      scroll-snap-align: none !important;
    }

    .photobooth-theme-arrow {
      flex: 0 0 34px;
      width: 34px;
      height: 34px;
      display: grid;
      place-items: center;
      border: 1px solid rgba(var(--pink-rgb), 0.16);
      border-radius: 50%;
      color: var(--pink);
      background: rgba(255,255,255,.94);
      box-shadow: 0 8px 18px rgba(141,52,77,.12);
      cursor: pointer;
      transition: .2s ease;
    }

    .photobooth-theme-arrow:hover {
      transform: scale(1.06);
      background: var(--pink-soft);
    }

    .photobooth-theme-arrow:disabled {
      opacity: .3;
      cursor: default;
      transform: none;
    }

    .photobooth-theme-scroll-hint {
      color: var(--text-soft);
      font-size: 11px;
      font-weight: 900;
      opacity: .72;
      margin-top: 1px;
    }



    @media (max-width: 600px) {
      .photobooth-layout-grid {
        grid-template-columns: 1fr;
        max-height: 58dvh;
        overflow-y: auto;
        padding: 2px 4px 8px;
      }

      .photobooth-layout-option {
        min-height: 112px;
        flex-direction: row;
        justify-content: flex-start;
        padding: 10px 15px;
        border-radius: 16px !important;
      }

      .photobooth-layout-option:hover {
        transform: none !important;
        box-shadow: 0 10px 24px var(--shadow) !important;
        border-color: rgba(240, 190, 209, 0.45) !important;
      }
      
      body.dark .photobooth-layout-option:hover {
        border-color: rgba(255, 255, 255, 0.08) !important;
      }

      .photobooth-layout-preview {
        width: 72px;
        height: 90px;
        flex: 0 0 auto;
      }

      .photobooth-layout-option strong {
        font-size: 13px;
        text-align: left;
      }

      .photobooth-camera-header {
        margin: 2px 0 10px 0;
      }

      .photobooth-theme-card {
        width: min(370px, 100%);
      }

      .photobooth-theme-option {
        width: 100% !important;
        flex-basis: auto !important;
        min-height: unset !important;
      }

      .photobooth-theme-arrow {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
      }
    }

    /* ✅ STREAK BUTTON STYLING */
    .streak-btn {
      width: auto !important;
      height: 36px;
      border-radius: 18px !important;
      padding: 0 10px 0 6px !important;
      display: inline-flex !important;
      align-items: center;
      justify-content: center;
      gap: 3px;
      font-family: "Nunito", Arial, Helvetica, sans-serif !important;
      font-size: 14px;
      font-weight: 900 !important;
      position: relative;
      overflow: hidden !important;
    }

    .streak-btn:not(.active) {
      color: var(--text-soft) !important;
      border-color: rgba(var(--pink-rgb), 0.12) !important;
      box-shadow: none !important;
      background: var(--card-solid) !important;
    }

    body.dark .streak-btn:not(.active) {
      color: var(--text-soft) !important;
      border-color: rgba(255, 255, 255, 0.08) !important;
      background: rgba(255, 255, 255, 0.02) !important;
      box-shadow: none !important;
    }

    .streak-btn::after {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 0%;
      background: linear-gradient(to right, rgba(var(--pink-rgb), 0.12), rgba(var(--pink-rgb), 0.3));
      z-index: 0;
      pointer-events: none;
      transition: width 0.12s ease-out;
    }

    .streak-btn.holding::after {
      width: 100%;
      transition: width 3s linear;
    }

    .streak-btn * {
      position: relative;
      z-index: 1;
    }
    
    .streak-btn .streak-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      line-height: 1;
      transition: transform 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.25s ease;
      filter: grayscale(100%) opacity(40%); /* Lửa tắt: biến thành màu xám tro mờ */
    }
    
    .streak-btn:hover:not(.active) .streak-icon {
      transform: scale(1.15) rotate(5deg);
      filter: grayscale(0%) opacity(85%); /* Sáng lên nhẹ khi hover/nhấn giữ */
    }
    
    .streak-btn.active {
      border-color: rgba(var(--pink-rgb), 0.32);
      box-shadow: 0 10px 24px rgba(var(--pink-rgb), 0.14);
      background: linear-gradient(to bottom, var(--card-solid), rgba(255, 228, 238, 0.42));
    }
    
    body.dark .streak-btn.active {
      background: linear-gradient(to bottom, var(--card-solid), rgba(var(--pink-rgb), 0.06));
    }
    
    .streak-btn.active .streak-icon {
      animation: streakEmojiPulse 1.5s ease-in-out infinite alternate;
    }
    
    @keyframes streakEmojiPulse {
      0% {
        transform: scale(1);
        filter: grayscale(0%) opacity(1) drop-shadow(0 0 2px rgba(255, 107, 129, 0.45));
      }
      100% {
        transform: scale(1.15);
        filter: grayscale(0%) opacity(1) drop-shadow(0 0 6px rgba(255, 107, 129, 0.75));
      }
    }

    /* ✅ WATERING GAME POPUP STYLING */
    .streak-popup-backdrop {
      position: fixed;
      inset: 0;
      z-index: 2800;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 16px;
      background: rgba(61, 43, 43, 0.46);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      animation: photoManageFadeIn 0.2s ease both;
    }

    .streak-popup-card {
      width: min(440px, 100%);
      max-height: calc(100vh - 32px);
      max-height: calc(100dvh - 32px);
      overflow-y: auto;
      position: relative;
      padding: 28px 24px 24px;
      border-radius: 36px;
      text-align: center;
      background: rgba(255, 255, 255, 0.86);
      border: 1.5px solid rgba(255, 255, 255, 0.7);
      box-shadow: 
        0 24px 70px rgba(var(--pink-rgb), 0.12),
        0 12px 30px rgba(61, 43, 43, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
      backdrop-filter: blur(25px);
      -webkit-backdrop-filter: blur(25px);
      animation: photoManagePop 0.34s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    }

    body.dark .streak-popup-card {
      background: rgba(43, 43, 43, 0.82);
      border-color: rgba(255, 255, 255, 0.07);
      box-shadow: 
        0 24px 70px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }

    .streak-popup-close {
      position: absolute;
      top: 14px;
      right: 14px;
      width: 34px;
      height: 34px;
      border: none;
      background: rgba(var(--pink-rgb), 0.08);
      color: var(--pink-dark);
      border-radius: 50%;
      cursor: pointer;
      display: grid;
      place-items: center;
      transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
      font-size: 20px;
      font-weight: bold;
    }

    .streak-popup-close:hover {
      background: var(--pink-soft);
      color: var(--pink-dark);
      transform: rotate(90deg) scale(1.08);
    }

    .streak-popup-title {
      background: linear-gradient(135deg, var(--pink) 20%, var(--pink-dark) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      font-size: 23px;
      font-weight: 900;
      margin-bottom: 6px;
      margin-top: -6px;
      letter-spacing: -0.3px;
    }

    .streak-popup-subtitle {
      color: var(--text-soft);
      font-size: 13.5px;
      font-weight: 800;
      line-height: 1.5;
      margin-bottom: 24px;
      padding: 0 10px;
    }

    .streak-game-stage {
      width: 100%;
      height: 235px;
      position: relative;
      overflow: hidden;
      margin-bottom: 20px;
      touch-action: none;
      background: linear-gradient(180deg, rgba(255, 242, 246, 0.45) 0%, rgba(255, 255, 255, 0.75) 100%);
      border: 1.5px solid rgba(var(--pink-rgb), 0.14);
      border-radius: 28px;
      padding: 12px;
      box-shadow: 
        inset 0 3px 12px rgba(var(--pink-rgb), 0.04),
        0 8px 24px rgba(var(--pink-rgb), 0.03);
    }

    /* Hiệu ứng hào quang thở phía sau chậu cây */
    .streak-game-stage::before {
      content: "";
      position: absolute;
      left: 50%;
      bottom: 20px;
      transform: translateX(-50%);
      width: 170px;
      height: 170px;
      background: radial-gradient(circle, rgba(var(--pink-rgb), 0.32) 0%, transparent 70%);
      z-index: 0;
      pointer-events: none;
      animation: streakGlow 4s ease-in-out infinite alternate;
    }

    @keyframes streakGlow {
      from {
        transform: translateX(-50%) scale(0.85);
        opacity: 0.75;
      }
      to {
        transform: translateX(-50%) scale(1.18);
        opacity: 1;
      }
    }

    /* Hiệu ứng lắc lư khi di chuột vào chậu cây */
    .streak-game-stage:hover .streak-flower-wrap svg {
      animation: plantWobble 0.6s ease-in-out;
    }

    @keyframes plantWobble {
      0% { transform: rotate(0deg); }
      25% { transform: rotate(-3deg) scale(1.02); }
      50% { transform: rotate(3deg) scale(1.02); }
      75% { transform: rotate(-1.5deg) scale(1.01); }
      100% { transform: rotate(0deg); }
    }

    /* Mặt trời / Mặt trăng theo chủ đề giao diện sáng / tối */
    .streak-celestial-body {
      position: absolute;
      top: 73px;          /* Dịch lên 13px để bù trừ padding cho căn giữa */
      left: 25px;         /* Dịch trái 13px để bù trừ padding cho căn giữa */
      width: 60px;        /* Mở rộng khung chứa để không bị clipping (cắt) bóng đổ drop-shadow */
      height: 60px;       /* Mở rộng khung chứa để không bị clipping (cắt) bóng đổ drop-shadow */
      background-size: 34px 34px; /* Giữ nguyên kích thước hiển thị thực tế của Mặt trời/Mặt trăng là 34px */
      background-repeat: no-repeat;
      background-position: center;
      z-index: 5;
      pointer-events: none;
      animation: celestialFloat 3s ease-in-out infinite alternate;
      /* Mặc định là Mặt trời (Giao diện sáng) */
      background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23fdcb6e" stroke="%23fdcb6e" stroke-width="2" stroke-linecap="round"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>');
      filter: drop-shadow(0 2px 8px rgba(253, 203, 110, 0.45));
    }

    /* Mặt trời (Giao diện hoàng hôn) */
    body.theme-3 .streak-celestial-body {
      background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23f43f5e" stroke="%23f43f5e" stroke-width="2" stroke-linecap="round"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>');
      filter: drop-shadow(0 2px 8px rgba(244, 63, 94, 0.5));
    }

    /* Mặt trăng (Giao diện tối & Đêm) */
    body.dark .streak-celestial-body,
    body.theme-5 .streak-celestial-body {
      background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ffd54f"><path d="M12.3 22a9.5 9.5 0 0 1-9.5-9.5c0-3.7 2.1-7 5.4-8.6a.7.7 0 0 1 .9.8 7.3 7.3 0 0 0 10 10 .7.7 0 0 1 .8.9 9.5 9.5 0 0 1-7.6 6.4z"/></svg>');
      filter: drop-shadow(0 0 8px rgba(255, 213, 79, 0.75)) drop-shadow(0 0 15px rgba(255, 213, 79, 0.4));
    }

    @keyframes celestialFloat {
      from { transform: translateY(0); }
      to { transform: translateY(-4px); }
    }

    body.dark .streak-game-stage {
      background: linear-gradient(180deg, rgba(20, 16, 28, 0.7) 0%, rgba(30, 24, 42, 0.4) 100%);
      border-color: rgba(255, 255, 255, 0.06);
      box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    body.theme-3 .streak-game-stage {
      background: linear-gradient(180deg, rgba(255, 235, 240, 0.55) 0%, rgba(255, 255, 255, 0.8) 100%);
      border-color: rgba(var(--pink-rgb), 0.16);
      box-shadow: inset 0 3px 12px rgba(var(--pink-rgb), 0.02);
    }

    .streak-stage-header {
      position: absolute;
      top: 12px;
      left: 12px;
      right: 12px;
      display: flex;
      align-items: center;
      gap: 12px;
      z-index: 8;
    }

    .streak-stage-badge {
      display: inline-block;
      font-size: 11px;
      font-weight: 900;
      color: var(--pink-dark);
      text-transform: uppercase;
      letter-spacing: 0.8px;
      background: rgba(var(--pink-rgb), 0.05);
      border: 1px solid rgba(var(--pink-rgb), 0.1);
      padding: 4px 10px;
      border-radius: 999px;
      line-height: 1;
      white-space: nowrap;
    }

    body.dark .streak-stage-badge {
      background: rgba(255, 139, 176, 0.08);
      border-color: rgba(255, 139, 176, 0.18);
      color: var(--pink-light);
    }

    .streak-stage-header .streak-cycle-progress {
      flex: 1;
      margin-bottom: 0 !important;
      padding: 0 !important;
      display: flex;
      align-items: center;
    }

    .streak-stage-header .streak-cycle-label {
      display: none !important;
    }

    .streak-stage-header .streak-cycle-bar {
      width: 100%;
      height: 6px;
      background: rgba(var(--pink-rgb), 0.06);
      border-radius: 999px;
      overflow: hidden;
      border: 1px solid rgba(var(--pink-rgb), 0.04);
    }

    body.dark .streak-stage-header .streak-cycle-bar {
      background: rgba(255, 255, 255, 0.05);
      border-color: rgba(255, 255, 255, 0.05);
    }

    .streak-flower-wrap {
      position: absolute;
      bottom: 25px;
      left: 50%;
      transform: translateX(-50%);
      font-size: 82px;
      line-height: 1;
      user-select: none;
      pointer-events: none;
      transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .streak-flower-wrap.shake {
      animation: flowerShaking 0.15s ease-in-out infinite alternate;
    }

    .streak-flower-wrap.bloom {
      animation: flowerBlooming 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.5) forwards;
    }

    @keyframes flowerShaking {
      0% { transform: translateX(-52%) scale(1.02) rotate(-2deg); }
      100% { transform: translateX(-48%) scale(1.02) rotate(2deg); }
    }

    @keyframes flowerBlooming {
      0% { transform: translateX(-50%) scale(1); }
      50% { transform: translateX(-50%) scale(1.22) rotate(8deg); }
      100% { transform: translateX(-50%) scale(1.12) rotate(0deg); }
    }

    .streak-watering-can {
      position: absolute;
      top: 50px;
      right: 30px;
      width: 54px;
      height: 54px;
      cursor: grab;
      user-select: none;
      z-index: 10;
      transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      touch-action: none;
    }

    .streak-watering-can:hover {
      transform: translateY(-4px) scale(1.06);
    }

    .streak-watering-can:active {
      transform: scale(0.96);
      cursor: grabbing;
    }

    .streak-watering-can:active {
      cursor: grabbing;
    }

    .streak-watering-can.tilting {
      transform: rotate(-35deg) scale(1.05);
    }

    .streak-watering-can-svg {
      display: block;
      width: 100%;
      height: 100%;
    }

    .droplets-container {
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 5;
    }

    .droplet {
      position: absolute;
      width: 5px;
      height: 15px;
      background: linear-gradient(180deg, rgba(116, 185, 255, 0.95), rgba(9, 132, 227, 0.95));
      border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
      filter: drop-shadow(0 2px 4px rgba(9, 132, 227, 0.3));
      opacity: 0.9;
      animation: dropFalling 0.48s linear forwards;
    }
    .droplet.is-seed {
      background: linear-gradient(180deg, #f39c12, #d35400) !important;
      border-radius: 50% !important;
      filter: drop-shadow(0 1px 3px rgba(211, 84, 0, 0.4));
      width: 6px !important;
      height: 6px !important;
    }

    @keyframes dropFalling {
      0% {
        transform: translateY(0) scaleY(1);
        opacity: 0.85;
      }
      80% {
        opacity: 0.7;
      }
      100% {
        transform: translateY(120px) scaleY(0.4);
        opacity: 0;
      }
    }

    .streak-progress-bar {
      width: 100%;
      height: 14px;
      background: rgba(var(--pink-rgb), 0.08);
      border-radius: 999px;
      overflow: hidden;
      border: 1px solid rgba(var(--pink-rgb), 0.08);
      margin-bottom: 8px;
      position: relative;
    }

    body.dark .streak-progress-bar {
      background: rgba(255, 255, 255, 0.05);
      border-color: rgba(255, 255, 255, 0.05);
    }

    .streak-progress-fill {
      height: 100%;
      width: 0%;
      background: linear-gradient(135deg, var(--pink-light), var(--pink));
      border-radius: 999px;
      transition: width 0.12s linear;
    }

    .streak-game-help {
      font-size: 13px;
      font-weight: 800;
      color: var(--text-soft);
      line-height: 1.45;
      max-width: 320px;
      margin: 0 auto;
      text-align: center;
    }

    @media (max-width: 600px) {
      .streak-popup-backdrop {
        padding: 12px;
      }
      .streak-popup-card {
        width: min(400px, 94%);
        border-radius: 28px;
        padding: 24px 22px 20px;
      }
      .streak-popup-close {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
      }
      .streak-popup-title {
        font-size: 21px;
        margin-top: -12px;
        margin-bottom: 4px;
      }
      .streak-popup-subtitle {
        font-size: 12.5px;
        margin-bottom: 32px;
      }
      .streak-game-stage {
        height: 220px;
        margin-bottom: 16px;
        background: linear-gradient(180deg, rgba(255, 242, 246, 0.45) 0%, rgba(255, 255, 255, 0.75) 100%);
        border: 1.5px solid rgba(var(--pink-rgb), 0.14);
        border-radius: 22px;
        padding: 12px;
        overflow: visible;
        box-shadow: 
          inset 0 3px 12px rgba(var(--pink-rgb), 0.04),
          0 8px 24px rgba(var(--pink-rgb), 0.03);
      }
      .streak-stage-header {
        top: 10px;
        left: 10px;
        right: 10px;
        gap: 8px;
      }
      .streak-stage-badge {
        font-size: 10px;
        padding: 3px 8px;
      }
      .streak-stage-header .streak-cycle-bar {
        height: 10px;
      }
      .streak-flower-wrap {
        width: 86px;
        height: 86px;
        bottom: 12px;
        font-size: 80px;
      }
      .streak-watering-can {
        width: 52px;
        height: 52px;
        top: 38px;
        right: 15px;
      }
      .streak-progress-bar {
        height: 12px;
        margin-bottom: 10px;
      }
      .streak-game-help {
        font-size: 13px;
      }
    }

    /* âœ… STREAK CYCLE PROGRESS BAR (TOP) - REFINED & MINIMAL */
    .streak-cycle-progress {
      width: 100%;
      margin-bottom: 18px;
      padding: 0;
      text-align: left;
    }
    .streak-cycle-label {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1.2px;
      color: var(--text-soft);
      margin-bottom: 6px;
      display: flex;
      justify-content: space-between;
      opacity: 0.8;
    }
    .streak-cycle-percent {
      color: var(--pink-dark);
      font-weight: 900;
    }
    .streak-cycle-bar {
      width: 100%;
      height: 12px;
      background: rgba(var(--pink-rgb), 0.08);
      border-radius: 999px;
      overflow: hidden;
      border: 1px solid rgba(var(--pink-rgb), 0.06);
      box-shadow: inset 0 2px 4px rgba(var(--pink-rgb), 0.08);
      position: relative;
    }

    body.dark .streak-cycle-bar {
      background: rgba(255, 255, 255, 0.06);
      border-color: rgba(255, 255, 255, 0.05);
      box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .streak-cycle-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--pink-light), var(--pink), var(--pink-light), var(--pink));
      background-size: 300% 100%;
      border-radius: 999px;
      width: 0%;
      transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
      animation: progressShimmer 3s linear infinite;
      box-shadow: 0 0 10px rgba(var(--pink-rgb), 0.42);
    }

    @keyframes progressShimmer {
      0% { background-position: 0% 50%; }
      100% { background-position: 300% 50%; }
    }

    .streak-flower-wrap {
      position: absolute;
      bottom: 20px;
      left: 50%;
      transform: translateX(-50%);
      width: 185px;
      height: 185px;
      user-select: none;
      pointer-events: none;
      transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .streak-flower-head {
      animation: floatFlower 3s ease-in-out infinite alternate;
      transform-origin: 45px 58px;
    }

    @keyframes floatFlower {
      0% { transform: translateY(0) rotate(-1deg); }
      100% { transform: translateY(-3.5px) rotate(2deg); }
    }

    @media (max-width: 600px) {
      .streak-flower-wrap {
        width: 170px;
        height: 170px;
        bottom: 15px;
      }
      .streak-cycle-progress {
        margin-bottom: 12px;
      }
      .streak-cycle-label {
        font-size: 10.5px;
        margin-bottom: 5px;
      }
      .streak-cycle-bar {
        height: 6px;
      }
    }

    /* âœ… CUSTOM STREAK RESET MODAL */
    .streak-reset-backdrop {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: rgba(0, 0, 0, 0.45);
      backdrop-filter: blur(5px);
      z-index: 99999;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      animation: fadeIn 0.2s ease-out forwards;
    }
    
    .streak-reset-card {
      background: var(--card-solid);
      border: 1px solid rgba(var(--pink-rgb), 0.15);
      border-radius: 24px;
      width: 90%;
      max-width: 320px;
      padding: 24px;
      text-align: center;
      box-shadow: 0 20px 40px rgba(var(--pink-rgb), 0.12);
      transform: scale(0.9);
      animation: scaleUp 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    }
    
    .streak-reset-title {
      font-size: 18px;
      font-weight: 800;
      color: var(--pink-dark);
      margin-bottom: 12px;
    }
    
    .streak-reset-desc {
      font-size: 13.5px;
      color: var(--text-soft);
      line-height: 1.5;
      margin-bottom: 22px;
      padding: 0 4px;
    }
    
    .streak-reset-actions {
      display: flex;
      gap: 12px;
      justify-content: center;
    }
    


    .streak-reset-btn {
      padding: 10px 20px;
      border-radius: 12px;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      border: none;
      transition: all 0.2s ease;
      font-family: inherit;
    }
    
    .streak-reset-btn.cancel {
      background: rgba(var(--pink-rgb), 0.05);
      color: var(--pink-dark);
      border: 1px solid rgba(var(--pink-rgb), 0.15);
    }
    
    .streak-reset-btn.cancel:hover {
      background: rgba(var(--pink-rgb), 0.1);
    }
    
    .streak-reset-btn.confirm {
      background: linear-gradient(to right, var(--pink-light), var(--pink));
      color: white;
      box-shadow: 0 4px 12px rgba(var(--pink-rgb), 0.24);
    }
    
    .streak-reset-btn.confirm:hover {
      transform: translateY(-1px);
      box-shadow: 0 6px 16px rgba(var(--pink-rgb), 0.32);
    }

    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    @keyframes scaleUp {
      from { transform: scale(0.9); }
      to { transform: scale(1); }
    }

    /* =========================================================
      NÃšT NHáº®N TIN (CHAT FAB) & Há»˜P THOáº I (CHAT POPUP)
    ========================================================= */
    .chat-fab {
      position: fixed;
      right: 22px;
      bottom: 142px;
      z-index: 32;
      border: none;
      display: inline-flex;
      align-items: center;
      justify-content: flex-start;
      gap: 8px;
      min-height: 46px;
      min-width: 145px;
      padding: 11px 18px;
      color: var(--pink);
      background: rgba(255, 255, 255, 0.94);
      border: 1px solid rgba(var(--pink-rgb), 0.22);
      border-radius: 999px;
      font-size: 13.5px;
      font-weight: 900;
      cursor: pointer;
      box-shadow: 0 16px 34px rgba(var(--pink-rgb), 0.14);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      transition: 0.24s ease;
    }

    .chat-fab::after {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 0%;
      background: linear-gradient(to right, rgba(var(--pink-rgb), 0.12), rgba(var(--pink-rgb), 0.3));
      z-index: 0;
      pointer-events: none;
      transition: width 0.12s ease-out;
    }

    .chat-fab.holding {
      overflow: hidden !important;
    }

    .chat-fab.holding::after {
      width: 100%;
      transition: width 2.0s linear;
    }

    .chat-fab * {
      position: relative;
      z-index: 1;
    }

    .chat-fab:hover {
      transform: translateY(-3px) scale(1.03);
      box-shadow: 0 20px 42px rgba(125, 91, 226, 0.22);
    }

    .chat-fab .ui-svg-icon {
      width: 18px;
      height: 18px;
      fill: currentColor;
    }

    .love-request-fab .ui-svg-icon,
    .photobooth-fab .ui-svg-icon {
      width: 18px !important;
      height: 18px !important;
    }

    .love-request-fab span,
    .photobooth-fab span,
    .chat-fab span:not(.chat-badge) {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
      height: 18px;
    }

    body.dark .chat-fab {
      background: #ffffff;
      color: var(--pink);
      border-color: rgba(255, 255, 255, 0.62);
    }

    body.dark .chat-input {
      color: #ffffff !important;
      background: rgba(255, 255, 255, 0.05) !important;
      border-color: rgba(255, 255, 255, 0.15) !important;
    }

    /* CHAT POPUP (Messenger Style) */
    .chat-popup {
      position: fixed;
      right: 220px;
      bottom: 22px;
      z-index: 120;
      width: 330px;
      height: 440px;
      display: none;
      flex-direction: column;
      animation: chatSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .chat-popup.active {
      display: flex;
    }

    .chat-card {
      width: 100%;
      height: 100%;
      background: var(--card-solid);
      border: 1px solid rgba(226, 91, 165, 0.22);
      border-radius: 16px;
      box-shadow: 0 12px 42px rgba(61, 43, 43, 0.16);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      transition: height 0.3s ease;
    }

    /* Header */
    .chat-header {
      padding: 10px 14px;
      background: linear-gradient(135deg, var(--pink-light), var(--pink));
      color: #ffffff;
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      cursor: pointer;
    }

    .chat-user-info {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .chat-avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      position: relative;
      background: rgba(255, 255, 255, 0.2);
      border: 1.5px solid #ffffff;
      overflow: visible;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .chat-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 50%;
    }

    .chat-avatar .active-dot {
      position: absolute;
      bottom: -1px;
      right: -1px;
      width: 10px;
      height: 10px;
      background: #4ade80;
      border: 2px solid var(--pink);
      border-radius: 50%;
    }

    .chat-user-detail h3 {
      font-size: 14px;
      font-weight: 800;
      margin: 0;
      line-height: 1.2;
    }

    .chat-user-detail p {
      font-size: 11px;
      margin: 0;
      opacity: 0.85;
      font-weight: 500;
    }

    .chat-header-actions {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .chat-header-btn {
      background: transparent;
      border: none;
      width: 26px;
      height: 26px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #ffffff !important;
      opacity: 1 !important;
      cursor: pointer;
      transition: background 0.2s ease;
      padding: 0;
    }

    .chat-header-btn:hover {
      background: rgba(255, 255, 255, 0.15);
    }

    .chat-header-btn .ui-svg-icon {
      width: 16px;
      height: 16px;
      color: #ffffff !important;
      fill: #ffffff !important;
      filter: none !important;
    }
    
    .chat-header-btn .ui-svg-icon path {
      fill: #ffffff !important;
    }

    /* Body messages */
    .chat-body {
      flex: 1;
      padding: 14px;
      overflow-y: auto;
      background: var(--bg-main, #fff6f8);
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    /* Date divider */
    .chat-date-divider {
      text-align: center;
      font-size: 11px;
      color: var(--text-soft);
      margin: 4px 0;
      font-weight: 600;
    }

    /* Message bubbles */
    .chat-msg {
      display: flex;
      width: 100%;
    }

    .chat-msg.msg-received {
      justify-content: flex-start;
    }

    .chat-msg.msg-sent {
      justify-content: flex-end;
    }

    .msg-bubble {
      max-width: 78%;
      padding: 9px 13px;
      font-size: 13.5px;
      line-height: 1.4;
      border-radius: 18px;
      font-weight: 500;
      word-break: break-word;
    }

    .msg-received .msg-bubble {
      background: var(--card-solid, #ffffff);
      color: var(--text-main, #333333);
      border: 1px solid rgba(226, 91, 165, 0.08);
      border-top-left-radius: 4px;
      box-shadow: 0 2px 6px rgba(226, 91, 165, 0.03);
    }

    .msg-sent .msg-bubble {
      background: linear-gradient(135deg, var(--pink-light), var(--pink));
      color: #ffffff;
      border-top-right-radius: 4px;
      box-shadow: 0 4px 10px rgba(var(--pink-rgb), 0.15);
    }

    /* Footer / Input area */
    .chat-footer {
      padding: 10px 12px;
      background: var(--card-solid);
      border-top: 1px solid rgba(226, 91, 165, 0.1);
      display: flex;
      align-items: flex-end;
      gap: 8px;
    }

    .chat-input {
      flex: 1;
      border: 1px solid rgba(226, 91, 165, 0.22);
      background: var(--bg-main, #fffdfd);
      color: #000000;
      border-radius: 20px;
      padding: 8px 14px;
      font-size: 13.5px;
      resize: none;
      height: 36px;
      max-height: 80px;
      line-height: 1.35;
      font-family: inherit;
      outline: none;
      transition: border-color 0.2s ease;
    }

    .chat-input:focus {
      border-color: var(--pink);
    }

    .chat-send-btn {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--pink-light), var(--pink));
      color: #ffffff;
      border: none;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: transform 0.2s ease, opacity 0.2s ease;
      padding: 0;
      flex-shrink: 0;
    }

    .chat-send-btn:hover {
      transform: scale(1.05);
    }

    .chat-send-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      transform: none;
    }

    .chat-send-btn .ui-svg-icon {
      width: 16px;
      height: 16px;
      fill: currentColor;
      transform: translate(1px, 0);
    }

    /* Animations */
    @keyframes chatSlideUp {
      from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }



    @media (max-width: 600px) {
      .chat-fab {
        right: 14px !important;
        bottom: calc(138px + env(safe-area-inset-bottom)) !important;
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        min-height: 46px !important;
        padding: 0 !important;
        gap: 0 !important;
        border-radius: 50% !important;
        font-size: 20px !important;
      }

      .chat-fab .chat-text-wrap {
        display: none !important;
      }

      .chat-fab .chat-icon-wrap {
        display: grid;
        place-items: center;
        width: 100%;
        height: 100%;
        line-height: 1;
      }


      /* Mobile Chat Centering Overlay Modal (Streak Popup style) */
      .chat-popup {
        position: fixed !important;
        top: 0;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh;
        background: rgba(0, 0, 0, 0.45) !important;
        backdrop-filter: blur(5px) !important;
        -webkit-backdrop-filter: blur(5px) !important;
        z-index: 99999 !important;
        display: none;
        align-items: center;
        justify-content: center;
        opacity: 0;
        animation: none !important;
        transform: none !important;
      }

      .chat-popup.active {
        display: flex !important;
        animation: fadeIn 0.2s ease-out forwards !important;
      }

      .chat-card {
        background: var(--card-solid) !important;
        border: 1px solid rgba(var(--pink-rgb), 0.15) !important;
        border-radius: 24px !important;
        width: 95% !important;
        max-width: 357px !important;
        height: 85% !important;
        max-height: 520px !important;
        box-shadow: 0 20px 40px rgba(var(--pink-rgb), 0.12) !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        transform: scale(0.9) !important;
        animation: scaleUp 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
      }

      .chat-header {
        padding: 14px 18px !important;
        background: var(--card-solid) !important;
        color: var(--pink-dark) !important;
        border-bottom: 1px solid rgba(var(--pink-rgb), 0.12) !important;
      }

      .chat-avatar {
        background: rgba(var(--pink-rgb), 0.08) !important;
        border: 1.5px solid rgba(var(--pink-rgb), 0.28) !important;
      }

      .chat-header-btn {
        width: 28px !important;
        height: 28px !important;
        color: var(--pink) !important;
      }

      .chat-header-btn:hover {
        background: rgba(var(--pink-rgb), 0.08) !important;
      }

      .chat-header-btn .ui-svg-icon {
        color: var(--pink) !important;
        fill: var(--pink) !important;
      }

      .chat-header-btn .ui-svg-icon path {
        fill: var(--pink) !important;
      }

      .chat-body {
        background: var(--card-solid) !important;
        padding: 14px !important;
        gap: 12px !important;
      }

      .chat-date-divider {
        font-size: 11.5px !important;
        margin: 10px 0 !important;
        font-weight: 700 !important;
      }

      .chat-msg {
        margin-bottom: 2px !important;
      }

      .msg-received .msg-bubble {
        background: var(--bg, #fffafc) !important;
        border: 1px solid rgba(var(--pink-rgb), 0.15) !important;
        color: var(--text-main) !important;
      }

      body.dark .msg-received .msg-bubble {
        background: rgba(255, 255, 255, 0.06) !important;
        color: var(--text-main) !important;
      }

      .chat-footer {
        border-top: 1px solid rgba(var(--pink-rgb), 0.12) !important;
      }

      .chat-input {
        border: 1.5px solid rgba(var(--pink-rgb), 0.18) !important;
        background: rgba(255, 255, 255, 0.86) !important;
        color: #000000 !important;
        font-weight: 700 !important;
      }

      body.dark .chat-input {
        background: #ffffff !important;
        color: #000000 !important;
      }

      .chat-input:focus {
        border-color: var(--pink) !important;
        box-shadow: 0 0 0 3px rgba(var(--pink-rgb), 0.1) !important;
      }

      /* Force matching sizes for top row buttons on mobile to avoid subsequent overrides */
      .love-pill {
        font-size: 13.5px !important;
        width: 120px !important;
        gap: 8px !important;
        padding: 6px 12px 6px 8px !important;
      }
      .top-actions .streak-btn {
        font-size: 13.5px !important;
      }
    }



    /* CHAT ROLE BAR STYLING */
    .chat-role-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 6px 14px;
      background: var(--card-solid);
      border-top: 1px solid rgba(226, 91, 165, 0.08);
      border-bottom: 1px solid rgba(226, 91, 165, 0.08);
    }

    .chat-role-bar span {
      font-size: 11px;
      font-weight: 700;
      color: var(--text-soft);
      text-transform: uppercase;
      letter-spacing: 0.6px;
    }

    .chat-role-toggle {
      display: flex;
      gap: 6px;
      background: rgba(226, 91, 165, 0.04);
      padding: 2.5px;
      border-radius: 999px;
      border: 1px solid rgba(226, 91, 165, 0.08);
    }

    .role-toggle-btn {
      border: none;
      background: transparent;
      padding: 4px 10px;
      font-size: 11px;
      font-weight: 800;
      border-radius: 999px;
      color: var(--text-soft);
      cursor: pointer;
      transition: all 0.2s ease;
      font-family: inherit;
    }

    .role-toggle-btn.active {
      background: linear-gradient(135deg, var(--pink-light), var(--pink));
      color: #ffffff;
      box-shadow: 0 2px 6px rgba(var(--pink-rgb), 0.2);
    }
    /* CHAT BADGE STYLING */
    .chat-badge {
      position: absolute;
      top: -6px;
      right: -6px;
      background: #ff4d6d;
      color: #ffffff;
      font-size: 10px;
      font-weight: 900;
      min-width: 18px;
      height: 18px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 2px solid #ffffff;
      box-shadow: 0 4px 10px rgba(255, 77, 109, 0.3);
      padding: 0 3px;
      z-index: 10;
    }
    
    body.dark .chat-badge {
      border-color: #2b2b2b;
    }

    .chat-badge.hidden {
      display: none;
    }

    /* CUSTOM STREAK SUCCESS HEART EXPLOSION */
    .streak-heart-particle {
      position: absolute;
      font-size: 18px;
      pointer-events: none;
      z-index: 12;
      user-select: none;
      transform: translate(-50%, -50%);
    }

    @keyframes heartFly {
      0% {
        transform: translate(-50%, -50%) scale(0.5) rotate(0deg);
        opacity: 1;
      }
      100% {
        transform: translate(calc(-50% + var(--vx)), calc(-50% + var(--vy))) scale(1.3) rotate(calc(var(--vx) * 2));
        opacity: 0;
      }
    }

    /* SMART SCROLL DOWN BUTTON FOR CHATBOX */
    .chat-scroll-down {
      position: absolute;
      bottom: 74px;
      left: 50%;
      transform: translateX(-50%) translateY(0);
      z-index: 30;
      background: var(--pink);
      color: white;
      border: none;
      padding: 8px 16px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 800;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(var(--pink-rgb), 0.35);
      display: flex;
      align-items: center;
      gap: 6px;
      transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      font-family: inherit;
    }
    
    body.dark .chat-scroll-down {
      background: var(--pink);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    }

    .chat-scroll-down.hidden {
      opacity: 0;
      transform: translateX(-50%) translateY(12px);
      pointer-events: none;
    }

    .chat-scroll-down:hover {
      background: var(--pink-dark);
      transform: translateX(-50%) translateY(-2px);
      box-shadow: 0 6px 16px rgba(var(--pink-rgb), 0.45);
    }
    
    body.dark .chat-scroll-down:hover {
      background: #ff76a3;
    }

    .scroll-down-badge {
      display: none;
      width: 6px;
      height: 6px;
      background: #ffffff;
      border-radius: 50%;
      animation: pulseAlert 1s infinite alternate;
    }

    .chat-scroll-down.has-new-msg .scroll-down-badge {
      display: block;
    }
    
    .chat-scroll-down.has-new-msg {
      background: #2ecc71 !important; /* Green alert color for new messages */
      box-shadow: 0 4px 12px rgba(46, 204, 113, 0.35);
    }

    @keyframes pulseAlert {
      from { transform: scale(0.8); opacity: 0.5; }
      to { transform: scale(1.4); opacity: 1; }
    }

    /* Preview Popup */
    .photobooth-preview-popup {
      position: fixed;
      inset: 0;
      z-index: 140;
      background: rgba(26, 11, 46, 0.45);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      display: grid;
      place-items: center;
      padding: 16px;
      opacity: 0;
      pointer-events: none;
      transition: all 0.35s ease;
    }

    .photobooth-preview-popup.active {
      opacity: 1;
      pointer-events: auto;
    }

    .photobooth-preview-card {
      background: #ffffff;
      border: 1px solid rgba(var(--pink-rgb), 0.15);
      border-radius: 28px;
      padding: 24px 20px 20px;
      width: min(400px, 92%);
      box-shadow: 0 20px 50px rgba(100, 20, 60, 0.15);
      position: relative;
      transform: scale(0.9) translateY(20px);
      transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 16px;
    }

    body.dark .photobooth-preview-card {
      background: var(--card-solid);
      border-color: rgba(255, 255, 255, 0.1);
    }

    .photobooth-preview-popup.active .photobooth-preview-card {
      transform: scale(1) translateY(0);
    }

    .photobooth-preview-close {
      position: absolute;
      right: 14px;
      top: 14px;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      border: 1px solid rgba(var(--pink-rgb), 0.16);
      background: transparent;
      color: var(--pink);
      display: grid;
      place-items: center;
      cursor: pointer;
      transition: all 0.25s ease;
    }

    .photobooth-preview-close:hover {
      background: rgba(var(--pink-rgb), 0.08);
      transform: rotate(90deg);
    }

    .photobooth-preview-title {
      font-size: 20px;
      font-weight: 900;
      color: var(--pink-dark);
      margin: 0;
    }

    .photobooth-preview-img-container {
      width: 100%;
      height: 45dvh;
      overflow: hidden;
      border-radius: 16px;
      background: rgba(0,0,0,0.03);
      padding: 12px;
      display: flex;
      justify-content: center;
      align-items: center;
      box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
    }

    .photobooth-preview-img-container img {
      max-width: 100%;
      max-height: 100%;
      width: auto;
      height: auto;
      object-fit: contain;
      border-radius: 8px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
      display: block;
    }

    .photobooth-preview-actions {
      width: 100%;
      display: flex;
      justify-content: center;
    }

    .photobooth-preview-save-btn {
      background: var(--pink);
      color: #ffffff;
      border: none;
      border-radius: 20px;
      padding: 12px 36px;
      font-size: 14px;
      font-weight: 800;
      cursor: pointer;
      box-shadow: 0 6px 16px rgba(var(--pink-rgb), 0.3);
      transition: all 0.25s ease;
      font-family: inherit;
    }

    .photobooth-preview-save-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(var(--pink-rgb), 0.4);
    }

    .photobooth-preview-save-btn:active {
      transform: translateY(0);
    }

    /* Camera Controls Layout */
    .photobooth-actions {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      width: 100%;
      margin: 14px 0 6px 0;
    }

    .camera-control-btn {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: rgba(0, 0, 0, 0.6) !important;
      border: 1.5px solid rgba(255, 255, 255, 0.3) !important;
      color: #ffffff !important;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      transition: all 0.25s ease;
      font-size: 11px;
      font-weight: 800;
      padding: 0;
      box-shadow: 0 4px 10px rgba(0,0,0,0.18);
      font-family: inherit;
    }
    
    .camera-control-btn.active {
      background: var(--pink) !important;
      border-color: rgba(255, 255, 255, 0.4) !important;
      color: #ffffff !important;
    }

    .camera-control-btn.timer-btn {
      background: var(--pink) !important;
      border-color: rgba(255, 255, 255, 0.4) !important;
      color: #ffffff !important;
    }

    .camera-control-btn:hover {
      transform: scale(1.06);
      background: rgba(0, 0, 0, 0.8) !important;
    }
    
    .camera-control-btn.active:hover {
      background: var(--pink-dark) !important;
    }

    .camera-control-btn:active {
      transform: scale(0.94);
    }

    .camera-control-btn svg,
    .camera-control-btn .ui-svg-icon {
      width: 14px;
      height: 14px;
      fill: currentColor !important;
      color: inherit !important;
    }

    .timer-value {
      font-family: inherit;
      line-height: 1;
    }

    /* Mobile responsive actions spacing */
    @media (max-width: 480px) {
      .photobooth-actions {
        gap: 5px;
      }
      .photobooth-actions button {
        padding: 8px 10px;
        font-size: 11px;
      }
      .camera-control-btn {
        width: 30px;
        height: 30px;
      }
    }

    /* PHOTO SORTING MODE */
    /* PHOTO SORTING MODE */
    .photo-grid.is-sorting-mode .photo-item.has-photo {
      outline: 2.5px dashed var(--pink);
      outline-offset: 4px;
      cursor: grab;
      user-select: none;
      -webkit-user-select: none;
      touch-action: none; /* Disable scroll on dragging */
      transition: none !important; /* Tắt transition để hiệu ứng rung mượt mà */
      animation: wiggle 0.24s infinite ease-in-out alternate;
    }

    .photo-grid.is-sorting-mode .photo-item.has-photo:nth-child(even) {
      animation-duration: 0.28s;
      animation-direction: alternate-reverse;
    }

    .photo-grid.is-sorting-mode .photo-item.is-dragging {
      opacity: 0.15 !important;
      animation: none !important;
      pointer-events: none !important;
    }

    .photo-drag-clone {
      position: fixed !important;
      pointer-events: none !important;
      z-index: 10000 !important;
      transform: scale(1.08) rotate(2deg) !important;
      opacity: 0.95 !important;
      box-shadow: 0 20px 45px rgba(125, 91, 226, 0.3) !important;
      transition: none !important;
      animation: none !important;
      border-radius: 18px !important;
      overflow: hidden !important;
    }

    .photo-grid.is-sorting-mode .photo-item.drag-hover {
      outline-color: #7d5be2 !important;
      outline-style: solid;
      transform: scale(0.96);
    }

    @keyframes wiggle {
      0% { transform: rotate(-0.8deg); }
      100% { transform: rotate(0.8deg); }
    }

    /* CHAT ROLE SWITCH TOOLTIP POPUP (LEFT SIDE SLIDE IN) */
    .chat-role-tooltip {
      position: fixed;
      z-index: 10000;
      color: var(--pink);
      background: rgba(255, 255, 255, 0.96);
      border: 1px solid rgba(var(--pink-rgb), 0.2);
      border-radius: 999px;
      padding: 8px 14px;
      font-size: 13.5px;
      font-weight: 900;
      line-height: 1;
      white-space: nowrap;
      box-shadow: 0 12px 28px rgba(var(--pink-rgb), 0.16);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      opacity: 0;
      transform: translateX(12px) scale(0.92);
      transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
      pointer-events: none;
    }

    .chat-role-tooltip.active {
      opacity: 1;
      transform: translateX(0) scale(1);
    }

    .chat-role-tooltip::after {
      content: "";
      position: absolute;
      left: 100%;
      top: 50%;
      transform: translateY(-50%);
      width: 0;
      height: 0;
      border-top: 6px solid transparent;
      border-bottom: 6px solid transparent;
      border-left: 6px solid rgba(255, 255, 255, 0.96);
      z-index: 1;
    }

    .chat-role-tooltip::before {
      content: "";
      position: absolute;
      left: 100%;
      top: 50%;
      transform: translateY(-50%);
      width: 0;
      height: 0;
      border-top: 7px solid transparent;
      border-bottom: 7px solid transparent;
      border-left: 7px solid rgba(var(--pink-rgb), 0.2);
      z-index: 0;
    }

    body.dark .chat-role-tooltip {
      background: rgba(43, 43, 43, 0.96);
      border-color: rgba(var(--pink-rgb), 0.3);
      color: var(--pink-light);
      box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
    }

    body.dark .chat-role-tooltip::after {
      border-left-color: rgba(43, 43, 43, 0.96);
    }

    body.dark .chat-role-tooltip::before {
      border-left-color: rgba(var(--pink-rgb), 0.3);
    }


    /* ==========================================
       THEME PICKER DROPDOWN MENU
       ========================================== */
    .theme-picker-container {
      position: relative;
      display: inline-block;
    }

    .theme-dropdown {
      position: absolute;
      top: calc(100% + 12px);
      right: 0;
      z-index: 1000;
      width: 220px;
      padding: 8px;
      background: var(--card);
      border: 1px solid var(--line);
      border-radius: 18px;
      box-shadow: 0 15px 35px var(--shadow);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      display: flex;
      flex-direction: column;
      gap: 4px;
      transform: translateY(10px);
      opacity: 0;
      pointer-events: none;
      transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .theme-dropdown:not([hidden]) {
      display: flex;
      opacity: 1;
      transform: translateY(0);
      pointer-events: auto;
    }

    .theme-dropdown-arrow {
      position: absolute;
      top: -6px;
      right: 18px;
      width: 12px;
      height: 12px;
      background: var(--card);
      border-left: 1px solid var(--line);
      border-top: 1px solid var(--line);
      transform: rotate(45deg);
      z-index: -1;
    }

    .theme-dropdown-header {
      padding: 6px 12px 4px 12px;
      font-size: 11px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--text-soft);
      opacity: 0.8;
    }

    .theme-opt-btn {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      padding: 8px 12px;
      border: none;
      background: transparent;
      border-radius: 12px;
      color: var(--text-main);
      font-size: 13.5px;
      font-weight: 700;
      text-align: left;
      cursor: pointer;
      transition: all 0.2s ease;
      position: relative;
    }

    .theme-opt-btn:hover {
      background: var(--pink-soft);
      color: var(--pink-dark);
      transform: translateX(4px);
    }

    .theme-opt-icon {
      font-size: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: transform 0.2s ease;
      width: 18px;
      height: 18px;
      flex-shrink: 0;
    }

    .theme-opt-icon .ui-svg-icon {
      color: inherit;
      width: 100%;
      height: 100%;
      filter: none;
    }

    .theme-opt-btn:hover .theme-opt-icon {
      transform: scale(1.2);
    }

    .theme-opt-text {
      flex-grow: 1;
    }

    .theme-opt-check {
      color: var(--pink);
      font-size: 12px;
      font-weight: 900;
      opacity: 0;
      transform: scale(0.5);
      transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .theme-opt-btn.active {
      background: var(--pink-soft);
      color: var(--pink-dark);
    }

    .theme-opt-btn.active .theme-opt-check {
      opacity: 1;
      transform: scale(1);
    }

    /* Dark Mode Overrides for dropdown components */
    body.dark .theme-dropdown {
      background: rgba(30, 24, 42, 0.95);
      box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
    }
    
    body.dark .theme-dropdown-arrow {
      background: rgba(30, 24, 42, 0.95);
    }
