/* Mobile layout */
html{ -webkit-text-size-adjust:100% }main,.booklayout>*,section{min-width:0}button,input,select{font:inherit}button{touch-action:manipulation}.table-scroll{width:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mobilebar,.navbackdrop{display:none}td{overflow-wrap:anywhere}.recordgrid p{min-width:0;overflow-wrap:anywhere}
@media(max-width:700px){
body{font-size:14px}.mobilebar{display:flex;position:sticky;top:0;z-index:4;align-items:center;justify-content:space-between;background:#142b4b;color:white;padding:10px 14px;padding-top:max(10px,env(safe-area-inset-top));box-shadow:0 2px 8px #142b4b20}.mobilebar button{background:#29476b;margin:0;min-height:44px}.mobilebar span{font-weight:600;font-size:16px}aside{width:270px;max-width:85vw;height:100dvh;top:0;left:0;z-index:8;transform:translateX(-100%);transition:transform .2s;padding:24px 16px;padding-bottom:env(safe-area-inset-bottom)}body.nav-open aside{transform:translateX(0)}body.nav-open .navbackdrop{display:block;position:fixed;inset:0;background:#0c1b3180;z-index:7}body.nav-open{overflow:hidden}aside>p[style]{position:static!important;margin-top:28px}aside button{min-height:48px}main{margin:0;padding:20px 14px calc(26px + env(safe-area-inset-bottom))}header{gap:10px;align-items:flex-start;flex-direction:column}h1{font-size:22px;line-height:1.4}h2{font-size:18px}header .tag{font-size:12px}small{line-height:1.6}.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0}.card{min-width:0;padding:16px 12px}.card strong{font-size:26px}.card,section{border-radius:10px}section{padding:16px}.space{margin-top:18px}.note{padding:12px;margin:16px 0;overflow-wrap:anywhere}button{min-height:44px;padding:10px 13px;margin:4px 2px;white-space:normal}input:not([type=checkbox]):not([type=radio]),select{max-width:100%;min-height:44px;font-size:16px}section>input,section>select{width:100%;margin:5px 0}label{margin:16px 0;line-height:1.8}label input:not([type=checkbox]):not([type=radio]),label select{display:block;width:100%;margin:6px 0 0}input[type=checkbox]{width:20px!important;height:20px;vertical-align:middle}.field{display:block}.field span{display:block;width:auto;font-weight:600}.field .check{display:inline-block;margin:12px 6px 0 0}table{font-size:13px;min-width:560px;margin-top:12px}td,th{padding:13px 10px}.tag{display:inline-block;white-space:nowrap}.booklayout{display:flex;flex-direction:column;gap:14px}.booknav{display:flex;overflow:auto;gap:8px;padding:10px;max-width:100%;scroll-snap-type:x proximity}.booknav button{flex:0 0 150px;width:150px;margin:0;scroll-snap-align:start}.booknav small{font-size:11px}.record{padding:14px;margin-top:14px}.recordgrid{grid-template-columns:1fr;gap:0}.recordgrid p{margin:8px 0;padding-bottom:10px;border-bottom:1px solid #edf0f5}.empty{padding:35px 10px}.shade{align-items:flex-end}.dialog{width:100%;max-width:100%;height:94dvh;border-radius:16px 16px 0 0;padding:20px 16px calc(24px + env(safe-area-inset-bottom));overscroll-behavior:contain}.dialog>button:first-child{position:sticky;top:0;z-index:1}.dialog input:not([type=checkbox]):not([type=radio]){width:100%}.toast{left:16px;right:16px;bottom:calc(18px + env(safe-area-inset-bottom));padding:14px 18px;text-align:center}.booknav .selected{border:1px solid #246de3} }
@media(prefers-reduced-motion:reduce){aside{transition:none}}
label input[type=checkbox],label input[type=radio]{width:18px;height:18px;flex:0 0 18px;margin:0 8px 0 0;vertical-align:middle}
.export-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;max-width:900px;margin:18px 0 24px}
.export-fields .export-option{display:flex!important;align-items:center;gap:10px;margin:0!important;padding:12px 14px;border:1px solid #dde5ef;border-radius:7px;cursor:pointer;background:#f8fafd;min-height:46px}
.export-option input[type=checkbox]{margin:0;width:18px;height:18px}.export-option:has(input:checked){border-color:#a9c7f5;background:#eef5ff}aside{overflow-x:hidden}header{align-items:flex-start}
@media(max-width:700px){.export-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.export-fields .export-option{padding:12px 10px}}
