:root {
  --bg: #e8eef5;
  --ink: #0b1220;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --panel: rgba(248, 250, 252, 0.96);
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Syne", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 #e8eef5;
}

html::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

html::-webkit-scrollbar-track {
  background: #e8eef5;
}

html::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 999px;
  border: 3px solid #e8eef5;
}

html::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

html::-webkit-scrollbar-corner {
  background: #e8eef5;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(255, 255, 255, 0.7), transparent 60%),
    linear-gradient(180deg, #dce5f0 0%, var(--bg) 45%, #d7e0ec 100%);
}

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 0;
  background: rgba(232, 238, 245, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.nav__bar {
  width: min(1600px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav__logo {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  display: inline-flex;
  padding: 8px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.nav__link:hover {
  opacity: 0.55;
}

.nav__link--active {
  font-weight: 700;
  opacity: 1;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__website-btn {
  display: none;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(11, 18, 32, 0.18);
  background: transparent;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nav__website-btn:hover {
  color: #eef2f7;
  background: var(--ink);
  border-color: var(--ink);
}

.nav__auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(11, 18, 32, 0.18);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.nav__auth-btn[hidden],
.nav__user[hidden] {
  display: none !important;
}

.nav__user {
  position: relative;
}

.nav__account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 210px;
  padding: 10px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  z-index: 1100;
}

.nav__account-menu[hidden] {
  display: none;
}

.nav__account-item {
  display: flex;
  width: 100%;
  align-items: center;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: 700 0.72rem var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.nav__account-item:hover {
  background: rgba(15, 23, 42, 0.06);
}

.nav__account-item--logout {
  color: #7f1d1d;
}

.nav__profile-panel {
  margin: 4px 0 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.04);
}

.nav__profile-panel[hidden] {
  display: none;
}

.nav__profile-name {
  margin: 0;
  font: 700 0.74rem var(--font);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav__profile-email {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  word-break: break-all;
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 36px;
  align-items: center;
}

.intro h1 {
  margin: 10px 0 14px;
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.intro .eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.intro p {
  margin: 0;
  max-width: 34rem;
  color: #475569;
  font-size: 1.02rem;
  line-height: 1.65;
}

.login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px 28px;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.1);
}

.login-card h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.login-card .lead {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.auth-google {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: 700 0.88rem var(--font);
  cursor: pointer;
}

.auth-google svg {
  width: 18px;
  height: 18px;
}

.auth-google:hover {
  background: #f8fafc;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.84rem;
  font-weight: 600;
}

.field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
}

.field input:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.06);
}

.password-row {
  display: flex;
  gap: 8px;
}

.password-row input {
  flex: 1;
}

.password-row button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 0 14px;
  font: 700 0.72rem var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.submit {
  width: 100%;
  height: 48px;
  margin-top: 6px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: #eef2f7;
  font: 700 0.92rem var(--font);
  cursor: pointer;
}

.submit:hover {
  opacity: 0.92;
}

.submit:disabled,
.auth-google:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.message {
  min-height: 1.2em;
  margin: 12px 0 0;
  font-size: 0.86rem;
  color: #b91c1c;
}

.message.is-success {
  color: #15803d;
}

.welcome {
  display: none;
  text-align: center;
}

.welcome.is-visible {
  display: block;
}

.welcome h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.3rem;
}

.welcome p {
  margin: 0 0 18px;
  color: var(--muted);
}

.welcome a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  background: var(--ink);
  color: #eef2f7;
  text-decoration: none;
  font-weight: 700;
}

.login-form.is-hidden {
  display: none;
}

.gallery-section {
  width: 100%;
  margin: 0;
}

.gallery-section--hero {
  margin-top: 0;
  min-height: calc(100vh - 72px);
}

.gallery-shell {
  display: block;
  min-height: calc(100vh - 72px);
  border-radius: 0;
  overflow: hidden;
  border: 0;
  background: #F4F7FB;
  box-shadow: none;
}

.gallery-filters {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 32px 8px;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.gallery-filters__group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.gallery-filters__label {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 28px 32px 14px;
}

.gallery-toolbar__copy {
  min-width: 0;
  flex: 1 1 auto;
}

.gallery-toolbar h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.45rem, 2vw, 1.75rem);
  letter-spacing: -0.03em;
  color: var(--ink);
}

.gallery-toolbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.gallery-toolbar .gallery-search-wrap {
  position: relative;
  flex: 0 1 380px;
  width: min(380px, 46vw);
  margin: 0;
  z-index: 5;
}

.gallery-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 6px 0 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  color: var(--muted);
}

.gallery-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  outline: none;
}

.gallery-search input::placeholder {
  color: #94A3B8;
}

.gallery-search__btn {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #F8FAFC;
  font: 600 0.78rem var(--font);
  cursor: pointer;
}

.gallery-search__btn:hover {
  opacity: 0.92;
}

.gallery-toolbar__actions {
  display: none;
}

.gallery-nav button b {
  display: none !important;
}

.gallery-toolbar__actions span,
#galleryCount {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(11, 18, 32, 0.06);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.gallery-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.gallery-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  padding: 8px 14px;
  background: #fff;
  color: var(--ink);
  font: 600 0.82rem var(--font);
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.gallery-nav button span {
  min-width: 0;
}

.gallery-nav button b {
  color: var(--muted);
  font-weight: 600;
}

.gallery-nav button.is-active,
.gallery-nav button:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #F8FAFC;
}

.gallery-nav button.is-active b,
.gallery-nav button:hover b {
  color: #CBD5E1;
}

.gallery-nav--soft button {
  font-weight: 500;
  background: transparent;
}

.gallery-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  background: #F4F7FB;
}

.gallery-empty {
  grid-column: 1 / -1;
  margin: 24px 0 40px;
  padding: 28px 20px;
  border-radius: 16px;
  border: 1px dashed rgba(15, 23, 42, 0.16);
  background: rgba(248, 250, 252, 0.7);
  color: var(--muted);
  text-align: center;
  font: 500 0.95rem/1.5 var(--font);
}

.gallery-empty[hidden] {
  display: none !important;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 24px;
  padding: 8px 32px 36px;
}

.gallery-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  background: #ffffff;
  border: 0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06), 0 10px 24px rgba(15, 23, 42, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-card__media {
  position: relative;
  overflow: hidden;
  background: #E2E8F0;
}

.gallery-card__price {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(11, 18, 32, 0.72);
  color: #F8FAFC;
  font: 700 0.75rem var(--font);
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}

.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(11, 18, 32, 0.1), 0 16px 36px rgba(11, 18, 32, 0.06);
}

.gallery-card[hidden] {
  display: none !important;
}

.gallery-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-card__meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 12px 12px;
  background: linear-gradient(180deg, transparent, rgba(11, 18, 32, 0.55));
  color: #F8FAFC;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.gallery-card:hover .gallery-card__meta,
.gallery-card:focus-within .gallery-card__meta {
  opacity: 1;
  pointer-events: auto;
}

.gallery-card__meta-text {
  display: none;
}

.gallery-card__actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
  pointer-events: auto;
}

.gallery-card__action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.92);
  color: #0B1220;
  font: 600 0.68rem var(--font);
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(11, 18, 32, 0.12);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.gallery-card__action[data-action="like"] {
  display: none;
}

.gallery-card__action[data-action="save"] {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.gallery-card__action--eye {
  display: none;
}

.gallery-card__action--buy {
  opacity: 1;
  pointer-events: auto;
  width: 32px;
  justify-content: center;
  padding: 0;
}

.gallery-card__action--buy:hover,
.gallery-card__action:hover {
  background: #0B1220;
  color: #F8FAFC;
}

.gallery-card__action svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.gallery-card__action.is-active {
  background: #F8FAFC;
  color: #0B1220;
}

.gallery-card__action.is-active[data-action="like"] {
  color: #E11D48;
}

.gallery-card__action.is-active[data-action="save"] {
  color: #0B1220;
}

.gallery-card__action em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.gallery-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 13px;
  background: #ffffff;
}

.gallery-card__author {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.gallery-card__avatar {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #0B1220;
  color: #E8EEF5;
  font: 700 0.68rem var(--font);
}

.gallery-card__author strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0B1220;
  font: 600 0.8rem/1.2 var(--font);
}

.gallery-card__tag {
  display: inline-flex;
  flex-shrink: 0;
  max-width: 7.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(11, 18, 32, 0.07);
  color: #334155;
  font: 600 0.62rem/1.3 var(--font);
  letter-spacing: 0.01em;
  text-transform: none;
}

.gallery-card__stats {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: #64748B;
}

.gallery-card__stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: inherit;
  font: 600 0.72rem var(--font);
  padding: 0;
  cursor: default;
}

button.gallery-card__stat {
  cursor: pointer;
}

.gallery-card__stat svg {
  width: 14px;
  height: 14px;
}

.gallery-card__stat em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.gallery-card__stat--like.is-active {
  color: #E11D48;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.auth-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 32, 0.55);
  backdrop-filter: blur(6px);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 28px 24px 24px;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(11, 18, 32, 0.28);
}

.auth-card__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.06);
  font-size: 1.3rem;
  cursor: pointer;
}

.auth-card__eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-card h2 {
  margin: 8px 0 8px;
  font-family: var(--display);
  font-size: 1.4rem;
  letter-spacing: -0.03em;
}

.auth-card__intro {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.pay-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.pay-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.pay-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 32, 0.58);
  backdrop-filter: blur(6px);
}

.pay-card {
  position: relative;
  z-index: 1;
  width: min(380px, 100%);
  padding: 28px 22px 22px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(11, 18, 32, 0.3);
  text-align: center;
}

.pay-card__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.pay-card__eyebrow {
  margin: 0;
  color: #1a73e8;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pay-card h2 {
  margin: 8px 0 6px;
  font-family: var(--display);
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.pay-card__project {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.pay-card__amount {
  margin: 10px 0 16px;
  font-family: var(--display);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.pay-card__qr-wrap {
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  padding: 14px;
  width: fit-content;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #f8fafc;
}

.pay-card__qr {
  display: block;
  width: 220px;
  height: 220px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.pay-card__upi {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
  word-break: break-all;
}

.pay-card__gpay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  background: #1a73e8;
  color: #fff;
  font-weight: 700;
  font-size: 0.86rem;
  text-decoration: none;
}

.pay-card__gpay:hover {
  background: #1557b0;
}

.pay-card__hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.pay-card__form {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  text-align: left;
}

.pay-card__form label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pay-card__form label span {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.pay-card__form input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
}

.pay-card__form input:focus {
  outline: 0;
  border-color: rgba(26, 115, 232, 0.55);
  background: #fff;
}

.pay-card__form-msg {
  min-height: 18px;
  margin: 0;
  color: #c0392b;
  font-size: 0.75rem;
}

.pay-card__form-msg.is-success {
  color: #1b7a4a;
}

.pay-card__submit {
  min-height: 46px;
  margin-top: 4px;
  border: 0;
  border-radius: 12px;
  background: #0f172a;
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

.pay-card__submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.pay-card__paybox {
  margin-top: 8px;
}

.pay-card__paybox[hidden] {
  display: none;
}

.site-preview {
  position: fixed;
  inset: 0;
  z-index: 3200;
  display: flex;
  flex-direction: column;
  background: #fff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.site-preview.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.site-preview-open {
  overflow: hidden;
}

.site-preview__bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-top, 0px));
  background: #0B1220;
  color: #F8FAFC;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-preview__back {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #F8FAFC;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.site-preview__copy {
  flex: 1 1 auto;
  min-width: 0;
}

.site-preview__copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 700 0.9rem/1.2 var(--font);
}

.site-preview__copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
  color: #94A3B8;
  font: 500 0.72rem/1.2 var(--font);
}

.site-preview__external {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: #F8FAFC;
  color: #0B1220;
  font: 700 0.78rem/1 var(--font);
  text-decoration: none;
}

.site-preview__frame {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

.gallery-card__action--open {
  display: none;
}

.footer {
  margin-top: 24px;
  padding: 48px 0 28px;
  border-top: 1px solid var(--line);
  background: rgba(232, 238, 245, 0.65);
}

.footer__inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer__logo {
  display: inline-block;
  margin-bottom: 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}

.footer__brand p {
  margin: 0;
  max-width: 260px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.footer__col h4 {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.footer__col h4 a {
  color: inherit;
  text-decoration: none;
}

.footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__col li + li {
  margin-top: 8px;
}

.footer__col a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer__col a:hover {
  color: var(--ink);
}

.footer__bottom {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  flex-wrap: wrap;
}

.footer__bottom p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.footer__legal a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
}

.footer__legal a:hover {
  color: var(--ink);
}

@media (max-width: 1100px) {
  .gallery-shell {
    display: block;
  }

  .gallery-filters {
    margin: 0 20px 8px;
    padding: 14px 14px;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 8px 20px 28px;
  }

  .gallery-toolbar {
    padding: 22px 20px 12px;
  }
}

/* Mobile gallery */
@media (max-width: 900px) {
  html,
  body {
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  body {
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
    background: #F4F7FB;
  }

  html {
    background: #F4F7FB;
  }

  .nav__links {
    display: none;
  }

  .nav__website-btn {
    display: inline-flex;
  }

  .nav__bar {
    width: calc(100% - 20px);
  }

  .nav {
    flex-shrink: 0;
    padding: 10px 0;
    background: rgba(244, 247, 251, 0.96);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  }

  .nav__logo,
  .nav__auth-btn {
    color: var(--ink);
  }

  .footer {
    display: none;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-section--hero {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #F4F7FB;
    padding-bottom: 0;
  }

  .gallery-shell {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: #F4F7FB;
  }

  .gallery-filters {
    position: static;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 0;
    order: -1;
    flex-shrink: 0;
    width: 100%;
    margin: 0;
    padding: 8px 0 6px;
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: #F4F7FB;
    box-shadow: none;
  }

  .gallery-filters__group--focus,
  .gallery-filters__label {
    display: none !important;
  }

  .gallery-toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 10px 12px;
    padding: 12px 14px 8px;
    flex-shrink: 0;
    background: #F4F7FB;
  }

  .gallery-toolbar__copy {
    display: none;
  }

  .gallery-toolbar .gallery-search-wrap {
    grid-column: 1 / -1;
    width: 100%;
    flex: none;
  }

  .gallery-toolbar .gallery-search {
    width: 100%;
    height: 42px;
  }

  .gallery-toolbar h2 {
    font-size: 1.2rem;
    line-height: 1.2;
  }

  .gallery-toolbar p {
    margin-top: 4px;
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .gallery-toolbar__actions {
    display: flex;
    grid-column: 2;
    grid-row: 1;
  }

  .gallery-toolbar__actions span,
  #galleryCount {
    padding: 6px 10px;
    font-size: 0.7rem;
  }

  #galleryNav.gallery-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 2px 12px 6px;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    touch-action: pan-x;
  }

  #galleryNav.gallery-nav::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  #galleryNav.gallery-nav button {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    width: auto !important;
    min-width: max-content;
    min-height: 36px;
    margin: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: rgba(11, 18, 32, 0.06);
    color: #0B1220;
    white-space: nowrap;
    font-size: 0.8rem;
    scroll-snap-align: start;
  }

  #galleryNav.gallery-nav button.is-active {
    background: #0B1220;
    color: #F8FAFC;
  }

  #galleryNav.gallery-nav button.is-active b {
    color: #94A3B8;
  }

  .gallery-main {
    width: 100%;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #F4F7FB;
  }

  .gallery-grid {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
    gap: 22px;
    padding: 6px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    scroll-padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    scroll-snap-type: none;
    touch-action: pan-y;
    scrollbar-width: none;
  }

  .gallery-grid::-webkit-scrollbar {
    display: none;
  }

  .gallery-card {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: none;
    width: 100%;
    height: auto;
    border-radius: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    scroll-snap-align: none;
    scroll-snap-stop: normal;
    overflow: visible;
  }

  .gallery-card__media {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #1E293B;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  }

  .gallery-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 2px 0;
    background: transparent;
  }

  .gallery-card__price {
    top: 14px;
    left: 14px;
    min-height: 32px;
    padding: 0 12px;
    font-size: 0.8rem;
    background: rgba(11, 18, 32, 0.78);
  }

  .gallery-card:hover {
    transform: none;
    box-shadow: none;
  }

  .gallery-card img {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }

  .gallery-card__meta {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px;
    opacity: 1;
    pointer-events: none;
    background: none;
  }

  .gallery-card__meta-text {
    display: none !important;
  }

  .gallery-card__actions {
    justify-content: flex-end;
    gap: 8px;
    margin-left: 0;
    pointer-events: auto;
  }

  .gallery-card__action {
    min-height: 36px;
    min-width: 36px;
    padding: 0;
    justify-content: center;
    background: rgba(11, 18, 32, 0.62);
    color: #F8FAFC;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .gallery-card__action[data-action="like"],
  .gallery-card__action--eye {
    display: none !important;
  }

  .gallery-card__action[data-action="save"] {
    display: inline-flex;
    opacity: 1;
    pointer-events: auto;
  }

  .gallery-card__action--open {
    display: inline-flex;
    opacity: 1;
    pointer-events: auto;
  }

  .gallery-card__action--buy {
    background: rgba(248, 250, 252, 0.94);
    color: #0B1220;
  }

  .gallery-card__action.is-active[data-action="save"] {
    background: #F8FAFC;
    color: #0B1220;
  }

  .gallery-card__action svg {
    width: 16px;
    height: 16px;
  }

  .gallery-card__action em {
    display: none;
  }

  .gallery-card__avatar {
    width: 28px;
    height: 28px;
    font-size: 0.72rem;
  }

  .gallery-card__author strong {
    color: #0B1220;
    font-size: 0.86rem;
  }

  .gallery-card__tag {
    max-width: 6.5rem;
    padding: 3px 7px;
    border-radius: 6px;
    background: rgba(11, 18, 32, 0.08);
    color: #334155;
    font-size: 0.62rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .gallery-card__stats {
    gap: 14px;
    color: #64748B;
    font-size: 0.78rem;
  }

  .gallery-card__stat svg {
    width: 15px;
    height: 15px;
  }

  .gallery-empty {
    color: #64748B;
  }

  .auth-modal {
    padding: 12px;
  }

  .auth-card {
    width: min(100%, 420px);
    max-height: calc(100vh - 24px);
    overflow: auto;
  }
}

@media (max-width: 520px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }

  .gallery-toolbar {
    padding: 14px 12px 4px;
  }

  .gallery-grid {
    gap: 18px;
    padding: 4px 12px 28px;
  }

  .gallery-card__media {
    border-radius: 18px;
  }
}
