
    :root {
      --accent: #d9d0bd;
      --accent-strong: #efe5cf;
      --ink: #101126;
      --muted: rgba(217, 208, 189, .68);
      --line: rgba(217, 208, 189, .2);
      --surface: #2d2e5e;
      --paper: #d9d0bd;
      --frame-color: #ffffff;
      --frame-glaze: linear-gradient(135deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .03));
      --frame-overlay-url: none;
      --frame-overlay-position: center;
      --frame-overlay-size: 100% 100%;
      --variant-frame-aspect: .75;
      --variant-frame-ratio: 3 / 4;
      --variant-frame-width-factor: .75;
      --photo-box-x: 5%;
      --photo-box-y: 4%;
      --photo-box-w: 90%;
      --photo-box-h: 68%;
      --caption-color: #12151b;
      --caption-font-family: "Playfair Display", Georgia, "Times New Roman", serif;
      --caption-font-style: italic;
      --photo-url: none;
      --photo-original-url: none;
      --photo-x: 50%;
      --photo-y: 50%;
      --photo-filter: saturate(1.05) contrast(1.04) brightness(1);
      --grain-texture: none;
      --photo-brightness: 1;
      --stage-bg: #000;
      --stage-overlay-opacity: 0.44;
      --stage-overlay-brightness: 0.64;
      --overlay-glow: drop-shadow(0 0 1px rgba(255, 255, 255, 0.4)) drop-shadow(0 6px 24px rgba(255, 255, 255, 0.15));
      --frame-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06),
        0 8px 40px rgba(255, 255, 255, 0.03),
        0 4px 22px rgba(0, 0, 0, .25),
        0 1px 1px rgba(255, 255, 255, .8) inset;
    }

    html[data-theme="light"] {
      --accent: #efe7d6;
      --accent-strong: #d9d0bd;
      --ink: #101126;
      --muted: rgba(26, 27, 38, 0.6);
      --line: rgba(26, 27, 38, 0.1);
      --surface: #ffffff;
      --paper: #ffffff;
      --stage-bg: linear-gradient(135deg, #e2e8f0 0%, #f8fafc 100%);
      --stage-overlay-opacity: 0;
      --stage-overlay-brightness: 1;
      --overlay-glow: drop-shadow(0 8px 40px rgba(0, 0, 0, 0.25));
      --frame-shadow:
        0 30px 80px rgba(0, 0, 0, 0.28),
        0 10px 30px rgba(0, 0, 0, 0.15),
        0 1px 1px rgba(255, 255, 255, 0.8) inset;
    }

    /* Theme Toggle Base Styles */
    .theme-toggle {
      background: transparent;
      color: rgba(255, 255, 255, 0.8);
      border: 1px solid rgba(255, 255, 255, 0.3);
      display: flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      cursor: pointer;
      padding: 0;
    }

    .theme-toggle svg {
      width: 16px;
      height: 16px;
    }

    .theme-toggle .lucide-sun {
      display: block;
    }

    .theme-toggle .lucide-moon {
      display: none;
    }

    /* Light Theme Overrides */
    html[data-theme="light"] .topbar {
      background: var(--surface);
      border-bottom: 1px solid var(--line);
      color: var(--ink);
    }

    html[data-theme="light"] .theme-toggle {
      color: var(--ink);
      border-color: var(--line);
    }

    html[data-theme="light"] .theme-toggle .lucide-sun {
      display: none;
    }

    html[data-theme="light"] .theme-toggle .lucide-moon {
      display: block;
    }

    html[data-theme="light"] .brand {
      color: var(--ink);
    }

    html[data-theme="light"] .brand-by {
      color: rgba(16, 17, 38, 0.88);
    }

    html[data-theme="light"] .back-link,
    html[data-theme="light"] .wallet,
    html[data-theme="light"] .more-btn {
      color: var(--ink);
    }

    html[data-theme="light"] .recharge {
      background: var(--ink);
      color: #ffffff;
      border: none;
    }

    html[data-theme="light"] .panel {
      background: var(--surface);
      border-left: 1px solid var(--line);
      box-shadow: -18px 0 60px rgba(0, 0, 0, 0.04);
      color: var(--ink);
    }

    html[data-theme="light"] .panel label,
    html[data-theme="light"] .panel strong,
    html[data-theme="light"] .panel span,
    html[data-theme="light"] .panel div,
    html[data-theme="light"] .panel p,
    html[data-theme="light"] .panel input,
    html[data-theme="light"] .panel select,
    html[data-theme="light"] .panel button {
      color: var(--ink);
    }

    html[data-theme="light"] input[type="range"] {
      accent-color: var(--muted);
    }

    html[data-theme="light"] .section-title,
    html[data-theme="light"] .frame-group-tab {
      color: var(--muted) !important;
    }

    html[data-theme="light"] .frame-group-tab.is-active {
      color: var(--ink) !important;
      background: #ffffff;
      border-color: rgba(16, 17, 38, 0.2);
    }

    html[data-theme="light"] .option-card,
    html[data-theme="light"] .thumb-card {
      background: rgba(0, 0, 0, 0.1);
      color: var(--ink) !important;
    }

    html[data-theme="light"] .caption-chip-btn {
      background: rgba(0, 0, 0, 0.08);
      border-color: rgba(0, 0, 0, 0.18);
      color: var(--ink) !important;
    }

    html[data-theme="light"] #caption-date-stamp-btn {
      background: #fff0f6 !important;
      color: #c41d7f !important;
      border-color: #ffdeeb !important;
    }

    html[data-theme="light"] .caption-chip-btn:hover {
      background: rgba(0, 0, 0, 0.16);
      border-color: var(--accent);
    }

    html[data-theme="light"] #caption-suggest-box {
      background: #ffffff;
      border-color: rgba(0, 0, 0, 0.15);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    html[data-theme="light"] .caption-preset-item {
      background: rgba(0, 0, 0, 0.06);
      border-color: rgba(0, 0, 0, 0.12);
      color: var(--ink) !important;
    }

    html[data-theme="light"] .caption-preset-item:hover {
      background: var(--accent);
      color: #ffffff !important;
    }

    html[data-theme="light"] .thumb-card img,
    html[data-theme="light"] .thumb-card .mini-frame {
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
      border-radius: 2px;
    }

    html[data-theme="light"] .polaroid-card {
      box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.28),
        0 10px 30px rgba(0, 0, 0, 0.15),
        0 1px 1px rgba(255, 255, 255, 0.8) inset !important;
    }

    html[data-theme="light"] .ratio-grid {
      background: rgba(0, 0, 0, 0.04);
      border-color: rgba(0, 0, 0, 0.1);
    }

    html[data-theme="light"] .stage::after {
      display: none !important;
    }

    html[data-theme="light"] .stage-upload-cta {
      background: var(--accent);
      color: var(--ink);
      border: 1px solid rgba(16, 17, 38, 0.15);
    }

    html[data-theme="light"] .user-greeting {
      color: var(--ink);
    }

    html[data-theme="light"] .polafilm::before,
    html[data-theme="light"] .polafilm::after {
      display: none;
    }

    * {
      box-sizing: border-box;
    }

    html,
    body {
      height: 100%;
      margin: 0;
    }

    body {
      background: var(--surface);
      color: var(--ink);
      font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      letter-spacing: 0;
      -webkit-font-smoothing: antialiased;
      text-rendering: geometricPrecision;
    }


    button,
    input {
      font: inherit;
    }

    button {
      border: 0;
      cursor: pointer;
    }

    .polafilm {
      --card-width: min(clamp(320px, 32vw, 540px), calc((100vh - 240px - var(--ticker-height)) * .75));
      position: relative;
      height: 100vh;
      height: 100dvh;
      min-height: 100%;
      display: grid;
      grid-template-rows: 72px minmax(0, 1fr);
      overflow: hidden;
      background: var(--surface);
      isolation: isolate;
      transition: background 0.3s, color 0.3s;
    }

    .polafilm::before {
      content: "";
      position: fixed;
      inset: 0;
      z-index: -2;
      pointer-events: none;
      background:
        radial-gradient(circle at 50% 36%, rgba(255, 255, 255, .08), transparent 32%),
        linear-gradient(180deg, rgba(0, 0, 0, .08), rgba(0, 0, 0, .24));
    }

    .polafilm::after {
      content: "";
      position: fixed;
      inset: 0;
      z-index: -1;
      pointer-events: none;
      opacity: .28;
      background-image:
        linear-gradient(135deg, rgba(255, 255, 255, .12) 1px, transparent 1px),
        linear-gradient(45deg, rgba(0, 0, 0, .12) 1px, transparent 1px);
      background-size: 36px 36px, 42px 42px;
      mix-blend-mode: overlay;
    }

    .topbar {
      position: relative;
      z-index: 20;
      width: 100%;
      min-height: 72px;
      display: grid;
      grid-template-columns: minmax(150px, 1fr) auto minmax(220px, 1fr);
      align-items: center;
      gap: 22px;
      padding: 0 30px;
      color: var(--paper);
      background: rgba(16, 17, 38, .42);
      border-bottom: 1px solid rgba(217, 208, 189, .12);
      backdrop-filter: blur(16px);
    }

    .back-link,
    .wallet,
    .recharge,
    .action-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      min-height: 44px;
      border-radius: 8px;
      white-space: nowrap;
    }

    .back-link {
      width: max-content;
      padding: 0 6px;
      color: rgba(217, 208, 189, .7);
      font-size: 13px;
      font-weight: 700;
      text-decoration: none;
      min-height: 34px;
    }

    .brand {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      color: var(--paper);
      font-family: "Playfair Display", Georgia, serif;
      line-height: 1;
      letter-spacing: 0;
    }

    .brand-mark {
      display: none;
    }

    .brand-logo {
      height: 38px;
      width: auto;
      object-fit: contain;
      display: inline-block;
    }

    @media (max-width: 520px) {
      .brand-logo {
        height: 30px;
      }
    }

    .brand-title {
      font-size: 34px;
      font-style: italic;
      font-weight: 700;
      margin: 0;
    }

    .brand-by {
      transform: translateY(3px) rotate(-1.5deg);
      color: rgba(217, 208, 189, .88);
      font-family: "Caveat", "Brush Script MT", cursive;
      font-size: 21px;
      font-weight: 700;
      line-height: .9;
    }

    .top-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
    }

    .user-greeting {
      max-width: 170px;
      overflow: hidden;
      color: rgba(217, 208, 189, .72);
      font-size: 12px;
      font-weight: 750;
      text-overflow: ellipsis;
      white-space: nowrap;
      text-decoration: none;
      transition: color 0.2s ease;
    }

    .user-greeting:hover {
      color: rgba(217, 208, 189, 1);
    }

    .wallet {
      min-width: auto;
      min-height: 32px;
      padding: 0 12px;
      color: var(--paper);
      background: rgba(255, 255, 255, .08);
      border: 1px solid rgba(217, 208, 189, .18);
      font-size: 12px;
      font-weight: 700;
      transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
      cursor: pointer;
    }

    .wallet.is-pulse {
      border-color: rgba(255, 214, 137, .72);
      box-shadow: 0 0 0 4px rgba(255, 214, 137, .14), 0 0 26px rgba(255, 214, 137, .18);
      transform: translateY(-1px);
    }

    .top-divider {
      display: none;
    }

    .recharge {
      min-width: auto;
      min-height: 32px;
      padding: 0 12px;
      color: #2d2e5e;
      background: var(--paper);
      box-shadow: none;
      font-size: 12px;
      font-weight: 800;
    }

    .polafilm-modal {
      position: fixed;
      inset: 0;
      z-index: 20;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
      background: rgba(4, 5, 12, .62);
      backdrop-filter: blur(10px);
    }

    .polafilm-modal.is-open {
      display: flex;
    }

    .polafilm-dialog {
      width: min(420px, 100%);
      border: 1px solid rgba(217, 208, 189, .2);
      border-radius: 10px;
      padding: 20px;
      color: var(--paper);
      background: #151632;
      box-shadow: 0 24px 80px rgba(0, 0, 0, .36);
    }

    .polafilm-dialog h2 {
      margin: 0 0 8px;
      font-size: 22px;
      line-height: 1.2;
    }

    .polafilm-dialog p {
      margin: 0 0 16px;
      color: rgba(217, 208, 189, .78);
      font-size: 13px;
      line-height: 1.55;
    }

    .point-input-row {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 10px;
      align-items: end;
      margin-bottom: 14px;
    }

    .point-input-row label {
      display: grid;
      gap: 6px;
      font-size: 12px;
      font-weight: 800;
    }

    .point-input-row input {
      width: 100%;
      height: 44px;
      border: 1px solid rgba(217, 208, 189, .22);
      border-radius: 8px;
      padding: 0 12px;
      color: var(--paper);
      background: rgba(255, 255, 255, .06);
      font: inherit;
      font-weight: 800;
    }

    .point-input-row.is-invalid input {
      border-color: rgba(255, 98, 98, .88);
      box-shadow: 0 0 0 3px rgba(255, 98, 98, .12);
    }

    .point-total {
      min-width: 128px;
      height: 44px;
      display: grid;
      place-items: center;
      border-radius: 8px;
      color: #2d2e5e;
      background: var(--paper);
      font-size: 13px;
      font-weight: 900;
    }

    .modal-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .modal-button {
      min-height: 42px;
      border: 0;
      border-radius: 8px;
      color: var(--paper);
      background: rgba(255, 255, 255, .08);
      font: inherit;
      font-size: 13px;
      font-weight: 850;
      cursor: pointer;
    }

    .modal-button.primary {
      color: #fff;
      background: #1677ff;
    }

    .modal-button:disabled {
      cursor: wait;
      opacity: .68;
    }

    .modal-note {
      min-height: 18px;
      margin-top: 12px;
      color: rgba(217, 208, 189, .72);
      font-size: 12px;
      line-height: 1.45;
    }

    .modal-note.is-error {
      color: #ff8f8f;
      font-weight: 800;
    }

    .quality-options label {
      display: flex;
      align-items: center;
      justify-content: space-between;
      border: 1px solid rgba(217, 208, 189, .2);
      border-radius: 8px;
      padding: 10px 12px;
      background: rgba(255, 255, 255, .045);
      cursor: pointer;
      transition: all 0.2s;
    }

    .quality-options label:hover {
      border-color: rgba(22, 119, 255, 0.4);
      background: rgba(255, 255, 255, .07);
    }

    .quality-options label.is-selected {
      border-color: #1677ff !important;
      background: rgba(22, 119, 255, 0.08) !important;
    }

    .qr-payment {
      display: none;
      gap: 14px;
      margin: 4px 0 16px;
    }

    .qr-payment.is-visible {
      display: grid;
    }

    .qr-frame {
      display: grid;
      place-items: center;
      border-radius: 10px;
      padding: 12px;
      background: #fff;
    }

    .qr-frame img {
      width: min(230px, 100%);
      aspect-ratio: 1;
      display: block;
    }

    .payment-info {
      display: grid;
      gap: 7px;
      border: 1px solid rgba(217, 208, 189, .14);
      border-radius: 8px;
      padding: 10px 12px;
      background: rgba(255, 255, 255, .045);
      font-size: 12px;
    }

    .payment-info div {
      display: flex;
      justify-content: space-between;
      gap: 12px;
    }

    .payment-info strong {
      color: var(--paper);
      text-align: right;
    }

    .point-history {
      display: none;
      gap: 8px;
      margin: 4px 0 16px;
      max-height: 330px;
      overflow-y: auto;
      padding-right: 2px;
      scrollbar-width: thin;
      scrollbar-color: rgba(217, 208, 189, .32) transparent;
    }

    .point-history.is-visible {
      display: grid;
    }

    .history-item {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 6px 12px;
      border: 1px solid rgba(217, 208, 189, .13);
      border-radius: 8px;
      padding: 10px 12px;
      background: rgba(255, 255, 255, .045);
    }

    .history-note {
      color: var(--paper);
      font-size: 13px;
      font-weight: 820;
    }

    .history-date,
    .history-balance {
      color: rgba(217, 208, 189, .62);
      font-size: 11px;
    }

    .history-points {
      grid-row: span 2;
      align-self: center;
      font-size: 14px;
      font-weight: 900;
    }

    .history-points.is-plus {
      color: #9de0b0;
    }

    .history-points.is-minus {
      color: #ffb5a6;
    }

    .history-empty {
      border: 1px dashed rgba(217, 208, 189, .18);
      border-radius: 8px;
      padding: 18px;
      color: rgba(217, 208, 189, .7);
      text-align: center;
      font-size: 13px;
    }

    .security-toast {
      position: fixed;
      left: 50%;
      bottom: 22px;
      z-index: 30;
      max-width: min(360px, calc(100vw - 32px));
      transform: translate(-50%, 18px);
      border: 1px solid rgba(217, 208, 189, .18);
      border-radius: 8px;
      padding: 11px 14px;
      color: var(--paper);
      background: rgba(16, 17, 38, .94);
      box-shadow: 0 18px 50px rgba(0, 0, 0, .34);
      font-size: 12px;
      font-weight: 800;
      line-height: 1.45;
      opacity: 0;
      pointer-events: none;
      transition: opacity .18s ease, transform .18s ease;
    }

    .security-toast.is-visible {
      transform: translate(-50%, 0);
      opacity: 1;
    }

    .verify-toast {
      position: fixed;
      top: 20px;
      right: 20px;
      background: #1f2937;
      border-left: 4px solid #eab308;
      color: #fff;
      padding: 16px;
      border-radius: 8px;
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
      z-index: 999999;
      transform: translateX(120%);
      transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      display: flex;
      flex-direction: column;
      gap: 12px;
      width: 320px;
    }

    .verify-toast.is-visible {
      transform: translateX(0);
    }

    .verify-toast-content {
      display: flex;
      gap: 12px;
      align-items: flex-start;
    }

    .verify-toast-content i {
      color: #eab308;
      flex-shrink: 0;
      margin-top: 2px;
    }

    .verify-toast-content p {
      margin: 4px 0 0;
      font-size: 13px;
      color: #9ca3af;
      line-height: 1.4;
    }

    .verify-toast-actions {
      display: flex;
      gap: 8px;
      justify-content: flex-end;
    }

    .pola-btn-toast-primary,
    .pola-btn-toast-secondary {
      border: none;
      border-radius: 4px;
      padding: 6px 12px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s;
    }

    .pola-btn-toast-primary {
      background: #e2a866;
      color: #1a1a1a;
    }

    .pola-btn-toast-primary:hover {
      background: #f3b977;
    }

    .pola-btn-toast-secondary {
      background: transparent;
      color: #9ca3af;
    }

    .pola-btn-toast-secondary:hover {
      background: rgba(255, 255, 255, 0.1);
      color: #fff;
    }

    .verify-toast-progress {
      position: absolute;
      bottom: 0;
      left: 0;
      height: 3px;
      background: #eab308;
      width: 100%;
      border-bottom-left-radius: 8px;
    }

    .verify-toast.is-visible .verify-toast-progress {
      animation: verifyToastCountdown 7s linear forwards;
    }

    .verify-toast:hover .verify-toast-progress {
      animation-play-state: paused;
    }

    @keyframes verifyToastCountdown {
      from {
        width: 100%;
      }

      to {
        width: 0%;
      }
    }

    .app-shell {
      width: 100%;
      min-height: 0;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 420px;
      align-items: stretch;
      gap: 0;
      padding: 0;
      overflow: hidden;
    }

    .stage {
      position: relative;
      min-width: 0;
      min-height: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 28px;
      width: 100%;
      height: 100%;
      padding: 20px 28px 28px;
      overflow: hidden;
      background: var(--stage-bg);
      transition: background 0.3s;
      isolation: isolate;
    }

    .stage::before {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      opacity: var(--stage-overlay-opacity);
      background: var(--photo-url) center / cover no-repeat;
      filter: blur(10px) saturate(.85) brightness(var(--stage-overlay-brightness));
      transform: scale(1.18);
      z-index: -1;
      transition: opacity 0.3s, filter 0.3s;
    }

    .stage::after {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background: rgba(0, 0, 0, .5);
      opacity: 1;
      mix-blend-mode: normal;
    }

    .file-input {
      position: fixed;
      left: -9999px;
      top: 0;
      inline-size: 1px;
      block-size: 1px;
      opacity: 0;
    }

    .preview-wrap {
      position: relative;
      flex: 0 0 auto;
      z-index: 1;
      display: grid;
      place-items: center;
      margin-top: -5vh;
      /* Đưa preview-wrap gần với ticker hơn */
    }

    .preview-wrap::after {
      content: "";
      position: absolute;
      z-index: -1;
      display: none;
      pointer-events: none;
    }

    .preview-wrap.preview-wide {
      width: min(clamp(320px, 56vw, 760px), calc(100vw - 500px), calc((100vh - 300px - var(--ticker-height)) * 1.5));
      height: auto;
    }

    .stage-upload-cta {
      position: relative;
      flex: 0 0 auto;
      z-index: 2;
      min-height: 54px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      padding: 0 24px;
      border: 1px solid rgba(255, 255, 255, .18);
      border-radius: 4px;
      color: #2d2e5e;
      background: var(--paper);
      box-shadow: 0 18px 46px rgba(0, 0, 0, .22);
      font-size: 14px;
      font-weight: 840;
      text-decoration: none;
      white-space: nowrap;
      cursor: pointer;
      transition: opacity .16s ease, visibility .16s ease, background .16s ease, box-shadow .16s ease, transform .14s ease;
    }

    .stage-upload-cta:hover {
      background: var(--accent-strong);
      box-shadow: 0 22px 58px rgba(0, 0, 0, .3);
    }

    .stage-upload-cta:active {
      transform: translateY(1px);
    }

    .stage-upload-cta .lucide {
      width: 27px;
      height: 27px;
      stroke-width: 2.25;
    }

    .stage-actions {
      position: relative;
      z-index: 3;
      width: fit-content;
      max-width: calc(100% - 24px);
      display: flex !important;
      flex-direction: row !important;
      flex-wrap: nowrap !important;
      justify-content: center;
      gap: 10px;
      margin-top: 8px;
      align-self: center;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
    }

    .stage-action-button {
      position: relative;
      overflow: visible;
      min-height: 42px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 0 10px;
      border: 1px solid rgba(255, 255, 255, .08);
      border-radius: 999px;
      color: var(--paper);
      background: rgba(16, 17, 38, .9);
      box-shadow: 0 16px 40px rgba(0, 0, 0, .22);
      font-size: 11px;
      font-weight: 820;
      letter-spacing: .01em;
      cursor: pointer;
      transition: transform .14s ease, filter .16s ease, background .16s ease, box-shadow .16s ease;
      flex: 1 1 auto;
      min-width: 0;
      white-space: nowrap;
    }

    #stage-random-light-leak,
    #panel-random-light-leak {
      background: linear-gradient(135deg, #ff7a18, #af002d 31.25%, #319197 100%);
      border-color: rgba(255, 255, 255, .2);
    }

    .stage-action-button.primary {
      background: linear-gradient(135deg, #2d8cff, #126dff);
      border-color: rgba(255, 255, 255, .14);
      box-shadow: 0 18px 48px rgba(18, 109, 255, .24), 0 16px 38px rgba(0, 0, 0, .22);
    }

    .stage-action-button:hover {
      filter: brightness(1.07);
      transform: translateY(-1px);
      box-shadow: 0 22px 54px rgba(0, 0, 0, .28);
    }

    .stage-action-button:disabled {
      cursor: progress;
      opacity: .7;
      filter: none;
    }

    .stage-action-button:active {
      transform: translateY(1px);
    }

    .stage-action-button .lucide {
      width: 18px;
      height: 18px;
      stroke-width: 2.45;
    }


    .polaroid-card {
      --frame-padding: clamp(15px, calc(var(--card-width) * .046), 23px);
      --bottom-padding: clamp(65px, calc(var(--card-width) * .2), 100px);
      --photo-ratio: 1 / 1;
      position: relative;
      width: var(--card-width);
      height: calc(var(--card-width) * 1.333333);
      aspect-ratio: auto;
      display: grid;
      grid-template-rows: minmax(0, 1fr) auto;
      padding: var(--frame-padding) var(--frame-padding) var(--bottom-padding);
      border-radius: 2px;
      background:
        var(--frame-glaze),
        var(--frame-color);
      box-shadow: var(--frame-shadow);
      transform: scale(var(--preview-zoom, 1));
      transform-origin: center center;
      transition: width .22s ease, aspect-ratio .22s ease, padding .22s ease, background .18s ease, transform .18s ease;
    }

    .polaroid-card::before {
      content: "";
      position: absolute;
      inset: 0;
      border-radius: inherit;
      opacity: .2;
      pointer-events: none;
      background-image:
        linear-gradient(90deg, rgba(18, 22, 29, .045) 1px, transparent 1px),
        linear-gradient(rgba(18, 22, 29, .035) 1px, transparent 1px);
      background-size: 14px 14px;
      mix-blend-mode: multiply;
    }

    .polaroid-card::after {
      content: "";
      position: absolute;
      inset: 0;
      border-radius: inherit;
      border: 1px solid rgba(255, 255, 255, .08);
      pointer-events: none;
    }

    .polaroid-card.frame-none {
      --frame-padding: 0px;
      --bottom-padding: 0px;
      background: transparent;
      box-shadow: none;
      height: auto !important;
      aspect-ratio: var(--variant-frame-aspect) !important;
    }

    .polaroid-card.frame-none .photo-slot {
      border-radius: 0;
      box-shadow: none;
    }

    .polaroid-card.show-original .photo-transition {
      opacity: 0 !important;
    }

    .polaroid-card.show-original .preview-light-leak {
      opacity: 0 !important;
    }

    .polaroid-card.show-original .photo-slot {
      filter: none !important;
    }

    .polaroid-card.show-original .photo-slot::before {
      opacity: 1;
    }

    .polaroid-card.frame-none::before,
    .polaroid-card.frame-none::after {
      display: none;
    }

    .polaroid-card.frame-none .photo-slot {
      box-shadow: none;
      width: 100% !important;
      height: 100% !important;
      aspect-ratio: var(--variant-frame-aspect) !important;
    }

    .png-overlay-frame {
      background: transparent;
      box-shadow: none;
      filter: var(--overlay-glow);
    }

    .png-overlay-frame::before,
    .png-overlay-frame::after {
      display: none;
    }

    .preview-light-leak {
      position: absolute;
      inset: 0;
      z-index: 10;
      pointer-events: none;
      mix-blend-mode: screen;
      background-size: 100% 100%;
      background-position: center;
      background-repeat: no-repeat;
      opacity: 0;
      transition: opacity 0.3s ease;
    }

    .preview-light-leak.is-active {
      opacity: 1;
    }

    .png-overlay-frame .caption {
      display: none;
    }


    .tool-locked {
      --card-width: min(clamp(320px, 30vw, 460px), calc((100vh - 240px - var(--ticker-height)) * .75));
    }

    .tool-locked .stage {
      grid-template-rows: auto auto;
      align-content: center;
      justify-items: center;
      gap: 18px;
    }

    .tool-locked .preview-wrap,
    .tool-locked .preview-wrap.preview-wide {
      width: var(--card-width);
      height: calc(var(--card-width) * 1.333333);
    }

    .tool-locked .polaroid-card,
    .tool-locked .polaroid-card.ratio-wide,
    .tool-locked .polaroid-card.variant-frame {
      width: var(--card-width);
      height: calc(var(--card-width) * 1.333333);
      aspect-ratio: auto;
      padding: var(--frame-padding) var(--frame-padding) var(--bottom-padding);
      overflow: visible;
      transition: none;
    }

    .tool-locked .variant-frame .photo-slot {
      position: relative;
      left: auto;
      top: auto;
      width: 100%;
      height: auto;
      max-height: 100%;
      aspect-ratio: var(--photo-ratio);
    }

    .tool-locked .stage-upload-cta {
      position: relative;
      left: auto;
      bottom: auto;
      transform: none;
    }

    .tool-locked .stage-upload-cta:active {
      transform: translateY(1px);
    }

    .photo-slot::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 2;
      background-image: var(--photo-original-url);
      background-position: var(--photo-x) var(--photo-y);
      background-size: cover;
      background-repeat: no-repeat;
      opacity: 0;
      transition: opacity 0.2s ease-out;
      pointer-events: none;
    }

    .photo-slot {
      position: relative;
      z-index: 1;
      width: 100%;
      max-height: 100%;
      align-self: start;
      justify-self: center;
      aspect-ratio: var(--photo-ratio);
      overflow: hidden;
      border-radius: 2px;
      background-color: #f8fafc;
      box-shadow: inset 0 0 0 1px rgba(5, 8, 12, .13);
      cursor: grab;
      touch-action: none;
      user-select: none;
      transition: aspect-ratio .22s ease;
    }

    .photo-image {
      position: absolute;
      inset: 0;
      z-index: 0;
      background-image: var(--photo-url);
      background-position: var(--photo-x) var(--photo-y);
      background-size: cover;
      background-repeat: no-repeat;
      filter: var(--photo-filter);
      will-change: filter, background-position;
    }

    .photo-slot.is-dragging {
      cursor: grabbing;
    }

    .photo-transition {
      position: absolute;
      inset: 0;
      z-index: 1;
      display: block;
      opacity: 0;
      pointer-events: none;
      background-image: var(--photo-next-url);
      background-position: var(--photo-x) var(--photo-y);
      background-size: cover;
      background-repeat: no-repeat;
      filter: var(--photo-filter);
      transition: opacity .34s ease;
      will-change: opacity, filter;
    }

    .photo-slot.is-filter-ready .photo-transition {
      opacity: 1;
    }

    .photo-loading {
      position: absolute;
      left: 50%;
      bottom: 14px;
      z-index: 4;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 30px;
      padding: 0 12px;
      border: 1px solid rgba(255, 255, 255, .22);
      border-radius: 999px;
      color: #fff;
      background: rgba(9, 10, 18, .56);
      box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
      font-size: 11px;
      font-weight: 780;
      opacity: 0;
      transform: translate(-50%, 8px);
      pointer-events: none;
      backdrop-filter: blur(10px);
      transition: opacity .18s ease, transform .18s ease;
    }

    .photo-loading::before {
      content: "";
      width: 9px;
      height: 9px;
      border-radius: 50%;
      background: var(--accent-strong);
      box-shadow: 0 0 0 0 rgba(255, 222, 181, .45);
      animation: filterPulse .9s ease-in-out infinite;
    }

    .photo-slot.is-filter-loading .photo-loading {
      opacity: 1;
      transform: translate(-50%, 0);
    }

    @keyframes filterPulse {

      0%,
      100% {
        transform: scale(.82);
        box-shadow: 0 0 0 0 rgba(255, 222, 181, .38);
      }

      50% {
        transform: scale(1);
        box-shadow: 0 0 0 7px rgba(255, 222, 181, 0);
      }
    }

    .photo-slot::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 3;
      pointer-events: none;
      opacity: var(--grain-opacity, .1);
      background-image: var(--grain-texture);
      background-position: center;
      background-size: 300px 300px;
      mix-blend-mode: soft-light;
    }



    .caption {
      position: absolute;
      left: 38px;
      right: 38px;
      bottom: 24px;
      z-index: 3;
      min-height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--caption-color);
      font-family: var(--caption-font-family);
      font-size: var(--caption-font-size, 18px);
      font-style: var(--caption-font-style);
      line-height: 1.1;
      text-align: center;
      cursor: move;
      user-select: none;
      touch-action: none;
      border: 1px dashed transparent;
      border-radius: 4px;
      padding: 2px 4px;
      transition: border-color 0.2s, background-color 0.2s;
    }

    .caption:hover,
    .caption.is-dragging {
      border-color: rgba(0, 0, 0, 0.28);
      background-color: rgba(255, 255, 255, 0.18);
    }

    .frame-overlay {
      position: absolute;
      inset: 0;
      z-index: 2;
      display: none;
      border-radius: inherit;
      pointer-events: none;
      background-image: var(--frame-overlay-url);
      background-position: var(--frame-overlay-position);
      background-size: var(--frame-overlay-size);
      background-repeat: no-repeat;
    }

    .has-frame-overlay .frame-overlay {
      display: block;
    }


    .variant-frame {
      width: min(clamp(320px, 52vw, 720px), calc((100vh - 240px - var(--ticker-height)) * var(--variant-frame-width-factor)));
      height: auto;
      aspect-ratio: var(--variant-frame-ratio);
      padding: 0;
      overflow: hidden;
      --frame-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.25),
        0 8px 40px rgba(255, 255, 255, 0.12),
        0 4px 30px rgba(0, 0, 0, .4),
        0 1px 1px rgba(255, 255, 255, .15) inset;
    }

    .variant-frame .photo-slot {
      position: absolute;
      left: var(--photo-box-x);
      top: var(--photo-box-y);
      width: var(--photo-box-w);
      height: var(--photo-box-h);
      max-width: none;
      max-height: none;
      aspect-ratio: auto;
    }


    .ratio-portrait {
      --photo-ratio: 4 / 5;
      --card-width: min(clamp(300px, 30vw, 500px), calc((100vh - 240px - var(--ticker-height)) * .75));
    }

    .ratio-portrait:not(.variant-frame) .photo-slot {
      width: 82%;
      max-height: none;
      aspect-ratio: 4 / 5;
    }

    .ratio-portrait:not(.variant-frame) .caption {
      bottom: 22px;
    }


    .ratio-story {
      --photo-ratio: 9 / 16;
      --card-width: min(clamp(280px, 28vw, 440px), calc((100vh - 240px - var(--ticker-height)) * .5625));
      --bottom-padding: clamp(72px, calc(var(--card-width) * .22), 110px);
    }

    .ratio-story:not(.variant-frame) .photo-slot {
      width: 82%;
      max-height: none;
      aspect-ratio: 9 / 16;
    }

    .frame-paper {
      --frame-color: #efe3ce;
      --frame-glaze: linear-gradient(135deg, rgba(255, 248, 235, .38), rgba(221, 196, 160, .12));
      --frame-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06),
        0 8px 40px rgba(255, 255, 255, 0.03),
        34px 48px 52px rgba(48, 33, 16, .22),
        12px 18px 20px rgba(48, 33, 16, .13),
        0 1px 1px rgba(255, 255, 255, .55) inset;
    }

    .frame-black {
      --frame-color: #161616;
      --frame-glaze: linear-gradient(135deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .01));
      color: #fff;
      --frame-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.25),
        0 8px 40px rgba(255, 255, 255, 0.12),
        34px 48px 56px rgba(0, 0, 0, .4),
        12px 18px 22px rgba(0, 0, 0, .25),
        0 1px 1px rgba(255, 255, 255, .15) inset;
    }

    .frame-black .caption {
      color: #f5f5f2;
    }

    .frame-strip {
      --frame-color: #111318;
      --frame-glaze: linear-gradient(135deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .01));
      --frame-padding: clamp(44px, calc(var(--card-width) * .136), 68px);
      --bottom-padding: clamp(88px, calc(var(--card-width) * .272), 136px);
      --frame-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.25),
        0 8px 40px rgba(255, 255, 255, 0.12),
        0 4px 30px rgba(0, 0, 0, .4),
        0 1px 1px rgba(255, 255, 255, .15) inset;
    }

    .frame-strip .caption {
      color: #f5f5f2;
    }

    .frame-strip .photo-slot {
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
    }

    .frame-strip.ratio-story {
      --bottom-padding: clamp(72px, calc(var(--card-width) * .22), 110px);
    }

    .ratio-landscape {
      --photo-ratio: 3 / 2;
    }

    .ratio-landscape:not(.variant-frame) .photo-slot {
      width: 100%;
      max-height: none;
      aspect-ratio: 3 / 2;
    }

    .ratio-wide {
      --photo-ratio: 16 / 9;
      --bottom-padding: clamp(72px, calc(var(--card-width) * .22), 110px);
    }

    .preview-wrap.preview-wide .polaroid-card,
    .polaroid-card.ratio-wide:not(.variant-frame) {
      width: 100%;
      height: auto;
    }

    .polaroid-card.ratio-wide:not(.variant-frame) {
      display: block;
    }

    .ratio-wide:not(.variant-frame) .photo-slot {
      width: 100%;
      max-height: none;
      aspect-ratio: 16 / 9;
    }

    .frame-strip.ratio-wide {
      --bottom-padding: clamp(72px, calc(var(--card-width) * .22), 110px);
    }

    .frame-strip::before {
      opacity: 1;
      background:
        repeating-linear-gradient(0deg, transparent 0 18px, rgba(255, 255, 255, .94) 18px 28px, transparent 28px 46px) left 23px top 34px / 14px calc(100% - 68px) no-repeat,
        repeating-linear-gradient(0deg, transparent 0 18px, rgba(255, 255, 255, .94) 18px 28px, transparent 28px 46px) right 23px top 34px / 14px calc(100% - 68px) no-repeat;
      mix-blend-mode: normal;
    }

    .panel {
      width: 100%;
      min-width: 0;
      min-height: 0;
      overflow-y: auto;
      background: rgba(16, 17, 38, .68);
      border-left: 1px solid rgba(217, 208, 189, .14);
      box-shadow: -18px 0 60px rgba(0, 0, 0, .16);
      backdrop-filter: blur(18px);
      scrollbar-width: thin;
      scrollbar-color: rgba(217, 208, 189, .32) transparent;
    }

    .panel::-webkit-scrollbar {
      width: 8px;
    }

    .panel::-webkit-scrollbar-track {
      background: transparent;
    }

    .panel::-webkit-scrollbar-thumb {
      border: 2px solid transparent;
      border-radius: 999px;
      background: rgba(217, 208, 189, .34);
      background-clip: content-box;
    }

    .panel-inner {
      width: 100%;
      max-width: 384px;
      margin: 0 auto;
      padding: 22px 18px 24px;
    }

    .control-section {
      padding: 0;
      margin: 0 0 15px;
      border-bottom: 0;
    }

    .control-section:last-child {
      border-bottom: 0;
      margin-bottom: 0;
      padding-bottom: 0;
    }

    .section-title {
      margin: 0 0 13px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 820;
      letter-spacing: 0;
      text-transform: uppercase;
      text-align: left;
    }

    .ratio-grid {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 6px;
      padding: 6px;
      border: 1px solid rgba(217, 208, 189, .2);
      border-radius: 3px;
      background: rgba(0, 0, 0, .12);
    }

    .frame-group-tabs {
      display: grid;
      grid-auto-flow: column;
      grid-auto-columns: max-content;
      gap: 6px;
      overflow-x: auto;
      margin-bottom: 7px;
      padding-bottom: 2px;
      scrollbar-width: none;
      -ms-overflow-style: none;
      cursor: grab;
      user-select: none;
    }

    .frame-group-tabs::-webkit-scrollbar {
      display: none;
      width: 0;
      height: 0;
    }

    .frame-group-tab {
      min-height: 30px;
      padding: 0 10px;
      border-radius: 2px;
      color: var(--muted);
      background: rgba(255, 255, 255, .04);
      border: 1px solid rgba(217, 208, 189, .16);
      font-size: 10px;
      font-weight: 820;
      line-height: 1;
      white-space: nowrap;
    }

    .color-preset-btn {
      transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .color-preset-btn:hover {
      transform: scale(1.15);
    }

    .color-preset-btn.is-active {
      border-color: #ffffff !important;
      transform: scale(1.2);
      box-shadow: 0 0 12px rgba(255, 255, 255, 0.6) !important;
    }

    .frame-group-tab.is-active {
      color: #2d2e5e;
      background: var(--paper);
      border-color: var(--paper);
    }

    .option-card,
    .thumb-card {
      min-width: 0;
      border: 0;
      background: rgba(255, 255, 255, .04);
      color: var(--paper);
      box-shadow: none;
      transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
    }

    .option-card {
      height: 56px;
      border-radius: 2px;
      display: grid;
      grid-template-rows: 28px 13px;
      place-items: center;
      align-content: center;
      gap: 2px;
      padding: 6px 5px;
      font-size: 11px;
      font-weight: 720;
      line-height: 1;
    }

    .ratio-icon {
      width: 24px;
      height: 28px;
      border: 2px solid currentColor;
      border-radius: 2px;
    }

    .ratio-icon.square {
      width: 24px;
      height: 24px;
    }

    .ratio-icon.portrait {
      width: 20px;
      height: 28px;
    }

    .ratio-icon.story {
      width: 16px;
      height: 28px;
    }

    .ratio-icon.landscape {
      width: 28px;
      height: 20px;
    }

    .ratio-icon.wide {
      width: 31px;
      height: 18px;
    }

    .tool-locked .panel .control-section:not(:last-child) {
      opacity: .42;
      pointer-events: none;
      filter: grayscale(.16);
    }

    .tool-locked .action-button.primary {
      opacity: .46;
      pointer-events: none;
    }

    .tool-locked .photo-slot {
      background-image: none;
      background:
        linear-gradient(135deg, rgba(217, 208, 189, .16), rgba(217, 208, 189, .04)),
        rgba(16, 17, 38, .18);
      filter: none;
    }

    .tool-locked .stage::before {
      background:
        radial-gradient(circle at 50% 42%, rgba(217, 208, 189, .12), transparent 34%),
        #050507;
      filter: none;
      transform: none;
    }

    .polafilm:not(.tool-locked) .stage-upload-cta {
      display: none;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }

    .polafilm:not(.tool-locked) .stage-actions {
      display: flex;
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    .tool-locked .stage-actions {
      display: none;
    }

    @media (min-width: 941px) {
      .polafilm:not(.tool-locked) .stage {
        padding-top: 48px;
        padding-bottom: 82px;
      }
    }

    .panel-actions-section {
      margin: 0;
      padding: 0;
      border: 0;
    }

    .panel-actions-section .action-grid {
      display: none;
    }

    .ratio-hint {
      margin: 8px 2px 0;
      min-height: 16px;
      color: rgba(217, 208, 189, .64);
      font-size: 10px;
      font-weight: 720;
      line-height: 1.35;
    }

    .is-active {
      color: var(--paper);
      background: rgba(217, 208, 189, .18);
      box-shadow: none;
    }

    .scroller {
      display: grid;
      grid-auto-flow: column;
      grid-auto-columns: 74px;
      gap: 6px;
      overflow-x: auto;
      padding: 6px;
      border: 1px solid rgba(217, 208, 189, .2);
      border-radius: 3px;
      background: rgba(0, 0, 0, .12);
      scrollbar-width: none;
      -ms-overflow-style: none;
      cursor: grab;
      user-select: none;
    }

    .frame-group-tabs.is-dragging,
    .scroller.is-dragging {
      cursor: grabbing;
      scroll-behavior: auto;
    }

    .scroller::-webkit-scrollbar {
      display: none;
      width: 0;
      height: 0;
    }

    .scroll-arrow {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: rgba(16, 17, 38, 0.6);
      color: var(--accent);
      border: 1px solid rgba(217, 208, 189, 0.2);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      z-index: 10;
      transition: all 0.2s ease;
      padding: 0;
      backdrop-filter: blur(4px);
    }

    .scroll-arrow.scroll-left {
      left: 4px;
    }

    .scroll-arrow.scroll-right {
      right: 4px;
    }

    .scroll-arrow:hover {
      background: rgba(16, 17, 38, 0.9);
      color: #fff;
      transform: translateY(-50%) scale(1.1);
    }

    .empty-frames {
      grid-column: 1 / -1;
      min-height: 64px;
      display: grid;
      place-items: center;
      padding: 10px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 720;
      text-align: center;
    }

    .thumb-card {
      min-height: 74px;
      border-radius: 2px;
      padding: 6px 5px;
      display: grid;
      gap: 5px;
      place-items: center;
      font-size: 10px;
      font-weight: 720;
      line-height: 1.15;
    }

    .favorite-btn {
      position: absolute;
      top: 4px;
      right: 4px;
      width: 22px;
      height: 22px;
      background: rgba(0, 0, 0, 0.5);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      cursor: pointer;
      opacity: 0;
      transition: all 0.2s ease;
      z-index: 10;
    }

    .thumb-card:hover .favorite-btn,
    .favorite-btn:hover,
    .thumb-card.is-active .favorite-btn,
    .favorite-btn.is-active {
      opacity: 1;
      background: rgba(0, 0, 0, 0.7);
    }

    .favorite-btn:active {
      transform: scale(0.85);
    }

    .mini-frame {
      display: block;
      position: relative;
      width: 42px;
      height: 42px;
      border-radius: 3px;
      background: #fffefa;
      box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .075);
    }

    .mini-frame::after {
      content: "";
      position: absolute;
      left: 9px;
      right: 9px;
      top: 8px;
      height: 24px;
      border-radius: 2px;
      background: linear-gradient(135deg, #e3e8ee, #fff);
      box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .075);
    }

    .mini-frame.mini-none {
      background: transparent;
      border: 1.5px dashed rgba(255, 255, 255, 0.3);
      box-shadow: none;
    }

    .mini-frame.mini-none::after {
      display: none;
    }

    .thumb-image {
      display: block;
      width: 62px;
      height: 42px;
      border-radius: 4px;
      background-position: center;
      background-size: contain;
      background-repeat: no-repeat;
      background-color: rgba(255, 255, 255, .08);
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
    }

    .mini-paper {
      background:
        radial-gradient(circle at 20% 18%, rgba(151, 96, 36, .16), transparent 25%),
        #ead8bc;
    }

    .mini-black {
      background: #111;
    }

    .mini-strip {
      background:
        repeating-linear-gradient(0deg, transparent 0 8px, #fff 8px 13px, transparent 13px 21px) left 4px top 5px / 7px 48px no-repeat,
        repeating-linear-gradient(0deg, transparent 0 8px, #fff 8px 13px, transparent 13px 21px) right 4px top 5px / 7px 48px no-repeat,
        #111;
    }

    .filter-thumb {
      display: block;
      width: 82px;
      max-width: 62px;
      height: 39px;
      border-radius: 5px;
      background: #cbd4dc var(--photo-url) center / cover no-repeat;
      box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
      transition: opacity .18s ease;
    }

    .item-new-badge {
      position: absolute;
      top: -4px;
      right: -4px;
      background: #e31837;
      color: #fff;
      font-size: 8px;
      font-weight: 800;
      padding: 2px 4px;
      border-radius: 4px;
      text-transform: uppercase;
      letter-spacing: .5px;
      z-index: 10;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
      pointer-events: none;
    }

    .filter-thumb.is-rendering {
      opacity: .55;
    }

    .filter-kodak {
      filter: saturate(1.18) contrast(1.08) sepia(.11) brightness(1.04);
    }

    .filter-fuji {
      filter: saturate(1.05) contrast(1.1) hue-rotate(174deg) brightness(1.02);
    }

    .filter-moody {
      filter: saturate(.78) contrast(1.24) brightness(.9);
    }

    .filter-warm {
      filter: saturate(1.02) contrast(.96) sepia(.24) brightness(1.08);
    }

    .slider-row {
      display: grid;
      grid-template-columns: 74px minmax(0, 1fr) 42px;
      align-items: center;
      gap: 10px;
      min-height: 32px;
      margin-top: 8px;
      color: var(--paper);
      font-size: 12px;
    }

    .slider-row.compact {
      grid-template-columns: 22px 72px minmax(0, 1fr) 42px;
    }

    .contrast-glyph {
      width: 20px;
      height: 20px;
      display: inline-block;
      border: 2px solid currentColor;
      border-radius: 50%;
      background: linear-gradient(90deg, currentColor 0 50%, transparent 50% 100%);
      justify-self: center;
    }

    .slider-value {
      text-align: right;
      color: var(--paper);
      font-weight: 740;
      font-variant-numeric: tabular-nums;
    }

    input[type="range"] {
      width: 100%;
      accent-color: var(--accent);
    }

    .caption-input {
      width: 100%;
      min-height: 40px;
      padding: 0 12px;
      border: 1px solid rgba(217, 208, 189, .2);
      border-radius: 3px;
      color: var(--paper);
      outline: none;
      background: rgba(0, 0, 0, .12);
    }

    .caption-font-select {
      margin-top: 8px;
      appearance: auto;
      color: var(--paper);
      background: rgba(0, 0, 0, .18);
      border-color: rgba(217, 208, 189, .34);
    }

    .caption-font-select option {
      color: #12151b;
      background: #f7f4ed;
    }

    .caption-quick-chips {
      display: flex;
      gap: 6px;
      overflow-x: auto;
      padding: 8px 0 4px 0;
      scrollbar-width: none;
      -ms-overflow-style: none;
      cursor: grab;
      user-select: none;
      touch-action: pan-x;
      -webkit-overflow-scrolling: touch;
    }

    .caption-quick-chips.is-dragging {
      cursor: grabbing;
      scroll-behavior: auto;
    }

    .caption-quick-chips::-webkit-scrollbar {
      display: none;
    }

    .caption-chip-btn {
      flex: 0 0 auto;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 32px;
      padding: 4px 10px;
      border-radius: 6px;
      font-family: inherit;
      font-size: 13px;
      font-weight: 500;
      color: var(--paper);
      background: rgba(255, 255, 255, .12);
      border: 1px solid rgba(255, 255, 255, .18);
      cursor: pointer;
      transition: all 0.2s;
    }

    .caption-chip-btn:hover {
      background: rgba(255, 255, 255, .24);
      border-color: var(--accent);
      transform: translateY(-1px);
    }

    .caption-preset-list {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 10px;
    }

    .caption-preset-item {
      padding: 5px 10px;
      border-radius: 6px;
      font-size: 12px;
      color: var(--paper);
      background: rgba(0, 0, 0, .24);
      border: 1px solid rgba(255, 255, 255, .14);
      cursor: pointer;
      text-align: left;
      transition: all 0.2s;
    }

    .caption-preset-item:hover {
      background: var(--accent);
      color: #fff;
      border-color: var(--accent);
    }

    .caption-color-btn {
      width: 20px;
      height: 20px;
      padding: 0;
      border-radius: 50%;
      border: 1.5px solid rgba(255, 255, 255, 0.25);
      cursor: pointer;
      transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .caption-color-btn:hover {
      transform: scale(1.15);
      border-color: #ffffff;
      box-shadow: 0 3px 6px rgba(0, 0, 0, 0.35);
    }

    .caption-color-btn.is-active {
      transform: scale(1.25);
      border-color: #38bdf8 !important;
      box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.5), 0 3px 8px rgba(0, 0, 0, 0.3) !important;
      z-index: 2;
    }

    html[data-theme="light"] .caption-color-btn {
      border-color: rgba(0, 0, 0, 0.18);
    }

    html[data-theme="light"] .caption-color-btn:hover {
      border-color: rgba(0, 0, 0, 0.5);
    }

    .caption-input:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(18, 103, 255, .12);
    }

    .action-grid {
      display: flex;
      gap: 8px;
    }

    .action-grid .action-button {
      flex: 1 1 0;
      min-width: 0;
      padding: 0 4px;
    }

    .action-button {
      position: relative;
      overflow: visible;
      width: 100%;
      min-height: 50px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      border-radius: 2px;
      border: 0;
      color: var(--paper);
      background: rgba(0, 0, 0, .16);
      box-shadow: none;
      font-size: 11px;
      font-weight: 820;
      line-height: 1.15;
      text-align: center;
      transition: background .16s ease, color .16s ease, transform .12s ease, box-shadow .16s ease;
    }

    .action-button .lucide {
      width: 21px;
      height: 21px;
      stroke-width: 2.2;
    }

    .action-button.primary {
      color: #fff;
      background: linear-gradient(135deg, #2f8dff, #005cff);
      box-shadow:
        0 15px 34px rgba(0, 92, 255, .35),
        inset 0 1px 0 rgba(255, 255, 255, .22);
    }

    .action-button.primary:hover {
      background: linear-gradient(135deg, #47a0ff, #1268ff);
      box-shadow:
        0 18px 42px rgba(0, 92, 255, .44),
        inset 0 1px 0 rgba(255, 255, 255, .26);
    }

    .action-button:not(.primary):hover {
      background: rgba(0, 0, 0, .24);
    }

    .action-button:active,
    .option-card:active,
    .thumb-card:active,
    .recharge:active {
      transform: translateY(1px);
    }

    .mobile-tabs-nav {
      display: none;
    }

    @media (max-width: 940px) {
      .mobile-tabs-nav {
        display: flex;
        gap: 6px;
        width: 100%;
        margin-bottom: 20px;
        border-bottom: 1px solid rgba(217, 208, 189, .12);
        padding-bottom: 12px;
        justify-content: space-between;
      }

      .tab-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        flex: 1;
        min-width: 58px;
        padding: 8px 0;
        background: transparent;
        border: none;
        color: rgba(217, 208, 189, .45);
        cursor: pointer;
        transition: color .2s, border-bottom-color .2s;
        border-bottom: 2px solid transparent;
        font-size: 11px;
        font-weight: 700;
      }

      .tab-nav-item.is-active {
        color: var(--paper);
        border-bottom-color: var(--paper);
      }

      .tab-nav-item .lucide {
        width: 20px;
        height: 20px;
      }

      .panel-inner:not(.active-tab-frame) .control-section[data-tab="frame"] {
        display: none;
      }

      .panel-inner:not(.active-tab-filter) .control-section[data-tab="filter"] {
        display: none;
      }

      .panel-inner:not(.active-tab-adjust) .control-section[data-tab="adjust"] {
        display: none;
      }

      .panel-inner:not(.active-tab-text) .control-section[data-tab="text"] {
        display: none;
      }

      .panel-inner:not(.active-tab-typography) .control-section[data-tab="typography"] {
        display: none;
      }


      .polafilm {
        --card-width: 324px;
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow-x: hidden;
        overflow-y: auto;
      }

      .topbar {
        position: sticky;
        top: 0;
        width: 100%;
        min-height: 64px;
        grid-template-columns: auto 1fr auto;
        gap: 10px;
        padding: 0 14px;
      }

      .brand {
        font-size: 30px;
      }

      .brand-title {
        font-size: 30px;
      }

      .brand-by {
        font-size: 18px;
      }

      .top-actions {
        gap: 6px;
      }

      .wallet,
      .recharge {
        min-height: 34px;
        padding: 0 10px;
      }

      .app-shell {
        width: min(100%, 380px);
        min-height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
        padding: 16px 18px 18px;
        overflow: visible;
      }

      .stage {
        width: var(--card-width);
        height: auto;
        min-height: calc(var(--card-width) * 1.333333);
        gap: 14px;
        padding: 0;
        overflow: visible;
      }

      .stage-upload-cta {
        position: relative;
        left: auto;
        bottom: auto;
        transform: none;
        width: 100%;
      }

      .stage-actions {
        display: none !important;
      }

      .panel-actions-section .action-grid {
        display: grid !important;
        margin-top: 20px;
      }

      .stage-upload-cta:active {
        transform: translateY(1px);
      }

      .panel {
        width: var(--card-width);
        min-height: auto;
        overflow: visible;
        background: transparent;
        border-left: 0;
        box-shadow: none;
        backdrop-filter: none;
      }

      .panel-inner {
        width: var(--card-width);
        max-width: none;
        padding: 0;
      }

      .stage-container {
        height: auto !important;
      }

      .preview-wrap,
      .preview-wrap.preview-wide,
      .preview-wrap.preview-wide .polaroid-card,
      .polaroid-card.ratio-wide:not(.variant-frame),
      .polaroid-card.frame-none {
        width: var(--card-width);
        height: auto !important;
      }

      .section-title {
        text-align: center;
      }

      .polaroid-card {
        --frame-padding: clamp(10px, calc(var(--card-width) * .04), 16px);
        --bottom-padding: clamp(45px, calc(var(--card-width) * .18), 70px);
      }
    }

    .stage-zoom-controls {
      position: absolute;
      right: 16px;
      bottom: 80px;
      z-index: 10;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      background: rgba(16, 17, 38, .8);
      border: 1px solid rgba(255, 255, 255, .1);
      border-radius: 8px;
      padding: 6px;
      backdrop-filter: blur(8px);
      opacity: 0;
      visibility: hidden;
      transition: opacity .2s, visibility .2s;
    }

    .polafilm:not(.tool-locked) .stage-zoom-controls {
      opacity: 1;
      visibility: visible;
    }

    .zoom-btn {
      width: 30px;
      height: 30px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: transparent;
      border: none;
      color: #fff;
      cursor: pointer;
      border-radius: 4px;
      transition: background .15s;
    }

    .zoom-btn:hover {
      background: rgba(255, 255, 255, .15);
    }

    .zoom-btn .lucide {
      width: 16px;
      height: 16px;
    }

    .zoom-toggle-btn {
      display: none;
    }

    .zoom-expand-area {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
    }

    #zoom-level {
      color: #fff;
      font-size: 10px;
      font-weight: 600;
      min-width: 32px;
      text-align: center;
      background: transparent;
      border: none;
      cursor: pointer;
      padding: 3px 0;
      border-radius: 4px;
      transition: background 0.15s;
    }

    #zoom-level:hover {
      background: rgba(255, 255, 255, 0.15);
    }

    @media (max-width: 940px) {
      .stage-zoom-controls {
        right: 12px;
        bottom: 72px;
        padding: 4px;
        border-radius: 20px;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
      }

      .zoom-toggle-btn {
        display: flex;
        width: 36px;
        height: 36px;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        color: #fff;
        cursor: pointer;
        border-radius: 50%;
        transition: background 0.15s;
      }

      .zoom-toggle-btn:active {
        background: rgba(255, 255, 255, 0.2);
      }

      .zoom-toggle-btn .lucide {
        width: 20px;
        height: 20px;
      }

      .stage-zoom-controls:not(.is-expanded) .zoom-expand-area {
        display: none;
      }

      .stage-zoom-controls.is-expanded {
        border-radius: 12px;
        padding: 6px;
        cursor: default;
      }

      .stage-zoom-controls.is-expanded .zoom-toggle-btn {
        display: none;
      }
    }

    .custom-font-item {
      padding: 10px 12px;
      cursor: pointer;
      border-bottom: 1px solid var(--border, #e2e8f0);
      transition: background 0.15s;
    }

    .custom-font-item:last-child {
      border-bottom: none;
    }

    .custom-font-item:hover {
      background: var(--muted, #f1f5f9);
    }

    .custom-font-item.is-active {
      background: var(--primary, #0f172a);
      color: #fff !important;
    }

    .custom-font-item-name {
      font-size: 12px;
      margin-bottom: 4px;
      opacity: 0.8;
    }

    .custom-font-item-preview {
      font-size: 16px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .custom-font-options {
      display: none;
    }

    .custom-font-dropdown.is-open .custom-font-options {
      display: block;
    }

    .custom-font-dropdown.is-open .custom-font-selected {
      border-color: var(--ring, #94a3b8);
      box-shadow: 0 0 0 1px var(--ring, #94a3b8);
    }

    .remove-effect-badge {
      position: absolute;
      top: -6px;
      right: -6px;
      width: 18px;
      height: 18px;
      background: #e74c3c;
      color: white;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
      z-index: 10;
      transition: transform 0.2s, background 0.2s;
    }

    .remove-effect-badge:hover {
      transform: scale(1.1);
      background: #c0392b;
    }

    .remove-effect-badge .lucide {
      width: 12px;
      height: 12px;
    }

    @media (max-width: 520px) {

      .back-link span,
      .wallet span,
      .user-greeting,
      .brand-by {
        display: none;
      }

      .back-link,
      .wallet {
        min-width: 34px;
        padding: 0;
      }
    }

    @media (max-width: 380px) {
      .polafilm {
        --card-width: calc(100vw - 24px);
      }

      .topbar,
      .app-shell {
        width: 100%;
        padding-left: 12px;
        padding-right: 12px;
      }

      .brand {
        font-size: 27px;
      }

      .brand-title {
        font-size: 27px;
      }

      .brand-by {
        font-size: 16px;
      }

      .stage,
      .preview-wrap,
      .polaroid-card,
      .panel,
      .panel-inner {
        width: calc(100vw - 24px);
      }

      .polaroid-card:not(.ratio-wide):not(.frame-none):not(.variant-frame) {
        height: calc(var(--card-width) * 1.333333);
      }

      .preview-wrap,
      .preview-wrap.preview-wide,
      .preview-wrap.preview-wide .polaroid-card,
      .polaroid-card.ratio-wide:not(.variant-frame),
      .polaroid-card.frame-none {
        height: auto !important;
      }

      .stage-upload-cta {
        width: 100%;
        min-height: 58px;
        padding: 0 16px;
        font-size: 14px;
      }

      .action-button {
        min-height: 46px;
        font-size: 10px;
      }

      .action-button .lucide {
        width: 19px;
        height: 19px;
      }
    }

    .top-more-menu {
      position: relative;
    }

    .more-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      border-radius: 8px;
      color: var(--paper);
      background: rgba(255, 255, 255, .08);
      border: 1px solid rgba(217, 208, 189, .18);
      cursor: pointer;
      transition: background 0.2s, border-color 0.2s;
    }

    .more-btn:hover {
      background: rgba(255, 255, 255, .15);
      border-color: rgba(217, 208, 189, .4);
    }

    .more-btn .lucide {
      width: 18px;
      height: 18px;
    }

    .more-dropdown {
      position: absolute;
      top: 100%;
      right: 0;
      margin-top: 8px;
      width: 220px;
      background: #151632;
      border: 1px solid rgba(217, 208, 189, .2);
      border-radius: 8px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
      padding: 8px;
      display: none;
      flex-direction: column;
      gap: 4px;
      z-index: 50;
    }

    .more-dropdown.is-open {
      display: flex;
      animation: fadeInDown 0.2s ease;
    }

    @keyframes fadeInDown {
      from {
        opacity: 0;
        transform: translateY(-10px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .more-dropdown button {
      text-align: left;
      padding: 10px 12px;
      color: var(--paper);
      background: transparent;
      border: none;
      border-radius: 6px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.2s;
    }

    .more-dropdown button:hover {
      background: rgba(255, 255, 255, 0.1);
    }

    .polafilm-help-dialog {
      width: min(750px, 100%);
      max-height: 85vh;
      display: flex;
      flex-direction: column;
      border: 1px solid rgba(217, 208, 189, .2);
      border-radius: 12px;
      background: #151632;
      box-shadow: 0 24px 80px rgba(0, 0, 0, .4);
      overflow: hidden;
    }

    .help-header {
      padding: 16px 20px;
      border-bottom: 1px solid rgba(217, 208, 189, .15);
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: rgba(0, 0, 0, 0.2);
    }

    .help-header h2 {
      margin: 0;
      font-size: 18px;
      color: var(--paper);
    }

    .help-close {
      background: none;
      border: none;
      color: rgba(217, 208, 189, .6);
      cursor: pointer;
      padding: 4px;
      display: flex;
      border-radius: 4px;
      transition: all 0.2s;
    }

    .help-close:hover {
      color: var(--paper);
      background: rgba(255, 255, 255, 0.1);
    }

    .help-close .lucide {
      width: 20px;
      height: 20px;
    }

    .help-body {
      display: flex;
      flex: 1;
      overflow: hidden;
    }

    .help-sidebar {
      width: 200px;
      background: rgba(0, 0, 0, 0.15);
      border-right: 1px solid rgba(217, 208, 189, .15);
      padding: 16px 12px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      flex-shrink: 0;
    }

    .help-sidebar button {
      text-align: left;
      padding: 10px 12px;
      color: rgba(217, 208, 189, .7);
      background: transparent;
      border: none;
      border-radius: 6px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
    }

    .help-sidebar button:hover {
      color: var(--paper);
      background: rgba(255, 255, 255, 0.05);
    }

    .help-sidebar button.is-active {
      color: #fff;
      background: rgba(255, 255, 255, 0.15);
    }

    .help-content-area {
      flex: 1;
      padding: 24px;
      overflow-y: auto;
      color: rgba(217, 208, 189, .85);
      font-size: 14px;
      line-height: 1.6;
    }

    .help-content-area::-webkit-scrollbar {
      width: 6px;
    }

    .help-content-area::-webkit-scrollbar-track {
      background: rgba(0, 0, 0, 0.1);
    }

    .help-content-area::-webkit-scrollbar-thumb {
      background: rgba(217, 208, 189, .3);
      border-radius: 3px;
    }

    .help-tab-content {
      display: none;
      animation: fadeIn 0.3s ease;
    }

    .help-tab-content.is-active {
      display: block;
    }

    .help-tab-content h3 {
      color: var(--paper);
      font-size: 20px;
      margin: 0 0 16px 0;
      font-family: "Playfair Display", serif;
      font-style: italic;
    }

    .help-tab-content h4 {
      color: #fff;
      font-size: 15px;
      margin: 20px 0 10px 0;
    }

    .help-tab-content p {
      margin: 0 0 12px 0;
    }

    .help-tab-content ul {
      margin: 0 0 16px 0;
      padding-left: 20px;
    }

    .help-tab-content li {
      margin-bottom: 6px;
    }

    .help-pricing-table {
      width: 100%;
      border-collapse: collapse;
      margin: 16px 0;
    }

    .help-pricing-table th,
    .help-pricing-table td {
      border: 1px solid rgba(217, 208, 189, .2);
      padding: 10px 14px;
      text-align: left;
    }

    .help-pricing-table th {
      background: rgba(255, 255, 255, 0.05);
      color: var(--paper);
      font-weight: bold;
    }

    @media (max-width: 640px) {
      .help-body {
        flex-direction: column;
      }

      .help-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(217, 208, 189, .15);
        flex-direction: row;
        overflow-x: auto;
        padding: 12px;
      }

      .help-sidebar button {
        white-space: nowrap;
      }

      .help-content-area {
        padding: 16px;
      }
    }

    .action-button.is-loading {
      pointer-events: none;
      opacity: 0.8;
      cursor: not-allowed;
    }

    .action-button.is-loading svg,
    .action-button.is-loading i,
    .stage-action-button.is-loading svg,
    .stage-action-button.is-loading i {
      animation: polafilm-spin 1s linear infinite !important;
      transform-origin: center center;
    }

    @keyframes polafilm-spin {
      0% {
        transform: rotate(0deg);
      }

      100% {
        transform: rotate(360deg);
      }
    }

    #polafilm-news-ticker {
      z-index: 10;
    }

    /* Pola Account Modal */
    .pola-account-modal {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.6);
      backdrop-filter: blur(8px);
      z-index: 9999;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease;
    }

    .pola-account-modal.show {
      opacity: 1;
      pointer-events: auto;
    }

    .pola-account-content {
      background: rgba(30, 32, 47, 0.85);
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
      border-radius: 20px;
      width: 90%;
      max-width: 450px;
      color: #fff;
      transform: translateY(20px) scale(0.95);
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    .pola-account-modal.show .pola-account-content {
      transform: translateY(0) scale(1);
    }

    .pola-account-header {
      padding: 20px 24px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.05);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .pola-account-header h2 {
      margin: 0;
      font-size: 1.15rem;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .pola-account-close {
      background: none;
      border: none;
      color: #9ca3af;
      cursor: pointer;
      padding: 5px;
      border-radius: 5px;
      transition: all 0.2s;
    }

    .pola-account-close:hover {
      color: #fff;
      background: rgba(255, 255, 255, 0.1);
    }

    .pola-account-tabs {
      display: flex;
      border-bottom: 1px solid rgba(255, 255, 255, 0.05);
      background: rgba(0, 0, 0, 0.2);
    }

    .pola-account-tab {
      flex: 1;
      padding: 15px 5px;
      background: none;
      border: none;
      color: #9ca3af;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s;
      border-bottom: 2px solid transparent;
      font-size: 0.85rem;
    }

    .pola-account-tab:hover {
      color: #fff;
    }

    .pola-account-tab.active {
      color: #e2a866;
      border-bottom-color: #e2a866;
      background: rgba(226, 168, 102, 0.05);
    }

    .pola-account-body {
      padding: 24px;
      min-height: 250px;
      max-height: 60vh;
      overflow-y: auto;
    }

    .pola-tab-content {
      display: none;
      animation: polaFadeIn 0.3s ease;
    }

    .pola-tab-content.active {
      display: block;
    }

    @keyframes polaFadeIn {
      from {
        opacity: 0;
        transform: translateY(5px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* Profile Tab */
    .pola-profile-info {
      text-align: center;
      margin-bottom: 20px;
    }

    .pola-profile-avatar {
      width: 70px;
      height: 70px;
      border-radius: 50%;
      background: linear-gradient(135deg, #e2a866, #ff7e5f);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 2rem;
      font-weight: bold;
      color: #fff;
      margin: 0 auto 15px;
      box-shadow: 0 4px 15px rgba(226, 168, 102, 0.3);
    }

    .pola-profile-name {
      font-size: 1.2rem;
      font-weight: 600;
      margin-bottom: 5px;
    }

    .pola-profile-email {
      color: #9ca3af;
      font-size: 0.9rem;
      margin-bottom: 15px;
    }

    .pola-profile-points {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: rgba(226, 168, 102, 0.1);
      color: #e2a866;
      padding: 8px 16px;
      border-radius: 50px;
      font-weight: 600;
    }

    /* Form Elements */
    .pola-form-group {
      margin-bottom: 16px;
    }

    .pola-form-group label {
      display: block;
      margin-bottom: 8px;
      color: #d1d5db;
      font-size: 0.9rem;
    }

    .pola-form-control {
      width: 100%;
      padding: 12px 16px;
      background: rgba(0, 0, 0, 0.2);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 8px;
      color: #fff;
      box-sizing: border-box;
      transition: border-color 0.2s;
    }

    .pola-form-control:focus {
      outline: none;
      border-color: #e2a866;
      background: rgba(0, 0, 0, 0.4);
    }

    .pola-btn {
      width: 100%;
      padding: 12px;
      border: none;
      border-radius: 8px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .pola-btn-primary {
      background: #e2a866;
      color: #1e202f;
    }

    .pola-btn-primary:hover {
      background: #d19555;
      transform: translateY(-1px);
    }

    .pola-btn-danger {
      background: rgba(239, 68, 68, 0.1);
      color: #ef4444;
      border: 1px solid rgba(239, 68, 68, 0.2);
      margin-top: 20px;
    }

    .pola-btn-danger:hover {
      background: rgba(239, 68, 68, 0.2);
    }

    /* History Table */
    .pola-history-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .pola-history-item {
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(255, 255, 255, 0.05);
      border-radius: 8px;
      padding: 12px 16px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .pola-history-info {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .pola-history-title {
      font-size: 0.95rem;
      font-weight: 500;
    }

    .pola-history-date {
      font-size: 0.8rem;
      color: #9ca3af;
    }

    .pola-history-points {
      font-weight: bold;
      font-size: 1.1rem;
    }

    .pola-history-points.plus {
      color: #10b981;
    }

    .pola-history-points.minus {
      color: #ef4444;
    }

    .pola-empty-state {
      text-align: center;
      color: #9ca3af;
      padding: 40px 0;
    }

    #pola-form-message {
      margin-top: 15px;
      font-size: 0.9rem;
      text-align: center;
    }

    #pola-form-message.success {
      color: #10b981;
    }

    #pola-form-message.error {
      color: #ef4444;
    }

    /* Pola Auth Modal */
    .pola-auth-modal {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.7);
      backdrop-filter: blur(10px);
      z-index: 100000;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease;
    }

    .pola-auth-modal.show {
      opacity: 1;
      pointer-events: auto;
    }

    .pola-auth-content {
      background: rgba(24, 24, 27, 0.9);
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
      border-radius: 24px;
      width: 90%;
      max-width: 400px;
      color: #fff;
      transform: translateY(20px) scale(0.95);
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    .pola-auth-modal.show .pola-auth-content {
      transform: translateY(0) scale(1);
    }

    .pola-auth-header {
      padding: 30px 24px 20px;
      text-align: center;
      position: relative;
    }

    .pola-auth-header h2 {
      margin: 0;
      font-size: 1.5rem;
      font-weight: 700;
      background: linear-gradient(135deg, #fff, #a1a1aa);
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .pola-auth-header p {
      margin: 8px 0 0;
      color: #9ca3af;
      font-size: 0.9rem;
    }

    .pola-auth-close {
      position: absolute;
      top: 15px;
      right: 15px;
      background: rgba(255, 255, 255, 0.05);
      border: none;
      color: #9ca3af;
      cursor: pointer;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
    }

    .pola-auth-close:hover {
      color: #fff;
      background: rgba(255, 255, 255, 0.15);
    }

    .pola-auth-tabs {
      display: flex;
      margin: 0 24px 20px;
      background: rgba(0, 0, 0, 0.3);
      border-radius: 12px;
      padding: 4px;
    }

    .pola-auth-tab {
      flex: 1;
      padding: 10px;
      background: none;
      border: none;
      color: #9ca3af;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      border-radius: 8px;
      font-size: 0.9rem;
    }

    .pola-auth-tab:hover {
      color: #fff;
    }

    .pola-auth-tab.active {
      color: #18181b;
      background: #e2a866;
      box-shadow: 0 2px 8px rgba(226, 168, 102, 0.3);
    }

    .pola-auth-body {
      padding: 0 24px 30px;
      position: relative;
    }

    .pola-auth-form {
      position: absolute;
      visibility: hidden;
      opacity: 0;
      width: 100%;
      top: 0;
      left: 0;
      transition: opacity 0.3s ease;
    }

    .pola-auth-form.active {
      position: relative;
      visibility: visible;
      opacity: 1;
    }

    .pola-auth-message {
      margin-top: 15px;
      font-size: 0.9rem;
      text-align: center;
      padding: 10px;
      border-radius: 8px;
      display: none;
    }

    .pola-auth-message.error {
      display: block;
      background: rgba(239, 68, 68, 0.1);
      color: #ef4444;
      border: 1px solid rgba(239, 68, 68, 0.2);
    }

    .pola-auth-message.success {
      display: block;
      background: rgba(16, 185, 129, 0.1);
      color: #10b981;
      border: 1px solid rgba(16, 185, 129, 0.2);
    }

    /* --- MOBILE OPTIMIZATIONS --- */
    @media (max-width: 940px) {
      .topbar {
        backdrop-filter: none;
        background: #101126;
      }

      html[data-theme="light"] .topbar {
        background: var(--surface);
      }

      .panel {
        backdrop-filter: none;
        background: #101126;
      }

      html[data-theme="light"] .panel {
        background: var(--surface);
      }

      .polafilm-modal {
        backdrop-filter: none;
        background: rgba(4, 5, 12, .9);
      }

      .stage::before {
        display: none;
      }

      .stage {
        background: #000;
      }

      html[data-theme="light"] .stage {
        background: #f8fafc;
      }

      .polafilm::after,
      .polaroid-card::before {
        display: none !important;
      }

      .polaroid-card,
      .frame-paper,
      .frame-black,
      .frame-strip {
        transform: translateZ(0);
        will-change: transform;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), 0 1px 1px rgba(255, 255, 255, 0.4) inset !important;
      }

      html[data-theme="light"] .polaroid-card,
      html[data-theme="light"] .frame-paper,
      html[data-theme="light"] .frame-black,
      html[data-theme="light"] .frame-strip {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(255, 255, 255, 0.4) inset !important;
      }

      .photo-slot {
        transform: translateZ(0);
        will-change: filter, background-position;
      }
    }
  

    #inapp-browser-warning {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(10, 10, 15, 0.95);
      z-index: 999999;
      color: #fff;
      padding: 30px 20px;
      text-align: center;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      backdrop-filter: blur(5px);
    }

    #inapp-browser-warning.show {
      display: flex;
    }

    #inapp-browser-warning h2 {
      color: #ffcc00;
      margin-bottom: 15px;
      font-size: 22px;
      font-family: 'Plus Jakarta Sans', sans-serif;
    }

    #inapp-browser-warning p {
      font-size: 15px;
      line-height: 1.6;
      margin-bottom: 15px;
      font-family: 'Plus Jakarta Sans', sans-serif;
      max-width: 400px;
    }

    #inapp-browser-warning .btn-close-warning {
      background: rgba(255, 255, 255, 0.1);
      color: #fff;
      border: 1px solid rgba(255, 255, 255, 0.2);
      padding: 12px 24px;
      border-radius: 50px;
      cursor: pointer;
      font-size: 14px;
      margin-top: 20px;
      font-family: 'Plus Jakarta Sans', sans-serif;
      transition: background 0.3s;
    }

    #inapp-browser-warning .btn-close-warning:hover {
      background: rgba(255, 255, 255, 0.2);
    }

    #inapp-browser-warning .dots-icon {
      display: inline-block;
      background: #fff;
      color: #000;
      padding: 2px 8px;
      border-radius: 4px;
      font-weight: bold;
      letter-spacing: 2px;
      font-size: 18px;
      line-height: 1;
      vertical-align: middle;
      margin: 0 5px;
    }
  

    #polafilm-smart-loader,
    #polafilm-download-loader {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: #101126;
      z-index: 9999999;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
      font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
      color: #efe5cf;
    }

    #polafilm-smart-loader.is-hidden,
    #polafilm-download-loader.is-hidden {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }

    .loader-content {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      animation: loaderPulse 2s infinite ease-in-out;
    }

    .loader-main-logo {
      height: 72px;
      width: auto;
      object-fit: contain;
      margin-bottom: 24px;
      filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.4));
      animation: loaderPulse 2s infinite ease-in-out;
    }

    @media (max-width: 520px) {
      .loader-main-logo {
        height: 56px;
        margin-bottom: 20px;
      }
    }

    .loader-text {
      font-size: 15px;
      font-weight: 700;
      letter-spacing: 0.5px;
      color: #efe5cf;
      margin-bottom: 12px;
    }

    .loader-subtext {
      font-size: 12px;
      color: rgba(239, 229, 207, 0.6);
      font-weight: 500;
    }

    .loader-progress-bar {
      width: 140px;
      height: 3px;
      background: rgba(239, 229, 207, 0.15);
      border-radius: 3px;
      overflow: hidden;
      position: relative;
      margin-top: 18px;
    }

    .loader-progress-fill {
      position: absolute;
      top: 0;
      left: 0;
      height: 100%;
      width: 40%;
      background: linear-gradient(90deg, #ff9a9e, #fecfef, #a1c4fd);
      border-radius: 3px;
      animation: loaderProgress 1.2s infinite ease-in-out;
    }

    @keyframes loaderProgress {
      0% {
        left: -40%;
        width: 40%;
      }

      50% {
        left: 30%;
        width: 60%;
      }

      100% {
        left: 100%;
        width: 40%;
      }
    }

    @keyframes loaderPulse {

      0%,
      100% {
        transform: scale(1);
      }

      50% {
        transform: scale(0.98);
      }
    }
  