/* [2026-09-16 回帰是正] スタンプカードは【全幅前提】のため、コンテンツ表示領域の内側余白だけを 0 にする。
   共通CSS（mb.common.css）の #app-root / #contents は padding: 0 var(--content-gutter) 2.5rem を持つ。
   🔴 改修前に持っていた !important の打ち消し一式は戻さない（ヘッダーの強制非表示・下部メニュー高さの
      ハードコード等まで巻き戻るため）。戻すのは左右の内側余白だけである。
   ⚠️ 480px シェル（body の max-width）と、その【外側】に出る帯（--gutter-color / --gutter-image）は
      本改修の成果物なので触らない。ここで 0 にするのは【シェルの中】の 15px だけ。
   ⭐ 変数の上書きなので !important は不要。 */
:root {
  --content-gutter: 0;
}

*{
    margin: 0;
    padding: 0;
}
body{
    font-family: 'Noto Sans JP', sans-serif;
}
:root{
    --stampcard-main_color: #fafafa;
    --stampcard-main_color-o: #fafafa5c;
    --stampcard-sub_color: #fafafa;
    --stampcard-background_color: #fafafa;
    --stampcard-text_color: #fafafa;
    --stampcard-earned_milestone_color: #fafafa;
    --stampcard-unearned_milestone_color: #fafafa;
    --stampcard-section_title_color: #fafafa;
}
.redeemed{
    background-color: #eeeeee!important;
}

.main-color{
    color: var(--stampcard-main_color);
}
.sub_color{
    color: var(--stampcard-sub_color);
}
.section_title_color{
    color: var(--stampcard-section_title_color);
}
.text_color{
    color: var(--stampcard-text_color);
}
.earned_milestone_color{
    background-color: var(--stampcard-earned_milestone_color)!important;
}
.unearned_milestone_color{
    background-color: var(--stampcard-unearned_milestone_color)!important;
}
.icon-dui{
    color: #4CAF50;
}
.font12{
    font-size: 12px;
}
.font13{
    font-size: 13px;
}
.font14{
    font-size: 14px;
}
.font15{
    font-size: 15px;
}
.font16{
    font-size: 16px;
}
.font18{
    font-size: 18px!important;
}
.bold{
    font-weight: bold;
}
.flex{
    display: flex;
}
.ml-14{
    margin-left: 14px;
}
.color-fff{
    color: #ffffff;
}
.flex-align-center {
    display: flex;
    align-items: center;
}
.justify-between{
    display: flex;
    justify-content: space-between;
}
.flex-justify-center {
    display: flex;
    justify-content: center;
}
.flex-align-justify-center {
    display: flex;
    align-items: center;
    justify-content: center;
}
.flex-1{
    flex: 1;
}
.flex-c{
    flex-direction: column;
}
.ml-auto{
    margin-left: auto;
}

.main{
    width: 100vw;
    min-height: 100vh;
    background-color: var(--stampcard-background_color);
}
.banner-img{
    width: 100%;
    display: block;
    object-fit: cover;
}

.content{
    color: #777;
    padding: 20px;
    background-color: var(--stampcard-background_color);
}
.obtain-box{
    padding: 20px;
    border-radius: 16px;
    /*background-color: #FFFFFF;*/
    background: linear-gradient(135deg, #fbfdfb, #fff);
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
}

.progress-box{
    display: flex;
    flex-direction: column;
    font-weight: 900;
    color: #666666;
}
.progress-box .number{
    font-size: 32px;
}

.progress-box .number .num-pre{
    display: inline-block;
    font-weight: 900;
    color: var(--stampcard-main_color);
    font-size: 42px;
    text-shadow: 2px 2px 4px rgba(165, 214, 167, 0.3);
    animation: countPulse 2s ease-in-out infinite;
}
@keyframes countPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}


.progress {
    --size: 90px;
    --border: 5px;
    --percent: 0;

    width: var(--size);
    height: var(--size);
    border-radius: 50%;

    background:
        conic-gradient(
            var(--stampcard-main_color) calc(var(--percent) * 1%),
            var(--stampcard-main_color-o) 0
        );

    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.progress::before {
    content: "";
    position: absolute;
    inset: var(--border);
    background: #fff;
    border-radius: 50%;
}

.reset-btn{
    border-radius: 16px;
    line-height: 54px;
    margin: 20px auto;
    background-image: linear-gradient(135deg, var(--stampcard-main_color-o), var(--stampcard-main_color));
    color: #FFFFFF;
    text-align: center;
    font-weight: 900;
}
.progress span {
    position: relative;
    font-size: 20px;
    font-weight: bold;
    color: var(--stampcard-main_color)
}
.title-row{
    padding: 10px 0;
}
.title{
    font-weight: bold;
    margin-left: 6px;
}
.confirm{
    border: 1px solid var(--stampcard-main_color);
    border-radius: 20px;
    font-size: 12px;
    padding: 6px 12px;
    font-weight: bold;
    color: var(--stampcard-sub_color);
    background-color: var(--stampcard-main_color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.confirm.is-active {
    transform: scale(0.95);
}
.confirm .icon-refresh{
    display: inline-block;
}
.confirm.is-active .icon-refresh {
    transform: rotate(180deg);
    transition: transform 0.3s;
}
.confirm:first-of-type {
    margin-left: auto;
}

.card-item{
    border-radius: 16px;
    padding: 10px;
    background-color: #ffffff;
}


.card-item+.card-item{
    margin-top: 10px;
}
.card-item .icon-box{
    width: 20px;
    height: 20px;
    padding: 10px;
    border-radius: 50%;
    background-color: #e0e0e0;
}
.bgColorFFF{
    background-color: rgb(255, 255, 255);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-item .iconfont{
    font-size: 24px;
}
.card-item .icon-yiwenshiyi{
    font-size: 20px;
}
.card-item .desc-text{
    font-size: 13px;
    white-space: pre-line;
}
.qrcode-list{
    width: 100%;
    display: grid;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
}

.qrcode-item{
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #ececed;
}
.qrcode-item span{
    font-size: 9px;
}
.qrcode-btn{
    margin-top: 20px;
    gap: 8px;
    width: 100%;
    padding: 8px 0;
    border-radius: 8px;
    color: #FFFFFF;
    font-weight: bold;
    background-image: linear-gradient(135deg, #fda525, #fc6f02);
}
.notice-title{
    gap: 10px;
    margin-bottom: 10px;
}
.mask{
    position: fixed;
    inset: 0;
    pointer-events: auto;
    touch-action: none;
    z-index: 666;
}
.mask.layer{
    z-index: 999999;
    background: rgba(0, 0, 0, 0.7);
}
.alert-box1{
    gap: 10px;
    padding: 14px;
    border-radius: 8px;
    box-shadow: 0px 0px 10px 6px rgba(0, 0, 0, 0.1);
    width: 80%;
    background-color: #FFFFFF;
    position: fixed;
    z-index: 999;
    left: 50%;
    transform: translate(-50%, -50%);
    top: 50%;
    font-weight: 600;
    color: #3f3f3f;
    font-size: 14px;
}
.alert-box1 span{
    line-height: 16px;
}
.alert-box2{
    width: 80%;
    top: 40%;
}
.color-red{
    color: #E65100;
}
.checkbox-main{
    gap: 8px;
    font-size: 18px;
}
.info{
    font-size: 11px;
    color: #757575;
    text-align: center;
    margin: 0;
    line-height: 1.5;
    font-weight: 400;
}
.alert-box1 .btn{
    width: 100%;
    background: linear-gradient(135deg, #BDBDBD 0%, #9E9E9E 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 900;
    cursor: not-allowed;
    transition: all 0.3s ease;
}
.complete-icon{
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
    animation: completePop 0.5s ease;
}
.complete-icon .icon-dui{
    font-size: 40px;
    color: #FFF;
}
.btn-back{
    width: 80%;
    text-align: center;
    background: white;
    color: #757575;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}
.alert-box1 .btn:not(:disabled) {
    background: linear-gradient(135deg, #EE7700 0%, #FF6F00 100%);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(238, 119, 0, 0.3);
}
.alert-box2 .notice{
    padding: 20px 0;
    white-space: pre-line;
}
.alert-box2 .btn-l{
    flex: 1;
    background: white;
    color: #757575;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}
.alert-box2 .btn-r{
    flex: 1;
    background: linear-gradient(135deg, #EF5350 0%, #D32F2F 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
    transition: all 0.3s ease;
    text-align: center;
    margin-left: 16px;
}
.btn-r1{
    background: linear-gradient(135deg, #EE7700 0%, #FF6F00 100%)!important;
}
.alert-box3{
    padding: 20px;
    top: 40%;
    gap: 20px;
}
.alert-box3 .btn{
    font-size: 14px;
    padding: 10px;
    width: 60%;
    background-color: #ccc;
    border-radius: 8px;
}
.alert-box2 .alert-title{
    font-size: 18px;
    font-weight: 900;
    color: #333;
    margin: 0 0 12px;
    text-align: center;
}
.confirm-icon{
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    background: #F5F5F5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #757575;
}
.confirm-icon .icon-yiwen{
    font-size: 32px;
}
.alert-box2 .reset-message{
    font-size: 14px;
    font-weight: 500;
    color: #757575;
    line-height: 1.6;
    margin: 0 0 24px;
    text-align: center;
    white-space: pre-line;
}
.privacy-title{
    padding: 40px 0 20px;
    font-size: 12px;
}
.a-tag{
    text-decoration: none;
    color: var(--stampcard-text_color);
}
.tools-main{
    position: fixed; 
    z-index: 1000000; 
    text-align: center;
    top: 200px;
    left: 0;
    right: 0;
    width: 100%;
    transition: all 200ms ease;
    opacity: 0;
    display: none;
}
.text-center{
    text-align: center;
}
.tools-main.show{
    top: 80px;
    opacity: 1;
    display: block;
}

.tools-main .tools-msg{
    padding: 12px 24px;
    border-radius: 24px;
    max-width: 40%;
    min-width: 200px;
    text-align: left;
    color: #ffffff;
    font-weight: 700;
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
    margin: 0 auto;
    display: inline-block;
}
.tools-msg.error{
    background: linear-gradient(135deg, rgb(227, 30, 36) 0%, rgb(198, 40, 40) 100%);
}
.tools-msg .icon-dui{
    color: #ffffff;
    font-size: 20px;
}

.container-error{
    width: 100VW;
    height: 100VH;
    text-align: center;
    background-color: #efefef;
}
.container-error.black-bg{
    color: #ffffff;
    background-color: #222222;
}
.container-error .error-main{
    padding: 0 20px;
}
.container-error .title{
    margin-top: 20px;
}
.container-error .text{
    margin-top: 10px;
    font-size: 10px;
}
.container-error .btn{
    margin: 0 auto;
    margin-top: 40px;
    border: 1px solid #ffffff;
    border-radius: 6px;
    width: 80%;
    line-height: 40px;
    cursor: pointer;
}
.celebration-icon{
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    /* 重要: 管理画面で設定した配色に追随させる（redmine-54035 / QA #17）。
       以前はオレンジ（#EE7700）の固定色でスタンプカードの配色設定と食い違っていた。
       注意: `--stampcard-main_color` は使わない。:root に #fafafa（ほぼ白）の既定値があり、
          設定が無いミッションでは**フォールバックが発火せず白い面に白い文字**になる（実測 / PR #49 レビュー）。
          `--stampcard-modal-accent` は mission.html が**設定が有るときだけ**定義するので、
          無ければ従来色（#EE7700）へ落ちる。 */
    background: var(--stampcard-modal-accent, #EE7700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    animation: celebrationPop 0.6s ease;
}
.celebration-icon .icon-jiangbei{
    font-size: 36px;
}
.celebration-title{
    font-size: 24px;
    font-weight: 900;
    color: var(--stampcard-modal-accent, #EE7700);
    text-align: center;
    margin: 0 0 12px;
}
.celebration-message{
    font-size: 16px;
    font-weight: 700;
    color: #757575;
    text-align: center;
    margin: 0 0 8px;
    line-height: 1.5;
}
.celebration-reward{
    font-size: 20px;
    font-weight: 900;
    color: var(--stampcard-modal-accent, #EE7700);
    text-align: center;
    margin: 0 0 24px;
}
/* 活動スコアの報酬行（redmine-54035 / QA #17）
   注意: .celebration-reward は**マイルストーンの説明**で用途が違うため別クラスにする。
      配色は .celebration-reward と同じく --stampcard-modal-accent に追随させる。 */
.celebration-score{
    font-size: 20px;
    font-weight: 900;
    color: var(--stampcard-modal-accent, #EE7700);
    text-align: center;
    margin: 0 0 24px;
}
.btn-primary{
    width: 100%;
    background: var(--stampcard-modal-accent, #EE7700);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    margin-bottom: 10px;
}
.confetti-container{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    border-radius: 20px;
}
.confetti-container .confetti-piece{
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confettiFall 3s ease-out forwards;
}
@keyframes confettiFall {
    to {
        transform: translateY(400px) rotate(720deg);
        opacity: 0;
    }
}
@keyframes warningPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.reset-warning-icon{
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #FFE0B2 0%, #FFCC80 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #E65100;
    animation: warningPulse 1.5s ease-in-out infinite;
}
.reset-warning-icon .icon-jinggao{
    font-size: 36px;
}
.redeem-warning{
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    border: 1px solid #FFB74D;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}
.redeem-warning .icon-jinggao{
    color: #E65100;
    margin-right: 6px;
}
.redeem-warning .notice2{
    margin-top: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #757575;
    line-height: 1.6;
}
.reward-icon{
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, #FFA726 0%, #FF6F00 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 111, 0, 0.3);
}
.disc-text{
    font-size: 18px;
    font-weight: 900;
    color: #EE7700;
    margin: 0;
}


/* 画像ポップアップスタイル */
.image-popup-box{
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    max-height: 85vh;  /* 90vh から 85vh に変更：閉じるボタンの余白を確保 */
    z-index: 1000001;  /* tools-mainより上に表示 */
    animation: popupFadeIn 0.3s ease;
}

.image-popup-close{
    position: absolute;
    top: -12px;
    right: -12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.image-popup-close::before{
    content: '×';
    color: #FFFFFF;
    line-height: 1;
}

.image-popup-close:active{
    transform: scale(0.95);
}

.popup-image{
    width: 100%;
    max-height: 85vh;  /* 90vh から 85vh に変更：閉じるボタンの余白を確保 */
    display: block;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}