:root {
    --bg: #F5F5F4;
    --surface: #FFFFFF;
    --text: #334155;
    --blog: #FFA239;
    --blog-sub: #FFE4B1;
    --muted: color-mix(in srgb, var(--text) 68%, var(--bg));
    --line: color-mix(in srgb, var(--text) 12%, var(--surface));
    --side: 336px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
    font-size: 16px;
    line-height: 1.72;
    overflow-wrap: anywhere;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
.skip { position: absolute; left: 16px; top: -100px; padding: 8px 16px; background: var(--surface); z-index: 10; }
.skip:focus { top: 8px; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner {
    width: min(1080px, calc(100% - 48px));
    min-height: 80px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}
.brand { display: block; flex-shrink: 0; width: 268px; max-width: 100%; line-height: 0; }
.brand img { display: block; width: 100%; height: auto; }
.catch { margin: 0; font-size: 12px; line-height: 1.5; font-family: "Hiragino Maru Gothic ProN", Meiryo, sans-serif; }
.catch a { color: var(--blog); text-decoration: none; text-decoration-color: var(--blog); }
.catch a:hover { text-decoration: underline; }

/* Reference: 1080px canvas, three featured articles, then a 712px / 336px split. */
.featured { background: var(--surface); padding: 40px max(24px, calc((100% - 1080px) / 2)); }
.post-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 32px; }
.post-list > li { min-width: 0; }
.post-card { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start; text-decoration: none; }
.post-card img { width: 210px; aspect-ratio: 100 / 57; height: auto; object-fit: cover; display: block; background: var(--bg); }
.post-card h2 { font-size: 18px; line-height: 1.5; font-weight: 700; margin: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.post-card p { display: none; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag { font-size: 14px; line-height: 1.72; padding: 1px 4px; background: var(--blog-sub); border-radius: 5px; font-weight: 400; }
.post-card:hover img, .post-card:hover .tag { opacity: .7; }
.post-card:hover h2, .rank-list a:hover .rank-title { color: var(--muted); }
.featured-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; max-width: 1080px; margin: auto; }
.featured-list .post-card { display: block; }
.featured-list .post-card img { width: 100%; }
.featured-list .post-card h2 { font-size: 24px; line-height: 1.5; margin-top: 16px; }
.featured-list .post-card p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin: 16px 0 0; font-size: 16px; line-height: 1.72; }
.featured-list .tags { margin-top: 16px; }
.layout { position: relative; width: min(1080px, calc(100% - 48px)); margin: 32px auto 80px; display: grid; grid-template-columns: minmax(0, 1fr) var(--side); gap: 32px; align-items: start; }
.layout-home { grid-template-areas: "articles promo" "articles ranking"; grid-template-rows: auto 1fr; }
.layout-home > .content-col { grid-area: articles; }
.layout-home > .promo { grid-area: promo; }
.layout-home > .side-col { grid-area: ranking; }
.content-col { background: var(--surface); padding: 0 24px 40px; min-width: 0; }
.category-groups { display: grid; gap: 12px; margin: 16px 0 0; }
.category-groups dt { font-size: 14px; font-weight: 700; }
.category-groups dd { display: flex; flex-wrap: wrap; column-gap: 16px; margin: 4px 0 0; }
.category-groups a[aria-current="page"] { font-weight: 700; text-decoration: underline; }
.page-intro { margin-bottom: 32px; }
.page-intro h1 { font-size: 16px; font-weight: 400; margin: 0; padding: 16px 0; border-bottom: 1px solid var(--line); }
.page-intro p { font-size: 14px; margin: 16px 0 0; color: var(--muted); }
.guide-links { margin-bottom: 24px; }
.guide-links ul { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding-left: 20px; }
.guide-links a { font-weight: 700; text-underline-offset: 3px; }
.category-guide { margin-bottom: 24px; font-size: 15px; line-height: 1.75; }
.category-guide h2 { font-size: 20px; margin: 28px 0 12px; }
.category-guide p { margin: 0 0 12px; }
.category-guide a { text-decoration-color: var(--blog); text-underline-offset: 3px; }
.category-guide blockquote { margin: 16px 0; padding: 16px; background: var(--bg); border-left: 4px solid var(--blog); }
.category-guide blockquote p:last-child { margin-bottom: 0; }

.share-col { position: absolute; top: 106px; left: -80px; }
.share-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 24px; }
.share-list a, .share-list img { display: block; height: 48px; width: 48px; border-radius: 50%; }
.share-list a:hover { opacity: .8; }
.sheet { min-width: 0; background: var(--surface); border-radius: 10px; padding: 64px 40px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; list-style: none; margin: 0 0 24px; padding: 0; font-size: 14px; }
.crumbs li { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.crumbs a { background: var(--blog-sub); border-radius: 5px; padding: 1px 4px; text-decoration: none; }
.crumbs li:not(:last-child)::after { content: "›"; margin-left: 4px; }
.crumbs a:hover { text-decoration: underline; }
.sheet h1 { font-size: 32px; line-height: 1.362; margin: 0 0 24px; }
.meta { margin: 0 0 24px; color: var(--muted); font-size: 12px; text-align: right; }
.hero { margin: 0 0 32px; }
.hero img { width: 100%; height: auto; display: block; }
.toc { background: var(--bg); border-radius: 5px; padding: 24px; margin: 32px 0; }
.toc p { margin: 0; font-weight: 700; }
.toc ol { padding-left: 20px; margin: 12px 0 0; }
.toc li + li { margin-top: 12px; }
.toc a { text-underline-offset: 3px; }
.post-body h2 { font-size: 24px; line-height: 1.5; font-weight: 700; margin: 96px 0 24px; padding-left: 20px; border-left: 4px solid var(--blog); scroll-margin-top: 24px; }
.post-body p { margin: 24px 0; font-size: 16px; line-height: 1.72; }
.post-body a { text-decoration-color: var(--blog); text-underline-offset: 3px; }
.post-body a:hover { text-decoration: none; }
.post-body blockquote { background: var(--bg); margin: 40px 0 24px; padding: 32px; border-radius: 5px; }
.post-body blockquote p { margin: 0; }
.post-body blockquote p + p { margin-top: 16px; }
.post-body .post-image { margin: 40px 0; padding: 0; border: 0; background: none; }
.post-image img { display: block; width: 100%; height: auto; }
.post-image figcaption { margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.72; text-align: center; }
.cta { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-items: center; gap: 28px; margin: 64px 0 32px; padding-top: 32px; border-top: 1px solid var(--line); }
.cta-image { display: block; width: 100%; height: auto; }
.cta-content { min-width: 0; }
.cta h2 { margin: 0 0 12px; font-size: 22px; line-height: 1.5; }
.cta p { margin: 0 0 20px; font-size: 14px; line-height: 1.8; }
.cta .button { margin: 0; }
.button { display: block; width: min(320px, 100%); margin: 16px auto 0; text-align: center; background: var(--blog); border-radius: 5px; padding: 12px 16px; font-weight: 700; line-height: 1.5; text-decoration: none; }
.button:hover { background: color-mix(in srgb, var(--blog) 85%, var(--text)); }
.related { margin-top: 64px; }
.related > h2 { font-size: 18px; line-height: 1.5; border-bottom: 1px solid var(--line); margin: 0 0 24px; padding-bottom: 16px; }
.related .post-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.related .post-card { display: block; }
.related .post-card img { width: 100%; }
.related .post-card h2 { font-size: 16px; margin-top: 12px; }

.side-col { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.promo, .side-card { background: var(--surface); border-radius: 5px; }
.promo .side-heading, .side-card > h2 { font-size: 16px; font-weight: 400; line-height: 1.72; padding: 16px; margin: 0; border-bottom: 1px solid var(--line); }
.promo-link { display: block; padding: 24px 18px; border-radius: 0 0 5px 5px; overflow: hidden; }
.promo-link img { display: block; width: 100%; height: auto; }
.promo-link:hover { opacity: .9; }
.promo-link:focus-visible { outline: 3px solid var(--text); outline-offset: -3px; }
.rank-list { display: flex; flex-direction: column; gap: 24px; list-style: none; margin: 0; padding: 24px 16px; }
.rank-list a { display: grid; grid-template-columns: 18px 96px minmax(0, 1fr); gap: 8px; text-decoration: none; align-items: start; }
.rank-num { color: var(--blog); font-size: 18px; font-weight: 700; text-align: center; line-height: 1.5; }
.rank-image { display: block; width: 96px; height: 64px; object-fit: cover; }
.rank-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 16px; line-height: 1.5; font-weight: 700; }
.rank-copy { min-width: 0; }
.rank-copy .tags { margin-top: 8px; gap: 4px; }
.rank-copy .tag { font-size: 12px; }
.rank-list a[aria-current="page"] .rank-title { text-decoration: underline; text-decoration-color: var(--blog); text-underline-offset: 3px; }
.ad-slot { padding: 16px 0; margin-top: 32px; min-width: 0; }
.ad-label { margin: 0 0 8px; font-size: 11px; color: var(--muted); }
.ad-slot .adsbygoogle { display: block !important; width: 100% !important; height: 90px !important; max-height: 90px !important; overflow: hidden; }
.site-footer { background: var(--surface); font-size: 14px; }
.footer-guide { width: min(1080px, calc(100% - 48px)); margin: auto; display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 24px 0 16px; }
.footer-guide a { padding: 4px 0; text-decoration: none; }
.footer-guide a:hover { text-decoration: underline; }
.footer-categories, .footer-bottom { width: min(1080px, calc(100% - 48px)); margin: auto; }
.footer-categories { padding: 8px 0 24px; }
.footer-categories p { border-bottom: 1px solid var(--line); padding: 16px 0; margin: 0 0 24px; font-size: 16px; }
.footer-categories .category-groups a { padding: 4px 0; }
.footer-categories a, .footer-bottom a { text-decoration: none; }
.footer-categories a:hover, .footer-bottom a:hover { text-decoration: underline; }
.footer-bottom { border-top: 1px solid var(--line); padding: 40px 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-bottom img { display: block; width: auto; height: 32px; }
:focus-visible { outline: 3px solid var(--blog); outline-offset: 4px; }

@media (max-width: 1279px) {
    .share-col { position: static; grid-column: 1 / -1; }
    .share-list { flex-direction: row; gap: 16px; }
    .layout:not(.layout-index) { row-gap: 24px; }
}
@media (max-width: 960px) {
    .layout { grid-template-columns: minmax(0, 1fr); max-width: 712px; }
    .layout-home { grid-template-areas: "articles" "promo" "ranking"; grid-template-rows: auto auto auto; }
    .side-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 24px; }
    .rank-list a { grid-template-columns: 18px 72px minmax(0, 1fr); }
    .rank-image { width: 72px; height: 54px; }
    .featured-list .post-card h2 { font-size: 20px; }
    .featured-list .post-card p { font-size: 14px; }
}
@media (max-width: 720px) {
    .header-inner { display: flex; min-height: 72px; width: calc(100% - 32px); flex-direction: column; align-items: flex-start; padding: 16px 0; gap: 12px; }
    .brand { width: 224px; }
    .catch { font-size: 10px; }
    .featured { padding: 24px 16px; }
    .featured-list { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .featured-list .post-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
    .featured-list .post-card h2 { font-size: 16px; margin: 0; }
    .featured-list .post-card p { display: none; }
    .featured-list .tags { margin-top: 8px; }
    .featured-list > li:first-child .post-card { display: block; }
    .featured-list > li:first-child .post-card h2 { font-size: 22px; margin-top: 16px; }
    .featured-list > li:first-child .post-card p { display: -webkit-box; }
    .layout { width: calc(100% - 32px); margin: 24px auto 40px; gap: 24px; }
    .content-col { padding: 0 16px 24px; }
    .post-card { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; }
    .post-card img { width: 112px; }
    .post-card h2 { font-size: 16px; }
    .post-list { gap: 24px; }
    .tag { font-size: 12px; }
    .tags { gap: 4px; margin-top: 8px; }
    .sheet { border-radius: 5px; padding: 32px 20px; }
    .sheet h1 { font-size: 24px; line-height: 1.5; }
    .crumbs { font-size: 12px; }
    .toc { padding: 20px; font-size: 14px; }
    .post-body h2 { margin-top: 56px; font-size: 20px; padding-left: 16px; }
    .post-body blockquote { padding: 20px; }
    .cta { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 48px; padding-top: 28px; }
    .cta-image { max-width: 440px; margin: 0 auto; }
    .related { margin-top: 40px; }
    .related .post-list { gap: 16px; }
    .related .post-card h2 { font-size: 14px; }
    .side-col { display: flex; }
    .rank-list a { grid-template-columns: 18px 96px minmax(0, 1fr); }
    .rank-image { width: 96px; height: 64px; }
    .footer-guide, .footer-categories, .footer-bottom { width: calc(100% - 32px); }
    .footer-bottom { flex-direction: column; align-items: flex-start; padding: 24px 0; }
}
@media (max-width: 360px) {
    .post-card, .featured-list .post-card { grid-template-columns: 88px minmax(0, 1fr); }
    .sheet { padding: 24px 16px; }
    .rank-list a { grid-template-columns: 16px 72px minmax(0, 1fr); }
    .rank-image { width: 72px; height: 54px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.page-links, .read-share { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.page-links a, .page-links span, .read-share a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 5px; }
.page-links [aria-current] { background: var(--blog-sub); font-weight: bold; }
