.nb-page { color: #172033; }
.nb-heading { margin: 0 0 30px; }
.nb-eyebrow { margin: 0 0 10px !important; color: #087f6d; font-size: 14px !important; font-weight: 800; }
.nb-heading h1 { margin: 0 0 16px; color: #111827; font-size: 44px; line-height: 1.18; letter-spacing: 0; }
.nb-heading > p:last-child { max-width: 760px; margin: 0; color: #526078; font-size: 19px; line-height: 1.75; }
.nb-game, .nb-guide { overflow: hidden; margin-top: 24px; border: 1px solid #d7e1ec; border-radius: 8px; background: #fff; }
.nb-topbar { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 22px 24px; border-bottom: 1px solid #dfe7f0; background: #f8fafc; }
.nb-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.nb-brand img { flex: 0 0 58px; }
.nb-brand h2, .nb-record h2 { margin: 0; color: #111827; font-size: 21px; line-height: 1.3; }
.nb-brand p, .nb-record header p { margin: 4px 0 0; color: #718096; font-size: 13px; }
.nb-settings { display: flex; align-items: end; gap: 10px; }
.nb-settings label { margin: 0; color: #445269; font-size: 13px; font-weight: 800; }
.nb-settings select { display: block; min-width: 165px; height: 44px; margin-top: 6px; padding: 0 38px 0 13px; border: 1px solid #cfd9e6; border-radius: 7px; background-color: #fff; color: #172033; font-weight: 700; }
.nb-settings button, .nb-actions button, .nb-support button { min-height: 44px; margin: 0; border: 0; border-radius: 7px; box-shadow: none; font-weight: 800; cursor: pointer; }
.nb-settings button { width: auto; padding: 0 18px; background: #172033; color: #fff; }
.nb-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(280px, .92fr); }
.nb-play { padding: 28px; border-right: 1px solid #dfe7f0; }
.nb-scoreboard { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 26px; }
.nb-scoreboard div { min-width: 0; padding: 12px; border: 1px solid #dbe4ee; border-radius: 7px; background: #f8fafc; text-align: center; }
.nb-scoreboard span { display: block; margin-bottom: 3px; color: #728097; font-size: 12px; }
.nb-scoreboard strong { display: block; overflow: hidden; color: #172033; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.nb-slots { display: flex; justify-content: center; gap: 9px; min-height: 64px; margin: 8px 0 24px; }
.nb-slots span { display: grid; width: 52px; height: 62px; place-items: center; border: 2px solid #cfd9e6; border-radius: 8px; background: #fff; color: #a4afbd; font-size: 27px; font-weight: 900; }
.nb-slots span.is-filled { border-color: #168777; background: #ecf8f5; color: #087f6d; }
.nb-keypad { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; max-width: 430px; margin: 0 auto; }
.nb-keypad button { width: 100%; height: 48px; margin: 0; padding: 0; border: 1px solid #d5dfeb; border-radius: 7px; background: #fff; color: #172033; box-shadow: none; font-size: 18px; font-weight: 900; cursor: pointer; }
.nb-keypad button:hover:not(:disabled) { border-color: #168777; background: #f0faf7; color: #087f6d; }
.nb-keypad button:disabled { background: #edf1f5; color: #a0aaba; opacity: 1; cursor: not-allowed; }
.nb-actions { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 9px; max-width: 430px; margin: 10px auto 0; }
.nb-actions #nbBackspace { background: #e9eef5; color: #314158; font-size: 22px; }
.nb-actions #nbEnter { background: #087f6d; color: #fff; font-size: 16px; }
.nb-actions button:disabled, .nb-support button:disabled { opacity: .48; cursor: not-allowed; }
.nb-status { min-height: 24px; margin: 15px 0 0; color: #087f6d; text-align: center; font-size: 14px; font-weight: 700; }
.nb-status.is-error { color: #c2413b; }
.nb-support { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.nb-support button { padding: 0 15px; border: 1px solid #d5dfeb; background: #fff; color: #475569; }
.nb-hint-text { min-height: 22px; margin: 10px 0 0; color: #718096; text-align: center; font-size: 13px; line-height: 1.55; }
.nb-result { margin-top: 20px; padding: 20px; border: 1px solid #a8ddd3; border-radius: 7px; background: #effaf7; text-align: center; }
.nb-result[hidden] { display: none !important; }
.nb-result > span { color: #087f6d; font-size: 12px; font-weight: 900; }
.nb-result h3 { margin: 4px 0 6px; color: #12352f; font-size: 22px; }
.nb-result p { margin: 0 0 10px; color: #526078; font-size: 14px; }
.nb-result > div { color: #334155; }
.nb-result strong { margin-left: 5px; color: #087f6d; font-size: 23px; letter-spacing: 3px; }
.nb-record { min-width: 0; padding: 28px 24px; background: #fbfcfe; }
.nb-record header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.nb-mini-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.nb-mini-legend span { padding: 3px 6px; border-radius: 4px; background: #edf2f7; color: #64748b; font-size: 10px; font-weight: 800; }
.nb-history { display: grid; gap: 8px; max-height: 575px; overflow-y: auto; }
.nb-history-empty { padding: 44px 18px; border: 1px dashed #cbd7e4; border-radius: 7px; color: #7c899b; text-align: center; font-size: 14px; }
.nb-history-row { display: grid; grid-template-columns: 38px minmax(74px, 1fr) auto; align-items: center; gap: 9px; padding: 12px; border: 1px solid #dce5ef; border-radius: 7px; background: #fff; }
.nb-history-row > span { color: #8390a2; font-size: 12px; }
.nb-history-row > strong { color: #172033; font-size: 19px; letter-spacing: 2px; }
.nb-history-row > div { display: flex; gap: 4px; }
.nb-history-row > div span { min-width: 34px; padding: 4px 5px; border-radius: 4px; color: #fff; text-align: center; font-size: 11px; font-weight: 900; }
.nb-score-strike { background: #087f6d; }
.nb-score-ball { background: #d69a0b; }
.nb-score-out { background: #66758a; }
.nb-guide { padding: 30px; }
.nb-guide > header h2 { margin: 0 0 10px; color: #111827; font-size: 27px; }
.nb-guide > header p { margin: 0; color: #64748b; line-height: 1.7; }
.nb-rule-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 24px 0; }
.nb-rule-cards > div { padding: 18px; border: 1px solid #dbe4ee; border-radius: 7px; background: #f8fafc; }
.nb-rule-cards strong { display: inline-grid; width: 35px; height: 35px; margin-right: 7px; place-items: center; border-radius: 6px; background: #087f6d; color: #fff; }
.nb-rule-cards > div:nth-child(2) strong { background: #d69a0b; }
.nb-rule-cards > div:nth-child(3) strong { background: #66758a; }
.nb-rule-cards span { color: #172033; font-weight: 900; }
.nb-rule-cards p { margin: 11px 0 0; color: #64748b; font-size: 14px; line-height: 1.6; }
.nb-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.nb-guide-grid section { padding: 20px 0; border-top: 1px solid #e2e8f0; }
.nb-guide-grid h3 { margin: 0 0 8px; color: #172033; font-size: 18px; }
.nb-guide-grid p { margin: 0; color: #59677b; font-size: 15px; line-height: 1.75; }
.nb-note { margin: 8px 0 0; padding: 16px 18px; border-left: 4px solid #087f6d; background: #eff8f6; color: #405166; font-size: 14px; line-height: 1.7; }
@media screen and (max-width: 980px) {
  .nb-heading h1 { font-size: 38px; }
  .nb-layout { grid-template-columns: 1fr; }
  .nb-play { border-right: 0; border-bottom: 1px solid #dfe7f0; }
}
@media screen and (max-width: 640px) {
  .nb-heading { margin-bottom: 22px; }
  .nb-heading h1 { font-size: 34px; }
  .nb-heading > p:last-child { font-size: 16px; line-height: 1.7; }
  .nb-topbar { align-items: stretch; padding: 18px; flex-direction: column; }
  .nb-brand img { width: 48px; height: 48px; flex-basis: 48px; }
  .nb-settings { display: grid; grid-template-columns: minmax(0, 1fr) 96px; align-items: end; }
  .nb-settings label { flex: 1; min-width: 0; }
  .nb-settings select { width: 100%; min-width: 0; }
  .nb-settings button { width: 96px; padding: 0 10px; }
  .nb-play, .nb-record, .nb-guide { padding: 20px 16px; }
  .nb-scoreboard div { padding: 10px 5px; }
  .nb-scoreboard strong { font-size: 13px; }
  .nb-slots { gap: 5px; }
  .nb-slots span { width: min(48px, 13vw); height: 54px; font-size: 23px; }
  .nb-keypad { gap: 6px; }
  .nb-keypad button { height: 46px; }
  .nb-record header { display: block; }
  .nb-mini-legend { justify-content: flex-start; margin-top: 10px; }
  .nb-history-row { grid-template-columns: 34px minmax(65px, 1fr) auto; padding: 10px 8px; }
  .nb-history-row > div { gap: 2px; }
  .nb-history-row > div span { min-width: 30px; padding: 4px 3px; }
  .nb-rule-cards, .nb-guide-grid { grid-template-columns: 1fr; }
  .nb-guide > header h2 { font-size: 24px; }
}
