/* MindBud design system — colours taken from the official MindBud logo. */
:root {
  --navy-950: #040d33;
  --navy-900: #071a5c;
  --navy-800: #0b2a8a;
  --navy-700: #12389f;
  --navy-100: #e6ecfb;
  --gold: #f7c600;
  --gold-600: #d9a900;
  --gold-100: #fff6cc;
  --green: #5fbf1a;
  --green-700: #3f8f0c;
  --green-100: #e8f7d9;
  --cyan: #29c4ef;
  --red: #c62828;
  --red-100: #fdecec;
  --amber-100: #fff4dc;
  --amber-700: #8a5a00;

  --bg: #f5f7fc;
  --surface: #ffffff;
  --surface-2: #f0f3fa;
  --text: #121a33;
  --muted: #5b6684;
  --border: #dde3f0;
  --focus: #29c4ef;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(7, 26, 92, .06), 0 8px 24px rgba(7, 26, 92, .06);
  /* Only the Noto font of the page language is downloaded (see partials/head.ejs); the others are skipped. */
  --font-indic: 'Noto Sans Telugu', 'Noto Sans Devanagari', 'Noto Sans Tamil', 'Noto Sans Kannada', 'Noto Sans Malayalam',
    'Noto Sans Bengali', 'Noto Sans Gujarati', 'Noto Sans Oriya', 'Noto Sans Gurmukhi';
  --font: 'Inter', var(--font-indic), system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  --font-display: 'Poppins', var(--font-indic), 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.6 var(--font); color: var(--text); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: var(--navy-800); }
a:hover { color: var(--navy-700); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.25; margin: 0 0 .5em; color: var(--navy-950); }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9em; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
  font: 600 .95rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn-primary { background: var(--navy-800); color: #fff; }
.btn-primary:hover { background: var(--navy-700); color: #fff; }
.btn-gold { background: var(--gold); color: var(--navy-950); }
.btn-gold:hover { background: #ffd52e; color: var(--navy-950); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--navy-800); }
.btn-outline:hover { border-color: var(--navy-800); }
.btn-ghost-light { background: transparent; border-color: rgba(255,255,255,.45); color: #fff; }
.btn-ghost-light:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #a91f1f; color: #fff; }
.btn-green { background: var(--green-700); color: #fff; }
.btn-green:hover { background: #357a09; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-lg { padding: 14px 24px; font-size: 1.02rem; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--navy-800); font: inherit; cursor: pointer; text-decoration: underline; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--navy-950); }
.req::after { content: ' *'; color: var(--red); }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; font: inherit; color: var(--text); }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(41, 196, 239, .25); }
input[type=file] { font: inherit; max-width: 100%; }
.field { margin-bottom: 16px; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.checks label { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; margin: 0; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 0 0 16px; }
legend { font-weight: 700; padding: 0 6px; color: var(--navy-900); }
.inline-form { display: inline; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.filters .field { margin: 0; min-width: 150px; flex: 1 1 150px; }

/* ---------- Alerts, badges ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid; }
.alert-success { background: var(--green-100); border-color: #bfe6a1; color: #24520a; }
.alert-error { background: var(--red-100); border-color: #f3c0c0; color: #7d1414; }
.alert-info { background: var(--navy-100); border-color: #c6d3f5; color: var(--navy-900); }
.alert-warn { background: var(--amber-100); border-color: #f4d98c; color: var(--amber-700); }
.alert ul { margin: 0; padding-left: 18px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; letter-spacing: .02em; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge-green { background: var(--green-100); color: var(--green-700); }
.badge-gold { background: var(--gold-100); color: #7a5d00; }
.badge-navy { background: var(--navy-100); color: var(--navy-800); }
.badge-red { background: var(--red-100); color: var(--red); }
.badge-amber { background: var(--amber-100); color: var(--amber-700); }

/* ---------- Cards & tables ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-title h2, .card-title h3 { margin: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-weight: 700; color: var(--navy-900); font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.kv dt { color: var(--muted); font-size: .88rem; }
.kv dd { margin: 0; font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }
@media (max-width: 400px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .stat .v { font-size: 1.3rem; } }
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat .v { font: 700 1.6rem/1.2 var(--font-display); color: var(--navy-900); }
.stat .l { color: var(--muted); font-size: .84rem; }
.stat.accent { border-top: 3px solid var(--gold); }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 4px; }

/* ---------- Public header ---------- */
.site-header { background: var(--navy-950); color: #fff; position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(255,255,255,.08); }
.site-header .bar { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; flex: none; }
.brand img { width: 44px; height: 44px; border-radius: 10px; }
.brand .name { font: 700 1.25rem/1 var(--font-display); letter-spacing: .01em; }
.brand .name b { color: var(--gold); font-weight: 700; }
.brand .tag { display: block; font-size: .7rem; color: #b8c4ef; font-weight: 500; margin-top: 3px; letter-spacing: .02em; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: #dbe3ff; text-decoration: none; font-size: .88rem; font-weight: 500; padding: 8px 9px; border-radius: 8px; }
.nav a:hover, .nav a.active { color: #fff; background: rgba(255,255,255,.08); }
.nav .btn { margin-left: 6px; padding: 8px 14px; font-size: .86rem; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 8px; padding: 8px 12px; font: 600 .9rem var(--font); cursor: pointer; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; background: radial-gradient(1200px 500px at 75% 10%, rgba(41,196,239,.18), transparent 60%), radial-gradient(900px 400px at 10% 100%, rgba(247,198,0,.12), transparent 60%), linear-gradient(180deg, var(--navy-900), var(--navy-950)); overflow: hidden; }
.hero .container { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 72px; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 4.2vw, 3rem); letter-spacing: -.01em; }
.hero h1 .hl { color: var(--gold); }
.hero p.lead { font-size: 1.08rem; color: #d2dbff; max-width: 560px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.hero .eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--gold); }
.hero-poster { justify-self: center; width: min(320px, 80%); aspect-ratio: 2 / 3; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.1); position: relative; }
.hero-poster img { width: 100%; height: 100%; object-fit: cover; }
.hero-poster .ribbon { position: absolute; left: 12px; top: 12px; }
.trust { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 26px; color: #b8c4ef; font-size: .86rem; }
.trust span::before { content: '✓'; color: var(--green); font-weight: 700; margin-right: 6px; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section.alt { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section.dark { background: var(--navy-950); color: #dbe3ff; }
.section.dark h2, .section.dark h3 { color: #fff; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.feature { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.feature .ic { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--navy-100); color: var(--navy-800); margin-bottom: 12px; }
.feature .ic svg { width: 22px; height: 22px; }
.section.dark .feature { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); }
.section.dark .feature .ic { background: rgba(247,198,0,.14); color: var(--gold); }
.section.dark .feature p { color: #b8c4ef; }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.step { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 20px 20px 20px; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: var(--navy-950); font-weight: 800; margin-bottom: 10px; }

/* ---------- Film cards ---------- */
.film-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.film-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.film-card .poster { position: relative; aspect-ratio: 2 / 3; background: var(--navy-900); }
.film-card .poster img { width: 100%; height: 100%; object-fit: cover; }
.film-card .poster .badge { position: absolute; top: 10px; left: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.film-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.film-card h3 { margin: 0; font-size: 1.08rem; }
.film-card h3 a { text-decoration: none; color: inherit; }
.film-card .desc { color: var(--muted); font-size: .88rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: .8rem; }
.meta span { white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .74rem; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--navy-800); border: 1px solid var(--border); }
.film-card .actions { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.film-card .actions .btn { flex: 1; padding: 8px 10px; font-size: .84rem; }
.price-line { font-size: .86rem; color: var(--navy-900); font-weight: 600; }

/* ---------- Film detail ---------- */
.film-hero { background: linear-gradient(180deg, var(--navy-900), var(--navy-950)); color: #dbe3ff; }
.film-hero .container { display: grid; grid-template-columns: 300px 1fr; gap: 36px; padding-top: 40px; padding-bottom: 40px; }
.film-hero .poster { border-radius: 12px; overflow: hidden; aspect-ratio: 2 / 3; box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.film-hero .poster img { width: 100%; height: 100%; object-fit: cover; }
.film-hero h1 { color: #fff; margin-bottom: 8px; }
.film-hero .meta { color: #b8c4ef; font-size: .9rem; }
.film-hero .chip { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: #fff; }
.price-box { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 16px; margin-top: 18px; }
.price-box .amount { font: 700 1.7rem/1.1 var(--font-display); color: var(--gold); }
#trailer-section { scroll-margin-top: 90px; }
.trailer-wrap { aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.trailer-wrap video { width: 100%; height: 100%; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.slab-table td, .slab-table th { padding: 8px 10px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: #b8c4ef; padding: 44px 0 24px; margin-top: 0; font-size: .9rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
.site-footer h4 { color: #fff; font-size: .95rem; }
.site-footer a { color: #dbe3ff; text-decoration: none; display: block; padding: 3px 0; }
.site-footer a:hover { color: var(--gold); }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.1); margin-top: 28px; padding-top: 16px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .82rem; }

/* ---------- App shell (portal + admin) ---------- */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--navy-950); color: #dbe3ff; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { padding: 4px 8px 16px; }
.sidebar .who { padding: 12px; margin: 0 0 12px; border-radius: 10px; background: rgba(255,255,255,.05); font-size: .84rem; }
.sidebar .who strong { color: #fff; display: block; font-size: .92rem; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; color: #c7d1f6; text-decoration: none; padding: 9px 12px; border-radius: 8px; font-size: .9rem; font-weight: 500; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.active { background: rgba(247,198,0,.14); color: var(--gold); }
.sidebar nav .sep { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #7f8cc0; padding: 14px 12px 6px; }
.sidebar nav .count { margin-left: auto; background: var(--gold); color: var(--navy-950); border-radius: 999px; font-size: .72rem; font-weight: 800; padding: 0 7px; }
.main { padding: 24px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.topbar h1 { margin: 0; font-size: 1.5rem; }
.topbar .crumbs { font-size: .84rem; color: var(--muted); }
.shell-toggle { display: none; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .9rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--navy-800); border-bottom-color: var(--gold); }
.bar-cell { position: relative; min-width: 120px; }
.bar { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--navy-700), var(--cyan)); }

/* ---------- Upload ---------- */
.progress { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--green-700), var(--green)); width: 0; transition: width .3s; }
.progress.enc > span { background: linear-gradient(90deg, var(--navy-700), var(--cyan)); }
.asset-row td { vertical-align: middle; }
.dropzone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 18px; background: var(--surface-2); }

/* ---------- Warning box ---------- */
.warning-box { border: 2px solid var(--gold); background: #fffbea; border-radius: var(--radius); padding: 18px 20px; }
.warning-box h3 { color: #6b4c00; margin-top: 0; }
.warning-box ul { padding-left: 20px; margin: 0 0 1em; }
.scroll-box { max-height: 280px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; background: #fff; }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { background: radial-gradient(700px 400px at 70% 20%, rgba(41,196,239,.2), transparent 60%), linear-gradient(180deg, var(--navy-900), var(--navy-950)); color: #dbe3ff; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px; text-align: center; }
.auth-art img { width: min(300px, 70%); border-radius: 28px; box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.auth-art .tagline { font: 600 1.15rem var(--font-display); color: #fff; margin-top: 22px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px 16px; background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .brand { color: var(--navy-950); margin-bottom: 18px; }
.auth-card .brand .tag { color: var(--muted); }
.auth-switch { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 18px; font-size: .86rem; }

/* ---------- Splash / loading screen ---------- */
#splash { display: none; }
html.show-splash #splash { display: flex; position: fixed; inset: 0; z-index: 1000; background: var(--navy-950); align-items: center; justify-content: center; flex-direction: column; gap: 18px; transition: opacity .4s; }
#splash img { width: 160px; height: 160px; border-radius: 30px; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
#splash .dots { display: flex; gap: 6px; }
#splash .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: pulse 1s infinite ease-in-out; }
#splash .dots i:nth-child(2) { animation-delay: .15s; background: var(--green); }
#splash .dots i:nth-child(3) { animation-delay: .3s; background: var(--cyan); }
#splash.out { opacity: 0; pointer-events: none; }
@keyframes pulse { 0%, 100% { transform: scale(.6); opacity: .5; } 50% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #splash .dots i { animation: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--navy-950); flex-direction: column; align-items: stretch; padding: 10px 16px 16px; border-bottom: 1px solid rgba(255,255,255,.1); }
  .nav.open { display: flex; }
  .nav a { padding: 11px 10px; }
  .nav .btn { margin: 6px 0 0; }
  .nav-toggle { display: inline-block; }
}
@media (max-width: 900px) {
  .hero .container, .film-hero .container, .two-col { grid-template-columns: 1fr; }
  .hero .container { padding-top: 40px; padding-bottom: 48px; }
  .hero-poster { width: min(260px, 70%); }
  .film-hero .poster { max-width: 260px; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; transform: translateX(-100%); transition: transform .2s; z-index: 80; }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(4,13,51,.5); }
  .shell-toggle { display: inline-flex; }
  .main { padding: 16px; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { padding: 28px 16px; }
  .auth-art img { width: 120px; border-radius: 22px; }
  .auth-art .tagline { font-size: 1rem; margin-top: 12px; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .film-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .film-card .body { padding: 10px 12px 12px; }
  .film-card .desc { -webkit-line-clamp: 2; }
  .film-card .actions { flex-direction: column; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .card { padding: 16px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .brand .tag { display: none; }
}
@media print {
  .site-header, .site-footer, .sidebar, .no-print { display: none !important; }
  body { background: #fff; }
  .shell { display: block; }
}

/* ---------- Language menu (button shows current language; opens the list of all languages) ---------- */
.lang-menu { position: relative; flex: none; }
.lang-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--navy-900); font: 600 .88rem/1.2 var(--font); cursor: pointer; user-select: none; white-space: nowrap; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover { border-color: var(--navy-700); }
.lang-menu .chev { transition: transform .15s; }
.lang-menu[open] .chev { transform: rotate(180deg); }
.lang-menu.dark summary { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.45); color: #fff; }
.lang-menu.dark summary:hover { background: rgba(255,255,255,.22); }
.lang-list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); overflow-y: auto; overscroll-behavior: contain; background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 14px 36px rgba(4,13,51,.28); padding: 6px; z-index: 300; }
.lang-head { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 12px 6px; }
.lang-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border-radius: 10px; text-decoration: none; color: var(--text); font-weight: 600; font-size: .98rem; }
.lang-list a:hover { background: var(--surface-2); }
.lang-list a.on { background: var(--navy-100); color: var(--navy-800); }
.lang-foot { font-size: .78rem; color: var(--muted); padding: 8px 12px 6px; border-top: 1px solid var(--border); margin-top: 4px; }
.site-header .lang-menu { margin-left: 12px; order: 3; }
.site-header .nav { order: 2; }
@media (max-width: 1100px) { .site-header .lang-menu { margin-left: auto; } .nav-toggle { margin-left: 8px; } }

/* Telugu text runs longer: let buttons and labels wrap instead of overflowing */
html[lang="te"] .btn { white-space: normal; text-align: center; line-height: 1.35; }
html[lang="te"] th { white-space: normal; text-transform: none; letter-spacing: 0; }
html[lang="te"] body { line-height: 1.7; }
html[lang="te"] .nav a { font-size: .84rem; padding: 8px 7px; }

/* ---------- App shell (phones, tablets and the Android app) ---------- */
.app-bar, .tab-bar, .sheet, .sheet-backdrop { display: none; }

html.app-mode body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); background: var(--bg); -webkit-tap-highlight-color: transparent; }
html.app-mode .site-header, html.app-mode .site-footer, html.app-mode .sidebar, html.app-mode .shell-toggle,
html.app-mode .topbar, html.app-mode .auth-art, html.app-mode .auth-card > .right, html.app-mode .auth-card > .brand, html.app-mode .auth-switch { display: none !important; }

html.app-mode .app-bar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 60; min-height: 58px; padding: env(safe-area-inset-top) 12px 0; background: var(--navy-950); color: #fff; box-shadow: 0 2px 10px rgba(4,13,51,.35); }
.app-logo { flex: none; display: block; }
.app-logo img { width: 36px; height: 36px; border-radius: 9px; }
.app-title { flex: 1; min-width: 0; font: 700 1.08rem/1.2 var(--font-display); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-title .name b { color: var(--gold); }
.app-icon { position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; }
.app-icon:hover, .app-icon:active { background: rgba(255,255,255,.1); color: #fff; }
.app-icon .dot { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--gold); color: var(--navy-950); font: 800 .66rem/18px var(--font); text-align: center; }
html.app-mode .app-bar .lang-menu summary { padding: 6px 10px; font-size: .84rem; }

html.app-mode .tab-bar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 16px rgba(4,13,51,.08); }
.tab-bar a, .tab-bar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 62px; padding: 6px 2px; background: none; border: 0; color: var(--muted); text-decoration: none; font: 600 .7rem/1.15 var(--font); cursor: pointer; text-align: center; }
.tab-bar svg { width: 24px; height: 24px; }
.tab-bar .on { color: var(--navy-800); }
.tab-bar .on::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold); }
.tab-bar span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

html.app-mode .sheet-backdrop:not(.hidden) { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(4,13,51,.55); }
html.app-mode .sheet:not(.hidden) { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; max-height: 86vh; overflow-y: auto; background: #fff; border-radius: 22px 22px 0 0; padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(4,13,51,.3); animation: sheet-up .2s ease-out; }
body.sheet-open { overflow: hidden; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html.app-mode .sheet:not(.hidden) { animation: none; } }
.sheet-grip { width: 44px; height: 5px; border-radius: 999px; background: var(--border); margin: 4px auto 12px; }
.sheet-user { display: flex; flex-direction: column; padding: 4px 4px 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.sheet-user strong { font-size: 1.02rem; color: var(--navy-950); }
.sheet-user span { font-size: .84rem; color: var(--muted); }
.sheet-links a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 4px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 600; font-size: 1rem; }
.sheet-links a.on { color: var(--navy-800); }
.sheet-links a svg { color: var(--muted); flex: none; }
.sheet-legal { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 14px 4px; font-size: .8rem; }
.sheet-legal a { color: var(--muted); }

/* App look for page content */
html.app-mode .shell { display: block; min-height: 0; }
html.app-mode .main { padding: 14px 14px 20px; }
html.app-mode .container { padding: 0 14px; }
html.app-mode .card, html.app-mode .feature, html.app-mode .step, html.app-mode .stat, html.app-mode .film-card, html.app-mode .table-wrap { border-radius: 16px; }
html.app-mode .card { padding: 16px; box-shadow: 0 1px 3px rgba(7,26,92,.08); }
html.app-mode .btn { min-height: 46px; border-radius: 14px; }
html.app-mode .btn-sm { min-height: 36px; border-radius: 10px; }
html.app-mode input:not([type]), html.app-mode input[type=text], html.app-mode input[type=email], html.app-mode input[type=password], html.app-mode input[type=number], html.app-mode input[type=tel], html.app-mode input[type=date], html.app-mode input[type=search], html.app-mode select, html.app-mode textarea { font-size: 16px; min-height: 48px; border-radius: 12px; }
html.app-mode form.card > .btn, html.app-mode .auth-card .btn-primary { width: 100%; }
html.app-mode h1 { font-size: 1.45rem; }
html.app-mode h2 { font-size: 1.2rem; }

/* Home: compact app header + swipeable film rows */
html.app-mode .hero .container { display: block; padding-top: 22px; padding-bottom: 26px; }
html.app-mode .hero h1 { font-size: 1.65rem; margin-bottom: 10px; }
html.app-mode .hero p.lead { font-size: .98rem; }
html.app-mode .hero .btn-row { flex-direction: column; align-items: stretch; gap: 10px; }
html.app-mode .hero .btn { width: 100%; }
html.app-mode .hero-poster { display: none; }
html.app-mode .trust { gap: 6px 14px; margin-top: 18px; font-size: .8rem; }
html.app-mode .section { padding: 22px 0; }
html.app-mode .section.alt { background: transparent; border: 0; }
html.app-mode .section-head { margin-bottom: 12px; align-items: center; flex-wrap: nowrap; }
html.app-mode .section-head h2 { font-size: 1.15rem; }
html.app-mode .section-head p { font-size: .84rem; }
html.app-mode .section-head .btn { min-height: 34px; padding: 6px 12px; font-size: .8rem; border-radius: 999px; }
html.app-mode .film-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin: 0 -14px; padding-left: 14px; padding-right: 14px; scrollbar-width: none; }
html.app-mode .film-row::-webkit-scrollbar { display: none; }
html.app-mode .film-row > .film-card { flex: 0 0 62%; max-width: 230px; scroll-snap-align: start; }
html.app-mode .features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
html.app-mode .feature { padding: 14px; }
html.app-mode .feature h3 { font-size: .95rem; }
html.app-mode .feature p { font-size: .84rem; }
html.app-mode .steps { grid-template-columns: 1fr; gap: 10px; }
html.app-mode .two-col { grid-template-columns: 1fr; }
html.app-mode .film-hero .container { grid-template-columns: 1fr; padding-top: 18px; padding-bottom: 22px; gap: 16px; }
html.app-mode .film-hero .poster { max-width: 200px; }
html.app-mode .tabs { position: sticky; top: 58px; z-index: 20; background: var(--bg); margin: -4px -14px 14px; padding: 0 14px; }
html.app-mode .filters { padding: 12px !important; }
html.app-mode .auth-wrap { display: block; min-height: 0; }
html.app-mode .auth-form { padding: 18px 14px; display: block; }
html.app-mode .auth-card { max-width: none; }
html.app-mode .auth-card h1 { margin-top: 4px; }
@media (max-width: 360px) { html.app-mode .features { grid-template-columns: 1fr; } .tab-bar a, .tab-bar button { font-size: .64rem; } }

/* ---------- Registration v2 ---------- */
.choice-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 2px solid var(--border); border-radius: 14px; cursor: pointer; background: #fff; font-weight: 500; margin: 0; }
.choice input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--navy-800); }
.choice strong { display: block; color: var(--navy-950); font-size: 1rem; }
.choice small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; margin-top: 2px; }
.choice:has(input:checked) { border-color: var(--navy-800); background: var(--navy-100); }
.loc-box { border: 1px dashed var(--navy-700); border-radius: 14px; padding: 14px; background: #f8faff; }
.loc-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.loc-map { margin-top: 10px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); aspect-ratio: 16 / 9; background: var(--surface-2); }
.loc-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.center { text-align: center; }
.geo-check { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
@media (max-width: 520px) { .choice-cards { grid-template-columns: 1fr; } }
/* Out-of-area / location message on the play page: pulses so it is noticed */
.alert-geo { display: flex; gap: 12px; align-items: flex-start; background: #fff4f4; border: 2px solid var(--red); color: #5c0c0c; animation: geo-pulse 1.4s ease-in-out 4; }
.alert-geo .geo-icon { flex: none; color: var(--red); animation: geo-blink 1s step-end infinite; }
.alert-geo .geo-title { display: block; font-size: 1.05rem; color: var(--red); margin-bottom: 4px; }
@keyframes geo-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(198,40,40,.0); } 50% { box-shadow: 0 0 0 6px rgba(198,40,40,.25); } }
@keyframes geo-blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .alert-geo, .alert-geo .geo-icon { animation: none; } }
/* Keep every framed box inside its frame on narrow screens */
fieldset { min-width: 0; max-width: 100%; }
legend { max-width: 100%; white-space: normal; }
input[type=file] { width: 100%; max-width: 100%; min-width: 0; font-size: .9rem; }
.card, .alert, .feature, .step, .stat, .price-box, .warning-box, .loc-box, .choice { min-width: 0; overflow-wrap: anywhere; }
.grid-2 > *, .grid-3 > *, .two-col > *, .btn-row > * { min-width: 0; }
html.app-mode .reg-form { padding: 14px; }
html.app-mode .reg-form fieldset { padding: 12px; margin-bottom: 14px; border-radius: 14px; }
html.app-mode .reg-form legend { font-size: .98rem; }
html.app-mode .kv dd { overflow-wrap: anywhere; }
/* Admin Overview: "Getting ready for schools" checklist */
.checklist { margin-bottom: 16px; }
.checklist > summary { cursor: pointer; list-style: none; margin-bottom: 0; }
.checklist > summary::-webkit-details-marker { display: none; }
.checklist > summary h3::after { content: ' \25BE'; color: var(--muted); font-weight: 400; }
.checklist:not([open]) > summary h3::after { content: ' \25B8'; }
.checklist[open] > summary { margin-bottom: 8px; }
.checklist-items { list-style: none; margin: 8px 0 0; padding: 0; }
.checklist-items li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--border); }
.checklist-items .ck { flex: 0 0 22px; height: 22px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; border: 2px solid var(--amber-700); color: #fff; }
.checklist-items li.done .ck { border-color: var(--green-700); background: var(--green-700); }
.checklist-items li.done strong { color: var(--muted); }
.checklist-items .ck-text { flex: 1; min-width: 0; }
.checklist-items .ck-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 600px) {
  .checklist-items li { flex-wrap: wrap; }
  .checklist-items .ck-actions { width: 100%; padding-left: 34px; justify-content: flex-start; }
}
