/* FoodPic - Clean CSS Architecture
   - Tailwind base + utilities (auto-scanned from templates)
   - Plain CSS component styles (no @apply - recommended by Tailwind v4)
*/

*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

/* ! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com
*/

/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box;
  /* 1 */
  border-width: 0;
  /* 2 */
  border-style: solid;
  /* 2 */
  border-color: #e5e7eb;
  /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5;
  /* 1 */
  -webkit-text-size-adjust: 100%;
  /* 2 */
  -moz-tab-size: 4;
  /* 3 */
  -o-tab-size: 4;
     tab-size: 4;
  /* 3 */
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  /* 4 */
  font-feature-settings: normal;
  /* 5 */
  font-variation-settings: normal;
  /* 6 */
  -webkit-tap-highlight-color: transparent;
  /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0;
  /* 1 */
  line-height: inherit;
  /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0;
  /* 1 */
  color: inherit;
  /* 2 */
  border-top-width: 1px;
  /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

a {
  color: inherit;
  text-decoration: inherit;
}

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  /* 1 */
  font-feature-settings: normal;
  /* 2 */
  font-variation-settings: normal;
  /* 3 */
  font-size: 1em;
  /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0;
  /* 1 */
  border-color: inherit;
  /* 2 */
  border-collapse: collapse;
  /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  /* 1 */
  font-feature-settings: inherit;
  /* 1 */
  font-variation-settings: inherit;
  /* 1 */
  font-size: 100%;
  /* 1 */
  font-weight: inherit;
  /* 1 */
  line-height: inherit;
  /* 1 */
  letter-spacing: inherit;
  /* 1 */
  color: inherit;
  /* 1 */
  margin: 0;
  /* 2 */
  padding: 0;
  /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button;
  /* 1 */
  background-color: transparent;
  /* 2 */
  background-image: none;
  /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield;
  /* 1 */
  outline-offset: -2px;
  /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button;
  /* 1 */
  font: inherit;
  /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/

dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/

:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  /* 1 */
  vertical-align: middle;
  /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */

[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}

.container {
  width: 100%;
}

@media (min-width: 640px) {
  .container {
    max-width: 640px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}

@media (min-width: 1536px) {
  .container {
    max-width: 1536px;
  }
}

.pointer-events-none {
  pointer-events: none;
}

.visible {
  visibility: visible;
}

.fixed {
  position: fixed;
}

.absolute {
  position: absolute;
}

.relative {
  position: relative;
}

.inset-0 {
  inset: 0px;
}

.left-1 {
  left: 0.25rem;
}

.right-0 {
  right: 0px;
}

.right-4 {
  right: 1rem;
}

.top-1 {
  top: 0.25rem;
}

.top-4 {
  top: 1rem;
}

.z-10 {
  z-index: 10;
}

.z-50 {
  z-index: 50;
}

.z-\[100\] {
  z-index: 100;
}

.mx-1 {
  margin-left: 0.25rem;
  margin-right: 0.25rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.ml-1 {
  margin-left: 0.25rem;
}

.ml-2 {
  margin-left: 0.5rem;
}

.mr-1\.5 {
  margin-right: 0.375rem;
}

.mr-2 {
  margin-right: 0.5rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mt-8 {
  margin-top: 2rem;
}

.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.table {
  display: table;
}

.grid {
  display: grid;
}

.hidden {
  display: none;
}

.h-10 {
  height: 2.5rem;
}

.h-16 {
  height: 4rem;
}

.h-2 {
  height: 0.5rem;
}

.h-4 {
  height: 1rem;
}

.h-48 {
  height: 12rem;
}

.h-5 {
  height: 1.25rem;
}

.h-6 {
  height: 1.5rem;
}

.h-8 {
  height: 2rem;
}

.h-\[calc\(100\%-8px\)\] {
  height: calc(100% - 8px);
}

.max-h-\[90vh\] {
  max-height: 90vh;
}

.min-h-\[44px\] {
  min-height: 44px;
}

.min-h-screen {
  min-height: 100vh;
}

.w-10 {
  width: 2.5rem;
}

.w-16 {
  width: 4rem;
}

.w-2 {
  width: 0.5rem;
}

.w-4 {
  width: 1rem;
}

.w-48 {
  width: 12rem;
}

.w-5 {
  width: 1.25rem;
}

.w-6 {
  width: 1.5rem;
}

.w-64 {
  width: 16rem;
}

.w-8 {
  width: 2rem;
}

.w-\[calc\(50\%-4px\)\] {
  width: calc(50% - 4px);
}

.w-fit {
  width: -moz-fit-content;
  width: fit-content;
}

.w-full {
  width: 100%;
}

.max-w-2xl {
  max-width: 42rem;
}

.max-w-3xl {
  max-width: 48rem;
}

.max-w-7xl {
  max-width: 80rem;
}

.max-w-\[200px\] {
  max-width: 200px;
}

.max-w-lg {
  max-width: 32rem;
}

.max-w-md {
  max-width: 28rem;
}

.flex-1 {
  flex: 1 1 0%;
}

.flex-shrink {
  flex-shrink: 1;
}

.flex-shrink-0 {
  flex-shrink: 0;
}

.translate-x-full {
  --tw-translate-x: 100%;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.scale-100 {
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.scale-95 {
  --tw-scale-x: .95;
  --tw-scale-y: .95;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.cursor-help {
  cursor: help;
}

.cursor-pointer {
  cursor: pointer;
}

.select-none {
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.resize-y {
  resize: vertical;
}

.resize {
  resize: both;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-start {
  align-items: flex-start;
}

.items-center {
  align-items: center;
}

.justify-end {
  justify-content: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 {
  gap: 0.25rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.space-y-2 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
}

.space-y-3 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));
}

.space-y-4 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(1rem * var(--tw-space-y-reverse));
}

.space-y-6 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
}

.overflow-hidden {
  overflow: hidden;
}

.overflow-x-auto {
  overflow-x: auto;
}

.overflow-y-auto {
  overflow-y: auto;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.break-all {
  word-break: break-all;
}

.rounded {
  border-radius: 0.25rem;
}

.rounded-2xl {
  border-radius: 24px;
}

.rounded-full {
  border-radius: 9999px;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.rounded-xl {
  border-radius: 16px;
}

.border {
  border-width: 1px;
}

.border-2 {
  border-width: 2px;
}

.border-b {
  border-bottom-width: 1px;
}

.border-t {
  border-top-width: 1px;
}

.border-none {
  border-style: none;
}

.border-blue-400 {
  --tw-border-opacity: 1;
  border-color: rgb(96 165 250 / var(--tw-border-opacity, 1));
}

.border-gold\/30 {
  border-color: rgb(212 175 55 / 0.3);
}

.border-gold\/50 {
  border-color: rgb(212 175 55 / 0.5);
}

.border-gray-600 {
  --tw-border-opacity: 1;
  border-color: rgb(75 85 99 / var(--tw-border-opacity, 1));
}

.border-gray-700 {
  --tw-border-opacity: 1;
  border-color: rgb(55 65 81 / var(--tw-border-opacity, 1));
}

.border-gray-700\/50 {
  border-color: rgb(55 65 81 / 0.5);
}

.border-gray-800 {
  --tw-border-opacity: 1;
  border-color: rgb(31 41 55 / var(--tw-border-opacity, 1));
}

.border-green-400 {
  --tw-border-opacity: 1;
  border-color: rgb(74 222 128 / var(--tw-border-opacity, 1));
}

.border-green-500\/30 {
  border-color: rgb(34 197 94 / 0.3);
}

.border-red-400 {
  --tw-border-opacity: 1;
  border-color: rgb(248 113 113 / var(--tw-border-opacity, 1));
}

.border-red-500 {
  --tw-border-opacity: 1;
  border-color: rgb(239 68 68 / var(--tw-border-opacity, 1));
}

.border-red-500\/30 {
  border-color: rgb(239 68 68 / 0.3);
}

.border-red-500\/50 {
  border-color: rgb(239 68 68 / 0.5);
}

.border-transparent {
  border-color: transparent;
}

.border-yellow-400 {
  --tw-border-opacity: 1;
  border-color: rgb(250 204 21 / var(--tw-border-opacity, 1));
}

.border-yellow-500\/30 {
  border-color: rgb(234 179 8 / 0.3);
}

.bg-app-bg {
  --tw-bg-opacity: 1;
  background-color: rgb(5 5 5 / var(--tw-bg-opacity, 1));
}

.bg-black\/70 {
  background-color: rgb(0 0 0 / 0.7);
}

.bg-black\/80 {
  background-color: rgb(0 0 0 / 0.8);
}

.bg-blue-500\/20 {
  background-color: rgb(59 130 246 / 0.2);
}

.bg-blue-500\/90 {
  background-color: rgb(59 130 246 / 0.9);
}

.bg-card {
  --tw-bg-opacity: 1;
  background-color: rgb(28 28 28 / var(--tw-bg-opacity, 1));
}

.bg-gold {
  --tw-bg-opacity: 1;
  background-color: rgb(212 175 55 / var(--tw-bg-opacity, 1));
}

.bg-gold\/10 {
  background-color: rgb(212 175 55 / 0.1);
}

.bg-gold\/20 {
  background-color: rgb(212 175 55 / 0.2);
}

.bg-gray-700 {
  --tw-bg-opacity: 1;
  background-color: rgb(55 65 81 / var(--tw-bg-opacity, 1));
}

.bg-gray-700\/50 {
  background-color: rgb(55 65 81 / 0.5);
}

.bg-gray-800 {
  --tw-bg-opacity: 1;
  background-color: rgb(31 41 55 / var(--tw-bg-opacity, 1));
}

.bg-green-500 {
  --tw-bg-opacity: 1;
  background-color: rgb(34 197 94 / var(--tw-bg-opacity, 1));
}

.bg-green-500\/10 {
  background-color: rgb(34 197 94 / 0.1);
}

.bg-green-500\/20 {
  background-color: rgb(34 197 94 / 0.2);
}

.bg-green-500\/90 {
  background-color: rgb(34 197 94 / 0.9);
}

.bg-panel {
  --tw-bg-opacity: 1;
  background-color: rgb(18 18 18 / var(--tw-bg-opacity, 1));
}

.bg-panel\/50 {
  background-color: rgb(18 18 18 / 0.5);
}

.bg-purple-500\/20 {
  background-color: rgb(168 85 247 / 0.2);
}

.bg-red-500 {
  --tw-bg-opacity: 1;
  background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1));
}

.bg-red-500\/10 {
  background-color: rgb(239 68 68 / 0.1);
}

.bg-red-500\/20 {
  background-color: rgb(239 68 68 / 0.2);
}

.bg-red-500\/90 {
  background-color: rgb(239 68 68 / 0.9);
}

.bg-transparent {
  background-color: transparent;
}

.bg-white {
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
}

.bg-white\/5 {
  background-color: rgb(255 255 255 / 0.05);
}

.bg-yellow-500\/10 {
  background-color: rgb(234 179 8 / 0.1);
}

.bg-yellow-500\/20 {
  background-color: rgb(234 179 8 / 0.2);
}

.bg-yellow-500\/90 {
  background-color: rgb(234 179 8 / 0.9);
}

.bg-gradient-to-br {
  background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.bg-gradient-to-r {
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.from-gold {
  --tw-gradient-from: #D4AF37 var(--tw-gradient-from-position);
  --tw-gradient-to: rgb(212 175 55 / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.from-gold\/10 {
  --tw-gradient-from: rgb(212 175 55 / 0.1) var(--tw-gradient-from-position);
  --tw-gradient-to: rgb(212 175 55 / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.from-indigo-500 {
  --tw-gradient-from: #6366f1 var(--tw-gradient-from-position);
  --tw-gradient-to: rgb(99 102 241 / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.from-white {
  --tw-gradient-from: #fff var(--tw-gradient-from-position);
  --tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.to-gold-dim {
  --tw-gradient-to: #aa8c2c var(--tw-gradient-to-position);
}

.to-gray-400 {
  --tw-gradient-to: #9ca3af var(--tw-gradient-to-position);
}

.to-purple-600 {
  --tw-gradient-to: #9333ea var(--tw-gradient-to-position);
}

.to-transparent {
  --tw-gradient-to: transparent var(--tw-gradient-to-position);
}

.bg-clip-text {
  -webkit-background-clip: text;
          background-clip: text;
}

.p-0 {
  padding: 0px;
}

.p-1 {
  padding: 0.25rem;
}

.p-2 {
  padding: 0.5rem;
}

.p-3 {
  padding: 0.75rem;
}

.p-4 {
  padding: 1rem;
}

.p-6 {
  padding: 1.5rem;
}

.p-8 {
  padding: 2rem;
}

.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.py-1\.5 {
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-2\.5 {
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.pb-6 {
  padding-bottom: 1.5rem;
}

.pt-4 {
  padding-top: 1rem;
}

.pt-6 {
  padding-top: 1.5rem;
}

.text-left {
  text-align: left;
}

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

.text-right {
  text-align: right;
}

.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.font-outfit {
  font-family: Outfit, sans-serif;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

.text-5xl {
  font-size: 3rem;
  line-height: 1;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.font-bold {
  font-weight: 700;
}

.font-medium {
  font-weight: 500;
}

.font-normal {
  font-weight: 400;
}

.font-semibold {
  font-weight: 600;
}

.uppercase {
  text-transform: uppercase;
}

.tracking-widest {
  letter-spacing: 0.1em;
}

.text-black {
  --tw-text-opacity: 1;
  color: rgb(0 0 0 / var(--tw-text-opacity, 1));
}

.text-black\/60 {
  color: rgb(0 0 0 / 0.6);
}

.text-black\/70 {
  color: rgb(0 0 0 / 0.7);
}

.text-blue-400 {
  --tw-text-opacity: 1;
  color: rgb(96 165 250 / var(--tw-text-opacity, 1));
}

.text-gold {
  --tw-text-opacity: 1;
  color: rgb(212 175 55 / var(--tw-text-opacity, 1));
}

.text-gray-100 {
  --tw-text-opacity: 1;
  color: rgb(243 244 246 / var(--tw-text-opacity, 1));
}

.text-gray-300 {
  --tw-text-opacity: 1;
  color: rgb(209 213 219 / var(--tw-text-opacity, 1));
}

.text-gray-400 {
  --tw-text-opacity: 1;
  color: rgb(156 163 175 / var(--tw-text-opacity, 1));
}

.text-gray-500 {
  --tw-text-opacity: 1;
  color: rgb(107 114 128 / var(--tw-text-opacity, 1));
}

.text-gray-600 {
  --tw-text-opacity: 1;
  color: rgb(75 85 99 / var(--tw-text-opacity, 1));
}

.text-green-400 {
  --tw-text-opacity: 1;
  color: rgb(74 222 128 / var(--tw-text-opacity, 1));
}

.text-green-500 {
  --tw-text-opacity: 1;
  color: rgb(34 197 94 / var(--tw-text-opacity, 1));
}

.text-green-700 {
  --tw-text-opacity: 1;
  color: rgb(21 128 61 / var(--tw-text-opacity, 1));
}

.text-orange-400 {
  --tw-text-opacity: 1;
  color: rgb(251 146 60 / var(--tw-text-opacity, 1));
}

.text-pink-400 {
  --tw-text-opacity: 1;
  color: rgb(244 114 182 / var(--tw-text-opacity, 1));
}

.text-purple-400 {
  --tw-text-opacity: 1;
  color: rgb(192 132 252 / var(--tw-text-opacity, 1));
}

.text-red-300 {
  --tw-text-opacity: 1;
  color: rgb(252 165 165 / var(--tw-text-opacity, 1));
}

.text-red-400 {
  --tw-text-opacity: 1;
  color: rgb(248 113 113 / var(--tw-text-opacity, 1));
}

.text-red-500 {
  --tw-text-opacity: 1;
  color: rgb(239 68 68 / var(--tw-text-opacity, 1));
}

.text-transparent {
  color: transparent;
}

.text-white {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}

.text-yellow-400 {
  --tw-text-opacity: 1;
  color: rgb(250 204 21 / var(--tw-text-opacity, 1));
}

.underline {
  text-decoration-line: underline;
}

.antialiased {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.opacity-0 {
  opacity: 0;
}

.opacity-100 {
  opacity: 1;
}

.opacity-25 {
  opacity: 0.25;
}

.opacity-50 {
  opacity: 0.5;
}

.opacity-75 {
  opacity: 0.75;
}

.shadow {
  --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

.shadow-lg {
  --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

.shadow-xl {
  --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

.outline {
  outline-style: solid;
}

.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

.backdrop-blur-sm {
  --tw-backdrop-blur: blur(4px);
  -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
  backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}

.transition {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-transform {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.duration-100 {
  transition-duration: 100ms;
}

.duration-150 {
  transition-duration: 150ms;
}

.duration-200 {
  transition-duration: 200ms;
}

.duration-300 {
  transition-duration: 300ms;
}

.duration-75 {
  transition-duration: 75ms;
}

.ease-in {
  transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}

.ease-in-out {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.ease-out {
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

/* Import Google Fonts */

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
  --bg-app: #050505;
  --bg-panel: #121212;
  --bg-card: #1c1c1c;
  --text-primary: #ededed;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --accent-gold: #D4AF37;
  --accent-gold-dim: #aa8c2c;
  --accent-gold-glow: rgba(212, 175, 55, 0.4);
  --status-success: #4CAF50;
  --status-error: #E53935;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 48px;
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ==========================================================================
   Base Document Styling
   ========================================================================== */

html, body {
  background-color: var(--bg-app);
  min-height: 100%;
}

body {
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
}

/* ==========================================================================
   iOS PWA Safe Area Support (Notch / Dynamic Island)

   Strategy: Use top/padding positioning with env() safe-area-inset values.
   The header uses top: env(safe-area-inset-top) to sit below the notch.
   The main content uses padding-bottom for home indicator area.
   ========================================================================== */

/* Ensure background extends behind notch/Dynamic Island */

html {
  background-color: var(--bg-app);
}

/* PWA standalone mode - handle safe areas for full-screen app */

@media all and (display-mode: standalone) {
  /* Main content area - add bottom padding for home indicator */

  .main {
    padding-bottom: max(var(--spacing-lg), env(safe-area-inset-bottom));
  }

  /* Toast notifications - position below notch */

  #toast-container {
    top: calc(1rem + env(safe-area-inset-top));
    right: calc(1rem + env(safe-area-inset-right));
  }

  /* Modal overlays - ensure content doesn't go under notch */

  .modal-overlay {
    padding-top: env(safe-area-inset-top);
  }
}

/* ==========================================================================
   Alpine.js FOUC Prevention
   ========================================================================== */

[x-cloak] {
  display: none !important;
}

/* ==========================================================================
   Main Layout Components
   ========================================================================== */

.main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  /* Dynamic viewport height - properly centers on mobile */
  padding: var(--spacing-lg);
  /* Top padding: header height (~44px) + safe area + breathing room */
  padding-top: calc(60px + env(safe-area-inset-top, 0px));
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at center, #1a1a1a 0%, var(--bg-app) 100%);
  padding-bottom: max(var(--spacing-lg), env(safe-area-inset-bottom));
}

.hero-content {
  z-index: 10;
  text-align: center;
  max-width: 600px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-gold) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  line-height: 1.1;
  cursor: pointer;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xl);
  font-weight: 300;
  max-width: 400px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn-primary {
  background: var(--accent-gold);
  color: #000;
  font-weight: 600;
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--radius-full);
  font-size: 1.1rem;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 20px var(--accent-gold-glow);
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: #fff;
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
}

.btn-enhance {
  flex: 1;
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-dim) 100%);
  color: #000;
  font-weight: 600;
  padding: var(--spacing-md);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  transition: transform var(--transition-fast);
  font-size: 1rem;
  border: none;
  cursor: pointer;
}

.btn-enhance:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 15px var(--accent-gold-glow);
}

.btn-reset {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn-reset:hover {
  background: var(--status-error);
  color: #fff;
  border-color: transparent;
}

.btn-retry {
  width: 56px;
  min-width: 56px;
  max-width: 56px;
  height: 56px;
  min-height: 56px;
  max-height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-retry:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Larger restart button when campaign is showing */

.btn-retry.btn-retry-large {
  width: 80px;
  min-width: 80px;
  max-width: 80px;
  height: 80px;
  min-height: 80px;
  max-height: 80px;
  transition: all 0.3s ease;
}

/* Download button group container */

.download-btn-group {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
}

.btn-download {
  background: var(--text-primary);
  color: var(--bg-app);
  padding: var(--spacing-md);
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  transition: opacity 0.2s;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-download-dropdown {
  border-radius: 0 8px 8px 0;
  padding: 0.75rem 0.5rem;
  border-left: 1px solid rgba(0,0,0,0.2);
}

.btn-download:hover {
  opacity: 0.9;
}

.btn-unlock {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: var(--spacing-md);
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-unlock:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   Uploader Components
   ========================================================================== */

.uploader-container {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
}

.drop-zone {
  width: 100%;
  aspect-ratio: 4/3;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.drop-zone:hover {
  border-color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.05);
}

.drop-zone.active {
  border-color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.1);
  box-shadow: 0 0 30px var(--accent-gold-glow);
}

.drop-zone img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  border-radius: calc(var(--radius-lg) - 2px);
}

.icon-wrapper {
  background: var(--bg-card);
  padding: var(--spacing-lg);
  border-radius: 50%;
  margin-bottom: var(--spacing-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.controls {
  display: flex;
  gap: var(--spacing-md);
  width: 100%;
  margin-top: var(--spacing-md);
}

/* ==========================================================================
   Processing State
   ========================================================================== */

.processing-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-lg);
  padding: var(--spacing-xl);
  text-align: center;
}

.loader {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-gold);
  animation: loader-spin 1.2s infinite linear;
  position: relative;
}

.loader-inner {
  position: absolute;
  inset: 12px;
  background: var(--bg-card);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes loader-spin {
  to {
    transform: rotate(360deg);
  }
}

.status-text {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

.sub-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 300px;
}

/* ==========================================================================
   Result Viewer
   ========================================================================== */

.result-container {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.image-container {
  position: relative;
  width: 100%;
  max-height: 70vh;
  /* Don't let portrait images get too tall */
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #000;
  /* Clean background for letterboxing */
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-image {
  width: 100%;
  height: auto;
  max-height: 70vh;
  -o-object-fit: contain;
     object-fit: contain;
  /* Never crop or distort */
  transition: opacity 0.3s ease;
}

.badge {
  position: absolute;
  top: var(--spacing-md);
  left: var(--spacing-md);
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent-gold);
  z-index: 10;
}

.toggle-container {
  position: absolute;
  bottom: var(--spacing-md);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  padding: 4px;
  border-radius: var(--radius-full);
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.toggle-btn {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  min-height: 44px;
}

.toggle-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   Lighting Style Selector
   ========================================================================== */

.lighting-selector {
  margin-top: 1.25rem;
  text-align: center;
}

.lighting-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.lighting-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.lighting-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 70px;
  min-height: 64px;
  /* Exceeds 44px min touch target */
  flex: 0 1 auto;
}

.lighting-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.lighting-btn.active {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.lighting-btn svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.5;
}

.lighting-btn span {
  font-size: 0.75rem;
  font-weight: 500;
}

@media (max-width: 480px) {
  .lighting-options {
    gap: 0.4rem;
  }

  .lighting-btn {
    padding: 0.5rem 0.6rem;
    min-width: 60px;
    min-height: 56px;
    /* Still exceeds 44px min touch target */
  }

  .lighting-btn svg {
    width: 18px;
    height: 18px;
  }

  .lighting-btn span {
    font-size: 0.65rem;
  }
}

.actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
}

/* On mobile, stack into grid layout */

@media (max-width: 480px) {
  .actions {
    display: grid;
    grid-template-columns: 56px 1fr;
    grid-template-rows: auto auto;
    gap: 0.75rem;
    width: 100%;
    max-width: 400px;
  }

  .actions .btn-retry {
    grid-row: 1;
    grid-column: 1;
  }

  .actions .download-btn-group {
    grid-row: 1;
    grid-column: 2;
  }

  .actions .btn-campaign {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .actions .btn-unlock {
    grid-row: 2;
    grid-column: 1 / -1;
    margin-right: 0 !important;
  }
}

/* iOS-specific actions layout - campaign button inline with restart */

.actions.actions-ios {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 1rem;
}

.actions.actions-ios .btn-campaign {
  flex: 1;
  max-width: 280px;
}

/* ==========================================================================
   Modal & Paywall
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
  padding: 0;
  margin: 0;
  /* Safe area support for notched devices */
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.modal-content {
  background: linear-gradient(145deg, #1a1a1a, #222);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 2rem;
  width: 90%;
  max-width: 650px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, #fff, #ccc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-subtitle {
  color: #888;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.plan-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  text-align: left;
}

.plan-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  width: 100%;
}

.plan-button:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  border-color: rgba(255, 187, 0, 0.3);
}

.plan-button.highlight {
  background: linear-gradient(90deg, #ffb700, #ff8800);
  border: none;
  color: black;
  font-weight: 600;
}

.plan-button.highlight:hover {
  background: linear-gradient(90deg, #ffc400, #ffa200);
  box-shadow: 0 0 20px rgba(255, 187, 0, 0.4);
}

/* ==========================================================================
   Format Dropdown
   ========================================================================== */

.format-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  overflow: hidden;
  min-width: 160px;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.format-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.875rem;
  font-family: inherit;
  text-align: left;
  transition: background 0.15s;
}

.format-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.format-option.active {
  background: rgba(212, 175, 55, 0.2);
}

.format-hint {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.format-check {
  color: var(--accent-gold);
  font-weight: 600;
}

/* ==========================================================================
   Campaign Button & Section
   ========================================================================== */

.btn-campaign {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dim));
  color: #1a1a1a;
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn-campaign:hover:not(:disabled) {
  transform: scale(1.02);
  box-shadow: 0 4px 15px var(--accent-gold-glow);
}

.btn-campaign:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.campaign-section {
  width: 100%;
  margin-top: var(--spacing-xl);
  animation: fadeIn 0.5s ease-out;
}

.campaign-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.campaign-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.btn-download-all {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dim));
  color: #000;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-download-all svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.btn-download-all:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px var(--accent-gold-glow);
}

.campaign-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
}

@media (max-width: 600px) {
  .campaign-grid {
    grid-template-columns: 1fr;
  }
}

.campaign-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s;
}

.campaign-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.campaign-image-wrapper {
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-panel);
  position: relative;
}

.campaign-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.ratio-story {
  aspect-ratio: 9/16;
  max-height: 200px;
}

.ratio-square {
  aspect-ratio: 1/1;
}

.ratio-banner {
  aspect-ratio: 16/9;
}

.campaign-label {
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.campaign-masonry {
  -moz-columns: 3;
       columns: 3;
  -moz-column-gap: 12px;
       column-gap: 12px;
  width: 100%;
  /* Prevent reflow issues on mobile touch */
  transform: translateZ(0);
}

@media (max-width: 600px) {
  .campaign-masonry {
    -moz-columns: 2;
         columns: 2;
    -moz-column-gap: 8px;
         column-gap: 8px;
  }
}

.campaign-card-masonry {
  -moz-column-break-inside: avoid;
       break-inside: avoid;
  margin-bottom: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  /* Prevent disappearing during touch scroll in CSS columns */
  transform: translateZ(0);
  backface-visibility: hidden;
}

.campaign-card-masonry:hover {
  border-color: var(--accent-gold);
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--accent-gold);
  z-index: 10;
}

.campaign-card-masonry:hover .campaign-image-wrapper img {
  transform: scale(1.03);
}

/* Legacy overlay styles removed - now using external labels */

.campaign-size-badge,
.campaign-platform-badge {
  display: none;
  /* Hidden - now using external labels */
}

/* Mobile/Desktop visibility helpers
   Note: These are CSS viewport-based. For device-type visibility, use Alpine x-show with isIOS/isAndroid/isDesktop.
   The [style*="display: none"] selector ensures Alpine's x-show takes precedence. */

.mobile-only {
  display: none;
}

.mobile-only[style*="display: none"] {
  display: none !important;
}

.desktop-only {
  display: block;
}

.desktop-only[style*="display: none"] {
  display: none !important;
}

@media (max-width: 768px) {
  .mobile-only:not([style*="display: none"]) {
    display: flex;
  }

  .desktop-only {
    display: none !important;
  }
}

/* Mobile save instructions banner */

.mobile-save-instructions {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.1));
  border: 2px solid rgba(212, 175, 55, 0.5);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.save-instructions-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dim));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.save-instructions-icon svg {
  color: #000;
  width: 24px;
  height: 24px;
}

.save-instructions-content {
  flex: 1;
}

.save-instructions-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

.save-instructions-steps {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
}

.save-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.step-number {
  width: 20px;
  height: 20px;
  min-width: 20px;
  background: var(--accent-gold);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* iOS compact save reminder - always visible banner */

.ios-save-reminder {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.08));
  border: 2px solid rgba(212, 175, 55, 0.4);
  border-radius: 14px;
  padding: 0.875rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.ios-save-reminder:hover,
.ios-save-reminder:active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.12));
  border-color: rgba(212, 175, 55, 0.6);
}

.ios-reminder-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dim));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ios-reminder-icon svg {
  color: #000;
}

.ios-reminder-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.ios-reminder-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ios-reminder-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.ios-help-link {
  width: 28px;
  height: 28px;
  min-width: 28px;
  background: rgba(212, 175, 55, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 0.9rem;
}

/* iOS: Remove tap cursor and interaction hints from images */

.ios-no-tap {
  cursor: default;
  -webkit-touch-callout: default;
  /* Allow long-press menu on iOS */
}

/* iOS Help button */

.btn-ios-help {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-ios-help:hover,
.btn-ios-help:active {
  background: rgba(212, 175, 55, 0.25);
}

/* iOS Tutorial Modal */

.ios-tutorial-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.ios-tutorial-modal {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 1.5rem;
  max-width: 360px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.ios-tutorial-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.ios-tutorial-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dim));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.ios-tutorial-icon svg {
  color: #000;
}

.ios-tutorial-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.ios-tutorial-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.ios-tutorial-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.ios-tutorial-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.ios-step-number {
  width: 28px;
  height: 28px;
  min-width: 28px;
  background: var(--accent-gold);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
}

.ios-step-content {
  flex: 1;
}

.ios-step-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.25rem;
}

.ios-step-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

.ios-step-desc strong {
  color: var(--accent-gold);
}

.ios-step-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ios-visual-hand {
  width: 44px;
  height: 44px;
  background: rgba(212, 175, 55, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  animation: pulse-tap 2s ease-in-out infinite;
}

@keyframes pulse-tap {
  0%, 100% {
    transform: scale(1);
    opacity: 0.7;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.ios-visual-button {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 0.7rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.ios-visual-button svg {
  color: var(--accent-gold);
}

.ios-tutorial-tip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(212, 175, 55, 0.1);
  border-radius: 10px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.ios-tutorial-tip svg {
  flex-shrink: 0;
  color: var(--accent-gold);
}

.ios-tutorial-btn {
  width: 100%;
  padding: 0.875rem;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dim));
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.ios-tutorial-btn:hover,
.ios-tutorial-btn:active {
  transform: scale(1.02);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

.ios-tutorial-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
}

.ios-tutorial-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-gold);
}

/* Campaign card info - labels below image */

.campaign-card-info {
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.campaign-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
}

.campaign-card-size {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Desktop: hover overlay for download */

.campaign-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.campaign-card-masonry:hover .campaign-overlay {
  opacity: 1;
}

.campaign-download-badge {
  background: var(--accent-gold);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.campaign-download-badge svg {
  color: #000;
  width: 20px;
  height: 20px;
}

/* Mobile: no hover overlay, clean images for long-press */

@media (max-width: 768px) {
  .campaign-card-masonry {
    cursor: default;
    /* No click action on mobile */
  }

  .campaign-card-masonry:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: none;
  }

  .campaign-overlay {
    display: none !important;
  }
}

/* ==========================================================================
   Comparison Slider (Before/After)
   ========================================================================== */

.comparison-container {
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: col-resize;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.image-before,
.image-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.watermark-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: repeating-linear-gradient(-45deg,
        rgba(255, 255, 255, 0.05) 0px,
        rgba(255, 255, 255, 0.05) 2px,
        transparent 2px,
        transparent 10px);
  pointer-events: none;
  z-index: 2;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent);
          mask-image: linear-gradient(to bottom, black, transparent);
}

.label-before,
.label-after {
  position: absolute;
  top: 10px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 5;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}

.label-before {
  left: 10px;
}

.label-after {
  right: 10px;
  background: var(--accent-gold);
  color: black;
}

.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: white;
  z-index: 10;
  transform: translateX(-50%);
  pointer-events: none;
}

.slider-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Billing Toggle
   ========================================================================== */

.billing-toggle {
  position: relative;
  display: flex;
  width: 280px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.billing-toggle-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dim));
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
  transition: transform 0.2s ease-in-out;
  pointer-events: none;
}

.billing-toggle-slider.right {
  transform: translateX(100%);
}

.billing-toggle button {
  flex: 1;
  position: relative;
  z-index: 1;
  height: 36px;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  background: transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s ease-in-out;
}

.billing-toggle button.active {
  color: #000;
  font-weight: 600;
}

.billing-discount {
  color: #22c55e;
  font-weight: 600;
  margin-left: 4px;
}

.billing-toggle button.active .billing-discount {
  color: #000;
  /* Same as button text for better contrast on gold background */
  opacity: 0.7;
}

/* ==========================================================================
   Tabs
   ========================================================================== */

.tab-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: 9999px;
  width: -moz-fit-content;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.tab {
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #888;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  background: none;
}

.tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.tab.active {
  background: var(--text-primary);
  color: #000;
}

/* ==========================================================================
   Plan Pricing Components
   ========================================================================== */

.plan-content {
  display: flex;
  flex-direction: column;
}

.plan-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 2px;
}

.plan-subtitle {
  font-size: 0.8rem;
  color: #888;
}

.highlight .plan-subtitle {
  color: #222;
  font-weight: 500;
}

.plan-pricing {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.plan-price {
  font-weight: 700;
  font-size: 1.2rem;
}

.plan-per-image {
  font-size: 0.75rem;
  opacity: 0.7;
}

.plan-monthly-equiv {
  font-size: 0.7rem;
  color: #22c55e;
  font-weight: 500;
}

.highlight .plan-monthly-equiv {
  color: #000;
  /* High contrast on gold background */
  opacity: 0.75;
}

.secure-note {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* ==========================================================================
   Modal Glow
   ========================================================================== */

.modal-glow {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 187, 0, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  margin-top: var(--spacing-xl);
  color: var(--text-muted);
  font-size: 0.9rem;
  /* Ensure footer content stays above bottom safe area */
  padding-bottom: max(0px, calc(env(safe-area-inset-bottom) - var(--spacing-lg)));
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-gold {
  color: var(--accent-gold);
}

.text-muted {
  color: var(--text-muted);
}

.text-secondary {
  color: var(--text-secondary);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

#toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: auto;
}

.toast-show {
  transform: translateX(0);
  opacity: 1;
}

.toast-hide {
  transform: translateX(120%);
  opacity: 0;
}

.toast-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-message {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.4;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.toast-close:hover {
  color: var(--text-primary);
}

.toast-success {
  border-color: rgba(76, 175, 80, 0.3);
}

.toast-success .toast-icon {
  color: #4CAF50;
}

.toast-error {
  border-color: rgba(229, 57, 53, 0.3);
}

.toast-error .toast-icon {
  color: #E53935;
}

.toast-warning {
  border-color: rgba(255, 152, 0, 0.3);
}

.toast-warning .toast-icon {
  color: #FF9800;
}

.toast-info {
  border-color: rgba(33, 150, 243, 0.3);
}

.toast-info .toast-icon {
  color: #2196F3;
}

/* ==========================================================================
   Skeleton Loading
   ========================================================================== */

.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-panel) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-button {
  height: 3.5rem;
  width: 200px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   Scrollbar
   ========================================================================== */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-app);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-card);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold-dim);
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

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

/* Mobile touch targets (Apple HIG: 44px minimum) */

@media (pointer: coarse) {
  button, a[href], input[type="submit"], input[type="button"] {
    min-height: 44px;
  }

  input[type="email"], input[type="password"], input[type="text"], input[type="tel"], input[type="number"], textarea {
    min-height: 48px;
    font-size: 16px;
    /* Prevent zoom on iOS */
  }
}

body.modal-open {
  overflow: hidden;
  /* Note: JS should set --scroll-y before adding this class */
  position: fixed;
  top: calc(-1 * var(--scroll-y, 0px));
  left: 0;
  right: 0;
  width: 100%;
}

/* ==========================================================================
   Crop Editor
   ========================================================================== */

.crop-editor-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-app);
  z-index: 2000;
  display: flex;
  flex-direction: column;
}

.crop-editor-modal {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-app);
}

.crop-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-panel);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  /* Safe area for notch */
  padding-top: max(0.75rem, env(safe-area-inset-top));
}

.crop-editor-close {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s;
}

.crop-editor-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.crop-editor-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.crop-editor-done {
  padding: 0.5rem 1rem;
  background: var(--accent-gold);
  color: #000;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
}

.crop-editor-done:hover {
  background: #fff;
  transform: scale(1.02);
}

.crop-editor-image-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
  min-height: 0;
  /* Important for flexbox shrinking */
  /* Ensure container takes available space for landscape images */
  width: 100%;
  position: relative;
}

.crop-editor-image {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

/* Cropper.js container needs to fill available space */

.crop-editor-image-container .cropper-container {
  max-width: 100% !important;
  max-height: 100% !important;
}

.crop-editor-controls {
  background: var(--bg-panel);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  /* Safe area for home indicator */
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.crop-editor-rotate {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.crop-control-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.crop-control-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.crop-control-btn:active {
  transform: scale(0.95);
}

.crop-control-divider {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 0.25rem;
  align-self: center;
}

.crop-editor-ratios {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ratio-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  min-width: 54px;
}

.ratio-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.ratio-btn.active {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.ratio-icon {
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 2px;
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ratio-icon.free {
  border: none;
  font-weight: 600;
  width: auto;
  height: auto;
}

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

.ratio-icon.portrait-4-5 {
  width: 16px;
  height: 20px;
}

.ratio-icon.landscape-16-9 {
  width: 24px;
  height: 14px;
}

.ratio-icon.story-9-16 {
  width: 12px;
  height: 20px;
}

.ratio-label {
  font-size: 0.65rem;
  font-weight: 500;
}

.crop-reset-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  margin: 0 auto;
}

.crop-reset-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-secondary);
}

/* Cropper.js overrides for dark theme */

.cropper-modal {
  background-color: rgba(0, 0, 0, 0.7) !important;
}

.cropper-view-box {
  outline: 1px solid var(--accent-gold) !important;
  outline-color: rgba(212, 175, 55, 0.75) !important;
}

.cropper-line {
  background-color: var(--accent-gold) !important;
}

.cropper-point {
  background-color: var(--accent-gold) !important;
  width: 12px !important;
  height: 12px !important;
  opacity: 1 !important;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5);
}

.cropper-point.point-se {
  width: 16px !important;
  height: 16px !important;
}

/* Expand touch target area for all crop handles */

.cropper-point::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: transparent;
}

.cropper-dashed {
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.cropper-center {
  display: block !important;
}

.cropper-center::before,
.cropper-center::after {
  background-color: var(--accent-gold) !important;
}

/* Make touch targets larger on mobile/touch devices */

@media (max-width: 768px), (pointer: coarse) {
  .cropper-point {
    width: 20px !important;
    height: 20px !important;
  }

  .cropper-point.point-se {
    width: 26px !important;
    height: 26px !important;
  }

  /* Ensure touch area is still 44px minimum */

  .cropper-point::after {
    width: 48px;
    height: 48px;
  }

  .crop-control-btn {
    width: 52px;
    height: 52px;
  }

  .ratio-btn {
    padding: 0.6rem 0.8rem;
    min-width: 58px;
  }
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */

@media (max-width: 480px) {
  .title {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1rem;
    padding: 0 1rem;
  }

  .btn-primary {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1rem;
    width: 100%;
    max-width: 280px;
  }

  .modal-content {
    width: 95%;
    padding: 1.5rem;
    border-radius: 16px;
  }
}

.last\:border-0:last-child {
  border-width: 0px;
}

.hover\:border-gold:hover {
  --tw-border-opacity: 1;
  border-color: rgb(212 175 55 / var(--tw-border-opacity, 1));
}

.hover\:border-gold\/30:hover {
  border-color: rgb(212 175 55 / 0.3);
}

.hover\:border-gold\/50:hover {
  border-color: rgb(212 175 55 / 0.5);
}

.hover\:border-gray-600:hover {
  --tw-border-opacity: 1;
  border-color: rgb(75 85 99 / var(--tw-border-opacity, 1));
}

.hover\:border-red-500\/50:hover {
  border-color: rgb(239 68 68 / 0.5);
}

.hover\:border-yellow-500\/50:hover {
  border-color: rgb(234 179 8 / 0.5);
}

.hover\:bg-blue-500\/30:hover {
  background-color: rgb(59 130 246 / 0.3);
}

.hover\:bg-gold-dim:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(170 140 44 / var(--tw-bg-opacity, 1));
}

.hover\:bg-gold\/30:hover {
  background-color: rgb(212 175 55 / 0.3);
}

.hover\:bg-gray-600:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(75 85 99 / var(--tw-bg-opacity, 1));
}

.hover\:bg-gray-700:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(55 65 81 / var(--tw-bg-opacity, 1));
}

.hover\:bg-gray-800:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(31 41 55 / var(--tw-bg-opacity, 1));
}

.hover\:bg-green-500\/30:hover {
  background-color: rgb(34 197 94 / 0.3);
}

.hover\:bg-panel:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(18 18 18 / var(--tw-bg-opacity, 1));
}

.hover\:bg-purple-500\/30:hover {
  background-color: rgb(168 85 247 / 0.3);
}

.hover\:bg-red-500\/10:hover {
  background-color: rgb(239 68 68 / 0.1);
}

.hover\:bg-red-500\/20:hover {
  background-color: rgb(239 68 68 / 0.2);
}

.hover\:bg-red-500\/30:hover {
  background-color: rgb(239 68 68 / 0.3);
}

.hover\:text-gold:hover {
  --tw-text-opacity: 1;
  color: rgb(212 175 55 / var(--tw-text-opacity, 1));
}

.hover\:text-gray-300:hover {
  --tw-text-opacity: 1;
  color: rgb(209 213 219 / var(--tw-text-opacity, 1));
}

.hover\:text-gray-400:hover {
  --tw-text-opacity: 1;
  color: rgb(156 163 175 / var(--tw-text-opacity, 1));
}

.hover\:text-red-300:hover {
  --tw-text-opacity: 1;
  color: rgb(252 165 165 / var(--tw-text-opacity, 1));
}

.hover\:text-red-400:hover {
  --tw-text-opacity: 1;
  color: rgb(248 113 113 / var(--tw-text-opacity, 1));
}

.hover\:text-white:hover {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}

.hover\:underline:hover {
  text-decoration-line: underline;
}

.hover\:opacity-80:hover {
  opacity: 0.8;
}

.hover\:shadow-lg:hover {
  --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

.hover\:shadow-gold\/30:hover {
  --tw-shadow-color: rgb(212 175 55 / 0.3);
  --tw-shadow: var(--tw-shadow-colored);
}

.focus\:border-gold:focus {
  --tw-border-opacity: 1;
  border-color: rgb(212 175 55 / var(--tw-border-opacity, 1));
}

.focus\:border-red-500:focus {
  --tw-border-opacity: 1;
  border-color: rgb(239 68 68 / var(--tw-border-opacity, 1));
}

.focus\:outline-none:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.focus\:ring-gold:focus {
  --tw-ring-opacity: 1;
  --tw-ring-color: rgb(212 175 55 / var(--tw-ring-opacity, 1));
}

.focus\:ring-offset-0:focus {
  --tw-ring-offset-width: 0px;
}

.disabled\:opacity-50:disabled {
  opacity: 0.5;
}

@media (min-width: 640px) {
  .sm\:inline {
    display: inline;
  }
}

@media (min-width: 768px) {
  .md\:block {
    display: block;
  }

  .md\:hidden {
    display: none;
  }

  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .md\:grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
