* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --kraft-mid: #a67c52;
    --stamp-paper: #f5ebd4;
    --ink: #3d2914;
    --ink-soft: #5c4030;
    --ink-muted: #7a5c42;
    --seal-red: #c41e3a;
    --seal-dark: #8b1528;
}

body {
    background-color: var(--kraft-mid);
    background-image: linear-gradient(160deg, #c9a06e 0%, #a67c52 40%, #8f6840 100%);
    color: var(--ink);
    font-family: "Sarabun", "Segoe UI", Tahoma, sans-serif;
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeSpeed;
}

.site-shell {
    width: calc(100% - 28px);
    max-width: 720px;
    margin: 16px auto;
    min-height: calc(100vh - 32px);
    padding: 10px;
    background: var(--stamp-paper);
    background-image: linear-gradient(180deg, #faf3e4 0%, #f5ebd4 50%, #ebdbc0 100%);
    color: var(--ink);
    position: relative;
    box-shadow: 0 10px 22px rgba(50, 28, 10, 0.28);
    border: 2px dashed rgba(139, 21, 40, 0.32);
    contain: layout style;
}

.page-header {
    padding: 20px 18px 12px;
    border-bottom: 2px dashed rgba(139, 21, 40, 0.28);
    background: linear-gradient(180deg, rgba(255, 248, 230, 0.55) 0%, transparent 100%);
    position: relative;
    z-index: 1;
}

.back-link {
    display: inline-block;
    color: var(--seal-red);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 700;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.back-link:hover {
    text-decoration: underline;
}

.page-header h1 {
    color: var(--seal-dark);
    font-family: "Chonburi", "Sarabun", serif;
    font-size: 1.55rem;
    line-height: 1.35;
    margin-bottom: 8px;
    font-weight: 400;
}

.hero-lead {
    color: var(--ink-soft);
    font-size: 0.98rem;
}

.hero-lead strong {
    color: var(--seal-red) !important;
}

main {
    padding: 8px 0 28px;
    position: relative;
    z-index: 1;
    content-visibility: auto;
}

.section {
    padding: 16px 18px;
}

.section h2 {
    color: var(--seal-dark);
    font-family: "Chonburi", "Sarabun", serif;
    font-size: 1.15rem;
    font-weight: 400;
    margin: 18px 0 8px;
    border-left: 3px solid var(--seal-red);
    padding-left: 10px;
}

.section h3 {
    color: var(--seal-red);
    font-size: 1.02rem;
    margin: 14px 0 6px;
}

.section p,
.section li {
    color: var(--ink-soft);
    font-size: 0.98rem;
    margin-bottom: 10px;
}

.section ul {
    padding-left: 1.2rem;
    margin-bottom: 12px;
}

.section a {
    color: var(--seal-red);
    font-weight: 700;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.section a:hover {
    text-decoration: underline;
}

.related-links {
    list-style: none;
    padding-left: 0;
}

.related-links li {
    margin-bottom: 8px;
}

.related-links a {
    display: block;
    padding: 10px 12px;
    border: 2px dashed rgba(139, 21, 40, 0.35);
    border-radius: 2px;
    background: rgba(255, 248, 230, 0.55);
    color: var(--seal-dark);
}

.cta-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.btn {
    display: block;
    text-align: center;
    text-decoration: none !important;
    font-weight: 800;
    border-radius: 4px;
    padding: 14px 16px;
    color: #fff !important;
    letter-spacing: 0.02em;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn:active {
    opacity: 0.92;
}

.btn-primary {
    background:
        linear-gradient(180deg, rgba(255, 220, 220, 0.25) 0%, transparent 45%),
        linear-gradient(135deg, #e85a5a 0%, #c41e3a 48%, #8b1528 100%);
    border: 2px solid #8b1528;
    box-shadow: 0 4px 0 #6e1020, 0 8px 16px rgba(139, 21, 40, 0.28);
}

.btn-line {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 40%),
        linear-gradient(135deg, #1db954 0%, #06c755 50%, #046b32 100%);
    border: 2px solid #046b32;
    box-shadow: 0 4px 0 #035528, 0 8px 16px rgba(4, 107, 50, 0.25);
}

.site-footer {
    margin: 8px 10px 16px;
    padding: 16px 14px;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(255, 248, 230, 0.75) 0%, rgba(235, 219, 192, 0.9) 100%);
    border: 2px dashed rgba(139, 21, 40, 0.4);
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px rgba(90, 55, 25, 0.08);
    color: var(--ink-muted);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.site-footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px 0;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.5;
}

.site-footer-nav a {
    color: var(--seal-red);
    text-decoration: none;
    padding: 0 8px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.site-footer-nav a:hover {
    text-decoration: underline;
    color: var(--seal-dark);
}

.site-footer-nav .sep {
    color: rgba(139, 21, 40, 0.45);
    user-select: none;
}

.site-footer-copy {
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.55;
    margin-bottom: 8px;
}

.site-footer-copy a {
    color: var(--seal-dark);
    text-decoration: none;
    font-weight: 800;
}

.site-footer-note {
    color: var(--ink-muted);
    font-size: 11.5px;
    line-height: 1.5;
    font-weight: 500;
}

.site-footer a {
    color: var(--seal-red);
}

.breadcrumb {
    font-size: 0.85rem;
    color: var(--ink-muted);
    margin-bottom: 10px;
}

.breadcrumb a {
    color: var(--seal-red);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

@media (max-width: 500px) {
    .site-shell {
        width: calc(100% - 16px);
        margin: 8px auto;
        padding: 6px;
    }
}
