/* หน้าเปิดสมุด /liff/ (TASK-020 ส่วน B) · ค่าสีและขนาดจาก _handoff/content/mock-liff-loading.html
 * หน้าเดียวกันทั้งธีมสว่างและมืด (ไม่มี prefers-color-scheme · ไม่ให้เบราว์เซอร์ทำมืดเอง) · ลดการเคลื่อนไหว = จุดไม่กระพริบ */
:root { color-scheme: only light; }
html, body { margin: 0; min-height: 100%; }
body.liff-open { font-family: 'Anuphan', sans-serif; color: #e9eef5; -webkit-text-size-adjust: 100%;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .035) 0 3px, transparent 3px 7px),
    radial-gradient(120% 80% at 50% 30%, #2a5287 0%, #173156 60%, #10233f 100%) fixed #173156; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lo { min-height: 100vh; min-height: 100svh; box-sizing: border-box; display: grid; grid-template-rows: 1fr auto;
  padding: 24px 24px max(22px, env(safe-area-inset-bottom)); }
.lo-center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px; min-width: 0; }

/* รูปสมุดปิด: ห่วงซ้าย · ป้าย สมุดบันทึก / คนขับแอป · ตรา ใช้ฟรี / ทุกหน้า · จดวันละนาที · มุมพับ */
.lo-book { position: relative; flex: none; width: 228px; height: 300px; border-radius: 6px 16px 16px 6px;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .05) 0 3px, transparent 3px 6px), linear-gradient(160deg, #2b5690, #1b3a66);
  box-shadow: 0 24px 40px -12px rgba(0, 0, 0, .6), inset -6px 0 0 rgba(0, 0, 0, .12), inset 3px 0 0 rgba(255, 255, 255, .08); }
.lo-book::after { content: ""; position: absolute; left: -7px; top: 18px; bottom: 18px; width: 14px;
  background: radial-gradient(circle 4px at 7px 9px, #0e2240 3.5px, transparent 4.2px) 0 0 / 14px 22px repeat-y; }
.lo-rings { position: absolute; left: -13px; top: 16px; bottom: 16px; width: 18px; z-index: 1;
  background: radial-gradient(ellipse 9px 5px at 9px 11px, transparent 5px, #cfd5de 5.2px, #cfd5de 7px, transparent 7.4px) 0 0 / 18px 22px repeat-y; }
.lo-label { position: absolute; left: 26px; right: 30px; top: 34px; background: #fff; border-radius: 8px; padding: 14px 14px 12px; color: #1d2a44; border: 3px solid #dfe6f0; }
.lo-t1 { font-weight: 600; font-size: 25px; line-height: 1; }
.lo-t2 { font-weight: 600; font-size: 15px; margin-top: 4px; }
.lo-line { height: 1px; margin-top: 12px; background: repeating-linear-gradient(90deg, #b8c3d4 0 4px, transparent 4px 7px); }
.lo-stamp { position: absolute; top: -22px; right: -30px; width: 62px; height: 62px; box-sizing: border-box; border-radius: 50%; background: #ffd166; color: #173156;
  display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(-12deg); box-shadow: 0 6px 12px rgba(0, 0, 0, .35); border: 3px solid #fff; }
.lo-stamp::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; border: 1.3px dashed rgba(23, 49, 86, .55); }
.lo-stamp b { font-weight: 600; font-size: 17px; line-height: 1; }
.lo-stamp i { font-style: normal; font-weight: 600; font-size: 9.5px; margin-top: 2px; }
.lo-tag { position: absolute; left: 26px; bottom: 26px; font-weight: 600; font-size: 15px; color: #ffd166; }
.lo-flip { position: absolute; right: 0; bottom: 0; width: 34px; height: 34px; border-radius: 0 0 16px 0;
  background: linear-gradient(135deg, transparent 50%, rgba(255, 255, 255, .16) 50%); }

/* สถานะใต้รูปสมุด (สูงคงที่ ไม่กระโดด) */
.lo-status { display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: 112px; max-width: 100%; text-align: center; }
.lo-status p { margin: 0; }
.lo-dots { display: flex; gap: 9px; }
.lo-dots span { width: 10px; height: 10px; border-radius: 50%; background: #ffd166; animation: lo-blink 1.2s ease-in-out infinite; }
.lo-dots span:nth-child(2) { animation-delay: .2s; }
.lo-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes lo-blink { 0%, 100% { opacity: .3; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .lo-dots span { animation: none; }
  .lo-dots span:nth-child(2) { opacity: .6; }
  .lo-dots span:nth-child(3) { opacity: .3; }
}
.lo-msg { font-weight: 600; font-size: 18px; color: #fff; line-height: 1.4; }
.lo-sub { font-weight: 500; font-size: 14px; color: #b9c7da; line-height: 1.55; text-wrap: balance; }
.lo-btn { margin-top: 6px; min-height: 44px; border: 0; background: #e8692b; color: #fff; font: 600 16px/1.2 'Anuphan', sans-serif; border-radius: 12px;
  padding: 12px 34px; box-shadow: 0 3px 0 #a9461a; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lo-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #a9461a; }
.lo-btn:focus-visible { outline: 3px solid #ffd166; outline-offset: 3px; }
[data-state="loading"] .lo-dots { display: flex; }
[data-state="error"] .lo-dots, [data-state="outside"] .lo-dots { display: none; }
[hidden] { display: none !important; }
.lo-foot { margin: 0; padding-top: 16px; text-align: center; font-weight: 500; font-size: 12px; color: #8ea2bf; }
