/* Playful layer (bright theme): springy pill buttons, colorful icon tiles, pastel cards.
   Loaded last on every page. Motion here is switched off for prefers-reduced-motion. */

/* ---------- buttons & brand */
.btn { border-radius: 999px; font-weight: 600; transition: transform .25s var(--spring), box-shadow .2s var(--ease), background .2s var(--ease); }
.btn.sm { border-radius: 999px; }
.btn:active:not(:disabled) { transform: scale(.96); }
.btn:not(.primary):not(.ghost):not(.danger) { background: #fff; }
.btn:not(.primary):not(.ghost):not(.danger):hover { background: #f1f8f4; }
.btn.primary { background: linear-gradient(135deg, #34dcb6, #0ea888); border-color: transparent; box-shadow: 0 8px 20px rgba(20, 201, 160, .3); }
.btn.primary:hover { background: linear-gradient(135deg, #17c9a2, #0b8f74); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(20, 201, 160, .38); }
.logo-mark { background: linear-gradient(135deg, #34dcb6, #0ea888); border-radius: 10px; box-shadow: 0 6px 14px rgba(20, 201, 160, .35); color: #fff; }
.card { border-color: #e6efea; }
.badge { border-radius: 999px; }

/* ---------- tone tiles (sidebar + wherever .ni is used) */
.ni { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; transition: transform .3s var(--spring), background .2s; }
.ni .ico { width: 18px; height: 18px; }
.ni.green { background: var(--t-green-soft); color: var(--t-green); }
.ni.blue { background: var(--t-blue-soft); color: var(--t-blue); }
.ni.violet { background: var(--t-violet-soft); color: var(--t-violet); }
.ni.yellow { background: var(--t-yellow-soft); color: var(--t-yellow); }
.ni.coral { background: var(--t-coral-soft); color: var(--t-coral); }
.nav-item { border-radius: 12px; }
.nav-item:hover .ni { transform: rotate(-8deg) scale(1.08); }
.nav-item:hover .ni .ico { transform: none; }
.nav-item[aria-current="page"] { background: #fff; box-shadow: var(--shadow); color: var(--fg); }
.nav-item[aria-current="page"] .ni .ico { color: #fff; }
.nav-item[aria-current="page"] .ni.green { background: var(--t-green); }
.nav-item[aria-current="page"] .ni.blue { background: var(--t-blue); }
.nav-item[aria-current="page"] .ni.violet { background: var(--t-violet); }
.nav-item[aria-current="page"] .ni.yellow { background: var(--t-yellow); }
.nav-item[aria-current="page"] .ni.coral { background: var(--t-coral); }
.side { background: rgba(255, 255, 255, .7); backdrop-filter: blur(12px); }
.admin-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--t-coral-soft); color: #c2334d; margin-left: 4px; vertical-align: middle; }
.credit-pill { background: #fff; box-shadow: var(--shadow); border-radius: 999px; }

/* ---------- KPI cards: pastel, each its own color */
.kpis > .kpi { position: relative; overflow: hidden; border-color: transparent; box-shadow: var(--shadow); --tone: var(--t-green); --soft: var(--t-green-soft); background: linear-gradient(140deg, var(--soft), #fff 72%); }
.kpis > .kpi:nth-child(5n+2) { --tone: var(--t-blue); --soft: var(--t-blue-soft); }
.kpis > .kpi:nth-child(5n+3) { --tone: var(--t-yellow); --soft: var(--t-yellow-soft); }
.kpis > .kpi:nth-child(5n+4) { --tone: var(--t-coral); --soft: var(--t-coral-soft); }
.kpis > .kpi:nth-child(5n+5) { --tone: var(--t-violet); --soft: var(--t-violet-soft); }
.kpis > .kpi::after { content: ""; position: absolute; right: -34px; bottom: -34px; width: 120px; height: 120px; border-radius: 50%; background: var(--tone); opacity: .07; transition: transform .5s var(--spring); }
.kpis > .kpi:hover::after { transform: scale(1.25); }
.kpi .k-label .ico { width: 34px; height: 34px; padding: 8px; border-radius: 12px; background: #fff; color: var(--tone, var(--accent)); box-shadow: 0 4px 10px rgba(16, 36, 26, .06); }
.kpi:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
a.kpi.link { display: block; color: inherit; text-decoration: none; }
.kpi.attn { outline: 2px solid var(--warn); outline-offset: -2px; }

/* ---------- greeting banner on the overview */
.hello { display: flex; align-items: center; gap: 20px; padding: 22px 26px; border-radius: var(--radius-lg); background: linear-gradient(120deg, #d4f7ec, #e6f0ff 60%, #f1ebff); position: relative; overflow: hidden; box-shadow: var(--shadow); }
.hello h2 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; }
.hello p { color: var(--fg-2); margin-top: 4px; }
.hello .art { margin-left: auto; width: 132px; height: 96px; flex: none; animation: bob 4s ease-in-out infinite; }
.hello .spark { position: absolute; color: #f5b301; animation: twinkle 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-2deg); } }
@keyframes twinkle { 0%, 100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }
@media (max-width: 640px) { .hello .art { display: none; } }

/* ---------- buying credits */
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.pack { position: relative; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-lg); padding: 22px; display: grid; gap: 6px; align-content: start; box-shadow: var(--shadow); transition: transform .3s var(--spring), border-color .2s, box-shadow .3s; }
.pack:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.pack.picked { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(20, 201, 160, .18), var(--shadow-lift); }
.pack h3 { font-size: 18px; }
.pack-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--t-yellow-soft); color: var(--t-yellow); margin-bottom: 6px; }
.pack-credits { font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.pack-credits small { font-size: 14px; font-weight: 500; }
.pack-price { font-size: 20px; font-weight: 700; color: var(--accent-ink); }
.pack .btn { margin-top: 12px; }
.pack.hot { background: linear-gradient(160deg, #2bd4ae, #0d9d80); color: #fff; border-color: transparent; }
.pack.hot .muted, .pack.hot .pack-price { color: rgba(255, 255, 255, .9); }
.pack.hot .pack-ic { background: rgba(255, 255, 255, .2); color: #fff; }
.pack.hot .btn.primary { background: #fff; color: var(--accent-ink); box-shadow: 0 8px 18px rgba(0, 0, 0, .12); }
.ribbon { position: absolute; top: 14px; right: 14px; display: inline-flex; gap: 4px; align-items: center; background: #ffd34d; color: #5b3a00; font-weight: 700; font-size: 12px; padding: 4px 10px; border-radius: 999px; animation: wiggle 3.2s ease-in-out infinite; }
@keyframes wiggle { 0%, 88%, 100% { transform: none; } 92% { transform: rotate(-7deg) scale(1.05); } 96% { transform: rotate(6deg) scale(1.05); } }
.pay-card { border: 1.5px solid rgba(20, 201, 160, .35); animation: rise .35s var(--ease); }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 880px) { .pay-grid { grid-template-columns: 1fr; } }
.pay-step { display: flex; gap: 14px; align-items: flex-start; }
.pay-step > .stack { flex: 1; min-width: 0; gap: 12px; }
.pay-step h3 { font-size: 16px; }
.step-no { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; box-shadow: 0 6px 14px rgba(20, 201, 160, .35); }
.pay-amount { font-size: 38px; font-weight: 800; color: var(--accent-ink); letter-spacing: -.02em; line-height: 1.1; }
.pay-to { display: grid; gap: 8px; }
.pay-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--muted); border-radius: 12px; flex-wrap: wrap; }
.pay-row span { color: var(--fg-3); font-size: 14px; min-width: 72px; }
.pay-row b { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pay-done { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 40px 20px; }
.pay-done p { color: var(--fg-2); }
.pay-done .burst { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; animation: pop-in .7s var(--spring); box-shadow: 0 0 0 10px var(--accent-soft), 0 0 0 22px rgba(20, 201, 160, .06); margin-bottom: 8px; }
.pay-done.wait .burst { background: var(--warn); box-shadow: 0 0 0 10px var(--warn-soft), 0 0 0 22px rgba(245, 165, 36, .08); }
@keyframes pop-in { from { transform: scale(0) rotate(-40deg); } }

/* ---------- website pages */
.nav { box-shadow: 0 1px 0 rgba(16, 36, 26, .04); }
.feature { box-shadow: var(--shadow); border-color: #e6efea; --tone: var(--t-green); --soft: var(--t-green-soft); }
.feature:nth-child(5n+2) { --tone: var(--t-blue); --soft: var(--t-blue-soft); }
.feature:nth-child(5n+3) { --tone: var(--t-violet); --soft: var(--t-violet-soft); }
.feature:nth-child(5n+4) { --tone: var(--t-yellow); --soft: var(--t-yellow-soft); }
.feature:nth-child(5n+5) { --tone: var(--t-coral); --soft: var(--t-coral-soft); }
.feature .fi { width: 48px; height: 48px; border-radius: 14px; background: var(--soft); color: var(--tone); }
.feature:hover .fi { box-shadow: 0 10px 22px color-mix(in srgb, var(--tone) 30%, transparent); }
.price { box-shadow: var(--shadow); border-color: #e6efea; }
.price.hot { background: linear-gradient(160deg, #2bd4ae, #0d9d80); color: #fff; border-color: transparent; }
.price.hot h3, .price.hot .amt, .price.hot li, .price.hot .ico { color: #fff; }
.price.hot small { color: rgba(255, 255, 255, .8); }
.price.hot .btn.primary { background: #fff; color: var(--accent-ink); box-shadow: 0 8px 18px rgba(0, 0, 0, .12); }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1040px) { .grid4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid4 { grid-template-columns: 1fr; } }
.price-note { text-align: center; color: var(--fg-3); margin-top: 18px; font-size: 14px; }
.chat { box-shadow: var(--shadow-lift); border-color: #e6efea; }
.stats-strip > div { background: #fff; }
.marquee-track span { background: #fff; }
.cta-band { background: linear-gradient(120deg, #d4f7ec, #e6f0ff 60%, #f1ebff); border-color: transparent; }
.auth .card, .auth-card { box-shadow: var(--shadow-lift); }

/* floating stickers around the hero chat */
.hero-art { position: relative; justify-self: center; width: 100%; max-width: 460px; }
.sticker { position: absolute; z-index: 2; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: #fff; box-shadow: var(--shadow-lift); animation: float 5s ease-in-out infinite; }
.sticker .ico { width: 26px; height: 26px; }
.sticker.s1 { top: 6%; left: -18px; color: var(--t-green); transform: rotate(-10deg); }
.sticker.s2 { top: 38%; right: -22px; color: var(--t-yellow); animation-delay: -1.6s; }
.sticker.s3 { bottom: 8%; left: -10px; color: var(--t-blue); animation-delay: -3.2s; }
.sticker.s4 { top: -18px; right: 22%; width: 44px; height: 44px; border-radius: 14px; color: var(--t-coral); animation-delay: -2.4s; }
@keyframes float { 0%, 100% { translate: 0 0; rotate: -6deg; } 50% { translate: 0 -12px; rotate: 6deg; } }
@media (max-width: 900px) { .sticker { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .ribbon, .hello .art, .hello .spark, .sticker, .pay-done .burst, .pay-card { animation: none !important; }
  .btn, .pack, .kpi, .ni { transition: none !important; }
}

/* fixes after the first look */
.grid4 .amt small { display: block; margin-top: 2px; }
.sticker.s1 { top: 16%; left: -30px; }
.view { margin-inline: auto; }
.logo-th { color: var(--accent); font-weight: 800; margin-left: -10px; }
.sticker.s2 { top: 66%; right: -26px; }

/* LINE-style chat demo: wallpaper, read receipts, bot avatar, stronger text */
.chat-body { background:
    radial-gradient(circle at 1px 1px, rgba(20, 201, 160, .22) 1.2px, transparent 0) 0 0 / 18px 18px,
    linear-gradient(180deg, #e9fbf4, #eef5ff); border-radius: 16px; padding: 14px 12px 6px; }
.chat-day { width: max-content; margin: 0 auto 12px; padding: 3px 12px; border-radius: 999px; background: rgba(16, 36, 26, .08); color: var(--fg-2); font-size: 11.5px; font-weight: 600; }
.msg { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 12px; }
.msg.me { justify-content: flex-end; }
.msg .bubble, .msg .slip-thumb, .msg .typing { margin: 0; }
.msg .bubble { max-width: 80%; }
.msg.me .bubble { background: #fff; box-shadow: 0 2px 6px rgba(16, 36, 26, .06); }
.msg-meta { font-size: 10.5px; line-height: 1.3; color: var(--fg-3); text-align: right; white-space: nowrap; }
.msg.bot .msg-meta { text-align: left; }
.msg-av { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; align-self: flex-start; background: linear-gradient(135deg, #34dcb6, #0ea888); color: #fff; box-shadow: 0 4px 10px rgba(20, 201, 160, .35); }
.msg-av .ico { width: 15px; height: 15px; stroke-width: 3; }
.bubble.bot { display: grid; gap: 2px; background: #fff; border: 1.5px solid rgba(20, 201, 160, .45); color: var(--fg); font-size: 14px; font-weight: 500; box-shadow: 0 4px 14px rgba(20, 201, 160, .14); }
.bubble.bot b { color: #071a12; font-weight: 700; }
.bubble.bot .b-title { font-size: 15px; color: var(--accent-ink); margin-bottom: 2px; }
.bubble.bot .b-age { color: var(--accent-ink); font-weight: 600; }
.bubble.bot .b-ok { font-style: normal; font-weight: 700; font-size: 12px; color: #fff; background: var(--accent); padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.bubble.bot.warn { background: #fff8e6; border-color: rgba(245, 165, 36, .55); color: #3d2600; }
.bubble.bot.warn .b-title { color: #8a5300; }
.chat-meta { margin: -6px 0 12px 38px; text-align: left; }

/* chat demo: make the "2" in "โอนมาเมื่อ 2 นาทีที่แล้ว" pop */
.b-age .age-n { display: inline-grid; place-items: center; min-width: 26px; height: 26px; margin: 0 4px; padding: 0 6px; border-radius: 999px; background: linear-gradient(135deg, #2dd4ae, #14b892); color: #fff; font-size: 15px; font-weight: 800; line-height: 1; box-shadow: 0 3px 8px rgba(20,201,160,.35); vertical-align: 1px; }

/* bank strip: bank logos from thai-banks-logo (ISC, see static/img/banks/LICENSE-thai-banks-logo.txt),
   round logos, all the same size */
.marquee-track span:has(.bk)::before { display: none; }
.marquee-track .bk { flex: none; display: block; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: var(--c); box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.marquee-track .bk img { display: block; width: 100%; height: 100%; }
.marquee-track span:has(.bk) { padding: 8px 18px 8px 8px; gap: 10px; }

/* public pages share one menu; the page you are on is highlighted */
.nav-links a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); font-weight: 600; }
