/* NUIR 免税同意書フォーム — 案A「白と罫線」(2026-08-18 吉田さん採択)。
   白基調・タイポ主導・箱と色を排し、罫線と余白だけで組むミニマル。
   色は黒・グレーのみ(エラーの赤だけ機能色として残す)。
   タップ領域・設問の文言は旧デザインと同一(完了率に効く部分は変えない)。 */

:root {
  --ink: #111111;
  --sub: #767676;
  --line: #dcdcdc;
  --error: #d40000;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: "Helvetica Neue", Arial, "Hiragino Sans", "Noto Sans JP", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.sheet {
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.head { text-align: center; margin-bottom: 44px; border: 0; }
.logo { height: 56px; width: auto; display: inline-block; margin-bottom: 18px; }
h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: 0.02em; line-height: 1.5; }
.subtitle { margin: 6px 0 0; color: var(--sub); font-size: 13px; }

.field { margin: 0 0 34px; border: 0; padding: 0; }
fieldset.field { min-width: 0; }
.q {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--sub);
  margin-bottom: 6px;
  padding: 0;
}
.req { color: var(--ink); }

input[type="text"], select {
  width: 100%;
  font: inherit;
  color: inherit;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding: 8px 2px;
  background: transparent;
  appearance: none;
}
input[type="text"]::placeholder { color: #c0c0c0; }
input[type="text"]:focus, select:focus, canvas:focus {
  outline: none;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 7px; /* 下線が太る分を吸収して段差を出さない */
}
canvas:focus { border: 2px solid var(--ink); padding-bottom: 0; }

select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23767676' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
}

/* QR経由(?store=)の店舗固定表示 */
.store-fixed {
  margin: 0;
  padding: 8px 2px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

.choices { display: flex; flex-direction: column; }
.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.choices .choice:first-child { border-top: 1px solid var(--line); }
.choice input {
  margin: 5px 0 0;
  accent-color: var(--ink);
  flex: none;
  width: 17px;
  height: 17px;
}

.terms {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 8px 2px;
  max-height: 260px;
  overflow-y: auto;
  font-size: 12.5px;
  color: #333333;
  margin-bottom: 4px;
  background: transparent;
}
.terms p { margin: 10px 0; }
/* 条項の番号は出ている項目だけに振る(日付で隠す項目があっても 1 から続く。hidden は数えない) */
.terms { counter-reset: term; }
.terms p.term > strong:first-child::before { counter-increment: term; content: counter(term) ". "; }

.choice.agree { font-weight: 600; }

.sign-wrap { display: flex; flex-direction: column; gap: 8px; }
#sign-pad {
  width: 100%;
  height: 180px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: #ffffff;
  touch-action: none; /* 指・ペンの線をスクロールに取られない */
  display: block;
}

button { font: inherit; cursor: pointer; }
#submit-btn {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #ffffff;
  background: var(--ink);
  border: 0;
  border-radius: 0;
}
#submit-btn:active { background: #000000; }
#submit-btn:disabled { background: var(--sub); cursor: wait; }

.ghost {
  align-self: flex-end;
  padding: 4px 2px;
  background: none;
  border: 0;
  color: var(--sub);
  font-size: 13px;
  text-decoration: underline;
}

.error { color: var(--error); font-weight: 600; }

/* 機械よけの欄は視覚的に存在させない(display:noneにはしない) */
.hp { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* 完了ページ */
.done { text-align: center; padding-top: 18vh; }
.done h1 { margin-top: 8px; }
