    * {
      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-dark: #9d4562;
      --pink-soft: #ffe4ee;
      --line: rgba(226, 165, 186, 0.28);
      --shadow: rgba(197, 95, 132, 0.18);
      --grid-size: 32px;
      --time-deco: rgba(232, 93, 139, 0.09);
    }

    body.dark {
      --bg: #19141a;
      --card: rgba(38, 31, 40, 0.92);
      --card-solid: #261f28;
      --text-main: #ffe8f0;
      --text-soft: #e5c5d0;
      --pink: #ff8bb0;
      --pink-dark: #ffc1d4;
      --pink-soft: #3a2630;
      --line: rgba(255, 180, 205, 0.12);
      --shadow: rgba(0, 0, 0, 0.35);
      --time-deco: rgba(255, 255, 255, 0.08);
    }

    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: 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),
        radial-gradient(circle at top left, rgba(255, 217, 232, 0.8), transparent 30%),
        radial-gradient(circle at bottom right, rgba(255, 221, 210, 0.7), transparent 30%);
      background-size:
        var(--grid-size) var(--grid-size),
        var(--grid-size) var(--grid-size),
        auto,
        auto;
      transition: 0.25s ease;
    }

    body::before {
      content: "";
      position: fixed;
      top: 0;
      bottom: 0;
      left: 64px;
      width: 2px;
      background: rgba(244, 157, 184, 0.28);
      pointer-events: none;
      z-index: 0;
    }

    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(232, 93, 139, 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,
    .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: #ff8bb0;
    }

    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: #e85d8b; }
    .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: #ff8bb0;
    }

    .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);
    }

    .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(197, 95, 132, 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(232, 93, 139, 0.16);
      box-shadow: 0 16px 34px rgba(214, 125, 155, 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(232, 93, 139, 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(214, 125, 155, 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(232, 93, 139, 0.11);
      border: 1px solid rgba(232, 93, 139, 0.13);
      overflow: hidden;
      box-shadow: inset 0 2px 8px rgba(232, 93, 139, 0.08);
    }

    .loading-progress span {
      display: block;
      height: 100%;
      width: 0%;
      border-radius: inherit;
      background: linear-gradient(135deg, #ff8bb0, #e85d8b);
      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: #e85d8b;
      background: rgba(255, 255, 255, 0.92);
      border: 1px solid rgba(232, 93, 139, 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(232, 93, 139, 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: #e85d8b;
      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%);
      height: calc(100vh - 18px);
      height: calc(100dvh - 18px);
      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: hidden;
      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;
      gap: 9px;
      background: var(--card-solid);
      color: var(--pink-dark);
      border: 1px solid rgba(232, 93, 139, 0.22);
      border-radius: 999px;
      padding: 8px 12px 8px 9px;
      font-size: 14px;
      font-weight: 900;
      white-space: nowrap;
      box-shadow: 0 10px 24px rgba(214, 125, 155, 0.12);
      cursor: pointer;
      transition: 0.25s ease;
      position: relative;
      z-index: 2;
    }

    #loveCounter {
      display: inline-block;
      width: auto;
      min-width: 10ch;
      max-width: 16ch;
      text-align: center;
      transform-origin: center;
      transition: opacity 0.22s ease, transform 0.22s ease, filter 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(232, 93, 139, 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(232, 93, 139, 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(232, 93, 139, 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(232, 93, 139, 0.22);
      box-shadow: 0 10px 24px rgba(214, 125, 155, 0.12);
    }

    .love-pill:hover {
      transform: translateY(-2px);
      box-shadow: 0 14px 30px rgba(214, 125, 155, 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(232, 93, 139, 0.16);
      font-size: 15px;
      line-height: 1;
      animation: tinyHeartBeat 1.8s ease-in-out infinite;
      transition: color 0.24s ease, background 0.24s ease, border-color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
    }

    .love-heart.is-switching {
      opacity: 0;
      transform: scale(0.58) rotate(18deg);
      filter: blur(6px);
    }

    .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(232, 93, 139, 0.16);
      box-shadow: 0 9px 20px rgba(214, 125, 155, 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(232, 93, 139, 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(232, 93, 139, var(--rain-opacity, 0.78))
      );
      box-shadow: 0 0 13px rgba(232, 93, 139, 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(232, 93, 139, 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(232, 93, 139, 0.22);
      border-radius: 999px;
      font-weight: 800;
      box-shadow: 0 10px 24px rgba(214, 125, 155, 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(232, 93, 139, 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(232, 93, 139, 0.075);
      box-shadow:
        0 5px 12px rgba(214, 125, 155, 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, #ff9aba, #e85d8b);
      box-shadow: 0 8px 16px rgba(232, 93, 139, 0.2);
    }

    .music-control-btn:focus-visible {
      outline: 3px solid rgba(232, 93, 139, 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, #ff8bb0, #e85d8b);
      border-color: rgba(232, 93, 139, 0.34);
      box-shadow:
        0 9px 18px rgba(232, 93, 139, 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(232, 93, 139, 0.07);
      border: 1px solid rgba(232, 93, 139, 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, #ff8bb0, #e85d8b);
      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(232, 93, 139, 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: #e85d8b;
      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, #ff8bb0, #e85d8b);
    }

    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, #ff8bb0);
    }

    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(232, 93, 139, 0.14);
      border-radius: 999px;
      font-size: 12px;
      line-height: 1.25;
      font-weight: 900;
      text-align: center;
      box-shadow: 0 8px 18px rgba(214, 125, 155, 0.08);
    }

    body.dark .calendar-meet-countdown {
      background: rgba(255, 255, 255, 0.94);
      color: #e85d8b;
      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(232, 93, 139, 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(232, 93, 139, 0.055);
      border: 1px solid rgba(232, 93, 139, 0.08);
      font-size: 13px;
      font-weight: 900;
      position: relative;
    }

    .calendar-day.empty {
      background: transparent;
      border-color: transparent;
    }

    .calendar-day.today {
      color: #ffffff;
      background: linear-gradient(135deg, #ff8bb0, #e85d8b);
      box-shadow: 0 12px 24px rgba(232, 93, 139, 0.22);
    }

    .calendar-day.meet-date {
      color: var(--text-main);
      background: transparent;
      border-color: transparent;
      box-shadow: none;
    }

    .calendar-day.meet-date::before {
      content: "";
      position: absolute;
      inset: 5px;
      border: 1.25px solid rgba(232, 93, 139, 0.58);
      border-radius: 50%;
      pointer-events: none;
      transition: 0.22s ease;
    }

    .calendar-day.meet-date.today {
      color: var(--text-main);
      background: transparent;
      border-color: transparent;
      box-shadow: none;
    }

    .calendar-day.meet-date:hover::before,
    .calendar-day.meet-date:focus-visible::before {
      border-color: rgba(232, 93, 139, 0.82);
    }

    body.dark .calendar-day.meet-date {
      color: var(--text-main);
      background: transparent;
      border-color: transparent;
    }

    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(232, 93, 139, 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(232, 93, 139, 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(232, 93, 139, 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: #e85d8b;
    }

    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: #e85d8b;
      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: #e85d8b;
    }

    .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(232, 93, 139, 0.2));
    }

    .flower-trigger:focus-visible {
      outline: 3px solid rgba(232, 93, 139, 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: #f28cab;
    }

    .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(232, 93, 139, 0.14);
      box-shadow:
        0 18px 42px rgba(214, 125, 155, 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: #e85d8b;
    }

    @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(214, 125, 155, 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;
      color: var(--pink-dark);
      margin-bottom: 10px;
      letter-spacing: -1px;
      font-weight: 900;
      cursor: default;
      opacity: 1;
      transition:
        opacity 0.55s ease,
        transform 0.28s ease,
        text-shadow 0.28s ease;
    }

    h1:hover {
      transform: translateY(-2px) scale(1.015);
      text-shadow: 0 10px 24px rgba(232, 93, 139, 0.18);
    }

    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(232, 93, 139, 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: #e85d8b;
      border-color: rgba(255, 255, 255, 0.72);
    }

    .subtitle {
      font-size: 15px;
      color: var(--text-soft);
      max-width: 720px;
      margin: auto;
      line-height: 1.6;
      font-weight: 700;
    }

    .content {
      flex: 1;
      min-height: 0;
      display: grid;
      grid-template-columns: 0.44fr 1.96fr;
      gap: 18px;
      padding: 0 18px 0;
      position: relative;
      z-index: 2;
    }

    .timeline-wrap,
    .event-card {
      min-height: 0;
      position: relative;
      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);
    }

    .timeline-wrap {
      padding: 14px;
      overflow-y: auto;
      overflow-x: hidden;
    }

    body.dark .timeline-wrap {
      background:
        linear-gradient(180deg, rgba(38, 31, 40, 0.96), rgba(49, 37, 50, 0.96));
    }

    .timeline-wrap::-webkit-scrollbar {
      width: 7px;
    }

    .timeline-wrap::-webkit-scrollbar-thumb {
      background: #ec9db8;
      border-radius: 999px;
    }

    .timeline {
      position: relative;
      display: grid;
      grid-template-columns: 1fr;
      gap: 9px;
      padding: 0;
    }

    .time-btn {
      position: relative;
      border: 1px solid rgba(232, 93, 139, 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(214, 125, 155, 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(232, 93, 139, 0.1);
      border: 1px solid rgba(232, 93, 139, 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(232, 93, 139, 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(214, 125, 155, 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, #ff8bb0, #e85d8b);
      color: #ffffff;
      border-color: rgba(232, 93, 139, 0.45);
      box-shadow:
        0 16px 30px rgba(232, 93, 139, 0.26),
        0 0 0 5px rgba(232, 93, 139, 0.08);
    }

    .time-btn.active .time-btn-icon {
      background: #ffffff;
      color: #e85d8b;
      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, #ff8bb0, #e85d8b);
      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: #e85d8b;
    }

    .event-card {
      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(232, 93, 139, 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(232, 93, 139, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(232, 93, 139, 0.08) 1px, transparent 1px),
        #fff2f7;
      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(232, 93, 139, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(232, 93, 139, 0.06) 1px, transparent 1px),
        #fff4f8;
      background-size: 24px 24px;
    }

    body.dark .modal-photo-wrap {
      background:
        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),
        #211a23;
    }

    .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(232, 93, 139, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(232, 93, 139, 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(232, 93, 139, 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(232, 93, 139, 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: #e85d8b;
    }

    .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: 18px;
      background: rgba(255, 250, 252, 0.38);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      transition: 0.35s ease;
    }

    body.dark .lock-screen {
      background: rgba(25, 20, 26, 0.42);
    }

    .lock-screen.hidden {
      opacity: 0;
      pointer-events: none;
      transform: scale(1.03);
    }

    .lock-card {
      width: min(380px, 100%);
      background: rgba(255, 255, 255, 0.76);
      border: 1px solid rgba(255, 255, 255, 0.68);
      border-radius: 28px;
      padding: 26px;
      text-align: center;
      box-shadow:
        0 22px 64px rgba(157, 69, 98, 0.18),
        inset 0 1px 0 rgba(255,255,255,0.75);
      position: relative;
      overflow: visible;
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
    }

    body.dark .lock-card {
      background: rgba(38, 31, 40, 0.76);
      border-color: rgba(255, 255, 255, 0.16);
    }

    .lock-card::before,
    .lock-card::after {
      content: "";
      position: absolute;
      width: 58px;
      height: 15px;
      background: rgba(255, 229, 162, 0.62);
      border-radius: 6px;
      top: 14px;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    }

    .lock-card::before {
      left: 20px;
      transform: rotate(-8deg);
    }

    .lock-card::after {
      right: 20px;
      transform: rotate(8deg);
    }

    .lock-head {
      position: relative;
      z-index: 1;
      padding-top: 18px;
      margin-bottom: 18px;
      text-align: center;
    }

    .lock-icon {
      font-size: 42px;
      margin-bottom: 8px;
      animation: floaty 4s ease-in-out infinite;
    }

    .lock-card h2 {
      color: var(--pink-dark);
      font-size: 28px;
      margin-bottom: 8px;
      font-weight: 900;
      line-height: 1.1;
    }

    .lock-card p {
      color: var(--text-soft);
      font-size: 14px;
      line-height: 1.55;
      font-weight: 700;
    }

    .code-wrap {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      position: relative;
      z-index: 2;
      margin: 16px 0 12px;
    }

    .code-input {
      width: 54px;
      height: 58px;
      border-radius: 16px;
      border: 1.5px solid rgba(232, 93, 139, 0.22);
      background: rgba(255, 255, 255, 0.92);
      color: #8d344d;
      font-size: 26px;
      font-weight: 900;
      text-align: center;
      outline: none;
      box-shadow:
        inset 0 2px 8px rgba(232, 93, 139, 0.06),
        0 10px 18px rgba(214, 125, 155, 0.08);
      transition: 0.2s ease;
      padding: 0;
      line-height: 1;
      caret-color: transparent;
      appearance: none;
      -webkit-appearance: none;
    }

    .code-input::selection {
      background: transparent;
    }

    .code-input:focus {
      border-color: var(--pink);
      box-shadow:
        0 0 0 5px rgba(232, 93, 139, 0.1),
        0 10px 18px rgba(214, 125, 155, 0.08);
      transform: translateY(-2px);
    }

    body.dark .code-input {
      background: #ffffff;
      color: #8d344d;
    }

    .unlock-btn {
      border: none;
      background: linear-gradient(135deg, #ea7fa3, #e85d8b);
      color: #fff;
      border-radius: 999px;
      padding: 12px 18px;
      font-size: 14px;
      font-weight: 900;
      cursor: pointer;
      box-shadow: 0 12px 24px rgba(232, 93, 139, 0.18);
      transition: 0.2s ease;
      white-space: nowrap;
      width: 100%;
      margin-top: 2px;
    }

    .unlock-btn:hover {
      transform: translateY(-2px);
    }

    /* NÚT GỢI Ý MẬT KHẨU
       - Nút dấu ? đã được dời xuống dưới 4 ô nhập mã để người xem dễ thấy hơn.
       - Muốn đổi nội dung gợi ý thì sửa trong CONFIG.lockScreen.hint ở phần JavaScript bên dưới.
    */
    .hint-wrap {
      position: relative;
      z-index: 5;
      display: flex;
      justify-content: center;
      align-items: center;
      margin: 4px 0 14px;
    }

    .hint-btn {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      border: 1px solid rgba(232, 93, 139, 0.18);
      background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.96), rgba(255, 233, 242, 0.92));
      color: var(--pink-dark);
      font-size: 14px;
      font-weight: 900;
      cursor: pointer;
      display: grid;
      place-items: center;
      box-shadow:
        0 9px 18px rgba(214, 125, 155, 0.13),
        inset 0 1px 0 rgba(255,255,255,0.78);
      transition: 0.22s ease;
    }

    body.dark .hint-btn {
      background: #ffffff;
      color: #e85d8b;
      border-color: rgba(255, 255, 255, 0.72);
      box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
    }

    .hint-btn:hover {
      transform: translateY(-2px) scale(1.07) rotate(5deg);
      color: #ffffff;
      background: linear-gradient(135deg, #ff8bb0, #e85d8b);
      border-color: rgba(232, 93, 139, 0.35);
    }

    .hint-text {
      position: absolute;
      top: 42px;
      left: 50%;
      width: min(275px, calc(100vw - 70px));
      color: #6f263f;
      font-size: 13px;
      line-height: 1.5;
      font-weight: 900;
      opacity: 0;
      pointer-events: none;
      transform: translateX(-50%) translateY(-8px) scale(0.98);
      transition: 0.25s ease;
      background: #fff7fb;
      border: 1.5px solid rgba(157, 69, 98, 0.2);
      border-radius: 18px;
      padding: 11px 13px;
      box-shadow: 0 16px 38px rgba(141, 52, 77, 0.18);
      text-align: center;
      text-shadow: none;
    }

    .hint-text::before {
      content: "";
      position: absolute;
      top: -6px;
      left: 50%;
      width: 12px;
      height: 12px;
      background: #fff7fb;
      border-left: 1.5px solid rgba(157, 69, 98, 0.2);
      border-top: 1.5px solid rgba(157, 69, 98, 0.2);
      transform: translateX(-50%) rotate(45deg);
    }

    body.dark .hint-text {
      color: #6f263f;
      background: #fff7fb;
      border-color: rgba(157, 69, 98, 0.24);
      box-shadow: 0 16px 38px rgba(0, 0, 0, 0.26);
    }

    body.dark .hint-text::before {
      background: #fff7fb;
      border-color: rgba(157, 69, 98, 0.24);
    }

    .hint-text.show {
      opacity: 1;
      pointer-events: auto;
      transform: translateX(-50%) translateY(0) scale(1);
    }

    .lock-error {
      min-height: 20px;
      color: #d84f79;
      font-size: 13px;
      font-weight: 900;
      position: relative;
      z-index: 1;
      text-align: center;
      margin-top: 10px;
    }





    /* =========================================================
      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: 1px solid transparent;
      display: inline-flex;
      align-items: center;
      justify-content: flex-start;
      gap: 8px;
      min-height: 46px;
      min-width: 145px;
      padding: 11px 18px;
      color: #ffffff;
      background: linear-gradient(135deg, #ff8bb0, #e85d8b);
      border-radius: 999px;
      font-size: 13.5px;
      font-weight: 900;
      cursor: pointer;
      box-shadow: 0 18px 38px rgba(232, 93, 139, 0.28);
      transition: 0.24s ease;
    }

    .love-request-fab:hover {
      transform: translateY(-3px) scale(1.03);
      box-shadow: 0 22px 46px rgba(232, 93, 139, 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(232, 93, 139, 0.16);
      box-shadow: 0 16px 34px rgba(214, 125, 155, 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(232, 93, 139, 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(214, 125, 155, 0.1);
      transition: 0.22s ease;
    }

    .love-request-option:hover:not(:disabled) {
      transform: translateY(-2px);
      background: linear-gradient(135deg, #ff8bb0, #e85d8b);
      color: #ffffff;
      box-shadow: 0 16px 28px rgba(232, 93, 139, 0.2);
    }

    .love-request-option:disabled {
      opacity: 0.62;
      cursor: wait;
    }

    .love-request-option.selected {
      background: linear-gradient(135deg, #ff8bb0, #e85d8b);
      color: #ffffff;
      border-color: rgba(232, 93, 139, 0.42);
      box-shadow:
        0 16px 28px rgba(232, 93, 139, 0.22),
        0 0 0 5px rgba(232, 93, 139, 0.09);
      transform: translateY(-2px);
    }

    .love-request-note {
      width: 100%;
      min-height: 78px;
      resize: none;
      outline: none;
      border: 1.5px solid rgba(232, 93, 139, 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(232, 93, 139, 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(232, 93, 139, 0.1),
        inset 0 2px 8px rgba(232, 93, 139, 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, #ea7fa3, #e85d8b);
      font-size: 12.8px;
      line-height: 1;
      font-weight: 900;
      cursor: pointer;
      box-shadow: 0 10px 22px rgba(232, 93, 139, 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(232, 93, 139, 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: #e85d8b;
    }

    body.dark .love-request-option {
      background: #ffffff;
      color: #e85d8b;
      border-color: rgba(255, 255, 255, 0.72);
    }

    body.dark .love-request-option.selected {
      background: linear-gradient(135deg, #ff8bb0, #e85d8b);
      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(232, 93, 139, 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(232, 93, 139, 0.22);
      border-radius: 999px;
      font-size: 13.5px;
      font-weight: 900;
      cursor: pointer;
      box-shadow: 0 16px 34px rgba(214, 125, 155, 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(214, 125, 155, 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(232, 93, 139, 0.05);
      border-radius: 999px;
      border: 1px solid rgba(232, 93, 139, 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(232, 93, 139, 0.08);
      color: var(--pink);
    }

    .photobooth-step.active {
      background: var(--pink);
      color: #ffffff;
      box-shadow: 0 4px 10px rgba(232, 93, 139, 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(232, 93, 139, 0.16);
      box-shadow: 0 14px 28px rgba(214, 125, 155, 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(232, 93, 139, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(232, 93, 139, 0.06) 1px, transparent 1px),
        #fff4f8;
      background-size: 24px 24px;
      border: 2px solid rgba(240, 190, 209, 0.72);
      box-shadow:
        0 14px 32px rgba(141, 52, 77, 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(232, 93, 139, 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: 4;
      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, #ea7fa3, #e85d8b);
      box-shadow: 0 10px 22px rgba(232, 93, 139, 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(232, 93, 139, 0.18);
      box-shadow: 0 8px 18px rgba(214, 125, 155, 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(232, 93, 139, 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: #e85d8b;
      border-color: rgba(255, 255, 255, 0.65);
    }

    body.dark .photobooth-theme-option {
      background: transparent !important;
      color: #e85d8b;
      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: #e85d8b;
      border-color: rgba(255, 255, 255, 0.62);
    }

    body.dark .photobooth-card {
      background: var(--card-solid);
      border-color: rgba(255, 255, 255, 0.14);
    }

    body.dark .photobooth-stage {
      background:
        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),
        #211a23;
      background-size: 24px 24px;
    }

    @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;
        transform: scale(0.58) translateY(0);
        filter: blur(0px);
      }
      26% {
        opacity: 1;
      }
      100% {
        opacity: 0;
        transform: scale(1.16) translateY(-9px);
        filter: blur(5px);
      }
    }

    @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: 12px;
        padding: 7px 10px 7px 8px;
      }

      .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: 13px;
        line-height: 1.45;
      }

      .content {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 0 10px 10px;
      }

      .timeline-wrap {
        max-height: 112px;
        padding: 12px;
      }

      .timeline {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 8px;
      }

      .timeline::-webkit-scrollbar {
        height: 6px;
      }

      .timeline::-webkit-scrollbar-thumb {
        background: #ec9db8;
        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(232, 93, 139, 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: 12px;
      }

      .top-actions .streak-icon {
        width: 15px;
        height: 15px;
      }

      .love-pill {
        gap: 6px;
        max-width: 100%;
        padding: 6px 9px 6px 7px;
        font-size: 11.5px;
      }

      .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;
      }

      .timeline-wrap {
        max-height: none;
        padding: 8px;
        border-radius: 18px;
      }

      .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 {
        border-radius: 20px 20px 0 0 !important;
        border-bottom: none !important;
        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(214, 125, 155, 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(214, 125, 155, 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 {
        gap: 14px;
        padding: 0 8px 10px;
      }

      .timeline-wrap {
        margin-top: 2px;
        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(300px, 100%);
        margin: 9px auto 0;
        padding: 0;
        color: var(--pink-dark);
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
        font-size: 11.5px;
        line-height: 1.35;
        font-weight: 900;
      }

      body.dark .subtitle {
        color: #e85d8b;
        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;
      }

      .content {
        gap: 12px;
      }

      .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;
      }

    }

    @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(232, 93, 139, 0.045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(232, 93, 139, 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;
      transform: none !important;
    }

    .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(232, 93, 139, 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(232, 93, 139, 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: #ff8bb0 !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(232, 93, 139, 0.075);
        box-shadow:
          0 5px 12px rgba(214, 125, 155, 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, #ff8bb0, #e85d8b);
        box-shadow:
          0 9px 18px rgba(232, 93, 139, 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, #ff9aba, #e85d8b);
        box-shadow: 0 8px 16px rgba(232, 93, 139, 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: #ff8bb0 !important;
      }

      body.dark .music-play-btn:hover,
      body.dark .music-control-btn:active {
        color: #ffffff;
        background: linear-gradient(135deg, #ff8bb0, #e85d8b);
      }
    }


    /* =========================================================
      ✅ 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: #ec9db8;
      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(232, 93, 139, 0.24) !important;
      background:
        linear-gradient(to right, rgba(232, 93, 139, 0.055) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(232, 93, 139, 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(232, 93, 139, 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-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, #ff8bb0, #e85d8b);
      font-size: 38px;
      line-height: 1;
      box-shadow: 0 14px 28px rgba(232, 93, 139, 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, #ff8bb0, #e85d8b);
      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(232, 93, 139, 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, #ff8bb0, #e85d8b);
      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(232, 93, 139, 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(232, 93, 139, 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(232, 93, 139, 0.16);
      box-shadow: 0 14px 28px rgba(214, 125, 155, 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, #ff8bb0, #e85d8b);
      box-shadow: 0 12px 24px rgba(232, 93, 139, 0.18);
    }

    .photo-manage-delete {
      color: #c83d63;
      background: rgba(232, 93, 139, 0.085);
      border: 1px solid rgba(232, 93, 139, 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(232, 93, 139, 0.14);
    }

    body.dark .photo-manage-cancel,
    body.dark .photo-manage-delete {
      background: #ffffff;
      color: #e85d8b;
      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(232, 93, 139, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(232, 93, 139, 0.08) 1px, transparent 1px),
        #fff4f8;
      background-size: 22px 22px;
      border: 1px solid rgba(232, 93, 139, 0.16);
      box-shadow: 0 16px 34px rgba(214, 125, 155, 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: #e85d8b;
      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, #ff8bb0, #e85d8b);
      box-shadow: 0 12px 24px rgba(232, 93, 139, 0.18);
    }

    .photo-crop-cancel {
      color: var(--pink-dark);
      background: rgba(255, 255, 255, 0.92);
      border: 1px solid rgba(232, 93, 139, 0.14);
    }

    body.dark .photo-crop-cancel {
      background: #ffffff;
      color: #e85d8b;
      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(232, 93, 139, 0.045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(232, 93, 139, 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(232, 93, 139, 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(232, 93, 139, 0.3);
      border-color: rgba(232, 93, 139, 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: #e85d8b;
      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.42 !important;
      filter: grayscale(0.18) saturate(0.58) !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(232, 93, 139, 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(232, 93, 139, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(232, 93, 139, 0.08) 1px, transparent 1px),
        #fff3f8;
      background-size: 14px 14px;
      border: 1px solid rgba(232, 93, 139, 0.14);
      box-shadow: inset 0 1px 0 #fff;
    }

    .photobooth-layout-preview i {
      display: block;
      border-radius: 7px;
      background: linear-gradient(135deg, #ffc1d4, #e85d8b);
      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(232, 93, 139, 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;
    }

    .theme-mini-preview.love {
      background:
        radial-gradient(circle at 25% 18%, rgba(255,255,255,.8), transparent 30%),
        linear-gradient(135deg, #ffeff5, #ffb7d0, #f35f91);
    }

    .theme-mini-preview.summer {
      background:
        radial-gradient(circle at 78% 18%, rgba(255,245,170,.92), transparent 25%),
        linear-gradient(135deg, #fff5bf, #ffd38b, #ff9f9f, #7edbd3);
    }

    .theme-mini-preview.love .theme-mini-title,
    .theme-mini-preview.love .theme-mini-date {
      color: #a7355c;
    }

    .theme-mini-preview.summer .theme-mini-title,
    .theme-mini-preview.summer .theme-mini-date {
      color: #8a5b22;
    }

    .theme-mini-preview.matcha {
      background:
        linear-gradient(to right, rgba(78, 122, 90, 0.12) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(78, 122, 90, 0.12) 1px, transparent 1px),
        linear-gradient(135deg, #f2faf5, #d6ebd9, #a8cfae);
      background-size: 14px 14px, 14px 14px, auto;
    }
    .theme-mini-preview.matcha .theme-mini-title,
    .theme-mini-preview.matcha .theme-mini-date {
      color: #2c5438;
    }

    .theme-mini-preview.ocean {
      background:
        linear-gradient(to right, rgba(60, 120, 216, 0.14) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(60, 120, 216, 0.14) 1px, transparent 1px),
        linear-gradient(135deg, #f0f8ff, #cfe2f3, #9fc5e8, #ffe8d6);
      background-size: 14px 14px, 14px 14px, auto;
    }
    .theme-mini-preview.ocean .theme-mini-title,
    .theme-mini-preview.ocean .theme-mini-date {
      color: #1c3d5a;
    }

    .theme-mini-preview.vintage {
      background:
        linear-gradient(to right, rgba(100, 70, 40, 0.12) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(100, 70, 40, 0.12) 1px, transparent 1px),
        linear-gradient(135deg, #faf5ee, #eddcc8, #d2b48c);
      background-size: 14px 14px, 14px 14px, auto;
    }
    .theme-mini-preview.vintage .theme-mini-title,
    .theme-mini-preview.vintage .theme-mini-date {
      color: #5c4033;
    }

    .theme-mini-preview.galaxy {
      background:
        linear-gradient(to right, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(135deg, #1a0b2e, #3a1b5c, #7e3c88, #b15f9b);
      background-size: 14px 14px, 14px 14px, auto;
    }
    .theme-mini-preview.galaxy .theme-mini-title,
    .theme-mini-preview.galaxy .theme-mini-date {
      color: #f9f6fc;
    }
    .theme-mini-preview.galaxy .theme-mini-photo {
      background: rgba(255, 255, 255, 0.92);
      color: rgba(26, 11, 46, 0.72);
    }

    .theme-mini-preview.sunflower {
      background:
        linear-gradient(to right, rgba(139, 87, 0, 0.12) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(139, 87, 0, 0.12) 1px, transparent 1px),
        linear-gradient(135deg, #fffdf0, #ffebad, #ffd15c, #ffa834);
      background-size: 14px 14px, 14px 14px, auto;
    }
    .theme-mini-preview.sunflower .theme-mini-title,
    .theme-mini-preview.sunflower .theme-mini-date {
      color: #6d4000;
    }

    @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: inherit;
      font-size: 14px;
      font-weight: 700;
      position: relative;
      overflow: hidden !important;
    }

    .streak-btn::after {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 0%;
      background: linear-gradient(to right, rgba(232, 93, 139, 0.12), rgba(232, 93, 139, 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 {
      width: 22px;
      height: 22px;
      fill: #ff7675;
      display: inline-block;
      transition: transform 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s ease, fill 0.2s ease;
      filter: opacity(70%) grayscale(20%);
    }
    
    .streak-btn:hover:not(.active) .streak-icon {
      filter: opacity(95%);
      transform: scale(1.15) rotate(5deg);
    }
    
    .streak-btn.active {
      border-color: rgba(255, 110, 64, 0.36);
      box-shadow: 0 10px 24px rgba(255, 110, 64, 0.16);
      background: linear-gradient(to bottom, var(--card-solid), rgba(255, 240, 235, 0.42));
    }
    
    body.dark .streak-btn.active {
      background: linear-gradient(to bottom, var(--card-solid), rgba(255, 110, 64, 0.05));
    }
    
    .streak-btn.active .streak-icon {
      filter: drop-shadow(0 0 5px rgba(255, 71, 87, 0.65));
      fill: #ff4757;
      animation: streakFireGlow 1.2s ease-in-out infinite alternate;
    }
    
    @keyframes streakFireGlow {
      from {
        transform: scale(1);
        filter: drop-shadow(0 0 1px rgba(232, 93, 139, 0.4));
      }
      to {
        transform: scale(1.18) rotate(-4deg);
        filter: drop-shadow(0 0 6px rgba(232, 93, 139, 0.88));
      }
    }

    /* ✅ 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: 24px 20px 20px;
      border-radius: 32px;
      text-align: center;
      background: rgba(255, 255, 255, 0.98);
      border: 1.5px solid rgba(245, 198, 214, 0.8);
      box-shadow: 0 24px 70px rgba(61, 43, 43, 0.22);
      animation: photoManagePop 0.22s ease both;
    }

    body.dark .streak-popup-card {
      background: var(--card-solid);
      border-color: rgba(255, 255, 255, 0.12);
      box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
    }

    .streak-popup-close {
      position: absolute;
      top: 12px;
      right: 12px;
      width: 32px;
      height: 32px;
      border: none;
      background: rgba(232, 93, 139, 0.08);
      color: var(--pink-dark);
      border-radius: 50%;
      cursor: pointer;
      display: grid;
      place-items: center;
      transition: 0.2s ease;
      font-size: 18px;
      font-weight: bold;
    }

    .streak-popup-close:hover {
      background: var(--pink-soft);
      transform: rotate(90deg);
    }

    .streak-popup-title {
      color: var(--pink-dark);
      font-size: 20px;
      font-weight: 900;
      margin-bottom: 4px;
      margin-top: -6px;
    }

    .streak-popup-subtitle {
      color: var(--text-soft);
      font-size: 13px;
      font-weight: 800;
      line-height: 1.4;
      margin-bottom: 30px;
    }

    .streak-game-stage {
      width: 100%;
      height: 230px;
      position: relative;
      overflow: visible;
      margin-bottom: 18px;
      touch-action: none;
      background: radial-gradient(circle at 50% 80%, rgba(255, 230, 240, 0.48) 0%, rgba(255, 255, 255, 0.01) 70%);
      border: 1.5px dashed rgba(232, 93, 139, 0.16);
      border-radius: 24px;
      padding: 12px;
      box-shadow: inset 0 2px 8px rgba(232, 93, 139, 0.02);
    }

    body.dark .streak-game-stage {
      background: radial-gradient(circle at 50% 80%, rgba(232, 93, 139, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
      border-color: rgba(255, 255, 255, 0.08);
      box-shadow: none;
    }

    .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(232, 93, 139, 0.05);
      border: 1px solid rgba(232, 93, 139, 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: #ff8bb0;
    }

    .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(232, 93, 139, 0.06);
      border-radius: 999px;
      overflow: hidden;
      border: 1px solid rgba(232, 93, 139, 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: 4px;
      height: 12px;
      background: #70a1ff;
      border-radius: 50%;
      opacity: 0.85;
      animation: dropFalling 0.48s linear forwards;
    }
    .droplet.is-seed {
      background: #c0392b !important;
      border-radius: 50% / 30% 30% 70% 70% !important;
      width: 5px !important;
      height: 8px !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(232, 93, 139, 0.08);
      border-radius: 999px;
      overflow: hidden;
      border: 1px solid rgba(232, 93, 139, 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, #ff8bb0, #e85d8b);
      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: rgba(232, 93, 139, 0.02);
        border: 1.5px dashed rgba(232, 93, 139, 0.12);
        border-radius: 22px;
        padding: 12px;
        overflow: visible;
      }
      .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(232, 93, 139, 0.08);
      border-radius: 999px;
      overflow: hidden;
      border: 1px solid rgba(232, 93, 139, 0.06);
      box-shadow: inset 0 2px 4px rgba(232, 93, 139, 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, #ff8bb0, #e85d8b, #ff76a3, #e85d8b);
      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(232, 93, 139, 0.42);
    }

    @keyframes progressShimmer {
      0% { background-position: 0% 50%; }
      100% { background-position: 300% 50%; }
    }

    /* âœ… STREAK FLOWER STYLING (SVG Pot Growth Drawing) */
    .streak-flower-wrap {
      position: absolute;
      bottom: 16px;
      left: 50%;
      transform: translateX(-50%);
      width: 120px;
      height: 120px;
      user-select: none;
      pointer-events: none;
      transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    @media (max-width: 600px) {
      .streak-flower-wrap {
        width: 90px;
        height: 90px;
        bottom: 12px;
      }
      .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(232, 93, 139, 0.15);
      border-radius: 24px;
      width: 90%;
      max-width: 320px;
      padding: 24px;
      text-align: center;
      box-shadow: 0 20px 40px rgba(232, 93, 139, 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(232, 93, 139, 0.05);
      color: var(--pink-dark);
      border: 1px solid rgba(232, 93, 139, 0.15);
    }
    
    .streak-reset-btn.cancel:hover {
      background: rgba(232, 93, 139, 0.1);
    }
    
    .streak-reset-btn.confirm {
      background: linear-gradient(to right, #ff8bb0, #e85d8b);
      color: white;
      box-shadow: 0 4px 12px rgba(232, 93, 139, 0.24);
    }
    
    .streak-reset-btn.confirm:hover {
      transform: translateY(-1px);
      box-shadow: 0 6px 16px rgba(232, 93, 139, 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: #7d5be2;
      background: rgba(255, 255, 255, 0.94);
      border: 1px solid rgba(125, 91, 226, 0.22);
      border-radius: 999px;
      font-size: 13.5px;
      font-weight: 900;
      cursor: pointer;
      box-shadow: 0 16px 34px rgba(125, 91, 226, 0.14);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      transition: 0.24s ease;
    }

    .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: #7d5be2;
      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-popup.minimized {
      height: 48px;
    }

    .chat-popup.minimized .chat-body,
    .chat-popup.minimized .chat-footer {
      display: none;
    }

    .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, #ff8bb0, #e85d8b);
      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 #e85d8b;
      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;
      display: flex;
      flex-direction: column;
      gap: 10px;
      background: var(--bg-main, #fff6f8);
    }

    .chat-date-divider {
      text-align: center;
      font-size: 11px;
      color: var(--text-soft);
      margin: 4px 0;
      font-weight: 600;
    }

    .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, #ff8bb0, #e85d8b);
      color: #ffffff;
      border-top-right-radius: 4px;
      box-shadow: 0 4px 10px rgba(232, 93, 139, 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: #e85d8b;
    }

    .chat-send-btn {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: linear-gradient(135deg, #ff8bb0, #e85d8b);
      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);
      }
    }

    /* Mobile Responsive for Chat */
    @media (max-width: 900px) {
      .chat-popup {
        right: 22px;
        bottom: 200px;
      }
    }

    @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;
      }

      .chat-popup {
        left: 50% !important;
        right: auto !important;
        bottom: calc(10px + env(safe-area-inset-bottom)) !important;
        top: auto !important;
        transform: translateX(-50%) !important;
        width: calc(100% - 24px) !important;
        max-width: 340px !important;
        height: 350px !important;
        animation: chatMobileSlideUp 0.25s ease-out forwards !important;
      }
    }

    @keyframes chatMobileSlideUp {
      from {
        opacity: 0;
        transform: translate(-50%, 20px);
      }
      to {
        opacity: 1;
        transform: translate(-50%, 0);
      }
    }

    /* 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, #ff8bb0, #e85d8b);
      color: #ffffff;
      box-shadow: 0 2px 6px rgba(232, 93, 139, 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(232, 93, 139, 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: #e85d8b;
      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(232, 93, 139, 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(232, 93, 139, 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(232, 93, 139, 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(232, 93, 139, 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(232, 93, 139, 0.3);
      transition: all 0.25s ease;
      font-family: inherit;
    }

    .photobooth-preview-save-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(232, 93, 139, 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.45);
      border: 1px solid rgba(255, 255, 255, 0.15);
      color: #ffffff;
      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.12);
      font-family: inherit;
    }
    
    .camera-control-btn.active {
      background: rgba(232, 93, 139, 0.85);
      border-color: rgba(255, 255, 255, 0.2);
    }

    .camera-control-btn.timer-btn {
      background: var(--pink) !important;
      border-color: rgba(255, 255, 255, 0.25) !important;
      color: #ffffff !important;
    }

    .camera-control-btn:hover {
      transform: scale(1.06);
      background: rgba(0,0,0,0.6);
    }
    
    .camera-control-btn.active:hover {
      background: var(--pink);
    }

    .camera-control-btn:active {
      transform: scale(0.94);
    }

    .camera-control-btn svg {
      width: 13px;
      height: 13px;
      fill: currentColor;
    }

    .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;
      }
    }

