/* ARQIV add-on styles for Careful What You Wish For. Loaded after the game stylesheet.
   To roll back, point index.html at the old bundle and delete the two arqiv-fix lines. */

/* Keyboard focus is always easy to see. <main> only takes focus to recover it, so it shows no ring. */
:focus-visible{outline:3px solid #fde68a!important;outline-offset:2px}
main:focus{outline:none!important}

/* No text under 12px. */
[class*="text-[9px]"],[class*="text-[10px]"],[class*="text-[11px]"]{font-size:12px!important;line-height:1.3}

/* Touch targets: 44px. */
button,a[data-arqiv-exit]{min-height:44px!important}
header button,[aria-label^="Close"],[data-aq-overlay] h3+button{min-width:44px!important}

/* Header: the left group may shrink instead of sliding under the right-hand buttons. */
header>div:first-child{min-width:0;flex:1 1 auto}
@media (max-width:430px){
  header{padding-left:6px!important;padding-right:6px!important;gap:6px}
  header>div:first-child{gap:6px!important}
  header>div:last-child{gap:4px!important}
  header>div:first-child>div{padding-left:7px!important;padding-right:7px!important}
  /* Map / Title: icon only, label kept for screen readers */
  header>div:first-child>button>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}
@media (max-width:345px){
  /* coins are also shown in the Bazaar */
  header>div:first-child>div:nth-last-child(2){display:none}
}

/* "Progress saved": on narrow screens it sits at the bottom, clear of the level name. */
@media (max-width:639px){
  .aq-toast{top:auto!important;right:0!important;left:0;bottom:10px;margin:0 auto;width:max-content;max-width:calc(100% - 24px)}
}

/* Map doors: every portrait gets the same box, so the doors line up. */
[data-level]>div:first-child{width:64px!important;height:84px!important;flex:none}
.aq-badge{display:inline-block;margin-top:5px;padding:3px 8px;border-radius:999px;background:#6ee7b7;color:#022c22;
  font:700 12px/1.2 var(--font-sans,ui-sans-serif,system-ui,sans-serif)}

/* Notes, the "No help" tag, the Start again button, and the star rules in How to play. */
.aq-note{margin:0;padding:8px 10px;border-radius:10px;border:1px solid #92400e;background:rgba(69,26,3,.6);color:#fde68a;text-align:left;
  font:600 13px/1.45 var(--font-sans,ui-sans-serif,system-ui,sans-serif)}
.aq-note.aq-good{border-color:#047857;background:rgba(2,44,34,.65);color:#a7f3d0}
.aq-nohelp{flex:none;margin-left:8px;padding:4px 8px;border-radius:999px;border:1px solid #b91c1c;color:#fecaca;white-space:nowrap;
  font:700 12px/1 var(--font-sans,ui-sans-serif,system-ui,sans-serif)}
.aq-btn2{flex:1;min-height:48px;padding:12px;border-radius:12px;border:1px solid #b45309;background:#1c1917;color:#fde68a;cursor:pointer;
  font:700 14px/1.2 var(--font-sans,ui-sans-serif,system-ui,sans-serif)}
.aq-btn2:hover{background:#292524}
.aq-rules{display:flex;flex-direction:column;gap:6px;margin-top:4px;padding-top:10px;border-top:1px solid rgba(180,83,9,.6)}
.aq-rules p{margin:0}

/* Title screen: the six ingredient chips keep their full labels at 12px. */
.title-screen .grid-cols-6>div{padding-left:2px!important;padding-right:2px!important}
.title-screen .grid-cols-6 span{white-space:normal;overflow:visible;text-align:center;letter-spacing:0}
@media (max-width:480px){
  .title-screen .grid-cols-6{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
