/* ============================================================
   GILDED RUIN — TOUCH CORRECTIONS
   Loaded last on every page. Phones and tablets only; a mouse never
   sees any of this.

   Two problems, both found by measuring every page at 320 / 390 / 430:

   1. Controls painted for a cursor. The player button is 22x22, the
      drawer's close is 11x18, footer links are 10-12px tall. They are
      correct as drawings and impossible as thumb targets. Nothing here
      changes how any of them LOOK — an invisible ::after is centred on
      each one and carries the touch, so the art stays exactly as drawn
      and the hit area grows to ~44px underneath it.

   2. The parish sidebar was shrunk to 130px wide with 6.75px links to
      stop it forcing horizontal scroll. It is position:fixed and lives
      off-canvas, so it could never have caused that — and 6.75px is not
      readable by anyone. It is given a usable width and legible type.
   ============================================================ */

@media (hover:none) and (pointer:coarse) {

  /* ---- thumb targets, drawn nowhere, felt everywhere ---- */
  /* Only elements that are position:static need this. `.mk` is already
     absolute and `#coinWrap` already relative — forcing relative on the map
     markers dropped them out of their placement and pushed the page 23px
     wide, so they are deliberately not in this list. */
  .pbtn, .oss-pbtn, .drawer-close, .n-foot a, .work-label,
  .confess-link, .oss-backlink a, .backlink a, .ossv__dot {
    position: relative;
  }
  .pbtn::after, .oss-pbtn::after, .drawer-close::after,
  .mk::after, #coinWrap::after, .ossv__dot::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    min-width: 100%;
    transform: translate(-50%, -50%);
    /* the target only — never a background, never a border */
    background: none;
    pointer-events: auto;
  }
  /* A TEXT LINK GETS REAL HEIGHT, NOT AN OVERLAY. These sit in wrapping rows,
     and a 44px pad centred on one of them reaches over the link on the line
     above — the first version of this made a tap land on the wrong page,
     which is worse than a small target. Padding grows the box honestly and
     the browser lays the rows out around it. */
  .n-foot a, .work-label, .confess-link,
  .oss-backlink a, .backlink a {
    display: inline-block;
    padding-top: 9px;
    padding-bottom: 9px;
  }
  /* the dots sit close together; keep their targets from overlapping */
  .ossv__dot::after { width: 30px; height: 30px; min-width: 0; }

  /* the arrows over the niche are drawn small on a phone; the button
     itself can simply be bigger without moving the art */
  .ossv__ar { min-width: 44px; min-height: 56px; }

  /* the close on the relic sheet is the way out of a full-screen view */
  .oss-pop__x { min-width: 64px; min-height: 40px; }

  /* ---- the coin is a puzzle object: it must stay exactly where it is
     drawn, so it gets height rather than a centred pad ---- */
  #coinWrap::after { width: 46px; height: 46px; }
}

/* ---- the parish footer overflows the phone ----
   On registration.html it lays out at 434px inside a 390px parent. No width,
   min-width or max-width rule matches it and every ancestor measures 390, so
   the width is coming from a descendant's min-content that will not shrink.
   Clamping it to the parent is the honest fix regardless of which child it is:
   a footer has no business being wider than the page. */
@media (max-width: 640px) {
  .parish-footer { max-width: 100%; overflow-wrap: anywhere; }
  .parish-footer .fline { max-width: 100%; overflow-wrap: anywhere; }
}

/* ---- the parish sidebar, at a size a person can read ---- */
@media (max-width: 640px) {
  #parishSidebar { width: 215px; padding: 24px 16px; transform: translateX(-225px); }
  #parishSidebar.open { transform: translateX(0); }
  #parishSidebar h4 { font-size: 12.5px; letter-spacing: 1.1px; margin: 0 0 12px; padding-bottom: 7px; }
  #parishSidebar a { font-size: 12.5px; letter-spacing: .7px; padding: 11px 0; line-height: 1.35; }
  #parishSidebar a:hover { padding-left: 3px; }
  #parishSidebar a.here { padding-left: 7px; }

  /* the scrim behind the open drawer. The page's own rule for this is
     written `#parishSidebar.open)::before` — a stray bracket makes the
     whole selector invalid, so the scrim has never once appeared. */
  body:has(#parishSidebar.open)::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 90;
    pointer-events: none;
  }
}

/* Orpheo, 13 Sep 2026: no white page scroll bar on any site page. Scrolling still works. */
html,body{scrollbar-width:none;-ms-overflow-style:none}
html::-webkit-scrollbar,body::-webkit-scrollbar{width:0;height:0;display:none}

/* 18 Sep 2026, Orpheo, after a white bar turned up on the admin Library's tab
   strip: "get rid of the white bars ... White scroll bars look a bit jarring on
   the black. You can keep it invisible." and "make sure there's no other ones
   like that on the site." The rule above only reaches the PAGE's bar; every
   dark box that scrolls on its own grows its own. Swept every public page for
   overflow:auto/scroll with no scrollbar rule of its own (61 hits), dropped the
   ones already covered (html/body above; .p-drop, the relic panels and the
   Ossuary's own boxes carry their own styled or hidden bars) and the ones on
   parchment (.pg-text, .oss-doc__page - a bar there is grey on cream, not white
   on black, and outside what he asked). What is left is below, and it is all
   black behind: the parish drawer on nine pages, the shop drawer on fifteen, the
   Still Gardens' stone and Register overlays, and the Archivist's message on
   welcome. Each still scrolls by finger and wheel; only the bar is gone.
   confessionals.html had already done #parishSidebar for itself; the shared
   rule makes the other eight match it. Lives here because every real public
   page loads this file last (the-night.html does not, and has no such box). */
#parishSidebar, .drawer-nav, .ov, #bookOverlay, #ghost{scrollbar-width:none;-ms-overflow-style:none}
#parishSidebar::-webkit-scrollbar, .drawer-nav::-webkit-scrollbar, .ov::-webkit-scrollbar,
#bookOverlay::-webkit-scrollbar, #ghost::-webkit-scrollbar{width:0;height:0;display:none}
