.kbb-player-gate,
.kbb-wp-battle {
  --kbb-red: #ef4444;
  --kbb-teal: #0f766e;
  --kbb-teal2: #0f9f8e;
  --kbb-gold: #f8d46b;
  --kbb-ink: #111827;
  --kbb-muted: #64748b;
  --kbb-line: #e2e8f0;
  font-family: Arial, "Helvetica Neue", sans-serif;
  color: var(--kbb-ink);
}

.kbb-player-gate {
  max-width: 720px;
  margin: 0 auto 18px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: linear-gradient(180deg, #fffdf7, #f8fafc);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.kbb-player-gate[hidden],
.kbb-player-gate:not([hidden]) + .kbb-wp-battle {
  display: none !important;
}

.kbb-player-gate h2 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.15;
}

.kbb-player-gate p {
  margin: 0 0 14px;
  color: var(--kbb-muted);
  font-size: 14px;
  line-height: 1.5;
}

.kbb-player-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.kbb-player-form input {
  min-height: 44px;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--kbb-ink);
  font-size: 16px;
  font-weight: 700;
}

.kbb-player-form button {
  min-height: 44px;
  border: 1px solid var(--kbb-teal);
  border-radius: 8px;
  background: var(--kbb-teal2);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  padding: 0 18px;
  cursor: pointer;
}

.kbb-player-form button:hover {
  background: var(--kbb-teal);
}

.kbb-player-error {
  min-height: 18px;
  color: #dc2626;
  font-size: 13px;
  font-weight: 700;
}

.kbb-player-note {
  margin-top: 10px;
  color: var(--kbb-muted);
  font-size: 12px;
  line-height: 1.45;
}

.kbb-wp-battle {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-areas: "title title" "boss boss" "quiz board";
  align-items: start !important;
  gap: 10px !important;
  max-width: 1180px !important;
  margin: 0 auto 12px;
  padding: 16px;
  border: 1px solid #e8d9bd;
  border-radius: 10px;
  background: linear-gradient(180deg, #fffdf7, #f8fafc);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.kbb-wp-layout {
  display: contents !important;
}

.kbb-wp-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kbb-wp-battle > .kbb-wp-title {
  grid-area: title;
  margin: 0 !important;
}

.kbb-wp-battle > .kbb-wp-title > div {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.kbb-wp-title h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 900;
}

.kbb-wp-badge {
  display: inline-grid;
  min-height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #eab63d;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 0 10px;
}

.kbb-wp-card {
  min-width: 0;
  border: 1px solid var(--kbb-line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
}

.kbb-wp-boss {
  grid-area: boss;
  position: relative;
  display: grid !important;
  grid-template-columns: 230px minmax(0, 1fr) 168px;
  grid-template-rows: auto auto;
  align-items: center !important;
  gap: 6px 18px !important;
  min-height: 118px;
  padding: 10px 16px !important;
  overflow: hidden;
  border-color: #eab63d;
  background: linear-gradient(90deg, #fff8ec, #fffdf7);
}

.kbb-wp-boss:before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 50%, rgba(234, 179, 61, .16), transparent 26%), linear-gradient(90deg, rgba(15, 118, 110, .05), transparent 42%);
  pointer-events: none;
}

.kbb-wp-boss > * {
  position: relative;
}

.kbb-wp-boss-name {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 900;
}

.kbb-wp-avatar {
  grid-row: 1 / 3;
  width: 210px;
  height: 104px;
  border: 2px solid #eab63d;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(127, 29, 29, .13);
  overflow: hidden;
}

.kbb-wp-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
}

.kbb-wp-hp-wrap {
  display: grid;
  gap: 6px;
  max-width: 560px;
}

.kbb-wp-hp-label {
  display: flex;
  justify-content: space-between;
  width: 100%;
  color: var(--kbb-ink);
  font-size: 15px;
  font-weight: 900;
}

.kbb-wp-hp-label strong {
  font-size: 22px;
}

.kbb-wp-hp {
  width: 100%;
  height: 18px;
  border-color: #fecaca;
  border-radius: 999px;
  background: #fee2e2;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(127, 29, 29, .14);
}

.kbb-wp-hp i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--kbb-red), #f97316, var(--kbb-gold));
  transition: width .35s ease;
}

.kbb-wp-boss-stats {
  grid-column: 3;
  grid-row: 1 / 3;
  display: grid !important;
  gap: 8px !important;
}

.kbb-wp-battle-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #e8d9bd;
  border-radius: 999px;
  background: #fff;
  color: var(--kbb-ink);
  font-size: 12px;
  font-weight: 900;
  padding: 0 10px;
}

.kbb-wp-quiz-shell {
  grid-area: quiz;
  align-self: start !important;
  padding: 12px !important;
  scroll-margin-top: 100px;
}

.kbb-wp-quiz-shell #watupro_quiz {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.kbb-wp-quiz-shell .quiz-form {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.kbb-wp-quiz-shell [id^="watuproTimerForm"] {
  display: none !important;
  margin: 0 !important;
}

.kbb-wp-quiz-shell .watupro-progress-container,
.kbb-wp-quiz-shell .watupro_num,
.kbb-wp-quiz-shell #next-question,
.kbb-wp-quiz-shell #prev-question,
.kbb-wp-quiz-shell .watupro_buttons,
.kbb-wp-quiz-shell .watupro-qnum-info,
.kbb-wp-quiz-shell .watupro-hint,
.kbb-wp-quiz-shell [id^=questionHints],
.kbb-wp-quiz-shell audio,
.kbb-wp-quiz-shell .watupro-audio,
.kbb-wp-quiz-shell .dashicons-controls-volumeon {
  display: none !important;
}

.kbb-wp-quiz-shell .quiz-form > br {
  display: none !important;
}

.kbb-wp-quiz-shell #watupro_quiz > p:not([id]) {
  display: none !important;
  margin: 0 !important;
}

.kbb-wp-quiz-shell .watu-question {
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  scroll-margin-top: 110px;
}

.kbb-wp-quiz-shell .question-content {
  margin: 0 !important;
}

.kbb-wp-quiz-shell .question-content > div:first-child {
  display: grid;
  min-height: 136px !important;
  place-items: center;
  border: 0 !important;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-size: clamp(56px, 5vw, 82px) !important;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
}

.kbb-wp-quiz-shell .question-content br {
  display: none !important;
}

.kbb-wp-quiz-shell br {
  display: inline !important;
}

.kbb-wp-quiz-shell .question-choices {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 10px 12px !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  clear: both !important;
  overflow: visible !important;
  align-items: stretch !important;
  width: 100% !important;
  min-height: 0 !important;
  counter-reset: kbbAnswer;
}

.kbb-wp-quiz-shell .watupro-question-choice,
.kbb-wp-quiz-shell .watupro-2-columns {
  display: block !important;
  float: none !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  clear: none !important;
  box-sizing: border-box !important;
}

.kbb-wp-quiz-shell .question-choices > input[type=radio],
.kbb-wp-quiz-shell .question-choices > input[type=checkbox],
.kbb-wp-quiz-shell .watupro-question-choice input[type=radio],
.kbb-wp-quiz-shell .watupro-question-choice input[type=checkbox] {
  position: absolute;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0;
  pointer-events: none;
}

.kbb-wp-quiz-shell .question-choices > label,
.kbb-wp-quiz-shell .watupro-question-choice input[type=radio] + label,
.kbb-wp-quiz-shell .watupro-question-choice input[type=checkbox] + label,
.kbb-wp-quiz-shell .watupro-question-choice label {
  display: flex !important;
  position: relative !important;
  align-items: center !important;
  justify-content: flex-start !important;
  min-height: 60px !important;
  width: 100% !important;
  border: 1.5px solid var(--kbb-teal) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: var(--kbb-ink) !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .05) !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  margin: 0 !important;
  text-align: left !important;
  padding: 0 12px 0 58px !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.kbb-wp-quiz-shell .question-choices > label:before,
.kbb-wp-quiz-shell .watupro-question-choice label:before {
  content: counter(kbbAnswer);
  counter-increment: kbbAnswer;
  position: absolute;
  left: 12px;
  top: 50%;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 7px;
  background: linear-gradient(180deg, var(--kbb-teal2), var(--kbb-teal));
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.kbb-wp-quiz-shell .question-choices > label.kbb-selected,
.kbb-wp-quiz-shell .watupro-question-choice input[type=radio]:checked + label,
.kbb-wp-quiz-shell .watupro-question-choice input[type=checkbox]:checked + label {
  border-color: var(--kbb-teal) !important;
  background: #ecfdf5 !important;
  color: #065f46 !important;
  box-shadow: 0 0 0 4px rgba(15, 159, 142, .16), 0 8px 18px rgba(15, 23, 42, .12) !important;
}

.kbb-wp-quiz-shell .question-choices > label.kbb-inline-correct,
.kbb-wp-quiz-shell .watupro-question-choice label.kbb-inline-correct {
  border-color: #16a34a !important;
  background: #dcfce7 !important;
  color: #065f46 !important;
  padding-right: 48px !important;
}

.kbb-wp-quiz-shell .question-choices > label.kbb-inline-wrong,
.kbb-wp-quiz-shell .watupro-question-choice label.kbb-inline-wrong {
  border-color: #dc2626 !important;
  background: #fee2e2 !important;
  color: #991b1b !important;
  padding-right: 48px !important;
}

.kbb-wp-quiz-shell .watupro-question-choice label.kbb-inline-correct:after,
.kbb-wp-quiz-shell .watupro-question-choice label.kbb-inline-wrong:after,
.kbb-wp-quiz-shell .question-choices > label.kbb-inline-correct:after,
.kbb-wp-quiz-shell .question-choices > label.kbb-inline-wrong:after {
  position: absolute;
  right: 12px;
  top: 50%;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.kbb-wp-quiz-shell .watupro-question-choice label.kbb-inline-correct:after,
.kbb-wp-quiz-shell .question-choices > label.kbb-inline-correct:after {
  content: "✓";
  background: #16a34a;
}

.kbb-wp-quiz-shell .watupro-question-choice label.kbb-inline-wrong:after,
.kbb-wp-quiz-shell .question-choices > label.kbb-inline-wrong:after {
  content: "×";
  background: #dc2626;
}

.kbb-wp-quiz-shell #action-button,
.kbb-wp-quiz-shell .kbb-inline-feedback,
.kbb-wp-quiz-shell.kbb-resolving:after {
  display: none !important;
}

.kbb-wp-quiz-shell.kbb-inline-pending .watupro-question-choice label,
.kbb-wp-quiz-shell.kbb-inline-pending .question-choices > label {
  pointer-events: none !important;
}

.kbb-battle-actions {
  position: static !important;
  z-index: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 10px 0 0 !important;
  padding-top: 0 !important;
  clear: both !important;
  grid-column: 1 / -1 !important;
  box-sizing: border-box !important;
}

.kbb-wp-quiz-shell .question-choices > .kbb-battle-actions {
  position: static !important;
  display: flex !important;
  grid-column: 1 / -1 !important;
  order: 999 !important;
  margin: 10px 0 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

.kbb-battle-actions.kbb-hide-actions {
  display: none !important;
}

.kbb-early-finish {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  margin: 0;
  clear: none !important;
}

.kbb-early-finish.kbb-hide-finish {
  display: none !important;
}

.kbb-hint-action {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-start;
  margin: 0;
  clear: none !important;
}

.kbb-hint-action.kbb-hide-hint {
  display: none !important;
}

.kbb-hint-action .kbb-show-hint,
.kbb-early-finish .kbb-finish-battle {
  min-height: 40px !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: none !important;
  font-family: Arial, "Helvetica Neue", sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  padding: 0 16px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}

.kbb-hint-action .kbb-show-hint {
  border: 1px solid var(--kbb-teal) !important;
  color: #0f766e !important;
}

.kbb-early-finish .kbb-finish-battle {
  border: 1px solid #dc2626 !important;
  color: #991b1b !important;
}

.kbb-hint-action .kbb-show-hint:hover {
  background: #ecfdf5 !important;
  color: #065f46 !important;
}

.kbb-early-finish .kbb-finish-battle:hover {
  background: #fee2e2 !important;
  color: #7f1d1d !important;
}

.kbb-hint-panel {
  clear: none;
  margin-top: 10px;
  border: 1px solid #99f6e4;
  border-radius: 8px;
  background: #f0fdfa;
  color: #134e4a;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
  padding: 10px 12px;
}

.kbb-early-finish .kbb-finish-battle:disabled {
  opacity: .55;
  cursor: not-allowed !important;
}

.kbb-wp-leaderboard {
  grid-area: board;
  align-self: start !important;
  margin: 0 !important;
  padding: 14px !important;
  overflow: hidden !important;
}

.kbb-wp-leaderboard .kbb-wp-title {
  margin-bottom: 10px !important;
}

.kbb-wp-leaderboard .kbb-wp-title h2 {
  font-size: 20px !important;
  font-weight: 900 !important;
}

.kbb-wp-leaderboard .kbb-wp-title h2:before {
  content: "Top ";
  color: #eab63d;
}

.kbb-wp-leaderboard img {
  display: none !important;
}

.kbb-wp-leaderboard table {
  width: 100% !important;
  min-width: 0 !important;
  border-collapse: collapse !important;
  font-size: 13px !important;
}

.kbb-wp-leaderboard th,
.kbb-wp-leaderboard td {
  border-bottom: 1px solid #edf2f7 !important;
  padding: 9px 4px !important;
  text-align: left;
}

.kbb-wp-leaderboard th:nth-child(2),
.kbb-wp-leaderboard td:nth-child(2),
.kbb-wp-leaderboard th:nth-child(4),
.kbb-wp-leaderboard td:nth-child(4),
.kbb-wp-leaderboard th:nth-child(5),
.kbb-wp-leaderboard td:nth-child(5) {
  display: none !important;
}

.kbb-review-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px 0 16px;
}

.kbb-review-nav button,
.kbb-review-current {
  min-height: 42px;
  border: 1px solid #9fc7d0;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  box-shadow: 0 4px 10px rgba(15, 23, 42, .12);
  font-size: 14px;
  font-weight: 700;
  padding: 0 16px;
}

.kbb-review-nav button {
  border-color: var(--kbb-teal);
  background: var(--kbb-teal2);
  color: #fff;
  cursor: pointer;
}

.kbb-review-nav button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

@media (max-width: 1100px) {
  .kbb-hint-action:not(.kbb-hide-hint),
  .kbb-early-finish:not(.kbb-hide-finish) {
    display: flex !important;
    margin: 0 !important;
    clear: none !important;
  }

  .kbb-hint-action:not(.kbb-hide-hint) {
    justify-content: flex-start !important;
  }

  .kbb-early-finish:not(.kbb-hide-finish) {
    justify-content: flex-end !important;
  }

  .kbb-hint-action:not(.kbb-hide-hint) .kbb-show-hint,
  .kbb-early-finish:not(.kbb-hide-finish) .kbb-finish-battle {
    min-width: 128px !important;
  }
}

@media (max-width: 1023px) {
  .kbb-wp-battle {
    grid-template-columns: 1fr;
    grid-template-areas: "title" "boss" "quiz" "board";
    max-width: 820px !important;
  }

  .kbb-wp-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .kbb-wp-boss {
    grid-template-columns: 118px minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto;
    padding: 10px !important;
  }

  .kbb-wp-avatar {
    grid-row: 1 / 4;
    width: 106px !important;
    height: 74px !important;
  }

  .kbb-wp-boss-stats {
    grid-column: 1 / -1;
    grid-row: auto;
    display: flex !important;
    flex-wrap: wrap !important;
  }

  .kbb-wp-quiz-shell .question-content > div:first-child {
    min-height: 124px !important;
    font-size: 60px !important;
  }

  .kbb-wp-quiz-shell .watupro-question-choice label {
    min-height: 56px !important;
    font-size: 21px !important;
  }
}

@media (max-width: 560px) {
  .kbb-player-gate {
    padding: 14px;
  }

  .kbb-player-gate h2 {
    font-size: 22px;
  }

  .kbb-player-form {
    grid-template-columns: 1fr;
  }

  .kbb-player-form button {
    width: 100%;
  }

  .kbb-wp-battle {
    gap: 8px !important;
    padding: 10px !important;
    margin-bottom: 10px !important;
  }

  .kbb-wp-battle > .kbb-wp-title > div {
    justify-content: space-between;
    width: 100%;
  }

  .kbb-wp-battle > .kbb-wp-title h2 {
    font-size: 18px !important;
    line-height: 1.15 !important;
  }

  .kbb-wp-boss {
    grid-template-columns: 74px minmax(0, 1fr) !important;
    gap: 6px 10px !important;
  }

  .kbb-wp-avatar {
    width: 66px !important;
    height: 58px !important;
  }

  .kbb-wp-boss-name {
    font-size: 16px !important;
  }

  .kbb-wp-hp-label {
    font-size: 12px !important;
  }

  .kbb-wp-hp-label strong {
    font-size: 15px !important;
  }

  .kbb-wp-hp {
    height: 12px !important;
  }

  .kbb-wp-battle-stats span {
    min-height: 26px !important;
    font-size: 11px !important;
    padding: 0 8px !important;
  }

  .kbb-wp-quiz-shell,
  .kbb-wp-leaderboard {
    padding: 12px !important;
  }

  .kbb-wp-quiz-shell .question-content > div:first-child {
    min-height: 94px !important;
    font-size: 46px !important;
  }

  .kbb-wp-quiz-shell .question-choices {
    grid-template-columns: 1fr !important;
    gap: 9px !important;
  }

  .kbb-wp-quiz-shell .watupro-question-choice label {
    min-height: 46px !important;
    font-size: 18px !important;
  }

  .kbb-wp-quiz-shell .question-choices > label:before,
  .kbb-wp-quiz-shell .watupro-question-choice label:before {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }

  .kbb-hint-action:not(.kbb-hide-hint),
  .kbb-early-finish:not(.kbb-hide-finish) {
    min-width: 0 !important;
  }

  .kbb-hint-action:not(.kbb-hide-hint) {
    flex: 1 1 0 !important;
  }

  .kbb-early-finish:not(.kbb-hide-finish) {
    flex: 1 1 0 !important;
  }

  .kbb-hint-action:not(.kbb-hide-hint) .kbb-show-hint,
  .kbb-early-finish:not(.kbb-hide-finish) .kbb-finish-battle {
    width: 100% !important;
    min-width: 0 !important;
  }

  .kbb-wp-leaderboard table {
    font-size: 11px !important;
  }

  .kbb-wp-leaderboard th,
  .kbb-wp-leaderboard td {
    padding: 6px 3px !important;
  }
}
