/* ==========================================================================
   AMMA KATHALU PAGE ONLY (amma-kathalu.php). Header/footer/colours come from site.css.
   ========================================================================== */
:root { --caption-bg: #FFF3C4; --caption-text: #5A3E00; }
html[data-theme="dark"] { --caption-bg: #2a2208; --caption-text: #FDDC84; }

.wa-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #25D366; color: #fff; padding: 12px 20px; min-height: 44px; font-size: .9rem; font-weight: 700; border-radius: 50px; text-decoration: none; box-shadow: 0 6px 16px rgba(37,211,102,.35); }
.call-big { display: inline-flex; align-items: center; gap: 10px; background: #fff; color: var(--primary); font-weight: 800; padding: 14px 26px; border-radius: 50px; text-decoration: none; font-size: 1.05rem; min-height: 48px; box-shadow: 0 8px 20px rgba(0,0,0,.25); animation: ring 2.4s ease-in-out infinite; }
html[data-theme="dark"] .call-big { color: #9E1B3A; }
@keyframes ring { 0%,88%,100% { transform: rotate(0); } 90% { transform: rotate(-3deg); } 92% { transform: rotate(3deg); } 94% { transform: rotate(-3deg); } 96% { transform: rotate(3deg); } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 44px 20px 28px; text-align: center; overflow: hidden; z-index: 1; }
.hero-inner { max-width: 860px; margin: 0 auto; position: relative; z-index: 2; }
.badge-stamp { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; background: rgba(197,136,43,.12); border: 1px solid var(--accent-brass); border-radius: 40px; font-size: .78rem; font-weight: 700; color: var(--accent-brass); margin-bottom: 16px; }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); line-height: 1.12; margin-bottom: 6px; }
.gradient-text { background: linear-gradient(135deg, var(--primary), var(--accent-chilli) 40%, var(--accent-turmeric)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sig { font-size: clamp(1.8rem, 3.4vw, 2.7rem); color: var(--accent-chilli); margin-bottom: 12px; }
.hero p.lead { font-size: 1.05rem; color: var(--text-muted); max-width: 60ch; margin: 0 auto 22px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.hero-stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 8px 14px; font-size: .8rem; font-weight: 700; color: var(--text-muted); }
.hero-stat b { color: var(--primary); font-size: 1rem; }
.float-emoji { position: absolute; font-size: 2rem; opacity: .9; animation: floaty 5s ease-in-out infinite; z-index: 1; pointer-events: none; }
.float-emoji:nth-child(1) { top: 12%; left: 6%; } .float-emoji:nth-child(2) { top: 20%; right: 7%; animation-delay: .8s; }
.float-emoji:nth-child(3) { bottom: 14%; left: 12%; animation-delay: 1.6s; } .float-emoji:nth-child(4) { bottom: 22%; right: 12%; animation-delay: 2.2s; }
.float-emoji:nth-child(5) { top: 52%; left: 2%; animation-delay: 3s; } .float-emoji:nth-child(6) { top: 8%; left: 46%; animation-delay: 1.2s; }
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-14px) rotate(6deg); } }

/* Bhaskar ETA widget */
.eta-box { max-width: 560px; margin: 22px auto 0; background: var(--surface); border: 1.5px dashed var(--accent-chilli); border-radius: 18px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; text-align: left; }
.eta-box .eta-ico { font-size: 1.8rem; flex: none; }
.eta-box .eta-txt { flex: 1; min-width: 0; font-size: .86rem; font-weight: 600; color: var(--text-muted); overflow-wrap: anywhere; }
.eta-box .eta-txt b { color: var(--accent-chilli); }
.eta-btn { flex: none; min-height: 44px; padding: 8px 14px; border-radius: 24px; border: none; background: linear-gradient(135deg, var(--accent-chilli), var(--primary)); color: #fff; font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; }
.eta-btn:active { transform: scale(.95); }

/* ---------- progress + filters ---------- */
.controls { max-width: 1240px; margin: 0 auto; padding: 8px 20px 0; position: relative; z-index: 1; }
.progress-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1.5px dashed var(--accent-brass); border-radius: 16px; padding: 10px 16px; margin-bottom: 18px; font-size: .86rem; font-weight: 700; color: var(--text-muted); }
.progress-box b { color: var(--primary); }
.progress-track { flex: 1 1 140px; height: 10px; background: var(--border); border-radius: 8px; overflow: hidden; min-width: 120px; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-leaf), var(--accent-turmeric)); border-radius: 8px; transition: width .5s ease; }
.age-nav { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.age-pill { flex: none; min-height: 44px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); padding: 8px 18px; border-radius: 30px; font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; transition: all .2s; white-space: nowrap; }
.age-pill.active, .age-pill:hover { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 4px 12px var(--primary-glow); }
html[data-theme="dark"] .age-pill.active, html[data-theme="dark"] .age-pill:hover { background: #D6304F; border-color: #D6304F; }

/* ---------- story cards ---------- */
.story-grid { max-width: 1240px; margin: 0 auto; padding: 0 20px 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px,100%),1fr)); gap: 24px; position: relative; z-index: 1; }
.story-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; overflow: hidden; box-shadow: var(--card-shadow); display: flex; flex-direction: column; cursor: pointer; transition: transform .25s ease, border-color .25s ease; min-width: 0; }
.story-card:hover { transform: translateY(-6px) rotate(-.5deg); border-color: var(--primary); }
.cover { position: relative; height: 150px; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 20% 30%, rgba(255,255,255,.22) 0 2px, transparent 3px) 0 0 / 14px 14px, linear-gradient(135deg, var(--c1), var(--c2)); }
.cover .scene { font-size: 3rem; letter-spacing: 6px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.3)); transition: transform .3s; }
.story-card:hover .cover .scene { transform: scale(1.12) rotate(-3deg); }
.cover .ep { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,.35); padding: 3px 10px; border-radius: 14px; font-size: .7rem; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.cover .lol-tag { position: absolute; bottom: 10px; right: 12px; background: #fff; color: var(--primary); padding: 3px 10px; border-radius: 14px; font-size: .7rem; font-weight: 800; transform: rotate(-4deg); box-shadow: 0 3px 8px rgba(0,0,0,.25); }
.cover .read-badge { position: absolute; top: 12px; right: 12px; background: #fff; color: var(--accent-leaf); padding: 3px 10px; border-radius: 14px; font-size: .7rem; font-weight: 800; display: none; }
.story-card.is-read .read-badge { display: block; }
.story-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .68rem; font-weight: 800; padding: 3px 9px; border-radius: 12px; background: rgba(42,111,65,.12); color: var(--accent-leaf); }
.chip.item { background: rgba(216,49,30,.1); color: var(--accent-chilli); }
.story-title { font-size: 1.2rem; line-height: 1.25; color: var(--primary); overflow-wrap: anywhere; }
.story-teaser { font-size: .88rem; color: var(--text-muted); flex: 1; }
.story-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; font-size: .78rem; font-weight: 700; color: var(--text-muted); }
.story-foot .go { color: var(--primary); }

/* ---------- CTA band ---------- */
.cta-band { max-width: 1100px; margin: 36px auto; padding: 0 20px; position: relative; z-index: 1; }
.cta-inner { position: relative; overflow: hidden; border-radius: 28px; padding: 34px 26px; text-align: center; color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent-chilli) 60%, var(--accent-turmeric)); box-shadow: 0 18px 40px var(--primary-glow); }
html[data-theme="dark"] .cta-inner { background: linear-gradient(135deg,#9E1B3A,#C8341F 60%,#B9770E); }
.cta-inner h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin-bottom: 6px; }
.cta-inner p { max-width: 56ch; margin: 0 auto 18px; opacity: .95; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-steps { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; font-size: .8rem; font-weight: 700; }
.cta-steps span { background: rgba(255,255,255,.18); padding: 5px 12px; border-radius: 14px; }
.cta-link { display: inline-block; margin-top: 14px; color: #fff; font-size: .85rem; font-weight: 700; text-decoration: underline; }
.disclaimer { max-width: 900px; margin: 0 auto; padding: 0 20px 40px; text-align: center; font-size: .78rem; color: var(--text-muted); position: relative; z-index: 1; }

/* ---------- story reader ---------- */
.reader-overlay { position: fixed; inset: 0; background: rgba(20,6,12,.78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 14px; opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 1200; }
.reader-overlay.active { opacity: 1; pointer-events: auto; }
.reader { background: var(--bg); border: 1px solid var(--border); border-radius: 26px; width: 100%; max-width: 680px; max-height: 94vh; max-height: 94dvh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.45); transform: translateY(18px) scale(.97); transition: transform .3s cubic-bezier(.16,1,.3,1); }
.reader-overlay.active .reader { transform: none; }
.reader-head { position: relative; padding: 16px 56px 16px 18px; color: #fff; background: radial-gradient(circle at 20% 30%, rgba(255,255,255,.22) 0 2px, transparent 3px) 0 0 / 14px 14px, linear-gradient(135deg, var(--c1,#941834), var(--c2,#D8311E)); }
.reader-head .ep { font-size: .7rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; opacity: .9; }
.reader-head h3 { font-size: 1.35rem; line-height: 1.2; margin-top: 2px; }
.reader-head .scene { position: absolute; right: 54px; bottom: 6px; font-size: 1.8rem; opacity: .9; }
.reader-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; background: rgba(0,0,0,.25); color: #fff; border: none; border-radius: 50%; font-size: 1.2rem; cursor: pointer; }
.reader-close:hover { background: rgba(0,0,0,.45); }
.reader-bar { height: 4px; background: rgba(0,0,0,.15); }
.reader-bar i { display: block; height: 100%; width: 0; background: var(--accent-turmeric); transition: width .2s; }
.reader-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 18px 16px 8px; flex: 1; }

.caption { background: var(--caption-bg); color: var(--caption-text); border: 2px solid var(--accent-turmeric); border-radius: 10px; padding: 10px 14px; margin: 6px 0 16px; font-size: .9rem; font-weight: 600; font-style: italic; text-align: center; animation: pop .4s both; animation-delay: calc(var(--i) * 55ms); }
/* comic sound-effect burst */
.sfx { display: block; width: max-content; max-width: 100%; margin: 4px auto 16px; padding: 8px 22px; font-family: 'Rozha One', serif; font-size: 1.55rem; line-height: 1.1; color: #fff; text-align: center; background: linear-gradient(135deg, var(--accent-chilli), var(--accent-turmeric)); border: 3px solid #fff; border-radius: 16px; box-shadow: 0 6px 16px rgba(216,49,30,.4); transform: rotate(-3deg); animation: boom .5s both; animation-delay: calc(var(--i) * 55ms); text-shadow: 2px 2px 0 rgba(0,0,0,.25); overflow-wrap: anywhere; }
.sfx:nth-of-type(even) { transform: rotate(3deg); }
@keyframes boom { 0% { opacity: 0; transform: scale(.3) rotate(-12deg); } 60% { transform: scale(1.18) rotate(-3deg); } 100% { opacity: 1; transform: scale(1) rotate(-3deg); } }
.panel { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 16px; animation: pop .4s both; animation-delay: calc(var(--i) * 55ms); }
.panel.right { flex-direction: row-reverse; }
.avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; background: var(--surface); border: 2px solid var(--accent-brass); box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.panel.right .avatar { border-color: var(--primary); }
.bubble-wrap { min-width: 0; max-width: calc(100% - 60px); }
.who { font-size: .7rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin: 0 6px 3px; }
.panel.right .who { text-align: right; }
.bubble { position: relative; background: var(--surface); border: 2px solid var(--border); border-radius: 18px 18px 18px 4px; padding: 10px 14px; font-size: .94rem; line-height: 1.55; overflow-wrap: anywhere; box-shadow: 0 4px 10px rgba(0,0,0,.06); }
.panel.right .bubble { border-radius: 18px 18px 4px 18px; border-color: var(--primary); background: linear-gradient(135deg, rgba(148,24,52,.08), rgba(216,49,30,.05)); }
.panel.shout .bubble { font-weight: 800; font-size: 1.02rem; border-color: var(--accent-chilli); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }

.info-card { position: relative; overflow: hidden; border-radius: 20px; padding: 20px 18px 16px; margin: 6px 0 14px; border: 1.5px solid; }
.info-card::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 5px; }
.info-punch { background: linear-gradient(135deg, rgba(216,49,30,.1), rgba(232,158,25,.12)); border-color: rgba(216,49,30,.4); text-align: center; }
.info-punch::before { background: linear-gradient(90deg, var(--accent-chilli), var(--accent-turmeric)); }
.info-health { background: linear-gradient(135deg, rgba(42,111,65,.11), rgba(232,158,25,.07)); border-color: rgba(42,111,65,.34); }
.info-health::before { background: linear-gradient(90deg, var(--accent-leaf), #38A169, var(--accent-turmeric)); }
.info-moral { background: linear-gradient(135deg, rgba(232,158,25,.14), rgba(216,49,30,.06)); border-color: rgba(197,136,43,.45); text-align: center; }
.info-moral::before { background: linear-gradient(90deg, var(--accent-turmeric), var(--accent-chilli)); }
.info-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.info-icon { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; color: #fff; background: linear-gradient(135deg, var(--accent-leaf), #38A169); box-shadow: 0 4px 10px rgba(0,0,0,.18); }
.info-head h4 { font-family: 'Rozha One', serif; font-weight: 400; font-size: 1.1rem; line-height: 1.2; color: var(--accent-leaf); }
.info-head small { display: block; font-family: 'Plus Jakarta Sans', sans-serif; font-size: .72rem; color: var(--text-muted); font-weight: 600; }
.health-list { list-style: none; }
.health-list li { position: relative; padding: 5px 0 5px 26px; font-size: .9rem; line-height: 1.5; }
.health-list li::before { content: '✔'; position: absolute; left: 0; top: 5px; color: var(--accent-leaf); font-weight: 800; }
.mini-label { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent-brass); }
.punch-text { font-size: 1.35rem; color: var(--accent-chilli); line-height: 1.25; margin-top: 4px; }
.moral-text { font-size: 1.5rem; color: var(--primary); line-height: 1.2; margin-top: 2px; }

/* laugh-o-meter */
.laugh-box { border-radius: 20px; border: 1.5px dashed var(--accent-brass); background: var(--surface); padding: 16px 12px; margin: 6px 0 14px; text-align: center; }
.laugh-box h4 { font-family: 'Rozha One', serif; font-weight: 400; font-size: 1.05rem; color: var(--primary); margin-bottom: 10px; }
.laugh-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.laugh-btn { min-height: 48px; padding: 8px 14px; border-radius: 24px; border: 1.5px solid var(--border); background: var(--bg); color: var(--text-main); font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; transition: transform .15s, border-color .2s; }
.laugh-btn:hover { border-color: var(--primary); }
.laugh-btn:active { transform: scale(.92); }
.laugh-btn.picked { background: var(--primary); color: #fff; border-color: var(--primary); }
.laugh-reply { min-height: 1.4em; margin-top: 10px; font-size: .86rem; font-weight: 700; font-style: italic; color: var(--accent-leaf); }

.order-card { border-radius: 22px; padding: 22px 18px; margin: 6px 0 12px; text-align: center; color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent-chilli) 65%, var(--accent-turmeric)); box-shadow: 0 12px 28px var(--primary-glow); }
html[data-theme="dark"] .order-card { background: linear-gradient(135deg,#9E1B3A,#C8341F 65%,#B9770E); }
.order-card h4 { font-family: 'Rozha One', serif; font-weight: 400; font-size: 1.3rem; line-height: 1.25; margin-bottom: 4px; }
.order-card p { font-size: .88rem; opacity: .95; margin-bottom: 14px; }
.order-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.order-buttons .call-big { font-size: .98rem; padding: 12px 22px; animation: none; }
.order-buttons .wa-btn { box-shadow: none; }
.shop-link { display: inline-block; margin-top: 12px; color: #fff; font-size: .82rem; font-weight: 700; text-decoration: underline; opacity: .95; }

.reader-foot { display: flex; gap: 10px; justify-content: space-between; align-items: center; padding: 10px 14px calc(10px + env(safe-area-inset-bottom,0px)); border-top: 1px solid var(--border); background: var(--surface); }
.nav-story { min-height: 44px; padding: 8px 14px; border-radius: 24px; border: 1px solid var(--border); background: transparent; color: var(--text-main); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.nav-story:hover { border-color: var(--primary); color: var(--primary); }
.reader-count { font-size: .76rem; font-weight: 700; color: var(--text-muted); text-align: center; }

.call-bar { display: none; }

@media (max-width: 900px) { .float-emoji { font-size: 1.5rem; } }
@media (max-width: 600px) {
  .hero { padding: 30px 16px 20px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta > * { width: 100%; }
  .eta-box { flex-wrap: wrap; } .eta-btn { width: 100%; }
  .controls, .story-grid { padding-left: 14px; padding-right: 14px; }
  .age-nav { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 0 -14px 24px; padding: 2px 14px 8px; scrollbar-width: none; }
  .age-nav::-webkit-scrollbar { display: none; }
  .cta-band { padding: 0 12px; }
  .cta-inner { padding: 26px 16px; border-radius: 22px; }
  .reader-overlay { padding: 0; align-items: end; }
  .reader { max-height: 96vh; max-height: 96dvh; border-radius: 24px 24px 0 0; }
  .reader-head h3 { font-size: 1.15rem; }
  .reader-head .scene { display: none; }
  .sfx { font-size: 1.3rem; }
  .moral-text { font-size: 1.25rem; } .punch-text { font-size: 1.2rem; }
  .call-bar { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; padding: 8px 12px calc(8px + env(safe-area-inset-bottom,0px)); background: var(--nav-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border); }
  .call-bar a { flex: 1; min-height: 46px; text-decoration: none; }
  body { padding-bottom: 66px; }
  /* lift the shared floating buttons above the call bar */
  .scroll-top-btn { bottom: calc(78px + var(--sab)); }
  .floating-quick-cart { bottom: calc(134px + var(--sab)); }
  .cart-toast { bottom: calc(140px + var(--sab)); }
}
@media (hover: none) { .story-card:hover { transform: none; border-color: var(--border); } .story-card:hover .cover .scene { transform: none; } }
