@charset "utf-8";

/* ==================== CSS変数 ==================== */
:root {
    --primary: #FF5A00;
    --primary-hover: #FF7A33;
    --accent: #FFD700;
    --bg-color: #FFF8F0;
    --text-main: #333333;
    --text-white: #FFFFFF;
    --border-radius: 16px;
    --shadow-soft: 0 4px 20px rgba(255, 90, 0, 0.15);
    --shadow-hard: 4px 4px 0px rgba(255, 90, 0, 0.2);
    --font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", Meiryo, sans-serif;
}

/* ==================== 基本スタイル ==================== */
body {
    margin: 0;
    padding: 0;
}

main {
    font-family: var(--font-family);
    font-size: 15px;
    background-color: var(--bg-color);
    background-image: radial-gradient(#FF5A00 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--text-main);
    line-height: 1.8;
}

a {
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.cp-orange {
    color: var(--primary);
    font-weight: bold;
}

/* ==================== レイアウト ==================== */
.cp-mybooks {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 0 14px;
    box-sizing: border-box;
}

.cp-mybooks__background {
    width: 100%;
    overflow: hidden;
    padding-bottom: 60px;
}

/* ==================== KV画像 ==================== */
.cp-hero__kv {
    margin-bottom: 24px;
}

.cp-hero__kv img {
    max-width: 100%;
    height: auto;
}

/* ==================== セクション共通 ==================== */
.cp-introduction,
.cp-how-to,
.cp-schedule,
.cp-awards,
.cp-period,
.cp-call-to-action,
.cp-share-campaign,
.cp-end {
    max-width: 800px;
    width: 100%;
    background-color: var(--text-white);
    border-radius: var(--border-radius);
    padding: 24px 16px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-soft);
    border: 2px solid #FFF0E0;
    position: relative;
    overflow: hidden;
}

/* ==================== TOP ==================== */
.cp-schedule__item {
    display: block;
    font-size: 13px;
    margin-bottom: 8px;
}
.cp-schedule__item:last-child {
    margin-bottom: 0;
}
.cp-schedule__label {
    font-weight: bold;
    color: var(--primary);
    text-align: left;
    min-width: 0;
    padding-right: 0;
    display: block;
    margin-bottom: 6px;
}
.cp-schedule__value {
    text-align: left;
}

/* ==================== イントロダクション ==================== */
.cp-intro__title {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    display: inline-block;
    width: 100%;
}

.cp-intro__title::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 12px auto 0;
    border-radius: 2px;
}

.cp-intro__text {
    font-size: 16px;
    margin-bottom: 32px;
}

.cp-intro__desc-text {
    margin-bottom: 30px;
}

.cp-intro__image {
    margin: 0 auto 32px;
    overflow: hidden;
}

.cp-intro__feature {
    background: linear-gradient(135deg, #FFF8F0 0%, #FFFFFF 100%);
    border-radius: var(--border-radius);
    padding: 24px;
    border-left: 6px solid var(--primary);
}

.cp-feature__title {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 12px;
}

.cp-feature__text {
    margin-bottom: 14px;
}

.cp-feature__link {
    margin-bottom: 14px;
    margin-left: 5px;
}

.cp-feature__link a {
    color: #0048B4;
    font-weight: bold;
}

.cp-feature__link a:hover {
    border-bottom: 2px solid #0048B4;
}

/* ==================== 賞のセクション ==================== */
.cp-awards__intro {
    margin-bottom: 20px;
}

.cp-award-item {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #FFFFFF;
    border-radius: 12px;
    padding: 10px 24px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    flex-direction: row;
    text-align: center;
    gap: 8px;
}

.cp-award__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 800;
    color: #FFFFFF;
    flex-shrink: 0;
    margin-right: 16px;
}

.cp-award__prize {
    text-align: center;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: bold;
}

.cp-award__meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cp-award__winners {
    font-size: 14px;
    color: #666666;
    text-align: center;
}

.cp-award__label-title {
    font-size: 16px;
    font-weight: 800;
}

.cp-award__label-points {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.cp-sub-attention__text {
    font-size: 11px;
    color: #777777;
    line-height: 1.2rem;
    display: inline-block;
}

.cp-awards__criteria {
    margin-top: 32px;
}

.cp-sub__title {
    color: var(--primary);
    font-size: 18px;
    font-weight: bold;
    margin: 32px 0 12px;
}

.cp-criteria__text {
    font-size: 15px;
    line-height: 1.8;
}

.cp-criteria__highlight {
    color: var(--primary);
    font-weight: bold;
}

/* ==================== 期間詳細 ==================== */
.cp-period__table-container {
    border: 1px solid #E9E9E9;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.cp-period__table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    background: #FFFFFF;
    border: none;
}

.cp-period__table th {
    color: var(--primary);
    font-weight: bold;
    text-align: left;
    padding: 16px 5px;
    font-size: 13px;
    width: 23%;
    vertical-align: top;
    background: #FFF8F0;
    border-bottom: 1px solid #E9E9E9;
}

.cp-period__table td {
    font-size: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #F0F0F0;
    line-height: 1.6;
    background: #FFFFFF;
}

.cp-period__table tr:last-child td,
.cp-period__table tr:last-child th {
    border-bottom: none;
}

.cp-period__notes {
    padding: 0;
    border-radius: 0;
    margin: 0;
}

.cp-notes__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cp-notes__list li {
    position: relative;
    padding-left: 1.2em;
    line-height: 1.8;
}

.cp-notes__list li::before {
    content: "・";
    position: absolute;
    left: 0;
    font-weight: bold;
}

.cp-notes__list li.cp-notes__indent {
    padding-left: 2.5em;
}

.cp-notes__list li.cp-notes__indent::before {
    content: "・";
    left: 1.2em;
}

.cp-period__items-sp {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cp-period__item-sp {
    padding: 16px;
}

.cp-period__item-sp:last-child {
    border-bottom: none;
}

.cp-period__item-title-sp {
    color: var(--primary);
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #FFF0E0;
}

.cp-period__item-content-sp {
    font-size: 12px;
    line-height: 1.6;
}

/* ==================== 結果発表ページ ==================== */
.cp-result {
    max-width: 800px;
    width: 100%;
    background-color: var(--text-white);
    border-radius: var(--border-radius);
    padding: 24px 16px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-soft);
    border: 2px solid #FFF0E0;
    position: relative;
    overflow: hidden;
}

.cp-result__thanks {
    text-align: center;
    margin-bottom: 24px;
}

.cp-result__thanks-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 16px;
}

.cp-result__thanks-text {
    font-size: 15px;
    line-height: 1.8;
    text-align: left;
}
.cp-result__thanks-note {
    font-size: 11px;
    margin-top: 8px;
    color: #777777;
}

/* ==================== 受賞者バッジエリア ==================== */
.cp-winner__badge-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
    position: relative;
    padding: 20px 60px;
}

.cp-winner__deco {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: auto;
    pointer-events: none;
}

.cp-winner__deco--left {
    left: 10%;
}

.cp-winner__deco--right {
    right: 10%;
}

.cp-winner__badge-area--silver .cp-winner__deco {
    filter: saturate(0) brightness(1.3) contrast(0.85);
}

.cp-winner__badge-area--bronze .cp-winner__deco {
    filter: sepia(0.3) saturate(0.7) brightness(0.9);
}

.cp-winner__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.cp-winner-card--gold .cp-winner__badge,
.cp-winner__badge--gold {
    color: var(--primary);
}

.cp-winner-card--silver .cp-winner__badge,
.cp-winner__badge--silver {
    color: #AAAAAA;
}

.cp-winner-card--bronze .cp-winner__badge,
.cp-winner__badge--bronze {
    color: #CD7F32;
}

.cp-winner__point {
    margin-top: 4px;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: 0.05em;
}

/* ==================== 受賞者カード ==================== */
.cp-winner-card {
    background: #FFFFFF;
    border: 2px solid #F0F0F0;
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 32px;
}

.cp-winner-card--gold {
    border: 2px solid var(--primary);
}

.cp-winner-card--silver {
    border: 2px solid #DFE3E8;
}

.cp-winner-card--bronze {
    border: 2px solid #CD7F32;
}

.cp-winner__header {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    gap: 8px;
}

.cp-winner__list-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-main);
    margin: 0;
}

.cp-winner__author {
    font-size: 14px;
    color: #666666;
    text-align: right;
    display: flex;
    flex-direction: row;
    align-self: flex-end;
}

.cp-winner__author a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cp-winner__author-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-right: 6px;
}

.cp-winner__comment {
    margin-bottom: 20px;
}

.cp-winner__comment-text {
    font-size: 14px;
    line-height: 1.8;
}

.cp-winner__tag-area {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 10px 0 10px 0;
}

.cp-winner__tag-item {
    display: flex;
    font-size: 12px;
    padding: 5px 6px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 30px;
    background: #FF5A00;
    color: #FFFFFF !important;
    text-decoration: underline !important;
    font-weight: bold;
}

.cp-operation__comment {
    margin-bottom: 8px;
}

/* ==================== 書影表示（共通） ==================== */
.cp-winner__book {
    flex-shrink: 0;
    width: calc((100% - 16px) / 3);
}

/* ==================== グリッド表示 ==================== */
.cp-winner__books-wrapper {
    position: relative;
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.cp-winner__books--grid {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 0;
    max-height: 360px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* ボタン非表示時（個数が閾値未満）は全高さを表示 */
.cp-winner__books--grid[data-books-limited="true"] {
    max-height: fit-content;
    overflow: visible;
}

.cp-winner__books--grid a {
    display: contents;
}

/* 3行以上の書影セットのフェード効果 */
.cp-winner__books--grid[data-books-limited="false"][data-books-open="false"]::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 180px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* 2行以下の書影セットはフェード効果なし */
.cp-winner__books--grid[data-books-limited="true"][data-books-open="false"]::after {
    display: none;
}

.cp-winner__books--grid[data-books-open="true"] {
    max-height: none;
}

.cp-winner__books--grid[data-books-open="true"]::after {
    opacity: 0;
}

.cp-winner__books--grid .cp-winner__book img {
    width: 100%;
    height: auto;
}

/* もっと見るボタン */
.cp-winner__books-toggle {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: #FF5722;
    color: #ffffff;
    border: none;
    border-radius: 24px;
    padding: 12px 15px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.4);
    transition: all 0.3s ease;
    display: block;
    width: 180px;
}

.cp-winner__books-toggle:hover {
    background: #E64A19;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 87, 34, 0.5);
}

.cp-winner__books-wrapper[data-expanded="true"] .cp-winner__books-toggle {
    display: none;
}

/* ==================== 運営コメント ==================== */
.cp-winner__staff-comment {
    border-radius: 4px;
    margin-bottom: 16px;
}

.cp-winner__staff-comment-label {
    font-size: 12px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 8px;
}

.cp-winner__staff-comment-text {
    font-size: 14px;
    line-height: 1.8;
}

.cp-winner__staff-comment-text + .cp-winner__staff-comment-text {
    margin-top: 16px;
}

.cp-operation-author {
    display: flex;
    margin-bottom: 5px;
    align-items: center;
}

.cp-operation-author__icon {
    width: 20px;
    margin-right: 5px;
}


/* ==================== 締めの言葉 ==================== */
.cp-closing {
    text-align: center;
}

.cp-closing__title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 16px;
}

.cp-closing__text {
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 24px;
    text-align: left;
}

/* ==================== 利用方法 ==================== */
.cp-how__step {
    display: flex;
    background: #FFFFFF;
    border: 2px solid #F0F0F0;
    border-radius: var(--border-radius);
    padding: 24px;
    align-items: center;
    flex-direction: column;
    text-align: left;
    transition: transform 0.3s;
}

.cp-step__number {
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    margin-right: 0;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.cp-step__content {
    width: 100%;
    text-align: left;
}

.cp-step__image {
    margin: 20px auto;
}

.cp-step-arrow {
    text-align: center;
    font-size: 32px;
    color: var(--primary);
    font-weight: bold;
}

.cp-how__complete {
    padding: 12px;
    border-radius: var(--border-radius);
    text-align: left;
    margin-top: 10px;
}

/* ==================== CTA ==================== */
.cp-cta__title {
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
}

/* ==================== コピー完了の吹き出し ==================== */
.copy-tooltip {
    position: absolute;
    bottom: 50px;
    left: 50%;
    background-color: #333333;
    color: #FFFFFF;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%) translateY(5px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.copy-tooltip.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.copy-tooltip.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(-5px);
}

.copy-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333333;
}

/* ==================== ボタン ==================== */
.cp-btn-area {
    display: flex;
    flex-direction: column;
    text-align: center;
    width: 100%;
    gap: 12px;
}

.cp-btn--primary a {
    width: 200px;
    display: inline-block;
    background: var(--primary);
    color: #FFFFFF;
    font-weight: bold;
    font-size: 14px;
    padding: 16px 25px;
    border-radius: 100px;
    box-shadow: 0 4px 15px rgba(255, 90, 0, 0.3);
    border: 2px solid var(--primary);
}

.cp-btn--primary a:hover {
    transition-duration: .5s;
    text-decoration: none;
    background: #D44B00;
    border: 2px solid #D44B00;
}

.cp-btn--secondary a {
    width: 200px;
    display: inline-block;
    background: #FFFFFF;
    color: var(--primary);
    font-weight: bold;
    font-size: 14px;
    padding: 16px 25px;
    border-radius: 100px;
    box-shadow: 0 4px 15px rgba(255, 90, 0, 0.15);
    border: 2px solid var(--primary);
}

.cp-btn--secondary a:hover {
    transition-duration: .5s;
    text-decoration: none;
    background: #F5F5F5;
}

/* PC版：ボタンエリアは横並び */
@media screen and (min-width: 950px) {
    .cp-btn-area {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 20px;
    }
}

/* SP版：ボタンエリアは縦並び */
@media screen and (max-width: 949px) {
    .cp-btn-area {
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
}

.webview_attention {
    font-size: 11px;
    color: #333333;
    margin-top: 2px;
}

/* ==================== シェアボタン ==================== */
.cp-share__title {
    font-size: 17px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 24px;
}

.cp-share__list {
    display: flex;
    justify-content: center;
    gap: 20px;
    list-style: none;
    padding: 0;
}

.cp-share__button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.cp-share__button--x {
    background: #000000;
}

.cp-share__button--line {
    background: #06C755;
}

.cp-share__button--copy {
    background-color: #FFFFFF;
    border: 1px solid #333333;
}

.cp-share__button--copy:hover {
    background-color: #F5F5F5;
    transition: background-color 0.2s;
}

.cp-share__icon {
    fill: #FFFFFF;
    width: 28px;
    height: 28px;
}

.webview_attention {
    font-size: 11px;
    color: #333333;
    margin-top: 2px;
}

/* ==================== PC表示（950px以上） ==================== */
@media screen and (min-width: 950px) {
    /* レイアウト調整 */
    .cp-result,
    .cp-schedule,
    .cp-share-campaign,
    .cp-introduction,
    .cp-how-to,
    .cp-awards,
    .cp-period,
    .cp-call-to-action,
    .cp-end {
        padding: 40px 32px;
    }

    .cp-hero__kv {
        display: flex;
        justify-content: center;
        margin: 0 auto 32px;
        width: 850px;
    }

    /* 参加方法 ステップ */
    .cp-how__step {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 20px;
        align-items: flex-start;
        text-align: left;
    }
    .cp-step__number {
        grid-column: 1;
        grid-row: 1;
        margin-right: 0;
        margin-bottom: 0;
    }
    .cp-step__content {
        grid-column: 2;
        grid-row: 1;
        text-align: left;
    }
    .cp-how__step .cp-btn-area {
        grid-column: 1 / 3;
        grid-row: 2;
        margin: 0;
    }

    /* スケジュール */
    .cp-schedule__item {
        display: grid;
        grid-template-columns: max-content 1fr;
        column-gap: 12px;
        align-items: center;
    }
    .cp-schedule__label {
        text-align: right;
        min-width: 120px;
        padding-right: 6px;
        display: inline;
        margin-bottom: 0;
        font-size: 16px;
    }

    /* バッジエリア */
    .cp-winner__badge {
        font-size: 64px;
    }

    .cp-winner__badge-area {
        padding: 24px 100px;
    }

    .cp-winner__deco {
        width: 60px;
    }

    .cp-winner__deco--left {
        left: 20%;
    }

    .cp-winner__deco--right {
        right: 20%;
    }

    .cp-winner__point {
        font-size: 24px;
    }
    /* 運営コメント */
    .cp-winner__staff-comment {
        border-left: 4px solid var(--primary);
        padding: 12px;
    }

    /* 受賞者カード */
    .cp-winner__header {
        flex-direction: row;
        justify-content: space-between;
    }

    .cp-winner__book {
        width: calc((100% - 60px) / 6);
    }

    /* グリッドを6列に対応 */
    .cp-winner__books--grid {
        gap: 12px;
        max-height: 424px;
    }

    /* ボタン非表示時（個数が閾値未満）は全高さを表示 */
    .cp-winner__books--grid[data-books-limited="true"] {
        max-height: fit-content;
        overflow: visible;
    }

    /* 3行以上の場合のみフェード効果 */
    .cp-winner__books--grid[data-books-limited="false"][data-books-open="false"]::after {
        height: 218px;
    }

    /* もっと見るボタン */
    .cp-winner__books-toggle {
        font-size: 16px;
    }

    /* ボタンエリア */
    .cp-btn-area {
        flex-direction: row;
        justify-content: center;
        gap: 20px;
    }

    /* 賞のセクション */
    .cp-award-item {
        text-align: left;
        gap: 0;
    }

    /* 期間テーブル */
    .cp-period__table th {
        font-size: 15px;
        padding: 18px 24px;
    }

    .cp-period__table td {
        font-size: 15px;
        padding: 18px 24px;
    }
}
