/* ==========================================================================
   Seiko MarketDev CMS Theme — theme.css
   Scoped under body.seiko-cms to avoid conflicts with any WP admin styles.
   ========================================================================== */

/* common.css resets html to 100% (16px browser default), but rem units in
   this theme are designed around a 10px base. Setting 62.5% restores
   1rem = 10px so all rem values compute to their intended pixel sizes. */
html { font-size: 62.5%; }

/* --------------------------------------------------------------------------
   Header: right-align enquiry button (no nav items in CMS header)
   -------------------------------------------------------------------------- */

body.seiko-cms .global-header .menu {
    justify-content: flex-end;
}

/* --------------------------------------------------------------------------
   CMS Footer — copyright only
   -------------------------------------------------------------------------- */

.cms-footer {
    background: #1a2a3a;
    color: #aaa;
    text-align: center;
    padding: 28px 20px;
    margin-top: 60px;
}

.cms-footer small {
    font-size: 1.2rem;
    letter-spacing: 0.03em;
}

/* --------------------------------------------------------------------------
   Layout overrides
   (common.css sets display:flex on some inner wrappers — override for CMS)
   -------------------------------------------------------------------------- */

body.seiko-cms .l-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */

.cms-hero {
    position: relative;
    width: 100%;
    min-height: 300px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@media screen and (min-width: 768px) {
    .cms-hero {
        background-image: url('/images/marketdev/41_Tec-Main-Img01.png');
    }
}

@media screen and (max-width: 767px) {
    .cms-hero {
        background-image: url('/images/marketdev/41_Tec-Main-Img01.png');
    }
}

.cms-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 40, 80, 0.50);
}

.cms-hero__inner {
    position: relative;
    z-index: 1;
    color: #fff;
    padding: 40px 20px;
}

.cms-hero__title {
    font-size: 3.2rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    line-height: 1.3;
    margin-bottom: 12px;
}

.cms-hero__sub {
    font-size: 1.4rem;
    line-height: 1.6;
    opacity: 0.9;
}

@media screen and (max-width: 767px) {
    .cms-hero {
        min-height: 180px;
    }
    .cms-hero__title {
        font-size: 2.2rem;
    }
    .cms-hero__sub {
        font-size: 1.2rem;
    }
}

/* --------------------------------------------------------------------------
   Breadcrumb
   -------------------------------------------------------------------------- */

.cms-breadcrumb {
    background: #f7f8fa;
    border-bottom: 1px solid #e8eaed;
    padding: 18px 20px;
}

.cms-breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: #999;
    letter-spacing: 0.03em;
    line-height: 1.8;
}

.cms-breadcrumb__list li {
    display: flex;
    align-items: center;
}

.cms-breadcrumb__list li::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-top: 1px solid #bbb;
    border-right: 1px solid #bbb;
    transform: rotate(45deg);
    margin: 0 12px;
}

.cms-breadcrumb__list li:last-child::after {
    display: none;
}

.cms-breadcrumb__list li a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.cms-breadcrumb__list li a:hover {
    color: #008cd6;
}

.cms-breadcrumb__list li.current {
    color: #333;
    max-width: 350px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media screen and (max-width: 767px) {
    .cms-breadcrumb {
        padding: 14px 16px;
    }
    .cms-breadcrumb__list {
        font-size: 1.1rem;
    }
    .cms-breadcrumb__list li::after {
        margin: 0 8px;
        width: 5px;
        height: 5px;
    }
    .cms-breadcrumb__list li.current {
        max-width: 180px;
    }
}

/* --------------------------------------------------------------------------
   Intro Text
   -------------------------------------------------------------------------- */

.cms-intro {
    padding: 20px 20px 30px;
}

.cms-intro p {
    font-size: 1.4rem;
    line-height: 1.8;
    color: #555;
}

/* --------------------------------------------------------------------------
   Filter Bar — Keyence-style redesign
   -------------------------------------------------------------------------- */

.cms-filter {
    padding: 28px 0;
    background: #f5f6f8;
    border-top: 1px solid #e0e4ea;
    border-bottom: 1px solid #e0e4ea;
    margin-top: 40px;
    margin-bottom: 40px;
}

.cms-filter .l-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cms-filter__form {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* "検索種別" label */
.cms-filter__label {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
    letter-spacing: 0.03em;
}

/* Category dropdown */
.cms-filter__cat {
    position: relative;
    flex: 0 0 320px;
}

.cms-filter__cat select {
    width: 100%;
    height: 48px;
    padding: 0 36px 0 14px;
    font-size: 1.4rem;
    font-family: inherit;
    color: #333;
    background: #fff;
    border: 1.5px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s;
}

.cms-filter__cat select:focus {
    outline: none;
    border-color: #008cd6;
}

.cms-filter__cat-arrow {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #008cd6;
    pointer-events: none;
}

/* Keyword search input */
.cms-filter__search {
    position: relative;
    flex: 1;
}

.cms-filter__search input {
    width: 100%;
    height: 48px;
    padding: 0 52px 0 16px;
    font-size: 1.4rem;
    font-family: inherit;
    color: #333;
    background: #fff;
    border: 1.5px solid #ccc;
    border-radius: 4px;
    transition: border-color 0.2s;
}

.cms-filter__search input:focus {
    outline: none;
    border-color: #008cd6;
}

.cms-filter__search input::placeholder {
    color: #aaa;
}

.cms-filter__search-btn {
    position: absolute;
    right: 0;
    top: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    color: #008cd6;
    transition: color 0.2s;
}

.cms-filter__search-btn:hover {
    color: #005f9e;
}

/* Active filter tags — same row as dropdown, right-aligned */
.cms-filter__active {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}

.cms-filter__tag {
    display: inline-block;
    font-size: 1.2rem;
    background: #e8f4fd;
    color: #008cd6;
    border: 1px solid #b3d9f5;
    border-radius: 20px;
    padding: 3px 12px;
}

.cms-filter__clear {
    font-size: 1.2rem;
    color: #999;
    text-decoration: underline;
    cursor: pointer;
}

.cms-filter__clear:hover {
    color: #333;
}

/* SP: stack vertically */
@media screen and (max-width: 767px) {
    .cms-filter {
        padding: 20px 0;
    }
    .cms-filter .l-inner {
        flex-wrap: wrap;
    }
    .cms-filter__label {
        display: none;
    }
    .cms-filter__form {
        width: 100%;
    }
    .cms-filter__cat {
        flex: 1;
    }
    .cms-filter__active {
        margin-left: 0;
        margin-top: 8px;
    }
}

/* --------------------------------------------------------------------------
   Child Category Buttons
   -------------------------------------------------------------------------- */

.cms-cat-buttons {
    padding: 20px 0 0;
    background: #f5f6f8;
    border-bottom: 1px solid #e0e4ea;
    margin-bottom: 40px;
}

.cms-cat-buttons .l-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 20px;
}

.cms-cat-btn {
    display: inline-block;
    padding: 8px 22px;
    font-size: 1.3rem;
    font-family: inherit;
    color: #555;
    background: #fff;
    border: 1.5px solid #ccc;
    border-radius: 20px;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.cms-cat-btn:hover {
    background: #008cd6;
    color: #fff;
    border-color: #008cd6;
}

.cms-cat-btn.is-active {
    background: #008cd6;
    color: #fff;
    border-color: #008cd6;
    font-weight: 700;
}

@media screen and (max-width: 767px) {
    .cms-cat-buttons {
        padding: 14px 0 0;
    }
    .cms-cat-buttons .l-inner {
        gap: 8px;
        padding-bottom: 14px;
    }
    .cms-cat-btn {
        font-size: 1.2rem;
        padding: 7px 16px;
    }
}

/* --------------------------------------------------------------------------
   Article Grid
   -------------------------------------------------------------------------- */

.cms-articles {
    padding: 0 20px 40px;
}

.cms-results-count {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 24px;
}

.cms-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

@media screen and (max-width: 767px) {
    .cms-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Article Card */
.cms-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.cms-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}

.cms-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.cms-card__image {
    width: 100%;
    aspect-ratio: 1200 / 630;
    overflow: hidden;
    background: #f5f6f8;
}

.cms-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.3s;
}

.cms-card:hover .cms-card__image img {
    transform: scale(1.03);
}

.cms-card__body {
    padding: 14px 16px 18px;
}

.cms-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 8px;
}

.cms-card__date {
    font-size: 1.15rem;
    color: #888;
    white-space: nowrap;
}

.cms-card__cat {
    font-size: 1.05rem;
    color: #008cd6;
    background: #e8f4fd;
    border-radius: 3px;
    padding: 2px 8px;
    white-space: nowrap;
    word-break: keep-all;
}

.cms-card__title {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.55;
    color: #333;
}

/* --------------------------------------------------------------------------
   Load More Button
   -------------------------------------------------------------------------- */

.cms-loadmore {
    text-align: center;
    margin-top: 40px;
    padding-bottom: 20px;
}

.cms-loadmore__btn {
    display: inline-block;
    min-width: 200px;
    padding: 14px 40px;
    font-size: 1.5rem;
    font-family: inherit;
    color: #333;
    border: 2px solid #333;
    border-radius: 2px;
    background: #fff;
    cursor: pointer;
    letter-spacing: 0.05em;
    transition: background 0.2s, color 0.2s;
    position: relative;
}

.cms-loadmore__btn:hover {
    background: #333;
    color: #fff;
}

.cms-loadmore__btn.is-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: cms-spin 0.6s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes cms-spin {
    to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   No Results
   -------------------------------------------------------------------------- */

.cms-no-results {
    text-align: center;
    padding: 60px 20px;
}

.cms-no-results p {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.7;
}

.cms-no-results__back {
    display: inline-block;
    margin-top: 20px;
    font-size: 1.4rem;
    color: #008cd6;
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   CTA Section
   -------------------------------------------------------------------------- */

.cms-cta {
    padding: 40px 20px 60px;
    text-align: center;
}

.cms-cta .l-border-button {
    height: 45px;
    font-size: 15px;
}

/* --------------------------------------------------------------------------
   Single Article Page
   -------------------------------------------------------------------------- */


.cms-single {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 50px;
    align-items: start;
    padding: 30px 20px 60px;
}

@media screen and (max-width: 1099px) {
    .cms-single {
        grid-template-columns: 1fr 260px;
        gap: 30px;
    }
}

@media screen and (max-width: 767px) {
    .cms-single {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 20px 20px 40px;
    }
}

/* Main content */
.cms-single__featured {
    width: 100%;
    margin-bottom: 24px;
    border-radius: 4px;
    overflow: hidden;
}

.cms-single__featured img {
    width: 100%;
    height: auto;
    display: block;
}

.cms-single__header {
    margin-bottom: 30px;
}

.cms-single__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.cms-single__date {
    font-size: 1.3rem;
    color: #888;
}

.cms-single__cat {
    font-size: 1.2rem;
    color: #008cd6;
    background: #e8f4fd;
    border-radius: 3px;
    padding: 3px 10px;
    text-decoration: none;
}

.cms-single__title {
    font-size: 3.2rem;
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a2e;
    margin-bottom: 14px;
}

.cms-single__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cms-single__tag {
    font-size: 1.2rem;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 2px 10px;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}

.cms-single__tag:hover {
    border-color: #008cd6;
    color: #008cd6;
}

/* WordPress font size preset classes (theme.json slugs → has-*-px-font-size) */
.has-12-px-font-size { font-size: 12px !important; }
.has-16-px-font-size { font-size: 16px !important; }
.has-18-px-font-size { font-size: 18px !important; }
.has-20-px-font-size { font-size: 20px !important; }
.has-24-px-font-size { font-size: 24px !important; }
.has-28-px-font-size { font-size: 28px !important; }
.has-32-px-font-size { font-size: 32px !important; }

/* WordPress legacy font size classes (old named slugs → map to current design values) */
.has-small-font-size  { font-size: 12px !important; }
.has-medium-font-size { font-size: 16px !important; }
.has-large-font-size  { font-size: 24px !important; }
.has-x-large-font-size { font-size: 32px !important; }
.has-huge-font-size   { font-size: 32px !important; }

/* Article body typography */
.cms-single__body {
    font-size: 1.6rem;
    line-height: 1.9;
    color: #333;
}

.cms-single__body small {
    font-size: 1.2rem;
    color: #888;
}

.cms-single__body h2 {
    font-size: 2.4rem;
    font-weight: 700;
    color: #1a1a2e;
    border-left: 4px solid #008cd6;
    padding-left: 14px;
    margin: 40px 0 16px;
    line-height: 1.4;
}

.cms-single__body h3 {
    font-size: 2.0rem;
    font-weight: 700;
    color: #333;
    margin: 30px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e0e4ea;
    line-height: 1.4;
}

.cms-single__body p {
    margin-bottom: 1.6em;
}

.cms-single__body ul,
.cms-single__body ol {
    margin: 0 0 1.6em 2em;
}

.cms-single__body li {
    margin-bottom: 0.5em;
    list-style: disc;
}

.cms-single__body ol li {
    list-style: decimal;
}

.cms-single__body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 20px 0;
}

.cms-single__body a {
    color: #008cd6;
    text-decoration: underline;
}

.cms-single__body blockquote {
    border-left: 4px solid #ddd;
    margin: 20px 0;
    padding: 14px 20px;
    background: #f9f9f9;
    color: #555;
    font-style: italic;
}

.cms-single__body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 1.4rem;
}

.cms-single__body th,
.cms-single__body td {
    border: 1px solid #ddd;
    padding: 10px 14px;
    text-align: left;
    line-height: 1.6;
}

.cms-single__body th {
    background: #f0f4f8;
    font-weight: 700;
}

/* Page links (multi-page posts) */
.cms-single__page-links {
    margin: 30px 0;
    font-size: 1.4rem;
}

/* --------------------------------------------------------------------------
   WordPress block editor formatting
   common.css resets font:inherit on all elements, so inline semantic styles
   and block formatting must be explicitly declared here.
   -------------------------------------------------------------------------- */

/* Inline: Bold / Italic / Strikethrough / Underline */
.cms-single__body strong,
.cms-single__body b { font-weight: 700; }

.cms-single__body em,
.cms-single__body i { font-style: italic; }

.cms-single__body s,
.cms-single__body del { text-decoration: line-through; }

.cms-single__body u { text-decoration: underline; }

/* Inline: Highlight */
.cms-single__body mark {
    background-color: #fff0a0;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

/* Inline: Code / Keyboard */
.cms-single__body code,
.cms-single__body kbd {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9em;
    background: #f0f4f8;
    padding: 2px 6px;
    border-radius: 3px;
}
.cms-single__body kbd {
    border: 1px solid #ccc;
}

/* Inline: Superscript / Subscript */
.cms-single__body sup {
    vertical-align: super;
    font-size: 0.75em;
}
.cms-single__body sub {
    vertical-align: sub;
    font-size: 0.75em;
}

/* Headings H4 / H5 / H6 */
.cms-single__body h4 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin: 24px 0 10px;
    line-height: 1.4;
}
.cms-single__body h5 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #333;
    margin: 20px 0 8px;
    line-height: 1.4;
}
.cms-single__body h6 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #555;
    margin: 16px 0 8px;
    line-height: 1.4;
}

/* Separator */
.cms-single__body hr,
.cms-single__body .wp-block-separator {
    border: none;
    border-top: 1px solid #ddd;
    margin: 32px 0;
}
.cms-single__body .wp-block-separator.is-style-wide {
    border-top-width: 2px;
}
.cms-single__body .wp-block-separator.is-style-dots {
    border: none;
    text-align: center;
    line-height: 1;
    height: auto;
}
.cms-single__body .wp-block-separator.is-style-dots::before {
    content: "···";
    font-size: 2rem;
    letter-spacing: 0.5em;
    color: #bbb;
}

/* Quote block */
.cms-single__body .wp-block-quote {
    border-left: 4px solid #008cd6;
    background: #f7f8fa;
    margin: 24px 0;
    padding: 16px 20px;
    font-style: italic;
}
.cms-single__body .wp-block-quote p {
    margin-bottom: 0.6em;
}
.cms-single__body .wp-block-quote cite {
    display: block;
    font-size: 1.3rem;
    font-style: normal;
    color: #666;
    margin-top: 8px;
}
.cms-single__body .wp-block-quote.is-style-plain {
    border-left: none;
    background: none;
    padding-left: 0;
}

/* Pullquote block */
.cms-single__body .wp-block-pullquote {
    border-top: 3px solid #1a1a2e;
    border-bottom: 3px solid #1a1a2e;
    margin: 32px 0;
    padding: 24px 16px;
    text-align: center;
    font-size: 2.0rem;
    font-style: italic;
}
.cms-single__body .wp-block-pullquote cite {
    display: block;
    font-size: 1.3rem;
    font-style: normal;
    color: #666;
    margin-top: 10px;
}

/* Code block / Preformatted */
.cms-single__body .wp-block-code,
.cms-single__body .wp-block-preformatted {
    background: #1a1a2e;
    color: #e0e6f0;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 1.4rem;
    line-height: 1.7;
    padding: 20px 24px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 24px 0;
}
.cms-single__body .wp-block-code code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    color: inherit;
}

/* Image block */
.cms-single__body .wp-block-image {
    margin: 24px 0;
}
.cms-single__body .wp-block-image figcaption {
    font-size: 1.3rem;
    color: #888;
    text-align: center;
    margin-top: 6px;
}
.cms-single__body .wp-block-image.alignleft {
    float: left;
    margin: 4px 24px 16px 0;
}
.cms-single__body .wp-block-image.alignright {
    float: right;
    margin: 4px 0 16px 24px;
}
.cms-single__body .wp-block-image.aligncenter {
    text-align: center;
}
.cms-single__body .wp-block-image.alignfull img,
.cms-single__body .wp-block-image.alignwide img {
    max-width: 100%;
}
.cms-single__body::after {
    content: "";
    display: table;
    clear: both;
}

/* Button block */
.cms-single__body .wp-block-buttons {
    margin: 24px 0;
}
.cms-single__body .wp-block-button__link {
    display: inline-block;
    padding: 10px 28px;
    background: #008cd6;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1.5rem;
    transition: background 0.2s;
}
.cms-single__body .wp-block-button__link:hover {
    background: #006ba1;
}

/* Mobile TOC placeholder */
.cms-single__toc-mobile {
    margin-bottom: 24px;
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */

.cms-single__sidebar {
    position: sticky;
    top: 90px;
    font-family: 'Noto Sans JP', sans-serif;
}

.sidebar-section {
    margin-bottom: 24px;
    background: #f7f8fa;
    border: 1px solid #e8eaed;
    border-radius: 0;
    overflow: hidden;
}

.sidebar-section__title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: #333;
    background: #e8eaed;
    padding: 12px 18px;
    letter-spacing: 0.06em;
    border-bottom: 2px solid #008cd6;
}

/* TOC */
.sidebar-toc__content {
    padding: 16px 18px;
    font-size: 1.4rem;
    line-height: 2.0;
    background: #fff;
}

.sidebar-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-toc__list li {
    border-bottom: 1px solid #f0f2f5;
    padding: 6px 0;
}

.sidebar-toc__list li:last-child {
    border-bottom: none;
}

.sidebar-toc__list li a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
}

.sidebar-toc__list li a:hover {
    color: #008cd6;
}

.sidebar-toc__placeholder {
    color: #aaa;
    font-size: 1.4rem;
}

/* Related Articles */
.sidebar-related__list {
    padding: 0;
    margin: 0;
    list-style: none;
    background: #fff;
}

.sidebar-related__item {
    border-bottom: 1px solid #f0f2f5;
}

.sidebar-related__item:last-child {
    border-bottom: none;
}

.sidebar-related__link {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 18px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.sidebar-related__link:hover {
    background: #f0f4f8;
}

.sidebar-related__thumb {
    flex: 0 0 100px;
    width: 100px;
    border-radius: 2px;
    overflow: hidden;
}

.sidebar-related__thumb img {
    display: block;
    width: 100%;
    height: auto;
}

.sidebar-related__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
}

.sidebar-related__title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.6;
    color: #444;
}

.sidebar-related__date {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.3rem;
    color: #999;
    letter-spacing: 0.03em;
}

/* Category List */
.sidebar-cats__list {
    padding: 0;
    margin: 0;
    list-style: none;
    background: #fff;
}

.sidebar-cats__item {
    border-bottom: 1px solid #f0f2f5;
    padding: 0;
    font-size: 1.4rem;
}

.sidebar-cats__item:last-child {
    border-bottom: none;
}

.sidebar-cats__item a {
    font-family: 'Noto Sans JP', sans-serif;
    color: #555;
    text-decoration: none;
    display: block;
    padding: 12px 18px;
    transition: color 0.2s, background 0.15s;
    letter-spacing: 0.03em;
}

.sidebar-cats__item a:hover {
    color: #008cd6;
    background: #f0f4f8;
}

/* SP: sidebar goes below main content */
@media screen and (max-width: 767px) {
    .cms-single__sidebar {
        position: static;
        margin-top: 40px;
    }
    .sidebar-toc {
        display: none;
    }
    .cms-single__title {
        font-size: 3.2rem;
    }
    .cms-single__body {
        font-size: 1.6rem;
    }
    .cms-single__body h2 {
        font-size: 2.4rem;
    }
    .cms-single__body h3 {
        font-size: 2.0rem;
    }
    .cms-single__body small {
        font-size: 1.2rem;
    }
}

/* --------------------------------------------------------------------------
   404 Page
   -------------------------------------------------------------------------- */

.cms-404 {
    text-align: center;
    padding: 80px 20px;
}

.cms-404__title {
    font-size: 4.0rem;
    font-weight: 600;
    color: #1a3a5c;
    margin-bottom: 24px;
}

.cms-404__msg {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.7;
}

.cms-404__actions {
    margin-top: 30px;
}

.cms-404__btn {
    display: inline-block;
    padding: 14px 40px;
    font-size: 1.5rem;
    color: #fff;
    background: #008cd6;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s;
}

.cms-404__btn:hover {
    background: #006fb0;
}

/* --------------------------------------------------------------------------
   Easy Table of Contents plugin — style overrides within article body
   -------------------------------------------------------------------------- */

.ez-toc-container {
    background: #f7f8fa;
    border: 1px solid #e0e4ea;
    border-radius: 4px;
    padding: 16px 20px;
    margin: 24px 0;
}

.ez-toc-title-container .ez-toc-title {
    font-size: 1.4rem;
    font-weight: 700;
}

.ez-toc-list {
    font-size: 1.3rem;
    line-height: 1.8;
    margin-left: 1.5em !important;
}

.ez-toc-list li {
    list-style: disc !important;
}

.ez-toc-list a {
    color: #008cd6 !important;
    text-decoration: none !important;
}

.ez-toc-list a:hover {
    text-decoration: underline !important;
}
