* { box-sizing: border-box; margin: 0; }
:root { --ink: #1d1445; --ink-2: rgba(29,20,69,.62); --soft: #efeaf8; --line: rgba(29,20,69,.12); --gap: 16px; --ml: 'Anek Malayalam', 'Noto Sans Malayalam', system-ui, sans-serif; --en: 'Plus Jakarta Sans', system-ui, sans-serif; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--en), var(--ml); color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.main { margin-left: var(--nav-w); min-height: 100vh; padding: 0 20px 40px; }

/* top: search + upload */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 14px 0 8px; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); }
.top-logo { display: none; width: 40px; height: 40px; flex: none; }
.top-logo svg { width: 100%; height: 100%; }
.search { position: relative; flex: 1; max-width: 980px; }
.search-i { position: absolute; left: 18px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; fill: none; stroke: var(--ink-2); stroke-width: 2.4; stroke-linecap: round; pointer-events: none; }
.search input { width: 100%; height: 50px; padding: 0 20px 0 50px; border: 2px solid transparent; border-radius: 26px; background: var(--soft); outline: none; font: 600 15.5px var(--ml), var(--en); }
.search input:hover { background: #e7e0f4; }
.search input:focus { background: #fff; border-color: #c425d6; box-shadow: 0 0 0 4px rgba(196,37,214,.14); }
.search input::placeholder { color: var(--ink-2); font-weight: 500; }
.sugg { position: absolute; top: calc(100% + 8px); left: 0; right: 0; list-style: none; padding: 8px; border-radius: 22px; background: #fff; box-shadow: 0 18px 50px rgba(40,20,110,.25); max-height: 60vh; overflow: auto; }
.sugg li { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 14px; cursor: pointer; font: 700 14.5px var(--ml), var(--en); }
.sugg li small { font: 500 12.5px var(--ml), var(--en); color: var(--ink-2); }
.sugg li:hover, .sugg li.on { background: var(--soft); }
.sugg li.none { color: var(--ink-2); cursor: default; }
.up-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 46px; padding: 0 20px; border-radius: 24px; text-decoration: none; font: 800 14.5px var(--ml), var(--en); color: #1a0b4a; background: linear-gradient(135deg, #ffd23a, #ff9d00); transition: transform .15s, filter .15s; white-space: nowrap; }
.up-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.up-btn.solid { margin-top: 6px; }

/* district chips */
.chips-wrap { position: sticky; top: 72px; z-index: 19; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); padding: 4px 0 12px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 40px; padding: 0 18px; border: 0; border-radius: 20px; background: var(--soft); font: 700 14px var(--ml), var(--en); transition: background .15s; white-space: nowrap; }
.chip:hover { background: #e3dbf3; }
.chip.on { background: var(--ink); color: #fff; }
.chip.filter { background: linear-gradient(135deg, #ffd23a, #ff9d00); color: #1a0b4a; }

/* masonry */
.feed { display: flex; gap: var(--gap); align-items: flex-start; padding-top: 6px; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pin { display: flex; flex-direction: column; gap: 6px; padding-bottom: 8px; }
.pin-img {
  position: relative; display: block; width: 100%; border-radius: 18px; overflow: hidden; cursor: zoom-in; outline: none;
  background: linear-gradient(110deg, #f1ecfa 30%, #e4dcf4 50%, #f1ecfa 70%) 0 0 / 200% 100%; animation: shimmer 1.3s linear infinite;
}
.pin-img.loaded { animation: none; background: var(--soft); }
.pin-img img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s; }
.pin-img.loaded img { opacity: 1; }
.pin-img:focus-visible { box-shadow: 0 0 0 3px #c425d6; }
.pin-over { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; padding: 10px; background: linear-gradient(180deg, rgba(20,10,50,.28), transparent 35%, transparent 60%, rgba(20,10,50,.5)); opacity: 0; transition: opacity .15s; }
.pin-img:hover .pin-over, .pin-img:focus-visible .pin-over { opacity: 1; }
.pin-btn { height: 36px; padding: 0 14px; border: 0; border-radius: 18px; background: #fff; color: var(--ink); font: 800 13px var(--ml), var(--en); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.pin-btn:hover { background: var(--soft); }
.pin-cap { padding: 0 4px; display: flex; flex-direction: column; }
.pin-cap b { font: 800 14px/1.3 var(--ml), var(--en); }
.pin-cap span { font: 500 12.5px/1.3 var(--ml), var(--en); color: var(--ink-2); }
@keyframes shimmer { to { background-position: -200% 0; } }
.sentinel { height: 1px; }
.foot { margin-top: 28px; text-align: center; font-size: 13px; color: var(--ink-2); }

/* pin close-up */
.muted { color: var(--ink-2); font-weight: 500 !important; font-size: 13.5px !important; }
.btn { height: 46px; padding: 0 20px; border: 0; border-radius: 24px; background: var(--soft); font: 800 14.5px var(--ml), var(--en); text-decoration: none; display: inline-flex; align-items: center; }
.btn:hover { background: #e3dbf3; }
.btn.primary { background: linear-gradient(135deg, #ffd23a, #ff9d00); color: #1a0b4a; }
.btn.ghost { background: transparent; color: var(--ink-2); }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 90; translate: -50% 20px; opacity: 0; pointer-events: none; padding: 12px 20px; border-radius: 14px; background: var(--ink); color: #fff; font: 700 14px var(--ml), var(--en); transition: .3s; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; translate: -50% 0; }

@media (max-width: 767px) {
  .main { margin-left: 0; padding: 0 10px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); }
  :root { --gap: 8px; }
  .top { gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 0 6px; }
  .top-logo { display: block; }
  .up-btn:not(.solid) { display: none; }
  .search input { height: 46px; }
  .chips-wrap { top: calc(62px + env(safe-area-inset-top)); }
  .chip { height: 36px; padding: 0 15px; }
  .pin-over { display: none; }
  .pin-img { border-radius: 14px; }
  .toast { bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* search pill is a button that opens the Spotlight dock */
.search { display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 16px 0 50px; border: 2px solid transparent; border-radius: 26px; background: var(--soft); text-align: left; font: 500 15.5px var(--ml), var(--en); color: var(--ink-2); }
.search:hover { background: #e7e0f4; }
.search span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search kbd { flex: none; padding: 3px 8px; border-radius: 8px; background: rgba(29,20,69,.08); font: 700 12px var(--en); }
.top-logo { width: auto; height: 36px; }
.top-logo img { display: block; height: 100%; width: auto; }
@media (max-width: 767px) { .search kbd { display: none; } }

/* about + FAQ (visible text for readers, search engines and AI assistants) */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.about { max-width: 820px; margin: 48px auto 0; padding: 28px 24px; border-radius: 24px; background: var(--soft); }
.about h2 { font: 800 22px/1.3 var(--ml); margin-bottom: 10px; }
.about p { font: 500 15.5px/1.7 var(--ml), var(--en); color: rgba(29,20,69,.82); }
.about a { color: #9a1fb0; font-weight: 700; }
.faq { margin-top: 16px; display: grid; gap: 8px; }
.faq details { border-radius: 16px; background: #fff; padding: 0 18px; }
.faq summary { cursor: pointer; padding: 14px 0; font: 700 15px/1.4 var(--ml), var(--en); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-weight: 800; color: #c425d6; }
.faq details[open] summary::after { content: '–'; }
.faq details p { padding: 0 0 16px; font-size: 14.5px; }

/* never let the top bar or its search pill push the page wider than the screen */
.main, .top, .search, .search span { min-width: 0; }
.main { overflow-x: clip; }

/* Pinterest-style masonry: equal fixed-width columns, centred, cards keep their natural height; the number of columns follows the window */
@media (min-width: 768px) {
  .feed { justify-content: center; }
  .col { flex: 0 0 236px; width: 236px; }
}
.pin-img { min-height: 60px; }

.about { margin: 40px auto 0; max-width: 720px; padding: 0 16px; font-size: 13px; color: var(--ink-2); }
.about h2 { font-size: 15px; margin: 0 0 8px; color: var(--ink); }
.about h3 { font-size: 13px; margin: 12px 0 2px; color: var(--ink); }
.about p { margin: 0; line-height: 1.5; }

/* card footer: name on the left, love on the right */
.pin-cap { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pc-text { display: flex; flex-direction: column; min-width: 0; }
.pc-like { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 6px 0 4px; margin: -2px -4px 0 0; border: 0; border-radius: 14px; background: none; color: var(--ink-2); font: 800 13px var(--en); cursor: pointer; transition: background .15s, transform .15s; }
.pc-like svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linejoin: round; transition: fill .2s, stroke .2s, transform .2s; }
.pc-like i { font-style: normal; min-width: 0; }
.pc-like:hover { background: #ffeef3; color: #d6174a; }
.pc-like:active svg { transform: scale(.8); }
.pc-like[aria-pressed="true"] { color: #d6174a; }
.pc-like[aria-pressed="true"] svg { fill: #ff3d6e; stroke: #ff3d6e; }

/* home: title + sort bar (Pinterest style) */
.top-title { font: 800 22px var(--ml), var(--en); }
.top-title small { margin-left: 8px; font: 600 14px var(--ml), var(--en); color: var(--ink-2); }
.chips-wrap { top: 62px; display: grid; gap: 8px; }
.chip.sort { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1.5px solid var(--line); height: 38px; }
.chip.sort svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.chip.sort.on { background: linear-gradient(135deg, #ffd23a, #ff9d00); border-color: transparent; color: #1a0b4a; }
.chip.sw { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px 0 10px; }
.chip.sw i { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.18); background: var(--c); }
.chip.sw.on i { box-shadow: 0 0 0 2px #fff, inset 0 0 0 1.5px rgba(0,0,0,.18); }
.feed.grouped { display: block; }
.grp { margin: 6px 0 22px; }
.grp > h3 { position: sticky; top: 118px; z-index: 5; display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; padding: 8px 0; background: rgba(255,255,255,.94); font: 800 18px var(--ml), var(--en); }
.grp > h3 small { font: 600 13px var(--ml), var(--en); color: var(--ink-2); }
.grp > h3 i { width: 12px; height: 12px; border-radius: 50%; flex: none; align-self: center; background: var(--c, transparent); }
.gcols { display: flex; gap: var(--gap); align-items: flex-start; }
.sort-note { padding: 40px 0; text-align: center; color: var(--ink-2); font-weight: 600; }
@media (max-width: 767px) { .top-title { font-size: 19px; } .chips-wrap { top: calc(58px + env(safe-area-inset-top)); } .grp > h3 { top: calc(118px + env(safe-area-inset-top)); } }
