/* The start page (library), the register, advanced search and statistics on a phone. Their own
   stylesheets already stack the columns below 860px / 760px; this adds what a finger needs:
   bigger targets, fields that do not make iOS zoom in, and nothing wider than the screen.
   (The reader has its own: mobile.css.) */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{overflow-wrap:break-word}
img,svg,canvas,video{max-width:100%}

@media (pointer:coarse){
  /* 16px: iOS Safari zooms into any field with a smaller font, and then the page stays zoomed */
  input,select,textarea{font-size:16px!important}
  .col-h input[type=search],.col-h .order select,.col-h .dimsw select,.regsel,.field select,.field input,.adv input,.adv select{height:44px}
  /* targets of at least 44px */
  .it{padding-top:11px;padding-bottom:11px}
  .it.term{padding-top:10px;padding-bottom:10px}
  .seg a,.seg button{padding:12px 6px;font-size:13px}
  .icon,.icon#theme{min-width:40px;height:40px}
  .btn,.rbtn,.more,.rand-btns button{min-height:44px;display:inline-flex;align-items:center;justify-content:center}
  .rand-btns button{display:flex;justify-content:flex-start}
  .legend button,.stnote button{min-height:40px;padding:7px 9px;margin:-4px -5px}
  .tags a{padding:7px 13px}
  .vnav a{min-width:40px;min-height:40px;display:inline-flex;align-items:center;justify-content:center}
  .cp a{display:inline-block;padding:10px 6px}
  details>summary{padding:10px 0}
  .chk,.edfilter{padding:7px 0}
  .lgd summary{min-height:40px;display:flex;align-items:center;gap:3px}
  .lgd summary .st{margin-left:0}
  .lgd summary .st:first-of-type{margin-left:6px}
  nav.crumbs a{padding:9px 8px}
  .back{padding:9px 0!important}
  .textsearch,.hint .more{padding:8px 4px}
  .row .fl,.row .op{font-size:15px}
}

@media (max-width:860px){
  .det{padding:16px 14px 48px}
  .d-title{font-size:21px}
  .rcard{gap:12px;padding:10px}
  .rcard .tp{width:72px}
  .edcard{padding:12px}
  .grp.letter{font-size:20px}
  dl.meta{grid-template-columns:1fr;gap:0}
  dl.meta dt{margin-top:7px;font-size:12px}
  .adv{padding-left:14px;padding-right:14px}
  .adv .row{grid-template-columns:1fr;gap:4px}
  .adv .row .op{display:none}
  .actions{margin-left:0}
  .panel{padding-left:12px;padding-right:12px}
}
@media (max-width:480px){
  .top{padding-left:10px;padding-right:10px}
  nav.crumbs{padding-left:10px;padding-right:10px}
}

/* The search fields scroll along with the list instead of staying fixed above it: on a phone the
   header of a column (title, search, filters) takes a third of the screen, so the whole column
   scrolls, header and list together. */
/* the browser on a phone: the shield alone and the crumbs on one line, so the header leaves room for the list */
@media (max-width:860px){
  .lx-site:has(#browser:not([hidden])) .brand b{display:none}
  .lx-site:has(#browser:not([hidden])) nav.crumbs{flex-wrap:nowrap;overflow-x:auto;white-space:nowrap;scrollbar-width:none}
  .lx-site:has(#browser:not([hidden])) nav.crumbs a{flex:none}
  .hsep{display:none}
  .lx #home .hero .lead a{display:inline-block;margin-right:14px}
}
@media (max-height:500px){.lx-site:has(#browser:not([hidden])) .lx-util{display:none}}
@media (max-width:860px){
  #browser .col{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  #browser .col-h{flex:none}
  #browser .col-b{flex:none;overflow:visible}
}
@media (max-width:760px){
  /* register: the tree and term lists */
  #side .col{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  #side .col-h{flex:none;overflow:visible}
  #side .col-b{flex:none;overflow:visible}
  /* register: the results; the header with the toolbar and fields scrolls away with them */
  #res{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}
  #res .res-h{max-height:none;overflow:visible}
  #res .cols{flex:1 0 60vh}   /* the columns side by side keep sliding sideways */
  #res .cols.list,#res .cols.cards,#res .cols.books{flex:none;overflow:visible}
}

/* register on a phone: the list of terms (or names, verses) fills the screen until one is chosen,
   then the results do; the crumbs lead back, so no "Boom" button */
@media (max-width:760px){
  .boom{display:none!important}
  body:not(.tree-hidden) #res{display:none}
  body:not(.tree-hidden) #side{flex:1;height:auto;min-height:0;max-width:none;border-bottom:0}
}
