* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, svg { max-width: 100%; height: auto; }
body {
    background:
        radial-gradient(circle at 20% 10%, rgba(249,168,37,.16), transparent 32%),
        linear-gradient(180deg, #d7e3f4 0%, #e8eef6 45%, #f4f7fb 100%);
    color: #0b1f3a;
    font-family: "Kanit", "Segoe UI", Tahoma, sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
}
.site-shell {
    width: 100%; max-width: 720px; margin: 0 auto;
    min-height: 100vh; min-height: 100dvh;
    background:
        linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) padding-box,
        linear-gradient(165deg, #42a5f5, #7e57c2, #ef5350, #ffca28, #66bb6a, #26c6da, #42a5f5) border-box;
    border: 3px solid transparent;
    box-shadow:
        inset 0 0 0 5px #ffffff,
        inset 0 0 0 7px rgba(249,168,37,.4),
        0 18px 48px rgba(11,31,58,.12);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    overflow-x: hidden;
    position: relative;
}
.site-shell::before,
.site-shell::after {
    content: "";
    position: absolute;
    top: 14px; bottom: 14px; width: 12px;
    z-index: 2; pointer-events: none;
    border-radius: 999px;
    background:
        radial-gradient(circle at 50% 8px, #fff 0 1.2px, #ef5350 1.5px 4.5px, transparent 5px),
        radial-gradient(circle at 50% 30px, #fff 0 1.2px, #42a5f5 1.5px 4.5px, transparent 5px),
        radial-gradient(circle at 50% 52px, #fff 0 1.2px, #66bb6a 1.5px 4.5px, transparent 5px),
        radial-gradient(circle at 50% 74px, #fff 0 1.2px, #ffca28 1.5px 4.5px, transparent 5px),
        radial-gradient(circle at 50% 96px, #fff 0 1.2px, #ab47bc 1.5px 4.5px, transparent 5px),
        linear-gradient(180deg, #e3f2fd, #fff8e1);
    background-size: 12px 120px, 12px 120px, 12px 120px, 12px 120px, 12px 120px, 12px 100%;
    background-repeat: repeat-y, repeat-y, repeat-y, repeat-y, repeat-y, no-repeat;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.65), 0 2px 8px rgba(11,31,58,.08);
}
.site-shell::before { left: 5px; }
.site-shell::after { right: 5px; }
.page-header {
    padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 14px;
    background: linear-gradient(145deg, #0d47a1, #1565c0 55%, #1976d2);
    color: #fff;
}
.back-link {
    display: inline-block; color: #ffe082; text-decoration: none;
    font-size: 14px; margin-bottom: 10px; min-height: 44px; line-height: 44px;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.page-header h1 { color: #fff; font-size: clamp(1.25rem, 5vw, 1.55rem); line-height: 1.35; margin-bottom: 8px; }
.page-header h1 span { color: #ffca28; }
.hero-lead { color: #e3f2fd; font-size: 0.98rem; }
.hero-lead a { color: #ffe082; font-weight: 700; text-decoration: none; }
main { padding: 8px 0 28px; }
.section { padding: 16px; }
.section h2 {
    color: #0b1f3a; font-size: clamp(1.05rem, 4.2vw, 1.15rem); margin: 18px 0 8px;
    border-left: 4px solid #f9a825; padding-left: 10px;
}
.section h3 { color: #1565c0; font-size: 1.02rem; margin: 14px 0 6px; }
.section p, .section li { color: #455a64; font-size: 0.98rem; margin-bottom: 10px; overflow-wrap: anywhere; }
.section ul, .section ol { padding-left: 1.2rem; margin-bottom: 12px; }
.section a { color: #1565c0; font-weight: 700; text-decoration: none; }
.related-links { list-style: none; padding-left: 0; }
.related-links li { margin-bottom: 8px; }
.related-links a {
    display: block; padding: 12px; border-radius: 12px; min-height: 44px;
    border: 1px solid rgba(11,31,58,.1); background: #f8fafc; border-left: 3px solid #1565c0;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.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: 18px; padding: 14px 16px; color: #fff !important;
    min-height: 48px; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn:active { transform: scale(.98); }
.btn-primary {
    background: linear-gradient(135deg, #42a5f5, #1565c0 45%, #0d47a1);
    border: 2px solid #bbdefb;
}
.btn-line {
    background: linear-gradient(135deg, #26a69a, #00a86b 50%, #007a4d);
    border: 2px solid #b2dfdb;
}
.site-footer {
    margin: 8px 16px 16px;
    padding: 3px;
    border-radius: 16px;
    background:
        linear-gradient(145deg, #fff3c4 0%, #f9a825 22%, #ffe082 48%, #c79100 72%, #fff3c4 100%);
    box-shadow:
        0 12px 28px rgba(11,31,58,.2),
        0 0 0 1px rgba(183,120,0,.35);
    color: #fff;
    font-size: 0.9rem;
}
.site-footer .site-foot-frame {
    padding: 18px 14px 16px;
    text-align: center;
    border-radius: 13px;
    background:
        radial-gradient(ellipse at 50% 18%, rgba(33,150,243,.35), transparent 55%),
        linear-gradient(180deg, #1565c0 0%, #0d47a1 48%, #071a33 100%);
    border: 1.5px solid rgba(255,236,179,.55);
    box-shadow:
        inset 0 0 0 3px rgba(7,26,51,.92),
        inset 0 0 0 5px rgba(249,168,37,.55),
        inset 0 1px 0 rgba(255,255,255,.2);
}
.site-footer a { color: #ffe082; font-weight: 800; text-decoration: none; }
.site-footer a:hover { color: #fffde7; text-decoration: underline; }
.site-footer .site-foot-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px 18px;
    margin-bottom: 12px;
    font-size: clamp(13px, 3.6vw, 15px);
    font-weight: 800;
}
.site-footer .site-foot-copy {
    color: #ffffff;
    font-size: clamp(11px, 3.1vw, 13px);
    font-weight: 600;
    line-height: 1.55;
    margin-bottom: 6px;
}
.site-footer .site-foot-note {
    color: rgba(255,255,255,.78);
    font-size: clamp(10px, 2.8vw, 12px);
    font-weight: 500;
    line-height: 1.45;
}
.breadcrumb { font-size: 0.85rem; color: #90caf9; margin-bottom: 8px; }
.breadcrumb a { color: #ffe082; text-decoration: none; }
.lotto-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 4px; }
.lotto-row i {
    width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-style: normal; font-weight: 800; font-size: 12px;
}
.lotto-row i:nth-child(1){background:#c62828}
.lotto-row i:nth-child(2){background:#1565c0}
.lotto-row i:nth-child(3){background:#2e7d32}
.lotto-row i:nth-child(4){background:#f9a825;color:#5d4037}
.lotto-row i:nth-child(5){background:#6a1b9a}
@media (max-width: 380px) {
    .page-header, .section { padding-left: 12px; padding-right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .btn:active { transform: none; }
}
