
:root{
  --red:#f3161d;--red2:#ff2d2d;--navy:#08295f;--text:#10223e;
  --muted:#6d7a91;--bg:#fff9f8;--card:#fff;--line:#e8edf5;--green:#16a34a;
}
*{box-sizing:border-box}html,body{margin:0;padding:0;background:#f5f6f8;color:var(--text);font-family:Arial,Helvetica,sans-serif}
button,input,textarea{font:inherit}
#app{max-width:480px;margin:auto;min-height:100vh;background:var(--bg);position:relative;overflow-x:hidden}
.hidden{display:none!important}
.status{height:28px;background:var(--red);color:white;padding:4px 16px;font-size:12px;display:flex;justify-content:space-between}
.header{background:linear-gradient(145deg,var(--red2),#e00610);color:white;padding:12px 16px 22px;position:sticky;top:0;z-index:8}
.header-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.logo{display:flex;align-items:center;gap:9px;font-weight:800;font-size:24px}
.logo img{width:48px;height:48px;object-fit:contain;background:#fff;border-radius:12px}
.logo b span{color:#fff}.icon-btn{border:0;background:rgba(255,255,255,.16);color:#fff;width:44px;height:44px;border-radius:14px;font-size:22px}
.search{margin:14px 0 0;background:#fff;border-radius:18px;padding:12px 14px;display:flex;gap:8px;box-shadow:0 6px 20px #9e00001a}
.search input{border:0;outline:0;width:100%;font-size:15px}
.content{padding:14px 14px 92px}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.book{background:#fff;border-radius:18px;padding:10px;box-shadow:0 6px 20px #26344510;border:1px solid #f1f2f5}
.cover{height:128px;border-radius:12px;display:flex;align-items:center;justify-content:center;color:white;font-weight:900;text-align:center;font-size:18px;box-shadow:inset 0 0 0 2px #ffffff44}
.book h3{margin:10px 0 4px;font-size:16px;line-height:1.1}
.price{font-weight:800;font-size:22px;margin:4px 0 8px}
.btn{border:0;border-radius:13px;padding:11px 12px;font-weight:800;cursor:pointer}
.btn-red{background:var(--red);color:#fff}.btn-blue{background:#1565d8;color:white}.btn-light{background:#f4f7fb;color:var(--text);border:1px solid #dfe7f1}
.book .btn{width:100%}
.bottom{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(480px,100%);background:#fff;border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(4,1fr);z-index:9;padding:8px 4px max(8px,env(safe-area-inset-bottom))}
.navbtn{background:none;border:0;padding:6px;color:#647086;font-size:12px}.navbtn .ico{display:block;font-size:22px}.navbtn.active{color:var(--red);font-weight:700}
.drawer-mask{position:fixed;inset:0;background:#0007;z-index:19}.drawer{position:fixed;top:0;bottom:0;left:50%;transform:translateX(-240px);width:min(390px,88vw);background:#fff;z-index:20;overflow:auto}
.drawer-head{background:linear-gradient(145deg,#ff2a2a,#d8050f);color:#fff;padding:18px}
.drawer-brand{display:flex;gap:10px;align-items:center}.drawer-brand img{width:58px;height:58px;object-fit:contain;background:white;border-radius:14px}
.wallet{margin:12px 0 0;background:#fff;color:var(--text);border-radius:16px;padding:12px;display:flex;justify-content:space-between;align-items:center}
.menu{padding:8px 14px 18px}.menu button{width:100%;text-align:left;border:0;border-bottom:1px solid #edf0f4;background:#fff;padding:15px 6px;font-size:16px}
.card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px;margin-bottom:12px;box-shadow:0 6px 20px #2634450d}
.title{font-size:26px;font-weight:900;margin:0 0 12px}.sub{color:var(--muted)}
.field{margin:12px 0}.field label{display:block;font-weight:700;margin-bottom:6px}.field input,.field textarea{width:100%;padding:13px;border:1px solid #dce3ec;border-radius:12px;outline:0}
.auth{padding:36px 22px;min-height:100vh;background:linear-gradient(160deg,#fff,#fff8f6)}
.auth-logo{text-align:center;margin-bottom:24px}.auth-logo img{width:120px;height:120px;object-fit:contain}.auth-logo h1{margin:4px 0;color:var(--navy)}
.row{display:flex;gap:10px}.row>*{flex:1}.amounts{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:10px 0}
.pill{padding:10px;border:1px solid #ccd8ea;border-radius:12px;background:#fff;font-weight:700}
.order{border-left:5px solid var(--red)}.badge{display:inline-block;padding:4px 8px;border-radius:999px;background:#eef5ff;color:#185ac2;font-size:12px;font-weight:700}
.toast{position:fixed;left:50%;bottom:90px;transform:translateX(-50%);background:#12213a;color:#fff;padding:12px 16px;border-radius:12px;opacity:0;pointer-events:none;transition:.25s;z-index:50;max-width:90%;text-align:center}
.toast.show{opacity:1}
.splash{min-height:100vh;display:flex;align-items:center;justify-content:center;background:white}.splash img{width:74%;max-width:340px}
.small{font-size:12px;color:var(--muted)}
hr{border:0;border-top:1px solid var(--line);margin:14px 0}
@media(max-width:360px){.grid{grid-template-columns:1fr}.drawer{transform:translateX(-50vw)}}
