/* Unveil and Stepping stones (glue.js), in the look Michael picked from the prototypes (Nov 8, look A for both):
   Unveil is a phrase card, with the day's painting saved for the solve; Stepping stones is drawn on the day's
   painted path. Both sit in the site's game page (header, Hint, level ring, menu) with the puzzle keys at the
   bottom and the message line under them. On phones the board takes the free height, so nothing scrolls. */
:root{--sa-game-unveil:#f4e1e6;--sa-game-unveil-ink:#7a3550;--sa-game-stones:#dbe8e4;--sa-game-stones-ink:#2c5a52}
.stop-unveil{--tile:var(--sa-game-unveil);--tile-ink:var(--sa-game-unveil-ink)}
.stop-stones{--tile:var(--sa-game-stones);--tile-ink:var(--sa-game-stones-ink)}
.stop-unveil .stop-game-icon{background:var(--sa-game-unveil);color:var(--sa-game-unveil-ink)}
.stop-stones .stop-game-icon{background:var(--sa-game-stones);color:var(--sa-game-stones-ink)}
.boost-art.boost-unveil{background:var(--sa-game-unveil);color:var(--sa-game-unveil-ink)}
.boost-art.boost-stones{background:var(--sa-game-stones);color:var(--sa-game-stones-ink)}

.play-layout.glue-board{display:flex!important;flex-direction:column;align-items:stretch!important;gap:10px;width:100%;max-width:520px;margin:0 auto;box-sizing:border-box;color:var(--sa-ink)}
.glue-top,.glue-clue-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.glue-eyebrow{font-size:14px;font-weight:700;color:var(--sa-green);letter-spacing:.02em}
.glue-count{font-size:14px;font-weight:600;color:#4d5d52}

/* Unveil's phrase card: one square per letter, lit as clues are solved. */
.phrase-card{background:var(--sa-surface);border:2px solid var(--sa-green);border-radius:16px;padding:14px 10px 16px;display:flex;flex-wrap:wrap;justify-content:center;gap:10px 16px;cursor:pointer}
.uv-word{display:flex;gap:4px}
.uv-sq{--s:clamp(26px,7.6vw,34px);width:var(--s);height:calc(var(--s)*1.2);display:grid;place-items:center;border-bottom:3px solid var(--sa-sage);border-radius:6px 6px 3px 3px;background:#f1f0e4;font-weight:800;font-size:calc(var(--s)*.66);line-height:1;color:var(--sa-ink)}
.uv-sq.lit{background:var(--sa-surface);border-bottom-color:var(--sa-green)}
.uv-sq.flash{animation:glue-lit 1s ease-out}
@keyframes glue-lit{0%{background:var(--sa-gold);transform:translateY(-3px)}100%{background:var(--sa-surface);transform:none}}
.uv-sq.typed{color:#3c7fa0;background:var(--sa-surface)}
.uv-sq.cursor{background:var(--sa-gold);box-shadow:inset 0 0 0 2px var(--sa-green)}
.guessing .uv-sq:not(.lit){border-bottom-color:#3c7fa0}

/* The clue box (both games): the clue, then its answer squares. */
.glue-clue{background:var(--sa-surface);border:1.5px solid #cfd8c6;border-left:6px solid var(--sa-gold);border-radius:16px;padding:10px 14px 12px;display:flex;flex-direction:column;gap:8px}
.glue-clue.dim{opacity:.55;cursor:pointer}
.glue-clue-text{margin:0;font-size:19px;line-height:1.3;font-weight:500}
.glue-len{color:#4d5d52;font-weight:400;font-size:.85em;white-space:nowrap}
.glue-slots{display:flex;gap:6px;flex-wrap:nowrap;min-width:0}
.glue-slot{flex:0 1 42px;min-width:0;max-width:42px;height:48px;display:grid;place-items:center;border:2px solid var(--sa-sage);border-radius:9px;background:var(--sa-surface);font-weight:800;font-size:24px;box-sizing:border-box}
.glue-slot.cur{background:var(--sa-gold);border-color:var(--sa-green)}
.glue-slot.given{color:var(--sa-green);background:#e3eadb}
.glue-shake{animation:glue-shake .4s}
@keyframes glue-shake{20%{transform:translateX(-6px)}40%{transform:translateX(6px)}60%{transform:translateX(-4px)}80%{transform:translateX(3px)}}
.glue-chips{display:flex;flex-wrap:wrap;gap:6px;min-height:28px}
.glue-chip{display:inline-flex;gap:1px;padding:3px 10px;border-radius:999px;background:var(--sa-surface);border:1.5px solid #cfd8c6;font-weight:800;letter-spacing:.08em;font-size:15px}
.glue-chip i{font-style:normal;color:#8f9a88}
.glue-chip b{color:var(--sa-green)}
.glue-chip.given{border-style:dashed}
.glue-actions{display:flex;justify-content:center}
.glue-actions .button{min-height:46px}

/* The puzzle keys. */
.glue-keys{display:grid;gap:7px;margin-top:auto;padding-top:4px;user-select:none;-webkit-user-select:none}
.glue-keys>div{display:grid;gap:5px}
.glue-keys .r1{grid-template-columns:repeat(10,1fr)}
.glue-keys .r2{grid-template-columns:.5fr repeat(9,1fr) .5fr}
.glue-keys .r3{grid-template-columns:1.6fr repeat(7,1fr) 1.4fr}
.glue-keys button{min-height:50px;padding:0;border:1.5px solid #b9c4b0;border-radius:11px;background:var(--sa-surface);color:var(--sa-ink);font:inherit;font-weight:800;font-size:21px;box-shadow:0 3px 0 #8ea283;display:grid;place-items:center;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.glue-keys button:active{transform:translateY(2px);box-shadow:0 1px 0 #8ea283}
.glue-keys button.wide{font-size:16px}
.glue-keys svg{width:24px;height:24px}

/* Stepping stones: a stretch of the day's painted path with six stones on it. */
.stones-path{position:relative;flex:1 1 auto;min-height:170px;width:100%;border-radius:16px;overflow:hidden;border:2px solid var(--sa-green);background-color:var(--sa-paper);background-repeat:no-repeat;box-sizing:border-box}
.stones-path svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.glue-stone{position:absolute;transform:translate(-50%,-50%);min-width:72px;height:38px;padding:0 12px;border-radius:24px/21px;border:2px solid var(--sa-sage);background:var(--sa-surface);color:var(--sa-ink);font:inherit;font-weight:800;font-size:15px;letter-spacing:.07em;display:grid;place-items:center;box-shadow:0 3px 0 rgba(27,51,38,.22);white-space:nowrap;transition:transform .2s;box-sizing:border-box}
button.glue-stone{cursor:pointer}
.glue-stone .dots{letter-spacing:.22em;color:#6f7d69;font-size:15px}
.glue-stone.known{background:var(--sa-green);border-color:var(--sa-green);color:var(--sa-surface)}
.glue-stone.cur{background:var(--sa-gold);border-color:var(--sa-ink);transform:translate(-50%,-50%) scale(1.08)}
.glue-stone.cur .dots{color:var(--sa-ink)}
.glue-stone .drop{position:absolute;top:-10px;right:-8px;width:22px;height:22px;border-radius:50%;background:var(--sa-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%233c7fa0' d='M12 2C9 7 6 10.5 6 14a6 6 0 0 0 12 0c0-3.5-3-7-6-12z'/%3E%3C/svg%3E") center/12px no-repeat;border:2px solid #3c7fa0;box-sizing:border-box}
.glue-stone.hop{animation:glue-hop .45s ease-out}
@keyframes glue-hop{40%{transform:translate(-50%,-62%) scale(1.06)}}
.glue-tries{display:flex;gap:5px;align-items:center}
.glue-tries i{width:12px;height:10px;border-radius:50%;background:var(--sa-sage);display:inline-block}
.glue-tries i.gone{background:transparent;border:1.5px solid #b9c4b0}
.stones-join{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;min-width:0}
.stones-join .w{flex:none;padding:6px 8px;border-radius:10px;background:var(--sa-green);color:var(--sa-surface);font-weight:800;letter-spacing:.04em;font-size:14px}
.stones-join .plus{flex:none;color:#4d5d52;font-weight:700}
.stones-join .glue-slots{flex:1 1 auto}

/* The results panel's own part: the postcard (Unveil) or the joins (Stepping stones), the result and Share. */
.glue-result{display:flex;flex-direction:column;gap:10px;margin:6px 0 4px;text-align:center}
.glue-postcard{margin:0;border-radius:16px;overflow:hidden;border:2px solid var(--sa-green);background:var(--sa-surface)}
.glue-postcard-art{width:100%;background-repeat:no-repeat}
.glue-postcard figcaption{font-family:var(--sa-serif,Fraunces,Georgia,serif);font-weight:500;font-size:23px;line-height:1.2;padding:10px 14px 12px;text-wrap:balance}
.glue-result-line{margin:0;display:flex;flex-direction:column;align-items:center;gap:4px;font-size:18px}
.glue-joins{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:0}
.glue-joins span{padding:6px 12px;border-radius:999px;background:var(--sa-surface);border:1.5px solid #cfd8c6;font-weight:800;letter-spacing:.05em;font-size:15px}
.glue-joins b{color:var(--sa-green);padding:0 2px}
.glue-share{display:flex;flex-direction:column;align-items:center;gap:4px}
.glue-share-note{margin:0;min-height:20px;font-size:15px;color:var(--sa-green);font-weight:600;white-space:pre-line}
.unveil-board.is-done .glue-postcard{margin-top:4px}
.stones-board.is-done .stones-path{flex:none}

/* The finished board (See the puzzle) has no keys or buttons. */
.glue-board.is-done .glue-keys,.glue-board.is-done .glue-actions{display:none}

/* Phones: the board fills the free height above the keys, and nothing scrolls. */
@media (max-width:759px){
 body:is([data-view=unveil],[data-view=stones]):not(.puzzle-finished) .game-play>.play-layout{flex:1 1 0;min-height:0;height:auto!important;padding:0 4px}
 body[data-view=unveil]:not(.puzzle-finished) .unveil-board{justify-content:flex-start}
}
@media (max-height:800px){
 .glue-keys button{min-height:44px;font-size:19px}.glue-keys{gap:6px}
 .glue-slot{height:42px;font-size:21px}.glue-clue{padding:8px 12px 10px;gap:6px}.glue-clue-text{font-size:17px}
 .glue-board{gap:8px}.uv-sq{height:calc(var(--s)*1.05)}.phrase-card{padding:10px 8px 12px;gap:8px 14px}
 .glue-actions .button{min-height:42px;padding-block:6px}.glue-chips{min-height:24px}.glue-chip{padding:2px 9px}
}
@media (max-height:700px){.glue-chips{display:none}.uv-sq{--s:clamp(24px,7vw,30px)}.phrase-card{padding:8px 8px 10px;row-gap:6px}.glue-keys button{min-height:40px}}
/* The bottom ad strip (mobile-polish.css, 701 px tall and up) takes 74 px: the compact sizes keep a three-line
   phrase, its clue and all three key rows above the message line, as the other games shrink their boards. */
@media (max-width:759px) and (min-height:701px) and (max-height:900px){
 body.review-game-ads .glue-chips{display:none}body.review-game-ads .glue-board{gap:8px}
 body.review-game-ads .uv-sq{--s:clamp(24px,7vw,30px);height:calc(var(--s)*1.05)}body.review-game-ads .phrase-card{padding:8px 8px 10px;gap:6px 14px}
 body.review-game-ads .glue-keys button{min-height:40px;font-size:19px}body.review-game-ads .glue-keys{gap:6px}body.review-game-ads .glue-slot{height:42px;font-size:21px}
 body.review-game-ads .glue-clue{padding:8px 12px 10px;gap:6px}body.review-game-ads .glue-actions .button{min-height:42px;padding-block:6px}
}
@media (prefers-reduced-motion:reduce){.uv-sq.flash,.glue-shake,.glue-stone.hop{animation:none}.glue-stone{transition:none}}
/* The results panel replaces the board until See the puzzle brings it back (passport.css). */
.puzzle-finished .game-play>.play-layout.glue-board{display:none!important}
/* While Pippin's first-game lesson is up (#641), the board keeps its full height (keys included) and his note sits under it, never over the keys. */
body:is([data-view=unveil],[data-view=stones]):not(.puzzle-finished) #main:has(>.pip-inline.in-game)>.game-play,body:is([data-view=unveil],[data-view=stones]):not(.puzzle-finished) #main:has(>.pip-inline.in-game)>.game-play>.glue-board{flex:0 0 auto;min-height:auto}
