@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700&family=Noto+Serif+Thai:wght@400;600&display=swap');
:root{--ink:#30253f;--muted:#857b91;--purple:#865eaa;--soft:#f0e9f7;--paper:#fff;--bg:#fcfafc;--line:#eee8f1;--pink:#f8ebee;--shadow:0 10px 35px #59436e0a}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:17px/1.65 'Noto Sans Thai',Tahoma,sans-serif}a{color:inherit;text-decoration:none}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}button:focus-visible,a:focus-visible{outline:3px solid #c4a4df;outline-offset:3px}button{border:1px solid var(--line);background:var(--paper);color:var(--ink);border-radius:10px;padding:8px 14px}input,textarea,select{border:1px solid #ded5e5;background:var(--paper);color:var(--ink);padding:11px 14px;border-radius:10px;width:100%}textarea{resize:vertical;min-height:120px}label{display:block;font-weight:500;margin:13px 0 6px}h1,h2,h3,h4,p{margin-top:0}h1{font-size:30px;line-height:1.4;margin-bottom:5px}h2{font-size:22px;margin-bottom:14px}h3{font-size:20px}small,.muted{color:var(--muted)}hr{border:0;border-top:1px solid var(--line);margin:20px 0}header{height:85px;padding:12px 30px;display:flex;align-items:center;gap:20px;background:var(--paper);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}.brand{display:flex;align-items:center;color:#64428d;gap:10px;font-family:Georgia,serif;font-size:30px;font-weight:bold;line-height:1.05;white-space:nowrap}.brand svg{width:48px;height:48px}.brand small{display:block;font:11px 'Noto Sans Thai',sans-serif;letter-spacing:3px;text-align:right;color:var(--purple)}.topnav{display:flex;gap:24px;align-items:center;margin-left:16px;font-size:16px;white-space:nowrap}header form{display:flex;align-items:center;margin-left:auto;max-width:300px;flex:1;background:#f8f6fa;border:1px solid #e2dce8;border-radius:12px}header input{border:0;background:transparent;min-width:0;font-size:15px}header form button{border:0;background:transparent;font-size:26px;padding:0 12px}.coin{background:#fff0d8;color:#8a6528;padding:9px 14px;border-radius:9px;white-space:nowrap;font-size:15px}.account{border:1px solid #9874b5;color:var(--purple);padding:7px 15px;border-radius:8px;font-size:15px;white-space:nowrap}.menu-button{display:none}.sidebar{position:fixed;top:85px;bottom:0;left:0;width:195px;border-right:1px solid var(--line);background:var(--paper);padding:22px 15px;z-index:10}.sidebar>a{display:flex;align-items:center;gap:15px;padding:12px;border-radius:9px;font-size:20px;margin-bottom:5px}.sidebar>a span{font-size:16px}.sidebar a.active{color:var(--purple);background:var(--soft);font-weight:600}.sidebar small{padding:0 12px}.side-art{text-align:center;margin-top:80px;color:#b1a0ac;font-family:'Noto Serif Thai',serif}.side-art>span{font-size:100px;color:#cdb8d6;line-height:1.2}.side-art p{font-size:20px;line-height:2}main{margin-left:195px;padding:28px 28px 45px;min-height:calc(100vh - 140px);max-width:1800px}.intro{display:flex;justify-content:space-between;gap:20px;align-items:center;margin:0 12px 18px}.intro p{color:var(--muted);margin:3px 0}.quote{font-family:'Noto Serif Thai',serif;color:#b5a3ad;font-size:16px;font-style:italic;text-align:right}.hero{overflow:hidden;border:1px solid #e7dcee;border-radius:14px;background:radial-gradient(ellipse at 80% 0,#fff9 0,transparent 60%),linear-gradient(110deg,#efdfef,#ede8f7 60%,#dfd3e9);position:relative;display:flex;align-items:center;min-height:280px;padding:35px 6%;isolation:isolate}.hero:before,.hero:after{content:'✿';position:absolute;color:#fff8;font-size:220px;line-height:1;z-index:-1}.hero:before{left:-55px;top:-70px;transform:rotate(15deg)}.hero:after{right:-40px;bottom:-80px;color:#c6afdb66}.hero h2{font:600 clamp(28px,3.5vw,54px)/1.4 'Noto Serif Thai',serif;color:#795191;letter-spacing:-2px;margin-bottom:8px}.hero p{color:#876794;font-size:19px}.primary{display:inline-block;border:0;border-radius:12px;padding:10px 22px;background:linear-gradient(120deg,#ac88ca,#7d54a0);color:white;font-weight:600}.hero-books{margin-left:auto;display:flex;align-items:center;gap:12px;padding:10px 10px 0 35px;transform:rotate(5deg)}.hero-book{width:clamp(65px,8vw,130px);height:190px;border:7px solid #fff;border-right:12px solid #e0d5d9;box-shadow:8px 16px 20px #72588633;display:grid;place-items:center;writing-mode:vertical-rl;font:23px 'Noto Serif Thai',serif;background:linear-gradient(30deg,#b3bdca,#edf2f5);color:#647482}.hero-book:first-child{transform:rotate(-14deg);background:linear-gradient(35deg,#b8a0cb,#f5e3ee);color:#735583}.hero-book:last-child{transform:rotate(8deg);background:linear-gradient(35deg,#b6c5bc,#eff4df);color:#63736c}.categories{display:flex;gap:9px;overflow:auto;padding:15px 0 23px;scrollbar-width:none;justify-content:center}.categories button{white-space:nowrap;border:0;background:var(--pink);color:#876985;border-radius:24px;padding:9px 22px}.categories button.selected{background:#796284;color:white}.section-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px}.section-title a{font-size:15px;color:var(--purple)}.grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:20px}.book{min-width:0}.cover{height:220px;border-radius:12px;position:relative;overflow:hidden;background:linear-gradient(145deg,#d9c7e7,#f3edf5);display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:var(--shadow)}.cover img{width:100%;height:100%;object-fit:cover}.cover .flower{font-size:90px;color:#8f729e;line-height:1.3}.cover .cover-title{font:20px 'Noto Serif Thai',serif;color:#71567e;text-align:center;padding:5px 18px}.book:nth-child(2n) .cover{background:linear-gradient(135deg,#f4dcd8,#cdaaa9)}.book:nth-child(3n) .cover{background:linear-gradient(135deg,#e9edd2,#b9c9b6)}.book:nth-child(4n) .cover{background:linear-gradient(135deg,#e4ecf0,#acbacf)}.tag{position:absolute;top:10px;left:10px;background:#fffdf0e8;color:#7b6653;padding:3px 9px;border-radius:7px;font-size:13px}.book h3{font-size:17px;margin:10px 0 2px;line-height:1.5}.book p{font-size:14px;margin:2px 0;color:var(--muted)}.chip{display:inline-block;background:var(--soft);border-radius:7px;padding:1px 7px;font-size:13px;color:#8c789e}.free-banner{margin:25px 0;background:linear-gradient(100deg,#e4ead7,#f4f5ec,#e3e9d6);padding:18px;border-radius:13px;display:flex;align-items:center;justify-content:center;gap:25px;text-align:center;color:#526c5d}.free-banner strong{font:600 23px 'Noto Serif Thai',serif}.free-banner p{margin:0;font-size:14px}.free-banner>span{font-size:40px}.panels{display:grid;grid-template-columns:1fr 1fr;gap:20px}.panel,.form-panel{border:1px solid var(--line);background:var(--paper);padding:24px;border-radius:16px;box-shadow:var(--shadow)}.panel.warm{background:linear-gradient(120deg,#fff3eb,var(--paper))}.notice{border:1px solid #dfd2e8;background:var(--soft);padding:13px 16px;border-radius:10px;font-size:15px;margin-bottom:18px}.error{background:#fff0f0;color:#a73543;border-color:#f5cbd1}.empty{text-align:center;padding:45px 20px;color:var(--muted);border:1px dashed #dbd1e1;border-radius:14px}.empty strong{display:block;color:var(--ink);font-size:22px;margin-bottom:5px}.row{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:15px 0;border-bottom:1px solid var(--line)}.row:last-child{border:0}.row p{margin:0}.row small{display:block}.actions{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}.form-panel{max-width:580px;margin:20px auto}.wide{max-width:900px}.form-panel h1{font-size:25px}.form-panel button[type=submit]{margin-top:20px;width:100%}.tabs{display:flex;gap:10px;margin-bottom:20px}.tabs button{flex:1}.tabs .selected{background:var(--soft);color:var(--purple)}.detail{display:grid;grid-template-columns:220px 1fr;gap:30px;max-width:1000px}.detail .cover{height:300px}.description{white-space:pre-wrap;color:var(--muted)}.reader{max-width:780px;margin:20px auto;background:var(--paper);padding:40px;border-radius:16px}.reader article{font-size:22px;line-height:2.1;white-space:pre-wrap;overflow-wrap:anywhere}.reader audio{width:100%;margin:20px 0}.balance{font-size:45px;color:#b18235}.bottomnav{display:none}footer{margin-left:195px;padding:20px;text-align:center;color:var(--muted);font-size:14px;border-top:1px solid var(--line)}dialog{border:0;color:var(--ink);background:var(--paper)}#drawer{height:100dvh;max-height:100dvh;width:min(90vw,420px);margin:0 0 0 auto;padding:24px;border-radius:20px 0 0 20px}#drawer::backdrop{background:#26203177}#drawer>a{display:block;padding:14px 8px}#drawer h4{margin:22px 0 4px}.drawer-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px}.drawer-head .brand{font-size:27px}.welcome{background:var(--soft);padding:20px;border-radius:14px}.welcome h3{margin-bottom:5px}.welcome p{font-size:15px;color:var(--muted)}.wallet-link{margin-top:12px;background:#fff1dd;color:#96723e;border-radius:12px}.wallet-link span{float:right}#toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);z-index:100;background:#493451;color:white;border-radius:12px;padding:12px 22px;max-width:90vw;display:none}.dark{--ink:#e8def1;--muted:#b5a7c0;--paper:#29232f;--bg:#211c27;--line:#42374b;--soft:#443451;--pink:#493541}.dark .hero{filter:brightness(.8)}.dark header form{background:var(--soft)}.dark .panel.warm{background:var(--paper)}.dark .brand{color:#c5a1e5}
@media(min-width:1600px){.cover{height:280px}.hero{min-height:340px}}
@media(max-width:1200px){.topnav{gap:14px;margin-left:0}.topnav a:nth-last-child(-n+2){display:none}header{gap:12px;padding:12px 20px}.sidebar{width:175px}main,footer{margin-left:175px}main{padding:24px 20px}.cover{height:180px}.grid{gap:14px}.categories button{padding:8px 16px}.hero-books{gap:5px}.hero-book{height:165px}}
@media(max-width:850px){header{height:76px}.topnav,.sidebar,header .coin,header .account{display:none}.menu-button{display:block;font-size:24px;padding:3px 8px;border:0}.brand{font-size:27px}.brand svg{width:40px}header form{max-width:none}main,footer{margin-left:0}.grid{grid-template-columns:repeat(3,minmax(0,1fr))}.cover{height:240px}.bottomnav{display:flex;position:fixed;bottom:0;left:0;right:0;justify-content:space-around;background:var(--paper);border-top:1px solid var(--line);padding:8px 5px calc(8px + env(safe-area-inset-bottom));border-radius:20px 20px 0 0;z-index:25;box-shadow:0 -5px 25px #5d456912}.bottomnav a{text-align:center;min-width:55px;line-height:1.1;padding:7px 10px;font-size:26px;border-radius:20px}.bottomnav small{display:block;font-size:12px;margin-top:6px}.bottomnav a.active{background:var(--soft);color:var(--purple)}footer{padding-bottom:110px}.quote{display:none}#toast{bottom:100px}.hero-books{padding-left:20px}.hero-book{height:160px;width:85px}.hero-book:last-child{display:none}}
@media(max-width:540px){header{height:118px;padding:14px 18px 57px;gap:10px;flex-wrap:wrap}.brand{font-size:28px}header form{position:absolute;bottom:10px;left:18px;right:18px;height:36px}.menu-button{margin-left:auto}.intro{display:none}main{padding:0 16px 25px}.hero{margin:0 -16px;border-radius:0;min-height:245px;padding:26px 22px}.hero h2{font-size:31px;letter-spacing:-1px;max-width:220px}.hero p{font-size:14px;max-width:200px}.hero .primary{font-size:15px;padding:8px 16px}.hero-books{padding-left:5px;gap:0;margin-right:-20px}.hero-book{width:64px;height:135px;font-size:18px;border-width:4px;border-right-width:8px}.hero-book:nth-child(2){margin-left:-15px;margin-top:45px}.categories{justify-content:flex-start;padding:14px 0 18px;margin-right:-16px}.categories button{font-size:14px;padding:7px 17px}.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 14px}.cover{height:190px}.cover .flower{font-size:70px}.cover .cover-title{font-size:19px}.book h3{font-size:16px}.section-title h2{font-size:22px}.section-title a{font-size:14px}.free-banner{padding:17px 10px;gap:10px}.free-banner strong{font-size:20px}.free-banner>span{font-size:27px}.panels{grid-template-columns:1fr}.panel{padding:20px}.form-panel{padding:22px 18px;margin-top:20px}.detail{grid-template-columns:110px 1fr;gap:18px;padding-top:25px}.detail .cover{height:160px}.detail h1{font-size:23px}.detail .flower{font-size:45px}.reader{padding:25px 15px}.reader article{font-size:20px}.reader h1{font-size:24px}.page-heading{padding-top:25px}.actions button,.actions a{font-size:15px}}

.check-label{display:flex;align-items:flex-start;gap:10px;font-weight:400}.check-label input{width:20px;height:20px;flex:none;margin-top:4px;accent-color:var(--purple)}

/* Translator verification */
.kyc-form{display:grid;gap:20px;max-width:1040px;margin:auto}.kyc-form .panel{padding:28px}.kyc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.kyc-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.kyc-steps{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 24px}.kyc-steps span,.kyc-badge{display:inline-block;padding:8px 16px;border-radius:24px;background:#eee8fa;color:#6b4a94;font-size:16px}.kyc-steps .selected{background:#7955a4;color:white}.kyc-badge.approved{background:#e0f3e9;color:#256448}.kyc-badge.changes_requested{background:#fff0de;color:#8a4e12}.kyc-upload{border:1px dashed #b8a1ce;border-radius:16px;padding:18px}.kyc-upload small{display:block;margin:8px 0}.kyc-preview{display:block;margin-top:14px;text-align:center;color:#777;overflow:hidden}.kyc-preview img{max-width:100%;max-height:580px;object-fit:contain;border-radius:8px}.kyc-data{display:grid;grid-template-columns:1fr 1fr;gap:18px}.kyc-data dt{font-size:15px;color:#80738d}.kyc-data dd{margin:5px 0;white-space:pre-wrap;overflow-wrap:anywhere}.kyc-form textarea{min-height:100px}.kyc-form h2{margin-bottom:18px}@media(max-width:680px){.kyc-grid,.kyc-grid.three,.kyc-data{grid-template-columns:1fr}.kyc-form .panel{padding:18px}.kyc-steps{gap:6px}.kyc-steps span{padding:7px 10px;font-size:14px}}

/* Footer and public service terms */
.site-footer p{margin:0 0 10px}.site-footer p:last-child{margin-bottom:0}.site-footer nav{display:flex;justify-content:center;gap:10px 24px;flex-wrap:wrap;margin:12px 0}.site-footer nav a{color:var(--purple);padding:6px 0;text-decoration:underline;text-underline-offset:4px;font-size:15px}.site-footer nav a:hover{color:var(--ink)}
.legal-page{scroll-behavior:smooth}.legal-page .legal-header{justify-content:space-between;gap:16px}.legal-back{color:var(--purple);font-size:16px}.legal-page .legal-main{max-width:1150px;margin:0 auto;padding:48px 28px 64px}.legal-intro{padding-bottom:16px}.legal-intro h1{font-size:clamp(26px,4vw,38px);margin-bottom:16px}.legal-intro p{color:var(--muted);margin-bottom:8px}.legal-intro .legal-eyebrow{color:var(--purple);font-size:14px;letter-spacing:1px;font-weight:600}.legal-date{font-size:15px}.legal-notice{padding:16px 20px;background:var(--soft);border:1px solid var(--line);border-radius:12px;font-size:16px}.legal-layout{display:grid;grid-template-columns:235px minmax(0,1fr);gap:30px;align-items:start;margin-top:28px}.legal-toc{position:sticky;top:110px;padding:20px;background:var(--paper);border:1px solid var(--line);border-radius:16px}.legal-toc h2{font-size:18px}.legal-toc a{display:block;font-size:15px;color:var(--muted);padding:9px 0}.legal-toc a:hover{color:var(--purple);text-decoration:underline}.legal-content{background:var(--paper);border:1px solid var(--line);border-radius:16px;padding:30px}.legal-content section{scroll-margin-top:110px;padding-bottom:22px;margin-bottom:26px;border-bottom:1px solid var(--line)}.legal-content section:last-child{padding-bottom:0;margin-bottom:0;border-bottom:0}.legal-content h2{font-size:22px;line-height:1.6}.legal-content p{line-height:1.95;overflow-wrap:anywhere}.legal-details{margin:20px 0 0}.legal-details dt{font-size:15px;color:var(--muted);margin-top:16px}.legal-details dd{margin:4px 0;white-space:pre-wrap;overflow-wrap:anywhere}.legal-placeholder{color:var(--muted);font-style:italic}.legal-page footer{margin-left:0;padding-bottom:28px}.legal-mobile-break{display:none}.legal-skip{position:fixed;top:-100px;left:16px;z-index:100;background:var(--paper);padding:12px}.legal-skip:focus{top:12px}
@media(max-width:760px){.legal-layout{grid-template-columns:1fr;gap:20px}.legal-toc{position:static}.legal-toc a{padding:10px 0}.legal-page .legal-main{padding:28px 16px 40px}.legal-page .legal-header{padding:12px 16px}.legal-content{padding:22px 18px}.legal-content h2{font-size:21px}.legal-page .brand{font-size:26px}.legal-back{font-size:14px}.site-footer nav{gap:6px 18px}.legal-mobile-break{display:block}}
@media(prefers-reduced-motion:reduce){.legal-page{scroll-behavior:auto}}
