/* DanDan Site Kit | Scoped styles, mobile-first. Footer deliberately WHITE without floral decoration. */
:root { --dandan-green:#557c3d; --dandan-dark:#314b28; --dandan-brown:#72583e; --dandan-soft:#f4f7ed; --dandan-border:#e6e9df; }
.dandan-site, .dandan-archive, .dandan-article-wrap, .dandan-contact { color:#303329; font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif; line-height:1.7; }
.dandan-site { background:#fff; width:100%; max-width:1240px; margin-inline:auto; padding:0 18px 24px; box-sizing:border-box; }
.dandan-site *,.dandan-archive *,.dandan-article-wrap *,.dandan-contact *{box-sizing:border-box}
.dandan-site a,.dandan-archive a,.dandan-article a{color:var(--dandan-green);text-underline-offset:3px}
.dandan-brand {display:flex;align-items:center;gap:10px;padding:17px 4px 20px;color:var(--dandan-dark)}
.dandan-brand strong {font-family:Georgia,"Yu Mincho",serif;font-weight:700;font-size:clamp(1.4rem,3vw,2rem);line-height:1.2;display:block}
.dandan-brand span {font-size:.91rem;letter-spacing:.09em;color:var(--dandan-brown);display:block}
.dandan-mark {flex-shrink:0}
.dandan-eyebrow {color:var(--dandan-green);font-size:.88rem;letter-spacing:.04em;font-weight:700;margin:0 0 8px}
.dandan-hero {display:grid;grid-template-columns:1fr;overflow:hidden;border-radius:22px;background:linear-gradient(110deg,#fafbf3 0%,#f4f3e8 65%,#e7eddb 100%);min-height:310px}
.dandan-hero-copy {padding:clamp(22px,5vw,56px);align-self:center;z-index:1}
.dandan-hero h1 {font-family:Georgia,"Yu Mincho",serif;font-size:clamp(2rem,5vw,3.25rem);letter-spacing:.02em;line-height:1.42;color:var(--dandan-dark);margin:8px 0 18px}
.dandan-hero p:not(.dandan-eyebrow){margin:0 0 18px;max-width:34rem}
.dandan-hero-photo {width:100%;height:300px;object-fit:cover;display:block}
.dandan-hero-art {display:flex;align-items:center;justify-content:center;font-size:8rem;background:radial-gradient(circle,#f9faf1,#d9e7cf)}
.dandan-btn, .dandan-site .dandan-btn,.dandan-contact .dandan-btn {display:inline-block;border:0;background:var(--dandan-green);color:#fff;text-decoration:none;padding:12px 22px;border-radius:99px;font-weight:700;font-size:.98rem;cursor:pointer}
.dandan-btn:hover,.dandan-site .dandan-btn:hover{background:var(--dandan-dark);color:#fff}
.dandan-btn-light,.dandan-site .dandan-btn-light{background:#fff;color:var(--dandan-green);border:1px solid var(--dandan-green)}
.dandan-btn-light:hover,.dandan-site .dandan-btn-light:hover{background:var(--dandan-soft);color:var(--dandan-dark)}
.dandan-season {display:flex;align-items:center;justify-content:space-between;gap:14px;border:1px solid #e0eacb;background:#f9fbf4;border-radius:18px;padding:19px 24px;margin:20px 0 24px}
.dandan-season h2 {font-family:Georgia,"Yu Mincho",serif;font-size:clamp(1.4rem,3vw,2rem);margin:0 0 5px;color:var(--dandan-dark)}
.dandan-season p {margin:5px 0}
.dandan-season-foods {font-weight:700;color:var(--dandan-brown)}
.dandan-search {display:grid;grid-template-columns:1fr;gap:12px;align-items:end;background:#eef5e2;border-radius:18px;padding:18px;margin:20px 0 30px}
.dandan-search>strong {font-size:1.15rem;color:var(--dandan-dark)}
.dandan-search label {display:flex;flex-direction:column;gap:5px;font-size:.9rem;color:var(--dandan-dark);font-weight:700}
.dandan-search select,.dandan-contact input:not([type=checkbox]),.dandan-contact select,.dandan-contact textarea{width:100%;min-width:0;padding:11px;border-radius:9px;background:#fff;color:#222;border:1px solid #d3dccb;font:inherit}
.dandan-search button {white-space:nowrap;border:0;border-radius:10px;background:var(--dandan-green);color:#fff;font-weight:700;padding:12px;cursor:pointer;font:inherit}
.dandan-search button:hover{background:var(--dandan-dark)}
.dandan-search-note{font-size:.79rem;color:#51574d;margin:0;line-height:1.6}
.dandan-section{margin:35px 0 42px}
.dandan-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--dandan-border);margin:0 0 17px;padding:0 0 7px}
.dandan-section-head h2{font-family:Georgia,"Yu Mincho",serif;color:var(--dandan-dark);font-size:clamp(1.35rem,2.7vw,1.75rem);margin:0}
.dandan-section-head a{font-size:.87rem;white-space:nowrap}
.dandan-cards {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.dandan-card {border:1px solid var(--dandan-border);border-radius:15px;overflow:hidden;background:#fff;min-width:0;box-shadow:0 2px 7px rgba(0,0,0,.035)}
.dandan-card a {display:block;color:#303329!important;text-decoration:none}
.dandan-card a:hover h3,.dandan-card a:hover h2{color:var(--dandan-green);text-decoration:underline}
.dandan-card-photo {width:100%;height:145px;display:block;object-fit:cover}
.dandan-placeholder {height:145px;display:flex;align-items:center;justify-content:center;background:#edf4e5;font-size:4rem}
.dandan-card-body {padding:12px}
.dandan-card h3,.dandan-card h2 {font-size:1rem;line-height:1.55;margin:0 0 7px;font-weight:700}
.dandan-meta{color:var(--dandan-green);font-size:.84rem}
.dandan-empty {grid-column:1/-1;padding:26px;border-radius:13px;background:#f7f8f5;text-align:center}
.dandan-column-link{display:block;padding:15px 18px;background:var(--dandan-soft);border-radius:12px;font-weight:700}
.dandan-profile{display:grid;grid-template-columns:1fr;gap:16px;padding:18px 0;border-top:1px solid var(--dandan-border);border-bottom:1px solid var(--dandan-border)}
.dandan-profile img{width:100%;max-width:290px;border-radius:18px;aspect-ratio:1/1;object-fit:cover;object-position:top;justify-self:center}
.dandan-profile h2{font-family:Georgia,"Yu Mincho",serif;color:var(--dandan-dark);font-size:clamp(1.4rem,3vw,1.8rem)}
.dandan-social{display:flex;gap:12px;flex-wrap:wrap;margin:25px 0}
.dandan-social a {display:inline-flex;padding:12px 22px;border:1px solid var(--dandan-border);border-radius:10px;color:var(--dandan-dark);text-decoration:none}
.dandan-footer{background:#fff!important;background-image:none!important;border-top:1px solid var(--dandan-border);text-align:center;padding:25px 12px;color:var(--dandan-brown);margin-top:20px}
.dandan-footer p {margin:3px 0}
.dandan-archive,.dandan-article-wrap{max-width:1150px;margin:auto;padding:30px 18px 65px}
.dandan-archive-heading h1{font-family:Georgia,"Yu Mincho",serif;color:var(--dandan-dark);font-size:clamp(1.8rem,4vw,2.5rem)}
.dandan-archive .dandan-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
.dandan-pagination{margin:26px 0;text-align:center}
.dandan-pagination a,.dandan-pagination span{display:inline-block;margin:2px;padding:6px 12px;border:1px solid var(--dandan-border);border-radius:7px}
.dandan-article{max-width:820px;margin:auto}
.dandan-article h1{font-family:Georgia,"Yu Mincho",serif;color:var(--dandan-dark);font-size:clamp(1.7rem,3.5vw,2.5rem);line-height:1.5}
.dandan-article h2{font-size:clamp(1.2rem,3vw,1.5rem);margin:22px 0 10px;color:var(--dandan-dark)}
.dandan-article-image{width:100%;max-height:490px;object-fit:cover;border-radius:15px}
.dandan-article-body{margin:16px 0 25px}
.dandan-article .dandan-info{background:var(--dandan-soft);padding:12px 18px;border-radius:11px}
.dandan-article li{margin-bottom:7px}
.dandan-article section{margin:25px 0}
.dandan-tip{padding:15px 20px;border-left:4px solid var(--dandan-green);background:#f8fbf3;border-radius:6px}
.dandan-affiliate{padding:18px;border:1px solid #cadbb9;border-radius:13px}
.dandan-affiliate .dandan-btn{margin:7px 8px 7px 0}
.dandan-pr{font-size:.86rem;font-weight:700;color:#7d4b26}
.dandan-muted{font-size:.86rem;color:#666d63}
.dandan-contact{max-width:650px;margin:25px auto;padding:0 18px}
.dandan-contact form{display:grid;gap:16px}
.dandan-contact form>label{display:grid;gap:6px;font-weight:700}
.dandan-contact .dandan-consent{display:flex;gap:8px;font-weight:400;align-items:center}
.dandan-contact .dandan-consent input{width:auto}
.dandan-contact .dandan-hp{position:absolute!important;left:-10000px!important;width:1px;height:1px;overflow:hidden}
.dandan-success{background:#edf9eb;padding:14px;border-radius:8px}
.dandan-error{background:#fff0e8;padding:14px;border-radius:8px}
.dandan-back {margin-top:35px}
@media(min-width:700px){
 .dandan-hero{grid-template-columns:1fr 1fr;min-height:390px}
 .dandan-hero-photo{height:100%;min-height:390px}
 .dandan-search{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;align-items:end}
 .dandan-search>strong{grid-column:1/-1;align-self:center}
 .dandan-search>button,.dandan-search-note{grid-column:1/-1}
 .dandan-cards,.dandan-archive .dandan-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
 .dandan-ingredient-cards,.dandan-archive .dandan-ingredient-cards{grid-template-columns:repeat(5,minmax(0,1fr))}
 .dandan-card-photo,.dandan-placeholder{height:190px}
 .dandan-ingredient-cards .dandan-card-photo,.dandan-ingredient-cards .dandan-placeholder{height:150px}
 .dandan-profile{grid-template-columns:240px 1fr;align-items:center;gap:35px}
 .dandan-profile img{width:240px}
}

/* Tablet range: keep the hero readable before the desktop two-column layout. */
@media (min-width: 700px) and (max-width: 899px) {
    .dandan-home .dandan-hero {
        grid-template-columns: 1fr;
    }
    .dandan-home .dandan-hero-photo {
        height: 300px;
        min-height: 0;
    }
}

@media(max-width:767px){
 .dandan-site{width:100%;max-width:100%;padding:0 12px}
 .dandan-hero h1{font-size:1.92rem}
 .dandan-section-head h2{font-size:1.16rem}
 .dandan-section-head a{font-size:.75rem}
 .dandan-cards{gap:9px}
 .dandan-card-photo,.dandan-placeholder{height:125px}
 .dandan-card-body{padding:9px}
 .dandan-card h3,.dandan-card h2{font-size:.91rem}
 .dandan-season{display:block}
}

.dandan-ad-warning{background:#fff4e8;border:1px solid #e6bc9d;padding:10px 14px;color:#87481a;border-radius:8px}

@media(min-width:1050px){
 .dandan-search{grid-template-columns:repeat(4,minmax(0,1fr))}
 .dandan-search>button{justify-self:end;min-width:180px}
}

/* v0.1.3: 体質を複数チェックで検索する */
.dandan-search .dandan-search-constitution{grid-column:1/-1;min-width:0;border:0;margin:2px 0 0;padding:0}
.dandan-search .dandan-search-constitution legend{font-size:.9rem;color:var(--dandan-dark);font-weight:700;margin-bottom:8px}
.dandan-constitution-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 12px}
.dandan-search .dandan-constitution-choices label{display:flex;flex-direction:row;align-items:center;gap:8px;font-weight:500;background:#fff;border:1px solid #d3dccb;border-radius:9px;padding:9px 12px;cursor:pointer}
.dandan-constitution-choices input[type=checkbox]{width:17px;height:17px;flex:none;accent-color:var(--dandan-green)}
@media(min-width:700px){.dandan-constitution-choices{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:1050px){.dandan-constitution-choices{grid-template-columns:repeat(6,minmax(0,1fr))}}
.dandan-food-classes{background:#f7faf3;border-left:3px solid #82a36b;padding:12px 16px;margin:20px 0}
.dandan-food-classes h2{font-size:1.05rem;margin:0 0 8px}
.dandan-food-classes p{margin:0}


/* v0.1.4: Ingredient profile (味・五臓・性質). Keep the user's requested white background. */
.dandan-yakuzen-profile {background:#fff;border:1px solid #e0e8dc;border-radius:12px;padding:14px 18px;margin:20px 0}
.dandan-yakuzen-profile h2 {margin:0 0 9px;font-size:1.1rem;color:var(--dandan-dark)}
.dandan-yakuzen-profile dl {margin:0}
.dandan-yakuzen-profile-row {display:grid;grid-template-columns:minmax(55px,75px) 1fr;gap:10px;padding:8px 0;border-bottom:1px solid #edf0e9}
.dandan-yakuzen-profile-row:last-child {border-bottom:0}
.dandan-yakuzen-profile-row dt {font-weight:700;color:var(--dandan-dark)}
.dandan-yakuzen-profile-row dd {margin:0;overflow-wrap:anywhere}

/* v0.1.5: 4-condition ingredient search. White background is intentional. */
.dandan-ingredient-explorer {background:#fff;color:#303329;margin:22px auto;max-width:1100px}
.dandan-ingredient-filters {background:#fff;border:1px solid #dfe7d9;border-radius:16px;padding:clamp(15px,3vw,25px);display:grid;gap:16px;margin:16px 0 20px}
.dandan-ingredient-filters-title {font-size:1.2rem;font-weight:700;color:var(--dandan-dark);margin:0}
.dandan-ingredient-filters .dandan-ingredient-class-label {display:block;font-weight:700;color:var(--dandan-dark)}
.dandan-ingredient-filters select {width:100%;max-width:520px;background:#fff;color:#222;border:1px solid #cbd8c2;padding:10px;border-radius:9px;font:inherit}
.dandan-ingredient-filter-group {border:0;padding:0;margin:0;min-width:0}
.dandan-ingredient-filter-group legend {font-weight:700;color:var(--dandan-dark);padding:0;margin:0 0 9px}
.dandan-ingredient-filter-choices {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.dandan-ingredient-filter-choices label {display:flex;align-items:center;gap:7px;min-width:0;border:1px solid #dce5d5;border-radius:9px;padding:8px 10px;background:#fff;font-size:.94rem;cursor:pointer}
.dandan-ingredient-filter-choices input {accent-color:var(--dandan-green);width:17px;height:17px;flex:none}
.dandan-ingredient-filter-actions {display:flex;gap:10px;flex-wrap:wrap}
.dandan-ingredient-filter-actions .dandan-btn{font:inherit;line-height:1.4}
.dandan-ingredient-filter-actions button {cursor:pointer}
.dandan-ingredient-filters .dandan-search-note {margin:0}
.dandan-search-count {font-weight:700;color:var(--dandan-dark);margin:15px 0 12px}
.dandan-ingredient-result-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
.dandan-ingredient-result-details{font-size:.76rem;color:#52634a;line-height:1.7;overflow-wrap:anywhere;margin:7px 0 0}
@media(min-width:700px){.dandan-ingredient-filter-choices{grid-template-columns:repeat(3,minmax(0,1fr))}.dandan-ingredient-result-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:1000px){.dandan-ingredient-filter-choices{grid-template-columns:repeat(6,minmax(0,1fr))}.dandan-ingredient-result-cards{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* Top page (WordPress page ID 18): hide the theme's duplicate title/featured image. */
body.page-id-18 .wp-block-post-title,
body.page-id-18 .wp-block-post-featured-image {
    display: none !important;
}
body.page-id-18 main.wp-block-group > .wp-block-group:has(.wp-block-post-title) {
    display: none !important;
}

/* Homepage content: main column + profile/social sidebar on desktop. */
.dandan-home .dandan-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}
.dandan-home .dandan-main-content { min-width: 0; max-width: 100%; }
.dandan-home .dandan-layout,
.dandan-home .dandan-main-content,
.dandan-home .dandan-sidebar { box-sizing: border-box; }
.dandan-home .dandan-sidebar {
    min-width: 0;
    padding: 8px 0 0;
}
.dandan-home .dandan-sidebar .dandan-profile {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    padding: 18px 0;
}
.dandan-home .dandan-sidebar .dandan-profile img {
    width: 100%;
    max-width: 220px;
    height: auto;
    justify-self: start;
}
.dandan-home .dandan-sidebar .dandan-profile h2 { font-size: 1.35rem; }
.dandan-home .dandan-sidebar .dandan-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}
.dandan-home .dandan-sidebar .dandan-social a {
    padding: 9px 13px;
    background: #fff;
}
.dandan-home .dandan-footer { clear: both; }

@media (min-width: 1100px) {
    .dandan-home .dandan-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 34px;
    }
    .dandan-home .dandan-sidebar {
        border-left: 1px solid var(--dandan-border);
        padding-left: 24px;
    }
}

/* Block-theme header: brand on the left, existing navigation on the right. */
.dandan-header-inner {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(100% - 36px, 1240px);
    max-width: 1240px;
    margin-inline: auto;
    padding: 12px 0 16px;
    box-sizing: border-box;
}
.dandan-header-inner > .wp-block-shortcode { flex: 0 0 auto; }
.dandan-header-inner .dandan-brand-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
}
.dandan-header-inner .dandan-brand-header strong {
    display: block;
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    line-height: 1.2;
}
.dandan-header-inner .dandan-brand-header span {
    display: block;
    font-size: .82rem;
}
.dandan-header-inner > .wp-block-group {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    justify-content: flex-end;
}
.dandan-header-inner .wp-block-navigation { margin-left: auto; }
.dandan-header-inner .wp-block-navigation__container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px 15px;
}
.dandan-header-inner .wp-block-navigation-item__content {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}
.dandan-header-inner .wp-block-navigation__container > .wp-block-navigation-item:nth-child(1) .wp-block-navigation-item__content::before { content: "🏠"; }
.dandan-header-inner .wp-block-navigation__container > .wp-block-navigation-item:nth-child(2) .wp-block-navigation-item__content::before { content: "👤"; }
.dandan-header-inner .wp-block-navigation__container > .wp-block-navigation-item:nth-child(3) .wp-block-navigation-item__content::before { content: "🌿"; }
.dandan-header-inner .wp-block-navigation__container > .wp-block-navigation-item:nth-child(4) .wp-block-navigation-item__content::before { content: "🍲"; }
.dandan-header-inner .wp-block-navigation__container > .wp-block-navigation-item:nth-child(5) .wp-block-navigation-item__content::before { content: "✉️"; }

@media (max-width: 1099px) {
    .dandan-header-inner {
        flex-wrap: wrap;
        align-items: flex-start;
    }
    .dandan-header-inner > .wp-block-group {
        flex-basis: 100%;
        justify-content: flex-start;
    }
    .dandan-header-inner .wp-block-navigation { margin-left: 0; }
    .dandan-header-inner .wp-block-navigation__container { justify-content: flex-start; }
}
@media (max-width: 700px) {
    .dandan-header-inner { width: calc(100% - 24px); gap: 10px; }
    .dandan-header-inner .wp-block-navigation__container { gap: 6px 12px; }
    .dandan-header-inner .wp-block-navigation-item__content { font-size: .9rem; }
}
/* トップページID 18：空のコメント領域を非表示 */
body.page-id-18 main#wp--skip-link--target > section.wp-block-template-part {
    display: none !important;
}
/* トップページだけ下側の余白を削減 */
body.page-id-18 .dandan-site {
    padding-bottom: 0 !important;
}
/* トップページのフッター下余白を解消 */
body.page-id-18 .wp-site-blocks > footer.wp-block-template-part {
    margin-block-end: 0 !important;
    flex-wrap: wrap
}
/* Hero heading: keep the intended line break without forcing overflow. */
@media (min-width: 768px) {
    .dandan-home .dandan-hero-copy {
        min-width: 0;
        padding: clamp(18px, 3vw, 36px);
    }
    .dandan-home .dandan-hero-copy h1 {
        max-width: 100%;
        font-size: clamp(1.65rem, 3vw, 2.6rem);
        line-height: 1.35;
        letter-spacing: 0.01em;
        white-space: normal;
        overflow-wrap: normal;
        word-break: normal;
    }
}


/* Homepage page 18: release the theme's constrained content width.
   The inner .dandan-home wrapper keeps its own 1240px maximum. */
body.page-id-18 main#wp--skip-link--target {
    width: 100%;
    max-width: none !important;
    margin-inline: 0 !important;
}
body.page-id-18 main#wp--skip-link--target > .wp-block-post-content {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
}
body.page-id-18 main#wp--skip-link--target > .wp-block-post-content.is-layout-constrained > .dandan-home {
    display: block;
    width: 100% !important;
    max-width: 1240px !important;
    margin-inline: auto !important;
    box-sizing: border-box;
}