/* memna.app/blog — redesign 12 Nov (Phu: "เพลนมาก", the menu read as plain text).
   Same brand as the home page: Sunny memo cream, cobalt, yellow, sticker mascots. One focal thing per screen:
   the hero (title + mascot) on top, then one featured card or the reading column. Phone first, 18px Thai body. */
:root{--paper:#fff9ef;--sheet:#fffefa;--ink:#1f2a44;--soft:#56637c;--line:#eadfca;--blue:#2457e6;--blue-ink:#1d47bf;--blue-deep:#1a3fb0;
  --sky:#e8f0ff;--yellow:#ffd84d;--yellow-deep:#c99a12;--memo:#fff3cf;--line-green:#06c755;--chat:#d9f7c8}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;scroll-padding-top:84px}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
body{margin:0;background:var(--paper);color:var(--ink);font:18px/1.85 Anuphan,sans-serif}
a{color:var(--blue-ink);text-underline-offset:4px}
a:focus-visible,button:focus-visible,pre:focus-visible{outline:3px solid var(--blue);outline-offset:3px;border-radius:8px}
img{max-width:100%;height:auto}
picture{display:block}
.bl-wrap{width:min(760px,calc(100% - 32px));margin:0 auto}
.bl-skip{position:absolute;left:-999px}.bl-skip:focus{left:12px;top:12px;background:#fff;padding:8px 12px;z-index:9}

/* reading progress: a yellow line on the header's edge (browsers without scroll timelines simply don't show it) */
.bl-progress{position:fixed;inset:0 0 auto;height:4px;z-index:5;background:var(--yellow);transform-origin:0 50%;transform:scaleX(0)}
@supports (animation-timeline:scroll()){.bl-progress{animation:bl-grow linear both;animation-timeline:scroll(root)}}
@keyframes bl-grow{to{transform:scaleX(1)}}
@media(prefers-reduced-motion:reduce){.bl-progress{display:none}}

/* header: the menu items are tabs you can see you can press; the page you are on is filled */
.bl-top{background:var(--blue);color:#fff;position:sticky;top:0;z-index:4;box-shadow:0 2px 0 #0000000f}
.bl-nav{height:64px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.bl-brand{display:flex;align-items:center;gap:8px;color:#fff;text-decoration:none;font:800 22px/1 Prompt,sans-serif}
.bl-brand img{width:40px;height:40px}
.bl-nav nav{display:flex;align-items:center;gap:6px}
.bl-tab{color:#fff;text-decoration:none;min-height:44px;display:inline-flex;align-items:center;padding:0 14px;border-radius:999px;
  font-weight:600;font-size:16px;background:#ffffff1f;box-shadow:inset 0 0 0 1.5px #ffffff59;transition:background .15s,box-shadow .15s}
@media (hover:hover) and (pointer:fine){.bl-tab:hover{background:#ffffff38;box-shadow:inset 0 0 0 1.5px #fff}}
.bl-tab[aria-current]{background:#fff;color:var(--blue-ink);box-shadow:none}
.bl-add{min-height:44px;display:inline-flex;align-items:center;padding:0 16px;border-radius:999px;background:var(--yellow);color:#0e1a3a;
  text-decoration:none;font:700 16px/1 Prompt,sans-serif;box-shadow:0 3px 0 var(--yellow-deep)}
.bl-add:active,.bl-tab:active{transform:translateY(2px)}

/* hero band: title on the left, a moving sticker on the right, like the home page */
.bl-hero{background:linear-gradient(180deg,var(--sky),var(--paper));border-bottom:1px solid #dfe7fb}
.bl-hero-in{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px 20px;padding:22px 0 26px}
.bl-hero-pic img{width:168px;height:168px;filter:drop-shadow(0 8px 14px #2457e62e)}
.bl-kicker{margin:0;font-weight:700;color:var(--blue-ink);font-size:16px;letter-spacing:.01em}
.bl-crumb{font-size:15px;color:var(--soft);display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.bl-crumb a{color:var(--soft);min-height:32px;display:inline-flex;align-items:center}
h1{font:800 clamp(28px,6.2vw,42px)/1.3 Prompt,sans-serif;letter-spacing:-.01em;margin:8px 0 10px;text-wrap:balance}
.bl-lead{color:var(--soft);margin:0;font-size:18px;max-width:34em}
.bl-chips{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 0;padding:0}
.bl-chip{display:inline-flex;align-items:center;min-height:28px;padding:0 12px;border-radius:999px;background:var(--blue);color:#fff;font-size:14px;font-weight:600;line-height:1}
.bl-chip-soft{background:#fff;color:var(--soft);box-shadow:inset 0 0 0 1px var(--line)}
.bl-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 14px;color:var(--soft);font-size:15px;margin:0}
.bl-meta img{width:32px;height:32px;border-radius:50%;background:#fff;box-shadow:0 0 0 2px #fff}
.bl-by{font-weight:600;color:var(--ink)}

.bl-main{padding:24px 0 8px}

/* article body */
.bl-toc{background:var(--sheet);border:1px solid var(--line);border-radius:18px;padding:14px 18px 10px;margin:0 0 8px}
.bl-toc p{margin:0;font:700 16px/1.6 Prompt,sans-serif;color:var(--soft)}
.bl-toc ol{margin:4px 0 0;padding-left:22px;font-size:16px}
.bl-toc li{padding:2px 0}
.bl-toc a{color:var(--ink);text-decoration-color:#c9d6f5}
@media (hover:hover) and (pointer:fine){.bl-toc a:hover{color:var(--blue-ink)}}
article h2{font:700 clamp(21px,4.6vw,26px)/1.45 Prompt,sans-serif;margin:40px 0 6px;text-wrap:balance}
article h2.bl-num{display:flex;gap:12px;align-items:flex-start}
article h2.bl-num>span:last-child{flex:1}
.bl-badge{flex:none;width:40px;height:40px;border-radius:12px;background:var(--yellow);color:#0e1a3a;display:grid;place-items:center;
  font:800 22px/1 Prompt,sans-serif;box-shadow:0 3px 0 var(--yellow-deep);margin-top:-1px}
.bl-vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
article p{margin:12px 0 0}
.bl-more{margin-top:30px;padding:14px 16px;background:var(--sheet);border:1px solid var(--line);border-radius:14px;font-size:16px}

/* template: looks like the message it becomes in a LINE group */
.bl-tpl{margin:16px 0 0;background:#8ca5cf;border-radius:20px;overflow:hidden;box-shadow:0 6px 18px #2457e61f}
.bl-tpl-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 8px 8px 16px;background:#7591c2;color:#fff;font-size:15px;font-weight:600}
.bl-copy{min-height:44px;padding:0 18px;border:0;border-radius:999px;background:var(--yellow);color:#0e1a3a;font:700 16px/1 Prompt,sans-serif;cursor:pointer;
  box-shadow:0 3px 0 var(--yellow-deep);flex:none}
.bl-copy:active{transform:translateY(2px);box-shadow:0 1px 0 var(--yellow-deep)}
.bl-chat{padding:16px 16px 18px 40px}
.bl-chat pre{position:relative;margin:0 0 0 auto;max-width:520px;padding:12px 16px;background:var(--chat);border-radius:18px 4px 18px 18px;
  font:500 17px/1.75 Anuphan,sans-serif;color:#10220a;white-space:pre-wrap;word-break:break-word;user-select:all;-webkit-user-select:all}

/* end: one strong blue band with the mascot and the add-friend button */
.bl-end{margin:44px 0 8px;display:flex;gap:18px;align-items:center;padding:22px 24px;background:var(--blue);color:#fff;border-radius:24px;
  box-shadow:0 10px 24px #2457e633}
.bl-end-pic img{width:120px;height:120px;flex:none}
.bl-end p{margin:4px 0 0;color:#e6eeff}
.bl-end-h{font:800 22px/1.4 Prompt,sans-serif;margin:0!important;color:#fff!important}
.bl-end-act{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px;margin-top:14px}
.bl-btn{display:inline-flex;align-items:center;justify-content:center;min-height:52px;padding:0 24px;border-radius:999px;background:var(--yellow);color:#0e1a3a;
  font:700 18px/1 Prompt,sans-serif;text-decoration:none;box-shadow:0 4px 0 var(--yellow-deep)}
.bl-btn:active{transform:translateY(3px);box-shadow:0 1px 0 var(--yellow-deep)}
.bl-link{font-weight:600;min-height:44px;display:inline-flex;align-items:center;color:#fff}

/* list: the newest article is the one big card with a picture panel; older ones are light rows */
.bl-list{list-style:none;margin:0;padding:0;display:grid;gap:14px}
.bl-list a{display:block;color:var(--ink);text-decoration:none;background:#fff;border:1px solid var(--line);border-radius:22px;overflow:hidden;
  transition:transform .18s,box-shadow .18s,border-color .18s}
@media (hover:hover) and (pointer:fine){.bl-list a:hover{transform:translateY(-3px);box-shadow:0 12px 26px #2457e621;border-color:#b9cdfa}}
@media(prefers-reduced-motion:reduce){.bl-list a{transition:none}@media (hover:hover) and (pointer:fine){.bl-list a:hover{transform:none}}}
.bl-feat a{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr)}
.bl-card-pic{position:relative;background:linear-gradient(160deg,#cfe0ff,#8ca5cf);padding:20px 16px 0;display:flex;flex-direction:column;gap:8px;min-height:230px}
.bl-bubble{align-self:flex-start;max-width:90%;background:#fff;border-radius:4px 16px 16px 16px;padding:8px 12px;font-size:15px;line-height:1.5;box-shadow:0 2px 0 #0000000d}
.bl-bubble-me{align-self:flex-end;background:var(--chat);border-radius:16px 4px 16px 16px;font-weight:600}
.bl-card-st{margin-top:auto;align-self:center}
.bl-card-st img{width:120px;height:120px;display:block}
.bl-card-txt{padding:20px 22px}
.bl-list h2{font:700 22px/1.45 Prompt,sans-serif;margin:10px 0 0;color:var(--ink);text-wrap:balance}
@media (hover:hover) and (pointer:fine){.bl-list a:hover h2{color:var(--blue-ink)}}
.bl-list p{margin:8px 0 0;font-size:16px;color:var(--soft);line-height:1.75}
.bl-card-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:16px;flex-wrap:wrap}
.bl-date{font-size:14px;color:var(--soft)}
.bl-go{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 18px;border-radius:999px;background:var(--blue);color:#fff;font-weight:700;font-size:16px}
.bl-row .bl-card-txt{padding:16px 20px}
.bl-row h2{font-size:19px}

.bl-foot{border-top:1px solid var(--line);margin-top:40px;padding:22px 0 34px;font-size:15px;color:var(--soft)}
.bl-foot .bl-wrap{display:flex;flex-wrap:wrap;gap:6px 18px}
.bl-foot a{color:var(--soft);min-height:44px;display:inline-flex;align-items:center}
.bl-foot p{width:100%;margin:6px 0 0}

@media(max-width:640px){
  .bl-feat a{grid-template-columns:1fr}
  .bl-card-pic{min-height:0;padding:16px 16px 0}
  .bl-card-st img{width:96px;height:96px}
  /* on a phone the title gets the full width; the sticker sits small in the top corner */
  .bl-hero-in{position:relative;display:block;padding:14px 0 20px}
  .bl-hero-pic{position:absolute;top:4px;right:-4px}
  .bl-hero-pic img{width:76px;height:76px}
  .bl-hero-in>div{padding-right:0}
  .bl-hero-in .bl-kicker,.bl-hero-in .bl-crumb{min-height:40px;padding-right:84px}
  .bl-hero-list h1{padding-right:72px}
  .bl-end{flex-direction:column;align-items:flex-start;padding:20px}
  .bl-end-pic img{width:96px;height:96px}
  .bl-chat{padding-left:24px}
}
@media(max-width:420px){
  .bl-brand{font-size:19px}.bl-brand img{width:34px;height:34px}
  .bl-tab{padding:0 11px;font-size:15px}.bl-add{padding:0 12px;font-size:15px}
  .bl-nav nav{gap:4px}
}
@media(max-width:360px){.bl-tab:first-child{display:none}}
.nw{white-space:nowrap}
article .bl-ul{margin:12px 0 0;padding-left:1.25em}article .bl-ul li{margin:0 0 10px;padding-left:2px}article .bl-ul li::marker{color:var(--blue)}article strong{font-weight:600;color:var(--ink)}
