*,*:before,*:after {    box-sizing: border-box;}
html,body {    background-color: #248ECF;    margin: 0;    padding: 0;    height: 100%;    overflow: hidden;    font-family: sans-serif;}
.reader {    width: 100vw;    height: 100%;    position: relative;    display: flex;    justify-content: center;    align-items: flex-start;}
.qrreader {
    background-color: #000;
    width: 100%;
    height: 100%;
    /* 歪みを防ぎ、画面いっぱいに表示 */
    object-fit: cover;
}
.target {    position: fixed;    display: flex;    justify-content: center;    align-items: center;    top: 0;    left: 0;    width: 100vw;    height: 100%;    z-index: 1;}
img.img100 {max-width:100%;}
/* --- レティクルの設定（統合・修正版） --- */
.target-box {
    width: 60vw;
    height: 60vw;
    /* 1. 枠全体は薄くする */
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    /* 2. 外側を暗くする */
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.4);
    /* 3. アニメーションを適用（枠の太さは変えず、サイズだけ動かす） */
    animation: move_target 1.5s infinite alternate ease-in-out;
    z-index: 2;
}

/* 四隅のL字ガイド（共通設定） */
.target-box::before,
.target-box::after,
.target-inner-guide::before,
.target-inner-guide::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 4px solid #fff; /* ここを白く太くする */
}

/* 左上 */
.target-box::before {
    top: -2px; left: -2px;
    border-right: none; border-bottom: none;
}

/* 右下 */
.target-box::after {
    bottom: -2px; right: -2px;
    border-top: none; border-left: none;
}

/* 右上 */
.target-inner-guide::before {
    top: -2px; right: -2px;
    border-left: none; border-bottom: none;
}

/* 左下 */
.target-inner-guide::after {
    bottom: -2px; left: -2px;
    border-top: none; border-right: none;
}

/* --- アニメーションの定義（サイズのみ） --- */
@keyframes move_target {
    from { transform: scale(1.0); }
    to   { transform: scale(1.05); }
}

.head h1 {text-align:center;padding-top:0px;color:#FFF;}
.head h1 img {height:80px;width:auto;margin:0 auto;}

/* フッター全体の固定設定 */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(0, 0, 0, 0.4); /* 暗めに透過させて視認性を確保 */
    padding: 12px 0;
    /* iPhoneのセーフエリア（下の棒）を考慮 */
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.foot p {
    margin: 0;
    text-align: center;
    font-size: 13px;
    letter-spacing: 0.05em;
}
.foot a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    opacity: 0.9;
}

.foot a:hover {
    text-decoration: underline;
    opacity: 1;
}
.modal-overlay { display: none;    position: fixed;    justify-content: center;    align-items: center;    top: 0;    left: 0;    width: 100vw;    height: 100%;    background-color: rgba(0, 0, 0, 0.7);    z-index: 999;}
.modal-overlay.is-show {    display: flex;}
.modal {
    width: 80%;
    max-height: 85vh; /* 画面の高さの85%までに抑える（重要！） */
    background: #fff;
    border-radius: 10px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* iPhoneでヌルヌル動くようにする */
    padding-bottom: 40px; /* 下の余白はmodal-actionsが担うので0でOK */
}
.modal-cnt {    padding: 30px 15px;}
.modal-title {    display: block;    margin-bottom: 15px;    text-align: center;}
.modal-result {display:none;}
.modal-btn {    -webkit-appearance: none;    -moz-appearance: none;    appearance: none;
    display: block;    background: none;    border: none;    border-top: 1px solid #ddd;    width: 100%;    color: #333;    padding: 20px;    text-align: center;    font-size: 18px;    text-decoration: none;}
.unsupported {    display: none;    flex-direction: column;    position: fixed;    justify-content: center;    align-items: center;    top: 0;    left: 0;    width: 100vw;    height: 100%;    background: #000;    color: #fff;    z-index: 999;}
.unsupported.is-show {    display: flex;}
.unsupported-title {    font-weight: bold;    font-size: 2em;}
/* --- 追加：ドメイン表示と警告のスタイリング --- */
.domain-info {
    text-align: center;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #eee;
    word-break: break-all;
    line-height: 1.4;
}

.domain-info strong {
    color: #248ECF;
    font-size: 1.2em;
}

.warning-text {
    font-size: 14px;
    background: #fff5f5;
    padding: 10px;
    border: 1px solid #feb2b2;
    border-radius: 5px;
    margin-top: 10px;
    line-height:1.5em;
}

/* --- 追加：モーダル内のボタン構成 --- */
.modal-actions {
    display: flex;
    flex-direction: column; /* 縦並びにして誤操作を防止 */
}
.okan {text-align:center;width:30%;margin:0 auto;}
.okan img {max-width:100%;height: auto;}
.modal-btn {
    appearance: none;
    display: block;
    background: none;
    border: none;
    border-top: 1px solid #ddd;
    width: 100%;
    color: #333;
    padding: 20px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}

/* 「このページを開く」を目立たせる */
.modal-btn.primary {
    color: #fff;
    background-color: #248ECF;
    border-top: none;
    border-radius: 0 0 0 0; /* 下側はモーダルの角丸に合わせる */
}

/* 最後のボタン（やめる）の下角を丸める */
.modal-btn:last-child {
    border-radius: 0 0 10px 10px;
}


