﻿@charset "UTF-8";
body,
div,
dl,
dt,
dd,
ul,
ol,
li,
h1,
h2,
h3,
h4,
h5,
h6,
pre,
code,
form,
fieldset,
legend,
input,
button,
textarea,
p,
blockquote,
th,
td {
        margin: 0 auto;
    padding: 0;
}
ul,
ol,
dl {
    list-style: none;
}
*,*:before,*:after {
    box-sizing: inherit;
}
img {
    max-width: 100%;
height: auto;
vertical-align: top;
}
html,body {
    font-family: 'DotGothic16',sans-serif;
    background: url(../images/bg.jpg);
    background-size: contain;
    color: #000;
    overflow-x: hidden;
    width: 100%;    
    max-width: 100%;   
    position: relative; 
}



#dmm_ntgnavi {
    position: relative;
    z-index: 999;
    background: url(../images/bg_navimain.gif) center center repeat-x;
    border-bottom: 1px solid #ccc;
    border-top: 1px solid #ccc;
    font-size: 12px;
    font-family: 'メイリオ', 'Meiryo', 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ Pro W3', 'ＭＳ Ｐゴシック', Verdana, sans-serif;
    display: flex;
    justify-content: space-between;
}

#dmm_ntgnavi ul {
    list-style: none;
    margin: 2px 0;
    padding: 0;
    display: flex;
    width: 50%;
}

#dmm_ntgnavi ul li {
    margin: 0 6px 0 0;
    line-height: 15px;
}

#dmm_ntgnavi .navi_left li > a {
    display: block;
    padding: 0 3px 0 8px;
    text-decoration: none;
    border: 1px solid #eee;
    border-radius: 3px;
}

#dmm_ntgnavi .navi_left li > a:hover {
    background: #eee;
    border: 1px solid #666;
    border-radius: 3px;
}

#dmm_ntgnavi .navi_left li > a span {
    display: block;
    padding: 9px 10px 7px 28px;
    color: #333;
    font-weight: bold;
}

#dmm_ntgnavi .navi_left li.dmm_top img {
    margin: 8px 5px 8px 0
}

#dmm_ntgnavi .navi_left li.ntg_top {
    margin-left: 10px;
}

#dmm_ntgnavi .navi_left li.ntg_top span {
    background: url(../images/bg_bt_olgtop.gif) 0 center no-repeat;
    font-size: min(2.9vw,12px);
}

#dmm_ntgnavi .navi_right {
    justify-content: flex-end;
    font-size: 10px;
}

#dmm_ntgnavi .navi_right li {
    margin: 0 10px 0 0;
    padding: 8px 5px;
}

#dmm_ntgnavi .arrow {
    padding-left: 14px;
    background: url(../images/arrow_common.gif) no-repeat left center;
}

#dmm_ntgnavi .tx-point {
    font-size: 16px;
    font-weight: bold;
    color: #ff4b4b !important;
}

#dmm_ntgnavi a {
  color: inherit;
  text-decoration: none;
}

#dmm_ntgnavi p {
    margin: 0;
    line-height: 2.6em;
}

#dmm_ntgnavi .clear {
    clear: both;
}



/* ========== PC用スタイル ========== */
@media (min-width: 601px) {
    .invisible-pc {
    display: none !important;
}
.header_countdown {
    display: flex;  
    justify-content: center; 
    align-items: center; 
    gap: 10px;         
    padding: 10px 0 30px;
    font-size: clamp(12px, 5.3vw, 48px); 
    font-weight: bold;
    transform: translateX(-15px);
}
.header_text {
    position: relative;
    left: 20px;
    margin: 0;
    padding-bottom: 5px;
    border-bottom: 10px solid #e30f73;
    text-align: center; /* ★追加：改行時に文字を中央に揃える */
}

.head_cd {
    color: #e30f73;
}
.txt_countdown_time {
    color: #e30f73;
    font-size: clamp(12px, 15.5vw, 72px); 
    line-height: 1.1; /* ★追加：行間を少し詰めて一体感を出す */
}

/* ヘッダーのキャラクター画像サイズ */
.header_char {
    height: auto;
}
.char_kumako {
    position: relative;
    right: -20px;
    width: 150px; 
    margin-top: 10px;
}

.char_kumarobo {
    position: relative;
    left: -0px;
    width: 170px; 
    padding-left: 0px;
    padding-bottom: 20px;
    margin-top: 10px;
}

.game_container {
    width: 600px;
    margin: 0 auto;
    position: relative;
    padding-bottom: 650px;
}
.box_game {
    border: 4px solid #000;
    padding: 25px 35px;
    text-align: center;
    position: relative;
    background-color: #fff;
    z-index: 2;
}
.title_game {
    font-size: 40px;
    margin-bottom: 10px;
}
.subtitle_game {
    font-size: 24px;
    margin-bottom: 10px;
}
.area_canvas {
    position: relative;
    width: 500px;
    height: 500px;
    margin: 0 auto;
    background-color: #fff; 
}
.canvas_paint {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: url('data:image/svg+xml;charset=utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><text x="0" y="36" font-size="36">🖌️</text></svg>') 0 36, crosshair;
    z-index: 1;
}
.area_ui {
    margin-top: 10px;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
}
.btn_start {
    display: inline-block;
    border: none;       
    background-color: transparent; 
    padding: 0;        
    cursor: pointer;
    width: 320px;       
    transition: transform 0.1s, filter 0.2s;
}
.btn_start:hover {
    transform: scale(1.05);  
    filter: brightness(1.1); 
}
/* 押した時のへこむ動き */
.btn_start:active {
    transform: scale(0.95);
    filter: brightness(0.9);
}

.text_timer {
    font-size: 40px;
    display: none;
}
.area_character {
    position: absolute;
    bottom: 0;
    left: -300px;
    width: 450px;
    z-index: 3;
}

.game_container.is-revealed-mode {
    padding-bottom: 800px; 
}
.game_container.is-revealed-mode .area_character {
    bottom: 0px; 
}

.fukidashi {
    position: absolute;
    top: 250px;
    left: 380px;
    border: 4px solid #000;
    background-color: #000;
    padding: 10px 20px 10px 25px;
    font-size: 36px;
    /*font-weight: bold;*/
    white-space: nowrap;
    color: #fff;
}
.fukidashi::before {
    content: "";
    position: absolute;
    left: -34px;
    top: 50%;
    margin-top: -13px;
    border: 15px solid transparent;
    border-right: 15px solid #000;
}
.fukidashi::after {
    content: "";
    position: absolute;
    left: -30px;
    top: 50%;
    margin-top: -13px;
    border: 15px solid transparent;
    border-right: 15px solid #000;
}
.modal_wrap {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.95);
    z-index: 100;
}
.modal_inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    border: 4px solid #000;
    background-color: #fff;
    padding: 40px;
    text-align: center;
    width: 600px;
}
.btn_close {
    position: absolute;
    top: -75px;
    right: 0;
    width: 50px;
    height: 50px;
    border: 4px solid #000;
    border-radius: 50%;
    background-color: #fff;
    font-size: 30px;
    line-height: 42px;
    cursor: pointer;
    text-align: center;
}
.modal_title {
    font-size: 28px;
    margin-bottom: 30px;
}
.modal_image {
    width: 350px;
    margin: 0 auto 30px;

}
.modal_image canvas {
    display: block;
    width: 100%;
    height: auto;
}
.modal_time {
    font-size: 48px;
    margin-bottom: 30px;
}
.btn_save {
    display: inline-block;
    border: none;          
    background-color: transparent; 
    padding: 0;               
    cursor: pointer;
    width: 280px;              
    transition: transform 0.1s, filter 0.2s;
}

.text_note {
    text-align: center;
    margin-top: 30px;
    font-size: 18px;
    font-weight: bold;
}
}



footer {
    border-top: 1px solid #aaa;
    background: #fff;
    text-align: center;
    padding: 0.52% 1.2%;
    font-size: min(3.1vw,14px);
    line-height: 2.3em;
    color: #777;
}
footer .copy {
    display: block;
    margin: 0px auto;
    font-family: メイリオ, Meiryo, "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", Osaka, "ＭＳ Ｐゴシック", "MS PGothic", Verdana, sans-serif;
    -webkit-text-size-adjust: 100%;
    /*
    font-size: 12px;
    */
}



/* ========== ノートPC・タブレット向け微調整（601px 〜 1200px） ========== */
@media (min-width: 601px) and (max-width: 1200px) {
    .area_character {
        width: clamp(350px, 16.6vw + 250px, 450px);
        left: calc(-36.6vw + 140px); 
    }
    
    /* ▼ 変更：位置もサイズも完璧に連動する吹き出し ▼ */
    .fukidashi {
        bottom: auto; /* bottom指定はキャンセル */
        
        /* 1. 位置の最適化（口元にロック！） */
        top: 30%;  
        left: 78%; 
        
        /* ▼ 変更：600px付近でも小さくなりすぎないように、最小サイズ(下限)を24pxにアップ！ ▼ */
        font-size: clamp(24px, 3.5vw + 3px, 36px);
        
        /* ▼ 変更：文字が大きくなるのに合わせて、余白も少しふっくらさせて存在感をキープ ▼ */
        padding: clamp(8px, 1.5vw, 10px) clamp(16px, 6.5vw, 30px);
    }
    
    /* 3. ★追加：吹き出しが縮むなら、黒い「しっぽ（三角形）」も少し小さくする！ */
    .fukidashi::before {
        border-width: 11px;
        border-right-width: 11px;
        left: -25px;
        margin-top: -11px;
    }
    .fukidashi::after {
        border-width: 11px;
        border-right-width: 11px;
        left: -22px;
        margin-top: -11px;
    }
}



/* ========== SP用スタイル ========== */
@media (max-width: 600px) {
    .invisible-sp {
    display: none !important;
}
.header_countdown {
    width: 98%;       
    margin: 1% auto;     
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5%;            
    padding: 2% 0;    
    font-weight: bold;
    font-size: clamp(12px, 6.0vw, 40px);
}
.header_text {
    position: relative;
    z-index: 100;
    width: 57%;
    text-align: center;
    border-bottom: 6px solid #e30f73;
}

.header_text.is-revealed {
    font-size: clamp(16px, 5.8vw, 36px); 
    
}


.head_cd {
    color: #e30f73;
}

.txt_countdown_time {
    display: block;   
    margin-left: 0;  
    padding-bottom: 3%;
    color: #e30f73;
    font-size: clamp(28px, 13.0vw, 60px); /* ★変更：数字をスマホでも大きく！ */
    line-height: 1.1; /* ★追加：行間調整 */
}

/* スマホ用キャラクター画像サイズ */
.header_char {
    height: auto;
}
.char_kumako {
    position :relative;
    left: -2%;
    z-index: 90;
    width: 24%; 
    margin-right: -5%;
}

.char_kumarobo {
    position :relative;
    right: -5%;
    z-index: 90;
    width: 28%; 
    padding-left: 0.1%;
    padding-bottom: 2%;
    margin-left: -10%;
    margin-top: -2%;
}

.game_container {
    width: 90%;          
    margin: 0 auto 60vw;       
    padding: 0 0 55vw;
    position: relative;
}


.box_game {
    width: 100%;         
    border: 3px solid #000;
    padding: 3% 5%;       
    box-sizing: border-box;
    text-align: center;
    position: relative;
    background-color: #fff;
    z-index: 2;
}
.title_game {
    font-size: clamp(18px, 6.0vw, 36px); 
    margin-bottom: 1.5%;
}
.subtitle_game {
    font-size: clamp(12px, 4.5vw, 24px); 
    margin-bottom: 1%;
}
.area_canvas {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1/1;
    margin: 0 auto;
    background-color: #fff; 
}
.canvas_paint {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    touch-action: none;
    z-index: 1;
}


.area_ui {
    margin-top: 2%;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}


.btn_start {
    display: inline-block;
    border: none;
    background-color: transparent;
    padding: 0;
    width: min(45vw, 250px); 

    transition: transform 0.1s;
}
.btn_start:active {
    transform: scale(0.95);
}
.text_timer {
    font-size: 28px;
    display: none;
}
.area_character {
    position: absolute;
    bottom: -50vw;
    left: -15%;        
    width: 70%;          
    max-width: 350px;   
    z-index: 3;
}
.game_container.is-revealed-mode {
    margin-bottom: 65vw;
}
.game_container.is-revealed-mode .area_character {
    bottom: -55vw; 
}
.fukidashi {
    position: absolute;
    bottom: 71%;          
    left: 75%;            
    border: 3px solid #000;
    background-color: #000;
    color: #fff;
    padding: 3% 5%;      
    
    font-size: clamp(10px, 4.0vw, 30px); 
    font-weight: bold;
    white-space: nowrap;
}
.fukidashi::before {
    content: "";
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    border: 7px solid transparent;
    border-right: 7px solid #000;
}
.fukidashi::after {
    content: "";
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right: 5px solid #000;
}
.modal_wrap {
    display: none;
    position: fixed;
    top: 11vw;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.95);
    z-index: 100;
    padding: 0px;
    overflow-y: auto;
}
.modal_inner {
    position: relative;
    margin: 15% auto 5% auto;
    border: 3px solid #000;
    background-color: #fff;
    padding: 3%;
    text-align: center;
    width: 90%;
    max-width: 400px;
}
.btn_close {
    position: absolute;
    top: -53px;
    right: 0;
    width: 40px;
    height: 40px;
    border: 3px solid #000;
    border-radius: 50%;
    background-color: #fff;
    font-size: 24px;
    line-height: 34px;
    text-align: center;
}
.modal_title {
    font-size: clamp(12px, 5.0vw, 21px); 
    margin-bottom: 5%;
}
.modal_image {
    width: 80%;
    margin: 0 auto 20px;
    border: 3px solid #000;
}
.modal_image canvas {
    display: block;
    width: 100%;
    height: auto;
}
.modal_time {
    font-size: 36px;
    margin-bottom: 2%;
}
.btn_save {
    display: inline-block;
    border: none;
    background-color: transparent;
    padding: 0;
    width: min(45vw, 250px); 
    transition: transform 0.1s;
}

.btn_save:active {
    transform: scale(0.95);
}

.text_note {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    font-weight: bold;
}
}
/* ========== 共通スタイル ========== */
.txt_countdown_time {
    display: block; /* ★変更：強制的に改行させる魔法 */
    margin-top: 0px; /* ★追加：上の文字との間に少し余白を作る */
    /* margin-left: 10px; ← ★これは消す（改行するので左の余白は不要） */
}
.overlay_countdown {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.8);
    z-index: 10;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    font-weight: bold;
}

/* ========== さらに小さい標準スマホサイズ（430px以下）向けの微調整 ========== */
@media (max-width: 430px) {
    .game_container {
        margin-bottom: 70vw; 
    }
    .area_character {
        bottom: -58vw; 
    }
    .game_container.is-revealed-mode {
        margin-bottom: 55vw;
    }
    .game_container.is-revealed-mode .area_character {
        bottom: -48vw; 
    }
}






/* ========== 背景を歩くくまさん1（左から右） ========== */
.bg_bear_01 {
  position: absolute;
  top: 250px;
  left: -150px; /* スタート位置 */
  width: 120px;
  z-index: 1;
  
  /* 横移動(walkBearX) と 縦揺れ(bounceBear) を同時に適用 */
  animation: 
    walkBearX 25s linear infinite,
    bounceBear 0.4s ease-in-out infinite alternate;
}

/* ========== 背景を歩くくまさん2（右から左） ========== */
.bg_bear_02 {
  position: absolute;
  top: 750px;
  right: -150px; /* スタート位置 */
  width: 120px;
  z-index: 1;
  
  /* 横移動(walkBearReverseX) と 縦揺れ(bounceBear) を同時に適用 */
  animation: 
    walkBearReverseX 22s linear infinite,
    bounceBearReverse 0.4s ease-in-out infinite alternate;
}

/* --- アニメーションの動きの定義 --- */

/* 1匹目の横移動 */
@keyframes walkBearX {
  0% { left: -150px; }
  100% { left: 100%; } /* 右端まで移動 */
}

/* 2匹目の横移動 */
@keyframes walkBearReverseX {
  0% { right: -150px; }
  100% { right: 100%; } /* 左端まで移動 */
}

/* 共通の跳ねる動き（ポヨンポヨン） */
@keyframes bounceBear {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); } /* 15px上に跳ねる */
}
@keyframes bounceBearReverse {
    0% { transform: translateY(0) scaleX(-1); }
    100% { transform: translateY(-5px) scaleX(-1); }
  }

/* ========== SP用スタイル ========== */
@media (max-width: 600px) {
  .bg_bear_01 {
    top: 100px;
    width: 60px;
    animation-duration: 15s, 0.4s; /* スマホ用の横移動時間, 縦揺れ時間 */
  }
  .bg_bear_02 {
    top: 350px;
    width: 60px;
    animation-duration: 13s, 0.4s;
  }
}





/* ========== 出たり消えたりする足跡 ========== */
.deco_tsume {
  position: absolute;
  width: 150px;
  opacity: 0; 
  z-index: 1; /* 歩くくまと同じ階層 */
}

/* 右上あたり（コンテナの右隣） */
.tsume_tr {
  top: 15vh;
  /* 画面中央(50%)から、コンテナの半分(300px) + 少し隙間 を足した位置 */
  left: calc(50% + 400px);
  transform: rotate(15deg);
  animation: fadeTsume 6s ease-in-out infinite 1s;
}

/* 左中央あたり（コンテナの左隣） */
.tsume_ml {
  top: 40vh;
  /* 画面中央(50%)から、コンテナの半分(300px) + 足跡の幅 + 隙間 を引いた位置 */
  left: calc(50% - 550px);
  transform: translateY(-50%) rotate(-0deg);
  animation: fadeTsume 7s ease-in-out infinite 6s;
}

/* 右下あたり（コンテナの右隣） */
.tsume_br {
  bottom: 65vh;
  /* 右上と被らないように少しだけ外側にずらす */
  left: calc(50% + 400px); 
  transform: rotate(5deg);
  animation: fadeTsume 8s ease-in-out infinite 10s;
}

/* ふわっと出たり消えたりするアニメーション */
@keyframes fadeTsume {
  0%   { opacity: 0; }
  15%  { opacity: 0.8; } 
  30%  { opacity: 0; }   
  100% { opacity: 0; }   
}

/* ========== SP用スタイル内（@media (max-width: 600px)）を上書き ========== */
@media (max-width: 600px) {
    .bg_bear_01 {
        top: 22vh;          /* ▼ 変更：上から15%くらいの位置を歩かせる */
        width: 80px;        /* ▼ 変更：スマホ画面に合わせて少しだけ小さく */
        animation-duration: 15s, 0.4s; 
      }
      .bg_bear_02 {
        top: 60vh;          /* ▼ 変更：上から80%くらい（画面の下の方）を歩かせる */
        width: 80px;        /* ▼ 変更：こちらも少し小さく */
        animation-duration: 13s, 0.4s;
      }


  .deco_tsume {
    width: 50px; /* スマホ向けに小さく */
  }
  /* スマホは横幅がカツカツなので、画面の端っこに配置してゲーム枠の後ろからチラ見せさせます */
  .tsume_tr { top: 15vh; left: auto; right: 5px; }
  .tsume_ml { left: 5px; }
  .tsume_br { bottom: 20vh; left: auto; right: 10px; }
}




