/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: hsl(210, 25%, 98%);
    color: hsl(215, 25%, 15%);
    line-height: 1.85;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Layout & Container
   ========================================================================== */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid hsl(210, 15%, 90%);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.header-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 700;
    color: hsl(215, 80%, 40%);
    font-size: 1.15rem;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-sub {
    font-size: 0.75rem;
    color: hsl(215, 15%, 50%);
    font-weight: 500;
    border-left: 1px solid hsl(210, 15%, 80%);
    padding-left: 8px;
}

.main-container {
    max-width: 720px;
    margin: 0 auto;
    background-color: #ffffff;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
    min-height: 100vh;
}

.article-content {
    padding: 24px 20px 100px; /* Large bottom padding for floating CTA spacing */
}

@media (min-width: 768px) {
    .article-content {
        padding: 40px 40px 120px;
    }
    
    body {
        font-size: 16.5px;
    }
}

/* ==========================================================================
   Typography & Headings
   ========================================================================== */
.entry-title {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.45;
    color: hsl(215, 30%, 15%);
    margin-bottom: 20px;
    letter-spacing: -0.3px;
}

@media (min-width: 768px) {
    .entry-title {
        font-size: 2.1rem;
        margin-bottom: 28px;
    }
}

h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: hsl(215, 30%, 15%);
    margin: 48px 0 20px 0;
    padding: 0 0 8px 14px;
    border-left: 6px solid hsl(165, 85%, 35%);
    border-bottom: 1px solid hsl(210, 15%, 90%);
    line-height: 1.4;
}

@media (min-width: 768px) {
    h2 {
        font-size: 1.6rem;
        margin: 56px 0 24px 0;
    }
}

h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: hsl(215, 30%, 20%);
    margin: 32px 0 16px 0;
    padding-left: 10px;
    border-left: 3px solid hsl(215, 80%, 40%);
    line-height: 1.4;
}

@media (min-width: 768px) {
    h3 {
        font-size: 1.25rem;
    }
}

p {
    margin-bottom: 20px;
    color: hsl(215, 20%, 20%);
    word-break: break-all;
}

/* ==========================================================================
   Lists & Tables
   ========================================================================== */
ul {
    margin: 0 0 24px 20px;
}

li {
    margin-bottom: 8px;
    color: hsl(215, 20%, 20%);
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 24px 0;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid hsl(210, 15%, 90%);
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 500px;
}

.spec-table th, .spec-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid hsl(210, 15%, 90%);
}

.spec-table th {
    background-color: hsl(215, 40%, 97%);
    color: hsl(215, 30%, 25%);
    font-weight: 700;
    width: 25%;
}

.spec-table td {
    color: hsl(215, 20%, 25%);
}

.spec-table tr:last-child th, .spec-table tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   Decorations & Box Components
   ========================================================================== */
/* Marker Highlight */
.mk.js-marker {
    background: linear-gradient(transparent 60%, hsl(45, 100%, 82%) 40%);
    font-weight: 700;
}

/* Summary Box */
.summary-box {
    background-color: hsl(165, 80%, 98%);
    border: 1px solid hsl(165, 50%, 90%);
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
}

.summary-box ul {
    margin: 0;
    list-style: none;
}

.summary-box li {
    position: relative;
    padding-left: 26px;
    font-weight: 700;
    color: hsl(165, 70%, 20%);
    margin-bottom: 10px;
}

.summary-box li:last-child {
    margin-bottom: 0;
}

.summary-box li::before {
    content: "✓";
    position: absolute;
    left: 2px;
    top: -1px;
    color: hsl(165, 85%, 35%);
    font-weight: 900;
    font-size: 1.1rem;
}

/* Note Box */
.note {
    background-color: hsl(40, 100%, 98%);
    border-left: 4px solid hsl(40, 95%, 45%);
    border-radius: 4px 12px 12px 4px;
    padding: 16px 20px;
    margin: 24px 0;
    border-top: 1px solid hsl(40, 50%, 93%);
    border-right: 1px solid hsl(40, 50%, 93%);
    border-bottom: 1px solid hsl(40, 50%, 93%);
}

.note p {
    margin-bottom: 0;
    font-size: 0.92rem;
    color: hsl(40, 80%, 20%);
}

/* Balloon Box (Quote) */
.balloon {
    position: relative;
    background-color: hsl(215, 60%, 97%);
    border: 1px solid hsl(215, 40%, 92%);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 24px 0;
    font-size: 0.95rem;
    color: hsl(215, 40%, 25%);
    font-weight: 500;
}

/* FAQ Item */
.faq-item {
    margin: 24px 0;
    border-bottom: 1px solid hsl(210, 15%, 92%);
    padding-bottom: 20px;
}

.faq-item:last-of-type {
    border-bottom: none;
}

.faq-q {
    font-size: 1.05rem;
    color: hsl(215, 30%, 15%);
    margin-bottom: 8px;
}

.faq-a {
    padding-left: 4px;
}

.faq-a p {
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.faq-a p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Image Styles
   ========================================================================== */
.article-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin: 16px 0 28px 0;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Call To Action (CTA)
   ========================================================================== */
/* Standard CTA Area */
.cta-area {
    background: linear-gradient(135deg, hsl(215, 80%, 42%), hsl(215, 70%, 30%));
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    color: #ffffff;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(10, 40, 80, 0.1);
}

.cta-area p {
    color: hsl(45, 100%, 80%);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.cta-button {
    display: inline-block;
    width: 100%;
    max-width: 380px;
    background: linear-gradient(135deg, hsl(14, 100%, 53%), hsl(24, 100%, 50%));
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none;
    padding: 16px 24px;
    border-radius: 50px;
    box-shadow: 0 6px 20px rgba(235, 80, 30, 0.3);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(235, 80, 30, 0.45);
    background: linear-gradient(135deg, hsl(14, 100%, 50%), hsl(24, 100%, 46%));
}

.bottom-cta {
    margin: 48px 0 0 0;
}

/* Persistent Bottom CTA (Floating Capsule) */
.floating-cta {
    position: fixed;
    bottom: -100px; /* Hidden initially, controlled by JS */
    left: 0;
    right: 0;
    width: 100%;
    padding: 0 16px 16px;
    z-index: 999;
    transition: bottom 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.floating-cta.is-visible {
    bottom: 0;
}

.floating-cta-container {
    max-width: 600px;
    margin: 0 auto;
}

.floating-cta-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: linear-gradient(135deg, hsl(14, 100%, 53%), hsl(24, 100%, 48%));
    color: #ffffff;
    text-decoration: none;
    border-radius: 40px;
    padding: 12px 20px;
    box-shadow: 0 8px 30px rgba(235, 80, 30, 0.4);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.floating-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(235, 80, 30, 0.55);
}

.cta-text-main {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.cta-text-sub {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 1px;
    font-weight: 500;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background-color: hsl(215, 30%, 15%);
    color: hsl(215, 10%, 65%);
    padding: 40px 20px;
    border-top: 1px solid hsl(215, 20%, 20%);
    text-align: center;
}

.footer-container {
    max-width: 720px;
    margin: 0 auto;
}

.copyright {
    font-size: 0.75rem;
    margin-bottom: 0;
    color: hsl(215, 10%, 55%);
}

/* ==========================================================================
   Related Articles Section
   ========================================================================== */
.related-articles {
    margin-top: 48px;
    border-top: 2px dashed hsl(210, 15%, 85%);
    padding-top: 32px;
}

.related-articles h2 {
    border-left-color: hsl(215, 80%, 40%);
    margin-top: 0;
}

.related-card {
    display: flex;
    background-color: #ffffff;
    border: 1px solid hsl(210, 15%, 90%);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    margin-top: 16px;
}

.related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: hsl(215, 50%, 80%);
}

.related-card-img {
    width: 130px;
    min-width: 130px;
    height: auto;
    object-fit: cover;
}

.related-card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.related-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: hsl(215, 30%, 15%);
    margin: 0 0 6px 0;
    border-left: none;
    padding-left: 0;
    line-height: 1.4;
}

.related-card-desc {
    font-size: 0.78rem;
    color: hsl(215, 15%, 45%);
    margin-bottom: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 480px) {
    .related-card {
        flex-direction: column;
    }
    .related-card-img {
        width: 100%;
        height: 120px;
    }
    .related-card-content {
        padding: 12px;
    }
    .related-card-title {
        font-size: 0.9rem;
    }
}

