
.puzzle-page{
    width:min(1360px,calc(100% - 40px));
    max-width:1360px;
    margin:28px auto 58px;
    padding:0;
    color:#24364b;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans KR",sans-serif;
}
.puzzle-topbar{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;margin-bottom:16px}
.puzzle-kicker{font-size:11px;letter-spacing:.16em;font-weight:900;color:#155eef}
.puzzle-title-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.puzzle-title-line h2{margin:4px 0;font-size:29px;color:#0b2348;font-weight:900}
.puzzle-title-line h2 small{font-size:.55em;color:#6b7f96;font-weight:750}
.puzzle-topbar p{margin:0;color:#71839b;font-size:13px}
.puzzle-mode-badge{display:inline-flex;padding:5px 10px;border:1px solid #b5cbed;border-radius:999px;background:#eaf2ff;color:#155eef;font-size:11px;font-weight:850}
.puzzle-user-actions{display:flex;align-items:center;gap:8px}
.puzzle-login-user{font-size:12px;font-weight:750;color:#71839b;white-space:nowrap}
.puzzle-action-icon{width:35px;height:35px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;text-decoration:none!important;font-size:21px;font-weight:900}
.puzzle-home{background:#eaf2ff;color:#155eef;border:1px solid #b5cbed}

.puzzle-history{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px}
.puzzle-stat-card{background:linear-gradient(135deg,#fff,#f3f8ff);border:1px solid #bfd0e4;border-radius:14px;padding:13px 15px;box-shadow:0 5px 18px rgba(32,73,120,.06)}
.puzzle-stat-title{display:block;font-size:12px;font-weight:850;color:#526b86;margin-bottom:6px}
.puzzle-stat-pair{display:flex;flex-direction:column;gap:3px}
.puzzle-stat-pair span{font-size:12px;color:#405a75;line-height:1.45}
.puzzle-stat-pair i{font-style:normal;display:inline-block;min-width:42px;color:#8a9aae;font-size:10.5px}
.puzzle-stat-card.points .puzzle-stat-pair span{color:#155eef;font-weight:750}
.puzzle-content-ad{margin:18px 0 20px}

.puzzle-levels{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:6px;background:#eaf1f8;border:1px solid #c8d6e8;border-radius:14px;margin-bottom:13px}
.puzzle-level{border:1px solid transparent;border-radius:10px;background:transparent;color:#61758c;padding:10px 12px;font-size:14px;font-weight:900;cursor:pointer}
.puzzle-level small{display:block;margin-top:2px;font-size:10px;font-weight:650;color:#8d9caf}
.puzzle-level.is-active{background:#fff;color:#155eef;border-color:#bfd2eb;box-shadow:0 3px 12px rgba(34,79,130,.10)}

.puzzle-shell{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:14px;align-items:start}
.puzzle-game-column,.puzzle-side-panel>div{border:1px solid #b9cde5;border-radius:16px;background:linear-gradient(135deg,#f9fcff,#eef5ff 65%,#f8fbff);box-shadow:0 7px 22px rgba(35,76,122,.06)}
.puzzle-game-column{padding:16px}
.puzzle-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}
.puzzle-toolbar>div:first-child{display:flex;align-items:center;gap:10px}
.puzzle-toolbar strong{font-size:16px;color:#263f5b}
.puzzle-toolbar span{font-size:11px;color:#71859c}
.puzzle-toolbar-actions{display:flex;gap:7px}

.puzzle-primary-btn,.puzzle-secondary-btn{min-height:38px;border-radius:10px;padding:0 14px;font-size:12px;font-weight:850;cursor:pointer}
.puzzle-primary-btn{background:#155eef;border:1px solid #0b4bd4;color:#fff}
.puzzle-secondary-btn{background:#f1f5fa;border:1px solid #b9c9db;color:#506780}

.puzzle-board{width:100%;aspect-ratio:1/1;display:grid;gap:4px;padding:7px;border:1px solid #afc4dd;border-radius:15px;background:#dbe9f9}
.puzzle-cell{position:relative;min-width:0;border-radius:7px;overflow:hidden}
.puzzle-cell.is-block{
    border:1px solid #0f4fb7;
    background:
      radial-gradient(circle at 28% 22%,rgba(255,255,255,.45) 0 3%,transparent 4%),
      linear-gradient(145deg,#0b2d72,#0b5bd3 48%,#061d50);
    box-shadow:inset 0 0 9px rgba(90,166,255,.35),0 1px 3px rgba(5,34,82,.18);
    animation:blockShimmer 3.8s ease-in-out infinite alternate;
}
@keyframes blockShimmer{
    from{filter:brightness(.87) saturate(1.05)}
    to{filter:brightness(1.13) saturate(1.25)}
}
.puzzle-cell.is-answer{
    border:1px solid #b7c9df;
    background:#fff;
    cursor:pointer;
    color:#19395f;
    transition:.12s ease;
}
.puzzle-cell.is-answer:hover{border-color:#6b9cd4;background:#f4f8ff}
.puzzle-cell.is-selected{outline:3px solid rgba(21,94,239,.22);border-color:#155eef!important;background:#eef5ff!important}
.puzzle-cell.is-wrong-cell{background:#fff0f0!important;border-color:#d69299!important}
.puzzle-cell.is-correct-cell{background:#eef8f2!important;border-color:#9fcdb3!important}
.puzzle-number{position:absolute;left:4px;top:2px;font-size:8px;font-weight:900;color:#9aa8b9;opacity:.75;pointer-events:none}
.puzzle-letter{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:clamp(11px,1.65vw,20px);font-weight:900;color:#17365f}

.puzzle-message{min-height:30px;margin-top:10px;padding:7px 10px;border-radius:9px;color:#71839a;font-size:12px;font-weight:700}
.puzzle-message.is-success{background:#edf8f2;border:1px solid #b5dbc5;color:#39735a}
.puzzle-message.is-error{background:#fff0f0;border:1px solid #e0b9bd;color:#98565b}
.puzzle-message.is-warn{background:#fff8e8;border:1px solid #ead4a2;color:#84682d}

.puzzle-side-panel{display:grid;gap:12px}
.puzzle-keyboard-card,.puzzle-clues-card{padding:13px}
.puzzle-side-title{display:flex;flex-direction:column;gap:2px;margin-bottom:10px}
.puzzle-side-title strong{font-size:14px;color:#29445f}
.puzzle-side-title span{font-size:10px;color:#8091a5}
.hangul-section{margin-bottom:11px}
.hangul-section>b{display:block;margin-bottom:5px;font-size:10px;color:#69809a}
.hangul-keyboard{display:grid;grid-template-columns:repeat(5,1fr);gap:5px}
.hangul-keyboard button,.hangul-control-row button{min-height:34px;border:1px solid #b8cbe1;border-radius:8px;background:#fff;color:#264b75;font-size:14px;font-weight:850;cursor:pointer}
.hangul-keyboard button:hover{background:#eaf2ff;border-color:#8cafe0;color:#155eef}
.hangul-control-row{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:8px}
.compose-preview{margin-top:8px;padding:7px 8px;border-radius:8px;background:#f4f8fd;color:#71869d;font-size:10px}

.puzzle-clues{margin:0;padding:0;list-style:none;display:grid;gap:5px;max-height:220px;overflow:auto}
.puzzle-clues li{margin:0}
.puzzle-clues button{width:100%;display:grid;grid-template-columns:24px 1fr;gap:7px;text-align:left;border:1px solid #d0ddea;border-radius:8px;background:#fff;padding:7px 8px;color:#506982;cursor:pointer}
.puzzle-clues button:hover{background:#f3f8ff;border-color:#a7c1e2}
.puzzle-clues b{color:#155eef;font-size:11px}
.puzzle-clues span{font-size:10.5px;line-height:1.45}

.puzzle-celebration{position:fixed;inset:0;z-index:99999;display:none;align-items:center;justify-content:center;background:rgba(3,16,45,.86);overflow:hidden}
.puzzle-celebration.is-active{display:flex}
.celebration-grid{position:absolute;inset:0;display:grid;grid-template-columns:repeat(13,1fr);grid-auto-rows:1fr;gap:4px;padding:6px}
.celebration-grid span{
    background:linear-gradient(145deg,#06255f,#0a5ee9,#061d4d);
    border:1px solid #2778e5;
    border-radius:7px;
    opacity:.16;
    animation:celebrateCell var(--dur,.4s) ease-in-out infinite alternate;
    animation-delay:var(--delay,0s);
    box-shadow:inset 0 0 10px rgba(96,176,255,.55),0 0 9px rgba(14,99,235,.24)
}
@keyframes celebrateCell{
    0%{opacity:.12;transform:scale(.82) rotate(-1deg);filter:brightness(.65)}
    100%{opacity:1;transform:scale(1.04) rotate(1deg);filter:brightness(1.6)}
}
.celebration-text{position:relative;z-index:2;font-size:clamp(46px,9vw,116px);font-weight:1000;letter-spacing:.05em;color:#fff;text-shadow:0 0 18px #1d75ff,0 0 42px #124eac;animation:celebrateText .42s ease-in-out infinite alternate}
@keyframes celebrateText{from{transform:scale(.9) rotate(-1deg)}to{transform:scale(1.07) rotate(1deg)}}

.puzzle-modal{position:fixed;inset:0;z-index:100000;background:rgba(8,22,43,.56);display:flex;align-items:center;justify-content:center;padding:20px}
.puzzle-modal.is-hidden{display:none}
.puzzle-modal-card{width:min(420px,100%);border:1px solid #bad0ea;border-radius:20px;background:#fff;padding:25px;text-align:center;box-shadow:0 22px 60px rgba(18,48,82,.24)}
.puzzle-modal-kicker{font-size:10px;letter-spacing:.13em;font-weight:900;color:#155eef}
.puzzle-modal-card h3{margin:7px 0;font-size:24px;color:#17365f}
.puzzle-modal-card p{margin:0 0 17px;color:#71839a;font-size:13px}
.puzzle-modal-card>div{display:flex;justify-content:center;gap:7px}

/* Dark Mode */
html.bp-dark .puzzle-page{color:#dce6f2}
html.bp-dark .puzzle-title-line h2{color:#f1f5fc}
html.bp-dark .puzzle-title-line h2 small,
html.bp-dark .puzzle-topbar p,
html.bp-dark .puzzle-login-user{color:#97a6b9}
html.bp-dark .puzzle-stat-card,
html.bp-dark .puzzle-game-column,
html.bp-dark .puzzle-side-panel>div{background:#151f2e;border-color:#36506d;box-shadow:none}
html.bp-dark .puzzle-stat-title{color:#afbed0}
html.bp-dark .puzzle-stat-pair span{color:#d5e1ed}
html.bp-dark .puzzle-stat-pair i{color:#8195aa}
html.bp-dark .puzzle-stat-card.points .puzzle-stat-pair span{color:#9fc0ff}
html.bp-dark .puzzle-levels{background:#111d2c;border-color:#31465f}
html.bp-dark .puzzle-level{color:#a7b8ca}
html.bp-dark .puzzle-level.is-active{background:#1b3048;color:#9fc0ff;border-color:#42658d;box-shadow:none}
html.bp-dark .puzzle-toolbar strong,
html.bp-dark .puzzle-side-title strong{color:#e2ebf5}
html.bp-dark .puzzle-cell.is-answer{background:#101a28;border-color:#405570;color:#e6eef8}
html.bp-dark .puzzle-cell.is-selected{background:#172b46!important;border-color:#6299de!important}
html.bp-dark .puzzle-letter{color:#ecf3fb}
html.bp-dark .hangul-keyboard button,
html.bp-dark .hangul-control-row button,
html.bp-dark .puzzle-clues button{background:#111c2a;border-color:#36506d;color:#d6e2ef}
html.bp-dark .hangul-keyboard button:hover,
html.bp-dark .puzzle-clues button:hover{background:#192f48;border-color:#5689bd}
html.bp-dark .compose-preview{background:#101a27;color:#93a6ba}
html.bp-dark .puzzle-modal-card{background:#142033;border-color:#3b5877}
html.bp-dark .puzzle-modal-card h3{color:#eef5fc}
html.bp-dark .puzzle-modal-card p{color:#9eafc1}

@media(max-width:779px){
    .puzzle-shell{grid-template-columns:1fr}
    .puzzle-side-panel{grid-template-columns:1fr 1fr}
    .puzzle-keyboard-card{grid-column:1/-1}
}
@media(max-width:720px){
    .puzzle-page{width:calc(100% - 24px);max-width:none;margin-top:16px}
    .puzzle-topbar{align-items:flex-start}
    .puzzle-topbar p{display:none}
    .puzzle-history{grid-template-columns:1fr}
    .puzzle-levels{grid-template-columns:1fr}
    .puzzle-shell{display:block}
    .puzzle-side-panel{display:grid;grid-template-columns:1fr;margin-top:12px}
    .puzzle-board{gap:2px;padding:4px}
    .puzzle-cell{border-radius:5px}
    .puzzle-number{font-size:6px;left:2px;top:1px}
    .puzzle-letter{font-size:clamp(10px,3.8vw,16px)}
    .hangul-keyboard{grid-template-columns:repeat(5,1fr)}
}


/* =========================================================
   v2 dense-layout override
   ========================================================= */
.puzzle-shell{
    grid-template-columns:minmax(0,760px) 360px!important;
    gap:18px!important;
    align-items:start!important;
}
.puzzle-left-column{
    min-width:0;
}
.puzzle-game-column{
    padding:14px!important;
}
.puzzle-board{
    width:min(100%,620px)!important;
    margin:0 auto!important;
    aspect-ratio:1/1!important;
}
.puzzle-side-panel{
    display:block!important;
}
.puzzle-keyboard-card{
    padding:17px!important;
    position:sticky;
    top:84px;
}
.puzzle-side-title strong{
    font-size:16px!important;
}
.puzzle-side-title span{
    font-size:11px!important;
    line-height:1.5;
}
.hangul-section{
    margin-bottom:16px!important;
}
.hangul-section>b{
    font-size:12px!important;
    margin-bottom:8px!important;
}
.hangul-keyboard{
    grid-template-columns:repeat(5,1fr)!important;
    gap:7px!important;
}
.hangul-keyboard button{
    min-height:46px!important;
    border-radius:10px!important;
    font-size:18px!important;
}
.hangul-control-row{
    gap:8px!important;
    margin-top:12px!important;
}
.hangul-control-row button{
    min-height:44px!important;
    font-size:13px!important;
}
.compose-preview{
    min-height:38px;
    display:flex;
    align-items:center;
    margin-top:11px!important;
    padding:8px 10px!important;
    font-size:11px!important;
}
.puzzle-clues-row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
    margin-top:13px;
}
.puzzle-clues-card{
    padding:13px!important;
    border:1px solid #b9cde5;
    border-radius:14px;
    background:linear-gradient(135deg,#f9fcff,#eef5ff 65%,#f8fbff);
    box-shadow:0 5px 16px rgba(35,76,122,.045);
}
.puzzle-clues{
    max-height:270px!important;
}
.puzzle-clues button{
    grid-template-columns:24px 1fr!important;
    padding:8px 9px!important;
}
.puzzle-clues span{
    font-size:11px!important;
}
html.bp-dark .puzzle-clues-card{
    background:#151f2e!important;
    border-color:#36506d!important;
    box-shadow:none!important;
}

@media(max-width:1050px){
    .puzzle-shell{
        grid-template-columns:minmax(0,1fr) 330px!important;
    }
    .puzzle-board{
        width:min(100%,560px)!important;
    }
}
@media(max-width:779px){
    .puzzle-shell{
        display:block!important;
    }
    .puzzle-side-panel{
        margin-top:14px!important;
    }
    .puzzle-keyboard-card{
        position:static!important;
    }
    .puzzle-board{
        width:min(100%,600px)!important;
    }
}
@media(max-width:720px){
    .puzzle-clues-row{
        grid-template-columns:1fr!important;
    }
    .hangul-keyboard button{
        min-height:42px!important;
        font-size:17px!important;
    }
}


/* =========================================================
   v3 레이아웃
   초급: 퍼즐 50 / 자판 50
   중급: 퍼즐 54 / 자판 46
   고급: 퍼즐 58 / 자판 42
   ========================================================= */

.puzzle-page{
    --puzzle-left:50%;
    --puzzle-right:50%;
    --board-size:520px;
    --key-font:18px;
    --key-height:43px;
    --number-font:18px;
    --clue-font:10.5px;
}

.puzzle-page.level-beginner{
    --puzzle-left:50%;
    --puzzle-right:50%;
    --board-size:520px;
    --key-font:18px;
    --key-height:43px;
    --number-font:18px;
    --clue-font:10.5px;
}

.puzzle-page.level-intermediate{
    --puzzle-left:54%;
    --puzzle-right:46%;
    --board-size:555px;
    --key-font:16px;
    --key-height:39px;
    --number-font:16px;
    --clue-font:10px;
}

.puzzle-page.level-advanced{
    --puzzle-left:58%;
    --puzzle-right:42%;
    --board-size:590px;
    --key-font:14px;
    --key-height:35px;
    --number-font:14px;
    --clue-font:9.5px;
}

/* 퍼즐 + 자판 한 줄 */
.puzzle-shell{
    display:grid!important;
    grid-template-columns:
        minmax(0,var(--puzzle-left))
        minmax(0,var(--puzzle-right))!important;
    gap:12px!important;
    align-items:start!important;
}

.puzzle-left-column{
    min-width:0!important;
}

.puzzle-game-column{
    padding:10px!important;
}

/* 퍼즐판은 해당 영역 안에서 최대한 크게 */
.puzzle-board{
    width:min(100%,var(--board-size))!important;
    max-width:100%!important;
    margin:0 auto!important;
    aspect-ratio:1/1!important;
    gap:3px!important;
    padding:5px!important;
}

/* 번호는 자판 글자와 같은 크기 */
.puzzle-number{
    left:3px!important;
    top:2px!important;
    font-size:var(--number-font)!important;
    line-height:1!important;
    font-weight:900!important;
    opacity:.20!important;
    color:#17365f!important;
    z-index:1!important;
}

.puzzle-letter{
    z-index:2!important;
}

/* 자판 영역은 퍼즐 높이와 비슷하게 */
.puzzle-side-panel{
    display:block!important;
    min-width:0!important;
}

.puzzle-keyboard-card{
    position:static!important;
    padding:12px!important;
    min-height:0!important;
}

.puzzle-side-title{
    margin-bottom:8px!important;
}

.puzzle-side-title strong{
    font-size:14px!important;
}

.puzzle-side-title span{
    font-size:10px!important;
    line-height:1.35!important;
}

.hangul-section{
    margin-bottom:8px!important;
}

.hangul-section>b{
    margin-bottom:5px!important;
    font-size:10.5px!important;
}

.hangul-keyboard{
    grid-template-columns:repeat(5,1fr)!important;
    gap:5px!important;
}

.hangul-keyboard button{
    min-height:var(--key-height)!important;
    height:var(--key-height)!important;
    padding:0!important;
    font-size:var(--key-font)!important;
    border-radius:8px!important;
}

.hangul-control-row{
    gap:5px!important;
    margin-top:7px!important;
}

.hangul-control-row button{
    min-height:36px!important;
    height:36px!important;
    font-size:11px!important;
}

.compose-preview{
    min-height:32px!important;
    margin-top:7px!important;
    padding:6px 8px!important;
    font-size:9.5px!important;
}

/* 가로/세로 열쇠: index 전체 폭의 50% + 50% */
.puzzle-clues-row{
    width:100%!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:10px!important;
    margin-top:10px!important;
}

.puzzle-clues-card{
    min-width:0!important;
    padding:9px 10px!important;
}

.puzzle-clues-card .puzzle-side-title{
    margin-bottom:5px!important;
}

.puzzle-clues-card .puzzle-side-title strong{
    font-size:12px!important;
}

/*
 * 열쇠를 세로로 길게 만들지 않고 박스 안에서 여러 열로 배치.
 * 페이지 자체 스크롤 없이 퍼즐과 열쇠를 한 화면에 최대한 함께 보이게 함.
 */
.puzzle-clues{
    max-height:none!important;
    overflow:visible!important;
    display:block!important;
    column-count:2!important;
    column-gap:8px!important;
}

.puzzle-page.level-advanced .puzzle-clues{
    column-count:3!important;
}

.puzzle-clues li{
    break-inside:avoid!important;
    margin:0 0 3px!important;
}

.puzzle-clues button{
    display:grid!important;
    grid-template-columns:19px 1fr!important;
    gap:4px!important;
    padding:4px 5px!important;
    border-radius:6px!important;
}

.puzzle-clues b{
    font-size:var(--clue-font)!important;
}

.puzzle-clues span{
    font-size:var(--clue-font)!important;
    line-height:1.25!important;
}

/* 상단 요소도 조금 더 압축 */
.puzzle-levels{
    margin-bottom:8px!important;
}
.puzzle-toolbar{
    margin-bottom:8px!important;
}
.puzzle-toolbar strong{
    font-size:14px!important;
}
.puzzle-toolbar-actions .puzzle-primary-btn,
.puzzle-toolbar-actions .puzzle-secondary-btn{
    min-height:34px!important;
    height:34px!important;
    padding:0 11px!important;
    font-size:11px!important;
}
.puzzle-message{
    min-height:24px!important;
    margin-top:5px!important;
    padding:4px 7px!important;
    font-size:10.5px!important;
}

/* 다크모드 번호 */
html.bp-dark .puzzle-number{
    color:#d8e6f7!important;
    opacity:.22!important;
}

@media(max-width:779px){
    .puzzle-shell{
        grid-template-columns:1fr!important;
    }
    .puzzle-board{
        width:min(100%,560px)!important;
    }
    .puzzle-clues-row{
        grid-template-columns:1fr 1fr!important;
    }
}

@media(max-width:720px){
    .puzzle-clues-row{
        grid-template-columns:1fr!important;
    }
    .puzzle-clues{
        column-count:1!important;
    }
    .puzzle-page.level-advanced .puzzle-clues{
        column-count:1!important;
    }
}


/* =========================================================
   v4: clue placement + reveal answer
   ========================================================= */

/* 각 열쇠는 자신의 위 콘텐츠와 같은 50% 컬럼 안에 배치 */
.puzzle-left-column,
.puzzle-side-panel{
    display:flex!important;
    flex-direction:column!important;
    min-width:0!important;
}

.puzzle-clues-card--across,
.puzzle-clues-card--down{
    width:100%!important;
    margin-top:10px!important;
    box-sizing:border-box!important;
}

/* 기존 full-width clue-row는 v4에서 사용하지 않음 */
.puzzle-clues-row{
    display:none!important;
}

/* A/B 모두 동일 높이 감각 */
.puzzle-clues-card--across .puzzle-clues,
.puzzle-clues-card--down .puzzle-clues{
    max-height:250px!important;
    overflow:auto!important;
    column-count:2!important;
    column-gap:8px!important;
}

.puzzle-page.level-advanced .puzzle-clues-card--across .puzzle-clues,
.puzzle-page.level-advanced .puzzle-clues-card--down .puzzle-clues{
    column-count:2!important;
}

/* 정답 보기 버튼 */
.puzzle-reveal-btn{
    min-height:34px;
    height:34px;
    padding:0 11px;
    border:1px solid #9fb7d7;
    border-radius:10px;
    background:#eef4fb;
    color:#3f5f83;
    font-size:11px;
    font-weight:850;
    cursor:pointer;
}
.puzzle-reveal-btn:hover:not(:disabled){
    background:#e2edf9;
    border-color:#7fa3d0;
    color:#2367c4;
}
.puzzle-reveal-btn:disabled{
    cursor:default;
    opacity:.72;
}

/* 공개된 정답 셀 */
.puzzle-cell.is-revealed-cell{
    background:#eaf2ff!important;
    border-color:#79a4dc!important;
}
.puzzle-cell.is-revealed-cell .puzzle-letter{
    color:#155eef!important;
}
.puzzle-message.is-revealed{
    background:#eef5ff;
    border:1px solid #bad0ee;
    color:#456b99;
}

/* 우측 B 열쇠가 키보드 바로 아래 정렬되도록 */
.puzzle-side-panel .puzzle-keyboard-card{
    flex:0 0 auto!important;
}
.puzzle-side-panel .puzzle-clues-card--down{
    flex:1 1 auto!important;
}

/* dark */
html.bp-dark .puzzle-reveal-btn{
    background:#16263a;
    color:#a9c7eb;
    border-color:#405d7e;
}
html.bp-dark .puzzle-cell.is-revealed-cell{
    background:#173154!important;
    border-color:#4f7fb8!important;
}
html.bp-dark .puzzle-cell.is-revealed-cell .puzzle-letter{
    color:#a9ceff!important;
}
html.bp-dark .puzzle-message.is-revealed{
    background:#152944;
    border-color:#3f618c;
    color:#a8c5e9;
}

@media(max-width:779px){
    .puzzle-left-column,
    .puzzle-side-panel{
        display:flex!important;
    }
    .puzzle-clues-card--across .puzzle-clues,
    .puzzle-clues-card--down .puzzle-clues{
        max-height:none!important;
        overflow:visible!important;
    }
}

@media(max-width:720px){
    .puzzle-clues-card--across .puzzle-clues,
    .puzzle-clues-card--down .puzzle-clues{
        column-count:1!important;
    }
}


/* =========================================================
   v5: 정식 크로스워드 규칙 + 새 레이아웃
   ========================================================= */
.puzzle-workspace{
    width:100%;
}

.puzzle-top-workspace{
    display:grid;
    grid-template-columns:minmax(0,56%) minmax(0,44%);
    gap:12px;
    align-items:stretch;
}

.puzzle-game-column{
    padding:10px!important;
}

.puzzle-board{
    width:min(100%,590px)!important;
    margin:0 auto!important;
}

/* 오른쪽: 가로/세로 열쇠 위아래 */
.puzzle-clues-stack{
    min-width:0;
    display:grid;
    grid-template-rows:1fr 1fr;
    gap:10px;
}

.puzzle-clues-card{
    min-width:0;
    padding:10px!important;
    border:1px solid #b9cde5;
    border-radius:14px;
    background:linear-gradient(135deg,#f9fcff,#eef5ff 65%,#f8fbff);
    box-shadow:0 5px 16px rgba(35,76,122,.045);
}

.puzzle-clues{
    max-height:260px!important;
    overflow:auto!important;
    column-count:1!important;
}

.puzzle-clues button{
    padding:6px 7px!important;
    grid-template-columns:22px 1fr!important;
    transition:.12s ease;
}

.puzzle-clues button.is-active{
    border-color:#79a6df!important;
    background:#eaf2ff!important;
    box-shadow:0 0 0 2px rgba(21,94,239,.08);
}

.puzzle-clues button.is-active b,
.puzzle-clues button.is-active span{
    color:#155eef!important;
}

/* 현재 선택된 열쇠에 속하는 퍼즐 셀 */
.puzzle-cell.is-word-active:not(.is-selected){
    background:#f4f8ff!important;
    border-color:#8fb0db!important;
}

/* 자판은 아래에서 index 가로폭 100% */
.puzzle-keyboard-card--full{
    width:100%;
    box-sizing:border-box;
    margin-top:10px;
    padding:12px 14px!important;
    border:1px solid #b9cde5;
    border-radius:14px;
    background:linear-gradient(135deg,#f9fcff,#eef5ff 65%,#f8fbff);
    box-shadow:0 5px 16px rgba(35,76,122,.045);
}

.puzzle-keyboard-heading{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:8px;
}

.puzzle-keyboard-heading .puzzle-side-title{
    margin:0!important;
}

.puzzle-keyboard-heading .compose-preview{
    width:auto!important;
    min-width:210px;
    margin:0!important;
}

.puzzle-keyboard-wide{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px;
}

.puzzle-keyboard-wide .hangul-section{
    margin:0!important;
}

.puzzle-keyboard-wide .hangul-keyboard{
    gap:5px!important;
}

/* 자음 19개: 넓은 키보드 느낌 */
.puzzle-keyboard-wide .consonants{
    grid-template-columns:repeat(10,1fr)!important;
}

/* 모음 21개 */
.puzzle-keyboard-wide .vowels{
    grid-template-columns:repeat(11,1fr)!important;
}

.puzzle-keyboard-wide .hangul-keyboard button{
    min-height:40px!important;
    height:40px!important;
    font-size:16px!important;
}

.puzzle-keyboard-card--full .hangul-control-row{
    width:100%;
    margin-top:8px!important;
    grid-template-columns:1fr 1fr!important;
}

.puzzle-keyboard-card--full .hangul-control-row button{
    min-height:38px!important;
    height:38px!important;
}

/* 유효한 퍼즐은 억지로 80%를 채우지 않음 */
.puzzle-cell.is-block{
    opacity:1;
}

/* Dark mode */
html.bp-dark .puzzle-clues-card,
html.bp-dark .puzzle-keyboard-card--full{
    background:#151f2e!important;
    border-color:#36506d!important;
    box-shadow:none!important;
}
html.bp-dark .puzzle-clues button.is-active{
    background:#18304e!important;
    border-color:#527cac!important;
}
html.bp-dark .puzzle-clues button.is-active b,
html.bp-dark .puzzle-clues button.is-active span{
    color:#a8cdff!important;
}
html.bp-dark .puzzle-cell.is-word-active:not(.is-selected){
    background:#152b45!important;
    border-color:#4d709b!important;
}

@media(max-width:779px){
    .puzzle-top-workspace{
        grid-template-columns:1fr;
    }
    .puzzle-clues-stack{
        grid-template-columns:1fr 1fr;
        grid-template-rows:auto;
    }
    .puzzle-keyboard-wide{
        grid-template-columns:1fr;
    }
}

@media(max-width:720px){
    .puzzle-clues-stack{
        grid-template-columns:1fr;
    }
    .puzzle-keyboard-heading{
        align-items:flex-start;
        flex-direction:column;
    }
    .puzzle-keyboard-heading .compose-preview{
        min-width:0;
        width:100%!important;
    }
    .puzzle-keyboard-wide .consonants,
    .puzzle-keyboard-wide .vowels{
        grid-template-columns:repeat(5,1fr)!important;
    }
}



/* ===== v6 ===== */
.puzzle-top-workspace{
 grid-template-columns:minmax(0,40%) minmax(0,60%)!important;
 gap:12px!important;
 align-items:stretch!important;
}
.puzzle-game-column{min-width:0!important;padding:9px!important}
.puzzle-board{
 width:100%!important;max-width:none!important;margin:0!important;
 aspect-ratio:1/1!important;gap:3px!important;padding:5px!important;
}
.puzzle-page.level-beginner .puzzle-letter{font-size:clamp(14px,1.55vw,20px)!important}
.puzzle-page.level-intermediate .puzzle-letter{font-size:clamp(12px,1.30vw,17px)!important}
.puzzle-page.level-advanced .puzzle-letter{font-size:clamp(10px,1.05vw,14px)!important}
.puzzle-page .puzzle-number{font-size:12px!important}

.puzzle-clues-stack{
 display:grid!important;grid-template-rows:1fr 1fr!important;
 gap:10px!important;min-height:0!important;
}
.puzzle-clues-card{min-height:0!important;overflow:hidden!important;padding:11px 12px!important}
.puzzle-clues-card .puzzle-side-title strong{font-size:16px!important}
.puzzle-clues-card .puzzle-side-title span{font-size:11px!important}
.puzzle-clues{
 column-count:1!important;max-height:205px!important;
 overflow-y:auto!important;overflow-x:hidden!important;
 padding-right:5px!important;scrollbar-width:thin;
}
.puzzle-clues li{margin-bottom:5px!important}
.puzzle-clues button{padding:7px 8px!important;grid-template-columns:25px 1fr!important}
.puzzle-clues b,.puzzle-clues span{font-size:12.5px!important}
.puzzle-clues span{line-height:1.4!important}

.puzzle-page.theme-blue{--b1:#061d50;--b2:#0b5bd3;--b3:#0a2f79;--bb:#0f4fb7;--bg:rgba(90,166,255,.38)}
.puzzle-page.theme-purple{--b1:#25054f;--b2:#6c20c9;--b3:#3b0a78;--bb:#6330a9;--bg:rgba(177,101,255,.40)}
.puzzle-page.theme-green{--b1:#062f24;--b2:#0a7e56;--b3:#07513b;--bb:#177253;--bg:rgba(79,216,166,.36)}
.puzzle-page.theme-orange{--b1:#572100;--b2:#c85b06;--b3:#853300;--bb:#b6530e;--bg:rgba(255,160,66,.40)}
.puzzle-page.theme-black{--b1:#030303;--b2:#252525;--b3:#0b0b0b;--bb:#383838;--bg:rgba(255,255,255,.16)}
.puzzle-cell.is-block{
 border-color:var(--bb,#0f4fb7)!important;
 background:
  radial-gradient(circle at 28% 22%,rgba(255,255,255,.48) 0 3%,transparent 4%),
  linear-gradient(145deg,var(--b1,#061d50),var(--b2,#0b5bd3) 48%,var(--b3,#0a2f79))!important;
 box-shadow:inset 0 0 10px var(--bg,rgba(90,166,255,.35)),0 1px 3px rgba(5,34,82,.18)!important;
}

.puzzle-keyboard-card--full{margin-top:8px!important;padding:9px 11px!important}
.puzzle-keyboard-heading{margin-bottom:5px!important}
.puzzle-keyboard-heading .puzzle-side-title strong{font-size:14px!important}
.puzzle-keyboard-heading .puzzle-side-title span{font-size:10px!important}
.puzzle-keyboard-wide{grid-template-columns:1fr 1fr!important;gap:10px!important}
.puzzle-keyboard-wide .hangul-keyboard{
 display:grid!important;grid-template-columns:repeat(10,1fr)!important;gap:4px!important;
}
.puzzle-keyboard-wide .vowels{grid-template-columns:repeat(7,1fr)!important}
.puzzle-keyboard-wide .hangul-keyboard button{
 min-height:34px!important;height:34px!important;font-size:15px!important;
 padding:0!important;border-radius:7px!important;
}
.puzzle-keyboard-card--full .hangul-control-row{margin-top:5px!important}
.puzzle-keyboard-card--full .hangul-control-row button{min-height:32px!important;height:32px!important}

.mobile-puzzle-input{
 position:fixed;left:-9999px;bottom:0;width:1px;height:1px;opacity:.01;
}
.mobile-next-cell-btn{display:none}
html.bp-dark .puzzle-clues{scrollbar-color:#465c75 #162130}

@media(max-width:720px){
 .puzzle-top-workspace{grid-template-columns:1fr!important}
 .puzzle-board{width:min(100%,420px)!important;margin:0 auto!important}
 .puzzle-clues-stack{grid-template-columns:1fr!important;grid-template-rows:auto auto!important}
 .puzzle-clues{max-height:190px!important}
 .puzzle-keyboard-card--full{display:none!important}
 .mobile-next-cell-btn{
  display:block;position:fixed;right:14px;bottom:14px;z-index:9990;
  min-width:92px;min-height:44px;padding:0 16px;
  border:1px solid #0b4bd4;border-radius:13px;background:#155eef;color:#fff;
  font-size:13px;font-weight:900;box-shadow:0 7px 20px rgba(18,67,150,.28);
 }
}


/* =========================================================
   v7 FIXED BOARD + MATCHED CLUE HEIGHT
   ========================================================= */
.puzzle-top-workspace{
    display:grid!important;
    grid-template-columns:minmax(0,40fr) minmax(0,60fr)!important;
    gap:12px!important;
    align-items:start!important;
}

.puzzle-game-column{
    width:100%!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    align-self:start!important;
    box-sizing:border-box!important;
}

.puzzle-board{
    width:100%!important;
    max-width:100%!important;
    aspect-ratio:1 / 1!important;
    height:auto!important;
    margin:0!important;
    box-sizing:border-box!important;
    flex:none!important;
}

/* Different puzzle contents must never change board dimensions. */
.puzzle-page.level-beginner .puzzle-board,
.puzzle-page.level-intermediate .puzzle-board,
.puzzle-page.level-advanced .puzzle-board{
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
}

/* Right side gets the exact pixel height of .puzzle-game-column from JS. */
.puzzle-clues-stack{
    min-width:0!important;
    min-height:0!important;
    display:grid!important;
    grid-template-rows:minmax(0,1fr) minmax(0,1fr)!important;
    gap:10px!important;
    overflow:hidden!important;
    align-self:start!important;
}

.puzzle-clues-card{
    min-width:0!important;
    min-height:0!important;
    height:auto!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
}

.puzzle-clues-card .puzzle-side-title{
    flex:0 0 auto!important;
    margin-bottom:7px!important;
}

.puzzle-clues{
    flex:1 1 auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
    padding-right:6px!important;
}

.puzzle-clues::-webkit-scrollbar{
    width:10px;
}
.puzzle-clues::-webkit-scrollbar-track{
    background:rgba(120,145,175,.10);
    border-radius:8px;
}
.puzzle-clues::-webkit-scrollbar-thumb{
    background:#9bb4d1;
    border-radius:8px;
    border:2px solid transparent;
    background-clip:padding-box;
}

/* larger clue text as requested */
.puzzle-clues-card .puzzle-side-title strong{
    font-size:17px!important;
}
.puzzle-clues b{
    font-size:13px!important;
}
.puzzle-clues span{
    font-size:13px!important;
    line-height:1.42!important;
}

/* message area must not create a large empty block */
.puzzle-message{
    min-height:22px!important;
    height:auto!important;
    margin-bottom:0!important;
}

/* mobile does not force matched desktop height */
@media(max-width:720px){
    .puzzle-clues-stack{
        height:auto!important;
        overflow:visible!important;
    }
    .puzzle-clues-card{
        max-height:240px!important;
    }
    .puzzle-clues{
        max-height:190px!important;
    }
}


/* =========================================================
   v8 fixed 40% board / vertical clue scroll / loading overlay
   ========================================================= */
.puzzle-top-workspace{
    grid-template-columns:minmax(0,40fr) minmax(0,60fr)!important;
    align-items:start!important;
}

.puzzle-game-column{
    min-height:0!important;
    height:auto!important;
    align-self:start!important;
}

.puzzle-board-stage{
    position:relative;
    width:100%;
    aspect-ratio:1/1;
}

.puzzle-board-stage .puzzle-board{
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    height:100%!important;
    max-width:none!important;
    margin:0!important;
    grid-auto-rows:minmax(0,1fr)!important;
    box-sizing:border-box!important;
}

/* 초급/중급/고급 모두 외곽 크기는 동일 */
.puzzle-page.level-beginner .puzzle-board-stage,
.puzzle-page.level-intermediate .puzzle-board-stage,
.puzzle-page.level-advanced .puzzle-board-stage{
    width:100%!important;
    aspect-ratio:1/1!important;
}

/* loading */
.puzzle-loading{
    position:absolute;
    inset:0;
    z-index:30;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:16px;
    border-radius:15px;
    background:rgba(246,250,255,.91);
    backdrop-filter:blur(2px);
}
.puzzle-loading.is-hidden{display:none!important}
.puzzle-loading-spinner{
    width:200px;
    height:200px;
    border-radius:50%;
    border:13px solid rgba(21,94,239,.13);
    border-top-color:#155eef;
    border-right-color:#6ea4f5;
    box-sizing:border-box;
    animation:puzzleLoadingSpin .78s linear infinite;
    box-shadow:0 8px 30px rgba(21,94,239,.10);
}
.puzzle-loading strong{
    color:#315d94;
    font-size:14px;
    font-weight:900;
}
@keyframes puzzleLoadingSpin{
    to{transform:rotate(360deg)}
}

/* clue boxes: ONLY vertical scrolling */
.puzzle-clues-stack{
    overflow:hidden!important;
    min-height:0!important;
    grid-template-rows:minmax(0,1fr) minmax(0,1fr)!important;
}
.puzzle-clues-card{
    min-height:0!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
}
.puzzle-clues{
    flex:1 1 auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    column-count:1!important;
    columns:auto!important;
    white-space:normal!important;
    padding-right:7px!important;
    scrollbar-gutter:stable;
    overscroll-behavior:contain;
}
.puzzle-clues li,
.puzzle-clues button{
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
}
.puzzle-clues button{
    white-space:normal!important;
}
.puzzle-clues span{
    overflow-wrap:anywhere;
    word-break:keep-all;
}
.puzzle-clues::-webkit-scrollbar{width:10px;height:0}
.puzzle-clues::-webkit-scrollbar-track{
    background:rgba(107,132,162,.10);
    border-radius:10px;
}
.puzzle-clues::-webkit-scrollbar-thumb{
    background:#91aac8;
    border-radius:10px;
    border:2px solid transparent;
    background-clip:padding-box;
}

html.bp-dark .puzzle-loading{
    background:rgba(15,25,39,.93);
}
html.bp-dark .puzzle-loading-spinner{
    border-color:rgba(111,164,245,.13);
    border-top-color:#70a8ff;
    border-right-color:#b1d0ff;
}
html.bp-dark .puzzle-loading strong{color:#b9d4f8}

@media(max-width:720px){
    .puzzle-loading-spinner{
        width:130px;
        height:130px;
        border-width:10px;
    }
}


/* =========================================================
   v9: clue scroll must be VERTICAL ONLY
   ========================================================= */
.puzzle-clues-card{
    overflow:hidden!important;
}
.puzzle-clues{
    display:block!important;
    columns:unset!important;
    column-count:1!important;
    column-width:auto!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    max-height:none!important;
    overflow-y:scroll!important;
    overflow-x:hidden!important;
    white-space:normal!important;
    writing-mode:horizontal-tb!important;
    box-sizing:border-box!important;
    touch-action:pan-y!important;
}
.puzzle-clues li{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    break-inside:auto!important;
    page-break-inside:auto!important;
}
.puzzle-clues button{
    display:grid!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    grid-template-columns:26px minmax(0,1fr)!important;
    box-sizing:border-box!important;
}
.puzzle-clues span{
    display:block!important;
    min-width:0!important;
    max-width:100%!important;
    white-space:normal!important;
    overflow-wrap:break-word!important;
    word-break:keep-all!important;
}
.puzzle-clues::-webkit-scrollbar{
    width:11px!important;
    height:0!important;
}


/* =========================================================
   v10 ABSOLUTE VERTICAL-ONLY CLUE SCROLL
   ========================================================= */
.puzzle-top-workspace,
.puzzle-clues-stack,
.puzzle-clues-card,
.puzzle-clues-card .puzzle-side-title,
.puzzle-clues{
    min-width:0!important;
    max-width:100%!important;
    overflow-x:hidden!important;
}

.puzzle-clues-stack{
    width:100%!important;
    box-sizing:border-box!important;
}

.puzzle-clues-card{
    width:100%!important;
    box-sizing:border-box!important;
}

/*
 * OL 자체를 다단/가로 흐름에서 완전히 분리.
 * flex column + overflow-y scroll만 사용.
 */
ol.puzzle-clues{
    display:flex!important;
    flex-direction:column!important;
    flex-wrap:nowrap!important;
    gap:5px!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:0 7px 0 0!important;

    columns:initial!important;
    column-count:initial!important;
    column-width:initial!important;
    column-gap:initial!important;

    overflow-y:auto!important;
    overflow-x:hidden!important;
    scrollbar-gutter:stable!important;
    overscroll-behavior-y:contain!important;
    overscroll-behavior-x:none!important;
    touch-action:pan-y!important;
}

ol.puzzle-clues > li{
    display:block!important;
    flex:0 0 auto!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
}

ol.puzzle-clues > li > button{
    display:grid!important;
    grid-template-columns:28px minmax(0,1fr)!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
}

ol.puzzle-clues > li > button > span{
    min-width:0!important;
    max-width:100%!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
}

ol.puzzle-clues::-webkit-scrollbar{
    width:12px!important;
    height:0!important;
}
ol.puzzle-clues::-webkit-scrollbar:horizontal{
    display:none!important;
    height:0!important;
}

/* Prevent any accidental horizontal scrollbar on right 60% column */
.puzzle-clues-stack *{
    box-sizing:border-box!important;
}


/* v12 word-pool diagnostic */
.puzzle-rebuild-link{
    display:inline-flex;
    align-items:center;
    min-height:28px;
    margin-left:7px;
    padding:0 10px;
    border:1px solid #c88c93;
    border-radius:8px;
    background:#fff;
    color:#9a4f57!important;
    font-weight:900;
    text-decoration:none!important;
}
.puzzle-rebuild-link:hover{
    background:#fff7f7;
}
html.bp-dark .puzzle-rebuild-link{
    background:#26303d;
    border-color:#81565c;
    color:#f0b1b7!important;
}


/* clean runtime: vertical clue scrolling only */
.puzzle-clues-stack,
.puzzle-clues-card,
ol.puzzle-clues{
    overflow-x:hidden!important;
    min-width:0!important;
}
ol.puzzle-clues{
    display:flex!important;
    flex-direction:column!important;
    flex-wrap:nowrap!important;
    column-count:initial!important;
    columns:initial!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    max-width:100%!important;
    touch-action:pan-y!important;
}
ol.puzzle-clues>li,
ol.puzzle-clues>li>button{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
}
ol.puzzle-clues>li>button>span{
    min-width:0!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
}

/* 실제 PC/모바일 키보드 입력을 받는 숨은 input */
.mobile-puzzle-input{
    position:fixed!important;
    left:-10000px!important;
    top:auto!important;
    bottom:0!important;
    width:2px!important;
    height:2px!important;
    opacity:.01!important;
    pointer-events:none!important;
}


/* Dense70 + physical keyboard IME preview */
.desktop-typing-preview{
    display:flex;
    align-items:center;
    gap:10px;
    min-height:40px;
    margin:8px 0 6px;
    padding:7px 12px;
    border:1px solid #c3d6ec;
    border-radius:10px;
    background:#f7fbff;
}
.desktop-typing-preview__label{
    flex:0 0 auto;
    padding-right:10px;
    border-right:1px solid #d9e5f0;
    color:#6d87a2;
    font-size:11px;
    font-weight:900;
}
.desktop-typing-preview strong{
    color:#0e56c9;
    font-size:15px;
    font-weight:900;
}
.desktop-typing-preview.is-typing{
    background:#eef6ff;
    border-color:#8db6ee;
}
.desktop-typing-preview.is-typing strong{
    color:#075ee8;
    font-size:19px;
}
.puzzle-cell.is-selected{
    outline:3px solid rgba(21,94,239,.32)!important;
    outline-offset:-3px!important;
}
@media(max-width:720px){
    .desktop-typing-preview{display:none!important;}
}
html.bp-dark .desktop-typing-preview{
    background:#172334;
    border-color:#42566e;
}
html.bp-dark .desktop-typing-preview strong{
    color:#93bcff;
}


/* =========================================================
   word-pool cleanup / physical keyboard / in-board celebration
   ========================================================= */

.desktop-typing-preview{
    display:flex;
    align-items:center;
    gap:10px;
    min-height:36px;
    margin:7px 0 6px;
    padding:6px 11px;
    border:1px solid #c7d8ea;
    border-radius:9px;
    background:#f8fbff;
}
.desktop-typing-preview__label{
    flex:0 0 auto;
    font-size:10px;
    font-weight:900;
    color:#7089a5;
}
.desktop-typing-preview strong{
    min-width:0;
    font-size:12px;
    font-weight:800;
    color:#466687;
}

.puzzle-cell{
    position:relative!important;
}

.cell-inline-ime{
    position:absolute;
    inset:0;
    z-index:8;
    display:none;
    align-items:center;
    justify-content:center;
    background:rgba(238,246,255,.94);
    color:#075ee8;
    font-size:clamp(16px,2vw,24px);
    font-weight:950;
    line-height:1;
    border-radius:inherit;
    pointer-events:none;
}
.cell-inline-ime.is-visible{
    display:flex;
}

.puzzle-cell.is-selected{
    outline:3px solid rgba(21,94,239,.34)!important;
    outline-offset:-3px!important;
}

/* Celebration happens ONLY inside the puzzle board */
#puzzleBoard.is-celebrating{
    position:relative;
    overflow:hidden;
}
#puzzleBoard.is-celebrating::after{
    content:"정답입니다!";
    position:absolute;
    left:50%;
    top:50%;
    z-index:40;
    transform:translate(-50%,-50%) scale(.92);
    padding:10px 18px;
    border-radius:999px;
    background:rgba(255,255,255,.94);
    color:#0b56c5;
    border:1px solid #9fc0ef;
    box-shadow:0 10px 28px rgba(12,67,150,.18);
    font-size:18px;
    font-weight:950;
    animation:boardCongrats .65s ease-out both;
    pointer-events:none;
}
.puzzle-cell.celebration-flash{
    animation:cellCelebrationFlash .65s ease-in-out both!important;
}
@keyframes cellCelebrationFlash{
    0%{transform:scale(1);filter:brightness(1)}
    35%{transform:scale(.92) rotate(-2deg);filter:brightness(1.45)}
    70%{transform:scale(1.06) rotate(2deg);filter:brightness(1.18)}
    100%{transform:scale(1);filter:brightness(1)}
}
@keyframes boardCongrats{
    from{opacity:0;transform:translate(-50%,-50%) scale(.75)}
    to{opacity:1;transform:translate(-50%,-50%) scale(1)}
}

/* disable old fullscreen celebration overlay if markup remains */
#puzzleCelebration,
.puzzle-celebration{
    display:none!important;
}

@media(max-width:720px){
    .desktop-typing-preview{
        display:none!important;
    }
}

html.bp-dark .desktop-typing-preview{
    background:#172334;
    border-color:#41566e;
}
html.bp-dark .desktop-typing-preview strong{
    color:#b2c8e2;
}
html.bp-dark .cell-inline-ime{
    background:rgba(28,43,61,.96);
    color:#8eb9ff;
}


/* ===== FINAL FIX: keyboard + in-board celebration ===== */
#puzzleCelebration,
.puzzle-celebration{
    display:none!important;
}
#puzzleBoard{
    position:relative!important;
    overflow:hidden!important;
}
#puzzleBoard.is-celebrating::after{
    content:"정답입니다!";
    position:absolute;
    left:50%;
    top:50%;
    z-index:50;
    transform:translate(-50%,-50%);
    padding:10px 18px;
    border-radius:999px;
    background:rgba(255,255,255,.94);
    color:#0b56c5;
    border:1px solid #9fc0ef;
    box-shadow:0 10px 28px rgba(12,67,150,.20);
    font-size:18px;
    font-weight:950;
    pointer-events:none;
}
.puzzle-cell.celebration-flash{
    animation:bpCellDance .62s ease-in-out both!important;
}
@keyframes bpCellDance{
    0%{transform:scale(1);filter:brightness(1)}
    35%{transform:scale(.91) rotate(-2deg);filter:brightness(1.48)}
    70%{transform:scale(1.06) rotate(2deg);filter:brightness(1.16)}
    100%{transform:scale(1);filter:brightness(1)}
}
.cell-inline-ime{
    position:absolute;
    inset:0;
    z-index:12;
    display:none;
    align-items:center;
    justify-content:center;
    background:rgba(240,247,255,.96);
    color:#075ee8;
    font-weight:950;
    font-size:clamp(16px,2vw,24px);
    pointer-events:none;
}
.cell-inline-ime.is-visible{display:flex;}


/* =========================================================
   2026-08-12: keyboard heading + 10-inch tablet landscape
   ========================================================= */

/* "셀 또는 열쇠를 선택한 뒤 입력하세요." - one step larger */
.puzzle-keyboard-card--full .puzzle-keyboard-heading .puzzle-side-title span{
    font-size:12px!important;
    line-height:1.5!important;
}

/* "선택한 셀: 1행 1열 · 리" - right edge of keyboard heading */
.puzzle-keyboard-card--full .puzzle-keyboard-heading{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:16px!important;
    width:100%!important;
}

.puzzle-keyboard-card--full .puzzle-keyboard-heading .puzzle-side-title{
    flex:0 1 auto!important;
    min-width:0!important;
}

.puzzle-keyboard-card--full .puzzle-keyboard-heading .compose-preview{
    flex:0 0 auto!important;
    min-width:250px!important;
    width:auto!important;
    margin:0 4px 0 auto!important;
    padding:8px 10px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    text-align:right!important;
    font-size:12px!important;
    line-height:1.35!important;
    white-space:nowrap!important;
}

/*
 * 10-inch tablet / small laptop landscape:
 * Keep the same desktop 40:60 puzzle+clues layout instead of stacking.
 * Leave 120px rails on both sides for advertising.
 */
@media (min-width:780px) and (max-width:1579px){
    .puzzle-page{
        width:calc(100% - 272px)!important;
        max-width:1360px!important;
        min-width:0!important;
        margin-left:auto!important;
        margin-right:auto!important;
    }

    .puzzle-top-workspace{
        display:grid!important;
        grid-template-columns:minmax(0,40fr) minmax(0,60fr)!important;
        gap:10px!important;
        align-items:start!important;
    }

    .puzzle-clues-stack{
        display:grid!important;
        grid-template-columns:1fr!important;
        grid-template-rows:minmax(0,1fr) minmax(0,1fr)!important;
    }

    .puzzle-keyboard-wide{
        grid-template-columns:1fr 1fr!important;
    }

    .puzzle-keyboard-card--full{
        display:block!important;
    }

    .puzzle-levels{
        grid-template-columns:repeat(3,1fr)!important;
    }
}

/* Tablet portrait / phones keep the existing mobile behavior. */
@media (max-width:779px){
    .puzzle-page{
        width:calc(100% - 24px)!important;
        max-width:none!important;
    }
}

@media (max-width:720px){
    .puzzle-keyboard-card--full .puzzle-keyboard-heading{
        align-items:flex-start!important;
        flex-direction:column!important;
    }
    .puzzle-keyboard-card--full .puzzle-keyboard-heading .compose-preview{
        min-width:0!important;
        width:100%!important;
        margin:0!important;
        justify-content:flex-start!important;
        text-align:left!important;
        white-space:normal!important;
    }
}


/* ===== BiblePang game timer V1 ===== */
.game-live-timer{
    display:flex;
    align-items:center;
    gap:8px;
    white-space:nowrap;
    font-variant-numeric:tabular-nums;
}
.game-live-timer span{
    font-size:11px;
    font-weight:800;
    letter-spacing:.04em;
    opacity:.72;
}
.game-live-timer strong{
    min-width:82px;
    padding:6px 10px;
    border-radius:10px;
    border:1px solid rgba(83,135,190,.30);
    background:rgba(232,244,255,.78);
    color:#24568c;
    text-align:center;
    font-size:14px;
    font-weight:950;
    line-height:1;
}
.wordsearch-toolbar{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;
    align-items:center!important;
}
.wordsearch-toolbar .puzzle-toolbar-actions{justify-self:end;}
.game-live-timer--wordsearch{justify-self:center;}
.puzzle-side-title--with-timer{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:12px;
}
.game-live-timer--crossword{margin-left:auto;}
html.bp-dark .game-live-timer strong{
    background:#13263a!important;
    border-color:#35536f!important;
    color:#a9d6ff!important;
}
html.bp-dark .game-live-timer span{color:#a8bfd4!important;}

.puzzle-stat-card.best-time .puzzle-stat-pair{
    gap:4px;
}
.puzzle-stat-card.best-time .puzzle-stat-pair span{
    white-space:nowrap;
}
@media(max-width:720px){
    .wordsearch-toolbar{
        grid-template-columns:1fr auto!important;
    }
    .game-live-timer--wordsearch{
        grid-column:1/-1;
        grid-row:2;
        justify-self:center;
        margin-top:8px;
    }
    .puzzle-side-title--with-timer{
        align-items:flex-start!important;
    }
    .game-live-timer{
        gap:5px;
    }
    .game-live-timer strong{
        min-width:72px;
        font-size:12px;
        padding:5px 7px;
    }
}


/* ===== V2 crossword clue header/timer alignment fix =====
   One header box: left title / right-aligned guide / far-right timer.
*/
.puzzle-side-title.puzzle-side-title--with-timer{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr) auto!important;
    align-items:center!important;
    width:100%!important;
    gap:10px!important;
}
.puzzle-side-title--with-timer .puzzle-side-heading{
    display:block!important;
    justify-self:start!important;
    text-align:left!important;
    margin:0!important;
    white-space:nowrap!important;
}
.puzzle-side-title--with-timer .puzzle-side-guide{
    display:block!important;
    justify-self:end!important;
    text-align:right!important;
    margin:0!important;
    min-width:0!important;
    white-space:nowrap!important;
}
.puzzle-side-title--with-timer .game-live-timer--crossword{
    display:flex!important;
    align-items:center!important;
    justify-self:end!important;
    margin:0!important;
    padding-left:10px!important;
    border-left:1px solid rgba(83,135,190,.22);
}
.puzzle-side-title--with-timer .game-live-timer--crossword span{
    white-space:nowrap!important;
}
.puzzle-side-title--with-timer .game-live-timer--crossword strong{
    white-space:nowrap!important;
}
html.bp-dark .puzzle-side-title--with-timer .game-live-timer--crossword{
    border-left-color:#35536f!important;
}
@media(max-width:720px){
    .puzzle-side-title.puzzle-side-title--with-timer{
        grid-template-columns:auto minmax(0,1fr) auto!important;
        gap:6px!important;
    }
    .puzzle-side-title--with-timer .puzzle-side-guide{
        overflow:hidden!important;
        text-overflow:ellipsis!important;
        font-size:10px!important;
    }
    .puzzle-side-title--with-timer .game-live-timer--crossword{
        padding-left:6px!important;
    }
}


/* =========================================================
   2026-08-13 — 상단 통계 카드 4개 한 줄 배치
   퍼즐 도전 / 퍼즐 성공 / 나의 최고기록 / 포인트
   또는 단어찾기 4개 통계 카드를 index 전체 폭 안에 균등 배치
   ========================================================= */

.puzzle-history{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:10px!important;
    width:100%!important;
    align-items:stretch!important;
}

.puzzle-history .puzzle-stat-card{
    min-width:0!important;
    width:100%!important;
    box-sizing:border-box!important;
    padding:12px 13px!important;
}

.puzzle-history .puzzle-stat-title{
    font-size:11.5px!important;
    line-height:1.25!important;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.puzzle-history .puzzle-stat-pair span{
    font-size:11.5px!important;
    line-height:1.4!important;
}

.puzzle-history .puzzle-stat-pair i{
    min-width:37px!important;
    font-size:10px!important;
}

/* 중간 폭에서는 2×2, 모바일에서는 1열 */
@media(max-width:779px){
    .puzzle-history{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }
}

@media(max-width:560px){
    .puzzle-history{
        grid-template-columns:1fr!important;
    }
}


/* =========================================================
   BiblePang Puzzle Theme V1
   7-color unified theme + dashboard
   ========================================================= */
.puzzle-page{
    --puzzle-light:#edf7ff;--puzzle-soft:#cde8ff;--puzzle-mid:#68afe8;
    --puzzle-dark:#337ab8;--puzzle-deep:#1b4f81;--puzzle-ink:#183652;
}
.puzzle-theme-red{--puzzle-light:#ffe7eb;--puzzle-soft:#ffcbd3;--puzzle-mid:#ee7181;--puzzle-dark:#bf3f58;--puzzle-deep:#78283b;--puzzle-ink:#4a2230}
.puzzle-theme-orange{--puzzle-light:#fff0df;--puzzle-soft:#ffd9af;--puzzle-mid:#f59a47;--puzzle-dark:#c96122;--puzzle-deep:#7b3913;--puzzle-ink:#4c2a16}
.puzzle-theme-yellow{--puzzle-light:#fff8d8;--puzzle-soft:#ffe99b;--puzzle-mid:#eac246;--puzzle-dark:#a97d17;--puzzle-deep:#674a0d;--puzzle-ink:#473913}
.puzzle-theme-green{--puzzle-light:#eafaf0;--puzzle-soft:#c9efd7;--puzzle-mid:#61c287;--puzzle-dark:#2b895a;--puzzle-deep:#175b3b;--puzzle-ink:#173a2b}
.puzzle-theme-blue{--puzzle-light:#edf7ff;--puzzle-soft:#cde8ff;--puzzle-mid:#68afe8;--puzzle-dark:#337ab8;--puzzle-deep:#1b4f81;--puzzle-ink:#183652}
.puzzle-theme-indigo{--puzzle-light:#f1f2ff;--puzzle-soft:#d9ddff;--puzzle-mid:#8994dc;--puzzle-dark:#5662ae;--puzzle-deep:#343d79;--puzzle-ink:#292f55}
.puzzle-theme-purple{--puzzle-light:#faf1ff;--puzzle-soft:#ead5ff;--puzzle-mid:#b07bdb;--puzzle-dark:#7948aa;--puzzle-deep:#4e2d77;--puzzle-ink:#38224a}

/* dashboard */
.puzzle-dashboard{
    display:grid;
    grid-template-columns:minmax(300px,1.2fr) minmax(0,3.15fr) 88px;
    gap:9px;align-items:stretch;
    padding:9px 11px;margin-bottom:17px;
    border:1px solid var(--puzzle-mid);
    border-radius:18px;
    background:
        radial-gradient(circle at 3% 12%,var(--puzzle-soft) 0,transparent 25%),
        linear-gradient(110deg,var(--puzzle-light),#fff 48%,var(--puzzle-light));
    box-shadow:0 7px 20px rgba(35,62,82,.07);
}
.puzzle-brand{display:flex;align-items:center;gap:10px;min-width:0}
.puzzle-game-logo{width:70px;height:70px;flex:0 0 70px;border-radius:18px;overflow:hidden;border:1px solid var(--puzzle-mid);background:var(--puzzle-soft)}
.puzzle-game-logo svg{display:block;width:100%;height:100%}
.puzzle-brand-copy .puzzle-kicker{color:var(--puzzle-dark)!important}
.puzzle-brand-copy h2{margin:2px 0!important;font-size:23px!important;color:var(--puzzle-ink)!important}
.puzzle-brand-copy h2 small{font-size:.52em;color:var(--puzzle-dark)!important}
.puzzle-brand-copy p{margin:0;color:var(--puzzle-dark)!important;font-size:10.5px!important;white-space:nowrap}

/* four stat cards, all content visible */
.puzzle-dashboard .puzzle-history{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:7px!important;margin:0!important;min-width:0
}
.puzzle-dashboard .puzzle-stat-card{
    min-width:0;
    display:grid!important;
    grid-template-columns:34px minmax(0,1fr)!important;
    align-items:center!important;
    gap:6px!important;
    padding:7px 8px!important;
    background:linear-gradient(145deg,#fff,var(--puzzle-light))!important;
    border:1px solid var(--puzzle-soft)!important;
    border-radius:12px!important;
    box-shadow:none!important;
}
.puzzle-stat-icon{width:32px;height:32px;display:flex;align-items:center;justify-content:center;color:var(--puzzle-dark)}
.puzzle-stat-icon svg{width:29px;height:29px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.puzzle-stat-card.stat-attempts .puzzle-stat-icon{color:#7366d8}
.puzzle-stat-card.stat-clears .puzzle-stat-icon{color:#28b99b}
.puzzle-stat-card.best-time .puzzle-stat-icon{color:#e8a01d}
.puzzle-stat-card.stat-points .puzzle-stat-icon{color:#ef9918}
.puzzle-stat-copy{min-width:0}
.puzzle-dashboard .puzzle-stat-title{display:block;margin:0 0 2px!important;font-size:9.5px!important;color:var(--puzzle-deep)!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.puzzle-dashboard .puzzle-stat-pair{display:flex!important;flex-direction:column!important;gap:1px!important}
.puzzle-dashboard .puzzle-stat-pair span{display:block!important;font-size:10px!important;line-height:1.25!important;color:var(--puzzle-ink)!important;white-space:nowrap}
.puzzle-dashboard .puzzle-stat-pair i{display:inline-block!important;min-width:27px!important;font-size:8.5px!important;color:var(--puzzle-dark)!important;font-style:normal!important;font-weight:850!important}
.puzzle-dashboard .best-time .puzzle-stat-pair span{font-size:8.8px!important;letter-spacing:-.02em}
.puzzle-dashboard .points .puzzle-stat-pair span{color:var(--puzzle-deep)!important;font-weight:850}

/* user + same SVG home */
.puzzle-dashboard .puzzle-user-actions{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:7px}
.puzzle-dashboard .puzzle-login-user{font-size:10.5px!important;color:var(--puzzle-deep)!important;font-weight:850}
.puzzle-dashboard .puzzle-home{width:39px!important;height:39px!important;padding:0!important;background:linear-gradient(145deg,#fff,var(--puzzle-light))!important;color:var(--puzzle-deep)!important;border:1px solid var(--puzzle-mid)!important}
.puzzle-dashboard .puzzle-home svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* current theme continues through level selector + major panels */
.puzzle-page .puzzle-levels{
    background:linear-gradient(135deg,var(--puzzle-soft),var(--puzzle-light))!important;
    border-color:var(--puzzle-mid)!important;
}
.puzzle-page .puzzle-level{color:var(--puzzle-deep)!important}
.puzzle-page .puzzle-level.is-active{
    background:linear-gradient(145deg,#fff,var(--puzzle-light))!important;
    border-color:var(--puzzle-dark)!important;
    color:var(--puzzle-deep)!important;
    box-shadow:0 4px 11px rgba(30,55,75,.08)!important;
}
.puzzle-page .puzzle-game-column,
.puzzle-page .puzzle-clues-card,
.puzzle-page .puzzle-keyboard-card{
    border-color:var(--puzzle-mid)!important;
    background:
       radial-gradient(circle at 4% 3%,var(--puzzle-soft) 0,transparent 27%),
       linear-gradient(145deg,var(--puzzle-light),#fff 52%,var(--puzzle-soft))!important;
}
.puzzle-page .puzzle-toolbar{
    border-color:var(--puzzle-soft)!important;
}
.puzzle-page .puzzle-toolbar strong,
.puzzle-page .puzzle-side-title strong{color:var(--puzzle-deep)!important}

/* puzzle board itself uses a coherent theme, but answer cells stay readable */
.puzzle-page .puzzle-board{
    border-color:var(--puzzle-dark)!important;
    background:linear-gradient(135deg,var(--puzzle-soft),var(--puzzle-light),var(--puzzle-soft))!important;
}
.puzzle-page .puzzle-cell.is-block{
    border-color:var(--puzzle-deep)!important;
    background:
      radial-gradient(circle at 28% 22%,rgba(255,255,255,.42) 0 3%,transparent 4%),
      linear-gradient(145deg,var(--puzzle-mid),var(--puzzle-dark) 52%,var(--puzzle-deep))!important;
}
.puzzle-page .puzzle-cell.is-answer{
    border-color:var(--puzzle-soft)!important;
    background:#fff!important;
    color:var(--puzzle-ink)!important;
}
.puzzle-page .puzzle-cell.is-answer:hover{
    border-color:var(--puzzle-mid)!important;
    background:var(--puzzle-light)!important;
}
.puzzle-page .puzzle-cell.is-selected{
    outline-color:var(--puzzle-soft)!important;
    border-color:var(--puzzle-dark)!important;
    background:var(--puzzle-light)!important;
}
.puzzle-page .puzzle-number{color:var(--puzzle-dark)!important}
.puzzle-page .puzzle-letter{color:var(--puzzle-ink)!important}

/* clues scrollbar follows current theme, solid color */
.puzzle-page .puzzle-clues{
    scrollbar-width:thin;
    scrollbar-color:var(--puzzle-mid) transparent;
}
.puzzle-page .puzzle-clues::-webkit-scrollbar{width:9px;height:9px}
.puzzle-page .puzzle-clues::-webkit-scrollbar-track{background:transparent}
.puzzle-page .puzzle-clues::-webkit-scrollbar-thumb{background:var(--puzzle-mid);border-radius:999px;border:2px solid transparent;background-clip:padding-box}
.puzzle-page .puzzle-clues::-webkit-scrollbar-thumb:hover{background:var(--puzzle-dark);background-clip:padding-box}

/* functional buttons remain calm blue, as with reading chapter controls */
.puzzle-page .puzzle-primary-btn{
    background:#4b91d6!important;border-color:#357cc0!important;color:#fff!important
}
.puzzle-page .puzzle-secondary-btn,
.puzzle-page .puzzle-reveal-btn{
    background:linear-gradient(145deg,#fff,#eef6ff)!important;
    border-color:#b8d1ea!important;color:#356b9f!important
}
.puzzle-page .puzzle-secondary-btn:hover,
.puzzle-page .puzzle-reveal-btn:hover{
    background:#e3f0fd!important;border-color:#86b1db!important
}

html.bp-dark .puzzle-dashboard{
    background:linear-gradient(145deg,#17231f,#111a17)!important;
    border-color:var(--puzzle-dark)!important
}
html.bp-dark .puzzle-dashboard .puzzle-stat-card{
    background:#172720!important;border-color:var(--puzzle-dark)!important
}
html.bp-dark .puzzle-dashboard .puzzle-stat-title,
html.bp-dark .puzzle-dashboard .puzzle-stat-pair span,
html.bp-dark .puzzle-dashboard .puzzle-login-user{color:#edf6f2!important}
html.bp-dark .puzzle-dashboard .puzzle-stat-pair i{color:var(--puzzle-mid)!important}

@media(max-width:1080px){
 .puzzle-dashboard{grid-template-columns:1fr}
 .puzzle-dashboard .puzzle-user-actions{flex-direction:row;justify-content:flex-end}
}
@media(max-width:760px){
 .puzzle-dashboard .puzzle-history{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:500px){
 .puzzle-dashboard .puzzle-history{grid-template-columns:1fr!important}
}


/* 2026-08-13 comprehensive dark-mode patch */
html.bp-dark .puzzle-page{color:#dbe7f2!important}
html.bp-dark .puzzle-dashboard{background:linear-gradient(145deg,#172334,#111b29)!important;border-color:#36516d!important}
html.bp-dark .puzzle-game-logo{background:#1a2b3d!important;border-color:#41617f!important}
html.bp-dark .puzzle-brand-copy h2,html.bp-dark .puzzle-dashboard .puzzle-login-user{color:#eef6ff!important}
html.bp-dark .puzzle-brand-copy h2 small,html.bp-dark .puzzle-brand-copy .puzzle-kicker,html.bp-dark .puzzle-brand-copy p{color:#9eb5ca!important}
html.bp-dark .puzzle-dashboard .puzzle-stat-card{background:#162638!important;border-color:#36516d!important}
html.bp-dark .puzzle-dashboard .puzzle-home{background:#17283b!important;border-color:#405f7e!important;color:#acd3f7!important}
html.bp-dark .puzzle-page .puzzle-levels{background:#111d2c!important;border-color:#314a63!important}
html.bp-dark .puzzle-page .puzzle-level{color:#a9bbcc!important;background:transparent!important}
html.bp-dark .puzzle-page .puzzle-level.is-active{background:#1a3048!important;color:#b8dcff!important;border-color:#47709a!important}
html.bp-dark .puzzle-page .puzzle-game-column,html.bp-dark .puzzle-page .puzzle-clues-card,html.bp-dark .puzzle-page .puzzle-keyboard-card,html.bp-dark .puzzle-toolbar{background:#121e2c!important;border-color:#354f69!important;color:#dce8f3!important}
html.bp-dark .puzzle-page .puzzle-board{background:#101b29!important;border-color:#42617f!important}
html.bp-dark .puzzle-page .puzzle-cell.is-block{background:linear-gradient(145deg,#1b3045,#132336)!important;border-color:#3c5873!important}
html.bp-dark .puzzle-page .puzzle-cell.is-answer{background:#111c2a!important;border-color:#3a5470!important;color:#eef6ff!important}
html.bp-dark .puzzle-page .puzzle-cell.is-answer:hover,html.bp-dark .puzzle-page .puzzle-cell.is-selected{background:#1b334d!important;border-color:#5b86b2!important}
html.bp-dark .puzzle-page .puzzle-letter{color:#eef6ff!important}
html.bp-dark .puzzle-page .puzzle-number{color:#8fb6d8!important}
html.bp-dark .puzzle-clue,html.bp-dark .puzzle-clue-item{background:#101b29!important;border-color:#334d67!important;color:#dce8f3!important}
html.bp-dark .puzzle-key,html.bp-dark .puzzle-keyboard button{background:#17283b!important;border-color:#405f7e!important;color:#dbeafb!important}
html.bp-dark .puzzle-page .puzzle-secondary-btn,html.bp-dark .puzzle-page .puzzle-reveal-btn{background:#17283b!important;border-color:#405f7e!important;color:#b8d7f4!important}
html.bp-dark .puzzle-content-ad,html.bp-dark .bp-content-ad{background:#121d2b!important;border-color:#31465f!important;color:#a7b8ca!important}
html.bp-dark .puzzle-modal-card{background:#142033!important;border-color:#3b5877!important;color:#dbe7f2!important}


/* =========================================================
   2026-08-13 PUZZLE UX FIX
   1) 정답확인 후 오답 칸을 실제로 선명한 빨간 표시
   2) 상단 통계바 폰트를 한 단계 확대
   ========================================================= */

/* 테마 CSS가 answer 셀의 흰색을 !important로 덮어써도
   오답 표시가 최종적으로 이기도록 파일 맨 마지막에 둡니다. */
.puzzle-page .puzzle-cell.is-answer.is-wrong-cell,
.puzzle-page .puzzle-cell.is-wrong-cell{
    background:linear-gradient(145deg,#fff3f3,#ffdede)!important;
    border:2px solid #e5484d!important;
    box-shadow:
        inset 0 0 0 1px rgba(229,72,77,.18),
        0 0 0 1px rgba(229,72,77,.08)!important;
}
.puzzle-page .puzzle-cell.is-wrong-cell .puzzle-letter{
    color:#b4232a!important;
}
.puzzle-page .puzzle-cell.is-wrong-cell.is-selected{
    outline:3px solid rgba(229,72,77,.25)!important;
    border-color:#d82f36!important;
}

/* 다크모드에서도 빨간 오답 표시가 확실하게 보이도록 */
html.bp-dark .puzzle-page .puzzle-cell.is-answer.is-wrong-cell,
html.bp-dark .puzzle-page .puzzle-cell.is-wrong-cell{
    background:linear-gradient(145deg,#4a2027,#35181e)!important;
    border:2px solid #ff6670!important;
    box-shadow:
        inset 0 0 0 1px rgba(255,102,112,.18),
        0 0 0 1px rgba(255,102,112,.10)!important;
}
html.bp-dark .puzzle-page .puzzle-cell.is-wrong-cell .puzzle-letter{
    color:#ffd5d8!important;
}

/* 상단 통계바: 기존 9.5/10/8.5px 계열을 한 단계씩 확대 */
.puzzle-dashboard .puzzle-stat-title{
    font-size:11px!important;
}
.puzzle-dashboard .puzzle-stat-pair span{
    font-size:11.5px!important;
    line-height:1.32!important;
}
.puzzle-dashboard .puzzle-stat-pair i{
    font-size:9.5px!important;
    min-width:30px!important;
}
.puzzle-dashboard .best-time .puzzle-stat-pair span{
    font-size:10px!important;
}
.puzzle-dashboard .puzzle-login-user{
    font-size:11.5px!important;
}
