/* 新カエレバシリーズ Amazlet-2 ショップ色付き・4サービス共通配布用
 * 2026-11-19。各サービスの shop-color プリセットをサービスごとに限定。
 * Cocoonでは末尾の cocoon-amazlet2-reset.css も併用してください。
 */

/* kaereba */
.cstmreba > .kaerebalink-box { overflow: hidden;
    margin: 20px 0;
    padding: 18px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    line-height: 1.6; }
.cstmreba > .kaerebalink-box .kaerebalink-image { float: left;
    margin: 0 20px 10px 0;
    text-align: center; }
.cstmreba > .kaerebalink-box .kaerebalink-image img { max-width: 100%;
    height: auto;
    border: 0; }
.cstmreba > .kaerebalink-box .kaerebalink-info { overflow: hidden; }
.cstmreba > .kaerebalink-box .kaerebalink-name { margin-bottom: 10px;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.5; }
.cstmreba > .kaerebalink-box .kaerebalink-name a { color: #1769aa;
    text-decoration: none; }
.cstmreba > .kaerebalink-box .kaerebalink-name a:hover { text-decoration: underline; }
.cstmreba > .kaerebalink-box .kaerebalink-powered-date { margin-top: 5px;
    color: #777;
    font-family: Verdana, sans-serif;
    font-size: 11px;
    font-weight: normal; }
.cstmreba > .kaerebalink-box .kaerebalink-link1 { display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px; }
.cstmreba > .kaerebalink-box .kaerebalink-link1 > div { margin: 0 !important; }
.cstmreba > .kaerebalink-box .kaerebalink-link1 > div:empty { display: none; }
.cstmreba > .kaerebalink-box .kaerebalink-link1 > div > img { position: absolute;
    width: 1px !important;
    height: 1px !important;
    border: 0 !important; }
.cstmreba > .kaerebalink-box .kaerebalink-link1 a { display: inline-block;
    padding: 8px 13px;
    border: 1px solid transparent;
    border-radius: 5px;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    line-height: 1.4;
    text-decoration: none;
    transition: opacity 0.2s ease; }
.cstmreba > .kaerebalink-box .kaerebalink-link1 a:hover { opacity: 0.82;
    text-decoration: none; }
.cstmreba > .kaerebalink-box .shoplinkrakuten a { background: #bf0000; }
.cstmreba > .kaerebalink-box .shoplinkamazon a { background: #ff9900;
    color: #222; }
.cstmreba > .kaerebalink-box .shoplinkyahoo a,
.cstmreba > .kaerebalink-box .shoplinkyahooAuc a { background: #ff0033; }
.cstmreba > .kaerebalink-box .shoplinkwowma a { background: #eb5505; }
.cstmreba > .kaerebalink-box .shoplinkkakakucom a { background: #0b7cc1; }
.cstmreba > .kaerebalink-box .shoplinkseven a { background: #008837; }
.cstmreba > .kaerebalink-box .shoplinkdocomo a { background: #cc0033; }
.cstmreba > .kaerebalink-box .shoplinkbellemaison a,
.cstmreba > .kaerebalink-box .shoplinkcecile a { background: #555; }
.cstmreba > .kaerebalink-box .booklink-footer { clear: both; }
@media screen and (max-width: 768px) {
.cstmreba > .kaerebalink-box { padding: 14px; }
.cstmreba > .kaerebalink-box .kaerebalink-image { float: none;
        margin: 0 0 14px; }
.cstmreba > .kaerebalink-box .kaerebalink-info { overflow: visible; }
.cstmreba > .kaerebalink-box .kaerebalink-link1 { display: block; }
.cstmreba > .kaerebalink-box .kaerebalink-link1 > div { margin-bottom: 8px !important; }
.cstmreba > .kaerebalink-box .kaerebalink-link1 a { display: block;
        box-sizing: border-box;
        width: 100%;
        text-align: center; }
}

/* yomereba */
.cstmreba > .booklink-box { overflow: hidden;
    margin: 20px 0;
    padding: 18px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    line-height: 1.6; }
.cstmreba > .booklink-box .booklink-image { float: left;
    margin: 0 20px 10px 0;
    text-align: center; }
.cstmreba > .booklink-box .booklink-image img { max-width: 100%;
    height: auto;
    border: 0; }
.cstmreba > .booklink-box .booklink-info { overflow: hidden; }
.cstmreba > .booklink-box .booklink-name { margin-bottom: 10px;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.5; }
.cstmreba > .booklink-box .booklink-name a { color: #1769aa;
    text-decoration: none; }
.cstmreba > .booklink-box .booklink-name a:hover { text-decoration: underline; }
.cstmreba > .booklink-box .booklink-powered-date { margin-top: 5px;
    color: #777;
    font-family: Verdana, sans-serif;
    font-size: 11px;
    font-weight: normal; }
.cstmreba > .booklink-box .booklink-link2 { display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px; }
.cstmreba > .booklink-box .booklink-link2 > div { margin: 0 !important; }
.cstmreba > .booklink-box .booklink-link2 > div:empty { display: none; }
.cstmreba > .booklink-box .booklink-link2 > div > img { position: absolute;
    width: 1px !important;
    height: 1px !important;
    border: 0 !important; }
.cstmreba > .booklink-box .booklink-link2 a { display: inline-block;
    padding: 8px 13px;
    border: 1px solid transparent;
    border-radius: 5px;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    line-height: 1.4;
    text-decoration: none;
    transition: opacity 0.2s ease; }
.cstmreba > .booklink-box .booklink-link2 a:hover { opacity: 0.82;
    text-decoration: none; }
.cstmreba > .booklink-box .shoplinkrakuten a { background: #bf0000; }
.cstmreba > .booklink-box .shoplinkamazon a { background: #ff9900;
    color: #222; }
.cstmreba > .booklink-box .booklink-kinokuniya a { background: #e60033; }
.cstmreba > .booklink-box .booklink-kindle a { background: #ff9900;
    color: #222; }
.cstmreba > .booklink-box .shoplinkkakakucom a { background: #0b7cc1; }
.cstmreba > .booklink-box .shoplinkseven a { background: #008837; }
.cstmreba > .booklink-box .booklink-bookoff.booklink-ebookjapan a { background: #007a3d; }
.cstmreba > .booklink-box .booklink-kobo a { background: #bf0000; }
.cstmreba > .booklink-box .booklink-honto a { background: #1672b8; }
.cstmreba > .booklink-box .booklink-booklive a { background: #1765a3; }
.cstmreba > .booklink-box .booklink-ebookjapan:not(.booklink-bookoff) a { background: #ff0033; }
.cstmreba > .booklink-box .booklink-media-label { flex-basis: 100%;
    margin-top: 6px !important;
    color: #555;
    font-size: 12px;
    font-weight: bold; }
.cstmreba > .booklink-box .booklink-footer { clear: both; }
@media screen and (max-width: 768px) {
.cstmreba > .booklink-box { padding: 14px; }
.cstmreba > .booklink-box .booklink-image { float: none;
        margin: 0 0 14px; }
.cstmreba > .booklink-box .booklink-info { overflow: visible; }
.cstmreba > .booklink-box .booklink-link2 { display: block; }
.cstmreba > .booklink-box .booklink-link2 > div { margin-bottom: 8px !important; }
.cstmreba > .booklink-box .booklink-link2 a { display: block;
        box-sizing: border-box;
        width: 100%;
        text-align: center; }
}

/* tomareba */
.cstmreba > .tomarebalink-box { box-sizing:border-box;display:flex;gap:16px;max-width:680px;padding:16px;border:1px solid #dfe5eb;border-radius:10px;background:#fff;text-align:left;overflow:hidden }
.cstmreba > .tomarebalink-box .tomarebalink-image { flex:0 0 auto }
.cstmreba > .tomarebalink-box .tomarebalink-image > a > img { display:block;max-width:100%;height:auto;border-radius:6px }
.cstmreba > .tomarebalink-box .tomarebalink-image-large .tomarebalink-image { width:auto;max-width:100% }
.cstmreba > .tomarebalink-box .tomarebalink-image-medium .tomarebalink-image { width:160px }
.cstmreba > .tomarebalink-box .tomarebalink-image-small .tomarebalink-image { width:100px }
.cstmreba > .tomarebalink-box .tomarebalink-info { min-width:0;flex:1 }
.cstmreba > .tomarebalink-box .tomarebalink-name { margin-bottom:8px;font-weight:700 }
.cstmreba > .tomarebalink-box .tomarebalink-address { margin-bottom:10px;color:#666;font-size:13px }
.cstmreba > .tomarebalink-box .tomarebalink-link1 { margin-top:10px }
.cstmreba > .tomarebalink-box .tomarebalink-link1 > div { display:inline-block;margin:4px 6px 4px 0 }
.cstmreba > .tomarebalink-box .tomarebalink-link1 > div a { display:inline-block;padding:7px 10px;border:1px solid #ccd4dc;border-radius:5px;text-decoration:none }
.cstmreba > .tomarebalink-box .tomarebalink-map-link { margin-left:.45em;white-space:nowrap }
.cstmreba > .tomarebalink-box .tomarebalink-template-amazlet-1 { border-width:0;border-bottom:1px solid #ccd4dc;border-radius:0;padding:10px 0 }
.cstmreba > .tomarebalink-box .tomarebalink-template-amazlet-2 { border:0;border-radius:0;padding:0 }
.cstmreba > .tomarebalink-box .tomarebalink-template-amazlet-3 { border:0;border-left:5px solid #7ba8c4;border-radius:0 }
.cstmreba > .tomarebalink-box .tomarebalink-template-amazlet-3 .tomarebalink-link1 > div { display:block;margin:6px 0 }
.cstmreba > .tomarebalink-box .tomarebalink-template-amazlet-4 { border:0;background:#f8fafb }
.cstmreba > .tomarebalink-box .tomarebalink-template-amazlet-4 .tomarebalink-image { order:2 }
.cstmreba > .tomarebalink-box .tomarebalink-template-amazlet-4 .tomarebalink-info { order:1 }
.cstmreba > .tomarebalink-box .tomarebalink-template-gtools-1 { display:grid;grid-template-columns:auto 1fr;border-radius:2px }
.cstmreba > .tomarebalink-box .tomarebalink-template-gtools-1 .tomarebalink-name { grid-column:1/-1 }
.cstmreba > .tomarebalink-box .tomarebalink-template-gtools-2 { border-style:double;border-width:3px;border-radius:0 }
.cstmreba > .tomarebalink-box .tomarebalink-template-gtools-2 .tomarebalink-link1 > div { display:block }
.cstmreba > .tomarebalink-box .tomarebalink-template-gtools-3 { display:grid;grid-template-columns:auto 1fr;border-radius:0;box-shadow:0 4px 14px rgba(0,0,0,.12) }
.cstmreba > .tomarebalink-box .tomarebalink-template-mokari-1 { display:block;border-radius:18px }
.cstmreba > .tomarebalink-box .tomarebalink-template-mokari-1 .tomarebalink-image { float:left;margin:0 16px 10px 0 }
.cstmreba > .tomarebalink-box .tomarebalink-template-mokari-1 .tomarebalink-link1 { clear:both;text-align:center }
@media(max-width:560px) {
.cstmreba > .tomarebalink-box { display:block;width:100%;max-width:none;padding:14px }
.cstmreba > .tomarebalink-box .tomarebalink-image { float:none!important;width:100%!important;max-width:100%!important;margin:0 0 14px!important }
.cstmreba > .tomarebalink-box .tomarebalink-info { display:block;width:100% }
.cstmreba > .tomarebalink-box .tomarebalink-name { display:block;width:100%;margin:0 0 10px }
.cstmreba > .tomarebalink-box .tomarebalink-name a { display:block;width:100%;box-sizing:border-box }
.cstmreba > .tomarebalink-box .tomarebalink-address { width:100%;box-sizing:border-box }
.cstmreba > .tomarebalink-box .tomarebalink-link1 { display:block;width:100% }
.cstmreba > .tomarebalink-box .tomarebalink-link1 > div { display:block;width:100%;margin:7px 0 }
.cstmreba > .tomarebalink-box .tomarebalink-link1 > div a { display:block;width:100%;box-sizing:border-box;text-align:center;padding:11px 12px }
}
.cstmreba > .tomarebalink-box .tomarebalink-link1 > div a { color:#fff;border-color:transparent;font-weight:700 }
.cstmreba > .tomarebalink-box .shoplinkrakuten a { background:#bf0000 }
.cstmreba > .tomarebalink-box .shoplinkjalan a,
.cstmreba > .tomarebalink-box .shoplinkjalan a { background:#f58220 }
.cstmreba > .tomarebalink-box .shoplinkyahoo a { background:#6f198d }
.cstmreba > .tomarebalink-box .shoplinkikyu a { background:#7a6547 }
.cstmreba > .tomarebalink-box .shoplinkknt a { background:#1369a8 }
.cstmreba > .tomarebalink-box img[height="1"][width="0"],
.cstmreba > .tomarebalink-box img[height="1"][width="1"] { position:absolute!important;max-width:1px!important;max-height:1px!important;margin:0!important }
.cstmreba > .tomarebalink-box .booklink-footer { clear:both }

/* tabereba */
.cstmreba > .taberebalink-box { display:flex;gap:16px;max-width:680px;padding:16px;border:1px solid #ddd;border-radius:8px;box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.6 }
.cstmreba > .taberebalink-box .taberebalink-image { flex:0 0 auto }
.cstmreba > .taberebalink-box .taberebalink-image > a > img { display:block;max-width:100%;height:auto;border-radius:5px }
.cstmreba > .taberebalink-box .taberebalink-info { flex:1 1 260px;min-width:0 }
.cstmreba > .taberebalink-box .taberebalink-name { font-size:18px;font-weight:700;margin-bottom:6px }
.cstmreba > .taberebalink-box .taberebalink-name a { color:#33251f }
.cstmreba > .taberebalink-box .taberebalink-meta { color:#745f55;font-size:13px;margin:0 0 5px }
.cstmreba > .taberebalink-box .taberebalink-link1 { display:grid;gap:6px;margin-top:10px }
.cstmreba > .taberebalink-box .taberebalink-link1 > div a { display:block;padding:7px 12px;border-radius:5px;background:#d84a2f;color:#fff;text-align:center;text-decoration:none }
.cstmreba > .taberebalink-box .shoplinktabelog a { background:#b44432 }
.cstmreba > .taberebalink-box .shoplinkgnavi a { background:#a71930 }
@media(max-width:520px) {
.cstmreba > .taberebalink-box { display:block }
.cstmreba > .taberebalink-box .taberebalink-image { margin:0 0 12px }
.cstmreba > .taberebalink-box .taberebalink-image > a > img { width:100%!important }
.cstmreba > .taberebalink-box .taberebalink-link1 > div a { width:100%;box-sizing:border-box }
}
.cstmreba > .taberebalink-box img[height="1"][width="0"],
.cstmreba > .taberebalink-box img[height="1"][width="1"] { position:absolute!important;max-width:1px!important;max-height:1px!important;margin:0!important }
.cstmreba > .taberebalink-box .booklink-footer { clear:both }

/* Cocoon 2.8.8向け Amazlet-2 干渉解除 v1.0.0（2026-11-19）
 * 4サービスの色付きCSSの後に追加。親テーマの編集・全体リセットは不要。
 * .cstmreba のあるCSSカスタマイズ用カードだけを対象にします。
 * !important はCocoon自身の !important を上書きする箇所に限定。
 */
.cstmreba > :is(.kaerebalink-box, .booklink-box, .tomarebalink-box, .taberebalink-box) {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: left;
    font-size: 14px !important;
    line-height: 1.6;
    overflow-wrap: anywhere;
}
.cstmreba > :is(.kaerebalink-box, .booklink-box) {
    display: block;
}
.cstmreba > :is(.tomarebalink-box, .taberebalink-box) {
    max-width: 680px;
}
/* Cocoonの画像幅80/120/160pxと、float・marginの強制を解除。 */
.cstmreba :is(.kaerebalink-image, .booklink-image, .tomarebalink-image) {
    width: auto;
    min-width: 0 !important;
    max-width: 100%;
    height: auto !important;
    margin: 0 20px 10px 0 !important;
    float: left !important;
}
.cstmreba .tomarebalink-image {
    float: none !important;
    margin: 0 !important;
    flex-shrink: 1;
    min-width: 0;
}
.cstmreba :is(.kaerebalink-info, .booklink-info, .tomarebalink-info) {
    width: auto !important;
    min-width: 0;
    padding: 0 !important;
    text-align: left !important;
    line-height: 1.6;
}
.cstmreba :is(.kaerebalink-info, .booklink-info) {
    overflow: hidden !important;
}
/* Cocoonのボタン幅90%、余白、スマートフォンでの幅100%を解除。
 * 各サービス自身のレイアウトと色は、そのまま使います。 */
.cstmreba :is(.kaerebalink-link1, .booklink-link2, .tomarebalink-link1) > div {
    width: auto;
    margin: 0 !important;
    box-sizing: border-box;
}
.cstmreba :is(.kaerebalink-link1, .booklink-link2, .tomarebalink-link1) a {
    width: auto;
    margin: 0;
    box-sizing: border-box;
}
.cstmreba .tomarebalink-link1 > div {
    margin: 4px 6px 4px 0 !important;
}
/* ヨメレバの「紙の本・電子書籍」見出しをCocoonの強制表示から保護。 */
.cstmreba .booklink-link2 > .booklink-media-label {
    display: block !important;
    flex-basis: 100%;
    width: 100%;
    margin-top: 6px !important;
}
.cstmreba :is(.kaerebalink-link1, .booklink-link2, .tomarebalink-link1) > div:empty {
    display: none !important;
}
/* 計測画像は画像幅のリセット対象にしない。送信先やHTMLは変更しません。 */
.cstmreba :is(.kaerebalink-box, .booklink-box, .tomarebalink-box, .taberebalink-box) img[height="1"]:is([width="0"], [width="1"]) {
    display: inline !important;
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    max-width: 1px !important;
    max-height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}
/* Cocoonがボタン内の全imgへ指定する絶対配置を、ショップアイコンだけ解除。 */
.cstmreba :is(.kaerebalink-link1, .booklink-link2, .tomarebalink-link1) a img:not([height="1"]) {
    position: static;
}
@media screen and (max-width: 768px) {
    .cstmreba :is(.kaerebalink-image, .booklink-image) {
        float: none !important;
        margin: 0 0 14px !important;
    }
    .cstmreba :is(.kaerebalink-info, .booklink-info) {
        overflow: visible !important;
    }
    .cstmreba :is(.kaerebalink-link1, .booklink-link2) > div {
        margin: 0 0 8px !important;
    }
    .cstmreba :is(.kaerebalink-link1, .booklink-link2) a {
        display: block;
        width: 100%;
    }
}
@media screen and (max-width: 560px) {
    .cstmreba .tomarebalink-image {
        width: 100%;
        margin: 0 0 14px !important;
    }
    .cstmreba .tomarebalink-link1 > div {
        width: 100%;
        margin: 7px 0 !important;
    }
    .cstmreba .tomarebalink-link1 > div a {
        width: 100%;
    }
}

/* タベレバの共通ボタン色より、サービス別の色を優先。 */
.cstmreba .taberebalink-box .taberebalink-link1 .shoplinktabelog a {
    background: #b44432;
}
.cstmreba .taberebalink-box .taberebalink-link1 .shoplinkgnavi a {
    background: #a71930;
}
