@import url(//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,700,300,600,800,400);
@import url('https://fonts.googleapis.com/css2?family=Sawarabi+Mincho&display=swap');

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    line-height: 1.5;
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Sawarabi Mincho', 'Shippori Mincho B1', 'BIZ UDPMincho', serif;
    text-rendering: optimizeLegibility !important;
    -webkit-font-smoothing: antialiased !important;
    color: #000;
    /*background-color: #e3ece4;*/
    text-align: center;
      background-image: 
    url("../images/background-pattern.png");
  background-repeat: repeat; /* デフォルトで繰り返しになるため省略可 */

}

main {
    width: 600px;
}

ol, ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
}



a {
    color: #888;
    text-decoration: none;
    transition: opacity 0.3s ease, color 0.3s ease;
}

a:hover {
    opacity: 0.6;
    color: #666;
}

:focus {
    outline: none;
}

a img {
  vertical-align: middle;
}

p {
    line-height: 1.6;
}

li p{
    margin-top: 8px;
    font-size: .8em;
    line-height: 1.2;
}

/* ==========================================================================
   LAYOUT & CONTAINERS
   ========================================================================== */
.inner {
    max-width: 940px;
    margin-left: auto;
    margin-right: auto;
    padding: 10px 10px 30px 10px;
}

.mainImg {
    margin-left: auto;
    margin-right: auto;
    max-width: 940px;
    margin-bottom: 10px;
}

.subtext {
    font-family: 'Sawarabi Mincho'; 
    text-align: left;
    padding: 2rem;
    max-width: 940px;
    margin: 0 auto 20px;
    font-size: 1.1rem;
    letter-spacing: 1px;
    font-weight: 600;
    color: #333;
    border-radius: 5px;
    background:rgb(219, 69, 47,.25);
    line-height: 1.4;
}

.present {
    width: 100%;
    max-width: 600px;
}

/* 応募締切ボックス */
.deadline-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    border: 3px solid #008597;
    padding: 14px 20px;
    background-color: #ffffff;
    font-weight: 800;
    box-sizing: border-box;
    width: 100%;
    margin: 20px auto;
}

.deadline-title {
    color: #ee7b00;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
}

.deadline-text {
    color: #1a1a1a;
    font-size: 1.3rem;
    letter-spacing: 0.02em;
}

/* 表示切替（PC / スマホ） */
.forpc { display: block; }
.forsp { display: none; }

.imgsp { display: none; }
.imgpc { display: block; }

@media screen and (max-width: 640px) {
    .imgsp { display: block; margin: 0px 20px; }
    .imgpc { display: none; }

    .inner {
        padding: 10px 10px;
    }
    .mainImg {
        margin: auto;
        padding: 0px !important;
    }
}

/* ==========================================================================
   HEADER & FOOTER
   ========================================================================== */
header {
    width: 100%;
    background-color: #008597;
}

.pageTop {
    padding: 15px;
    text-align: left;
}

.pageTop .logo {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer {
    width: 100%;
    padding: 40px 0;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
    text-align: center;
    font-size: 12px;
    color: #fff;
    background-color: #000;
}

/* TOPへ戻るボタン */
.toTop {
    position: fixed;
    bottom: 20px;
    right: 5%;
    width: 40px;
    z-index: 100;
}

.toTop a img {
    opacity: 1.0;
    transition: opacity 0.3s ease;
}

.toTop a img:hover {
    opacity: 1;
}

/* ==========================================================================
   HEADINGS & TEXT STYLES
   ========================================================================== */
h1.img {
    max-width: 1300px;
    margin: 30px auto;
}

h3 {
    font-size: 1.625rem;
    color: #333;
    line-height: 1.4;
    text-align: left;
    border-bottom: solid 3px #333;
    margin: 30px 0 20px;
    padding: 5px;
}

h5 {
    font-size: 1.0em;
    margin-top: 10px;
}

/* 応募要項テキストエリア */
.oubotxt {
    text-align: left;
    margin: 20px 0 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 4px;
}

.oubotxt ul li {
    display: block;
    line-height: 1.6;
    margin-bottom: 2.4em;
    padding: 0 2rem;
}

.oubotxt ul li.note {
    margin-top: 1em;
    font-size: 0.9em;
    color: #000;
    padding: 20px 5px;
    border-top: 1px dotted #000;
}

.oubotxt ul li span.oubottl {
    color: #f18200;
    font-weight: 600;
}

.oubotxt ul li span.shimekiri {
    font-size: 1.1em;
    padding: 0 1rem;
    font-weight: bold;
    color: #FF0000;
}

/* 応募ボタン */
.ouboBtn {
    text-align: center;
    margin-top: 40px;
    width: 100%;
}

.ouboBtn a {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 600px;
    padding: 0.8em 2em;
    font-size: 1.8em;
    font-weight: 600;
    color: #fff;
    background-color: #69bd83;
    border: 3px solid #fff;
    border-radius: 60px;
    position: relative;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.ouboBtn a:hover {
    background-color: #69bd83;
    transform: translateY(-1px);
}

.is-expired {
    background-color: #008597;
    text-align: center;
    font-size: 1.6em;
    color: #fff;
    font-weight: bold;
    padding: 10px;
}

/* ボタンを横並びにする親要素 */
.ec-btn-wrap {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px auto;
    max-width: 800px;
}

/* 各ボタンの外枠 */
.ec-btn-wrap .amazon,
.ec-btn-wrap .rakuten {
    flex: 1;
    max-width: 360px;
    margin: 0;
}

/* リンクボタン共通スタイル */
.ec-btn-wrap .amazon a,
.ec-btn-wrap .rakuten a {
    display: block;
    width: 100%;
    padding: 14px 8px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    color: #fff;
    border-radius: 6px;
    box-sizing: border-box;
    transition: opacity 0.3s;
}

.ec-btn-wrap .amazon a:hover,
.ec-btn-wrap .rakuten a:hover {
    opacity: 0.8;
}

/* Amazonカラー */
.ec-btn-wrap .amazon a {
    background-color: #ff9900;
}

/* 楽天ブックスカラー */
.ec-btn-wrap .rakuten a {
    background-color: #bf0000;
}

/* スマホ表示（画面幅767px以下）で縦並び */
@media screen and (max-width: 767px) {
    .oubotxt {
        padding: 10px;
    }
    .ec-btn-wrap {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding: 0 5px;
    }
    .ec-btn-wrap .amazon,
    .ec-btn-wrap .rakuten {
        width: 100%;
        max-width: 100%;
    }
    .ec-btn-wrap .amazon a,
    .ec-btn-wrap .rakuten a {
        display: block;
        font-size: 0.8em;
        width: 100%;
        padding: 8px 4px;
        text-align: center;
        text-decoration: none;
    }
    .is-expired {
        background-color: #008597;
        text-align: center;
        font-size: 1.2em;
        color: #fff;
        font-weight: bold;
        padding: 10px;
    }
}

/* ==========================================================================
   SNS SHARE BUTTONS
   ========================================================================== */
.sns {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif !important;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    padding-bottom: 30px;
    flex-wrap: wrap;
}

.x-share-button,
.fb-share-button,
.line-share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 28px;
    border: 3px solid #ffffff;
    border-radius: 30px;
    background-color: #000000;
    color: #ffffff;
    font-weight: bold;
    font-size: 1rem;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.x-share-button:hover,
.fb-share-button:hover,
.line-share-button:hover {
    background-color: #333;
    color: #fff;
}

/* スマホ表示（767px以下：ラベル非表示・黒いアイコンボタン横3つ並び） */
@media screen and (max-width: 767px) {
    .sns {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        flex-wrap: nowrap;
        gap: 16px;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }

    .sns .x-share-button,
    .sns .fb-share-button,
    .sns .line-share-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        background-color: #000000;
        color: #ffffff;
        border: 2px solid #ffffff;
        border-radius: 50%;
        text-decoration: none;
        box-sizing: border-box;
    }

    /* ラベル文字を非表示にする */
    .sns a span {
        display: none;
    }

    /* アイコンサイズを統一して中央に綺麗に収める */
    .sns a svg {
        width: 20px;
        height: 20px;
        margin: 0;
    }
}

/* ==========================================================================
   RITTOR ID (RMID)
   ========================================================================== */
.rmid {
    max-width: 100%;
    background-color: #dcdcdc;
    border-radius: 5px;
    margin: 30px auto;
    padding: 20px;
    color: #000;
    box-sizing: border-box;
}

.rmid h5 {
    color: #000;
    margin: 5px 0 15px 0;
    font-size: 1.0em;
}

.kochira {
    border: 0px solid #fff;
    padding: 2px 5px;
    background-color: rgba(0, 0, 0, 0.2);
    font-size: 0.9em;
    color: #fff;
    border-radius: 2px;
}

.rmid table {
    width: 100%;
    border-collapse: collapse;
}

.rmid table td {
    text-align: left;
    vertical-align: top;
    padding: 5px;
    font-size: 0.8em;
    line-height: 1.6;
}

.rmid table .td-logo {
    width: 15%;
    text-align: center;
    vertical-align: middle;
}

.rmid table .td-text {
    width: 55%;
}

.rmid table .td-list {
    width: 25%;
}

.rmid table .td-list ul {
    margin: 0;
    padding-left: 20px;
}

/* ==========================================================================
   BOOKS & SHOPS LISTS
   ========================================================================== */
/* 対象商品リスト */
.bookList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.bookList li {
    display: block;
}

.bookList li a img {
    display: block;
    width: 100%;
    border: 1px solid #fff;
    transition: transform 0.2s ease;
}

.bookList li a:hover img {
    transform: scale(1.03);
}

/* 都道府県ナビゲーション */
ul.shop-sc {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 0 auto 30px;
}

ul.shop-sc li {
    flex: 1 1 80px;
    max-width: 100px;
    border: 2px solid #69bd83;
    background: #f3f5f8;
}

ul.shop-sc li a {
    display: block;
    color: #000;
    padding: 8px 0;
    font-size: 0.9rem;
}

ul.shop-sc li a:hover {
    background-color: #f18200;
    color: #fff;
}

/* 開催店舗テーブル */
.table-wrapper {
    overflow-x: auto;
}

table.shop {
    width: 49%;
    float: left;
    margin-bottom: 2em;
    border-collapse: separate;
}

table.shop.right {
    float: right;
}

table.shop td {
    text-align: left;
    padding: 10px;
    font-size: 0.9em;
    border: 0px #666 solid;
    line-height: 1.6;
    background-color: #fff;
}

table.shop td.ttl {
    background: #69bd83;
    color: #000;
    text-align: center;
    font-weight: bold;
}

table.shop td:nth-child(1) {
    white-space: nowrap;
}

.fairShop::after {
    content: "";
    display: table;
    clear: both;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade {
    padding: 10px;
    animation: fadeIn 2s ease 0s 1 normal;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media screen and (max-width: 980px) {
    .forpc { display: none; }
    .forsp { display: block; }
}

@media (max-width: 768px) {
    .deadline-box {
        gap: 12px;
        padding: 10px 12px;
    }
    .deadline-title,
    .deadline-text {
        font-size: 14px;
    }

    /* RMIDテーブルの縦並び化 */
    .rmid table, 
    .rmid table tbody, 
    .rmid table tr, 
    .rmid table td {
        display: block;
        width: 100%;
    }
    
    .rmid table td {
        width: 100% !important;
        box-sizing: border-box;
        border-bottom: none;
    }
    
    .rmid table td:last-child {
        border-bottom: 1px solid #666;
    }
    
    .rmid table .td-logo img {
        display: none;
        width: 150px;
        margin: 20px auto;
    }

    .rmid table .td-list ul {
        padding-left: 0px;
    }
}

@media screen and (max-width: 700px) {
    h3 {
        font-size: 1.25rem;
    }

    table.shop,
    table.shop.right {
        float: none;
        width: 100%;
        margin-bottom: 0em;
    }

    .oubotxt ul li {
        font-size: 0.9em;
        display: block;
        line-height: 1.6;
        margin-bottom: 2.4em;
        padding: 0 0.1rem;
    }

    .ouboBtn a {
        font-size: 1.5em;
        padding: 0.8em 1em;
    }

    .bookList {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .inner {
        padding: 5px !important;
    }
    .pageTop {
        padding: 5px;
        text-align: left;
    }
    .pageTop .logo {
        max-width: 120px;
    }

    .subtext {
        font-size: .9rem;
        padding: 1.0em;
        margin: 30px 5px 50px;
    }
    .bookList {
        grid-template-columns: repeat(3, 1fr);
    }
    ul.shop-sc {
        gap: 4px;
    }
    ul.shop-sc li {
        flex: 1 1 20%;
    }
    ul.shop-sc li a {
        padding: 2px 0px;
        font-size: 0.8rem;
    }
    table.shop td {
        padding: 5px;
        font-size: 0.8rem;
    }
}



/* 画像（aタグ）だけ元の幅・位置を維持する */
.hrf a {
  display: block;
  width: 66%;
  margin: 0 auto; /* 中央寄せ（左寄せにしたい場合は margin-left: 20px; に戻してください） */
}

/* pタグは li の幅いっぱい（画像の1.5倍の広さ）を使い、改行させずに流す */
.hrf p {
  width: 100%;
  white-space: nowrap; /* 改行せずに1行で流す */
}

/* 文字がはみ出して3段組みが崩れないよう折り返しを許可する */
  .hrf p {
    white-space: normal;
  }

/* 画面幅が1024px以上の時は */
@media screen and (min-width: 1024px) {
    .ps-br {
        display: block; /* PCを改行して */
    }
    .sp-br {
        display: none; /* SPの改行を隠す */
    }
}

/* 画面幅が480px以下の時は */
@media screen and (max-width: 480px) {
    .ps-br {
        display: none; /* PCの改行を隠して */
    }
    .sp-br {
        display: block; /* SPを改行する */
    }
}
