/* Public gallery — muruga.asia look: night peacock-teal, temple gold, sandal cream. */
:root {
  --night: #061416; --night-2: #0a1e21; --deep: #0d2a2d; --teal: #138a80;
  --gold: #e9b949; --gold-soft: #f6dd9c; --line: rgba(233, 185, 73, .22);
  --cream: #f5ecd8; --muted: #a9b5ad; --kumkum: #b3201a;
  --display: "Cormorant Garamond", "Noto Serif Tamil", Georgia, serif;
  --body: "Manrope", "Noto Sans Tamil", system-ui, sans-serif;
  --radius: 18px; --wrap: 1180px;
  color-scheme: dark;
}
:lang(ta) { --display: "Noto Serif Tamil", "Cormorant Garamond", serif; --body: "Noto Sans Tamil", "Manrope", sans-serif; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; font: 16px/1.6 var(--body); color: var(--cream);
  background: radial-gradient(1200px 600px at 50% -10%, rgba(19, 138, 128, .28), transparent 60%), var(--night);
}
a { color: var(--gold-soft); text-decoration-color: rgba(246, 221, 156, .4); text-underline-offset: 3px; }
a:hover { color: var(--gold); }
img { max-width: 100%; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.wrap.wide { width: min(1600px, 100% - 16px); }
.wrap.narrow { width: min(620px, 100% - 32px); }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(6, 20, 22, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding-top: env(safe-area-inset-top); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cream); min-width: 0; }
.brand img { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand b { font: 600 1.05rem/1.2 var(--display); letter-spacing: .02em; color: var(--gold-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .9rem; white-space: nowrap; }
.lang:hover { border-color: var(--gold); }

/* hero */
.hero { text-align: center; padding: clamp(40px, 9vw, 96px) 0 clamp(24px, 5vw, 48px); }
.hero.small { padding-top: clamp(24px, 5vw, 48px); }
.eyebrow { margin: 0 0 6px; text-transform: uppercase; letter-spacing: .22em; font-size: .74rem; color: var(--gold); }
:lang(ta) .eyebrow { letter-spacing: .04em; text-transform: none; font-size: .85rem; }
h1 { margin: 0; font: 600 clamp(2.2rem, 7vw, 4rem)/1.1 var(--display); color: var(--gold-soft); text-wrap: balance; }
:lang(ta) h1 { font-size: clamp(1.7rem, 5.4vw, 3rem); line-height: 1.35; }
.sub { margin: 6px 0 0; font: 500 1.15rem/1.4 var(--display); color: var(--cream); opacity: .85; }
.meta { margin: 10px 0 0; color: var(--muted); font-size: .92rem; }
.lead { max-width: 640px; margin: 12px auto 0; color: var(--cream); opacity: .9; }
.crumb { margin: 0 0 14px; font-size: .92rem; }
.crumb a { text-decoration: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px; }
.rule { display: flex; align-items: center; gap: 14px; justify-content: center; margin: 18px auto; max-width: 280px; color: var(--gold); }
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.rule::after { background: linear-gradient(90deg, var(--gold), transparent); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--gold); background: var(--gold); color: var(--night); font: 600 .95rem var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--gold-soft); color: var(--night); }
.btn.ghost { background: transparent; color: var(--gold-soft); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); }

/* album groups and cards */
.group { margin: 8px 0 48px; }
.group-title { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; font: 600 clamp(1.4rem, 3.4vw, 1.9rem)/1.2 var(--display); color: var(--gold-soft); }
.group-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.agrid { display: grid; gap: clamp(12px, 2vw, 22px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
@media (max-width: 520px) { .agrid { grid-template-columns: 1fr 1fr; } }
.acard { display: flex; flex-direction: column; text-decoration: none; color: var(--cream); background: linear-gradient(180deg, var(--night-2), var(--deep)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .25s, border-color .25s, box-shadow .25s; }
.acard:hover { transform: translateY(-3px); border-color: rgba(233, 185, 73, .55); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .8); color: var(--cream); }
.acard-img { display: block; aspect-ratio: 4 / 3; background: var(--deep); overflow: hidden; }
.acard-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s; }
.acard:hover .acard-img img { transform: scale(1.04); }
.nocover { display: grid; place-items: center; height: 100%; font-size: 2rem; color: var(--gold); opacity: .5; }
/* text sits below the photo, never on top of it */
.acard-body { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 14px; }
.acard-title { font: 600 1.18rem/1.25 var(--display); color: var(--gold-soft); }
:lang(ta) .acard-title { font-size: 1.02rem; line-height: 1.45; }
.acard-sub { font-size: .85rem; color: var(--cream); opacity: .8; }
.acard-meta { font-size: .8rem; color: var(--muted); }
.acard-count { margin-top: 4px; font-size: .78rem; color: var(--gold); letter-spacing: .04em; }
@media (max-width: 520px) { .acard-body { padding: 10px 11px 12px; } .acard-title { font-size: 1.02rem; } .acard-sub, .acard-meta { font-size: .76rem; } }

/* masonry grid */
.masonry { columns: 4 280px; column-gap: 10px; padding-bottom: 40px; }
@media (max-width: 640px) { .masonry { columns: 2; column-gap: 6px; } }
.tile { display: block; margin: 0 0 10px; break-inside: avoid; border-radius: 12px; overflow: hidden; background: var(--deep); outline-offset: 3px; }
@media (max-width: 640px) { .tile { margin-bottom: 6px; border-radius: 8px; } }
.tile img { display: block; width: 100%; height: auto; transition: transform .5s, opacity .3s; }
.tile:hover img { transform: scale(1.025); }
.tile:focus-visible { outline: 2px solid var(--gold); }

.notice { text-align: center; color: var(--muted); padding: 40px 16px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-rows: auto 1fr auto; background: rgba(3, 10, 11, .97); touch-action: none; }
.lb[hidden] { display: none; }
.lb-bar { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px; color: var(--muted); font-size: .9rem; }
.lb-bar .lb-count { flex: 1; padding-left: 6px; }
.lb-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(6, 20, 22, .6); color: var(--cream); font: 600 .9rem var(--body); text-decoration: none; cursor: pointer; }
.lb-btn:hover { border-color: var(--gold); color: var(--gold); }
.lb-stage { position: relative; overflow: hidden; display: grid; place-items: center; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: transform .2s ease-out; will-change: transform; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 1.6rem; }
.lb-prev { left: 10px; } .lb-next { right: 10px; }
@media (hover: none) { .lb-nav { display: none; } }
.lb-cap { min-height: 40px; padding: 8px 16px calc(10px + env(safe-area-inset-bottom)); text-align: center; color: var(--muted); font-size: .88rem; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; padding: 10px 18px; border-radius: 999px; background: var(--gold); color: var(--night); font-weight: 600; }

/* guest upload page */
.upload { padding: 32px 0 56px; text-align: center; }
.upload h1 { font-size: clamp(1.9rem, 6vw, 2.8rem); }
.field { display: flex; flex-direction: column; gap: 6px; margin: 22px 0 14px; text-align: left; font-size: .9rem; color: var(--muted); }
.input { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--night-2); color: var(--cream); font: 1rem var(--body); }
.input:focus { outline: none; border-color: var(--gold); }
.pick { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 16px; border: 1.5px dashed rgba(233, 185, 73, .5); border-radius: var(--radius); background: rgba(13, 42, 45, .55); cursor: pointer; }
.pick:hover { border-color: var(--gold); }
.pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pick-btn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 28px; border-radius: 999px; background: var(--gold); color: var(--night); font-weight: 700; font-size: 1.05rem; }
.pick-hint { font-size: .85rem; color: var(--muted); }
.busy .pick { opacity: .55; pointer-events: none; }
.gal-progress { margin-top: 16px; text-align: left; }
.gal-prog-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: .88rem; }
.gal-prog-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.gal-prog-row b { flex: none; font-weight: 600; }
.gal-prog-row.ok b { color: #7fd6b7; } .gal-prog-row.bad b { color: #ff9a8f; }
.gal-done { padding: 12px 14px; border-radius: 12px; background: rgba(19, 138, 128, .2); border: 1px solid rgba(19, 138, 128, .5); color: var(--cream); text-align: center; }
.gal-retry { margin-top: 12px; }
.fine { font-size: .78rem; color: var(--muted); }

.foot { padding: 20px 0 calc(28px + env(safe-area-inset-bottom)); text-align: center; color: var(--muted); font-size: .85rem; }
.foot p { margin: 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
