/* ==========================================================================
   Gladius Magnatus – Handy & Tablet (für kommzocken.net)
   Wird nach style.css geladen. Am PC (breiter als 850 px) ändert sich nichts.
   ========================================================================== */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
button,select,input{touch-action:manipulation}

@media (max-width:850px){
  body{overflow-x:hidden}

  /* ---------- Kopfzeile: kompakt, bleibt oben stehen ---------- */
  .top{position:sticky!important;top:0;z-index:40!important;height:auto!important;min-height:0!important;
    padding:6px 8px 6px 10px!important;display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:6px 8px!important}
  .brand-block{flex:1 0 34%!important;min-width:0!important;gap:0!important}
  .brand{font-size:17px!important;line-height:1.05!important;letter-spacing:1px}
  .brand-sub{font-size:12px!important;margin-top:1px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:46vw}
  .brand-meta{display:none!important}
  .top-stats{display:contents!important}
  .top-stat{order:3;flex:1 1 21%!important;min-width:0!important;height:auto!important;padding:5px 6px!important;
    display:flex!important;flex-flow:row wrap!important;align-items:center!important;justify-content:center!important;column-gap:4px;
    border:1px solid #6b461e!important;border-radius:4px;background:rgba(0,0,0,.22)}
  .top-stat>span{font-size:14px!important;line-height:1}
  .top-stat b{font-size:14px!important;line-height:1.15;white-space:nowrap}
  .top-stat small{flex-basis:100%;text-align:center;font-size:10px!important;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
  .top-next-day{order:1;height:38px!important;min-width:0!important;padding:0 12px!important;border-radius:4px;border:1px solid #b57b37!important;font-size:13px!important}
  .top-next-day span{display:inline!important}
  .top-icon{order:2;height:38px!important;min-width:38px!important;width:38px!important;padding:0!important;border-radius:4px}

  /* ---------- Navigation: eine Zeile zum Wischen ---------- */
  .layout{display:block!important;min-height:0!important}
  nav#nav{position:sticky!important;top:var(--gm-top-h,96px);z-index:35;display:flex!important;flex-wrap:nowrap!important;gap:6px!important;
    overflow-x:auto!important;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none;
    padding:6px 8px!important;margin:0!important;border-right:0!important;border-bottom:2px solid #6d4820!important}
  nav#nav::-webkit-scrollbar{display:none}
  nav#nav:before,nav#nav .nav-title{display:none!important}
  nav#nav button{flex:0 0 auto!important;min-width:0!important;width:auto!important;margin:0!important;padding:9px 12px!important;font-size:14px!important;white-space:nowrap}

  /* ---------- Inhalt ---------- */
  .main{padding:10px 10px 28px!important;min-width:0}
  .main h1{font-size:22px!important;white-space:normal!important;overflow-wrap:anywhere}
  .main h2{font-size:18px}
  .between{flex-wrap:wrap!important}
  .between>*{min-width:0}
  .grid,.market-grid,.facility-grid,.settings-grid{grid-template-columns:1fr!important}
  .card{min-width:0!important}
  table{display:block;max-width:100%;overflow-x:auto}
  img,svg,canvas{max-width:100%}

  /* ---------- Dialoge: volle Breite, gut schließbar ---------- */
  .modal{padding:8px!important;align-items:flex-start!important}
  .modalbox{max-height:calc(100vh - 16px)!important;max-height:calc(100dvh - 16px)!important;padding:12px!important;border-radius:6px!important}
  .modalbox .close{position:sticky;top:0;z-index:5;min-width:40px;min-height:40px}
  .fightcanvas{height:300px!important}
  .wheel{width:min(300px,78vw)!important;height:min(300px,78vw)!important}

  /* ---------- Basar: zwei Karten nebeneinander ---------- */
  .gm149-bazaar-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}

  /* ---------- Weltkarte: Städte untereinander statt frei positioniert ---------- */
  .roman-map{height:auto!important;min-height:0!important;padding:46px 0 12px!important}
  .roman-map .map-city,.map-city{position:relative!important;left:auto!important;top:auto!important;right:auto!important;
    display:block!important;margin:8px 12px 0!important;width:calc(100% - 24px)!important;min-width:0!important;transform:none!important}
}

@media (max-width:520px){
  .top-stat small{display:none!important}
  .top-stat b{font-size:13px!important}
  .top-next-day{padding:0 10px!important}
}

@media (min-width:521px) and (max-width:850px){
  .brand-block{flex-basis:60%!important}
}

/* ---------- Design der Vorlage auf Handy und Tablet ---------- */
@media (max-width:850px){
  .top{min-height:0!important;padding:6px 8px!important}
  .top .brand-block{padding-left:0;gap:8px!important}
  .gm-spqr{width:34px;height:44px}
  .top .brand{font-size:15px!important;-webkit-line-clamp:1}
  .top .brand-sub{font-size:11px!important}
  .gm-lanista{display:none}
  .top-stat{min-width:0!important;padding:4px!important;gap:5px!important;flex-flow:row nowrap!important}
  .top-stat .top-ic{width:22px;height:22px;padding:2px}
  .top-stat b{font-size:13px!important}
  .top-next-day{margin:0!important}
  .top-icon{order:2;margin:0!important;width:38px!important;min-width:38px!important}
  .top-icon .gm-ic{width:20px;height:20px}
  .gm-ti-ludus,.gm-ti-offer{display:none!important}
  .gm-nav-vignette{display:none}
  nav#nav .gm-nav-btn{width:auto!important;margin:0!important;padding:7px 10px!important;font-size:14px!important;gap:6px}
  nav#nav .gm-nav-btn .nav-ic{width:22px;height:22px;padding:2px}
  .gm-roster-page{grid-template-columns:1fr!important}
  .gm-right-col{display:flex!important;grid-column:auto!important}
  .gm-roster-list{min-height:0}
  .gm-figure-wrap{height:min(300px,70vw)}
  .gm-stage{grid-template-columns:62px 1fr 62px;gap:6px;padding:4px 6px 8px}
  .gm-slot-box{width:52px;height:52px}
  .gm-stat{font-size:13px;padding:5px 7px}
  .gm-bottom-bar{position:sticky;bottom:0;z-index:30;grid-template-columns:repeat(5,1fr)}
  .gm-bottom-bar button{flex-direction:column;gap:3px;padding:7px 2px!important;font-size:11px}
  .gm-bottom-bar .bar-ic{width:24px;height:24px}
  .gm-detail-title .gm-mini-btn{right:6px}
}
@media (max-width:520px){
  .top-stat .top-ic{display:none}
  .gm-detail-title{font-size:13px!important;letter-spacing:1px!important}
}
