/* Essential Eight Builder (inc/e8builder.php, assets/js/e8builder.js) */
.e8b { max-width: 980px; margin: 0 auto; scroll-margin-top: 96px; }
.e8b__stage { background: #fff; border-radius: var(--radius, 14px); box-shadow: var(--shadow, 0 6px 24px rgba(14, 30, 66, .08)); padding: 28px; border-top: 5px solid var(--green, #9dc24c); }
.e8b__live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.e8b__wombat { width: 140px; height: auto; flex: none; }
.e8b__intro, .e8b__result, .e8b__end { display: flex; gap: 24px; align-items: flex-start; }
.e8b__intro h2, .e8b__end h2 { margin-top: 0; }
.e8b__how { padding-left: 20px; }
.e8b__how li { margin-bottom: 4px; }
.e8b__fine { font-size: .86rem; color: #6a7489; }
.e8b__tag { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #b63a2a; margin: 0 0 4px; }
/* top bar */
.e8b__top { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; font-size: .95rem; color: #4a5568; margin-bottom: 16px; }
.e8b__hp { display: inline-flex; align-items: center; gap: 8px; }
.e8b__bar { display: inline-block; width: 140px; height: 10px; background: #eef2f7; border-radius: 99px; overflow: hidden; }
.e8b__bar i { display: block; height: 100%; transition: width .4s; }
.e8b__bar i.is-ok { background: #3f7d20; } .e8b__bar i.is-warn { background: #c77d16; } .e8b__bar i.is-bad { background: #b8382a; }
/* brief */
.e8b__brief { background: #fbecea; border-left: 5px solid var(--red, #d14938); border-radius: 10px; padding: 14px 18px; margin-bottom: 18px; }
.e8b__brief h2 { margin: 0 0 6px; font-size: 1.35rem; }
.e8b__brief p:last-child { margin: 0; }
/* board */
.e8b__board { display: grid; grid-template-columns: 1fr 1.25fr; gap: 20px; align-items: start; }
.e8b__office { border: 2px dashed #c9d2e3; border-radius: 12px; padding: 14px; background: #f6f9fc; transition: background .2s, border-color .2s; }
.e8b__office.is-over { border-color: var(--green, #9dc24c); background: #eef6e4; }
.e8b__office-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.e8b__office h3, .e8b__tray h3 { margin: 0 0 10px; font-size: 1.05rem; }
.e8b__free { font-weight: 700; color: #12385e; font-size: .92rem; }
.e8b__slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.e8b__slot { min-height: 54px; border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; justify-content: center; gap: 4px; font-size: .9rem; }
.e8b__slot.is-empty { border: 2px dashed #9fb0c8; color: #6a7489; background: #fff; }
.e8b__slot.is-locked { background: #e9edf3; color: #9aa4b5; }
.e8b__slot.is-full { background: var(--navy, #0e1e42); color: #fff; font-weight: 600; }
.e8b__slot.is-fresh { background: #2274b5; }
.e8b__rm { align-self: flex-start; background: transparent; border: 1px solid rgba(255, 255, 255, .6); color: #fff; border-radius: 6px; font-size: .78rem; padding: 2px 8px; cursor: pointer; }
.e8b__tray ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.e8b__card { display: flex; gap: 10px; align-items: center; justify-content: space-between; border: 1px solid #d9e0ea; border-radius: 10px; padding: 10px 12px; background: #fff; }
.e8b__card[draggable="true"] { cursor: grab; }
.e8b__card.is-drag { opacity: .5; }
.e8b__card.is-on { background: #eef6e4; border-color: #b9d68f; }
.e8b__card strong { display: block; font-size: .95rem; color: #12385e; }
.e8b__card span { display: block; font-size: .84rem; color: #4a5568; }
.e8b__add { flex: none; border: 2px solid var(--blue, #2274b5); background: #fff; color: var(--blue, #2274b5); font-weight: 700; border-radius: 8px; padding: 6px 14px; cursor: pointer; }
.e8b__add:hover:not(:disabled) { background: var(--blue, #2274b5); color: #fff; }
.e8b__add:disabled { opacity: .4; cursor: not-allowed; }
.e8b__in { flex: none; font-weight: 700; color: #3f7d20 !important; font-size: .84rem; }
.e8b__launch { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
/* result */
.e8b__result { padding: 18px; border-radius: 12px; }
.e8b__result.is-held { background: #eef6e4; }
.e8b__result.is-hit { background: #fbecea; }
.e8b__result h2 { margin: 0 0 8px; }
.e8b__loss { color: #b8382a; font-weight: 700; margin: 0 0 6px; }
/* end */
.e8b__big { font: 700 2rem/1.1 Sora, sans-serif; color: var(--navy, #0e1e42); margin: 0 0 6px; }
.e8b__log { list-style: none; padding: 0; margin: 10px 0 0; font-size: .92rem; }
.e8b__log li { padding: 3px 0 3px 18px; position: relative; }
.e8b__log li::before { content: ""; position: absolute; left: 0; top: .6em; width: 10px; height: 10px; border-radius: 50%; }
.e8b__log li.is-held::before { background: #3f7d20; } .e8b__log li.is-hit::before { background: #b8382a; }
.e8b__stage > h3 { margin: 24px 0 10px; }
.e8b__tablewrap { overflow-x: auto; }
.e8b__table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.e8b__table th, .e8b__table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e3e8ef; vertical-align: top; }
.e8b__table thead th { background: #f3f6fa; font-size: .85rem; }
.e8b__table td.is-yes { color: #3f7d20; font-weight: 700; }
.e8b__table td.is-no { color: #b8382a; font-weight: 700; }
.e8b__note { background: #f3f6fa; border-left: 4px solid var(--blue, #2274b5); padding: 12px 14px; border-radius: 8px; margin: 18px 0; font-size: .95rem; }
.e8b__ghost { background: #fff; border: 2px solid #c9d2e3; color: #12385e; }
@media (max-width: 760px) {
  .e8b__stage { padding: 18px 14px; }
  .e8b__board { grid-template-columns: 1fr; }
  .e8b__intro, .e8b__result, .e8b__end { flex-direction: column; align-items: center; }
  .e8b__wombat { width: 110px; }
  .e8b__bar { width: 100px; }
  .e8b__table th, .e8b__table td { padding: 6px; font-size: .85rem; }
  .e8b__launch .btn { width: 100%; text-align: center; }
}
