.bd-page { padding-top: 54px; }
.bd-intro { max-width: 820px; margin-bottom: 24px; }
.bd-intro h1 { max-width: 760px; }
.bd-intro .lede { max-width: 780px; }

.bd-challenge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid #bac5d2;
  border-radius: 13px;
  background: #eef4f8;
  color: #26333e;
  text-align: center;
}
.bd-challenge span { font-size: .63rem; font-weight: 900; letter-spacing: .08em; }
.bd-challenge strong { font-size: .86rem; }
.bd-challenge em { color: #5e6d78; font-size: .7rem; font-style: normal; }

.bd-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(26, 31, 23, .08);
}
.bd-topbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: #f8f9f4; }
.bd-stat { display: flex; align-items: baseline; justify-content: center; gap: 8px; min-height: 58px; padding: 10px; border-right: 1px solid var(--line); }
.bd-stat:last-child { border-right: 0; }
.bd-stat span { color: var(--muted); font-size: .66rem; font-weight: 900; letter-spacing: .065em; text-transform: uppercase; }
.bd-stat strong { color: var(--text); font-size: 1.35rem; letter-spacing: -.03em; }
.bd-timer-stat strong { min-width: 2ch; text-align: center; }
.bd-time-track { height: 5px; overflow: hidden; background: #e6e9e1; }
.bd-time-track span { display: block; width: 100%; height: 100%; transform-origin: left center; background: var(--accent); }

.bd-game-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .8fr); min-height: 560px; }
.bd-plan-panel { padding: 18px; border-right: 1px solid var(--line); background: #fbfcfa; }
.bd-plan-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.bd-plan-head .section-kicker { margin-bottom: 3px; }
.bd-plan-head h2 { margin: 0; font-size: 1rem; }
.bd-difficulty { flex: 0 0 auto; padding: 6px 8px; border: 1px solid #b9c6d1; border-radius: 999px; background: #edf4f8; color: #425766; font-size: .58rem; font-weight: 900; letter-spacing: .065em; }
.bd-difficulty.is-journeyman { border-color: #c9c6a8; background: #f7f4df; color: #665f31; }
.bd-difficulty.is-foreman { border-color: #d5bdb6; background: #fbefeb; color: #775045; }
.bd-canvas-wrap { position: relative; margin-top: 12px; overflow: hidden; border: 1px solid #c8d2da; border-radius: 14px; background: #eaf2f7; }
.bd-svg { display: block; width: 100%; height: auto; min-height: 400px; font-family: Arial, Helvetica, sans-serif; touch-action: none; }
.bd-plan-note { margin: 8px 2px 0; color: var(--muted); font-size: .66rem; }

.bd-start-card {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(420px, calc(100% - 34px));
  transform: translate(-50%, -50%);
  padding: 20px 22px;
  border: 1px solid #aebbc5;
  border-radius: 15px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 50px rgba(28, 42, 51, .17);
  text-align: center;
  transition: opacity .16s ease, transform .16s ease;
}
.bd-start-card.is-hidden { opacity: 0; pointer-events: none; transform: translate(-50%, -46%); }
.bd-start-card strong { display: block; margin: 4px 0 8px; font-size: 1.15rem; }
.bd-start-card span { display: block; color: var(--muted); font-size: .78rem; line-height: 1.5; }

.bd-question-panel { display: flex; flex-direction: column; padding: 22px; background: #fff; }
.bd-question-meta { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 11px; color: var(--muted); font-size: .61rem; font-weight: 900; letter-spacing: .07em; }
.bd-question-panel > h2 { margin: 0 0 16px; font-size: clamp(1.25rem, 2.3vw, 1.75rem); line-height: 1.18; letter-spacing: -.03em; }

.bd-progression { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 16px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: #f8f9f4; color: var(--muted); font-size: .67rem; font-weight: 800; text-align: center; }
.bd-progression[hidden] { display: none; }
.bd-progression span { display: inline-flex; align-items: baseline; gap: 4px; }
.bd-progression b { color: var(--text); font-size: .7rem; }
.bd-progression i { color: #87919a; font-style: normal; font-weight: 900; }

.bd-choices { display: grid; gap: 9px; }
.bd-choice {
  width: 100%;
  min-height: 50px;
  padding: 12px 13px;
  border: 1px solid #cfd4cb;
  border-radius: 11px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: .8rem;
  font-weight: 780;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: transform .08s ease, border-color .08s ease, background .08s ease;
}
.bd-choice:hover:not(:disabled) { transform: translateY(-1px); border-color: #9aa48e; background: #fafbf7; }
.bd-choice:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 1px; }
.bd-choice:disabled { cursor: default; }
.bd-choice.is-correct { border-color: #a8ba48; background: #f0f6d4; }
.bd-choice.is-wrong { border-color: #dfaaa0; background: #fff0ec; }
.bd-choice.is-answer { box-shadow: inset 0 0 0 1px #97aa38; }
.bd-feedback { margin-top: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: .73rem; line-height: 1.45; }
.bd-feedback strong { font-weight: 900; }
.bd-feedback.is-correct { border-color: #c9d66d; background: #f4f8dc; }
.bd-feedback.is-wrong { border-color: #e6beb5; background: #fff4f1; }
.bd-primary { width: 100%; min-height: 48px; margin-top: auto; }

.bd-game-over { position: absolute; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(27, 32, 25, .58); backdrop-filter: blur(2px); }
.bd-game-over.hidden { display: none; }
.bd-game-over-card { width: min(500px, 100%); padding: 24px; border-radius: 17px; background: #fff; box-shadow: 0 24px 70px rgba(0, 0, 0, .24); text-align: center; }
.bd-game-over-card h2 { margin: 4px 0 7px; font-size: 1.65rem; }
.bd-game-over-message { margin: 0; color: var(--muted); font-size: .85rem; }
.bd-game-over-message strong { color: var(--text); }
.bd-game-over-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 17px 0; }
.bd-game-over-stats span { padding: 9px 6px; border: 1px solid var(--line); border-radius: 10px; background: #f8f9f4; color: var(--muted); font-size: .62rem; font-weight: 800; }
.bd-game-over-stats strong { display: block; margin-top: 3px; color: var(--text); font-size: 1.18rem; }
.bd-challenge-result { margin: 0 0 13px; padding: 10px; border: 1px solid #c4cbd0; border-radius: 10px; background: #f2f6f8; color: #41525e; font-size: .76rem; font-weight: 850; }
.bd-game-over-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.bd-game-over-actions button { min-height: 44px; }
.bd-share-status { min-height: 18px; margin: 9px 0 0; color: var(--muted); font-size: .67rem; }

.bd-skill-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 20px 0; }
.bd-skill-strip div { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #f8f9f4; }
.bd-skill-strip strong { display: block; margin-bottom: 3px; font-size: .66rem; letter-spacing: .055em; }
.bd-skill-strip span { display: block; color: var(--muted); font-size: .68rem; line-height: 1.4; }

/* Blueprint SVG */
.bd-paper { fill: #f8fbfd; }
.bd-paper-grid { stroke: #dce8ef; stroke-width: 1; }
.bd-plan-line { fill: none; stroke: #253844; stroke-width: 4; stroke-linecap: square; stroke-linejoin: miter; }
.bd-plan-thin { fill: none; stroke: #506570; stroke-width: 2.2; }
.bd-plan-dash { fill: none; stroke: #5e7480; stroke-width: 2.2; stroke-dasharray: 9 7; }
.bd-plan-dim { fill: none; stroke: #3f667a; stroke-width: 2; }
.bd-plan-fill { fill: #d5e2e9; stroke: #314854; stroke-width: 2.2; }
.bd-plan-finish { fill: #fff; stroke: #55707f; stroke-width: 1.5; }
.bd-plan-note-box { fill: #fff; stroke: #8ea2ad; stroke-width: 1.6; }
.bd-plan-rule { fill: none; stroke: #c8d5dc; stroke-width: 1.2; }
.bd-plan-text { fill: #253844; font-size: 21px; font-weight: 700; }
.bd-plan-small { fill: #425966; font-size: 17px; font-weight: 700; }
.bd-plan-tiny { fill: #516a77; font-size: 14px; font-weight: 650; }
.bd-plan-dim-text { fill: #284b5d; font-size: 20px; font-weight: 800; }
.bd-plan-title { fill: #20323c; font-size: 18px; font-weight: 900; letter-spacing: 1.2px; }
.bd-plan-muted { fill: #6c7e88; font-size: 13px; font-weight: 700; }

@media (max-width: 920px) {
  .bd-game-grid { grid-template-columns: 1fr; min-height: 0; }
  .bd-plan-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .bd-question-panel { min-height: 340px; }
  .bd-primary { margin-top: 16px; }
  .bd-skill-strip { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .bd-page { padding-top: 30px; }
  .bd-intro { margin-bottom: 16px; }
  .bd-intro h1 { font-size: clamp(2rem, 10vw, 2.85rem); }
  .bd-intro .lede { font-size: .88rem; line-height: 1.48; }
  .bd-challenge { flex-wrap: wrap; gap: 5px 10px; padding: 8px 10px; }
  .bd-challenge em { width: 100%; }
  .bd-shell { border-radius: 15px; }
  .bd-stat { min-height: 49px; gap: 3px; padding: 7px 4px; flex-direction: column; align-items: center; }
  .bd-stat span { font-size: .52rem; letter-spacing: .04em; }
  .bd-stat strong { font-size: 1.08rem; }
  .bd-time-track { height: 4px; }
  .bd-plan-panel { padding: 10px; }
  .bd-plan-head h2 { font-size: .84rem; }
  .bd-plan-head .section-kicker { font-size: .56rem; }
  .bd-difficulty { padding: 5px 6px; font-size: .5rem; }
  .bd-canvas-wrap { margin-top: 8px; border-radius: 11px; }
  .bd-svg { min-height: 0; }
  .bd-plan-note { margin-top: 5px; font-size: .56rem; }
  .bd-start-card { padding: 14px 15px; }
  .bd-start-card strong { font-size: .95rem; }
  .bd-start-card span { font-size: .67rem; }
  .bd-question-panel { min-height: 0; padding: 12px 10px 13px; }
  .bd-question-meta { margin-bottom: 7px; font-size: .53rem; }
  .bd-question-panel > h2 { margin-bottom: 10px; font-size: 1.12rem; }

  .bd-progression { flex-wrap: wrap; gap: 4px 7px; margin-bottom: 10px; padding: 8px; font-size: .58rem; }
  .bd-progression b { font-size: .61rem; }
  .bd-choices { gap: 6px; }
  .bd-choice { min-height: 44px; padding: 9px 10px; border-radius: 9px; font-size: .72rem; }
  .bd-feedback { margin-top: 7px; padding: 8px 9px; font-size: .64rem; }
  .bd-primary { min-height: 44px; margin-top: 10px; }
  .bd-game-over { padding: 12px; }
  .bd-game-over-card { padding: 18px 14px; }
  .bd-game-over-card h2 { font-size: 1.4rem; }
  .bd-game-over-stats { gap: 5px; margin: 13px 0; }
  .bd-game-over-stats span { padding: 7px 4px; font-size: .54rem; }
  .bd-game-over-actions { grid-template-columns: 1fr; }
  .bd-skill-strip { grid-template-columns: 1fr 1fr; gap: 7px; margin: 14px 0; }
  .bd-skill-strip div { padding: 10px; }
  .bd-skill-strip span { font-size: .61rem; }
  .bd-plan-text { font-size: 18px; }
  .bd-plan-small { font-size: 15px; }
  .bd-plan-tiny { font-size: 12px; }
  .bd-plan-dim-text { font-size: 17px; }
}
