/* RansomReady UK: tablet and phone polish. Loaded after each page's own styles.
   Rules here only enlarge tap targets and small text and tidy grids; nothing is redesigned. */

/* ---- Tap targets: at least 44px ---- */
.theme-toggle{width:44px;height:44px}
.menu-btn{min-height:44px}
.brand{min-height:44px}
.sim-btn,.btn,button.btn{min-height:44px}
.sound-toggle{min-height:44px;padding-left:14px;padding-right:14px}
.fcols a{display:flex;align-items:center;min-height:44px;padding:0}
header.top nav a{min-height:44px;display:flex;align-items:center}
@media (min-width:1200px) and (hover:hover) and (pointer:fine){
  /* mouse users on desktop keep the compact footer and nav */
  .fcols a{min-height:0;padding:4px 0;display:block}
  header.top nav a{min-height:0;display:inline-flex}
}
summary{min-height:44px}
details>summary{display:flex;align-items:center}
.sim-dialog button,.sim-dialog [role=button]{min-height:44px}

/* ---- Readable small text (nothing under 12px, labels 13px) ---- */
.fcols h4{font-size:.8125rem}
.ptag{font-size:.78rem}
.label,.cardtop .num,.statsrc,.yr,.src,.src a{font-size:.8125rem}
.status-body b{font-size:.8125rem}
.sim-facts li{font-size:.8125rem}
.sound-toggle,.sound-text{font-size:.8125rem}
th,dt{font-size:.8125rem}
.fine{font-size:.875rem}
footer{font-size:.9rem}

/* ---- Tablet: roomier gutters, two-column card grids that do not leave orphans ---- */
@media (min-width:600px){
  .wrap{padding-left:clamp(20px,4vw,36px);padding-right:clamp(20px,4vw,36px)}
}
@media (min-width:600px) and (max-width:1023px){
  .grid:has(> :nth-child(8):last-child),
  .grid:has(> :nth-child(4):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}
  .fcols{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (min-width:1024px){
  .grid:has(> :nth-child(8):last-child){grid-template-columns:repeat(4,minmax(0,1fr))}
}

/* ---- Phones: keep two footer columns and avoid cramped stat rows ---- */
@media (max-width:599px){
  .fcols{grid-template-columns:repeat(2,minmax(0,1fr))}
  .wrap{padding-left:16px;padding-right:16px}
}
@media (max-height:480px){
  .sim-dialog{max-height:100dvh;height:100dvh;border-radius:0}
  .sim-modal{padding:0}
}
/* Never allow sideways scroll from long words or wide media */
img,svg,video{max-width:100%}
table{max-width:100%}

/* Game overlay: tap targets and short landscape phones */
.sim-opts .relax{min-height:44px}
.sim-opts .relax input{width:22px;height:22px}
.sim-opts .sound-toggle{min-height:44px}
.sim-sound-note{font-size:.8125rem}
@media (max-height:480px){
  .sim-art svg{max-height:84px}
  .sim-left{padding-top:6px}
}

/* Remaining small-text and tap-target fixes */
th,dt,.yr,.src,.src a{font-size:.8125rem!important}
.ptag{font-size:.8rem}
.sechead a,.status a.btn,.emergency a.btn,a.btn{min-height:44px}
.sechead a{display:inline-flex;align-items:center}
.sim-entry .sim-btn{min-height:44px}
input[type=radio],input[type=checkbox]{width:22px;height:22px;flex:0 0 22px;margin:0}
label:has(> input[type=radio]),label:has(> input[type=checkbox]){min-height:44px;display:flex;align-items:center;gap:10px}

.em-strip a{min-height:44px;display:inline-flex;align-items:center;justify-content:center}

/* Game questions use the full modal width; override global h3 text-wrap:balance */
.sim-q,#rgStage h3.sim-q{text-wrap:wrap;max-width:none;width:100%}
