    <style>
        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            font-family: Tahoma, Arial, sans-serif;
            background: #f4efe6;
            color: #3b2a1a;
        }

        .wrap {
            max-width: 980px;
            margin: auto;
            padding: 22px;
        }

        .card {
            background: #fff;
            border-radius: 16px;
            padding: 24px;
            box-shadow: 0 3px 14px rgba(0, 0, 0, .09);
        }

        .cover {
            width: 100%;
            max-height: 420px;
            object-fit: cover;
            border-radius: 14px;
            margin-bottom: 18px;
        }

        .entity-header {
            display: flex;
            align-items: center;
            gap: 20px;
            padding-bottom: 18px;
            margin-bottom: 22px;
            border-bottom: 2px solid #eadcc9;
        }

        .entity-logo {
            width: 78px;
            height: 78px;
            border-radius: 50%;
            object-fit: contain;
            background: #fff;
            box-shadow: 0 3px 10px rgba(0, 0, 0, .18);
        }

        .entity-title {
            flex: 1;
            min-width: 0;
        }

        .entity-brand {
            color: #8b5a2b;
            font-size: 13px;
            line-height: 1.25;
            margin-bottom: 6px;
        }

        .entity-brand small {
            color: #9a7a57;
            font-size: 12px;
        }

        h1 {
            margin: 0;
            color: #5b3514;
            font-size: 34px;
            line-height: 1.25;
        }

        h2 {
            margin-top: 32px;
            color: #5b3514;
            border-bottom: 1px solid #eadcc9;
            padding-bottom: 8px;
        }

        h3 {
            color: #8b5a2b;
            margin: 0 0 10px;
        }

        .meta {
            color: #8b5a2b;
            margin-top: 8px;
            line-height: 1.6;
        }

        .desc {
            line-height: 1.85;
            font-size: 15px;
        }

        .info {
            margin-top: 18px;
            line-height: 1.9;
        }

        .btns {
            margin-top: 18px;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .btn {
            background: #8b5a2b;
            color: #fff;
            padding: 9px 13px;
            border-radius: 8px;
            text-decoration: none;
            display: inline-block;
        }

        .btn.green {
            background: #2f6f3e;
        }

        .btn.gray {
            background: #555;
        }

        .mapbox {
            margin-top: 18px;
            border-radius: 12px;
            overflow: hidden;
            border: 1px solid #d8c0a8;
        }

        iframe {
            width: 100%;
            height: 320px;
            border: 0;
        }

        /* Weather */
        .weather-section {
            margin-top: 22px;
            padding: 18px;
            border: 1px solid #d8c0a8;
            border-radius: 14px;
            background: linear-gradient(135deg, #fffaf3 0%, #f4eadc 100%);
        }

        .weather-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            margin-bottom: 15px;
        }

        .weather-heading {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .weather-icon {
            font-size: 42px;
            line-height: 1;
        }

        .weather-title {
            margin: 0;
            color: #5b3514;
            font-size: 20px;
            border: 0;
            padding: 0;
        }

        .weather-condition {
            margin-top: 4px;
            color: #80674f;
            font-size: 14px;
        }

        .weather-temperature {
            color: #5b3514;
            font-size: 36px;
            font-weight: bold;
            white-space: nowrap;
        }

        .weather-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 10px;
        }

        .weather-item {
            padding: 12px;
            border: 1px solid #eadcc9;
            border-radius: 10px;
            background: rgba(255, 255, 255, .82);
        }

        .weather-label {
            color: #8b735b;
            font-size: 12px;
        }

        .weather-value {
            margin-top: 6px;
            color: #4e321b;
            font-size: 17px;
            font-weight: bold;
        }

        .weather-aqi {
            margin-top: 12px;
            padding: 11px 13px;
            border-radius: 9px;
            background: #fff;
            color: #5b3514;
            line-height: 1.6;
        }

        .weather-updated {
            margin-top: 12px;
            color: #8b735b;
            font-size: 12px;
        }

        .weather-unavailable {
            margin-top: 22px;
            padding: 15px;
            border: 1px dashed #d8c0a8;
            border-radius: 12px;
            background: #fffaf3;
            color: #80674f;
        }

        /* Context recommendation */
        .context-recommendation {
            margin-top: 14px;
            padding: 16px;
            border: 1px solid #eadcc9;
            border-radius: 12px;
            background: #fffaf3;
        }

        .context-recommendation.level-warning {
            border-color: #e7b665;
            background: #fff6df;
        }

        .context-recommendation.level-danger {
            border-color: #d98b8b;
            background: #fff0f0;
        }

        .context-recommendation.level-success {
            border-color: #9bc6a4;
            background: #eef8f0;
        }

        .context-title {
            margin: 0 0 10px;
            color: #5b3514;
            font-size: 18px;
        }

        .context-message {
            margin-bottom: 10px;
            line-height: 1.7;
        }

        .context-items {
            margin: 0;
            padding-left: 20px;
        }

        .context-items li {
            margin: 7px 0;
            line-height: 1.6;
        }

        /* Nearby radio */
        .radio-section {
            margin-top: 20px;
            padding: 16px;
            border: 1px solid #eadcc9;
            border-radius: 14px;
            background: #fffaf3;
        }

        .radio-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
        }

        .radio-card {
            display: flex;
            gap: 12px;
            align-items: center;
            padding: 12px;
            border: 1px solid #eee2d2;
            border-radius: 12px;
            background: #fff;
        }

        .radio-logo {
            width: 58px;
            height: 58px;
            min-width: 58px;
            border-radius: 50%;
            background: #eadcc9;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            font-size: 24px;
        }

        .radio-logo img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .radio-body {
            flex: 1;
            min-width: 0;
        }

        .radio-name {
            color: #5b3514;
            font-weight: bold;
            line-height: 1.35;
        }

        .radio-meta {
            margin-top: 4px;
            color: #80674f;
            font-size: 13px;
        }

        .radio-actions {
            margin-top: 8px;
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }

        .radio-listen {
            padding: 6px 9px;
            border-radius: 7px;
            background: #8b5a2b;
            color: #fff;
            text-decoration: none;
            font-size: 12px;
        }

        .radio-missing {
            color: #999;
            font-size: 12px;
        }

        /* Compact YouTube story cards */
        .youtube-section {
            margin-top: 20px;
            padding: 16px;
            border: 1px solid #eadcc9;
            border-radius: 14px;
            background: #fffaf3;
        }

        .youtube-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
        }

        .youtube-card {
            display: flex;
            min-width: 0;
            overflow: hidden;
            border: 1px solid #eee2d2;
            border-radius: 12px;
            background: #fff;
        }

        .youtube-thumb-link {
            position: relative;
            display: block;
            width: 150px;
            min-width: 150px;
            height: 86px;
            overflow: hidden;
            background: #eadcc9;
        }

        .youtube-thumb-link img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .youtube-play {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 30px;
            color: #fff;
            background: rgba(0, 0, 0, .16);
        }

        .youtube-body {
            flex: 1;
            min-width: 0;
            padding: 9px 10px;
        }

        .youtube-title {
            margin: 0;
            color: #5b3514;
            font-size: 13px;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .youtube-title a {
            color: inherit;
            text-decoration: none;
        }

        .youtube-description {
            display: none;
        }

        .youtube-meta {
            margin-top: 7px;
            color: #9a7a57;
            font-size: 11px;
            line-height: 1.35;
        }

        .youtube-empty {
            margin-top: 20px;
            padding: 15px;
            border: 1px dashed #d8c0a8;
            border-radius: 12px;
            background: #fffaf3;
            color: #80674f;
        }

        /* Nearby places */
        .nearby-section {
            margin-top: 20px;
            background: #fffaf3;
            border: 1px solid #eadcc9;
            border-radius: 14px;
            padding: 14px;
        }

        .nearby-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
        }

        .nearby-card {
            display: flex;
            gap: 10px;
            background: #fff;
            border: 1px solid #eee2d2;
            border-radius: 12px;
            overflow: hidden;
            text-decoration: none;
            color: #3b2a1a;
            min-height: 86px;
        }

        .nearby-thumb {
            width: 92px;
            min-width: 92px;
            background: #eadcc9;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #8b5a2b;
            font-size: 22px;
        }

        .nearby-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .nearby-body {
            padding: 9px 8px 8px 0;
            flex: 1;
        }

        .nearby-title {
            font-weight: bold;
            color: #5b3514;
            line-height: 1.35;
        }

        .nearby-distance {
            margin-top: 6px;
            font-size: 13px;
            color: #777;
        }

        .nearby-type {
            font-size: 12px;
            color: #9a7a57;
            margin-top: 3px;
        }

        @media (max-width: 760px) {
            .weather-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .radio-grid,
            .youtube-grid,
            .nearby-grid {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 640px) {
            .wrap {
                padding: 12px;
            }

            .card {
                padding: 16px;
            }

            .entity-header {
                align-items: flex-start;
                gap: 12px;
            }

            .entity-logo {
                width: 58px;
                height: 58px;
            }

            h1 {
                font-size: 25px;
            }

            .weather-header {
                align-items: flex-start;
            }

            .weather-temperature {
                font-size: 30px;
            }

            .youtube-thumb-link {
                width: 122px;
                min-width: 122px;
                height: 70px;
            }

            .youtube-title {
                font-size: 12px;
            }

            .youtube-meta {
                font-size: 10px;
            }
        }
        /* CM77 Media Gallery */
        .entity-gallery { margin-bottom: 20px; }
        .gallery-stage { position: relative; width: 100%; height: 390px; border-radius: 14px; overflow: hidden; background: #21170f; }
        .gallery-main-button { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: #eadcc9; cursor: zoom-in; }
        .gallery-main-image { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity .18s ease; }
        .gallery-main-video, .gallery-main-iframe { display: none; width: 100%; height: 100%; border: 0; background: #000; }
        .gallery-media-title { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 3; display: none; padding: 9px 12px; border-radius: 9px; background: rgba(0,0,0,.62); color: #fff; font-size: 13px; line-height: 1.45; pointer-events: none; }
        .gallery-thumbnails { display: flex; gap: 8px; margin-top: 9px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: thin; }
        .gallery-thumbnail { position: relative; width: 118px; min-width: 118px; height: 74px; padding: 0; border: 2px solid transparent; border-radius: 9px; background: #eadcc9; overflow: hidden; cursor: pointer; opacity: .78; transition: opacity .15s ease, border-color .15s ease, transform .15s ease; }
        .gallery-thumbnail:hover { opacity: 1; transform: translateY(-1px); }
        .gallery-thumbnail.active { opacity: 1; border-color: #8b5a2b; }
        .gallery-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
        .gallery-media-badge { position: absolute; left: 6px; bottom: 6px; padding: 4px 7px; border-radius: 999px; background: rgba(0,0,0,.72); color: #fff; font-size: 11px; line-height: 1; }
        .gallery-play-icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 30px; text-shadow: 0 2px 8px rgba(0,0,0,.75); background: rgba(0,0,0,.12); }
        .gallery-lightbox { position: fixed; inset: 0; z-index: 99999; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(0,0,0,.88); }
        .gallery-lightbox.open { display: flex; }
        .gallery-lightbox-image { display: block; max-width: 95vw; max-height: 88vh; border-radius: 10px; object-fit: contain; box-shadow: 0 8px 30px rgba(0,0,0,.45); }
        .gallery-lightbox-close { position: fixed; top: 16px; right: 20px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: 31px; line-height: 1; cursor: pointer; }
        @media (max-width: 700px) { .gallery-stage { height: 260px; } .gallery-thumbnail { width: 96px; min-width: 96px; height: 62px; } }
/* Compact Restaurant Menu */
.restaurant-menu-section {
    margin-top: 18px;
    padding: 14px;
    border: 1px solid #eadcc9;
    border-radius: 13px;
    background: #fffaf3;
    overflow: hidden;
}

.restaurant-menu-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.restaurant-menu-heading {
    margin: 0;
    padding: 0;
    border: 0;
    color: #5b3514;
    font-size: 18px;
}

.restaurant-menu-subtitle {
    margin-top: 3px;
    color: #8b735b;
    font-size: 12px;
}

.restaurant-menu-count {
    flex-shrink: 0;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eadcc9;
    color: #5b3514;
    font-size: 11px;
}

.restaurant-service-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.restaurant-service-badges span {
    padding: 5px 8px;
    border: 1px solid #eadcc9;
    border-radius: 999px;
    background: #fff;
    color: #6d4a29;
    font-size: 11px;
    white-space: nowrap;
}

.restaurant-menu-category {
    margin-top: 15px;
}

.restaurant-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.restaurant-category-header h3 {
    margin: 0;
    color: #6a4320;
    font-size: 14px;
}

.restaurant-category-header span {
    color: #9a7a57;
    font-size: 11px;
}

/*
 * Mobile-first:
 * เลื่อนเมนูแนวนอนได้ทั้งมือถือและ Desktop
 */
.restaurant-menu-scroll {
    display: flex;
    gap: 10px;
    padding: 2px 1px 7px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.restaurant-menu-card {
    flex: 0 0 156px;
    width: 156px;
    min-width: 156px;
    overflow: hidden;
    border: 1px solid #eee2d2;
    border-radius: 11px;
    background: #fff;
    scroll-snap-align: start;
    box-shadow: 0 2px 7px rgba(72, 46, 20, .05);
}

.restaurant-menu-image {
    position: relative;
    width: 100%;
    height: 104px;
    overflow: hidden;
    background: #eadcc9;
}

.restaurant-menu-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.restaurant-menu-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.restaurant-menu-sale {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 4px 6px;
    border-radius: 999px;
    background: #b64635;
    color: #fff;
    font-size: 9px;
    font-weight: bold;
}

.restaurant-menu-body {
    min-width: 0;
    padding: 9px;
}

.restaurant-menu-name {
    min-height: 36px;
    overflow: hidden;
    color: #5b3514;
    font-size: 13px;
    font-weight: bold;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.restaurant-menu-desc {
    min-height: 30px;
    margin-top: 4px;
    overflow: hidden;
    color: #806f5d;
    font-size: 10px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.restaurant-menu-flags {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 18px;
    margin-top: 5px;
    font-size: 12px;
}

.restaurant-menu-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 6px;
    margin-top: 7px;
}

.restaurant-menu-price small {
    display: block;
    color: #999;
    font-size: 10px;
    line-height: 1.1;
    text-decoration: line-through;
}

.restaurant-menu-price strong {
    color: #8b5a2b;
    font-size: 16px;
    line-height: 1.2;
}

.restaurant-menu-order {
    min-width: 45px;
    padding: 6px 8px;
    border: 0;
    border-radius: 7px;
    background: #8b5a2b;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
}

.restaurant-menu-order:hover {
    background: #6f431e;
}

/* Tablet */
@media (min-width: 600px) {
    .restaurant-menu-card {
        flex-basis: 170px;
        width: 170px;
        min-width: 170px;
    }

    .restaurant-menu-image {
        height: 112px;
    }
}

/* Desktop */
@media (min-width: 900px) {
    .restaurant-menu-section {
        padding: 16px;
    }

    .restaurant-menu-card {
        flex-basis: 178px;
        width: 178px;
        min-width: 178px;
    }

    .restaurant-menu-image {
        height: 118px;
    }
}

/* มือถือขนาดเล็ก */
@media (max-width: 420px) {
    .restaurant-menu-section {
        margin-left: -4px;
        margin-right: -4px;
        padding: 12px 10px;
    }

    .restaurant-menu-card {
        flex-basis: 142px;
        width: 142px;
        min-width: 142px;
    }

    .restaurant-menu-image {
        height: 94px;
    }

    .restaurant-menu-name {
        font-size: 12px;
    }

    .restaurant-menu-desc {
        display: none;
    }

    .restaurant-menu-price strong {
        font-size: 15px;
    }
}


/* CM77 7-Day Weather Forecast */
.weather-forecast-block {
    margin-top: 16px;
    padding-top: 15px;
    border-top: 1px solid #eadcc9;
}

.weather-forecast-heading {
    margin-bottom: 10px;
    color: #5b3514;
    font-size: 16px;
    font-weight: bold;
}

.weather-forecast-scroll {
    display: flex;
    gap: 9px;
    padding: 2px 1px 7px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.weather-forecast-day {
    flex: 0 0 112px;
    min-width: 112px;
    padding: 11px 9px;
    border: 1px solid #eadcc9;
    border-radius: 11px;
    background: rgba(255, 255, 255, .88);
    text-align: center;
    scroll-snap-align: start;
}

.weather-forecast-day-name,
.weather-forecast-date,
.weather-forecast-icon,
.weather-forecast-condition,
.weather-forecast-temp,
.weather-forecast-rain {
    display: block;
}

.weather-forecast-day-name {
    color: #5b3514;
    font-size: 13px;
}

.weather-forecast-date {
    margin-top: 2px;
    color: #9a7a57;
    font-size: 10px;
}

.weather-forecast-icon {
    margin: 7px 0 4px;
    font-size: 29px;
    line-height: 1;
}

.weather-forecast-condition {
    min-height: 30px;
    color: #80674f;
    font-size: 10px;
    line-height: 1.4;
}

.weather-forecast-temp {
    margin-top: 5px;
    color: #5b3514;
    font-size: 18px;
}

.weather-forecast-temp small {
    margin-left: 4px;
    color: #9a7a57;
    font-size: 13px;
}

.weather-forecast-rain {
    margin-top: 5px;
    color: #53728c;
    font-size: 11px;
}

@media (max-width: 420px) {
    .weather-forecast-day {
        flex-basis: 102px;
        min-width: 102px;
    }
}

/* CM77 Environment: PM2.5 + Nearby Hotspots */
.environment-risk-section {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #ead0c6;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff9f5 0%, #fff1eb 100%);
}
.environment-risk-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.environment-risk-header h3 { margin: 0; color: #6b2f1d; }
.environment-risk-subtitle { margin-top: 4px; color: #8b6b60; font-size: 12px; }
.pm-status { padding: 6px 10px; border-radius: 999px; font-size: 11px; font-weight: bold; white-space: nowrap; }
.pm-good { background: #e8f7ec; color: #236b35; }
.pm-moderate { background: #fff7d8; color: #755d00; }
.pm-warning { background: #ffe8c5; color: #8a4b00; }
.pm-danger { background: #ffe0df; color: #9b2d2d; }
.pm-critical { background: #5d1d22; color: #fff; }
.pm-unknown { background: #eee8e2; color: #6f625a; }
.environment-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin-top: 13px;
}
.environment-summary-card {
    padding: 11px;
    border: 1px solid #f0ddd4;
    border-radius: 10px;
    background: rgba(255,255,255,.88);
}
.environment-summary-card span, .environment-summary-card small { display: block; color: #8b6b60; font-size: 11px; }
.environment-summary-card strong { display: block; margin: 5px 0 2px; color: #6b2f1d; font-size: 22px; }
.hotspot-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.hotspot-item { display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid #f0ddd4; border-radius: 10px; background: #fff; color: #4e2d22; text-decoration: none; }
.hotspot-icon { font-size: 23px; }
.hotspot-body { flex: 1; min-width: 0; }
.hotspot-body strong, .hotspot-body small { display: block; }
.hotspot-body small { margin-top: 3px; color: #8a746c; font-size: 10px; }
.hotspot-map { color: #a44225; font-size: 10px; font-weight: bold; }
.environment-empty { margin-top: 12px; padding: 11px; border-radius: 9px; background: #fff; color: #6b625e; font-size: 12px; line-height: 1.6; }

@media (max-width: 640px) {
    .environment-summary-grid { grid-template-columns: 1fr; }
    .hotspot-list { grid-template-columns: 1fr; }
    .environment-risk-header { align-items: flex-start; }
}
