/* ===== Reset / Base ===== */
*{ box-sizing:border-box; }

body{
  margin:0;
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  line-height:1.6;
}

/* ===== Layout ===== */
.wrap{
  max-width: 920px;
  margin: 0 auto;
  padding: 18px 14px 40px;
}

h1{
  margin: 6px 0 14px;
  font-size: 1.6rem;
}

h2{
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.box{
  border:1px solid #e6e6e6;
  border-radius: 14px;
  padding: 14px;
  background:#fff;
  margin: 12px 0;
}

.note{
  padding:10px 12px;
  border:1px solid #eee;
  border-radius: 12px;
  background:#fafafa;
}

/* ===== Buttons ===== */
.btns{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin: 10px 0;
}

.btn{
  border:1px solid #333;
  background:#fff;
  color:#111;
  border-radius: 10px;
  padding: 10px 12px;
  cursor:pointer;
  font: inherit;
}

.btn:hover{
  opacity:.85;
}

/* ===== Consent Area ===== */
.consent{
  margin-top: 10px;
}

.check{
  display:flex;
  gap:10px;
  align-items:flex-start;
  cursor:pointer;
}

.check input{
  margin-top: 3px;
}

.start{
  width:100%;
  margin-top:12px;
  padding:12px 14px;
  border-radius: 12px;
  border:1px solid #111;
  background:#111;
  color:#fff;
  cursor:pointer;
  font: inherit;
}

.start:disabled{
  opacity:.4;
  cursor:not-allowed;
}

.mini{
  margin: 8px 0 0;
  font-size: .92em;
  opacity:.85;
}

/* ===== Modal ===== */
.modal{
  position: fixed;
  inset:0;
  display:none;
  z-index: 9999;
}

.modal[aria-hidden="false"]{
  display:block;
}

.overlay{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.55);
}

.panel{
  position: relative;
  margin: 5vh auto;
  width: min(920px, 92vw);
  max-height: 90vh;
  border-radius: 14px;
  overflow:hidden;
  border:1px solid #e6e6e6;
  background:#fff;
}

/* ===== Modal Header ===== */
.head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 14px;
  border-bottom:1px solid #eee;
}

.title{
  font-weight: 700;
}

.x{
  width:40px;
  height:36px;
  border-radius: 10px;
  border:1px solid #ccc;
  background:#fff;
  cursor:pointer;
  font: inherit;
}

/* ===== Modal Body（←ここが重要） ===== */
.body{
  padding: 14px;
  padding-bottom: 32px; /* ★ 文章の終わり用の余白 */
  overflow:auto;
  max-height: calc(90vh - 120px);
}

.body h3,
.body h4{
  margin-top: 14px;
}

/* ===== Modal Footer（←閉じる下の余白） ===== */
.foot{
  padding: 12px 14px 24px; /* ★ 下に余白を追加 */
  border-top: 1px solid #eee;
  display:flex;
  justify-content:flex-end;
}