/*
Theme Name: Toy Farm 2025
Author: Mikiya Yajima
Description: Reactベースの自社用オリジナルテーマ (Tailwind CSS + Gutenberg対応)
Version: 1.1.0
*/

/* -----------------------------------------------------------------
   1. Imports & Variables
   ----------------------------------------------------------------- */
/* CSS Variables (Tailwind Shim) */
:root {
    --color-slate-900: #0f172a;
    --color-slate-700: #334155;
    --color-slate-600: #475569;
    --color-slate-500: #64748b;
    --color-slate-200: #e2e8f0;
    --color-slate-50:  #f8fafc;
    
    --color-brand-orange: #E8A437;
    --color-brand-blue:   #126AB1;
    --color-brand-yellow: #FBE34B;
}

/* -----------------------------------------------------------------
   2. Base Settings
   ----------------------------------------------------------------- */
body,
.editor-styles-wrapper {
    font-family: "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
    font-feature-settings: "palt";
}

.writing-vertical-rl { writing-mode: vertical-rl; }

/* -----------------------------------------------------------------
   3. Utilities & Animations
   ----------------------------------------------------------------- */
/* Reveal Animations */
.reveal-text-mask { overflow: hidden; display: block; }
.reveal-text-content { transform: translateY(100%); opacity: 0; transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 1s cubic-bezier(0.16, 1, 0.3, 1); display: block; }
.reveal-text-mask.is-visible .reveal-text-content { transform: translateY(0); opacity: 1; }

.reveal-image-container { position: relative; overflow: hidden; }
.reveal-image-cover { position: absolute; inset: 0; background-color: #fff; z-index: 20; transform: translateX(0); transition: transform 0.7s ease-in-out; }
.reveal-image-img { transform: scale(1.1); transition: transform 1.5s ease-out; width: 100%; height: 100%; object-fit: cover; }
.reveal-image-container.is-visible .reveal-image-cover { transform: translateX(100%); }
.reveal-image-container.is-visible .reveal-image-img { transform: scale(1.0); }

/* Utility Classes */
.clip-circle-0 { clip-path: circle(0% at 100% 0); pointer-events: none; }
.clip-circle-full { clip-path: circle(150% at 100% 0); pointer-events: auto; }

.mobile-menu-item { transform: translateY(100%); opacity: 0; transition: transform 0.5s ease-out, transform 0.8s ease-out; }
.mobile-menu-item.is-visible { transform: translateY(0); opacity: 1; }

.fade-up { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

.marker-bg { transform: scaleX(0); transform-origin: left; transition: transform 0.7s ease-out; }
.marker-bg.visible { transform: scaleX(1); }

.news-item:hover .news-arrow { transform: translateX(4px); color: #E8A437; }

.marker-brand { background: linear-gradient(transparent 60%, rgba(251, 227, 75, 0.5) 60%); display: inline; }
.marker-brand-light { background: linear-gradient(transparent 65%, rgba(251, 227, 75, 0.2) 65%); padding: 0 0.1em; }

.service-list-icon::before { content: ''; display: inline-block; width: 6px; height: 6px; background-color: #E8A437; border-radius: 50%; margin-right: 0.75rem; margin-top: 0.6em; flex-shrink: 0; }
.service-list-dot { list-style: none; padding-left: 0; }
.service-list-dot li { position: relative; padding-left: 1.5rem; line-height: 2; margin-bottom: 0.5rem; }
.service-list-dot li::before { content: '●'; position: absolute; left: 0; top: 0; color: #E8A437; font-size: 0.6rem; line-height: 3.3; }

/* -----------------------------------------------------------------
   4. Core Blocks
   ----------------------------------------------------------------- */

/* --- Headings --- */
body .cms-content h2, body .wp-block-heading h2, 
.editor-styles-wrapper h2.wp-block-heading, 
.editor-styles-wrapper .wp-block-post-title { 
    font-family: "Noto Serif JP", serif !important;
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 4rem;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
    line-height: 1.4;
}

body .cms-content h3, body .wp-block-heading h3, 
.editor-styles-wrapper h3.wp-block-heading {
    font-size: 1.375rem;
    font-weight: 700;
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 4px solid #E8A437;
    color: #0f172a;
    line-height: 1.5;
}

body .cms-content h4, body .wp-block-heading h4, 
.editor-styles-wrapper h4.wp-block-heading {
    font-size: 1.125rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #0f172a;
}
body .cms-content h4::before, body .wp-block-heading h4::before, 
.editor-styles-wrapper h4.wp-block-heading::before {
    content: ''; display: inline-block; width: 0.5rem; height: 0.5rem;
    background-color: #FBE34B; border-radius: 9999px; flex-shrink: 0;
}

/* --- Paragraphs & Strong --- */
body .cms-content p, body .wp-block-paragraph, 
.editor-styles-wrapper p, .editor-styles-wrapper .wp-block-paragraph { 
    font-family: "Noto Sans JP", "Helvetica Neue", Arial, sans-serif !important;
    margin-bottom: 2rem;
    line-height: 2.2;
    color: #475569;
    font-size: 1rem;
    text-align: justify;
}
/* コンポーネント内のPタグリセット */
.cms-content p:not(.has-small-font-size),
.editor-styles-wrapper p:not(.has-small-font-size) {
    margin-bottom: 2rem; 
    line-height: 2.2;
}

body .cms-content strong, body .wp-block-paragraph strong, 
.editor-styles-wrapper p strong {
    background: linear-gradient(transparent 60%, rgba(251, 227, 75, 0.3) 60%);
    font-weight: 700;
    color: #0f172a;
    padding: 0 0.2em;
}

/* --- Lists --- */
body .cms-content ul, body ul.is-style-default, 
.editor-styles-wrapper ul {
    list-style: none; margin-bottom: 2rem; padding-left: 0;
}
body .cms-content ul li, body ul.is-style-default li, 
.editor-styles-wrapper ul li {
    position: relative; padding-left: 1.5rem; margin-bottom: 0.75rem; line-height: 1.8; color: #475569;
}
body .cms-content ul li::before, body ul.is-style-default li::before, 
.editor-styles-wrapper ul li::before {
    content: ''; position: absolute; left: 0.5rem; top: 0.8rem;
    width: 0.375rem; height: 0.375rem; background-color: #126AB1; border-radius: 50%;
}

body .cms-content ol, body ol.is-style-default,
.editor-styles-wrapper ol {
    list-style: none; counter-reset: cms-counter; margin-bottom: 2rem; padding-left: 0;
}
body .cms-content ol li, body ol.is-style-default li,
.editor-styles-wrapper ol li {
    position: relative; padding-left: 2.5rem; margin-bottom: 1rem; line-height: 1.8; color: #475569;
}
body .cms-content ol li::before, body ol.is-style-default li::before,
.editor-styles-wrapper ol li::before {
    counter-increment: cms-counter; content: counter(cms-counter);
    position: absolute; left: 0; top: 0; width: 1.5rem; height: 1.5rem;
    background-color: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 50%;
    font-size: 0.75rem; font-weight: 700; color: #0f172a;
    display: flex; align-items: center; justify-content: center; font-family: monospace;
}

/* --- Checklist (Toy Farm Style) --- */
body ul.is-style-toyfarm-checklist,
.editor-styles-wrapper ul.is-style-toyfarm-checklist {
    list-style: none !important;
    padding-left: 0 !important;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 0 !important; 
}
@media (min-width: 768px) {
    body ul.is-style-toyfarm-checklist,
    .editor-styles-wrapper ul.is-style-toyfarm-checklist {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
body ul.is-style-toyfarm-checklist li,
.editor-styles-wrapper ul.is-style-toyfarm-checklist li,
body .toyfarm-checklist-item,
.editor-styles-wrapper .toyfarm-checklist-item {
    background-color: #fff !important;
    padding: 1rem 1rem 1rem 3rem !important;
    border: 1px solid #f3f4f6 !important;
    border-radius: 0.5rem !important;
    position: relative;
    margin-bottom: 0 !important;
    line-height: 1.6;
}
body ul.is-style-toyfarm-checklist li::before,
.editor-styles-wrapper ul.is-style-toyfarm-checklist li::before {
    content: ''; 
    position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
    width: 1.25rem; height: 1.25rem;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23E8A437' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-color: transparent; border: none; border-radius: 0;
    background-size: contain; background-repeat: no-repeat;
}
/* 内部Pタグのリセット */
body .toyfarm-checklist-item p,
.editor-styles-wrapper .toyfarm-checklist-item p {
    margin: 0 !important;
    line-height: 1.5 !important;
}

/* --- Blockquote --- */
body .cms-content blockquote, body .wp-block-quote,
.editor-styles-wrapper blockquote {
    border-left: 4px solid #FBE34B; padding: 1.5rem; font-style: italic; color: #334155;
    background-color: rgba(251, 227, 75, 0.1); margin: 2rem 0; border-radius: 0 0.5rem 0.5rem 0;
}
body .cms-content blockquote p, body .wp-block-quote p,
.editor-styles-wrapper blockquote p {
    font-family: "Noto Serif JP", serif; font-size: 1.125rem; margin-bottom: 0.5rem;
}
body .cms-content blockquote cite, body .wp-block-quote cite,
.editor-styles-wrapper blockquote cite {
    font-size: 0.875rem; color: #64748b; font-style: normal; display: block; text-align: right;
}
/* Brand Quote (Editor Width Fix) */
.editor-styles-wrapper .is-style-toyfarm-brand-quote,
body .is-style-toyfarm-brand-quote,
.editor-styles-wrapper .wp-block-quote.is-style-toyfarm-brand-quote,
.editor-styles-wrapper blockquote.is-style-toyfarm-brand-quote {
    border-left: 4px solid var(--color-brand-yellow);
    padding: 1.5rem 1.5rem 1.5rem 2rem;
    font-style: italic;
    color: var(--color-slate-700);
    background-color: rgba(254, 252, 232, 0.5);
    margin: 2rem 0;
    width: auto !important; /* 全幅強制解除 */
    max-width: 100% !important;
    box-sizing: border-box !important;
    float: none !important;
    display: block !important;
}
.editor-styles-wrapper .is-style-toyfarm-brand-quote p,
body .is-style-toyfarm-brand-quote p {
    font-family: "Noto Serif JP", serif !important;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

/* --- Tables --- */
body .cms-content table, 
body figure.wp-block-table table,
.editor-styles-wrapper figure.wp-block-table table,
.editor-styles-wrapper .wp-block-table table {
    width: 100% !important; 
    border-collapse: collapse !important; 
    margin-bottom: 3rem !important; 
    font-size: 0.95rem !important;
    table-layout: auto !important;
    border: none !important;
}

/* Table Header (th) */
body .cms-content th, 
body figure.wp-block-table th,
body .wp-block-table th,
.editor-styles-wrapper figure.wp-block-table th,
.editor-styles-wrapper .wp-block-table th {
    background-color: #f8fafc !important; /* bg-gray-50 */
    color: #0f172a !important; /* text-slate-900 */
    font-weight: 700 !important;
    padding: 1rem !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid #e2e8f0 !important; /* 薄いグレー */
    text-align: left !important;
    white-space: nowrap !important;
    width: auto !important;
    min-width: 15% !important;
    vertical-align: middle !important;
}

/* Table Data (td) */
body .cms-content td, 
body figure.wp-block-table td,
body .wp-block-table td,
.editor-styles-wrapper figure.wp-block-table td,
.editor-styles-wrapper .wp-block-table td {
    padding: 1rem !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid #f1f5f9 !important; /* さらに薄いグレー */
    color: #475569 !important; /* text-slate-600 */
    vertical-align: middle !important;
}

/* Table Hover & Strong */
body .cms-content tr:hover td,
body figure.wp-block-table tr:hover td,
.editor-styles-wrapper figure.wp-block-table tr:hover td,
.editor-styles-wrapper .wp-block-table tr:hover td {
    background-color: rgba(251, 227, 75, 0.3) !important;
    transition: background-color 0.3s;
}
body .cms-content td strong,
body figure.wp-block-table td strong,
.editor-styles-wrapper figure.wp-block-table td strong,
.editor-styles-wrapper .wp-block-table td strong {
    color: #1e293b !important;
    font-weight: 500 !important;
}

/* --- Accordion (Details) --- */
body .cms-content details, body .wp-block-details,
.editor-styles-wrapper details {
    background-color: #fff; border: 1px solid #e2e8f0; border-radius: 0.5rem; margin-bottom: 1rem; overflow: hidden;
}

/* Summary (Q部分) */
body .cms-content summary, body .wp-block-details summary,
.editor-styles-wrapper summary {
    padding: 1.25rem 1.5rem !important;
    font-weight: 700; cursor: pointer; background-color: #f8fafc;
    list-style: none !important; position: relative;
    display: flex !important; align-items: center !important; 
    justify-content: flex-start !important; /* 左寄せ */
}
body .cms-content summary::-webkit-details-marker,
.editor-styles-wrapper summary::-webkit-details-marker { display: none; }

/* Q Icon */
body .cms-content summary::before, body .wp-block-details summary::before,
.editor-styles-wrapper summary::before {
    content: 'Q.'; color: #E8A437 !important; 
    font-family: sans-serif; font-weight: 800;
    margin-right: 0.75rem !important;
}

/* Open/Close Icon (Right aligned) */
body .cms-content summary::after, body .wp-block-details summary::after,
.editor-styles-wrapper summary::after {
    content: '' !important;
    width: 1.5rem; height: 1.5rem;
    margin-left: auto !important; /* 右端へ */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: center;
    transform: rotate(0deg); transition: transform 0.3s ease;
}
body .cms-content details[open] summary::after, body .wp-block-details[open] summary::after,
.editor-styles-wrapper details[open] summary::after {
    transform: rotate(180deg) !important;
}

/* Content Area (A部分) */
body .cms-content details[open] .wp-block-group, body .cms-content details[open] > *:not(summary),
.editor-styles-wrapper details[open] .wp-block-group, .editor-styles-wrapper details[open] > *:not(summary) {
    padding: 1.25rem; border-top: 1px solid #f1f5f9; color: #475569;
}
/* 内部Pタグリセット */
body details.toyfarm-accordion .wp-block-group > p,
body details.toyfarm-accordion .wp-block-group > .wp-block-paragraph,
body details.toyfarm-accordion .wp-block-group > p:last-child,
body details.toyfarm-accordion[open] .wp-block-group p,
.editor-styles-wrapper details.toyfarm-accordion .wp-block-group > p,
.editor-styles-wrapper details.toyfarm-accordion .wp-block-group > p:last-child,
.editor-styles-wrapper details.toyfarm-accordion[open] .wp-block-group p { 
    margin-bottom: 0 !important;
    line-height: 1.6 !important;
    font-size: 1rem;
}
details.toyfarm-accordion .wp-block-group > *:last-child {
    margin-bottom: 0 !important;
}

/* --- Buttons --- */
.wp-block-button__link,
.editor-styles-wrapper .wp-block-button__link {
    border-radius: 2px; font-weight: 700; letter-spacing: 0.1em; padding: 1rem 2.5rem; transition: all 0.3s;
}
/* Fill Style */
.is-style-fill .wp-block-button__link, .wp-block-button__link:not(.is-style-outline),
.editor-styles-wrapper .is-style-fill .wp-block-button__link, .editor-styles-wrapper .wp-block-button__link:not(.is-style-outline) {
    background-color: #126AB1; color: white; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.is-style-fill .wp-block-button__link:hover, .wp-block-button__link:not(.is-style-outline):hover,
.editor-styles-wrapper .is-style-fill .wp-block-button__link:hover, .editor-styles-wrapper .wp-block-button__link:not(.is-style-outline):hover {
    background-color: #E8A437; transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
/* Outline Style */
.is-style-outline .wp-block-button__link,
.editor-styles-wrapper .is-style-outline .wp-block-button__link {
    background-color: white; border: 1px solid #e2e8f0; color: #0f172a;
}
.is-style-outline .wp-block-button__link:hover,
.editor-styles-wrapper .is-style-outline .wp-block-button__link:hover {
    border-color: #94a3b8; background-color: #f8fafc;
}
/* Pill Arrow Style */
.is-style-toyfarm-arrow-pill .wp-block-button__link {
    background-color: #126AB1; color: white;
    font-weight: 700; font-size: 0.875rem; letter-spacing: 0.1em; 
    border-radius: 9999px; padding: 1rem 2rem;
    display: inline-flex; align-items: center; gap: 0.75rem; 
    transition: all 0.3s; transform: none; 
}
.is-style-toyfarm-arrow-pill .wp-block-button__link:hover {
    background-color: #E8A437; transform: translateY(-4px); 
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.is-style-toyfarm-arrow-pill .wp-block-button__link::after {
    content: ''; display: block; width: 0; height: 0;
    border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 10px solid white;
    margin-left: -0.25rem;
}
/* Text Link Arrow Style */
.is-style-toyfarm-text-arrow {
    margin: 0 !important; box-shadow: none !important; background: none !important;
}
.is-style-toyfarm-text-arrow .wp-block-button__link {
    background: transparent !important; border: none !important;
    color: #0f172a !important; font-weight: 700;
    padding: 0.75rem 1.5rem !important; box-shadow: none !important; 
    transition: all 0.3s; display: inline-flex; align-items: center; gap: 0.5rem; 
}
.is-style-toyfarm-text-arrow .wp-block-button__link:hover {
    color: #E8A437 !important; transform: none;
    box-shadow: none !important; background-color: transparent !important; border-color: transparent !important;
}
.is-style-toyfarm-text-arrow .wp-block-button__link::after {
    content: ''; display: inline-block; width: 1.5rem; height: 1.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3Cpolyline points='12 5 19 12 12 19'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat; background-size: contain; transition: transform 0.3s;
}
.is-style-toyfarm-text-arrow .wp-block-button__link:hover::after {
    transform: translateX(4px); 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E8A437' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3Cpolyline points='12 5 19 12 12 19'%3E%3C/polyline%3E%3C/svg%3E");
}
/* Alignment Utility */
.wp-block-buttons.is-style-toyfarm-align-sp-center-pc-left {
    display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; 
}
@media (min-width: 768px) {
    .wp-block-buttons.is-style-toyfarm-align-sp-center-pc-left { justify-content: flex-start; }
}

/* --- File Block (Download Card) --- */
body .wp-block-file.is-style-toyfarm-download-card {
    border: none !important; background: none !important; margin-bottom: 2rem !important; display: block !important; padding: 0 !important;
}
body .wp-block-file.is-style-toyfarm-download-card .wp-block-file__button {
    display: none !important;
}
body .wp-block-file.is-style-toyfarm-download-card a:not(.wp-block-file__button) {
    display: flex !important; align-items: center !important; padding: 1.5rem !important;
    background-color: #fff !important; border: 1px solid #e2e8f0 !important; border-radius: 0.5rem !important;
    text-decoration: none !important; color: #0f172a !important; font-weight: 700 !important;
    transition: all 0.3s; width: 100% !important; box-sizing: border-box !important;
    position: relative !important; line-height: 1.4 !important; min-height: 5rem !important; padding-right: 3rem !important; 
}
body .wp-block-file.is-style-toyfarm-download-card a:not(.wp-block-file__button):hover {
    border-color: #126AB1 !important; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
    color: #126AB1 !important; background-color: #fff !important;
}
body .wp-block-file.is-style-toyfarm-download-card a:not(.wp-block-file__button)::before {
    content: '' !important; display: block !important; width: 3rem !important; height: 3rem !important; 
    margin-right: 1rem !important; flex-shrink: 0 !important; background-color: #f3f4f6 !important; 
    border-radius: 0.25rem !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'%3E%3C/path%3E%3Cpolyline points='14 2 14 8 20 8'%3E%3C/polyline%3E%3Cline x1='16' y1='13' x2='8' y2='13'%3E%3Cline x1='16' y1='17' x2='8' y2='17'%3E%3Cpolyline points='10 9 9 9 8 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important; background-position: center !important; background-size: 1.5rem !important; transition: all 0.3s;
}
body .wp-block-file.is-style-toyfarm-download-card a:not(.wp-block-file__button):hover::before {
    background-color: rgba(18, 106, 177, 0.1) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23126AB1' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'%3E%3C/path%3E%3Cpolyline points='14 2 14 8 20 8'%3E%3C/polyline%3E%3Cline x1='16' y1='13' x2='8' y2='13'%3E%3Cline x1='16' y1='17' x2='8' y2='17'%3E%3Cpolyline points='10 9 9 9 8 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
}
body .wp-block-file.is-style-toyfarm-download-card a:not(.wp-block-file__button)::after {
    content: '' !important; display: block !important; width: 1.25rem !important; height: 1.25rem !important;
    margin-left: auto !important; flex-shrink: 0 !important; position: absolute !important; right: 1.5rem !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'%3E%3C/path%3E%3Cpolyline points='7 10 12 15 17 10'%3E%3C/polyline%3E%3Cline x1='12' y1='15' x2='12' y2='3'%3E%3C/line%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important; background-position: center !important; background-size: contain !important; transition: all 0.3s;
}
body .wp-block-file.is-style-toyfarm-download-card a:not(.wp-block-file__button):hover::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E8A437' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'%3E%3C/path%3E%3Cpolyline points='7 10 12 15 17 10'%3E%3C/polyline%3E%3Cline x1='12' y1='15' x2='12' y2='3'%3E%3C/line%3E%3C/svg%3E") !important;
}

/* --- Image Block --- */
.wp-block-image.is-style-toyfarm-rounded-shadow img,
.editor-styles-wrapper .wp-block-image.is-style-toyfarm-rounded-shadow img {
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
}

/* --- Video & Embed Block (Rounded Shadow) --- */
.wp-block-embed.is-style-toyfarm-rounded-shadow,
.wp-block-video.is-style-toyfarm-rounded-shadow,
.editor-styles-wrapper .wp-block-embed.is-style-toyfarm-rounded-shadow,
.editor-styles-wrapper .wp-block-video.is-style-toyfarm-rounded-shadow {
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    overflow: hidden; /* iframeの角を切り取るために必須 */
    background-color: #000; /* 読み込み時のチラつき防止 */
}

/* iframeやvideoタグ自体も確実に角丸に追従させる */
.wp-block-embed.is-style-toyfarm-rounded-shadow iframe,
.wp-block-embed.is-style-toyfarm-rounded-shadow video,
.wp-block-video.is-style-toyfarm-rounded-shadow video,
.editor-styles-wrapper .wp-block-embed.is-style-toyfarm-rounded-shadow iframe,
.editor-styles-wrapper .wp-block-video.is-style-toyfarm-rounded-shadow video {
    display: block;
    border-radius: 0.75rem;
}

/* YouTubeなどのキャプション位置調整（任意） */
.wp-block-embed.is-style-toyfarm-rounded-shadow figcaption,
.wp-block-video.is-style-toyfarm-rounded-shadow figcaption {
    margin-top: 0.5rem;
    padding: 0 0.5rem;
}

/* --- Separator --- */
hr.wp-block-separator.is-style-toyfarm-brand-divider,
.editor-styles-wrapper hr.wp-block-separator.is-style-toyfarm-brand-divider {
    height: 2px;
    background: linear-gradient(90deg, #E8A437 0%, #FBE34B 50%, #ffffff 100%);
    opacity: 0.7; border: none;
    margin-top: 4rem !important; margin-bottom: 4rem !important;
    margin-left: auto !important; margin-right: auto !important;
    width: 100%; max-width: 80%; clear: both;
}

/* -----------------------------------------------------------------
   5. Custom Components
   ----------------------------------------------------------------- */

/* --- Info & Alert Boxes --- */
body .is-style-toyfarm-info-box,
.editor-styles-wrapper .is-style-toyfarm-info-box {
    background-color: #eff6ff; border: 1px solid #dbeafe; padding: 1.5rem; border-radius: 0.5rem; margin-bottom: 2rem;
}
body .is-style-toyfarm-info-box p:first-child strong,
.editor-styles-wrapper .is-style-toyfarm-info-box p:first-child strong {
    color: #126AB1; display: block; margin-bottom: 0.5rem; 
    background: linear-gradient(transparent 60%, rgba(251, 227, 75, 0.3) 60%) !important;
    padding: 0 0.2em !important; font-weight: 700; font-family: "Noto Sans JP", sans-serif;
}
body .is-style-toyfarm-alert-box,
.editor-styles-wrapper .is-style-toyfarm-alert-box {
    background-color: #fff7ed; border: 1px solid #ffedd5; padding: 1.5rem; border-radius: 0.5rem; margin-bottom: 2rem;
}
body .is-style-toyfarm-alert-box p:first-child strong,
.editor-styles-wrapper .is-style-toyfarm-alert-box p:first-child strong {
    color: #E8A437; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; 
    background: linear-gradient(transparent 60%, rgba(251, 227, 75, 0.3) 60%) !important;
    padding: 0 0.2em !important; font-family: "Noto Sans JP", sans-serif;
}
body .is-style-toyfarm-alert-box p:first-child strong::before,
.editor-styles-wrapper .is-style-toyfarm-alert-box p:first-child strong::before {
    content: ''; display: block; width: 8px; height: 8px; background-color: #E8A437; border-radius: 50%;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; flex-shrink: 0;
}
/* Box内Pタグリセット */
.is-style-toyfarm-info-box p,
.is-style-toyfarm-alert-box p {
    margin-bottom: 0 !important; line-height: 1.6 !important; font-size: 1rem;
}

/* --- Process Steps --- */
.is-style-toyfarm-process-step {
    position: relative; padding: 1.5rem; background-color: #f8fafc;
    border-radius: 0.5rem; border: 1px solid #f3f4f6; text-align: center; transition: all 0.3s;
}
.is-style-toyfarm-process-step:hover {
    background-color: #fff; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.is-style-toyfarm-process-step.is-highlight {
    background-color: #fefce8; border-color: rgba(251, 227, 75, 0.3);
}
/* Number Circle (Enhanced) */
body .is-style-toyfarm-process-step .process-number,
.editor-styles-wrapper .is-style-toyfarm-process-step .process-number {
    background-color: var(--color-brand-blue) !important;
    color: #ffffff !important;
    width: 3rem !important; height: 3rem !important; margin: 0 auto 1rem !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    border-radius: 50% !important; line-height: 1 !important; padding: 0 !important;
    font-weight: 700; font-size: 1.25rem; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}
.is-style-toyfarm-process-step:hover .process-number { transform: scale(1.1); }

body .is-style-toyfarm-process-step.is-highlight .process-number,
.editor-styles-wrapper .is-style-toyfarm-process-step.is-highlight .process-number {
    background-color: var(--color-brand-orange) !important;
}
/* Arrow (PC Only) */
@media (min-width: 768px) {
    .wp-block-column:not(:last-child) .is-style-toyfarm-process-step::after {
        content: ''; position: absolute; top: 50%; right: -1.25rem;
        width: 1.5rem; height: 1.5rem; background-color: #fff;
        transform: translateY(-50%) rotate(45deg);
        border-top: 1px solid #f3f4f6; border-right: 1px solid #f3f4f6; z-index: 10;
    }
}
.wp-block-column.is-style-toyfarm-process-step p {
    margin-bottom: 0 !important; line-height: 1.6 !important; font-size: 1rem;
}

/* --- Cards (Toy Farm Pattern) --- */
.toyfarm-card-link {
    display: block; text-decoration: none; color: inherit; transition: transform 0.3s;
}
.toyfarm-card-link:hover { color: inherit; }

/* Card Image Wrapper */
body .toyfarm-card-image-wrapper,
.editor-styles-wrapper .toyfarm-card-image-wrapper {
    overflow: hidden; border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem !important; position: relative;
}
.toyfarm-card-image-wrapper img {
    transition: transform 0.5s ease; width: 100%; height: auto; display: block;
}
.toyfarm-card-link:hover .toyfarm-card-image-wrapper img { transform: scale(1.05); }

/* Card Label (Badge) */
body .toyfarm-card-label,
.editor-styles-wrapper .toyfarm-card-label {
    position: absolute; top: 1rem; left: 1rem;
    background-color: var(--color-brand-orange);
    color: #ffffff !important; /* White text forced */
    font-size: 0.75rem !important; font-weight: 700;
    padding: 0.25rem 0.75rem !important; border-radius: 9999px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    z-index: 10; line-height: 1 !important;
}

/* Card Date */
body p.toyfarm-card-date,
.editor-styles-wrapper p.toyfarm-card-date,
body .toyfarm-card-date,
.editor-styles-wrapper .toyfarm-card-date {
    font-size: 0.75rem !important; color: #94a3b8 !important;
    margin-top: 0 !important; margin-bottom: 0.25rem !important;
    display: block !important; line-height: 1.5 !important;
}

/* Card Title */
body h4.toyfarm-card-title,
.editor-styles-wrapper h4.toyfarm-card-title,
.toyfarm-card-title {
    margin-top: 0 !important; margin-bottom: 0.5rem !important;
    font-size: 1rem; font-weight: 700; line-height: 1.5 !important;
    transition: color 0.3s; display: block !important; padding-left: 0 !important;
}
/* Remove default h4 decoration for cards */
body h4.toyfarm-card-title::before,
.editor-styles-wrapper h4.toyfarm-card-title::before {
    content: none !important; display: none !important;
}
.toyfarm-card-link:hover .toyfarm-card-title { color: var(--color-brand-blue); }


/* --- Testimonials (Customer Voice) --- */
/* Main Card Body */
body .toyfarm-testimonial-card,
.editor-styles-wrapper .toyfarm-testimonial-card {
    background-color: #f9fafb !important;
    padding: 2rem !important;
    border-radius: 0.75rem !important;
    border: 1px solid #f3f4f6 !important;
    height: 100%; box-sizing: border-box;
}

/* Header (Avatar + Name) */
.testimonial-header,
body .toyfarm-testimonial-card .testimonial-header,
.editor-styles-wrapper .toyfarm-testimonial-card .testimonial-header {
    display: flex; align-items: center; gap: 1rem;
    margin-bottom: 1.5rem !important;
}

/* Avatar (Fixed Size & Border) */
body .testimonial-avatar,
.editor-styles-wrapper .testimonial-avatar {
    width: 3.5rem !important; height: 3.5rem !important;
    min-width: 3.5rem !important; flex-shrink: 0 !important;
    border-radius: 50% !important; overflow: hidden !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
    margin: 0 !important;
}
body .testimonial-avatar img,
.editor-styles-wrapper .testimonial-avatar img {
    width: 100% !important; height: 100% !important;
    object-fit: cover !important; min-height: 100% !important;
}

/* Name & Title Spacing */
.wp-block-group.testimonial-header strong + span {
    display: block; font-size: 0.75rem; color: var(--color-slate-500);
}
body .testimonial-header .wp-block-group p,
.editor-styles-wrapper .testimonial-header .wp-block-group p {
    margin-bottom: 0 !important; margin-top: 0 !important; line-height: 1.4 !important;
}
body .testimonial-header .wp-block-group p.has-slate-900-color,
.editor-styles-wrapper .testimonial-header .wp-block-group p.has-slate-900-color {
    margin-bottom: 0.25rem !important;
}

/* Speech Bubble (If used separately) */
.is-style-toyfarm-testimonial-bubble {
    position: relative; background-color: #fff; padding: 1.25rem;
    border-radius: 0.5rem; border: 1px solid #f3f4f6;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.is-style-toyfarm-testimonial-bubble::before {
    content: ''; position: absolute; top: -0.5rem; left: 2rem;
    width: 1rem; height: 1rem; background-color: #fff;
    border-top: 1px solid #f3f4f6; border-left: 1px solid #f3f4f6;
    transform: rotate(45deg);
}
.is-style-toyfarm-testimonial-bubble p {
    margin-bottom: 0 !important; line-height: 1.6 !important; font-size: 1rem;
}

/* -----------------------------------------------------------------
   6. Plugins
   ----------------------------------------------------------------- */

/* --- Swiper Slider --- */
.swiper-button-prev, .swiper-button-next { color: #fff !important; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.swiper-pagination-bullet-active { background-color: #E8A437 !important; }
.wp-block-gallery.is-style-toyfarm-slider { display: block !important; }
.wp-block-gallery.is-style-toyfarm-slider .swiper-slide figure { width: 100%; margin: 0; }
.wp-block-gallery.is-style-toyfarm-slider .swiper-slide img { width: 100%; height: 400px; object-fit: cover; border-radius: 0.5rem; }

/* --- Contact Form 7 --- */
.cf7-radio-grid .wpcf7-form-control { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .cf7-radio-grid .wpcf7-form-control { grid-template-columns: repeat(2, 1fr); } }
.cf7-radio-grid .wpcf7-list-item { display: block; margin: 0; }
.cf7-radio-grid label { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; background-color: #fff; border: 1px solid #e5e7eb; border-radius: 0.375rem; cursor: pointer; transition: all 0.2s; width: 100%; box-sizing: border-box; }
.cf7-radio-grid label:hover { background-color: #f9fafb; border-color: #f97316; }
.cf7-radio-grid label:has(input:checked) { background-color: #fff7ed; border-color: #f97316; color: #c2410c; }
.cf7-radio-grid input[type="radio"]:checked + span { color: #c2410c; }
.cf7-radio-grid input[type="radio"] { accent-color: #f97316; }
.cf7-agreement .wpcf7-list-item { margin: 0; }
.cf7-agreement input[type="checkbox"] { width: 1.25rem; height: 1.25rem; margin-right: 0.5rem; accent-color: #f97316; cursor: pointer; }
.wpcf7-spinner { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); }
.wpcf7-not-valid-tip { font-size: 0.75rem; color: #dc2626; margin-top: 0.25rem; }