.tbwg-wrap, .tbwg-wrap * { box-sizing: border-box; }

.tbwg-wrap {
    font-family: Inter, Arial, sans-serif;
    max-width: 640px;
    margin: 24px auto;
    color: #1f2937;
    padding: 0 12px;
}

.tbwg-card {
    background: #fff;
    border: 1px solid #dbe7f3;
    border-radius: 24px;
    box-shadow: 0 14px 35px rgba(24,50,74,.10);
    overflow: hidden;
}

.tbwg-head {
    display: flex;
    gap: 14px;
    align-items: center;
    background: linear-gradient(135deg,#18324a,#24577c);
    color: #fff;
    padding: 22px 24px;
}

.tbwg-bee {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #f6b93b;
    color: #1f2937;
    font-size: 28px;
    flex: 0 0 auto;
}

.tbwg-head h2 { margin: 0; font-size: 28px; line-height: 1.2; }
.tbwg-head p { margin: 5px 0 0; color: #e8f5ff; }
.tbwg-body { padding: 22px; text-align: center; }

.tbwg-stats {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.tbwg-stats span {
    background: #eaf6ff;
    border: 1px solid #dbe7f3;
    border-radius: 999px;
    padding: 7px 12px;
    color: #18324a;
    font-weight: 800;
    font-size: 13px;
}

.tbwg-message {
    font-weight: 900;
    color: #18324a;
    margin-bottom: 16px;
    min-height: 22px;
    font-size: 18px;
}

.tbwg-board {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100%;
    max-width: 340px;
    margin: 0 auto 18px auto;
}

.tbwg-board-row {
    display: flex !important;
    justify-content: center;
    gap: 8px !important;
}

.tbwg-box {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    min-height: 58px !important;
    border: 2px solid #dbe7f3 !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #18324a;
    font-size: 26px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-transform: uppercase;
}

.tbwg-box.filled { border-color: #18324a !important; }
.tbwg-box.correct { background: #2f80ed !important; border-color: #2f80ed !important; color: #fff !important; }
.tbwg-box.present { background: #f6b93b !important; border-color: #f6b93b !important; color: #1f2937 !important; }
.tbwg-box.absent { background: #64748b !important; border-color: #64748b !important; color: #fff !important; }

.tbwg-keyboard {
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
    margin-top: 10px;
}

.tbwg-key-row {
    display: flex !important;
    justify-content: center;
    gap: 6px !important;
    flex-wrap: wrap;
}

.tbwg-key {
    border: 1px solid #dbe7f3;
    background: #eaf6ff;
    color: #18324a;
    border-radius: 10px;
    padding: 10px 8px;
    min-width: 34px;
    font-weight: 900;
    cursor: pointer;
    line-height: 1;
    touch-action: manipulation;
}

.tbwg-key:hover { transform: translateY(-1px); }
.tbwg-key.wide { min-width: 62px; }
.tbwg-key.correct { background: #2f80ed; color: #fff; }
.tbwg-key.present { background: #f6b93b; color: #1f2937; }
.tbwg-key.absent { background: #64748b; color: #fff; }

.tbwg-actions {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tbwg-btn {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    font-weight: 800;
    cursor: pointer;
    background: #2f80ed;
    color: #fff;
}

.tbwg-btn.secondary {
    background: #fff;
    color: #18324a;
    border: 1px solid #dbe7f3;
}

.tbwg-help {
    margin-top: 16px;
    text-align: left;
    background: #fffdf6;
    border: 1px solid #f2dfac;
    border-radius: 16px;
    padding: 14px;
    line-height: 1.5;
}

@media(max-width:520px) {
    .tbwg-box {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
        font-size: 22px !important;
    }
    .tbwg-key { min-width: 28px; padding: 9px 6px; font-size: 13px; }
    .tbwg-key.wide { min-width: 48px; }
}
