.tf-leisure {
    color: #202728;
    --tf-leisure-accent: #00a4ad;
    --tf-leisure-button: #006f76;
}
.tf-leisure-page {
    background: #f5f5f5;
    padding: 0 0 48px;
}
.tf-leisure-page .tf-leisure-banner {
    position: relative;
    width: 100%;
    height: 125px;
    margin: -5px 0 12px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .10);
    background: #f5f5f5 url('../image/tf-leisure-yingge.webp') center center / cover no-repeat;
}

.tf-leisure-page .tf-leisure-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    z-index: 20;
    width: 58%;
    height: 125px;
    pointer-events: none;
    background: linear-gradient(
    90deg,
    rgba(245, 245, 245, 0.98) 0%,
    rgba(245, 245, 245, 0.98) 20%,
    rgba(245, 245, 245, 0.65) 40%,
    rgba(245, 245, 245, 0.18) 58%,
    rgba(245, 245, 245, 0) 72%
    );
}

.tf-leisure-page .tf-leisure-title {
    position: absolute;
    top: 28px;
    left: 30px;
    z-index: 30;
    display: flex;
    align-items: center;
    max-width: calc(100% - 60px);
    margin: 0;
    padding: 0;
    color: #303638;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-family:
    "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", "Heiti TC", Arial,
    sans-serif;
    font-size: 40px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
    white-space: normal;
    -webkit-text-stroke: 0;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.12);
    pointer-events: none;
}

.tf-leisure-page .tf-leisure-title::before {
    content: "";
    display: block;
    width: 4px;
    height: 42px;
    margin-right: 15px;
    flex: 0 0 auto;
    background: linear-gradient(
    180deg,
    rgba(0, 164, 173, 0.1) 0%,
    rgba(0, 164, 173, 0.85) 20%,
    #00a4ad 50%,
    rgba(0, 164, 173, 0.9) 80%,
    rgba(0, 164, 173, 0.1) 100%
    );
    transform: skewX(-3deg);
    border-radius: 50%;
}

.tf-leisure-page .tf-leisure-title::after {
    content: "";
    display: block;
    width: 100px;
    height: 2px;
    margin-left: 18px;
    flex: 0 0 auto;
    background: linear-gradient(
    90deg,
    rgba(0, 164, 173, 0.82) 0%,
    rgba(0, 164, 173, 0.35) 45%,
    rgba(0, 164, 173, 0) 100%
    );
}

@media (max-width: 991px) {
    .tf-leisure-page .tf-leisure-banner {
        height: 80px;
        margin: -3px 0 10px;
        border-radius: 8px;
        background-position: right center;
    }

    .tf-leisure-page .tf-leisure-banner::before {
        width: 92%;
        height: 80px;
        background: linear-gradient(
        90deg,
        rgba(245, 245, 245, 0.98) 0%,
        rgba(245, 245, 245, 0.9) 50%,
        rgba(245, 245, 245, 0.4) 78%,
        rgba(245, 245, 245, 0) 100%
        );
    }

    .tf-leisure-page .tf-leisure-title {
        top: 13px;
        left: 12px;
        max-width: calc(100% - 24px);
        font-size: 27px;
        font-weight: 700;
        line-height: 1.2;
        letter-spacing: 0.01em;
        -webkit-text-stroke: 0;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    }

    .tf-leisure-page .tf-leisure-title::before {
        width: 3px;
        height: 30px;
        margin-right: 9px;
    }

    .tf-leisure-page .tf-leisure-title::after {
        width: 32px;
        height: 2px;
        margin-left: 9px;
    }
}
.tf-leisure-feature, .tf-leisure-card {
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .07);
}
.tf-leisure-feature > a, .tf-leisure-card > a {
    display: block;
    height: 100%;
    padding: 8px;
    border-radius: inherit;
    color: inherit;
    text-decoration: none;
}
.tf-leisure-feature > a:focus-visible,
.tf-leisure-card > a:focus-visible,
.tf-leisure-button:focus-visible {
    outline: 3px solid #006f76;
    outline-offset: 3px;
}
.tf-leisure-feature > a:hover h2,
.tf-leisure-card > a:hover h2,
.tf-leisure-card > a:hover h3 {
    color: var(--tf-leisure-button);
}
.tf-leisure-feature > a {
    display: flex;
    align-items: center;
}
.tf-leisure-feature img, .tf-leisure-card img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    border-radius: 7px;
}
.tf-leisure-feature img {
    flex: 0 0 auto;
    max-width: 62%;
}
.tf-leisure-copy {
    min-width: 0;
    padding: 18px;
    overflow-wrap: anywhere;
}
.tf-leisure-feature .tf-leisure-copy {
    padding: 20px clamp(16px, 3vw, 38px);
}
.tf-leisure-copy h2, .tf-leisure-copy h3 {
    font-size: 23px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}
.tf-leisure-feature h2 {
    font-size: clamp(26px, 3.2vw, 42px);
}
.tf-leisure-copy p, .tf-leisure-empty {
    color: #465052;
    font-size: 17px;
    line-height: 1.65;
    margin: 10px 0 0;
}
.tf-leisure-empty, .tf-leisure-pages {
    text-align: center;
}
.tf-leisure-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--tf-leisure-button);
    color: white;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}
.tf-leisure-button:hover, .tf-leisure-button:focus {
    color: white;
}
.tf-leisure-feature .tf-leisure-button {
    margin-top: 18px;
}
.tf-leisure-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 22px;
}
.tf-leisure-latest {
    margin: 8px 0;
}
.tf-leisure-latest .tf-leisure-grid {
    margin-top: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tf-leisure-latest .tf-leisure-card > a {
    display: grid;
    grid-template-areas: "cover";
    aspect-ratio: 16 / 9;
    height: auto;
    padding: 0;
    overflow: hidden;
    background: #3b4748;
}
.tf-leisure-latest .tf-leisure-card img {
    grid-area: cover;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
    border-radius: 0;
}
.tf-leisure-latest .tf-leisure-copy {
    grid-area: cover;
    align-self: end;
    position: relative;
    padding: 8px 14px;
    background: rgba(0, 0, 0, .68);
    text-align: left;
}
.tf-leisure-latest .tf-leisure-card .tf-leisure-copy h3 {
    color: #fff;
    font-size: clamp(18px, 1.6vw, 20px);
    font-weight: 700;
    margin: 0;
}
.tf-leisure-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.tf-leisure-heading h2 {
    font-size: 25px;
    font-weight: 700;
    margin: 0;
}
@media (max-width: 991px) {
    .tf-leisure-latest .tf-leisure-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .tf-leisure-latest .tf-leisure-card:nth-child(n+3) {
        display: none;
    }
    .tf-leisure-latest .tf-leisure-copy {
        padding: 4px 8px;
    }
    .tf-leisure-page .tf-leisure-grid {
        gap: 10px;
        margin-top: 12px;
    }
    .tf-leisure-feature img {
        max-width: 50%;
    }
    .tf-leisure-page .tf-leisure-copy {
        padding: 8px;
    }
    .tf-leisure-page .tf-leisure-copy h2 {
        font-size: 18px;
    }
    .tf-leisure-feature .tf-leisure-button {
        margin-top: 8px;
        padding: 6px 10px;
    }
}

html.tf-leisure-dialog-open { overflow: hidden; }

.tf-leisure-dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(1080px, calc(100vw - 32px), calc((100dvh - 88px) * 16 / 9));
    max-width: none;
    max-height: none;
    padding: 0;
    border: 0;
    color: #fff;
    background: transparent;
    overflow: visible;
}

.tf-leisure-dialog::backdrop { background: rgba(16, 22, 23, .80); }

.tf-leisure-dialog-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

.tf-leisure-dialog-actions button {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #fff;
    font: 32px/1 system-ui, sans-serif;
    cursor: pointer;
}

.tf-leisure-dialog-actions button:hover,
.tf-leisure-dialog-actions button:focus-visible {
    color: #fff;
    background: #007078;
    outline: 2px solid #a9e5e7;
    outline-offset: -2px;
}

.tf-leisure-frame {
    box-sizing: border-box;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(255, 255, 255, .78);
    overflow: hidden;
    background: #fff;
}

.tf-leisure-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (min-width: 992px) {
    .tf-leisure-dialog[data-size="wide"] {
        width: min(1280px, calc(100vw - 32px), calc((100dvh - 88px) * 16 / 9));
    }

    .tf-leisure-dialog[data-size="portrait"] {
        width: min(620px, calc(100vw - 32px), calc((100dvh - 88px) * 3 / 4));
    }

    .tf-leisure-dialog[data-size="portrait"] .tf-leisure-frame {
        aspect-ratio: 3 / 4;
    }

    .tf-leisure-dialog[data-size="auto"] .tf-leisure-frame {
        height: var(--tf-leisure-content-height, auto);
        max-height: max(1px, calc(100dvh - 88px));
    }
}

@media (min-width: 992px) {
    .tf-leisure-dialog[data-size="tall"] {
        width: min(1080px, calc(100vw - 32px), calc((100dvh - 88px) * 3 / 2));
    }

    .tf-leisure-dialog[data-size="tall"] .tf-leisure-frame {
        aspect-ratio: 3 / 2;
    }

    .tf-leisure-dialog[data-size="compact"] {
        width: min(1080px, calc(100vw - 32px), calc((100dvh - 88px) * 2));
    }

    .tf-leisure-dialog[data-size="compact"] .tf-leisure-frame {
        aspect-ratio: 2 / 1;
    }
}

@media screen {
    .tf-leisure-dialog[data-size="custom"] {
        width: min(var(--tf-popup-width), calc(100vw - 32px), calc(max(1px, 100dvh - 88px) * var(--tf-popup-ratio)));
    }

    .tf-leisure-dialog[data-size="custom"] .tf-leisure-frame {
        aspect-ratio: var(--tf-popup-ratio);
    }
}

.tf-leisure-dialog[data-size="viewport"] {
    box-sizing: border-box;
    width: calc(100vw - 8px);
    height: calc(100vh - 8px);
    height: calc(100dvh - 8px);
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.tf-leisure-dialog[data-size="viewport"] .tf-leisure-frame {
    height: calc(100% - 48px);
    aspect-ratio: auto;
}

.tf-leisure-dialog-actions .tf-leisure-expand {
    display: none;
}
.tf-leisure-dialog[data-size="viewport"] .tf-leisure-expand {
    display: inline-grid;
    place-items: center;
    width: 44px;
    padding: 0;
}
.tf-leisure-dialog[data-size="viewport"].tf-leisure-expanded {
    box-sizing: border-box;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    background: #202426;
}
.tf-leisure-dialog[data-size="viewport"].tf-leisure-expanded .tf-leisure-frame {
    height: calc(100% - 48px);
}

.tf-leisure-expand[aria-pressed="true"] { background: #006f76; }

.tf-leisure-expand[aria-pressed="false"] .tf-icon-restore,
.tf-leisure-expand[aria-pressed="true"] .tf-icon-expand {
    display: none;
}

.tf-leisure-list {
    display: contents;
}
@media (max-width: 991px) {
    .tf-leisure-page .tf-leisure-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .tf-leisure-list > .tf-leisure-grid {
        display: contents;
    }
    .tf-leisure-list .tf-leisure-feature > a {
        display: block;
    }
    .tf-leisure-list article img {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        object-fit: contain;
    }
    .tf-leisure-list .tf-leisure-feature .tf-leisure-button {
        display: none;
    }
    .tf-leisure-list .tf-leisure-empty {
        grid-column: 1 / -1;
    }
}
