:root {
  --bg: #f7f8fc;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-strong: #ffffff;
  --surface-muted: #eef2fb;
  --text: #18213a;
  --muted: #5f6881;
  --line: rgba(24, 35, 62, 0.13);
  --brand-a: #4f53ff;
  --brand-b: #ff4f9e;
  --brand-c: #00b4a4;
  --brand-d: #ffbb3b;
  --ok: #1e9f73;
  --danger: #d85f50;
  --shadow-soft: 0 10px 25px rgba(28, 33, 62, 0.12);
  --shadow-card: 0 18px 40px rgba(33, 31, 73, 0.12);
}

body[data-theme="night"] {
  --bg: #0f1628;
  --surface: rgba(22, 30, 48, 0.78);
  --surface-strong: #18233a;
  --surface-muted: #1b2842;
  --text: #ecf2ff;
  --muted: #9da8c4;
  --line: rgba(231, 238, 255, 0.16);
  --brand-a: #6b7cff;
  --brand-b: #ff74b5;
  --brand-c: #38d4c3;
  --brand-d: #ffd16a;
  --ok: #46c896;
  --danger: #ff8678;
  --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 18px 42px rgba(0, 0, 0, 0.48);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(88, 95, 255, 0.16), transparent 32%),
    radial-gradient(circle at 90% 12%, rgba(255, 90, 161, 0.12), transparent 31%),
    linear-gradient(170deg, var(--bg), var(--surface-muted));
  overflow-x: hidden;
  transition: background 220ms ease, color 220ms ease;
}
h1, h2, h3 { margin: 0; font-family: "Fraunces", serif; font-weight: 600; line-height: 1.06; }
p { margin: 0; }
a { color: inherit; }

.chromatic-bg { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.blob { position: absolute; width: 380px; height: 380px; border-radius: 999px; filter: blur(50px); opacity: 0.42; }
.blob-one { top: -100px; left: -120px; background: linear-gradient(120deg, var(--brand-a), var(--brand-b)); animation: drift-one 13s ease-in-out infinite alternate; }
.blob-two { top: 15%; right: -130px; background: linear-gradient(120deg, var(--brand-c), var(--brand-a)); animation: drift-two 15s ease-in-out infinite alternate; }
.blob-three { bottom: -160px; left: 25%; background: linear-gradient(120deg, var(--brand-d), var(--brand-b)); animation: drift-three 14s ease-in-out infinite alternate; }
.grid-haze {
  position: absolute; inset: 0; opacity: 0.45;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at 50% 20%, black 30%, transparent 80%);
}

.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(247, 248, 252, 0.78);
  border-bottom: 1px solid var(--line);
}
body[data-theme="night"] .site-header { background: rgba(15, 22, 40, 0.75); }
.viewer-strip, .nav-shell, .hero-content, .featured-section, .about-section, .gallery-section, .shop-section, .site-footer, .about-shell {
  width: min(1200px, 94vw); margin-inline: auto;
}

.viewer-strip {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 10px 0;
}
.micro-label { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.auth-message { margin-top: 4px; color: var(--muted); font-size: 0.88rem; }
.auth-status {
  margin-top: 8px; width: fit-content; border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px;
  font-size: 0.73rem; font-weight: 600; color: var(--muted); background: var(--surface);
}
.auth-status[data-state="init"], .auth-status[data-state="signing-in"] { color: var(--brand-a); border-color: rgba(95, 90, 255, 0.35); }
.auth-status[data-state="ready"], .auth-status[data-state="signed-in"] { color: var(--ok); border-color: rgba(30, 159, 115, 0.3); }
.auth-status[data-state="config-missing"], .auth-status[data-state="error"] { color: var(--danger); border-color: rgba(216, 95, 80, 0.35); }

.viewer-actions { display: flex; gap: 10px; align-items: center; }
.auth-icons { display: flex; align-items: center; gap: 8px; }
.icon-auth-btn {
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; color: #1a2338;
  transition: transform 170ms ease, box-shadow 170ms ease, opacity 170ms ease;
}
.icon-auth-btn.google { background: linear-gradient(135deg, #fff1b7, #ffd5a0); }
.icon-auth-btn.apple { background: linear-gradient(135deg, #f8fafc, #dfe7f6); }
.icon-auth-btn.facebook { background: linear-gradient(135deg, #dce7ff, #c9eefe); }
.icon-auth-btn:hover, .icon-auth-btn:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.icon-auth-btn:disabled { cursor: not-allowed; opacity: 0.56; box-shadow: none; transform: none; }
.icon-auth-btn[data-coming-soon="true"] { border-style: dashed; }
.auth-glyph { font-family: "Fraunces", serif; font-size: 1.07rem; font-weight: 700; line-height: 1; }

.viewer-badge {
  min-width: 220px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 9px 12px;
}
.viewer-label { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }
.viewer-name { margin-top: 4px; font-family: "Fraunces", serif; font-size: 1.05rem; }
.viewer-meta { margin-top: 2px; color: var(--muted); font-size: 0.81rem; }

.nav-shell { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 0 14px; }
.brand { text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { width: 52px; height: 52px; border-radius: 14px; box-shadow: var(--shadow-soft); }
.brand-main { font-size: 1.08rem; font-weight: 600; display: block; letter-spacing: 0.01em; }
.brand-sub { margin-top: 2px; display: block; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.main-nav { justify-self: center; display: flex; gap: 18px; font-size: 0.88rem; }
.main-nav a { text-decoration: none; color: var(--muted); font-weight: 500; transition: color 160ms ease; }
.main-nav a:hover, .main-nav a:focus-visible { color: var(--brand-a); }
.nav-actions { display: flex; gap: 8px; align-items: center; }
.ghost-link, .theme-toggle, .signout-btn {
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; font-size: 0.78rem; font-weight: 600;
  color: var(--text); text-decoration: none; background: var(--surface); cursor: pointer;
}
.theme-toggle { background: linear-gradient(130deg, rgba(79, 83, 255, 0.14), rgba(0, 180, 164, 0.14)); }
.signout-btn { background: linear-gradient(130deg, rgba(255, 79, 158, 0.14), rgba(255, 187, 59, 0.14)); }

.hero-section {
  position: relative; margin: 14px auto 0; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #2f3ed8 0%, #8f34c6 44%, #ed4b9e 100%);
}
body[data-theme="night"] .hero-section { background: linear-gradient(135deg, #24308a 0%, #5f2a8c 48%, #a33777 100%); }
.hero-layer::before, .hero-layer::after { content: ""; position: absolute; border-radius: 999px; filter: blur(40px); opacity: 0.45; }
.hero-layer::before { width: 380px; height: 380px; top: -170px; right: -90px; background: #ffd365; }
.hero-layer::after { width: 300px; height: 300px; left: -120px; bottom: -110px; background: #48d8c9; }
.hero-content { position: relative; z-index: 1; padding: 78px 0 92px; text-align: center; }
.hero-chip {
  width: fit-content; margin-inline: auto; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.14); font-size: 0.8rem;
}
.chip-dot { width: 7px; height: 7px; border-radius: 999px; background: #ffd76f; }
.hero-content h1 { margin-top: 20px; font-size: clamp(2.6rem, 8vw, 4.8rem); }
.hero-subtitle { margin-top: 12px; font-size: clamp(1.1rem, 2.8vw, 1.8rem); font-family: "Fraunces", serif; font-weight: 400; }
.hero-text { margin: 14px auto 0; max-width: 760px; line-height: 1.65; color: rgba(255, 255, 255, 0.9); font-size: 1.01rem; }
.hero-stats { margin-top: 24px; display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.stat-pill {
  min-width: 132px; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 14px;
  background: rgba(255, 255, 255, 0.12); padding: 10px 14px;
}
.stat-pill strong { display: block; font-size: 1.2rem; font-family: "Fraunces", serif; }
.stat-pill span { font-size: 0.76rem; letter-spacing: 0.04em; }
.price-note { margin: 17px auto 0; max-width: 780px; font-size: 0.78rem; line-height: 1.5; color: rgba(255, 255, 255, 0.82); }
.hero-wave { display: block; width: 100%; }
.hero-wave path { fill: var(--bg); }

.featured-section, .about-section, .gallery-section, .shop-section { padding: 62px 0 0; }
.section-head { text-align: center; margin-bottom: 22px; }
.section-head h2 { margin-top: 10px; font-size: clamp(2rem, 4vw, 3rem); }
.section-head p { margin: 10px auto 0; max-width: 720px; color: var(--muted); line-height: 1.58; }

.featured-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.featured-card {
  border-radius: 26px; overflow: hidden; background: var(--surface-strong); border: 1px solid var(--line);
  box-shadow: var(--shadow-card); cursor: pointer; transition: transform 180ms ease, box-shadow 180ms ease;
}
.featured-card:hover, .featured-card:focus-within { transform: translateY(-6px); }
.featured-thumb { position: relative; aspect-ratio: 4 / 5; background: linear-gradient(130deg, rgba(79, 83, 255, 0.2), rgba(255, 79, 158, 0.2)); }
.featured-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-thumb[data-missing="true"]::after {
  content: "Upload Ved painting image in arts folder"; position: absolute; left: 10px; right: 10px; bottom: 10px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.84); color: #1b2747; text-align: center; padding: 6px 9px; font-size: 0.72rem;
}
.featured-overlay {
  position: absolute; inset: auto 0 0 0; padding: 16px; color: #fff; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.67));
}
.featured-overlay .tag {
  display: inline-block; border-radius: 999px; padding: 4px 8px; margin-bottom: 8px; font-size: 0.67rem;
  letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid rgba(255, 255, 255, 0.34); background: rgba(255, 255, 255, 0.16);
}
.featured-overlay h3 { font-size: 1.35rem; }
.featured-meta { margin-top: 4px; font-size: 0.74rem; opacity: 0.9; }

.about-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.about-card { border: 1px solid var(--line); border-radius: 20px; padding: 18px; background: var(--surface); box-shadow: var(--shadow-soft); }
.about-card h3 { font-size: 1.3rem; }
.about-card p { margin-top: 8px; color: var(--muted); line-height: 1.6; font-size: 0.92rem; }

.filters-wrap { margin: 0 auto 18px; width: min(980px, 100%); }
.chip-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.chip-row.toggles { margin-top: 10px; }
.chip-btn {
  border: 1px solid transparent; border-radius: 999px; padding: 8px 14px; font-size: 0.8rem; font-weight: 600; color: #ffffff;
  background: linear-gradient(130deg, var(--brand-a), var(--brand-b)); cursor: pointer; transition: transform 150ms ease;
}
.chip-btn:hover, .chip-btn:focus-visible { transform: translateY(-1px); }
.chip-btn.outline { color: var(--text); border-color: var(--line); background: var(--surface); }
.chip-btn.active { box-shadow: 0 7px 16px rgba(79, 83, 255, 0.22); }

.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.gallery-card {
  border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--surface-strong);
  box-shadow: var(--shadow-soft); transition: transform 160ms ease, box-shadow 160ms ease;
}
.gallery-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.gallery-image {
  position: relative; aspect-ratio: 3 / 4;
  background: linear-gradient(130deg, rgba(79, 83, 255, 0.18), rgba(0, 180, 164, 0.2), rgba(255, 79, 158, 0.18));
}
.gallery-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-image[data-missing="true"]::after {
  content: "Upload Ved painting image in arts folder"; position: absolute; left: 10px; right: 10px; bottom: 10px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.87); color: #1d2744; text-align: center; padding: 6px 8px; font-size: 0.7rem;
}
.card-number {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.35); color: #fff; font-size: 0.75rem; display: inline-flex; align-items: center; justify-content: center;
}
.status-chip {
  position: absolute; left: 10px; top: 10px; border-radius: 999px; padding: 4px 8px; font-size: 0.64rem;
  text-transform: uppercase; letter-spacing: 0.08em; color: #093447; background: linear-gradient(120deg, #8cf0c4, #8bcbff); border: 1px solid rgba(13, 74, 86, 0.2);
}
.gallery-copy { padding: 12px; }
.gallery-title { font-size: 1.01rem; font-family: "Fraunces", serif; }
.gallery-meta { margin-top: 4px; color: var(--muted); font-size: 0.77rem; }
.gallery-actions { margin-top: 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.action-btn {
  border: 1px solid var(--line); border-radius: 9px; padding: 7px 5px; font-size: 0.7rem; font-weight: 600; cursor: pointer; color: var(--text);
}
.action-btn.fav { background: rgba(255, 79, 158, 0.1); }
.action-btn.fav.active { background: linear-gradient(130deg, rgba(255, 79, 158, 0.2), rgba(255, 187, 59, 0.22)); }
.action-btn.cart { background: rgba(0, 180, 164, 0.11); }
.action-btn.buy { background: rgba(79, 83, 255, 0.12); }
.empty-grid {
  grid-column: 1 / -1; border: 1px dashed var(--line); border-radius: 18px; text-align: center; padding: 26px 16px; color: var(--muted); background: var(--surface);
}

.shop-section { padding-bottom: 30px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.shop-card { border: 1px solid var(--line); border-radius: 22px; padding: 16px; background: var(--surface); box-shadow: var(--shadow-soft); }
.shop-card h3 { margin-top: 8px; font-size: 1.4rem; }
.cart-list, .bought-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.cart-item, .bought-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--surface-strong); }
.cart-head { display: flex; gap: 8px; justify-content: space-between; }
.cart-name { font-size: 0.9rem; }
.cart-price { margin-top: 2px; color: var(--muted); font-size: 0.75rem; }
.cart-controls { margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.qty-btn {
  width: 25px; height: 25px; border-radius: 8px; border: 1px solid var(--line); font-weight: 700; cursor: pointer; background: var(--surface-muted); color: var(--text);
}
.qty-label { min-width: 48px; text-align: center; font-size: 0.75rem; color: var(--muted); }
.remove-btn { margin-left: auto; border: 0; background: transparent; color: var(--danger); font-size: 0.74rem; cursor: pointer; }
.empty-note { margin-top: 12px; border: 1px dashed var(--line); border-radius: 12px; padding: 10px; color: var(--muted); font-size: 0.82rem; }
.empty-note[hidden] { display: none; }
.amount-row { margin-top: 9px; display: flex; justify-content: space-between; font-size: 0.86rem; color: var(--muted); }
.amount-row.grand { margin-top: 11px; border-top: 1px solid var(--line); padding-top: 10px; color: var(--text); font-weight: 700; }
.checkout-btn {
  margin-top: 13px; width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px; font-size: 0.84rem; font-weight: 700;
  cursor: pointer; color: #1d2746; background: linear-gradient(130deg, #ffd76e, #ff9f62);
}
body[data-theme="night"] .checkout-btn { color: #1a1d2d; }
.checkout-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.mini-stat {
  margin-top: 10px; border: 1px solid var(--line); border-radius: 11px; padding: 9px 10px; display: flex; justify-content: space-between; font-size: 0.84rem;
}

.site-footer {
  margin-top: 26px; margin-bottom: 26px; text-align: center; border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); font-size: 0.82rem;
}

.painting-modal {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 18px;
}
.painting-modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8, 12, 24, 0.78); backdrop-filter: blur(4px); }
.modal-card {
  position: relative; z-index: 1; width: min(980px, 100%); border-radius: 22px; border: 1px solid var(--line);
  background: var(--surface-strong); box-shadow: var(--shadow-card); overflow: hidden;
}
.modal-close {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 1.3rem; line-height: 1; cursor: pointer; background: var(--surface); color: var(--text);
}
.modal-layout { display: grid; grid-template-columns: 1fr 1fr; }
.modal-image-shell {
  min-height: 340px; background: linear-gradient(140deg, rgba(79, 83, 255, 0.18), rgba(255, 79, 158, 0.2)); display: grid; place-items: center; position: relative;
}
.modal-image-shell img { width: 100%; height: 100%; object-fit: contain; max-height: 620px; }
.modal-image-fallback {
  position: absolute; bottom: 14px; left: 14px; right: 14px; border-radius: 12px; font-size: 0.79rem; text-align: center; padding: 9px;
  background: rgba(255, 255, 255, 0.9); color: #1d2740;
}
.modal-copy { padding: 28px 24px; display: grid; align-content: center; gap: 12px; }
.modal-number {
  width: fit-content; border-radius: 999px; padding: 6px 11px; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: #ffffff; background: linear-gradient(130deg, var(--brand-a), var(--brand-b));
}
.modal-copy h3 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.modal-meta { color: var(--muted); font-size: 0.86rem; }
.modal-description { color: var(--muted); line-height: 1.66; }
.modal-actions { margin-top: 4px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.modal-btn {
  border: 1px solid var(--line); border-radius: 10px; padding: 9px; font-size: 0.77rem; font-weight: 600; cursor: pointer; color: var(--text);
}
.modal-btn.fav { background: rgba(255, 79, 158, 0.14); }
.modal-btn.fav.active { background: linear-gradient(130deg, rgba(255, 79, 158, 0.2), rgba(255, 187, 59, 0.24)); }
.modal-btn.cart { background: rgba(0, 180, 164, 0.14); }
.modal-btn.buy { background: rgba(79, 83, 255, 0.14); }

.about-page-header {
  position: sticky; top: 0; z-index: 25; border-bottom: 1px solid var(--line); background: var(--surface); backdrop-filter: blur(9px);
}
.about-nav {
  width: min(1040px, 94vw); margin-inline: auto; padding: 12px 0; display: flex; justify-content: space-between; gap: 10px; align-items: center;
}
.about-shell { padding-top: 18px; display: grid; gap: 14px; }
.about-hero-card, .about-grid-card {
  border: 1px solid var(--line); border-radius: 22px; background: var(--surface); padding: clamp(16px, 3vw, 24px); box-shadow: var(--shadow-soft);
}
.about-hero-card h1 { margin-top: 10px; font-size: clamp(2rem, 6vw, 3.2rem); }
.about-hero-card p { margin-top: 12px; color: var(--muted); line-height: 1.65; }
.about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.about-grid-card h2 { margin-top: 8px; font-size: 1.7rem; }
.about-grid-card ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); display: grid; gap: 6px; line-height: 1.6; }
.timeline-list { margin-top: 12px; display: grid; gap: 8px; }
.timeline-item {
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-strong); padding: 10px; color: var(--muted); line-height: 1.55; font-size: 0.9rem;
}
.timeline-item strong { display: block; margin-bottom: 4px; color: var(--text); font-family: "Fraunces", serif; font-weight: 600; }
.about-note {
  margin-top: 12px; border: 1px dashed var(--line); border-radius: 12px; padding: 10px; color: var(--muted); font-size: 0.82rem; line-height: 1.55;
}

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

@keyframes drift-one { to { transform: translate(30px, -20px) scale(1.05); } }
@keyframes drift-two { to { transform: translate(-35px, 28px) scale(0.95); } }
@keyframes drift-three { to { transform: translate(18px, -36px) scale(1.08); } }

@media (max-width: 1100px) {
  .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .viewer-strip { grid-template-columns: 1fr; }
  .viewer-actions { flex-wrap: wrap; }
  .viewer-badge { width: 100%; }
  .nav-shell { grid-template-columns: 1fr; gap: 10px; }
  .main-nav, .nav-actions { justify-self: start; }
  .nav-actions { flex-wrap: wrap; }
  .about-cards, .shop-section, .about-grid { grid-template-columns: 1fr; }
  .modal-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .hero-content { padding-top: 64px; padding-bottom: 76px; }
  .featured-grid, .gallery-grid { grid-template-columns: 1fr; }
  .gallery-actions, .modal-actions { grid-template-columns: 1fr 1fr; }
}
