/* Kaadu — styled to match Zoorassic Park (Gopinath's animal guide): Inter, neutral near-black greys,
   a green accent and a blue "say the name" speaker, flat cards with small corners and the name laid
   over the photo, a streaming-style banner and sideways shelves. Built on Kolam tokens (kolam/). */
:root[data-theme="dark"]:not([data-theme="light"]):not([data-theme="contrast"]) { /* beats Kolam's prefers-color-scheme rule */
  --bg: #0E0E0E; --surface: #181818; --surface-2: #232323; --ink: #F2F2F2; --ink-2: #A8A8A8; --ink-3: #7A7A7A;
  --line: #2A2A2A; --accent: #7CC6A3; --accent-ink: #0E0E0E; --accent-soft: #1C2B24; --blue: #4A7DF0; --blue-ink: #FFFFFF;
  /* Kolam names, mapped to the same palette */
  --surface-sunken: var(--surface-2); --line-strong: #3A3A3A; --ink-muted: var(--ink-3);
  --primary: var(--accent); --on-primary: var(--accent-ink); --primary-soft: var(--accent-soft); --primary-text: var(--accent);
  --sans: 'Inter', 'Noto Sans Tamil', system-ui, -apple-system, sans-serif; --font-sans: var(--sans); --font-display: var(--sans);
  color-scheme: dark;
}
:root { --tabbar-h: 64px; --top-h: 69px; --pad: clamp(16px, 3vw, 48px); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: clip; padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
:lang(ta) { font-family: 'Noto Sans Tamil', var(--sans); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
img { display: block; max-width: 100%; }
.k-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only, .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; padding: 8px 16px; background: var(--surface); border-radius: 6px; }
.skip:focus { top: 8px; }
main { width: 100%; margin: 0 auto; padding: 24px var(--pad) 64px; outline: none; }
.hero-page main { padding-top: 0; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); transition: background .3s, box-shadow .3s; }
.hero-page .top:not(.solid) { background: linear-gradient(to bottom, rgba(0,0,0,.75), rgba(0,0,0,0)); border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.hero-page .top:not(.solid) .search { background: rgba(255,255,255,.14); border-color: transparent; }
.hero-page .top:not(.solid) .topnav a { color: rgba(255,255,255,.8); }
.top-inner { display: flex; align-items: center; gap: 28px; padding: 12px var(--pad); }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; min-height: 44px; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand-ta { font-size: 14px; color: var(--ink-2); }
.search { flex: 0 1 460px; min-width: 200px; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; height: 44px; transition: border-color .15s, box-shadow .15s; }
.search .k-icon { color: var(--ink-3); width: 18px; height: 18px; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 400 15px var(--sans); height: 100%; }
.search input::placeholder { color: var(--ink-3); }
.search input::-webkit-search-cancel-button { display: none; }
.topnav { display: flex; gap: 4px; margin-left: auto; }
.topnav a { white-space: nowrap; padding: 8px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 500; font-size: 15px; }
.topnav a:hover { color: var(--ink); background: var(--surface-2); }
.topnav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.langswitch { display: inline-flex; align-items: center; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); min-height: 40px; flex-shrink: 0; }
.langswitch .opt { padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 14px; line-height: 20px; color: var(--ink-2); white-space: nowrap; }
.langswitch[aria-checked="false"] .opt[data-l="en"], .langswitch[aria-checked="true"] .opt[data-l="ta"] { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 899px) {
  .top-inner { gap: 12px; flex-wrap: wrap; padding: 10px 16px; }
  .topnav { display: none; }
  .langswitch { margin-left: auto; }
  .search { display: none; order: 3; flex: 1 1 100%; }
  .search-page .search { display: flex; }
}
@media (min-width: 900px) { body { padding-bottom: 0; } .tabbar { display: none !important; } }

/* ---------- Bottom tab bar (phone) ---------- */
.tabbar { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(4, 1fr); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.tabbar a span { white-space: nowrap; }
html:lang(ta) .tabbar a { font-size: 11px; }
.tabbar a[aria-current="page"] { color: var(--accent); }

/* ---------- Type ---------- */
.eyebrow { display: block; font-size: 13px; font-weight: 600; color: var(--ink-3); letter-spacing: .02em; }
.h-display { font: 800 clamp(30px, 4.4vw, 46px)/1.08 var(--sans); letter-spacing: -.025em; margin: 6px 0 0; }
.h-display:lang(ta) { font-size: clamp(26px, 3.8vw, 38px); line-height: 1.3; letter-spacing: 0; }
.h-section { font: 700 22px/1.25 var(--sans); letter-spacing: -.01em; margin: 4px 0 0; }
.lede { color: var(--ink-2); font-size: 17px; margin: 10px 0 0; max-width: 62ch; }
.note { color: var(--ink-2); font-size: 14px; margin: 6px 0 0; max-width: 72ch; }
.page-head { margin: 12px 0 24px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 40px 0 16px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 6px; font-weight: 600; font-size: 15px; border: 1px solid transparent; transition: background .15s, transform .1s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn .k-icon { width: 18px; height: 18px; }
.btn.outline { border-color: var(--line); background: var(--surface); }
.btn.outline:hover { background: var(--surface-2); }

/* A blue speaker that says a name, beside the name wherever it is shown */
.name-row, .title-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.say-name { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; transition: transform .1s, background .15s; }
.say-name .k-icon { width: 16px; height: 16px; stroke-width: 2; }
.say-name:active { transform: scale(.92); }
.say-name.big { width: 44px; height: 44px; } .say-name.big .k-icon { width: 22px; height: 22px; }
.say-round { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; transition: transform .15s, background .15s; }
.say-round:hover { transform: scale(1.06); }
.say-round .k-icon { width: 22px; height: 22px; }
.say-name.speaking, .say-round.speaking { background: color-mix(in srgb, var(--blue) 75%, #000); box-shadow: 0 0 0 5px color-mix(in srgb, var(--blue) 35%, transparent); }

/* ---------- Featured today: a full-bleed banner under the see-through header ---------- */
.feature { position: relative; margin: calc(-1 * var(--top-h)) calc(-1 * var(--pad)) 8px; background: #000; color: #fff; overflow: hidden; }
.feature-img { position: relative; display: block; height: min(86svh, 56vw); min-height: 460px; background: var(--surface-2); }
.feature-img img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
.feature-img img.loaded { opacity: 1; }
.feature-img::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 62% at 0% 92%, rgba(0,0,0,.8) 0%, rgba(0,0,0,.45) 45%, rgba(0,0,0,0) 75%), linear-gradient(to top, var(--bg) 0%, rgba(14,14,14,0) 14%); }
.feature-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 var(--pad) 9vw; pointer-events: none; }
.feature-body > * { pointer-events: auto; }
.feature-body .eyebrow { color: rgba(255,255,255,.8); }
.feature-body .h-display { color: #fff; font: 800 clamp(34px, 5.6vw, 72px)/1 var(--sans); letter-spacing: -.03em; text-shadow: 0 2px 24px rgba(0,0,0,.35); margin: 8px 0 0; }
.feature-body .h-display:lang(ta) { font-size: clamp(30px, 4.6vw, 58px); line-height: 1.2; letter-spacing: 0; }
.feature-body p { color: rgba(255,255,255,.9); max-width: 54ch; font-size: 17px; margin: 14px 0 0; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.feature-body .row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.feature-body .btn { height: 52px; padding: 0 24px; font-size: 18px; font-weight: 700; border: 0; }
.feature-body .btn.accent { background: #fff; color: #111; }
.feature-body .btn.outline { background: rgba(110,110,110,.6); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.feature-body .btn.outline:hover { background: rgba(110,110,110,.4); }
.feature-body .btn.save.on { background: #fff; color: #111; }
.feature + .shelf { margin-top: -6vw; position: relative; z-index: 2; }
@media (max-width: 760px) {
  .feature-img { height: 78svh; min-height: 0; }
  .feature-img::after { background: linear-gradient(to top, rgba(0,0,0,.8) 0%, rgba(0,0,0,.35) 30%, rgba(0,0,0,0) 48%), linear-gradient(to top, var(--bg) 0%, rgba(14,14,14,0) 10%); }
  .feature-body { padding: 0 16px 28px; }
  .feature-body p { font-size: 15px; }
  .feature-body .btn { height: 46px; font-size: 16px; padding: 0 18px; }
  .feature + .shelf { margin-top: 0; }
}

/* ---------- Shelves: rows that scroll sideways ---------- */
.shelf { margin: 0 0 34px; }
.shelf-title { font: 700 21px/1.2 var(--sans); letter-spacing: -.01em; margin: 0 0 12px; }
.shelf-title a { display: inline-flex; align-items: baseline; gap: 12px; }
.shelf-title .see { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--accent); opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .2s; }
.shelf-title .see .k-icon { width: 14px; height: 14px; }
.shelf-title a:hover .see, .shelf:hover .shelf-title .see, .shelf-title a:focus-visible .see { opacity: 1; transform: none; }
@media (hover: none) { .shelf-title .see { opacity: 1; transform: none; } }
.shelf-wrap { position: relative; margin: 0 calc(-1 * var(--pad)); }
.shelf-track { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 14px var(--pad) 18px; scroll-padding: 0 var(--pad); }
.shelf-track::-webkit-scrollbar { display: none; }
.shelf-track > .card { flex: 0 0 clamp(150px, 21vw, 300px); scroll-snap-align: start; transition: transform .25s cubic-bezier(.2,.7,.2,1), z-index 0s .25s; }
.shelf-track > .card .card-img { aspect-ratio: 16 / 9; border-radius: 6px; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .shelf-track > .card:hover { transform: scale(1.12); z-index: 5; transition: transform .25s cubic-bezier(.2,.7,.2,1) .15s, z-index 0s; }
  .shelf-track > .card:hover .card-img { box-shadow: 0 14px 34px -10px rgba(0,0,0,.8); }
  .shelf-track > .card:first-child:hover { transform-origin: left center; }
  .shelf-track > .card:last-child:hover { transform-origin: right center; }
}
.shelf-arrow { position: absolute; top: 14px; bottom: 18px; z-index: 6; width: max(44px, 3vw); max-width: 64px; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .2s, background .2s; }
.shelf-arrow.prev { left: 0; } .shelf-arrow.next { right: 0; }
.shelf-arrow .k-icon { width: 30px; height: 30px; stroke-width: 2.4; }
.shelf-wrap:hover .shelf-arrow, .shelf-arrow:focus-visible { opacity: 1; }
.shelf-arrow:hover { background: rgba(0,0,0,.72); }
@media (hover: none) { .shelf-arrow { display: none; } }
@media (max-width: 760px) { .shelf-track { gap: 8px; padding: 8px 16px 12px; } .shelf-title { font-size: 18px; } }
.shelf .card-sub { display: none; }

/* ---------- Group filters (with plant photos) ---------- */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 4px var(--pad) 14px; margin: 0 calc(-1 * var(--pad)); scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: 14px; white-space: nowrap; }
.filter:hover { border-color: var(--ink-3); color: var(--ink); }
.filter[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.fpics { display: flex; }
.fpics img { width: 30px; height: 30px; border-radius: 4px; object-fit: cover; border: 2px solid var(--surface); background: var(--surface-2); }
.fpics img + img { margin-left: -12px; }
.filter[aria-current="true"] .fpics img { border-color: var(--ink); }

/* ---------- Cards: photo with the name laid over the bottom ---------- */
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
@media (max-width: 760px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.card { position: relative; display: block; min-width: 0; }
.card-img { position: relative; aspect-ratio: 4 / 3; border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s; -webkit-user-select: none; user-select: none; }
.card-img img.loaded { opacity: 1; }
.card-img::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,0) 45%); transition: background .2s; }
@media (hover: hover) { .card:hover .card-img::after { background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,.12) 55%, rgba(0,0,0,.25)); } }
.card-meta { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 12px 14px; pointer-events: none; color: #fff; }
.card-meta > div { min-width: 0; }
.card-meta button { pointer-events: auto; }
.name-row .card-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-name { margin: 0; color: #fff; font-weight: 600; font-size: 16px; letter-spacing: -.005em; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.card-sub { color: rgba(255,255,255,.8); font-size: 13px; font-style: italic; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tagform { position: absolute; z-index: 2; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px 4px 6px; border-radius: 999px; background: rgba(15,17,15,.55); color: #fff; font-size: 11px; font-weight: 600; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.tagform .k-icon { width: 13px; height: 13px; color: var(--accent); }
@media (hover: hover) and (pointer: fine) { .card .tagform { opacity: 0; transform: translateY(-4px); transition: opacity .18s, transform .18s; } .card:hover .tagform, .card:focus-within .tagform { opacity: 1; transform: none; } }
@media (max-width: 760px) { .card-meta { padding: 8px 10px; } .card-name { font-size: 14px; } .card-sub { display: none; } .say-name { width: 28px; height: 28px; } }

/* Skeleton shimmer */
.skeleton { background: linear-gradient(100deg, var(--surface-2) 30%, #2c2c2c 50%, var(--surface-2) 70%); background-size: 300% 100%; }
@media (prefers-reduced-motion: no-preference) { .skeleton { animation: shimmer 1.4s linear infinite; } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.sk-line { height: 14px; border-radius: 6px; margin-top: 10px; width: 70%; }
.more { min-height: 64px; display: grid; place-items: center; padding: 24px 0; color: var(--ink-2); text-align: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .spinner { animation: spin .8s linear infinite; } }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 48px 16px; color: var(--ink-2); }
.empty b { display: block; color: var(--ink); font-size: 18px; margin-bottom: 4px; }

/* India / Worldwide switch */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.seg button { min-height: 38px; padding: 0 14px; border-radius: 6px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* Suggestions */
.suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.suggest a { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); font-size: 15px; font-weight: 600; }
.suggest a:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- Plant types: tiles ---------- */
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tile { position: relative; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: var(--surface-2); display: flex; flex-direction: column; justify-content: end; padding: 16px; color: #fff; isolation: isolate; }
.tile img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.tile::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.75)); }
.tile b { font: 700 20px/1.2 var(--sans); }
.tile span { font-size: 13px; opacity: .85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.tile small { font-size: 12px; opacity: .7; margin-top: 4px; }
@media (hover: hover) { .tile { transition: transform .2s; } .tile:hover { transform: translateY(-2px); } }

/* ---------- Plant page: the photo as a cinematic hero, name and buttons on it ---------- */
.detail.nf { display: grid; gap: 28px; }
.gallery { min-width: 0; }
.nf .hero { position: relative; z-index: 0; border-radius: 6px; overflow: hidden; background: #000; color: #fff; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 16 / 7.4; }
.slides::-webkit-scrollbar { display: none; }
.slides figure { margin: 0; flex: 0 0 100%; scroll-snap-align: center; }
.slides img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1000px) { .slides { aspect-ratio: 4 / 3; } }
@media (max-width: 760px) { .nf .gallery { margin: -24px -16px 0; } .nf .hero { border-radius: 0; } .slides { aspect-ratio: 4 / 5; max-height: 72svh; } }
.nf-shade { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse 62% 58% at 0% 100%, rgba(0,0,0,.78) 0%, rgba(0,0,0,.45) 45%, rgba(0,0,0,0) 75%); }
@media (max-width: 760px) { .nf-shade { background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.35) 26%, rgba(0,0,0,0) 42%); } }
.nf-info { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; padding: 0 48px 40px; display: flex; flex-direction: column; gap: 18px; pointer-events: none; }
.nf-info > * { pointer-events: auto; }
.d-title { display: flex; align-items: center; gap: 16px; }
.d-title .h-display { margin: 0; min-width: 0; overflow-wrap: anywhere; color: #fff; font: 800 clamp(34px, 5.6vw, 72px)/1 var(--sans); letter-spacing: -.03em; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.d-title .h-display:lang(ta) { font-size: clamp(30px, 4.6vw, 58px); line-height: 1.15; letter-spacing: 0; }
.nf-meta { display: flex; flex-wrap: wrap; align-items: center; margin: 12px 0 0; font-size: 16px; font-weight: 600; color: rgba(255,255,255,.92); }
.nf-meta > span + span::before { content: '•'; margin: 0 10px; color: rgba(255,255,255,.5); font-weight: 400; font-style: normal; }
.d-sci { font-weight: 500; font-style: italic; color: rgba(255,255,255,.75); }
.hero-acts { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-btn { display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 24px 0 20px; border-radius: 6px; font: 700 18px/1 var(--sans); background: rgba(110,110,110,.6); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background .15s, transform .1s; }
.hero-btn:hover { background: rgba(110,110,110,.4); }
.hero-btn:active { transform: scale(.96); }
.hero-btn .k-icon { width: 24px; height: 24px; }
.hero-btn.save.on { background: #fff; color: #111; }
.back-round { position: absolute; z-index: 4; top: 20px; left: 20px; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.back-round:hover { background: rgba(0,0,0,.65); }
.back-round .k-icon { width: 24px; height: 24px; stroke-width: 2.4; }
.pn-side { display: none; }
@media (min-width: 761px) {
  .nf-info { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 24px; }
  .nf .d-head { min-width: 0; }
  .hero-acts { flex: 0 0 auto; flex-wrap: nowrap; justify-content: flex-end; }
  .pn-side { display: flex; flex-direction: column; align-items: center; gap: 6px; position: absolute; z-index: 4; top: 38%; padding: 8px; border-radius: 14px; color: #fff; background: rgba(0,0,0,.28); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: opacity .2s, transform .2s, background .2s; }
  .pn-side:hover { background: rgba(0,0,0,.55); }
  .pn-side.prev { left: 20px; } .pn-side.next { right: 20px; }
  .pn-side img, .pn-side .pn-side-ph { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(255,255,255,.85); background: var(--surface-2); }
  .pn-side b { font-size: 13px; max-width: 90px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pn-side kbd { font: 600 11px/1 var(--sans); padding: 3px 6px; border-radius: 4px; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.35); }
}
@media (hover: hover) and (pointer: fine) and (min-width: 761px) {
  .pn-side { opacity: 0; } .pn-side.prev { transform: translateX(-8px); } .pn-side.next { transform: translateX(8px); }
  .nf .hero:hover .pn-side, .pn-side:focus-visible { opacity: 1; transform: none; }
}
@media (max-width: 760px) {
  .nf-info { padding: 0 16px 20px; gap: 14px; }
  .hero-btn { height: 46px; padding: 0 18px 0 14px; font-size: 16px; }
  .back-round { top: 14px; left: 14px; }
  .nf-meta { font-size: 14px; }
}
.thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.thumbs::-webkit-scrollbar { display: none; }
.thumbs button { flex: 0 0 64px; height: 64px; border-radius: 6px; overflow: hidden; opacity: .55; transition: opacity .15s; }
.thumbs button.on { opacity: 1; box-shadow: 0 0 0 2px var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .thumbs { padding: 0 16px; margin: 12px -16px 0; } .nf .credit { padding: 0 16px; } }
.credit { font-size: 12px; color: var(--ink-3); margin: 8px 0 0; min-height: 1.4em; }
.d-body { max-width: 880px; }
.d-bio { font-size: 18px; line-height: 1.6; margin: 0; }
.d-bio:lang(ta) { font-size: 19px; line-height: 1.75; }
.d-wiki { font-size: 16px; line-height: 1.65; color: var(--ink-2); margin: 14px 0 0; }
.d-wiki:lang(ta) { font-size: 17px; line-height: 1.8; }
.facts { margin: 22px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fact { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 8px; background: var(--surface-2); }
.fact-ico { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--accent); }
.fact dd { margin: 0; font-weight: 500; font-size: 15px; line-height: 1.4; min-width: 0; overflow-wrap: anywhere; }
.fact-fun { grid-column: 1 / -1; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.fact-fun .fact-ico { background: var(--accent); color: var(--accent-ink); }
.fact-fun dd { font-size: 16px; }
@media (max-width: 520px) { .facts { grid-template-columns: minmax(0, 1fr); } }
.forms { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.forms a { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; }
.forms a:hover { border-color: var(--ink-3); }
.forms .k-icon { width: 18px; height: 18px; color: var(--accent); }
.source { font-size: 13px; color: var(--ink-3); margin-top: 22px; }
.source a { text-decoration: underline; }
.detail.nf + .shelf { margin-top: 40px; }

.toast { position: fixed; z-index: 40; left: 50%; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); text-align: center; padding: 12px 20px; border-radius: 8px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
@media (min-width: 900px) { .toast { bottom: 24px; } }
.foot { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; line-height: 20px; }
.foot a { text-decoration: underline; }

/* Plant page: Save / Wikipedia appear when the mouse is over the photo (always shown on touch screens) */
@media (hover: hover) and (pointer: fine) {
  .nf .hero-acts { opacity: 0; transform: translateY(8px); transition: opacity .22s, transform .22s; }
  .nf .hero:hover .hero-acts, .nf .hero-acts:focus-within { opacity: 1; transform: none; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: reduce) { .nf .hero-acts { transform: none; } }

/* The top bar is always solid and the banner starts below it, so the photo never sits under the bar */
.hero-page .top:not(.solid) { background: var(--bg); border-bottom-color: var(--line); }
.hero-page .top:not(.solid) .search { background: var(--surface); border-color: var(--line); }
.hero-page .top:not(.solid) .topnav a { color: var(--ink-2); }
.hero-page .top:not(.solid) .topnav a[aria-current="page"] { color: var(--ink); }
.top, .top.solid { background: var(--bg); }
.feature { margin-top: 0; }
.feature-img { height: min(calc(86svh - var(--top-h)), 52vw); }
@media (max-width: 760px) { .feature-img { height: calc(78svh - var(--top-h)); } }

/* =====================================================================================
   Ported from Zoorassic Park: A–Z bar, tree of life, games, the glowing Games button,
   and the Android (Material 3) / iPhone (HIG) app looks.
   ===================================================================================== */
:root { --warm: #E0A866; }
.tabbar { grid-template-columns: repeat(5, 1fr); }
@media (min-width: 900px) { html.app .tabbar { display: flex !important; } html.app body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); } }

/* A–Z letters over the library grid */
.az { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: -2px calc(-1 * var(--pad)) 16px; padding: 2px var(--pad); }
.az::-webkit-scrollbar { display: none; }
.az button { flex: 0 0 auto; min-width: 44px; height: 44px; padding: 0 10px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); font: 600 16px/1 var(--sans); color: var(--ink); white-space: nowrap; transition: background .15s, transform .1s; }
.az button:hover:not(:disabled) { border-color: var(--ink-3); }
.az button:active:not(:disabled) { transform: scale(.92); }
.az button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.az button:disabled { color: var(--ink-3); opacity: .45; background: transparent; cursor: default; }
.az .az-all { font-size: 14px; padding: 0 14px; }
@media (max-width: 760px) { .az { margin: -2px -16px 14px; padding: 2px 16px; } }

/* Tree of life: breadcrumbs, then photo tiles for each branch */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; margin: 4px 0 6px; font-size: 14px; color: var(--ink-3); }
.crumbs a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 4px; border-radius: 6px; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.crumbs a:hover { color: var(--ink); background: var(--surface-2); }
.crumbs span { padding: 0 4px; color: var(--ink); font-weight: 600; white-space: nowrap; }
.crumbs .k-icon { width: 14px; height: 14px; }
.tile.skeleton { min-height: 0; }
.tol { gap: 2px; }
.tol .tol-rank { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .8; -webkit-line-clamp: 1; margin: 0; }
.tol i { font-size: 13px; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tol b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lede i { color: var(--ink-2); }

/* Games: the glowing "magic" button in the header and an orb in the phone tab bar */
@property --magic-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes magicSpin { to { --magic-a: 360deg; } }
@keyframes magicTwinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.25) rotate(90deg); } }
.topnav a.magic { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px 7px 12px; border-radius: 999px; color: #fff !important; font-weight: 700;
  background: linear-gradient(#141414, #141414) padding-box, conic-gradient(from var(--magic-a), #ff6ec7, #ffb86b, #7cf0c5, #7aa7ff, #c48bff, #ff6ec7) border-box;
  border: 2px solid transparent; animation: magicSpin 3.5s linear infinite; box-shadow: 0 0 18px -4px rgba(196,139,255,.7); }
.topnav a.magic .k-icon { width: 16px; height: 16px; color: #ffd36b; animation: magicTwinkle 1.8s ease-in-out infinite; }
.topnav a.magic:hover { box-shadow: 0 0 26px -2px rgba(255,110,199,.8); background: linear-gradient(#202020, #202020) padding-box, conic-gradient(from var(--magic-a), #ff6ec7, #ffb86b, #7cf0c5, #7aa7ff, #c48bff, #ff6ec7) border-box; }
.topnav a.magic:active { transform: scale(.95); }
.tabbar a.magic { position: relative; }
.tabbar a.magic .magic-orb { width: 46px; height: 46px; margin-top: -22px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: conic-gradient(from var(--magic-a), #ff6ec7, #ffb86b, #7cf0c5, #7aa7ff, #c48bff, #ff6ec7); animation: magicSpin 3.5s linear infinite;
  box-shadow: 0 0 0 4px var(--bg), 0 0 22px -2px rgba(196,139,255,.85); }
.tabbar a.magic .magic-orb .k-icon { width: 22px; height: 22px; stroke-width: 2.2; animation: magicTwinkle 1.8s ease-in-out infinite; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.tabbar a.magic:active .magic-orb { transform: scale(.92); }
.tabbar a.magic[aria-current="page"] { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .topnav a.magic, .tabbar a.magic .magic-orb, .magic .k-icon { animation: none !important; } }
@media (max-width: 1180px) and (min-width: 900px) { .top-inner { gap: 16px; } .brand-ta { display: none; } .topnav a { padding: 8px 9px; } }

/* Games screen */
.games { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.game-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 0 0 18px; overflow: hidden; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); transition: transform .15s, border-color .15s; }
.game-card:hover { border-color: var(--ink-3); transform: translateY(-2px); }
.game-card > b { font: 700 20px/1.2 var(--sans); padding: 0 18px; margin-top: 14px; }
.game-card > span:not(.game-cover) { color: var(--ink-2); font-size: 15px; padding: 0 18px; }
.game-card small { position: absolute; z-index: 2; top: 12px; right: 12px; display: inline-flex; gap: 4px; align-items: center; padding: 4px 8px; border-radius: 6px; background: rgba(255,255,255,.94); color: #1d6b45; font-weight: 700; }
.game-card small .k-icon { width: 14px; height: 14px; color: #E8A317; }
.game-cover { position: relative; display: block; aspect-ratio: 16 / 9; margin-bottom: 8px; --gp: color-mix(in srgb, var(--gc) 72%, #000); background-color: color-mix(in srgb, var(--gc) 22%, var(--surface)); }
.game-ico { position: absolute; left: 14px; bottom: -20px; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: color-mix(in srgb, var(--gc) 70%, var(--ink)); box-shadow: 0 0 0 3px var(--surface), 0 4px 12px -6px rgba(0,0,0,.3); }
.game-ico .k-icon { width: 24px; height: 24px; }
.ga { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px 18px 22px; overflow: hidden; }
.ga img, .ga i { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--surface-2); }
.ga .ok { box-shadow: 0 0 0 3px var(--gp); }
.ga-name .ga-photo { width: 46%; height: 88%; border-radius: 6px; overflow: hidden; }
.ga-chips { display: flex; flex-direction: column; gap: 6px; }
.ga-chips b { display: inline-flex; align-items: center; gap: 5px; font: 600 12px/1 var(--sans); padding: 7px 10px; border-radius: 6px; background: var(--surface); color: var(--ink); white-space: nowrap; }
.ga-chips b .k-icon { width: 14px; height: 14px; }
.ga-chips b.ok { background: var(--gp); color: #fff; box-shadow: none; }
.ga-find { flex-direction: column; gap: 8px; }
.ga-say { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--sans); padding: 6px 10px; border-radius: 999px; background: var(--blue); color: #fff; }
.ga-say .k-icon { width: 14px; height: 14px; }
.ga-grid { display: grid; grid-template-columns: repeat(4, 46px); gap: 8px; }
.ga-grid span { width: 46px; height: 46px; border-radius: 6px; overflow: hidden; }
.ga-odd span { width: 50px; height: 50px; border-radius: 6px; overflow: hidden; }
.ga-odd span.odd { box-shadow: 0 0 0 3px var(--warm); transform: translateY(-4px) rotate(-4deg); }
.ga-memory { display: grid; grid-template-columns: repeat(3, 44px); gap: 8px; }
.ga-memory span { width: 44px; height: 52px; border-radius: 6px; overflow: hidden; }
.ga-memory .down { display: grid; place-items: center; background: var(--gp); color: rgba(255,255,255,.75); }
.ga-memory .down .k-icon { width: 18px; height: 18px; }
.ga-memory .up { box-shadow: 0 0 0 3px var(--warm); }
.gc-name   { --gc: #3FAE6E; background-image: repeating-linear-gradient(45deg, color-mix(in srgb, var(--gc) 18%, transparent) 0 8px, transparent 8px 18px); }
.gc-group  { --gc: #E8B320; background-image: radial-gradient(circle, color-mix(in srgb, var(--gc) 38%, transparent) 2.5px, transparent 3px), radial-gradient(circle, color-mix(in srgb, var(--gc) 22%, transparent) 2.5px, transparent 3px); background-size: 24px 24px; background-position: 0 0, 12px 12px; }
.gc-odd    { --gc: #E35D8F; background-image: linear-gradient(135deg, color-mix(in srgb, var(--gc) 20%, transparent) 25%, transparent 25%), linear-gradient(225deg, color-mix(in srgb, var(--gc) 20%, transparent) 25%, transparent 25%); background-size: 22px 22px; }
.gc-find   { --gc: #8C6CE6; background-image: linear-gradient(color-mix(in srgb, var(--gc) 18%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--gc) 18%, transparent) 1px, transparent 1px); background-size: 20px 20px; }
.gc-memory { --gc: #1E9E9A; background-image: conic-gradient(color-mix(in srgb, var(--gc) 16%, transparent) 25%, transparent 0 50%, color-mix(in srgb, var(--gc) 16%, transparent) 0 75%, transparent 0); background-size: 28px 28px; }

/* A game */
.quiz { max-width: 760px; margin: 0 auto; }
.quiz-modes { display: inline-flex; margin-bottom: 10px; max-width: 100%; }
.quiz-modes a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 8px; border-radius: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); white-space: nowrap; }
.quiz-modes a:hover { color: var(--ink); }
.quiz-modes a .k-icon { width: 17px; height: 17px; }
.quiz-top { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.quiz .h-display { font-size: clamp(26px, 4vw, 38px); margin: 4px 0 0; }
.quiz .h-display:lang(ta), html:lang(ta) .quiz .h-display { font-size: clamp(22px, 3.4vw, 32px); line-height: 1.3; letter-spacing: 0; }
.stats { display: flex; gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; text-align: center; min-width: 80px; }
.stat b { display: block; font: 700 19px var(--sans); font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.qprog { display: flex; align-items: center; gap: 14px; margin: 16px 0 0; flex-wrap: wrap; }
.qprog > span { font-weight: 700; font-size: 15px; white-space: nowrap; }
.qprog small { color: var(--ink-2); font-weight: 600; font-size: 14px; white-space: nowrap; }
.qprog-dots { display: flex; gap: 6px; flex: 1 1 200px; max-width: 420px; }
.qprog-dots i { flex: 1; height: 8px; border-radius: 4px; background: var(--surface-2); transition: background .3s; }
.qprog-dots i.done { background: var(--accent); }
.qprog-dots i.now { background: color-mix(in srgb, var(--accent) 45%, var(--surface-2)); }
@media (prefers-reduced-motion: no-preference) { .qprog-dots i.now { animation: qpulse 1.4s ease-in-out infinite; } }
@keyframes qpulse { 50% { opacity: .55; } }
.quiz-player { margin: 16px 0; display: flex; align-items: center; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; }
.quiz-player p { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.find-name { font: 700 24px/1.2 var(--sans); }
.sound-play { flex-shrink: 0; width: 64px; height: 64px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; transition: transform .15s; }
.sound-play:hover { transform: scale(1.05); }
.sound-play .k-icon { width: 28px; height: 28px; stroke-width: 2; }
.sound-play.speaking { box-shadow: 0 0 0 6px color-mix(in srgb, var(--blue) 35%, transparent); }
.choices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
@media (max-width: 640px) { .choices { grid-template-columns: 1fr 1fr; } }
.choice-wrap { position: relative; display: flex; min-width: 0; }
.choice { flex: 1; min-width: 0; text-align: left; border-radius: 6px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, opacity .2s; }
.choice:hover { border-color: var(--ink-3); }
.choice img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; background: var(--surface-2); max-height: calc((100svh - var(--top-h, 69px) - 420px) / 2); min-height: 100px; }
.choice div { padding: 10px 12px; min-height: 44px; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.choice-wrap .choice div { padding-right: 52px; }
.say-opt { flex-shrink: 0; width: 56px; height: 56px; border-radius: 8px; background: var(--blue); color: #fff; display: grid; place-items: center; transition: transform .1s, background .15s; }
.say-opt .k-icon { width: 24px; height: 24px; stroke-width: 2; }
.say-opt:active { transform: scale(.94); }
.say-opt.speaking { background: color-mix(in srgb, var(--blue) 75%, #000); }
.say-opt.in-choice { position: absolute; right: 6px; bottom: 3px; width: 44px; height: 44px; border-radius: 6px; }
.say-opt.in-choice .k-icon { width: 20px; height: 20px; }
.name-photo { margin: 16px 0 12px; position: relative; border-radius: 8px; overflow: hidden; background: var(--surface-2); width: 100%; height: clamp(180px, calc(100svh - var(--top-h, 69px) - 400px), 440px); }
.name-photo img { width: 100%; height: 100%; object-fit: cover; }
.name-photo figcaption { position: absolute; left: 10px; bottom: 8px; font-size: 11px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.7); max-width: 90%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group-name { margin: 0 0 14px; } .group-name b { font: 700 24px var(--sans); }
/* Tamil words are longer: answers grow to fit on one line (moving to their own row) instead of wrapping. */
.name-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.name-opt { flex: 1 1 calc(50% - 5px); min-width: max-content; display: flex; gap: 8px; }
.name-choice { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 18px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-size: 17px; font-weight: 600; white-space: nowrap; transition: border-color .15s, opacity .2s; }
.name-choice:hover { border-color: var(--ink-3); }
.form-choice .k-icon { width: 22px; height: 22px; color: var(--accent); }
.choice.dim, .name-choice.dim { opacity: .45; }
.choice.wrong, .name-choice.wrong { outline: 4px solid #E5484D; outline-offset: -2px; background: color-mix(in srgb, #E5484D 22%, var(--surface)); opacity: 1; }
.choice.right, .name-choice.right { outline: 4px solid #30A46C; outline-offset: -2px; background: color-mix(in srgb, #30A46C 22%, var(--surface)); opacity: 1; }
@media (prefers-reduced-motion: no-preference) { .right.reveal { animation: revealPop .5s ease-out .25s both; } }
@keyframes revealPop { 50% { transform: scale(1.06); } }
.feedback { min-height: 44px; margin: 14px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.feedback p { margin: 0; font-weight: 600; }
.feedback .row { display: flex; gap: 10px; margin-left: auto; }
.feedback .ok { color: var(--accent); }
.feedback .no { color: #FF8A8E; font-weight: 700; }
.more-link { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; margin-left: 6px; white-space: nowrap; }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.accent:hover { background: color-mix(in srgb, var(--accent) 85%, #fff); }
/* The Next button fills from left to right during the 2 s before the next question */
#next.auto { position: relative; overflow: hidden; isolation: isolate; }
#next.auto::before { content: ''; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, #fff 35%, transparent); transform-origin: left; animation: fillNext var(--auto-ms, 2s) linear forwards; }
@keyframes fillNext { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { #next.auto::before { animation: none; } }
@media (max-width: 760px) {
  .name-photo { height: clamp(150px, calc(100svh - var(--top-h, 118px) - 470px), 340px); }
  .name-choice { min-height: 52px; font-size: 16px; } .say-opt { width: 52px; height: 52px; }
  .stat { min-width: 64px; padding: 4px 10px; } .stat b { font-size: 17px; }
}
/* Memory match */
.memory { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .memory { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } }
.mem { position: relative; aspect-ratio: 1; border-radius: 8px; perspective: 600px; }
.mem .back, .mem .front { position: absolute; inset: 0; border-radius: 8px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .35s; display: grid; place-items: center; }
.mem .back { background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.mem .back .k-icon { width: 32px; height: 32px; }
.mem .front { transform: rotateY(180deg); background: var(--surface-2); }
.mem .front img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mem .front b { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mem.up .back { transform: rotateY(180deg); } .mem.up .front { transform: rotateY(360deg); }
.mem.matched .front { box-shadow: inset 0 0 0 3px var(--accent); }
@media (prefers-reduced-motion: reduce) { .mem .back, .mem .front { transition: none; } }
/* Results */
.results { text-align: center; max-width: 620px; margin: 0 auto; }
.res-card { margin: 22px 0; padding: 28px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.res-big strong { font: 800 84px/1 var(--sans); } .res-big span { font-size: 28px; color: var(--ink-2); font-weight: 700; }
.res-stars { display: flex; gap: 6px; } .res-stars i { color: var(--surface-2); } .res-stars i.on { color: #FFD36B; } .res-stars .k-icon { width: 30px; height: 30px; }
.res-line { font-size: 20px; font-weight: 700; margin: 6px 0 0; }
.res-acts { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confetti i { position: absolute; width: 10px; height: 14px; border-radius: 2px; }

/* =====================================================================================
   Android app mode — Material Design 3 (html.android: inside the Android app, or ?app=android)
   ===================================================================================== */
.appbar { display: none; }
html.app { --sat: max(env(safe-area-inset-top), var(--safe-area-inset-top, 0px)); --sab: max(env(safe-area-inset-bottom), var(--safe-area-inset-bottom, 0px)); }
html.app .top { display: none; }
html.app main { padding: 8px 16px 24px; }
html.app .hero-page main { padding-top: 8px; }
html.app .page-head .h-display { display: none; } /* the title is in the app bar */
html.app .page-head { margin: 4px 0 16px; }
html.app .feature { margin: 0 0 16px; overflow: hidden; }
html.app .feature-img { height: 62svh; min-height: 0; }
html.app .feature + .shelf { margin-top: 0; }
html.app .nf-back, html.app .pn-side, html.app .quiz-modes, html.app .crumbs { display: none !important; } /* the app bar has Back; swipe for Previous / Next */
html.app .nf .gallery { margin: -8px -16px 0; }
html.app .nf .hero { border-radius: 0; }
html.app .langswitch { display: none; }
html.app .shelf-arrow { display: none; }
html.app .tabbar { display: flex; }
html.app .tabbar a { flex: 1; }
html.app .tabbar a.magic .magic-orb { margin-top: -12px; }
html.app.searching .top { display: block; position: fixed; inset: 0 0 auto 0; z-index: 40; padding-top: var(--sat); border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
html.app.searching .top-inner { padding: 8px; flex-wrap: nowrap; }
html.app.searching .brand, html.app.searching .topnav { display: none; }
html.app.searching .search { display: flex; flex: 1 1 100%; margin: 0; }
html.app.searching main { padding-top: 76px; }
html.app #searchClose { display: grid; }
#searchClose { display: none; }
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .16; transform: scale(0); animation: ripple .5s ease-out forwards; pointer-events: none; z-index: 5; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* Android: Material Design 3 from the shared Kolam M3 kit (kolam-m3.css builds the app bar, navigation
   bar, ripple and snackbar). Kaadu's own tokens point at the generated M3 roles and its own components
   get M3 shapes. Only html.k-android is touched; the website keeps its own look. */
.ab-btn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); flex-shrink: 0; }
.ab-btn .k-icon { width: 24px; height: 24px; stroke-width: 2; }
.ab-btn[hidden] { display: none; }
.ab-title { flex: 1; min-width: 0; margin: 0 0 0 16px; font: 400 22px/28px var(--sans); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-title:lang(ta) { font-size: 19px; }
html.k-android.android:not(#k-m3) {
  --sans: var(--md-ref-typeface-plain);
  --bg: var(--md-sys-color-surface); --surface: var(--md-sys-color-surface-container); --surface-2: var(--md-sys-color-surface-container-high);
  --ink: var(--md-sys-color-on-surface); --ink-2: var(--md-sys-color-on-surface-variant); --ink-3: var(--md-sys-color-outline); --line: var(--md-sys-color-outline-variant);
  --accent: var(--md-sys-color-primary); --accent-ink: var(--md-sys-color-on-primary); --accent-soft: var(--md-sys-color-primary-container);
  --primary: var(--md-sys-color-primary); --on-primary: var(--md-sys-color-on-primary); --primary-soft: var(--md-sys-color-primary-container); --primary-text: var(--md-sys-color-primary);
  --blue: var(--md-sys-color-primary); --blue-ink: var(--md-sys-color-on-primary);
  --tabbar-h: 80px;
}
html.k-android .md-top-app-bar__title:lang(ta) { font-size: 19px; }
html.k-android.searching .top { background: var(--md-sys-color-surface); padding-top: var(--md-inset-top); }
html.k-android .search { height: 56px; border-radius: var(--md-sys-shape-corner-full); border: 0; background: var(--md-sys-color-surface-container-high); padding: 0 4px; box-shadow: none; }
html.k-android .search > .k-icon { display: none; }
html.k-android .search input { font: var(--md-sys-typescale-body-large); padding-left: 4px; }
html.k-android #searchClose { color: var(--md-sys-color-on-surface); }
html.k-android .h-display { font: var(--md-sys-typescale-headline-medium); letter-spacing: 0; }
html.k-android :is(.h-section, .shelf-title) { font: var(--md-sys-typescale-title-large); letter-spacing: 0; }
html.k-android .eyebrow { font: var(--md-sys-typescale-label-medium); letter-spacing: .5px; color: var(--md-sys-color-on-surface-variant); }
html.k-android .lede { font: var(--md-sys-typescale-body-medium); }
html.k-android .feature { border-radius: var(--md-sys-shape-corner-large); }
html.k-android .feature-body .h-display { font: var(--md-sys-typescale-headline-large); }
html.k-android :is(.feature-body .btn, .hero-btn) { height: 40px; border-radius: var(--md-sys-shape-corner-full); padding: 0 20px; font: var(--md-sys-typescale-label-large); }
html.k-android :is(.card-img, .shelf-track > .card .card-img) { border-radius: var(--md-sys-shape-corner-medium); }
html.k-android .card-name { font: var(--md-sys-typescale-title-small); }
html.k-android :is(.tile, .game-card, .quiz-player, .stat, .res-card, .name-photo, .fact, .say-opt) { border-radius: var(--md-sys-shape-corner-large); }
html.k-android :is(.game-card, .quiz-player, .stat, .res-card) { border: 0; background: var(--md-sys-color-surface-container); }
html.k-android .game-card:hover { transform: none; }
html.k-android .game-card > b { font: var(--md-sys-typescale-title-medium); }
html.k-android .btn { height: 40px; padding: 0 24px; border-radius: var(--md-sys-shape-corner-full); font: var(--md-sys-typescale-label-large); letter-spacing: .1px; }
html.k-android .btn.outline { border: 1px solid var(--md-sys-color-outline); background: transparent; color: var(--md-sys-color-primary); }
html.k-android :is(.name-choice, .choice) { border-radius: var(--md-sys-shape-corner-medium); border-color: var(--md-sys-color-outline-variant); }
html.k-android .az button { border-radius: var(--md-sys-shape-corner-small); border-color: var(--md-sys-color-outline-variant); background: transparent; }
html.k-android .az button[aria-pressed="true"] { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); border-color: transparent; }
/* Filter chips with a leading photo: 40dp, 8dp corners, secondary container when selected */
html.k-android .filter { height: 40px; padding: 0 16px 0 4px; border-radius: var(--md-sys-shape-corner-small); border: 0; box-shadow: inset 0 0 0 1px var(--md-sys-color-outline-variant); background: transparent; font: var(--md-sys-typescale-label-large); line-height: 1; color: var(--md-sys-color-on-surface-variant); }
html.k-android .filter[aria-current="true"] { background: var(--md-sys-color-secondary-container); box-shadow: none; color: var(--md-sys-color-on-secondary-container); }
html.k-android .filter[aria-current="true"] .fpics img { border-color: var(--md-sys-color-secondary-container); }
html.k-android :is(.filters, .az) { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
/* Segmented buttons */
html.k-android .seg { border-radius: var(--md-sys-shape-corner-full); border-color: var(--md-sys-color-outline); padding: 0; overflow: hidden; }
html.k-android .seg button { border-radius: 0; min-height: 40px; }
html.k-android .seg button[aria-pressed="true"] { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
/* Profile panel: an M3 menu-like surface under the app bar's profile button */
html.k-android .profile-panel.in-app { top: calc(var(--md-inset-top) + 60px); border: 0; border-radius: var(--md-sys-shape-corner-large); background: var(--md-sys-color-surface-container-high); box-shadow: var(--md-sys-elevation-level2); }
html.k-android .pp-row .langswitch { display: inline-flex; }
html.k-android .toast { display: none; } /* the kit's snackbar is used instead */

/* =====================================================================================
   iPhone app mode — Apple Human Interface Guidelines, from the shared Kolam iOS kit (html.k-ios: inside the
   Kaadu-iOS app, a Home Screen web app, or ?app=ios). kolam-ios.css builds the navigation bar (large titles,
   Back + centred title), the Liquid Glass tab bar with the trailing Search tab, sheets and banners; here
   Kaadu's own components get iOS shapes. Kaadu is a dark app, so the kit runs in its dark appearance.
   ===================================================================================== */
html.k-ios.searching .top { display: none; }
html.k-ios .tabbar { display: none !important; }          /* the kit's tab bar replaces the website's */
html.k-ios body { letter-spacing: -.01em; padding-bottom: var(--ios-tabbar-space); }
html.k-ios main { padding-top: 0; }
html.k-ios:not(.searching) #searchForm { display: none; }
html.k-ios #searchForm { position: sticky; top: calc(54px + var(--sat)); z-index: 35; display: flex; gap: 8px; align-items: center; height: 44px; margin: 0 16px 12px; padding: 0 4px 0 12px; border: 0; border-radius: 999px; background: var(--ios-fill3); box-shadow: none; }
html.k-ios #searchForm input { font: 400 17px/22px var(--ios-font); color: var(--ios-label); background: none; border: 0; }
html.k-ios #searchForm input::placeholder { color: var(--ios-placeholder); }
html.k-ios #searchClose { order: 9; width: auto; padding: 0 12px; color: var(--ios-tint); height: 44px; display: inline-flex; align-items: center; background: none; border: 0; }
html.k-ios #searchClose .k-icon { display: none; }
html.k-ios #searchClose::after { content: attr(data-cancel); font: 400 17px var(--ios-font); white-space: nowrap; }
html.k-ios.searching main { padding-top: 0; }
html.k-ios .h-display { font: 700 28px/34px var(--ios-font-display); letter-spacing: .01em; }
html.k-ios .h-section, html.k-ios .shelf-title { font: 700 22px/28px var(--ios-font-display); letter-spacing: -.012em; }
html.k-ios .eyebrow { font: 600 13px/18px var(--ios-font); letter-spacing: -.01em; text-transform: uppercase; color: var(--ios-label2); }
html.k-ios .lede { font-size: 15px; line-height: 20px; color: var(--ios-label2); }
html.k-ios .card-img, html.k-ios .shelf-track > .card .card-img { border-radius: 14px; }
html.k-ios .card-name { font: 600 16px/21px var(--ios-font); }
html.k-ios .feature, html.k-ios .quiz-player, html.k-ios .game-card, html.k-ios .stat, html.k-ios .res-card, html.k-ios .tile, html.k-ios .name-photo { border-radius: var(--ios-radius-card); border: 0; }
html.k-ios .quiz-player, html.k-ios .game-card, html.k-ios .stat, html.k-ios .res-card { background: var(--ios-grouped2); }
html.k-ios .game-card:hover { transform: none; }
html.k-ios .game-card > b { font: 600 19px/24px var(--ios-font); }
html.k-ios .btn, html.k-ios .feature-body .btn, html.k-ios .hero-btn { height: 44px; padding: 0 20px; border-radius: 999px; font: 600 17px/22px var(--ios-font); }
html.k-ios .btn.outline { border: 0; background: var(--ios-fill3); color: var(--ios-tint); }
html.k-ios .feature-body .btn.outline, html.k-ios .hero-btn { color: #fff; }
html.k-ios .name-choice, html.k-ios .choice { border: 0; border-radius: 16px; }
html.k-ios .say-opt { border-radius: 999px; }
html.k-ios .filter { height: 40px; padding: 0 14px 0 4px; border-radius: 999px; border: 0; background: var(--ios-fill3); font: 500 15px/1 var(--ios-font); color: var(--ios-label); }
html.k-ios .filter[aria-current="true"] { background: var(--ios-tint-fill); color: var(--ios-on-tint); }
html.k-ios .filter .fpics img { border-color: transparent; border-radius: 50%; }
html.k-ios .az button { border: 0; border-radius: 999px; background: var(--ios-fill3); }
html.k-ios .az button[aria-pressed="true"] { background: var(--ios-tint-fill); color: var(--ios-on-tint); }
/* Segmented control */
html.k-ios .seg { border: 0; background: var(--ios-fill3); border-radius: 999px; padding: 2px; }
html.k-ios .seg button { border-radius: 999px; min-height: 32px; font: 500 13px/1.2 var(--ios-font); }
html.k-ios .seg button[aria-pressed="true"] { background: #636366; color: #fff; font-weight: 600; }
html.k-ios .fact { border-radius: 16px; }
html.k-ios .filters, html.k-ios .az { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
html.k-ios .toast { bottom: calc(var(--ios-tabbar-space) + 8px); border-radius: 999px; background: var(--ios-glass-strong); color: var(--ios-label); -webkit-backdrop-filter: var(--ios-glass-filter); backdrop-filter: var(--ios-glass-filter); box-shadow: var(--ios-glass-shade); font: 500 15px var(--ios-font); }
/* Profile panel: a menu-like glass panel under the bar's profile button */
html.k-ios .profile-panel.in-app { top: calc(var(--sat, 0px) + 58px); border: 0; border-radius: var(--ios-radius-menu); background: var(--ios-glass-strong); -webkit-backdrop-filter: var(--ios-glass-filter); backdrop-filter: var(--ios-glass-filter); box-shadow: var(--ios-glass-shade); }
/* iOS press feedback: dim instead of a ripple */
html.k-ios :is(button, .btn, .filter, .game-card, .choice, .name-choice, .tile):active { opacity: .55; transition: opacity 0s; }
html.k-ios a.card:active .card-img { opacity: .7; }
@media (max-width: 760px) { .tol-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .tol-grid .tile { aspect-ratio: 4 / 5; padding: 12px; } .tol-grid .tile b { font-size: 16px; } }
@media (max-width: 760px) {
  .quiz-top { gap: 10px; } .qprog { margin-top: 10px; gap: 10px; } .qprog small { display: none; }
  .name-photo { margin: 12px 0 10px; height: clamp(150px, calc(100svh - var(--top-h, 69px) - 560px), 300px); }
  .name-opt .say-opt { width: 48px; height: 48px; } .name-choice { padding: 0 12px; }
  .group-name { margin-bottom: 10px; } .group-name b { font-size: 20px; }
  .choice img { max-height: calc((100svh - var(--top-h, 69px) - 470px) / 2); }
}
@media (max-width: 760px) { .nf .thumbs { margin: 12px 0 0; } } /* the gallery is already full-bleed on phones */
html.app .nf .hero-acts { opacity: 1; transform: none; } /* always shown in the apps (touch) */
html.app .page-head .title-row .say-name { display: none; } /* its title moved to the app bar */

/* Games: a "Did you know?" card after every answer */
.did-know { display: flex; gap: 14px; align-items: flex-start; margin: 14px 0 4px; padding: 14px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); }
@media (prefers-reduced-motion: no-preference) { .did-know { animation: dk-in .35s ease-out; } }
@keyframes dk-in { from { opacity: 0; transform: translateY(6px); } }
.did-know img { flex: none; width: 64px; height: 64px; border-radius: 6px; object-fit: cover; }
.did-know b { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--accent); }
.did-know b .k-icon { width: 16px; height: 16px; }
.did-know p { margin: 4px 0 0; font-size: 15px; line-height: 1.55; }
.did-know ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); }
.did-know li { display: inline-flex; align-items: center; gap: 5px; }
.did-know li .k-icon { width: 14px; height: 14px; color: var(--accent); }

/* Profile: a round button in the top bar; language, My list and game stars sit in its panel */
.profile { position: relative; flex-shrink: 0; }
.profile-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); transition: background .15s; }
.profile-btn:hover, .profile-btn[aria-expanded="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.profile-panel { position: absolute; z-index: 30; top: calc(100% + 10px); right: 0; width: 320px; max-width: calc(100vw - 32px); padding: 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 18px 48px rgba(0,0,0,.55); display: grid; gap: 6px; }
@media (prefers-reduced-motion: no-preference) { .profile-panel:not([hidden]) { animation: pp-in .18s ease-out; } }
@keyframes pp-in { from { opacity: 0; transform: translateY(-6px); } }
.pp-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.pp-avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.pp-head b { display: block; font-size: 16px; }
.pp-head small { color: var(--ink-3); font-size: 13px; }
.pp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.pp-label, .pp-link { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.pp-label .k-icon, .pp-link .k-icon { width: 18px; height: 18px; color: var(--ink-2); }
.pp-row .langswitch { display: inline-flex; margin: 0; }
.pp-link { min-height: 48px; padding: 0 10px; margin: 0 -10px; border-radius: 8px; }
.pp-link:hover { background: var(--surface-2); }
.pp-link b { margin-left: auto; font-size: 14px; color: var(--accent); }
.pp-about { margin: 6px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.pp-about b { color: var(--ink); }
@media (max-width: 899px) { .profile { margin-left: auto; } .top-inner > .langswitch { display: none; } }
@media (max-width: 520px) { .profile-panel { position: fixed; top: auto; bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); right: 16px; left: 16px; width: auto; max-width: none; } }
/* In the apps the profile panel hangs under the app bar's profile button */
.profile-panel.in-app { position: fixed; top: calc(var(--sat, 0px) + 60px); right: 12px; left: auto; bottom: auto; width: min(320px, calc(100vw - 24px)); }
html.app .pp-row .langswitch { display: inline-flex; }
.ab-profile .k-icon { width: 24px; height: 24px; }
html.k-android.searching .top .profile { display: none; } /* the app bar's profile action is the one in the app */

/* ---------- Identify a plant from a photo ---------- */
.search-cam { flex: none; width: 34px; height: 34px; margin-right: -6px; border-radius: 9px; display: grid; place-items: center; color: var(--ink-2); }
.search-cam:hover { background: var(--surface-2); color: var(--accent); }
.search-cam .k-icon { width: 20px; height: 20px; }
.id-card { width: 100%; max-width: 640px; display: flex; align-items: center; gap: 14px; margin: 0 0 32px; padding: 14px 16px; border-radius: 10px; text-align: left; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); }
.id-card:hover { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.id-card > .k-icon { margin-left: auto; color: var(--ink-2); }
.id-card-ico { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.id-card-ico .k-icon { width: 24px; height: 24px; }
.id-card b { display: block; font-size: 16px; }
.id-card small { color: var(--ink-2); font-size: 14px; }
.id-start { display: grid; gap: 14px; justify-items: start; max-width: 560px; }
.id-start .btn, .id-acts .btn { height: 52px; padding: 0 22px; font-size: 17px; }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.id-start .note { display: flex; gap: 8px; align-items: flex-start; }
.id-start .note .k-icon { width: 18px; height: 18px; color: var(--accent); margin-top: 2px; }
.id-privacy { font-size: 13px; color: var(--ink-3); max-width: 60ch; margin: 14px 0 0; }
.id-layout { display: grid; gap: 28px; align-items: start; }
@media (min-width: 860px) { .id-layout { grid-template-columns: minmax(260px, 420px) minmax(0, 1fr); } .id-photo { position: sticky; top: calc(var(--top-h) + 16px); } }
.id-photo { margin: 0; border-radius: 8px; overflow: hidden; background: var(--surface-2); position: relative; }
.id-photo img { width: 100%; max-height: 70svh; object-fit: cover; }
.id-photo figcaption { position: absolute; left: 10px; top: 10px; padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 600; }
.id-status { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--ink-2); }
.id-skel { height: 180px; border-radius: 10px; margin-top: 16px; }
.id-warn { margin: 0 0 14px; padding: 12px 14px; border-radius: 8px; background: color-mix(in srgb, #E0A866 14%, var(--surface)); color: var(--ink); font-size: 15px; }
.id-best-card { display: grid; grid-template-columns: 140px 1fr; gap: 16px; margin-top: 8px; padding: 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.id-best-card:hover { border-color: var(--ink-3); }
.id-best-card img, .id-best-card .id-ph { width: 140px; height: 140px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.id-best-card h2 { margin: 0; font: 800 26px/1.15 var(--sans); letter-spacing: -.02em; }
.id-best-card h2:lang(ta) { font-size: 22px; line-height: 1.35; letter-spacing: 0; }
.id-best-card .sci { margin: 2px 0 10px; color: var(--ink-2); }
.id-meter { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; max-width: 260px; }
.id-meter i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.id-best-card small { display: block; margin-top: 4px; color: var(--ink-2); font-size: 13px; }
.id-open { margin-top: 14px; pointer-events: none; }
@media (max-width: 520px) { .id-best-card { grid-template-columns: 1fr; } .id-best-card img, .id-best-card .id-ph { width: 100%; height: 200px; } }
.id-rest { margin-top: 26px; }
.id-rest ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.id-rest a { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 12px 8px 8px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.id-rest a:hover { border-color: var(--ink-3); }
.id-rest img, .id-rest .id-ph { flex: none; width: 48px; height: 48px; border-radius: 6px; object-fit: cover; background: var(--surface-2); }
.id-rest span { display: grid; min-width: 0; }
.id-rest b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.id-rest i { font-size: 13px; color: var(--ink-3); }
.id-rest small { margin-left: auto; flex: none; font-weight: 600; color: var(--accent); }
.id-acts { margin-top: 22px; }

/* Games button: a game-controller icon on a still green-to-blue gradient (no spinning ring, which read as "loading") */
.topnav a.magic, .tabbar a.magic .magic-orb, .magic .k-icon { animation: none !important; }
.topnav a.magic { background: linear-gradient(#141414, #141414) padding-box, linear-gradient(120deg, #7CC6A3, #4A7DF0) border-box; box-shadow: 0 0 16px -6px rgba(124,198,163,.7); }
.topnav a.magic:hover { background: linear-gradient(#202020, #202020) padding-box, linear-gradient(120deg, #7CC6A3, #4A7DF0) border-box; box-shadow: 0 0 20px -4px rgba(124,198,163,.8); }
.topnav a.magic .k-icon { width: 18px; height: 18px; color: var(--accent); }
.tabbar a.magic .magic-orb { background: linear-gradient(135deg, #7CC6A3, #4A7DF0); box-shadow: 0 0 0 4px var(--bg), 0 6px 18px -6px rgba(74,125,240,.8); }
.tabbar a.magic .magic-orb .k-icon { width: 24px; height: 24px; color: #fff; filter: none; }

/* Plant page: details (Wikipedia, fact tiles, plant types, sources) open on demand, in place */
.d-more { margin-top: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.d-more > summary { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px 16px; cursor: pointer; list-style: none; border-radius: 10px; }
.d-more > summary::-webkit-details-marker { display: none; }
.d-more > summary:hover { background: var(--surface-2); }
.d-more > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.d-more-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; flex: none; }
.d-more-label .k-icon { width: 18px; height: 18px; color: var(--accent); }
.d-more-peek { display: flex; flex-wrap: wrap; gap: 4px 14px; min-width: 0; font-size: 14px; color: var(--ink-2); }
.d-more-peek span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.d-more-peek .k-icon { width: 15px; height: 15px; color: var(--ink-3); }
.d-more-chev { margin-left: auto; flex: none; color: var(--ink-2); transition: transform .2s; }
.d-more[open] .d-more-chev { transform: rotate(180deg); }
.d-more[open] .d-more-peek { visibility: hidden; }
.d-more-body { padding: 0 16px 16px; }
.d-more-body .d-wiki { margin-top: 4px; }
@media (prefers-reduced-motion: no-preference) { .d-more[open] .d-more-body { animation: dm-in .25s ease-out; } }
@keyframes dm-in { from { opacity: 0; transform: translateY(-4px); } }
@media (max-width: 520px) { .d-more-peek { display: none; } }
