/* All visual rules are deliberately scoped: no WordPress/Cocoon h1-h6 styling collision. */
.dtb-game{--dtb-ink:#17233c;--dtb-muted:#63718b;--dtb-blue:#2776e8;--dtb-pink:#ef5680;--dtb-purple:#6854cf;--dtb-line:#dce2f2;box-sizing:border-box;isolation:isolate;width:100%;max-width:1000px;margin:16px auto 28px;padding:19px;color:var(--dtb-ink);font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Hiragino Sans",Meiryo,sans-serif;font-size:16px;line-height:1.6;background:linear-gradient(150deg,#f1f5ff 0%,#fff8e9 55%,#faf1ff 100%);border:2px solid #e4e5f7;border-radius:22px;box-shadow:0 12px 36px rgba(45,47,107,.11)}
.dtb-game *,.dtb-game *:before,.dtb-game *:after{box-sizing:border-box}
.dtb-game button,.dtb-game input{font:inherit}
.dtb-game button{cursor:pointer;touch-action:manipulation}
.dtb-game button:disabled{opacity:.5;cursor:not-allowed}
.dtb-game button:focus-visible,.dtb-game input:focus-visible{outline:3px solid #f5bd41;outline-offset:3px}
.dtb-game .dtb-loading{padding:28px;text-align:center}
.dtb-game .dtb-hero{text-align:center;padding:7px 8px 16px}
.dtb-game .dtb-kicker{display:inline-block;color:#465990;background:#e5ecff;border-radius:100px;font-size:12px;font-weight:800;padding:4px 13px;letter-spacing:.08em}
.dtb-game .dtb-hero-title{margin:8px 0 2px;font-size:clamp(24px,5.2vw,38px);font-weight:900;line-height:1.35;color:#302e80;text-shadow:1px 2px 0 #fff;letter-spacing:.03em}
.dtb-game .dtb-subtitle{margin:0;color:#5b6382;font-size:13px;font-weight:700}
.dtb-game .dtb-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 12px}
.dtb-game .dtb-round{font-weight:900;font-size:14px;color:#3c4677;background:#fff;padding:7px 12px;border-radius:100px;border:1px solid var(--dtb-line)}
.dtb-game .dtb-tools{display:flex;gap:7px;flex-wrap:wrap}
.dtb-game .dtb-small-btn{border:1px solid var(--dtb-line);background:#fff;color:#405071;border-radius:10px;padding:6px 10px;font-size:12px;font-weight:800;min-height:34px;box-shadow:none}
.dtb-game .dtb-players{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.dtb-game .dtb-player{--dtb-player-color:var(--dtb-blue);position:relative;min-width:0;background:#fff;border:2px solid #cfdefa;border-radius:19px;padding:14px 15px 15px;box-shadow:0 5px 15px rgba(30,50,90,.06);overflow:hidden}
.dtb-game .dtb-player--b{--dtb-player-color:var(--dtb-pink);border-color:#f5cddb}
.dtb-game .dtb-player--danger{border-color:#f0a048;background:linear-gradient(#fffaf1,#fff)}
.dtb-game .dtb-player--lose{filter:grayscale(.18);border-color:#b6bfd0}
.dtb-game .dtb-player-top{display:flex;align-items:center;justify-content:space-between;gap:5px;flex-wrap:wrap;font-size:14px;font-weight:900}
.dtb-game .dtb-player-name{color:var(--dtb-player-color)}
.dtb-game .dtb-state-chip{font-size:10px;font-weight:900;padding:3px 8px;background:#fff5dc;color:#956015;border-radius:20px;border:1px solid #ffe0a4}
.dtb-game .dtb-state-chip--miracle{color:#8b36b5;background:#f6e6ff;border-color:#ead1ff}
.dtb-game .dtb-clock{display:flex;align-items:center;justify-content:center;margin:6px auto 2px;width:min(152px,90%);aspect-ratio:1}
.dtb-game .dtb-clock svg{max-width:100%;height:auto;filter:drop-shadow(0 4px 3px rgba(35,40,85,.08))}
.dtb-game .dtb-hp-label{font-size:11px;text-align:center;font-weight:900;color:#62708a;letter-spacing:.08em}
.dtb-game .dtb-hp-value{font-weight:1000;font-size:clamp(23px,4vw,37px);letter-spacing:-.035em;text-align:center;white-space:nowrap;color:var(--dtb-player-color);font-variant-numeric:tabular-nums;line-height:1.3}
.dtb-game .dtb-hp-value.dtb-negative{color:#d92e40}
.dtb-game .dtb-meter{height:16px;background:#e8ebf2;border-radius:20px;overflow:hidden;margin:9px 0 4px;border:1px solid #e4e6ed}
.dtb-game .dtb-meter-fill{height:100%;background:linear-gradient(90deg,#45c39f,#36a8e9);border-radius:20px;transition:width .8s ease;min-width:0}
.dtb-game .dtb-player--b .dtb-meter-fill{background:linear-gradient(90deg,#ffb15a,#f66d92)}
.dtb-game .dtb-meter-fill--danger,.dtb-game .dtb-player--b .dtb-meter-fill--danger{background:linear-gradient(90deg,#fb932b,#e94953)}
.dtb-game .dtb-hp-caption{font-size:11px;color:#758097;text-align:right;font-weight:700}
.dtb-game .dtb-arena{position:relative;margin-top:13px;border:1px solid #d6d7fa;background:linear-gradient(145deg,#f8f7ff 10%,#eeefff 100%);border-radius:19px;padding:16px;text-align:center;overflow:hidden}
.dtb-game .dtb-arena-label{font-size:14px;font-weight:900;color:#453f99}
.dtb-game .dtb-dice-row{display:flex;align-items:center;justify-content:center;gap:clamp(10px,4vw,40px);margin:11px 0 8px}
.dtb-game .dtb-dice-slot{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:105px}
.dtb-game .dtb-dice-caption{font-size:12px;font-weight:800;color:#566181}
.dtb-game .dtb-die{display:inline-grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:4px;flex:none;align-items:center;justify-items:center;width:76px;height:76px;border-radius:16px;background:#fff;border:3px solid #2a62cb;box-shadow:0 5px 0 #bac7ec,0 7px 12px rgba(26,45,85,.18);padding:11px;vertical-align:middle;user-select:none}
.dtb-game .dtb-die--pink{border-color:#e26188;box-shadow:0 5px 0 #f2c0d2,0 7px 12px rgba(26,45,85,.18)}
.dtb-game .dtb-die--gold{border-color:#d98e1e;background:#fff9e3;box-shadow:0 5px 0 #efc46c,0 7px 12px rgba(140,80,5,.2)}
.dtb-game .dtb-die--small{width:43px;height:43px;border-width:2px;border-radius:9px;gap:1px;padding:6px;box-shadow:0 3px 0 #cbd2e5}
.dtb-game .dtb-pip{height:13px;width:13px;border-radius:50%;background:#243c79;opacity:0}
.dtb-game .dtb-die--pink .dtb-pip{background:#be3966}
.dtb-game .dtb-die--gold .dtb-pip{background:#b87511}
.dtb-game .dtb-die--small .dtb-pip{height:6px;width:6px}
.dtb-game .dtb-pip--on{opacity:1}
.dtb-game .dtb-die--unknown{display:flex;align-items:center;justify-content:center;font-size:34px;font-weight:900;color:#8b93bd}
.dtb-game .dtb-die--rolling{animation:dtb-wobble .16s linear infinite}
.dtb-game .dtb-vs{font-size:22px;font-weight:1000;color:#ec7190}
.dtb-game .dtb-message{font-weight:800;color:#526184;margin:10px auto 0;max-width:650px;font-size:14px}
.dtb-game .dtb-primary{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:48px;padding:11px 25px;background:linear-gradient(135deg,#5969ee,#8b4fce);color:#fff!important;border:0;border-radius:13px;font-size:16px;font-weight:900;box-shadow:0 5px 0 #c7b9e8,0 8px 18px rgba(71,73,165,.15);transition:transform .15s}
.dtb-game .dtb-primary:hover:not(:disabled){transform:translateY(-2px)}
.dtb-game .dtb-primary--gold{background:linear-gradient(135deg,#fb9d22,#ec596c);box-shadow:0 5px 0 #f4c07c}
.dtb-game .dtb-primary--next{background:linear-gradient(135deg,#18a687,#36a6c5);box-shadow:0 5px 0 #9ed8d6}
.dtb-game .dtb-arena-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:14px}
.dtb-game .dtb-math{margin-top:14px;padding:16px;border:2px solid #e4c9fb;border-radius:17px;background:#fff;text-align:center}
.dtb-game .dtb-math-heading{font-size:16px;font-weight:900;color:#5841a4;margin:0 0 6px}
.dtb-game .dtb-steps{margin:4px auto 10px;font-size:clamp(17px,4vw,24px);font-weight:950;color:#273e6d;line-height:1.5}
.dtb-game .dtb-steps strong{color:#dc405b}
.dtb-game .dtb-instruction{font-weight:900;color:#c54559;font-size:18px;margin:4px 0 12px}
.dtb-game .dtb-question{font-weight:900;font-size:clamp(17px,4vw,26px);letter-spacing:-.02em;margin:6px 0 12px}
.dtb-game .dtb-form{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px}
.dtb-game .dtb-answer-field{width:84px;max-width:22vw;min-height:46px;text-align:center;border:2px solid #abb9dc!important;border-radius:10px!important;color:#1d355e!important;background:#fff!important;font-size:22px!important;font-weight:900!important;padding:7px!important;margin:0!important;box-shadow:none!important}
.dtb-game .dtb-unit{font-size:17px;font-weight:900}
.dtb-game .dtb-result{margin-top:14px;padding:17px;border:2px solid #b9e8d6;border-radius:16px;background:#f3fff9;text-align:center;animation:dtb-appear .35s ease-out}
.dtb-game .dtb-result--incorrect{border-color:#ffcfb0;background:#fffbf6}
.dtb-game .dtb-result-title{font-size:22px;font-weight:1000;color:#169969}
.dtb-game .dtb-result--incorrect .dtb-result-title{color:#c45136}
.dtb-game .dtb-result-hp{font-weight:950;font-size:clamp(24px,5vw,39px);color:#d73c58;line-height:1.35}
.dtb-game .dtb-result-summary{font-size:14px;font-weight:800;color:#52617b}
.dtb-game .dtb-result .dtb-primary{margin-top:13px}
.dtb-game .dtb-victory{background:linear-gradient(145deg,#fff3bb,#fffaf0);border:3px solid #ffcf5c;box-shadow:0 0 20px rgba(255,194,43,.24);animation:dtb-appear .45s ease-out}
.dtb-game .dtb-victory-title{font-size:clamp(26px,5vw,38px);font-weight:1000;color:#bd631c}
.dtb-game .dtb-guide{font-size:12px;text-align:center;color:#6c728d;margin:12px 0 0}
.dtb-game .dtb-overlay{position:fixed;z-index:999990;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(19,19,52,.72);padding:14px;overflow-y:auto}
.dtb-game .dtb-modal{position:relative;width:min(630px,100%);max-height:min(94vh,750px);overflow-y:auto;background:linear-gradient(145deg,#fff5d7,#fff 65%,#f5edff);padding:23px 20px 24px;border:4px solid #ffd166;border-radius:23px;text-align:center;box-shadow:0 0 55px rgba(255,193,60,.38);animation:dtb-appear .3s ease-out}
.dtb-game .dtb-modal-kicker{color:#ca4b4e;font-size:19px;font-weight:1000;letter-spacing:.04em}
.dtb-game .dtb-modal-title{font-size:clamp(23px,5vw,32px);font-weight:1000;color:#492e9b;margin:4px 0 7px}
.dtb-game .dtb-modal-body{font-size:16px;font-weight:800;color:#3d486b;margin:8px 0 12px}
.dtb-game .dtb-dice-info{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px auto;max-width:510px}
.dtb-game .dtb-dice-info-block{padding:13px 5px;background:#fff;border:2px solid #dde2f4;border-radius:14px}
.dtb-game .dtb-dice-info-block--odd{border-color:#f1c66b;background:#fffaf0}
.dtb-game .dtb-dice-info-title{font-weight:1000;color:#484c7d;font-size:17px}
.dtb-game .dtb-dice-info-faces{display:flex;justify-content:center;gap:5px;margin:8px auto}
.dtb-game .dtb-dice-info-outcome{font-size:clamp(17px,3vw,22px);font-weight:1000;color:#bf4b4d}
.dtb-game .dtb-dice-info-block--odd .dtb-dice-info-outcome{color:#c46a12}
.dtb-game .dtb-modal-note{font-size:12px;font-weight:700;color:#6a6b80}
.dtb-game ruby rt{font-size:10px;font-weight:700}
.dtb-game .dtb-miracle-call{margin:14px auto 8px;background:#fff8e1;border:2px solid #f7d98a;padding:16px;border-radius:16px;text-align:center}
.dtb-game .dtb-miracle-die{margin:12px auto;display:flex;justify-content:center}
.dtb-game .dtb-miracle-outcome{font-size:23px;font-weight:1000;color:#a65125}
.dtb-game .dtb-hit--1{animation:dtb-shake .3s ease-in-out}
.dtb-game .dtb-hit--2{animation:dtb-shake .4s ease-in-out}
.dtb-game .dtb-hit--3{animation:dtb-shake .48s ease-in-out}
.dtb-game .dtb-hit--4{animation:dtb-shake .6s ease-in-out, dtb-glow .7s ease-in-out}
.dtb-game .dtb-hit--5{animation:dtb-shake .7s ease-in-out, dtb-glow .9s ease-in-out}
.dtb-game .dtb-flash{position:absolute;inset:0;pointer-events:none;opacity:0;background:radial-gradient(circle,#fff5af 0%,#ffca73 25%,transparent 72%);animation:dtb-flash 1s ease-out}
.dtb-game .dtb-corner-star{position:absolute;top:7px;right:12px;font-size:22px;opacity:.65}
.dtb-game .dtb-damage-burst{font-size:clamp(18px,4vw,27px);font-weight:1000;color:#dc405b;animation:dtb-pop .35s ease-out}
@keyframes dtb-appear{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes dtb-wobble{0%{transform:rotate(-9deg)}50%{transform:rotate(9deg)}100%{transform:rotate(-9deg)}}
@keyframes dtb-shake{0%,100%{transform:translateX(0)}20%{transform:translateX(-4px)}40%{transform:translateX(4px)}60%{transform:translateX(-3px)}80%{transform:translateX(2px)}}
@keyframes dtb-glow{0%,100%{box-shadow:0 0 0 transparent}50%{box-shadow:0 0 32px rgba(251,110,47,.55)}}
@keyframes dtb-flash{0%{opacity:0}20%{opacity:.8}100%{opacity:0}}
@keyframes dtb-pop{from{transform:scale(.6);opacity:.2}to{transform:scale(1);opacity:1}}
@media(max-width:540px){.dtb-game{padding:10px;border-radius:13px}.dtb-game .dtb-players{gap:6px}.dtb-game .dtb-player{padding:10px 7px;border-radius:13px}.dtb-game .dtb-clock{width:min(120px,98%)}.dtb-game .dtb-hp-value{font-size:clamp(20px,5vw,27px)}.dtb-game .dtb-die{width:64px;height:64px;padding:9px;gap:3px}.dtb-game .dtb-pip{height:11px;width:11px}.dtb-game .dtb-die--small{width:39px;height:39px;padding:5px;gap:1px}.dtb-game .dtb-die--small .dtb-pip{height:5px;width:5px}.dtb-game .dtb-dice-slot{min-width:83px}.dtb-game .dtb-arena,.dtb-game .dtb-math{padding:11px 7px}.dtb-game .dtb-question{font-size:18px}.dtb-game .dtb-modal{padding:14px 9px}.dtb-game .dtb-dice-info{gap:5px}.dtb-game .dtb-dice-info-block{padding:9px 2px}.dtb-game .dtb-dice-info-faces{gap:2px}.dtb-game .dtb-player-top{font-size:12px}.dtb-game .dtb-state-chip{font-size:9px}}
@media(prefers-reduced-motion:reduce){.dtb-game *, .dtb-game *:before,.dtb-game *:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}
