/*
 * ARHDOM / Release 1 / 2026-10-30
 * Mobile and tablet usability corrections.
 * Overlay only: no changes to the original artistic system.
 */

/* Accessible compact wayfinding, without competing with the desktop header. */
.arh-r1-quicknav {display:none;}
@media (max-width:720px) {
  .arh-r1-quicknav{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:6px;
    padding:8px 12px 10px;
    background:#101719;
    border-top:1px solid rgba(224,199,151,.2);
    border-bottom:1px solid rgba(224,199,151,.35);
    font:600 12px/1.3 Arial, sans-serif;
    position:relative;
    z-index:8;
  }
  .arh-r1-quicknav a{
    color:#e4d4b7;
    min-height:44px;
    min-width:0;
    text-decoration:none;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    padding:8px 5px;
    border:1px solid rgba(224,199,151,.25);
    border-radius:4px;
  }
  body .arh-r1-quicknav a:last-child{display:flex;}
  .arh-r1-quicknav a:focus-visible,
  .arh-r1-quicknav a:hover{
    border-color:#ead3a3;
    background:rgba(226,194,135,.12);
    outline-offset:2px;
  }
}

/* Gallery route: readable progress and 44px minimum touch targets.
   Horizontal scroll is intentional; 11 rooms cannot fit on a 320px row. */
@media (max-width:900px){
  #gallery .g-route{
    position:sticky;
    top:0;
    z-index:27;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:5px 10px;
    padding:8px 14px 7px;
    background:rgba(22,24,24,.97);
    min-height:105px;
  }
  #gallery .g-route-caption{
    display:block;
    max-width:100%;
    font:600 10px/1.4 Arial,sans-serif;
    letter-spacing:.13em;
    color:#d8c5a9;
    align-self:center;
  }
  #gallery .g-current{
    display:block;
    font:16px/1.3 Georgia,serif;
    color:#ead6ae;
    justify-self:end;
    align-self:center;
  }
  #gallery .g-end-nav{display:none;}
  #gallery .g-route-list{
    grid-column:1 / -1;
    display:flex;
    flex-wrap:nowrap;
    align-items:center;
    justify-content:flex-start;
    gap:7px;
    width:100%;
    max-width:100%;
    min-width:0;
    margin:0;
    padding:1px 0 5px;
    overflow-x:auto;
    overflow-y:hidden;
    scroll-padding-inline:10px;
    scroll-behavior:smooth;
    scrollbar-width:thin;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-x;
  }
  #gallery .g-route-list a{
    flex:0 0 44px;
    width:44px;
    height:44px;
    min-width:44px;
    min-height:44px;
    font:600 13px/1 Arial,sans-serif;
    border-color:rgba(219,198,160,.37);
    border-radius:50%;
  }
  #gallery .g-route-list a:focus-visible{
    outline:2px solid #f2d39b;
    outline-offset:2px;
  }
  #gallery .g-room{scroll-margin-top:125px;}
  #gallery #gallery-end{scroll-margin-top:120px;}
}

/* The typographic etude and workshop must wrap rather than widen the viewport. */
@media (max-width:560px){
  .workshop-layout,
  .workshop-layout > *,
  .process-nav,
  .etudes-stage,
  .etudes-canvas,
  .etude-panel,
  .type-play,
  .type-play > div{
    min-width:0;
    max-width:100%;
    box-sizing:border-box;
  }
  .process-nav{
    width:100%;
    grid-template-columns:repeat(2,minmax(0,1fr));
    column-gap:10px;
  }
  .process-nav button{
    min-width:0;
    max-width:100%;
    gap:7px;
    padding-inline:1px;
    font-size:clamp(17px,5.2vw,25px);
    overflow-wrap:anywhere;
  }
  .process-nav button span{font-size:clamp(15px,4.5vw,20px);}
  .type-play{
    width:100%;
    grid-template-columns:minmax(0,1fr);
    overflow:hidden;
  }
  .type-play > div{width:100%;padding:clamp(12px,4vw,24px);}
  .type-play .word{
    display:block;
    max-width:100%;
    font-size:clamp(48px,14vw,76px);
    line-height:.9;
    overflow-wrap:anywhere;
  }
  .etude-label{letter-spacing:.1em;overflow-wrap:anywhere;}
  .etude-panel{padding:clamp(12px,4vw,20px);}
  .type-play p{max-width:100%;overflow-wrap:anywhere;}
  .etude-tabs,.etude-tab{min-width:0;}
}

/* At tablet widths, three columns cannot contain the legal/education text. */
@media (min-width:761px) and (max-width:980px){
  .problem-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .problem{min-width:0;}
}
@media (max-width:760px){
  .problem-grid{grid-template-columns:minmax(0,1fr);}
  .problem{min-width:0;}
}

/* Education links need usable tap areas without changing the card treatment. */
@media (max-width:900px){
  .case-card-text a{
    display:inline-flex;
    align-items:center;
    min-height:44px;
    padding:6px 0;
    line-height:1.3;
  }
  .pillnav,
  .hero-cta .btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:44px;
  }
  .form input, .form select{min-height:44px;}
}

/* Motion choice and accessible focus treatment. */
@media (prefers-reduced-motion:reduce){
  #gallery .g-route-list{scroll-behavior:auto;}
  .arh-r1-quicknav a{transition:none;}
}

/* The existing masthead is absolutely positioned on mobile. */
@media (min-width:561px) and (max-width:720px){.arh-r1-quicknav{margin-top:80px;}}
@media (max-width:560px){.arh-r1-quicknav{margin-top:70px;}}
