:root {
    --ink: #111827;
    --muted: #6b7280;
    --brand: #ff6a00;
    --brand2: #ff3d3d;
    --bg-dark: #1a0c02;
    --shadow: 0 20px 50px rgba(17, 24, 39, 0.15);
    --max: 1180px;
    --transition: transform 0.22s ease, opacity 0.22s ease, color 0.22s ease, background-color 0.22s ease, border-color 0.22s ease;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans Thai", sans-serif;
    color: var(--ink);
    background: #fcfcfc;
    line-height: 1.6;
}

/* ===================== HEADER ===================== */
header {
    background: var(--bg-dark);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 106, 0, 0.2);
}

.header-inner {
    width: min(var(--max), calc(100% - 40px));
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
}

.logo img {
    border-radius: 20px;
    height: 40px;
    width: auto;
    display: block;
}

.nav {
    display: flex;
    gap: 12px;
}

.nav a {
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.nav .login {
    color: #fff;
    background: #535353;
}

.nav .login:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav .register {
    background: linear-gradient(90deg, var(--brand2), var(--brand));
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 61, 61, 0.3);
}

.nav .register:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 61, 61, 0.4);
}

/* ===================== HERO & SEARCH ===================== */
/* ===================== HERO & SEARCH ===================== */
.wrap {
    width: min(var(--max), calc(100% - 40px));
    margin: auto;
    padding: 40px 0 80px;
}

.hero {
    position: relative;
    min-height: 360px;
    margin-bottom: 40px;
    padding: 64px 56px;
    border-radius: 30px;
    overflow: hidden;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow);
    background-color: #fff7ef;
}

.hero-bg {
    background-image: url('../assets/hero-home.webp');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
}

.hero-content {
    position: relative;
    text-align: center;
    z-index: 2;
    max-width: 560px;
}

.hero h1 {
    font-size: clamp(34px, 5vw, 56px);
    margin: 0 0 16px;
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.hero h1 span {
    background: linear-gradient(90deg, var(--brand2), var(--brand));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    color: var(--muted);
    font-size: 18px;
    margin: 0;
}

/* ===================== HERO SEARCH ===================== */

.hero-search-form {
    width: min(100%, 620px);
    margin-top: 28px;
}

.hero-search-box {
    position: relative;
    width: 100%;
    min-height: 58px;
    padding: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 106, 0, 0.20);
    box-shadow:
        0 18px 38px rgba(17, 24, 39, 0.10),
        0 8px 22px rgba(255, 106, 0, 0.10);
}

.hero-search-box:focus-within {
    border-color: rgba(255, 106, 0, 0.55);
    box-shadow:
        0 22px 48px rgba(17, 24, 39, 0.13),
        0 12px 28px rgba(255, 106, 0, 0.18);
}

.hero-search-icon {
    width: 44px;
    height: auto;
    flex: 0 0 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand, #ff6a00);
    font-size: 18px;
}

.hero-search-input {
    min-width: 0;
    flex: 1;
    height: 46px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink, #111827);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
}

.hero-search-input::placeholder {
    color: #9ca3af;
    font-weight: 500;
}

.hero-search-btn {
    height: 46px;
    padding: 0 24px;
    border: 0;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(90deg, var(--brand2, #ff3d3d), var(--brand, #ff6a00));
    box-shadow: 0 12px 24px rgba(255, 106, 0, 0.25);
    font: inherit;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: var(--transition, all 0.25s ease);
    white-space: nowrap;
}

.hero-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(255, 106, 0, 0.34);
}

.hero-search-btn:active {
    transform: translateY(0);
}

.hero-popular {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-popular span {
    color: var(--ink, #111827);
    font-size: 14px;
    font-weight: 800;
}

.hero-popular a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    color: var(--brand, #ff6a00);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 106, 0, 0.14);
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    transition: var(--transition, all 0.25s ease);
}

.hero-popular a:hover {
    color: #fff;
    background: var(--brand, #ff6a00);
    transform: translateY(-2px);
}

/* ===================== SLIDER ===================== */
.slider-container {
    position: relative;
    height: 450px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: flex-end;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 6s linear;
}

.slide.active img {
    transform: scale(1);
}

.slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
}

.slide-content {
    position: relative;
    z-index: 2;
    padding: 40px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slide-info h2 {
    color: #fff;
    margin: 0 0 10px;
    font-size: 28px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.btn-join {
    background: var(--brand);
    color: var(--ink);
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 800;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Dots Navigation */
.dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: #fff;
    width: 30px;
    border-radius: 10px;
}

@media (max-width: 480px) {
    .hero-search-form {
        width: 100%;
        margin-top: 22px;
    }

    .hero-search-box {
        min-height: auto;
        padding: 8px;
        flex-wrap: wrap;
        border-radius: 18px;
    }

    .hero-search-icon {
        width: 38px;
        height: 42px;
        flex: 0 0 38px;
    }

    .hero-search-input {
        height: 42px;
        font-size: 14px;
        flex: 1;
    }

    .hero-search-btn {
        width: 100%;
        height: 44px;
        margin-top: 2px;
    }

    .hero-popular {
        gap: 8px;
        margin-top: 14px;
    }

    .hero-popular span {
        width: 100%;
        font-size: 13px;
    }

    .hero-popular a {
        min-height: 32px;
        padding: 0 11px;
        font-size: 12px;
    }

    .header-inner {
        flex-direction: column;
        gap: 12px;
        padding: 12px 0;
    }

    .logo img {
        height: 32px;
    }

    .nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav a {
        padding: 9px 16px;
        font-size: 13px;
    }

    .hero {
        min-height: 300px;
        padding: 34px 24px;
        border-radius: 24px;
        align-items: flex-start;
    }

    .hero-bg {
        background-image:
            radial-gradient(circle at 85% 18%, rgba(255, 106, 0, .20), transparent 42%),
            linear-gradient(135deg, #fff7ed, #ffffff);
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero p {
        font-size: 15px;
        margin: 0;
        width: auto;
    }

    .btn-join {
        width: 100%;
        text-align: center;
    }

    .slider-container {
        height: 270px;
    }
}

.slide-date {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* ===================== EVENT DISCOVERY / TINDER STYLE ===================== */

.event-discovery {
    position: relative;
    margin-top: 38px;
    padding: 34px;
    border-radius: 34px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
    align-items: center;
    background:
        radial-gradient(circle at 18% 10%, rgba(255, 106, 0, 0.08), transparent 28%),
        radial-gradient(circle at 84% 12%, rgba(255, 61, 61, 0.06), transparent 25%),
        linear-gradient(135deg, #fffaf4 0%, #ffffff 48%, #fff7ef 100%);
    border: 1px solid rgba(255, 106, 0, 0.14);
    box-shadow: 0 24px 70px rgba(17, 24, 39, 0.12);
    overflow: hidden;
    contain: layout paint style;
}

.event-discovery::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(255, 106, 0, 0.16) 1px, transparent 1.5px);
    background-size: 24px 24px;
    opacity: 0.22;
    mask-image: linear-gradient(90deg, #000, transparent 36%, transparent 70%, #000);
}

/* CENTER STACK */
.event-stack-area {
    position: relative;
    z-index: 2;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.event-stack {
    position: relative;
    width: min(420px, 100%);
    height: 510px;
    padding: 0 24px 24px 0;
    contain: layout paint style;
}

.event-stack-card {
    position: absolute;
    inset: 0 24px 24px 0;
    border-radius: 30px;
    overflow: hidden;
    background: #111827;
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.20);
    transform:
        translateX(calc(var(--i) * 12px)) translateY(calc(var(--i) * 12px)) rotate(calc(var(--i) * 1.8deg)) scale(calc(1 - (var(--i) * 0.035)));
    opacity: calc(1 - (var(--i) * 0.33));
    z-index: calc(20 - var(--i));
    pointer-events: none;
    transition:
        transform 0.22s cubic-bezier(.2, .8, .2, 1),
        opacity 0.16s ease,
        z-index 0s linear;
    contain: layout paint;
    backface-visibility: hidden;
}

.event-stack-card.active {
    transform: translateX(0) translateY(0) rotate(0) scale(1);
    opacity: 1;
    pointer-events: auto;
    z-index: 30;
    touch-action: pan-y;
    cursor: grab;
}

.event-stack-card.active:active {
    cursor: grabbing;
}

.event-stack-card.is-swiping {
    transition: none;
}

.event-stack-card.swipe-out-left {
    transform: translate3d(-115%, 18px, 0) rotate(-12deg);
    opacity: 0;
}

.event-stack-card.swipe-out-right {
    transform: translate3d(115%, 18px, 0) rotate(12deg);
    opacity: 0;
}

.event-stack-card:not(.active) {
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.12) !important;
}

.event-stack-card:not(.active) .event-stack-content,
.event-stack-card:not(.active) .event-heart,
.event-stack-card:not(.active) .event-badge {
    visibility: hidden;
}

.event-stack-card.is-hidden {
    display: none;
}

.event-stack-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-tap-highlight-color: transparent;
}

.event-card-shade {
    position: absolute;
    inset: auto 0 0;
    height: 58%;
    pointer-events: none;
    background: linear-gradient(0deg, rgba(8, 8, 10, 0.86) 0%, rgba(8, 8, 10, 0.5) 45%, transparent 100%);
}

.event-heart {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    font-size: 22px;
    cursor: pointer;
}

.event-heart.is-saved,
.event-action-btn.save.is-saved {
    color: #fff;
    background: linear-gradient(90deg, var(--brand2), var(--brand));
}

.event-action-btn:disabled {
    cursor: wait;
    opacity: 0.65;
}

.event-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    padding: 8px 13px;
    border-radius: 999px;
    color: #fff;
    background: rgba(17, 24, 39, 0.72);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 900;
}

.event-stack-content {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    color: #fff;
}

.event-location {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 700;
}

.event-stack-content h3 {
    margin: 12px 0 8px;
    font-size: 30px;
    line-height: 1.08;
    letter-spacing: -0.04em;
    font-weight: 950;
}

.event-stack-content p {
    margin: 0;
    max-width: 360px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 14px;
    line-height: 1.65;
}

.event-mini-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.event-mini-meta span {
    min-height: 36px;
    padding: 0 11px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.event-actions {
    margin-top: 20px;
    display: flex;
    gap: 18px;
    justify-content: center;
}

.event-action-btn {
    width: 62px;
    height: 62px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-size: 22px;
    transition: var(--transition);
    box-shadow: 0 16px 36px rgba(17, 24, 39, 0.14);
}

.event-action-btn.ghost {
    color: var(--ink);
    background: #fff;
}

.event-action-btn.save {
    color: #fff;
    background: #111827;
}

.event-action-btn.next {
    color: #fff;
    background: linear-gradient(90deg, var(--brand2), var(--brand));
}

.event-action-btn:hover {
    transform: translateY(-4px) scale(1.04);
}

/* RIGHT DETAIL */
.event-detail-panel {
    position: relative;
    z-index: 2;
    padding: 24px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 0 18px 44px rgba(17, 24, 39, 0.08);
    contain: layout paint;
}

.detail-place {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #16a34a;
    font-size: 13px;
    font-weight: 900;
}

.event-detail-panel h2 {
    margin: 12px 0 8px;
    font-size: 26px;
    line-height: 1.18;
    letter-spacing: -0.04em;
    font-weight: 950;
}

.event-detail-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.detail-score {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.detail-score i {
    color: #f59e0b;
}

.detail-score span {
    color: var(--muted);
    font-size: 13px;
}

#detailDesc {
    display: -webkit-box;
    overflow: hidden;
    max-height: 8.5em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
}

.detail-list {
    margin-top: 18px;
    display: grid;
    gap: 10px;
}

.detail-list div {
    min-height: 46px;
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.detail-list i {
    color: var(--muted);
}

.detail-list span {
    color: var(--muted);
    font-size: 13px;
}

.detail-list strong {
    font-size: 13px;
    text-align: right;
}

.detail-progress {
    height: 9px;
    margin-top: 18px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(17, 24, 39, 0.08);
}

.detail-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #22c55e, var(--brand));
    width: 100% !important;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.2s ease;
    will-change: transform;
}

.detail-main-btn {
    width: 100%;
    height: 50px;
    margin-top: 18px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    background: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.event-empty {
    width: 100%;
    padding: 50px 20px;
    border-radius: 28px;
    text-align: center;
    background: #fff;
    border: 1px dashed rgba(17, 24, 39, 0.16);
}

.event-empty i {
    font-size: 42px;
    color: var(--brand);
}

.event-empty h3 {
    margin: 14px 0 6px;
}

.event-empty p {
    margin: 0;
    color: var(--muted);
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 1120px) {
    .event-discovery {
        grid-template-columns: 210px minmax(0, 1fr);
    }

    .event-detail-panel {
        grid-column: 1 / -1;
    }
}

@media (max-width: 820px) {
    .event-discovery {
        padding: 22px;
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .event-stack-area {
        width: 100%;
        min-width: 0;
        min-height: auto;
    }

    .event-stack {
        width: 100%;
        max-width: 420px;
        height: 460px;
        padding-right: 18px;
        padding-bottom: 18px;
    }

    .event-stack-card {
        inset: 0 18px 18px 0;
        transform:
            translateX(calc(var(--i) * 9px)) translateY(calc(var(--i) * 9px)) rotate(calc(var(--i) * 1.4deg)) scale(calc(1 - (var(--i) * 0.03)));
    }

    .event-stack-content h3 {
        font-size: 26px;
    }

    .event-detail-panel {
        display: none;
    }
}

@media (max-width: 480px) {
    .wrap {
        width: calc(100% - 24px);
        padding: 24px 0 56px;
    }

    .event-discovery {
        margin-top: 24px;
        padding: 16px;
        border-radius: 24px;
    }

    .event-stack {
        height: clamp(370px, 125vw, 430px);
    }

    .event-stack-content {
        left: 18px;
        right: 18px;
        bottom: 18px;
    }

    .event-mini-meta {
        gap: 8px;
    }

    .event-action-btn {
        width: 54px;
        height: 54px;
    }

    .event-stack-content h3 {
        font-size: clamp(22px, 7vw, 26px);
    }

    .event-stack-content p {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .event-mini-meta {
        margin-top: 12px;
    }

    .event-mini-meta span {
        min-height: 32px;
        padding: 0 9px;
        font-size: 11px;
    }
}

/* ===================== PERFORMANCE / INP PATCH ===================== */

/* ลดงาน paint หนัก */
.hero,
.trusted-section,
.site-footer {
    contain: layout paint;
}

@media (max-width: 360px) {
    .event-discovery {
        padding: 12px;
    }

    .event-stack {
        height: 370px;
    }

    .event-stack-content {
        left: 15px;
        right: 15px;
        bottom: 15px;
    }

    .event-mini-meta span:nth-child(3) {
        display: none;
    }
}

/* กัน browser render ส่วนที่ยังไม่เห็น */
.trusted-section,
.site-footer {
    content-visibility: auto;
    contain-intrinsic-size: 600px;
}

/* ลด blur/shadow หนักจาก event deck */
.event-detail-panel,
.event-heart,
.event-badge {
    backdrop-filter: none !important;
}

.event-discovery {
    box-shadow: 0 14px 34px rgba(17, 24, 39, 0.10) !important;
}

.event-stack-card {
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.20) !important;
    backface-visibility: hidden;
    transform-style: flat;
}

/* ให้ GPU จัดการเฉพาะใบ active */
.event-stack-card.active {
    will-change: transform;
}

.event-stack-card:not(.active) {
    will-change: auto;
}

/* ลด hover หนักบนอุปกรณ์ touch */
@media (hover: none) {

    .nav .register:hover,
    .hero-popular a:hover,
    .event-action-btn:hover,
    .footer-btn-primary:hover,
    .footer-social a:hover,
    .trusted-logo-card:hover {
        transform: none !important;
        box-shadow: none !important;
    }
}

/* ลด motion ถ้า browser/user ขอ */
@media (prefers-reduced-motion: reduce) {
    .event-stack-card {
        transition: none !important;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===================== ACTIVITY RADAR / TRENDING SEARCH CARDS ===================== */

.activity-radar {
    position: relative;
    margin-top: 34px;
    padding: 30px;
    border-radius: 32px;
    background:
        radial-gradient(circle at 12% 4%, rgba(255, 106, 0, 0.10), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 0 20px 50px rgba(17, 24, 39, 0.10);
    contain: layout paint style;
}

.activity-radar-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 22px;
    margin-bottom: 22px;
}

.activity-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(90deg, var(--brand2), var(--brand));
    font-size: 13px;
    font-weight: 950;
}

.activity-radar h2 {
    margin: 12px 0 6px;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.06;
    letter-spacing: -0.05em;
    font-weight: 950;
}

.activity-radar p {
    max-width: 700px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.activity-radar-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    text-align: right;
}

.activity-radar-tools span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.activity-clear-btn {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(17, 24, 39, 0.10);
    border-radius: 999px;
    color: var(--ink);
    background: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    transition: var(--transition);
}

.activity-clear-btn:hover {
    border-color: rgba(255, 106, 0, 0.38);
    color: var(--brand);
    transform: translateY(-2px);
}

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

.activity-card {
    position: relative;
    min-width: 0;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 24px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    contain: layout paint;
}

.activity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.12);
}

.activity-card.is-search-match {
    border: 5px solid transparent;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(90deg, #ff3d3d, #ff6a00, #22c55e, #3b82f6, #ff3d3d) border-box;
    background-size: 100% 100%, 100% 100%;
    box-shadow: 0 18px 44px rgba(255, 106, 0, 0.18);
}

.activity-card.is-exact-match {
    box-shadow:
        0 18px 46px rgba(255, 106, 0, 0.22),
        0 0 0 5px rgba(255, 106, 0, 0.10);
}

.activity-cover {
    position: relative;
    display: block;
    height: 170px;
    overflow: hidden;
    background: #111827;
    text-decoration: none;
}

.activity-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.12), rgba(17, 24, 39, 0.70));
}

.activity-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.activity-card:hover .activity-cover img {
    transform: scale(1.04);
}

.activity-rank,
.activity-match-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 950;
}

.activity-rank {
    top: 12px;
    left: 12px;
    padding: 0 11px;
    background: rgba(17, 24, 39, 0.76);
}

.activity-match-badge {
    right: 12px;
    bottom: 12px;
    max-width: calc(100% - 24px);
    padding: 0 12px;
    background: linear-gradient(90deg, var(--brand2), var(--brand));
    box-shadow: 0 10px 22px rgba(255, 106, 0, 0.28);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-card-body {
    padding: 16px;
}

.activity-place {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    color: #9a3412;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-card h3 {
    min-height: 52px;
    margin: 8px 0 7px;
    color: var(--ink);
    font-size: 18px;
    line-height: 1.25;
    letter-spacing: -0.03em;
    font-weight: 950;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.activity-card p {
    min-height: 44px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.activity-meta-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 13px;
}

.activity-meta-row span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: #4b5563;
    font-size: 12px;
    font-weight: 800;
}

.activity-meta-row i {
    width: 15px;
    color: #9ca3af;
}

.activity-bottom {
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 12px;
    align-items: center;
}

.activity-bottom strong {
    display: block;
    font-size: 17px;
    line-height: 1;
    font-weight: 950;
}

.activity-bottom small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.activity-progress {
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(17, 24, 39, 0.08);
}

.activity-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand2), var(--brand));
}

.activity-card-cta {
    grid-column: 1 / -1;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #111827;
    text-decoration: none;
    font-size: 13px;
    font-weight: 950;
    transition: var(--transition);
}

.activity-card-cta:hover {
    background: linear-gradient(90deg, var(--brand2), var(--brand));
    transform: translateY(-2px);
}

@media (max-width: 1120px) {
    .activity-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .activity-radar {
        padding: 22px;
        border-radius: 26px;
    }

    .activity-radar-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .activity-radar-tools {
        width: 100%;
        justify-content: space-between;
        text-align: left;
    }

    .activity-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 540px) {
    .activity-radar {
        margin-top: 24px;
        padding: 16px;
        border-radius: 22px;
    }

    .activity-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .activity-cover {
        height: 188px;
    }

    .activity-radar-tools {
        gap: 8px;
    }

    .activity-radar-tools span {
        width: 100%;
    }
}

@media (hover: none) {

    .activity-card:hover,
    .activity-card:hover .activity-cover img,
    .activity-clear-btn:hover,
    .activity-card-cta:hover {
        transform: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .activity-card.is-search-match {
        animation: none !important;
    }
}


/* ===================== POLISHED EMPTY STATES ===================== */

.event-discovery--empty {
    grid-template-columns: 230px minmax(0, 1fr);
}

.event-stack-area--empty {
    min-height: 430px;
    justify-content: center;
}

.event-empty {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 360px;
    padding: 42px 28px;
    border: 1px solid rgba(255, 106, 0, 0.16);
    border-radius: 32px;
    text-align: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 8%, rgba(255, 106, 0, 0.14), transparent 24%),
        radial-gradient(circle at 88% 18%, rgba(255, 61, 61, 0.08), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, #fffaf4 100%);
    box-shadow:
        0 22px 52px rgba(17, 24, 39, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.event-empty::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(255, 106, 0, 0.18) 1px, transparent 1.5px);
    background-size: 22px 22px;
    opacity: 0.18;
    mask-image: linear-gradient(180deg, #000, transparent 72%);
}

.event-empty::after {
    content: "";
    position: absolute;
    right: -84px;
    bottom: -96px;
    width: 230px;
    height: 230px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 106, 0, 0.20), rgba(255, 61, 61, 0.05));
}

.event-empty--deck {
    max-width: 520px;
    margin: 0 auto;
}

.event-empty--wide {
    min-height: 330px;
    margin-top: 6px;
}

.event-empty__visual {
    position: relative;
    width: 132px;
    height: 118px;
    margin: 0 auto 18px;
}

.event-empty__halo {
    position: absolute;
    inset: 10px;
    border-radius: 38px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 237, 213, 0.84));
    border: 1px solid rgba(255, 106, 0, 0.16);
    box-shadow: 0 18px 36px rgba(255, 106, 0, 0.14);
    transform: rotate(-4deg);
}

.event-empty__icon {
    position: absolute;
    inset: 25px 33px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand2), var(--brand));
    box-shadow: 0 16px 34px rgba(255, 106, 0, 0.28);
}

.event-empty .event-empty__icon i {
    color: #fff;
    font-size: 34px;
}

.event-empty__bubble {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: var(--brand);
    background: #fff;
    border: 1px solid rgba(255, 106, 0, 0.14);
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.10);
}

.event-empty .event-empty__bubble i {
    color: var(--brand);
    font-size: 15px;
}

.event-empty__bubble--search {
    left: 0;
    top: 10px;
}

.event-empty__bubble--star {
    right: 0;
    bottom: 4px;
}

.event-empty__kicker {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    margin-bottom: 10px;
    padding: 0 12px;
    border-radius: 999px;
    color: #c2410c;
    background: #ffedd5;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.08em;
}

.event-empty h3 {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #111827;
    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.16;
    letter-spacing: -0.04em;
    font-weight: 950;
}

.event-empty p {
    position: relative;
    z-index: 1;
    max-width: 520px;
    margin: 12px auto 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.8;
}

.event-empty__actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.event-empty__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 950;
    transition: var(--transition);
}

.event-empty__btn--primary {
    color: #fff;
    background: linear-gradient(90deg, var(--brand2), var(--brand));
    box-shadow: 0 14px 28px rgba(255, 106, 0, 0.24);
}

.event-empty__btn--soft {
    color: #9a3412;
    background: #fff;
    border: 1px solid rgba(255, 106, 0, 0.16);
}

.event-empty__btn:hover {
    transform: translateY(-2px);
}

@media (max-width: 1120px) {
    .event-stack-area--empty {
        min-height: 380px;
    }

    .event-empty--deck {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .event-empty {
        min-height: 300px;
        padding: 32px 18px;
        border-radius: 24px;
    }

    .event-empty__visual {
        width: 112px;
        height: 100px;
        margin-bottom: 14px;
    }

    .event-empty__icon {
        inset: 21px 29px;
        border-radius: 24px;
    }

    .event-empty .event-empty__icon i {
        font-size: 28px;
    }

    .event-empty__actions {
        flex-direction: column;
    }

    .event-empty__btn {
        width: 100%;
    }
}
