/* ============================================================
   THE FLIP LAYER — markofthebees.org at flip width
   (Brad, 2026-11-29: the Breezeway and the Hosted Road)

   One additive layer, gated to the KaiOS flip class
   (the 240–320px screens; Brad, 2026-11-29 13:56: the
   breezeway is the flip's alone). The gate is the class
   flip.js sets on <html> after naming the device — UA
   KaiOS, or no coarse pointer at flip width — never the
   width alone (2026-11-30: a smartphone scaled to 290px
   is still a smartphone). Where the class does not hold
   nothing here exists: the smartphone and desktop door
   keep their fan exactly as it is.

   At flip width:
   · NO CURSOR — the browser's pointer hand is never the way
     anything is used; D-pad focus alone walks the page
     (flip.js walks it; this sheet makes focus VISIBLE).
   · THE BREEZEWAY — the honeycomb mound, which smears into
     one blob at 240px, steps aside; in its place the home
     button opens little square portal tiles that fit the
     screen: three, then two, then one — the comb's own
     3-2-1 structure in squares (the comb itself is six
     portals since Maps left the fan, Brad, 2026-11-29).
   · CONTIGUOUS — wide things are reined to the screen, the
     door's swarm rests (no breathing swarm on flip), the
     button's face rests on the house mark, and every page
     stays one D-pad walk from the home button.
   ============================================================ */

  /* No cursor, ever. */
  html.flip * { cursor: none !important; }

  /* Focus is the D-pad's eyes: always visible, bright honey. */
  html.flip a:focus, html.flip button:focus, html.flip input:focus, html.flip select:focus,
  html.flip textarea:focus, html.flip [tabindex]:focus {
    outline: 2px solid #ffd977;
    outline-offset: 2px;
  }

  /* The mound steps aside at flip width... */
  html.flip .homefan .hf-mound { display: none !important; }

  /* ...and the button's face rests on the house mark. */
  html.flip .homefan .hf-face:not(.hf-face-house) { display: none !important; }
  html.flip .homefan .hf-face { animation: none !important; }

  /* The door's swarm rests on flip. */
  html.flip #hiveMagicCanvas, html.flip #quickSwarm, html.flip .quick-swarm { display: none !important; }

  /* The station's comb emblem rests on flip (Brad,
     2026-11-29): the little honeycomb with its breathing
     swarm that heads the radio page doesn't need to exist
     at flip width at all — the page and the hub carry the
     station there. (.face-wrap is the radio page's alone
     in the whole estate, so this rule touches nothing
     else.) */
  html.flip .face-wrap { display: none !important; }

  /* Nothing wider than the little screen. */
  html.flip img, html.flip svg, html.flip video, html.flip table, html.flip pre { max-width: 100% !important; }
  html.flip body { overflow-x: hidden; }

  /* ---------- THE BREEZEWAY ---------- */
  html.flip #flipBreezeway {
    position: absolute; left: 50%; bottom: calc(100% + 6px);
    transform: translateX(-50%);
    width: 228px; max-width: 94vw;
    background: rgba(10, 7, 2, 0.97);
    border: 1px solid rgba(247, 207, 107, 0.55);
    border-radius: 14px;
    padding: 8px;
    z-index: 3;
    visibility: hidden; opacity: 0; pointer-events: none;
    /* No fade: on the flip the panel is simply there or not
       (a transition left it transparent once, on the rig —
       the door's own motion keeps the little CPU busy). */
  }
  html.flip .homefan.open:not(.games):not(.note) #flipBreezeway {
    visibility: visible; opacity: 1; pointer-events: auto;
  }
  html.flip .flip-row { display: flex; gap: 6px; justify-content: center; margin-bottom: 6px; }
  html.flip .flip-row:last-of-type { margin-bottom: 0; }
  html.flip .flip-tile {
    /* Sized to the little screen: three rows of squares
       plus the hub and the radio seat must share 320px
       of height — the square is 17.5vw, capped at 56px. */
    flex: 0 0 auto; width: min(56px, 17vw); height: min(56px, 17vw);
    display: flex; align-items: center; justify-content: center;
    background: rgba(247, 207, 107, 0.07);
    border: 1px solid rgba(247, 207, 107, 0.45);
    border-radius: 12px;
    color: #f7cf6b; text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }
  html.flip .flip-tile svg { width: 58%; height: 58%; }
  html.flip .flip-tile:focus {
    outline: 3px solid #ffd977; outline-offset: 1px;
    background: rgba(247, 207, 107, 0.22);
    box-shadow: 0 0 14px rgba(255, 217, 119, 0.45);
  }
  html.flip .flip-tile.flip-bright { border-color: #ffd977; background: rgba(247, 207, 107, 0.16); }
  html.flip .flip-tile.is-here { box-shadow: inset 0 0 0 2px rgba(255, 217, 119, 0.6); }
  /* The Play breezeway (games) fits the little screen too:
     its cells already un-hex to rounded squares at this
     width (the Hand's own 300px rule); give the surface
     the flip panel's ground and a reachable back key. */
  html.flip .hf-breezeway { padding: 10px 6px; }
  html.flip .hf-breezeway .hf-bw-games { flex-wrap: wrap; justify-content: center; }
  html.flip .hf-breezeway .hf-bw-back:focus {
    outline: 3px solid #ffd977; outline-offset: 1px;
  }

  /* ---------- THE DOOR KEEPS ITS SHAPE (Brad, 2026-11-30
     14:15) ----------
     On the home page the flip drawer is the same drawer
     as everywhere else: the comb's six cells in their own
     arrangement — the mound does NOT step aside here, and
     the tile panel (the inner pages' form, above) never
     stands on the door. This supersedes the 2026-11-29
     breezeway form FOR THE DOOR ONLY; the conflict is
     named in the pass's seal, not hidden. The flip
     differs only in how the room is travelled: D-pad
     focus, and the glow for eyes. */
  html.flip .homefan.hf-door .hf-mound { display: block !important; }
  html.flip .homefan.hf-door #flipBreezeway { display: none !important; }

  /* ---------- QUICK BOXES (Brad, 2026-11-30 14:19) ------
     On the flip, every interactive box wears the same
     quick, focused style — one small box, one focus, the
     glow saying where the walk stands — whether the box
     is a comb cell, a radio hand, a games card or the
     hub. One recipe, every stop on the walk. (Applied
     here to the forms this pass touches; the direction
     is recorded for the other pages' own passes.) */
  html.flip .homefan.hf-door .hf-cell:focus,
  html.flip .homefan.hf-door .homefan-btn:focus,
  html.flip .hf-breezeway .hf-cell:focus,
  html.flip .hf-breezeway .hf-bw-back:focus {
    outline: 3px solid #ffd977; outline-offset: 1px;
    box-shadow: 0 0 16px rgba(255, 217, 119, 0.55);
  }
  html.flip .homefan.hf-door .hf-radio-strip button:focus,
  html.flip .homefan.hf-door .hf-radio-strip a:focus {
    outline: 3px solid #ffd977; outline-offset: 1px;
    box-shadow: 0 0 14px rgba(255, 217, 119, 0.55);
  }

  /* ---------- GAMES DO NOT TRAVEL (Brad, 2026-11-30
     14:19) ---------- the Crossroads door's answer on the
     flip: plain words inside the games breezeway, ghost
     register, kind and final. */
  html.flip .flip-nocompat {
    margin: 10px auto 2px; max-width: 230px;
    text-align: center; font-style: italic;
    font-size: 0.82rem; line-height: 1.5;
    color: rgba(232, 200, 122, 0.62);
  }

  /* ---------- THE FAN FITS THE FLIP (D-pad pass,
     2026-11-30) ----------
     The comb the door keeps at flip width was seated by
     the tall fan's measure: at flip heights its crown
     stood off the top of the screen — a stop the D-pad
     could land on whose glow no eye could see, which
     the Game Boy law forbids. Here the fan reads the
     little screen: it hangs close above the hub, and its
     width is capped by the height actually standing
     above the hub, so the whole comb — crown too —
     stands on screen at the app-true full screen and in
     the browser-cropped window alike. The radio pill,
     whose pillseat dress seats it in the band between
     comb and hub on tall screens, keeps its drawer seat
     below the hub here: at flip heights that band
     cannot hold both the pill and a whole comb, and the
     comb is the door. The phone and desktop fans are
     untouched — this block lives behind the flip class
     alone. */
  html.flip .homefan.hf-door { --hf-gap: 10px; }
  html.flip .homefan.hf-door .hf-mound {
    width: min(94vw, calc((100dvh - 176px) * 1.5205));
  }
  html.flip #homeFan.hf-pillseat .hf-radio-strip {
    top: auto; left: auto;
    right: calc(-50vw + 50% + 1rem);
    bottom: calc(1rem - var(--hf-bottom) + var(--hf-lift, 0px));
    transform: none !important;
    width: auto; max-width: none;
    padding: 0.22rem 0.4rem;
  }
