/* Token Board add-on styles (ARQIV). Loaded after the game stylesheet. */

/* Dialogs: when a card is taller than the screen, keep its top reachable. */
[data-aq-modal]{justify-content:flex-start!important}
[data-aq-modal]>*{margin-top:auto;margin-bottom:auto}
[data-aq-modal] :focus-visible,.aq-tile:focus-visible,.aq-cat:focus-visible,header button:focus-visible,footer button:focus-visible{outline:3px solid #fde047;outline-offset:2px}

[data-aq-modal] [tabindex="-1"]:focus-visible{outline:none}

/* Utility classes the add-on uses that the original stylesheet did not include. */
.bg-amber-500{background-color:#f59e0b}
.bg-amber-950\/60{background-color:rgba(69,26,3,.6)}
.bg-emerald-950\/40{background-color:rgba(2,44,34,.4)}
.border-amber-500\/60{border-color:rgba(245,158,11,.6)}
.border-emerald-500\/50{border-color:rgba(16,185,129,.5)}
.text-amber-200{color:#fde68a}
.justify-end{justify-content:flex-end}
.opacity-40{opacity:.4}
@media (min-width:768px){.md\:p-5{padding:1.25rem}}

/* Board: rows never shrink into each other. On short screens the board scrolls instead. */
.aq-panel{overflow-y:auto!important}
.aq-rows{flex:1 0 auto!important;grid-template-rows:repeat(5,minmax(48px,1fr))!important}
.aq-cat{width:100%;font:inherit;color:inherit}
.aq-cat h3{overflow-wrap:anywhere;hyphens:manual}

/* Phones in portrait: six columns have to fit, so drop the coin icon and tighten the gaps. */
@media (max-width:640px){
  .aq-main{padding-left:4px!important;padding-right:4px!important}
  .aq-panel{padding:6px!important}
  .aq-grid6{gap:4px!important}
  .aq-tile{padding:2px!important}
  .aq-tile img{display:none}
  .aq-tile .aq-val{font-size:clamp(.95rem,4.4vw,1.3rem)!important;letter-spacing:0!important}
  .aq-cat{padding:4px 1px!important}
  .aq-cat h3{font-size:12px!important;text-transform:none;letter-spacing:-.03em;font-weight:700;-webkit-line-clamp:4;line-height:1.15}
}
@media (max-width:380px){
  .aq-main{padding-left:2px!important;padding-right:2px!important}
  .aq-panel{padding:3px!important}
  .aq-grid6{gap:3px!important}
  .aq-cat{padding:4px 0!important;border-width:1px!important}
}

/* Short windows and phones in landscape: slimmer bars leave more room for the board. */
@media (max-height:520px){
  #root header{padding-top:4px!important;padding-bottom:4px!important}
  #root footer{padding-top:4px!important;padding-bottom:4px!important}
  .aq-main{padding-top:4px!important;padding-bottom:4px!important}
  .aq-cat{min-height:44px!important;padding:2px 4px!important}
  .aq-cat>div{display:none}
}

/* Nothing smaller than 12px; setup controls are at least 44px tall. */
.text-\[10px\],.text-\[11px\]{font-size:12px!important;line-height:1.3!important}
@media (pointer:coarse){
  .aq-setup button,.aq-setup select,.aq-setup input{min-height:44px}
  .aq-setup select{padding-top:0;padding-bottom:0}
}

/* Respect "reduce motion": no pulsing, bouncing or sliding. Confetti is switched off in the game code. */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
