@charset "UTF-8";

/* ============================================================
   afa-common.css — 全ページ共通（top / stamp / map / voucher / camera）
   言語の切り替え・右上の切替ボタン・アプリ内ブラウザの案内・モーダル
   rem はデザイン px ÷ 100（100px = 1rem）
   ============================================================ */

/* ---- 言語: 既定は英語。html[data-afa-lang="ja"] で日本語 ---- */
html:not([data-afa-lang="ja"]) .l-ja { display: none !important; }
html[data-afa-lang="ja"] .l-en { display: none !important; }

/* ---- 右上の切替ボタン（ヘッダーのメニューの左に固定）---- */
.afa-lang {
    position: fixed;
    top: 0.16rem;
    right: 0.66rem;
    z-index: 10050;
    display: flex;
    align-items: center;
    height: 0.34rem;
    padding: 0.03rem;
    border: 0.02rem solid #E4007F;
    border-radius: 0.17rem;
    background: #fff;
    box-shadow: 0 0.02rem 0.06rem rgba(0, 0, 0, 0.18);
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 0.12rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.afa-lang__opt {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 0.09rem;
    border-radius: 0.14rem;
    color: #E4007F;
    transition: background 0.2s, color 0.2s;
}
html:not([data-afa-lang="ja"]) .afa-lang__opt[data-v="en"],
html[data-afa-lang="ja"] .afa-lang__opt[data-v="ja"] {
    background: #E4007F;
    color: #fff;
}

/* ---- アプリ内ブラウザの案内（下に固定）---- */
.afa-inapp {
    position: fixed;
    left: 0.10rem;
    right: 0.10rem;
    bottom: 0.10rem;
    z-index: 10040;
    max-width: 4.10rem;
    margin: 0 auto;
    padding: 0.14rem 0.16rem;
    border: 0.03rem solid #2A2A2A;
    border-radius: 0.14rem;
    background: #FFE33F;
    color: #2A2A2A;
    font-family: 'M PLUS Rounded 1c', sans-serif;
    box-shadow: 0 0.04rem 0.12rem rgba(0, 0, 0, 0.25);
}
.afa-inapp[hidden] { display: none; }
.afa-inapp__title { font-size: 0.15rem; font-weight: 800; line-height: 1.4; }
.afa-inapp__body { margin-top: 0.04rem; font-size: 0.12rem; line-height: 1.5; }
.afa-inapp__copy {
    display: block;
    margin: 0.10rem auto 0;
    padding: 0.08rem 0.20rem;
    border: 0;
    border-radius: 0.20rem;
    background: #2A2A2A;
    color: #fff;
    font-size: 0.13rem;
    font-weight: 700;
}

/* ---- 仮文言の印（DEV だけ）---- */
.afa-draft {
    position: fixed;
    left: 0.06rem;
    bottom: 0.06rem;
    z-index: 10030;
    padding: 0.03rem 0.08rem;
    border-radius: 0.06rem;
    background: rgba(42, 42, 42, 0.72);
    color: #FFE33F;
    font: 700 0.10rem/1.4 'M PLUS Rounded 1c', sans-serif;
    letter-spacing: 0.05em;
    pointer-events: none;
}
.afa-devbtn {
    display: block;
    margin: 0.06rem auto 0;
    padding: 0.05rem 0.12rem;
    border: 0.01rem dashed #999;
    border-radius: 0.06rem;
    background: #f4f4f4;
    color: #666;
    font: 600 0.11rem/1.4 monospace;
}

/* ---- モーダル（はじめる前に・コンプリート）---- */
.afa-modal {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.20rem;
    background: rgba(20, 30, 40, 0.62);
}
.afa-modal[hidden] { display: none; }
.afa-modal__box {
    width: 100%;
    max-width: 3.90rem;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 0.03rem solid #2A2A2A;
    border-radius: 0.18rem;
    background: #fff;
    box-shadow: 0.06rem 0.06rem 0 #2A2A2A;
}
.afa-modal__title {
    padding: 0.12rem 0.16rem;
    background: #E4007F;
    color: #fff;
    font-family: 'Dela Gothic One', 'M PLUS Rounded 1c', sans-serif;
    font-size: 0.20rem;
    text-align: center;
    letter-spacing: 0.04em;
}
.afa-modal__scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.06rem 0.18rem 0.12rem;
    color: #2A2A2A;
    font-size: 0.13rem;
    line-height: 1.6;
}
.afa-modal__btn {
    flex: none;
    display: block;
    width: calc(100% - 0.32rem);
    height: 0.52rem;
    margin: 0.10rem auto 0.16rem;
    border: 0;
    border-radius: 0.26rem;
    background: #E4007F;
    color: #fff;
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 0.16rem;
    font-weight: 800;
    box-shadow: 0 0.04rem 0 #A3005B;
    cursor: pointer;
}
.afa-modal__btn:active { transform: translateY(0.02rem); box-shadow: 0 0.02rem 0 #A3005B; }
.afa-modal__box--complete .afa-modal__title { background: linear-gradient(90deg, #E4007F, #FF8A00); }
.afa-modal__box--complete .afa-lead { padding: 0 0.16rem; }

/* ---- はじめる前に（stamprally.digital の参加前画面を参考）---- */
.afa-modal__box--start { max-width: 4.00rem; }
.afa-modal__box--start .afa-modal__scroll { padding: 0.12rem 0.14rem 0.10rem; background: #F2FBFF; }
.afa-modal__foot { flex: none; padding: 0.10rem 0.16rem 0; border-top: 0.02rem solid #e3e3e3; background: #fff; }
.afa-modal__foot .afa-modal__btn { width: 100%; margin: 0.08rem 0 0.14rem; }
.afa-modal__btn:disabled { background: #c4c4c4; box-shadow: none; cursor: default; }
.afa-agree { display: flex; align-items: center; gap: 0.08rem; cursor: pointer; font-size: 0.13rem; font-weight: 700; color: #2A2A2A; line-height: 1.45; }
.afa-agree input { position: absolute; opacity: 0; width: 0; height: 0; }
.afa-agree__box {
    flex: none;
    width: 0.24rem;
    height: 0.24rem;
    border: 0.02rem solid #E4007F;
    border-radius: 0.06rem;
    background: #fff;
    position: relative;
}
.afa-agree input:checked + .afa-agree__box { background: #E4007F; }
.afa-agree input:checked + .afa-agree__box::after {
    content: '';
    position: absolute;
    left: 0.07rem;
    top: 0.025rem;
    width: 0.06rem;
    height: 0.12rem;
    border: solid #fff;
    border-width: 0 0.03rem 0.03rem 0;
    transform: rotate(45deg);
}
.afa-agree input:focus-visible + .afa-agree__box { outline: 0.02rem solid #29C5F6; outline-offset: 0.02rem; }

/* ---- 注意事項（モーダルとトップで共用）---- */
.afa-notes2 { color: #2A2A2A; }
.afa-notes2__label {
    width: fit-content;
    margin: 0 auto 0.08rem;
    padding: 0.02rem 0.12rem;
    border-radius: 0.12rem;
    background: #E4002B;
    color: #fff;
    font-size: 0.11rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}
.afa-warn {
    display: flex;
    align-items: center;
    gap: 0.12rem;
    margin-bottom: 0.08rem;
    padding: 0.12rem 0.14rem;
    border: 0.02rem solid #E4002B;
    border-radius: 0.12rem;
    background: #FFF1F3;
}
.afa-warn__icon { flex: none; width: 0.48rem; height: 0.48rem; }
.afa-warn__icon svg { display: block; width: 100%; height: 100%; }
.afa-warn__text { flex: 1; min-width: 0; }
.afa-warn__title { font-size: 0.14rem; font-weight: 800; line-height: 1.4; color: #C8001F; }
.afa-warn__body { margin-top: 0.02rem; font-size: 0.12rem; line-height: 1.5; }
.afa-warn--sns { flex-direction: column; align-items: stretch; text-align: center; }
.afa-sns { display: flex; justify-content: center; gap: 0.14rem; }
.afa-sns__item { display: flex; flex-direction: column; align-items: center; width: 0.38rem; }
.afa-sns__item svg { display: block; width: 0.36rem; height: 0.36rem; }
.afa-sns__x { margin-top: 0.01rem; color: #E4002B; font-size: 0.18rem; font-weight: 800; line-height: 1; }
.afa-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 0.08rem; }
.afa-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.12rem 0.08rem 0.10rem;
    border-radius: 0.12rem;
    background: #fff;
    box-shadow: 0 0.01rem 0.04rem rgba(0, 0, 0, 0.12);
    text-align: center;
}
.afa-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.afa-tile__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0.44rem;
    height: 0.44rem;
    margin-bottom: 0.06rem;
    border-radius: 50%;
    background: #E8F8FE;
    color: #0FA3D6;
}
.afa-tile__icon svg { width: 0.24rem; height: 0.24rem; }
.afa-tile__title { font-size: 0.13rem; font-weight: 800; line-height: 1.35; }
.afa-tile__body { margin-top: 0.03rem; font-size: 0.11rem; line-height: 1.5; color: #555; }
.afa-card .afa-tile { box-shadow: none; border: 0.02rem solid #E3EEF3; }

/* ---- 文字の折り返し（見出しは行の長さをそろえる・日本語は文節で折る）---- */
.afa-warn__title, .afa-tile__title, .afa-modal__title { text-wrap: balance; }
.afa-warn__body, .afa-tile__body { text-wrap: pretty; }
html[data-afa-lang="ja"] .afa-notes2 { word-break: auto-phrase; line-break: strict; }
.afa-modal__foot { padding-top: 0.04rem; }
.afa-warn__body, .afa-tile__body { text-wrap: balance; }

/* ヘッダーの中に入れたとき（afasg.js）: ヘッダーと一緒にスクロールで隠れる・出る */
.afa-lang.afa-lang--header { position: absolute; top: 50%; right: 0.66rem; transform: translateY(-50%); }

/* トップ以外のヘッダーはロゴが真ん中にあるので、切替ボタンを小さくしてロゴにかぶらないようにする */
body:not(.afa-top) .afa-lang.afa-lang--header { height: 0.27rem; padding: 0.025rem; right: 0.62rem; font-size: 0.095rem; }
body:not(.afa-top) .afa-lang.afa-lang--header .afa-lang__opt { padding: 0 0.065rem; }

/* DEV のテスト用ボタンは #devtools のときだけ（既定は本番と同じ見た目） */
.afa-devbtn { display: none !important; }
html.afa-devtools .afa-devbtn { display: block !important; }

/* iPhone の Safari: vh はツールバーを隠したときの高さなので、見えている高さ（dvh）と安全領域で収める（11/23 実機） */
.afa-modal { padding: calc(0.16rem + env(safe-area-inset-top)) 0.16rem calc(0.16rem + env(safe-area-inset-bottom)); }
.afa-modal__box { max-height: 90vh; max-height: calc(100dvh - 0.32rem - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }

/* はじめる前に: 最後までスクロールするまで押せない旨（ボタンの下） */
.afa-modal__hint { margin: -0.06rem 0 0.12rem; text-align: center; font-size: 0.115rem; font-weight: 700; color: #6b6b6b; }
.afa-modal__hint[hidden] { display: none; }
.afa-modal__foot .afa-modal__btn:disabled { background: #c4c4c4; box-shadow: none; }

/* 監修用のコピー: 左下の TEST はボタン（押すとリセットのモーダル） */
.afa-draft--btn { pointer-events: auto; border: 0; cursor: pointer; }
.afa-testreset { max-width: 3.20rem; }
.afa-testreset .afa-modal__title { background: #2A2A2A; }
.afa-testreset__lead { margin: 0.06rem 0 0.10rem; text-align: center; font-weight: 700; }
.afa-testreset__lead span, .afa-testreset__btn span { display: block; font-size: 0.10rem; font-weight: 500; color: #777; }
.afa-testreset__btn { display: block; width: 100%; margin: 0 0 0.08rem; padding: 0.10rem 0.12rem; border: 0.02rem solid #2A2A2A; border-radius: 0.12rem; background: #fff; color: #2A2A2A; font: inherit; font-weight: 800; text-align: left; cursor: pointer; }
.afa-testreset__btn[data-reset="all"] { background: #FFF0F6; border-color: #E4007F; }
