/**
 * Goalie word games (Crossword + Word Search) — shared dark game surface.
 */

body.ingoal-word-game { background: var(--ig-navy, #0A1628); }

.wg-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: var(--ig-space-xl, 32px) 24px 80px;
    font-family: var(--ig-font-ui, 'Inter', sans-serif);
    background: linear-gradient(180deg, #11203a 0%, var(--ig-navy, #0A1628) 320px);
}
.wg-preview-note {
    background: #C9A654;
    color: #1B102F;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 6px;
    text-align: center;
    margin: 0 0 18px;
}
.wg-preview-note code { font-family: monospace; }

.wg-hero { text-align: center; margin-bottom: 22px; }
.wg-hero__title {
    font-family: var(--ig-font-heading, 'Inter', sans-serif);
    font-size: var(--ig-text-5xl, 42px);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
    margin: 0 0 8px;
}
.wg-hero__sub {
    font-size: 16px;
    line-height: 1.5;
    color: var(--ig-ice, #8FB8DE);
    max-width: 620px;
    margin: 0 auto;
}

.wg-hud { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.wg-btn {
    font-family: var(--ig-font-ui, 'Inter', sans-serif);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .5px;
    color: #fff;
    background: var(--ig-accent-blue, #31487A);
    border: 1px solid rgba(143,184,222,.35);
    border-radius: var(--ig-radius-sm, 4px);
    padding: 10px 16px;
    min-height: 44px;
    cursor: pointer;
}
.wg-btn:hover { background: #3e5a96; }
.wg-hud__stats {
    margin-left: auto;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 17px;
    letter-spacing: 2px;
    color: var(--ig-ice, #8FB8DE);
    font-variant-numeric: tabular-nums;
}
.wg-noscript { color: var(--ig-ice, #8FB8DE); padding: 40px; text-align: center; }
.wg-board-wrap { position: relative; }

/* win banner (shared) */
.wg-won {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(10,22,40,.8);
    border-radius: 16px;
    z-index: 50;
}
.wg-won h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 50px;
    letter-spacing: 4px;
    color: #fff;
    margin: 0;
}
.wg-won p { color: var(--ig-ice, #8FB8DE); margin: 0; font-size: 15px; }

/* ---------------- Crossword ---------------- */
.wg-cw-layout { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.wg-cw-gridwrap {
    flex: 0 1 auto;
    border-radius: 14px;
    padding: 14px;
    background: linear-gradient(165deg, #eef4fa 0%, #dde9f3 100%);
    box-shadow: inset 0 2px 14px rgba(10,22,40,.10);
    overflow: auto;
    max-width: 100%;
}
.wg-cw-grid { display: grid; gap: 2px; }
.wg-cw-cell { position: relative; width: var(--cw-cell, 38px); height: var(--cw-cell, 38px); }
.wg-cw-cell--block { background: transparent; }
.wg-cw-cell input {
    width: 100%;
    height: 100%;
    border: 1px solid #9fb1c6;
    border-radius: 4px;
    background: #ffffff;
    text-align: center;
    font-family: var(--ig-font-ui, 'Inter', sans-serif);
    font-weight: 700;
    font-size: calc(var(--cw-cell, 38px) * .5);
    text-transform: uppercase;
    color: var(--ig-navy, #0A1628);
    caret-color: var(--ig-accent-blue, #31487A);
    padding: 0;
}
.wg-cw-cell input:focus { outline: 2px solid var(--ig-accent-blue, #31487A); }
.wg-cw-cell.is-active input { background: #dbe9f7; }
.wg-cw-cell.is-wrong input { color: #C0392B; background: #fdecea; }
.wg-cw-cell.is-solved input { color: #1d7a43; }
.wg-cw-cell .num {
    position: absolute;
    top: 1px;
    left: 3px;
    font-size: calc(var(--cw-cell, 38px) * .24);
    font-weight: 600;
    color: #5a6678;
    pointer-events: none;
    z-index: 2;
}
.wg-cw-clues { flex: 1 1 320px; display: grid; grid-template-columns: 1fr; gap: 16px; min-width: 280px; }
.wg-cw-clues h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    letter-spacing: 2px;
    color: var(--ig-ice, #8FB8DE);
    margin: 0 0 6px;
}
.wg-cw-clues ol { list-style: none; margin: 0; padding: 0; }
.wg-cw-clues li {
    font-size: 14px;
    line-height: 1.45;
    color: rgba(255,255,255,.85);
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
}
.wg-cw-clues li b { color: var(--ig-ice, #8FB8DE); margin-right: 6px; }
.wg-cw-clues li:hover { background: rgba(143,184,222,.10); }
.wg-cw-clues li.is-active { background: rgba(143,184,222,.16); }
.wg-cw-clues li.is-solved { color: rgba(255,255,255,.4); text-decoration: line-through; }

/* ---------------- Word search ---------------- */
.wg-ws-layout { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.wg-ws-grid {
    display: grid;
    gap: 3px;
    border-radius: 14px;
    padding: 14px;
    background: linear-gradient(165deg, #eef4fa 0%, #dde9f3 100%);
    box-shadow: inset 0 2px 14px rgba(10,22,40,.10);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.wg-ws-cell {
    width: var(--ws-cell, 38px);
    height: var(--ws-cell, 38px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #c4d2e2;
    font-weight: 700;
    font-size: calc(var(--ws-cell, 38px) * .45);
    color: var(--ig-navy, #0A1628);
    cursor: pointer;
}
.wg-ws-cell.is-tracing { background: #dbe9f7; border-color: var(--ig-accent-blue, #31487A); }
.wg-ws-cell.is-found { background: var(--ig-accent-blue, #31487A); border-color: var(--ig-accent-blue, #31487A); color: #ffffff; }
.wg-ws-words { flex: 1 1 240px; list-style: none; margin: 0; padding: 0; min-width: 220px; columns: 2; }
.wg-ws-words li {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 19px;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,.85);
    padding: 4px 0;
    break-inside: avoid;
}
.wg-ws-words li.is-found { color: rgba(255,255,255,.35); text-decoration: line-through; }
.wg-ws-words li .src { font-family: var(--ig-font-ui, 'Inter', sans-serif); font-size: 10px; letter-spacing: 1px; color: var(--ig-ice, #8FB8DE); margin-left: 6px; }

/* ---------------- About ---------------- */
.wg-about { max-width: 680px; margin: 26px auto 0; }
.wg-about details {
    border: 1px solid rgba(143,184,222,.3);
    border-radius: var(--ig-radius-md, 8px);
    padding: 14px 18px;
    background: rgba(143,184,222,.07);
}
.wg-about summary { font-weight: 600; color: #fff; cursor: pointer; }
.wg-about p { font-size: 14px; line-height: 1.6; color: rgba(255,255,255,.75); margin: 12px 0 0; }
.wg-about a { color: var(--ig-ice, #8FB8DE); }

@media (max-width: 700px) {
    .wg-page { padding-left: 12px; padding-right: 12px; }
    .wg-hero__title { font-size: 30px; }
    .wg-cw-cell { --cw-cell: 30px; }
    .wg-ws-cell { --ws-cell: 28px; }
    .wg-ws-words { columns: 2; }
}

/* --- Goalieography Hunt reveal --- */
.gh-reveal { min-height: 24px; margin-top: 14px; }
.gh-find {
    font-size: 14px;
    color: rgba(255,255,255,.75);
    line-height: 1.5;
    margin: 0;
}
.gh-find a { color: var(--ig-ice, #8FB8DE); font-weight: 600; }
