body {
    margin: 0;
    font-family: "Helvetica Neue",
    Arial,
    "Hiragino Kaku Gothic ProN",
    "Hiragino Sans",
    Meiryo,
    sans-serif;
}

p {
    margin: 0;
    line-height: 1.3em;
}

img {
    -webkit-backface-visibility: hidden;
    vertical-align: bottom;
}

a {
    text-decoration: none;
}

a:hover {
    opacity: 0.8;
}

.d_b {
    display: block;
}

.m_t50 {
    margin-top: 50px;
}

.m_b50 {
    margin-bottom: 50px;
}

.t_a_c {
    text-align: center;
}

.t_a_l {
    text-align: left;
}

.l_h18 {
    line-height: 1.8em;
}

.f_w_b {
    font-weight: bold;
}

.cursor_p {
    cursor: pointer;
}

#wrapper {
    width: 960px;
    margin: 0 auto;
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#main_title {
    margin: 20px 0;
}

#crossword {
    background: #fff;
    width: 980px;
    margin: 30px auto;
    padding: 0 0 20px;
    overflow: hidden;
    text-align: center;
}

#crossword_box {
    font: 100%/1.3em Helvetica, sans-serif;
    padding: 20px;
    margin: 10px auto;
    display: table-cell;
    vertical-align: middle;
}

table { 
    border-collapse: collapse; 
    border-spacing: 0; 
    max-width: 100%;
}
table tr{
    width: 100%;
}
table td {
    width: 5em;
    height: 5em;
    border: 1px solid #600000;
    padding: 0;
    margin: 0;
    background-color: #600000;
    position: relative;
}
        
td input {
    width: 100%;
    height: 100%;
    padding: 0em;
    border: none;
    text-align: center;
    font-size: 2.5em;
    color: #333;
    background-color: #f4f4f4;
    border-radius: 0;
}

td input:focus {
    background-color: #fff;
}

td span {
    color: #444;
    font-size: 0.8em;
    position: absolute;
    top: -1px;
    left: 1px;
}

input.done {
    font-weight: bold;
    color: green;
}

#cross_area {
    margin: 30px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #600000;
}

#cross_left {
    width: 50%;
    text-align: left;
    font-size: 14px;
    margin: 30px 0;
    padding: 0 20px;
}

#cross_left p {
    margin: 0 0 10px;
}

#cross_right {
    width: 50%;
    text-align: left;
    font-size: 15px;
    padding: 0 20px;
}

#cross_right p {
    margin: 0 0 10px;
}

#cross_column {
    margin: 0 0 30px;
}

.b_c_y {
    background-color: #ffde00;
    display: inline-block;
}

#answer_area {
    text-align: center;
    padding: 0 0 50px;
    vertical-align: bottom;
}

.answer_input {
    width: 60px;
    height: 60px;
    background: #ffde00;
    border: 1px solid #600000;
    margin: 0 5px;
    font-size: 30px;
    text-align: center;
}

#word_submit {
    width: 134px;
    vertical-align: bottom;
    padding: 0 0 2px;
    margin: 0 5px;
}

#hitn_area {
    background: url(../../assets/images/hint_bg.jpg);
    padding: 50px 0;
}

.hint_box {
    background: #fff;
    width: 640px;
    height: 200px;
    margin: 24px auto;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 13px;
}

.hint_box_left {
    padding: 30px 60px 30px 34px;
}

.hint_box_right {
    padding: 10px 10px 10px 0;
}
.hint_box_right_text {
    margin: 0 0 20px;
}

.link_button1 {
    width: 280px;
    height: 36px;
    margin: 0 auto;
    background: #ffde00;
    border-radius: 30px;
    color: #600000;
    font-size: 11px;
    text-align: center;
    line-height: 36px;
}

.link_button1:hover {
    opacity: 0.8;
}

#footer_area {
    padding: 50px 0;
}

#terms_text_box {
    background: #e6e6e6;
    padding: 60px 40px 40px;
    width: 500px;
    margin: 20px auto 0;
    font-size: 12px;
}

#terms_text_box p {
    margin: 0 0 20px;
    line-height: 1.5em;
}

#copy_right {
    padding: 0 0 30px;
    margin-top: auto;
}

#frame_area { 
    display: flex;
    justify-content: center;
    align-items: baseline;
    flex-wrap: wrap;
    text-align: center;
    margin: 20px 0;
}

.frame_box {
    margin: 25px;
}

.frame_logo {
    margin: 0 0 10px;
}

.frame_logo img {
    width: 150px;
}


.frame_image {
    cursor: pointer;
    border: 3px solid #ccc;
    box-sizing: border-box;
    position: relative;
}

.frame_image img {
    width: 200px;
}

.select_image {
    border: 3px solid #c31300;
    box-sizing: border-box;
}

.select_image::after {
    width: 200px;
    content: 'このフレームにする';
    position: absolute;
    display: inline-block;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #c31300;
    font-weight: bold;
}

#selected_frame_button_label {
    background: url(../../assets/images/selected_frame_button.png) no-repeat;
    background-size: 100%;
    width: 283px;
    height: 60px;
    display: block;
    cursor: pointer;
    margin: 30px auto;
}

#selected_frame_button {
    display: none;
}

#selected_photo_button_label {
    background: url(../../assets/images/selected_photo_button.png) no-repeat;
    background-size: 100%;
    width: 283px;
    height: 60px;
    display: block;
    cursor: pointer;
    margin: 20px auto;
}

#selected_photo_button {
    display: none;
}

#download_image {
    cursor: pointer;
    width: 283px;
    margin: 10px auto 50px;
}



/* canvas */
#canvas_box {
    position: relative;
    width: 100%;
    margin: 0 0 20px;
    margin: 0 auto 20px;
}

#canvas_background {
    position: absolute;
    top: 0;
    left: 50%; 
    transform: translate(-50%, 0);
    width: 300px;
    height: 300px;
    z-index: 1;
    border: 2px solid #ccc;
}

#canvas_background2 {
    width: 300px;
    height: 300px;
    margin-left: 50%;
    transform: translate(-50%, 0);
    border: 2px solid transparent;
    background: #fff;
}


#canvas_area {
    padding: 10px 0;
    overflow: hidden;
}

#render_canvas, #render_image {
    display: none;
}

#photo_edit_area {
    margin: 20px auto 30px;
    position: relative;
    width: 250px;
    height: 100px;
    margin: 0 auto;
}

#button1 {
    position: absolute;
    top: 50%;
    right: 30%;
    transform: translate(0, -50%);
}

#button2 {
    position: absolute;
    top: 50%;
    left: 30%;
    transform: translate(0, -50%);
}

#button3 {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 0);
}

#button4 {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, 0);
}

#button5 {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(0, -50%);
}

#button6 {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translate(0, -50%);
}

#button1 img,
#button2 img {
    width: 30px;
}

#button3 img,
#button4 img {
    width: 21px;
}

#button5 img,
#button6 img {
    width: 64px;
}
/* canvas */

#sns_link a {
    margin: 0 10px;
}

.pc_d_none {
    display: block;
}

.sp_d_none {
    display: none;
}


@media screen and (max-width: 600px) {

    .pc_d_none {
        display: none;
    }

    .sp_d_none {
        display: block;
    }
    
    body {
        width: 100%;
        margin: 0 auto;
        font-family: "Helvetica Neue",
        Arial,
        "Hiragino Kaku Gothic ProN",
        "Hiragino Sans",
        Meiryo,
        sans-serif;
    }
    
    #wrapper {
        width: 100%;
        margin: 0 auto;
        background: #fff;
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }
    
    #main_title img {
        width: 100%;
    }

    #sp_main_image {
        margin: 10px;
    }

    #cross_area {
        margin: 0 auto;
        display: block;
        justify-content: center;
        align-items: center;
        color: #600000;
    }
    
    .answer_input {
        width: 30px;
        height: 30px;
        background: #ffde00;
        border: 1px solid #600000;
        margin: 0 5px;
        font-size: 20px;
        text-align: center;
    }
 
    #word_submit {
        width: 80px;
        vertical-align: bottom;
        padding: 0 0 0;
        margin: 0 5px;
    }
    
    .hint_box {
        background: #fff;
        width: 82%;
        height: auto;
        margin: 24px auto;
        padding: 20px;
        display: block;
        justify-content: center;
        align-items: center;
        font-size: 13px;
    }

    #terms_text_box {
        background: #e6e6e6;
        width: 100%;
        box-sizing: border-box;
        padding: 20px 16px 20px;
        margin: 20px auto 0;
        font-size: 12px;
    }
    
    #cross_left {
        width: auto;
        text-align: left;
        font-size: 14px;
        margin: 30px 10px;
        padding: 0 0;
    }
    
    #crossword_box {
        font: 62.5%/1.3em Helvetica, sans-serif;
        padding: 20px;
        margin: 10px auto;
        display: block;
    }
    
    #cross_right {
        width: auto;
        text-align: left;
        font-size: 15px;
        padding: 0 20px 20px;
    }

    .hint_box_left {
        padding: 0 0 20px 0;
        text-align: center;
    }

    .frame_box {
        margin: 5px 5px 30px;
        width: 46%;
    }
    
    .frame_logo img {
        width: 90%;
    }
    

    .frame_image img {
        width: 100%;
    }
    
}
