/* Build & Write as a bridge (Isaiah 2026-10-27, js/spell.mjs): the letter tiles are the missing planks of a bridge over
   a canyon (assets/bridge/canyon.webp, drawn 40px higher than the stage so the tile row clears the grown-up's tip line);
   the planks' tops are the walkway, level with the cliff tops; the finished word lets the lesson's friend walk across.
   Stage px; the canyon numbers match GAP_L 386 / GAP_R 1232 / CLIFF_Y 378 / DECK_Y 370 in js/spell.mjs. */
.spell.bridge .br-scene { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: #F3A864; }
.spell.bridge .br-bg { position: absolute; left: 0; top: -40px; width: 1600px; height: 940px; object-fit: cover; object-position: 50% 0; } /* (940: covers the 40px it is lifted, every world; the canyon orange showed under the others) */
/* phones: the side bands between the stage and the screen edges get a soft copy of the canyon (css/phone.css pattern) */
html.edge-fill .spell.bridge .br-scene::before { content: ''; position: fixed;
  inset: calc(-20px - var(--edge-t)) calc(-20px - var(--edge-r)) calc(-20px - var(--edge-b)) calc(-20px - var(--edge-l));
  background: var(--br-blur, url(../assets/bridge/canyon-blur.webp)) center 30% / cover no-repeat; filter: blur(6px); }
/* the rails, the end posts and the ready-built boards */
.spell.bridge .br-rope { position: absolute; height: 9px; border-radius: 5px; background: linear-gradient(180deg, #A8733D, #6E4219); box-shadow: 0 3px 0 rgba(40, 20, 0, .25); }
.spell.bridge .br-rope.high { top: 376px; }
.spell.bridge .br-rope.low { top: 540px; }
.spell.bridge .br-board { position: absolute; top: 382px; width: 58px; height: 172px; border-radius: 14px; background: linear-gradient(160deg, #F4D39A, #DDA960); box-shadow: 0 8px 0 #B47F3C, inset 0 0 0 4px rgba(255, 255, 255, .3); }
.spell.bridge .br-post { position: absolute; top: 320px; width: 24px; height: 250px; border-radius: 10px; background: linear-gradient(90deg, #8B5A2B, #5E3814); box-shadow: 0 6px 0 rgba(40, 20, 0, .3); }
/* the planks to build: ghost boards between the rails */
.spell.bridge .sp-slot { top: 370px; height: 186px; background: rgba(255, 248, 230, .6); border: 5px dashed #C9954F; border-radius: 22px; }
.spell.bridge .sp-slot::before, .spell.bridge .sp-slot::after { display: none; }
.spell.bridge .sp-slot.active { background: rgba(255, 255, 255, .85); border: 5px solid #E39B3A; box-shadow: 0 0 0 10px rgba(255, 196, 92, .4); }
.spell.bridge .sp-slot.filled { border-color: transparent; background: transparent; box-shadow: none; }
.spell.bridge .sp-slot.given { background: rgba(255, 248, 230, .75); }
/* the speaker up on the near cliff, the tiles waiting on the sandy ledge below */
.spell.bridge .sp-speaker { left: 52px; top: 216px; width: 150px; height: 150px; border-radius: 36px; }
.spell.bridge .sp-speaker svg { width: 74px; height: 74px; }
.spell.bridge .sp-speaker::after { font-size: 26px; top: calc(100% + 8px); color: #1E3A2C; text-shadow: 0 0 6px #FFFFFF, 0 0 12px #FFFFFF; }
.spell.bridge .sp-tile { top: 576px; } /* clear of the tip line, which wraps to two lines on phones */
/* the friend on the near cliff, walking across the tops of the planks when the bridge is done */
.spell.bridge .br-pal { position: absolute; top: 230px; height: 150px; width: auto; z-index: 6; pointer-events: none; filter: drop-shadow(0 8px 6px rgba(30, 60, 20, .25)); }
/* that friend is already the corner friend: just the one on the bridge here */
.player:has(.spell.bridge) .buddy { display: none; }
/* the grown-up's tip reads on the sand */
.player:has(.spell.bridge) .hint span { background: rgba(255, 255, 255, .94); border-radius: 18px; padding: 4px 16px; line-height: 1.45; -webkit-box-decoration-break: clone; box-decoration-break: clone; } /* every wrapped line gets the backing (phones wrap the tip) */
html.phone .spell.bridge .sp-tile { top: 566px; } /* the phone's bigger grown-up tip is two lines tall */
.spell .sp-tile.quiet { color: #7E9386; } /* a placed silent letter: lighter, like silent letters everywhere (2026-11-03) */
