/* Shared primary action position for full tools and standalone embeds. */
@media screen and (min-width:1200px) {
 .calculator-action, .calculator-action-row { position: sticky; bottom: 16px; z-index: 2; }
 .calculator-action { box-shadow: 0 0 0 12px #fff; }
 .calculator-action-row { padding: 8px 0; background: #fff; }
}
/* 2026-10-31 UIUX r3 B#1: 入力漏れのエラーを出している間は固定を外す（固定したボタンがエラー文を隠していた）。
   エラーの欄は a11y_error.js が aria-invalid="true" を付ける。ボタンはフォームの中の普通の位置に戻る。
   A#2: 欄にキーボードで移ったとき、固定ボタンの裏に入らないように欄の下側に余白を取る。 */
@media screen and (min-width:1200px) {
 html:has([aria-invalid="true"]) :is(.calculator-action, .calculator-action-row) { position: static; box-shadow: none; }
 /* 余白は欄とエラー文にだけ付ける。html の scroll-padding にすると、固定ボタン自身が常に「隠れている」扱いになり、
    ボタンへのフォーカス・クリックでページが動いた（2026-11-01 test_result_rail_print で 7 件赤） */
 html:has(.calculator-action, .calculator-action-row) :is(input, select, textarea, .field-error) { scroll-margin-bottom: 104px; }
}
