/* 入信の儀などのモーダル（聖典と同じ見た目）。page.css の後に読み込む */
:root {
  --lace-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='24' viewBox='0 0 14 24'%3E%3Cg transform='matrix(0 1 1 0 0 0)'%3E%3Cpath d='M0 0h24v3c0 6-5 10-12 10S0 9 0 3z' fill='%23201c1e'/%3E%3Ccircle cx='12' cy='6.5' r='2.6' fill='%23fefcfc'/%3E%3Ccircle cx='5' cy='3.2' r='1.2' fill='%23fefcfc'/%3E%3Ccircle cx='19' cy='3.2' r='1.2' fill='%23fefcfc'/%3E%3Ccircle cx='12' cy='11.2' r='.9' fill='%23fefcfc'/%3E%3C/g%3E%3C/svg%3E");
  --lace-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='24' viewBox='0 0 14 24'%3E%3Cg transform='matrix(0 1 -1 0 14 0)'%3E%3Cpath d='M0 0h24v3c0 6-5 10-12 10S0 9 0 3z' fill='%23201c1e'/%3E%3Ccircle cx='12' cy='6.5' r='2.6' fill='%23fefcfc'/%3E%3Ccircle cx='5' cy='3.2' r='1.2' fill='%23fefcfc'/%3E%3Ccircle cx='19' cy='3.2' r='1.2' fill='%23fefcfc'/%3E%3Ccircle cx='12' cy='11.2' r='.9' fill='%23fefcfc'/%3E%3C/g%3E%3C/svg%3E");
}
[id^="modal-"] { position: fixed; inset: 0; z-index: 1000; align-items: center; justify-content: center; padding: 60px 16px 16px; background: rgba(17,8,10,.84); backdrop-filter: blur(4px); }
[id^="modal-"].is-open { animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; } }
.dialog {
  position: relative; width: min(520px, 100%); max-height: calc(100vh - 76px); overflow: auto; padding: 48px 44px 40px;
  background: var(--lace-t) 0 0/24px 14px repeat-x, var(--lace-b) 0 100%/24px 14px repeat-x, var(--lace-l) 0 0/14px 24px repeat-y, var(--lace-r) 100% 0/14px 24px repeat-y, linear-gradient(170deg, #fefcfc, #f5ebe7);
  box-shadow: 0 40px 80px rgba(0,0,0,.6);
}
.dialog::before { content: ""; position: absolute; inset: 22px; border: 3px double rgba(114,30,32,.3); pointer-events: none; }
.close { position: absolute; top: 18px; right: 18px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(114,30,32,.4); background: var(--paper); color: var(--red); font: 400 22px/1 var(--roman); cursor: pointer; }
.dialog .lat { display: block; text-align: center; font: 24px var(--fraktur); color: var(--red); }
.dialog h2 { margin: 2px 0 6px; text-align: center; font-size: 26px; font-weight: 900; letter-spacing: .3em; }
.dialog .intro { text-align: center; font-size: 14px; color: var(--ink-soft); margin: 0 0 20px; line-height: 1.8; }
.field { margin-bottom: 16px; position: relative; }
.field label { display: block; font-size: 13px; font-weight: 700; letter-spacing: .14em; margin-bottom: 4px; }
.field label .req { font-size: 11px; color: var(--tartan); margin-left: 8px; }
.field input[type="text"], .field input[type="email"], .field input[type="password"] {
  width: 100%; padding: 10px 12px; font: 400 16px var(--mincho); color: var(--ink); background: rgba(255,255,255,.7);
  border: 1px solid rgba(114,30,32,.35); border-radius: 0;
}
.field input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(200,32,46,.15); }
.field .err { display: none; margin: 6px 0 0; font-size: 12px; font-weight: 700; color: #b3121f; line-height: 1.6; }
.field .err::before { content: "⚠ "; }
.field.is-error input[type="text"], .field.is-error input[type="email"], .field.is-error input[type="password"] { border: 2px solid #c8102e; background: #fff1ef; }
.field.is-error .err { display: block; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 700; cursor: pointer; line-height: 1.7; }
.check input { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--red); flex: none; }
.field.is-error .check { color: #b3121f; }
.form-error { margin: 0 0 16px; padding: 10px 14px; font-size: 13px; font-weight: 700; color: #fff; background: var(--red); border-left: 5px solid var(--coral); line-height: 1.7; }
.form-error::before { content: "⚠ "; }
.foot-sub { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0 10px; font-size: 12px; letter-spacing: .08em; }
.foot-sub a { color: #c9b3b4; text-decoration: none; }
.foot-sub a:hover { color: var(--coral); }
.noscript { margin: 0; padding: 12px 16px; text-align: center; font-size: 13px; color: #fff; background: var(--red); }
.oath-acts { margin: 6px 0 0; display: flex; justify-content: center; gap: 18px; }
.oath-acts .linkish { color: var(--red); padding: 4px 2px; font-size: 12.5px; }
.foot-acts { margin: 0 0 6px; font-size: 12px; color: #b9a1a2; letter-spacing: .06em; }
.foot-acts .linkish { padding: 2px 4px; font-size: 12px; }
.oath-no { margin: -8px 0 10px; font: 700 12px var(--roman); letter-spacing: .2em; color: var(--brick); }
.oath-no b { font-size: 16px; color: var(--red); letter-spacing: .12em; }
.cookie-note { margin: 4px 0 18px; padding: 12px 14px; border: 1px dashed rgba(114,30,32,.45); background: rgba(219,187,188,.18); font-size: 12.5px; line-height: 1.8; color: var(--ink-soft); text-align: left; }
.cookie-note b { display: block; font-size: 13.5px; color: var(--red); letter-spacing: .08em; }
.cookie-note p { margin: 4px 0 0; }
.cookie-note ul { margin: 4px 0 0; padding-left: 1.2em; }
.dialog-wide { width: min(600px, 100%); padding: 44px 40px 30px; text-align: center; }
.cert-prev { display: block; width: 100%; height: auto; margin: 4px 0 16px; box-shadow: 0 8px 22px rgba(0,0,0,.25); }
.btn-x { width: 100%; min-height: 50px; background: #0f0f10; color: #fff; border-color: #000; }
.btn-x:hover { background: #26262a; }
.btn-x .x { font: 700 19px/1 system-ui, sans-serif; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.btn-row .btn { width: 100%; }
.share-note { margin: 10px 0 0; font-size: 12px; color: var(--ink-soft); }
.later { margin-top: 8px; background: none; border: 0; cursor: pointer; font: 12.5px var(--mincho); color: var(--rose); letter-spacing: .08em; text-decoration: underline; text-underline-offset: 3px; padding: 6px; }
@media (max-width: 480px) { .dialog-wide { padding: 40px 22px 24px; } .btn-row { grid-template-columns: 1fr; } }
.btn-seal { width: 100%; min-height: 54px; gap: 12px; }
.btn-seal i { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e05a62, #8e1520 65%); box-shadow: inset 0 0 0 3px rgba(0,0,0,.18); display: grid; place-items: center; font-style: normal; font-size: 13px; color: #ffe; }
