/* Word Zipper on the web (#844). Plum marks zips, never a player. */
:root {
  --wz-plum: #7a2a52; --wz-plum-dark: #5a1c3c; --wz-tint: #f6e6ee; --wz-ink-zip: #4a1530;
  --wz-ground: #f3f1f6; --wz-wood: #f3d9a7; --wz-wood-edge: #c99a55; --wz-ink: #1c2333;
  --wz-muted: #5b6478; --wz-line: #e3dfe9; --wz-seg: #e6e1ec; --wz-bad: #b42318; --wz-good: #1f7a55;
  --wz-tile: 36px; --wz-gap: 5px;
}
.wz [hidden] { display: none !important; }
.wz { font-family: Manrope, system-ui, sans-serif; color: var(--wz-ink); }
.wz a { color: var(--wz-plum); }
.wz a:hover { color: var(--wz-plum-dark); }
.wz-serif { font-family: Fraunces, Georgia, serif; }
.wz-mark { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--wz-ink) !important; }
.wz-mark .w { font-family: Fraunces, serif; font-style: italic; font-weight: 700; font-size: 30px; letter-spacing: -0.02em; }
.wz-mark .z { font-family: Fraunces, serif; font-weight: 900; font-size: 30px; letter-spacing: -0.02em; color: var(--wz-plum); }
.wz-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; padding: 18px 0 12px; border-bottom: 1px solid var(--wz-line); }
.wz-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-weight: 700; font-size: 14px; }
.wz-nav a { text-decoration: none; color: var(--wz-muted); }
.wz-nav a[aria-current="page"] { color: var(--wz-plum); }
.wz-page { background: var(--wz-ground); border-radius: 18px; padding: 16px; margin-top: 16px; }
.wz-h2 { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--wz-muted); margin: 0 0 8px; }
.wz-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--wz-line); text-decoration: none; color: inherit !important; }
.wz-card.turn { box-shadow: 0 0 0 2px #355bb8; }
.wz-avatar { width: 40px; height: 40px; border-radius: 20px; display: flex; align-items: center; justify-content: center; font-family: Fraunces, serif; font-weight: 800; font-size: 17px; flex-shrink: 0; }
.wz-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.wz-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 18px; border-radius: 12px; border: 0; background: var(--wz-plum); color: #fff !important; font-weight: 800; font-size: 15px; cursor: pointer; text-decoration: none; font-family: inherit; }
.wz-btn:disabled { background: var(--wz-seg); color: #6a6478 !important; cursor: default; }
.wz-btn.ghost { background: #fff; color: var(--wz-ink) !important; border: 1.5px solid #cfc8d9; font-weight: 700; }
.wz-btn.small { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 18px; }
.wz-seg { display: inline-flex; background: var(--wz-seg); border-radius: 10px; padding: 3px; gap: 3px; }
.wz-seg button, .wz-seg label { height: 34px; padding: 0 14px; border: 0; border-radius: 8px; font: 700 14px Manrope, sans-serif; background: transparent; color: var(--wz-muted); cursor: pointer; display: inline-flex; align-items: center; }
.wz-seg [aria-pressed="true"], .wz-seg input:checked + span { background: #fff; color: var(--wz-ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.wz-seg input { position: absolute; opacity: 0; pointer-events: none; }
.wz-seg label span { padding: 7px 14px; border-radius: 8px; }
.wz-seg label { padding: 0; }
.wz-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.wz-pills label { cursor: pointer; }
.wz-pills input { position: absolute; opacity: 0; pointer-events: none; }
.wz-pills span { display: inline-flex; align-items: center; height: 38px; min-width: 44px; padding: 0 12px; border-radius: 19px; font-weight: 700; font-size: 14px; border: 1.5px solid #cfc8d9; background: #fff; }
.wz-pills input:checked + span { border-color: var(--wz-plum); background: var(--wz-plum); color: #fff; }
.wz-pills input:focus-visible + span, .wz-seg input:focus-visible + span { outline: 2px solid var(--wz-plum); outline-offset: 2px; }
.wz-input { height: 44px; border-radius: 10px; border: 1.5px solid #cfc8d9; background: #fff; padding: 0 12px; font: 15px Manrope, sans-serif; color: var(--wz-ink); width: 100%; box-sizing: border-box; }
.wz-note { font-size: 13px; color: var(--wz-muted); line-height: 1.45; }
.wz-error { color: var(--wz-bad); font-weight: 700; font-size: 14px; }

/* Tiles. A played word's tiles show the points each letter earned (.wz-pts); pool tiles show none. */
.wz-tile { position: relative; width: var(--wz-tile); height: var(--wz-tile); box-sizing: border-box; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-family: Fraunces, serif; font-weight: 700; font-size: 20px; flex-shrink: 0; background: var(--wz-wood); border: 1px solid var(--wz-wood-edge); color: var(--wz-ink); }
.wz-tile.zip { background: var(--wz-tint); border: 2px solid var(--wz-plum); color: var(--wz-ink-zip); }
.wz-tile.preview { border-style: dashed; }
.wz-tile .wz-pts { position: absolute; right: 2px; bottom: 1px; font-family: Manrope, system-ui, sans-serif; font-size: 9px; font-weight: 700; line-height: 1; opacity: .75; }
.wz-tile.xs .wz-pts { font-size: 7px; right: 1px; }
.wz-tile.preview:not(.zip) { border-color: var(--wz-plum); }
.wz-tile.ghost { background: #fbeaea; border: 1.5px dashed var(--wz-bad); color: #8a1c13; }
.wz-tile.used { background: #e9e4ee; border-color: #ddd6e5; color: #b3aabf; }
.wz-tile.sm { --wz-tile: 30px; font-size: 17px; border-radius: 5px; }
.wz-tile.xs { --wz-tile: 24px; font-size: 14px; border-radius: 4px; }
.wz-teeth { position: absolute; left: 50%; top: -16px; width: 12px; height: 14px; margin-left: -6px; transform-origin: top;
  background: repeating-linear-gradient(180deg, var(--wz-plum) 0 3px, transparent 3px 6px) left top / 5px 14px no-repeat,
              repeating-linear-gradient(180deg, transparent 0 3px, var(--wz-plum) 3px 6px) right top / 5px 14px no-repeat; }
.wz-tile.sm .wz-teeth { top: -14px; width: 10px; height: 12px; margin-left: -5px; background-size: 4px 12px; }

/* The game page */
.wz-game { display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "board scores" "board ledger"; grid-template-rows: auto 1fr; gap: 12px 16px; align-items: start; }
.wz-area-board { grid-area: board; min-width: 0; }
.wz-area-scores { grid-area: scores; display: flex; flex-direction: column; gap: 8px; }
.wz-area-ledger { grid-area: ledger; }
.wz-board-wrap { position: relative; background: #fff; border-radius: 16px; box-shadow: 0 0 0 1px var(--wz-line); }
.wz-board { overflow-x: auto; overflow-y: auto; max-height: 460px; min-height: 220px; padding: 18px 16px 58px; scroll-behavior: auto; }
/* Ribbon | List: an icon toggle in the board's bottom-right corner. */
.wz-viewtoggle { position: absolute; right: 10px; bottom: 10px; z-index: 2; display: inline-flex; gap: 3px; padding: 3px; border-radius: 12px; background: var(--wz-seg); box-shadow: 0 1px 3px rgba(28,35,51,.08); }
.wz-viewtoggle button { width: 42px; height: 32px; border: 0; border-radius: 9px; background: transparent; color: #74809a; display: grid; place-items: center; cursor: pointer; padding: 0; }
.wz-viewtoggle button svg { width: 20px; height: 20px; }
.wz-viewtoggle button[aria-pressed="true"] { background: #fff; color: var(--wz-ink); box-shadow: 0 1px 3px rgba(0,0,0,.14); }
.wz-viewtoggle button:focus-visible { outline: 2px solid var(--wz-plum); outline-offset: 1px; }
.wz-ribbon { position: relative; display: flex; flex-direction: column; }
.wz-row { display: flex; gap: var(--wz-gap); align-items: center; position: relative; }
.wz-row + .wz-row { margin-top: 16px; }
.wz-row .wz-row-score { margin-left: 10px; font-size: 13px; font-weight: 800; white-space: nowrap; display: inline-flex; flex-direction: column; line-height: 1.15; }
.wz-row .wz-row-who { font-size: 11px; font-weight: 600; opacity: .85; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.wz-fade { position: absolute; top: 0; bottom: 0; width: 32px; pointer-events: none; display: none; }
.wz-fade.l { left: 0; border-radius: 16px 0 0 16px; background: linear-gradient(90deg, #fff, rgba(255,255,255,0)); }
.wz-fade.r { right: 0; border-radius: 0 16px 16px 0; background: linear-gradient(270deg, #fff, rgba(255,255,255,0)); }
.wz-fade.on { display: block; }
.wz-pull { position: absolute; top: 8px; z-index: 2; width: 13px; height: 20px; border-radius: 4px 4px 6px 6px; background: linear-gradient(#ecebee, #a19ca7); box-shadow: 0 1px 2px rgba(0,0,0,.35); }
.wz-note-who { font-weight: 700; }
.wz-ledger-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--wz-line); }
.wz-dot { width: 10px; height: 10px; border-radius: 5px; flex-shrink: 0; }
.wz-score { font-family: Fraunces, serif; font-weight: 800; }
.wz-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--wz-line); }
.wz-chip .name { font-weight: 700; font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-chip .sub { font-size: 12px; color: var(--wz-muted); }
.wz-chip .wz-score { font-size: 22px; }
.wz-controls { margin-top: 12px; background: #fff; border-radius: 16px; box-shadow: 0 0 0 1px var(--wz-line); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.wz-pool { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; perspective: 600px; }
.wz-pool .wz-tile { --wz-tile: 42px; font-size: 22px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.12); border-radius: 8px; }
.wz-entry { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wz-entry input { flex: 1 1 0; min-width: 0; height: 48px; font-size: 20px; font-family: Fraunces, serif; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.wz-msg { min-height: 20px; font-size: 14px; font-weight: 700; color: var(--wz-muted); }
.wz-msg.good { color: var(--wz-plum); }
.wz-msg.bad { color: var(--wz-bad); }
.wz-msg.info { color: #3d4558; }
.wz-overlay { position: fixed; inset: 0; background: rgba(28,35,51,.45); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.wz-sheet { background: #fff; border-radius: 20px 20px 0 0; padding: 22px 20px 26px; width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; }
@media (min-width: 640px) { .wz-overlay { align-items: center; } .wz-sheet { border-radius: 20px; } }
@media (max-width: 860px) {
  .wz-game { grid-template-columns: minmax(0, 1fr); grid-template-areas: "scores" "board" "ledger"; grid-template-rows: none; }
  .wz-area-scores { flex-direction: row; }
  .wz-area-scores .wz-chip { flex: 1; min-width: 0; padding: 7px 10px; }
  .wz-area-scores .wz-chip .wz-score { font-size: 20px; }
}
@media (max-width: 420px) { :root { --wz-tile: 30px; --wz-gap: 4px; } .wz-tile { font-size: 17px; } .wz-pool .wz-tile { --wz-tile: 38px; } .wz-mark .w, .wz-mark .z { font-size: 26px; } }

/* The zip animation (~1.2 s), off under reduced motion. */
@keyframes wzDrop { from { transform: translateY(-40px); } to { transform: none; } }
@keyframes wzIn { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes wzTeeth { from { transform: scaleY(0); } to { transform: none; } }
@keyframes wzPull { 0% { transform: translateX(0); opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(var(--zx)); opacity: 0; } }
.wz-anim .zip { animation: wzDrop .45s cubic-bezier(.2,.8,.2,1) both; }
.wz-anim .wz-teeth { animation: wzTeeth .3s ease-out .35s both; }
.wz-anim .pop { animation: wzIn .26s cubic-bezier(.3,1.4,.5,1) both; }
.wz-anim .wz-pull { animation: wzPull 1s ease-in-out .2s both; }
@media (prefers-reduced-motion: reduce) { .wz-anim *, .wz-anim { animation: none !important; } .wz-pull { display: none; } }

/* Pass, armed: press again to pass (as Gramma Ana's .ga-passb.confirm). */
/* The pool's blank: a dashed, empty tile; when a word uses it, its letter in plum italic. */
.wz-tile.blank { background: #fffaf0; border: 1.5px dashed var(--wz-wood-edge); color: var(--wz-plum); font-style: italic; box-shadow: none; }
.wz-tile.blank.filled { background: var(--wz-tint); border-color: var(--wz-plum); }
.wz-tile.blank .wz-pts { font-style: normal; }
/* The blank's −2 (#855): a red bubble half off the top-right corner, ringed in white, over the next tile. */
.wz-tile .wz-pts.neg { right: auto; bottom: auto; left: calc(100% - 11px); top: -7px; z-index: 2; min-width: 18px; height: 18px; padding: 0 3px; box-sizing: border-box; border-radius: 999px; background: var(--wz-bad); color: #fff; opacity: 1; font-size: 10px; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.wz-tile.sm .wz-pts.neg { left: calc(100% - 10px); top: -6px; min-width: 16px; height: 16px; font-size: 9px; line-height: 16px; }
.wz-tile.xs .wz-pts.neg { left: calc(100% - 8px); top: -5px; min-width: 13px; height: 13px; padding: 0 2px; font-size: 7.5px; line-height: 13px; box-shadow: 0 0 0 1.5px #fff; }
/* "You passed! That results in new letters!" */
.wz-msg.splash { color: var(--wz-plum); font-weight: 800; font-size: 17px; animation: wzSplash .5s cubic-bezier(.34,1.56,.64,1) both; transform-origin: left center; }
@keyframes wzSplash { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wz-msg.splash { animation: none; } }
.wz-spk { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--wz-line, #dfe4ed); background: #fff; display: grid; place-items: center; color: var(--wz-plum); cursor: pointer; padding: 0; flex: 0 0 auto; }
.wz-spk .ws-icon { width: 16px; height: 16px; }
.wz-spk[aria-pressed="false"] { color: #8a93a6; background: #eef1f6; }
.wz-btn.confirm { border-color: #e4685a; color: #a3321f !important; background: #fff5f3; }
/* The hand-off band (as Gramma Ana's .ga-band, #312). */
.wz-band { position: fixed; left: 0; right: 0; top: 42%; z-index: 90; background: #1c2a4d; color: #fff; text-align: center; padding: 12px 16px; font-family: Manrope, system-ui, sans-serif; font-weight: 800; font-size: 16px; pointer-events: none; box-shadow: 0 10px 30px -10px rgba(20, 30, 60, 0.5); }
.wz-band small { display: block; font-weight: 600; font-size: 12.5px; opacity: 0.8; margin-top: 2px; }
/* Phones: the six letters and the blank stay on one line; Play and Pass stay beside the word. */
@media (max-width: 420px) {
  .wz-pool .wz-tile { --wz-tile: 35px; font-size: 19px; }
  #wz-pool { gap: 4px; }
  .wz-entry .wz-btn { padding: 0 14px; }
  .wz-entry input { font-size: 17px; letter-spacing: .04em; padding: 0 10px; }
}
