:root{font-family:-apple-system,BlinkMacSystemFont,"Noto Sans JP",sans-serif;color:#233d3a;background:#f5f7f2;font-synthesis:none}*{box-sizing:border-box}body{margin:0}header,footer{max-width:1240px;margin:auto;padding:28px 32px;display:flex;justify-content:space-between;align-items:center}.brand{font-size:25px;font-weight:800;color:inherit;text-decoration:none}.brand span{font-size:12px;font-weight:500;margin-left:16px}.tag,.eyebrow,.section-title>span{font-size:11px;letter-spacing:2px;color:#627d72}main{max-width:1180px;margin:28px auto 64px;display:grid;grid-template-columns: .75fr 1.6fr;gap:32px}.intro{padding:40px 0}.intro h1{font-size:44px;line-height:1.45;letter-spacing:-2px;margin:20px 0}.intro p{color:#65766f;line-height:1.9}.panel{background:#fff;border:1px solid #dce5da;border-radius:22px;padding:30px;box-shadow:0 12px 40px #243a3010;min-width:0}.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:22px}h2{font-size:19px;margin:0}.fields{display:grid;grid-template-columns:1fr 1fr;gap:18px}label{display:flex;flex-direction:column;gap:8px;font-size:13px;font-weight:600}input,select,button{font:inherit;border-radius:9px;border:1px solid #ced9d1;padding:12px;background:white;color:inherit;min-height:46px}input,select{width:100%}button{cursor:pointer;font-size:13px;font-weight:600}button:hover{background:#eaf2e9}button:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #dc9d45;outline-offset:3px}.primary{background:#2b6251;color:white;border-color:#2b6251}.primary:hover{background:#204c3e}.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:24px}.initial-player{padding-top:24px}.initial-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.initial-title select{width:100px}.hand-inputs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}.hand-inputs label{font-size:11px}.hand-inputs input{padding:8px;text-align:center}#adjust{font-size:12px;color:#627d72}#error{color:#b14133;font-size:13px}.rules{grid-column:1/-1;border-top:1px solid #dce5da;padding:28px 0;color:#61736b;font-size:13px;line-height:1.9}.rules h2{color:#233d3a;margin-bottom:16px}#formula{color:#2b6251;font-weight:600}footer{border-top:1px solid #dce5da;font-size:11px;letter-spacing:1px;color:#627d72}.player{padding:20px 0}.player-title{display:flex;justify-content:space-between;margin-bottom:12px;font-size:13px}.hands{display:flex;gap:10px;flex-wrap:wrap}.hand{flex:1;min-width:65px;max-width:140px;height:108px;background:#f5f7f2;display:flex;align-items:center;justify-content:center;flex-direction:column;font-size:36px;border:2px solid transparent}.hand small{font-size:10px;margin-top:5px;font-weight:400}.hand.dead{background:#f0f0ed;color:#9ba49e}.hand.selected{border-color:#2b6251;background:#e7f1e6;transform:translateY(-4px)}.player.active .player-title{color:#2b6251;font-weight:700}#calculation{background:#f1f5e9;padding:18px;border-radius:12px;min-height:60px;font-size:14px}#calculation.flash{animation:flash .6s ease}#status.victory{color:#a57216;animation:flash .7s ease}#help,#badge{font-size:12px;color:#65766f}details{margin-top:24px;font-size:13px}summary{cursor:pointer;padding:8px}#history{max-height:220px;overflow:auto;line-height:2}#result{font-size:14px;line-height:1.8}.table-scroll{overflow:auto}table{border-collapse:collapse;width:100%;font-size:12px;white-space:nowrap}td,th{padding:12px 8px;text-align:left;border-bottom:1px solid #dce5da}.evaluation{font-size:28px;font-weight:700;color:#2b6251}.note{color:#65766f;font-size:12px}[hidden]{display:none!important}@keyframes flash{0%{transform:scale(.96);background:#e5bd5f}100%{transform:scale(1)}}@media(max-width:1000px){main{margin:16px 24px;grid-template-columns:1fr}.intro{padding:15px 0}.intro h1{font-size:34px;margin:10px 0}.intro h1 br{display:none}.intro p br{display:none}}@media(max-width:540px){header,footer{padding:22px 18px}.tag{display:none}.brand span{display:block;margin:4px 0 0}main{margin:8px 14px;gap:20px}.panel{padding:20px 16px}.fields{gap:12px}.hand-inputs{grid-template-columns:repeat(3,1fr)}.intro h1{font-size:29px}.hand{min-width:60px;height:90px}.actions button{flex-grow:1}footer span{display:none}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
/* 入力と攻撃演出：カードの位置・寸法を固定して状態だけを変える。 */
.number-field{display:flex;flex-direction:column;gap:8px}.stepper{display:grid;grid-template-columns:44px minmax(42px,1fr) 44px;gap:6px;align-items:center}.stepper button{width:44px;height:46px;padding:0;font-size:23px;line-height:1}.stepper input{min-width:0;padding:8px 2px;text-align:center;font-size:22px;font-weight:650;appearance:textfield;-moz-appearance:textfield}.stepper input::-webkit-inner-spin-button,.stepper input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.initial-title{gap:16px;flex-wrap:wrap}.count-control{display:flex;align-items:center;gap:12px;font-size:12px}.count-control .stepper{width:154px}.hand-inputs{grid-template-columns:repeat(auto-fit,minmax(152px,1fr));gap:12px}.initial-hand{background:#f5f7f2;border:1px solid #dce5da;border-radius:12px;padding:12px 10px;min-width:0}.initial-hand>label{font-size:12px;margin-bottom:10px}.initial-hint{display:block;text-align:center;font-size:11px;color:#61736b;height:16px;margin-top:8px}.initial-hand.is-zero{background:#f0f0ed}.play-tools{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:10px 0 16px}.play-tools label{font-size:12px}.play-tools select{width:auto;font-size:12px}.attack-legend{display:flex;gap:12px;flex-wrap:wrap;font-size:11px;color:#61736b}.attack-legend span:first-child{color:#285a91}.attack-legend span:nth-child(2){color:#9b4d17}.attack-legend span:nth-child(3){color:#80600c}.hand{position:relative;transform:none!important;opacity:1!important;transition:background-color .12s,border-color .12s;color:#233d3a}.hand:disabled{cursor:default}.hand small{height:15px;font-weight:600;white-space:nowrap}.hand.attack-source{background:#e3eefb;border:3px solid #4779b6;color:#204d80}.hand.target-available{border:2px dashed #c38e63;background:#fffaf4}.hand.attack-target{background:#fff0df;border:3px solid #cb7c35;color:#8e471b}.hand.attack-impact{background:#fff3be;border:3px double #b29328;color:#665212}.hand.dead{background:#f0f0ed;color:#9ba49e}.hand.attack-impact .hand-value{animation:number-change .25s ease-out}.hand.vanishing .hand-value{animation:hand-vanish .35s ease-out}.hand-value{display:block;line-height:1.15}#help{min-height:36px;line-height:1.5}#calculation{min-height:94px;line-height:1.7;overflow-wrap:anywhere}.player-title{min-height:20px}.section-title>h2{line-height:1.5}.attack-impact.vanishing{background:#f2eee2} @keyframes number-change{0%{opacity:.4;transform:scale(.88)}100%{opacity:1;transform:scale(1)}}@keyframes hand-vanish{0%{opacity:.25}100%{opacity:1}}@media(max-width:540px){.fields{grid-template-columns:1fr}.hand-inputs{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.initial-hand{padding:10px 6px}.initial-hand .stepper{gap:3px;grid-template-columns:44px minmax(26px,1fr) 44px}.initial-title{align-items:flex-start}.initial-title>strong{font-size:14px}.hand{min-width:78px}.section-title{flex-wrap:wrap}#calculation{min-height:118px}}@media(max-width:350px){.hand-inputs{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){.hand{transition:none}.hand-value{animation:none!important}}
/* 手番・操作説明・攻撃内容は独立した領域に固定する。 */
.play-heading{display:grid;gap:16px;margin-bottom:12px}.back-to-settings{justify-self:start;min-height:46px;background:#edf3ed;border-color:#b5cbbd;color:#285644}.play-heading .section-title{margin-bottom:0;min-height:58px;align-items:center}#status{font-size:22px;line-height:1.4;min-height:62px;display:flex;align-items:center}#help{min-height:42px;margin:8px 0 12px;line-height:1.7}.attack-content{margin-top:4px;background:#f1f5e9;border-radius:12px;padding:16px 18px}#attack-message{font-size:13px;line-height:1.7;min-height:48px;margin:0 0 8px;overflow-wrap:anywhere}#calculation{padding:0;min-height:76px;background:transparent}#calculation:empty::before{content:'\00a0'}@media(max-width:540px){.back-to-settings{width:100%;text-align:left}.play-heading .section-title{display:grid;grid-template-columns:1fr;gap:4px;min-height:86px}#status{font-size:20px;min-height:56px}#help{min-height:44px}#attack-message{min-height:90px}#calculation{min-height:114px}}
/* 対戦中は読み取り専用のルールパネルを手番の右に置く。 */
.play-heading .section-title{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px}#badge.rule-panel{background:#edf3ed;border:1px solid #c9d9cb;border-radius:12px;padding:12px 14px;color:#285644;font-size:12px;max-width:280px}.rule-panel-title{display:flex;align-items:baseline;gap:16px;flex-wrap:wrap}.rule-panel-title strong{font-size:20px;letter-spacing:0}.rule-panel-title span{font-size:16px;font-weight:650;white-space:nowrap}.rule-panel p{margin:6px 0 0;line-height:1.6;font-size:12px}@media(max-width:540px){.play-heading .section-title{grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:10px}#badge.rule-panel{padding:10px;max-width:none}.rule-panel-title{gap:4px 10px}.rule-panel-title strong{font-size:18px}.rule-panel-title span{font-size:14px}.rule-panel p{font-size:11px}#status{font-size:18px;overflow-wrap:anywhere}}
