/* 숫자야구(2026-10-28 개발자3). 공용 /psych/style.css 위에 덮는다. 본문 14px 이상. 휴대폰 한 손: 숫자판은 엄지가 닿는 아래쪽, 기록은 위쪽. */
.stage.nb { padding: 0 0 40px; }
.hidden { display: none !important; }
.nb-head { text-align: center; margin: 12px 16px 0; }
.nb-eyebrow { font-size: 14px; font-weight: 800; color: #2B8A3E; }
.nb-title { font-size: 30px; font-weight: 900; color: #111827; margin: 2px 0 0; letter-spacing: -0.02em; word-break: keep-all; }
.nb-sub { font-size: 15px; line-height: 1.6; color: #4B5563; margin: 6px 0 0; word-break: keep-all; }

.nb-box { background: #fff; border: 1.5px solid #E5E7EB; border-radius: 22px; padding: 16px; margin: 16px 16px 0; }
.nb-box-title { font-size: 17px; font-weight: 900; color: #111827; margin: 18px 0 10px; }
.nb-daily { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; text-align: left; font-family: inherit; border: 0; border-radius: 20px; padding: 16px;
    color: #fff; cursor: pointer; background: linear-gradient(135deg, #40C057, #2B8A3E); box-shadow: 0 5px 0 #237032; -webkit-tap-highlight-color: transparent; position: relative; overflow: hidden; }
.nb-daily::after { content: '⚾'; position: absolute; right: 14px; bottom: 6px; font-size: 54px; opacity: .25; transform: rotate(-15deg); }
.nb-daily:active { transform: translateY(3px); box-shadow: 0 2px 0 #237032; }
.nb-daily-top { display: flex; align-items: center; gap: 8px; }
.nb-daily-badge { font-size: 13px; font-weight: 900; color: #2B8A3E; background: #fff; border-radius: 999px; padding: 2px 9px; }
.nb-daily-date { font-size: 15px; font-weight: 800; }
.nb-daily-name { font-size: 20px; font-weight: 900; }
.nb-daily-state { font-size: 14px; font-weight: 800; background: rgba(255,255,255,.2); border-radius: 999px; padding: 3px 10px; }
.nb-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nb-mode { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-family: inherit; text-align: left; border: 2px solid #E9ECEF; background: #F8F9FA; border-radius: 16px;
    padding: 12px; cursor: pointer; color: #374151; -webkit-tap-highlight-color: transparent; }
.nb-mode:active { background: #F1F3F5; }
.nb-mode b { font-size: 18px; font-weight: 900; color: #111827; }
.nb-mode span { font-size: 14px; font-weight: 700; color: #6B7280; }
.nb-mode em { font-style: normal; font-size: 13px; font-weight: 800; color: #2B8A3E; margin-top: 4px; }
.nb-rule { font-size: 14px; color: #6B7280; margin: 14px 0 0; line-height: 1.6; word-break: keep-all; }

.nb-challenge { text-align: center; padding: 6px 0 4px; }
.nb-ch-badge { display: inline-block; font-size: 14px; font-weight: 900; color: #fff; background: #E8590C; border-radius: 999px; padding: 4px 12px; }
.nb-ch-title { font-size: 22px; font-weight: 900; color: #111827; margin-top: 10px; word-break: keep-all; }
.nb-ch-desc { font-size: 15px; color: #4B5563; margin: 6px 0 0; word-break: keep-all; }
.nb-text-btn { display: block; margin: 10px auto 0; font-family: inherit; font-size: 14px; font-weight: 800; color: #6B7280; background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 6px; }
.nb-main { display: block; width: 100%; margin-top: 14px; font-family: inherit; font-size: 18px; font-weight: 900; color: #fff;
    background: linear-gradient(180deg, #40C057, #2B8A3E); border: 0; border-radius: 16px; padding: 15px; cursor: pointer; box-shadow: 0 5px 0 #237032; }
.nb-main:active { transform: translateY(3px); box-shadow: 0 2px 0 #237032; }

/* 게임 */
.nb-game { background: linear-gradient(180deg, #EBFBEE 0%, #fff 55%); border-color: #D3F9D8; padding: 14px 12px; }
.nb-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nb-chip { font-size: 14px; font-weight: 800; color: #2B8A3E; background: #fff; border: 1.5px solid #B2F2BB; border-radius: 999px; padding: 4px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nb-left { flex-shrink: 0; font-size: 15px; font-weight: 800; color: #495057; }
.nb-left b { color: #111827; font-weight: 900; }
.nb-history { margin-top: 10px; height: 168px; overflow-y: auto; background: #fff; border: 1.5px solid #E9ECEF; border-radius: 14px; padding: 6px 8px; overscroll-behavior: contain; }
.nb-empty { height: 100%; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; color: #ADB5BD; text-align: center; word-break: keep-all; }
.nb-row { display: flex; align-items: center; gap: 10px; padding: 5px 4px; border-bottom: 1px dashed #F1F3F5; animation: nbIn .3s ease-out; }
.nb-row:last-child { border-bottom: 0; }
.nb-no { flex-shrink: 0; width: 22px; font-size: 14px; font-weight: 800; color: #ADB5BD; text-align: right; }
.nb-ds { display: flex; gap: 4px; }
.nb-ds i { font-style: normal; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 32px; border-radius: 8px; background: #F1F3F5; font-size: 19px; font-weight: 900; color: #212529; }
.nb-res { margin-left: auto; display: flex; gap: 5px; }
.nb-res b { font-size: 15px; font-weight: 900; border-radius: 999px; padding: 3px 10px; color: #fff; }
.nb-res b.s { background: #2F9E44; } .nb-res b.b { background: #F59F00; } .nb-res b.out { background: #868E96; }
.nb-call { text-align: center; min-height: 30px; margin-top: 8px; font-size: 21px; font-weight: 900; color: #495057; }
.nb-call.sb { color: #2B8A3E; } .nb-call.out { color: #868E96; } .nb-call.hr { color: #E8590C; font-size: 26px; }
.nb-call.pop { animation: nbPop .45s ease-out; }
.nb-slots { display: flex; justify-content: center; gap: 10px; margin: 6px 0 12px; }
.nb-slot { width: 54px; height: 60px; border-radius: 14px; border: 2.5px dashed #CED4DA; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 900; color: #212529; }
.nb-slot.full { border-style: solid; border-color: #2F9E44; box-shadow: 0 4px 0 #B2F2BB; }
.nb-slot.on { border-color: #40C057; border-style: solid; animation: nbBlink 1s ease-in-out infinite; }
.nb-slot.pop { animation: nbPop .25s ease-out; }
.nb-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nb-pad-row { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 8px; margin-top: 8px; }
.nb-key { position: relative; font-family: inherit; height: 54px; border: 0; border-radius: 14px; background: #fff; box-shadow: 0 4px 0 #DEE2E6, inset 0 0 0 1.5px #E9ECEF; font-size: 24px; font-weight: 900; color: #212529;
    cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.nb-key:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #DEE2E6, inset 0 0 0 1.5px #E9ECEF; }
.nb-key:disabled { cursor: default; }
.nb-num.used { background: #E6FCF5; color: #2B8A3E; box-shadow: 0 4px 0 #B2F2BB, inset 0 0 0 1.5px #8CE99A; }
.nb-num:disabled:not(.used) { opacity: .45; }
.nb-num.mk-out { color: #ADB5BD; text-decoration: line-through; text-decoration-thickness: 3px; background: #F1F3F5; }
.nb-num.mk-in::after { content: '있음'; position: absolute; top: 3px; right: 6px; font-size: 13px; font-weight: 900; color: #fff; background: #F59F00; border-radius: 999px; padding: 0 5px; line-height: 1.4; }
.nb-memo, .nb-del { font-size: 16px; }
.nb-memo.on { background: #FFF3BF; box-shadow: 0 4px 0 #FFE066, inset 0 0 0 1.5px #FCC419; }
.nb-ok { font-size: 19px; color: #fff; background: linear-gradient(180deg, #40C057, #2B8A3E); box-shadow: 0 4px 0 #237032; }
.nb-ok:disabled { opacity: .45; }
.nb-memo-tip { font-size: 14px; color: #6B7280; text-align: center; margin: 10px 0 0; word-break: keep-all; }
.nb-memo-tip b.o { color: #868E96; } .nb-memo-tip b.s { color: #E67700; }
@keyframes nbIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes nbPop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes nbBlink { 50% { border-color: #B2F2BB; } }

/* 결과 */
#nbResult { text-align: center; }
.nb-res-emoji { font-size: 56px; line-height: 1.1; animation: nbPop .5s ease-out; }
.nb-res-title { display: inline-block; margin-top: 6px; font-size: 20px; font-weight: 900; color: #fff; background: linear-gradient(135deg, #FF922B, #E8590C); border-radius: 999px; padding: 5px 16px; box-shadow: 0 4px 0 #C2410C; }
.nb-res-big { font-size: 28px; font-weight: 900; color: #2B8A3E; margin-top: 10px; word-break: keep-all; }
.nb-res-answer { font-size: 15px; font-weight: 800; color: #495057; margin-top: 4px; word-break: keep-all; }
.nb-res-grid { margin: 10px auto 0; font-size: 18px; line-height: 1.35; letter-spacing: 2px; }
.nb-res-best { display: inline-block; font-size: 15px; font-weight: 800; color: #495057; background: #F8F9FA; border-radius: 999px; padding: 4px 12px; margin-top: 10px; }
.nb-res-best.new { color: #fff; background: linear-gradient(135deg, #20C997, #0CA678); }
.nb-res-say { font-size: 15px; font-weight: 700; color: #4B5563; margin-top: 8px; word-break: keep-all; }
.nb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.nb-sub-btn { display: block; width: 100%; font-family: inherit; font-size: 15px; font-weight: 800; color: #374151; background: #F8F9FA; border: 1.5px solid #E9ECEF; border-radius: 12px; padding: 12px 6px; cursor: pointer; }
.nb-sub-btn.day { grid-column: 1 / -1; color: #2B8A3E; background: #EBFBEE; border-color: #B2F2BB; }
.nb-others { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.nb-confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 70; }

/* 소개 */
.nb-intro { color: #374151; }
.nb-intro-title { font-size: 18px; font-weight: 900; color: #111827; margin: 0 0 8px; }
.nb-intro p { font-size: 15px; line-height: 1.7; margin: 0 0 8px; word-break: keep-all; }

@media (prefers-reduced-motion: reduce) { .nb-row, .nb-call.pop, .nb-slot.on, .nb-slot.pop, .nb-res-emoji { animation: none; } }
@media (max-height: 700px) { .nb-history { height: 132px; } .nb-key { height: 50px; } }   /* 낮은 휴대폰: 숫자판까지 한 화면에 */
@media (min-width: 768px) {
    .stage.nb { max-width: 760px; }
    .nb-title { font-size: 36px; }
    .nb-game { box-sizing: border-box; width: calc(100% - 32px); max-width: 480px; margin-left: auto; margin-right: auto; }   /* 가운데 정렬하면 내용 폭으로 줄어드는 것 막기 */
    .nb-history { height: 220px; }
}
