/* Football Wordle v2. Scoped to .fw2 / body.fw2-page so nothing leaks into other pages. */
body.fw2-page {
  background:
    radial-gradient(70% 38% at 10% 0%, rgba(56, 201, 119, 0.13), transparent 70%),
    radial-gradient(70% 38% at 90% 0%, rgba(245, 184, 61, 0.10), transparent 70%),
    #060a12;
  background-attachment: fixed;
}
@media (max-width: 640px) { body.fw2-page .site-header, body.fw2-page .circuit-bar { position: static; } }
.fw2-h1 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.fw2, .fw2-modal {
  --panel: #0e1424; --panel2: #141c32; --line: rgba(255, 255, 255, .12);
  --txt: #f3f5fa; --dim: #9aa6bd; --acc: #f5b83d; --bad: #e5484d;
  --c-correct: #38c977; --c-present: #f5b83d; --c-absent: #2a3247; --c-ink: #06120b;
  --tile: 52px; --gap: 6px; color: var(--txt);
}
.fw2 { max-width: 440px; margin: 0 auto; padding: 6px 0 90px; }
body.fw2-cb .fw2, body.fw2-cb .fw2-modal { --c-correct: #4aa3ff; --c-present: #ff8a3d; --c-ink: #07101c; }
.fw2 button { font-family: inherit; }
.fw2 [hidden] { display: none !important; }
.fw2-preview { background: rgba(245, 184, 61, .1); border: 1px dashed rgba(245, 184, 61, .6); color: #ffe2a8; border-radius: 8px; padding: 8px 12px; font-size: 12px; line-height: 1.4; margin: 4px 0 10px; }

/* HUD */
.fw2-hud { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 2px 10px; position: relative; }
.fw2-brand { font-family: var(--font-display, 'Jersey 15', sans-serif); font-size: 30px; line-height: 1; text-align: center; }
.fw2-brand small { display: block; font-family: var(--font-body, Inter, sans-serif); font-size: 9.5px; letter-spacing: .22em; font-weight: 700; color: var(--acc); margin-top: 5px; }
.fw2-datenav { display: flex; align-items: center; justify-content: center; gap: 12px; }
.fw2-datenav button, .fw2-icons button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--txt); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.fw2-datenav button:disabled { opacity: .3; cursor: not-allowed; }
.fw2-datenav button:not(:disabled):hover, .fw2-icons button:hover { border-color: var(--acc); }
.fw2-datenav span { font-family: var(--font-display, 'Jersey 15', sans-serif); font-size: 15px; color: var(--acc); min-width: 110px; text-align: center; }
.fw2-icons { position: absolute; right: 2px; bottom: 10px; display: flex; gap: 6px; }

.fw2-status { min-height: 22px; text-align: center; font-size: 14px; font-weight: 700; margin: 2px 0 8px; opacity: 0; transition: opacity .2s; }
.fw2-status.on { opacity: 1; } .fw2-status.win { color: var(--c-correct); } .fw2-status.lose { color: #f0868a; }
.fw2-len { text-align: center; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); font-weight: 800; margin-bottom: 10px; }

/* Board */
.fw2-board { display: flex; flex-direction: column; align-items: center; gap: var(--gap); margin-bottom: 14px; }
.fw2-row { display: flex; gap: var(--gap); }
.fw2-row.shake { animation: fwShake .45s; }
.fw2-tile {
  width: var(--tile); height: var(--tile); display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255, 255, 255, .16); border-radius: 6px; background: transparent;
  font-family: var(--font-display, 'Jersey 15', sans-serif); font-size: calc(var(--tile) * .58); line-height: 1; text-transform: uppercase; color: var(--txt);
  --c: transparent;
}
.fw2-tile.filled { border-color: rgba(255, 255, 255, .5); animation: fwPop .12s ease-out; }
.fw2-tile.correct { --c: var(--c-correct); } .fw2-tile.present { --c: var(--c-present); } .fw2-tile.absent { --c: var(--c-absent); }
.fw2-tile.correct, .fw2-tile.present, .fw2-tile.absent { background: var(--c); border-color: var(--c); }
.fw2-tile.correct, .fw2-tile.present { --tc: var(--c-ink); color: var(--tc); }
.fw2-tile.absent { --tc: #9aa6bd; color: var(--tc); }
.fw2-tile.flip { animation: fwFlip .62s ease-in-out both; animation-delay: var(--d, 0s); }
.fw2-tile.bounce { animation: fwBounce .7s ease both; animation-delay: var(--d, 0s); }

/* Last-guess hint */
.fw2-hint { max-width: 380px; margin: 0 auto 14px; border: 1px solid rgba(245, 184, 61, .55); background: linear-gradient(160deg, rgba(245, 184, 61, .14), rgba(245, 184, 61, .04)); border-radius: 12px; padding: 12px 14px; text-align: center; animation: fwRise .45s ease backwards; }
.fw2-hint b { display: block; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--acc); margin-bottom: 6px; }
.fw2-hint .chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.fw2-hint .chips span { font-size: 12.5px; font-weight: 700; border: 1px solid var(--line); background: var(--panel2); border-radius: 999px; padding: 4px 11px; }

/* Keyboard */
.fw2-kb { display: flex; flex-direction: column; gap: 7px; width: 100%; max-width: 440px; margin: 0 auto; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.fw2-kr { display: flex; gap: 5px; justify-content: center; }
.fw2-key { flex: 1; max-width: 42px; height: 52px; border-radius: 7px; border: 0; background: #29324a; color: var(--txt); font-weight: 800; font-size: 14px; cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; transition: background .25s, transform .06s; }
.fw2-key.wide { flex: 1.6; max-width: 66px; font-size: 11.5px; }
.fw2-key:active { transform: scale(.94); }
.fw2-key.correct { background: var(--c-correct); color: var(--c-ink); } .fw2-key.present { background: var(--c-present); color: var(--c-ink); } .fw2-key.absent { background: #151a29; color: #5c6680; }
.fw2-kb.lock .fw2-key { pointer-events: none; }

/* Result */
.fw2-result { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px; text-align: center; margin: 4px 0 14px; animation: fwRise .5s ease backwards; }
.fw2-kicker { font-size: 10.5px; letter-spacing: .22em; font-weight: 800; color: var(--acc); text-transform: uppercase; }
.fw2-grade { font-family: var(--font-display, 'Jersey 15', sans-serif); font-size: 30px; line-height: 1.1; margin: 6px 0 12px; text-wrap: balance; }
.fw2-pcard { display: flex; align-items: center; gap: 12px; text-align: left; border: 1.5px solid transparent; border-radius: 12px; padding: 10px 12px; margin: 0 auto 12px;
  background: linear-gradient(160deg, #18213f, #0d1226 70%) padding-box, linear-gradient(135deg, #ffd9a0, #7aa7ff 30%, #c8a3ff 55%, #f5b83d 80%, #ffd9a0) border-box; }
.fw2-mono { flex: none; width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display, 'Jersey 15', sans-serif); font-size: 24px; color: #fff;
  background: radial-gradient(circle at 30% 25%, hsl(var(--h) 70% 60%), hsl(var(--h) 60% 28%)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .18); }
.fw2-pname { font-weight: 800; font-size: 16px; line-height: 1.2; }
.fw2-pmeta { font-size: 12.5px; color: var(--dim); margin-top: 3px; line-height: 1.35; }
.fw2-emoji { font-size: 22px; line-height: 1.35; letter-spacing: 1px; margin: 6px 0 12px; white-space: pre-line; }
.fw2-acts { display: flex; gap: 8px; }
.fw2-acts .fw2-btn { flex: 1; }
.fw2-btn { font-weight: 800; font-size: 14px; padding: 13px 14px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; }
.fw2-btn.primary { background: var(--acc); color: #0a0a0a; } .fw2-btn.ghost { background: transparent; border-color: rgba(255, 255, 255, .3); color: var(--txt); }
.fw2-minstats { display: flex; justify-content: center; gap: 18px; margin: 0 0 12px; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.fw2-minstats b { display: block; font-size: 20px; color: var(--txt); letter-spacing: 0; }
.fw2-lbnote { color: var(--dim); font-size: 12px; margin: 0 0 8px; }

/* Stats / help modal */
.fw2-modal { position: fixed; inset: 0; z-index: 400; background: rgba(0, 0, 0, .72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.fw2-modal > div { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; width: 100%; max-width: 380px; padding: 18px 16px 16px; max-height: 90vh; overflow: auto; position: relative; }
.fw2-modal h3 { margin: 0 0 12px; font-family: var(--font-display, 'Jersey 15', sans-serif); font-weight: 400; font-size: 24px; text-align: center; }
.fw2-x { position: absolute; right: 10px; top: 10px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--txt); cursor: pointer; }
.fw2-sgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; margin-bottom: 14px; }
.fw2-sgrid b { display: block; font-size: 26px; font-family: var(--font-display, 'Jersey 15', sans-serif); font-weight: 400; } .fw2-sgrid span { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); font-weight: 800; }
.fw2-dist { display: flex; flex-direction: column; gap: 5px; }
.fw2-dist div { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; }
.fw2-dist i { display: block; min-width: 22px; height: 20px; border-radius: 4px; background: #29324a; color: #fff; font-style: normal; text-align: right; padding: 0 6px; line-height: 20px; }
.fw2-dist i.hit { background: var(--c-correct); color: var(--c-ink); }
.fw2-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); margin-top: 12px; font-size: 13px; }
.fw2-opt small { display: block; color: var(--dim); font-size: 11.5px; margin-top: 2px; }
.fw2-sw { flex: none; width: 44px; height: 26px; border-radius: 999px; border: 1px solid var(--line); background: #1a2136; position: relative; cursor: pointer; padding: 0; }
.fw2-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #9aa6bd; transition: transform .2s, background .2s; }
.fw2-sw[aria-checked="true"] { background: rgba(56, 201, 119, .25); } .fw2-sw[aria-checked="true"]::after { transform: translateX(18px); background: var(--c-correct); }
/* example rows inside the shared how-to modal */
.fw2.fw2-exwrap { padding: 0; margin: 0; max-width: none; color: inherit; }
.fw2-ex { display: flex; gap: 4px; justify-content: center; margin: 8px 0; }
.fw2-ex .fw2-tile { --tile: 34px; width: 34px; height: 34px; font-size: 20px; }
.fw2-help p, .fw2-help li { font-size: 13px; line-height: 1.45; color: #cdd5e6; } .fw2-help ul { padding-left: 18px; margin: 8px 0; }

/* Preview tools */
.fw2-tools { margin-top: 22px; border-top: 1px dashed var(--line); padding-top: 14px; font-size: 12.5px; color: var(--dim); }
.fw2-tools label { display: block; margin: 8px 0 4px; font-weight: 700; color: var(--txt); }
.fw2-tools input[type=date] { background: var(--panel); color: var(--txt); border: 1px solid var(--line); border-radius: 8px; padding: 8px; font-size: 14px; }
.fw2-tools button { background: var(--panel2); color: var(--txt); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 12.5px; cursor: pointer; margin: 6px 6px 0 0; }

@keyframes fwPop { 0% { transform: scale(.9); } 60% { transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes fwFlip {
  0% { transform: rotateX(0); background: transparent; border-color: rgba(255, 255, 255, .5); color: var(--txt); }
  49% { transform: rotateX(90deg); background: transparent; border-color: rgba(255, 255, 255, .5); color: var(--txt); }
  50% { background: var(--c); border-color: var(--c); color: var(--tc); }
  100% { transform: rotateX(0); background: var(--c); border-color: var(--c); color: var(--tc); }
}
@keyframes fwBounce { 0%, 20% { transform: translateY(0); } 40% { transform: translateY(-14px); } 60% { transform: translateY(3px); } 80% { transform: translateY(-5px); } 100% { transform: translateY(0); } }
@keyframes fwShake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }
@keyframes fwRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 380px) { .fw2-key { height: 48px; font-size: 13px; } .fw2-kr { gap: 4px; } }
@media (prefers-reduced-motion: reduce) { .fw2 *, .fw2 *::before { animation: none !important; transition: none !important; } .fw2-tile.correct, .fw2-tile.present, .fw2-tile.absent { background: var(--c); } }
.fw2-dist span { width: 12px; text-align: center; color: var(--dim); }
.fw2-dist div { min-width: 0; } .fw2-dist i { box-sizing: border-box; }
.fw2-hint[hidden] { display: none; }
